@swisspost/design-system-components 2.0.0 → 2.0.2
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/LICENSE +183 -185
- package/dist/cjs/check-non-empty-eeaa8f77.js +0 -2
- package/dist/cjs/constants-238701d3.js +0 -2
- package/dist/cjs/fade-35a3633a.js +0 -2
- package/dist/cjs/index-8c288b1a.js +0 -2
- package/dist/cjs/{index-13695f3f.js → index-f243643b.js} +30 -4
- package/dist/cjs/index.cjs.js +15 -15
- package/dist/cjs/loader.cjs.js +1 -3
- package/dist/cjs/package-e8091039.js +5 -0
- package/dist/cjs/{post-accordion-9877919c.js → post-accordion-eebf7827.js} +5 -6
- package/dist/cjs/post-accordion-item-b2977ca5.js +51 -0
- package/dist/cjs/post-accordion-item.cjs.entry.js +5 -47
- package/dist/cjs/post-accordion.cjs.entry.js +3 -5
- package/dist/cjs/post-alert-af7728e6.js +98 -0
- package/dist/cjs/post-alert.cjs.entry.js +3 -5
- package/dist/cjs/{post-collapsible-ef0561b4.js → post-collapsible-15f79667.js} +5 -6
- package/dist/cjs/post-collapsible.cjs.entry.js +3 -5
- package/dist/cjs/post-components.cjs.js +2 -4
- package/dist/cjs/{post-icon-e9dcd643.js → post-icon-b80d7e24.js} +6 -7
- package/dist/cjs/post-icon.cjs.entry.js +3 -5
- package/dist/cjs/{post-popover-e114ebe7.js → post-popover-392b0554.js} +6 -7
- package/dist/cjs/post-popover.cjs.entry.js +3 -5
- package/dist/cjs/{post-popovercontainer-20fb22ee.js → post-popovercontainer-130193cf.js} +120 -30
- package/dist/cjs/post-popovercontainer.cjs.entry.js +3 -5
- package/dist/cjs/post-tab-header-454cc178.js +32 -0
- package/dist/cjs/post-tab-header.cjs.entry.js +3 -5
- package/dist/cjs/{post-tab-panel-95cf7092.js → post-tab-panel-fc0bfcbe.js} +5 -6
- package/dist/cjs/post-tab-panel.cjs.entry.js +3 -5
- package/dist/cjs/{post-tabs-dbe7c341.js → post-tabs-3f909e1c.js} +5 -6
- package/dist/cjs/post-tabs.cjs.entry.js +3 -5
- package/dist/cjs/{post-tooltip-659af1e3.js → post-tooltip-e5b22230.js} +1863 -393
- package/dist/cjs/post-tooltip.cjs.entry.js +3 -5
- package/dist/collection/animations/collapse.js +0 -1
- package/dist/collection/animations/fade.js +0 -1
- package/dist/collection/animations/index.js +0 -1
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/post-accordion/post-accordion.js +4 -2
- package/dist/collection/components/post-accordion-item/heading-levels.js +0 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +5 -2
- package/dist/collection/components/post-alert/alert-types.js +0 -1
- package/dist/collection/components/post-alert/post-alert.css +2 -2
- package/dist/collection/components/post-alert/post-alert.js +10 -8
- package/dist/collection/components/post-collapsible/post-collapsible.js +4 -2
- package/dist/collection/components/post-icon/post-icon.css +1 -1
- package/dist/collection/components/post-icon/post-icon.js +1 -2
- package/dist/collection/components/post-popover/post-popover.css +1 -1
- package/dist/collection/components/post-popover/post-popover.js +5 -3
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +8 -4
- package/dist/collection/components/post-tab-header/post-tab-header.css +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.js +4 -2
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +4 -2
- package/dist/collection/components/post-tabs/post-tabs.js +5 -2
- package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +142 -45
- package/dist/collection/components/post-tooltip/types.js +0 -1
- package/dist/collection/index.js +1 -1
- package/dist/collection/index.spec.js +27 -0
- package/dist/collection/utils/index.js +0 -1
- package/dist/collection/utils/is-motion-reduced.js +0 -1
- package/dist/collection/utils/property-checkers/check-non-empty.js +0 -1
- package/dist/collection/utils/property-checkers/check-one-of.js +0 -1
- package/dist/collection/utils/property-checkers/check-pattern.js +0 -1
- package/dist/collection/utils/property-checkers/check-type.js +0 -1
- package/dist/collection/utils/property-checkers/constants.js +0 -1
- package/dist/collection/utils/property-checkers/empty-or.js +0 -1
- package/dist/collection/utils/property-checkers/index.js +0 -1
- package/dist/components/check-non-empty.js +0 -2
- package/dist/components/constants.js +0 -2
- package/dist/components/fade.js +0 -2
- package/dist/components/index.js +1 -2
- package/dist/components/index2.js +1 -3
- package/dist/components/package.js +1 -3
- package/dist/components/post-accordion-item.js +1 -77
- package/dist/components/post-accordion-item2.js +78 -0
- package/dist/components/post-accordion.js +0 -2
- package/dist/components/post-accordion2.js +3 -4
- package/dist/components/post-alert.js +0 -2
- package/dist/components/post-alert2.js +8 -11
- package/dist/components/post-collapsible.js +0 -2
- package/dist/components/post-collapsible2.js +3 -4
- package/dist/components/post-icon.js +0 -2
- package/dist/components/post-icon2.js +5 -6
- package/dist/components/post-popover.js +0 -2
- package/dist/components/post-popover2.js +4 -5
- package/dist/components/post-popovercontainer.js +0 -2
- package/dist/components/post-popovercontainer2.js +118 -28
- package/dist/components/post-tab-header.js +0 -2
- package/dist/components/post-tab-header2.js +4 -5
- package/dist/components/post-tab-panel.js +0 -2
- package/dist/components/post-tab-panel2.js +3 -4
- package/dist/components/post-tabs.js +0 -2
- package/dist/components/post-tabs2.js +3 -4
- package/dist/components/post-tooltip.js +0 -2
- package/dist/components/post-tooltip2.js +1864 -394
- package/dist/docs.json +152 -30
- package/dist/esm/check-non-empty-58bd6b17.js +0 -2
- package/dist/esm/constants-8d548297.js +0 -2
- package/dist/esm/fade-7fd71785.js +0 -2
- package/dist/esm/{index-74cf5c9d.js → index-1708db56.js} +30 -4
- package/dist/esm/{index-1427953c.js → index-b444db27.js} +1 -3
- package/dist/esm/index.js +15 -16
- package/dist/esm/loader.js +2 -4
- package/dist/esm/package-aa903c40.js +3 -0
- package/dist/esm/{post-accordion-3b137073.js → post-accordion-82b49f7b.js} +5 -6
- package/dist/esm/post-accordion-item-3deff76a.js +49 -0
- package/dist/esm/post-accordion-item.entry.js +4 -50
- package/dist/esm/post-accordion.entry.js +3 -5
- package/dist/esm/post-alert-c88451ba.js +96 -0
- package/dist/esm/post-alert.entry.js +4 -6
- package/dist/esm/{post-collapsible-a418570f.js → post-collapsible-87ce4e6e.js} +6 -7
- package/dist/esm/post-collapsible.entry.js +4 -6
- package/dist/esm/post-components.js +3 -5
- package/dist/esm/{post-icon-302d1767.js → post-icon-e0536000.js} +7 -8
- package/dist/esm/post-icon.entry.js +4 -6
- package/dist/esm/{post-popover-5725afc7.js → post-popover-00b006b4.js} +6 -7
- package/dist/esm/post-popover.entry.js +3 -5
- package/dist/esm/{post-popovercontainer-1c050e83.js → post-popovercontainer-6d1d7f76.js} +120 -30
- package/dist/esm/post-popovercontainer.entry.js +3 -5
- package/dist/esm/post-tab-header-0f7866f9.js +30 -0
- package/dist/esm/post-tab-header.entry.js +3 -5
- package/dist/esm/{post-tab-panel-16796ee3.js → post-tab-panel-b41d5d0f.js} +5 -6
- package/dist/esm/post-tab-panel.entry.js +3 -5
- package/dist/esm/{post-tabs-16f99043.js → post-tabs-97868e9c.js} +5 -6
- package/dist/esm/post-tabs.entry.js +3 -5
- package/dist/esm/{post-tooltip-03a6d578.js → post-tooltip-531b569d.js} +1863 -393
- package/dist/esm/post-tooltip.entry.js +3 -5
- package/dist/post-components/index.esm.js +1 -2
- package/dist/post-components/p-0ef425cd.entry.js +1 -0
- package/dist/post-components/p-10b4cf7a.js +2 -0
- package/dist/post-components/p-202a23d3.js +1 -0
- package/dist/post-components/p-23d55894.entry.js +1 -0
- package/dist/post-components/p-25766de1.js +1 -0
- package/dist/post-components/p-2737eaf5.js +1 -2
- package/dist/post-components/p-284ca5da.js +1 -0
- package/dist/post-components/p-2b5a940c.entry.js +1 -0
- package/dist/post-components/p-31c06741.entry.js +1 -0
- package/dist/post-components/p-320a90d8.entry.js +1 -0
- package/dist/post-components/p-3b8a1f9d.entry.js +1 -0
- package/dist/post-components/p-440193f4.js +1 -2
- package/dist/post-components/p-61ad6181.entry.js +1 -0
- package/dist/post-components/p-71a57911.js +1 -0
- package/dist/post-components/p-b095519d.js +1 -2
- package/dist/post-components/p-b111a381.js +1 -0
- package/dist/post-components/p-ba40e160.js +1 -0
- package/dist/post-components/p-be08f39f.entry.js +1 -0
- package/dist/post-components/p-bf1293e1.js +1 -0
- package/dist/post-components/p-c3dd84af.js +1 -0
- package/dist/post-components/p-c9ecada7.entry.js +1 -0
- package/dist/post-components/p-cdd7ad0a.js +15 -0
- package/dist/post-components/p-d7863a77.js +1 -0
- package/dist/post-components/p-d8ac8ae9.js +1 -0
- package/dist/post-components/p-dc9ffe1d.js +1 -0
- package/dist/post-components/p-f0e82e63.js +1 -0
- package/dist/post-components/p-fbf645c4.entry.js +1 -0
- package/dist/post-components/p-ff9016ce.entry.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -2
- package/dist/types/components/post-accordion/post-accordion.d.ts +3 -0
- package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +4 -0
- package/dist/types/components/post-alert/post-alert.d.ts +5 -0
- package/dist/types/components/post-collapsible/post-collapsible.d.ts +3 -0
- package/dist/types/components/post-popover/post-popover.d.ts +3 -0
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +3 -0
- package/dist/types/components/post-tab-header/post-tab-header.d.ts +3 -0
- package/dist/types/components/post-tab-panel/post-tab-panel.d.ts +3 -0
- package/dist/types/components/post-tabs/post-tabs.d.ts +4 -0
- package/dist/types/components/post-tooltip/post-tooltip.d.ts +14 -6
- package/dist/types/index.d.ts +1 -0
- package/package.json +13 -14
- package/dist/cjs/check-non-empty-eeaa8f77.js.map +0 -1
- package/dist/cjs/constants-238701d3.js.map +0 -1
- package/dist/cjs/fade-35a3633a.js.map +0 -1
- package/dist/cjs/index-13695f3f.js.map +0 -1
- package/dist/cjs/index-8c288b1a.js.map +0 -1
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/package-8152e25e.js +0 -7
- package/dist/cjs/package-8152e25e.js.map +0 -1
- package/dist/cjs/post-accordion-9877919c.js.map +0 -1
- package/dist/cjs/post-accordion-item.cjs.entry.js.map +0 -1
- package/dist/cjs/post-accordion.cjs.entry.js.map +0 -1
- package/dist/cjs/post-alert-d87e6132.js +0 -101
- package/dist/cjs/post-alert-d87e6132.js.map +0 -1
- package/dist/cjs/post-alert.cjs.entry.js.map +0 -1
- package/dist/cjs/post-collapsible-ef0561b4.js.map +0 -1
- package/dist/cjs/post-collapsible.cjs.entry.js.map +0 -1
- package/dist/cjs/post-components.cjs.js.map +0 -1
- package/dist/cjs/post-icon-e9dcd643.js.map +0 -1
- package/dist/cjs/post-icon.cjs.entry.js.map +0 -1
- package/dist/cjs/post-popover-e114ebe7.js.map +0 -1
- package/dist/cjs/post-popover.cjs.entry.js.map +0 -1
- package/dist/cjs/post-popovercontainer-20fb22ee.js.map +0 -1
- package/dist/cjs/post-popovercontainer.cjs.entry.js.map +0 -1
- package/dist/cjs/post-tab-header-34c1cc21.js +0 -33
- package/dist/cjs/post-tab-header-34c1cc21.js.map +0 -1
- package/dist/cjs/post-tab-header.cjs.entry.js.map +0 -1
- package/dist/cjs/post-tab-panel-95cf7092.js.map +0 -1
- package/dist/cjs/post-tab-panel.cjs.entry.js.map +0 -1
- package/dist/cjs/post-tabs-dbe7c341.js.map +0 -1
- package/dist/cjs/post-tabs.cjs.entry.js.map +0 -1
- package/dist/cjs/post-tooltip-659af1e3.js.map +0 -1
- package/dist/cjs/post-tooltip.cjs.entry.js.map +0 -1
- package/dist/collection/animations/collapse.js.map +0 -1
- package/dist/collection/animations/fade.js.map +0 -1
- package/dist/collection/animations/index.js.map +0 -1
- package/dist/collection/components/post-accordion/post-accordion.js.map +0 -1
- package/dist/collection/components/post-accordion-item/heading-levels.js.map +0 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js.map +0 -1
- package/dist/collection/components/post-alert/alert-types.js.map +0 -1
- package/dist/collection/components/post-alert/post-alert.js.map +0 -1
- package/dist/collection/components/post-collapsible/post-collapsible.js.map +0 -1
- package/dist/collection/components/post-icon/post-icon.js.map +0 -1
- package/dist/collection/components/post-popover/post-popover.js.map +0 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js.map +0 -1
- package/dist/collection/components/post-tab-header/post-tab-header.js.map +0 -1
- package/dist/collection/components/post-tab-panel/post-tab-panel.js.map +0 -1
- package/dist/collection/components/post-tabs/post-tabs.js.map +0 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js.map +0 -1
- package/dist/collection/components/post-tooltip/types.js.map +0 -1
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/utils/index.js.map +0 -1
- package/dist/collection/utils/is-motion-reduced.js.map +0 -1
- package/dist/collection/utils/property-checkers/check-non-empty.js.map +0 -1
- package/dist/collection/utils/property-checkers/check-one-of.js.map +0 -1
- package/dist/collection/utils/property-checkers/check-pattern.js.map +0 -1
- package/dist/collection/utils/property-checkers/check-type.js.map +0 -1
- package/dist/collection/utils/property-checkers/constants.js.map +0 -1
- package/dist/collection/utils/property-checkers/empty-or.js.map +0 -1
- package/dist/collection/utils/property-checkers/index.js.map +0 -1
- package/dist/components/check-non-empty.js.map +0 -1
- package/dist/components/constants.js.map +0 -1
- package/dist/components/fade.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/components/index2.js.map +0 -1
- package/dist/components/package.js.map +0 -1
- package/dist/components/post-accordion-item.js.map +0 -1
- package/dist/components/post-accordion.js.map +0 -1
- package/dist/components/post-accordion2.js.map +0 -1
- package/dist/components/post-alert.js.map +0 -1
- package/dist/components/post-alert2.js.map +0 -1
- package/dist/components/post-collapsible.js.map +0 -1
- package/dist/components/post-collapsible2.js.map +0 -1
- package/dist/components/post-icon.js.map +0 -1
- package/dist/components/post-icon2.js.map +0 -1
- package/dist/components/post-popover.js.map +0 -1
- package/dist/components/post-popover2.js.map +0 -1
- package/dist/components/post-popovercontainer.js.map +0 -1
- package/dist/components/post-popovercontainer2.js.map +0 -1
- package/dist/components/post-tab-header.js.map +0 -1
- package/dist/components/post-tab-header2.js.map +0 -1
- package/dist/components/post-tab-panel.js.map +0 -1
- package/dist/components/post-tab-panel2.js.map +0 -1
- package/dist/components/post-tabs.js.map +0 -1
- package/dist/components/post-tabs2.js.map +0 -1
- package/dist/components/post-tooltip.js.map +0 -1
- package/dist/components/post-tooltip2.js.map +0 -1
- package/dist/esm/check-non-empty-58bd6b17.js.map +0 -1
- package/dist/esm/constants-8d548297.js.map +0 -1
- package/dist/esm/fade-7fd71785.js.map +0 -1
- package/dist/esm/index-1427953c.js.map +0 -1
- package/dist/esm/index-74cf5c9d.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/package-af0ef704.js +0 -5
- package/dist/esm/package-af0ef704.js.map +0 -1
- package/dist/esm/post-accordion-3b137073.js.map +0 -1
- package/dist/esm/post-accordion-item.entry.js.map +0 -1
- package/dist/esm/post-accordion.entry.js.map +0 -1
- package/dist/esm/post-alert-0dcc6ac7.js +0 -99
- package/dist/esm/post-alert-0dcc6ac7.js.map +0 -1
- package/dist/esm/post-alert.entry.js.map +0 -1
- package/dist/esm/post-collapsible-a418570f.js.map +0 -1
- package/dist/esm/post-collapsible.entry.js.map +0 -1
- package/dist/esm/post-components.js.map +0 -1
- package/dist/esm/post-icon-302d1767.js.map +0 -1
- package/dist/esm/post-icon.entry.js.map +0 -1
- package/dist/esm/post-popover-5725afc7.js.map +0 -1
- package/dist/esm/post-popover.entry.js.map +0 -1
- package/dist/esm/post-popovercontainer-1c050e83.js.map +0 -1
- package/dist/esm/post-popovercontainer.entry.js.map +0 -1
- package/dist/esm/post-tab-header-ede9f078.js +0 -31
- package/dist/esm/post-tab-header-ede9f078.js.map +0 -1
- package/dist/esm/post-tab-header.entry.js.map +0 -1
- package/dist/esm/post-tab-panel-16796ee3.js.map +0 -1
- package/dist/esm/post-tab-panel.entry.js.map +0 -1
- package/dist/esm/post-tabs-16f99043.js.map +0 -1
- package/dist/esm/post-tabs.entry.js.map +0 -1
- package/dist/esm/post-tooltip-03a6d578.js.map +0 -1
- package/dist/esm/post-tooltip.entry.js.map +0 -1
- package/dist/post-components/index.esm.js.map +0 -1
- package/dist/post-components/p-06566f88.js +0 -2
- package/dist/post-components/p-06566f88.js.map +0 -1
- package/dist/post-components/p-12a0f4b9.js +0 -2
- package/dist/post-components/p-12a0f4b9.js.map +0 -1
- package/dist/post-components/p-26dad3c3.js +0 -2
- package/dist/post-components/p-26dad3c3.js.map +0 -1
- package/dist/post-components/p-2737eaf5.js.map +0 -1
- package/dist/post-components/p-299a3e41.entry.js +0 -2
- package/dist/post-components/p-299a3e41.entry.js.map +0 -1
- package/dist/post-components/p-3241987a.entry.js +0 -2
- package/dist/post-components/p-3241987a.entry.js.map +0 -1
- package/dist/post-components/p-3fd14a00.js +0 -2
- package/dist/post-components/p-3fd14a00.js.map +0 -1
- package/dist/post-components/p-440193f4.js.map +0 -1
- package/dist/post-components/p-4b950d70.js +0 -2
- package/dist/post-components/p-4b950d70.js.map +0 -1
- package/dist/post-components/p-503ac49b.entry.js +0 -2
- package/dist/post-components/p-503ac49b.entry.js.map +0 -1
- package/dist/post-components/p-6391f970.js +0 -2
- package/dist/post-components/p-6391f970.js.map +0 -1
- package/dist/post-components/p-6d0226cd.entry.js +0 -2
- package/dist/post-components/p-6d0226cd.entry.js.map +0 -1
- package/dist/post-components/p-775859cc.entry.js +0 -2
- package/dist/post-components/p-775859cc.entry.js.map +0 -1
- package/dist/post-components/p-78589fac.entry.js +0 -2
- package/dist/post-components/p-78589fac.entry.js.map +0 -1
- package/dist/post-components/p-803284de.js +0 -9
- package/dist/post-components/p-803284de.js.map +0 -1
- package/dist/post-components/p-83cedb31.entry.js +0 -2
- package/dist/post-components/p-83cedb31.entry.js.map +0 -1
- package/dist/post-components/p-88481640.entry.js +0 -2
- package/dist/post-components/p-88481640.entry.js.map +0 -1
- package/dist/post-components/p-8f37921c.entry.js +0 -2
- package/dist/post-components/p-8f37921c.entry.js.map +0 -1
- package/dist/post-components/p-91236c61.js +0 -2
- package/dist/post-components/p-91236c61.js.map +0 -1
- package/dist/post-components/p-91f2291a.js +0 -2
- package/dist/post-components/p-91f2291a.js.map +0 -1
- package/dist/post-components/p-93ab273b.js +0 -2
- package/dist/post-components/p-93ab273b.js.map +0 -1
- package/dist/post-components/p-96f4ebc4.js +0 -2
- package/dist/post-components/p-96f4ebc4.js.map +0 -1
- package/dist/post-components/p-b095519d.js.map +0 -1
- package/dist/post-components/p-b4f01350.js +0 -3
- package/dist/post-components/p-b4f01350.js.map +0 -1
- package/dist/post-components/p-d96fbe33.entry.js +0 -2
- package/dist/post-components/p-d96fbe33.entry.js.map +0 -1
- package/dist/post-components/p-de4704fc.js +0 -2
- package/dist/post-components/p-de4704fc.js.map +0 -1
- package/dist/post-components/p-fe7650bc.entry.js +0 -2
- package/dist/post-components/p-fe7650bc.entry.js.map +0 -1
- package/dist/post-components/post-components.esm.js.map +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as i,h as t,H as a,g as n}from"./p-b4f01350.js";import{b as e,d as o,c as s}from"./p-96f4ebc4.js";import{v as r}from"./p-de4704fc.js";import{c as l}from"./p-b095519d.js";const m=":host{display:inline-block;width:1em;height:1em;vertical-align:-0.15em}span{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 c="https://unpkg.com/@swisspost/design-system-icons/public/post-icons";const h=["cylon","cylon-vertical","spin","spin-reverse","fade","throb"];const p=[...h];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,p,`The post-icon "animation" prop requires one of the following values: ${p.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){l(i,'The post-icon "name" prop is required!.');s(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:c}/`.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}')`,transform:(this.scale&&!isNaN(Number(this.scale))?"scale("+this.scale+")":"")+(this.rotate&&!isNaN(Number(this.rotate))?" rotate("+this.rotate+"deg)":"")}).filter((([i,t])=>t!==null)).reduce(((i,[t,a])=>Object.assign(i,{[t]:a})),{});return t(a,{"data-version":r},t("span",{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=m;export{f as P};
|
|
2
|
-
//# sourceMappingURL=p-91f2291a.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","transform","isNaN","Number","filter","_key","value","reduce","styles","key","assign","h","Host","version","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 height: 1em;\n vertical-align: -0.15em;\n}\n\nspan {\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 'transform':\n (this.scale && !isNaN(Number(this.scale)) ? 'scale(' + this.scale + ')' : '') +\n (this.rotate && !isNaN(Number(this.rotate)) ? ' rotate(' + this.rotate + 'deg)' : ''),\n })\n .filter(([_key, value]) => value !== null)\n .reduce((styles, [key, value]) => Object.assign(styles, { [key]: value }), {});\n return (\n <Host data-version={version}>\n <span style={svgStyles}></span>\n </Host>\n );\n }\n}\n"],"mappings":"mLAAA,MAAMA,EAAc,o/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,CAjEzC,iBAAAC,CAAkBC,EAAWC,KAAKC,WAChC,GAAIF,IAAaG,UACfC,EACEJ,EACAH,EACA,wEAAwEA,EAAeQ,KACrF,S,CAWR,YAAAC,CAAaN,EAAWC,KAAKM,MAC3BC,EAAiBR,EAAU,SAAU,gD,CASvC,aAAAS,CAAcT,EAAWC,KAAKS,OAC5BF,EAAiBR,EAAU,UAAW,kD,CASxC,aAAAW,CAAcX,EAAWC,KAAKW,OAC5BJ,EAAiBR,EAAU,UAAW,kD,CASxC,YAAAa,CAAab,EAAWC,KAAKa,MAC3BC,EAAcf,EAAU,2CACxBgB,EAAUhB,EAAU,SAAU,gD,CAShC,cAAAiB,CAAejB,EAAWC,KAAKiB,QAC7BV,EAAiBR,EAAU,SAAU,kD,CASvC,aAAAmB,CAAcnB,EAAWC,KAAKmB,OAC5BZ,EAAiBR,EAAU,SAAU,iD,CAGvC,iBAAAqB,GACEpB,KAAKK,eACLL,KAAKY,eACLZ,KAAKQ,gBACLR,KAAKU,gBACLV,KAAKkB,gBACLlB,KAAKgB,iBACLhB,KAAKF,mB,CAGP,mBAAAuB,GACErB,KAAKsB,S,CAGC,OAAAA,G,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,CAGxD,MAAAC,GAEE,MAAMC,EAAYC,OAAOC,QAAQ,CAC/B,qBAAsB,QAAQ7C,KAAKoC,SACnC,aAAc,QAAQpC,KAAKoC,SAC3BU,WACG9C,KAAKmB,QAAU4B,MAAMC,OAAOhD,KAAKmB,QAAU,SAAWnB,KAAKmB,MAAQ,IAAM,KACzEnB,KAAKiB,SAAW8B,MAAMC,OAAOhD,KAAKiB,SAAW,WAAajB,KAAKiB,OAAS,OAAS,MAEnFgC,QAAO,EAAEC,EAAMC,KAAWA,IAAU,OACpCC,QAAO,CAACC,GAASC,EAAKH,KAAWP,OAAOW,OAAOF,EAAQ,CAAEC,CAACA,GAAMH,KAAU,IAC7E,OACEK,EAACC,EAAI,gBAAeC,GAClBF,EAAA,QAAMG,MAAOhB,I"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as o,h as t,H as e,g as s}from"./p-b4f01350.js";import{v as i}from"./p-de4704fc.js";const r="/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.btn-close{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;-webkit-appearance:button;appearance:button;outline:none;outline-offset:2px;border-radius:4px;color:var(--post-gray-80);transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline:2px solid var(--post-contrast-color)}.btn-close::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor;content:\"\";display:block;height:1.5rem;width:1.5rem}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:var(--post-contrast-color)}.btn-close:disabled{color:var(--post-gray-40)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}*{box-sizing:border-box}:host{--post-contrast-color:#fff;--post-bg-rgb:51, 51, 51;display:block}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.popover-container{display:flex;align-items:self-start;padding:.5em;max-width:min(66vw,60rem)}@media (max-width: 599.98px){.popover-container{max-width:100%}}.popover-content{padding:.5em}";const n=class{constructor(t){o(this,t);this.placement="top";this.closeButtonCaption=undefined;this.arrow=true;this.localTogglePopover=o=>this.toggle(o.target);this.localEnterTogglePopover=o=>{if(o.key==="Enter")this.toggle(o.target)};this.localTouchTogglePopover=o=>{o.preventDefault();this.toggle(o.target)}}connectedCallback(){if(!this.triggers){throw new Error(`No trigger found for <post-popover popover-id="${this.host.id}`)}this.triggers.forEach((o=>{o.addEventListener("mouseup",this.localTogglePopover,{once:true});o.addEventListener("keypress",this.localEnterTogglePopover);o.addEventListener("touch",this.localTouchTogglePopover,{once:true});o.setAttribute("aria-expanded","false")}))}disconnectedCallback(){this.triggers.forEach((o=>{o.removeEventListener("mouseup",this.localTogglePopover);o.removeEventListener("keypress",this.localEnterTogglePopover);o.removeEventListener("touch",this.localTouchTogglePopover);o.removeAttribute("aria-expanded")}))}async show(o){this.currentTarget=o;this.popoverRef.show(o);o.setAttribute("aria-expanded","true")}async hide(){this.popoverRef.hide();this.triggers.forEach((o=>o.setAttribute("aria-expanded","false")))}async toggle(o,t){this.currentTarget=o;const e=await this.popoverRef.toggle(o,t);o.setAttribute("aria-expanded",`${e}`)}get triggers(){return document.querySelectorAll(`[data-popover-target="${this.host.id}"]`)}onToggle(o){if(this.currentTarget){this.currentTarget.setAttribute("aria-expanded",`${o.detail}`)}if(!o.detail){window.requestAnimationFrame((()=>{this.triggers.forEach((o=>{o.addEventListener("mouseup",this.localTogglePopover,{once:true});o.addEventListener("touch",this.localTouchTogglePopover,{once:true})}))}));if(this.currentTarget){this.currentTarget.focus();this.currentTarget=null}}}stopImmediatePropagation(o){o.stopImmediatePropagation()}render(){return t(e,{"data-version":i},t("post-popovercontainer",{arrow:this.arrow,placement:this.placement,ref:o=>this.popoverRef=o,onPostPopoverToggled:o=>this.onToggle(o)},t("div",{class:"popover-container",onPointerDown:o=>this.stopImmediatePropagation(o),onPointerUp:o=>this.stopImmediatePropagation(o)},t("div",{class:"popover-content"},t("slot",null)),t("button",{class:"btn-close",onClick:()=>this.hide()},t("span",{class:"visually-hidden"},this.closeButtonCaption)))))}get host(){return s(this)}};n.style=r;export{n as P};
|
|
2
|
-
//# sourceMappingURL=p-93ab273b.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["postPopoverCss","PostPopover","constructor","hostRef","this","localTogglePopover","e","toggle","target","localEnterTogglePopover","key","localTouchTogglePopover","preventDefault","connectedCallback","triggers","Error","host","id","forEach","trigger","addEventListener","once","setAttribute","disconnectedCallback","removeEventListener","removeAttribute","show","currentTarget","popoverRef","hide","force","newState","document","querySelectorAll","onToggle","detail","window","requestAnimationFrame","focus","stopImmediatePropagation","render","h","Host","version","arrow","placement","ref","onPostPopoverToggled","class","onPointerDown","onPointerUp","onClick","closeButtonCaption"],"sources":["src/components/post-popover/post-popover.scss?tag=post-popover&encapsulation=shadow","src/components/post-popover/post-popover.tsx"],"sourcesContent":["@use '@swisspost/design-system-styles/core' as post;\n@use '@swisspost/design-system-styles/components/close';\n\n* {\n box-sizing: border-box;\n}\n\n:host {\n --post-contrast-color: #{post.$white};\n --post-bg-rgb: #{post.rgb-values(post.$gray-80)};\n\n display: block;\n}\n\n.visually-hidden {\n @include post.visuallyhidden();\n}\n\n.popover-container {\n display: flex;\n align-items: self-start;\n padding: 0.5em;\n\n // Max 2/3 of the column width\n max-width: min(66vw, 60rem);\n\n // Max available width on mobile, popovercontainer will handle offsets\n @include post.media-breakpoint-down(rg) {\n max-width: 100%;\n }\n}\n\n.popover-content {\n padding: 0.5em;\n}\n","import { Component, Element, h, Host, Method, Prop } from '@stencil/core';\nimport { Placement } from '@floating-ui/dom';\n\nimport { version } from '../../../package.json';\n@Component({\n tag: 'post-popover',\n styleUrl: 'post-popover.scss',\n shadow: true,\n})\nexport class PostPopover {\n private popoverRef: HTMLPostPopovercontainerElement;\n private localTogglePopover: (e: Event) => Promise<void>;\n private localEnterTogglePopover: (e: KeyboardEvent) => void;\n private localTouchTogglePopover: (e: TouchEvent) => void;\n private currentTarget: HTMLElement;\n\n @Element() host: HTMLPostPopoverElement;\n\n /**\n * Defines the placement of the popover according to the floating-ui options available at https://floating-ui.com/docs/computePosition#placement.\n * Popoverss are automatically flipped to the opposite side if there is not enough available space and are shifted\n * towards the viewport if they would overlap edge boundaries.\n */\n @Prop() readonly placement?: Placement = 'top';\n\n /**\n * Define the caption of the close button for assistive technology\n */\n @Prop() readonly closeButtonCaption!: string;\n /**\n * Show a little indicator arrow\n */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() readonly arrow?: boolean = true;\n\n constructor() {\n this.localTogglePopover = e => this.toggle(e.target as HTMLElement);\n this.localEnterTogglePopover = e => {\n if (e.key === 'Enter') this.toggle(e.target as HTMLElement);\n };\n this.localTouchTogglePopover = e => {\n e.preventDefault();\n this.toggle(e.target as HTMLElement);\n };\n }\n\n connectedCallback() {\n if (!this.triggers) {\n throw new Error(`No trigger found for <post-popover popover-id=\"${this.host.id}`);\n }\n\n // As long as cross-shadow-boundary [popovertarget] and button.popoverTargetElement are not working\n // we're left with listening to trigger events ourselves\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/popoverTargetElement\n // https://github.com/whatwg/html/issues/9109#issuecomment-1494030465 (does not seem to work for now)\n // https://stackoverflow.com/questions/77324143/popovertargetelement-does-not-cross-shadow-boundaries?noredirect=1#comment136318281_77324143\n this.triggers.forEach(trigger => {\n // See this.onToggle for one time mouse event listener\n trigger.addEventListener('mouseup', this.localTogglePopover, { once: true });\n trigger.addEventListener('keypress', this.localEnterTogglePopover);\n trigger.addEventListener('touch', this.localTouchTogglePopover, { once: true });\n trigger.setAttribute('aria-expanded', 'false');\n });\n }\n\n disconnectedCallback() {\n this.triggers.forEach(trigger => {\n trigger.removeEventListener('mouseup', this.localTogglePopover);\n trigger.removeEventListener('keypress', this.localEnterTogglePopover);\n trigger.removeEventListener('touch', this.localTouchTogglePopover);\n trigger.removeAttribute('aria-expanded');\n });\n }\n\n /**\n * Programmatically display the popover\n * @param target An element with [data-popover-target=\"id\"] where the popover should be shown\n */\n @Method()\n async show(target: HTMLElement) {\n this.currentTarget = target;\n this.popoverRef.show(target);\n target.setAttribute('aria-expanded', 'true');\n }\n\n /**\n * Programmatically hide this popover\n */\n @Method()\n async hide() {\n this.popoverRef.hide();\n this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));\n }\n\n /**\n * Toggle popover display\n * @param target An element with [data-popover-target=\"id\"] where the popover should be anchored to\n * @param force Pass true to always show or false to always hide\n */\n @Method()\n async toggle(target: HTMLElement, force?: boolean) {\n this.currentTarget = target;\n const newState = await this.popoverRef.toggle(target, force);\n target.setAttribute('aria-expanded', `${newState}`);\n }\n\n private get triggers() {\n return document.querySelectorAll(`[data-popover-target=\"${this.host.id}\"]`);\n }\n\n /**\n * One time event handler for click events\n * A permanent event listener would prevent a toggle button from working properly:\n * A click opens the popover, a second click first closes it (due to light dismiss), then directly\n * opens it again because of the click listener on the button. Registering a new\n * one time listener after a small timeout solves this issue.\n * @param e toggle event from post-popovercontainer\n */\n private onToggle(e: CustomEvent<boolean>) {\n if (this.currentTarget) {\n this.currentTarget.setAttribute('aria-expanded', `${e.detail}`);\n }\n if (!e.detail) {\n window.requestAnimationFrame(() => {\n this.triggers.forEach(trigger => {\n trigger.addEventListener('mouseup', this.localTogglePopover, { once: true });\n trigger.addEventListener('touch', this.localTouchTogglePopover, { once: true });\n });\n });\n\n // Handle missing re-focusing logic after close. Can be removed as soon as popovertarget works correctly\n if (this.currentTarget) {\n this.currentTarget.focus();\n this.currentTarget = null;\n }\n }\n }\n\n // Fix for firefox to prevent the following lines from triggering\n // https://github.com/oddbird/popover-polyfill/blob/main/src/popover.ts#L338\n private stopImmediatePropagation(e: PointerEvent) {\n e.stopImmediatePropagation();\n }\n\n render() {\n return (\n <Host data-version={version}>\n <post-popovercontainer\n arrow={this.arrow}\n placement={this.placement}\n ref={e => (this.popoverRef = e)}\n onPostPopoverToggled={e => this.onToggle(e)}\n >\n <div\n class=\"popover-container\"\n onPointerDown={e => this.stopImmediatePropagation(e)}\n onPointerUp={e => this.stopImmediatePropagation(e)}\n >\n <div class=\"popover-content\">\n <slot></slot>\n </div>\n <button class=\"btn-close\" onClick={() => this.hide()}>\n <span class=\"visually-hidden\">{this.closeButtonCaption}</span>\n </button>\n </div>\n </post-popovercontainer>\n </Host>\n );\n }\n}\n"],"mappings":"6FAAA,MAAMA,EAAiB,ojE,MCSVC,EAAW,MA0BtB,WAAAC,CAAAC,G,yBAZyC,M,6CAUN,KAGjCC,KAAKC,mBAAqBC,GAAKF,KAAKG,OAAOD,EAAEE,QAC7CJ,KAAKK,wBAA0BH,IAC7B,GAAIA,EAAEI,MAAQ,QAASN,KAAKG,OAAOD,EAAEE,OAAsB,EAE7DJ,KAAKO,wBAA0BL,IAC7BA,EAAEM,iBACFR,KAAKG,OAAOD,EAAEE,OAAsB,C,CAIxC,iBAAAK,GACE,IAAKT,KAAKU,SAAU,CAClB,MAAM,IAAIC,MAAM,kDAAkDX,KAAKY,KAAKC,K,CAQ9Eb,KAAKU,SAASI,SAAQC,IAEpBA,EAAQC,iBAAiB,UAAWhB,KAAKC,mBAAoB,CAAEgB,KAAM,OACrEF,EAAQC,iBAAiB,WAAYhB,KAAKK,yBAC1CU,EAAQC,iBAAiB,QAAShB,KAAKO,wBAAyB,CAAEU,KAAM,OACxEF,EAAQG,aAAa,gBAAiB,QAAQ,G,CAIlD,oBAAAC,GACEnB,KAAKU,SAASI,SAAQC,IACpBA,EAAQK,oBAAoB,UAAWpB,KAAKC,oBAC5Cc,EAAQK,oBAAoB,WAAYpB,KAAKK,yBAC7CU,EAAQK,oBAAoB,QAASpB,KAAKO,yBAC1CQ,EAAQM,gBAAgB,gBAAgB,G,CAS5C,UAAMC,CAAKlB,GACTJ,KAAKuB,cAAgBnB,EACrBJ,KAAKwB,WAAWF,KAAKlB,GACrBA,EAAOc,aAAa,gBAAiB,O,CAOvC,UAAMO,GACJzB,KAAKwB,WAAWC,OAChBzB,KAAKU,SAASI,SAAQC,GAAWA,EAAQG,aAAa,gBAAiB,U,CASzE,YAAMf,CAAOC,EAAqBsB,GAChC1B,KAAKuB,cAAgBnB,EACrB,MAAMuB,QAAiB3B,KAAKwB,WAAWrB,OAAOC,EAAQsB,GACtDtB,EAAOc,aAAa,gBAAiB,GAAGS,I,CAG1C,YAAYjB,GACV,OAAOkB,SAASC,iBAAiB,yBAAyB7B,KAAKY,KAAKC,O,CAW9D,QAAAiB,CAAS5B,GACf,GAAIF,KAAKuB,cAAe,CACtBvB,KAAKuB,cAAcL,aAAa,gBAAiB,GAAGhB,EAAE6B,S,CAExD,IAAK7B,EAAE6B,OAAQ,CACbC,OAAOC,uBAAsB,KAC3BjC,KAAKU,SAASI,SAAQC,IACpBA,EAAQC,iBAAiB,UAAWhB,KAAKC,mBAAoB,CAAEgB,KAAM,OACrEF,EAAQC,iBAAiB,QAAShB,KAAKO,wBAAyB,CAAEU,KAAM,MAAO,GAC/E,IAIJ,GAAIjB,KAAKuB,cAAe,CACtBvB,KAAKuB,cAAcW,QACnBlC,KAAKuB,cAAgB,I,GAOnB,wBAAAY,CAAyBjC,GAC/BA,EAAEiC,0B,CAGJ,MAAAC,GACE,OACEC,EAACC,EAAI,gBAAeC,GAClBF,EAAA,yBACEG,MAAOxC,KAAKwC,MACZC,UAAWzC,KAAKyC,UAChBC,IAAKxC,GAAMF,KAAKwB,WAAatB,EAC7ByC,qBAAsBzC,GAAKF,KAAK8B,SAAS5B,IAEzCmC,EAAA,OACEO,MAAM,oBACNC,cAAe3C,GAAKF,KAAKmC,yBAAyBjC,GAClD4C,YAAa5C,GAAKF,KAAKmC,yBAAyBjC,IAEhDmC,EAAA,OAAKO,MAAM,mBACTP,EAAA,cAEFA,EAAA,UAAQO,MAAM,YAAYG,QAAS,IAAM/C,KAAKyB,QAC5CY,EAAA,QAAMO,MAAM,mBAAmB5C,KAAKgD,uB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{E as r}from"./p-440193f4.js";function o(o){return(...n)=>{const t=n[0];if(!r.some((r=>r===t)))o(...n)}}function n(r,o,n){if(!o.includes(r))throw new Error(n)}function t(r,o,n){if(typeof r!=="string"||!o.test(r))throw new Error(n)}function f(r,o,n){const t=o==="array";const f=Array.isArray(r);if(t||f){if(f!==t)throw new Error(n)}else{if(typeof r!==o)throw new Error(n)}}const s=o(n);const i=o(t);const c=o(f);export{i as a,s as b,f as c,c as d};
|
|
2
|
-
//# sourceMappingURL=p-96f4ebc4.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["emptyOr","check","args","value","EMPTY_VALUES","some","v","checkOneOf","possibleValues","error","includes","Error","checkPattern","pattern","errorMessage","test","checkType","type","typeIsArray","valueIsArray","Array","isArray","checkEmptyOrOneOf","checkEmptyOrPattern","checkEmptyOrType"],"sources":["src/utils/property-checkers/empty-or.ts","src/utils/property-checkers/check-one-of.ts","src/utils/property-checkers/check-pattern.ts","src/utils/property-checkers/check-type.ts","src/utils/property-checkers/index.ts"],"sourcesContent":["import { EMPTY_VALUES } from './constants';\n\nexport function emptyOr<T extends unknown[]>(check: (...args: T) => void) {\n return (...args: T) => {\n const value = args[0];\n if (!EMPTY_VALUES.some(v => v === value)) check(...args);\n };\n}\n","export function checkOneOf<T>(value: T, possibleValues: readonly T[], error: string) {\n if (!possibleValues.includes(value)) throw new Error(error);\n}\n","export function checkPattern(value: unknown, pattern: RegExp, errorMessage: string) {\n if (typeof value !== 'string' || !pattern.test(value)) throw new Error(errorMessage);\n}\n","export type PropertyType =\n | 'boolean'\n | 'number'\n | 'string'\n | 'array'\n | 'object'\n | 'function';\n\nexport function checkType(value: unknown, type: PropertyType, error: string) {\n const typeIsArray = type === 'array';\n const valueIsArray = Array.isArray(value);\n\n if (typeIsArray || valueIsArray) {\n if (valueIsArray !== typeIsArray) throw new Error(error);\n } else {\n if (typeof value !== type) throw new Error(error);\n }\n}\n","import { emptyOr } from './empty-or';\nimport { checkOneOf } from './check-one-of';\nimport { checkPattern } from './check-pattern';\nimport { checkType } from './check-type';\n\nexport const checkEmptyOrOneOf = emptyOr(checkOneOf);\nexport const checkEmptyOrPattern = emptyOr(checkPattern);\nexport const checkEmptyOrType = emptyOr(checkType);\n\nexport * from './check-non-empty';\nexport * from './check-one-of';\nexport * from './check-pattern';\nexport * from './check-type';\n"],"mappings":"6CAEgBA,EAA6BC,GAC3C,MAAO,IAAIC,KACT,MAAMC,EAAQD,EAAK,GACnB,IAAKE,EAAaC,MAAKC,GAAKA,IAAMH,IAAQF,KAASC,EAAK,CAE5D,C,SCPgBK,EAAcJ,EAAUK,EAA8BC,GACpE,IAAKD,EAAeE,SAASP,GAAQ,MAAM,IAAIQ,MAAMF,EACvD,C,SCFgBG,EAAaT,EAAgBU,EAAiBC,GAC5D,UAAWX,IAAU,WAAaU,EAAQE,KAAKZ,GAAQ,MAAM,IAAIQ,MAAMG,EACzE,C,SCMgBE,EAAUb,EAAgBc,EAAoBR,GAC5D,MAAMS,EAAcD,IAAS,QAC7B,MAAME,EAAeC,MAAMC,QAAQlB,GAEnC,GAAIe,GAAeC,EAAc,CAC/B,GAAIA,IAAiBD,EAAa,MAAM,IAAIP,MAAMF,E,KAC7C,CACL,UAAWN,IAAUc,EAAM,MAAM,IAAIN,MAAMF,E,CAE/C,C,MCZaa,EAAoBtB,EAAQO,G,MAC5BgB,EAAsBvB,EAAQY,G,MAC9BY,EAAmBxB,EAAQgB,U"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["checkNonEmpty","value","error","EMPTY_VALUES","some","v","Error"],"sources":["src/utils/property-checkers/check-non-empty.ts"],"sourcesContent":["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":"6CAEgBA,EAAcC,EAAgBC,GAC5C,GAAIC,EAAaC,MAAKC,GAAKA,IAAMJ,IAAQ,CACvC,MAAM,IAAIK,MAAMJ,E,CAEpB,Q"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const t="post-components";let n;let e;let s=false;let o=false;const l=(t,n="")=>{{return()=>{}}};const c=(t,n)=>{{return()=>{}}};const i="{visibility:hidden}.hydrated{visibility:inherit}";const f="slot-fb{display:contents}slot-fb[hidden]{display:none}";const r={};const u=t=>t!=null;const a=t=>{t=typeof t;return t==="object"||t==="function"};function d(t){var n,e,s;return(s=(e=(n=t.head)===null||n===void 0?void 0:n.querySelector('meta[name="csp-nonce"]'))===null||e===void 0?void 0:e.getAttribute("content"))!==null&&s!==void 0?s:undefined}const v=(t,n,...e)=>{let s=null;let o=null;let l=false;let c=false;const i=[];const f=n=>{for(let e=0;e<n.length;e++){s=n[e];if(Array.isArray(s)){f(s)}else if(s!=null&&typeof s!=="boolean"){if(l=typeof t!=="function"&&!a(s)){s=String(s)}if(l&&c){i[i.length-1].t+=s}else{i.push(l?p(null,s):s)}c=l}}};f(e);if(n){if(n.key){o=n.key}{const t=n.className||n.class;if(t){n.class=typeof t!=="object"?t:Object.keys(t).filter((n=>t[n])).join(" ")}}}if(typeof t==="function"){return t(n===null?{}:n,i,m)}const r=p(t,null);r.o=n;if(i.length>0){r.l=i}{r.i=o}return r};const p=(t,n)=>{const e={u:0,v:t,t:n,p:null,l:null};{e.o=null}{e.i=null}return e};const y={};const h=t=>t&&t.v===y;const m={forEach:(t,n)=>t.map(b).forEach(n),map:(t,n)=>t.map(b).map(n).map($)};const b=t=>({vattrs:t.o,vchildren:t.l,vkey:t.i,vname:t.h,vtag:t.v,vtext:t.t});const $=t=>{if(typeof t.vtag==="function"){const n=Object.assign({},t.vattrs);if(t.vkey){n.key=t.vkey}if(t.vname){n.name=t.vname}return v(t.vtag,n,...t.vchildren||[])}const n=p(t.vtag,t.vtext);n.o=t.vattrs;n.l=t.vchildren;n.i=t.vkey;n.h=t.vname;return n};const w=(t,n)=>{if(t!=null&&!a(t)){if(n&4){return t==="false"?false:t===""||!!t}if(n&2){return parseFloat(t)}if(n&1){return String(t)}return t}return t};const S=t=>pt(t).$hostElement$;const g=(t,n,e)=>{const s=S(t);return{emit:t=>j(s,n,{bubbles:!!(e&4),composed:!!(e&2),cancelable:!!(e&1),detail:t})}};const j=(t,n,e)=>{const s=kt.ce(n,e);t.dispatchEvent(s);return s};const k=new WeakMap;const C=(t,n,e)=>{let s=St.get(t);if(Ot&&e){s=s||new CSSStyleSheet;if(typeof s==="string"){s=n}else{s.replaceSync(n)}}else{s=n}St.set(t,s)};const O=(t,n,e)=>{var s;const o=P(n);const l=St.get(o);t=t.nodeType===11?t:jt;if(l){if(typeof l==="string"){t=t.head||t;let e=k.get(t);let c;if(!e){k.set(t,e=new Set)}if(!e.has(o)){{c=jt.createElement("style");c.innerHTML=l;const n=(s=kt.m)!==null&&s!==void 0?s:d(jt);if(n!=null){c.setAttribute("nonce",n)}t.insertBefore(c,t.querySelector("link"))}if(n.u&4){c.innerHTML+=f}if(e){e.add(o)}}}else if(!t.adoptedStyleSheets.includes(l)){t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]}}return o};const M=t=>{const n=t.$;const e=t.$hostElement$;const s=n.u;const o=l("attachStyles",n.S);const c=O(e.shadowRoot?e.shadowRoot:e.getRootNode(),n);if(s&10){e["s-sc"]=c;e.classList.add(c+"-h")}o()};const P=(t,n)=>"sc-"+t.S;const x=(t,n,e,s,o,l)=>{if(e!==s){let c=mt(t,n);let i=n.toLowerCase();if(n==="class"){const n=t.classList;const o=L(e);const l=L(s);n.remove(...o.filter((t=>t&&!l.includes(t))));n.add(...l.filter((t=>t&&!o.includes(t))))}else if(n==="style"){{for(const n in e){if(!s||s[n]==null){if(n.includes("-")){t.style.removeProperty(n)}else{t.style[n]=""}}}}for(const n in s){if(!e||s[n]!==e[n]){if(n.includes("-")){t.style.setProperty(n,s[n])}else{t.style[n]=s[n]}}}}else if(n==="key");else if(n==="ref"){if(s){s(t)}}else if(!c&&n[0]==="o"&&n[1]==="n"){if(n[2]==="-"){n=n.slice(3)}else if(mt(gt,i)){n=i.slice(2)}else{n=i[2]+n.slice(3)}if(e||s){const o=n.endsWith(R);n=n.replace(U,"");if(e){kt.rel(t,n,e,o)}if(s){kt.ael(t,n,s,o)}}}else{const i=a(s);if((c||i&&s!==null)&&!o){try{if(!t.tagName.includes("-")){const o=s==null?"":s;if(n==="list"){c=false}else if(e==null||t[n]!=o){t[n]=o}}else{t[n]=s}}catch(t){}}if(s==null||s===false){if(s!==false||t.getAttribute(n)===""){{t.removeAttribute(n)}}}else if((!c||l&4||o)&&!i){s=s===true?"":s;{t.setAttribute(n,s)}}}}};const E=/\s/;const L=t=>!t?[]:t.split(E);const R="Capture";const U=new RegExp(R+"$");const W=(t,n,e,s)=>{const o=n.p.nodeType===11&&n.p.host?n.p.host:n.p;const l=t&&t.o||r;const c=n.o||r;{for(s in l){if(!(s in c)){x(o,s,l[s],undefined,e,n.u)}}}for(s in c){x(o,s,l[s],c[s],e,n.u)}};const A=(t,o,l,c)=>{const i=o.l[l];let f=0;let r;let a;if(i.t!==null){r=i.p=jt.createTextNode(i.t)}else{r=i.p=jt.createElement(i.v);{W(null,i,s)}if(u(n)&&r["s-si"]!==n){r.classList.add(r["s-si"]=n)}if(i.l){for(f=0;f<i.l.length;++f){a=A(t,i,f);if(a){r.appendChild(a)}}}}r["s-hn"]=e;return r};const N=(t,n,s,o,l,c)=>{let i=t;let f;if(i.shadowRoot&&i.tagName===e){i=i.shadowRoot}for(;l<=c;++l){if(o[l]){f=A(null,s,l);if(f){o[l].p=f;i.insertBefore(f,n)}}}};const T=(t,n,e)=>{for(let s=n;s<=e;++s){const n=t[s];if(n){const t=n.p;D(n);if(t){t.remove()}}}};const F=(t,n,e,s,o=false)=>{let l=0;let c=0;let i=0;let f=0;let r=n.length-1;let u=n[0];let a=n[r];let d=s.length-1;let v=s[0];let p=s[d];let y;let h;while(l<=r&&c<=d){if(u==null){u=n[++l]}else if(a==null){a=n[--r]}else if(v==null){v=s[++c]}else if(p==null){p=s[--d]}else if(H(u,v,o)){q(u,v,o);u=n[++l];v=s[++c]}else if(H(a,p,o)){q(a,p,o);a=n[--r];p=s[--d]}else if(H(u,p,o)){q(u,p,o);t.insertBefore(u.p,a.p.nextSibling);u=n[++l];p=s[--d]}else if(H(a,v,o)){q(a,v,o);t.insertBefore(a.p,u.p);a=n[--r];v=s[++c]}else{i=-1;{for(f=l;f<=r;++f){if(n[f]&&n[f].i!==null&&n[f].i===v.i){i=f;break}}}if(i>=0){h=n[i];if(h.v!==v.v){y=A(n&&n[c],e,i)}else{q(h,v,o);n[i]=undefined;y=h.p}v=s[++c]}else{y=A(n&&n[c],e,c);v=s[++c]}if(y){{u.p.parentNode.insertBefore(y,u.p)}}}}if(l>r){N(t,s[d+1]==null?null:s[d+1].p,e,s,c,d)}else if(c>d){T(n,l,r)}};const H=(t,n,e=false)=>{if(t.v===n.v){if(!e){return t.i===n.i}return true}return false};const q=(t,n,e=false)=>{const o=n.p=t.p;const l=t.l;const c=n.l;const i=n.v;const f=n.t;if(f===null){{if(i==="slot");else{W(t,n,s)}}if(l!==null&&c!==null){F(o,l,n,c,e)}else if(c!==null){if(t.t!==null){o.textContent=""}N(o,null,n,c,0,c.length-1)}else if(l!==null){T(l,0,l.length-1)}}else if(t.t!==f){o.data=f}};const D=t=>{{t.o&&t.o.ref&&t.o.ref(null);t.l&&t.l.map(D)}};const I=(t,s,o=false)=>{const l=t.$hostElement$;const c=t.j||p(null,null);const i=h(s)?s:v(null,null,s);e=l.tagName;if(o&&i.o){for(const t of Object.keys(i.o)){if(l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)){i.o[t]=l[t]}}}i.v=null;i.u|=4;t.j=i;i.p=c.p=l.shadowRoot||l;{n=l["s-sc"]}q(c,i,o)};const V=(t,n)=>{if(n&&!t.k&&n["s-p"]){n["s-p"].push(new Promise((n=>t.k=n)))}};const _=(t,n)=>{{t.u|=16}if(t.u&4){t.u|=512;return}V(t,t.C);const e=()=>z(t,n);return Ut(e)};const z=(t,n)=>{const e=l("scheduleUpdate",t.$.S);const s=t.O;let o;if(n){{t.u|=256;if(t.M){t.M.map((([t,n])=>Y(s,t,n)));t.M=undefined}}{o=Y(s,"componentWillLoad")}}{o=B(o,(()=>Y(s,"componentWillRender")))}e();return B(o,(()=>J(t,s,n)))};const B=(t,n)=>G(t)?t.then(n):n();const G=t=>t instanceof Promise||t&&t.then&&typeof t.then==="function";const J=async(t,n,e)=>{var s;const o=t.$hostElement$;const c=l("update",t.$.S);const i=o["s-rc"];if(e){M(t)}const f=l("render",t.$.S);{K(t,n,o,e)}if(i){i.map((t=>t()));o["s-rc"]=undefined}f();c();{const n=(s=o["s-p"])!==null&&s!==void 0?s:[];const e=()=>Q(t);if(n.length===0){e()}else{Promise.all(n).then(e);t.u|=4;n.length=0}}};const K=(t,n,e,s)=>{try{n=n.render();{t.u&=~16}{t.u|=2}{{{I(t,n,s)}}}}catch(n){bt(n,t.$hostElement$)}return null};const Q=t=>{const n=t.$.S;const e=t.$hostElement$;const s=l("postUpdate",n);const o=t.O;const c=t.C;if(!(t.u&64)){t.u|=64;{Z(e)}{Y(o,"componentDidLoad")}s();{t.P(e);if(!c){X()}}}else{s()}{t.L(e)}{if(t.k){t.k();t.k=undefined}if(t.u&512){Rt((()=>_(t,false)))}t.u&=~(4|512)}};const X=n=>{{Z(jt.documentElement)}Rt((()=>j(gt,"appload",{detail:{namespace:t}})))};const Y=(t,n,e)=>{if(t&&t[n]){try{return t[n](e)}catch(t){bt(t)}}return undefined};const Z=t=>t.classList.add("hydrated");const tt=(t,n)=>pt(t).R.get(n);const nt=(t,n,e,s)=>{const o=pt(t);const l=o.$hostElement$;const c=o.R.get(n);const i=o.u;const f=o.O;e=w(e,s.U[n][0]);const r=Number.isNaN(c)&&Number.isNaN(e);const u=e!==c&&!r;if((!(i&8)||c===undefined)&&u){o.R.set(n,e);if(f){if(s.W&&i&128){const t=s.W[n];if(t){t.map((t=>{try{f[t](e,c,n)}catch(t){bt(t,l)}}))}}if((i&(2|16))===2){_(o,false)}}}};const et=(t,n,e)=>{var s;const o=t.prototype;if(n.U){if(t.watchers){n.W=t.watchers}const l=Object.entries(n.U);l.map((([t,[s]])=>{if(s&31||e&2&&s&32){Object.defineProperty(o,t,{get(){return tt(this,t)},set(e){nt(this,t,e,n)},configurable:true,enumerable:true})}else if(e&1&&s&64){Object.defineProperty(o,t,{value(...n){var e;const s=pt(this);return(e=s===null||s===void 0?void 0:s.A)===null||e===void 0?void 0:e.then((()=>{var e;return(e=s.O)===null||e===void 0?void 0:e[t](...n)}))}})}}));if(e&1){const e=new Map;o.attributeChangedCallback=function(t,s,l){kt.jmp((()=>{var c;const i=e.get(t);if(this.hasOwnProperty(i)){l=this[i];delete this[i]}else if(o.hasOwnProperty(i)&&typeof this[i]==="number"&&this[i]==l){return}else if(i==null){const e=pt(this);const o=e===null||e===void 0?void 0:e.u;if(o&&!(o&8)&&o&128&&l!==s){const o=e.O;const i=(c=n.W)===null||c===void 0?void 0:c[t];i===null||i===void 0?void 0:i.forEach((n=>{if(o[n]!=null){o[n].call(o,l,s,t)}}))}return}this[i]=l===null&&typeof this[i]==="boolean"?false:l}))};t.observedAttributes=Array.from(new Set([...Object.keys((s=n.W)!==null&&s!==void 0?s:{}),...l.filter((([t,n])=>n[0]&15)).map((([t,n])=>{const s=n[1]||t;e.set(s,t);return s}))]))}}return t};const st=async(t,n,e,s)=>{let o;if((n.u&32)===0){n.u|=32;{o=wt(e);if(o.then){const t=c();o=await o;t()}if(!o.isProxied){{e.W=o.watchers}et(o,e,2);o.isProxied=true}const t=l("createInstance",e.S);{n.u|=8}try{new o(n)}catch(t){bt(t)}{n.u&=~8}{n.u|=128}t();ot(n.O)}if(o.style){let t=o.style;const n=P(e);if(!St.has(n)){const s=l("registerStyles",e.S);C(n,t,!!(e.u&1));s()}}}const i=n.C;const f=()=>_(n,true);if(i&&i["s-rc"]){i["s-rc"].push(f)}else{f()}};const ot=t=>{{Y(t,"connectedCallback")}};const lt=t=>{if((kt.u&1)===0){const n=pt(t);const e=n.$;const s=l("connectedCallback",e.S);if(!(n.u&1)){n.u|=1;{let e=t;while(e=e.parentNode||e.host){if(e["s-p"]){V(n,n.C=e);break}}}if(e.U){Object.entries(e.U).map((([n,[e]])=>{if(e&31&&t.hasOwnProperty(n)){const e=t[n];delete t[n];t[n]=e}}))}{st(t,n,e)}}else{rt(t,n,e.N);if(n===null||n===void 0?void 0:n.O){ot(n.O)}else if(n===null||n===void 0?void 0:n.T){n.T.then((()=>ot(n.O)))}}s()}};const ct=t=>{{Y(t,"disconnectedCallback")}};const it=async t=>{if((kt.u&1)===0){const n=pt(t);{if(n.F){n.F.map((t=>t()));n.F=undefined}}if(n===null||n===void 0?void 0:n.O){ct(n.O)}else if(n===null||n===void 0?void 0:n.T){n.T.then((()=>ct(n.O)))}}};const ft=(t,n={})=>{var e;const s=l();const o=[];const c=n.exclude||[];const r=gt.customElements;const u=jt.head;const a=u.querySelector("meta[charset]");const v=jt.createElement("style");const p=[];let y;let h=true;Object.assign(kt,n);kt.H=new URL(n.resourcesUrl||"./",jt.baseURI).href;let m=false;t.map((t=>{t[1].map((n=>{var e;const s={u:n[0],S:n[1],U:n[2],N:n[3]};if(s.u&4){m=true}{s.U=n[2]}{s.N=n[3]}{s.W=(e=n[4])!==null&&e!==void 0?e:{}}const l=s.S;const i=class extends HTMLElement{constructor(t){super(t);t=this;ht(t,s);if(s.u&1){{{t.attachShadow({mode:"open"})}}}}connectedCallback(){if(y){clearTimeout(y);y=null}if(h){p.push(this)}else{kt.jmp((()=>lt(this)))}}disconnectedCallback(){kt.jmp((()=>it(this)))}componentOnReady(){return pt(this).T}};s.q=t[0];if(!c.includes(l)&&!r.get(l)){o.push(l);r.define(l,et(i,s,1))}}))}));if(m){v.innerHTML+=f}{v.innerHTML+=o+i}if(v.innerHTML.length){v.setAttribute("data-styles","");const t=(e=kt.m)!==null&&e!==void 0?e:d(jt);if(t!=null){v.setAttribute("nonce",t)}u.insertBefore(v,a?a.nextSibling:u.firstChild)}h=false;if(p.length){p.map((t=>t.connectedCallback()))}else{{kt.jmp((()=>y=setTimeout(X,30)))}}s()};const rt=(t,n,e,s)=>{if(e){e.map((([e,s,o])=>{const l=t;const c=ut(n,o);const i=at(e);kt.ael(l,s,c,i);(n.F=n.F||[]).push((()=>kt.rel(l,s,c,i)))}))}};const ut=(t,n)=>e=>{try{{if(t.u&256){t.O[n](e)}else{(t.M=t.M||[]).push([n,e])}}}catch(t){bt(t)}};const at=t=>(t&2)!==0;const dt=t=>kt.m=t;const vt=new WeakMap;const pt=t=>vt.get(t);const yt=(t,n)=>vt.set(n.O=t,n);const ht=(t,n)=>{const e={u:0,$hostElement$:t,$:n,R:new Map};{e.A=new Promise((t=>e.L=t))}{e.T=new Promise((t=>e.P=t));t["s-p"]=[];t["s-rc"]=[]}rt(t,e,n.N);return vt.set(t,e)};const mt=(t,n)=>n in t;const bt=(t,n)=>(0,console.error)(t,n);const $t=new Map;const wt=(t,n,e)=>{const s=t.S.replace(/-/g,"_");const o=t.q;const l=$t.get(o);if(l){return l[s]}
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import(`./${o}.entry.js${""}`).then((t=>{{$t.set(o,t)}return t[s]}),bt)};const St=new Map;const gt=typeof window!=="undefined"?window:{};const jt=gt.document||{head:{}};const kt={u:0,H:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,s)=>t.addEventListener(n,e,s),rel:(t,n,e,s)=>t.removeEventListener(n,e,s),ce:(t,n)=>new CustomEvent(t,n)};const Ct=t=>Promise.resolve(t);const Ot=(()=>{try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(t){}return false})();const Mt=[];const Pt=[];const xt=(t,n)=>e=>{t.push(e);if(!o){o=true;if(n&&kt.u&4){Rt(Lt)}else{kt.raf(Lt)}}};const Et=t=>{for(let n=0;n<t.length;n++){try{t[n](performance.now())}catch(t){bt(t)}}t.length=0};const Lt=()=>{Et(Mt);{Et(Pt);if(o=Mt.length>0){kt.raf(Lt)}}};const Rt=t=>Ct().then(t);const Ut=xt(Pt,true);export{y as H,ft as b,g as c,S as g,v as h,Ct as p,yt as r,dt as s};
|
|
3
|
-
//# sourceMappingURL=p-b4f01350.js.map
|