@uh-design-system/component-library 0.2.4 → 0.4.0
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/dist/cjs/attributes-f7831329.js +78 -0
- package/dist/cjs/component-library.cjs.js +3 -3
- package/dist/cjs/{ds-accordion_2.cjs.entry.js → ds-accordion_3.cjs.entry.js} +419 -241
- package/dist/cjs/ds-link-with-arrow.cjs.entry.js +47 -0
- package/dist/cjs/ds-link.cjs.entry.js +54 -0
- package/dist/cjs/ds-text-input.cjs.entry.js +12 -16
- package/dist/cjs/ds-visually-hidden.cjs.entry.js +20 -0
- package/dist/cjs/{index-fd4f6cd2.js → index-bfa0f441.js} +17 -11
- package/dist/cjs/linkUtils-695da37c.js +16 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/utils-8b73aa91.js +10 -0
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/00-foundations/icons/categories/arrows.js +6 -0
- package/dist/collection/components/00-foundations/icons/categories/information.js +12 -0
- package/dist/collection/components/00-foundations/icons/categories/media.js +4 -0
- package/dist/collection/components/00-foundations/icons/categories/social.js +17 -0
- package/dist/collection/components/00-foundations/icons/iconList.js +2 -0
- package/dist/collection/components/00-foundations/typography/stories/typography.stories.js +110 -0
- package/dist/collection/components/01-base-components/ds-accordion/ds-accordion.css +101 -82
- package/dist/collection/components/01-base-components/ds-accordion/ds-accordion.js +41 -9
- package/dist/collection/components/01-base-components/ds-accordion/stories/ds-accordion.examples.stories.js +15 -0
- package/dist/collection/components/01-base-components/ds-accordion/stories/ds-accordion.features.stories.js +1 -1
- package/dist/collection/components/01-base-components/ds-accordion/stories/ds-accordion.stories.js +10 -1
- package/dist/collection/components/01-base-components/ds-button/ds-button.css +168 -104
- package/dist/collection/components/01-base-components/ds-button/ds-button.js +23 -2
- package/dist/collection/components/01-base-components/ds-button/stories/ds-button.examples.stories.js +6 -0
- package/dist/collection/components/01-base-components/ds-button/stories/ds-button.features.stories.js +13 -7
- package/dist/collection/components/01-base-components/ds-icon/ds-icon.css +5 -1
- package/dist/collection/components/01-base-components/ds-icon/ds-icon.js +8 -5
- package/dist/collection/components/01-base-components/ds-icon/ds-icon.stories.js +2 -2
- package/dist/collection/components/01-base-components/ds-link/ds-link.css +224 -0
- package/dist/collection/components/01-base-components/ds-link/ds-link.js +281 -0
- package/dist/collection/components/01-base-components/ds-link/stories/ds-link.examples.stories.js +53 -0
- package/dist/collection/components/01-base-components/ds-link/stories/ds-link.features.stories.js +73 -0
- package/dist/collection/components/01-base-components/ds-link/stories/ds-link.stories.js +72 -0
- package/dist/collection/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.css +208 -0
- package/dist/collection/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.js +161 -0
- package/dist/collection/components/01-base-components/ds-link-with-arrow/stories/ds-arrow-link.examples.stories.js +33 -0
- package/dist/collection/components/01-base-components/ds-link-with-arrow/stories/ds-arrow-link.features.stories.js +19 -0
- package/dist/collection/components/01-base-components/ds-link-with-arrow/stories/ds-arrow-link.stories.js +40 -0
- package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.css +72 -48
- package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.js +44 -4
- package/dist/collection/components/01-base-components/ds-text-input/{ds-text-input.examples.stories.js → stories/ds-text-input.examples.stories.js} +13 -0
- package/dist/collection/components/01-base-components/ds-text-input/{ds-text-input.features.stories.js → stories/ds-text-input.features.stories.js} +18 -4
- package/dist/collection/components/01-base-components/ds-text-input/{ds-text-input.stories.js → stories/ds-text-input.stories.js} +2 -2
- package/dist/collection/components/01-base-components/ds-visually-hidden/ds-visually-hidden.js +1 -1
- package/dist/collection/introduction/introduction.stories.js +9 -0
- package/dist/collection/utils/link/linkUtils.js +11 -0
- package/dist/collection/utils/typography/typographyUtils.js +21 -0
- package/dist/collection/utils/utils.js +5 -0
- package/dist/component-library/attributes-9419ac39.js +1 -0
- package/dist/component-library/component-library.css +1 -1
- package/dist/component-library/component-library.esm.js +1 -1
- package/dist/component-library/ds-accordion_3.entry.js +1 -0
- package/dist/component-library/ds-link-with-arrow.entry.js +1 -0
- package/dist/component-library/ds-link.entry.js +1 -0
- package/dist/component-library/ds-text-input.entry.js +1 -1
- package/dist/component-library/ds-visually-hidden.entry.js +1 -0
- package/dist/component-library/{index-4200d514.js → index-42701395.js} +2 -2
- package/dist/component-library/linkUtils-3d1b28cf.js +1 -0
- package/dist/component-library/utils-cca2a41a.js +1 -0
- package/dist/components/attributes.js +154 -0
- package/dist/components/ds-accordion.js +31 -12
- package/dist/components/ds-button2.js +6 -78
- package/dist/components/ds-icon2.js +320 -231
- package/dist/components/ds-link-with-arrow.d.ts +11 -0
- package/dist/components/ds-link-with-arrow.js +78 -0
- package/dist/components/ds-link.d.ts +11 -0
- package/dist/components/ds-link.js +90 -0
- package/dist/components/ds-text-input.js +11 -13
- package/dist/components/ds-visually-hidden2.js +1 -1
- package/dist/components/index2.js +7 -10
- package/dist/components/linkUtils.js +13 -0
- package/dist/components/utils.js +8 -0
- package/dist/esm/attributes-9419ac39.js +75 -0
- package/dist/esm/component-library.js +4 -4
- package/dist/esm/{ds-accordion_2.entry.js → ds-accordion_3.entry.js} +419 -242
- package/dist/esm/ds-link-with-arrow.entry.js +43 -0
- package/dist/esm/ds-link.entry.js +50 -0
- package/dist/esm/ds-text-input.entry.js +8 -12
- package/dist/esm/ds-visually-hidden.entry.js +16 -0
- package/dist/esm/{index-4200d514.js → index-42701395.js} +17 -11
- package/dist/esm/linkUtils-3d1b28cf.js +13 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/utils-cca2a41a.js +8 -0
- package/dist/types/components/00-foundations/icons/categories/social.d.ts +5 -0
- package/dist/types/components/00-foundations/typography/stories/typography.stories.d.ts +9 -0
- package/dist/types/components/01-base-components/ds-accordion/ds-accordion.d.ts +2 -0
- package/dist/types/components/01-base-components/ds-accordion/stories/ds-accordion.examples.stories.d.ts +1 -0
- package/dist/types/components/01-base-components/ds-button/ds-button.d.ts +1 -0
- package/dist/types/components/01-base-components/ds-button/stories/ds-button.examples.stories.d.ts +1 -0
- package/dist/types/components/01-base-components/ds-button/stories/ds-button.features.stories.d.ts +3 -0
- package/dist/types/components/01-base-components/ds-icon/ds-icon.d.ts +1 -1
- package/dist/types/components/01-base-components/ds-link/ds-link.d.ts +25 -0
- package/dist/types/components/01-base-components/ds-link/stories/ds-link.examples.stories.d.ts +11 -0
- package/dist/types/components/01-base-components/ds-link/stories/ds-link.features.stories.d.ts +11 -0
- package/dist/types/components/01-base-components/ds-link/stories/ds-link.stories.d.ts +7 -0
- package/dist/types/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.d.ts +18 -0
- package/dist/types/components/01-base-components/ds-link-with-arrow/stories/ds-arrow-link.examples.stories.d.ts +7 -0
- package/dist/types/components/01-base-components/ds-link-with-arrow/stories/ds-arrow-link.features.stories.d.ts +7 -0
- package/dist/types/components/01-base-components/ds-link-with-arrow/stories/ds-arrow-link.stories.d.ts +7 -0
- package/dist/types/components/01-base-components/ds-text-input/ds-text-input.d.ts +2 -0
- package/dist/types/components/01-base-components/ds-text-input/{ds-text-input.examples.stories.d.ts → stories/ds-text-input.examples.stories.d.ts} +2 -1
- package/dist/types/components/01-base-components/ds-text-input/{ds-text-input.features.stories.d.ts → stories/ds-text-input.features.stories.d.ts} +4 -1
- package/dist/types/components/01-base-components/ds-text-input/{ds-text-input.stories.d.ts → stories/ds-text-input.stories.d.ts} +1 -1
- package/dist/types/components.d.ts +66 -2
- package/dist/types/introduction/introduction.stories.d.ts +10 -0
- package/dist/types/utils/link/linkUtils.d.ts +2 -0
- package/dist/types/utils/typography/typographyUtils.d.ts +1 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +2 -4
- package/dist/cjs/ds-button_2.cjs.entry.js +0 -170
- package/dist/component-library/ds-accordion_2.entry.js +0 -1
- package/dist/component-library/ds-button_2.entry.js +0 -1
- package/dist/components/index3.js +0 -80
- package/dist/esm/ds-button_2.entry.js +0 -165
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var t=Object.defineProperty,e=(t,e)=>{var n;Object.entries(null!=(n=e.o.t)?n:{}).map((([n,[o]])=>{if(31&o||32&o){const o=t[n],l=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),n);Object.defineProperty(t,n,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.l.has(n)?e.l.get(n):o}}))},n=new WeakMap,o=t=>n.get(t),l=(t,o)=>{n.set(o.i=t,o),e(t,o)},s=(t,e)=>e in t,i=(t,e)=>(0,console.error)(t,e),r=new Map,c=new Map,u="slot-fb{display:contents}slot-fb[hidden]{display:none}",f="http://www.w3.org/1999/xlink",a="undefined"!=typeof window?window:{},d=a.document||{head:{}},h={u:0,h:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},p=t=>Promise.resolve(t),v=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),m=!1,y=[],$=[],b=(t,e)=>n=>{t.push(n),m||(m=!0,e&&4&h.u?S(g):h.raf(g))},w=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){i(t)}t.length=0},g=()=>{w(y),w($),(m=y.length>0)&&h.raf(g)},S=t=>p().then(t),j=b($,!0),O=t=>"object"==(t=typeof t)||"function"===t;function k(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>C,map:()=>x,ok:()=>E,unwrap:()=>M,unwrapErr:()=>T});var E=t=>({isOk:!0,isErr:!1,value:t}),C=t=>({isOk:!1,isErr:!0,value:t});function x(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>E(t))):E(n)}if(t.isErr)return C(t.value);throw"should never get here"}var M=t=>{if(t.isOk)return t.value;throw t.value},T=t=>{if(t.isErr)return t.value;throw t.value},P=t=>{const e=t.__childNodes||t.childNodes;t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&F(e,t.tagName).forEach((t=>{var e;1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!(null==(e=N(t,t["s-sn"],!1))?void 0:e.length))}));for(const t of e)1===t.nodeType&&(t.__childNodes||t.childNodes).length&&P(t)};function F(t,e,n){let o,l=0,s=[];for(;l<t.length;l++){if(o=t[l],o["s-sr"]&&o["s-hn"]===e&&(void 0===n||o["s-sn"]===n)&&(s.push(o),void 0!==n))return s;s=[...s,...F(o.childNodes,e,n)]}return s}var R,A,L,N=(t,e,n=!0)=>{const o=[];for((n&&t["s-sr"]||!t["s-sr"])&&o.push(t);(t=t.nextSibling)&&t["s-sn"]===e;)o.push(t);return o},H=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,B=(t,e,...n)=>{let o=null,l=null,s=null,i=!1,r=!1;const c=[],u=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?u(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!O(o))&&(o+=""),i&&r?c[c.length-1].p+=o:c.push(i?D(null,o):o),r=i)};if(u(n),e){e.key&&(l=e.key),e.name&&(s=e.name);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,c,W);const f=D(t,null);return f.v=e,c.length>0&&(f.m=c),f.$=l,f.S=s,f},D=(t,e)=>({u:0,j:t,p:e,O:null,m:null,v:null,$:null,S:null}),U={},W={forEach:(t,e)=>t.map(V).forEach(e),map:(t,e)=>t.map(V).map(e).map(q)},V=t=>({vattrs:t.v,vchildren:t.m,vkey:t.$,vname:t.S,vtag:t.j,vtext:t.p}),q=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),B(t.vtag,e,...t.vchildren||[])}const e=D(t.vtag,t.vtext);return e.v=t.vattrs,e.m=t.vchildren,e.$=t.vkey,e.S=t.vname,e},G=(t,e)=>null==t||O(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t,_=t=>o(t).$hostElement$,z=new WeakMap,I=t=>"sc-"+t.k,J=(t,e,n,o,l,i)=>{if(n!==o){let r=s(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,l=Q(n);let s=Q(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}else if("style"===e){for(const e in n)o&&null!=o[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in o)n&&o[e]===n[e]||(e.includes("-")?t.style.setProperty(e,o[e]):t.style[e]=o[e])}else if("key"===e);else if("ref"===e)o&&o(t);else if(r||"o"!==e[0]||"n"!==e[1]){const s=O(o);if((r||s&&null!==o)&&!l)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?r=!1:null!=n&&t[e]==l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}let u=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(e=c,u=!0),null==o||!1===o?!1===o&&""!==t.getAttribute(e)||(u?t.removeAttributeNS(f,e):t.removeAttribute(e)):(!r||4&i||l)&&!s&&(o=!0===o?"":o,u?t.setAttributeNS(f,e,o):t.setAttribute(e,o))}else if(e="-"===e[2]?e.slice(3):s(a,c)?c.slice(2):c[2]+e.slice(3),n||o){const l=e.endsWith(X);e=e.replace(Y,""),n&&h.rel(t,e,n,l),o&&h.ael(t,e,o,l)}}},K=/\s/,Q=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(K):[]),X="Capture",Y=RegExp(X+"$"),Z=(t,e,n)=>{const o=11===e.O.nodeType&&e.O.host?e.O.host:e.O,l=t&&t.v||{},s=e.v||{};for(const t of tt(Object.keys(l)))t in s||J(o,t,l[t],void 0,n,e.u);for(const t of tt(Object.keys(s)))J(o,t,l[t],s[t],n,e.u)};function tt(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var et=!1,nt=!1,ot=!1,lt=!1,st=(t,e,n)=>{var o;const l=e.m[n];let s,i,r,c=0;if(et||(ot=!0,"slot"===l.j&&(l.u|=l.m?2:1)),null!==l.p)s=l.O=d.createTextNode(l.p);else if(1&l.u)s=l.O=d.createTextNode("");else if(s=l.O=d.createElement(!et&&2&l.u?"slot-fb":l.j),Z(null,l,lt),null!=R&&void 0!==R&&s["s-si"]!==R&&s.classList.add(s["s-si"]=R),l.m)for(c=0;c<l.m.length;++c)i=st(t,l,c),i&&s.appendChild(i);return s["s-hn"]=L,3&l.u&&(s["s-sr"]=!0,s["s-cr"]=A,s["s-sn"]=l.S||"",s["s-rf"]=null==(o=l.v)?void 0:o.ref,r=t&&t.m&&t.m[n],r&&r.j===l.j&&t.O&&it(t.O,!1),mt(A,s,e.O,null==t?void 0:t.O)),s},it=(t,e)=>{h.u|=1;const n=Array.from(t.__childNodes||t.childNodes);for(let t=n.length-1;t>=0;t--){const o=n[t];o["s-hn"]!==L&&o["s-ol"]&&(vt(ft(o).parentNode,o,ft(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,ot=!0),e&&it(o,e)}h.u&=-2},rt=(t,e,n,o,l,s)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for(r.shadowRoot&&r.tagName===L&&(r=r.shadowRoot);l<=s;++l)o[l]&&(i=st(null,n,l),i&&(o[l].O=i,vt(r,i,ft(e))))},ct=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;pt(e),t&&(nt=!0,t["s-ol"]?t["s-ol"].remove():it(t,!0),t.remove())}}},ut=(t,e,n=!1)=>t.j===e.j&&("slot"===t.j?t.S===e.S:n?(n&&!t.$&&e.$&&(t.$=e.$),!0):t.$===e.$),ft=t=>t&&t["s-ol"]||t,at=(t,e,n=!1)=>{const o=e.O=t.O,l=t.m,s=e.m,i=e.p;let r;null===i?(("slot"!==e.j||et)&&Z(t,e,lt),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],h=e[a],p=o.length-1,v=o[0],m=o[p];for(;r<=a&&c<=p;)if(null==d)d=e[++r];else if(null==h)h=e[--a];else if(null==v)v=o[++c];else if(null==m)m=o[--p];else if(ut(d,v,l))at(d,v,l),d=e[++r],v=o[++c];else if(ut(h,m,l))at(h,m,l),h=e[--a],m=o[--p];else if(ut(d,m,l))"slot"!==d.j&&"slot"!==m.j||it(d.O.parentNode,!1),at(d,m,l),vt(t,d.O,h.O.nextSibling),d=e[++r],m=o[--p];else if(ut(h,v,l))"slot"!==d.j&&"slot"!==m.j||it(h.O.parentNode,!1),at(h,v,l),vt(t,h.O,d.O),h=e[--a],v=o[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].$&&e[f].$===v.$){u=f;break}u>=0?(i=e[u],i.j!==v.j?s=st(e&&e[c],n,u):(at(i,v,l),e[u]=void 0,s=i.O),v=o[++c]):(s=st(e&&e[c],n,c),v=o[++c]),s&&vt(ft(d.O).parentNode,s,ft(d.O))}r>a?rt(t,null==o[p+1]?null:o[p+1].O,n,o,c,p):c>p&&ct(e,r,a)})(o,l,e,s,n):null!==s?(null!==t.p&&(o.textContent=""),rt(o,null,e,s,0,s.length-1)):!n&&null!==l&&ct(l,0,l.length-1)):(r=o["s-cr"])?r.parentNode.textContent=i:t.p!==i&&(o.data=i)},dt=[],ht=t=>{let e,n,o;const l=t.__childNodes||t.childNodes;for(const t of l){if(t["s-sr"]&&(e=t["s-cr"])&&e.parentNode){n=e.parentNode.__childNodes||e.parentNode.childNodes;const l=t["s-sn"];for(o=n.length-1;o>=0;o--)if(e=n[o],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==t["s-hn"])if(H(e,l)){let n=dt.find((t=>t.C===e));nt=!0,e["s-sn"]=e["s-sn"]||l,n?(n.C["s-sh"]=t["s-hn"],n.M=t):(e["s-sh"]=t["s-hn"],dt.push({M:t,C:e})),e["s-sr"]&&dt.map((t=>{H(t.C,e["s-sn"])&&(n=dt.find((t=>t.C===e)),n&&!t.M&&(t.M=n.M))}))}else dt.some((t=>t.C===e))||dt.push({C:e})}1===t.nodeType&&ht(t)}},pt=t=>{t.v&&t.v.ref&&t.v.ref(null),t.m&&t.m.map(pt)},vt=(t,e,n)=>("string"==typeof e["s-sn"]&&e["s-sr"]&&e["s-cr"]&&mt(e["s-cr"],e,t,e.parentElement),null==t?void 0:t.insertBefore(e,n));function mt(t,e,n,o){var l;let s;if(t&&"string"==typeof e["s-sn"]&&e["s-sr"]&&t.parentNode&&t.parentNode["s-sc"]&&(s=e["s-si"]||t.parentNode["s-sc"])){const t=e["s-sn"],i=e["s-hn"];if(null==(l=n.classList)||l.add(s+"-s"),o&&o.classList.contains(s+"-s")){let e=(o.__childNodes||o.childNodes)[0],n=!1;for(;e;){if(e["s-sn"]!==t&&e["s-hn"]===i&&e["s-sr"]){n=!0;break}e=e.nextSibling}n||o.classList.remove(s+"-s")}}}var yt=(t,e)=>{if(e&&!t.T&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.T=()=>{e["s-p"].splice(n-1,1),o()})))}},$t=(t,e)=>{if(t.u|=16,!(4&t.u))return yt(t,t.P),j((()=>bt(t,e)));t.u|=512},bt=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e&&(l=Et(o,"componentWillLoad",void 0,n)),wt(l,(()=>St(t,o,e)))},wt=(t,e)=>gt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),gt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,St=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,l=((t,e)=>{var n;const o=I(e),l=c.get(o);if(t=11===t.nodeType?t:d,l)if("string"==typeof l){let s,i=z.get(t=t.head||t);if(i||z.set(t,i=new Set),!i.has(o)){{s=document.querySelector(`[sty-id="${o}"]`)||d.createElement("style"),s.innerHTML=l;const i=null!=(n=h.F)?n:k(d);if(null!=i&&s.setAttribute("nonce",i),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(v){const e=new CSSStyleSheet;e.replaceSync(l),t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=l+e.innerHTML:t.prepend(s)}else t.append(s);1&e.u&&"HEAD"!==t.nodeName&&t.insertBefore(s,null)}4&e.u&&(s.innerHTML+=u),i&&i.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&2&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);jt(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>Ot(t);0===e.length?n():(Promise.all(e).then(n),t.u|=4,e.length=0)}},jt=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{var o,l,s,i;const r=t.$hostElement$,c=t.o,u=t.R||D(null,null),f=(t=>t&&t.j===U)(e)?e:B(null,null,e);if(L=r.tagName,n&&f.v)for(const t of Object.keys(f.v))r.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(f.v[t]=r[t]);if(f.j=null,f.u|=4,t.R=f,f.O=u.O=r.shadowRoot||r,R=r["s-sc"],et=!!(1&c.u),A=r["s-cr"],nt=!1,at(u,f,n),h.u|=1,ot){ht(f.O);for(const t of dt){const e=t.C;if(!e["s-ol"]){const t=d.createTextNode("");t["s-nr"]=e,vt(e.parentNode,e["s-ol"]=t,e)}}for(const t of dt){const e=t.C,r=t.M;if(r){const t=r.parentNode;let n=r.nextSibling;{let s=null==(o=e["s-ol"])?void 0:o.previousSibling;for(;s;){let o=null!=(l=s["s-nr"])?l:null;if(o&&o["s-sn"]===e["s-sn"]&&t===(o.__parentNode||o.parentNode)){for(o=o.nextSibling;o===e||(null==o?void 0:o["s-sr"]);)o=null==o?void 0:o.nextSibling;if(!o||!o["s-nr"]){n=o;break}}s=s.previousSibling}}(!n&&t!==(e.__parentNode||e.parentNode)||(e.__nextSibling||e.nextSibling)!==n)&&e!==n&&(!e["s-hn"]&&e["s-ol"]&&(e["s-hn"]=e["s-ol"].parentNode.nodeName),vt(t,e,n),1===e.nodeType&&"SLOT-FB"!==e.tagName&&(e.hidden=null!=(s=e["s-ih"])&&s)),e&&"function"==typeof r["s-rf"]&&r["s-rf"](e)}else 1===e.nodeType&&(n&&(e["s-ih"]=null!=(i=e.hidden)&&i),e.hidden=!0)}}nt&&P(f.O),h.u&=-2,dt.length=0,A=void 0})(t,e,o)}catch(e){i(e,t.$hostElement$)}return null},Ot=t=>{const e=t.$hostElement$,n=t.P;64&t.u||(t.u|=64,Ct(e),t.A(e),n||kt()),t.L(e),t.T&&(t.T(),t.T=void 0),512&t.u&&S((()=>$t(t,!1))),t.u&=-517},kt=()=>{Ct(d.documentElement),S((()=>(t=>{const e=h.ce("appload",{detail:{namespace:"component-library"}});return t.dispatchEvent(e),e})(a)))},Et=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){i(t,o)}},Ct=t=>t.classList.add("hydrated"),xt=(t,e,n,l)=>{const s=o(t);if(!s)throw Error(`Couldn't find host element for "${l.k}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const r=s.$hostElement$,c=s.l.get(e),u=s.u,f=s.i;if(n=G(n,l.t[e][0]),(!(8&u)||void 0===c)&&n!==c&&(!Number.isNaN(c)||!Number.isNaN(n))&&(s.l.set(e,n),f)){if(l.N&&128&u){const t=l.N[e];t&&t.map((t=>{try{f[t](n,c,e)}catch(t){i(t,r)}}))}2==(18&u)&&$t(s,!1)}},Mt=(t,e,n)=>{var l,s;const i=t.prototype;if(e.t||e.N||t.watchers){t.watchers&&!e.N&&(e.N=t.watchers);const r=Object.entries(null!=(l=e.t)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&n&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(e.t[t][0]|=2048),r&&(e.t[t][0]|=4096),(1&n||!s)&&Object.defineProperty(i,t,{get(){{if(!(2048&e.t[t][0]))return((t,e)=>o(this).l.get(e))(0,t);const n=o(this),l=n?n.i:i;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(s){const i=o(this);if(r){const n=32&l?this[t]:i.$hostElement$[t];return void 0===n&&i.l.get(t)?s=i.l.get(t):!i.l.get(t)&&n&&i.l.set(t,n),r.call(this,G(s,l)),void xt(this,t,s=32&l?this[t]:i.$hostElement$[t],e)}{if(!(1&n&&4096&e.t[t][0]))return xt(this,t,s,e),void(1&n&&!i.i&&i.H.then((()=>{4096&e.t[t][0]&&i.i[t]!==i.l.get(t)&&(i.i[t]=s)})));const o=()=>{const n=i.i[t];!i.l.get(t)&&n&&i.l.set(t,n),i.i[t]=G(s,l),xt(this,t,i.i[t],e)};i.i?o():i.H.then((()=>o()))}}})}else 1&n&&64&l&&Object.defineProperty(i,t,{value(...e){var n;const l=o(this);return null==(n=null==l?void 0:l.B)?void 0:n.then((()=>{var n;return null==(n=l.i)?void 0:n[t](...e)}))}})})),1&n){const n=new Map;i.attributeChangedCallback=function(t,l,s){h.jmp((()=>{var r;const c=n.get(t);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const n=o(this),i=null==n?void 0:n.u;if(i&&!(8&i)&&128&i&&s!==l){const o=n.i,i=null==(r=e.N)?void 0:r[t];null==i||i.forEach((e=>{null!=o[e]&&o[e].call(o,s,l,t)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.N)?s:{}),...r.filter((([t,e])=>15&e[0])).map((([t,e])=>{const o=e[1]||t;return n.set(o,t),o}))]))}}return t},Tt=(t,e={})=>{var l;const s=[],f=e.exclude||[],p=a.customElements,m=d.head,y=m.querySelector("meta[charset]"),$=d.createElement("style"),b=[];let w,g=!0;Object.assign(h,e),h.h=new URL(e.resourcesUrl||"./",d.baseURI).href;let S=!1;if(t.map((t=>{t[1].map((e=>{var l;const u={u:e[0],k:e[1],t:e[2],D:e[3]};4&u.u&&(S=!0),u.t=e[2],u.N=null!=(l=e[4])?l:{};const a=u.k,m=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,e)=>{const o={u:0,$hostElement$:t,o:e,l:new Map};o.B=new Promise((t=>o.L=t)),o.H=new Promise((t=>o.A=t)),t["s-p"]=[],t["s-rc"]=[],n.set(t,o)})(t=this,u),1&u.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${u.k}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),w&&(clearTimeout(w),w=null),g?b.push(this):h.jmp((()=>(t=>{if(!(1&h.u)){const e=o(t),n=e.o,l=()=>{};if(1&e.u)(null==e?void 0:e.i)||(null==e?void 0:e.H)&&e.H.then((()=>{}));else{e.u|=1,12&n.u&&(t=>{const e=t["s-cr"]=d.createComment("");e["s-cn"]=!0,vt(t,e,t.firstChild)})(t);{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){yt(e,e.P=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.u)){e.u|=32;{const l=((t,e)=>{const n=t.k.replace(/-/g,"_"),o=t.U;if(!o)return;const l=r.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(r.set(o,t),t[n])),(t=>{i(t,e.$hostElement$)}))
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.k}#${e.
|
|
1
|
+
var t=Object.defineProperty,e=(t,e)=>{var n;Object.entries(null!=(n=e.o.t)?n:{}).map((([n,[o]])=>{if(31&o||32&o){const o=t[n],l=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),n);Object.defineProperty(t,n,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.l.has(n)?e.l.get(n):o}}))},n=new WeakMap,o=t=>n.get(t),l=(t,o)=>{n.set(o.i=t,o),e(t,o)},s=(t,e)=>e in t,i=(t,e)=>(0,console.error)(t,e),r=new Map,c=new Map,u="slot-fb{display:contents}slot-fb[hidden]{display:none}",f="http://www.w3.org/1999/xlink",a="undefined"!=typeof window?window:{},d=a.document||{head:{}},h={u:0,h:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},v=t=>Promise.resolve(t),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),m=!1,y=[],$=[],b=(t,e)=>n=>{t.push(n),m||(m=!0,e&&4&h.u?S(g):h.raf(g))},w=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){i(t)}t.length=0},g=()=>{w(y),w($),(m=y.length>0)&&h.raf(g)},S=t=>v().then(t),j=b($,!0),O=t=>"object"==(t=typeof t)||"function"===t;function k(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>C,map:()=>x,ok:()=>E,unwrap:()=>M,unwrapErr:()=>T});var E=t=>({isOk:!0,isErr:!1,value:t}),C=t=>({isOk:!1,isErr:!0,value:t});function x(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>E(t))):E(n)}if(t.isErr)return C(t.value);throw"should never get here"}var M=t=>{if(t.isOk)return t.value;throw t.value},T=t=>{if(t.isErr)return t.value;throw t.value},P=t=>{const e=t.__childNodes||t.childNodes;t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&F(e,t.tagName).forEach((t=>{var e;1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!(null==(e=N(t,t["s-sn"],!1))?void 0:e.length))}));for(const t of e)1===t.nodeType&&(t.__childNodes||t.childNodes).length&&P(t)};function F(t,e,n){let o,l=0,s=[];for(;l<t.length;l++){if(o=t[l],o["s-sr"]&&o["s-hn"]===e&&(void 0===n||o["s-sn"]===n)&&(s.push(o),void 0!==n))return s;s=[...s,...F(o.childNodes,e,n)]}return s}var R,L,A,N=(t,e,n=!0)=>{const o=[];for((n&&t["s-sr"]||!t["s-sr"])&&o.push(t);(t=t.nextSibling)&&t["s-sn"]===e;)o.push(t);return o},B=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,H=(t,e,...n)=>{let o=null,l=null,s=null,i=!1,r=!1;const c=[],u=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?u(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!O(o))&&(o+=""),i&&r?c[c.length-1].v+=o:c.push(i?U(null,o):o),r=i)};if(u(n),e){e.key&&(l=e.key),e.name&&(s=e.name);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,c,D);const f=U(t,null);return f.p=e,c.length>0&&(f.m=c),f.$=l,f.S=s,f},U=(t,e)=>({u:0,j:t,v:e,O:null,m:null,p:null,$:null,S:null}),W={},D={forEach:(t,e)=>t.map(V).forEach(e),map:(t,e)=>t.map(V).map(e).map(q)},V=t=>({vattrs:t.p,vchildren:t.m,vkey:t.$,vname:t.S,vtag:t.j,vtext:t.v}),q=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),H(t.vtag,e,...t.vchildren||[])}const e=U(t.vtag,t.vtext);return e.p=t.vattrs,e.m=t.vchildren,e.$=t.vkey,e.S=t.vname,e},G=(t,e)=>null==t||O(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t,_=t=>o(t).$hostElement$,z=new WeakMap,I=t=>"sc-"+t.k,J=(t,e,n,o,l,i)=>{if(n!==o){let r=s(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,l=Q(n);let s=Q(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}else if("style"===e){for(const e in n)o&&null!=o[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in o)n&&o[e]===n[e]||(e.includes("-")?t.style.setProperty(e,o[e]):t.style[e]=o[e])}else if("key"===e);else if("ref"===e)o&&o(t);else if(r||"o"!==e[0]||"n"!==e[1]){const s=O(o);if((r||s&&null!==o)&&!l)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?r=!1:null!=n&&t[e]==l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}let u=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(e=c,u=!0),null==o||!1===o?!1===o&&""!==t.getAttribute(e)||(u?t.removeAttributeNS(f,e):t.removeAttribute(e)):(!r||4&i||l)&&!s&&(o=!0===o?"":o,u?t.setAttributeNS(f,e,o):t.setAttribute(e,o))}else if(e="-"===e[2]?e.slice(3):s(a,c)?c.slice(2):c[2]+e.slice(3),n||o){const l=e.endsWith(X);e=e.replace(Y,""),n&&h.rel(t,e,n,l),o&&h.ael(t,e,o,l)}}},K=/\s/,Q=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(K):[]),X="Capture",Y=RegExp(X+"$"),Z=(t,e,n)=>{const o=11===e.O.nodeType&&e.O.host?e.O.host:e.O,l=t&&t.p||{},s=e.p||{};for(const t of tt(Object.keys(l)))t in s||J(o,t,l[t],void 0,n,e.u);for(const t of tt(Object.keys(s)))J(o,t,l[t],s[t],n,e.u)};function tt(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var et=!1,nt=!1,ot=!1,lt=!1,st=(t,e,n)=>{var o;const l=e.m[n];let s,i,r,c=0;if(et||(ot=!0,"slot"===l.j&&(l.u|=l.m?2:1)),null!==l.v)s=l.O=d.createTextNode(l.v);else if(1&l.u)s=l.O=d.createTextNode("");else if(s=l.O=d.createElement(!et&&2&l.u?"slot-fb":l.j),Z(null,l,lt),null!=R&&void 0!==R&&s["s-si"]!==R&&s.classList.add(s["s-si"]=R),l.m)for(c=0;c<l.m.length;++c)i=st(t,l,c),i&&s.appendChild(i);return s["s-hn"]=A,3&l.u&&(s["s-sr"]=!0,s["s-cr"]=L,s["s-sn"]=l.S||"",s["s-rf"]=null==(o=l.p)?void 0:o.ref,r=t&&t.m&&t.m[n],r&&r.j===l.j&&t.O&&it(t.O,!1),mt(L,s,e.O,null==t?void 0:t.O)),s},it=(t,e)=>{h.u|=1;const n=Array.from(t.__childNodes||t.childNodes);for(let t=n.length-1;t>=0;t--){const o=n[t];o["s-hn"]!==A&&o["s-ol"]&&(pt(ft(o).parentNode,o,ft(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,ot=!0),e&&it(o,e)}h.u&=-2},rt=(t,e,n,o,l,s)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for(r.shadowRoot&&r.tagName===A&&(r=r.shadowRoot);l<=s;++l)o[l]&&(i=st(null,n,l),i&&(o[l].O=i,pt(r,i,ft(e))))},ct=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;vt(e),t&&(nt=!0,t["s-ol"]?t["s-ol"].remove():it(t,!0),t.remove())}}},ut=(t,e,n=!1)=>t.j===e.j&&("slot"===t.j?t.S===e.S:n?(n&&!t.$&&e.$&&(t.$=e.$),!0):t.$===e.$),ft=t=>t&&t["s-ol"]||t,at=(t,e,n=!1)=>{const o=e.O=t.O,l=t.m,s=e.m,i=e.v;let r;null===i?(("slot"!==e.j||et)&&Z(t,e,lt),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],h=e[a],v=o.length-1,p=o[0],m=o[v];for(;r<=a&&c<=v;)if(null==d)d=e[++r];else if(null==h)h=e[--a];else if(null==p)p=o[++c];else if(null==m)m=o[--v];else if(ut(d,p,l))at(d,p,l),d=e[++r],p=o[++c];else if(ut(h,m,l))at(h,m,l),h=e[--a],m=o[--v];else if(ut(d,m,l))"slot"!==d.j&&"slot"!==m.j||it(d.O.parentNode,!1),at(d,m,l),pt(t,d.O,h.O.nextSibling),d=e[++r],m=o[--v];else if(ut(h,p,l))"slot"!==d.j&&"slot"!==m.j||it(h.O.parentNode,!1),at(h,p,l),pt(t,h.O,d.O),h=e[--a],p=o[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].$&&e[f].$===p.$){u=f;break}u>=0?(i=e[u],i.j!==p.j?s=st(e&&e[c],n,u):(at(i,p,l),e[u]=void 0,s=i.O),p=o[++c]):(s=st(e&&e[c],n,c),p=o[++c]),s&&pt(ft(d.O).parentNode,s,ft(d.O))}r>a?rt(t,null==o[v+1]?null:o[v+1].O,n,o,c,v):c>v&&ct(e,r,a)})(o,l,e,s,n):null!==s?(null!==t.v&&(o.textContent=""),rt(o,null,e,s,0,s.length-1)):!n&&null!==l&&ct(l,0,l.length-1)):(r=o["s-cr"])?r.parentNode.textContent=i:t.v!==i&&(o.data=i)},dt=[],ht=t=>{let e,n,o;const l=t.__childNodes||t.childNodes;for(const t of l){if(t["s-sr"]&&(e=t["s-cr"])&&e.parentNode){n=e.parentNode.__childNodes||e.parentNode.childNodes;const l=t["s-sn"];for(o=n.length-1;o>=0;o--)if(e=n[o],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==t["s-hn"])if(B(e,l)){let n=dt.find((t=>t.C===e));nt=!0,e["s-sn"]=e["s-sn"]||l,n?(n.C["s-sh"]=t["s-hn"],n.M=t):(e["s-sh"]=t["s-hn"],dt.push({M:t,C:e})),e["s-sr"]&&dt.map((t=>{B(t.C,e["s-sn"])&&(n=dt.find((t=>t.C===e)),n&&!t.M&&(t.M=n.M))}))}else dt.some((t=>t.C===e))||dt.push({C:e})}1===t.nodeType&&ht(t)}},vt=t=>{t.p&&t.p.ref&&t.p.ref(null),t.m&&t.m.map(vt)},pt=(t,e,n)=>("string"==typeof e["s-sn"]&&e["s-sr"]&&e["s-cr"]&&mt(e["s-cr"],e,t,e.parentElement),null==t?void 0:t.insertBefore(e,n));function mt(t,e,n,o){var l,s;let i;if(t&&"string"==typeof e["s-sn"]&&e["s-sr"]&&t.parentNode&&t.parentNode["s-sc"]&&(i=e["s-si"]||t.parentNode["s-sc"])){const t=e["s-sn"],r=e["s-hn"];if(null==(l=n.classList)||l.add(i+"-s"),o&&(null==(s=o.classList)?void 0:s.contains(i+"-s"))){let e=(o.__childNodes||o.childNodes)[0],n=!1;for(;e;){if(e["s-sn"]!==t&&e["s-hn"]===r&&e["s-sr"]){n=!0;break}e=e.nextSibling}n||o.classList.remove(i+"-s")}}}var yt=(t,e)=>{if(e&&!t.T&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.T=()=>{e["s-p"].splice(n-1,1),o()})))}},$t=(t,e)=>{if(t.u|=16,!(4&t.u))return yt(t,t.P),j((()=>bt(t,e)));t.u|=512},bt=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e&&(l=Et(o,"componentWillLoad",void 0,n)),wt(l,(()=>St(t,o,e)))},wt=(t,e)=>gt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),gt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,St=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,l=((t,e)=>{var n;const o=I(e),l=c.get(o);if(t=11===t.nodeType?t:d,l)if("string"==typeof l){let s,i=z.get(t=t.head||t);if(i||z.set(t,i=new Set),!i.has(o)){{s=document.querySelector(`[sty-id="${o}"]`)||d.createElement("style"),s.innerHTML=l;const i=null!=(n=h.F)?n:k(d);if(null!=i&&s.setAttribute("nonce",i),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(p){const e=new CSSStyleSheet;e.replaceSync(l),t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=l+e.innerHTML:t.prepend(s)}else t.append(s);1&e.u&&t.insertBefore(s,null)}4&e.u&&(s.innerHTML+=u),i&&i.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);(10&o&&2&o||128&o)&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);jt(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>Ot(t);0===e.length?n():(Promise.all(e).then(n),t.u|=4,e.length=0)}},jt=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{var o,l,s,i;const r=t.$hostElement$,c=t.o,u=t.R||U(null,null),f=(t=>t&&t.j===W)(e)?e:H(null,null,e);if(A=r.tagName,n&&f.p)for(const t of Object.keys(f.p))r.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(f.p[t]=r[t]);if(f.j=null,f.u|=4,t.R=f,f.O=u.O=r.shadowRoot||r,R=r["s-sc"],et=!(!(1&c.u)||128&c.u),L=r["s-cr"],nt=!1,at(u,f,n),h.u|=1,ot){ht(f.O);for(const t of dt){const e=t.C;if(!e["s-ol"]){const t=d.createTextNode("");t["s-nr"]=e,pt(e.parentNode,e["s-ol"]=t,e)}}for(const t of dt){const e=t.C,r=t.M;if(r){const t=r.parentNode;let n=r.nextSibling;{let s=null==(o=e["s-ol"])?void 0:o.previousSibling;for(;s;){let o=null!=(l=s["s-nr"])?l:null;if(o&&o["s-sn"]===e["s-sn"]&&t===(o.__parentNode||o.parentNode)){for(o=o.nextSibling;o===e||(null==o?void 0:o["s-sr"]);)o=null==o?void 0:o.nextSibling;if(!o||!o["s-nr"]){n=o;break}}s=s.previousSibling}}(!n&&t!==(e.__parentNode||e.parentNode)||(e.__nextSibling||e.nextSibling)!==n)&&e!==n&&(!e["s-hn"]&&e["s-ol"]&&(e["s-hn"]=e["s-ol"].parentNode.nodeName),pt(t,e,n),1===e.nodeType&&"SLOT-FB"!==e.tagName&&(e.hidden=null!=(s=e["s-ih"])&&s)),e&&"function"==typeof r["s-rf"]&&r["s-rf"](e)}else 1===e.nodeType&&(n&&(e["s-ih"]=null!=(i=e.hidden)&&i),e.hidden=!0)}}nt&&P(f.O),h.u&=-2,dt.length=0,L=void 0})(t,e,o)}catch(e){i(e,t.$hostElement$)}return null},Ot=t=>{const e=t.$hostElement$,n=t.P;64&t.u||(t.u|=64,Ct(e),t.L(e),n||kt()),t.A(e),t.T&&(t.T(),t.T=void 0),512&t.u&&S((()=>$t(t,!1))),t.u&=-517},kt=()=>{S((()=>(t=>{const e=h.ce("appload",{detail:{namespace:"component-library"}});return t.dispatchEvent(e),e})(a)))},Et=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){i(t,o)}},Ct=t=>t.classList.add("hydrated"),xt=(t,e,n,l)=>{const s=o(t);if(!s)throw Error(`Couldn't find host element for "${l.k}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const r=s.$hostElement$,c=s.l.get(e),u=s.u,f=s.i;if(n=G(n,l.t[e][0]),(!(8&u)||void 0===c)&&n!==c&&(!Number.isNaN(c)||!Number.isNaN(n))&&(s.l.set(e,n),f)){if(l.N&&128&u){const t=l.N[e];t&&t.map((t=>{try{f[t](n,c,e)}catch(t){i(t,r)}}))}2==(18&u)&&$t(s,!1)}},Mt=(t,e,n)=>{var l,s;const i=t.prototype;if(e.t||e.N||t.watchers){t.watchers&&!e.N&&(e.N=t.watchers);const r=Object.entries(null!=(l=e.t)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&n&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(e.t[t][0]|=2048),r&&(e.t[t][0]|=4096),(1&n||!s)&&Object.defineProperty(i,t,{get(){{if(!(2048&e.t[t][0]))return((t,e)=>o(this).l.get(e))(0,t);const n=o(this),l=n?n.i:i;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(s){const i=o(this);if(r){const n=32&l?this[t]:i.$hostElement$[t];return void 0===n&&i.l.get(t)?s=i.l.get(t):!i.l.get(t)&&n&&i.l.set(t,n),r.call(this,G(s,l)),void xt(this,t,s=32&l?this[t]:i.$hostElement$[t],e)}{if(!(1&n&&4096&e.t[t][0]))return xt(this,t,s,e),void(1&n&&!i.i&&i.B.then((()=>{4096&e.t[t][0]&&i.i[t]!==i.l.get(t)&&(i.i[t]=s)})));const o=()=>{const n=i.i[t];!i.l.get(t)&&n&&i.l.set(t,n),i.i[t]=G(s,l),xt(this,t,i.i[t],e)};i.i?o():i.B.then((()=>o()))}}})}else 1&n&&64&l&&Object.defineProperty(i,t,{value(...e){var n;const l=o(this);return null==(n=null==l?void 0:l.H)?void 0:n.then((()=>{var n;return null==(n=l.i)?void 0:n[t](...e)}))}})})),1&n){const n=new Map;i.attributeChangedCallback=function(t,l,s){h.jmp((()=>{var r;const c=n.get(t);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const n=o(this),i=null==n?void 0:n.u;if(i&&!(8&i)&&128&i&&s!==l){const o=n.i,i=null==(r=e.N)?void 0:r[t];null==i||i.forEach((e=>{null!=o[e]&&o[e].call(o,s,l,t)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.N)?s:{}),...r.filter((([t,e])=>15&e[0])).map((([t,e])=>{const o=e[1]||t;return n.set(o,t),o}))]))}}return t},Tt=(t,e={})=>{var l;const s=[],f=e.exclude||[],v=a.customElements,m=d.head,y=m.querySelector("meta[charset]"),$=d.createElement("style"),b=[];let w,g=!0;Object.assign(h,e),h.h=new URL(e.resourcesUrl||"./",d.baseURI).href;let S=!1;if(t.map((t=>{t[1].map((e=>{var l;const u={u:e[0],k:e[1],t:e[2],U:e[3]};4&u.u&&(S=!0),u.t=e[2],u.N=null!=(l=e[4])?l:{};const a=u.k,m=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,e)=>{const o={u:0,$hostElement$:t,o:e,l:new Map};o.H=new Promise((t=>o.A=t)),o.B=new Promise((t=>o.L=t)),t["s-p"]=[],t["s-rc"]=[],n.set(t,o)})(t=this,u),1&u.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${u.k}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),w&&(clearTimeout(w),w=null),g?b.push(this):h.jmp((()=>(t=>{if(!(1&h.u)){const e=o(t),n=e.o,l=()=>{};if(1&e.u)(null==e?void 0:e.i)||(null==e?void 0:e.B)&&e.B.then((()=>{}));else{e.u|=1,12&n.u&&(t=>{const e=t["s-cr"]=d.createComment("");e["s-cn"]=!0,pt(t,e,t.firstChild)})(t);{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){yt(e,e.P=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.u)){if(e.u|=32,n.W){const l=((t,e)=>{const n=t.k.replace(/-/g,"_"),o=t.W;if(!o)return;const l=r.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(r.set(o,t),t[n])),(t=>{i(t,e.$hostElement$)}))
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.k}#${e.D}" was not found`);o.isProxied||(n.N=o.watchers,Mt(o,n,2),o.isProxied=!0);const s=()=>{};e.u|=8;try{new o(e)}catch(e){i(e,t)}e.u&=-9,e.u|=128,s()}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=I(n);if(!c.has(e)){const o=()=>{};((t,e,n)=>{let o=c.get(t);p&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,c.set(t,o)})(e,t,!!(1&n.u)),o()}}}const l=e.P,s=()=>$t(e,!0);l&&l["s-rc"]?l["s-rc"].push(s):s()})(t,e,n)}l()}})(this)))}disconnectedCallback(){h.jmp((()=>(async t=>{if(!(1&h.u)){const e=o(t);(null==e?void 0:e.i)||(null==e?void 0:e.B)&&e.B.then((()=>{}))}z.has(t)&&z.delete(t),t.shadowRoot&&z.has(t.shadowRoot)&&z.delete(t.shadowRoot)})(this))),h.raf((()=>{var t;const e=o(this),n=b.findIndex((t=>t===this));n>-1&&b.splice(n,1),(null==(t=null==e?void 0:e.R)?void 0:t.O)instanceof Node&&!e.R.O.isConnected&&delete e.R.O}))}componentOnReady(){return o(this).B}};u.W=t[0],f.includes(a)||v.get(a)||(s.push(a),v.define(a,Mt(m,u,1)))}))})),s.length>0&&(S&&($.textContent+=u),$.textContent+=s.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const t=null!=(l=h.F)?l:k(d);null!=t&&$.setAttribute("nonce",t),m.insertBefore($,y?y.nextSibling:m.firstChild)}g=!1,b.length?b.map((t=>t.connectedCallback())):h.jmp((()=>w=setTimeout(kt,30)))},Pt=(t,e)=>e,Ft=t=>h.F=t;export{Pt as F,Tt as b,_ as g,H as h,v as p,l as r,Ft as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=e=>"_blank"===e,n=e=>{switch(e){case"fi":return"Avautuu uuteen välilehteen";case"sv":return"Öppnas i en ny flik";default:return"Opens in a new tab"}};export{e as o,n as v}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function*e(e){let i=1;for(;;)yield`${e}-${i++}`}export{e as i}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
var classnames = {exports: {}};
|
|
2
|
+
|
|
3
|
+
/*!
|
|
4
|
+
Copyright (c) 2018 Jed Watson.
|
|
5
|
+
Licensed under the MIT License (MIT), see
|
|
6
|
+
http://jedwatson.github.io/classnames
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
(function (module) {
|
|
10
|
+
/* global define */
|
|
11
|
+
|
|
12
|
+
(function () {
|
|
13
|
+
|
|
14
|
+
var hasOwn = {}.hasOwnProperty;
|
|
15
|
+
|
|
16
|
+
function classNames () {
|
|
17
|
+
var classes = '';
|
|
18
|
+
|
|
19
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
20
|
+
var arg = arguments[i];
|
|
21
|
+
if (arg) {
|
|
22
|
+
classes = appendClass(classes, parseValue(arg));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return classes;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function parseValue (arg) {
|
|
30
|
+
if (typeof arg === 'string' || typeof arg === 'number') {
|
|
31
|
+
return arg;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (typeof arg !== 'object') {
|
|
35
|
+
return '';
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (Array.isArray(arg)) {
|
|
39
|
+
return classNames.apply(null, arg);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
43
|
+
return arg.toString();
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
var classes = '';
|
|
47
|
+
|
|
48
|
+
for (var key in arg) {
|
|
49
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
50
|
+
classes = appendClass(classes, key);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return classes;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function appendClass (value, newClass) {
|
|
58
|
+
if (!newClass) {
|
|
59
|
+
return value;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (value) {
|
|
63
|
+
return value + ' ' + newClass;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return value + newClass;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (module.exports) {
|
|
70
|
+
classNames.default = classNames;
|
|
71
|
+
module.exports = classNames;
|
|
72
|
+
} else {
|
|
73
|
+
window.classNames = classNames;
|
|
74
|
+
}
|
|
75
|
+
}());
|
|
76
|
+
}(classnames));
|
|
77
|
+
|
|
78
|
+
const classNames = classnames.exports;
|
|
79
|
+
|
|
80
|
+
const inheritAttributes = (el, attributes = []) => {
|
|
81
|
+
const attributeObject = {};
|
|
82
|
+
attributes.forEach(attr => {
|
|
83
|
+
if (el.hasAttribute(attr)) {
|
|
84
|
+
const value = el.getAttribute(attr);
|
|
85
|
+
if (value !== null) {
|
|
86
|
+
attributeObject[attr] = el.getAttribute(attr);
|
|
87
|
+
}
|
|
88
|
+
el.removeAttribute(attr);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
return attributeObject;
|
|
92
|
+
};
|
|
93
|
+
const ariaAttributes = [
|
|
94
|
+
'role',
|
|
95
|
+
'aria-activedescendant',
|
|
96
|
+
'aria-atomic',
|
|
97
|
+
'aria-autocomplete',
|
|
98
|
+
'aria-braillelabel',
|
|
99
|
+
'aria-brailleroledescription',
|
|
100
|
+
'aria-busy',
|
|
101
|
+
'aria-checked',
|
|
102
|
+
'aria-colcount',
|
|
103
|
+
'aria-colindex',
|
|
104
|
+
'aria-colindextext',
|
|
105
|
+
'aria-colspan',
|
|
106
|
+
'aria-controls',
|
|
107
|
+
'aria-current',
|
|
108
|
+
'aria-describedby',
|
|
109
|
+
'aria-description',
|
|
110
|
+
'aria-details',
|
|
111
|
+
'aria-disabled',
|
|
112
|
+
'aria-errormessage',
|
|
113
|
+
'aria-expanded',
|
|
114
|
+
'aria-flowto',
|
|
115
|
+
'aria-haspopup',
|
|
116
|
+
'aria-hidden',
|
|
117
|
+
'aria-invalid',
|
|
118
|
+
'aria-keyshortcuts',
|
|
119
|
+
'aria-label',
|
|
120
|
+
'aria-labelledby',
|
|
121
|
+
'aria-level',
|
|
122
|
+
'aria-live',
|
|
123
|
+
'aria-multiline',
|
|
124
|
+
'aria-multiselectable',
|
|
125
|
+
'aria-orientation',
|
|
126
|
+
'aria-owns',
|
|
127
|
+
'aria-placeholder',
|
|
128
|
+
'aria-posinset',
|
|
129
|
+
'aria-pressed',
|
|
130
|
+
'aria-readonly',
|
|
131
|
+
'aria-relevant',
|
|
132
|
+
'aria-required',
|
|
133
|
+
'aria-roledescription',
|
|
134
|
+
'aria-rowcount',
|
|
135
|
+
'aria-rowindex',
|
|
136
|
+
'aria-rowindextext',
|
|
137
|
+
'aria-rowspan',
|
|
138
|
+
'aria-selected',
|
|
139
|
+
'aria-setsize',
|
|
140
|
+
'aria-sort',
|
|
141
|
+
'aria-valuemax',
|
|
142
|
+
'aria-valuemin',
|
|
143
|
+
'aria-valuenow',
|
|
144
|
+
'aria-valuetext',
|
|
145
|
+
];
|
|
146
|
+
const inheritAriaAttributes = (el, ignoreList) => {
|
|
147
|
+
let attributesToInherit = [...ariaAttributes];
|
|
148
|
+
if (ignoreList && ignoreList.length > 0) {
|
|
149
|
+
attributesToInherit = attributesToInherit.filter(attr => !ignoreList.includes(attr));
|
|
150
|
+
}
|
|
151
|
+
return inheritAttributes(el, attributesToInherit);
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
export { inheritAttributes as a, classNames as c, inheritAriaAttributes as i };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h } from './index2.js';
|
|
2
|
-
import { c as classNames } from './
|
|
2
|
+
import { c as classNames } from './attributes.js';
|
|
3
|
+
import { d as defineCustomElement$3 } from './ds-button2.js';
|
|
3
4
|
import { d as defineCustomElement$2 } from './ds-icon2.js';
|
|
4
5
|
|
|
5
|
-
const dsAccordionCss = ".ds-accordion__open-button{color:var(--ds-textColor-default
|
|
6
|
+
const dsAccordionCss = ":root{--ds-breakpoint-xSmall:20rem;--ds-breakpoint-small:30rem;--ds-breakpoint-medium:60rem;--ds-breakpoint-large:75rem;--ds-breakpoint-xLarge:90rem}.ds-accordion__open-button{color:var(--ds-textColor-default);outline:var(--ds-borderWidth-thick) solid transparent;fill:var(--ds-textColor-default);position:relative;all:unset;align-items:flex-start;box-sizing:border-box;display:flex;flex-direction:row;gap:var(--ds-spacing-2xSmall);position:relative;width:100%}.ds-accordion__open-button:focus-visible,.ds-accordion__open-button:focus-within{box-shadow:0 0 0 var(--ds-borderWidth-thin) var(--ds-borderColor-white);outline-color:var(--ds-borderColor-black);outline-offset:var(--ds-borderWidth-thin);outline-style:solid;outline-width:var(--ds-borderWidth-thin)}.ds-accordion__open-button:hover:not(:focus-visible).ds-accordion--border-aligned::before,.ds-accordion__open-button:hover:not(:focus-visible).ds-accordion--border-aligned::after{content:\"\";position:absolute;top:0;width:var(--ds-spacing-small);height:100%}.ds-accordion__open-button:hover:not(:focus-visible).ds-accordion--border-aligned::before{left:calc(var(--ds-spacing-small) * -1)}.ds-accordion__open-button:hover:not(:focus-visible).ds-accordion--border-aligned::after{right:calc(var(--ds-spacing-small) * -1)}.ds-accordion__open-button:hover{cursor:pointer}.ds-accordion__open-button:hover,.ds-accordion__open-button:hover::before,.ds-accordion__open-button:hover::after{background:var(--ds-bgColor-transparent-onLight-hover, rgba(0, 0, 0, 0.1019607843))}.ds-accordion__open-button:active,.ds-accordion__open-button:active::before,.ds-accordion__open-button:active::after{background:var(--ds-bgColor-transparent-onLight-active, rgba(0, 0, 0, 0.1490196078))}.ds-accordion__open-button:focus-visible{z-index:1}.ds-accordion__open-button.ds-accordion--default{padding:var(--ds-spacing-small) var(--ds-spacing-small) var(--ds-spacing-xSmall) var(--ds-spacing-small);font-family:var(--ds-fontFamily-body);font-size:var(--ds-fontSize-18);font-weight:var(--ds-fontWeight-semibold);line-height:var(--ds-lineHeight-large);letter-spacing:var(--letterSpacing-wide)}.ds-accordion__open-button.ds-accordion--compact{font-size:var(--ds-fontSize-16);padding:var(--ds-spacing-xSmall) var(--ds-spacing-small) var(--ds-spacing-xSmall) var(--ds-spacing-small);line-height:var(--ds-lineHeight-large);font-weight:var(--ds-fontWeight-semibold)}.ds-accordion__open-button.ds-accordion--border-aligned:not(:focus-visible){padding-inline:0;margin-inline:var(--ds-spacing-small);position:relative;width:calc(100% - var(--ds-spacing-large))}:host(:first-child) .ds-accordion__open-button:not(.ds-accordion--hide-top-border){border-top:var(--ds-borderWidth-hairline) solid var(--ds-borderColor-light, #CCCCCC)}:host(:first-child) .ds-accordion__open-button:not(.ds-accordion--hide-top-border):focus-visible{border-top-color:transparent}.ds-accordion__open-button[aria-expanded=false]{border-bottom:var(--ds-borderWidth-hairline) solid var(--ds-borderColor-light, #CCCCCC)}.ds-accordion__panel--border-aligned{position:relative;width:calc(100% - 32px)}.ds-accordion__panel--border-aligned::before{display:inline-block;content:\" \";position:absolute;bottom:-1px;height:1px;left:0px;background:var(--ds-palette-white);width:var(--ds-spacing-small)}.ds-accordion__panel--border-aligned::after{display:inline-block;content:\" \";position:absolute;bottom:-1px;height:1px;right:0px;background:var(--ds-palette-white);width:var(--ds-spacing-small)}.ds-accordion__panel--expanded{display:block;border-bottom:var(--ds-borderWidth-hairline) solid var(--ds-borderColor-light, #CCCCCC);padding-inline:var(--ds-spacing-small)}::slotted([slot=header]){color:var(--ds-textColor-default)}.ds-accordion__content{color:var(--ds-textColor-default, #1A1A1A);font-family:var(--ds-fontFamily-body);padding-block:var(--ds-spacing-small)}.ds-accordion__content .ds-accordion--default{font-size:var(--ds-fontSize-16);font-weight:var(--ds-fontWeight-regular);line-height:var(--ds-lineHeight-xLarge);letter-spacing:var(--ds-letterSpacing-wide)}@media (min-width: 30rem){.ds-accordion__content .ds-accordion--default{font-size:var(--ds-fontSize-18)}}.ds-accordion__content .ds-accordion--compact{font-size:var(--fontSize-16);font-weight:var(--ds-fontWeight-regular);line-height:var(--ds-lineHeight-large);letter-spacing:var(--letterSpacing-wide)}.ds-accordion__close-button{display:flex;flex-direction:row;gap:var(--ds-spacing-2xSmall);font-family:var(--ds-fontFamily-body);letter-spacing:var(--ds-letterSpacing-wide);width:max-content}";
|
|
6
7
|
const DsAccordionStyle0 = dsAccordionCss;
|
|
7
8
|
|
|
8
9
|
const DsAccordion$1 = proxyCustomElement(class DsAccordion extends H {
|
|
@@ -18,10 +19,16 @@ const DsAccordion$1 = proxyCustomElement(class DsAccordion extends H {
|
|
|
18
19
|
headingLevel = 2;
|
|
19
20
|
useCloseButton = false;
|
|
20
21
|
closeButtonLabel = 'Close';
|
|
21
|
-
|
|
22
|
+
hideTopBorder = false;
|
|
23
|
+
isExpanded = false;
|
|
22
24
|
get host() { return this; }
|
|
23
25
|
headerButtonRef;
|
|
24
26
|
shouldMoveFocus = false;
|
|
27
|
+
componentWillLoad() {
|
|
28
|
+
if (this.openByDefault) {
|
|
29
|
+
this.isExpanded = true;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
25
32
|
watchHandler(isExpanded) {
|
|
26
33
|
if (!isExpanded && this.shouldMoveFocus && this.headerButtonRef) {
|
|
27
34
|
this.headerButtonRef.focus();
|
|
@@ -45,16 +52,22 @@ const DsAccordion$1 = proxyCustomElement(class DsAccordion extends H {
|
|
|
45
52
|
}
|
|
46
53
|
};
|
|
47
54
|
render() {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
55
|
+
const iconSize = this.variant === 'compact' ? '1.5rem' : '2rem';
|
|
56
|
+
const buttonSize = this.variant === 'compact' ? 'small' : 'medium';
|
|
57
|
+
return (h("div", { key: '830fb0965ea8904b662280b775a159528d7ddc03', class: classNames('ds-accordion', `ds-accordion--${this.variant}`, {
|
|
51
58
|
'ds-accordion--border-aligned': this.borderAligned
|
|
52
|
-
}),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
h("
|
|
59
|
+
}), role: "presentation" }, h("div", { key: 'a3d6e538dda9513bfb578379cced370be686ce62', class: "ds-accordion__item" }, h("div", { key: '7c7819bf62cdffb9ac4a8c4f7b1609b31efcdd68', role: "heading", "aria-level": this.headingLevel, class: "ds-accordion__title" }, h("button", { key: '2e2a9fdfced241b23bdcfb444777cdd2fd0a764c', class: classNames('ds-accordion__open-button', `ds-accordion--${this.variant}`, {
|
|
60
|
+
'ds-accordion--border-aligned': this.borderAligned,
|
|
61
|
+
'ds-accordion--hide-top-border': this.hideTopBorder
|
|
62
|
+
}), onClick: this.handleClick, onKeyDown: this.handleKeyDown, "aria-expanded": this.isExpanded ? 'true' : 'false', "aria-controls": `${this.accordionId}-panel`, id: this.accordionId, ref: (el) => this.headerButtonRef = el }, h("span", { key: 'eca6297dd43b58849c8b46f66034ec51bb20bf1e', class: "ds-accordion__icon", "aria-hidden": "true" }, this.isExpanded ?
|
|
63
|
+
h("ds-icon", { size: iconSize, hidden: true, name: "keyboard_arrow_up" })
|
|
64
|
+
: h("ds-icon", { size: iconSize, hidden: true, name: "keyboard_arrow_down" })), h("slot", { key: '9ddb913b968b8bbbe47d4be341766503fdcf4df7', name: "header" }))), h("div", { key: '21cee953529ccd21487b7ac0001aac10bf3d563e', id: `${this.accordionId}-panel`, role: "region", "aria-labelledby": this.accordionId, class: classNames('ds-accordion__panel', `ds-accordion__panel--${this.variant}`, {
|
|
65
|
+
'ds-accordion__panel--border-aligned': this.borderAligned,
|
|
66
|
+
'ds-accordion__panel--expanded': this.isExpanded
|
|
67
|
+
}), hidden: !this.isExpanded }, h("div", { key: 'a9d5dfdbf190936156b0b37b6ef2b877741f6ae1', class: "ds-accordion__content" }, h("slot", { key: '34ca29ec15581a470fe2c740fceea9fcdc7cb64a', name: "content" })), this.useCloseButton &&
|
|
68
|
+
h("ds-button", { key: '1dfa2fad990fc6651a620efd8b3169346bb08648', "aria-labelledby": `${this.accordionId}-close-button ${this.accordionId}`, id: `${this.accordionId}-close-button`, class: classNames('ds-accordion__close-button', `ds-accordion--${this.variant}`, {
|
|
56
69
|
'ds-accordion--border-aligned': this.borderAligned
|
|
57
|
-
}),
|
|
70
|
+
}), fontWeight: 'semiBold', variant: 'supplementary', colour: 'black', icon: 'keyboard_arrow_up', iconPosition: 'start', onClick: this.handleClick, onKeyDown: this.handleKeyDown, value: this.closeButtonLabel, size: buttonSize, type: 'button' })))));
|
|
58
71
|
}
|
|
59
72
|
static get watchers() { return {
|
|
60
73
|
"isExpanded": ["watchHandler"]
|
|
@@ -68,6 +81,7 @@ const DsAccordion$1 = proxyCustomElement(class DsAccordion extends H {
|
|
|
68
81
|
"headingLevel": [2, "heading-level"],
|
|
69
82
|
"useCloseButton": [4, "use-close-button"],
|
|
70
83
|
"closeButtonLabel": [1, "close-button-label"],
|
|
84
|
+
"hideTopBorder": [4, "hide-top-border"],
|
|
71
85
|
"isExpanded": [32]
|
|
72
86
|
}, undefined, {
|
|
73
87
|
"isExpanded": ["watchHandler"]
|
|
@@ -76,13 +90,18 @@ function defineCustomElement$1() {
|
|
|
76
90
|
if (typeof customElements === "undefined") {
|
|
77
91
|
return;
|
|
78
92
|
}
|
|
79
|
-
const components = ["ds-accordion", "ds-icon"];
|
|
93
|
+
const components = ["ds-accordion", "ds-button", "ds-icon"];
|
|
80
94
|
components.forEach(tagName => { switch (tagName) {
|
|
81
95
|
case "ds-accordion":
|
|
82
96
|
if (!customElements.get(tagName)) {
|
|
83
97
|
customElements.define(tagName, DsAccordion$1);
|
|
84
98
|
}
|
|
85
99
|
break;
|
|
100
|
+
case "ds-button":
|
|
101
|
+
if (!customElements.get(tagName)) {
|
|
102
|
+
defineCustomElement$3();
|
|
103
|
+
}
|
|
104
|
+
break;
|
|
86
105
|
case "ds-icon":
|
|
87
106
|
if (!customElements.get(tagName)) {
|
|
88
107
|
defineCustomElement$2();
|
|
@@ -1,82 +1,8 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h } from './index2.js';
|
|
2
|
-
import { c as classNames } from './
|
|
2
|
+
import { i as inheritAriaAttributes, a as inheritAttributes, c as classNames } from './attributes.js';
|
|
3
3
|
import { d as defineCustomElement$1 } from './ds-icon2.js';
|
|
4
4
|
|
|
5
|
-
const inheritAttributes = (el, attributes = []) => {
|
|
6
|
-
const attributeObject = {};
|
|
7
|
-
attributes.forEach(attr => {
|
|
8
|
-
if (el.hasAttribute(attr)) {
|
|
9
|
-
const value = el.getAttribute(attr);
|
|
10
|
-
if (value !== null) {
|
|
11
|
-
attributeObject[attr] = el.getAttribute(attr);
|
|
12
|
-
}
|
|
13
|
-
el.removeAttribute(attr);
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
return attributeObject;
|
|
17
|
-
};
|
|
18
|
-
const ariaAttributes = [
|
|
19
|
-
'role',
|
|
20
|
-
'aria-activedescendant',
|
|
21
|
-
'aria-atomic',
|
|
22
|
-
'aria-autocomplete',
|
|
23
|
-
'aria-braillelabel',
|
|
24
|
-
'aria-brailleroledescription',
|
|
25
|
-
'aria-busy',
|
|
26
|
-
'aria-checked',
|
|
27
|
-
'aria-colcount',
|
|
28
|
-
'aria-colindex',
|
|
29
|
-
'aria-colindextext',
|
|
30
|
-
'aria-colspan',
|
|
31
|
-
'aria-controls',
|
|
32
|
-
'aria-current',
|
|
33
|
-
'aria-describedby',
|
|
34
|
-
'aria-description',
|
|
35
|
-
'aria-details',
|
|
36
|
-
'aria-disabled',
|
|
37
|
-
'aria-errormessage',
|
|
38
|
-
'aria-expanded',
|
|
39
|
-
'aria-flowto',
|
|
40
|
-
'aria-haspopup',
|
|
41
|
-
'aria-hidden',
|
|
42
|
-
'aria-invalid',
|
|
43
|
-
'aria-keyshortcuts',
|
|
44
|
-
'aria-label',
|
|
45
|
-
'aria-labelledby',
|
|
46
|
-
'aria-level',
|
|
47
|
-
'aria-live',
|
|
48
|
-
'aria-multiline',
|
|
49
|
-
'aria-multiselectable',
|
|
50
|
-
'aria-orientation',
|
|
51
|
-
'aria-owns',
|
|
52
|
-
'aria-placeholder',
|
|
53
|
-
'aria-posinset',
|
|
54
|
-
'aria-pressed',
|
|
55
|
-
'aria-readonly',
|
|
56
|
-
'aria-relevant',
|
|
57
|
-
'aria-required',
|
|
58
|
-
'aria-roledescription',
|
|
59
|
-
'aria-rowcount',
|
|
60
|
-
'aria-rowindex',
|
|
61
|
-
'aria-rowindextext',
|
|
62
|
-
'aria-rowspan',
|
|
63
|
-
'aria-selected',
|
|
64
|
-
'aria-setsize',
|
|
65
|
-
'aria-sort',
|
|
66
|
-
'aria-valuemax',
|
|
67
|
-
'aria-valuemin',
|
|
68
|
-
'aria-valuenow',
|
|
69
|
-
'aria-valuetext',
|
|
70
|
-
];
|
|
71
|
-
const inheritAriaAttributes = (el, ignoreList) => {
|
|
72
|
-
let attributesToInherit = [...ariaAttributes];
|
|
73
|
-
if (ignoreList && ignoreList.length > 0) {
|
|
74
|
-
attributesToInherit = attributesToInherit.filter(attr => !ignoreList.includes(attr));
|
|
75
|
-
}
|
|
76
|
-
return inheritAttributes(el, attributesToInherit);
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
const dsButtonCss = ".sc-ds-button-h{display:inline-block}button.sc-ds-button{align-items:center;border-radius:0;border-style:solid;display:flex;font-family:var(--ds-fontFamily-body);font-weight:var(--ds-fontWeight-bold);outline:4px solid transparent;border-width:var(--ds-borderWidth-thick);font-size:var(--ds-fontSize-18);min-height:44px;padding:var(--ds-spacing-3xSmall) var(--ds-spacing-xSmall)}button.sc-ds-button:focus{outline-offset:2px;outline-width:2px}button.icon-only.sc-ds-button{padding-left:0;padding-right:0;aspect-ratio:1;justify-content:center}button.sc-ds-button .button-value.sc-ds-button{padding-right:var(--ds-spacing-3xSmall);padding-left:var(--ds-spacing-3xSmall)}button.sc-ds-button ds-icon.sc-ds-button{height:1.5rem}button.icon-start.sc-ds-button:not(.small) ds-icon.sc-ds-button{margin-right:var(--ds-spacing-3xSmall)}button.icon-end.sc-ds-button:not(.small) ds-icon.sc-ds-button{margin-left:var(--ds-spacing-3xSmall)}button.primary.blue.sc-ds-button{background-color:var(--ds-bgColor-primary);border-color:transparent;color:var(--ds-textColor-white)}button.primary.blue.sc-ds-button:hover{background-color:var(--ds-bgColor-primary-hover)}button.primary.blue.sc-ds-button:active,button.primary.blue--active.sc-ds-button{background-color:var(--ds-bgColor-primary-active)}button.primary.blue.sc-ds-button:focus-visible{box-shadow:0 0 0 2px var(--ds-borderColor-white);outline-color:var(--ds-borderColor-black)}button.primary.blue[aria-disabled=true].sc-ds-button,button.primary.blue.disabled.sc-ds-button,button.primary.blue.sc-ds-button:disabled{background-color:var(--ds-bgColor-disabled-onLight);border-color:transparent;color:var(--ds-textColor-disabled-onLight)}button.primary.black.sc-ds-button{background-color:var(--ds-bgColor-black);border-color:transparent;color:var(--ds-textColor-white)}button.primary.black.sc-ds-button:hover{background-color:var(--ds-bgColor-black-hover)}button.primary.black.sc-ds-button:active,button.primary.black--active.sc-ds-button{background-color:var(--ds-bgColor-black-active)}button.primary.black.sc-ds-button:focus-visible{box-shadow:0 0 0 2px var(--ds-borderColor-white);outline-color:var(--ds-borderColor-black)}button.primary.black[aria-disabled=true].sc-ds-button,button.primary.black.disabled.sc-ds-button,button.primary.black.sc-ds-button:disabled{background-color:var(--ds-bgColor-disabled-onLight);border-color:transparent;color:var(--ds-textColor-disabled-onLight)}button.primary.white.sc-ds-button{background-color:var(--ds-bgColor-white);border-color:transparent;color:var(--ds-textColor-default)}button.primary.white.sc-ds-button:hover{background-color:var(--ds-bgColor-white-hover)}button.primary.white.sc-ds-button:active,button.primary.white--active.sc-ds-button{background-color:var(--ds-bgColor-white-active)}button.primary.white.sc-ds-button:focus-visible{box-shadow:0 0 0 2px var(--ds-borderColor-black);outline-color:var(--ds-borderColor-white)}button.primary.white[aria-disabled=true].sc-ds-button,button.primary.white.disabled.sc-ds-button,button.primary.white.sc-ds-button:disabled{background-color:var(--ds-bgColor-disabled-onDark);border-color:transparent;color:var(--ds-textColor-disabled-onDark)}button.secondary.blue.sc-ds-button{background-color:var(--ds-bgColor-secondary);border-color:var(--ds-borderColor-primary);color:var(--ds-textColor-primary)}button.secondary.blue.sc-ds-button:hover{background-color:var(--ds-bgColor-secondary-hover)}button.secondary.blue.sc-ds-button:active,button.secondary.blue--active.sc-ds-button{background-color:var(--ds-bgColor-secondary-active)}button.secondary.blue.sc-ds-button:focus-visible{box-shadow:0 0 0 2px var(--ds-borderColor-white);outline-color:var(--ds-borderColor-black)}button.secondary.blue[aria-disabled=true].sc-ds-button,button.secondary.blue.disabled.sc-ds-button,button.secondary.blue.sc-ds-button:disabled{background-color:var(--ds-bgColor-secondary);border-color:var(--ds-borderColor-disabled-onLight);color:var(--ds-textColor-disabled-onLight)}button.secondary.black.sc-ds-button{background-color:transparent;border-color:var(--ds-borderColor-black);color:var(--ds-textColor-default)}button.secondary.black.sc-ds-button:hover{background-color:var(--ds-bgColor-transparent-onLight-hover)}button.secondary.black.sc-ds-button:active,button.secondary.black--active.sc-ds-button{background-color:var(--ds-bgColor-transparent-onLight-active)}button.secondary.black.sc-ds-button:focus-visible{box-shadow:0 0 0 2px var(--ds-borderColor-white);outline-color:var(--ds-borderColor-black)}button.secondary.black[aria-disabled=true].sc-ds-button,button.secondary.black.disabled.sc-ds-button,button.secondary.black.sc-ds-button:disabled{background-color:transparent;border-color:var(--ds-borderColor-disabled-onLight);color:var(--ds-textColor-disabled-onLight)}button.secondary.white.sc-ds-button{background-color:transparent;border-color:var(--ds-borderColor-white);color:var(--ds-textColor-white)}button.secondary.white.sc-ds-button:hover{background-color:var(--ds-bgColor-transparent-onDark-hover)}button.secondary.white.sc-ds-button:active,button.secondary.white--active.sc-ds-button{background-color:var(--ds-bgColor-transparent-onDark-active)}button.secondary.white.sc-ds-button:focus-visible{box-shadow:0 0 0 2px var(--ds-borderColor-black);outline-color:var(--ds-borderColor-white)}button.secondary.white[aria-disabled=true].sc-ds-button,button.secondary.white.disabled.sc-ds-button,button.secondary.white.sc-ds-button:disabled{background-color:transparent;border-color:var(--ds-borderColor-disabled-onDark);color:var(--ds-textColor-disabled-onDark)}button.supplementary.blue.sc-ds-button{background-color:transparent;border-color:transparent;color:var(--ds-textColor-primary);padding-right:0;padding-left:0}button.supplementary.blue.sc-ds-button:hover{background-color:var(--ds-bgColor-secondary-hover)}button.supplementary.blue.sc-ds-button:active,button.supplementary.blue--active.sc-ds-button{background-color:var(--ds-bgColor-secondary-active)}button.supplementary.blue.sc-ds-button:focus-visible{box-shadow:0 0 0 2px var(--ds-borderColor-white);outline-color:var(--ds-borderColor-black)}button.supplementary.blue[aria-disabled=true].sc-ds-button,button.supplementary.blue.disabled.sc-ds-button,button.supplementary.blue.sc-ds-button:disabled{background-color:transparent;border-color:transparent;color:var(--ds-textColor-disabled-onLight)}button.supplementary.black.sc-ds-button{background-color:transparent;border-color:transparent;color:var(--ds-textColor-default);padding-right:0;padding-left:0}button.supplementary.black.sc-ds-button:hover{background-color:var(--ds-bgColor-transparent-onLight-hover)}button.supplementary.black.sc-ds-button:active,button.supplementary.black--active.sc-ds-button{background-color:var(--ds-bgColor-transparent-onLight-active)}button.supplementary.black.sc-ds-button:focus-visible{box-shadow:0 0 0 2px var(--ds-borderColor-white);outline-color:var(--ds-borderColor-black)}button.supplementary.black[aria-disabled=true].sc-ds-button,button.supplementary.black.disabled.sc-ds-button,button.supplementary.black.sc-ds-button:disabled{background-color:transparent;border-color:transparent;color:var(--ds-textColor-disabled-onLight)}button.supplementary.white.sc-ds-button{background-color:transparent;border-color:transparent;color:var(--ds-textColor-white);padding-right:0;padding-left:0}button.supplementary.white.sc-ds-button:hover{background-color:var(--ds-bgColor-transparent-onDark-hover)}button.supplementary.white.sc-ds-button:active,button.supplementary.white--active.sc-ds-button{background-color:var(--ds-bgColor-transparent-onDark-active)}button.supplementary.white.sc-ds-button:focus-visible{box-shadow:0 0 0 2px var(--ds-borderColor-black);outline-color:var(--ds-borderColor-white)}button.supplementary.white[aria-disabled=true].sc-ds-button,button.supplementary.white.disabled.sc-ds-button,button.supplementary.white.sc-ds-button:disabled{background-color:transparent;border-color:transparent;color:var(--ds-textColor-disabled-onDark)}button.small.sc-ds-button{border-width:var(--ds-borderWidth-thin);font-size:var(--ds-fontSize-14);min-height:32px;padding:var(--ds-spacing-4xSmall) var(--ds-spacing-2xSmall)}button.small.icon-only.sc-ds-button{width:32px}button.small.sc-ds-button ds-icon.sc-ds-button{height:1rem}";
|
|
5
|
+
const dsButtonCss = ".sc-ds-button-h{display:inline-block}[full-width].sc-ds-button-h{width:100%}.ds-button.sc-ds-button{width:100%;align-items:center;border-radius:0;border-style:solid;display:flex;font-family:var(--ds-fontFamily-body);font-weight:var(--ds-fontWeight-bold);outline:4px solid transparent;justify-content:center}.ds-button.sc-ds-button .button-value.sc-ds-button{padding-right:var(--ds-spacing-3xSmall);padding-left:var(--ds-spacing-3xSmall)}.ds-button.sc-ds-button ds-icon.sc-ds-button{height:1.5rem}.ds-button.icon-start.sc-ds-button:not(.small) ds-icon.sc-ds-button{margin-right:var(--ds-spacing-3xSmall)}.ds-button.icon-end.sc-ds-button:not(.small) ds-icon.sc-ds-button{margin-left:var(--ds-spacing-3xSmall)}.ds-button.sc-ds-button:not(.small):not(.secondary){border-width:0px;font-size:var(--ds-fontSize-18);min-height:44px;padding:var(--ds-spacing-3xSmall) calc(var(--ds-spacing-small) - 0px)}.ds-button.sc-ds-button:not(.small).secondary{border-width:var(--ds-borderWidth-thick);font-size:var(--ds-fontSize-18);min-height:44px;padding:var(--ds-spacing-3xSmall) calc(var(--ds-spacing-small) - var(--ds-borderWidth-thick))}.ds-button.sc-ds-button:not(.small).icon-only{padding-left:0;padding-right:0}.ds-button.small.sc-ds-button:not(.secondary){border-width:0px;font-size:var(--ds-fontSize-14);min-height:32px;padding:var(--ds-spacing-4xSmall) calc(var(--ds-spacing-2xSmall) - 0px)}.ds-button.small.secondary.sc-ds-button{border-width:var(--ds-borderWidth-thin);font-size:var(--ds-fontSize-14);min-height:32px;padding:var(--ds-spacing-4xSmall) calc(var(--ds-spacing-2xSmall) - var(--ds-borderWidth-thin))}.ds-button.small.icon-only.sc-ds-button{padding-left:0;padding-right:0;width:32px}.ds-button.small.sc-ds-button ds-icon.sc-ds-button{height:1rem}.ds-button.primary.blue.sc-ds-button{background-color:var(--ds-bgColor-primary);border-color:transparent;color:var(--ds-textColor-white)}.ds-button.primary.blue.sc-ds-button:focus-visible,.ds-button.primary.blue.sc-ds-button:focus-within{box-shadow:0 0 0 var(--ds-borderWidth-thin) var(--ds-borderColor-white);outline-color:var(--ds-borderColor-black);outline-offset:var(--ds-borderWidth-thin);outline-style:solid;outline-width:var(--ds-borderWidth-thin)}.ds-button.primary.blue.sc-ds-button:hover{background-color:var(--ds-bgColor-primary-hover)}.ds-button.primary.blue.sc-ds-button:active,.ds-button.primary.blue--active.sc-ds-button{background-color:var(--ds-bgColor-primary-active)}.ds-button.primary.blue[aria-disabled=true].sc-ds-button,.ds-button.primary.blue.disabled.sc-ds-button,.ds-button.primary.blue.sc-ds-button:disabled{background-color:var(--ds-bgColor-disabled-onLight);border-color:transparent;color:var(--ds-textColor-disabled-onLight)}.ds-button.primary.black.sc-ds-button{background-color:var(--ds-bgColor-black);border-color:transparent;color:var(--ds-textColor-white)}.ds-button.primary.black.sc-ds-button:focus-visible,.ds-button.primary.black.sc-ds-button:focus-within{box-shadow:0 0 0 var(--ds-borderWidth-thin) var(--ds-borderColor-white);outline-color:var(--ds-borderColor-black);outline-offset:var(--ds-borderWidth-thin);outline-style:solid;outline-width:var(--ds-borderWidth-thin)}.ds-button.primary.black.sc-ds-button:hover{background-color:var(--ds-bgColor-black-hover)}.ds-button.primary.black.sc-ds-button:active,.ds-button.primary.black--active.sc-ds-button{background-color:var(--ds-bgColor-black-active)}.ds-button.primary.black[aria-disabled=true].sc-ds-button,.ds-button.primary.black.disabled.sc-ds-button,.ds-button.primary.black.sc-ds-button:disabled{background-color:var(--ds-bgColor-disabled-onLight);border-color:transparent;color:var(--ds-textColor-disabled-onLight)}.ds-button.primary.white.sc-ds-button{background-color:var(--ds-bgColor-white);border-color:transparent;color:var(--ds-textColor-default)}.ds-button.primary.white.sc-ds-button:focus-visible,.ds-button.primary.white.sc-ds-button:focus-within{box-shadow:0 0 0 var(--ds-borderWidth-thin) var(--ds-borderColor-black);outline-color:var(--ds-borderColor-white);outline-offset:var(--ds-borderWidth-thin);outline-style:solid;outline-width:var(--ds-borderWidth-thin)}.ds-button.primary.white.sc-ds-button:hover{background-color:var(--ds-bgColor-white-hover)}.ds-button.primary.white.sc-ds-button:active,.ds-button.primary.white--active.sc-ds-button{background-color:var(--ds-bgColor-white-active)}.ds-button.primary.white[aria-disabled=true].sc-ds-button,.ds-button.primary.white.disabled.sc-ds-button,.ds-button.primary.white.sc-ds-button:disabled{background-color:var(--ds-bgColor-disabled-onDark);border-color:transparent;color:var(--ds-textColor-disabled-onDark)}.ds-button.secondary.blue.sc-ds-button{background-color:var(--ds-bgColor-secondary);border-color:var(--ds-borderColor-primary);color:var(--ds-textColor-primary)}.ds-button.secondary.blue.sc-ds-button:focus-visible,.ds-button.secondary.blue.sc-ds-button:focus-within{box-shadow:0 0 0 var(--ds-borderWidth-thin) var(--ds-borderColor-white);outline-color:var(--ds-borderColor-black);outline-offset:var(--ds-borderWidth-thin);outline-style:solid;outline-width:var(--ds-borderWidth-thin)}.ds-button.secondary.blue.sc-ds-button:hover{background-color:var(--ds-bgColor-secondary-hover)}.ds-button.secondary.blue.sc-ds-button:active,.ds-button.secondary.blue--active.sc-ds-button{background-color:var(--ds-bgColor-secondary-active)}.ds-button.secondary.blue[aria-disabled=true].sc-ds-button,.ds-button.secondary.blue.disabled.sc-ds-button,.ds-button.secondary.blue.sc-ds-button:disabled{background-color:var(--ds-bgColor-secondary);border-color:var(--ds-borderColor-disabled-onLight);color:var(--ds-textColor-disabled-onLight)}.ds-button.secondary.black.sc-ds-button{background-color:transparent;border-color:var(--ds-borderColor-black);color:var(--ds-textColor-default)}.ds-button.secondary.black.sc-ds-button:focus-visible,.ds-button.secondary.black.sc-ds-button:focus-within{box-shadow:0 0 0 var(--ds-borderWidth-thin) var(--ds-borderColor-white);outline-color:var(--ds-borderColor-black);outline-offset:var(--ds-borderWidth-thin);outline-style:solid;outline-width:var(--ds-borderWidth-thin)}.ds-button.secondary.black.sc-ds-button:hover{background-color:var(--ds-bgColor-transparent-onLight-hover)}.ds-button.secondary.black.sc-ds-button:active,.ds-button.secondary.black--active.sc-ds-button{background-color:var(--ds-bgColor-transparent-onLight-active)}.ds-button.secondary.black[aria-disabled=true].sc-ds-button,.ds-button.secondary.black.disabled.sc-ds-button,.ds-button.secondary.black.sc-ds-button:disabled{background-color:transparent;border-color:var(--ds-borderColor-disabled-onLight);color:var(--ds-textColor-disabled-onLight)}.ds-button.secondary.white.sc-ds-button{background-color:transparent;border-color:var(--ds-borderColor-white);color:var(--ds-textColor-white)}.ds-button.secondary.white.sc-ds-button:focus-visible,.ds-button.secondary.white.sc-ds-button:focus-within{box-shadow:0 0 0 var(--ds-borderWidth-thin) var(--ds-borderColor-black);outline-color:var(--ds-borderColor-white);outline-offset:var(--ds-borderWidth-thin);outline-style:solid;outline-width:var(--ds-borderWidth-thin)}.ds-button.secondary.white.sc-ds-button:hover{background-color:var(--ds-bgColor-transparent-onDark-hover)}.ds-button.secondary.white.sc-ds-button:active,.ds-button.secondary.white--active.sc-ds-button{background-color:var(--ds-bgColor-transparent-onDark-active)}.ds-button.secondary.white[aria-disabled=true].sc-ds-button,.ds-button.secondary.white.disabled.sc-ds-button,.ds-button.secondary.white.sc-ds-button:disabled{background-color:transparent;border-color:var(--ds-borderColor-disabled-onDark);color:var(--ds-textColor-disabled-onDark)}.ds-button.supplementary.blue.sc-ds-button{background-color:transparent;border-color:transparent;color:var(--ds-textColor-primary)}.ds-button.supplementary.blue.sc-ds-button:focus-visible,.ds-button.supplementary.blue.sc-ds-button:focus-within{box-shadow:0 0 0 var(--ds-borderWidth-thin) var(--ds-borderColor-white);outline-color:var(--ds-borderColor-black);outline-offset:var(--ds-borderWidth-thin);outline-style:solid;outline-width:var(--ds-borderWidth-thin)}.ds-button.supplementary.blue.sc-ds-button:hover{background-color:var(--ds-bgColor-secondary-hover)}.ds-button.supplementary.blue.sc-ds-button:active,.ds-button.supplementary.blue--active.sc-ds-button{background-color:var(--ds-bgColor-secondary-active)}.ds-button.supplementary.blue.sc-ds-button:not(.small){padding-right:var(--ds-borderWidth-thick);padding-left:var(--ds-borderWidth-thick)}.ds-button.supplementary.blue.small.sc-ds-button{padding-right:var(--ds-borderWidth-thin);padding-left:var(--ds-borderWidth-thin)}.ds-button.supplementary.blue[aria-disabled=true].sc-ds-button,.ds-button.supplementary.blue.disabled.sc-ds-button,.ds-button.supplementary.blue.sc-ds-button:disabled{background-color:transparent;border-color:transparent;color:var(--ds-textColor-disabled-onLight)}.ds-button.supplementary.black.sc-ds-button{background-color:transparent;border-color:transparent;color:var(--ds-textColor-default)}.ds-button.supplementary.black.sc-ds-button:focus-visible,.ds-button.supplementary.black.sc-ds-button:focus-within{box-shadow:0 0 0 var(--ds-borderWidth-thin) var(--ds-borderColor-white);outline-color:var(--ds-borderColor-black);outline-offset:var(--ds-borderWidth-thin);outline-style:solid;outline-width:var(--ds-borderWidth-thin)}.ds-button.supplementary.black.sc-ds-button:hover{background-color:var(--ds-bgColor-transparent-onLight-hover)}.ds-button.supplementary.black.sc-ds-button:active,.ds-button.supplementary.black--active.sc-ds-button{background-color:var(--ds-bgColor-transparent-onLight-active)}.ds-button.supplementary.black.sc-ds-button:not(.small){padding-right:var(--ds-borderWidth-thick);padding-left:var(--ds-borderWidth-thick)}.ds-button.supplementary.black.small.sc-ds-button{padding-right:var(--ds-borderWidth-thin);padding-left:var(--ds-borderWidth-thin)}.ds-button.supplementary.black[aria-disabled=true].sc-ds-button,.ds-button.supplementary.black.disabled.sc-ds-button,.ds-button.supplementary.black.sc-ds-button:disabled{background-color:transparent;border-color:transparent;color:var(--ds-textColor-disabled-onLight)}.ds-button.supplementary.white.sc-ds-button{background-color:transparent;border-color:transparent;color:var(--ds-textColor-white)}.ds-button.supplementary.white.sc-ds-button:focus-visible,.ds-button.supplementary.white.sc-ds-button:focus-within{box-shadow:0 0 0 var(--ds-borderWidth-thin) var(--ds-borderColor-black);outline-color:var(--ds-borderColor-white);outline-offset:var(--ds-borderWidth-thin);outline-style:solid;outline-width:var(--ds-borderWidth-thin)}.ds-button.supplementary.white.sc-ds-button:hover{background-color:var(--ds-bgColor-transparent-onDark-hover)}.ds-button.supplementary.white.sc-ds-button:active,.ds-button.supplementary.white--active.sc-ds-button{background-color:var(--ds-bgColor-transparent-onDark-active)}.ds-button.supplementary.white.sc-ds-button:not(.small){padding-right:var(--ds-borderWidth-thick);padding-left:var(--ds-borderWidth-thick)}.ds-button.supplementary.white.small.sc-ds-button{padding-right:var(--ds-borderWidth-thin);padding-left:var(--ds-borderWidth-thin)}.ds-button.supplementary.white[aria-disabled=true].sc-ds-button,.ds-button.supplementary.white.disabled.sc-ds-button,.ds-button.supplementary.white.sc-ds-button:disabled{background-color:transparent;border-color:transparent;color:var(--ds-textColor-disabled-onDark)}.ds-button.icon-only.sc-ds-button{aspect-ratio:1;justify-content:center}";
|
|
80
6
|
const DsButtonStyle0 = dsButtonCss;
|
|
81
7
|
|
|
82
8
|
const DsButton = proxyCustomElement(class DsButton extends H {
|
|
@@ -97,6 +23,7 @@ const DsButton = proxyCustomElement(class DsButton extends H {
|
|
|
97
23
|
iconPosition = 'start';
|
|
98
24
|
type = 'button';
|
|
99
25
|
disabled = false;
|
|
26
|
+
fullWidth = false;
|
|
100
27
|
ariaDisabled = 'false';
|
|
101
28
|
componentWillLoad() {
|
|
102
29
|
this.inheritedAttributes = {
|
|
@@ -139,14 +66,14 @@ const DsButton = proxyCustomElement(class DsButton extends H {
|
|
|
139
66
|
}
|
|
140
67
|
};
|
|
141
68
|
render() {
|
|
142
|
-
const classes = classNames(
|
|
69
|
+
const classes = classNames(`ds-button ${this.variant} ${this.colour} ${this.size}`, {
|
|
143
70
|
'icon-start': this.icon && this.iconPosition === 'start' && this.value,
|
|
144
71
|
'icon-end': this.icon && this.iconPosition === 'end' && this.value,
|
|
145
72
|
'icon-only': this.icon && !this.value,
|
|
146
73
|
});
|
|
147
74
|
const iconSize = this.size === 'small' ? '1rem' : undefined;
|
|
148
75
|
const isDisabled = this.disabled || this.ariaDisabled === 'true';
|
|
149
|
-
return (h("button", { key: '
|
|
76
|
+
return (h("button", { key: '57b49111cb6e4957d1cd69cdfd09b99fe620b614', ref: el => (this.buttonEl = el), onKeyDown: this.handleKeyDown, onKeyUp: this.handleKeyUp, class: classes, style: { fontWeight: this.fontWeight }, type: this.type, "aria-disabled": isDisabled ? 'true' : 'false', ...this.inheritedAttributes }, h("slot", { key: '56532d67c5a1df5e831025422db0c886bd731db0', name: "prefix" }, this.icon && this.iconPosition === 'start' && h("ds-icon", { key: '6028ee6b589400340f21411b252c7ba85732fa1c', name: this.icon, size: iconSize })), this.value && h("span", { key: '8b98003443f13f88f76b9a9a611eb1abc4daee74', class: "button-value" }, this.value), h("slot", { key: '35ad0a3aa154b8afba9bd50ffe30c1e25a37f382', name: "suffix" }, this.icon && this.iconPosition === 'end' && h("ds-icon", { key: '7eebd8b5754c0dd1d3d6a435234728518a16a405', name: this.icon, size: iconSize }))));
|
|
150
77
|
}
|
|
151
78
|
static get style() { return DsButtonStyle0; }
|
|
152
79
|
}, [6, "ds-button", {
|
|
@@ -159,6 +86,7 @@ const DsButton = proxyCustomElement(class DsButton extends H {
|
|
|
159
86
|
"iconPosition": [1, "icon-position"],
|
|
160
87
|
"type": [1],
|
|
161
88
|
"disabled": [4],
|
|
89
|
+
"fullWidth": [4, "full-width"],
|
|
162
90
|
"ariaDisabled": [1, "aria-disabled"]
|
|
163
91
|
}]);
|
|
164
92
|
function defineCustomElement() {
|