@swisspost/design-system-components 9.0.0-next.3 → 9.0.0-next.5
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-type-64af82a9.js +16 -0
- package/dist/cjs/{index-01f30442.js → index-824d2b71.js} +2 -15
- package/dist/cjs/index-e1f32cce.js +18 -10
- package/dist/cjs/index.cjs.js +36 -22
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-ef26e62c.js → package-53892d3d.js} +1 -1
- package/dist/cjs/{post-accordion-3878bf43.js → post-accordion-7f627ffd.js} +1 -1
- package/dist/cjs/{post-accordion-item-0278e6e2.js → post-accordion-item-ceb5399f.js} +3 -3
- package/dist/cjs/post-accordion-item.cjs.entry.js +4 -3
- package/dist/cjs/post-accordion.cjs.entry.js +2 -2
- package/dist/cjs/post-alert-5333a23c.js +99 -0
- package/dist/cjs/post-alert.cjs.entry.js +4 -3
- package/dist/cjs/{post-avatar-2bcfc016.js → post-avatar-a8123d38.js} +1 -1
- package/dist/cjs/post-avatar.cjs.entry.js +2 -2
- package/dist/cjs/post-breadcrumb-item-6e4704e5.js +49 -0
- package/dist/cjs/post-breadcrumb-item.cjs.entry.js +15 -0
- package/dist/cjs/post-card-control-b289ddcf.js +272 -0
- package/dist/cjs/post-card-control.cjs.entry.js +2 -2
- package/dist/cjs/post-closebutton_10.cjs.entry.js +25 -0
- package/dist/cjs/{post-collapsible-trigger-6ae59c64.js → post-collapsible-trigger-e4862a5b.js} +9 -6
- package/dist/cjs/post-collapsible_2.cjs.entry.js +4 -3
- package/dist/cjs/post-components.cjs.js +1 -1
- package/dist/cjs/{post-language-option-4a3ecaeb.js → post-language-option-62414842.js} +5 -4
- package/dist/cjs/post-language-option.cjs.entry.js +4 -3
- package/dist/cjs/{post-popovercontainer-6a25713a.js → post-megadropdown-trigger-da912fed.js} +522 -19
- package/dist/cjs/post-menu-54fa65d3.js +176 -0
- package/dist/cjs/post-menu-item-8c3090b1.js +20 -0
- package/dist/cjs/post-menu-item.cjs.entry.js +11 -0
- package/dist/cjs/post-menu-trigger-71449876.js +73 -0
- package/dist/cjs/post-menu-trigger.cjs.entry.js +12 -0
- package/dist/cjs/post-menu.cjs.entry.js +11 -0
- package/dist/cjs/{post-popover-de1b8d95.js → post-popover-5f639e4f.js} +3 -3
- package/dist/cjs/post-popover.cjs.entry.js +2 -2
- package/dist/cjs/{post-rating-1d2c59b7.js → post-rating-3d166fed.js} +2 -2
- package/dist/cjs/post-rating.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-header-877676bf.js → post-tab-header-03b20f24.js} +2 -2
- package/dist/cjs/post-tab-header.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-panel-80b1f3ee.js → post-tab-panel-e5685f3d.js} +2 -2
- package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/{post-tabs-c2d42035.js → post-tabs-e871c911.js} +3 -3
- package/dist/cjs/post-tabs.cjs.entry.js +2 -2
- package/dist/cjs/{post-tag-5e2c7798.js → post-tag-62f31d0e.js} +2 -2
- package/dist/cjs/post-tag.cjs.entry.js +2 -2
- package/dist/cjs/{post-tooltip-9a120b2e.js → post-tooltip-851c342c.js} +3 -3
- package/dist/cjs/post-tooltip.cjs.entry.js +4 -3
- package/dist/collection/collection-manifest.json +12 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-alert/post-alert.css +3 -3
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -0
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +83 -0
- package/dist/collection/components/post-card-control/post-card-control.css +1 -1
- package/dist/collection/components/post-card-control/post-card-control.js +2 -2
- package/dist/collection/components/post-closebutton/post-closebutton.js +12 -0
- package/dist/collection/components/post-collapsible/post-collapsible.js +5 -3
- package/dist/collection/components/post-header/post-header.css +1 -0
- package/dist/collection/components/post-header/post-header.js +103 -0
- package/dist/collection/components/post-icon/post-icon.js +1 -1
- package/dist/collection/components/post-language-option/post-language-option.js +1 -1
- package/dist/collection/components/post-list/post-list.css +3 -0
- package/dist/collection/components/post-list/post-list.js +87 -0
- package/dist/collection/components/post-list-item/post-list-item.css +1 -0
- package/dist/collection/components/post-list-item/post-list-item.js +25 -0
- package/dist/collection/components/post-logo/post-logo.js +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -0
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +61 -0
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -0
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +137 -0
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -0
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +48 -0
- package/dist/collection/components/post-menu/post-menu.css +3 -0
- package/dist/collection/components/post-menu/post-menu.js +278 -0
- package/dist/collection/components/post-menu-item/post-menu-item.css +1 -0
- package/dist/collection/components/post-menu-item/post-menu-item.js +20 -0
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.css +1 -0
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +103 -0
- package/dist/collection/components/post-popover/post-popover.css +1 -1
- package/dist/collection/components/post-popover/post-popover.js +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +26 -6
- 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.css +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +1 -1
- package/dist/collection/components/post-tag/post-tag.js +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +1 -1
- package/dist/collection/index.js +11 -0
- package/dist/collection/utils/is-focusable.js +26 -0
- package/dist/components/index.js +11 -0
- package/dist/components/index2.js +1 -1
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +1 -1
- package/dist/components/post-alert2.js +1 -1
- package/dist/components/post-breadcrumb-item.d.ts +11 -0
- package/dist/components/post-breadcrumb-item.js +6 -0
- package/dist/components/post-breadcrumb-item2.js +72 -0
- package/dist/components/post-card-control2.js +3 -3
- package/dist/components/post-closebutton.d.ts +11 -0
- package/dist/components/post-closebutton.js +6 -0
- package/dist/components/post-closebutton2.js +34 -0
- package/dist/components/post-collapsible2.js +6 -4
- package/dist/components/post-header.d.ts +11 -0
- package/dist/components/post-header.js +6 -0
- package/dist/components/post-header2.js +235 -0
- package/dist/components/post-icon2.js +2 -2
- package/dist/components/post-language-option2.js +2 -2
- package/dist/components/post-list-item.d.ts +11 -0
- package/dist/components/post-list-item.js +6 -0
- package/dist/components/post-list-item2.js +35 -0
- package/dist/components/post-list.d.ts +11 -0
- package/dist/components/post-list.js +6 -0
- package/dist/components/post-list2.js +53 -0
- package/dist/components/post-logo2.js +2 -2
- package/dist/components/post-mainnavigation.d.ts +11 -0
- package/dist/components/post-mainnavigation.js +6 -0
- package/dist/components/post-mainnavigation2.js +48 -0
- package/dist/components/post-megadropdown-trigger.d.ts +11 -0
- package/dist/components/post-megadropdown-trigger.js +6 -0
- package/dist/components/post-megadropdown-trigger2.js +39 -0
- package/dist/components/post-megadropdown.d.ts +11 -0
- package/dist/components/post-megadropdown.js +6 -0
- package/dist/components/post-megadropdown2.js +67 -0
- package/dist/components/post-menu-item.d.ts +11 -0
- package/dist/components/post-menu-item.js +6 -0
- package/dist/components/post-menu-item2.js +33 -0
- package/dist/components/post-menu-trigger.d.ts +11 -0
- package/dist/components/post-menu-trigger.js +6 -0
- package/dist/components/post-menu-trigger2.js +90 -0
- package/dist/components/post-menu.d.ts +11 -0
- package/dist/components/post-menu.js +6 -0
- package/dist/components/post-menu2.js +201 -0
- package/dist/components/post-popover2.js +2 -2
- package/dist/components/post-popovercontainer2.js +9 -6
- 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 +2 -2
- package/dist/components/post-tag2.js +1 -1
- package/dist/components/post-tooltip2.js +2 -2
- package/dist/docs.json +832 -45
- package/dist/esm/check-type-8828dbe4.js +14 -0
- package/dist/esm/index-e1b64755.js +18 -10
- package/dist/esm/{index-f41b763f.js → index-f8a00dc0.js} +2 -14
- package/dist/esm/index.js +22 -19
- package/dist/esm/loader.js +1 -1
- package/dist/esm/package-d0380f19.js +3 -0
- package/dist/esm/{post-accordion-01d49d83.js → post-accordion-b2762084.js} +1 -1
- package/dist/esm/{post-accordion-item-366f385b.js → post-accordion-item-82ef1c4a.js} +3 -3
- package/dist/esm/post-accordion-item.entry.js +4 -3
- package/dist/esm/post-accordion.entry.js +2 -2
- package/dist/esm/post-alert-0679e14b.js +97 -0
- package/dist/esm/post-alert.entry.js +4 -3
- package/dist/esm/{post-avatar-6f24d1ab.js → post-avatar-e84c49cb.js} +1 -1
- package/dist/esm/post-avatar.entry.js +2 -2
- package/dist/esm/post-breadcrumb-item-ff752018.js +47 -0
- package/dist/esm/post-breadcrumb-item.entry.js +7 -0
- package/dist/esm/post-card-control-53b9ca94.js +270 -0
- package/dist/esm/post-card-control.entry.js +2 -2
- package/dist/esm/post-closebutton_10.entry.js +8 -0
- package/dist/esm/{post-collapsible-trigger-654bf2b0.js → post-collapsible-trigger-34740fa6.js} +8 -5
- package/dist/esm/post-collapsible_2.entry.js +4 -3
- package/dist/esm/post-components.js +1 -1
- package/dist/esm/{post-language-option-0c2818aa.js → post-language-option-e2a76752.js} +4 -3
- package/dist/esm/post-language-option.entry.js +4 -3
- package/dist/esm/{post-popovercontainer-e6d11d81.js → post-megadropdown-trigger-7e577245.js} +515 -21
- package/dist/esm/post-menu-e6337859.js +174 -0
- package/dist/esm/post-menu-item-c10a0a93.js +18 -0
- package/dist/esm/post-menu-item.entry.js +3 -0
- package/dist/esm/post-menu-trigger-5f31ad60.js +71 -0
- package/dist/esm/post-menu-trigger.entry.js +4 -0
- package/dist/esm/post-menu.entry.js +3 -0
- package/dist/esm/{post-popover-7d44a85c.js → post-popover-d78547b4.js} +3 -3
- package/dist/esm/post-popover.entry.js +2 -2
- package/dist/esm/{post-rating-3cd3e97b.js → post-rating-d04d0349.js} +2 -2
- package/dist/esm/post-rating.entry.js +2 -2
- package/dist/esm/{post-tab-header-776a991a.js → post-tab-header-6efc530f.js} +2 -2
- package/dist/esm/post-tab-header.entry.js +2 -2
- package/dist/esm/{post-tab-panel-163e6c99.js → post-tab-panel-d9ecc10e.js} +2 -2
- package/dist/esm/post-tab-panel.entry.js +2 -2
- package/dist/esm/{post-tabs-8cb1bce9.js → post-tabs-e98a47e8.js} +3 -3
- package/dist/esm/post-tabs.entry.js +2 -2
- package/dist/esm/{post-tag-deefcc86.js → post-tag-40a65871.js} +2 -2
- package/dist/esm/post-tag.entry.js +2 -2
- package/dist/esm/{post-tooltip-dc7e1a21.js → post-tooltip-3b1e121c.js} +3 -3
- package/dist/esm/post-tooltip.entry.js +4 -3
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-029c91d8.entry.js +1 -0
- package/dist/post-components/p-0338f9da.js +1 -0
- package/dist/post-components/p-03c850fa.entry.js +1 -0
- package/dist/post-components/p-1d8a41d3.js +1 -0
- package/dist/post-components/p-2069e764.js +1 -0
- package/dist/post-components/p-3705d2b4.js +1 -0
- package/dist/post-components/p-3aaea2a7.js +1 -0
- package/dist/post-components/p-3b4342e4.entry.js +1 -0
- package/dist/post-components/p-3b5bd4a4.entry.js +1 -0
- package/dist/post-components/p-3f785d16.entry.js +1 -0
- package/dist/post-components/p-40a57111.entry.js +1 -0
- package/dist/post-components/p-41f5f626.entry.js +1 -0
- package/dist/post-components/p-42c628fd.js +1 -0
- package/dist/post-components/p-43451d07.js +1 -0
- package/dist/post-components/{p-16d057a6.js → p-49a42850.js} +1 -1
- package/dist/post-components/p-4a3f67ab.js +1 -0
- package/dist/post-components/p-4f1a40dd.entry.js +1 -0
- package/dist/post-components/p-6e7bde44.js +1 -0
- package/dist/post-components/{p-d785856c.js → p-70c016ab.js} +1 -1
- package/dist/post-components/{p-3d3795f9.js → p-75514d7d.js} +1 -1
- package/dist/post-components/p-76dbca34.entry.js +1 -0
- package/dist/post-components/{p-b38eaabf.js → p-77a757d4.js} +1 -1
- package/dist/post-components/p-77af2367.entry.js +1 -0
- package/dist/post-components/{p-60e72b25.js → p-7a20605b.js} +1 -1
- package/dist/post-components/{p-8734876e.js → p-879ae242.js} +1 -1
- package/dist/post-components/p-976c2742.js +1 -0
- package/dist/post-components/p-9cda2b0d.entry.js +1 -0
- package/dist/post-components/p-9fab4d3c.js +1 -0
- package/dist/post-components/p-a0226aec.js +1 -0
- package/dist/post-components/p-aa890e24.entry.js +1 -0
- package/dist/post-components/p-ac6d9496.js +1 -0
- package/dist/post-components/p-ad6e41d5.entry.js +1 -0
- package/dist/post-components/p-af8cfb8e.js +1 -0
- package/dist/post-components/p-c95813b2.entry.js +1 -0
- package/dist/post-components/p-d3814644.entry.js +1 -0
- package/dist/post-components/p-d5b02b44.entry.js +1 -0
- package/dist/post-components/{p-0ad93d89.js → p-e0dc4fac.js} +2 -2
- package/dist/post-components/p-f404d0bb.entry.js +1 -0
- package/dist/post-components/p-f5b933bc.entry.js +1 -0
- package/dist/post-components/p-fbda2556.entry.js +1 -0
- package/dist/post-components/{p-9ac2a947.js → p-fc2c7222.js} +1 -1
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-breadcrumb-item/post-breadcrumb-item.d.ts +15 -0
- package/dist/types/components/post-closebutton/post-closebutton.d.ts +7 -0
- package/dist/types/components/post-header/post-header.d.ts +16 -0
- package/dist/types/components/post-list/post-list.d.ts +24 -0
- package/dist/types/components/post-list-item/post-list-item.d.ts +8 -0
- package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +10 -0
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +23 -0
- package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +10 -0
- package/dist/types/components/post-menu/post-menu.d.ts +47 -0
- package/dist/types/components/post-menu-item/post-menu-item.d.ts +4 -0
- package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +26 -0
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +4 -0
- package/dist/types/components.d.ts +279 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/utils/is-focusable.d.ts +1 -0
- package/loaders/index.d.ts +22 -0
- package/loaders/index.js +12 -1
- package/loaders/package.js +1 -1
- package/loaders/post-accordion-item.js +1 -1
- package/loaders/post-alert.js +1 -1
- package/loaders/post-breadcrumb-item.d.ts +11 -0
- package/loaders/post-breadcrumb-item.js +75 -0
- package/loaders/post-card-control.js +3 -3
- package/loaders/post-closebutton.d.ts +11 -0
- package/loaders/post-closebutton.js +37 -0
- package/loaders/post-collapsible2.js +5 -3
- package/loaders/post-header.d.ts +11 -0
- package/loaders/post-header.js +238 -0
- package/loaders/post-icon2.js +1 -1
- package/loaders/post-language-option.js +1 -1
- package/loaders/post-list-item.d.ts +11 -0
- package/loaders/post-list-item.js +38 -0
- package/loaders/post-list.d.ts +11 -0
- package/loaders/post-list.js +56 -0
- package/loaders/post-logo.js +1 -1
- package/loaders/post-mainnavigation.d.ts +11 -0
- package/loaders/post-mainnavigation.js +51 -0
- package/loaders/post-megadropdown-trigger.d.ts +11 -0
- package/loaders/post-megadropdown-trigger.js +42 -0
- package/loaders/post-megadropdown.d.ts +11 -0
- package/loaders/post-megadropdown.js +70 -0
- package/loaders/post-menu-item.d.ts +11 -0
- package/loaders/post-menu-item.js +36 -0
- package/loaders/post-menu-trigger.d.ts +11 -0
- package/loaders/post-menu-trigger.js +93 -0
- package/loaders/post-menu.d.ts +11 -0
- package/loaders/post-menu.js +204 -0
- package/loaders/post-popover.js +2 -2
- package/loaders/post-popovercontainer2.js +9 -6
- 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 +2 -2
- package/loaders/post-tag.js +1 -1
- package/loaders/post-tooltip.js +1 -1
- package/package.json +3 -2
- package/dist/cjs/post-alert-5f795d9c.js +0 -98
- package/dist/cjs/post-card-control-5ffcd201.js +0 -272
- package/dist/cjs/post-icon-1f71aa0f.js +0 -104
- package/dist/cjs/post-icon.cjs.entry.js +0 -15
- package/dist/cjs/post-logo-7070d727.js +0 -39
- package/dist/cjs/post-logo.cjs.entry.js +0 -14
- package/dist/cjs/post-popovercontainer.cjs.entry.js +0 -11
- package/dist/esm/package-0311770e.js +0 -3
- package/dist/esm/post-alert-5a69f40d.js +0 -96
- package/dist/esm/post-card-control-2a7939c3.js +0 -270
- package/dist/esm/post-icon-885f17e9.js +0 -102
- package/dist/esm/post-icon.entry.js +0 -7
- package/dist/esm/post-logo-dd425f2e.js +0 -37
- package/dist/esm/post-logo.entry.js +0 -6
- package/dist/esm/post-popovercontainer.entry.js +0 -3
- package/dist/post-components/p-048538ea.js +0 -1
- package/dist/post-components/p-0a1f5e13.entry.js +0 -1
- package/dist/post-components/p-0a4318ff.js +0 -1
- package/dist/post-components/p-0d64ef0c.entry.js +0 -1
- package/dist/post-components/p-1198a5f2.entry.js +0 -1
- package/dist/post-components/p-13d1bef7.entry.js +0 -1
- package/dist/post-components/p-1a091fca.entry.js +0 -1
- package/dist/post-components/p-1f35b0ba.entry.js +0 -1
- package/dist/post-components/p-246a6d28.js +0 -1
- package/dist/post-components/p-3aa5e1e5.js +0 -1
- package/dist/post-components/p-3fabf6e4.entry.js +0 -1
- package/dist/post-components/p-4f0617e6.js +0 -1
- package/dist/post-components/p-53bacbbc.js +0 -1
- package/dist/post-components/p-5c8cb76f.entry.js +0 -1
- package/dist/post-components/p-5eee8d31.entry.js +0 -1
- package/dist/post-components/p-66ed33a9.js +0 -1
- package/dist/post-components/p-681b751d.entry.js +0 -1
- package/dist/post-components/p-6b6a1e82.entry.js +0 -1
- package/dist/post-components/p-752e6a98.entry.js +0 -1
- package/dist/post-components/p-9d211a45.js +0 -1
- package/dist/post-components/p-cdfcc758.entry.js +0 -1
- package/dist/post-components/p-d50d4ec1.entry.js +0 -1
- package/dist/post-components/p-deb4131c.js +0 -1
- package/dist/post-components/p-e18f3639.js +0 -1
- package/dist/post-components/p-f1b7797f.entry.js +0 -1
- package/dist/post-components/p-f6efc76b.entry.js +0 -1
- package/dist/post-components/p-f825d681.js +0 -1
- package/dist/post-components/p-fff1c2ee.entry.js +0 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$1 } from './post-popovercontainer2.js';
|
|
3
|
+
|
|
4
|
+
const postMegadropdownCss = "*,::before,::after{box-sizing:border-box}post-popovercontainer{background-color:#fafafa;width:100%;border-bottom:1px solid #000}@media screen and (max-width: 1023.99px){post-popovercontainer{position:absolute;top:var(--header-height) !important;bottom:0;left:0;width:100%;height:auto}}.megadropdown{display:flex;gap:1rem;padding:1.5rem;border-radius:0 0 3px 3px}@media screen and (max-width: 1023.99px){.megadropdown{flex-direction:column}}.megadropdown post-list{display:flex;flex-direction:column;gap:.5rem}.megadropdown post-list-item{border-bottom:1px solid gray}.megadropdown post-list-item>a{padding-block:.25rem;display:block;text-decoration:none}.back-button{display:none}@media screen and (max-width: 1023.99px){.back-button{display:block}}post-closebutton{margin-left:auto}@media screen and (max-width: 1023.99px){post-closebutton{display:none}}h3{font-size:20px}";
|
|
5
|
+
const PostMegadropdownStyle0 = postMegadropdownCss;
|
|
6
|
+
|
|
7
|
+
const PostMegadropdown = /*@__PURE__*/ proxyCustomElement(class PostMegadropdown extends HTMLElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Show megadropdown
|
|
14
|
+
* @param element HTMLElement
|
|
15
|
+
* @returns boolean
|
|
16
|
+
*/
|
|
17
|
+
async show(element) {
|
|
18
|
+
return this.popoverRef.show(element);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Hide megadropdown
|
|
22
|
+
* @returns boolean
|
|
23
|
+
*/
|
|
24
|
+
async hide() {
|
|
25
|
+
return this.popoverRef.hide();
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Toggle megadropdown
|
|
29
|
+
* @param element HTMLElement
|
|
30
|
+
* @param force boolean
|
|
31
|
+
* @returns boolean
|
|
32
|
+
*/
|
|
33
|
+
async toggle(element, force) {
|
|
34
|
+
return this.popoverRef.toggle(element, force !== null && force !== void 0 ? force : undefined);
|
|
35
|
+
}
|
|
36
|
+
handleBackButtonClick() {
|
|
37
|
+
this.hide();
|
|
38
|
+
}
|
|
39
|
+
render() {
|
|
40
|
+
return (h(Host, { key: '6b30399852561a911c04a79c7c785bb5cf8e68ff', slot: "post-mainnavigation" }, h("post-popovercontainer", { key: 'caa196c59c0177948a73c43033f7399344068d77', placement: "bottom", "edge-gap": "0", ref: el => (this.popoverRef = el) }, h("div", { key: '7c88bd1ca7fac00b9ab0cb1d73252c6990484fb2', class: "megadropdown" }, h("div", { key: '25073177e9c9a05fca93b3b0abbed18f6b2a075b', onClick: () => this.handleBackButtonClick(), class: "back-button" }, h("slot", { key: '06a153e974f60476f2796e03afea3ad86c7560ca', name: "back-button" })), h("slot", { key: 'ea95044efbd609894dd96b3aa8662756e14711af' })))));
|
|
41
|
+
}
|
|
42
|
+
static get style() { return PostMegadropdownStyle0; }
|
|
43
|
+
}, [4, "post-megadropdown", {
|
|
44
|
+
"show": [64],
|
|
45
|
+
"hide": [64],
|
|
46
|
+
"toggle": [64]
|
|
47
|
+
}]);
|
|
48
|
+
function defineCustomElement() {
|
|
49
|
+
if (typeof customElements === "undefined") {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const components = ["post-megadropdown", "post-popovercontainer"];
|
|
53
|
+
components.forEach(tagName => { switch (tagName) {
|
|
54
|
+
case "post-megadropdown":
|
|
55
|
+
if (!customElements.get(tagName)) {
|
|
56
|
+
customElements.define(tagName, PostMegadropdown);
|
|
57
|
+
}
|
|
58
|
+
break;
|
|
59
|
+
case "post-popovercontainer":
|
|
60
|
+
if (!customElements.get(tagName)) {
|
|
61
|
+
defineCustomElement$1();
|
|
62
|
+
}
|
|
63
|
+
break;
|
|
64
|
+
} });
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { PostMegadropdown as P, defineCustomElement as d };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface PostMenuItem extends Components.PostMenuItem, HTMLElement {}
|
|
4
|
+
export const PostMenuItem: {
|
|
5
|
+
prototype: PostMenuItem;
|
|
6
|
+
new (): PostMenuItem;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { v as version } from './package.js';
|
|
3
|
+
|
|
4
|
+
const postMenuItemCss = ":host{display:block}";
|
|
5
|
+
const PostMenuItemStyle0 = postMenuItemCss;
|
|
6
|
+
|
|
7
|
+
const PostMenuItem = /*@__PURE__*/ proxyCustomElement(class PostMenuItem extends HTMLElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
this.__attachShadow();
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return (h(Host, { key: '7984d6be0ae981f54618b4c0d7a80bfcc71f16a3', role: "menuitem", "data-version": version }, h("slot", { key: '7fbb20f1586676b1c8f933e0f067144bbcca825f' })));
|
|
15
|
+
}
|
|
16
|
+
get host() { return this; }
|
|
17
|
+
static get style() { return PostMenuItemStyle0; }
|
|
18
|
+
}, [1, "post-menu-item"]);
|
|
19
|
+
function defineCustomElement() {
|
|
20
|
+
if (typeof customElements === "undefined") {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const components = ["post-menu-item"];
|
|
24
|
+
components.forEach(tagName => { switch (tagName) {
|
|
25
|
+
case "post-menu-item":
|
|
26
|
+
if (!customElements.get(tagName)) {
|
|
27
|
+
customElements.define(tagName, PostMenuItem);
|
|
28
|
+
}
|
|
29
|
+
break;
|
|
30
|
+
} });
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { PostMenuItem as P, defineCustomElement as d };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface PostMenuTrigger extends Components.PostMenuTrigger, HTMLElement {}
|
|
4
|
+
export const PostMenuTrigger: {
|
|
5
|
+
prototype: PostMenuTrigger;
|
|
6
|
+
new (): PostMenuTrigger;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
|
|
5
|
+
const postMenuTriggerCss = ":host{display:inline-block}";
|
|
6
|
+
const PostMenuTriggerStyle0 = postMenuTriggerCss;
|
|
7
|
+
|
|
8
|
+
const PostMenuTrigger = /*@__PURE__*/ proxyCustomElement(class PostMenuTrigger extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
/**
|
|
13
|
+
* Reference to the slotted button within the trigger, if present.
|
|
14
|
+
* Used to manage click and key events for menu control.
|
|
15
|
+
*/
|
|
16
|
+
this.slottedButton = null;
|
|
17
|
+
this.handleKeyDown = (e) => {
|
|
18
|
+
if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
|
|
19
|
+
e.preventDefault();
|
|
20
|
+
this.handleToggle();
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
this.for = undefined;
|
|
24
|
+
this.ariaExpanded = false;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Watch for changes to the `for` property to validate its type and ensure it is a string.
|
|
28
|
+
* @param forValue - The new value of the `for` property.
|
|
29
|
+
*/
|
|
30
|
+
validateControlFor(forValue = this.for) {
|
|
31
|
+
checkType(forValue, 'string', 'The "for" property is required and should be a string.');
|
|
32
|
+
}
|
|
33
|
+
get menu() {
|
|
34
|
+
const ref = document.getElementById(this.for);
|
|
35
|
+
return ref && ref.localName === 'post-menu' ? ref : null;
|
|
36
|
+
}
|
|
37
|
+
handleToggle() {
|
|
38
|
+
const menu = this.menu;
|
|
39
|
+
if (menu && this.slottedButton) {
|
|
40
|
+
this.ariaExpanded = !this.ariaExpanded;
|
|
41
|
+
this.slottedButton.setAttribute('aria-expanded', this.ariaExpanded.toString());
|
|
42
|
+
menu.toggle(this.host);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
console.warn(`No post-menu found with ID: ${this.for}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
componentDidLoad() {
|
|
49
|
+
this.validateControlFor();
|
|
50
|
+
this.slottedButton = this.host.querySelector('button');
|
|
51
|
+
if (this.slottedButton) {
|
|
52
|
+
this.slottedButton.setAttribute('aria-haspopup', 'menu');
|
|
53
|
+
this.slottedButton.addEventListener('click', () => {
|
|
54
|
+
this.handleToggle();
|
|
55
|
+
});
|
|
56
|
+
this.slottedButton.addEventListener('keydown', this.handleKeyDown);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
console.warn('No button found within post-menu-trigger');
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
render() {
|
|
63
|
+
return (h(Host, { key: 'ce2a30260fae6eecae5b2feb0538ac2ce66b989c', "data-version": version, "tab-index": "-1" }, h("slot", { key: 'a69d7dc4a1a798332bd9881cedb216ef82d279ab' })));
|
|
64
|
+
}
|
|
65
|
+
get host() { return this; }
|
|
66
|
+
static get watchers() { return {
|
|
67
|
+
"for": ["validateControlFor"]
|
|
68
|
+
}; }
|
|
69
|
+
static get style() { return PostMenuTriggerStyle0; }
|
|
70
|
+
}, [4, "post-menu-trigger", {
|
|
71
|
+
"for": [1],
|
|
72
|
+
"ariaExpanded": [32]
|
|
73
|
+
}, undefined, {
|
|
74
|
+
"for": ["validateControlFor"]
|
|
75
|
+
}]);
|
|
76
|
+
function defineCustomElement() {
|
|
77
|
+
if (typeof customElements === "undefined") {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const components = ["post-menu-trigger"];
|
|
81
|
+
components.forEach(tagName => { switch (tagName) {
|
|
82
|
+
case "post-menu-trigger":
|
|
83
|
+
if (!customElements.get(tagName)) {
|
|
84
|
+
customElements.define(tagName, PostMenuTrigger);
|
|
85
|
+
}
|
|
86
|
+
break;
|
|
87
|
+
} });
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export { PostMenuTrigger as P, defineCustomElement as d };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface PostMenu extends Components.PostMenu, HTMLElement {}
|
|
4
|
+
export const PostMenu: {
|
|
5
|
+
prototype: PostMenu;
|
|
6
|
+
new (): PostMenu;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { v as version } from './package.js';
|
|
3
|
+
import { d as defineCustomElement$1 } 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 = /*@__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: '4447ff6878a1b0f38b533196466b33217f9499d4', "data-version": version }, h("post-popovercontainer", { key: '918e2b8a662cdb64972cb0729b8b077e1bca5e0a', placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '40b04b6c0d65cc3c10f6b8b037ec3ff24d1b907b', class: "popover-container" }, h("slot", { key: 'e836fdb9e29961f3b6c6c13261e8eef0f874cfb6' })))));
|
|
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() {
|
|
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);
|
|
191
|
+
}
|
|
192
|
+
break;
|
|
193
|
+
case "post-popovercontainer":
|
|
194
|
+
if (!customElements.get(tagName)) {
|
|
195
|
+
defineCustomElement$1();
|
|
196
|
+
}
|
|
197
|
+
break;
|
|
198
|
+
} });
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export { PostMenu as P, defineCustomElement as d };
|
|
@@ -3,7 +3,7 @@ import { v as version } from './package.js';
|
|
|
3
3
|
import { g as getAttributeObserver } from './attribute-observer.js';
|
|
4
4
|
import { d as defineCustomElement$1 } from './post-popovercontainer2.js';
|
|
5
5
|
|
|
6
|
-
const postPopoverCss = "/*!\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;appearance:button;border-radius:
|
|
6
|
+
const postPopoverCss = "/*!\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;appearance:button;border-radius:var(--post-device-border-radius-round);color:var(--post-gray-80);transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close{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}.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.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%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/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%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/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;content:\"\";display:block;height:1.5rem;width:1.5rem}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .btn-close{color:var(--post-contrast-color)}.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:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:Highlight}}.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;min-width:160px;max-width:280px}@media (max-width: 599.98px){.popover-container{max-width:100%}}.popover-content{padding:.5em;flex-grow:1}.btn-close{color:inherit}";
|
|
7
7
|
const PostPopoverStyle0 = postPopoverCss;
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -96,7 +96,7 @@ const PostPopover = /*@__PURE__*/ proxyCustomElement(class PostPopover extends H
|
|
|
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: '22964a2be347979d1ebaaec468edfd4b079776ff', "data-version": version }, h("post-popovercontainer", { key: 'a108ed03721a453ce73a850913d93b8bfaf83922', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '943f1a914ada58c3f8b085613b47ed4b7c55e591', class: "popover-container" }, h("div", { key: 'a6a8dec53c9190c48d1b3b217c979d78b2f32995', class: "popover-content" }, h("slot", { key: '555bc4537d6bd62b60186db9700588eb3ec38ac2' })), h("button", { key: 'db0826565312bba9bc48a88cd84636a903eeb94f', class: "btn-close", onClick: () => this.hide() }, h("span", { key: 'aef92ba6e586e02924a09d459e4d753ad18f72f7', class: "visually-hidden" }, this.closeButtonCaption))))));
|
|
100
100
|
}
|
|
101
101
|
get host() { return this; }
|
|
102
102
|
static get style() { return PostPopoverStyle0; }
|
|
@@ -2054,6 +2054,7 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2054
2054
|
this.__registerHost();
|
|
2055
2055
|
this.postToggle = createEvent(this, "postToggle", 7);
|
|
2056
2056
|
this.placement = 'top';
|
|
2057
|
+
this.edgeGap = 8;
|
|
2057
2058
|
this.arrow = false;
|
|
2058
2059
|
}
|
|
2059
2060
|
componentDidLoad() {
|
|
@@ -2125,11 +2126,12 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2125
2126
|
this.clearAutoUpdate = autoUpdate(this.eventTarget, this.host, this.calculatePosition.bind(this));
|
|
2126
2127
|
}
|
|
2127
2128
|
async calculatePosition() {
|
|
2129
|
+
const gap = this.edgeGap;
|
|
2128
2130
|
const middleware = [
|
|
2129
2131
|
flip(),
|
|
2130
2132
|
inline(),
|
|
2131
2133
|
shift({
|
|
2132
|
-
padding:
|
|
2134
|
+
padding: gap,
|
|
2133
2135
|
// Prevents shifting away from the anchor too far, while shifting as far as possible
|
|
2134
2136
|
// https://floating-ui.com/docs/shift#limiter
|
|
2135
2137
|
limiter: limitShift({
|
|
@@ -2139,14 +2141,14 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2139
2141
|
size({
|
|
2140
2142
|
apply({ availableWidth, elements }) {
|
|
2141
2143
|
Object.assign(elements.floating.style, {
|
|
2142
|
-
maxWidth: `${availableWidth -
|
|
2144
|
+
maxWidth: `${availableWidth - gap * 2}px`,
|
|
2143
2145
|
});
|
|
2144
2146
|
},
|
|
2145
2147
|
}),
|
|
2146
|
-
offset(this.arrow ?
|
|
2148
|
+
offset(this.arrow ? gap + 4 : gap), // 4px outside of element to account for focus outline + ~arrow size
|
|
2147
2149
|
];
|
|
2148
2150
|
if (this.arrow) {
|
|
2149
|
-
middleware.push(arrow({ element: this.arrowRef, padding:
|
|
2151
|
+
middleware.push(arrow({ element: this.arrowRef, padding: gap }));
|
|
2150
2152
|
}
|
|
2151
2153
|
const { x, y, middlewareData, placement: currentPlacement, } = await computePosition(this.eventTarget, this.host, {
|
|
2152
2154
|
placement: this.placement || 'top',
|
|
@@ -2174,14 +2176,15 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2174
2176
|
}
|
|
2175
2177
|
}
|
|
2176
2178
|
render() {
|
|
2177
|
-
return (h(Host, { key: '
|
|
2179
|
+
return (h(Host, { key: '97a63bfbf098bd3463eb75678e54ddcc9e4790b3', "data-version": version }, this.arrow && (h("span", { key: 'f6eaa7bd6cd3eb63d15e7d91825365661daae7dd', class: "arrow", ref: el => {
|
|
2178
2180
|
this.arrowRef = el;
|
|
2179
|
-
} })), h("slot", { key: '
|
|
2181
|
+
} })), h("slot", { key: '414055000891719b74c2c449fec2c87a60b62047' })));
|
|
2180
2182
|
}
|
|
2181
2183
|
get host() { return this; }
|
|
2182
2184
|
static get style() { return PostPopovercontainerStyle0; }
|
|
2183
2185
|
}, [4, "post-popovercontainer", {
|
|
2184
2186
|
"placement": [1],
|
|
2187
|
+
"edgeGap": [2, "edge-gap"],
|
|
2185
2188
|
"arrow": [4],
|
|
2186
2189
|
"show": [64],
|
|
2187
2190
|
"hide": [64],
|
|
@@ -74,7 +74,7 @@ const PostRating = /*@__PURE__*/ proxyCustomElement(class PostRating extends HTM
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
render() {
|
|
77
|
-
return (h(Host, { key: '
|
|
77
|
+
return (h(Host, { key: '0202a629d68bc85d00fb3ccae63073938fb174d3', "data-version": version }, h("div", { key: '7de2c78d498957dbd988472729fde2ea04162490', 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 = /*@__PURE__*/ proxyCustomElement(class PostTabHeader exten
|
|
|
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: 'f105dabe8a61308d5aa361a6aeaad2f938cf7656', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '3abc0c8fab0a0ab1dd538e20831980b4672ae79a' })));
|
|
24
24
|
}
|
|
25
25
|
get host() { return this; }
|
|
26
26
|
static get watchers() { return {
|
|
@@ -17,7 +17,7 @@ const PostTabPanel = /*@__PURE__*/ proxyCustomElement(class PostTabPanel extends
|
|
|
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: '9018d11d85d1ce0b83e74987f8fb96eb1b873a40', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: '45e2214fbeb5d4c2b4e5e35eb5ad74d99033a0a3' })));
|
|
21
21
|
}
|
|
22
22
|
get host() { return this; }
|
|
23
23
|
static get style() { return PostTabPanelStyle0; }
|
|
@@ -23,7 +23,7 @@ const customOnReady = (callback) => {
|
|
|
23
23
|
return setTimeout(callback);
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
const postTabsCss = ".tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:rgba(var(--post-contrast-color-rgb), 0.02)}.tabs-wrapper::after{content:\"\";position:absolute;bottom:0;width:100%;height:1px;background-color:#ccc}.tabs-wrapper .tabs{background-color:rgba(0,0,0,0) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tabs-wrapper::after{background-color:ButtonBorder}}.tabs{margin:0;padding:0;list-style:none;display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;white-space:nowrap}.tabs::after{content:\"\";display:block;flex:1 0 auto;width:1rem}.tab-content{padding-top:1rem}.bg-yellow .tabs-wrapper{background-color:#fc0}.bg-white .tabs-wrapper{background-color:#fff}.bg-light .tabs-wrapper{background-color:#faf9f8}.bg-gray .tabs-wrapper{background-color:#f4f3f1}.bg-dark .tabs-wrapper{background-color:#333}.bg-black .tabs-wrapper{background-color:#000}.bg-primary .tabs-wrapper{background-color:#333}.bg-secondary .tabs-wrapper{background-color:#666}.bg-success .tabs-wrapper{background-color:#2c871d}.bg-warning .tabs-wrapper{background-color:#f49e00}.bg-error .tabs-wrapper{background-color:#a51728}.bg-info .tabs-wrapper{background-color:#cce4ee}.bg-success-background .tabs-wrapper{background-color:#c0debb}.bg-warning-background .tabs-wrapper{background-color:#fce2b2}.bg-error-background .tabs-wrapper{background-color:#ffdade}:host{display:block}";
|
|
26
|
+
const postTabsCss = ".tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:rgba(var(--post-contrast-color-rgb), 0.02)}.tabs-wrapper::after{content:\"\";position:absolute;bottom:0;width:100%;height:1px;background-color:#ccc}.tabs-wrapper .tabs{background-color:rgba(0,0,0,0) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tabs-wrapper::after{background-color:ButtonBorder}}.tabs{margin:0;padding:0;list-style:none;display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;white-space:nowrap}.tabs.list-bullet>li{margin:0;padding:0}.tabs.list-bullet>li::before{display:none}.tabs::after{content:\"\";display:block;flex:1 0 auto;width:1rem}.tab-content{padding-top:1rem}.bg-yellow .tabs-wrapper{background-color:#fc0}.bg-white .tabs-wrapper{background-color:#fff}.bg-light .tabs-wrapper{background-color:#faf9f8}.bg-gray .tabs-wrapper{background-color:#f4f3f1}.bg-dark .tabs-wrapper{background-color:#333}.bg-black .tabs-wrapper{background-color:#000}.bg-primary .tabs-wrapper{background-color:#333}.bg-secondary .tabs-wrapper{background-color:#666}.bg-success .tabs-wrapper{background-color:#2c871d}.bg-warning .tabs-wrapper{background-color:#f49e00}.bg-error .tabs-wrapper{background-color:#a51728}.bg-info .tabs-wrapper{background-color:#cce4ee}.bg-success-background .tabs-wrapper{background-color:#c0debb}.bg-warning-background .tabs-wrapper{background-color:#fce2b2}.bg-error-background .tabs-wrapper{background-color:#ffdade}:host{display:block}";
|
|
27
27
|
const PostTabsStyle0 = postTabsCss;
|
|
28
28
|
|
|
29
29
|
const PostTabs = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLElement {
|
|
@@ -164,7 +164,7 @@ const PostTabs = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLEle
|
|
|
164
164
|
nextTab.focus();
|
|
165
165
|
}
|
|
166
166
|
render() {
|
|
167
|
-
return (h(Host, { key: '
|
|
167
|
+
return (h(Host, { key: '3c9d7351fa09531238892f0bd05447379f46fdb4', "data-version": version }, h("div", { key: '1eff106f6324302155e809a58cd3367bb7bdbd76', class: "tabs-wrapper", part: "tabs" }, h("div", { key: 'fc5917d92b577f99fb19fa80ecd1a863ffeaa4d8', class: "tabs", role: "tablist" }, h("slot", { key: 'af35884271ca9d75dbbd113e05fd052c4691c53e', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: '4908774e2306e432af65b94a9dd5e1d257569652', class: "tab-content", part: "content" }, h("slot", { key: 'c0eb44e39b0cffe57c42c51dd74e605e74241f70', onSlotchange: () => this.moveMisplacedTabs() }))));
|
|
168
168
|
}
|
|
169
169
|
get host() { return this; }
|
|
170
170
|
static get style() { return PostTabsStyle0; }
|
|
@@ -35,7 +35,7 @@ const PostTag = /*@__PURE__*/ proxyCustomElement(class PostTag extends HTMLEleme
|
|
|
35
35
|
this.setClasses();
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
|
-
return (h(Host, { key: '
|
|
38
|
+
return (h(Host, { key: '01f369b7c6803f710fb0b5eae652d6d1beb340ed', "data-version": version }, h("div", { key: 'bba40e4deaa43e64c9bc32c2ad4a3e3515bdf8dd', class: this.classes }, this.icon ? h("post-icon", { name: this.icon }) : null, h("div", { key: '9addb054f9555c9a97d8825a148958b2e2b863a7', class: "tag-text" }, h("slot", { key: '315cf79690fa489c61edd6ce6b304b94a3866b8c' })))));
|
|
39
39
|
}
|
|
40
40
|
get host() { return this; }
|
|
41
41
|
static get watchers() { return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement as HTMLElement$1, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { v as version$1 } from './package.js';
|
|
3
3
|
import { g as getAttributeObserver } from './attribute-observer.js';
|
|
4
|
-
import {
|
|
4
|
+
import { d as checkEmptyOrType } from './index2.js';
|
|
5
5
|
import { d as defineCustomElement$1 } from './post-popovercontainer2.js';
|
|
6
6
|
|
|
7
7
|
function timeout(delay) {
|
|
@@ -4977,7 +4977,7 @@ const PostTooltip = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends H
|
|
|
4977
4977
|
}
|
|
4978
4978
|
render() {
|
|
4979
4979
|
const popoverClass = `${this.arrow ? ' has-arrow' : ''}`;
|
|
4980
|
-
return (h(Host, { key: '
|
|
4980
|
+
return (h(Host, { key: '8e2bd1f11a44a0d39ad797f12b880338d59ea006', "data-version": version$1, role: "tooltip", onPointerOver: this.handleInterest, onPointerOut: this.handleInterestLost, onFocusIn: this.handleInterest, onFocusOut: this.handleInterestLost }, h("post-popovercontainer", { key: 'ff4fdbf72ca4b95d5f4e925fedbfbcf7e281410f', class: popoverClass, arrow: this.arrow, placement: this.placement, ref: (el) => (this.popoverRef = el) }, h("slot", { key: '770a98cff11b963ec37559683a27a216250e8bde' }))));
|
|
4981
4981
|
}
|
|
4982
4982
|
get host() { return this; }
|
|
4983
4983
|
static get watchers() { return {
|