@aarhus-university/au-designsystem-delphinus 1.1.2 → 1.1.4
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 +22 -0
- package/package.json +1 -1
- package/public/js/app.js +1 -1
- package/public/js/app.js.map +3 -3
- package/public/js/demo.js +2 -2
- package/public/js/demo.js.map +2 -2
- package/public/projects/bachelor-applications/js/app.js +1 -1
- package/public/projects/bachelor-applications/js/app.js.map +3 -3
- package/public/projects/bachelor-applications/style.css +1 -1
- package/public/projects/brightspace/style.css +1 -1
- package/public/projects/course-catalogue/js/app.js +1 -1
- package/public/projects/course-catalogue/js/app.js.map +3 -3
- package/public/projects/course-catalogue/style.css +1 -1
- package/public/projects/medarbejdere/js/app.js +1 -1
- package/public/projects/medarbejdere/js/app.js.map +3 -3
- package/public/projects/medarbejdere/style.css +1 -1
- package/public/projects/mitstudie/js/app.js +1 -1
- package/public/projects/mitstudie/js/app.js.map +3 -3
- package/public/projects/mitstudie/style.css +1 -1
- package/public/projects/queue-it/style.css +1 -1
- package/public/projects/typo3/js/app.js +1 -1
- package/public/projects/typo3/js/app.js.map +3 -3
- package/public/projects/typo3/style.css +1 -1
- package/public/style.css +1 -1
- package/source/js/components/content-toggle.ts +8 -0
- package/source/js/components/helpers.ts +12 -1
- package/source/js/production/app.ts +19 -1
- package/source/js/production/typo3.ts +10 -1
- package/source/markup/icons.pug +1 -1
- package/source/projects/medarbejdere/markup/_pure-profile-editor.pug +4 -4
- package/source/projects/medarbejdere/pure-profile-editor-links.pug +2 -2
- package/source/projects/typo3/employee-profiles/mixins/_contact-list.pug +8 -8
- package/source/projects/typo3/employee-profiles/mixins/_profile-header.pug +1 -1
- package/source/projects/typo3/style/_contact-list.scss +3 -3
- package/source/style/_sass-variables.scss +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## 1.1.4 (August 21, 2023)
|
|
2
|
+
|
|
3
|
+
### Core Delphinus Updates
|
|
4
|
+
* Adds the new X icon for the social media formerly known as Twitter. Thank you Elon.
|
|
5
|
+
|
|
6
|
+
### Delphinus Projects Updates
|
|
7
|
+
#### Typo3 - Employee profiles
|
|
8
|
+
* Updated markup and style to use the new X icon instead of Twitter icon.
|
|
9
|
+
|
|
10
|
+
#### Medarbejdere - Pure Profile Editor
|
|
11
|
+
* Updated markup and style to use the new X icon instead of Twitter icon.
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 1.1.3 (August 18, 2023)
|
|
15
|
+
|
|
16
|
+
### Core Delphinus Updates
|
|
17
|
+
Adds TypeScript funtionality that dynamically adjust overflow in horizontal scroll
|
|
18
|
+
|
|
19
|
+
### Delphinus Projects Updates
|
|
20
|
+
#### Typo3 - Employee profiles
|
|
21
|
+
Horizontal scroll automatically adjusts overflow
|
|
22
|
+
|
|
1
23
|
## 1.1.2 (August 17, 2023)
|
|
2
24
|
|
|
3
25
|
### Core Delphinus Updates
|
package/package.json
CHANGED
package/public/js/app.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{var V=e=>{document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)},x=V;var h=(e,t)=>{let o=!1;return e.composedPath().forEach(r=>{r.classList&&r.classList.contains(t)&&(o=!0)}),o},q=()=>{let e=document.querySelector("body");if(e){let t=window.getComputedStyle(e).getPropertyValue("--color-background"),o=document.querySelector('meta[name="theme-color"]');if(o)o.content=t;else{let l=document.createElement("meta");l.name="theme-color",l.content=t,document.getElementsByTagName("head")[0].appendChild(l)}}},C=()=>parseInt(window.getComputedStyle(document.documentElement).fontSize.replace("px",""),10),y=e=>e*parseFloat(getComputedStyle(document.documentElement).fontSize),L=e=>{let t=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),o=y(parseInt(getComputedStyle(document.documentElement).getPropertyValue(e).replace("rem",""),10));return t<o};var k=e=>{let t=e.parentElement;return t?t.classList.contains("nav")?t:k(t):e},W=(e,t=null)=>{let o="nav--toggled";e.forEach(l=>{let r=l.querySelector(".nav__toggle");l!==t&&(l.classList.contains(o)&&(r.focus(),r.setAttribute("aria-expanded","false")),l.classList.remove(o))})},I=e=>{let t=r=>{let n=k(r),s=n.querySelector(".nav__items"),i=s?.querySelector(".nav__item:last-of-type");s?.classList.add("nav__items--fadeout");let d=s?.querySelector(".nav__item--is-overflown");d&&d.focus();let a=()=>{n.classList.toggle("nav--toggled"),s?.classList.remove("nav__items--fadeout"),i?.removeEventListener("transitionend",a)};return i?.addEventListener("transitionend",a),n},o=[];return document.querySelectorAll(".nav__toggle").forEach(r=>{let n=()=>{let s=t(r),i=r.getAttribute("aria-expanded");r.setAttribute("aria-expanded",i==="false"?"true":"false"),W(e,s)};o.push({element:r,clickEvent:n}),r.addEventListener("click",n)}),o},_=(e,t)=>{let o="nav--toggled",l="nav__items";t.classList.remove(o);let r=t.querySelector(`.${l}`);if(r){let s=r.querySelectorAll(".nav__item"),i="nav__item--is-overflown",d="nav--has-overflow",a="nav__item--active",c=!1;for(let u=s.length-1;u>=0;u-=1){let m=s[u];m.offsetTop>0?(m.classList.add(i),t.classList.add(d),c=!0):m.classList.contains(a)||m.classList.remove(i)}if(!c){t.classList.remove(d);let u=t.querySelector(`.${a}`);u&&u.classList.remove(i)}}let n=s=>{!s.target.classList.contains("nav__toggle")&&!h(s,l)&&W(e)};return document.querySelector("body")?.addEventListener("click",n),{element:document.querySelector("body"),clickEvent:n}};var N=e=>{let t=e.querySelector("thead"),o=e.querySelector("tbody"),l=e.querySelector("tfoot");if(t){let r=[];t.querySelectorAll("th").forEach(i=>{i.classList.contains("table__cell--self-explanatory")?r.push(""):r.push(i.innerHTML)});let s=[];o&&s.push(o),l&&s.push(l),s.forEach(i=>{i.querySelectorAll("tr").forEach(a=>{a.querySelectorAll("td, th").forEach((u,m)=>{r[m]&&u.setAttribute("data-label",r[m])})})})}};var $=e=>e.contains("tabbed-content--hide-tabs-on-medium-width")?parseInt(getComputedStyle(document.documentElement).getPropertyValue("--bp-medium").replace("rem",""),10):e.contains("tabbed-content--hide-tabs-on-wide-width")?parseInt(getComputedStyle(document.documentElement).getPropertyValue("--bp-wide").replace("rem",""),10):-1,D=e=>{let o=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)/C(),l=$(e);return l>-1?o<l:!0},K=e=>{let o=e.querySelector(".nav__items")?.querySelectorAll("a"),l=[];e.querySelectorAll("section").forEach(n=>{n.parentNode===e&&l.push(n)}),o?.forEach(n=>{n.removeAttribute("aria-selected"),n.classList.remove("nav__item--active")}),l.forEach(n=>{n.hidden=!1,n.removeAttribute("role")})};var T=(e,t,o,l,r,n=!0,s=i=>console.log(i))=>{n&&l.focus(),l.removeAttribute("tabindex"),l.setAttribute("aria-selected","true"),l.classList.contains("switch__segment")?l.classList.add("switch__segment--active"):l.classList.add("nav__item--active"),o&&(o.removeAttribute("aria-selected"),o.setAttribute("tabindex","-1"),o.classList.contains("switch__segment")?o.classList.remove("switch__segment--active"):o.classList.remove("nav__item--active"));let i=Array.prototype.indexOf.call(e,l);if(Array.from(document.querySelectorAll(`[data-for="${t[i].id}"]`)).forEach(a=>{a.classList.add("tabbed-content-peripheral--active"),a.hidden=!1}),t[i].hidden=!1,o){let a=Array.prototype.indexOf.call(e,o);Array.from(document.querySelectorAll(`[data-for="${t[a].id}"]`)).forEach(u=>{u.classList.remove("tabbed-content-peripheral--active"),u.hidden=!0}),t[a].hidden=!0}l.dispatchEvent(new CustomEvent("switch-tab",{bubbles:!0,detail:{tab:i}})),s(i)},F=(e,t,o=0,l=!0,r=n=>console.log(n))=>{let n=t.querySelector(".switch,.nav__items"),s=n.querySelectorAll("a"),i=[];t.querySelectorAll("section").forEach(c=>{c.parentNode===t&&i.push(c)});let a=t.querySelector("button.tabbed-content__expand-all");if(a){let c=()=>{n.hidden=!0,i.forEach(u=>{u.hidden=!1})};a.removeEventListener("click",c),a.addEventListener("click",c)}n.setAttribute("role","tablist"),s.forEach((c,u)=>{c.setAttribute("role","tab"),c.setAttribute("id",`tab${e}_${u+1}`),c.setAttribute("tabindex","-1"),c.parentElement?.setAttribute("role","presentation");let m=f=>{f.preventDefault();let E=n.querySelector("[aria-selected]");f.currentTarget!==E&&T(s,i,E,f.currentTarget,t.classList,!0,v=>{r(v)})};c.removeEventListener("click",m),c.addEventListener("click",m);let p=f=>{let E=Array.prototype.indexOf.call(s,f.currentTarget),v=null;f.key==="ArrowLeft"&&(v=E-1),f.key==="ArrowRight"&&(v=E+1),f.key==="ArrowDown"&&(v="down"),v!==null&&(f.preventDefault(),v==="down"?i[u].focus():s[v]&&T(s,i,f.currentTarget,s[v],t.classList,!0,R=>{r(R)}))};c.removeEventListener("keydown",p),c.addEventListener("keydown",p)}),i.forEach((c,u)=>{c.setAttribute("tabindex","-1"),c.setAttribute("aria-labelledby",s[u].id),c.hidden=!0,c.setAttribute("role","tabpanel")}),o>-1&&T(s,i,null,s[o],t.classList,l)},w=e=>{e.forEach((t,o)=>{let{rendered:l,domElement:r}=t;if(D(r.classList)){if(!l){let n=r.getAttribute("data-focus-onload"),s=r.getAttribute("data-initial-tab"),i=s?parseInt(s,10):0;F(o,r,i,n!=="false"),t.rendered=!0}}else l&&(K(r),t.rendered=!1)})};var M=(e,t,o,l)=>{let r=[],n=(d,a,c)=>{c&&a.focus();let u=()=>{e.setAttribute("hidden","hidden"),d.removeAttribute("hidden"),d.setAttribute("aria-expanded","false"),d.focus()};return a.addEventListener("click",u),u},s=e?.parentElement?.querySelector(".content-toggle__toggle"),i=e.querySelectorAll(".content-toggle__close");if(s){let d=()=>{let a=s.getAttribute("aria-expanded");typeof o=="function"&&a==="false"&&o(e,s),s.setAttribute("aria-expanded",a==="false"?"true":"false"),a==="true"?e.setAttribute("hidden","hidden"):e.removeAttribute("hidden"),typeof t=="function"&&t(e,s),s.hasAttribute("aria-haspopup")&&(s.setAttribute("hidden","hidden"),i.forEach(c=>{n(s,c,!0)})),typeof l=="function"&&l(e,s)};s.addEventListener("click",d),r.push({element:s,clickEvent:d}),i.forEach(a=>{let c=n(s,a,!1);r.push({element:a,clickEvent:c})})}return r};var O=()=>{let e=document.querySelector("body");(L("--bp-medium")||L("--bp-low-height"))&&e?.classList.add("body--no-scroll")},P=()=>{document.querySelector("body")?.classList.remove("body--no-scroll")},A=e=>{e.querySelectorAll(".content-toggle__toggle").forEach(o=>{let l=o.parentElement?.querySelector(".content-toggle__content");o.setAttribute("aria-expanded","false"),l?.setAttribute("hidden","hidden")})};var b=e=>{let t=e.parentElement;return t?t.classList.contains("toolbar")?t:b(t):e},B=e=>{if(!L("--bp-medium")&&!L("--bp-low-height")){let t=y(parseInt(getComputedStyle(document.documentElement).getPropertyValue("--toolbar-popout-allowed-edge-distance").replace("rem,",""),10)),o=parseInt(getComputedStyle(e).width.replace("px",""),10),l=e.getBoundingClientRect().x,r=document.body.offsetWidth-t-o-l;r<0&&e.style.setProperty("--toolbar-popout-edge-overflow",`${r}px`)}};var z=e=>{e&&e.forEach(t=>{let o=t?.parentElement?.parentElement?.parentElement?.parentElement;if(o){let l=o.querySelectorAll(".horizontal-scroll__scrollable-content"),r=o.querySelectorAll(".switch__segment");l.forEach(n=>{n&&(t.addEventListener("click",()=>{let s=.8*n.clientWidth;n.scrollLeft+=s}),n.addEventListener("scroll",()=>{n.scrollLeft+n.clientWidth>=n.scrollWidth*.98?H(t):n.scrollLeft+n.clientWidth<n.scrollWidth&&S(t)}),r&&r.forEach(s=>{s.addEventListener("click",()=>{S(t),n.scrollLeft=0})}))})}})},U=e=>{e&&e.forEach(t=>{let o=t?.parentElement?.parentElement?.parentElement?.parentElement;if(o){let l=o.querySelectorAll(".horizontal-scroll__scrollable-content"),r=o.querySelectorAll(".switch__segment");l.forEach(n=>{n&&(t.addEventListener("click",()=>{let s=.8*n.clientWidth;n.scrollLeft-=s}),n.addEventListener("scroll",()=>{n.scrollLeft<=0?H(t):n.scrollLeft>0&&S(t)})),r&&r.forEach(s=>{s.addEventListener("click",()=>{H(t)})})})}})};function S(e){e.classList.remove("visually-disabled"),e.setAttribute("aria-disabled","false")}function H(e){e.classList.add("visually-disabled"),e.setAttribute("aria-disabled","true")}var g=0;x(()=>{let e=document.querySelectorAll(".tabbed-content"),t=[];e.forEach(d=>t.push({domElement:d,rendered:!1})),w(t),q();let o=document.querySelectorAll(".nav:not(.nav--vertical)");o.forEach(d=>_(o,d)),I(o),document.querySelectorAll(".table--wrap-medium-width, .table--wrap-default-width").forEach(d=>N(d)),document.querySelectorAll(".box .content-toggle__content, .profile-header .content-toggle__content, .design-documentation .content-toggle__content").forEach(d=>{M(d)});let n=document.querySelectorAll(".button.button--small.button--icon.button--icon--hide-label.icon-next"),s=document.querySelectorAll(".button.button--small.button--icon.button--icon--hide-label.icon-previous");z(n),U(s),document.querySelectorAll(".toolbar .content-toggle__content").forEach(d=>{M(d,a=>{B(a),O()},a=>A(b(a)),(a,c)=>{let u=c.getAttribute("aria-expanded"),m=b(a);u==="true"?m?.classList.add("toolbar--has-popout"):m?.classList.remove("toolbar--has-popout"),a.addEventListener("click",p=>{p.target.classList.contains("toolbar__popout")&&!h(p,"toolbar__filter__content")&&(A(m),P())})})}),window.addEventListener("load",()=>{g=window.innerWidth}),window.addEventListener("resize",()=>{g>0&&window.innerWidth!==g&&(g=window.innerWidth,o.forEach(d=>_(o,d)),w(t))})});})();
|
|
1
|
+
(()=>{var $=e=>{document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)},q=$;var h=(e,t)=>{let o=!1;return e.composedPath().forEach(i=>{i.classList&&i.classList.contains(t)&&(o=!0)}),o},C=()=>{let e=document.querySelector("body");if(e){let t=window.getComputedStyle(e).getPropertyValue("--color-background"),o=document.querySelector('meta[name="theme-color"]');if(o)o.content=t;else{let l=document.createElement("meta");l.name="theme-color",l.content=t,document.getElementsByTagName("head")[0].appendChild(l)}}},k=()=>parseInt(window.getComputedStyle(document.documentElement).fontSize.replace("px",""),10),_=e=>e*parseFloat(getComputedStyle(document.documentElement).fontSize),L=e=>{let t=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),o=_(parseInt(getComputedStyle(document.documentElement).getPropertyValue(e).replace("rem",""),10));return t<o};var D=e=>e.offsetWidth!==e.scrollWidth;var b=e=>{e.classList.contains("horizontal-scroll--no-overflow")&&e.classList.remove("horizontal-scroll--no-overflow");let t=e.querySelector(".horizontal-scroll--check-overflow .tabbed-content__section:not([hidden]) .horizontal-scroll__scrollable-content");t===null&&!t&&(t=e.querySelector(".horizontal-scroll--check-overflow .horizontal-scroll__scrollable-content")),t&&(D(t)?t?.setAttribute("tabindex","0"):(e.classList.add("horizontal-scroll--no-overflow"),t?.removeAttribute("tabindex")))};var W=e=>{let t=e.parentElement;return t?t.classList.contains("nav")?t:W(t):e},I=(e,t=null)=>{let o="nav--toggled";e.forEach(l=>{let i=l.querySelector(".nav__toggle");l!==t&&(l.classList.contains(o)&&(i.focus(),i.setAttribute("aria-expanded","false")),l.classList.remove(o))})},N=e=>{let t=i=>{let n=W(i),s=n.querySelector(".nav__items"),a=s?.querySelector(".nav__item:last-of-type");s?.classList.add("nav__items--fadeout");let u=s?.querySelector(".nav__item--is-overflown");u&&u.focus();let d=()=>{n.classList.toggle("nav--toggled"),s?.classList.remove("nav__items--fadeout"),a?.removeEventListener("transitionend",d)};return a?.addEventListener("transitionend",d),n},o=[];return document.querySelectorAll(".nav__toggle").forEach(i=>{let n=()=>{let s=t(i),a=i.getAttribute("aria-expanded");i.setAttribute("aria-expanded",a==="false"?"true":"false"),I(e,s)};o.push({element:i,clickEvent:n}),i.addEventListener("click",n)}),o},T=(e,t)=>{let o="nav--toggled",l="nav__items";t.classList.remove(o);let i=t.querySelector(`.${l}`);if(i){let s=i.querySelectorAll(".nav__item"),a="nav__item--is-overflown",u="nav--has-overflow",d="nav__item--active",r=!1;for(let c=s.length-1;c>=0;c-=1){let m=s[c];m.offsetTop>0?(m.classList.add(a),t.classList.add(u),r=!0):m.classList.contains(d)||m.classList.remove(a)}if(!r){t.classList.remove(u);let c=t.querySelector(`.${d}`);c&&c.classList.remove(a)}}let n=s=>{!s.target.classList.contains("nav__toggle")&&!h(s,l)&&I(e)};return document.querySelector("body")?.addEventListener("click",n),{element:document.querySelector("body"),clickEvent:n}};var O=e=>{let t=e.querySelector("thead"),o=e.querySelector("tbody"),l=e.querySelector("tfoot");if(t){let i=[];t.querySelectorAll("th").forEach(a=>{a.classList.contains("table__cell--self-explanatory")?i.push(""):i.push(a.innerHTML)});let s=[];o&&s.push(o),l&&s.push(l),s.forEach(a=>{a.querySelectorAll("tr").forEach(d=>{d.querySelectorAll("td, th").forEach((c,m)=>{i[m]&&c.setAttribute("data-label",i[m])})})})}};var K=e=>e.contains("tabbed-content--hide-tabs-on-medium-width")?parseInt(getComputedStyle(document.documentElement).getPropertyValue("--bp-medium").replace("rem",""),10):e.contains("tabbed-content--hide-tabs-on-wide-width")?parseInt(getComputedStyle(document.documentElement).getPropertyValue("--bp-wide").replace("rem",""),10):-1,F=e=>{let o=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)/k(),l=K(e);return l>-1?o<l:!0},j=e=>{let o=e.querySelector(".nav__items")?.querySelectorAll("a"),l=[];e.querySelectorAll("section").forEach(n=>{n.parentNode===e&&l.push(n)}),o?.forEach(n=>{n.removeAttribute("aria-selected"),n.classList.remove("nav__item--active")}),l.forEach(n=>{n.hidden=!1,n.removeAttribute("role")})};var w=(e,t,o,l,i,n=!0,s=a=>console.log(a))=>{n&&l.focus(),l.removeAttribute("tabindex"),l.setAttribute("aria-selected","true"),l.classList.contains("switch__segment")?l.classList.add("switch__segment--active"):l.classList.add("nav__item--active"),o&&(o.removeAttribute("aria-selected"),o.setAttribute("tabindex","-1"),o.classList.contains("switch__segment")?o.classList.remove("switch__segment--active"):o.classList.remove("nav__item--active"));let a=Array.prototype.indexOf.call(e,l);if(Array.from(document.querySelectorAll(`[data-for="${t[a].id}"]`)).forEach(d=>{d.classList.add("tabbed-content-peripheral--active"),d.hidden=!1}),t[a].hidden=!1,o){let d=Array.prototype.indexOf.call(e,o);Array.from(document.querySelectorAll(`[data-for="${t[d].id}"]`)).forEach(c=>{c.classList.remove("tabbed-content-peripheral--active"),c.hidden=!0}),t[d].hidden=!0}l.dispatchEvent(new CustomEvent("switch-tab",{bubbles:!0,detail:{tab:a}})),s(a)},X=(e,t,o=0,l=!0,i=n=>console.log(n))=>{let n=t.querySelector(".switch,.nav__items"),s=n.querySelectorAll("a"),a=[];t.querySelectorAll("section").forEach(r=>{r.parentNode===t&&a.push(r)});let d=t.querySelector("button.tabbed-content__expand-all");if(d){let r=()=>{n.hidden=!0,a.forEach(c=>{c.hidden=!1})};d.removeEventListener("click",r),d.addEventListener("click",r)}n.setAttribute("role","tablist"),s.forEach((r,c)=>{r.setAttribute("role","tab"),r.setAttribute("id",`tab${e}_${c+1}`),r.setAttribute("tabindex","-1"),r.parentElement?.setAttribute("role","presentation");let m=f=>{f.preventDefault();let E=n.querySelector("[aria-selected]");f.currentTarget!==E&&w(s,a,E,f.currentTarget,t.classList,!0,v=>{i(v)})};r.removeEventListener("click",m),r.addEventListener("click",m);let p=f=>{let E=Array.prototype.indexOf.call(s,f.currentTarget),v=null;f.key==="ArrowLeft"&&(v=E-1),f.key==="ArrowRight"&&(v=E+1),f.key==="ArrowDown"&&(v="down"),v!==null&&(f.preventDefault(),v==="down"?a[c].focus():s[v]&&w(s,a,f.currentTarget,s[v],t.classList,!0,V=>{i(V)}))};r.removeEventListener("keydown",p),r.addEventListener("keydown",p)}),a.forEach((r,c)=>{r.setAttribute("tabindex","-1"),r.setAttribute("aria-labelledby",s[c].id),r.hidden=!0,r.setAttribute("role","tabpanel")}),o>-1&&w(s,a,null,s[o],t.classList,l)},M=e=>{e.forEach((t,o)=>{let{rendered:l,domElement:i}=t;if(F(i.classList)){if(!l){let n=i.getAttribute("data-focus-onload"),s=i.getAttribute("data-initial-tab"),a=s?parseInt(s,10):0;X(o,i,a,n!=="false"),t.rendered=!0}}else l&&(j(i),t.rendered=!1)})};var S=(e,t,o,l)=>{let i=[],n=(u,d,r)=>{r&&d.focus();let c=()=>{e.setAttribute("hidden","hidden"),u.removeAttribute("hidden"),u.setAttribute("aria-expanded","false"),u.focus()};return d.addEventListener("click",c),c},s=e?.parentElement?.querySelector(".content-toggle__toggle"),a=e.querySelectorAll(".content-toggle__close");if(s){let u=()=>{let d=s.getAttribute("aria-expanded");typeof o=="function"&&d==="false"&&o(e,s),s.setAttribute("aria-expanded",d==="false"?"true":"false"),d==="true"?e.setAttribute("hidden","hidden"):e.removeAttribute("hidden"),typeof t=="function"&&t(e,s),s.hasAttribute("aria-haspopup")&&(s.setAttribute("hidden","hidden"),a.forEach(r=>{n(s,r,!0)})),typeof l=="function"&&l(e,s)};s.addEventListener("click",u),i.push({element:s,clickEvent:u}),a.forEach(d=>{let r=n(s,d,!1);i.push({element:d,clickEvent:r})})}return i};var P=()=>{let e=document.querySelector("body");(L("--bp-medium")||L("--bp-low-height"))&&e?.classList.add("body--no-scroll")},z=()=>{document.querySelector("body")?.classList.remove("body--no-scroll")},A=e=>{e.querySelectorAll(".content-toggle__toggle").forEach(o=>{let l=o.parentElement?.querySelector(".content-toggle__content");o.setAttribute("aria-expanded","false"),l?.setAttribute("hidden","hidden")})};var g=e=>{let t=e.parentElement;return t?t.classList.contains("toolbar")?t:g(t):e},B=e=>{if(!L("--bp-medium")&&!L("--bp-low-height")){let t=_(parseInt(getComputedStyle(document.documentElement).getPropertyValue("--toolbar-popout-allowed-edge-distance").replace("rem,",""),10)),o=parseInt(getComputedStyle(e).width.replace("px",""),10),l=e.getBoundingClientRect().x,i=document.body.offsetWidth-t-o-l;i<0&&e.style.setProperty("--toolbar-popout-edge-overflow",`${i}px`)}};var U=e=>{e&&e.forEach(t=>{let o=t?.parentElement?.parentElement?.parentElement?.parentElement;if(o){let l=o.querySelectorAll(".horizontal-scroll__scrollable-content"),i=o.querySelectorAll(".switch__segment");l.forEach(n=>{n&&(t.addEventListener("click",()=>{let s=.8*n.clientWidth;n.scrollLeft+=s}),n.addEventListener("scroll",()=>{n.scrollLeft+n.clientWidth>=n.scrollWidth*.98?x(t):n.scrollLeft+n.clientWidth<n.scrollWidth&&H(t)}),i&&i.forEach(s=>{s.addEventListener("click",()=>{H(t),n.scrollLeft=0})}))})}})},R=e=>{e&&e.forEach(t=>{let o=t?.parentElement?.parentElement?.parentElement?.parentElement;if(o){let l=o.querySelectorAll(".horizontal-scroll__scrollable-content"),i=o.querySelectorAll(".switch__segment");l.forEach(n=>{n&&(t.addEventListener("click",()=>{let s=.8*n.clientWidth;n.scrollLeft-=s}),n.addEventListener("scroll",()=>{n.scrollLeft<=0?x(t):n.scrollLeft>0&&H(t)})),i&&i.forEach(s=>{s.addEventListener("click",()=>{x(t)})})})}})};function H(e){e.classList.remove("visually-disabled"),e.setAttribute("aria-disabled","false")}function x(e){e.classList.add("visually-disabled"),e.setAttribute("aria-disabled","true")}var y=0;q(()=>{let e=document.querySelectorAll(".tabbed-content"),t=[];e.forEach(r=>t.push({domElement:r,rendered:!1})),M(t),C();let o=document.querySelectorAll(".nav:not(.nav--vertical)");o.forEach(r=>T(o,r)),N(o),document.querySelectorAll(".table--wrap-medium-width, .table--wrap-default-width").forEach(r=>O(r)),document.querySelectorAll(".box .content-toggle__content, .profile-header .content-toggle__content, .design-documentation .content-toggle__content").forEach(r=>{S(r)});let n=document.querySelectorAll(".button.button--small.button--icon.button--icon--hide-label.icon-next"),s=document.querySelectorAll(".button.button--small.button--icon.button--icon--hide-label.icon-previous");U(n),R(s),document.querySelectorAll(".horizontal-scroll").forEach(r=>{b(r),window.addEventListener("resize",()=>{b(r)})}),document.querySelectorAll(".switch__segment").forEach(r=>{r.addEventListener("click",()=>{document.querySelectorAll(".horizontal-scroll").forEach(m=>{b(m)})})}),document.querySelectorAll(".toolbar .content-toggle__content").forEach(r=>{S(r,c=>{B(c),P()},c=>A(g(c)),(c,m)=>{let p=m.getAttribute("aria-expanded"),f=g(c);p==="true"?f?.classList.add("toolbar--has-popout"):f?.classList.remove("toolbar--has-popout"),c.addEventListener("click",E=>{E.target.classList.contains("toolbar__popout")&&!h(E,"toolbar__filter__content")&&(A(f),z())})})}),window.addEventListener("load",()=>{y=window.innerWidth}),window.addEventListener("resize",()=>{y>0&&window.innerWidth!==y&&(y=window.innerWidth,o.forEach(r=>T(o,r)),M(t))})});})();
|
|
2
2
|
//# sourceMappingURL=app.js.map
|
package/public/js/app.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../source/js/components/ready.ts", "../../source/js/components/helpers.ts", "../../source/js/components/nav.ts", "../../source/js/components/table.ts", "../../source/js/components/tabs.ts", "../../source/js/components/content-toggle.ts", "../../source/js/components/toolbar.ts", "../../source/js/components/horizontal-scroll-btn.ts", "../../source/js/production/app.ts"],
|
|
4
|
-
"sourcesContent": ["/* eslint-env browser */\nconst ready = (fn: () => void): void => {\n if (document.readyState !== 'loading') {\n fn();\n } else {\n document.addEventListener('DOMContentLoaded', fn);\n }\n};\n\nexport default ready;\n", "/* eslint-disable wrap-iife */\n/* eslint-disable import/prefer-default-export */\n/* eslint-env browser */\nconst copyToClipboard = (str: string): void => {\n // eslint-disable-next-line no-console\n navigator.clipboard.writeText(str).then(() => console.log(`${str} written to clipboard`));\n};\n\nconst isElementWithClassNameInEventPath = (event: MouseEvent, className: string): boolean => {\n let found = false;\n const path = event.composedPath();\n path.forEach((p: EventTarget): void => {\n if ((p as HTMLElement).classList) {\n if ((p as HTMLElement).classList.contains(className)) {\n found = true;\n }\n }\n });\n return found;\n};\n\nconst setMetaThemeColor = (): void => {\n const body = document.querySelector('body');\n if (body) {\n const bgColor = window.getComputedStyle(body).getPropertyValue('--color-background');\n const existingMeta = document.querySelector('meta[name=\"theme-color\"]') as HTMLMetaElement;\n if (existingMeta) {\n existingMeta.content = bgColor;\n } else {\n const meta = document.createElement('meta');\n meta.name = 'theme-color';\n meta.content = bgColor;\n document.getElementsByTagName('head')[0].appendChild(meta);\n }\n }\n};\n\nconst getBaseFontSize = (): number => parseInt(window.getComputedStyle(document.documentElement).fontSize.replace('px', ''), 10);\n\n// eslint-disable-next-line max-len\nconst convertRemToPixels = (rem: number): number => rem * parseFloat(getComputedStyle(document.documentElement).fontSize);\n\nconst isViewportBelow = (mediaQuery: string): boolean => {\n const viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n const mediaQueryValue = convertRemToPixels(parseInt(getComputedStyle(document.documentElement).getPropertyValue(mediaQuery).replace('rem', ''), 10));\n return viewportWidth < mediaQueryValue;\n};\n\nconst setScrollbarWidthVariable = (): void => {\n const scrollbarWidth = window.innerWidth - document.body.clientWidth;\n document.documentElement.style.setProperty('--vertical-scrollbar-width', `${scrollbarWidth}px`);\n};\n\nconst overflowsY = (element: HTMLElement): boolean => element.offsetHeight !== element.scrollHeight;\nconst overflowsX = (element: HTMLElement): boolean => element.offsetWidth !== element.scrollWidth;\n// eslint-disable-next-line max-len\nconst elementOverflows = (element: HTMLElement): boolean => overflowsY(element) || overflowsX(element);\n\nconst setHorizontalScroll = (element: HTMLElement): void => {\n const content = element.querySelector('.horizontal-scroll--check-overflow .horizontal-scroll__scrollable-content');\n if (content) {\n if (!overflowsX(content as HTMLElement)) {\n element.classList.add('horizontal-scroll--no-overflow');\n content?.removeAttribute('tabindex');\n } else {\n content?.setAttribute('tabindex', '0');\n }\n }\n};\n\nconst focusableSelector = 'a[href]:not([tabindex=\"-1\"]), area[href]:not([tabindex=\"-1\"]), input:not([disabled]):not([tabindex=\"-1\"]), select:not([disabled]):not([tabindex=\"-1\"]), textarea:not([disabled]):not([tabindex=\"-1\"]), button:not([disabled]):not([tabindex=\"-1\"]), iframe:not([tabindex=\"-1\"]), [tabindex]:not([tabindex=\"-1\"]), [contentEditable=true]:not([tabindex=\"-1\"])';\n\nexport {\n copyToClipboard,\n isElementWithClassNameInEventPath,\n getBaseFontSize,\n setMetaThemeColor,\n isViewportBelow,\n convertRemToPixels,\n setScrollbarWidthVariable,\n overflowsX,\n overflowsY,\n elementOverflows,\n setHorizontalScroll,\n focusableSelector,\n};\n", "/* eslint-env browser */\nimport { copyToClipboard, isElementWithClassNameInEventPath } from './helpers';\n\nconst findNav = (element: HTMLElement): HTMLElement => {\n const parent = element.parentElement;\n if (parent) {\n if (parent.classList.contains('nav')) {\n return parent;\n }\n return findNav(parent);\n }\n return element;\n};\n\n// eslint-disable-next-line max-len\nconst closeResponsiveNav = (navElements: NodeListOf<Element>, keepOpen: HTMLElement | null = null): void => {\n const navToggledClass = 'nav--toggled';\n navElements.forEach((n) => {\n const button = n.querySelector('.nav__toggle') as HTMLElement;\n if (n !== keepOpen) {\n if (n.classList.contains(navToggledClass)) {\n button.focus();\n button.setAttribute('aria-expanded', 'false');\n }\n n.classList.remove(navToggledClass);\n }\n });\n};\n\nconst setResponsiveToggle = (navElements: NodeListOf<Element>): CleanUpPair[] => {\n const toggleMenu = (button: HTMLElement) => {\n const parent = findNav(button);\n\n const navItems = parent.querySelector('.nav__items');\n const lastNavItem = navItems?.querySelector('.nav__item:last-of-type');\n navItems?.classList.add('nav__items--fadeout');\n const firstElement = navItems?.querySelector('.nav__item--is-overflown') as HTMLElement;\n if (firstElement) {\n firstElement.focus();\n }\n\n const transitionListener = () => {\n parent.classList.toggle('nav--toggled');\n navItems?.classList.remove('nav__items--fadeout');\n lastNavItem?.removeEventListener('transitionend', transitionListener);\n };\n\n lastNavItem?.addEventListener('transitionend', transitionListener);\n return parent;\n };\n\n const cleanUp: CleanUpPair[] = [];\n\n const toggle = document.querySelectorAll('.nav__toggle');\n toggle.forEach((button) => {\n const clickEvent = () => {\n const nav = toggleMenu(button as HTMLElement);\n const ariaExpanded = button.getAttribute('aria-expanded');\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n closeResponsiveNav(navElements, nav);\n };\n\n cleanUp.push({\n element: button,\n clickEvent,\n });\n\n button.addEventListener('click', clickEvent);\n });\n\n return cleanUp;\n};\n\nconst setResponsiveNav = (\n navElements: NodeListOf<Element>,\n navElement: Element,\n): SetResponsiveNavCleanUp => {\n const navToggledClass = 'nav--toggled';\n const navItemsClass = 'nav__items';\n // gitlab #117\n navElement.classList.remove(navToggledClass);\n const navItemsParent = navElement.querySelector(`.${navItemsClass}`);\n\n if (navItemsParent) {\n const navItems = navItemsParent.querySelectorAll('.nav__item');\n const isOverflownClass = 'nav__item--is-overflown';\n const hasOverflowClass = 'nav--has-overflow';\n const isActiveClass = 'nav__item--active';\n let hasOverflown = false;\n\n for (let i = navItems.length - 1; i >= 0; i -= 1) {\n const nav = navItems[i] as HTMLElement;\n const top = nav.offsetTop;\n\n if (top > 0) {\n nav.classList.add(isOverflownClass);\n navElement.classList.add(hasOverflowClass);\n hasOverflown = true;\n } else if (!nav.classList.contains(isActiveClass)) {\n nav.classList.remove(isOverflownClass);\n }\n }\n\n if (!hasOverflown) {\n navElement.classList.remove(hasOverflowClass);\n const isActive = navElement.querySelector(`.${isActiveClass}`);\n if (isActive) {\n isActive.classList.remove(isOverflownClass);\n }\n }\n }\n\n // gitlab #115\n const bodyClickEvent = (e: Event) => {\n if (!(e.target as HTMLElement).classList.contains('nav__toggle')\n && !isElementWithClassNameInEventPath(e as MouseEvent, navItemsClass)) {\n closeResponsiveNav(navElements);\n }\n };\n\n document.querySelector('body')?.addEventListener('click', bodyClickEvent);\n\n return {\n element: document.querySelector('body'),\n clickEvent: bodyClickEvent,\n };\n};\n\nconst closeSubNav = (buttons: NodeListOf<Element>, keepOpen: Element | null = null) => {\n const subNavClass = 'sub-nav--toggled';\n buttons.forEach((button) => {\n if (button !== keepOpen) {\n if (button?.parentElement?.classList.contains(subNavClass)) {\n (button as HTMLElement).focus();\n button.setAttribute('aria-expanded', 'false');\n }\n button?.parentElement?.classList.remove(subNavClass);\n }\n });\n};\n\nconst setSubNavToggle = (buttons: NodeListOf<Element>, button: Element): SetSubNavToggleCleanUp => {\n const subNavClass = 'sub-nav--toggled';\n const buttonClickEvent = () => {\n button?.parentElement?.classList.toggle(subNavClass);\n if (button?.parentElement?.classList.contains(subNavClass)) {\n button.setAttribute('aria-expanded', 'true');\n } else {\n button.setAttribute('aria-expanded', 'false');\n }\n closeSubNav(buttons, button);\n };\n\n button.addEventListener('click', buttonClickEvent);\n\n // gitlab #115\n const bodyClickEvent = (e: Event) => {\n if (!isElementWithClassNameInEventPath(e as MouseEvent, 'sub-nav')) {\n closeSubNav(buttons);\n }\n };\n\n document.querySelector('body')?.addEventListener('click', bodyClickEvent);\n return {\n buttonClickEvent,\n element: document.querySelector('body'),\n bodyClickEvent,\n };\n};\n\nconst setClickMessage = ((\n text: string,\n copyElement: Element,\n clickElement: Element | null,\n ctcThis: HTMLElement | null,\n listener: () => void,\n): void => {\n if (ctcThis && clickElement) {\n // Vi kopierer teksten til clipboard\n copyToClipboard(ctcThis.innerText);\n copyElement.classList.add('copy-to-clipboard--confirm');\n if (copyElement === clickElement) {\n copyElement.classList.add('copy-to-clipboard--done');\n }\n // Laver en span, der viser, at teksten er kopieret\n const ctcThisMessage = document.createElement('span');\n ctcThisMessage.classList.add('copy-to-clipboard__this__confirm-message');\n ctcThisMessage.innerText = text;\n ctcThis.appendChild(ctcThisMessage);\n\n // Efter 1,2 sekunder fjerner vi beskeden igen\n clickElement.removeEventListener('click', listener);\n setTimeout(() => {\n copyElement.classList.remove('copy-to-clipboard--confirm');\n ctcThisMessage.remove();\n clickElement.addEventListener('click', listener);\n }, 1200);\n }\n});\n\nconst setCopyToClipboard = (element: HTMLElement, text = 'Kopieret!'): void => {\n const ctcThis = <HTMLElement>element.querySelector('.copy-to-clipboard__this');\n // Hvis det er en knap, s\u00E5 s\u00E6tter vi click event p\u00E5 knappen\n if ((element as HTMLButtonElement).type === 'button') {\n const listener = (): void => {\n setClickMessage(text, element, element, ctcThis, listener);\n };\n element.addEventListener('click', listener);\n // Hvis det ikke er en knap, finder vi knappen \"inde i\" elementet\n } else {\n const btn = element.querySelector('.copy-to-clipboard__execute');\n const listener = (): void => {\n setClickMessage(text, element, btn, ctcThis, listener);\n };\n btn?.addEventListener('click', listener);\n }\n};\n\nconst setSearchToggle = (navSearch: Element, button: Element): void => {\n const toggleClass = 'nav__search--toggled';\n button.addEventListener('click', () => {\n if (navSearch.classList.contains(toggleClass)) {\n button.setAttribute('aria-expanded', 'false');\n navSearch.classList.remove(toggleClass);\n } else {\n button.setAttribute('aria-expanded', 'true');\n navSearch.classList.add(toggleClass);\n }\n });\n};\n\nexport {\n findNav,\n setResponsiveToggle,\n setResponsiveNav,\n setSubNavToggle,\n setCopyToClipboard,\n setSearchToggle,\n};\n", "/* eslint-disable import/prefer-default-export */\nconst setResponsiveTable = (table: Element): void => {\n const head = table.querySelector('thead');\n const body = table.querySelector('tbody');\n const foot = table.querySelector('tfoot');\n\n if (head) {\n const headers: string[] = [];\n const ths = head.querySelectorAll('th');\n ths.forEach((h) => {\n if (!h.classList.contains('table__cell--self-explanatory')) {\n headers.push(h.innerHTML); // Because innerText inherits stuff like text-transform\n } else {\n headers.push(''); // If header is self explanatory we do not add it\n }\n });\n\n const rowContainers: HTMLTableSectionElement[] = [];\n // Table elements that possibly contains <tr>'s\n if (body) {\n rowContainers.push(body);\n }\n if (foot) {\n rowContainers.push(foot);\n }\n\n rowContainers.forEach((rc) => {\n const rows = rc.querySelectorAll('tr');\n rows.forEach((tr) => {\n const cells = tr.querySelectorAll('td, th');\n cells.forEach((cell, i) => {\n if (headers[i]) {\n // if header is self explanatory we skip (value of array index is '' which is falsy)\n cell.setAttribute('data-label', headers[i]);\n }\n });\n });\n });\n }\n};\n\nexport {\n setResponsiveTable,\n};\n", "/* eslint-disable @typescript-eslint/no-empty-function */\n/* eslint-env browser */\n/* eslint-disable import/prefer-default-export */\n/* eslint-disable no-param-reassign */\nimport { getBaseFontSize } from './helpers';\n\nconst getMediaWidthBasedOnModifier = (classList: DOMTokenList): number => {\n if (classList.contains('tabbed-content--hide-tabs-on-medium-width')) {\n return parseInt(getComputedStyle(document.documentElement).getPropertyValue('--bp-medium').replace('rem', ''), 10);\n }\n if (classList.contains('tabbed-content--hide-tabs-on-wide-width')) {\n return parseInt(getComputedStyle(document.documentElement).getPropertyValue('--bp-wide').replace('rem', ''), 10);\n }\n\n return -1;\n};\n\nconst isBelowViewportLimit = (classList: DOMTokenList): boolean => {\n const viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n const widthInRem = viewportWidth / getBaseFontSize();\n const mediaWidth = getMediaWidthBasedOnModifier(classList);\n if (mediaWidth > -1) {\n return widthInRem < mediaWidth;\n }\n return true;\n};\n\nconst destroyTabs = (tabbed: Element): void => {\n const tablist = tabbed.querySelector('.nav__items');\n const tabs = tablist?.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n tabs?.forEach((tab) => {\n tab.removeAttribute('aria-selected');\n tab.classList.remove('nav__item--active');\n });\n\n panels.forEach((panel) => {\n panel.hidden = false;\n panel.removeAttribute('role');\n });\n};\n\nconst destroySwitches = (tabbed: Element): void => {\n const switchlist = tabbed.querySelector('.switch');\n const switches = switchlist?.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n switches?.forEach((tab) => {\n tab.removeAttribute('aria-selected');\n tab.classList.remove('switch__segment--active');\n });\n\n panels.forEach((panel) => {\n panel.hidden = false;\n panel.removeAttribute('role');\n });\n};\n\nconst switchTab = (\n tabs: NodeListOf<HTMLAnchorElement>,\n panels: HTMLElement[],\n oldTab: Element | null,\n newTab: HTMLElement,\n _: DOMTokenList,\n focus = true,\n // eslint-disable-next-line no-console\n callback = (index: number): void => console.log(index),\n): void => {\n if (focus) {\n newTab.focus();\n }\n // Make the active tab focusable by the user (Tab key)\n newTab.removeAttribute('tabindex');\n // Set the selected state\n newTab.setAttribute('aria-selected', 'true');\n\n // Check if switch // should this be more pretty?\n if (newTab.classList.contains('switch__segment')) {\n newTab.classList.add('switch__segment--active');\n } else {\n newTab.classList.add('nav__item--active');\n }\n\n if (oldTab) {\n oldTab.removeAttribute('aria-selected');\n oldTab.setAttribute('tabindex', '-1');\n\n if (oldTab.classList.contains('switch__segment')) {\n oldTab.classList.remove('switch__segment--active');\n } else {\n oldTab.classList.remove('nav__item--active');\n }\n }\n\n const index = Array.prototype.indexOf.call(tabs, newTab);\n\n // More links\n /* let moreLinks;\n var moreLink: HTMLElement;\n moreLinks = document.querySelectorAll(`[data-for=\"${panels[index].id}\"]`);\n moreLinks.forEach((moreLink) => {\n moreLink.classList.add('tabbed-content-peripheral--active');\n moreLink.hidden = false;\n }); */\n const moreLinks: HTMLElement[] = Array.from(document.querySelectorAll(`[data-for=\"${panels[index].id}\"]`));\n moreLinks.forEach((link) => {\n link.classList.add('tabbed-content-peripheral--active');\n link.hidden = false;\n });\n\n // Get the indices of the new and old tabs to find the correct\n // tab panels to show and hide\n panels[index].hidden = false;\n if (oldTab) {\n const oldIndex = Array.prototype.indexOf.call(tabs, oldTab);\n\n const oldMoreLinks: HTMLElement[] = Array.from(document.querySelectorAll(`[data-for=\"${panels[oldIndex].id}\"]`));\n oldMoreLinks.forEach((link) => {\n link.classList.remove('tabbed-content-peripheral--active');\n link.hidden = true;\n });\n\n /* moreLinks.forEach((moreLink) => {\n moreLink.classList.remove('tabbed-content-peripheral--active');\n moreLink.hidden = true;\n }); */\n\n panels[oldIndex].hidden = true;\n }\n\n // Dispatches custom event on every tab change\n newTab.dispatchEvent(new CustomEvent('switch-tab', {\n bubbles: true,\n detail: { tab: index },\n }));\n callback(index);\n};\n\nconst setTabbedContent = (\n key: number,\n tabbed: Element,\n initial = 0,\n focus = true,\n // eslint-disable-next-line no-console\n callback = (index: number) => console.log(index),\n): void => {\n const tablist = tabbed.querySelector('.switch,.nav__items') as HTMLElement;\n const tabs = tablist.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n\n const expandAll = tabbed.querySelector('button.tabbed-content__expand-all');\n if (expandAll) {\n const expandAllEvent = () => {\n tablist.hidden = true;\n panels.forEach((panel: HTMLElement) => {\n panel.hidden = false;\n });\n };\n\n expandAll.removeEventListener('click', expandAllEvent);\n expandAll.addEventListener('click', expandAllEvent);\n }\n\n // Add the tablist role to the first <ul> in the .tabbed container\n tablist.setAttribute('role', 'tablist');\n\n // Add semantics are remove user focusability for each tab\n tabs.forEach((tab, i) => {\n tab.setAttribute('role', 'tab');\n tab.setAttribute('id', `tab${key}_${(i + 1)}`);\n tab.setAttribute('tabindex', '-1');\n tab.parentElement?.setAttribute('role', 'presentation');\n\n // Handle clicking of tabs for mouse users\n const tabClickEvent = (e: MouseEvent) => {\n e.preventDefault();\n const currentTab = tablist.querySelector('[aria-selected]');\n if (e.currentTarget !== currentTab) {\n // eslint-disable-next-line max-len\n switchTab(tabs, panels, currentTab, e.currentTarget as HTMLElement, tabbed.classList, true, (tabIndex) => {\n callback(tabIndex);\n });\n }\n };\n\n tab.removeEventListener('click', tabClickEvent);\n tab.addEventListener('click', tabClickEvent);\n\n // Handle keydown events for keyboard users\n const tabKeyEvent = (e: KeyboardEvent) => {\n // Get the index of the current tab in the tabs node list\n const index = Array.prototype.indexOf.call(tabs, e.currentTarget);\n // Work out which key the user is pressing and\n // Calculate the new tab's index where appropriate\n let dir: number | string | null = null;\n if (e.key === 'ArrowLeft') {\n dir = index - 1;\n }\n if (e.key === 'ArrowRight') {\n dir = index + 1;\n }\n if (e.key === 'ArrowDown') {\n dir = 'down';\n }\n if (dir !== null) {\n e.preventDefault();\n // If the down key is pressed, move focus to the open panel,\n // otherwise switch to the adjacent tab\n if (dir === 'down') {\n panels[i].focus();\n } else if (tabs[dir]) {\n // eslint-disable-next-line max-len\n switchTab(tabs, panels, e.currentTarget as Element, tabs[dir], tabbed.classList, true, (tabIndex) => {\n callback(tabIndex);\n });\n }\n }\n };\n tab.removeEventListener('keydown', tabKeyEvent);\n tab.addEventListener('keydown', tabKeyEvent);\n });\n\n // Add tab panel semantics and hide them all\n panels.forEach((panel: HTMLElement, i: number) => {\n panel.setAttribute('tabindex', '-1');\n panel.setAttribute('aria-labelledby', tabs[i].id);\n // eslint-disable-next-line no-param-reassign\n panel.hidden = true;\n panel.setAttribute('role', 'tabpanel');\n });\n\n // Initially activate the first tab and reveal the first tab panel\n if (initial > -1) {\n switchTab(tabs, panels, null, tabs[initial], tabbed.classList, focus);\n }\n};\n\nconst setTabs = (tabbedObjects: ITabbedObject[]): void => {\n tabbedObjects.forEach((tabObject: ITabbedObject, key: number): void => {\n const { rendered, domElement } = tabObject;\n if (isBelowViewportLimit(domElement.classList)) {\n if (!rendered) {\n const focus = domElement.getAttribute('data-focus-onload');\n const dataInitial = domElement.getAttribute('data-initial-tab');\n const initial = dataInitial ? parseInt(dataInitial, 10) : 0;\n setTabbedContent(key, domElement, initial, focus !== 'false');\n tabObject.rendered = true;\n }\n } else if (rendered) {\n destroyTabs(domElement);\n tabObject.rendered = false;\n }\n });\n};\n\nexport {\n setTabbedContent,\n isBelowViewportLimit,\n destroyTabs,\n destroySwitches,\n setTabs,\n};\n", "/* eslint-disable max-len */\n/* eslint-env browser */\n/* eslint-disable import/prefer-default-export */\nconst setContentToggle = (\n content: Element,\n onClick?: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n beforeCallback?: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n afterCallback?: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n): CleanUpPair[] => {\n const cleanUp: CleanUpPair[] = [];\n const setContentClose = (button: HTMLElement, contentClose: HTMLElement, focus: boolean): () => void => {\n if (focus) {\n contentClose.focus();\n }\n const click = () => {\n content.setAttribute('hidden', 'hidden');\n button.removeAttribute('hidden');\n button.setAttribute('aria-expanded', 'false');\n button.focus();\n };\n contentClose.addEventListener('click', click);\n return click;\n };\n\n const button = content?.parentElement?.querySelector('.content-toggle__toggle') as HTMLElement;\n const contentClose = content.querySelectorAll('.content-toggle__close');\n\n if (button) {\n const clickEvent = () => {\n const ariaExpanded = button.getAttribute('aria-expanded');\n // Til toolbar: hvis man klikker p\u00E5 en knap, der ikke er foldet ud\n // S\u00E5 lukker vi alle \u00E5bne content-toggles\n if (typeof beforeCallback === 'function' && ariaExpanded === 'false') {\n beforeCallback(content as HTMLElement, button as HTMLButtonElement);\n }\n // Og s\u00E5 g\u00E5r vi i gang med folde-ud-logikken\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n if (ariaExpanded === 'true') {\n content.setAttribute('hidden', 'hidden');\n } else {\n content.removeAttribute('hidden');\n }\n\n if (typeof onClick === 'function') {\n onClick(content as HTMLElement, button as HTMLButtonElement);\n }\n\n if (button.hasAttribute('aria-haspopup')) {\n button.setAttribute('hidden', 'hidden');\n contentClose.forEach((cc) => {\n setContentClose(button, cc as HTMLElement, true);\n });\n }\n\n // Det der sker efter folde-logikken\n if (typeof afterCallback === 'function') {\n afterCallback(content as HTMLElement, button as HTMLButtonElement);\n }\n };\n\n button.addEventListener('click', clickEvent);\n // Altid tilf\u00F8j denne f\u00F8rst!\n cleanUp.push({\n element: button,\n clickEvent,\n });\n\n contentClose.forEach((cc) => {\n const btnClick = setContentClose(button, cc as HTMLElement, false);\n cleanUp.push({\n element: cc,\n clickEvent: btnClick,\n });\n });\n }\n return cleanUp;\n};\n\nexport {\n setContentToggle,\n};\n", "/* eslint-disable max-len */\nimport { convertRemToPixels, isElementWithClassNameInEventPath, isViewportBelow } from './helpers';\n\nconst lockBodyScroll = (): void => {\n const body = document.querySelector('body');\n if (isViewportBelow('--bp-medium') || isViewportBelow('--bp-low-height')) {\n body?.classList.add('body--no-scroll');\n }\n};\n\nconst unlockBodyScroll = (): void => {\n const body = document.querySelector('body');\n body?.classList.remove('body--no-scroll');\n};\n\n/* eslint-env browser */\nconst closeAllContentTogglesInToolbar = (toolbar: HTMLElement): void => {\n const contentToggles = toolbar.querySelectorAll('.content-toggle__toggle');\n contentToggles.forEach((toggle) => {\n const content = toggle.parentElement?.querySelector('.content-toggle__content');\n toggle.setAttribute('aria-expanded', 'false');\n content?.setAttribute('hidden', 'hidden');\n });\n};\n\nconst setOverflow = (toolbarElement: Element): void => {\n if (!toolbarElement.classList.contains('toolbar--no-collapse')) {\n toolbarElement.classList.remove('toolbar--toggled');\n }\n toolbarElement.classList.remove('toolbar--fully-overflown');\n toolbarElement.classList.remove('toolbar--has-popout');\n const toolbarItemsParent = toolbarElement.querySelector('.toolbar__items');\n const toolbarItems = toolbarItemsParent?.children as HTMLCollection;\n const isOverflownClass = 'toolbar__item--is-overflown';\n const hasOverflowClass = 'toolbar--has-overflow';\n let hasOverflown = false;\n\n let overflownCount = 0;\n const addOverflowClass = (item: HTMLElement, index: number) => {\n if (item) {\n const top = item.offsetTop;\n if (top > 25) {\n item.classList.add(isOverflownClass);\n toolbarElement.classList.add(hasOverflowClass);\n hasOverflown = true;\n overflownCount += 1;\n } else {\n item.classList.remove(isOverflownClass);\n }\n\n if (!hasOverflown) {\n toolbarElement.classList.remove(hasOverflowClass);\n } else if (index - 1 >= 0) {\n addOverflowClass(toolbarItems[index - 1] as HTMLElement, index - 1);\n }\n }\n };\n\n addOverflowClass(toolbarItems[toolbarItems.length - 1] as HTMLElement, toolbarItems.length - 1);\n\n if (overflownCount > 0 && overflownCount === toolbarItems.length) {\n toolbarElement.classList.add('toolbar--fully-overflown');\n }\n};\n\nconst setToolbarToggle = (toolbar: HTMLElement): ExtendedCleanUpPair[] => {\n const cleanUp: ExtendedCleanUpPair[] = [];\n const buttons = toolbar.querySelectorAll('.toolbar__toggle');\n buttons.forEach((button) => {\n const clickEvent = () => {\n button?.parentElement?.classList.toggle('toolbar--toggled');\n const ariaExpanded = button.getAttribute('aria-expanded');\n if (ariaExpanded !== 'true') {\n const focusable = 'a.toolbar__item--is-overflown, button.toolbar__item--is-overflown, input.toolbar__item--is-overflown, select.toolbar__item--is-overflown, .toolbar__item--is-overflown a, .toolbar__item--is-overflown button, .toolbar__item--is-overflown input, .toolbar__item--is-overflown select';\n const firstWithOverflow = button?.parentElement?.querySelector(focusable) as HTMLElement;\n if (firstWithOverflow) {\n setTimeout(() => {\n firstWithOverflow.focus();\n }, 0);\n }\n }\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n };\n\n cleanUp.push({\n element: button,\n clickEvent,\n });\n button.addEventListener('click', clickEvent);\n });\n return cleanUp;\n};\n\nconst setToolbar = (\n toolbar: HTMLElement,\n onCloseContentToggle: (toolbarElement: HTMLElement) => void,\n setOverflowOnly = true,\n): ExtendedCleanUpPair[] => {\n let cleanUp: ExtendedCleanUpPair[] = [];\n\n setOverflow(toolbar);\n onCloseContentToggle(toolbar);\n cleanUp = cleanUp.concat(setToolbarToggle(toolbar));\n\n if (!setOverflowOnly) {\n const bodyClickEvent = (event: Event) => {\n if (!(event.target as HTMLElement).classList.contains('content-toggle__toggle')\n && !isElementWithClassNameInEventPath(event as MouseEvent, 'content-toggle__content')) {\n onCloseContentToggle(toolbar);\n }\n };\n\n const escKeyEvent = (event: Event) => {\n if ((event as KeyboardEvent).key === 'Escape') {\n if (event.target && (event.target as HTMLElement).getAttribute('type') !== 'search') {\n onCloseContentToggle(toolbar);\n }\n }\n };\n\n const body = document.querySelector('body');\n\n cleanUp.push({\n element: body as Element,\n clickEvent: bodyClickEvent,\n });\n\n cleanUp.push({\n element: window,\n keyUpEvent: escKeyEvent,\n });\n\n body?.addEventListener('click', bodyClickEvent);\n window.addEventListener('keyup', escKeyEvent);\n }\n\n return cleanUp;\n};\n\nconst findToolbar = (element: HTMLElement): HTMLElement => {\n const parent = element.parentElement;\n if (parent) {\n if (parent.classList.contains('toolbar')) {\n return parent;\n }\n return findToolbar(parent);\n }\n return element;\n};\n\nconst contentToggleEdgeHandling = (element: HTMLElement): void => {\n if (!isViewportBelow('--bp-medium') && !isViewportBelow('--bp-low-height')) {\n const allowedDistance = convertRemToPixels(parseInt(getComputedStyle(document.documentElement).getPropertyValue('--toolbar-popout-allowed-edge-distance').replace('rem,', ''), 10));\n const popoutX = parseInt(getComputedStyle(element).width.replace('px', ''), 10);\n const popoutWidth = element.getBoundingClientRect().x;\n\n const distance = document.body.offsetWidth - allowedDistance - popoutX - popoutWidth;\n\n if (distance < 0) {\n element.style.setProperty('--toolbar-popout-edge-overflow', `${distance}px`);\n }\n }\n};\n\nexport {\n setToolbar,\n setOverflow,\n findToolbar,\n closeAllContentTogglesInToolbar,\n contentToggleEdgeHandling,\n lockBodyScroll,\n unlockBodyScroll,\n};\n", "// Scroller 80% p\u00E5 horisontal scroll til h\u00F8jre og s\u00E6tter knappen disabled n\u00E5r man rammer bunden\nconst horizontalScrollButtonNext = (nextButtons: NodeListOf<Element>): void => {\n if (nextButtons) {\n nextButtons.forEach((nextButton) => {\n const topElem = nextButton?.parentElement?.parentElement?.parentElement?.parentElement;\n if (topElem) {\n const scrollElements = topElem.querySelectorAll('.horizontal-scroll__scrollable-content');\n const switch__segments = topElem.querySelectorAll('.switch__segment');\n scrollElements.forEach((scrollElement) => { \n if (scrollElement) {\n nextButton.addEventListener('click', () => {\n // Scroller 80% af den synlige bredde p\u00E5 horizontal scroll til h\u00F8jre\n const scrollAmount = 0.8 * scrollElement.clientWidth;\n scrollElement.scrollLeft += scrollAmount;\n });\n // G\u00F8r knappen aktiv hvis scroll har ramt bunden\n scrollElement.addEventListener('scroll', () => {\n if ((scrollElement.scrollLeft + scrollElement.clientWidth) >= (scrollElement.scrollWidth * 0.98)) {\n disableButton(nextButton);\n } else if (scrollElement.scrollLeft + scrollElement.clientWidth < scrollElement.scrollWidth) {\n activateButton(nextButton);\n }\n });\n // Reset af knap ved flere tabs af horizontal scroll\n if (switch__segments) {\n switch__segments.forEach(switch__segment => {\n switch__segment.addEventListener('click', () => {\n activateButton(nextButton);\n scrollElement.scrollLeft = 0;\n })\n });\n }\n }\n });\n }\n });\n }\n };\n \n // Scroller 80% p\u00E5 horisontal scroll til venstre og s\u00E6tter knappen disabled n\u00E5r man rammer toppen\n const horizontalScrollButtonPrevious = (previousButtons: NodeListOf<Element>): void => {\n if (previousButtons) {\n previousButtons.forEach((previousButton) => {\n const topElem = previousButton?.parentElement?.parentElement?.parentElement?.parentElement;\n if (topElem) {\n const scrollElements = topElem.querySelectorAll('.horizontal-scroll__scrollable-content');\n const switch__segments = topElem.querySelectorAll('.switch__segment');\n scrollElements.forEach((scrollElement) => { \n if (scrollElement) {\n previousButton.addEventListener('click', () => {\n // Scroller 80% af den synlige bredde p\u00E5 horizontal scroll til venstre\n const scrollAmount = 0.8 * scrollElement.clientWidth;\n scrollElement.scrollLeft -= scrollAmount;\n });\n // G\u00F8r knappen aktiv hvis scroll har ramt toppen\n scrollElement.addEventListener('scroll', () => {\n if (scrollElement.scrollLeft <= 0) {\n disableButton(previousButton);\n } else if (scrollElement.scrollLeft > 0) {\n activateButton(previousButton);\n }\n });\n }\n // Reset af knap ved flere tabs af horizontal scroll\n if (switch__segments) {\n switch__segments.forEach(switch__segment => {\n switch__segment.addEventListener('click', () => {\n disableButton(previousButton);\n });\n });\n }\n });\n }\n });\n }\n };\n\n function activateButton(button) {\n button.classList.remove('visually-disabled');\n button.setAttribute('aria-disabled', 'false');\n }\n \n function disableButton(button) {\n button.classList.add('visually-disabled');\n button.setAttribute('aria-disabled', 'true');\n }\n\n export {\n horizontalScrollButtonNext,\n horizontalScrollButtonPrevious,\n };", "/* eslint-disable no-param-reassign */\n/* eslint-env browser */\nimport ready from '../components/ready';\nimport {\n setResponsiveNav,\n setResponsiveToggle,\n} from '../components/nav';\nimport { isElementWithClassNameInEventPath, setMetaThemeColor } from '../components/helpers';\nimport { setResponsiveTable } from '../components/table';\nimport { setTabs } from '../components/tabs';\nimport { setContentToggle } from '../components/content-toggle';\nimport {\n closeAllContentTogglesInToolbar,\n contentToggleEdgeHandling,\n findToolbar,\n lockBodyScroll,\n unlockBodyScroll,\n} from '../components/toolbar';\nimport { horizontalScrollButtonNext, horizontalScrollButtonPrevious } from '../components/horizontal-scroll-btn';\n\nlet windowInnerWidth = 0;\n\nready(() => {\n const tabbedContent = document.querySelectorAll('.tabbed-content');\n const tabbedObjects: ITabbedObject[] = [];\n tabbedContent.forEach((tab) => tabbedObjects.push({\n domElement: tab,\n rendered: false,\n }));\n setTabs(tabbedObjects);\n setMetaThemeColor();\n\n const navElements = document.querySelectorAll('.nav:not(.nav--vertical)');\n navElements.forEach((n) => setResponsiveNav(navElements, n));\n setResponsiveToggle(navElements);\n\n const tables = document.querySelectorAll('.table--wrap-medium-width, .table--wrap-default-width');\n tables.forEach((table) => setResponsiveTable(table));\n\n // Almindelige content toggles\n const toggles = document.querySelectorAll('.box .content-toggle__content, .profile-header .content-toggle__content, .design-documentation .content-toggle__content');\n toggles.forEach((toggle) => {\n setContentToggle(toggle);\n });\n\n // Hortizontal scroll buttons\n const scrollButtonsNext = document.querySelectorAll('.button.button--small.button--icon.button--icon--hide-label.icon-next');\n const scrollButtonsPrevious = document.querySelectorAll('.button.button--small.button--icon.button--icon--hide-label.icon-previous');\n horizontalScrollButtonNext(scrollButtonsNext);\n horizontalScrollButtonPrevious(scrollButtonsPrevious);\n\n // Kursuskatalog\n const togglesInToolbars = document.querySelectorAll('.toolbar .content-toggle__content');\n togglesInToolbars.forEach((toggle) => {\n setContentToggle(\n toggle,\n (popout: HTMLElement) => {\n contentToggleEdgeHandling(popout);\n lockBodyScroll();\n },\n (content: HTMLElement) => closeAllContentTogglesInToolbar(findToolbar(content)),\n (content: HTMLElement, button: HTMLButtonElement) => {\n const ariaExpanded = button.getAttribute('aria-expanded');\n const toolbar = findToolbar(content);\n if (ariaExpanded === 'true') {\n toolbar?.classList.add('toolbar--has-popout');\n } else {\n toolbar?.classList.remove('toolbar--has-popout');\n }\n\n content.addEventListener('click', (event: MouseEvent) => {\n if ((event.target as HTMLElement).classList.contains('toolbar__popout')\n && !isElementWithClassNameInEventPath(event as MouseEvent, 'toolbar__filter__content')) {\n closeAllContentTogglesInToolbar(toolbar);\n unlockBodyScroll();\n }\n });\n },\n );\n });\n\n window.addEventListener('load', () => {\n windowInnerWidth = window.innerWidth;\n });\n\n window.addEventListener('resize', () => {\n if (windowInnerWidth > 0 && window.innerWidth !== windowInnerWidth) {\n windowInnerWidth = window.innerWidth;\n navElements.forEach((n) => setResponsiveNav(navElements, n));\n setTabs(tabbedObjects);\n }\n });\n});\n"],
|
|
5
|
-
"mappings": "MACA,IAAMA,EAASC,GAAyB,CAClC,SAAS,aAAe,UAC1BA,EAAG,EAEH,SAAS,iBAAiB,mBAAoBA,CAAE,CAEpD,EAEOC,EAAQF,ECDf,IAAMG,EAAoC,CAACC,EAAmBC,IAA+B,CAC3F,IAAIC,EAAQ,GAEZ,OADaF,EAAM,aAAa,EAC3B,QAASG,GAAyB,CAChCA,EAAkB,WAChBA,EAAkB,UAAU,SAASF,CAAS,IACjDC,EAAQ,GAGd,CAAC,EACMA,CACT,EAEME,EAAoB,IAAY,CACpC,IAAMC,EAAO,SAAS,cAAc,MAAM,EAC1C,GAAIA,EAAM,CACR,IAAMC,EAAU,OAAO,iBAAiBD,CAAI,EAAE,iBAAiB,oBAAoB,EAC7EE,EAAe,SAAS,cAAc,0BAA0B,EACtE,GAAIA,EACFA,EAAa,QAAUD,MAClB,CACL,IAAME,EAAO,SAAS,cAAc,MAAM,EAC1CA,EAAK,KAAO,cACZA,EAAK,QAAUF,EACf,SAAS,qBAAqB,MAAM,EAAE,CAAC,EAAE,YAAYE,CAAI,CAC3D,CACF,CACF,EAEMC,EAAkB,IAAc,SAAS,OAAO,iBAAiB,SAAS,eAAe,EAAE,SAAS,QAAQ,KAAM,EAAE,EAAG,EAAE,EAGzHC,EAAsBC,GAAwBA,EAAM,WAAW,iBAAiB,SAAS,eAAe,EAAE,QAAQ,EAElHC,EAAmBC,GAAgC,CACvD,IAAMC,EAAgB,KAAK,IAAI,SAAS,gBAAgB,aAAe,EAAG,OAAO,YAAc,CAAC,EAC1FC,EAAk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AAO,UAC5B,CAAC,EAED,OAAO,iBAAiB,SAAU,IAAM,CAClCA,EAAmB,GAAK,OAAO,aAAeA,IAChDA,EAAmB,OAAO,WAC1BO,EAAY,QAASC,GAAMC,EAAiBF,EAAaC,CAAC,CAAC,EAC3DH,EAAQF,CAAa,EAEzB,CAAC,CACH,CAAC",
|
|
6
|
-
"names": ["ready", "fn", "ready_default", "isElementWithClassNameInEventPath", "event", "className", "found", "p", "setMetaThemeColor", "body", "bgColor", "existingMeta", "meta", "getBaseFontSize", "convertRemToPixels", "rem", "isViewportBelow", "mediaQuery", "viewportWidth", "mediaQueryValue", "findNav", "element", "parent", "closeResponsiveNav", "navElements", "keepOpen", "navToggledClass", "n", "button", "setResponsiveToggle", "toggleMenu", "navItems", "lastNavItem", "firstElement", "transitionListener", "cleanUp", "clickEvent", "nav", "ariaExpanded", "setResponsiveNav", "navElement", "navItemsClass", "navItemsParent", "isOverflownClass", "hasOverflowClass", "isActiveClass", "hasOverflown", "i", "isActive", "bodyClickEvent", "e", "isElementWithClassNameInEventPath", "setResponsiveTable", "table", "head", "body", "foot", "headers", "h", "rowContainers", "rc", "tr", "cell", "i", "getMediaWidthBasedOnModifier", "classList", "isBelowViewportLimit", "widthInRem", "getBaseFontSize", "mediaWidth", "destroyTabs", "tabbed", "tabs", "panels", "section", "tab", "panel", "switchTab", "tabs", "panels", "oldTab", "newTab", "_", "focus", "callback", "index", "link", "oldIndex", "setTabbedContent", "key", "tabbed", "initial", "tablist", "section", "expandAll", "expandAllEvent", "panel", "tab", "i", "tabClickEvent", "e", "currentTab", "tabIndex", "tabKeyEvent", "dir", "setTabs", "tabbedObjects", "tabObject", "rendered", "domElement", "isBelowViewportLimit", "dataInitial", "destroyTabs", "setContentToggle", "content", "onClick", "beforeCallback", "afterCallback", "cleanUp", "setContentClose", "button", "contentClose", "focus", "click", "clickEvent", "ariaExpanded", "cc", "btnClick", "lockBodyScroll", "body", "isViewportBelow", "unlockBodyScroll", "closeAllContentTogglesInToolbar", "toolbar", "toggle", "content", "findToolbar", "element", "parent", "contentToggleEdgeHandling", "isViewportBelow", "allowedDistance", "convertRemToPixels", "popoutX", "popoutWidth", "distance", "horizontalScrollButtonNext", "nextButtons", "nextButton", "topElem", "scrollElements", "switch__segments", "scrollElement", "scrollAmount", "disableButton", "activateButton", "switch__segment", "horizontalScrollButtonPrevious", "previousButtons", "previousButton", "button", "windowInnerWidth", "ready_default", "tabbedContent", "tabbedObjects", "tab", "setTabs", "setMetaThemeColor", "navElements", "n", "setResponsiveNav", "setResponsiveToggle", "table", "setResponsiveTable", "toggle", "setContentToggle", "scrollButtonsNext", "scrollButtonsPrevious", "horizontalScrollButtonNext", "horizontalScrollButtonPrevious", "popout", "contentToggleEdgeHandling", "lockBodyScroll", "content", "closeAllContentTogglesInToolbar", "findToolbar", "button", "ariaExpanded", "toolbar", "event", "isElementWithClassNameInEventPath", "unlockBodyScroll"]
|
|
4
|
+
"sourcesContent": ["/* eslint-env browser */\nconst ready = (fn: () => void): void => {\n if (document.readyState !== 'loading') {\n fn();\n } else {\n document.addEventListener('DOMContentLoaded', fn);\n }\n};\n\nexport default ready;\n", "/* eslint-disable wrap-iife */\n/* eslint-disable import/prefer-default-export */\n/* eslint-env browser */\nconst copyToClipboard = (str: string): void => {\n // eslint-disable-next-line no-console\n navigator.clipboard.writeText(str).then(() => console.log(`${str} written to clipboard`));\n};\n\nconst isElementWithClassNameInEventPath = (event: MouseEvent, className: string): boolean => {\n let found = false;\n const path = event.composedPath();\n path.forEach((p: EventTarget): void => {\n if ((p as HTMLElement).classList) {\n if ((p as HTMLElement).classList.contains(className)) {\n found = true;\n }\n }\n });\n return found;\n};\n\nconst setMetaThemeColor = (): void => {\n const body = document.querySelector('body');\n if (body) {\n const bgColor = window.getComputedStyle(body).getPropertyValue('--color-background');\n const existingMeta = document.querySelector('meta[name=\"theme-color\"]') as HTMLMetaElement;\n if (existingMeta) {\n existingMeta.content = bgColor;\n } else {\n const meta = document.createElement('meta');\n meta.name = 'theme-color';\n meta.content = bgColor;\n document.getElementsByTagName('head')[0].appendChild(meta);\n }\n }\n};\n\nconst getBaseFontSize = (): number => parseInt(window.getComputedStyle(document.documentElement).fontSize.replace('px', ''), 10);\n\n// eslint-disable-next-line max-len\nconst convertRemToPixels = (rem: number): number => rem * parseFloat(getComputedStyle(document.documentElement).fontSize);\n\nconst isViewportBelow = (mediaQuery: string): boolean => {\n const viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n const mediaQueryValue = convertRemToPixels(parseInt(getComputedStyle(document.documentElement).getPropertyValue(mediaQuery).replace('rem', ''), 10));\n return viewportWidth < mediaQueryValue;\n};\n\nconst setScrollbarWidthVariable = (): void => {\n const scrollbarWidth = window.innerWidth - document.body.clientWidth;\n document.documentElement.style.setProperty('--vertical-scrollbar-width', `${scrollbarWidth}px`);\n};\n\nconst overflowsY = (element: HTMLElement): boolean => element.offsetHeight !== element.scrollHeight;\nconst overflowsX = (element: HTMLElement): boolean => element.offsetWidth !== element.scrollWidth;\n// eslint-disable-next-line max-len\nconst elementOverflows = (element: HTMLElement): boolean => overflowsY(element) || overflowsX(element);\n\nconst setHorizontalScroll = (element: HTMLElement): void => {\n // Checks if the element already contains no-overflow\n if (element.classList.contains('horizontal-scroll--no-overflow')) {\n element.classList.remove('horizontal-scroll--no-overflow');\n }\n\n // Defines of content of horizontal scroll \n let content = element.querySelector('.horizontal-scroll--check-overflow .tabbed-content__section:not([hidden]) .horizontal-scroll__scrollable-content');\n if (content === null && !content) {\n content = element.querySelector('.horizontal-scroll--check-overflow .horizontal-scroll__scrollable-content');\n }\n\n // Checks if no-overflow should be added or not depending on content width\n if (content) {\n if (!overflowsX(content as HTMLElement)) {\n element.classList.add('horizontal-scroll--no-overflow');\n content?.removeAttribute('tabindex');\n } else {\n content?.setAttribute('tabindex', '0');\n }\n }\n};\n\nconst focusableSelector = 'a[href]:not([tabindex=\"-1\"]), area[href]:not([tabindex=\"-1\"]), input:not([disabled]):not([tabindex=\"-1\"]), select:not([disabled]):not([tabindex=\"-1\"]), textarea:not([disabled]):not([tabindex=\"-1\"]), button:not([disabled]):not([tabindex=\"-1\"]), iframe:not([tabindex=\"-1\"]), [tabindex]:not([tabindex=\"-1\"]), [contentEditable=true]:not([tabindex=\"-1\"])';\n\nexport {\n copyToClipboard,\n isElementWithClassNameInEventPath,\n getBaseFontSize,\n setMetaThemeColor,\n isViewportBelow,\n convertRemToPixels,\n setScrollbarWidthVariable,\n overflowsX,\n overflowsY,\n elementOverflows,\n setHorizontalScroll,\n focusableSelector,\n};\n", "/* eslint-env browser */\nimport { copyToClipboard, isElementWithClassNameInEventPath } from './helpers';\n\nconst findNav = (element: HTMLElement): HTMLElement => {\n const parent = element.parentElement;\n if (parent) {\n if (parent.classList.contains('nav')) {\n return parent;\n }\n return findNav(parent);\n }\n return element;\n};\n\n// eslint-disable-next-line max-len\nconst closeResponsiveNav = (navElements: NodeListOf<Element>, keepOpen: HTMLElement | null = null): void => {\n const navToggledClass = 'nav--toggled';\n navElements.forEach((n) => {\n const button = n.querySelector('.nav__toggle') as HTMLElement;\n if (n !== keepOpen) {\n if (n.classList.contains(navToggledClass)) {\n button.focus();\n button.setAttribute('aria-expanded', 'false');\n }\n n.classList.remove(navToggledClass);\n }\n });\n};\n\nconst setResponsiveToggle = (navElements: NodeListOf<Element>): CleanUpPair[] => {\n const toggleMenu = (button: HTMLElement) => {\n const parent = findNav(button);\n\n const navItems = parent.querySelector('.nav__items');\n const lastNavItem = navItems?.querySelector('.nav__item:last-of-type');\n navItems?.classList.add('nav__items--fadeout');\n const firstElement = navItems?.querySelector('.nav__item--is-overflown') as HTMLElement;\n if (firstElement) {\n firstElement.focus();\n }\n\n const transitionListener = () => {\n parent.classList.toggle('nav--toggled');\n navItems?.classList.remove('nav__items--fadeout');\n lastNavItem?.removeEventListener('transitionend', transitionListener);\n };\n\n lastNavItem?.addEventListener('transitionend', transitionListener);\n return parent;\n };\n\n const cleanUp: CleanUpPair[] = [];\n\n const toggle = document.querySelectorAll('.nav__toggle');\n toggle.forEach((button) => {\n const clickEvent = () => {\n const nav = toggleMenu(button as HTMLElement);\n const ariaExpanded = button.getAttribute('aria-expanded');\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n closeResponsiveNav(navElements, nav);\n };\n\n cleanUp.push({\n element: button,\n clickEvent,\n });\n\n button.addEventListener('click', clickEvent);\n });\n\n return cleanUp;\n};\n\nconst setResponsiveNav = (\n navElements: NodeListOf<Element>,\n navElement: Element,\n): SetResponsiveNavCleanUp => {\n const navToggledClass = 'nav--toggled';\n const navItemsClass = 'nav__items';\n // gitlab #117\n navElement.classList.remove(navToggledClass);\n const navItemsParent = navElement.querySelector(`.${navItemsClass}`);\n\n if (navItemsParent) {\n const navItems = navItemsParent.querySelectorAll('.nav__item');\n const isOverflownClass = 'nav__item--is-overflown';\n const hasOverflowClass = 'nav--has-overflow';\n const isActiveClass = 'nav__item--active';\n let hasOverflown = false;\n\n for (let i = navItems.length - 1; i >= 0; i -= 1) {\n const nav = navItems[i] as HTMLElement;\n const top = nav.offsetTop;\n\n if (top > 0) {\n nav.classList.add(isOverflownClass);\n navElement.classList.add(hasOverflowClass);\n hasOverflown = true;\n } else if (!nav.classList.contains(isActiveClass)) {\n nav.classList.remove(isOverflownClass);\n }\n }\n\n if (!hasOverflown) {\n navElement.classList.remove(hasOverflowClass);\n const isActive = navElement.querySelector(`.${isActiveClass}`);\n if (isActive) {\n isActive.classList.remove(isOverflownClass);\n }\n }\n }\n\n // gitlab #115\n const bodyClickEvent = (e: Event) => {\n if (!(e.target as HTMLElement).classList.contains('nav__toggle')\n && !isElementWithClassNameInEventPath(e as MouseEvent, navItemsClass)) {\n closeResponsiveNav(navElements);\n }\n };\n\n document.querySelector('body')?.addEventListener('click', bodyClickEvent);\n\n return {\n element: document.querySelector('body'),\n clickEvent: bodyClickEvent,\n };\n};\n\nconst closeSubNav = (buttons: NodeListOf<Element>, keepOpen: Element | null = null) => {\n const subNavClass = 'sub-nav--toggled';\n buttons.forEach((button) => {\n if (button !== keepOpen) {\n if (button?.parentElement?.classList.contains(subNavClass)) {\n (button as HTMLElement).focus();\n button.setAttribute('aria-expanded', 'false');\n }\n button?.parentElement?.classList.remove(subNavClass);\n }\n });\n};\n\nconst setSubNavToggle = (buttons: NodeListOf<Element>, button: Element): SetSubNavToggleCleanUp => {\n const subNavClass = 'sub-nav--toggled';\n const buttonClickEvent = () => {\n button?.parentElement?.classList.toggle(subNavClass);\n if (button?.parentElement?.classList.contains(subNavClass)) {\n button.setAttribute('aria-expanded', 'true');\n } else {\n button.setAttribute('aria-expanded', 'false');\n }\n closeSubNav(buttons, button);\n };\n\n button.addEventListener('click', buttonClickEvent);\n\n // gitlab #115\n const bodyClickEvent = (e: Event) => {\n if (!isElementWithClassNameInEventPath(e as MouseEvent, 'sub-nav')) {\n closeSubNav(buttons);\n }\n };\n\n document.querySelector('body')?.addEventListener('click', bodyClickEvent);\n return {\n buttonClickEvent,\n element: document.querySelector('body'),\n bodyClickEvent,\n };\n};\n\nconst setClickMessage = ((\n text: string,\n copyElement: Element,\n clickElement: Element | null,\n ctcThis: HTMLElement | null,\n listener: () => void,\n): void => {\n if (ctcThis && clickElement) {\n // Vi kopierer teksten til clipboard\n copyToClipboard(ctcThis.innerText);\n copyElement.classList.add('copy-to-clipboard--confirm');\n if (copyElement === clickElement) {\n copyElement.classList.add('copy-to-clipboard--done');\n }\n // Laver en span, der viser, at teksten er kopieret\n const ctcThisMessage = document.createElement('span');\n ctcThisMessage.classList.add('copy-to-clipboard__this__confirm-message');\n ctcThisMessage.innerText = text;\n ctcThis.appendChild(ctcThisMessage);\n\n // Efter 1,2 sekunder fjerner vi beskeden igen\n clickElement.removeEventListener('click', listener);\n setTimeout(() => {\n copyElement.classList.remove('copy-to-clipboard--confirm');\n ctcThisMessage.remove();\n clickElement.addEventListener('click', listener);\n }, 1200);\n }\n});\n\nconst setCopyToClipboard = (element: HTMLElement, text = 'Kopieret!'): void => {\n const ctcThis = <HTMLElement>element.querySelector('.copy-to-clipboard__this');\n // Hvis det er en knap, s\u00E5 s\u00E6tter vi click event p\u00E5 knappen\n if ((element as HTMLButtonElement).type === 'button') {\n const listener = (): void => {\n setClickMessage(text, element, element, ctcThis, listener);\n };\n element.addEventListener('click', listener);\n // Hvis det ikke er en knap, finder vi knappen \"inde i\" elementet\n } else {\n const btn = element.querySelector('.copy-to-clipboard__execute');\n const listener = (): void => {\n setClickMessage(text, element, btn, ctcThis, listener);\n };\n btn?.addEventListener('click', listener);\n }\n};\n\nconst setSearchToggle = (navSearch: Element, button: Element): void => {\n const toggleClass = 'nav__search--toggled';\n button.addEventListener('click', () => {\n if (navSearch.classList.contains(toggleClass)) {\n button.setAttribute('aria-expanded', 'false');\n navSearch.classList.remove(toggleClass);\n } else {\n button.setAttribute('aria-expanded', 'true');\n navSearch.classList.add(toggleClass);\n }\n });\n};\n\nexport {\n findNav,\n setResponsiveToggle,\n setResponsiveNav,\n setSubNavToggle,\n setCopyToClipboard,\n setSearchToggle,\n};\n", "/* eslint-disable import/prefer-default-export */\nconst setResponsiveTable = (table: Element): void => {\n const head = table.querySelector('thead');\n const body = table.querySelector('tbody');\n const foot = table.querySelector('tfoot');\n\n if (head) {\n const headers: string[] = [];\n const ths = head.querySelectorAll('th');\n ths.forEach((h) => {\n if (!h.classList.contains('table__cell--self-explanatory')) {\n headers.push(h.innerHTML); // Because innerText inherits stuff like text-transform\n } else {\n headers.push(''); // If header is self explanatory we do not add it\n }\n });\n\n const rowContainers: HTMLTableSectionElement[] = [];\n // Table elements that possibly contains <tr>'s\n if (body) {\n rowContainers.push(body);\n }\n if (foot) {\n rowContainers.push(foot);\n }\n\n rowContainers.forEach((rc) => {\n const rows = rc.querySelectorAll('tr');\n rows.forEach((tr) => {\n const cells = tr.querySelectorAll('td, th');\n cells.forEach((cell, i) => {\n if (headers[i]) {\n // if header is self explanatory we skip (value of array index is '' which is falsy)\n cell.setAttribute('data-label', headers[i]);\n }\n });\n });\n });\n }\n};\n\nexport {\n setResponsiveTable,\n};\n", "/* eslint-disable @typescript-eslint/no-empty-function */\n/* eslint-env browser */\n/* eslint-disable import/prefer-default-export */\n/* eslint-disable no-param-reassign */\nimport { getBaseFontSize } from './helpers';\n\nconst getMediaWidthBasedOnModifier = (classList: DOMTokenList): number => {\n if (classList.contains('tabbed-content--hide-tabs-on-medium-width')) {\n return parseInt(getComputedStyle(document.documentElement).getPropertyValue('--bp-medium').replace('rem', ''), 10);\n }\n if (classList.contains('tabbed-content--hide-tabs-on-wide-width')) {\n return parseInt(getComputedStyle(document.documentElement).getPropertyValue('--bp-wide').replace('rem', ''), 10);\n }\n\n return -1;\n};\n\nconst isBelowViewportLimit = (classList: DOMTokenList): boolean => {\n const viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n const widthInRem = viewportWidth / getBaseFontSize();\n const mediaWidth = getMediaWidthBasedOnModifier(classList);\n if (mediaWidth > -1) {\n return widthInRem < mediaWidth;\n }\n return true;\n};\n\nconst destroyTabs = (tabbed: Element): void => {\n const tablist = tabbed.querySelector('.nav__items');\n const tabs = tablist?.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n tabs?.forEach((tab) => {\n tab.removeAttribute('aria-selected');\n tab.classList.remove('nav__item--active');\n });\n\n panels.forEach((panel) => {\n panel.hidden = false;\n panel.removeAttribute('role');\n });\n};\n\nconst destroySwitches = (tabbed: Element): void => {\n const switchlist = tabbed.querySelector('.switch');\n const switches = switchlist?.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n switches?.forEach((tab) => {\n tab.removeAttribute('aria-selected');\n tab.classList.remove('switch__segment--active');\n });\n\n panels.forEach((panel) => {\n panel.hidden = false;\n panel.removeAttribute('role');\n });\n};\n\nconst switchTab = (\n tabs: NodeListOf<HTMLAnchorElement>,\n panels: HTMLElement[],\n oldTab: Element | null,\n newTab: HTMLElement,\n _: DOMTokenList,\n focus = true,\n // eslint-disable-next-line no-console\n callback = (index: number): void => console.log(index),\n): void => {\n if (focus) {\n newTab.focus();\n }\n // Make the active tab focusable by the user (Tab key)\n newTab.removeAttribute('tabindex');\n // Set the selected state\n newTab.setAttribute('aria-selected', 'true');\n\n // Check if switch // should this be more pretty?\n if (newTab.classList.contains('switch__segment')) {\n newTab.classList.add('switch__segment--active');\n } else {\n newTab.classList.add('nav__item--active');\n }\n\n if (oldTab) {\n oldTab.removeAttribute('aria-selected');\n oldTab.setAttribute('tabindex', '-1');\n\n if (oldTab.classList.contains('switch__segment')) {\n oldTab.classList.remove('switch__segment--active');\n } else {\n oldTab.classList.remove('nav__item--active');\n }\n }\n\n const index = Array.prototype.indexOf.call(tabs, newTab);\n\n // More links\n /* let moreLinks;\n var moreLink: HTMLElement;\n moreLinks = document.querySelectorAll(`[data-for=\"${panels[index].id}\"]`);\n moreLinks.forEach((moreLink) => {\n moreLink.classList.add('tabbed-content-peripheral--active');\n moreLink.hidden = false;\n }); */\n const moreLinks: HTMLElement[] = Array.from(document.querySelectorAll(`[data-for=\"${panels[index].id}\"]`));\n moreLinks.forEach((link) => {\n link.classList.add('tabbed-content-peripheral--active');\n link.hidden = false;\n });\n\n // Get the indices of the new and old tabs to find the correct\n // tab panels to show and hide\n panels[index].hidden = false;\n if (oldTab) {\n const oldIndex = Array.prototype.indexOf.call(tabs, oldTab);\n\n const oldMoreLinks: HTMLElement[] = Array.from(document.querySelectorAll(`[data-for=\"${panels[oldIndex].id}\"]`));\n oldMoreLinks.forEach((link) => {\n link.classList.remove('tabbed-content-peripheral--active');\n link.hidden = true;\n });\n\n /* moreLinks.forEach((moreLink) => {\n moreLink.classList.remove('tabbed-content-peripheral--active');\n moreLink.hidden = true;\n }); */\n\n panels[oldIndex].hidden = true;\n }\n\n // Dispatches custom event on every tab change\n newTab.dispatchEvent(new CustomEvent('switch-tab', {\n bubbles: true,\n detail: { tab: index },\n }));\n callback(index);\n};\n\nconst setTabbedContent = (\n key: number,\n tabbed: Element,\n initial = 0,\n focus = true,\n // eslint-disable-next-line no-console\n callback = (index: number) => console.log(index),\n): void => {\n const tablist = tabbed.querySelector('.switch,.nav__items') as HTMLElement;\n const tabs = tablist.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n\n const expandAll = tabbed.querySelector('button.tabbed-content__expand-all');\n if (expandAll) {\n const expandAllEvent = () => {\n tablist.hidden = true;\n panels.forEach((panel: HTMLElement) => {\n panel.hidden = false;\n });\n };\n\n expandAll.removeEventListener('click', expandAllEvent);\n expandAll.addEventListener('click', expandAllEvent);\n }\n\n // Add the tablist role to the first <ul> in the .tabbed container\n tablist.setAttribute('role', 'tablist');\n\n // Add semantics are remove user focusability for each tab\n tabs.forEach((tab, i) => {\n tab.setAttribute('role', 'tab');\n tab.setAttribute('id', `tab${key}_${(i + 1)}`);\n tab.setAttribute('tabindex', '-1');\n tab.parentElement?.setAttribute('role', 'presentation');\n\n // Handle clicking of tabs for mouse users\n const tabClickEvent = (e: MouseEvent) => {\n e.preventDefault();\n const currentTab = tablist.querySelector('[aria-selected]');\n if (e.currentTarget !== currentTab) {\n // eslint-disable-next-line max-len\n switchTab(tabs, panels, currentTab, e.currentTarget as HTMLElement, tabbed.classList, true, (tabIndex) => {\n callback(tabIndex);\n });\n }\n };\n\n tab.removeEventListener('click', tabClickEvent);\n tab.addEventListener('click', tabClickEvent);\n\n // Handle keydown events for keyboard users\n const tabKeyEvent = (e: KeyboardEvent) => {\n // Get the index of the current tab in the tabs node list\n const index = Array.prototype.indexOf.call(tabs, e.currentTarget);\n // Work out which key the user is pressing and\n // Calculate the new tab's index where appropriate\n let dir: number | string | null = null;\n if (e.key === 'ArrowLeft') {\n dir = index - 1;\n }\n if (e.key === 'ArrowRight') {\n dir = index + 1;\n }\n if (e.key === 'ArrowDown') {\n dir = 'down';\n }\n if (dir !== null) {\n e.preventDefault();\n // If the down key is pressed, move focus to the open panel,\n // otherwise switch to the adjacent tab\n if (dir === 'down') {\n panels[i].focus();\n } else if (tabs[dir]) {\n // eslint-disable-next-line max-len\n switchTab(tabs, panels, e.currentTarget as Element, tabs[dir], tabbed.classList, true, (tabIndex) => {\n callback(tabIndex);\n });\n }\n }\n };\n tab.removeEventListener('keydown', tabKeyEvent);\n tab.addEventListener('keydown', tabKeyEvent);\n });\n\n // Add tab panel semantics and hide them all\n panels.forEach((panel: HTMLElement, i: number) => {\n panel.setAttribute('tabindex', '-1');\n panel.setAttribute('aria-labelledby', tabs[i].id);\n // eslint-disable-next-line no-param-reassign\n panel.hidden = true;\n panel.setAttribute('role', 'tabpanel');\n });\n\n // Initially activate the first tab and reveal the first tab panel\n if (initial > -1) {\n switchTab(tabs, panels, null, tabs[initial], tabbed.classList, focus);\n }\n};\n\nconst setTabs = (tabbedObjects: ITabbedObject[]): void => {\n tabbedObjects.forEach((tabObject: ITabbedObject, key: number): void => {\n const { rendered, domElement } = tabObject;\n if (isBelowViewportLimit(domElement.classList)) {\n if (!rendered) {\n const focus = domElement.getAttribute('data-focus-onload');\n const dataInitial = domElement.getAttribute('data-initial-tab');\n const initial = dataInitial ? parseInt(dataInitial, 10) : 0;\n setTabbedContent(key, domElement, initial, focus !== 'false');\n tabObject.rendered = true;\n }\n } else if (rendered) {\n destroyTabs(domElement);\n tabObject.rendered = false;\n }\n });\n};\n\nexport {\n setTabbedContent,\n isBelowViewportLimit,\n destroyTabs,\n destroySwitches,\n setTabs,\n};\n", "/* eslint-disable max-len */\n/* eslint-env browser */\n/* eslint-disable import/prefer-default-export */\n\nimport { isViewportBelow } from './helpers';\n\nconst setContentToggle = (\n content: Element,\n onClick?: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n beforeCallback?: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n afterCallback?: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n): CleanUpPair[] => {\n const cleanUp: CleanUpPair[] = [];\n const setContentClose = (button: HTMLElement, contentClose: HTMLElement, focus: boolean): () => void => {\n if (focus) {\n contentClose.focus();\n }\n const click = () => {\n content.setAttribute('hidden', 'hidden');\n button.removeAttribute('hidden');\n button.setAttribute('aria-expanded', 'false');\n button.focus();\n };\n contentClose.addEventListener('click', click);\n return click;\n };\n\n const button = content?.parentElement?.querySelector('.content-toggle__toggle') as HTMLElement;\n const contentClose = content.querySelectorAll('.content-toggle__close');\n/*\n const setBPModifer = () => {\n if (isViewportBelow())\n }\n*/\n\n if (button) {\n const clickEvent = () => {\n const ariaExpanded = button.getAttribute('aria-expanded');\n // Til toolbar: hvis man klikker p\u00E5 en knap, der ikke er foldet ud\n // S\u00E5 lukker vi alle \u00E5bne content-toggles\n if (typeof beforeCallback === 'function' && ariaExpanded === 'false') {\n beforeCallback(content as HTMLElement, button as HTMLButtonElement);\n }\n // Og s\u00E5 g\u00E5r vi i gang med folde-ud-logikken\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n if (ariaExpanded === 'true') {\n content.setAttribute('hidden', 'hidden');\n } else {\n content.removeAttribute('hidden');\n }\n\n if (typeof onClick === 'function') {\n onClick(content as HTMLElement, button as HTMLButtonElement);\n }\n\n if (button.hasAttribute('aria-haspopup')) {\n button.setAttribute('hidden', 'hidden');\n contentClose.forEach((cc) => {\n setContentClose(button, cc as HTMLElement, true);\n });\n }\n\n // Det der sker efter folde-logikken\n if (typeof afterCallback === 'function') {\n afterCallback(content as HTMLElement, button as HTMLButtonElement);\n }\n };\n\n button.addEventListener('click', clickEvent);\n // Altid tilf\u00F8j denne f\u00F8rst!\n cleanUp.push({\n element: button,\n clickEvent,\n });\n\n contentClose.forEach((cc) => {\n const btnClick = setContentClose(button, cc as HTMLElement, false);\n cleanUp.push({\n element: cc,\n clickEvent: btnClick,\n });\n });\n }\n return cleanUp;\n};\n\nexport {\n setContentToggle,\n};\n", "/* eslint-disable max-len */\nimport { convertRemToPixels, isElementWithClassNameInEventPath, isViewportBelow } from './helpers';\n\nconst lockBodyScroll = (): void => {\n const body = document.querySelector('body');\n if (isViewportBelow('--bp-medium') || isViewportBelow('--bp-low-height')) {\n body?.classList.add('body--no-scroll');\n }\n};\n\nconst unlockBodyScroll = (): void => {\n const body = document.querySelector('body');\n body?.classList.remove('body--no-scroll');\n};\n\n/* eslint-env browser */\nconst closeAllContentTogglesInToolbar = (toolbar: HTMLElement): void => {\n const contentToggles = toolbar.querySelectorAll('.content-toggle__toggle');\n contentToggles.forEach((toggle) => {\n const content = toggle.parentElement?.querySelector('.content-toggle__content');\n toggle.setAttribute('aria-expanded', 'false');\n content?.setAttribute('hidden', 'hidden');\n });\n};\n\nconst setOverflow = (toolbarElement: Element): void => {\n if (!toolbarElement.classList.contains('toolbar--no-collapse')) {\n toolbarElement.classList.remove('toolbar--toggled');\n }\n toolbarElement.classList.remove('toolbar--fully-overflown');\n toolbarElement.classList.remove('toolbar--has-popout');\n const toolbarItemsParent = toolbarElement.querySelector('.toolbar__items');\n const toolbarItems = toolbarItemsParent?.children as HTMLCollection;\n const isOverflownClass = 'toolbar__item--is-overflown';\n const hasOverflowClass = 'toolbar--has-overflow';\n let hasOverflown = false;\n\n let overflownCount = 0;\n const addOverflowClass = (item: HTMLElement, index: number) => {\n if (item) {\n const top = item.offsetTop;\n if (top > 25) {\n item.classList.add(isOverflownClass);\n toolbarElement.classList.add(hasOverflowClass);\n hasOverflown = true;\n overflownCount += 1;\n } else {\n item.classList.remove(isOverflownClass);\n }\n\n if (!hasOverflown) {\n toolbarElement.classList.remove(hasOverflowClass);\n } else if (index - 1 >= 0) {\n addOverflowClass(toolbarItems[index - 1] as HTMLElement, index - 1);\n }\n }\n };\n\n addOverflowClass(toolbarItems[toolbarItems.length - 1] as HTMLElement, toolbarItems.length - 1);\n\n if (overflownCount > 0 && overflownCount === toolbarItems.length) {\n toolbarElement.classList.add('toolbar--fully-overflown');\n }\n};\n\nconst setToolbarToggle = (toolbar: HTMLElement): ExtendedCleanUpPair[] => {\n const cleanUp: ExtendedCleanUpPair[] = [];\n const buttons = toolbar.querySelectorAll('.toolbar__toggle');\n buttons.forEach((button) => {\n const clickEvent = () => {\n button?.parentElement?.classList.toggle('toolbar--toggled');\n const ariaExpanded = button.getAttribute('aria-expanded');\n if (ariaExpanded !== 'true') {\n const focusable = 'a.toolbar__item--is-overflown, button.toolbar__item--is-overflown, input.toolbar__item--is-overflown, select.toolbar__item--is-overflown, .toolbar__item--is-overflown a, .toolbar__item--is-overflown button, .toolbar__item--is-overflown input, .toolbar__item--is-overflown select';\n const firstWithOverflow = button?.parentElement?.querySelector(focusable) as HTMLElement;\n if (firstWithOverflow) {\n setTimeout(() => {\n firstWithOverflow.focus();\n }, 0);\n }\n }\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n };\n\n cleanUp.push({\n element: button,\n clickEvent,\n });\n button.addEventListener('click', clickEvent);\n });\n return cleanUp;\n};\n\nconst setToolbar = (\n toolbar: HTMLElement,\n onCloseContentToggle: (toolbarElement: HTMLElement) => void,\n setOverflowOnly = true,\n): ExtendedCleanUpPair[] => {\n let cleanUp: ExtendedCleanUpPair[] = [];\n\n setOverflow(toolbar);\n onCloseContentToggle(toolbar);\n cleanUp = cleanUp.concat(setToolbarToggle(toolbar));\n\n if (!setOverflowOnly) {\n const bodyClickEvent = (event: Event) => {\n if (!(event.target as HTMLElement).classList.contains('content-toggle__toggle')\n && !isElementWithClassNameInEventPath(event as MouseEvent, 'content-toggle__content')) {\n onCloseContentToggle(toolbar);\n }\n };\n\n const escKeyEvent = (event: Event) => {\n if ((event as KeyboardEvent).key === 'Escape') {\n if (event.target && (event.target as HTMLElement).getAttribute('type') !== 'search') {\n onCloseContentToggle(toolbar);\n }\n }\n };\n\n const body = document.querySelector('body');\n\n cleanUp.push({\n element: body as Element,\n clickEvent: bodyClickEvent,\n });\n\n cleanUp.push({\n element: window,\n keyUpEvent: escKeyEvent,\n });\n\n body?.addEventListener('click', bodyClickEvent);\n window.addEventListener('keyup', escKeyEvent);\n }\n\n return cleanUp;\n};\n\nconst findToolbar = (element: HTMLElement): HTMLElement => {\n const parent = element.parentElement;\n if (parent) {\n if (parent.classList.contains('toolbar')) {\n return parent;\n }\n return findToolbar(parent);\n }\n return element;\n};\n\nconst contentToggleEdgeHandling = (element: HTMLElement): void => {\n if (!isViewportBelow('--bp-medium') && !isViewportBelow('--bp-low-height')) {\n const allowedDistance = convertRemToPixels(parseInt(getComputedStyle(document.documentElement).getPropertyValue('--toolbar-popout-allowed-edge-distance').replace('rem,', ''), 10));\n const popoutX = parseInt(getComputedStyle(element).width.replace('px', ''), 10);\n const popoutWidth = element.getBoundingClientRect().x;\n\n const distance = document.body.offsetWidth - allowedDistance - popoutX - popoutWidth;\n\n if (distance < 0) {\n element.style.setProperty('--toolbar-popout-edge-overflow', `${distance}px`);\n }\n }\n};\n\nexport {\n setToolbar,\n setOverflow,\n findToolbar,\n closeAllContentTogglesInToolbar,\n contentToggleEdgeHandling,\n lockBodyScroll,\n unlockBodyScroll,\n};\n", "// Scroller 80% p\u00E5 horisontal scroll til h\u00F8jre og s\u00E6tter knappen disabled n\u00E5r man rammer bunden\nconst horizontalScrollButtonNext = (nextButtons: NodeListOf<Element>): void => {\n if (nextButtons) {\n nextButtons.forEach((nextButton) => {\n const topElem = nextButton?.parentElement?.parentElement?.parentElement?.parentElement;\n if (topElem) {\n const scrollElements = topElem.querySelectorAll('.horizontal-scroll__scrollable-content');\n const switch__segments = topElem.querySelectorAll('.switch__segment');\n scrollElements.forEach((scrollElement) => { \n if (scrollElement) {\n nextButton.addEventListener('click', () => {\n // Scroller 80% af den synlige bredde p\u00E5 horizontal scroll til h\u00F8jre\n const scrollAmount = 0.8 * scrollElement.clientWidth;\n scrollElement.scrollLeft += scrollAmount;\n });\n // G\u00F8r knappen aktiv hvis scroll har ramt bunden\n scrollElement.addEventListener('scroll', () => {\n if ((scrollElement.scrollLeft + scrollElement.clientWidth) >= (scrollElement.scrollWidth * 0.98)) {\n disableButton(nextButton);\n } else if (scrollElement.scrollLeft + scrollElement.clientWidth < scrollElement.scrollWidth) {\n activateButton(nextButton);\n }\n });\n // Reset af knap ved flere tabs af horizontal scroll\n if (switch__segments) {\n switch__segments.forEach(switch__segment => {\n switch__segment.addEventListener('click', () => {\n activateButton(nextButton);\n scrollElement.scrollLeft = 0;\n })\n });\n }\n }\n });\n }\n });\n }\n };\n \n // Scroller 80% p\u00E5 horisontal scroll til venstre og s\u00E6tter knappen disabled n\u00E5r man rammer toppen\n const horizontalScrollButtonPrevious = (previousButtons: NodeListOf<Element>): void => {\n if (previousButtons) {\n previousButtons.forEach((previousButton) => {\n const topElem = previousButton?.parentElement?.parentElement?.parentElement?.parentElement;\n if (topElem) {\n const scrollElements = topElem.querySelectorAll('.horizontal-scroll__scrollable-content');\n const switch__segments = topElem.querySelectorAll('.switch__segment');\n scrollElements.forEach((scrollElement) => { \n if (scrollElement) {\n previousButton.addEventListener('click', () => {\n // Scroller 80% af den synlige bredde p\u00E5 horizontal scroll til venstre\n const scrollAmount = 0.8 * scrollElement.clientWidth;\n scrollElement.scrollLeft -= scrollAmount;\n });\n // G\u00F8r knappen aktiv hvis scroll har ramt toppen\n scrollElement.addEventListener('scroll', () => {\n if (scrollElement.scrollLeft <= 0) {\n disableButton(previousButton);\n } else if (scrollElement.scrollLeft > 0) {\n activateButton(previousButton);\n }\n });\n }\n // Reset af knap ved flere tabs af horizontal scroll\n if (switch__segments) {\n switch__segments.forEach(switch__segment => {\n switch__segment.addEventListener('click', () => {\n disableButton(previousButton);\n });\n });\n }\n });\n }\n });\n }\n };\n\n function activateButton(button) {\n button.classList.remove('visually-disabled');\n button.setAttribute('aria-disabled', 'false');\n }\n \n function disableButton(button) {\n button.classList.add('visually-disabled');\n button.setAttribute('aria-disabled', 'true');\n }\n\n export {\n horizontalScrollButtonNext,\n horizontalScrollButtonPrevious,\n };", "/* eslint-disable no-param-reassign */\n/* eslint-env browser */\nimport ready from '../components/ready';\nimport {\n setResponsiveNav,\n setResponsiveToggle,\n} from '../components/nav';\nimport { isElementWithClassNameInEventPath, setMetaThemeColor, setHorizontalScroll } from '../components/helpers';\nimport { setResponsiveTable } from '../components/table';\nimport { setTabs } from '../components/tabs';\nimport { setContentToggle } from '../components/content-toggle';\nimport {\n closeAllContentTogglesInToolbar,\n contentToggleEdgeHandling,\n findToolbar,\n lockBodyScroll,\n unlockBodyScroll,\n} from '../components/toolbar';\nimport { horizontalScrollButtonNext, horizontalScrollButtonPrevious } from '../components/horizontal-scroll-btn';\n\nlet windowInnerWidth = 0;\n\nready(() => {\n const tabbedContent = document.querySelectorAll('.tabbed-content');\n const tabbedObjects: ITabbedObject[] = [];\n tabbedContent.forEach((tab) => tabbedObjects.push({\n domElement: tab,\n rendered: false,\n }));\n setTabs(tabbedObjects);\n setMetaThemeColor();\n\n const navElements = document.querySelectorAll('.nav:not(.nav--vertical)');\n navElements.forEach((n) => setResponsiveNav(navElements, n));\n setResponsiveToggle(navElements);\n\n const tables = document.querySelectorAll('.table--wrap-medium-width, .table--wrap-default-width');\n tables.forEach((table) => setResponsiveTable(table));\n\n // Almindelige content toggles\n const toggles = document.querySelectorAll('.box .content-toggle__content, .profile-header .content-toggle__content, .design-documentation .content-toggle__content');\n toggles.forEach((toggle) => {\n setContentToggle(toggle);\n });\n\n // Hortizontal scroll buttons\n const scrollButtonsNext = document.querySelectorAll('.button.button--small.button--icon.button--icon--hide-label.icon-next');\n const scrollButtonsPrevious = document.querySelectorAll('.button.button--small.button--icon.button--icon--hide-label.icon-previous');\n horizontalScrollButtonNext(scrollButtonsNext);\n horizontalScrollButtonPrevious(scrollButtonsPrevious);\n\n const horizontalScroll = document.querySelectorAll('.horizontal-scroll');\n horizontalScroll.forEach((hs) => {\n setHorizontalScroll(hs as HTMLElement);\n window.addEventListener('resize', () => {\n setHorizontalScroll(hs as HTMLElement);\n });\n });\n\n const switchSegments = document.querySelectorAll('.switch__segment');\n switchSegments.forEach((switchSegment) => {\n switchSegment.addEventListener('click', () => {\n const horizontalScrollTabbed = document.querySelectorAll('.horizontal-scroll');\n horizontalScrollTabbed.forEach((hsTabbed) => {\n setHorizontalScroll(hsTabbed as HTMLElement);\n });\n });\n });\n \n // Kursuskatalog\n const togglesInToolbars = document.querySelectorAll('.toolbar .content-toggle__content');\n togglesInToolbars.forEach((toggle) => {\n setContentToggle(\n toggle,\n (popout: HTMLElement) => {\n contentToggleEdgeHandling(popout);\n lockBodyScroll();\n },\n (content: HTMLElement) => closeAllContentTogglesInToolbar(findToolbar(content)),\n (content: HTMLElement, button: HTMLButtonElement) => {\n const ariaExpanded = button.getAttribute('aria-expanded');\n const toolbar = findToolbar(content);\n if (ariaExpanded === 'true') {\n toolbar?.classList.add('toolbar--has-popout');\n } else {\n toolbar?.classList.remove('toolbar--has-popout');\n }\n\n content.addEventListener('click', (event: MouseEvent) => {\n if ((event.target as HTMLElement).classList.contains('toolbar__popout')\n && !isElementWithClassNameInEventPath(event as MouseEvent, 'toolbar__filter__content')) {\n closeAllContentTogglesInToolbar(toolbar);\n unlockBodyScroll();\n }\n });\n },\n );\n });\n\n window.addEventListener('load', () => {\n windowInnerWidth = window.innerWidth;\n });\n\n window.addEventListener('resize', () => {\n if (windowInnerWidth > 0 && window.innerWidth !== windowInnerWidth) {\n windowInnerWidth = window.innerWidth;\n navElements.forEach((n) => setResponsiveNav(navElements, n));\n setTabs(tabbedObjects);\n }\n });\n});\n"],
|
|
5
|
+
"mappings": "MACA,IAAMA,EAASC,GAAyB,CAClC,SAAS,aAAe,UAC1BA,EAAG,EAEH,SAAS,iBAAiB,mBAAoBA,CAAE,CAEpD,EAEOC,EAAQF,ECDf,IAAMG,EAAoC,CAACC,EAAmBC,IAA+B,CAC3F,IAAIC,EAAQ,GAEZ,OADaF,EAAM,aAAa,EAC3B,QAASG,GA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,EAAQ,iBAAiB,QAAUM,GAAsB,CAClDA,EAAM,OAAuB,UAAU,SAAS,iBAAiB,GACjE,CAACC,EAAkCD,EAAqB,0BAA0B,IACrFL,EAAgCI,CAAO,EACvCG,EAAiB,EAErB,CAAC,CACH,CACF,CACF,CAAC,EAED,OAAO,iBAAiB,OAAQ,IAAM,CACpClC,EAAmB,OAAO,UAC5B,CAAC,EAED,OAAO,iBAAiB,SAAU,IAAM,CAClCA,EAAmB,GAAK,OAAO,aAAeA,IAChDA,EAAmB,OAAO,WAC1BO,EAAY,QAASC,GAAMC,EAAiBF,EAAaC,CAAC,CAAC,EAC3DH,EAAQF,CAAa,EAEzB,CAAC,CACH,CAAC",
|
|
6
|
+
"names": ["ready", "fn", "ready_default", "isElementWithClassNameInEventPath", "event", "className", "found", "p", "setMetaThemeColor", "body", "bgColor", "existingMeta", "meta", "getBaseFontSize", "convertRemToPixels", "rem", "isViewportBelow", "mediaQuery", "viewportWidth", "mediaQueryValue", "overflowsX", "element", "setHorizontalScroll", "element", "content", "overflowsX", "findNav", "element", "parent", "closeResponsiveNav", "navElements", "keepOpen", "navToggledClass", "n", "button", "setResponsiveToggle", "toggleMenu", "navItems", "lastNavItem", "firstElement", "transitionListener", "cleanUp", "clickEvent", "nav", "ariaExpanded", "setResponsiveNav", "navElement", "navItemsClass", "navItemsParent", "isOverflownClass", "hasOverflowClass", "isActiveClass", "hasOverflown", "i", "isActive", "bodyClickEvent", "e", "isElementWithClassNameInEventPath", "setResponsiveTable", "table", "head", "body", "foot", "headers", "h", "rowContainers", "rc", "tr", "cell", "i", "getMediaWidthBasedOnModifier", "classList", "isBelowViewportLimit", "widthInRem", "getBaseFontSize", "mediaWidth", "destroyTabs", "tabbed", "tabs", "panels", "section", "tab", "panel", "switchTab", "tabs", "panels", "oldTab", "newTab", "_", "focus", "callback", "index", "link", "oldIndex", "setTabbedContent", "key", "tabbed", "initial", "tablist", "section", "expandAll", "expandAllEvent", "panel", "tab", "i", "tabClickEvent", "e", "currentTab", "tabIndex", "tabKeyEvent", "dir", "setTabs", "tabbedObjects", "tabObject", "rendered", "domElement", "isBelowViewportLimit", "dataInitial", "destroyTabs", "setContentToggle", "content", "onClick", "beforeCallback", "afterCallback", "cleanUp", "setContentClose", "button", "contentClose", "focus", "click", "clickEvent", "ariaExpanded", "cc", "btnClick", "lockBodyScroll", "body", "isViewportBelow", "unlockBodyScroll", "closeAllContentTogglesInToolbar", "toolbar", "toggle", "content", "findToolbar", "element", "parent", "contentToggleEdgeHandling", "isViewportBelow", "allowedDistance", "convertRemToPixels", "popoutX", "popoutWidth", "distance", "horizontalScrollButtonNext", "nextButtons", "nextButton", "topElem", "scrollElements", "switch__segments", "scrollElement", "scrollAmount", "disableButton", "activateButton", "switch__segment", "horizontalScrollButtonPrevious", "previousButtons", "previousButton", "button", "windowInnerWidth", "ready_default", "tabbedContent", "tabbedObjects", "tab", "setTabs", "setMetaThemeColor", "navElements", "n", "setResponsiveNav", "setResponsiveToggle", "table", "setResponsiveTable", "toggle", "setContentToggle", "scrollButtonsNext", "scrollButtonsPrevious", "horizontalScrollButtonNext", "horizontalScrollButtonPrevious", "hs", "setHorizontalScroll", "switchSegment", "hsTabbed", "popout", "contentToggleEdgeHandling", "lockBodyScroll", "content", "closeAllContentTogglesInToolbar", "findToolbar", "button", "ariaExpanded", "toolbar", "event", "isElementWithClassNameInEventPath", "unlockBodyScroll"]
|
|
7
7
|
}
|
package/public/js/demo.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(()=>{var oe=e=>{document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)},P=oe;var w=e=>{navigator.clipboard.writeText(e).then(()=>console.log(`${e} written to clipboard`))},y=(e,t)=>{let s=!1;return e.composedPath().forEach(r=>{r.classList&&r.classList.contains(t)&&(s=!0)}),s},T=()=>{let e=document.querySelector("body");if(e){let t=window.getComputedStyle(e).getPropertyValue("--color-background"),s=document.querySelector('meta[name="theme-color"]');if(s)s.content=t;else{let n=document.createElement("meta");n.name="theme-color",n.content=t,document.getElementsByTagName("head")[0].appendChild(n)}}};var k=()=>{let e=window.innerWidth-document.body.clientWidth;document.documentElement.style.setProperty("--vertical-scrollbar-width",`${e}px`)},I=e=>e.offsetHeight!==e.scrollHeight,se=e=>e.offsetWidth!==e.scrollWidth;var N=e=>{let t=e.querySelector(".horizontal-scroll--check-overflow .horizontal-scroll__scrollable-content");t&&(se(t)?t?.setAttribute("tabindex","0"):(e.classList.add("horizontal-scroll--no-overflow"),t?.removeAttribute("tabindex")))},R='a[href]:not([tabindex="-1"]), area[href]:not([tabindex="-1"]), input:not([disabled]):not([tabindex="-1"]), select:not([disabled]):not([tabindex="-1"]), textarea:not([disabled]):not([tabindex="-1"]), button:not([disabled]):not([tabindex="-1"]), iframe:not([tabindex="-1"]), [tabindex]:not([tabindex="-1"]), [contentEditable=true]:not([tabindex="-1"])';var W=(e,t=null)=>{let s="sub-nav--toggled";e.forEach(n=>{n!==t&&(n?.parentElement?.classList.contains(s)&&(n.focus(),n.setAttribute("aria-expanded","false")),n?.parentElement?.classList.remove(s))})},D=(e,t)=>{let s="sub-nav--toggled",n=()=>{t?.parentElement?.classList.toggle(s),t?.parentElement?.classList.contains(s)?t.setAttribute("aria-expanded","true"):t.setAttribute("aria-expanded","false"),W(e,t)};t.addEventListener("click",n);let r=m=>{y(m,"sub-nav")||W(e)};return document.querySelector("body")?.addEventListener("click",r),{buttonClickEvent:n,element:document.querySelector("body"),bodyClickEvent:r}},U=(e,t,s,n,r)=>{if(n&&s){w(n.innerText),t.classList.add("copy-to-clipboard--confirm"),t===s&&t.classList.add("copy-to-clipboard--done");let m=document.createElement("span");m.classList.add("copy-to-clipboard__this__confirm-message"),m.innerText=e,n.appendChild(m),s.removeEventListener("click",r),setTimeout(()=>{t.classList.remove("copy-to-clipboard--confirm"),m.remove(),s.addEventListener("click",r)},1200)}},B=(e,t="Kopieret!")=>{let s=e.querySelector(".copy-to-clipboard__this");if(e.type==="button"){let n=()=>{U(t,e,e,s,n)};e.addEventListener("click",n)}else{let n=e.querySelector(".copy-to-clipboard__execute"),r=()=>{U(t,e,n,s,r)};n?.addEventListener("click",r)}},z=(e,t)=>{let s="nav__search--toggled";t.addEventListener("click",()=>{e.classList.contains(s)?(t.setAttribute("aria-expanded","false"),e.classList.remove(s)):(t.setAttribute("aria-expanded","true"),e.classList.add(s))})};var x=["blue","purple","cyan","turquoise","green","yellow","red","magenta","orange","dark-blue","dark-purple","dark-cyan","dark-turquoise","dark-green","dark-yellow","dark-red","dark-magenta","dark-orange"],j=["default","medium","wide","reset"],E=(e,t)=>{t==null?window.localStorage.removeItem(e):window.localStorage.setItem(e,t)},re=()=>{let e=window.localStorage;return[e.getItem("atom-picker-theme"),e.getItem("atom-picker-style"),e.getItem("atom-picker-position"),e.getItem("atom-picker-scale")]},X=e=>{document.querySelector("body")?.classList.remove(`theme--${e}`)},$=e=>{x.forEach(X),e!=="theme--blue"&&document.querySelector("body")?.classList.add(e),E("atom-picker-theme",e)},V=()=>{let e=document.querySelector("body"),t=document.getElementById("content"),s=document.getElementById("aside"),n="theme--normal",r="theme--dark";e?.classList.remove("body--scrollbar-dark"),t?.classList.contains(n)||e?.classList.toggle(r),t?.classList.remove(n),s&&s.classList.remove(n),E("atom-picker-style",e?.classList.contains(r)?r:null)},F=()=>{let e=document.getElementById("atom-picker"),t="atom-picker--at-top";e?.classList.toggle(t),E("atom-picker-position",e?.classList.contains(t)?t:null)},ie=e=>{document.querySelector("body")?.classList.remove(`view--${e}`)},K=e=>{if(j.forEach(ie),e!=="reset")document.querySelector("body")?.classList.add(e),E("atom-picker-scale",e);else{x.forEach(X),document.querySelector("body")?.classList.add("theme--dark"),document.querySelector("body")?.classList.add("body--scrollbar-dark"),document.getElementById("content")?.classList.add("theme--normal");let t=document.getElementById("aside");t&&t.classList.add("theme--normal"),E("atom-picker-theme",null),E("atom-picker-scale",null),E("atom-picker-position",null),E("atom-picker-style",null),T()}},Y=()=>{let[e,t,s,n]=re();e&&$(e),t&&V(),s&&F(),n&&K(n);let r=document.querySelector(".atom-picker__scale__item__position-toggle");r&&r.addEventListener("click",()=>{F()});let m=document.querySelector(".atom-picker__scale__item__theme-style");m&&m.addEventListener("click",()=>{V(),T()}),j.forEach(u=>{let v=document.querySelector(`.atom-picker__scale__item__${u}`);v&&v.addEventListener("click",()=>{K(u==="reset"?"reset":`view--${u}`)})}),x.forEach(u=>{let v=document.querySelector(`.atom-picker__color__item.theme--${u}`);v&&v.addEventListener("click",()=>{$(`theme--${u}`),T()})})};var ae=()=>{document.querySelectorAll(".color-atom__colors > div").forEach(t=>{t.addEventListener("click",()=>{let s=window.getComputedStyle(t,":before").getPropertyValue("content");w(s.replace(/"/g,""))})})},G=ae;var H=function(){function e(t,s){for(var n=0;n<s.length;n++){var r=s[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,s,n){return s&&e(t.prototype,s),n&&e(t,n),t}}();function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(function(){if(typeof window>"u")return;var e=Array.prototype.slice,t=Element.prototype.matches||Element.prototype.msMatchesSelector,s=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","details","summary","iframe","object","embed","[contenteditable]"].join(","),n=function(){function l(i,o){A(this,l),this._inertManager=o,this._rootElement=i,this._managedNodes=new Set,this._rootElement.hasAttribute("aria-hidden")?this._savedAriaHidden=this._rootElement.getAttribute("aria-hidden"):this._savedAriaHidden=null,this._rootElement.setAttribute("aria-hidden","true"),this._makeSubtreeUnfocusable(this._rootElement),this._observer=new MutationObserver(this._onMutation.bind(this)),this._observer.observe(this._rootElement,{attributes:!0,childList:!0,subtree:!0})}return H(l,[{key:"destructor",value:function(){this._observer.disconnect(),this._rootElement&&(this._savedAriaHidden!==null?this._rootElement.setAttribute("aria-hidden",this._savedAriaHidden):this._rootElement.removeAttribute("aria-hidden")),this._managedNodes.forEach(function(o){this._unmanageNode(o.node)},this),this._observer=null,this._rootElement=null,this._managedNodes=null,this._inertManager=null}},{key:"_makeSubtreeUnfocusable",value:function(o){var c=this;u(o,function(h){return c._visitNode(h)});var d=document.activeElement;if(!document.body.contains(o)){for(var f=o,g=void 0;f;){if(f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){g=f;break}f=f.parentNode}g&&(d=g.activeElement)}o.contains(d)&&(d.blur(),d===document.activeElement&&document.body.focus())}},{key:"_visitNode",value:function(o){if(o.nodeType===Node.ELEMENT_NODE){var c=o;c!==this._rootElement&&c.hasAttribute("inert")&&this._adoptInertRoot(c),(t.call(c,s)||c.hasAttribute("tabindex"))&&this._manageNode(c)}}},{key:"_manageNode",value:function(o){var c=this._inertManager.register(o,this);this._managedNodes.add(c)}},{key:"_unmanageNode",value:function(o){var c=this._inertManager.deregister(o,this);c&&this._managedNodes.delete(c)}},{key:"_unmanageSubtree",value:function(o){var c=this;u(o,function(d){return c._unmanageNode(d)})}},{key:"_adoptInertRoot",value:function(o){var c=this._inertManager.getInertRoot(o);c||(this._inertManager.setInert(o,!0),c=this._inertManager.getInertRoot(o)),c.managedNodes.forEach(function(d){this._manageNode(d.node)},this)}},{key:"_onMutation",value:function(o,c){o.forEach(function(d){var f=d.target;if(d.type==="childList")e.call(d.addedNodes).forEach(function(h){this._makeSubtreeUnfocusable(h)},this),e.call(d.removedNodes).forEach(function(h){this._unmanageSubtree(h)},this);else if(d.type==="attributes"){if(d.attributeName==="tabindex")this._manageNode(f);else if(f!==this._rootElement&&d.attributeName==="inert"&&f.hasAttribute("inert")){this._adoptInertRoot(f);var g=this._inertManager.getInertRoot(f);this._managedNodes.forEach(function(h){f.contains(h.node)&&g._manageNode(h.node)})}}},this)}},{key:"managedNodes",get:function(){return new Set(this._managedNodes)}},{key:"hasSavedAriaHidden",get:function(){return this._savedAriaHidden!==null}},{key:"savedAriaHidden",set:function(o){this._savedAriaHidden=o},get:function(){return this._savedAriaHidden}}]),l}(),r=function(){function l(i,o){A(this,l),this._node=i,this._overrodeFocusMethod=!1,this._inertRoots=new Set([o]),this._savedTabIndex=null,this._destroyed=!1,this.ensureUntabbable()}return H(l,[{key:"destructor",value:function(){if(this._throwIfDestroyed(),this._node&&this._node.nodeType===Node.ELEMENT_NODE){var o=this._node;this._savedTabIndex!==null?o.setAttribute("tabindex",this._savedTabIndex):o.removeAttribute("tabindex"),this._overrodeFocusMethod&&delete o.focus}this._node=null,this._inertRoots=null,this._destroyed=!0}},{key:"_throwIfDestroyed",value:function(){if(this.destroyed)throw new Error("Trying to access destroyed InertNode")}},{key:"ensureUntabbable",value:function(){if(this.node.nodeType===Node.ELEMENT_NODE){var o=this.node;if(t.call(o,s)){if(o.tabIndex===-1&&this.hasSavedTabIndex)return;o.hasAttribute("tabindex")&&(this._savedTabIndex=o.tabIndex),o.setAttribute("tabindex","-1"),o.nodeType===Node.ELEMENT_NODE&&(o.focus=function(){},this._overrodeFocusMethod=!0)}else o.hasAttribute("tabindex")&&(this._savedTabIndex=o.tabIndex,o.removeAttribute("tabindex"))}}},{key:"addInertRoot",value:function(o){this._throwIfDestroyed(),this._inertRoots.add(o)}},{key:"removeInertRoot",value:function(o){this._throwIfDestroyed(),this._inertRoots.delete(o),this._inertRoots.size===0&&this.destructor()}},{key:"destroyed",get:function(){return this._destroyed}},{key:"hasSavedTabIndex",get:function(){return this._savedTabIndex!==null}},{key:"node",get:function(){return this._throwIfDestroyed(),this._node}},{key:"savedTabIndex",set:function(o){this._throwIfDestroyed(),this._savedTabIndex=o},get:function(){return this._throwIfDestroyed(),this._savedTabIndex}}]),l}(),m=function(){function l(i){if(A(this,l),!i)throw new Error("Missing required argument; InertManager needs to wrap a document.");this._document=i,this._managedNodes=new Map,this._inertRoots=new Map,this._observer=new MutationObserver(this._watchForInert.bind(this)),v(i.head||i.body||i.documentElement),i.readyState==="loading"?i.addEventListener("DOMContentLoaded",this._onDocumentLoaded.bind(this)):this._onDocumentLoaded()}return H(l,[{key:"setInert",value:function(o,c){if(c){if(this._inertRoots.has(o))return;var d=new n(o,this);if(o.setAttribute("inert",""),this._inertRoots.set(o,d),!this._document.body.contains(o))for(var f=o.parentNode;f;)f.nodeType===11&&v(f),f=f.parentNode}else{if(!this._inertRoots.has(o))return;var g=this._inertRoots.get(o);g.destructor(),this._inertRoots.delete(o),o.removeAttribute("inert")}}},{key:"getInertRoot",value:function(o){return this._inertRoots.get(o)}},{key:"register",value:function(o,c){var d=this._managedNodes.get(o);return d!==void 0?d.addInertRoot(c):d=new r(o,c),this._managedNodes.set(o,d),d}},{key:"deregister",value:function(o,c){var d=this._managedNodes.get(o);return d?(d.removeInertRoot(c),d.destroyed&&this._managedNodes.delete(o),d):null}},{key:"_onDocumentLoaded",value:function(){var o=e.call(this._document.querySelectorAll("[inert]"));o.forEach(function(c){this.setInert(c,!0)},this),this._observer.observe(this._document.body||this._document.documentElement,{attributes:!0,subtree:!0,childList:!0})}},{key:"_watchForInert",value:function(o,c){var d=this;o.forEach(function(f){switch(f.type){case"childList":e.call(f.addedNodes).forEach(function(b){if(b.nodeType===Node.ELEMENT_NODE){var p=e.call(b.querySelectorAll("[inert]"));t.call(b,"[inert]")&&p.unshift(b),p.forEach(function(_){this.setInert(_,!0)},d)}},d);break;case"attributes":if(f.attributeName!=="inert")return;var g=f.target,h=g.hasAttribute("inert");d.setInert(g,h);break}},this)}}]),l}();function u(l,i,o){if(l.nodeType==Node.ELEMENT_NODE){var c=l;i&&i(c);var d=c.shadowRoot;if(d){u(d,i,d);return}if(c.localName=="content"){for(var f=c,g=f.getDistributedNodes?f.getDistributedNodes():[],h=0;h<g.length;h++)u(g[h],i,o);return}if(c.localName=="slot"){for(var b=c,p=b.assignedNodes?b.assignedNodes({flatten:!0}):[],_=0;_<p.length;_++)u(p[_],i,o);return}}for(var L=l.firstChild;L!=null;)u(L,i,o),L=L.nextSibling}function v(l){if(!l.querySelector("style#inert-style, link#inert-style")){var i=document.createElement("style");i.setAttribute("id","inert-style"),i.textContent=`
|
|
1
|
+
(()=>{var oe=e=>{document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)},P=oe;var w=e=>{navigator.clipboard.writeText(e).then(()=>console.log(`${e} written to clipboard`))},y=(e,t)=>{let s=!1;return e.composedPath().forEach(r=>{r.classList&&r.classList.contains(t)&&(s=!0)}),s},T=()=>{let e=document.querySelector("body");if(e){let t=window.getComputedStyle(e).getPropertyValue("--color-background"),s=document.querySelector('meta[name="theme-color"]');if(s)s.content=t;else{let n=document.createElement("meta");n.name="theme-color",n.content=t,document.getElementsByTagName("head")[0].appendChild(n)}}};var k=()=>{let e=window.innerWidth-document.body.clientWidth;document.documentElement.style.setProperty("--vertical-scrollbar-width",`${e}px`)},I=e=>e.offsetHeight!==e.scrollHeight,se=e=>e.offsetWidth!==e.scrollWidth;var N=e=>{e.classList.contains("horizontal-scroll--no-overflow")&&e.classList.remove("horizontal-scroll--no-overflow");let t=e.querySelector(".horizontal-scroll--check-overflow .tabbed-content__section:not([hidden]) .horizontal-scroll__scrollable-content");t===null&&!t&&(t=e.querySelector(".horizontal-scroll--check-overflow .horizontal-scroll__scrollable-content")),t&&(se(t)?t?.setAttribute("tabindex","0"):(e.classList.add("horizontal-scroll--no-overflow"),t?.removeAttribute("tabindex")))},R='a[href]:not([tabindex="-1"]), area[href]:not([tabindex="-1"]), input:not([disabled]):not([tabindex="-1"]), select:not([disabled]):not([tabindex="-1"]), textarea:not([disabled]):not([tabindex="-1"]), button:not([disabled]):not([tabindex="-1"]), iframe:not([tabindex="-1"]), [tabindex]:not([tabindex="-1"]), [contentEditable=true]:not([tabindex="-1"])';var W=(e,t=null)=>{let s="sub-nav--toggled";e.forEach(n=>{n!==t&&(n?.parentElement?.classList.contains(s)&&(n.focus(),n.setAttribute("aria-expanded","false")),n?.parentElement?.classList.remove(s))})},D=(e,t)=>{let s="sub-nav--toggled",n=()=>{t?.parentElement?.classList.toggle(s),t?.parentElement?.classList.contains(s)?t.setAttribute("aria-expanded","true"):t.setAttribute("aria-expanded","false"),W(e,t)};t.addEventListener("click",n);let r=m=>{y(m,"sub-nav")||W(e)};return document.querySelector("body")?.addEventListener("click",r),{buttonClickEvent:n,element:document.querySelector("body"),bodyClickEvent:r}},U=(e,t,s,n,r)=>{if(n&&s){w(n.innerText),t.classList.add("copy-to-clipboard--confirm"),t===s&&t.classList.add("copy-to-clipboard--done");let m=document.createElement("span");m.classList.add("copy-to-clipboard__this__confirm-message"),m.innerText=e,n.appendChild(m),s.removeEventListener("click",r),setTimeout(()=>{t.classList.remove("copy-to-clipboard--confirm"),m.remove(),s.addEventListener("click",r)},1200)}},B=(e,t="Kopieret!")=>{let s=e.querySelector(".copy-to-clipboard__this");if(e.type==="button"){let n=()=>{U(t,e,e,s,n)};e.addEventListener("click",n)}else{let n=e.querySelector(".copy-to-clipboard__execute"),r=()=>{U(t,e,n,s,r)};n?.addEventListener("click",r)}},z=(e,t)=>{let s="nav__search--toggled";t.addEventListener("click",()=>{e.classList.contains(s)?(t.setAttribute("aria-expanded","false"),e.classList.remove(s)):(t.setAttribute("aria-expanded","true"),e.classList.add(s))})};var x=["blue","purple","cyan","turquoise","green","yellow","red","magenta","orange","dark-blue","dark-purple","dark-cyan","dark-turquoise","dark-green","dark-yellow","dark-red","dark-magenta","dark-orange"],j=["default","medium","wide","reset"],E=(e,t)=>{t==null?window.localStorage.removeItem(e):window.localStorage.setItem(e,t)},re=()=>{let e=window.localStorage;return[e.getItem("atom-picker-theme"),e.getItem("atom-picker-style"),e.getItem("atom-picker-position"),e.getItem("atom-picker-scale")]},X=e=>{document.querySelector("body")?.classList.remove(`theme--${e}`)},$=e=>{x.forEach(X),e!=="theme--blue"&&document.querySelector("body")?.classList.add(e),E("atom-picker-theme",e)},V=()=>{let e=document.querySelector("body"),t=document.getElementById("content"),s=document.getElementById("aside"),n="theme--normal",r="theme--dark";e?.classList.remove("body--scrollbar-dark"),t?.classList.contains(n)||e?.classList.toggle(r),t?.classList.remove(n),s&&s.classList.remove(n),E("atom-picker-style",e?.classList.contains(r)?r:null)},F=()=>{let e=document.getElementById("atom-picker"),t="atom-picker--at-top";e?.classList.toggle(t),E("atom-picker-position",e?.classList.contains(t)?t:null)},ie=e=>{document.querySelector("body")?.classList.remove(`view--${e}`)},K=e=>{if(j.forEach(ie),e!=="reset")document.querySelector("body")?.classList.add(e),E("atom-picker-scale",e);else{x.forEach(X),document.querySelector("body")?.classList.add("theme--dark"),document.querySelector("body")?.classList.add("body--scrollbar-dark"),document.getElementById("content")?.classList.add("theme--normal");let t=document.getElementById("aside");t&&t.classList.add("theme--normal"),E("atom-picker-theme",null),E("atom-picker-scale",null),E("atom-picker-position",null),E("atom-picker-style",null),T()}},Y=()=>{let[e,t,s,n]=re();e&&$(e),t&&V(),s&&F(),n&&K(n);let r=document.querySelector(".atom-picker__scale__item__position-toggle");r&&r.addEventListener("click",()=>{F()});let m=document.querySelector(".atom-picker__scale__item__theme-style");m&&m.addEventListener("click",()=>{V(),T()}),j.forEach(u=>{let h=document.querySelector(`.atom-picker__scale__item__${u}`);h&&h.addEventListener("click",()=>{K(u==="reset"?"reset":`view--${u}`)})}),x.forEach(u=>{let h=document.querySelector(`.atom-picker__color__item.theme--${u}`);h&&h.addEventListener("click",()=>{$(`theme--${u}`),T()})})};var ae=()=>{document.querySelectorAll(".color-atom__colors > div").forEach(t=>{t.addEventListener("click",()=>{let s=window.getComputedStyle(t,":before").getPropertyValue("content");w(s.replace(/"/g,""))})})},G=ae;var H=function(){function e(t,s){for(var n=0;n<s.length;n++){var r=s[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,s,n){return s&&e(t.prototype,s),n&&e(t,n),t}}();function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(function(){if(typeof window>"u")return;var e=Array.prototype.slice,t=Element.prototype.matches||Element.prototype.msMatchesSelector,s=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","details","summary","iframe","object","embed","[contenteditable]"].join(","),n=function(){function l(i,o){A(this,l),this._inertManager=o,this._rootElement=i,this._managedNodes=new Set,this._rootElement.hasAttribute("aria-hidden")?this._savedAriaHidden=this._rootElement.getAttribute("aria-hidden"):this._savedAriaHidden=null,this._rootElement.setAttribute("aria-hidden","true"),this._makeSubtreeUnfocusable(this._rootElement),this._observer=new MutationObserver(this._onMutation.bind(this)),this._observer.observe(this._rootElement,{attributes:!0,childList:!0,subtree:!0})}return H(l,[{key:"destructor",value:function(){this._observer.disconnect(),this._rootElement&&(this._savedAriaHidden!==null?this._rootElement.setAttribute("aria-hidden",this._savedAriaHidden):this._rootElement.removeAttribute("aria-hidden")),this._managedNodes.forEach(function(o){this._unmanageNode(o.node)},this),this._observer=null,this._rootElement=null,this._managedNodes=null,this._inertManager=null}},{key:"_makeSubtreeUnfocusable",value:function(o){var c=this;u(o,function(v){return c._visitNode(v)});var d=document.activeElement;if(!document.body.contains(o)){for(var f=o,g=void 0;f;){if(f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){g=f;break}f=f.parentNode}g&&(d=g.activeElement)}o.contains(d)&&(d.blur(),d===document.activeElement&&document.body.focus())}},{key:"_visitNode",value:function(o){if(o.nodeType===Node.ELEMENT_NODE){var c=o;c!==this._rootElement&&c.hasAttribute("inert")&&this._adoptInertRoot(c),(t.call(c,s)||c.hasAttribute("tabindex"))&&this._manageNode(c)}}},{key:"_manageNode",value:function(o){var c=this._inertManager.register(o,this);this._managedNodes.add(c)}},{key:"_unmanageNode",value:function(o){var c=this._inertManager.deregister(o,this);c&&this._managedNodes.delete(c)}},{key:"_unmanageSubtree",value:function(o){var c=this;u(o,function(d){return c._unmanageNode(d)})}},{key:"_adoptInertRoot",value:function(o){var c=this._inertManager.getInertRoot(o);c||(this._inertManager.setInert(o,!0),c=this._inertManager.getInertRoot(o)),c.managedNodes.forEach(function(d){this._manageNode(d.node)},this)}},{key:"_onMutation",value:function(o,c){o.forEach(function(d){var f=d.target;if(d.type==="childList")e.call(d.addedNodes).forEach(function(v){this._makeSubtreeUnfocusable(v)},this),e.call(d.removedNodes).forEach(function(v){this._unmanageSubtree(v)},this);else if(d.type==="attributes"){if(d.attributeName==="tabindex")this._manageNode(f);else if(f!==this._rootElement&&d.attributeName==="inert"&&f.hasAttribute("inert")){this._adoptInertRoot(f);var g=this._inertManager.getInertRoot(f);this._managedNodes.forEach(function(v){f.contains(v.node)&&g._manageNode(v.node)})}}},this)}},{key:"managedNodes",get:function(){return new Set(this._managedNodes)}},{key:"hasSavedAriaHidden",get:function(){return this._savedAriaHidden!==null}},{key:"savedAriaHidden",set:function(o){this._savedAriaHidden=o},get:function(){return this._savedAriaHidden}}]),l}(),r=function(){function l(i,o){A(this,l),this._node=i,this._overrodeFocusMethod=!1,this._inertRoots=new Set([o]),this._savedTabIndex=null,this._destroyed=!1,this.ensureUntabbable()}return H(l,[{key:"destructor",value:function(){if(this._throwIfDestroyed(),this._node&&this._node.nodeType===Node.ELEMENT_NODE){var o=this._node;this._savedTabIndex!==null?o.setAttribute("tabindex",this._savedTabIndex):o.removeAttribute("tabindex"),this._overrodeFocusMethod&&delete o.focus}this._node=null,this._inertRoots=null,this._destroyed=!0}},{key:"_throwIfDestroyed",value:function(){if(this.destroyed)throw new Error("Trying to access destroyed InertNode")}},{key:"ensureUntabbable",value:function(){if(this.node.nodeType===Node.ELEMENT_NODE){var o=this.node;if(t.call(o,s)){if(o.tabIndex===-1&&this.hasSavedTabIndex)return;o.hasAttribute("tabindex")&&(this._savedTabIndex=o.tabIndex),o.setAttribute("tabindex","-1"),o.nodeType===Node.ELEMENT_NODE&&(o.focus=function(){},this._overrodeFocusMethod=!0)}else o.hasAttribute("tabindex")&&(this._savedTabIndex=o.tabIndex,o.removeAttribute("tabindex"))}}},{key:"addInertRoot",value:function(o){this._throwIfDestroyed(),this._inertRoots.add(o)}},{key:"removeInertRoot",value:function(o){this._throwIfDestroyed(),this._inertRoots.delete(o),this._inertRoots.size===0&&this.destructor()}},{key:"destroyed",get:function(){return this._destroyed}},{key:"hasSavedTabIndex",get:function(){return this._savedTabIndex!==null}},{key:"node",get:function(){return this._throwIfDestroyed(),this._node}},{key:"savedTabIndex",set:function(o){this._throwIfDestroyed(),this._savedTabIndex=o},get:function(){return this._throwIfDestroyed(),this._savedTabIndex}}]),l}(),m=function(){function l(i){if(A(this,l),!i)throw new Error("Missing required argument; InertManager needs to wrap a document.");this._document=i,this._managedNodes=new Map,this._inertRoots=new Map,this._observer=new MutationObserver(this._watchForInert.bind(this)),h(i.head||i.body||i.documentElement),i.readyState==="loading"?i.addEventListener("DOMContentLoaded",this._onDocumentLoaded.bind(this)):this._onDocumentLoaded()}return H(l,[{key:"setInert",value:function(o,c){if(c){if(this._inertRoots.has(o))return;var d=new n(o,this);if(o.setAttribute("inert",""),this._inertRoots.set(o,d),!this._document.body.contains(o))for(var f=o.parentNode;f;)f.nodeType===11&&h(f),f=f.parentNode}else{if(!this._inertRoots.has(o))return;var g=this._inertRoots.get(o);g.destructor(),this._inertRoots.delete(o),o.removeAttribute("inert")}}},{key:"getInertRoot",value:function(o){return this._inertRoots.get(o)}},{key:"register",value:function(o,c){var d=this._managedNodes.get(o);return d!==void 0?d.addInertRoot(c):d=new r(o,c),this._managedNodes.set(o,d),d}},{key:"deregister",value:function(o,c){var d=this._managedNodes.get(o);return d?(d.removeInertRoot(c),d.destroyed&&this._managedNodes.delete(o),d):null}},{key:"_onDocumentLoaded",value:function(){var o=e.call(this._document.querySelectorAll("[inert]"));o.forEach(function(c){this.setInert(c,!0)},this),this._observer.observe(this._document.body||this._document.documentElement,{attributes:!0,subtree:!0,childList:!0})}},{key:"_watchForInert",value:function(o,c){var d=this;o.forEach(function(f){switch(f.type){case"childList":e.call(f.addedNodes).forEach(function(b){if(b.nodeType===Node.ELEMENT_NODE){var p=e.call(b.querySelectorAll("[inert]"));t.call(b,"[inert]")&&p.unshift(b),p.forEach(function(_){this.setInert(_,!0)},d)}},d);break;case"attributes":if(f.attributeName!=="inert")return;var g=f.target,v=g.hasAttribute("inert");d.setInert(g,v);break}},this)}}]),l}();function u(l,i,o){if(l.nodeType==Node.ELEMENT_NODE){var c=l;i&&i(c);var d=c.shadowRoot;if(d){u(d,i,d);return}if(c.localName=="content"){for(var f=c,g=f.getDistributedNodes?f.getDistributedNodes():[],v=0;v<g.length;v++)u(g[v],i,o);return}if(c.localName=="slot"){for(var b=c,p=b.assignedNodes?b.assignedNodes({flatten:!0}):[],_=0;_<p.length;_++)u(p[_],i,o);return}}for(var L=l.firstChild;L!=null;)u(L,i,o),L=L.nextSibling}function h(l){if(!l.querySelector("style#inert-style, link#inert-style")){var i=document.createElement("style");i.setAttribute("id","inert-style"),i.textContent=`
|
|
2
2
|
[inert] {
|
|
3
3
|
pointer-events: none;
|
|
4
4
|
cursor: default;
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
-ms-user-select: none;
|
|
11
11
|
user-select: none;
|
|
12
12
|
}
|
|
13
|
-
`,l.appendChild(i)}}if(!HTMLElement.prototype.hasOwnProperty("inert")){var a=new m(document);Object.defineProperty(HTMLElement.prototype,"inert",{enumerable:!0,get:function(){return this.hasAttribute("inert")},set:function(i){a.setInert(this,i)}})}})();var S=(e,t,s=()=>{})=>{let n=document.getElementById(e);if(n){n.classList.remove("modal-view--visible"),n.inert=!0;let r=document.querySelector(".page");r.classList.remove("page--blur"),r.inert=!1,document.querySelector("body")?.classList.remove("body--no-scroll"),t.focus(),t.setAttribute("aria-expanded","false"),s()}},Q=(e,t,s=()=>{},n=!0)=>{let r=document.getElementById(e),m=[];if(r){r.classList.add("modal-view--visible"),r.inert=!1;let u=document.querySelector(".page");u.classList.add("page--blur"),u.inert=!0,document.querySelector("body")?.classList.add("body--no-scroll"),t.setAttribute("aria-expanded","true"),r.focus();let
|
|
13
|
+
`,l.appendChild(i)}}if(!HTMLElement.prototype.hasOwnProperty("inert")){var a=new m(document);Object.defineProperty(HTMLElement.prototype,"inert",{enumerable:!0,get:function(){return this.hasAttribute("inert")},set:function(i){a.setInert(this,i)}})}})();var S=(e,t,s=()=>{})=>{let n=document.getElementById(e);if(n){n.classList.remove("modal-view--visible"),n.inert=!0;let r=document.querySelector(".page");r.classList.remove("page--blur"),r.inert=!1,document.querySelector("body")?.classList.remove("body--no-scroll"),t.focus(),t.setAttribute("aria-expanded","false"),s()}},Q=(e,t,s=()=>{},n=!0)=>{let r=document.getElementById(e),m=[];if(r){r.classList.add("modal-view--visible"),r.inert=!1;let u=document.querySelector(".page");u.classList.add("page--blur"),u.inert=!0,document.querySelector("body")?.classList.add("body--no-scroll"),t.setAttribute("aria-expanded","true"),r.focus();let h=l=>{l.target===r&&S(e,t,s)},a=l=>{l.key==="Escape"&&S(e,t,s)};n&&(r.addEventListener("click",h),window.addEventListener("keyup",a),m.push({element:r,clickEvent:h}),m.push({element:window,keyUpEvent:a}))}return m};var q=e=>{e.querySelectorAll(".content-toggle__toggle").forEach(s=>{let n=s.parentElement?.querySelector(".content-toggle__content");s.setAttribute("aria-expanded","false"),n?.setAttribute("hidden","hidden")})},C=e=>{e.classList.contains("toolbar--no-collapse")||e.classList.remove("toolbar--toggled"),e.classList.remove("toolbar--fully-overflown"),e.classList.remove("toolbar--has-popout");let s=e.querySelector(".toolbar__items")?.children,n="toolbar__item--is-overflown",r="toolbar--has-overflow",m=!1,u=0,h=(a,l)=>{a&&(a.offsetTop>25?(a.classList.add(n),e.classList.add(r),m=!0,u+=1):a.classList.remove(n),m?l-1>=0&&h(s[l-1],l-1):e.classList.remove(r))};h(s[s.length-1],s.length-1),u>0&&u===s.length&&e.classList.add("toolbar--fully-overflown")},le=e=>{let t=[];return e.querySelectorAll(".toolbar__toggle").forEach(n=>{let r=()=>{n?.parentElement?.classList.toggle("toolbar--toggled");let m=n.getAttribute("aria-expanded");if(m!=="true"){let u="a.toolbar__item--is-overflown, button.toolbar__item--is-overflown, input.toolbar__item--is-overflown, select.toolbar__item--is-overflown, .toolbar__item--is-overflown a, .toolbar__item--is-overflown button, .toolbar__item--is-overflown input, .toolbar__item--is-overflown select",h=n?.parentElement?.querySelector(u);h&&setTimeout(()=>{h.focus()},0)}n.setAttribute("aria-expanded",m==="false"?"true":"false")};t.push({element:n,clickEvent:r}),n.addEventListener("click",r)}),t},J=(e,t,s=!0)=>{let n=[];if(C(e),t(e),n=n.concat(le(e)),!s){let r=h=>{!h.target.classList.contains("content-toggle__toggle")&&!y(h,"content-toggle__content")&&t(e)},m=h=>{h.key==="Escape"&&h.target&&h.target.getAttribute("type")!=="search"&&t(e)},u=document.querySelector("body");n.push({element:u,clickEvent:r}),n.push({element:window,keyUpEvent:m}),u?.addEventListener("click",r),window.addEventListener("keyup",m)}return n};var Z=e=>{e.forEach(t=>{t.querySelectorAll(".selection-list").forEach(n=>{n.classList.remove("selection-list--toggled")})})},ee=()=>{let e=[],t=document.querySelectorAll(".selection-list-overlay-container");t.forEach(n=>{let r=n.querySelector("button"),m=()=>{Z(t);let u=r.nextSibling;u&&u.classList.add("selection-list--toggled")};e.push({element:r,clickEvent:m}),r.addEventListener("click",m)});let s=n=>{!n.target.classList.contains("selection-list--overlay")&&!y(n,"selection-list-overlay-container")&&Z(t)};return document.querySelector("body")?.addEventListener("click",s),{pairs:e,element:document.querySelector("body"),clickEvent:s}};var O=e=>{let t=e.querySelector("select"),s=e.querySelector(`label[for="${t?.getAttribute("id")}"]`);if(s){let n=getComputedStyle(s).width;t?.style.setProperty("--label-width",n)}};var te=(e,t)=>{I(t)?e.removeAttribute("hidden"):e.parentElement?.classList.add("truncator--no-truncation")},ne=e=>{let t=e.querySelector(".truncator__expand"),s=e.querySelector(".truncator__content");if(t&&s){t.addEventListener("click",()=>{t.removeAttribute("hidden"),e.classList.add("truncator--no-truncation")}),te(t,s),window.addEventListener("resize",()=>{t.setAttribute("hidden","hidden"),e.classList.remove("truncator--no-truncation"),te(t,s)});let n=s.querySelectorAll(R);n&&n.forEach(r=>{r.addEventListener("focus",()=>{I(r)&&(t.removeAttribute("hidden"),e.classList.add("truncator--no-truncation"))})})}};var M=0;P(()=>{window.top===window.self&&document.querySelector(".atom-picker")&&Y();let e=document.querySelectorAll(".form__field--inline-label--select");e.forEach(a=>{O(a)}),document.querySelectorAll(".nav").forEach(a=>{let l=a.querySelector(".nav__search"),i=a.querySelector(".nav__search-toggle");l&&i&&z(l,i)}),document.querySelectorAll(".copy-to-clipboard").forEach(a=>B(a,document.querySelector("html")?.getAttribute("lang")==="en"?"Copied!":"Kopieret!"));let n=document.querySelectorAll(".horizontal-scroll");n.forEach(a=>{N(a)}),G(),ee();let r=document.querySelectorAll(".sub-nav > button.nav__item");r.forEach(a=>{D(r,a)}),document.querySelectorAll("[data-modal]").forEach(a=>{let l=a.getAttribute("data-modal");document.getElementById(l)?.querySelector(".modal-view__close")?.addEventListener("click",()=>{S(l,a)}),a.addEventListener("click",()=>{Q(l,a)})});let u=document.querySelectorAll(".toolbar");u.forEach(a=>J(a,l=>{q(l)},!1)),document.querySelectorAll(".truncator").forEach(a=>ne(a)),document.documentElement.style.setProperty("--window-inner-height",`${window.innerHeight}px`),k(),window.addEventListener("load",()=>{M=window.innerWidth}),window.addEventListener("resize",()=>{M>0&&window.innerWidth!==M&&(M=window.innerWidth,e.forEach(a=>{O(a)}),u.forEach(a=>{q(a),C(a)}),k(),n.forEach(a=>{a.classList.remove("horizontal-scroll--no-overflow"),N(a)})),document.documentElement.style.setProperty("--window-inner-height",`${window.innerHeight}px`)})});})();
|
|
14
14
|
//# sourceMappingURL=demo.js.map
|