Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PASST User Dashboard
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SPITZE
PASST User Dashboard
Commits
e48dd2f8
Commit
e48dd2f8
authored
4 years ago
by
Jan Dillenberger
Browse files
Options
Downloads
Patches
Plain Diff
Add missing files
parent
ef52a384
Branches
master
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
accordion/kadence-accordion.css
+340
-0
340 additions, 0 deletions
accordion/kadence-accordion.css
accordion/kadence-accordion.js
+538
-0
538 additions, 0 deletions
accordion/kadence-accordion.js
with
878 additions
and
0 deletions
accordion/kadence-accordion.css
0 → 100644
+
340
−
0
View file @
e48dd2f8
.kt-accordion-wrap
.kt-accordion-header-wrap
{
margin
:
0
;
padding
:
0
}
.kt-blocks-accordion-header
{
-webkit-align-content
:
space-between
;
align-content
:
space-between
;
-webkit-align-items
:
center
;
align-items
:
center
;
background-color
:
#f2f2f2
;
border
:
0
solid
transparent
;
border-radius
:
0px
;
color
:
#555555
;
display
:
-webkit-flex
;
display
:
flex
;
font-size
:
18px
;
padding
:
10px
14px
;
position
:
relative
;
line-height
:
24px
;
text-align
:
left
;
transition
:
all
ease-in-out
.2s
;
width
:
100%
;
box-shadow
:
none
;
text-shadow
:
none
}
.kt-blocks-accordion-header
:focus
{
box-shadow
:
none
;
text-shadow
:
none
}
.kt-blocks-accordion-header
:hover
{
background-color
:
#eeeeee
;
color
:
#444444
;
box-shadow
:
none
;
text-shadow
:
none
}
.kt-blocks-accordion-header
:hover
.kt-blocks-accordion-icon-trigger
:after
,
.kt-blocks-accordion-header
:hover
.kt-blocks-accordion-icon-trigger
:before
{
background-color
:
#444444
}
.kt-blocks-accordion-header.kt-accordion-panel-active
{
background-color
:
hsl
(
198
,
53%
,
27%
);
color
:
#ffffff
}
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
:after
,
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
:before
{
background-color
:
#ffffff
}
.kt-accodion-icon-style-basiccircle
.kt-blocks-accordion-header
:hover
.kt-blocks-accordion-icon-trigger
,
.kt-accodion-icon-style-xclosecircle
.kt-blocks-accordion-header
:hover
.kt-blocks-accordion-icon-trigger
,
.kt-accodion-icon-style-arrowcircle
.kt-blocks-accordion-header
:hover
.kt-blocks-accordion-icon-trigger
{
background-color
:
#444444
}
.kt-accodion-icon-style-basiccircle
.kt-blocks-accordion-header
:hover
.kt-blocks-accordion-icon-trigger
:after
,
.kt-accodion-icon-style-basiccircle
.kt-blocks-accordion-header
:hover
.kt-blocks-accordion-icon-trigger
:before
,
.kt-accodion-icon-style-xclosecircle
.kt-blocks-accordion-header
:hover
.kt-blocks-accordion-icon-trigger
:after
,
.kt-accodion-icon-style-xclosecircle
.kt-blocks-accordion-header
:hover
.kt-blocks-accordion-icon-trigger
:before
,
.kt-accodion-icon-style-arrowcircle
.kt-blocks-accordion-header
:hover
.kt-blocks-accordion-icon-trigger
:after
,
.kt-accodion-icon-style-arrowcircle
.kt-blocks-accordion-header
:hover
.kt-blocks-accordion-icon-trigger
:before
{
background-color
:
#eeeeee
}
.kt-accodion-icon-style-basiccircle
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
,
.kt-accodion-icon-style-xclosecircle
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
,
.kt-accodion-icon-style-arrowcircle
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
{
background-color
:
#ffffff
}
.kt-accodion-icon-style-basiccircle
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
:after
,
.kt-accodion-icon-style-basiccircle
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
:before
,
.kt-accodion-icon-style-xclosecircle
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
:after
,
.kt-accodion-icon-style-xclosecircle
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
:before
,
.kt-accodion-icon-style-arrowcircle
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
:after
,
.kt-accodion-icon-style-arrowcircle
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
:before
{
background-color
:
#444444
}
.kt-blocks-accordion-title-wrap
{
display
:
-webkit-flex
;
display
:
flex
;
padding-right
:
10px
}
.kt-accodion-icon-side-left
.kt-blocks-accordion-title-wrap
{
padding-right
:
0px
}
.kt-pane-header-alignment-center
button
.kt-blocks-accordion-header
{
text-align
:
center
}
.kt-pane-header-alignment-center
button
.kt-blocks-accordion-header
.kt-blocks-accordion-title-wrap
{
-webkit-flex-grow
:
2
;
flex-grow
:
2
;
-webkit-justify-content
:
center
;
justify-content
:
center
}
.kt-pane-header-alignment-right
button
.kt-blocks-accordion-header
{
text-align
:
right
}
.kt-pane-header-alignment-right
button
.kt-blocks-accordion-header
.kt-blocks-accordion-title-wrap
{
-webkit-flex-grow
:
2
;
flex-grow
:
2
;
-webkit-justify-content
:
flex-end
;
justify-content
:
flex-end
}
.kt-pane-header-alignment-right
button
.kt-blocks-accordion-header
.kt-blocks-accordion-icon-trigger
{
margin-left
:
10px
}
.kt-acccordion-button-label-hide
.kt-blocks-accordion-title
{
display
:
none
}
.kt-accordion-panel-inner
:after
{
clear
:
both
;
display
:
table
;
content
:
''
}
.kt-accodion-icon-style-none
.kt-blocks-accordion-icon-trigger
{
display
:
none
}
.kt-accodion-icon-side-left
.kt-blocks-accordion-icon-trigger
{
-webkit-order
:
-1
;
order
:
-1
;
margin-left
:
0
;
margin-right
:
10px
}
.kt-blocks-accordion-icon-trigger
{
display
:
block
;
height
:
24px
;
margin-left
:
auto
;
position
:
relative
;
transition
:
all
ease-in-out
0.2s
;
width
:
24px
;
min-width
:
24px
;
box-sizing
:
content-box
}
.kt-blocks-accordion-icon-trigger
:after
,
.kt-blocks-accordion-icon-trigger
:before
{
background-color
:
#333
}
.kt-accodion-icon-style-basic
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
:before
,
.kt-accodion-icon-style-basiccircle
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
:before
{
-webkit-transform
:
rotate
(
0deg
);
transform
:
rotate
(
0deg
)
}
.kt-accodion-icon-style-basic
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
:after
,
.kt-accodion-icon-style-basiccircle
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
:after
{
-webkit-transform
:
rotate
(
0deg
);
transform
:
rotate
(
0deg
)
}
.kt-accodion-icon-style-basic
.kt-blocks-accordion-icon-trigger
:after
,
.kt-accodion-icon-style-basic
.kt-blocks-accordion-icon-trigger
:before
,
.kt-accodion-icon-style-basiccircle
.kt-blocks-accordion-icon-trigger
:after
,
.kt-accodion-icon-style-basiccircle
.kt-blocks-accordion-icon-trigger
:before
{
content
:
""
;
height
:
4px
;
position
:
absolute
;
transition
:
all
ease-in-out
0.1333333333s
;
width
:
20px
;
left
:
2px
;
top
:
10px
}
.kt-accodion-icon-style-basic
.kt-blocks-accordion-icon-trigger
:before
,
.kt-accodion-icon-style-basiccircle
.kt-blocks-accordion-icon-trigger
:before
{
-webkit-transform
:
rotate
(
90deg
);
transform
:
rotate
(
90deg
);
-webkit-transform-origin
:
50%
;
transform-origin
:
50%
}
.kt-accodion-icon-style-basic
.kt-blocks-accordion-icon-trigger
:after
,
.kt-accodion-icon-style-basiccircle
.kt-blocks-accordion-icon-trigger
:after
{
-webkit-transform
:
rotate
(
0deg
);
transform
:
rotate
(
0deg
);
-webkit-transform-origin
:
50%
;
transform-origin
:
50%
}
.kt-accodion-icon-style-basiccircle
.kt-blocks-accordion-icon-trigger
{
background-color
:
#333
;
border-radius
:
50%
}
.kt-accodion-icon-style-basiccircle
.kt-blocks-accordion-icon-trigger
:after
,
.kt-accodion-icon-style-basiccircle
.kt-blocks-accordion-icon-trigger
:before
{
background-color
:
#fff
;
width
:
16px
;
left
:
4px
;
top
:
10px
}
.kt-accodion-icon-style-xclose
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
:before
,
.kt-accodion-icon-style-xclosecircle
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
:before
{
-webkit-transform
:
rotate
(
45deg
);
transform
:
rotate
(
45deg
)
}
.kt-accodion-icon-style-xclose
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
:after
,
.kt-accodion-icon-style-xclosecircle
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
:after
{
-webkit-transform
:
rotate
(
-45deg
);
transform
:
rotate
(
-45deg
)
}
.kt-accodion-icon-style-xclose
.kt-blocks-accordion-icon-trigger
:after
,
.kt-accodion-icon-style-xclose
.kt-blocks-accordion-icon-trigger
:before
,
.kt-accodion-icon-style-xclosecircle
.kt-blocks-accordion-icon-trigger
:after
,
.kt-accodion-icon-style-xclosecircle
.kt-blocks-accordion-icon-trigger
:before
{
content
:
""
;
height
:
4px
;
position
:
absolute
;
transition
:
all
ease-in-out
0.1333333333s
;
width
:
20px
;
left
:
2px
;
top
:
10px
}
.kt-accodion-icon-style-xclose
.kt-blocks-accordion-icon-trigger
:before
,
.kt-accodion-icon-style-xclosecircle
.kt-blocks-accordion-icon-trigger
:before
{
-webkit-transform
:
rotate
(
90deg
);
transform
:
rotate
(
90deg
);
-webkit-transform-origin
:
50%
;
transform-origin
:
50%
}
.kt-accodion-icon-style-xclose
.kt-blocks-accordion-icon-trigger
:after
,
.kt-accodion-icon-style-xclosecircle
.kt-blocks-accordion-icon-trigger
:after
{
-webkit-transform
:
rotate
(
0deg
);
transform
:
rotate
(
0deg
);
-webkit-transform-origin
:
50%
;
transform-origin
:
50%
}
.kt-accodion-icon-style-xclosecircle
.kt-blocks-accordion-icon-trigger
{
background-color
:
#333
;
border-radius
:
50%
}
.kt-accodion-icon-style-xclosecircle
.kt-blocks-accordion-icon-trigger
:after
,
.kt-accodion-icon-style-xclosecircle
.kt-blocks-accordion-icon-trigger
:before
{
background-color
:
#fff
;
width
:
16px
;
left
:
4px
;
top
:
10px
}
.kt-accodion-icon-style-arrow
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
:before
,
.kt-accodion-icon-style-arrowcircle
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
:before
{
-webkit-transform
:
rotate
(
-45deg
);
transform
:
rotate
(
-45deg
)
}
.kt-accodion-icon-style-arrow
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
:after
,
.kt-accodion-icon-style-arrowcircle
.kt-blocks-accordion-header.kt-accordion-panel-active
.kt-blocks-accordion-icon-trigger
:after
{
-webkit-transform
:
rotate
(
45deg
);
transform
:
rotate
(
45deg
)
}
.kt-accodion-icon-style-arrow
.kt-blocks-accordion-icon-trigger
:after
,
.kt-accodion-icon-style-arrow
.kt-blocks-accordion-icon-trigger
:before
,
.kt-accodion-icon-style-arrowcircle
.kt-blocks-accordion-icon-trigger
:after
,
.kt-accodion-icon-style-arrowcircle
.kt-blocks-accordion-icon-trigger
:before
{
content
:
""
;
height
:
2px
;
position
:
absolute
;
top
:
11px
;
transition
:
all
ease-in-out
0.1333333333s
;
width
:
12px
}
.kt-accodion-icon-style-arrow
.kt-blocks-accordion-icon-trigger
:before
,
.kt-accodion-icon-style-arrowcircle
.kt-blocks-accordion-icon-trigger
:before
{
left
:
2px
;
-webkit-transform
:
rotate
(
45deg
);
transform
:
rotate
(
45deg
);
-webkit-transform-origin
:
50%
;
transform-origin
:
50%
}
.kt-accodion-icon-style-arrow
.kt-blocks-accordion-icon-trigger
:after
,
.kt-accodion-icon-style-arrowcircle
.kt-blocks-accordion-icon-trigger
:after
{
-webkit-transform
:
rotate
(
-45deg
);
transform
:
rotate
(
-45deg
);
right
:
2px
;
-webkit-transform-origin
:
50%
;
transform-origin
:
50%
}
.kt-accodion-icon-style-arrowcircle
.kt-blocks-accordion-icon-trigger
{
background-color
:
#333
;
border-radius
:
50%
}
.kt-accodion-icon-style-arrowcircle
.kt-blocks-accordion-icon-trigger
:after
,
.kt-accodion-icon-style-arrowcircle
.kt-blocks-accordion-icon-trigger
:before
{
background-color
:
#fff
;
width
:
10px
}
.kt-accodion-icon-style-arrowcircle
.kt-blocks-accordion-icon-trigger
:before
{
left
:
4px
}
.kt-accodion-icon-style-arrowcircle
.kt-blocks-accordion-icon-trigger
:after
{
right
:
4px
}
.kt-accordion-header-wrap
{
margin-top
:
8px
}
.kt-accordion-inner-wrap
.wp-block-kadence-pane
:first-child
.kt-accordion-header-wrap
{
margin-top
:
0px
}
.kt-accordion-panel-inner
{
padding
:
20px
;
border
:
1px
solid
#eee
;
border-top
:
0
}
.kt-accordion-panel
{
overflow
:
auto
;
display
:
block
}
.kt-accordion-panel.kt-accordion-panel-hidden
{
max-height
:
0
!important
;
overflow
:
hidden
;
display
:
none
}
.kt-accordion-initialized
.kt-panel-is-collapsing
,
.kt-accordion-initialized
.kt-panel-is-expanding
{
transition
:
height
0.45s
ease
;
position
:
relative
;
height
:
0
;
overflow
:
hidden
}
.kt-accordion-header-wrap
.kt-btn-svg-icon.kt-btn-side-left
{
padding-right
:
5px
}
.kt-accordion-header-wrap
.kt-btn-svg-icon.kt-btn-side-right
{
padding-left
:
5px
}
.kt-accordion-header-wrap
.kt-acccordion-button-label-hide
.kt-btn-svg-icon
{
padding-left
:
0
;
padding-right
:
0
}
.rtl
.kt-blocks-accordion-icon-trigger
{
margin-left
:
0
;
margin-right
:
auto
}
.rtl
.kt-blocks-accordion-title-wrap
{
padding-left
:
10px
;
padding-right
:
0
}
This diff is collapsed.
Click to expand it.
accordion/kadence-accordion.js
0 → 100644
+
538
−
0
View file @
e48dd2f8
!
function
(
t
,
e
)
{
"
object
"
==
typeof
exports
&&
"
undefined
"
!=
typeof
module
?
module
.
exports
=
e
()
:
"
function
"
==
typeof
define
&&
define
.
amd
?
define
(
e
)
:
t
.
KadenceAccordion
=
e
()
}(
this
,
(
function
()
{
"
use strict
"
;
function
t
(
t
,
e
)
{
for
(
var
n
=
0
;
n
<
e
.
length
;
n
++
)
{
var
i
=
e
[
n
];
i
.
enumerable
=
i
.
enumerable
||
!
1
,
i
.
configurable
=
!
0
,
"
value
"
in
i
&&
(
i
.
writable
=
!
0
),
Object
.
defineProperty
(
t
,
i
.
key
,
i
)
}
}
function
e
()
{
return
(
e
=
Object
.
assign
||
function
(
t
)
{
for
(
var
e
=
1
;
e
<
arguments
.
length
;
e
++
)
{
var
n
=
arguments
[
e
];
for
(
var
i
in
n
)
Object
.
prototype
.
hasOwnProperty
.
call
(
n
,
i
)
&&
(
t
[
i
]
=
n
[
i
])
}
return
t
}
).
apply
(
this
,
arguments
)
}
function
n
(
t
)
{
return
function
(
t
)
{
if
(
Array
.
isArray
(
t
))
{
for
(
var
e
=
0
,
n
=
new
Array
(
t
.
length
);
e
<
t
.
length
;
e
++
)
n
[
e
]
=
t
[
e
];
return
n
}
}(
t
)
||
function
(
t
)
{
if
(
Symbol
.
iterator
in
Object
(
t
)
||
"
[object Arguments]
"
===
Object
.
prototype
.
toString
.
call
(
t
))
return
Array
.
from
(
t
)
}(
t
)
||
function
()
{
throw
new
TypeError
(
"
Invalid attempt to spread non-iterable instance
"
)
}()
}
var
i
,
a
,
s
,
r
;
return
function
()
{
if
(
"
function
"
==
typeof
window
.
CustomEvent
)
return
!
1
;
function
t
(
t
,
e
)
{
e
=
e
||
{
bubbles
:
!
1
,
cancelable
:
!
1
,
detail
:
void
0
};
var
n
=
document
.
createEvent
(
"
CustomEvent
"
);
return
n
.
initCustomEvent
(
t
,
e
.
bubbles
,
e
.
cancelable
,
e
.
detail
),
n
}
t
.
prototype
=
window
.
Event
.
prototype
,
window
.
CustomEvent
=
t
}(),
Array
.
from
||
(
Array
.
from
=
(
i
=
Object
.
prototype
.
toString
,
a
=
function
(
t
)
{
return
"
function
"
==
typeof
t
||
"
[object Function]
"
===
i
.
call
(
t
)
}
,
s
=
Math
.
pow
(
2
,
53
)
-
1
,
r
=
function
(
t
)
{
var
e
=
function
(
t
)
{
var
e
=
Number
(
t
);
return
isNaN
(
e
)
?
0
:
0
!==
e
&&
isFinite
(
e
)
?
(
e
>
0
?
1
:
-
1
)
*
Math
.
floor
(
Math
.
abs
(
e
))
:
e
}(
t
);
return
Math
.
min
(
Math
.
max
(
e
,
0
),
s
)
}
,
function
(
t
)
{
var
e
=
this
,
n
=
Object
(
t
);
if
(
null
==
t
)
throw
new
TypeError
(
"
Array.from requires an array-like object - not null or undefined
"
);
var
i
,
s
=
arguments
.
length
>
1
?
arguments
[
1
]
:
void
0
;
if
(
void
0
!==
s
)
{
if
(
!
a
(
s
))
throw
new
TypeError
(
"
Array.from: when provided, the second argument must be a function
"
);
arguments
.
length
>
2
&&
(
i
=
arguments
[
2
])
}
for
(
var
o
,
l
=
r
(
n
.
length
),
c
=
a
(
e
)
?
Object
(
new
e
(
l
))
:
new
Array
(
l
),
d
=
0
;
d
<
l
;
)
o
=
n
[
d
],
c
[
d
]
=
s
?
void
0
===
i
?
s
(
o
,
d
)
:
s
.
call
(
i
,
o
,
d
)
:
o
,
d
+=
1
;
return
c
.
length
=
l
,
c
}
)),
function
(
t
,
e
)
{
var
n
=
(
t
.
body
||
t
.
documentElement
).
style
,
i
=
""
,
a
=
""
;
""
==
n
.
WebkitAnimation
&&
(
i
=
"
-webkit-
"
),
""
==
n
.
MozAnimation
&&
(
i
=
"
-moz-
"
),
""
==
n
.
OAnimation
&&
(
i
=
"
-o-
"
),
""
==
n
.
WebkitTransition
&&
(
a
=
"
-webkit-
"
),
""
==
n
.
MozTransition
&&
(
a
=
"
-moz-
"
),
""
==
n
.
OTransition
&&
(
a
=
"
-o-
"
),
Object
.
defineProperty
(
Object
.
prototype
,
"
onCSSAnimationEnd
"
,
{
value
:
function
(
t
)
{
var
e
=
function
e
(
n
)
{
t
(),
n
.
target
.
removeEventListener
(
n
.
type
,
e
)
};
return
this
.
addEventListener
(
"
webkitAnimationEnd
"
,
e
),
this
.
addEventListener
(
"
mozAnimationEnd
"
,
e
),
this
.
addEventListener
(
"
oAnimationEnd
"
,
e
),
this
.
addEventListener
(
"
oanimationend
"
,
e
),
this
.
addEventListener
(
"
animationend
"
,
e
),
(
""
==
i
&&
!
(
"
animation
"
in
n
)
||
"
0s
"
==
getComputedStyle
(
this
)[
i
+
"
animation-duration
"
])
&&
t
(),
this
},
enumerable
:
!
1
,
writable
:
!
0
}),
Object
.
defineProperty
(
Object
.
prototype
,
"
onCSSTransitionEnd
"
,
{
value
:
function
(
t
)
{
var
e
=
function
e
(
n
)
{
t
(),
n
.
target
.
removeEventListener
(
n
.
type
,
e
)
};
return
this
.
addEventListener
(
"
webkitTransitionEnd
"
,
e
),
this
.
addEventListener
(
"
mozTransitionEnd
"
,
e
),
this
.
addEventListener
(
"
oTransitionEnd
"
,
e
),
this
.
addEventListener
(
"
transitionend
"
,
e
),
this
.
addEventListener
(
"
transitionend
"
,
e
),
(
""
==
a
&&
!
(
"
transition
"
in
n
)
||
"
0s
"
==
getComputedStyle
(
this
)[
a
+
"
transition-duration
"
])
&&
t
(),
this
},
enumerable
:
!
1
,
writable
:
!
0
})
}(
document
,
window
),
function
()
{
function
i
(
t
,
a
)
{
var
s
=
this
;
!
function
(
t
,
e
)
{
if
(
!
(
t
instanceof
e
))
throw
new
TypeError
(
"
Cannot call a class as a function
"
)
}(
this
,
i
);
var
r
=
"
string
"
==
typeof
t
?
document
.
querySelector
(
t
)
:
t
;
if
(
null
!=
r
)
{
var
o
=
{
headerClass
:
"
.kt-blocks-accordion-header
"
,
panelClass
:
"
.kt-accordion-panel
"
,
panelInnerClass
:
"
.kt-accordion-panel-inner
"
,
hiddenClass
:
"
kt-accordion-panel-hidden
"
,
activeClass
:
"
kt-accordion-panel-active
"
,
get
hidenClass
()
{
return
this
.
hiddenClass
},
initializedClass
:
"
kt-accordion-initialized
"
,
get
initalisedClass
()
{
return
this
.
initializedClass
},
headerDataAttr
:
"
data-kt-accordion-header-id
"
,
openMultiplePanels
:
!
1
,
openHeadersOnLoad
:
[],
headerOpenLabel
:
""
,
headerCloseLabel
:
""
,
roles
:
!
0
};
this
.
settings
=
e
({},
o
,
a
),
this
.
container
=
r
;
var
l
=
Array
.
from
(
this
.
container
.
children
)
,
c
=
[];
Array
.
from
(
l
).
forEach
((
function
(
t
)
{
Array
.
from
(
t
.
children
).
forEach
((
function
(
t
)
{
c
.
push
(
t
)
}
))
}
));
var
d
=
c
.
filter
((
function
(
t
)
{
return
!
t
.
classList
.
contains
(
s
.
settings
.
panelClass
.
substr
(
1
))
}
));
this
.
headers
=
d
.
reduce
((
function
(
t
,
e
)
{
var
i
,
a
=
Array
.
from
(
e
.
children
).
filter
((
function
(
t
)
{
return
t
.
classList
.
contains
(
s
.
settings
.
headerClass
.
substr
(
1
))
}
));
return
!
a
.
length
&&
e
.
children
[
0
]
&&
e
.
children
[
0
].
children
&&
e
.
children
[
0
].
children
.
length
&&
(
a
=
Array
.
from
(
e
.
children
[
0
].
children
).
filter
((
function
(
t
)
{
return
t
.
classList
.
contains
(
s
.
settings
.
headerClass
.
substr
(
1
))
}
))),
t
=
(
i
=
[]).
concat
.
apply
(
i
,
n
(
t
).
concat
([
a
]))
}
),
[]),
this
.
panels
=
c
.
filter
((
function
(
t
)
{
return
t
.
classList
.
contains
(
s
.
settings
.
panelClass
.
substr
(
1
))
}
)),
this
.
toggleEl
=
void
0
!==
this
.
settings
.
toggleEl
?
Array
.
from
(
this
.
container
.
querySelectorAll
(
this
.
settings
.
toggleEl
))
:
this
.
headers
,
this
.
states
=
[].
map
.
call
(
this
.
headers
,
(
function
()
{
return
{
state
:
"
closed
"
}
}
)),
this
.
ids
=
[].
map
.
call
(
this
.
headers
,
(
function
()
{
return
{
id
:
Math
.
floor
(
1
e6
*
Math
.
random
()
+
1
)
}
}
)),
this
.
toggling
=
!
1
,
this
.
container
?
this
.
init
()
:
console
.
log
(
"
Something is wrong with you markup...
"
)
}
}
var
a
,
s
,
r
;
return
a
=
i
,
(
s
=
[{
key
:
"
init
"
,
value
:
function
()
{
this
.
_setupAttributes
(),
this
.
_initalState
(),
this
.
calculateAllPanelsHeight
(),
this
.
_insertDataAttrs
(),
this
.
_addListeners
(),
this
.
_finishInitialization
()
}
},
{
key
:
"
_setRole
"
,
value
:
function
(
t
,
e
)
{
(
"
boolean
"
==
typeof
this
.
settings
.
roles
&&
this
.
settings
.
roles
||
void
0
!==
this
.
settings
.
roles
[
t
]
&&
!
1
!==
this
.
settings
.
roles
[
t
])
&&
e
.
setAttribute
(
"
role
"
,
t
)
}
},
{
key
:
"
_initalState
"
,
value
:
function
()
{
var
t
=
this
.
settings
.
openHeadersOnLoad
;
t
.
length
&&
(
this
.
toggling
=
!
0
,
this
.
_openHeadersOnLoad
(
t
)),
this
.
_renderDom
()
}
},
{
key
:
"
_insertDataAttrs
"
,
value
:
function
()
{
var
t
=
this
;
this
.
headers
.
forEach
((
function
(
e
,
n
)
{
e
.
setAttribute
(
t
.
settings
.
headerDataAttr
,
n
)
}
))
}
},
{
key
:
"
_finishInitialization
"
,
value
:
function
()
{
this
.
container
.
classList
.
add
(
this
.
settings
.
initializedClass
),
this
.
_setRole
(
"
presentation
"
,
this
.
container
);
var
t
=
new
CustomEvent
(
"
initialized
"
);
this
.
container
.
dispatchEvent
(
t
)
}
},
{
key
:
"
_addListeners
"
,
value
:
function
()
{
var
t
=
this
;
this
.
headers
.
forEach
((
function
(
e
,
n
)
{
e
.
addEventListener
(
"
click
"
,
(
function
()
{
t
.
handleClick
(
e
,
n
)
}
))
}
))
}
},
{
key
:
"
handleClick
"
,
value
:
function
(
t
,
e
)
{
var
n
=
this
,
i
=
this
.
settings
.
headerClass
.
substr
(
1
);
if
(
t
.
classList
.
contains
(
i
)
&&
!
1
===
this
.
toggling
)
this
.
toggling
=
!
0
,
this
.
setState
(
e
),
this
.
_renderDom
();
else
var
a
=
setInterval
((
function
()
{
!
1
===
n
.
toggling
&&
(
n
.
toggling
=
!
0
,
n
.
setState
(
e
),
n
.
_renderDom
(),
clearInterval
(
a
))
}
),
50
)
}
},
{
key
:
"
setState
"
,
value
:
function
(
t
)
{
var
e
=
this
,
n
=
this
.
getState
();
this
.
settings
.
openMultiplePanels
||
n
.
filter
((
function
(
e
,
n
)
{
n
!=
t
&&
(
e
.
state
=
"
closed
"
)
}
)),
n
.
filter
((
function
(
n
,
i
)
{
if
(
i
==
t
)
{
var
a
=
e
.
toggleState
(
n
.
state
);
return
n
.
state
=
a
}
}
))
}
},
{
key
:
"
_renderDom
"
,
value
:
function
()
{
var
t
=
this
;
this
.
states
.
filter
((
function
(
e
,
n
)
{
"
open
"
===
e
.
state
&&
t
.
open
(
n
,
!
1
)
}
)),
this
.
states
.
filter
((
function
(
e
,
n
)
{
"
closed
"
===
e
.
state
&&
t
.
close
(
n
,
!
1
)
}
))
}
},
{
key
:
"
open
"
,
value
:
function
(
t
)
{
var
e
=
!
(
arguments
.
length
>
1
&&
void
0
!==
arguments
[
1
])
||
arguments
[
1
];
e
&&
this
.
setState
(
t
),
this
.
togglePanel
(
"
open
"
,
t
)
}
},
{
key
:
"
close
"
,
value
:
function
(
t
)
{
var
e
=
!
(
arguments
.
length
>
1
&&
void
0
!==
arguments
[
1
])
||
arguments
[
1
];
e
&&
this
.
setState
(
t
),
this
.
togglePanel
(
"
closed
"
,
t
)
}
},
{
key
:
"
openAll
"
,
value
:
function
()
{
var
t
=
this
;
this
.
headers
.
forEach
((
function
(
e
,
n
)
{
t
.
togglePanel
(
"
open
"
,
n
)
}
))
}
},
{
key
:
"
closeAll
"
,
value
:
function
()
{
var
t
=
this
;
this
.
headers
.
forEach
((
function
(
e
,
n
)
{
t
.
togglePanel
(
"
closed
"
,
n
)
}
))
}
},
{
key
:
"
togglePanel
"
,
value
:
function
(
t
,
e
)
{
var
n
=
this
;
if
(
void
0
!==
t
&&
void
0
!==
e
)
if
(
"
closed
"
===
t
)
{
var
i
=
this
.
headers
[
e
]
,
a
=
this
.
panels
[
e
];
if
(
!
a
.
classList
.
contains
(
this
.
settings
.
hiddenClass
))
{
a
.
setAttribute
(
"
data-panel-height
"
,
a
.
scrollHeight
+
"
px
"
),
a
.
style
.
height
=
a
.
scrollHeight
+
"
px
"
,
a
.
offsetHeight
,
a
.
style
.
height
=
""
,
a
.
classList
.
add
(
"
kt-panel-is-collapsing
"
),
a
.
classList
.
remove
(
this
.
settings
.
activeClass
),
i
.
classList
.
remove
(
this
.
settings
.
activeClass
),
i
.
setAttribute
(
"
aria-expanded
"
,
!
1
);
var
s
=
1
e3
*
parseFloat
(
getComputedStyle
(
a
).
transitionDuration
);
setTimeout
((
function
()
{
return
a
.
classList
.
add
(
n
.
settings
.
hiddenClass
),
a
.
classList
.
remove
(
"
kt-panel-is-collapsing
"
),
n
.
toggling
=
!
1
}
),
s
)
}
}
else
if
(
"
open
"
===
t
)
{
var
r
=
this
.
headers
[
e
]
,
o
=
this
.
panels
[
e
];
if
(
!
o
.
classList
.
contains
(
this
.
settings
.
activeClass
))
{
o
.
classList
.
remove
(
this
.
settings
.
hiddenClass
),
o
.
style
.
height
=
0
,
o
.
offsetHeight
,
o
.
classList
.
add
(
"
kt-panel-is-expanding
"
),
o
.
style
.
height
=
o
.
scrollHeight
<
parseInt
(
o
.
getAttribute
(
"
data-panel-height
"
))
?
parseInt
(
o
.
getAttribute
(
"
data-panel-height
"
))
+
"
px
"
:
o
.
scrollHeight
+
"
px
"
,
o
.
offsetHeight
,
r
.
classList
.
add
(
this
.
settings
.
activeClass
),
r
.
setAttribute
(
"
aria-expanded
"
,
!
0
);
var
l
=
window
.
document
.
createEvent
(
"
UIEvents
"
);
l
.
initUIEvent
(
"
resize
"
,
!
0
,
!
1
,
window
,
0
),
window
.
dispatchEvent
(
l
);
var
c
=
1
e3
*
parseFloat
(
getComputedStyle
(
o
).
transitionDuration
);
setTimeout
((
function
()
{
return
o
.
classList
.
add
(
n
.
settings
.
activeClass
),
o
.
style
.
height
=
""
,
o
.
classList
.
remove
(
"
kt-panel-is-expanding
"
),
n
.
toggling
=
!
1
}
),
c
)
}
}
}
},
{
key
:
"
getState
"
,
value
:
function
()
{
var
t
=
this
,
e
=
arguments
.
length
>
0
&&
void
0
!==
arguments
[
0
]
?
arguments
[
0
]
:
[];
if
(
e
.
length
&&
Array
.
isArray
(
e
))
{
var
n
=
e
.
map
((
function
(
e
)
{
return
t
.
states
[
e
]
}
));
return
n
}
return
this
.
states
}
},
{
key
:
"
toggleState
"
,
value
:
function
(
t
)
{
if
(
void
0
!==
t
)
return
"
closed
"
===
t
?
"
open
"
:
"
closed
"
}
},
{
key
:
"
_openHeadersOnLoad
"
,
value
:
function
()
{
var
t
=
this
,
e
=
arguments
.
length
>
0
&&
void
0
!==
arguments
[
0
]
?
arguments
[
0
]
:
[];
if
(
e
.
length
&&
Array
.
isArray
(
e
))
{
var
n
=
e
.
filter
((
function
(
t
)
{
return
null
!=
t
}
));
n
.
forEach
((
function
(
e
)
{
t
.
setState
(
e
)
}
))
}
}
},
{
key
:
"
_setupAttributes
"
,
value
:
function
()
{
this
.
_setupHeaders
(),
this
.
_setupPanels
(),
this
.
_insertDataAttrs
()
}
},
{
key
:
"
_setPanelHeight
"
,
value
:
function
()
{
this
.
calculateAllPanelsHeight
()
}
},
{
key
:
"
calculatePanelHeight
"
,
value
:
function
(
t
)
{
var
e
=
t
.
querySelector
(
this
.
settings
.
panelInnerClass
).
getBoundingClientRect
();
return
t
.
setAttribute
(
"
data-panel-height
"
,
""
.
concat
(
e
.
height
,
"
px
"
))
}
},
{
key
:
"
calculateAllPanelsHeight
"
,
value
:
function
()
{
var
t
=
this
;
this
.
panels
.
forEach
((
function
(
e
)
{
t
.
calculatePanelHeight
(
e
)
}
))
}
},
{
key
:
"
_setupHeaders
"
,
value
:
function
()
{
var
t
=
this
;
this
.
headers
.
forEach
((
function
(
e
,
n
)
{
e
.
setAttribute
(
"
id
"
,
"
kt-accordion-header-
"
.
concat
(
t
.
ids
[
n
].
id
)),
e
.
setAttribute
(
"
aria-controls
"
,
"
kt-accordion-panel-
"
.
concat
(
t
.
ids
[
n
].
id
))
}
))
}
},
{
key
:
"
_setupPanels
"
,
value
:
function
()
{
var
t
=
this
;
this
.
panels
.
forEach
((
function
(
e
,
n
)
{
e
.
setAttribute
(
"
id
"
,
"
kt-accordion-panel-
"
.
concat
(
t
.
ids
[
n
].
id
)),
e
.
setAttribute
(
"
aria-labelledby
"
,
"
kt-accordion-header-
"
.
concat
(
t
.
ids
[
n
].
id
)),
!
0
!==
t
.
settings
.
roles
&&
!
1
===
t
.
settings
.
roles
.
region
||
t
.
_setRole
(
"
region
"
,
e
)
}
))
}
}])
&&
t
(
a
.
prototype
,
s
),
r
&&
t
(
a
,
r
),
i
}()
}
)),
function
()
{
"
use strict
"
;
window
.
KadenceBlocksAccordion
=
{
scroll
:
function
(
t
,
e
,
n
)
{
if
(
!
(
n
<=
0
))
{
var
i
=
(
e
-
t
.
scrollTop
)
/
n
*
10
;
setTimeout
((
function
()
{
t
.
scrollTop
=
t
.
scrollTop
+
i
,
t
.
scrollTop
!==
e
&&
scrollTo
(
t
,
e
,
n
-
10
)
}
),
10
)
}
},
anchor
:
function
(
t
)
{
if
(
""
!=
window
.
location
.
hash
)
{
var
e
,
n
=
location
.
hash
.
substring
(
1
);
if
(
!
/^
[
A-z0-9_-
]
+$/
.
test
(
n
))
return
;
if
((
e
=
document
.
getElementById
(
n
))
&&
e
.
classList
.
contains
(
"
wp-block-kadence-pane
"
))
{
var
i
=
document
.
querySelectorAll
(
"
#
"
+
n
+
"
.kt-blocks-accordion-header
"
)[
0
];
i
.
classList
.
contains
(
"
kt-accordion-panel-active
"
)
||
(
t
.
type
&&
"
initialized
"
===
t
.
type
?
window
.
setTimeout
((
function
()
{
i
.
click
()
}
),
50
)
:
i
.
click
())
}
}
},
init
:
function
()
{
for
(
var
t
=
document
.
querySelectorAll
(
"
.kt-accordion-inner-wrap
"
),
e
=
Array
.
from
(
t
),
n
=
0
,
i
=
e
.
length
;
n
<
i
;
n
++
)
{
var
a
=
e
[
n
].
getAttribute
(
"
data-allow-multiple-open
"
)
,
s
=
e
[
n
].
getAttribute
(
"
data-start-open
"
)
,
r
=
parseInt
(
s
);
if
(
"
none
"
!==
s
)
for
(
var
o
=
0
,
l
=
e
[
n
].
children
.
length
;
o
<
l
;
o
++
)
e
[
n
].
children
[
o
].
classList
.
contains
(
"
kt-accordion-pane-
"
+
(
1
+
r
))
&&
(
r
=
o
);
e
[
n
].
addEventListener
(
"
initialized
"
,
window
.
KadenceBlocksAccordion
.
anchor
,
!
1
),
new
KadenceAccordion
(
e
[
n
],{
openHeadersOnLoad
:
"
none
"
===
s
?
[]
:
[
parseInt
(
r
)],
headerClass
:
"
.kt-blocks-accordion-header
"
,
panelClass
:
"
.kt-accordion-panel
"
,
panelInnerClass
:
"
.kt-accordion-panel-inner
"
,
hiddenClass
:
"
kt-accordion-panel-hidden
"
,
activeClass
:
"
kt-accordion-panel-active
"
,
initializedClass
:
"
kt-accordion-initialized
"
,
headerDataAttr
:
"
data-kt-accordion-header-id
"
,
openMultiplePanels
:
"
true
"
===
a
})
}
window
.
addEventListener
(
"
hashchange
"
,
window
.
KadenceBlocksAccordion
.
anchor
,
!
1
)
}
},
"
loading
"
===
document
.
readyState
?
document
.
addEventListener
(
"
DOMContentLoaded
"
,
window
.
KadenceBlocksAccordion
.
init
)
:
window
.
KadenceBlocksAccordion
.
init
()
}();
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment