@swisspost/design-system-components 1.5.1 → 1.6.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/check-non-empty-ae713942.js +13 -0
- package/dist/cjs/check-non-empty-ae713942.js.map +1 -0
- package/dist/cjs/{check-one-of-4c2e8b2e.js → check-one-of-27ad3154.js} +1 -1
- package/dist/cjs/check-one-of-27ad3154.js.map +1 -0
- package/dist/cjs/constants-238701d3.js +7 -0
- package/dist/cjs/constants-238701d3.js.map +1 -0
- package/dist/cjs/fade-35a3633a.js +12 -0
- package/dist/cjs/fade-35a3633a.js.map +1 -0
- package/dist/cjs/index-b38a23e0.js +41 -0
- package/dist/cjs/index-b38a23e0.js.map +1 -0
- package/dist/cjs/{index-12cc37c9.js → index-b619e205.js} +245 -41
- package/dist/cjs/index-b619e205.js.map +1 -0
- package/dist/cjs/index.cjs.js +26 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +3 -12
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/package-7c4db872.js +7 -0
- package/dist/cjs/package-7c4db872.js.map +1 -0
- package/dist/cjs/post-accordion.cjs.entry.js +89 -0
- package/dist/cjs/post-accordion.cjs.entry.js.map +1 -0
- package/dist/cjs/post-alert-c037e6a3.js +101 -0
- package/dist/{post-components/p-7240ae7b.entry.js.map → cjs/post-alert-c037e6a3.js.map} +1 -1
- package/dist/cjs/post-alert.cjs.entry.js +9 -96
- package/dist/cjs/post-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/post-collapsible-7c9d23a2.js +93 -0
- package/dist/cjs/post-collapsible-7c9d23a2.js.map +1 -0
- package/dist/cjs/post-collapsible.cjs.entry.js +7 -119
- package/dist/cjs/post-collapsible.cjs.entry.js.map +1 -1
- package/dist/cjs/post-components.cjs.js +3 -6
- package/dist/cjs/post-components.cjs.js.map +1 -1
- package/dist/cjs/post-icon-f418f76a.js +105 -0
- package/dist/cjs/post-icon-f418f76a.js.map +1 -0
- package/dist/cjs/post-icon.cjs.entry.js +8 -100
- package/dist/cjs/post-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/post-tab-header-e08c2a42.js +33 -0
- package/dist/cjs/post-tab-header-e08c2a42.js.map +1 -0
- package/dist/cjs/post-tab-header.cjs.entry.js +6 -26
- package/dist/cjs/post-tab-header.cjs.entry.js.map +1 -1
- package/dist/cjs/post-tab-panel-721f7f32.js +27 -0
- package/dist/cjs/post-tab-panel-721f7f32.js.map +1 -0
- package/dist/cjs/post-tab-panel.cjs.entry.js +4 -20
- package/dist/cjs/post-tab-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/post-tabs-4bcc867b.js +153 -0
- package/dist/cjs/post-tabs-4bcc867b.js.map +1 -0
- package/dist/cjs/post-tabs.cjs.entry.js +5 -146
- package/dist/cjs/post-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/post-tooltip-261c5cda.js +5095 -0
- package/dist/cjs/post-tooltip-261c5cda.js.map +1 -0
- package/dist/cjs/post-tooltip.cjs.entry.js +5 -5088
- package/dist/cjs/post-tooltip.cjs.entry.js.map +1 -1
- package/dist/collection/animations/collapse.js +13 -0
- package/dist/collection/animations/collapse.js.map +1 -0
- package/dist/collection/animations/fade.js +4 -4
- package/dist/collection/animations/fade.js.map +1 -1
- package/dist/collection/collection-manifest.json +10 -9
- package/dist/collection/components/post-accordion/post-accordion.css +1 -0
- package/dist/collection/components/post-accordion/post-accordion.js +178 -0
- package/dist/collection/components/post-accordion/post-accordion.js.map +1 -0
- package/dist/collection/components/post-alert/post-alert.css +1 -1
- package/dist/collection/components/post-alert/post-alert.js +9 -7
- package/dist/collection/components/post-alert/post-alert.js.map +1 -1
- package/dist/collection/components/post-collapsible/heading-levels.js +2 -0
- package/dist/collection/components/post-collapsible/heading-levels.js.map +1 -0
- package/dist/collection/components/post-collapsible/post-collapsible.css +1 -29
- package/dist/collection/components/post-collapsible/post-collapsible.js +65 -63
- package/dist/collection/components/post-collapsible/post-collapsible.js.map +1 -1
- package/dist/collection/components/post-icon/post-icon.js +5 -4
- package/dist/collection/components/post-icon/post-icon.js.map +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.css +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.js +5 -4
- package/dist/collection/components/post-tab-header/post-tab-header.js.map +1 -1
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +2 -2
- package/dist/collection/components/post-tabs/post-tabs.js +11 -7
- package/dist/collection/components/post-tabs/post-tabs.js.map +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +22 -15
- package/dist/collection/components/post-tooltip/post-tooltip.js.map +1 -1
- package/dist/collection/index.js +8 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/utils/index.js +1 -3
- package/dist/collection/utils/index.js.map +1 -1
- package/dist/collection/utils/is-motion-reduced.js +4 -0
- package/dist/collection/utils/is-motion-reduced.js.map +1 -0
- package/dist/collection/utils/property-checkers/check-non-empty.js +1 -1
- package/dist/collection/utils/property-checkers/empty-or.js +1 -1
- package/dist/collection/utils/property-checkers/index.js +4 -4
- package/dist/components/check-non-empty.js +2 -2
- package/dist/components/check-non-empty.js.map +1 -1
- package/dist/components/check-one-of.js.map +1 -1
- package/dist/components/constants.js +5 -0
- package/dist/components/constants.js.map +1 -0
- package/dist/components/fade.js +4 -4
- package/dist/components/fade.js.map +1 -1
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +8 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js +36 -0
- package/dist/components/index2.js.map +1 -0
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion.d.ts +11 -0
- package/dist/components/post-accordion.js +108 -0
- package/dist/components/post-accordion.js.map +1 -0
- package/dist/components/post-alert.js +1 -128
- package/dist/components/post-alert.js.map +1 -1
- package/dist/components/post-alert2.js +138 -0
- package/dist/components/post-alert2.js.map +1 -0
- package/dist/components/post-collapsible.js +1 -146
- package/dist/components/post-collapsible.js.map +1 -1
- package/dist/components/post-collapsible2.js +117 -0
- package/dist/components/post-collapsible2.js.map +1 -0
- package/dist/components/post-icon2.js +11 -21
- package/dist/components/post-icon2.js.map +1 -1
- package/dist/components/post-tab-header.js +1 -45
- package/dist/components/post-tab-header.js.map +1 -1
- package/dist/components/post-tab-header2.js +51 -0
- package/dist/components/post-tab-header2.js.map +1 -0
- package/dist/components/post-tab-panel.js +1 -39
- package/dist/components/post-tab-panel.js.map +1 -1
- package/dist/components/post-tab-panel2.js +43 -0
- package/dist/components/post-tab-panel2.js.map +1 -0
- package/dist/components/post-tabs.js +1 -165
- package/dist/components/post-tabs.js.map +1 -1
- package/dist/components/post-tabs2.js +169 -0
- package/dist/components/post-tabs2.js.map +1 -0
- package/dist/components/post-tooltip.js +1 -5111
- package/dist/components/post-tooltip.js.map +1 -1
- package/dist/components/post-tooltip2.js +5117 -0
- package/dist/components/post-tooltip2.js.map +1 -0
- package/dist/docs.d.ts +334 -235
- package/dist/docs.json +458 -14
- package/dist/esm/check-non-empty-09c39561.js +11 -0
- package/dist/esm/check-non-empty-09c39561.js.map +1 -0
- package/dist/esm/{check-one-of-ded5e15e.js → check-one-of-74750af9.js} +1 -1
- package/dist/esm/check-one-of-74750af9.js.map +1 -0
- package/dist/esm/constants-8d548297.js +5 -0
- package/dist/esm/constants-8d548297.js.map +1 -0
- package/dist/esm/fade-7fd71785.js +9 -0
- package/dist/esm/fade-7fd71785.js.map +1 -0
- package/dist/esm/index-35921354.js +36 -0
- package/dist/esm/index-35921354.js.map +1 -0
- package/dist/esm/{index-5611074b.js → index-4eff5fc5.js} +245 -41
- package/dist/esm/index-4eff5fc5.js.map +1 -0
- package/dist/esm/index.js +14 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +4 -13
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/package-3bbdb32c.js +5 -0
- package/dist/esm/package-3bbdb32c.js.map +1 -0
- package/dist/esm/post-accordion.entry.js +85 -0
- package/dist/esm/post-accordion.entry.js.map +1 -0
- package/dist/{post-components/p-7240ae7b.entry.js → esm/post-alert-5dd43c8b.js} +99 -2
- package/dist/esm/post-alert-5dd43c8b.js.map +1 -0
- package/dist/esm/post-alert.entry.js +8 -99
- package/dist/esm/post-alert.entry.js.map +1 -1
- package/dist/esm/post-collapsible-26dc2340.js +91 -0
- package/dist/esm/post-collapsible-26dc2340.js.map +1 -0
- package/dist/esm/post-collapsible.entry.js +6 -122
- package/dist/esm/post-collapsible.entry.js.map +1 -1
- package/dist/esm/post-components.js +4 -7
- package/dist/esm/post-components.js.map +1 -1
- package/dist/esm/post-icon-fb0eb8aa.js +103 -0
- package/dist/esm/post-icon-fb0eb8aa.js.map +1 -0
- package/dist/esm/post-icon.entry.js +7 -103
- package/dist/esm/post-icon.entry.js.map +1 -1
- package/dist/esm/post-tab-header-deebc551.js +31 -0
- package/dist/esm/post-tab-header-deebc551.js.map +1 -0
- package/dist/esm/post-tab-header.entry.js +5 -29
- package/dist/esm/post-tab-header.entry.js.map +1 -1
- package/dist/esm/post-tab-panel-4b820f71.js +25 -0
- package/dist/esm/post-tab-panel-4b820f71.js.map +1 -0
- package/dist/esm/post-tab-panel.entry.js +3 -23
- package/dist/esm/post-tab-panel.entry.js.map +1 -1
- package/dist/esm/post-tabs-2d8d6a33.js +151 -0
- package/dist/esm/post-tabs-2d8d6a33.js.map +1 -0
- package/dist/esm/post-tabs.entry.js +4 -149
- package/dist/esm/post-tabs.entry.js.map +1 -1
- package/dist/esm/post-tooltip-811309c5.js +5093 -0
- package/dist/esm/post-tooltip-811309c5.js.map +1 -0
- package/dist/esm/post-tooltip.entry.js +4 -5091
- package/dist/esm/post-tooltip.entry.js.map +1 -1
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/{p-8c386036.entry.js → p-01e8dfe6.js} +3 -3
- package/dist/post-components/p-01e8dfe6.js.map +1 -0
- package/dist/post-components/p-0a49c1a3.entry.js +2 -0
- package/dist/post-components/{p-bcc705f1.js → p-1339f8cd.js} +1 -1
- package/dist/post-components/p-1339f8cd.js.map +1 -0
- package/dist/post-components/{p-123bb6fb.entry.js → p-1a8a8ef2.js} +2 -2
- package/dist/post-components/p-1a8a8ef2.js.map +1 -0
- package/dist/post-components/p-27092ac3.entry.js +2 -0
- package/dist/post-components/p-27092ac3.entry.js.map +1 -0
- package/dist/post-components/{p-e5306504.js → p-2737eaf5.js} +1 -1
- package/dist/post-components/p-2737eaf5.js.map +1 -0
- package/dist/post-components/p-332eef46.js +2 -0
- package/dist/post-components/p-332eef46.js.map +1 -0
- package/dist/post-components/p-440193f4.js +2 -0
- package/dist/post-components/p-440193f4.js.map +1 -0
- package/dist/post-components/p-541142fd.js +2 -0
- package/dist/post-components/p-541142fd.js.map +1 -0
- package/dist/post-components/{p-0d37fe44.entry.js → p-574acdb0.js} +2 -2
- package/dist/post-components/p-574acdb0.js.map +1 -0
- package/dist/post-components/p-66460e3f.entry.js +2 -0
- package/dist/post-components/p-66460e3f.entry.js.map +1 -0
- package/dist/post-components/p-810ee105.entry.js +2 -0
- package/dist/post-components/p-810ee105.entry.js.map +1 -0
- package/dist/post-components/p-939df031.entry.js +2 -0
- package/dist/post-components/p-939df031.entry.js.map +1 -0
- package/dist/post-components/p-94b3f291.entry.js +2 -0
- package/dist/post-components/p-94b3f291.entry.js.map +1 -0
- package/dist/post-components/p-97000cb6.js +2 -0
- package/dist/post-components/p-97000cb6.js.map +1 -0
- package/dist/post-components/p-a7649277.js +3 -0
- package/dist/post-components/p-a7649277.js.map +1 -0
- package/dist/post-components/p-abd149b3.entry.js +2 -0
- package/dist/post-components/p-abd149b3.entry.js.map +1 -0
- package/dist/post-components/p-b531475e.js +2 -0
- package/dist/post-components/p-b531475e.js.map +1 -0
- package/dist/post-components/p-c6b73d6e.js +2 -0
- package/dist/post-components/p-c6b73d6e.js.map +1 -0
- package/dist/post-components/p-d4fb9f16.js +2 -0
- package/dist/post-components/p-d4fb9f16.js.map +1 -0
- package/dist/post-components/p-dfe29f7f.js +2 -0
- package/dist/post-components/p-dfe29f7f.js.map +1 -0
- package/dist/post-components/p-e9dc9039.entry.js +2 -0
- package/dist/post-components/p-e9dc9039.entry.js.map +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/post-components/post-components.esm.js.map +1 -1
- package/dist/types/animations/collapse.d.ts +2 -0
- package/dist/types/components/post-accordion/post-accordion.d.ts +28 -0
- package/dist/types/components/post-alert/post-alert.d.ts +1 -1
- package/dist/types/components/post-collapsible/heading-levels.d.ts +2 -0
- package/dist/types/components/post-collapsible/post-collapsible.d.ts +16 -12
- package/dist/types/components.d.ts +79 -3
- package/dist/types/index.d.ts +7 -0
- package/dist/types/stencil-public-runtime.d.ts +38 -5
- package/dist/types/utils/index.d.ts +1 -3
- package/dist/types/utils/is-motion-reduced.d.ts +1 -0
- package/loader/index.d.ts +1 -1
- package/package.json +8 -8
- package/dist/cjs/check-non-empty-35b4d0b5.js +0 -14
- package/dist/cjs/check-non-empty-35b4d0b5.js.map +0 -1
- package/dist/cjs/check-one-of-4c2e8b2e.js.map +0 -1
- package/dist/cjs/check-type-508a21a5.js +0 -18
- package/dist/cjs/check-type-508a21a5.js.map +0 -1
- package/dist/cjs/fade-8c6d4fa7.js +0 -12
- package/dist/cjs/fade-8c6d4fa7.js.map +0 -1
- package/dist/cjs/index-12cc37c9.js.map +0 -1
- package/dist/cjs/index-f8f6f146.js +0 -28
- package/dist/cjs/index-f8f6f146.js.map +0 -1
- package/dist/cjs/package-112e1698.js +0 -7
- package/dist/cjs/package-112e1698.js.map +0 -1
- package/dist/collection/utils/get-element-height.js +0 -12
- package/dist/collection/utils/get-element-height.js.map +0 -1
- package/dist/collection/utils/on-transition-end.js +0 -15
- package/dist/collection/utils/on-transition-end.js.map +0 -1
- package/dist/collection/utils/should-reduce-motion.js +0 -4
- package/dist/collection/utils/should-reduce-motion.js.map +0 -1
- package/dist/components/check-type.js +0 -16
- package/dist/components/check-type.js.map +0 -1
- package/dist/esm/check-non-empty-554bdf88.js +0 -11
- package/dist/esm/check-non-empty-554bdf88.js.map +0 -1
- package/dist/esm/check-one-of-ded5e15e.js.map +0 -1
- package/dist/esm/check-type-18ebb4e7.js +0 -16
- package/dist/esm/check-type-18ebb4e7.js.map +0 -1
- package/dist/esm/fade-671f1489.js +0 -9
- package/dist/esm/fade-671f1489.js.map +0 -1
- package/dist/esm/index-5611074b.js.map +0 -1
- package/dist/esm/index-7f723686.js +0 -24
- package/dist/esm/index-7f723686.js.map +0 -1
- package/dist/esm/package-331628f1.js +0 -5
- package/dist/esm/package-331628f1.js.map +0 -1
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/post-components/p-0d37fe44.entry.js.map +0 -1
- package/dist/post-components/p-123bb6fb.entry.js.map +0 -1
- package/dist/post-components/p-15fc087f.js +0 -2
- package/dist/post-components/p-15fc087f.js.map +0 -1
- package/dist/post-components/p-65a9d1c2.entry.js +0 -2
- package/dist/post-components/p-65a9d1c2.entry.js.map +0 -1
- package/dist/post-components/p-75a7b352.js +0 -2
- package/dist/post-components/p-75a7b352.js.map +0 -1
- package/dist/post-components/p-8c386036.entry.js.map +0 -1
- package/dist/post-components/p-97a064da.entry.js +0 -2
- package/dist/post-components/p-97a064da.entry.js.map +0 -1
- package/dist/post-components/p-bcc705f1.js.map +0 -1
- package/dist/post-components/p-c8efe0ae.js +0 -2
- package/dist/post-components/p-c8efe0ae.js.map +0 -1
- package/dist/post-components/p-ccae1c68.entry.js +0 -2
- package/dist/post-components/p-ccae1c68.entry.js.map +0 -1
- package/dist/post-components/p-d94db268.js +0 -3
- package/dist/post-components/p-d94db268.js.map +0 -1
- package/dist/post-components/p-e5306504.js.map +0 -1
- package/dist/post-components/p-eb3ff4dc.js +0 -2
- package/dist/types/utils/get-element-height.d.ts +0 -3
- package/dist/types/utils/on-transition-end.d.ts +0 -1
- package/dist/types/utils/should-reduce-motion.d.ts +0 -1
- /package/dist/post-components/{p-eb3ff4dc.js.map → p-0a49c1a3.entry.js.map} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as o,h as t,H as i,g as e}from"./p-d94db268.js";import{c as n}from"./p-bcc705f1.js";import{c as s}from"./p-75a7b352.js";import{v as a}from"./p-eb3ff4dc.js";function r(o,t=[]){if(!Array.isArray(t))t=[t];const i=t.filter((t=>!o.classList.contains(t)));if(i.length)o.classList.add(...i);const e=o.scrollHeight;if(i.length)o.classList.remove(...i);return e}function d(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}async function c(o){return new Promise((t=>{if(d()){t()}else{o.ontransitionend=()=>{t();o.ontransitionend=null}}}))}const h=".accordion-item{border-block-start:2px solid #e6e6e6}.accordion-header{font-size:1.0625rem;font-weight:700;line-height:1.5;margin:0}@media (min-width: 1024px){.accordion-header{font-size:1.25rem}}.accordion-button{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;user-select:none;appearance:button;width:100%;position:relative;padding-block:1rem;padding-inline-start:1rem;padding-inline-end:2.5rem;text-align:start}.accordion-button:not(:disabled){cursor:pointer}.accordion-button:disabled{opacity:.4}.accordion-button:focus{outline:none;box-shadow:0 0 0 .125rem rgba(51,51,51,.25)}.accordion-button::after{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m23.6 18.3-.9.9-6.7-6.6-6.6 6.6-.9-.9 7.5-7.6 7.6 7.6z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m23.6 18.3-.9.9-6.7-6.6-6.6 6.6-.9-.9 7.5-7.6 7.6 7.6z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor;content:\"\";display:block;height:1.5rem;width:1.5rem;position:absolute;inset-inline-end:1rem;inset-block-start:50%;transform:translateY(-50%);transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1);border:1px solid rgb(var(--post-bg-rgb, 255, 255, 255))}.accordion-button.collapsed::after{transform:translateY(-50%) rotate(-180deg)}.accordion-button>.text-truncate{display:block}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:hover:not(:disabled),.accordion-button:focus-visible:not(:disabled){outline:2px solid Highlight}.accordion-button:disabled{opacity:1 !important}}.accordion-body{padding:.75rem 1rem 2.5rem;border-block-start:2px solid #e6e6e6}.accordion-body h1,.accordion-body .h1{font-size:1.0625rem;margin:2.5rem 0 0;font-weight:700}@media (min-width: 1024px){.accordion-body h1,.accordion-body .h1{font-size:1.25rem}}.accordion-body h2,.accordion-body .h2{font-size:1.0625rem;margin:2.5rem 0 0;font-weight:700}@media (min-width: 1024px){.accordion-body h2,.accordion-body .h2{font-size:1.25rem}}.accordion-body h3,.accordion-body .h3{font-size:1.0625rem;margin:2.5rem 0 0;font-weight:700}@media (min-width: 1024px){.accordion-body h3,.accordion-body .h3{font-size:1.25rem}}.accordion-body h4,.accordion-body .h4{font-size:1.0625rem;margin:2.5rem 0 0;font-weight:700}@media (min-width: 1024px){.accordion-body h4,.accordion-body .h4{font-size:1.25rem}}.accordion-body h5,.accordion-body .h5{font-size:1.0625rem;margin:2.5rem 0 0;font-weight:700}@media (min-width: 1024px){.accordion-body h5,.accordion-body .h5{font-size:1.25rem}}.accordion-body h6,.accordion-body .h6{font-size:1.0625rem;margin:2.5rem 0 0;font-weight:700}@media (min-width: 1024px){.accordion-body h6,.accordion-body .h6{font-size:1.25rem}}.accordion-button>:first-child,.accordion-body>:first-child{margin-block-start:0 !important}.accordion-button>:last-child,.accordion-body>:last-child{margin-block-end:0 !important}/*!\n * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n\n * The MIT License (MIT)\n\n * Copyright (c) 2011-2020 Twitter, Inc.\n * Copyright (c) 2011-2020 The Bootstrap Authors\n\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */.fade{transition:opacity 200ms linear}@media (prefers-reduced-motion: reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{height:0;overflow:hidden;transition:height 250ms cubic-bezier(0.4, 0, 0.2, 1),padding 250ms cubic-bezier(0.4, 0, 0.2, 1)}@media (prefers-reduced-motion: reduce){.collapsing{transition:none}}.collapsing.collapse-horizontal{width:0;height:auto;transition:width .35s ease}@media (prefers-reduced-motion: reduce){.collapsing.collapse-horizontal{transition:none}}:host{display:block}:host .accordion-button>::slotted(.text-truncate){display:block}";let l=0;const p=class{constructor(t){o(this,t);this.isLoaded=false;this.collapseClasses=undefined;this.collapseHeight=null;this.collapsibleId=undefined;this.hasHeader=undefined;this.headingTag=undefined;this.isOpen=true;this.onAccordionButtonClick=()=>this.toggle();this.collapsed=false;this.headingLevel=2}validateCollapsed(o=this.collapsed){s(o,"boolean",'The post-collapsible "collapsed" prop should be a boolean.');if(!this.isLoaded){this.isOpen=!o;this.collapseClasses=this.getCollapseClasses()}else{setTimeout((()=>{this.toggle(!o)}))}}validateHeadingLevel(o=this.headingLevel){n(o,[1,2,3,4,5,6],"The post-collapsible element requires a heading level between 1 and 6.");this.headingTag=`h${o}`}componentWillLoad(){this.validateCollapsed();this.validateHeadingLevel();this.hasHeader=this.host.querySelectorAll('[slot="header"]').length>0;if(!this.hasHeader){console.warn("Be sure to bind the post-collapsible to its control using aria-controls and aria-expanded attributes. More information here: https://getbootstrap.com/docs/5.2/components/collapse/#accessibility")}this.collapsibleId=this.host.id||`post-collapsible-${l++}`;this.collapseClasses=this.getCollapseClasses()}componentDidLoad(){this.isLoaded=true;this.collapsibleElement=this.host.shadowRoot.querySelector(`#${this.collapsibleId}--collapse`)}async toggle(o=!this.isOpen){if(o!==this.isOpen){this.isOpen=!this.isOpen;this.startTransition();await c(this.collapsibleElement).then((()=>{this.collapseHeight=null;this.collapseClasses=this.getCollapseClasses()}));return this.isOpen}}startTransition(){const o=r(this.collapsibleElement,"show");this.collapseHeight=`${this.isOpen?0:o}px`;this.collapseClasses="collapsing";setTimeout((()=>{this.collapseHeight=`${this.isOpen?o:0}px`}),50)}getCollapseClasses(){return this.isOpen?"collapse show":"collapse"}render(){if(!this.hasHeader){return t("div",{id:`${this.collapsibleId}--collapse`,class:this.collapseClasses,style:{height:this.collapseHeight}},t("slot",null))}return t(i,{"data-version":a},t("div",{class:"accordion-item"},t(this.headingTag,{class:"accordion-header",id:`${this.collapsibleId}--header`},t("button",{class:`accordion-button ${this.isOpen?"":"collapsed"}`,type:"button","aria-expanded":`${this.isOpen}`,"aria-controls":`${this.collapsibleId}--collapse`,onClick:this.onAccordionButtonClick},t("slot",{name:"header"}))),t("div",{id:`${this.collapsibleId}--collapse`,class:`accordion-collapse ${this.collapseClasses}`,style:{height:this.collapseHeight},"aria-labelledby":`${this.collapsibleId}--header`},t("div",{class:"accordion-body"},t("slot",null)))))}get host(){return e(this)}static get watchers(){return{collapsed:["validateCollapsed"],headingLevel:["validateHeadingLevel"]}}};p.style=h;export{p as post_collapsible};
|
|
2
|
-
//# sourceMappingURL=p-97a064da.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getElementHeight","el","classesWhenShown","Array","isArray","classesToAdd","filter","klass","classList","contains","length","add","scrollHeight","remove","shouldReduceMotion","window","matchMedia","matches","async","onTransitionEnd","Promise","resolve","ontransitionend","postCollapsibleCss","nextId","PostCollapsible","this","isLoaded","toggle","validateCollapsed","newValue","collapsed","checkType","isOpen","collapseClasses","getCollapseClasses","setTimeout","validateHeadingLevel","headingLevel","checkOneOf","headingTag","componentWillLoad","hasHeader","host","querySelectorAll","console","warn","collapsibleId","id","componentDidLoad","collapsibleElement","shadowRoot","querySelector","open","startTransition","then","collapseHeight","expandedHeight","render","h","class","style","height","Host","version","type","onClick","onAccordionButtonClick","name"],"sources":["./src/utils/get-element-height.ts","./src/utils/should-reduce-motion.ts","./src/utils/on-transition-end.ts","./src/components/post-collapsible/post-collapsible.scss?tag=post-collapsible&encapsulation=shadow","./src/components/post-collapsible/post-collapsible.tsx"],"sourcesContent":["export function getElementHeight(el: HTMLElement): number;\nexport function getElementHeight(el: HTMLElement, classWhenShown: string): number;\nexport function getElementHeight(el: HTMLElement, classesWhenShown: string[]): number;\nexport function getElementHeight(el: HTMLElement, classesWhenShown: string | string[] = []): number {\n if (!Array.isArray(classesWhenShown)) classesWhenShown = [classesWhenShown];\n\n const classesToAdd = classesWhenShown.filter(klass => !el.classList.contains(klass));\n if (classesToAdd.length) el.classList.add(...classesToAdd);\n\n const scrollHeight = el.scrollHeight;\n\n if (classesToAdd.length) el.classList.remove(...classesToAdd);\n\n return scrollHeight;\n}\n","export function shouldReduceMotion(): boolean {\n return window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n}\n","import { shouldReduceMotion } from './should-reduce-motion';\n\nexport async function onTransitionEnd(el: HTMLElement): Promise<void> {\n return new Promise(resolve => {\n if (shouldReduceMotion()) {\n resolve();\n } else {\n el.ontransitionend = () => {\n resolve();\n el.ontransitionend = null;\n };\n }\n });\n}\n","@use '@swisspost/design-system-styles/components/accordion';\n@use '@swisspost/design-system-styles/components/transitions';\n\n:host {\n display: block;\n\n .accordion-button > ::slotted(.text-truncate) {\n display: block;\n }\n}\n","import { Component, Element, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport { checkOneOf, checkType, getElementHeight, onTransitionEnd } from '../../utils';\nimport { version } from '../../../package.json';\n\nlet nextId = 0;\n\n@Component({\n tag: 'post-collapsible',\n styleUrl: 'post-collapsible.scss',\n shadow: true,\n})\nexport class PostCollapsible {\n private collapsibleElement: HTMLElement;\n private isLoaded = false;\n\n @Element() host: HTMLPostCollapsibleElement;\n\n @State() collapseClasses: string;\n @State() collapseHeight: string | null = null;\n @State() collapsibleId: string;\n @State() hasHeader: boolean;\n @State() headingTag: string | undefined;\n @State() isOpen = true;\n @State() onAccordionButtonClick = () => this.toggle();\n\n /**\n * If `true`, the element is initially collapsed otherwise it is displayed.\n */\n @Prop() readonly collapsed?: boolean = false;\n\n @Watch('collapsed')\n validateCollapsed(newValue = this.collapsed) {\n checkType(newValue, 'boolean', 'The post-collapsible \"collapsed\" prop should be a boolean.');\n\n if (!this.isLoaded) {\n this.isOpen = !newValue;\n this.collapseClasses = this.getCollapseClasses();\n } else {\n setTimeout(() => {\n this.toggle(!newValue);\n });\n }\n }\n\n /**\n * Defines the hierarchical level of the collapsible header within the headings structure.\n */\n @Prop() readonly headingLevel?: number = 2;\n\n @Watch('headingLevel')\n validateHeadingLevel(newValue = this.headingLevel) {\n checkOneOf(\n newValue,\n [1, 2, 3, 4, 5, 6],\n 'The post-collapsible element requires a heading level between 1 and 6.',\n );\n\n this.headingTag = `h${newValue}`;\n }\n\n componentWillLoad() {\n this.validateCollapsed();\n this.validateHeadingLevel();\n\n this.hasHeader = this.host.querySelectorAll('[slot=\"header\"]').length > 0;\n if (!this.hasHeader) {\n console.warn(\n 'Be sure to bind the post-collapsible to its control using aria-controls and aria-expanded attributes. More information here: https://getbootstrap.com/docs/5.2/components/collapse/#accessibility',\n );\n }\n\n this.collapsibleId = this.host.id || `post-collapsible-${nextId++}`;\n this.collapseClasses = this.getCollapseClasses();\n }\n\n componentDidLoad() {\n this.isLoaded = true;\n this.collapsibleElement = this.host.shadowRoot.querySelector(\n `#${this.collapsibleId}--collapse`,\n );\n }\n\n /**\n * Triggers the collapse programmatically.\n */\n @Method()\n async toggle(open = !this.isOpen): Promise<boolean> {\n if (open !== this.isOpen) {\n this.isOpen = !this.isOpen;\n\n this.startTransition();\n\n await onTransitionEnd(this.collapsibleElement).then(() => {\n this.collapseHeight = null;\n this.collapseClasses = this.getCollapseClasses();\n });\n\n return this.isOpen;\n }\n }\n\n private startTransition() {\n const expandedHeight = getElementHeight(this.collapsibleElement, 'show');\n\n this.collapseHeight = `${this.isOpen ? 0 : expandedHeight}px`;\n this.collapseClasses = 'collapsing';\n\n setTimeout(() => {\n this.collapseHeight = `${this.isOpen ? expandedHeight : 0}px`;\n }, 50);\n }\n\n private getCollapseClasses() {\n return this.isOpen ? 'collapse show' : 'collapse';\n }\n\n render() {\n if (!this.hasHeader) {\n return (\n <div\n id={`${this.collapsibleId}--collapse`}\n class={this.collapseClasses}\n style={{ height: this.collapseHeight }}\n >\n <slot />\n </div>\n );\n }\n\n return (\n <Host data-version={version}>\n <div class=\"accordion-item\">\n <this.headingTag class=\"accordion-header\" id={`${this.collapsibleId}--header`}>\n <button\n class={`accordion-button ${this.isOpen ? '' : 'collapsed'}`}\n type=\"button\"\n aria-expanded={`${this.isOpen}`}\n aria-controls={`${this.collapsibleId}--collapse`}\n onClick={this.onAccordionButtonClick}\n >\n <slot name=\"header\" />\n </button>\n </this.headingTag>\n <div\n id={`${this.collapsibleId}--collapse`}\n class={`accordion-collapse ${this.collapseClasses}`}\n style={{ height: this.collapseHeight }}\n aria-labelledby={`${this.collapsibleId}--header`}\n >\n <div class=\"accordion-body\">\n <slot />\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"8KAGgBA,EAAiBC,EAAiBC,EAAsC,IACtF,IAAKC,MAAMC,QAAQF,GAAmBA,EAAmB,CAACA,GAE1D,MAAMG,EAAeH,EAAiBI,QAAOC,IAAUN,EAAGO,UAAUC,SAASF,KAC7E,GAAIF,EAAaK,OAAQT,EAAGO,UAAUG,OAAON,GAE7C,MAAMO,EAAeX,EAAGW,aAExB,GAAIP,EAAaK,OAAQT,EAAGO,UAAUK,UAAUR,GAEhD,OAAOO,CACT,C,SCdgBE,IACd,OAAOC,OAAOC,WAAW,oCAAoCC,OAC/D,CCAOC,eAAeC,EAAgBlB,GACpC,OAAO,IAAImB,SAAQC,IACjB,GAAIP,IAAsB,CACxBO,G,KACK,CACLpB,EAAGqB,gBAAkB,KACnBD,IACApB,EAAGqB,gBAAkB,IAAI,C,IAIjC,CCbA,MAAMC,EAAqB,yiKCI3B,IAAIC,EAAS,E,MAOAC,EAAe,M,yBAElBC,KAAAC,SAAW,M,mDAKsB,K,4FAIvB,K,4BACgB,IAAMD,KAAKE,S,eAKN,M,kBAmBE,C,CAhBzCC,kBAAkBC,EAAWJ,KAAKK,WAChCC,EAAUF,EAAU,UAAW,8DAE/B,IAAKJ,KAAKC,SAAU,CAClBD,KAAKO,QAAUH,EACfJ,KAAKQ,gBAAkBR,KAAKS,oB,KACvB,CACLC,YAAW,KACTV,KAAKE,QAAQE,EAAS,G,EAW5BO,qBAAqBP,EAAWJ,KAAKY,cACnCC,EACET,EACA,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,GAChB,0EAGFJ,KAAKc,WAAa,IAAIV,G,CAGxBW,oBACEf,KAAKG,oBACLH,KAAKW,uBAELX,KAAKgB,UAAYhB,KAAKiB,KAAKC,iBAAiB,mBAAmBlC,OAAS,EACxE,IAAKgB,KAAKgB,UAAW,CACnBG,QAAQC,KACN,oM,CAIJpB,KAAKqB,cAAgBrB,KAAKiB,KAAKK,IAAM,oBAAoBxB,MACzDE,KAAKQ,gBAAkBR,KAAKS,oB,CAG9Bc,mBACEvB,KAAKC,SAAW,KAChBD,KAAKwB,mBAAqBxB,KAAKiB,KAAKQ,WAAWC,cAC7C,IAAI1B,KAAKqB,0B,CAQb7B,aAAamC,GAAQ3B,KAAKO,QACxB,GAAIoB,IAAS3B,KAAKO,OAAQ,CACxBP,KAAKO,QAAUP,KAAKO,OAEpBP,KAAK4B,wBAECnC,EAAgBO,KAAKwB,oBAAoBK,MAAK,KAClD7B,KAAK8B,eAAiB,KACtB9B,KAAKQ,gBAAkBR,KAAKS,oBAAoB,IAGlD,OAAOT,KAAKO,M,EAIRqB,kBACN,MAAMG,EAAiBzD,EAAiB0B,KAAKwB,mBAAoB,QAEjExB,KAAK8B,eAAiB,GAAG9B,KAAKO,OAAS,EAAIwB,MAC3C/B,KAAKQ,gBAAkB,aAEvBE,YAAW,KACTV,KAAK8B,eAAiB,GAAG9B,KAAKO,OAASwB,EAAiB,KAAK,GAC5D,G,CAGGtB,qBACN,OAAOT,KAAKO,OAAS,gBAAkB,U,CAGzCyB,SACE,IAAKhC,KAAKgB,UAAW,CACnB,OACEiB,EAAA,OACEX,GAAI,GAAGtB,KAAKqB,0BACZa,MAAOlC,KAAKQ,gBACZ2B,MAAO,CAAEC,OAAQpC,KAAK8B,iBAEtBG,EAAA,a,CAKN,OACEA,EAACI,EAAI,gBAAeC,GAClBL,EAAA,OAAKC,MAAM,kBACTD,EAACjC,KAAKc,WAAU,CAACoB,MAAM,mBAAmBZ,GAAI,GAAGtB,KAAKqB,yBACpDY,EAAA,UACEC,MAAO,oBAAoBlC,KAAKO,OAAS,GAAK,cAC9CgC,KAAK,SAAQ,gBACE,GAAGvC,KAAKO,SAAQ,gBAChB,GAAGP,KAAKqB,0BACvBmB,QAASxC,KAAKyC,wBAEdR,EAAA,QAAMS,KAAK,aAGfT,EAAA,OACEX,GAAI,GAAGtB,KAAKqB,0BACZa,MAAO,sBAAsBlC,KAAKQ,kBAClC2B,MAAO,CAAEC,OAAQpC,KAAK8B,gBAAgB,kBACrB,GAAG9B,KAAKqB,yBAEzBY,EAAA,OAAKC,MAAM,kBACTD,EAAA,gB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["checkOneOf","value","possibleValues","error","includes","Error"],"sources":["./src/utils/property-checkers/check-one-of.ts"],"sourcesContent":["export function checkOneOf<T>(value: T, possibleValues: readonly T[], error: string) {\n if (!possibleValues.includes(value)) throw new Error(error);\n}\n"],"mappings":"SAAgBA,EAAcC,EAAUC,EAA8BC,GACpE,IAAKD,EAAeE,SAASH,GAAQ,MAAM,IAAII,MAAMF,EACvD,Q"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["EMPTY_VALUES","undefined","checkNonEmpty","value","error","some","v","Error"],"sources":["./src/utils/property-checkers/constants.ts","./src/utils/property-checkers/check-non-empty.ts"],"sourcesContent":["export const EMPTY_VALUES = [undefined, null, ''];\n","import { EMPTY_VALUES } from './constants';\n\nexport function checkNonEmpty(value: unknown, error: string) {\n if (EMPTY_VALUES.some(v => v === value)) {\n throw new Error(error);\n }\n}\n"],"mappings":"MAAaA,EAAe,CAACC,UAAW,KAAM,I,SCE9BC,EAAcC,EAAgBC,GAC5C,GAAIJ,EAAaK,MAAKC,GAAKA,IAAMH,IAAQ,CACvC,MAAM,IAAII,MAAMH,E,CAEpB,Q"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as i,h as t,H as a,g as n}from"./p-d94db268.js";import{a as e,b as o}from"./p-15fc087f.js";import{v as s}from"./p-eb3ff4dc.js";import{c as r}from"./p-c8efe0ae.js";import{c as l}from"./p-75a7b352.js";import"./p-bcc705f1.js";const c=":host{display:inline-block;width:1em;vertical-align:-0.15em}svg{display:block;width:100%;height:100%;fill:currentColor;background-color:currentColor;-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%}:host([flip-h]:not([flip-h=false])){scale:-1 1}:host([flip-v]:not([flip-v=false])){scale:1 -1}:host([flip-h][flip-v]:not([flip-h=false],[flip-v=false])){scale:-1}:host([animation]){transform-origin:center}:host([animation=cylon]){animation:icon-animation-cylon .75s ease-in-out infinite alternate}:host([animation=cylon-vertical]){animation:icon-animation-cylon-vertical .75s ease-in-out infinite alternate}:host([animation=spin]){animation:icon-animation-spin 2s linear infinite normal}:host([animation=spin-reverse]){animation:icon-animation-spin 2s linear infinite reverse}:host([animation=fade]){animation:icon-animation-fade .75s ease-in-out infinite alternate}:host([animation=throb]){animation:icon-animation-throb .75s ease-in-out infinite alternate}@keyframes icon-animation-cylon{from{transform:translateX(-25%)}to{transform:translateX(25%)}}@keyframes icon-animation-cylon-vertical{from{transform:translateY(25%)}to{transform:translateY(-25%)}}@keyframes icon-animation-fade{from{opacity:.1}to{opacity:1}}@keyframes icon-animation-spin{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes icon-animation-throb{from{opacity:.5;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}";const m="https://unpkg.com/@swisspost/design-system-icons/public/post-icons";const p=["cylon","cylon-vertical","spin","spin-reverse","fade","throb"];const h=[...p];const f=class{constructor(t){i(this,t);this.svgStyles=undefined;this.svgOutput=undefined;this.animation=null;this.base=null;this.flipH=false;this.flipV=false;this.name=undefined;this.rotate=null;this.scale=null}validateAnimation(i=this.animation){if(i!==undefined)e(i,h,`The post-icon "animation" prop requires one of the following values: ${h.join(", ")}.`)}validateBase(i=this.base){o(i,"string",'The post-icon "base" prop should be a string.')}validateFlipH(i=this.flipH){o(i,"boolean",'The post-icon "flipH" prop should be a boolean.')}validateFlipV(i=this.flipV){o(i,"boolean",'The post-icon "flipV" prop should be a boolean.')}validateName(i=this.name){r(i,'The post-icon "name" prop is required!.');l(i,"string",'The post-icon "name" prop should be a string.')}validateRotate(i=this.rotate){o(i,"number",'The post-icon "rotate" prop should be a number.')}validateScale(i=this.scale){o(i,"number",'The post-icon "scale" prop should be a number.')}componentWillLoad(){this.validateBase();this.validateName();this.validateFlipH();this.validateFlipV();this.validateScale();this.validateRotate();this.validateAnimation()}componentWillRender(){this.setPath()}setPath(){var i,t,a,n;const e=(t=(i=document.head.querySelector('meta[name="design-system-settings"][data-post-icon-base]'))===null||i===void 0?void 0:i.getAttribute("data-post-icon-base"))!==null&&t!==void 0?t:null;const o=`${(n=(a=this.base)!==null&&a!==void 0?a:e)!==null&&n!==void 0?n:m}/`.replace(/\/\/$/,"/");const s=`${this.name}.svg#icon`;const r=`${o}${s}`;this.path=new URL(r,window.location.origin).toString()}render(){const i=Object.entries({"-webkit-mask-image":`url('${this.path}')`,"mask-image":`url('${this.path}')`,scale:this.scale&&!isNaN(Number(this.scale))?`${this.scale}`:null,rotate:this.rotate&&!isNaN(Number(this.rotate))?`${this.rotate}deg`:null}).filter((([i,t])=>t!==null)).reduce(((i,[t,a])=>Object.assign(i,{[t]:a})),{});return t(a,{"data-version":s},t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",style:i}))}get host(){return n(this)}static get watchers(){return{animation:["validateAnimation"],base:["validateBase"],flipH:["validateFlipH"],flipV:["validateFlipV"],name:["validateName"],rotate:["validateRotate"],scale:["validateScale"]}}};f.style=c;export{f as post_icon};
|
|
2
|
-
//# sourceMappingURL=p-ccae1c68.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["postIconCss","CDN_URL","ANIMATION_NAMES","ANIMATION_KEYS","PostIcon","validateAnimation","newValue","this","animation","undefined","checkEmptyOrOneOf","join","validateBase","base","checkEmptyOrType","validateFlipH","flipH","validateFlipV","flipV","validateName","name","checkNonEmpty","checkType","validateRotate","rotate","validateScale","scale","componentWillLoad","componentWillRender","setPath","metaBase","_b","_a","document","head","querySelector","getAttribute","fileBase","_d","_c","replace","fileName","filePath","path","URL","window","location","origin","toString","render","svgStyles","Object","entries","isNaN","Number","filter","_key","value","reduce","styles","key","assign","h","Host","version","xmlns","viewBox","style"],"sources":["./src/components/post-icon/post-icon.scss?tag=post-icon&encapsulation=shadow","./src/components/post-icon/post-icon.tsx"],"sourcesContent":["@use 'sass:map';\n\n$post-icon-animations: (\n 'cylon': icon-animation-cylon 0.75s ease-in-out infinite alternate,\n 'cylon-vertical': icon-animation-cylon-vertical 0.75s ease-in-out infinite alternate,\n 'spin': icon-animation-spin 2s linear infinite normal,\n 'spin-reverse': icon-animation-spin 2s linear infinite reverse,\n 'fade': icon-animation-fade 0.75s ease-in-out infinite alternate,\n 'throb': icon-animation-throb 0.75s ease-in-out infinite alternate,\n);\n\n:host {\n display: inline-block;\n width: 1em;\n vertical-align: -0.15em;\n}\n\nsvg {\n display: block;\n width: 100%;\n height: 100%;\n fill: currentColor;\n background-color: currentColor;\n -webkit-mask-position: center center;\n mask-position: center center;\n -webkit-mask-repeat: no-repeat;\n mask-repeat: no-repeat;\n -webkit-mask-size: 100%;\n mask-size: 100%;\n}\n\n// flip\n\n:host([flip-h]:not([flip-h='false'])) {\n scale: -1 1;\n}\n\n:host([flip-v]:not([flip-v='false'])) {\n scale: 1 -1;\n}\n\n:host([flip-h][flip-v]:not([flip-h='false'], [flip-v='false'])) {\n scale: -1;\n}\n\n// scale\n// done with inline styling\n\n// rotate\n// done with inline styling\n\n// animation\n\n:host([animation]) {\n transform-origin: center;\n}\n\n@each $key, $value in $post-icon-animations {\n :host([animation='#{$key}']) {\n animation: $value;\n }\n}\n\n@keyframes icon-animation-cylon {\n from {\n transform: translateX(-25%);\n }\n to {\n transform: translateX(25%);\n }\n}\n\n@keyframes icon-animation-cylon-vertical {\n from {\n transform: translateY(25%);\n }\n to {\n transform: translateY(-25%);\n }\n}\n\n@keyframes icon-animation-fade {\n from {\n opacity: 0.1;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes icon-animation-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(359deg);\n }\n}\n\n@keyframes icon-animation-throb {\n from {\n opacity: 0.5;\n transform: scale(0.5);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n","import { Component, Element, Host, h, Prop, State, Watch } from '@stencil/core';\nimport { checkNonEmpty, checkType, checkEmptyOrType, checkEmptyOrOneOf } from '../../utils';\nimport { version } from '../../../package.json';\n\nconst CDN_URL = 'https://unpkg.com/@swisspost/design-system-icons/public/post-icons';\nconst ANIMATION_NAMES = [\n 'cylon',\n 'cylon-vertical',\n 'spin',\n 'spin-reverse',\n 'fade',\n 'throb',\n] as const;\nconst ANIMATION_KEYS = [...ANIMATION_NAMES];\n\ntype Animation = (typeof ANIMATION_NAMES)[number];\n\n/**\n * @class PostIcon - representing a stencil component\n */\n@Component({\n tag: 'post-icon',\n styleUrl: 'post-icon.scss',\n shadow: true,\n})\nexport class PostIcon {\n private path: string;\n\n @Element() host: HTMLPostIconElement;\n\n @State() svgStyles: string;\n @State() svgOutput: string;\n\n /**\n * The name of the animation.\n */\n @Prop() readonly animation?: Animation | null = null;\n\n @Watch('animation')\n validateAnimation(newValue = this.animation) {\n if (newValue !== undefined)\n checkEmptyOrOneOf(\n newValue,\n ANIMATION_KEYS,\n `The post-icon \"animation\" prop requires one of the following values: ${ANIMATION_KEYS.join(\n ', ',\n )}.`,\n );\n }\n\n /**\n * The base path, where the icons are located (must be a public url).<br/>Leave this field empty to use the default cdn url.\n */\n @Prop() readonly base?: string | null = null;\n\n @Watch('base')\n validateBase(newValue = this.base) {\n checkEmptyOrType(newValue, 'string', 'The post-icon \"base\" prop should be a string.');\n }\n\n /**\n * When set to `true`, the icon will be flipped horizontally.\n */\n @Prop() readonly flipH?: boolean = false;\n\n @Watch('flipH')\n validateFlipH(newValue = this.flipH) {\n checkEmptyOrType(newValue, 'boolean', 'The post-icon \"flipH\" prop should be a boolean.');\n }\n\n /**\n * When set to `true`, the icon will be flipped vertically.\n */\n @Prop() readonly flipV?: boolean = false;\n\n @Watch('flipV')\n validateFlipV(newValue = this.flipV) {\n checkEmptyOrType(newValue, 'boolean', 'The post-icon \"flipV\" prop should be a boolean.');\n }\n\n /**\n * The name/id of the icon (e.g. 1000, 1001, ...).\n */\n @Prop() readonly name!: string;\n\n @Watch('name')\n validateName(newValue = this.name) {\n checkNonEmpty(newValue, 'The post-icon \"name\" prop is required!.');\n checkType(newValue, 'string', 'The post-icon \"name\" prop should be a string.');\n }\n\n /**\n * The number of degree for the css rotate transformation.\n */\n @Prop() readonly rotate?: number | null = null;\n\n @Watch('rotate')\n validateRotate(newValue = this.rotate) {\n checkEmptyOrType(newValue, 'number', 'The post-icon \"rotate\" prop should be a number.');\n }\n\n /**\n * The number for the css scale transformation.\n */\n @Prop() readonly scale?: number | null = null;\n\n @Watch('scale')\n validateScale(newValue = this.scale) {\n checkEmptyOrType(newValue, 'number', 'The post-icon \"scale\" prop should be a number.');\n }\n\n componentWillLoad() {\n this.validateBase();\n this.validateName();\n this.validateFlipH();\n this.validateFlipV();\n this.validateScale();\n this.validateRotate();\n this.validateAnimation();\n }\n\n componentWillRender() {\n this.setPath();\n }\n\n private setPath() {\n // Construct icon path from different possible sources\n const metaBase =\n document.head\n .querySelector('meta[name=\"design-system-settings\"][data-post-icon-base]')\n ?.getAttribute('data-post-icon-base') ?? null;\n\n const fileBase = `${this.base ?? metaBase ?? CDN_URL}/`.replace(/\\/\\/$/, '/');\n const fileName = `${this.name}.svg#icon`;\n const filePath = `${fileBase}${fileName}`;\n\n this.path = new URL(filePath, window.location.origin).toString();\n }\n\n render() {\n // create inline styles for some properties\n const svgStyles = Object.entries({\n '-webkit-mask-image': `url('${this.path}')`,\n 'mask-image': `url('${this.path}')`,\n 'scale': this.scale && !isNaN(Number(this.scale)) ? `${this.scale}` : null,\n 'rotate': this.rotate && !isNaN(Number(this.rotate)) ? `${this.rotate}deg` : null,\n })\n .filter(([_key, value]) => value !== null)\n .reduce((styles, [key, value]) => Object.assign(styles, { [key]: value }), {});\n\n return (\n <Host data-version={version}>\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" style={svgStyles}>\n </svg>\n </Host>\n );\n }\n}\n"],"mappings":"wOAAA,MAAMA,EAAc,w+CCIpB,MAAMC,EAAU,qEAChB,MAAMC,EAAkB,CACtB,QACA,iBACA,OACA,eACA,OACA,SAEF,MAAMC,EAAiB,IAAID,G,MAYdE,EAAQ,M,0FAW6B,K,UAiBR,K,WAUL,M,WAUA,M,gCAqBO,K,WAUD,I,CAjEzCC,kBAAkBC,EAAWC,KAAKC,WAChC,GAAIF,IAAaG,UACfC,EACEJ,EACAH,EACA,wEAAwEA,EAAeQ,KACrF,S,CAWRC,aAAaN,EAAWC,KAAKM,MAC3BC,EAAiBR,EAAU,SAAU,gD,CASvCS,cAAcT,EAAWC,KAAKS,OAC5BF,EAAiBR,EAAU,UAAW,kD,CASxCW,cAAcX,EAAWC,KAAKW,OAC5BJ,EAAiBR,EAAU,UAAW,kD,CASxCa,aAAab,EAAWC,KAAKa,MAC3BC,EAAcf,EAAU,2CACxBgB,EAAUhB,EAAU,SAAU,gD,CAShCiB,eAAejB,EAAWC,KAAKiB,QAC7BV,EAAiBR,EAAU,SAAU,kD,CASvCmB,cAAcnB,EAAWC,KAAKmB,OAC5BZ,EAAiBR,EAAU,SAAU,iD,CAGvCqB,oBACEpB,KAAKK,eACLL,KAAKY,eACLZ,KAAKQ,gBACLR,KAAKU,gBACLV,KAAKkB,gBACLlB,KAAKgB,iBACLhB,KAAKF,mB,CAGPuB,sBACErB,KAAKsB,S,CAGCA,U,YAEN,MAAMC,GACJC,GAAAC,EAAAC,SAASC,KACNC,cAAc,+DAA2D,MAAAH,SAAA,SAAAA,EACxEI,aAAa,0BAAsB,MAAAL,SAAA,EAAAA,EAAI,KAE7C,MAAMM,EAAW,IAAGC,GAAAC,EAAAhC,KAAKM,QAAI,MAAA0B,SAAA,EAAAA,EAAIT,KAAQ,MAAAQ,SAAA,EAAAA,EAAIrC,KAAWuC,QAAQ,QAAS,KACzE,MAAMC,EAAW,GAAGlC,KAAKa,gBACzB,MAAMsB,EAAW,GAAGL,IAAWI,IAE/BlC,KAAKoC,KAAO,IAAIC,IAAIF,EAAUG,OAAOC,SAASC,QAAQC,U,CAGxDC,SAEE,MAAMC,EAAYC,OAAOC,QAAQ,CAC/B,qBAAsB,QAAQ7C,KAAKoC,SACnC,aAAc,QAAQpC,KAAKoC,SAC3BjB,MAASnB,KAAKmB,QAAU2B,MAAMC,OAAO/C,KAAKmB,QAAU,GAAGnB,KAAKmB,QAAU,KACtEF,OAAUjB,KAAKiB,SAAW6B,MAAMC,OAAO/C,KAAKiB,SAAW,GAAGjB,KAAKiB,YAAc,OAE5E+B,QAAO,EAAEC,EAAMC,KAAWA,IAAU,OACpCC,QAAO,CAACC,GAASC,EAAKH,KAAWN,OAAOU,OAAOF,EAAQ,CAAEC,CAACA,GAAMH,KAAU,IAE7E,OACEK,EAACC,EAAI,gBAAeC,GAClBF,EAAA,OAAKG,MAAM,6BAA6BC,QAAQ,YAAYC,MAAOjB,I"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const t="post-components";let e;let n;let s=false;let o=false;const l=(t,e="")=>{{return()=>{}}};const c=(t,e)=>{{return()=>{}}};const i="{visibility:hidden}.hydrated{visibility:inherit}";const f={};const r="http://www.w3.org/2000/svg";const u="http://www.w3.org/1999/xhtml";const a=t=>t!=null;const d=t=>{t=typeof t;return t==="object"||t==="function"};function p(t){var e,n,s;return(s=(n=(e=t.head)===null||e===void 0?void 0:e.querySelector('meta[name="csp-nonce"]'))===null||n===void 0?void 0:n.getAttribute("content"))!==null&&s!==void 0?s:undefined}const h=(t,e,...n)=>{let s=null;let o=null;let l=false;let c=false;const i=[];const f=e=>{for(let n=0;n<e.length;n++){s=e[n];if(Array.isArray(s)){f(s)}else if(s!=null&&typeof s!=="boolean"){if(l=typeof t!=="function"&&!d(s)){s=String(s)}if(l&&c){i[i.length-1].t+=s}else{i.push(l?m(null,s):s)}c=l}}};f(n);if(e){if(e.key){o=e.key}{const t=e.className||e.class;if(t){e.class=typeof t!=="object"?t:Object.keys(t).filter((e=>t[e])).join(" ")}}}if(typeof t==="function"){return t(e===null?{}:e,i,$)}const r=m(t,null);r.o=e;if(i.length>0){r.l=i}{r.i=o}return r};const m=(t,e)=>{const n={u:0,p:t,t:e,h:null,l:null};{n.o=null}{n.i=null}return n};const y={};const b=t=>t&&t.p===y;const $={forEach:(t,e)=>t.map(w).forEach(e),map:(t,e)=>t.map(w).map(e).map(v)};const w=t=>({vattrs:t.o,vchildren:t.l,vkey:t.i,vname:t.m,vtag:t.p,vtext:t.t});const v=t=>{if(typeof t.vtag==="function"){const e=Object.assign({},t.vattrs);if(t.vkey){e.key=t.vkey}if(t.vname){e.name=t.vname}return h(t.vtag,e,...t.vchildren||[])}const e=m(t.vtag,t.vtext);e.o=t.vattrs;e.l=t.vchildren;e.i=t.vkey;e.m=t.vname;return e};const g=(t,e)=>{if(t!=null&&!d(t)){if(e&4){return t==="false"?false:t===""||!!t}if(e&2){return parseFloat(t)}if(e&1){return String(t)}return t}return t};const S=t=>rt(t).$;const j=(t,e,n)=>{const s=S(t);return{emit:t=>k(s,e,{bubbles:!!(n&4),composed:!!(n&2),cancelable:!!(n&1),detail:t})}};const k=(t,e,n)=>{const s=wt.ce(e,n);t.dispatchEvent(s);return s};const O=new WeakMap;const C=(t,e,n)=>{let s=yt.get(t);if(gt&&n){s=s||new CSSStyleSheet;if(typeof s==="string"){s=e}else{s.replaceSync(e)}}else{s=e}yt.set(t,s)};const M=(t,e,n,s)=>{var o;let l=x(e);const c=yt.get(l);t=t.nodeType===11?t:$t;if(c){if(typeof c==="string"){t=t.head||t;let e=O.get(t);let n;if(!e){O.set(t,e=new Set)}if(!e.has(l)){{{n=$t.createElement("style");n.innerHTML=c}const e=(o=wt.v)!==null&&o!==void 0?o:p($t);if(e!=null){n.setAttribute("nonce",e)}t.insertBefore(n,t.querySelector("link"))}if(e){e.add(l)}}}else if(!t.adoptedStyleSheets.includes(c)){t.adoptedStyleSheets=[...t.adoptedStyleSheets,c]}}return l};const P=t=>{const e=t.g;const n=t.$;const s=e.u;const o=l("attachStyles",e.S);const c=M(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);if(s&10){n["s-sc"]=c;n.classList.add(c+"-h")}o()};const x=(t,e)=>"sc-"+t.S;const E=(t,e,n,s,o,l)=>{if(n!==s){let c=dt(t,e);let i=e.toLowerCase();if(e==="class"){const e=t.classList;const o=U(n);const l=U(s);e.remove(...o.filter((t=>t&&!l.includes(t))));e.add(...l.filter((t=>t&&!o.includes(t))))}else if(e==="style"){{for(const e in n){if(!s||s[e]==null){if(e.includes("-")){t.style.removeProperty(e)}else{t.style[e]=""}}}}for(const e in s){if(!n||s[e]!==n[e]){if(e.includes("-")){t.style.setProperty(e,s[e])}else{t.style[e]=s[e]}}}}else if(e==="key");else if(e==="ref"){if(s){s(t)}}else if(!c&&e[0]==="o"&&e[1]==="n"){if(e[2]==="-"){e=e.slice(3)}else if(dt(bt,i)){e=i.slice(2)}else{e=i[2]+e.slice(3)}if(n){wt.rel(t,e,n,false)}if(s){wt.ael(t,e,s,false)}}else{const i=d(s);if((c||i&&s!==null)&&!o){try{if(!t.tagName.includes("-")){const o=s==null?"":s;if(e==="list"){c=false}else if(n==null||t[e]!=o){t[e]=o}}else{t[e]=s}}catch(t){}}if(s==null||s===false){if(s!==false||t.getAttribute(e)===""){{t.removeAttribute(e)}}}else if((!c||l&4||o)&&!i){s=s===true?"":s;{t.setAttribute(e,s)}}}}};const L=/\s/;const U=t=>!t?[]:t.split(L);const W=(t,e,n,s)=>{const o=e.h.nodeType===11&&e.h.host?e.h.host:e.h;const l=t&&t.o||f;const c=e.o||f;{for(s in l){if(!(s in c)){E(o,s,l[s],undefined,n,e.u)}}}for(s in c){E(o,s,l[s],c[s],n,e.u)}};const N=(t,n,o,l)=>{const c=n.l[o];let i=0;let f;let d;if(c.t!==null){f=c.h=$t.createTextNode(c.t)}else{if(!s){s=c.p==="svg"}f=c.h=$t.createElementNS(s?r:u,c.p);if(s&&c.p==="foreignObject"){s=false}{W(null,c,s)}if(a(e)&&f["s-si"]!==e){f.classList.add(f["s-si"]=e)}if(c.l){for(i=0;i<c.l.length;++i){d=N(t,c,i);if(d){f.appendChild(d)}}}{if(c.p==="svg"){s=false}else if(f.tagName==="foreignObject"){s=true}}}return f};const R=(t,e,s,o,l,c)=>{let i=t;let f;if(i.shadowRoot&&i.tagName===n){i=i.shadowRoot}for(;l<=c;++l){if(o[l]){f=N(null,s,l);if(f){o[l].h=f;i.insertBefore(f,e)}}}};const T=(t,e,n)=>{for(let s=e;s<=n;++s){const e=t[s];if(e){const t=e.h;q(e);if(t){t.remove()}}}};const A=(t,e,n,s)=>{let o=0;let l=0;let c=0;let i=0;let f=e.length-1;let r=e[0];let u=e[f];let a=s.length-1;let d=s[0];let p=s[a];let h;let m;while(o<=f&&l<=a){if(r==null){r=e[++o]}else if(u==null){u=e[--f]}else if(d==null){d=s[++l]}else if(p==null){p=s[--a]}else if(F(r,d)){H(r,d);r=e[++o];d=s[++l]}else if(F(u,p)){H(u,p);u=e[--f];p=s[--a]}else if(F(r,p)){H(r,p);t.insertBefore(r.h,u.h.nextSibling);r=e[++o];p=s[--a]}else if(F(u,d)){H(u,d);t.insertBefore(u.h,r.h);u=e[--f];d=s[++l]}else{c=-1;{for(i=o;i<=f;++i){if(e[i]&&e[i].i!==null&&e[i].i===d.i){c=i;break}}}if(c>=0){m=e[c];if(m.p!==d.p){h=N(e&&e[l],n,c)}else{H(m,d);e[c]=undefined;h=m.h}d=s[++l]}else{h=N(e&&e[l],n,l);d=s[++l]}if(h){{r.h.parentNode.insertBefore(h,r.h)}}}}if(o>f){R(t,s[a+1]==null?null:s[a+1].h,n,s,l,a)}else if(l>a){T(e,o,f)}};const F=(t,e)=>{if(t.p===e.p){{return t.i===e.i}}return false};const H=(t,e)=>{const n=e.h=t.h;const o=t.l;const l=e.l;const c=e.p;const i=e.t;if(i===null){{s=c==="svg"?true:c==="foreignObject"?false:s}{if(c==="slot");else{W(t,e,s)}}if(o!==null&&l!==null){A(n,o,e,l)}else if(l!==null){if(t.t!==null){n.textContent=""}R(n,null,e,l,0,l.length-1)}else if(o!==null){T(o,0,o.length-1)}if(s&&c==="svg"){s=false}}else if(t.t!==i){n.data=i}};const q=t=>{{t.o&&t.o.ref&&t.o.ref(null);t.l&&t.l.map(q)}};const D=(t,s)=>{const o=t.$;const l=t.j||m(null,null);const c=b(s)?s:h(null,null,s);n=o.tagName;c.p=null;c.u|=4;t.j=c;c.h=l.h=o.shadowRoot||o;{e=o["s-sc"]}H(l,c)};const I=(t,e)=>{if(e&&!t.k&&e["s-p"]){e["s-p"].push(new Promise((e=>t.k=e)))}};const V=(t,e)=>{{t.u|=16}if(t.u&4){t.u|=512;return}I(t,t.O);const n=()=>_(t,e);return Pt(n)};const _=(t,e)=>{const n=l("scheduleUpdate",t.g.S);const s=t.C;let o;if(e){{o=X(s,"componentWillLoad")}}{o=z(o,(()=>X(s,"componentWillRender")))}n();return z(o,(()=>G(t,s,e)))};const z=(t,e)=>B(t)?t.then(e):e();const B=t=>t instanceof Promise||t&&t.then&&typeof t.then==="function";const G=async(t,e,n)=>{var s;const o=t.$;const c=l("update",t.g.S);const i=o["s-rc"];if(n){P(t)}const f=l("render",t.g.S);{J(t,e)}if(i){i.map((t=>t()));o["s-rc"]=undefined}f();c();{const e=(s=o["s-p"])!==null&&s!==void 0?s:[];const n=()=>K(t);if(e.length===0){n()}else{Promise.all(e).then(n);t.u|=4;e.length=0}}};const J=(t,e,n)=>{try{e=e.render();{t.u&=~16}{t.u|=2}{{{D(t,e)}}}}catch(e){pt(e,t.$)}return null};const K=t=>{const e=t.g.S;const n=t.$;const s=l("postUpdate",e);const o=t.C;const c=t.O;if(!(t.u&64)){t.u|=64;{Y(n)}{X(o,"componentDidLoad")}s();{t.M(n);if(!c){Q()}}}else{s()}{t.P(n)}{if(t.k){t.k();t.k=undefined}if(t.u&512){Mt((()=>V(t,false)))}t.u&=~(4|512)}};const Q=e=>{{Y($t.documentElement)}Mt((()=>k(bt,"appload",{detail:{namespace:t}})))};const X=(t,e,n)=>{if(t&&t[e]){try{return t[e](n)}catch(t){pt(t)}}return undefined};const Y=t=>t.classList.add("hydrated");const Z=(t,e)=>rt(t).L.get(e);const tt=(t,e,n,s)=>{const o=rt(t);const l=o.$;const c=o.L.get(e);const i=o.u;const f=o.C;n=g(n,s.U[e][0]);const r=Number.isNaN(c)&&Number.isNaN(n);const u=n!==c&&!r;if((!(i&8)||c===undefined)&&u){o.L.set(e,n);if(f){if(s.W&&i&128){const t=s.W[e];if(t){t.map((t=>{try{f[t](n,c,e)}catch(t){pt(t,l)}}))}}if((i&(2|16))===2){V(o,false)}}}};const et=(t,e,n)=>{if(e.U){if(t.watchers){e.W=t.watchers}const s=Object.entries(e.U);const o=t.prototype;s.map((([t,[s]])=>{if(s&31||n&2&&s&32){Object.defineProperty(o,t,{get(){return Z(this,t)},set(n){tt(this,t,n,e)},configurable:true,enumerable:true})}else if(n&1&&s&64){Object.defineProperty(o,t,{value(...e){const n=rt(this);return n.N.then((()=>n.C[t](...e)))}})}}));if(n&1){const e=new Map;o.attributeChangedCallback=function(t,n,s){wt.jmp((()=>{const n=e.get(t);if(this.hasOwnProperty(n)){s=this[n];delete this[n]}else if(o.hasOwnProperty(n)&&typeof this[n]==="number"&&this[n]==s){return}this[n]=s===null&&typeof this[n]==="boolean"?false:s}))};t.observedAttributes=s.filter((([t,e])=>e[0]&15)).map((([t,n])=>{const s=n[1]||t;e.set(s,t);return s}))}}return t};const nt=async(t,e,n,s,o)=>{if((e.u&32)===0){e.u|=32;{o=mt(n);if(o.then){const t=c();o=await o;t()}if(!o.isProxied){{n.W=o.watchers}et(o,n,2);o.isProxied=true}const t=l("createInstance",n.S);{e.u|=8}try{new o(e)}catch(t){pt(t)}{e.u&=~8}{e.u|=128}t();st(e.C)}if(o.style){let t=o.style;const e=x(n);if(!yt.has(e)){const s=l("registerStyles",n.S);C(e,t,!!(n.u&1));s()}}}const i=e.O;const f=()=>V(e,true);if(i&&i["s-rc"]){i["s-rc"].push(f)}else{f()}};const st=t=>{{X(t,"connectedCallback")}};const ot=t=>{if((wt.u&1)===0){const e=rt(t);const n=e.g;const s=l("connectedCallback",n.S);if(!(e.u&1)){e.u|=1;{let n=t;while(n=n.parentNode||n.host){if(n["s-p"]){I(e,e.O=n);break}}}if(n.U){Object.entries(n.U).map((([e,[n]])=>{if(n&31&&t.hasOwnProperty(e)){const n=t[e];delete t[e];t[e]=n}}))}{nt(t,e,n)}}else{st(e.C)}s()}};const lt=t=>{if((wt.u&1)===0){const e=rt(t);const n=e.C;{X(n,"disconnectedCallback")}}};const ct=(t,e={})=>{var n;const s=l();const o=[];const c=e.exclude||[];const f=bt.customElements;const r=$t.head;const u=r.querySelector("meta[charset]");const a=$t.createElement("style");const d=[];let h;let m=true;Object.assign(wt,e);wt.R=new URL(e.resourcesUrl||"./",$t.baseURI).href;t.map((t=>{t[1].map((e=>{const n={u:e[0],S:e[1],U:e[2],T:e[3]};{n.U=e[2]}{n.W={}}const s=n.S;const l=class extends HTMLElement{constructor(t){super(t);t=this;at(t,n);if(n.u&1){{{t.attachShadow({mode:"open"})}}}}connectedCallback(){if(h){clearTimeout(h);h=null}if(m){d.push(this)}else{wt.jmp((()=>ot(this)))}}disconnectedCallback(){wt.jmp((()=>lt(this)))}componentOnReady(){return rt(this).A}};n.F=t[0];if(!c.includes(s)&&!f.get(s)){o.push(s);f.define(s,et(l,n,1))}}))}));{a.innerHTML=o+i;a.setAttribute("data-styles","");const t=(n=wt.v)!==null&&n!==void 0?n:p($t);if(t!=null){a.setAttribute("nonce",t)}r.insertBefore(a,u?u.nextSibling:r.firstChild)}m=false;if(d.length){d.map((t=>t.connectedCallback()))}else{{wt.jmp((()=>h=setTimeout(Q,30)))}}s()};const it=t=>wt.v=t;const ft=new WeakMap;const rt=t=>ft.get(t);const ut=(t,e)=>ft.set(e.C=t,e);const at=(t,e)=>{const n={u:0,$:t,g:e,L:new Map};{n.N=new Promise((t=>n.P=t))}{n.A=new Promise((t=>n.M=t));t["s-p"]=[];t["s-rc"]=[]}return ft.set(t,n)};const dt=(t,e)=>e in t;const pt=(t,e)=>(0,console.error)(t,e);const ht=new Map;const mt=(t,e,n)=>{const s=t.S.replace(/-/g,"_");const o=t.F;const l=ht.get(o);if(l){return l[s]}
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import(`./${o}.entry.js${""}`).then((t=>{{ht.set(o,t)}return t[s]}),pt)};const yt=new Map;const bt=typeof window!=="undefined"?window:{};const $t=bt.document||{head:{}};const wt={u:0,R:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,s)=>t.addEventListener(e,n,s),rel:(t,e,n,s)=>t.removeEventListener(e,n,s),ce:(t,e)=>new CustomEvent(t,e)};const vt=t=>Promise.resolve(t);const gt=(()=>{try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(t){}return false})();const St=[];const jt=[];const kt=(t,e)=>n=>{t.push(n);if(!o){o=true;if(e&&wt.u&4){Mt(Ct)}else{wt.raf(Ct)}}};const Ot=t=>{for(let e=0;e<t.length;e++){try{t[e](performance.now())}catch(t){pt(t)}}t.length=0};const Ct=()=>{Ot(St);{Ot(jt);if(o=St.length>0){wt.raf(Ct)}}};const Mt=t=>vt().then(t);const Pt=kt(jt,true);export{y as H,ct as b,j as c,S as g,h,vt as p,ut as r,it as s};
|
|
3
|
-
//# sourceMappingURL=p-d94db268.js.map
|