@swisspost/design-system-components 9.0.0-next.8 → 9.0.0-next.9
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-url-3ffdd2fb.js +14 -0
- package/dist/cjs/debounce-1151afe3.js +12 -0
- package/dist/cjs/{index-e1f32cce.js → index-010dc207.js} +20 -27
- package/dist/cjs/{index-824d2b71.js → index-5d4e0aed.js} +2 -12
- package/dist/cjs/index.cjs.js +45 -42
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-a2b895fc.js → package-8e810a59.js} +1 -1
- package/dist/cjs/{post-accordion-3ce01432.js → post-accordion-b9df8522.js} +2 -2
- package/dist/cjs/{post-accordion-item-81601b1e.js → post-accordion-item-ecc6749f.js} +8 -7
- package/dist/cjs/post-accordion-item.cjs.entry.js +5 -4
- package/dist/cjs/post-accordion.cjs.entry.js +3 -3
- package/dist/cjs/{post-avatar-b1c97f51.js → post-avatar-f7236084.js} +2 -2
- package/dist/cjs/post-avatar.cjs.entry.js +3 -3
- package/dist/cjs/post-back-to-top-60762f8e.js +75 -0
- package/dist/cjs/post-back-to-top.cjs.entry.js +4 -3
- package/dist/cjs/{post-banner-8611eab5.js → post-banner-9662f22c.js} +3 -3
- package/dist/cjs/post-banner.cjs.entry.js +5 -4
- package/dist/cjs/post-breadcrumb-b40732fc.js +111 -0
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +17 -0
- package/dist/cjs/post-breadcrumb.cjs.entry.js +13 -0
- package/dist/cjs/{post-card-control-acd30573.js → post-card-control-039c9a4b.js} +4 -4
- package/dist/cjs/post-card-control.cjs.entry.js +3 -3
- package/dist/cjs/post-closebutton_15.cjs.entry.js +33 -0
- package/dist/cjs/{post-collapsible-trigger-8ca4d85b.js → post-collapsible-trigger-143cf84a.js} +6 -14
- package/dist/cjs/post-collapsible_2.cjs.entry.js +6 -4
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/post-footer-5f7fdf96.js +84 -0
- package/dist/cjs/post-footer.cjs.entry.js +11 -0
- package/dist/cjs/post-menu-item-bb0b0b9e.js +74 -0
- package/dist/cjs/{post-popover-c4f50134.js → post-popover-d0ce9dc6.js} +3 -3
- package/dist/cjs/post-popover.cjs.entry.js +3 -3
- package/dist/cjs/{post-rating-3a87ca46.js → post-rating-1082197c.js} +3 -3
- package/dist/cjs/post-rating.cjs.entry.js +3 -3
- package/dist/cjs/{post-tab-header-5fdb05a1.js → post-tab-header-4b6d8d54.js} +3 -3
- package/dist/cjs/post-tab-header.cjs.entry.js +3 -3
- package/dist/cjs/{post-tab-panel-34aed8e6.js → post-tab-panel-60f211a5.js} +3 -3
- package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
- package/dist/cjs/{post-tabs-dd2da5d2.js → post-tabs-1f797ce4.js} +8 -6
- package/dist/cjs/post-tabs.cjs.entry.js +3 -3
- package/dist/cjs/{post-tag-59232922.js → post-tag-ddaaaedc.js} +3 -3
- package/dist/cjs/post-tag.cjs.entry.js +3 -3
- package/dist/cjs/{post-megadropdown-trigger-7376d867.js → post-togglebutton-0984a694.js} +1789 -1234
- package/dist/cjs/{post-tooltip-3e0c1509.js → post-tooltip-38c839a4.js} +4 -4
- package/dist/cjs/post-tooltip.cjs.entry.js +5 -4
- package/dist/cjs/slide-5d51abe8.js +28 -0
- package/dist/collection/animations/slide.js +4 -4
- package/dist/collection/collection-manifest.json +12 -9
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +7 -4
- package/dist/collection/components/post-back-to-top/post-back-to-top.css +1 -1
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +2 -2
- package/dist/collection/components/post-breadcrumb/post-breadcrumb.css +3 -0
- package/dist/collection/components/post-breadcrumb/post-breadcrumb.js +161 -0
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -1
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +11 -1
- package/dist/collection/components/post-card-control/post-card-control.js +2 -2
- package/dist/collection/components/post-closebutton/post-closebutton.js +1 -1
- package/dist/collection/components/post-collapsible/post-collapsible.js +1 -1
- package/dist/collection/components/post-footer/post-footer.css +1 -0
- package/dist/collection/components/post-footer/post-footer.js +75 -0
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +74 -17
- package/dist/collection/components/post-icon/post-icon.js +1 -1
- package/dist/collection/components/post-language-option/post-language-option.css +1 -1
- package/dist/collection/components/post-language-option/post-language-option.js +25 -1
- package/dist/collection/components/post-language-switch/post-language-switch.css +1 -0
- package/dist/collection/components/post-language-switch/post-language-switch.js +163 -0
- package/dist/collection/components/post-language-switch/switch-variants.js +1 -0
- package/dist/collection/components/post-list/post-list.css +1 -1
- package/dist/collection/components/post-list/post-list.js +3 -3
- package/dist/collection/components/post-list-item/post-list-item.js +1 -1
- package/dist/collection/components/post-logo/post-logo.js +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +15 -24
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +82 -68
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +80 -24
- package/dist/collection/components/post-menu/post-menu.js +6 -4
- package/dist/collection/components/post-menu-item/post-menu-item.js +1 -1
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +11 -1
- package/dist/collection/components/post-popover/post-popover.js +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +2 -2
- package/dist/collection/components/post-rating/post-rating.js +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.js +1 -1
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +6 -4
- package/dist/collection/components/post-tag/post-tag.js +1 -1
- package/dist/collection/components/post-togglebutton/post-togglebutton.css +1 -1
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +24 -6
- package/dist/collection/components/post-tooltip/post-tooltip.js +1 -1
- package/dist/collection/index.js +12 -9
- package/dist/collection/utils/breakpoints.js +46 -0
- package/dist/components/debounce.js +10 -0
- package/dist/components/index.js +12 -9
- package/dist/components/index2.js +1 -1
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +5 -4
- package/dist/components/post-back-to-top2.js +4 -27
- package/dist/components/post-breadcrumb-item2.js +13 -3
- package/dist/components/post-breadcrumb.d.ts +11 -0
- package/dist/components/post-breadcrumb.js +6 -0
- package/dist/components/post-breadcrumb2.js +168 -0
- package/dist/components/post-card-control2.js +2 -2
- package/dist/components/post-closebutton2.js +1 -1
- package/dist/components/post-collapsible-trigger2.js +1 -9
- package/dist/components/post-collapsible2.js +2 -2
- package/dist/components/post-footer.d.ts +11 -0
- package/dist/components/post-footer.js +6 -0
- package/dist/components/post-footer2.js +124 -0
- package/dist/components/post-header2.js +55 -14
- package/dist/components/post-icon2.js +2 -2
- package/dist/components/post-language-option2.js +5 -3
- package/dist/components/post-language-switch.d.ts +11 -0
- package/dist/components/post-language-switch.js +6 -0
- package/dist/components/post-language-switch2.js +146 -0
- package/dist/components/post-list-item2.js +1 -1
- package/dist/components/post-list2.js +4 -4
- package/dist/components/post-logo2.js +2 -2
- package/dist/components/post-mainnavigation2.js +17 -17
- package/dist/components/post-megadropdown-trigger2.js +63 -11
- package/dist/components/post-megadropdown2.js +48 -22
- package/dist/components/post-menu-item2.js +1 -1
- package/dist/components/post-menu-trigger2.js +11 -1
- package/dist/components/post-menu2.js +6 -4
- package/dist/components/post-popover2.js +1 -1
- package/dist/components/post-popovercontainer2.js +2 -2
- package/dist/components/post-rating2.js +1 -1
- package/dist/components/post-tab-header2.js +1 -1
- package/dist/components/post-tab-panel2.js +1 -1
- package/dist/components/post-tabs2.js +6 -4
- package/dist/components/post-tag2.js +1 -1
- package/dist/components/post-togglebutton2.js +23 -5
- package/dist/components/post-tooltip2.js +2 -2
- package/dist/components/slide.js +25 -0
- package/dist/docs.json +500 -123
- package/dist/esm/check-url-a974431e.js +12 -0
- package/dist/esm/debounce-abe98cc2.js +10 -0
- package/dist/esm/{index-f8a00dc0.js → index-b49c9904.js} +1 -11
- package/dist/esm/{index-e1b64755.js → index-fb8d6be7.js} +20 -27
- package/dist/esm/index.js +24 -24
- package/dist/esm/loader.js +3 -3
- package/dist/esm/package-4d81f3c2.js +3 -0
- package/dist/esm/{post-accordion-19e88941.js → post-accordion-ee54a3ef.js} +2 -2
- package/dist/esm/{post-accordion-item-33bbe4de.js → post-accordion-item-e10452dc.js} +8 -7
- package/dist/esm/post-accordion-item.entry.js +5 -4
- package/dist/esm/post-accordion.entry.js +3 -3
- package/dist/esm/{post-avatar-d15a9f9e.js → post-avatar-5572fa73.js} +2 -2
- package/dist/esm/post-avatar.entry.js +3 -3
- package/dist/esm/post-back-to-top-1d823c43.js +73 -0
- package/dist/esm/post-back-to-top.entry.js +4 -3
- package/dist/esm/{post-banner-bf5e6a18.js → post-banner-78480475.js} +3 -3
- package/dist/esm/post-banner.entry.js +5 -4
- package/dist/esm/post-breadcrumb-aaa77f74.js +109 -0
- package/dist/esm/post-breadcrumb-item_2.entry.js +8 -0
- package/dist/esm/post-breadcrumb.entry.js +5 -0
- package/dist/esm/{post-card-control-f0788f6f.js → post-card-control-862aa961.js} +4 -4
- package/dist/esm/post-card-control.entry.js +3 -3
- package/dist/esm/post-closebutton_15.entry.js +11 -0
- package/dist/esm/{post-collapsible-trigger-1d939eb6.js → post-collapsible-trigger-1c7833f8.js} +5 -13
- package/dist/esm/post-collapsible_2.entry.js +6 -4
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/post-footer-b18875e7.js +82 -0
- package/dist/esm/post-footer.entry.js +3 -0
- package/dist/esm/post-menu-item-2906384b.js +71 -0
- package/dist/esm/{post-popover-7195d05a.js → post-popover-2432bb3f.js} +3 -3
- package/dist/esm/post-popover.entry.js +3 -3
- package/dist/esm/{post-rating-8baf86fe.js → post-rating-95cbdbb8.js} +3 -3
- package/dist/esm/post-rating.entry.js +3 -3
- package/dist/esm/{post-tab-header-a1d1d9d0.js → post-tab-header-dfea00ea.js} +3 -3
- package/dist/esm/post-tab-header.entry.js +3 -3
- package/dist/esm/{post-tab-panel-afce8d40.js → post-tab-panel-cafd9e04.js} +3 -3
- package/dist/esm/post-tab-panel.entry.js +3 -3
- package/dist/esm/{post-tabs-fbb42496.js → post-tabs-beef8eae.js} +8 -6
- package/dist/esm/post-tabs.entry.js +3 -3
- package/dist/esm/{post-tag-d67b6a19.js → post-tag-a77e7af6.js} +3 -3
- package/dist/esm/post-tag.entry.js +3 -3
- package/dist/esm/{post-megadropdown-trigger-210b4ab3.js → post-togglebutton-395bf3f0.js} +1785 -1235
- package/dist/esm/{post-tooltip-7101ed24.js → post-tooltip-b298039a.js} +4 -4
- package/dist/esm/post-tooltip.entry.js +5 -4
- package/dist/esm/slide-3422b8a3.js +25 -0
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-0711f76d.entry.js +1 -0
- package/dist/post-components/p-095a06f6.entry.js +1 -0
- package/dist/post-components/p-0b5a5f32.js +1 -0
- package/dist/post-components/{p-f0f8427e.js → p-135fa60f.js} +1 -1
- package/dist/post-components/p-18e38d8a.js +1 -0
- package/dist/post-components/p-2e1ec074.entry.js +1 -0
- package/dist/post-components/p-4202b433.entry.js +1 -0
- package/dist/post-components/p-45773f59.js +1 -0
- package/dist/post-components/{p-282115c4.js → p-4953de7e.js} +1 -1
- package/dist/post-components/p-4f67c5f5.entry.js +1 -0
- package/dist/post-components/{p-6cea23cd.js → p-4f9746f6.js} +2 -2
- package/dist/post-components/p-5075c672.entry.js +1 -0
- package/dist/post-components/p-515e0f96.js +1 -0
- package/dist/post-components/p-5467b223.js +1 -0
- package/dist/post-components/p-67036798.entry.js +1 -0
- package/dist/post-components/{p-d0b8820a.js → p-6d953fb2.js} +1 -1
- package/dist/post-components/p-6edb0ac5.js +1 -0
- package/dist/post-components/{p-939f2ba7.js → p-6f8f39ca.js} +1 -1
- package/dist/post-components/p-7503a623.js +1 -0
- package/dist/post-components/p-761b24c7.entry.js +1 -0
- package/dist/post-components/{p-00fa0152.js → p-77c4c1d2.js} +1 -1
- package/dist/post-components/p-7cf0c2ad.js +1 -0
- package/dist/post-components/p-856c14d6.entry.js +1 -0
- package/dist/post-components/p-866bf50a.entry.js +1 -0
- package/dist/post-components/p-8d621781.js +1 -0
- package/dist/post-components/p-8fe2d72c.entry.js +1 -0
- package/dist/post-components/p-9ad5088f.entry.js +1 -0
- package/dist/post-components/{p-485dafcf.js → p-a1d2b90e.js} +1 -1
- package/dist/post-components/p-a521419d.entry.js +1 -0
- package/dist/post-components/p-aa538648.js +1 -0
- package/dist/post-components/p-afdbee2f.js +1 -0
- package/dist/post-components/p-b02817f2.entry.js +1 -0
- package/dist/post-components/p-b157dcba.entry.js +1 -0
- package/dist/post-components/p-b22656b1.js +1 -0
- package/dist/post-components/{p-61e79941.js → p-bdbd11cb.js} +1 -1
- package/dist/post-components/{p-3eab790d.js → p-c0ae9886.js} +1 -1
- package/dist/post-components/p-c537e196.entry.js +1 -0
- package/dist/post-components/p-d4f93f2b.js +1 -0
- package/dist/post-components/p-dca4246a.entry.js +1 -0
- package/dist/post-components/{p-f627744e.js → p-f319b026.js} +1 -1
- package/dist/post-components/{p-ccb6dfa1.js → p-f4b7b379.js} +1 -1
- package/dist/post-components/p-fac66087.entry.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +2 -0
- package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +3 -3
- package/dist/types/components/post-breadcrumb/post-breadcrumb.d.ts +30 -0
- package/dist/types/components/post-breadcrumb-item/post-breadcrumb-item.d.ts +1 -0
- package/dist/types/components/post-footer/post-footer.d.ts +23 -0
- package/dist/types/components/post-header/post-header.d.ts +13 -5
- package/dist/types/components/post-language-option/post-language-option.d.ts +5 -0
- package/dist/types/components/post-language-switch/post-language-switch.d.ts +31 -0
- package/dist/types/components/post-language-switch/switch-variants.d.ts +2 -0
- package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +10 -1
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +24 -12
- package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +20 -5
- package/dist/types/components/post-menu/post-menu.d.ts +1 -0
- package/dist/types/components/post-togglebutton/post-togglebutton.d.ts +4 -2
- package/dist/types/components.d.ts +129 -29
- package/dist/types/index.d.ts +12 -9
- package/dist/types/utils/breakpoints.d.ts +11 -0
- package/loaders/debounce.js +10 -0
- package/loaders/index.d.ts +6 -0
- package/loaders/index.js +3 -0
- package/loaders/index2.js +1 -1
- package/loaders/package.js +1 -1
- package/loaders/post-accordion-item.js +1 -99
- package/loaders/post-accordion-item2.js +102 -0
- package/loaders/post-back-to-top.js +4 -27
- package/loaders/post-banner.js +1 -1
- package/loaders/post-breadcrumb-item.js +1 -70
- package/loaders/post-breadcrumb-item2.js +82 -0
- package/loaders/post-breadcrumb.d.ts +11 -0
- package/loaders/post-breadcrumb.js +171 -0
- package/loaders/post-card-control.js +2 -2
- package/loaders/post-closebutton.js +1 -1
- package/loaders/post-collapsible-trigger2.js +1 -9
- package/loaders/post-collapsible2.js +1 -1
- package/loaders/post-footer.d.ts +11 -0
- package/loaders/post-footer.js +127 -0
- package/loaders/post-header.js +55 -14
- package/loaders/post-icon2.js +2 -2
- package/loaders/post-language-option.js +4 -2
- package/loaders/post-language-switch.d.ts +11 -0
- package/loaders/post-language-switch.js +149 -0
- package/loaders/post-list-item.js +1 -1
- package/loaders/post-list.js +4 -4
- package/loaders/post-logo.js +2 -2
- package/loaders/post-mainnavigation.js +17 -17
- package/loaders/post-megadropdown-trigger.js +63 -11
- package/loaders/post-megadropdown.js +48 -22
- package/loaders/post-menu-item.js +1 -31
- package/loaders/post-menu-item2.js +33 -0
- package/loaders/post-menu-trigger.js +1 -90
- package/{dist/esm/post-menu-trigger-80c2bdf4.js → loaders/post-menu-trigger2.js} +41 -12
- package/loaders/post-menu.js +1 -199
- package/{dist/esm/post-menu-e853e28b.js → loaders/post-menu2.js} +42 -13
- package/loaders/post-popover.js +1 -1
- package/loaders/post-popovercontainer2.js +2 -2
- package/loaders/post-rating.js +1 -1
- package/loaders/post-tab-header.js +1 -1
- package/loaders/post-tab-panel.js +1 -1
- package/loaders/post-tabs.js +6 -4
- package/loaders/post-tag.js +1 -1
- package/loaders/post-togglebutton.js +23 -5
- package/loaders/post-tooltip.js +1 -1
- package/loaders/slide.js +25 -0
- package/package.json +5 -4
- package/dist/cjs/post-back-to-top-0ce98569.js +0 -98
- package/dist/cjs/post-breadcrumb-item-2075462a.js +0 -49
- package/dist/cjs/post-breadcrumb-item.cjs.entry.js +0 -15
- package/dist/cjs/post-closebutton_10.cjs.entry.js +0 -25
- package/dist/cjs/post-language-option-cf32d0ed.js +0 -68
- package/dist/cjs/post-language-option.cjs.entry.js +0 -15
- package/dist/cjs/post-menu-a3b7b63b.js +0 -176
- package/dist/cjs/post-menu-item-28ab1a72.js +0 -20
- package/dist/cjs/post-menu-item.cjs.entry.js +0 -11
- package/dist/cjs/post-menu-trigger-821839f5.js +0 -75
- package/dist/cjs/post-menu-trigger.cjs.entry.js +0 -13
- package/dist/cjs/post-menu.cjs.entry.js +0 -11
- package/dist/cjs/post-togglebutton-59c6357b.js +0 -28
- package/dist/cjs/post-togglebutton.cjs.entry.js +0 -11
- package/dist/esm/package-9cafe148.js +0 -3
- package/dist/esm/post-back-to-top-bcf46150.js +0 -96
- package/dist/esm/post-breadcrumb-item-e3b41f74.js +0 -47
- package/dist/esm/post-breadcrumb-item.entry.js +0 -7
- package/dist/esm/post-closebutton_10.entry.js +0 -8
- package/dist/esm/post-language-option-1436370d.js +0 -66
- package/dist/esm/post-language-option.entry.js +0 -7
- package/dist/esm/post-menu-item-86d4c7ab.js +0 -18
- package/dist/esm/post-menu-item.entry.js +0 -3
- package/dist/esm/post-menu-trigger.entry.js +0 -5
- package/dist/esm/post-menu.entry.js +0 -3
- package/dist/esm/post-togglebutton-c3fb912d.js +0 -26
- package/dist/esm/post-togglebutton.entry.js +0 -3
- package/dist/post-components/p-0338f9da.js +0 -1
- package/dist/post-components/p-1667387e.entry.js +0 -1
- package/dist/post-components/p-19551c18.entry.js +0 -1
- package/dist/post-components/p-1b627f80.js +0 -1
- package/dist/post-components/p-24673919.js +0 -1
- package/dist/post-components/p-266b734f.entry.js +0 -1
- package/dist/post-components/p-2d0ffc1e.entry.js +0 -1
- package/dist/post-components/p-45018d7e.entry.js +0 -1
- package/dist/post-components/p-4a647a78.js +0 -1
- package/dist/post-components/p-4abfa65b.js +0 -1
- package/dist/post-components/p-517f2b1f.entry.js +0 -1
- package/dist/post-components/p-55224ee7.entry.js +0 -1
- package/dist/post-components/p-558a9849.js +0 -1
- package/dist/post-components/p-59b31557.js +0 -1
- package/dist/post-components/p-5d1db85c.entry.js +0 -1
- package/dist/post-components/p-679978de.entry.js +0 -1
- package/dist/post-components/p-6a842b96.entry.js +0 -1
- package/dist/post-components/p-71f03424.js +0 -1
- package/dist/post-components/p-8c2568c1.entry.js +0 -1
- package/dist/post-components/p-8fd3a3cb.entry.js +0 -1
- package/dist/post-components/p-a4c39296.entry.js +0 -1
- package/dist/post-components/p-af5d3b89.entry.js +0 -1
- package/dist/post-components/p-b4423249.entry.js +0 -1
- package/dist/post-components/p-c31a7d65.entry.js +0 -1
- package/dist/post-components/p-c544bb82.js +0 -1
- package/dist/post-components/p-d36adfb5.js +0 -1
- package/dist/post-components/p-da6a8268.entry.js +0 -1
- package/dist/post-components/p-ece14d88.js +0 -1
- package/dist/post-components/p-f2e1b4d8.js +0 -1
- package/dist/post-components/p-f7b6b96a.entry.js +0 -1
- package/dist/post-components/p-f812e93d.entry.js +0 -1
- package/dist/post-components/p-f8d41c32.js +0 -1
- package/dist/post-components/p-fe516cdf.entry.js +0 -1
- package/dist/post-components/p-fe7467fb.entry.js +0 -1
|
@@ -1,93 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { v as version } from './package.js';
|
|
3
|
-
import { c as checkType } from './check-type.js';
|
|
4
|
-
import { g as getRoot } from './get-root.js';
|
|
5
|
-
|
|
6
|
-
const postMenuTriggerCss = ":host{display:inline-block}";
|
|
7
|
-
const PostMenuTriggerStyle0 = postMenuTriggerCss;
|
|
8
|
-
|
|
9
|
-
const PostMenuTrigger$1 = /*@__PURE__*/ proxyCustomElement(class PostMenuTrigger extends HTMLElement {
|
|
10
|
-
constructor() {
|
|
11
|
-
super();
|
|
12
|
-
this.__registerHost();
|
|
13
|
-
/**
|
|
14
|
-
* Reference to the slotted button within the trigger, if present.
|
|
15
|
-
* Used to manage click and key events for menu control.
|
|
16
|
-
*/
|
|
17
|
-
this.slottedButton = null;
|
|
18
|
-
this.handleKeyDown = (e) => {
|
|
19
|
-
if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
|
|
20
|
-
e.preventDefault();
|
|
21
|
-
this.handleToggle();
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
this.for = undefined;
|
|
25
|
-
this.ariaExpanded = false;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Watch for changes to the `for` property to validate its type and ensure it is a string.
|
|
29
|
-
* @param forValue - The new value of the `for` property.
|
|
30
|
-
*/
|
|
31
|
-
validateControlFor(forValue = this.for) {
|
|
32
|
-
checkType(forValue, 'string', 'The "for" property is required and should be a string.');
|
|
33
|
-
}
|
|
34
|
-
get menu() {
|
|
35
|
-
const ref = this.root.getElementById(this.for);
|
|
36
|
-
return ref && ref.localName === 'post-menu' ? ref : null;
|
|
37
|
-
}
|
|
38
|
-
handleToggle() {
|
|
39
|
-
const menu = this.menu;
|
|
40
|
-
if (menu && this.slottedButton) {
|
|
41
|
-
this.ariaExpanded = !this.ariaExpanded;
|
|
42
|
-
this.slottedButton.setAttribute('aria-expanded', this.ariaExpanded.toString());
|
|
43
|
-
menu.toggle(this.host);
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
console.warn(`No post-menu found with ID: ${this.for}`);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
componentDidLoad() {
|
|
50
|
-
this.root = getRoot(this.host);
|
|
51
|
-
this.validateControlFor();
|
|
52
|
-
this.slottedButton = this.host.querySelector('button');
|
|
53
|
-
if (this.slottedButton) {
|
|
54
|
-
this.slottedButton.setAttribute('aria-haspopup', 'menu');
|
|
55
|
-
this.slottedButton.addEventListener('click', () => {
|
|
56
|
-
this.handleToggle();
|
|
57
|
-
});
|
|
58
|
-
this.slottedButton.addEventListener('keydown', this.handleKeyDown);
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
console.warn('No button found within post-menu-trigger');
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
render() {
|
|
65
|
-
return (h(Host, { key: 'd6b5619d0b4035887eaffdcc3c153eb0a5fe4ceb', "data-version": version, "tab-index": "-1" }, h("slot", { key: '5d87c80dae6188470b10207993822d92adc714b1' })));
|
|
66
|
-
}
|
|
67
|
-
get host() { return this; }
|
|
68
|
-
static get watchers() { return {
|
|
69
|
-
"for": ["validateControlFor"]
|
|
70
|
-
}; }
|
|
71
|
-
static get style() { return PostMenuTriggerStyle0; }
|
|
72
|
-
}, [4, "post-menu-trigger", {
|
|
73
|
-
"for": [1],
|
|
74
|
-
"ariaExpanded": [32]
|
|
75
|
-
}, undefined, {
|
|
76
|
-
"for": ["validateControlFor"]
|
|
77
|
-
}]);
|
|
78
|
-
function defineCustomElement$1() {
|
|
79
|
-
if (typeof customElements === "undefined") {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
const components = ["post-menu-trigger"];
|
|
83
|
-
components.forEach(tagName => { switch (tagName) {
|
|
84
|
-
case "post-menu-trigger":
|
|
85
|
-
if (!customElements.get(tagName)) {
|
|
86
|
-
customElements.define(tagName, PostMenuTrigger$1);
|
|
87
|
-
}
|
|
88
|
-
break;
|
|
89
|
-
} });
|
|
90
|
-
}
|
|
1
|
+
import { P as PostMenuTrigger$1, d as defineCustomElement$1 } from './post-menu-trigger2.js';
|
|
91
2
|
|
|
92
3
|
const PostMenuTrigger = PostMenuTrigger$1;
|
|
93
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { v as version } from './package
|
|
3
|
-
import { c as checkType } from './check-type
|
|
4
|
-
import { g as getRoot } from './get-root
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { v as version } from './package.js';
|
|
3
|
+
import { c as checkType } from './check-type.js';
|
|
4
|
+
import { g as getRoot } from './get-root.js';
|
|
5
5
|
|
|
6
6
|
const postMenuTriggerCss = ":host{display:inline-block}";
|
|
7
7
|
const PostMenuTriggerStyle0 = postMenuTriggerCss;
|
|
8
8
|
|
|
9
|
-
const PostMenuTrigger = class {
|
|
10
|
-
constructor(
|
|
11
|
-
|
|
9
|
+
const PostMenuTrigger = /*@__PURE__*/ proxyCustomElement(class PostMenuTrigger extends HTMLElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.__registerHost();
|
|
12
13
|
/**
|
|
13
14
|
* Reference to the slotted button within the trigger, if present.
|
|
14
15
|
* Used to manage click and key events for menu control.
|
|
@@ -49,6 +50,16 @@ const PostMenuTrigger = class {
|
|
|
49
50
|
this.root = getRoot(this.host);
|
|
50
51
|
this.validateControlFor();
|
|
51
52
|
this.slottedButton = this.host.querySelector('button');
|
|
53
|
+
// Check if the slottedButton is within a web component
|
|
54
|
+
if (!this.slottedButton) {
|
|
55
|
+
const webComponent = this.host.querySelector('.menu-trigger-webc');
|
|
56
|
+
if (webComponent.shadowRoot) {
|
|
57
|
+
const slottedButton = webComponent.shadowRoot.querySelector('button');
|
|
58
|
+
if (slottedButton) {
|
|
59
|
+
this.slottedButton = slottedButton;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
52
63
|
if (this.slottedButton) {
|
|
53
64
|
this.slottedButton.setAttribute('aria-haspopup', 'menu');
|
|
54
65
|
this.slottedButton.addEventListener('click', () => {
|
|
@@ -61,13 +72,31 @@ const PostMenuTrigger = class {
|
|
|
61
72
|
}
|
|
62
73
|
}
|
|
63
74
|
render() {
|
|
64
|
-
return (h(Host, { key: '
|
|
75
|
+
return (h(Host, { key: '64e9e7e6448160c7b52fc732b5107e94e9776678', "data-version": version, "tab-index": "-1" }, h("slot", { key: '711d641147cec0c26c7a3917f9302f1bbbee0d73' })));
|
|
65
76
|
}
|
|
66
|
-
get host() { return
|
|
77
|
+
get host() { return this; }
|
|
67
78
|
static get watchers() { return {
|
|
68
79
|
"for": ["validateControlFor"]
|
|
69
80
|
}; }
|
|
70
|
-
}
|
|
71
|
-
|
|
81
|
+
static get style() { return PostMenuTriggerStyle0; }
|
|
82
|
+
}, [4, "post-menu-trigger", {
|
|
83
|
+
"for": [1],
|
|
84
|
+
"ariaExpanded": [32]
|
|
85
|
+
}, undefined, {
|
|
86
|
+
"for": ["validateControlFor"]
|
|
87
|
+
}]);
|
|
88
|
+
function defineCustomElement() {
|
|
89
|
+
if (typeof customElements === "undefined") {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const components = ["post-menu-trigger"];
|
|
93
|
+
components.forEach(tagName => { switch (tagName) {
|
|
94
|
+
case "post-menu-trigger":
|
|
95
|
+
if (!customElements.get(tagName)) {
|
|
96
|
+
customElements.define(tagName, PostMenuTrigger);
|
|
97
|
+
}
|
|
98
|
+
break;
|
|
99
|
+
} });
|
|
100
|
+
}
|
|
72
101
|
|
|
73
|
-
export { PostMenuTrigger as P };
|
|
102
|
+
export { PostMenuTrigger as P, defineCustomElement as d };
|
package/loaders/post-menu.js
CHANGED
|
@@ -1,202 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { v as version } from './package.js';
|
|
3
|
-
import { d as defineCustomElement$2 } from './post-popovercontainer2.js';
|
|
4
|
-
|
|
5
|
-
const focusableSelector = `:where(${[
|
|
6
|
-
'button',
|
|
7
|
-
'input:not([type="hidden"])',
|
|
8
|
-
'[tabindex]',
|
|
9
|
-
'select',
|
|
10
|
-
'textarea',
|
|
11
|
-
'[contenteditable]',
|
|
12
|
-
'a[href]',
|
|
13
|
-
'iframe',
|
|
14
|
-
'audio[controls]',
|
|
15
|
-
'video[controls]',
|
|
16
|
-
'area[href]',
|
|
17
|
-
'details > summary:first-of-type',
|
|
18
|
-
].join(',')})`;
|
|
19
|
-
const focusDisablingSelector = `:where(${[
|
|
20
|
-
'[inert]',
|
|
21
|
-
'[inert] *',
|
|
22
|
-
':disabled',
|
|
23
|
-
'dialog:not([open]) *',
|
|
24
|
-
'[popover]:not(:popover-open) *',
|
|
25
|
-
'details:not([open]) > *:not(details > summary:first-of-type)',
|
|
26
|
-
'details:not([open]) > *:not(details > summary:first-of-type) *',
|
|
27
|
-
].join(',')})`;
|
|
28
|
-
const isFocusable = (element) => {
|
|
29
|
-
return (element === null || element === void 0 ? void 0 : element.matches(focusableSelector)) && !(element === null || element === void 0 ? void 0 : element.matches(focusDisablingSelector));
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const postMenuCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}post-popovercontainer{padding:var(--post-menu-padding);background-color:var(--post-menu-bg, #ffffff);border-color:var(--post-menu-bg, #ffffff)}";
|
|
33
|
-
const PostMenuStyle0 = postMenuCss;
|
|
34
|
-
|
|
35
|
-
const PostMenu$1 = /*@__PURE__*/ proxyCustomElement(class PostMenu extends HTMLElement {
|
|
36
|
-
constructor() {
|
|
37
|
-
super();
|
|
38
|
-
this.__registerHost();
|
|
39
|
-
this.__attachShadow();
|
|
40
|
-
this.toggleMenu = createEvent(this, "toggleMenu", 7);
|
|
41
|
-
this.lastFocusedElement = null;
|
|
42
|
-
this.KEYCODES = {
|
|
43
|
-
SPACE: ' ',
|
|
44
|
-
ENTER: 'Enter',
|
|
45
|
-
UP: 'ArrowUp',
|
|
46
|
-
DOWN: 'ArrowDown',
|
|
47
|
-
TAB: 'Tab',
|
|
48
|
-
HOME: 'Home',
|
|
49
|
-
END: 'End',
|
|
50
|
-
ESCAPE: 'Escape'
|
|
51
|
-
};
|
|
52
|
-
this.handleKeyDown = (e) => {
|
|
53
|
-
e.stopPropagation();
|
|
54
|
-
if (e.key === this.KEYCODES.ESCAPE) {
|
|
55
|
-
this.toggle(this.host);
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
if (Object.values(this.KEYCODES).includes(e.key)) {
|
|
59
|
-
this.controlKeyDownHandler(e);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
this.handleClick = (e) => {
|
|
63
|
-
const target = e.target;
|
|
64
|
-
if (['BUTTON', 'A', 'INPUT', 'SELECT', 'TEXTAREA'].includes(target.tagName)) {
|
|
65
|
-
this.toggle(this.host);
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
this.placement = 'bottom';
|
|
69
|
-
this.isVisible = false;
|
|
70
|
-
}
|
|
71
|
-
connectedCallback() {
|
|
72
|
-
this.host.addEventListener('keydown', this.handleKeyDown);
|
|
73
|
-
this.host.addEventListener('click', this.handleClick);
|
|
74
|
-
}
|
|
75
|
-
disconnectedCallback() {
|
|
76
|
-
this.host.removeEventListener('keydown', this.handleKeyDown);
|
|
77
|
-
this.host.removeEventListener('click', this.handleClick);
|
|
78
|
-
}
|
|
79
|
-
componentDidLoad() {
|
|
80
|
-
this.popoverRef.addEventListener('postToggle', (event) => {
|
|
81
|
-
this.isVisible = event.detail;
|
|
82
|
-
this.toggleMenu.emit(this.isVisible);
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Toggles the menu visibility based on its current state.
|
|
87
|
-
*/
|
|
88
|
-
async toggle(target) {
|
|
89
|
-
this.isVisible ? await this.hide() : await this.show(target);
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Displays the popover menu, focusing the first menu item.
|
|
93
|
-
*
|
|
94
|
-
* @param target - The HTML element relative to which the popover menu should be displayed.
|
|
95
|
-
*/
|
|
96
|
-
async show(target) {
|
|
97
|
-
if (this.popoverRef) {
|
|
98
|
-
await this.popoverRef.show(target);
|
|
99
|
-
this.lastFocusedElement = document.activeElement;
|
|
100
|
-
const menuItems = this.getSlottedItems();
|
|
101
|
-
if (menuItems.length > 0) {
|
|
102
|
-
menuItems[0].focus();
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
console.error('show: popoverRef is null or undefined');
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Hides the popover menu and restores focus to the previously focused element.
|
|
111
|
-
*/
|
|
112
|
-
async hide() {
|
|
113
|
-
if (this.popoverRef) {
|
|
114
|
-
await this.popoverRef.hide();
|
|
115
|
-
if (this.lastFocusedElement) {
|
|
116
|
-
this.lastFocusedElement.focus();
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
console.error('hide: popoverRef is null or undefined');
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
controlKeyDownHandler(e) {
|
|
124
|
-
const menuItems = this.getSlottedItems();
|
|
125
|
-
if (!menuItems.length) {
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
const currentFocusedElement = document.activeElement;
|
|
129
|
-
let currentIndex = menuItems.findIndex(el => el === currentFocusedElement);
|
|
130
|
-
switch (e.key) {
|
|
131
|
-
case this.KEYCODES.UP:
|
|
132
|
-
e.preventDefault();
|
|
133
|
-
currentIndex = (currentIndex - 1 + menuItems.length) % menuItems.length;
|
|
134
|
-
break;
|
|
135
|
-
case this.KEYCODES.DOWN:
|
|
136
|
-
e.preventDefault();
|
|
137
|
-
currentIndex = (currentIndex + 1) % menuItems.length;
|
|
138
|
-
break;
|
|
139
|
-
case this.KEYCODES.HOME:
|
|
140
|
-
currentIndex = 0;
|
|
141
|
-
break;
|
|
142
|
-
case this.KEYCODES.END:
|
|
143
|
-
currentIndex = menuItems.length - 1;
|
|
144
|
-
break;
|
|
145
|
-
case this.KEYCODES.SPACE:
|
|
146
|
-
case this.KEYCODES.ENTER:
|
|
147
|
-
this.toggle(this.host);
|
|
148
|
-
return;
|
|
149
|
-
case this.KEYCODES.TAB:
|
|
150
|
-
this.toggle(this.host);
|
|
151
|
-
break;
|
|
152
|
-
}
|
|
153
|
-
if (menuItems[currentIndex]) {
|
|
154
|
-
menuItems[currentIndex].focus();
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
getSlottedItems() {
|
|
158
|
-
const slot = this.host.shadowRoot.querySelector('slot');
|
|
159
|
-
const slottedElements = slot ? slot.assignedElements() : [];
|
|
160
|
-
const menuItems = slottedElements
|
|
161
|
-
.filter(el => el.tagName === 'POST-MENU-ITEM')
|
|
162
|
-
.map(el => {
|
|
163
|
-
const slot = el.shadowRoot.querySelector('slot');
|
|
164
|
-
const assignedElements = slot ? slot.assignedElements() : [];
|
|
165
|
-
return assignedElements.filter(isFocusable);
|
|
166
|
-
})
|
|
167
|
-
.flat();
|
|
168
|
-
return menuItems;
|
|
169
|
-
}
|
|
170
|
-
render() {
|
|
171
|
-
return (h(Host, { key: 'c3fa319c92cc36b562590df18b6585b1bc18f133', "data-version": version }, h("post-popovercontainer", { key: '7d297b7598fecb01f46c3f1b999b6017ee878d06', placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '3ae32950348ae8910094cddd34afef060ca517f1', class: "popover-container" }, h("slot", { key: '7faa98f2f4c50ef1ac424387a6c3890dcf09adce' })))));
|
|
172
|
-
}
|
|
173
|
-
get host() { return this; }
|
|
174
|
-
static get style() { return PostMenuStyle0; }
|
|
175
|
-
}, [1, "post-menu", {
|
|
176
|
-
"placement": [1],
|
|
177
|
-
"isVisible": [32],
|
|
178
|
-
"toggle": [64],
|
|
179
|
-
"show": [64],
|
|
180
|
-
"hide": [64]
|
|
181
|
-
}]);
|
|
182
|
-
function defineCustomElement$1() {
|
|
183
|
-
if (typeof customElements === "undefined") {
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
const components = ["post-menu", "post-popovercontainer"];
|
|
187
|
-
components.forEach(tagName => { switch (tagName) {
|
|
188
|
-
case "post-menu":
|
|
189
|
-
if (!customElements.get(tagName)) {
|
|
190
|
-
customElements.define(tagName, PostMenu$1);
|
|
191
|
-
}
|
|
192
|
-
break;
|
|
193
|
-
case "post-popovercontainer":
|
|
194
|
-
if (!customElements.get(tagName)) {
|
|
195
|
-
defineCustomElement$2();
|
|
196
|
-
}
|
|
197
|
-
break;
|
|
198
|
-
} });
|
|
199
|
-
}
|
|
1
|
+
import { P as PostMenu$1, d as defineCustomElement$1 } from './post-menu2.js';
|
|
200
2
|
|
|
201
3
|
const PostMenu = PostMenu$1;
|
|
202
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { v as version } from './package
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { v as version } from './package.js';
|
|
3
|
+
import { g as getRoot } from './get-root.js';
|
|
4
|
+
import { d as defineCustomElement$1 } from './post-popovercontainer2.js';
|
|
3
5
|
|
|
4
6
|
const focusableSelector = `:where(${[
|
|
5
7
|
'button',
|
|
@@ -31,9 +33,11 @@ const isFocusable = (element) => {
|
|
|
31
33
|
const postMenuCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}post-popovercontainer{padding:var(--post-menu-padding);background-color:var(--post-menu-bg, #ffffff);border-color:var(--post-menu-bg, #ffffff)}";
|
|
32
34
|
const PostMenuStyle0 = postMenuCss;
|
|
33
35
|
|
|
34
|
-
const PostMenu = class {
|
|
35
|
-
constructor(
|
|
36
|
-
|
|
36
|
+
const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends HTMLElement {
|
|
37
|
+
constructor() {
|
|
38
|
+
super();
|
|
39
|
+
this.__registerHost();
|
|
40
|
+
this.__attachShadow();
|
|
37
41
|
this.toggleMenu = createEvent(this, "toggleMenu", 7);
|
|
38
42
|
this.lastFocusedElement = null;
|
|
39
43
|
this.KEYCODES = {
|
|
@@ -44,7 +48,7 @@ const PostMenu = class {
|
|
|
44
48
|
TAB: 'Tab',
|
|
45
49
|
HOME: 'Home',
|
|
46
50
|
END: 'End',
|
|
47
|
-
ESCAPE: 'Escape'
|
|
51
|
+
ESCAPE: 'Escape',
|
|
48
52
|
};
|
|
49
53
|
this.handleKeyDown = (e) => {
|
|
50
54
|
e.stopPropagation();
|
|
@@ -66,6 +70,7 @@ const PostMenu = class {
|
|
|
66
70
|
this.isVisible = false;
|
|
67
71
|
}
|
|
68
72
|
connectedCallback() {
|
|
73
|
+
this.root = getRoot(this.host);
|
|
69
74
|
this.host.addEventListener('keydown', this.handleKeyDown);
|
|
70
75
|
this.host.addEventListener('click', this.handleClick);
|
|
71
76
|
}
|
|
@@ -93,7 +98,7 @@ const PostMenu = class {
|
|
|
93
98
|
async show(target) {
|
|
94
99
|
if (this.popoverRef) {
|
|
95
100
|
await this.popoverRef.show(target);
|
|
96
|
-
this.lastFocusedElement =
|
|
101
|
+
this.lastFocusedElement = this.root.activeElement; // Use root's activeElement
|
|
97
102
|
const menuItems = this.getSlottedItems();
|
|
98
103
|
if (menuItems.length > 0) {
|
|
99
104
|
menuItems[0].focus();
|
|
@@ -122,7 +127,7 @@ const PostMenu = class {
|
|
|
122
127
|
if (!menuItems.length) {
|
|
123
128
|
return;
|
|
124
129
|
}
|
|
125
|
-
const currentFocusedElement =
|
|
130
|
+
const currentFocusedElement = this.root.activeElement; // Use root's activeElement
|
|
126
131
|
let currentIndex = menuItems.findIndex(el => el === currentFocusedElement);
|
|
127
132
|
switch (e.key) {
|
|
128
133
|
case this.KEYCODES.UP:
|
|
@@ -165,10 +170,34 @@ const PostMenu = class {
|
|
|
165
170
|
return menuItems;
|
|
166
171
|
}
|
|
167
172
|
render() {
|
|
168
|
-
return (h(Host, { key: '
|
|
173
|
+
return (h(Host, { key: '48e04f36dc7a3d8ed81b9570d1a4c931ace3cadd', "data-version": version }, h("post-popovercontainer", { key: '58532143bd7a8be7ea77cbd0a929fa74ee0ee890', placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '967bf8aa936611ac6d533d9a8a1e176ee84b2a73', class: "popover-container", part: "popover-container" }, h("slot", { key: '4eb6b7fe34e8ea1df0d7cd8de31b57452442c3bb' })))));
|
|
169
174
|
}
|
|
170
|
-
get host() { return
|
|
171
|
-
}
|
|
172
|
-
|
|
175
|
+
get host() { return this; }
|
|
176
|
+
static get style() { return PostMenuStyle0; }
|
|
177
|
+
}, [1, "post-menu", {
|
|
178
|
+
"placement": [1],
|
|
179
|
+
"isVisible": [32],
|
|
180
|
+
"toggle": [64],
|
|
181
|
+
"show": [64],
|
|
182
|
+
"hide": [64]
|
|
183
|
+
}]);
|
|
184
|
+
function defineCustomElement() {
|
|
185
|
+
if (typeof customElements === "undefined") {
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
const components = ["post-menu", "post-popovercontainer"];
|
|
189
|
+
components.forEach(tagName => { switch (tagName) {
|
|
190
|
+
case "post-menu":
|
|
191
|
+
if (!customElements.get(tagName)) {
|
|
192
|
+
customElements.define(tagName, PostMenu);
|
|
193
|
+
}
|
|
194
|
+
break;
|
|
195
|
+
case "post-popovercontainer":
|
|
196
|
+
if (!customElements.get(tagName)) {
|
|
197
|
+
defineCustomElement$1();
|
|
198
|
+
}
|
|
199
|
+
break;
|
|
200
|
+
} });
|
|
201
|
+
}
|
|
173
202
|
|
|
174
|
-
export { PostMenu as P };
|
|
203
|
+
export { PostMenu as P, defineCustomElement as d };
|
package/loaders/post-popover.js
CHANGED
|
@@ -96,7 +96,7 @@ const PostPopover$1 = /*@__PURE__*/ proxyCustomElement(class PostPopover extends
|
|
|
96
96
|
this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
|
|
97
97
|
}
|
|
98
98
|
render() {
|
|
99
|
-
return (h(Host, { key: '
|
|
99
|
+
return (h(Host, { key: 'fefbc18d8ca6246199a7843edb3e05b2bc134b52', "data-version": version }, h("post-popovercontainer", { key: 'bf0d5fad73c87674c0f7d5b0a3a84836e8f5126c', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '08aa8cd87c49f87ee72bf98dd6d07dea52bb49c8', class: "popover-container" }, h("div", { key: '7fae463b6633d105ab8e112c3b564256ea574721', class: "popover-content" }, h("slot", { key: '47a529a55502ccf290c1bf7fcebc68502fbac569' })), h("button", { key: 'ede2f23b3435fec596b0e73c285eda6c1a4fa449', class: "btn-close", onClick: () => this.hide() }, h("span", { key: '4df83539eb8f5cd80f0f7548db217e17a8474d8d', class: "visually-hidden" }, this.closeButtonCaption))))));
|
|
100
100
|
}
|
|
101
101
|
get host() { return this; }
|
|
102
102
|
static get style() { return PostPopoverStyle0; }
|
|
@@ -2176,9 +2176,9 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2176
2176
|
}
|
|
2177
2177
|
}
|
|
2178
2178
|
render() {
|
|
2179
|
-
return (h(Host, { key: '
|
|
2179
|
+
return (h(Host, { key: '23e391236e263f7ae7c66c994b2847bcba269b37', "data-version": version }, this.arrow && (h("span", { key: '6c6053b2fd315a5940a2c3493182249782b2492c', class: "arrow", ref: el => {
|
|
2180
2180
|
this.arrowRef = el;
|
|
2181
|
-
} })), h("slot", { key: '
|
|
2181
|
+
} })), h("slot", { key: 'ff998f110f42a22e886eba398285c41d94718bab' })));
|
|
2182
2182
|
}
|
|
2183
2183
|
get host() { return this; }
|
|
2184
2184
|
static get style() { return PostPopovercontainerStyle0; }
|
package/loaders/post-rating.js
CHANGED
|
@@ -74,7 +74,7 @@ const PostRating$1 = /*@__PURE__*/ proxyCustomElement(class PostRating extends H
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
render() {
|
|
77
|
-
return (h(Host, { key: '
|
|
77
|
+
return (h(Host, { key: '4d1fbd0cc858dea3d8eb576e2968198e4569db26', "data-version": version }, h("div", { key: '7a64af9155486be01e2ccbabcb2bc34f4531a323', role: "slider", class: "rating", tabindex: "0", "aria-label": this.label, "aria-valuemin": "0", "aria-valuemax": this.stars, "aria-valuenow": this.currentRating, "aria-valuetext": `${this.currentRating} out of ${this.stars}`, "aria-readonly": this.readonly ? 'true' : 'false', onKeyDown: this.keydownHandler, onBlur: this.blurHandler }, Array.from({ length: this.stars }).map((v, i) => (h("div", { key: `star-${v}`, "aria-hidden": "true", class: {
|
|
78
78
|
'star': true,
|
|
79
79
|
'before-hover': i < this.hoveredIndex,
|
|
80
80
|
'active': i < Math.round(this.currentRating),
|
|
@@ -20,7 +20,7 @@ const PostTabHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostTabHeader ext
|
|
|
20
20
|
this.tabId = `tab-${this.host.id || crypto.randomUUID()}`;
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (h(Host, { key: '
|
|
23
|
+
return (h(Host, { key: '97ce31f2069ea710e4d1f15879f323a0966a072d', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '78a7154fdbf6cb51069c84dc545ae6bb81f66671' })));
|
|
24
24
|
}
|
|
25
25
|
get host() { return this; }
|
|
26
26
|
static get watchers() { return {
|
|
@@ -17,7 +17,7 @@ const PostTabPanel$1 = /*@__PURE__*/ proxyCustomElement(class PostTabPanel exten
|
|
|
17
17
|
this.panelId = `panel-${this.host.id || crypto.randomUUID()}`;
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: '99270e53616a4dce990388b8cd825295fcdcb7d2', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: '049a0e04937e286786a54eb6f6fd5fe909d85cea' })));
|
|
21
21
|
}
|
|
22
22
|
get host() { return this; }
|
|
23
23
|
static get style() { return PostTabPanelStyle0; }
|
package/loaders/post-tabs.js
CHANGED
|
@@ -36,12 +36,13 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
|
|
|
36
36
|
this.activePanel = undefined;
|
|
37
37
|
}
|
|
38
38
|
get tabs() {
|
|
39
|
-
return this.host.querySelectorAll('post-tab-header');
|
|
39
|
+
return Array.from(this.host.querySelectorAll('post-tab-header')).filter(tab => tab.closest('post-tabs') === this.host);
|
|
40
40
|
}
|
|
41
41
|
componentDidLoad() {
|
|
42
|
+
var _a;
|
|
42
43
|
this.moveMisplacedTabs();
|
|
43
44
|
this.enableTabs();
|
|
44
|
-
const initiallyActivePanel = this.activePanel || this.tabs
|
|
45
|
+
const initiallyActivePanel = this.activePanel || ((_a = this.tabs[0]) === null || _a === void 0 ? void 0 : _a.panel);
|
|
45
46
|
void this.show(initiallyActivePanel);
|
|
46
47
|
this.isLoaded = true;
|
|
47
48
|
}
|
|
@@ -86,6 +87,7 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
|
|
|
86
87
|
});
|
|
87
88
|
}
|
|
88
89
|
enableTabs() {
|
|
90
|
+
var _a;
|
|
89
91
|
if (!this.tabs)
|
|
90
92
|
return;
|
|
91
93
|
this.tabs.forEach(async (tab) => {
|
|
@@ -112,7 +114,7 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
|
|
|
112
114
|
});
|
|
113
115
|
// if the currently active tab was removed from the DOM then select the first one
|
|
114
116
|
if (this.activeTab && !this.activeTab.isConnected) {
|
|
115
|
-
void this.show(this.tabs
|
|
117
|
+
void this.show((_a = this.tabs[0]) === null || _a === void 0 ? void 0 : _a.panel);
|
|
116
118
|
}
|
|
117
119
|
}
|
|
118
120
|
activateTab(tab) {
|
|
@@ -164,7 +166,7 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
|
|
|
164
166
|
nextTab.focus();
|
|
165
167
|
}
|
|
166
168
|
render() {
|
|
167
|
-
return (h(Host, { key: '
|
|
169
|
+
return (h(Host, { key: 'ee9628ed2eb47e6e41001f22c7a455da4b0c30bc', "data-version": version }, h("div", { key: 'd4387bfa9efb56d02403ee51aa3a3bce53c044bd', class: "tabs-wrapper", part: "tabs" }, h("div", { key: '020526d64754fb7c61b397894291d19d22a754ed', class: "tabs", role: "tablist" }, h("slot", { key: '875f7ccaf2f980087fbc461c22ed223f00bcb4ba', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: 'c4ecb26258e2cf20394b89c9ae20fd575f13bae6', class: "tab-content", part: "content" }, h("slot", { key: 'd1e60679e580df4a903d021a2985c4299a356d28', onSlotchange: () => this.moveMisplacedTabs() }))));
|
|
168
170
|
}
|
|
169
171
|
get host() { return this; }
|
|
170
172
|
static get style() { return PostTabsStyle0; }
|
package/loaders/post-tag.js
CHANGED
|
@@ -35,7 +35,7 @@ const PostTag$1 = /*@__PURE__*/ proxyCustomElement(class PostTag extends HTMLEle
|
|
|
35
35
|
this.setClasses();
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
|
-
return (h(Host, { key: '
|
|
38
|
+
return (h(Host, { key: '32c08ea43811e47b2560e335b59486c356fa5a9b', "data-version": version }, h("div", { key: 'f04dc3e4c5b14edea0e1fd1cab581c286f3d74ff', class: this.classes }, this.icon ? h("post-icon", { name: this.icon }) : null, h("div", { key: '701e75bb1c31392d8f378339c5a31920cb5d8a7e', class: "tag-text" }, h("slot", { key: '6470a3ba2586bdc9ded20ff686f2c6ca58c47c69' })))));
|
|
39
39
|
}
|
|
40
40
|
get host() { return this; }
|
|
41
41
|
static get watchers() { return {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
|
+
import { c as checkType } from './check-type.js';
|
|
3
4
|
|
|
4
|
-
const postTogglebuttonCss = ":host{cursor:pointer}";
|
|
5
|
+
const postTogglebuttonCss = ":host{cursor:pointer;outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host(:focus-visible){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(:focus-visible){outline-color:Highlight !important}}:host([aria-pressed=true]) ::slotted([data-showwhen=untoggled]){display:none}:host([aria-pressed=false]) ::slotted([data-showwhen=toggled]){display:none}";
|
|
5
6
|
const PostTogglebuttonStyle0 = postTogglebuttonCss;
|
|
6
7
|
|
|
7
8
|
const PostTogglebutton$1 = /*@__PURE__*/ proxyCustomElement(class PostTogglebutton extends HTMLElement {
|
|
@@ -13,18 +14,35 @@ const PostTogglebutton$1 = /*@__PURE__*/ proxyCustomElement(class PostTogglebutt
|
|
|
13
14
|
this.toggled = !this.toggled;
|
|
14
15
|
};
|
|
15
16
|
this.handleKeydown = (event) => {
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
// perform a click when enter or spaced are pressed to mimic the button behavior
|
|
18
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
19
|
+
event.preventDefault(); // prevents the page from scrolling when space is pressed
|
|
20
|
+
this.host.click();
|
|
18
21
|
}
|
|
19
22
|
};
|
|
20
23
|
this.toggled = false;
|
|
21
24
|
}
|
|
25
|
+
validateToggled(value = this.toggled) {
|
|
26
|
+
checkType(value, 'boolean', 'The "toggled" property of the post-togglebutton must be a boolean.');
|
|
27
|
+
}
|
|
28
|
+
componentWillLoad() {
|
|
29
|
+
this.validateToggled();
|
|
30
|
+
// add event listener to not override listener that might be set on the host
|
|
31
|
+
this.host.addEventListener('click', () => this.handleClick());
|
|
32
|
+
this.host.addEventListener('keydown', (e) => this.handleKeydown(e));
|
|
33
|
+
}
|
|
22
34
|
render() {
|
|
23
|
-
return (h(Host, { key: '
|
|
35
|
+
return (h(Host, { key: 'f20b7e5f7cd14c1b0addf12600df27e7e5dab841', slot: "post-togglebutton", "data-version": version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, h("slot", { key: '526540ce9a66fa08f0142e674811fe88e3abcfa6' })));
|
|
24
36
|
}
|
|
37
|
+
get host() { return this; }
|
|
38
|
+
static get watchers() { return {
|
|
39
|
+
"toggled": ["validateToggled"]
|
|
40
|
+
}; }
|
|
25
41
|
static get style() { return PostTogglebuttonStyle0; }
|
|
26
42
|
}, [1, "post-togglebutton", {
|
|
27
|
-
"toggled": [
|
|
43
|
+
"toggled": [1028]
|
|
44
|
+
}, undefined, {
|
|
45
|
+
"toggled": ["validateToggled"]
|
|
28
46
|
}]);
|
|
29
47
|
function defineCustomElement$1() {
|
|
30
48
|
if (typeof customElements === "undefined") {
|
package/loaders/post-tooltip.js
CHANGED
|
@@ -4989,7 +4989,7 @@ const PostTooltip$1 = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends
|
|
|
4989
4989
|
}
|
|
4990
4990
|
render() {
|
|
4991
4991
|
const popoverClass = `${this.arrow ? ' has-arrow' : ''}`;
|
|
4992
|
-
return (h(Host, { key: '
|
|
4992
|
+
return (h(Host, { key: '71db1ccf3cf929d76550b08e69c8594479eaa84f', "data-version": version$1, role: "tooltip", onPointerOver: this.handleInterest, onPointerOut: this.handleInterestLost, onFocusIn: this.handleInterest, onFocusOut: this.handleInterestLost }, h("post-popovercontainer", { key: 'b9a38cabbfc2cf2eb9b257bca32022b5d97aac7c', class: popoverClass, arrow: this.arrow, placement: this.placement, ref: (el) => (this.popoverRef = el) }, h("slot", { key: '316b55f5fc55d9607205496a87f02a0a5fa197cf' }))));
|
|
4993
4993
|
}
|
|
4994
4994
|
get host() { return this; }
|
|
4995
4995
|
static get watchers() { return {
|