@cfpb/cfpb-design-system 3.13.1 → 3.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,7 +2,28 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## [3.13.1](https://github.com/cfpb/design-system/compare/v3.13.0..v3.13.1) - June 18, 2025
5
+ ## [3.14.1](https://github.com/cfpb/design-system/compare/v3.14.0..v3.14.1) - July 1, 2025
6
+
7
+ ### PRs in this release
8
+
9
+ - PR #[2308](https://github.com/cfpb/design-system/pull/2308): Add sideEffects: false to package.json and add init to web components - Ans
10
+
11
+ ### General
12
+
13
+ - Add sideEffects: false to package.json and add init to web components - ([561eac0](https://github.com/cfpb/design-system/commit/561eac03b2ab566e06dece1162e4aade971a9250)) - Ans
14
+ - Re-build assets - ([51f04d4](https://github.com/cfpb/design-system/commit/51f04d40c118b9a73edd31373a44a9315dcbc14d)) - Ans
15
+
16
+ ## [3.14.0](https://github.com/cfpb/design-system/compare/v3.13.1..vv3.14.0) - July 1, 2025
17
+
18
+ ### PRs in this release
19
+
20
+ - PR #[2307](https://github.com/cfpb/design-system/pull/2307): Update outdated SASS utility syntax in docs | remove unused mixins - Ans
21
+
22
+ ### General
23
+
24
+ - Update u-link utility syntax in docs | remove unused `u-link-border` - ([f812998](https://github.com/cfpb/design-system/commit/f81299826b532b02efc874eb0c78eaa0a1306494)) - Ans
25
+
26
+ ## [3.13.1](https://github.com/cfpb/design-system/compare/v3.13.0..vv3.13.1) - June 18, 2025
6
27
 
7
28
  ### PRs in this release
8
29
 
@@ -1,2 +1,2 @@
1
- (()=>{var Ae=Object.defineProperty;var Y=(e,r)=>{for(var t in r)Ae(e,t,{get:r[t],enumerable:!0})};var ce={};Y(ce,{default:()=>Te});var Te={};var ue={bpXS:{min:0,max:600},bpSM:{min:601,max:900},bpMED:{min:901,max:1020},bpLG:{min:1021,max:1200},bpXL:{min:1201}};function K(){let e=getComputedStyle(document.body).fontSize;return e=e===""?-1:e,parseFloat(e)}function ke(e,r){let t=e.min,a=e.max;K()>0&&K()!==16&&(t=t/16*K(),a=a/16*K());let n=t||0,o=a||Number.POSITIVE_INFINITY;return n<=r&&r<=o}function Me(e){let r={};e=e||window.innerWidth;let t;for(t in ue)r[t]=ke(ue[t],e);return r}var Z="mobile",Ce="tablet",Ie="desktop";function pe(e){let r=!1,t=Me();return(e===Z&&t.bpXS||e===Ce&&t.bpSM||e===Ie&&(t.bpMED||t.bpLG||t.bpXL))&&(r=!0),r}var x="data-js-hook",J="behavior_",fe="state_";function v(){let e={};function r(i,n){return{}.hasOwnProperty.call(e,i)?e[i].push(n):e[i]=[n],this}function t(i,n){if(!{}.hasOwnProperty.call(e,i))return this;let o=e[i].indexOf(n);return o!==-1&&e[i].splice(o,1),this}function a(i,n){if(!{}.hasOwnProperty.call(e,i))return this;n=n||{};let o=e[i];for(let s=0,l=o.length;s<l;s++)o[s].call(this,n);return this}return this.addEventListener=r,this.removeEventListener=t,this.dispatchEvent=a,this.getRegisteredEvents=()=>e,this}function B(e,r){if(!e)return!1;let t=e.getAttribute(x);return t?(t=t.split(" "),t.indexOf(r)>-1):!1}function g(e,r){if(B(e,r))return r;if(r.indexOf(" ")!==-1){let a=x+" values cannot contain spaces!";throw new Error(a)}let t=e.getAttribute(x);return t!==null&&(r=t+" "+r),e.setAttribute(x,r),r}var me=fe+"atomic_init";function De(e,r){if(!e||!e.classList){let t=e+' is not valid. Check that element is a DOM node with class "'+r+'"';throw new Error(t)}return e}function He(e,r){let t=e.classList.contains(r)?e:e.querySelector("."+r);if(!t){let a=r+" not found on or in passed DOM node.";throw new Error(a)}return t}function A(e,r){return De(e,r),He(e,r)}function O(e){return B(e,me)?!1:(g(e,me),!0)}function T(e,r,t,a={}){let n=(t||document).querySelectorAll(e),o=[],s,l;for(let u=0,d=n.length;u<d;u++)l=n[u],B(l,me)===!1&&(s=new r(l),s.init(a),o.push(s));return o}function W(e,r){let t;if(B(e,r))return t=e,t;if(e){let a="["+x+"="+r+"]";t=e.querySelector(a)}if(!t){let a=r+" behavior not found on passed DOM node!";throw new Error(a)}return t}var Ne=Object.prototype.toString;var Be=Array.isArray||function(r){return Ne.call(r)==="[object Array]"};function p(e,r,t){let a=r,i=e;if(!t)throw new Error("Child transition argument must be defined!");let n=t,o,s,l,u=!1,d=!1,m=!1;if(typeof a.CSS_PROPERTY=="undefined"||typeof a.BASE_CLASS=="undefined")throw new Error("Transitions require CSS_PROPERTY and BASE_CLASS to be passed into BaseTransition.");function b(){s&&u?(i.addEventListener(s,l),n.dispatchEvent(p.BEGIN_EVENT,{target:n,type:p.BEGIN_EVENT}),i.classList.add(p.ANIMATING_CLASS),d=!0):(n.dispatchEvent(p.BEGIN_EVENT,{target:n,type:p.BEGIN_EVENT}),l())}function S(){i.removeEventListener(s,l)}function k(f){return f&&f.propertyName!==a.CSS_PROPERTY?!1:(S(),i.classList.remove(p.ANIMATING_CLASS),n.dispatchEvent(p.END_EVENT,{target:n,type:p.END_EVENT}),d=!1,!0)}function M(){let f;for(f in a)({}).hasOwnProperty.call(a,f)&&a[f]!==a.BASE_CLASS&&i.classList.contains(a[f])&&i.classList.remove(a[f])}function _(){d&&(i.style.webkitTransitionDuration="0",i.style.mozTransitionDuration="0",i.style.oTransitionDuration="0",i.style.transitionDuration="0",i.removeEventListener(s,l),l(),i.style.webkitTransitionDuration="",i.style.mozTransitionDuration="",i.style.oTransitionDuration="",i.style.transitionDuration="")}function L(){_(),M(),i.classList.remove(a.BASE_CLASS)}function P(){i.classList.remove(p.NO_ANIMATION_CLASS),u=!0}function G(){i.classList.add(p.NO_ANIMATION_CLASS),u=!1}function w(f){if(!f){let oe="Element does not have TransitionEnd event. It may be null!";throw new Error(oe)}let q,z={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},R;for(R in z)if({}.hasOwnProperty.call(z,R)&&typeof f.style[R]!="undefined"){q=z[R];break}return q}function C(f){L(),P(),i=f,i.classList.add(a.BASE_CLASS),s=w(i)}function ne(f){if(u=!i.classList.contains(p.NO_ANIMATION_CLASS),l=k.bind(this),C(i),!f)throw new Error("Transition needs to be passed an initial CSS class on initialization!");return i.classList.add(f),this}function ae(f){return m||(M(),m=!0),i.classList.contains(f)?!1:(S(),i.classList.remove(o),o=f,b(),i.classList.add(o),!0)}return this.animateOff=G,this.animateOn=P,this.applyClass=ae,this.halt=_,this.init=ne,this.isAnimated=()=>u,this.remove=L,this.setElement=C,this}p.BEGIN_EVENT="transitionbegin";p.END_EVENT="transitionend";p.NO_ANIMATION_CLASS="u-no-animation";p.ANIMATING_CLASS="u-is-animating";var j=J+"flyout-menu",Re="["+x+"="+j;function I(e,r=!0){let t=W(e,j),a=P(e),i=W(e,j+"_content"),n=0,o=0,s=1,l=2,u=3,d,m,b,S=oe.bind(this),k=R.bind(this),M,_=!0,L=!1;function P(c){let h=[],y=c.querySelectorAll(`${Re}_trigger]`),$,N,de;for(let le=y.length>>>0;le--;){for(de=!1,$=y[le],N=$.parentElement;N!==c;)N.getAttribute(x)&&N.getAttribute(x).split(" ").indexOf(j)!==-1?(de=!0,N=c):N=N.parentElement;de||h.unshift(y[le])}return h}function G(c=!1){return n=c?u:o,a.forEach(h=>{w("expanded",h,c),h.addEventListener("click",f.bind(this)),h.addEventListener("touchstart",C,{passive:!0}),h.addEventListener("mouseover",ne.bind(this)),h.addEventListener("mouseout",ae.bind(this))}),i.setAttribute("data-open",c?"true":"false"),r&&!c&&i.setAttribute("hidden",""),ge(),this}function w(c,h,y){let $=String(y);return h.setAttribute("aria-"+c,$),$}function C(){L=!0}function ne(c){_||(L||this.dispatchEvent("triggerover",{target:this,trigger:c.target,type:"triggerover"}),L=!1)}function ae(c){_||this.dispatchEvent("triggerout",{target:this,trigger:c.target,type:"triggerout"})}function f(c){if(!_)switch(this.dispatchEvent("triggerclick",{target:this,trigger:c.target,type:"triggerclick"}),c.preventDefault(),n){case o:case s:this.expand();break;case l:case u:this.collapse();break}}function q(){if(d==null||d.halt(),n===l||n===u)return this;if(n=l,r&&i.removeAttribute("hidden"),this.dispatchEvent("expandbegin",{target:this,type:"expandbegin"}),!m||!b)return k(),this;let c=d==null?void 0:d.isAnimated();return c&&d.addEventListener(p.END_EVENT,k),m(),c||k(),this}function z(){if(d==null||d.halt(),n===s||n===o)return this;for(let h=0,y=a.length;h<y;h++)w("expanded",a[h],!1);if(i.setAttribute("data-open","false"),n=s,this.dispatchEvent("collapsebegin",{target:this,type:"collapsebegin"}),!b||!m)return S(),this;let c=d==null?void 0:d.isAnimated();return c&&d.addEventListener(p.END_EVENT,S),b(),c||S(),this}function R(){n=u,i.setAttribute("data-open","true"),d&&d.removeEventListener(p.END_EVENT,k),this.dispatchEvent("expandend",{target:this,type:"expandend"});for(let c=0,h=a.length;c<h;c++)w("expanded",a[c],!0)}function oe(){n=o,r&&i.setAttribute("hidden",""),d&&d.removeEventListener(p.END_EVENT,S),this.dispatchEvent("collapseend",{target:this,type:"collapseend"})}function xe(c,h,y){d=c,h&&h!==b&&(b=h),y&&y!==m&&(m=y)}function ye(){d&&d.remove();let c;d=c,m=c,b=c}function Se(){return{container:t,content:i,trigger:a}}function ge(){return _&&(_=!1),!_}function Le(){return _||(_=!0),_}function we(c){return M=c,this}let se=new v;return this.addEventListener=se.addEventListener,this.removeEventListener=se.removeEventListener,this.dispatchEvent=se.dispatchEvent,this.init=G,this.expand=q,this.collapse=z,this.setTransition=xe,this.clearTransition=ye,this.getData=()=>M,this.getTransition=()=>d,this.getDom=Se,this.isAnimating=()=>n===l||n===s,this.isExpanded=()=>n===u,this.resume=ge,this.setData=we,this.suspend=Le,I.BASE_CLASS=j,this}var Q={CSS_PROPERTY:"opacity",BASE_CLASS:"u-alpha-transition",ALPHA_100:"u-alpha-100",ALPHA_0:"u-alpha-0"};function _e(e){let r=new v,t=new p(e,Q,this);function a(o){return t.init(o),this}function i(){return t.applyClass(Q.ALPHA_100),this}function n(){return t.applyClass(Q.ALPHA_0),this}return this.addEventListener=r.addEventListener,this.dispatchEvent=r.dispatchEvent,this.removeEventListener=r.removeEventListener,this.animateOff=t.animateOff,this.animateOn=t.animateOn,this.halt=t.halt,this.isAnimated=t.isAnimated,this.remove=t.remove,this.setElement=t.setElement,this.fadeIn=i,this.fadeOut=n,this.init=a,this}_e.CLASSES=Q;var X={CSS_PROPERTY:"max-height",BASE_CLASS:"u-max-height-transition",MH_DEFAULT:"u-max-height-default",MH_SUMMARY:"u-max-height-summary",MH_ZERO:"u-max-height-zero"};function E(e){let r=new v,t=new p(e,X,this),a=0;function i(){let b=e.scrollHeight+"px";e.style.maxHeight=b}function n(){window.removeEventListener("load",n),i()}function o(m){return t.init(m),window.addEventListener("load",n),window.addEventListener("resize",()=>{i()}),this}function s(){return i(),t.applyClass(X.MH_DEFAULT),(!a||e.scrollHeight>a)&&(a=e.scrollHeight),this}function l(){return t.applyClass(X.MH_SUMMARY),a=e.scrollHeight,this}function u(){return t.applyClass(X.MH_ZERO),a=e.scrollHeight,this}function d(){return e.style.maxHeight="",t.remove()}return this.addEventListener=r.addEventListener,this.dispatchEvent=r.dispatchEvent,this.removeEventListener=r.removeEventListener,this.animateOff=t.animateOff,this.animateOn=t.animateOn,this.halt=t.halt,this.isAnimated=t.isAnimated,this.setElement=t.setElement,this.refresh=i,this.remove=d,this.init=o,this.maxHeightDefault=s,this.maxHeightSummary=l,this.maxHeightZero=u,this}E.CLASSES=X;var D={CSS_PROPERTY:"transform",BASE_CLASS:"u-move-transition",MOVE_TO_ORIGIN:"u-move-to-origin",MOVE_LEFT:"u-move-left",MOVE_LEFT_2X:"u-move-left-2x",MOVE_LEFT_3X:"u-move-left-3x",MOVE_RIGHT:"u-move-right",MOVE_UP:"u-move-up"};function Ee(e){let r=new v,t=new p(e,D,this);function a(l){return t.init(l),this}function i(){return t.applyClass(D.MOVE_TO_ORIGIN),this}function n(l){l=l||1;let u=[D.MOVE_LEFT,D.MOVE_LEFT_2X,D.MOVE_LEFT_3X];return t.applyClass(u[l-1]),this}function o(){return t.applyClass(D.MOVE_RIGHT),this}function s(){return t.applyClass(D.MOVE_UP),this}return this.addEventListener=r.addEventListener,this.dispatchEvent=r.dispatchEvent,this.removeEventListener=r.removeEventListener,this.animateOff=t.animateOff,this.animateOn=t.animateOn,this.halt=t.halt,this.isAnimated=t.isAnimated,this.setElement=t.setElement,this.remove=t.remove,this.init=a,this.moveLeft=()=>n(1),this.moveLeft2=()=>n(2),this.moveLeft3=()=>n(3),this.moveRight=o,this.moveToOrigin=i,this.moveUp=s,this}Ee.CLASSES=D;var he={};Y(he,{default:()=>Ve});var Ve={};var F="o-expandable";function H(e){let r=A(e,F),t,a,i,n,o;function s(){if(!O(r))return this;t=r.querySelector(`.${F}__header`),a=r.querySelector(`.${F}__content`),i=r.querySelector(`.${F}__label`);let d=r.classList.contains(`${F}--onload-open`);g(r,"behavior_flyout-menu"),g(t,"behavior_flyout-menu_trigger"),g(a,"behavior_flyout-menu_content");let m=d?E.CLASSES.MH_DEFAULT:E.CLASSES.MH_ZERO;return n=new E(a).init(m),o=new I(r),o.setTransition(n,n.maxHeightZero,n.maxHeightDefault),o.init(d),o.addEventListener("expandbegin",()=>{a.classList.remove("u-hidden"),this.dispatchEvent("expandbegin",{target:this})}),o.addEventListener("collapseend",()=>{a.classList.add("u-hidden")}),this}function l(){return i.textContent.trim()}this.init=s,this.expand=()=>o.expand(),this.collapse=()=>o.collapse(),this.isExpanded=()=>o.isExpanded(),this.refresh=()=>o.getTransition().refresh(),this.getLabelText=l;let u=new v;return this.addEventListener=u.addEventListener,this.removeEventListener=u.removeEventListener,this.dispatchEvent=u.dispatchEvent,this}H.BASE_CLASS=F;H.init=e=>T(`.${H.BASE_CLASS}`,H,e);var be={};Y(be,{default:()=>ze});var ze={};var ee="o-expandable-group";function te(e){let r=A(e,ee),t=r.classList.contains(`${ee}--accordion`),a,i;function n(s){let l=s.target;i&&i!==l&&i.collapse(),i=l}function o(s){return O(r)?(t&&(a=s,a.forEach(l=>{l.addEventListener("expandbegin",n)})),this):this}return this.init=o,this}te.BASE_CLASS=ee;te.init=e=>{(e||document).querySelectorAll(`.${ee}`).forEach(a=>{let i=T(`.${H.BASE_CLASS}`,H,a);new te(a).init(i)})};var ve={};Y(ve,{default:()=>je});var je={};var V="o-summary";function re(e){let r=A(e,V),t=r.classList.contains(`${V}--mobile`),a=r.querySelector(`.${V}__content`),i=r.querySelector(`.${V}__btn`),n,o,s;function l(){return O(r)?(window.addEventListener("load",u),this):this}function u(){window.removeEventListener("load",u),s=!S(),g(r,"behavior_flyout-menu"),g(a,"behavior_flyout-menu_content"),g(i,"behavior_flyout-menu_trigger"),o=new I(r,!1),n=new E(a),n.init(s?E.CLASSES.MH_SUMMARY:E.CLASSES.MH_DEFAULT),o.setTransition(n,n.maxHeightSummary,n.maxHeightDefault),o.addEventListener("triggerclick",k),o.init(),b(),window.addEventListener("resize",b),"onorientationchange"in window&&window.addEventListener("orientationchange",b),r.addEventListener("focusin",d),a.addEventListener("click",m)}function d(C){!s&&C.target!==i&&(i.click(),r.removeEventListener("focusin",d))}function m(C){C.target.tagName!=="A"&&o.isExpanded()&&n.refresh()}function b(){S()?G():P()}function S(){return t&&!pe(Z)||a.scrollHeight<=88}function k(){o.addEventListener("expandend",M)}function M(){L(),window.removeEventListener("resize",b),window.removeEventListener("orientationchange",b),o.removeEventListener("expandend",M),o.suspend(),n.remove()}function _(){i.classList.remove("u-hidden")}function L(){i.classList.add("u-hidden")}function P(){return s&&(o.collapse(),n.animateOn(),_(),s=!1),!s}function G(){return s||(n.animateOff(),o.expand(),L(),s=!0),s}let w=new v;return this.addEventListener=w.addEventListener,this.removeEventListener=w.removeEventListener,this.dispatchEvent=w.dispatchEvent,this.init=l,this}re.BASE_CLASS=V;re.init=e=>T(`.${V}`,re,e);var U="o-summary-minimal";function ie(e){let r=A(e,U),t=r.querySelector(`.${U}__content`),a=r.querySelector(`.${U}__btn`),i,n;function o(){return O(r)?(g(r,"behavior_flyout-menu"),g(t,"behavior_flyout-menu_content"),g(a,"behavior_flyout-menu_trigger"),window.addEventListener("load",s),this):this}function s(){window.removeEventListener("load",s),n=new I(r,!1),i=new E(t),i.init(E.CLASSES.MH_SUMMARY),n.setTransition(i,i.maxHeightSummary,i.maxHeightDefault),n.init(),r.addEventListener("focusin",l),t.addEventListener("click",u),n.collapse(),i.animateOn()}function l(m){m.target!==a&&(a.click(),r.removeEventListener("focusin",l))}function u(m){m.target.tagName!=="A"&&n.isExpanded()&&i.refresh()}let d=new v;return this.addEventListener=d.addEventListener,this.removeEventListener=d.removeEventListener,this.dispatchEvent=d.dispatchEvent,this.init=o,this}ie.BASE_CLASS=U;ie.init=e=>T(`.${U}`,ie,e);})();
1
+ (()=>{var ye=Object.defineProperty;var j=(e,t)=>{for(var i in t)ye(e,i,{get:t[i],enumerable:!0})};var oe={};j(oe,{default:()=>we});var we={};var se={bpXS:{min:0,max:600},bpSM:{min:601,max:900},bpMED:{min:901,max:1020},bpLG:{min:1021,max:1200},bpXL:{min:1201}};function Y(){let e=getComputedStyle(document.body).fontSize;return e=e===""?-1:e,parseFloat(e)}function Le(e,t){let i=e.min,n=e.max;Y()>0&&Y()!==16&&(i=i/16*Y(),n=n/16*Y());let a=i||0,o=n||Number.POSITIVE_INFINITY;return a<=t&&t<=o}function Ae(e){let t={};e=e||window.innerWidth;let i;for(i in se)t[i]=Le(se[i],e);return t}var K="mobile",Te="tablet",Oe="desktop";function de(e){let t=!1,i=Ae();return(e===K&&i.bpXS||e===Te&&i.bpSM||e===Oe&&(i.bpMED||i.bpLG||i.bpXL))&&(t=!0),t}var E="data-js-hook",le="behavior_",be="state_";function y(){let e={};function t(r,a){return{}.hasOwnProperty.call(e,r)?e[r].push(a):e[r]=[a],this}function i(r,a){if(!{}.hasOwnProperty.call(e,r))return this;let o=e[r].indexOf(a);return o!==-1&&e[r].splice(o,1),this}function n(r,a){if(!{}.hasOwnProperty.call(e,r))return this;a=a||{};let o=e[r];for(let d=0,c=o.length;d<c;d++)o[d].call(this,a);return this}return this.addEventListener=t,this.removeEventListener=i,this.dispatchEvent=n,this.getRegisteredEvents=()=>e,this}function C(e,t){if(!e)return!1;let i=e.getAttribute(E);return i?(i=i.split(" "),i.indexOf(t)>-1):!1}function g(e,t){if(C(e,t))return t;if(t.indexOf(" ")!==-1){let n=E+" values cannot contain spaces!";throw new Error(n)}let i=e.getAttribute(E);return i!==null&&(t=i+" "+t),e.setAttribute(E,t),t}var ce=be+"atomic_init";function ke(e,t){if(!e||!e.classList){let i=e+' is not valid. Check that element is a DOM node with class "'+t+'"';throw new Error(i)}return e}function De(e,t){let i=e.classList.contains(t)?e:e.querySelector("."+t);if(!i){let n=t+" not found on or in passed DOM node.";throw new Error(n)}return i}function A(e,t){return ke(e,t),De(e,t)}function T(e){return C(e,ce)?!1:(g(e,ce),!0)}function O(e,t,i,n={}){let a=(i||document).querySelectorAll(e),o=[],d,c;for(let u=0,s=a.length;u<s;u++)c=a[u],C(c,ce)===!1&&(d=new t(c),d.init(n),o.push(d));return o}function ue(e,t){let i;if(C(e,t))return i=e,i;if(e){let n="["+E+"="+t+"]";i=e.querySelector(n)}if(!i){let n=t+" behavior not found on passed DOM node!";throw new Error(n)}return i}function p(e,t,i){let n=t,r=e;if(!i)throw new Error("Child transition argument must be defined!");let a=i,o,d,c,u=!1,s=!1,m=!1;if(typeof n.CSS_PROPERTY=="undefined"||typeof n.BASE_CLASS=="undefined")throw new Error("Transitions require CSS_PROPERTY and BASE_CLASS to be passed into BaseTransition.");function b(){d&&u?(r.addEventListener(d,c),a.dispatchEvent(p.BEGIN_EVENT,{target:a,type:p.BEGIN_EVENT}),r.classList.add(p.ANIMATING_CLASS),s=!0):(a.dispatchEvent(p.BEGIN_EVENT,{target:a,type:p.BEGIN_EVENT}),c())}function S(){r.removeEventListener(d,c)}function k(f){return f&&f.propertyName!==n.CSS_PROPERTY?!1:(S(),r.classList.remove(p.ANIMATING_CLASS),a.dispatchEvent(p.END_EVENT,{target:a,type:p.END_EVENT}),s=!1,!0)}function D(){let f;for(f in n)({}).hasOwnProperty.call(n,f)&&n[f]!==n.BASE_CLASS&&r.classList.contains(n[f])&&r.classList.remove(n[f])}function v(){s&&(r.style.webkitTransitionDuration="0",r.style.mozTransitionDuration="0",r.style.oTransitionDuration="0",r.style.transitionDuration="0",r.removeEventListener(d,c),c(),r.style.webkitTransitionDuration="",r.style.mozTransitionDuration="",r.style.oTransitionDuration="",r.style.transitionDuration="")}function w(){v(),D(),r.classList.remove(n.BASE_CLASS)}function B(){r.classList.remove(p.NO_ANIMATION_CLASS),u=!0}function z(){r.classList.add(p.NO_ANIMATION_CLASS),u=!1}function L(f){if(!f){let re="Element does not have TransitionEnd event. It may be null!";throw new Error(re)}let U,G={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},F;for(F in G)if({}.hasOwnProperty.call(G,F)&&typeof f.style[F]!="undefined"){U=G[F];break}return U}function I(f){w(),B(),r=f,r.classList.add(n.BASE_CLASS),d=L(r)}function ee(f){if(u=!r.classList.contains(p.NO_ANIMATION_CLASS),c=k.bind(this),I(r),!f)throw new Error("Transition needs to be passed an initial CSS class on initialization!");return r.classList.add(f),this}function te(f){return m||(D(),m=!0),r.classList.contains(f)?!1:(S(),r.classList.remove(o),o=f,b(),r.classList.add(o),!0)}return this.animateOff=z,this.animateOn=B,this.applyClass=te,this.halt=v,this.init=ee,this.isAnimated=()=>u,this.remove=w,this.setElement=I,this}p.BEGIN_EVENT="transitionbegin";p.END_EVENT="transitionend";p.NO_ANIMATION_CLASS="u-no-animation";p.ANIMATING_CLASS="u-is-animating";var $=le+"flyout-menu",He="["+E+"="+$;function H(e,t=!0){let i=ue(e,$),n=B(e),r=ue(e,$+"_content"),a=0,o=0,d=1,c=2,u=3,s,m,b,S=re.bind(this),k=F.bind(this),D,v=!0,w=!1;function B(l){let h=[],x=l.querySelectorAll(`${He}_trigger]`),V,M,ne;for(let ae=x.length>>>0;ae--;){for(ne=!1,V=x[ae],M=V.parentElement;M!==l;)M.getAttribute(E)&&M.getAttribute(E).split(" ").indexOf($)!==-1?(ne=!0,M=l):M=M.parentElement;ne||h.unshift(x[ae])}return h}function z(l=!1){return a=l?u:o,n.forEach(h=>{L("expanded",h,l),h.addEventListener("click",f.bind(this)),h.addEventListener("touchstart",I,{passive:!0}),h.addEventListener("mouseover",ee.bind(this)),h.addEventListener("mouseout",te.bind(this))}),r.setAttribute("data-open",l?"true":"false"),t&&!l&&r.setAttribute("hidden",""),he(),this}function L(l,h,x){let V=String(x);return h.setAttribute("aria-"+l,V),V}function I(){w=!0}function ee(l){v||(w||this.dispatchEvent("triggerover",{target:this,trigger:l.target,type:"triggerover"}),w=!1)}function te(l){v||this.dispatchEvent("triggerout",{target:this,trigger:l.target,type:"triggerout"})}function f(l){if(!v)switch(this.dispatchEvent("triggerclick",{target:this,trigger:l.target,type:"triggerclick"}),l.preventDefault(),a){case o:case d:this.expand();break;case c:case u:this.collapse();break}}function U(){if(s==null||s.halt(),a===c||a===u)return this;if(a=c,t&&r.removeAttribute("hidden"),this.dispatchEvent("expandbegin",{target:this,type:"expandbegin"}),!m||!b)return k(),this;let l=s==null?void 0:s.isAnimated();return l&&s.addEventListener(p.END_EVENT,k),m(),l||k(),this}function G(){if(s==null||s.halt(),a===d||a===o)return this;for(let h=0,x=n.length;h<x;h++)L("expanded",n[h],!1);if(r.setAttribute("data-open","false"),a=d,this.dispatchEvent("collapsebegin",{target:this,type:"collapsebegin"}),!b||!m)return S(),this;let l=s==null?void 0:s.isAnimated();return l&&s.addEventListener(p.END_EVENT,S),b(),l||S(),this}function F(){a=u,r.setAttribute("data-open","true"),s&&s.removeEventListener(p.END_EVENT,k),this.dispatchEvent("expandend",{target:this,type:"expandend"});for(let l=0,h=n.length;l<h;l++)L("expanded",n[l],!0)}function re(){a=o,t&&r.setAttribute("hidden",""),s&&s.removeEventListener(p.END_EVENT,S),this.dispatchEvent("collapseend",{target:this,type:"collapseend"})}function ge(l,h,x){s=l,h&&h!==b&&(b=h),x&&x!==m&&(m=x)}function ve(){s&&s.remove();let l;s=l,m=l,b=l}function _e(){return{container:i,content:r,trigger:n}}function he(){return v&&(v=!1),!v}function xe(){return v||(v=!0),v}function Ee(l){return D=l,this}let ie=new y;return this.addEventListener=ie.addEventListener,this.removeEventListener=ie.removeEventListener,this.dispatchEvent=ie.dispatchEvent,this.init=z,this.expand=U,this.collapse=G,this.setTransition=ge,this.clearTransition=ve,this.getData=()=>D,this.getTransition=()=>s,this.getDom=_e,this.isAnimating=()=>a===c||a===d,this.isExpanded=()=>a===u,this.resume=he,this.setData=Ee,this.suspend=xe,H.BASE_CLASS=$,this}var q={CSS_PROPERTY:"max-height",BASE_CLASS:"u-max-height-transition",MH_DEFAULT:"u-max-height-default",MH_SUMMARY:"u-max-height-summary",MH_ZERO:"u-max-height-zero"};function _(e){let t=new y,i=new p(e,q,this),n=0;function r(){let b=e.scrollHeight+"px";e.style.maxHeight=b}function a(){window.removeEventListener("load",a),r()}function o(m){return i.init(m),window.addEventListener("load",a),window.addEventListener("resize",()=>{r()}),this}function d(){return r(),i.applyClass(q.MH_DEFAULT),(!n||e.scrollHeight>n)&&(n=e.scrollHeight),this}function c(){return i.applyClass(q.MH_SUMMARY),n=e.scrollHeight,this}function u(){return i.applyClass(q.MH_ZERO),n=e.scrollHeight,this}function s(){return e.style.maxHeight="",i.remove()}return this.addEventListener=t.addEventListener,this.dispatchEvent=t.dispatchEvent,this.removeEventListener=t.removeEventListener,this.animateOff=i.animateOff,this.animateOn=i.animateOn,this.halt=i.halt,this.isAnimated=i.isAnimated,this.setElement=i.setElement,this.refresh=r,this.remove=s,this.init=o,this.maxHeightDefault=d,this.maxHeightSummary=c,this.maxHeightZero=u,this}_.CLASSES=q;var pe={};j(pe,{default:()=>Me});var Me={};var R="o-expandable";function N(e){let t=A(e,R),i,n,r,a,o;function d(){if(!T(t))return this;i=t.querySelector(`.${R}__header`),n=t.querySelector(`.${R}__content`),r=t.querySelector(`.${R}__label`);let s=t.classList.contains(`${R}--onload-open`);g(t,"behavior_flyout-menu"),g(i,"behavior_flyout-menu_trigger"),g(n,"behavior_flyout-menu_content");let m=s?_.CLASSES.MH_DEFAULT:_.CLASSES.MH_ZERO;return a=new _(n).init(m),o=new H(t),o.setTransition(a,a.maxHeightZero,a.maxHeightDefault),o.init(s),o.addEventListener("expandbegin",()=>{n.classList.remove("u-hidden"),this.dispatchEvent("expandbegin",{target:this})}),o.addEventListener("collapseend",()=>{n.classList.add("u-hidden")}),this}function c(){return r.textContent.trim()}this.init=d,this.expand=()=>o.expand(),this.collapse=()=>o.collapse(),this.isExpanded=()=>o.isExpanded(),this.refresh=()=>o.getTransition().refresh(),this.getLabelText=c;let u=new y;return this.addEventListener=u.addEventListener,this.removeEventListener=u.removeEventListener,this.dispatchEvent=u.dispatchEvent,this}N.BASE_CLASS=R;N.init=e=>O(`.${N.BASE_CLASS}`,N,e);var fe={};j(fe,{default:()=>Be});var Be={};var Z="o-expandable-group";function J(e){let t=A(e,Z),i=t.classList.contains(`${Z}--accordion`),n,r;function a(d){let c=d.target;r&&r!==c&&r.collapse(),r=c}function o(d){return T(t)?(i&&(n=d,n.forEach(c=>{c.addEventListener("expandbegin",a)})),this):this}return this.init=o,this}J.BASE_CLASS=Z;J.init=e=>{(e||document).querySelectorAll(`.${Z}`).forEach(n=>{let r=O(`.${N.BASE_CLASS}`,N,n);new J(n).init(r)})};var me={};j(me,{default:()=>Re});var Re={};var P="o-summary";function W(e){let t=A(e,P),i=t.classList.contains(`${P}--mobile`),n=t.querySelector(`.${P}__content`),r=t.querySelector(`.${P}__btn`),a,o,d;function c(){return T(t)?(window.addEventListener("load",u),this):this}function u(){window.removeEventListener("load",u),d=!S(),g(t,"behavior_flyout-menu"),g(n,"behavior_flyout-menu_content"),g(r,"behavior_flyout-menu_trigger"),o=new H(t,!1),a=new _(n),a.init(d?_.CLASSES.MH_SUMMARY:_.CLASSES.MH_DEFAULT),o.setTransition(a,a.maxHeightSummary,a.maxHeightDefault),o.addEventListener("triggerclick",k),o.init(),b(),window.addEventListener("resize",b),"onorientationchange"in window&&window.addEventListener("orientationchange",b),t.addEventListener("focusin",s),n.addEventListener("click",m)}function s(I){!d&&I.target!==r&&(r.click(),t.removeEventListener("focusin",s))}function m(I){I.target.tagName!=="A"&&o.isExpanded()&&a.refresh()}function b(){S()?z():B()}function S(){return i&&!de(K)||n.scrollHeight<=88}function k(){o.addEventListener("expandend",D)}function D(){w(),window.removeEventListener("resize",b),window.removeEventListener("orientationchange",b),o.removeEventListener("expandend",D),o.suspend(),a.remove()}function v(){r.classList.remove("u-hidden")}function w(){r.classList.add("u-hidden")}function B(){return d&&(o.collapse(),a.animateOn(),v(),d=!1),!d}function z(){return d||(a.animateOff(),o.expand(),w(),d=!0),d}let L=new y;return this.addEventListener=L.addEventListener,this.removeEventListener=L.removeEventListener,this.dispatchEvent=L.dispatchEvent,this.init=c,this}W.BASE_CLASS=P;W.init=e=>O(`.${P}`,W,e);var X="o-summary-minimal";function Q(e){let t=A(e,X),i=t.querySelector(`.${X}__content`),n=t.querySelector(`.${X}__btn`),r,a;function o(){return T(t)?(g(t,"behavior_flyout-menu"),g(i,"behavior_flyout-menu_content"),g(n,"behavior_flyout-menu_trigger"),window.addEventListener("load",d),this):this}function d(){window.removeEventListener("load",d),a=new H(t,!1),r=new _(i),r.init(_.CLASSES.MH_SUMMARY),a.setTransition(r,r.maxHeightSummary,r.maxHeightDefault),a.init(),t.addEventListener("focusin",c),i.addEventListener("click",u),a.collapse(),r.animateOn()}function c(m){m.target!==n&&(n.click(),t.removeEventListener("focusin",c))}function u(m){m.target.tagName!=="A"&&a.isExpanded()&&r.refresh()}let s=new y;return this.addEventListener=s.addEventListener,this.removeEventListener=s.removeEventListener,this.dispatchEvent=s.dispatchEvent,this.init=o,this}Q.BASE_CLASS=X;Q.init=e=>O(`.${X}`,Q,e);})();
2
2
  //# sourceMappingURL=index.js.map