@swisspost/design-system-components 9.0.0-next.13 → 9.0.0-next.14
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/{index-f1b08cdb.js → index-0ee3ab4a.js} +334 -152
- package/dist/cjs/index.cjs.js +22 -20
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-60e57542.js → package-7d11b6ea.js} +1 -1
- package/dist/cjs/{post-accordion-1e495c23.js → post-accordion-29861d97.js} +11 -5
- package/dist/cjs/{post-accordion-item-86b6950a.js → post-accordion-item-0da0f7aa.js} +15 -8
- package/dist/cjs/post-accordion-item.cjs.entry.js +3 -3
- package/dist/cjs/post-accordion.cjs.entry.js +3 -3
- package/dist/cjs/{post-avatar-067c033b.js → post-avatar-01b9cd6d.js} +23 -11
- package/dist/cjs/post-avatar.cjs.entry.js +3 -3
- package/dist/cjs/post-back-to-top-9a5647f7.js +80 -0
- package/dist/cjs/post-back-to-top.cjs.entry.js +3 -3
- package/dist/cjs/post-banner-33929088.js +110 -0
- package/dist/cjs/post-banner.cjs.entry.js +3 -3
- package/dist/cjs/{post-breadcrumb-b33abf67.js → post-breadcrumb-1384018e.js} +15 -9
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +3 -3
- package/dist/cjs/post-breadcrumb.cjs.entry.js +3 -3
- package/dist/cjs/{post-card-control-7867a104.js → post-card-control-4c85eda3.js} +45 -14
- package/dist/cjs/post-card-control.cjs.entry.js +3 -3
- package/dist/cjs/post-closebutton_15.cjs.entry.js +3 -3
- package/dist/cjs/{post-collapsible-trigger-6affdc02.js → post-collapsible-trigger-0fb2596a.js} +11 -5
- package/dist/cjs/post-collapsible_2.cjs.entry.js +3 -3
- package/dist/cjs/post-components.cjs.js +3 -3
- package/dist/cjs/{post-footer-330e8999.js → post-footer-f621a563.js} +8 -5
- package/dist/cjs/post-footer.cjs.entry.js +3 -3
- package/dist/cjs/post-linkarea-865079c1.js +32 -0
- package/dist/cjs/post-linkarea.cjs.entry.js +11 -0
- package/dist/cjs/{post-menu-item-48191dfd.js → post-menu-item-ab3e2e7e.js} +8 -5
- package/dist/cjs/{post-popover-27f3e9aa.js → post-popover-a2ba9226.js} +18 -6
- package/dist/cjs/post-popover.cjs.entry.js +3 -3
- package/dist/cjs/{post-rating-28904e91.js → post-rating-c402c294.js} +21 -8
- package/dist/cjs/post-rating.cjs.entry.js +3 -3
- package/dist/cjs/{post-tab-header-86b129ab.js → post-tab-header-c819517d.js} +8 -5
- package/dist/cjs/post-tab-header.cjs.entry.js +3 -3
- package/dist/cjs/{post-tab-panel-94333a7e.js → post-tab-panel-3cb207f3.js} +8 -5
- package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
- package/dist/cjs/{post-tabs-f8581050.js → post-tabs-b6fa39c3.js} +10 -4
- package/dist/cjs/post-tabs.cjs.entry.js +3 -3
- package/dist/cjs/{post-tag-3a24c574.js → post-tag-9c366519.js} +18 -7
- package/dist/cjs/post-tag.cjs.entry.js +3 -3
- package/dist/cjs/{post-togglebutton-e7d697bf.js → post-togglebutton-d49bec2c.js} +515 -132
- package/dist/cjs/{post-tooltip-8c87dfe3.js → post-tooltip-425c01ba.js} +17 -6
- package/dist/cjs/post-tooltip.cjs.entry.js +3 -3
- package/dist/collection/collection-manifest.json +4 -3
- package/dist/collection/components/post-accordion/post-accordion.js +13 -5
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +17 -8
- package/dist/collection/components/post-avatar/post-avatar.js +29 -11
- 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 +9 -5
- package/dist/collection/components/post-banner/post-banner.css +1 -1
- package/dist/collection/components/post-banner/post-banner.js +34 -14
- package/dist/collection/components/post-breadcrumb/post-breadcrumb.js +17 -9
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +7 -4
- package/dist/collection/components/post-card-control/post-card-control.js +61 -12
- package/dist/collection/components/post-closebutton/post-closebutton.js +1 -1
- package/dist/collection/components/post-collapsible/post-collapsible.js +7 -4
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +6 -3
- package/dist/collection/components/post-footer/post-footer.js +8 -5
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +82 -8
- package/dist/collection/components/post-icon/post-icon.js +43 -10
- package/dist/collection/components/post-language-option/post-language-option.js +32 -8
- package/dist/collection/components/post-language-switch/post-language-switch.css +1 -1
- package/dist/collection/components/post-language-switch/post-language-switch.js +22 -6
- package/dist/collection/components/post-linkarea/post-linkarea.css +1 -0
- package/dist/collection/components/post-linkarea/post-linkarea.js +32 -0
- package/dist/collection/components/post-list/post-list.js +17 -6
- package/dist/collection/components/post-list-item/post-list-item.js +1 -1
- package/dist/collection/components/post-logo/post-logo.js +7 -4
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +193 -19
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +124 -66
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +12 -6
- package/dist/collection/components/post-menu/post-menu.js +15 -5
- 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 -5
- package/dist/collection/components/post-popover/post-popover.js +22 -4
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +46 -8
- package/dist/collection/components/post-rating/post-rating.js +27 -6
- package/dist/collection/components/post-tab-header/post-tab-header.js +8 -5
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +8 -5
- package/dist/collection/components/post-tabs/post-tabs.js +10 -4
- package/dist/collection/components/post-tag/post-tag.js +22 -5
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +7 -4
- package/dist/collection/components/post-tooltip/post-tooltip.js +21 -6
- package/dist/collection/index.js +1 -0
- package/dist/components/index.js +36 -35
- package/dist/components/{post-collapsible-trigger2.js → p-05590ac0.js} +11 -8
- package/dist/components/{post-breadcrumb2.js → p-146677d1.js} +26 -20
- package/dist/components/p-1ee1742f.js +237 -0
- package/dist/components/p-2083ae2c.js +3 -0
- package/dist/components/{post-megadropdown-trigger2.js → p-27edc023.js} +15 -9
- package/dist/components/{post-tooltip2.js → p-2d9b46b4.js} +21 -10
- package/dist/components/{post-card-control2.js → p-38778a14.js} +49 -18
- package/dist/components/p-3aba7629.js +29 -0
- package/dist/components/{post-togglebutton2.js → p-3cee636a.js} +9 -6
- package/dist/components/p-3e8554e7.js +1646 -0
- package/dist/components/p-424d5ea9.js +199 -0
- package/dist/components/p-46a6c5ec.js +168 -0
- package/dist/components/p-4965cfe1.js +145 -0
- package/dist/components/{post-list2.js → p-536eba02.js} +17 -8
- package/dist/components/p-5653923a.js +44 -0
- package/dist/components/{post-footer2.js → p-58878996.js} +13 -10
- package/dist/components/{post-logo2.js → p-5f51ec58.js} +9 -6
- package/{loaders/post-popovercontainer2.js → dist/components/p-60cf53cc.js} +25 -10
- package/{loaders/post-accordion-item2.js → dist/components/p-68ecd276.js} +22 -15
- package/dist/components/{post-tab-header2.js → p-75b8b652.js} +11 -8
- package/dist/components/{post-tab-panel2.js → p-78e1d893.js} +10 -7
- package/dist/components/{post-menu-trigger2.js → p-8b053fd5.js} +14 -8
- package/dist/components/{post-icon2.js → p-91031e3b.js} +35 -14
- package/{loaders/post-menu2.js → dist/components/p-91882483.js} +19 -36
- package/dist/components/{post-list-item2.js → p-9e4b1f10.js} +3 -3
- package/dist/components/{post-accordion2.js → p-a3a004e6.js} +14 -8
- package/dist/components/{post-popover2.js → p-af23f7de.js} +21 -9
- package/dist/components/{post-collapsible2.js → p-b018d864.js} +9 -6
- package/dist/components/{check-non-empty.js → p-b095519d.js} +1 -1
- package/dist/components/{post-closebutton2.js → p-bf14d264.js} +5 -5
- package/dist/components/{post-breadcrumb-item2.js → p-c7c1d466.js} +10 -7
- package/dist/components/{post-tag2.js → p-cab43cee.js} +20 -9
- package/{loaders/post-menu-item2.js → dist/components/p-ccccf0c3.js} +4 -4
- package/dist/components/{post-tabs2.js → p-ce854a7d.js} +12 -6
- package/dist/components/{post-avatar2.js → p-d3fb70af.js} +25 -13
- package/dist/components/{post-language-option2.js → p-d47bb5bf.js} +27 -11
- package/dist/components/{post-back-to-top2.js → p-e20366a6.js} +15 -11
- package/dist/components/{index2.js → p-eabb09ad.js} +3 -3
- package/dist/components/{post-language-switch2.js → p-f6d80d76.js} +27 -15
- package/dist/components/p-f7b9f90a.js +135 -0
- package/dist/components/{post-rating2.js → p-fc59de7c.js} +23 -10
- package/dist/components/post-accordion-item.js +1 -1
- package/dist/components/post-accordion.js +1 -1
- package/dist/components/post-avatar.js +1 -1
- package/dist/components/post-back-to-top.js +1 -1
- package/dist/components/post-banner.js +1 -1
- package/dist/components/post-breadcrumb-item.js +1 -1
- package/dist/components/post-breadcrumb.js +1 -1
- package/dist/components/post-card-control.js +1 -1
- package/dist/components/post-closebutton.js +1 -1
- package/dist/components/post-collapsible-trigger.js +1 -1
- package/dist/components/post-collapsible.js +1 -1
- package/dist/components/post-footer.js +1 -1
- package/dist/components/post-header.js +1 -1
- package/dist/components/post-icon.js +1 -1
- package/dist/components/post-language-option.js +1 -1
- package/dist/components/post-language-switch.js +1 -1
- package/dist/components/post-linkarea.d.ts +11 -0
- package/dist/components/post-linkarea.js +6 -0
- package/dist/components/post-list-item.js +1 -1
- package/dist/components/post-list.js +1 -1
- package/dist/components/post-logo.js +1 -1
- package/dist/components/post-mainnavigation.js +1 -1
- package/dist/components/post-megadropdown-trigger.js +1 -1
- package/dist/components/post-megadropdown.js +1 -1
- package/dist/components/post-menu-item.js +1 -1
- package/dist/components/post-menu-trigger.js +1 -1
- package/dist/components/post-menu.js +1 -1
- package/dist/components/post-popover.js +1 -1
- package/dist/components/post-popovercontainer.js +1 -1
- package/dist/components/post-rating.js +1 -1
- package/dist/components/post-tab-header.js +1 -1
- package/dist/components/post-tab-panel.js +1 -1
- package/dist/components/post-tabs.js +1 -1
- package/dist/components/post-tag.js +1 -1
- package/dist/components/post-togglebutton.js +1 -1
- package/dist/components/post-tooltip.js +1 -1
- package/dist/docs.d.ts +8 -0
- package/dist/docs.json +333 -149
- package/dist/esm/{index-6bfe6554.js → index-2c232bf2.js} +334 -152
- package/dist/esm/index.js +21 -20
- package/dist/esm/loader.js +3 -3
- package/dist/esm/package-8c98af5e.js +3 -0
- package/dist/esm/{post-accordion-48eb17c3.js → post-accordion-49fba403.js} +11 -5
- package/dist/esm/{post-accordion-item-e0893bb3.js → post-accordion-item-c516517a.js} +15 -8
- package/dist/esm/post-accordion-item.entry.js +3 -3
- package/dist/esm/post-accordion.entry.js +3 -3
- package/dist/esm/{post-avatar-20cde806.js → post-avatar-b527ac63.js} +23 -11
- package/dist/esm/post-avatar.entry.js +3 -3
- package/dist/esm/post-back-to-top-f514c1f0.js +78 -0
- package/dist/esm/post-back-to-top.entry.js +3 -3
- package/dist/esm/post-banner-0ad7758b.js +108 -0
- package/dist/esm/post-banner.entry.js +3 -3
- package/dist/esm/{post-breadcrumb-39203792.js → post-breadcrumb-57bca9dd.js} +15 -9
- package/dist/esm/post-breadcrumb-item_2.entry.js +3 -3
- package/dist/esm/post-breadcrumb.entry.js +3 -3
- package/dist/esm/{post-card-control-d2c25c96.js → post-card-control-ea741f60.js} +45 -14
- package/dist/esm/post-card-control.entry.js +3 -3
- package/dist/esm/post-closebutton_15.entry.js +3 -3
- package/dist/esm/{post-collapsible-trigger-2f9ad9a5.js → post-collapsible-trigger-31155750.js} +11 -5
- package/dist/esm/post-collapsible_2.entry.js +3 -3
- package/dist/esm/post-components.js +4 -4
- package/dist/esm/{post-footer-e804a967.js → post-footer-cdde2086.js} +8 -5
- package/dist/esm/post-footer.entry.js +3 -3
- package/dist/esm/post-linkarea-cad95623.js +30 -0
- package/dist/esm/post-linkarea.entry.js +3 -0
- package/dist/esm/{post-menu-item-f9793958.js → post-menu-item-db732728.js} +8 -5
- package/dist/esm/{post-popover-8205412a.js → post-popover-00f427ac.js} +18 -6
- package/dist/esm/post-popover.entry.js +3 -3
- package/dist/esm/{post-rating-95ecb434.js → post-rating-cdcb2a1d.js} +21 -8
- package/dist/esm/post-rating.entry.js +3 -3
- package/dist/esm/{post-tab-header-d520b99a.js → post-tab-header-1d4113cb.js} +8 -5
- package/dist/esm/post-tab-header.entry.js +3 -3
- package/dist/esm/{post-tab-panel-8c8d2332.js → post-tab-panel-7a5c03ef.js} +8 -5
- package/dist/esm/post-tab-panel.entry.js +3 -3
- package/dist/esm/{post-tabs-dd6dfe43.js → post-tabs-308190c0.js} +10 -4
- package/dist/esm/post-tabs.entry.js +3 -3
- package/dist/esm/{post-tag-593813a4.js → post-tag-aebbda10.js} +18 -7
- package/dist/esm/post-tag.entry.js +3 -3
- package/dist/esm/{post-togglebutton-120df903.js → post-togglebutton-95ba85d2.js} +515 -132
- package/dist/esm/{post-tooltip-a13d6fbb.js → post-tooltip-918d3a54.js} +17 -6
- package/dist/esm/post-tooltip.entry.js +3 -3
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-037d6ef2.entry.js +1 -0
- package/dist/post-components/p-1e69a72f.js +1 -0
- package/dist/post-components/p-2083ae2c.js +1 -0
- package/dist/post-components/p-24297444.js +1 -0
- package/dist/post-components/{p-4fc83a1c.js → p-267f52a9.js} +3 -3
- package/dist/post-components/p-2e6c5b60.js +1 -0
- package/dist/post-components/p-3591d4e3.entry.js +1 -0
- package/dist/post-components/p-3dec4425.entry.js +1 -0
- package/dist/post-components/p-423aecd4.js +1 -0
- package/dist/post-components/p-43221de8.entry.js +1 -0
- package/dist/post-components/p-48fd00e7.entry.js +1 -0
- package/dist/post-components/p-4ca79b52.js +1 -0
- package/dist/post-components/p-4d2dee9f.entry.js +1 -0
- package/dist/post-components/p-4fedef65.js +1 -0
- package/dist/post-components/p-59109b3b.entry.js +1 -0
- package/dist/post-components/p-675352c3.entry.js +1 -0
- package/dist/post-components/p-6e4527d9.entry.js +1 -0
- package/dist/post-components/p-726bfda2.js +1 -0
- package/dist/post-components/p-767c0bf3.js +1 -0
- package/dist/post-components/p-796968bd.entry.js +1 -0
- package/dist/post-components/{p-a72cb18c.js → p-7c9758fa.js} +1 -1
- package/dist/post-components/p-8a452260.js +1 -0
- package/dist/post-components/p-8a50b900.js +1 -0
- package/dist/post-components/p-8de4f677.entry.js +1 -0
- package/dist/post-components/p-93632808.js +1 -0
- package/dist/post-components/p-9aca3d07.entry.js +1 -0
- package/dist/post-components/p-9f0c5164.js +1 -0
- package/dist/post-components/p-a6436e7f.js +1 -0
- package/dist/post-components/p-ad246c0d.js +1 -0
- package/dist/post-components/p-b015efcb.entry.js +1 -0
- package/dist/post-components/{p-92f8803c.entry.js → p-b0afc087.entry.js} +1 -1
- package/dist/post-components/p-b1adc221.js +1 -0
- package/dist/post-components/p-b2c0d21a.js +1 -0
- package/dist/post-components/p-b5a566f1.js +1 -0
- package/dist/post-components/p-c0961047.entry.js +1 -0
- package/dist/post-components/p-c388b7bb.entry.js +1 -0
- package/dist/post-components/{p-d6449a93.entry.js → p-ca41b899.entry.js} +1 -1
- package/dist/post-components/p-d2395ae9.entry.js +1 -0
- package/dist/post-components/p-d9833667.js +2 -0
- package/dist/post-components/p-da261c46.entry.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-header/post-header.d.ts +11 -2
- package/dist/types/components/post-language-switch/post-language-switch.d.ts +1 -1
- package/dist/types/components/post-linkarea/post-linkarea.d.ts +5 -0
- package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +57 -3
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +26 -12
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +4 -0
- package/dist/types/components.d.ts +49 -23
- package/dist/types/index.d.ts +3 -2
- package/dist/types/stencil-public-runtime.d.ts +6 -0
- package/loaders/index.d.ts +2 -0
- package/loaders/index.js +3 -2
- package/loaders/{post-collapsible-trigger2.js → p-05590ac0.js} +11 -8
- package/loaders/{post-breadcrumb-item2.js → p-1beacb73.js} +10 -7
- package/loaders/p-2083ae2c.js +3 -0
- package/loaders/p-3aba7629.js +29 -0
- package/loaders/p-3e8554e7.js +1646 -0
- package/loaders/{index2.js → p-56ad4838.js} +3 -3
- package/{dist/components/post-popovercontainer2.js → loaders/p-60cf53cc.js} +25 -10
- package/{dist/components/post-accordion-item2.js → loaders/p-83baa315.js} +22 -15
- package/loaders/{post-menu-trigger2.js → p-8b053fd5.js} +14 -8
- package/{dist/components/post-menu2.js → loaders/p-91882483.js} +19 -36
- package/loaders/{post-collapsible2.js → p-9fac5d7d.js} +9 -6
- package/loaders/{check-non-empty.js → p-b095519d.js} +1 -1
- package/{dist/components/post-menu-item2.js → loaders/p-ccccf0c3.js} +4 -4
- package/loaders/{post-icon2.js → p-f7177e26.js} +35 -14
- package/loaders/p-f7b9f90a.js +135 -0
- package/loaders/post-accordion-item.js +1 -1
- package/loaders/post-accordion.js +14 -8
- package/loaders/post-avatar.js +25 -13
- package/loaders/post-back-to-top.js +15 -11
- package/loaders/post-banner.js +36 -22
- package/loaders/post-breadcrumb-item.js +1 -1
- package/loaders/post-breadcrumb.js +26 -20
- package/loaders/post-card-control.js +49 -18
- package/loaders/post-closebutton.js +5 -5
- package/loaders/post-collapsible-trigger.js +1 -1
- package/loaders/post-collapsible.js +1 -1
- package/loaders/post-footer.js +13 -10
- package/loaders/post-header.js +65 -145
- package/loaders/post-icon.js +1 -1
- package/loaders/post-language-option.js +27 -11
- package/loaders/post-language-switch.js +27 -15
- package/loaders/post-linkarea.d.ts +11 -0
- package/loaders/post-linkarea.js +47 -0
- package/loaders/post-list-item.js +3 -3
- package/loaders/post-list.js +17 -8
- package/loaders/post-logo.js +9 -6
- package/loaders/post-mainnavigation.js +193 -9
- package/loaders/post-megadropdown-trigger.js +15 -9
- package/loaders/post-megadropdown.js +108 -51
- package/loaders/post-menu-item.js +1 -1
- package/loaders/post-menu-trigger.js +1 -1
- package/loaders/post-menu.js +1 -1
- package/loaders/post-popover.js +21 -9
- package/loaders/post-popovercontainer.js +1 -1
- package/loaders/post-rating.js +23 -10
- package/loaders/post-tab-header.js +11 -8
- package/loaders/post-tab-panel.js +10 -7
- package/loaders/post-tabs.js +12 -6
- package/loaders/post-tag.js +20 -9
- package/loaders/post-togglebutton.js +9 -6
- package/loaders/post-tooltip.js +21 -10
- package/package.json +10 -11
- package/dist/cjs/post-back-to-top-7efd1066.js +0 -76
- package/dist/cjs/post-banner-a6808d7d.js +0 -96
- package/dist/components/package.js +0 -3
- package/dist/components/post-banner2.js +0 -131
- package/dist/components/post-header2.js +0 -279
- package/dist/components/post-mainnavigation2.js +0 -53
- package/dist/components/post-megadropdown2.js +0 -111
- package/dist/esm/package-495dba42.js +0 -3
- package/dist/esm/post-back-to-top-e422c426.js +0 -74
- package/dist/esm/post-banner-7385397e.js +0 -94
- package/dist/post-components/p-0b613350.js +0 -1
- package/dist/post-components/p-0e216cc4.js +0 -2
- package/dist/post-components/p-20e1b680.js +0 -1
- package/dist/post-components/p-29bc8ddc.entry.js +0 -1
- package/dist/post-components/p-2b4c7ec7.entry.js +0 -1
- package/dist/post-components/p-2f327006.entry.js +0 -1
- package/dist/post-components/p-3632ace7.js +0 -1
- package/dist/post-components/p-3a978ea9.entry.js +0 -1
- package/dist/post-components/p-3d4fdde0.js +0 -1
- package/dist/post-components/p-427132e3.entry.js +0 -1
- package/dist/post-components/p-445dfa96.js +0 -1
- package/dist/post-components/p-4c0c13a9.js +0 -1
- package/dist/post-components/p-5384e6f4.js +0 -1
- package/dist/post-components/p-5630677a.entry.js +0 -1
- package/dist/post-components/p-5e5ee06d.entry.js +0 -1
- package/dist/post-components/p-68c43ef0.entry.js +0 -1
- package/dist/post-components/p-6e39bb59.entry.js +0 -1
- package/dist/post-components/p-6fede961.js +0 -1
- package/dist/post-components/p-72a5ee9b.js +0 -1
- package/dist/post-components/p-72d9d594.entry.js +0 -1
- package/dist/post-components/p-85bf673e.entry.js +0 -1
- package/dist/post-components/p-8decb072.entry.js +0 -1
- package/dist/post-components/p-9596c7d6.js +0 -1
- package/dist/post-components/p-975b30f5.js +0 -1
- package/dist/post-components/p-9a50697e.entry.js +0 -1
- package/dist/post-components/p-aaca7ca7.js +0 -1
- package/dist/post-components/p-ac2189b7.js +0 -1
- package/dist/post-components/p-afe3b28e.js +0 -1
- package/dist/post-components/p-b129c166.js +0 -1
- package/dist/post-components/p-bd49bb7e.entry.js +0 -1
- package/dist/post-components/p-c043686c.entry.js +0 -1
- package/dist/post-components/p-c8544b65.js +0 -1
- package/dist/post-components/p-c9f65844.entry.js +0 -1
- package/dist/post-components/p-f7c5b0c2.js +0 -1
- package/loaders/package.js +0 -3
- /package/dist/components/{heading-levels.js → p-247a1668.js} +0 -0
- /package/dist/components/{constants.js → p-440193f4.js} +0 -0
- /package/dist/components/{slide.js → p-4af6dbed.js} +0 -0
- /package/dist/components/{index.browser.js → p-5959f2bd.js} +0 -0
- /package/dist/components/{fade.js → p-64e3de38.js} +0 -0
- /package/dist/components/{check-type.js → p-8562c7dc.js} +0 -0
- /package/dist/components/{attribute-observer.js → p-9748a355.js} +0 -0
- /package/dist/components/{check-one-of.js → p-bacd3e2c.js} +0 -0
- /package/dist/components/{debounce.js → p-e1baac59.js} +0 -0
- /package/dist/components/{get-root.js → p-fc91cbc2.js} +0 -0
- /package/loaders/{heading-levels.js → p-247a1668.js} +0 -0
- /package/loaders/{constants.js → p-440193f4.js} +0 -0
- /package/loaders/{slide.js → p-4af6dbed.js} +0 -0
- /package/loaders/{index.browser.js → p-5959f2bd.js} +0 -0
- /package/loaders/{fade.js → p-64e3de38.js} +0 -0
- /package/loaders/{check-type.js → p-8562c7dc.js} +0 -0
- /package/loaders/{attribute-observer.js → p-9748a355.js} +0 -0
- /package/loaders/{check-one-of.js → p-bacd3e2c.js} +0 -0
- /package/loaders/{debounce.js → p-e1baac59.js} +0 -0
- /package/loaders/{get-root.js → p-fc91cbc2.js} +0 -0
|
@@ -1,78 +1,137 @@
|
|
|
1
|
+
import { getFocusableChildren } from "../../utils/get-focusable-children";
|
|
1
2
|
import { h, Host } from "@stencil/core";
|
|
2
3
|
export class PostMegadropdown {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
popoverRef;
|
|
4
|
+
header;
|
|
5
|
+
firstFocusableEl;
|
|
6
|
+
lastFocusableEl;
|
|
7
|
+
device;
|
|
8
8
|
host;
|
|
9
|
+
/** Tracks the currently active dropdown instance. */
|
|
10
|
+
static activeDropdown = null;
|
|
11
|
+
/**
|
|
12
|
+
* Holds the current visibility state of the dropdown.
|
|
13
|
+
* This state is internally managed to track whether the dropdown is open (`true`) or closed (`false`),
|
|
14
|
+
* and updates automatically when the dropdown is toggled.
|
|
15
|
+
*/
|
|
16
|
+
isVisible = false;
|
|
17
|
+
/** Holds the current animation class. */
|
|
18
|
+
animationClass = null;
|
|
9
19
|
/**
|
|
10
20
|
* Emits when the dropdown is shown or hidden.
|
|
11
21
|
* The event payload is a boolean: `true` when the dropdown was opened, `false` when it was closed.
|
|
12
22
|
**/
|
|
13
23
|
postToggleMegadropdown;
|
|
14
|
-
|
|
15
|
-
this.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
+
disconnectedCallback() {
|
|
25
|
+
this.removeOutsideClickListener();
|
|
26
|
+
if (PostMegadropdown.activeDropdown === this) {
|
|
27
|
+
PostMegadropdown.activeDropdown = null;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
componentWillRender() {
|
|
31
|
+
this.getFocusableElements();
|
|
24
32
|
}
|
|
25
33
|
/**
|
|
26
34
|
* Toggles the dropdown visibility based on its current state.
|
|
27
35
|
*/
|
|
28
|
-
async toggle(
|
|
36
|
+
async toggle() {
|
|
29
37
|
if (this.isVisible) {
|
|
30
38
|
this.hide();
|
|
31
39
|
}
|
|
32
40
|
else {
|
|
33
|
-
await this.show(
|
|
41
|
+
await this.show();
|
|
34
42
|
}
|
|
35
43
|
}
|
|
36
44
|
/**
|
|
37
|
-
* Displays the
|
|
38
|
-
*
|
|
39
|
-
* @param target - The HTML element relative to which the popover dropdown should be displayed.
|
|
45
|
+
* Displays the dropdown.
|
|
40
46
|
*/
|
|
41
|
-
async show(
|
|
42
|
-
if (this
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
async show() {
|
|
48
|
+
if (PostMegadropdown.activeDropdown && PostMegadropdown.activeDropdown !== this) {
|
|
49
|
+
// Close the previously active dropdown without animation
|
|
50
|
+
PostMegadropdown.activeDropdown.forceClose();
|
|
45
51
|
}
|
|
46
|
-
|
|
47
|
-
|
|
52
|
+
this.isVisible = true;
|
|
53
|
+
this.host.addEventListener('keydown', e => this.keyboardHandler(e));
|
|
54
|
+
this.animationClass = 'slide-in';
|
|
55
|
+
PostMegadropdown.activeDropdown = this;
|
|
56
|
+
this.postToggleMegadropdown.emit(this.isVisible);
|
|
57
|
+
this.addOutsideClickListener();
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Hides the dropdown with an animation.
|
|
61
|
+
*/
|
|
62
|
+
async hide() {
|
|
63
|
+
this.animationClass = 'slide-out';
|
|
64
|
+
this.host.removeEventListener('keydown', e => this.keyboardHandler(e));
|
|
65
|
+
}
|
|
66
|
+
connectedCallback() {
|
|
67
|
+
this.header = this.host.closest('post-header');
|
|
68
|
+
if (this.header) {
|
|
69
|
+
this.header.addEventListener('postUpdateDevice', (event) => (this.device = event.detail));
|
|
48
70
|
}
|
|
49
71
|
}
|
|
50
72
|
/**
|
|
51
|
-
*
|
|
73
|
+
* Forces the dropdown to close without animation.
|
|
52
74
|
*/
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
75
|
+
forceClose() {
|
|
76
|
+
this.isVisible = false;
|
|
77
|
+
this.animationClass = null;
|
|
78
|
+
this.postToggleMegadropdown.emit(this.isVisible);
|
|
79
|
+
this.removeOutsideClickListener();
|
|
80
|
+
}
|
|
81
|
+
handleAnimationEnd() {
|
|
82
|
+
if (this.animationClass === 'slide-out') {
|
|
83
|
+
this.isVisible = false;
|
|
84
|
+
this.animationClass = null;
|
|
85
|
+
this.postToggleMegadropdown.emit(this.isVisible);
|
|
86
|
+
this.removeOutsideClickListener();
|
|
56
87
|
}
|
|
57
|
-
|
|
58
|
-
|
|
88
|
+
}
|
|
89
|
+
handleClickOutside = (event) => {
|
|
90
|
+
const target = event.target;
|
|
91
|
+
if (this.host.contains(target)) {
|
|
92
|
+
return;
|
|
59
93
|
}
|
|
94
|
+
if (target instanceof HTMLElement) {
|
|
95
|
+
const trigger = target.closest('post-megadropdown-trigger');
|
|
96
|
+
if (trigger) {
|
|
97
|
+
const targetDropdownId = trigger.getAttribute('for');
|
|
98
|
+
if (targetDropdownId !== this.host.id) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
this.hide();
|
|
104
|
+
};
|
|
105
|
+
addOutsideClickListener() {
|
|
106
|
+
document.addEventListener('mousedown', this.handleClickOutside);
|
|
60
107
|
}
|
|
61
|
-
|
|
62
|
-
|
|
108
|
+
removeOutsideClickListener() {
|
|
109
|
+
document.removeEventListener('mousedown', this.handleClickOutside);
|
|
63
110
|
}
|
|
64
|
-
|
|
65
|
-
this.
|
|
111
|
+
getFocusableElements() {
|
|
112
|
+
const focusableEls = Array.from(this.host.querySelectorAll('post-list-item, h3, .back-button'));
|
|
113
|
+
const focusableChildren = focusableEls.flatMap(el => Array.from(getFocusableChildren(el)));
|
|
114
|
+
this.firstFocusableEl = focusableChildren[0];
|
|
115
|
+
this.lastFocusableEl = focusableChildren[focusableChildren.length - 1];
|
|
66
116
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
117
|
+
// Loop through the focusable children
|
|
118
|
+
keyboardHandler(e) {
|
|
119
|
+
if (e.key === 'Tab' && this.device !== 'desktop') {
|
|
120
|
+
if (e.shiftKey && document.activeElement === this.firstFocusableEl) {
|
|
121
|
+
// If back tab (TAB + Shift) and first element is focused, focus goes to the last element of the megadropdown
|
|
122
|
+
e.preventDefault();
|
|
123
|
+
this.lastFocusableEl.focus();
|
|
124
|
+
}
|
|
125
|
+
else if (!e.shiftKey && document.activeElement === this.lastFocusableEl) {
|
|
126
|
+
// If TAB and last element is focused, focus goes back to the first element of the megadropdown
|
|
127
|
+
e.preventDefault();
|
|
128
|
+
this.firstFocusableEl.focus();
|
|
129
|
+
}
|
|
72
130
|
}
|
|
73
131
|
}
|
|
74
132
|
render() {
|
|
75
|
-
|
|
133
|
+
const containerStyle = this.isVisible ? {} : { display: 'none' };
|
|
134
|
+
return (h(Host, { key: '5aa08b01be715325182c245e1b0ae2456bcc5df6' }, h("div", { key: '0737c9368ecbffac59bbdf47fabac3f3b94ae7bb', class: `megadropdown-container ${this.animationClass || ''}`, style: containerStyle, onAnimationEnd: () => this.handleAnimationEnd() }, h("div", { key: 'efe49f3f9cdcd99e2feca78b772c944405e19f21', class: "megadropdown" }, h("div", { key: '14dd7ff2f7e7b1eb91f2673a25d7ccafffe4f9d0', onClick: () => this.hide(), class: "back-button" }, h("slot", { key: '554e30e6408c0bef0549f5e2c31dcd8b90ceee40', name: "back-button" })), h("div", { key: '4e7335152d7b6649918adf075213ebbf8b8ddeaa', onClick: () => this.hide(), class: "close-button" }, h("slot", { key: 'db90f3a5334ce723c0ee672a96167197ca25b545', name: "close-button" })), h("slot", { key: 'b11b1d16147f88103f2eb24c8dd21394de53f69c', name: "megadropdown-title" }), h("div", { key: '6d837c1a70f66f00097fb531058750fbac6fd41a', class: "megadropdown-content" }, h("slot", { key: 'be685185f04e44d867167f918494d086856b5928' }))))));
|
|
76
135
|
}
|
|
77
136
|
static get is() { return "post-megadropdown"; }
|
|
78
137
|
static get originalStyleUrls() {
|
|
@@ -87,6 +146,7 @@ export class PostMegadropdown {
|
|
|
87
146
|
}
|
|
88
147
|
static get states() {
|
|
89
148
|
return {
|
|
149
|
+
"device": {},
|
|
90
150
|
"isVisible": {},
|
|
91
151
|
"animationClass": {}
|
|
92
152
|
};
|
|
@@ -113,20 +173,12 @@ export class PostMegadropdown {
|
|
|
113
173
|
return {
|
|
114
174
|
"toggle": {
|
|
115
175
|
"complexType": {
|
|
116
|
-
"signature": "(
|
|
117
|
-
"parameters": [
|
|
118
|
-
"name": "target",
|
|
119
|
-
"type": "HTMLElement",
|
|
120
|
-
"docs": ""
|
|
121
|
-
}],
|
|
176
|
+
"signature": "() => Promise<void>",
|
|
177
|
+
"parameters": [],
|
|
122
178
|
"references": {
|
|
123
179
|
"Promise": {
|
|
124
180
|
"location": "global",
|
|
125
181
|
"id": "global::Promise"
|
|
126
|
-
},
|
|
127
|
-
"HTMLElement": {
|
|
128
|
-
"location": "global",
|
|
129
|
-
"id": "global::HTMLElement"
|
|
130
182
|
}
|
|
131
183
|
},
|
|
132
184
|
"return": "Promise<void>"
|
|
@@ -138,30 +190,36 @@ export class PostMegadropdown {
|
|
|
138
190
|
},
|
|
139
191
|
"show": {
|
|
140
192
|
"complexType": {
|
|
141
|
-
"signature": "(
|
|
142
|
-
"parameters": [
|
|
143
|
-
"name": "target",
|
|
144
|
-
"type": "HTMLElement",
|
|
145
|
-
"docs": "- The HTML element relative to which the popover dropdown should be displayed."
|
|
146
|
-
}],
|
|
193
|
+
"signature": "() => Promise<void>",
|
|
194
|
+
"parameters": [],
|
|
147
195
|
"references": {
|
|
148
196
|
"Promise": {
|
|
149
197
|
"location": "global",
|
|
150
198
|
"id": "global::Promise"
|
|
151
|
-
}
|
|
152
|
-
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"return": "Promise<void>"
|
|
202
|
+
},
|
|
203
|
+
"docs": {
|
|
204
|
+
"text": "Displays the dropdown.",
|
|
205
|
+
"tags": []
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"hide": {
|
|
209
|
+
"complexType": {
|
|
210
|
+
"signature": "() => Promise<void>",
|
|
211
|
+
"parameters": [],
|
|
212
|
+
"references": {
|
|
213
|
+
"Promise": {
|
|
153
214
|
"location": "global",
|
|
154
|
-
"id": "global::
|
|
215
|
+
"id": "global::Promise"
|
|
155
216
|
}
|
|
156
217
|
},
|
|
157
218
|
"return": "Promise<void>"
|
|
158
219
|
},
|
|
159
220
|
"docs": {
|
|
160
|
-
"text": "
|
|
161
|
-
"tags": [
|
|
162
|
-
"name": "param",
|
|
163
|
-
"text": "target - The HTML element relative to which the popover dropdown should be displayed."
|
|
164
|
-
}]
|
|
221
|
+
"text": "Hides the dropdown with an animation.",
|
|
222
|
+
"tags": []
|
|
165
223
|
}
|
|
166
224
|
}
|
|
167
225
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
post-megadropdown-trigger{width:100
|
|
1
|
+
post-megadropdown-trigger{width:100%;position:relative;z-index:3}
|
|
@@ -2,11 +2,15 @@ import { h, Host } from "@stencil/core";
|
|
|
2
2
|
import { version } from "../../../../package";
|
|
3
3
|
import { checkType } from "../../utils/index";
|
|
4
4
|
export class PostMegadropdownTrigger {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
/**
|
|
6
|
+
* ID of the mega dropdown element that this trigger is linked to. Used to open and close the specified mega dropdown.
|
|
7
|
+
*/
|
|
8
|
+
for;
|
|
9
9
|
host;
|
|
10
|
+
/**
|
|
11
|
+
* Manages the accessibility attribute `aria-expanded` to indicate whether the associated mega dropdown is expanded or collapsed.
|
|
12
|
+
*/
|
|
13
|
+
ariaExpanded = false;
|
|
10
14
|
/**
|
|
11
15
|
* Reference to the slotted button within the trigger, if present.
|
|
12
16
|
* Used to manage click and key events for mega dropdown control.
|
|
@@ -27,7 +31,7 @@ export class PostMegadropdownTrigger {
|
|
|
27
31
|
}
|
|
28
32
|
handleToggle() {
|
|
29
33
|
if (this.megadropdown) {
|
|
30
|
-
this.megadropdown.toggle(
|
|
34
|
+
this.megadropdown.toggle();
|
|
31
35
|
}
|
|
32
36
|
else {
|
|
33
37
|
console.warn(`No post-megadropdown found with ID: ${this.for}`);
|
|
@@ -56,7 +60,7 @@ export class PostMegadropdownTrigger {
|
|
|
56
60
|
}
|
|
57
61
|
}
|
|
58
62
|
render() {
|
|
59
|
-
return (h(Host, { key: '
|
|
63
|
+
return (h(Host, { key: '2e009cb0dbfd81785d3a8ce5802a4fab0e84a52e', "data-version": version, "tab-index": "-1" }, h("button", { key: 'd77d9a5eb5786a63cf7453c639647adc705892bc' }, h("slot", { key: '19f4b17dc2d073b0770c33d6acfb763c1e47735a' }))));
|
|
60
64
|
}
|
|
61
65
|
static get is() { return "post-megadropdown-trigger"; }
|
|
62
66
|
static get originalStyleUrls() {
|
|
@@ -85,6 +89,8 @@ export class PostMegadropdownTrigger {
|
|
|
85
89
|
"tags": [],
|
|
86
90
|
"text": "ID of the mega dropdown element that this trigger is linked to. Used to open and close the specified mega dropdown."
|
|
87
91
|
},
|
|
92
|
+
"getter": false,
|
|
93
|
+
"setter": false,
|
|
88
94
|
"attribute": "for",
|
|
89
95
|
"reflect": false
|
|
90
96
|
}
|
|
@@ -3,10 +3,6 @@ import { version } from "../../../../package";
|
|
|
3
3
|
import { getFocusableChildren } from "../../utils/get-focusable-children";
|
|
4
4
|
import { getRoot } from "../../utils/index";
|
|
5
5
|
export class PostMenu {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.placement = 'bottom';
|
|
8
|
-
this.isVisible = false;
|
|
9
|
-
}
|
|
10
6
|
popoverRef;
|
|
11
7
|
lastFocusedElement = null;
|
|
12
8
|
KEYCODES = {
|
|
@@ -20,6 +16,18 @@ export class PostMenu {
|
|
|
20
16
|
ESCAPE: 'Escape',
|
|
21
17
|
};
|
|
22
18
|
host;
|
|
19
|
+
/**
|
|
20
|
+
* Defines the placement of the tooltip according to the floating-ui options available at https://floating-ui.com/docs/computePosition#placement.
|
|
21
|
+
* Tooltips are automatically flipped to the opposite side if there is not enough available space and are shifted
|
|
22
|
+
* towards the viewport if they would overlap edge boundaries.
|
|
23
|
+
*/
|
|
24
|
+
placement = 'bottom';
|
|
25
|
+
/**
|
|
26
|
+
* Holds the current visibility state of the menu.
|
|
27
|
+
* This state is internally managed to track whether the menu is open (`true`) or closed (`false`),
|
|
28
|
+
* and updates automatically when the menu is toggled.
|
|
29
|
+
*/
|
|
30
|
+
isVisible = false;
|
|
23
31
|
/**
|
|
24
32
|
* Emits when the menu is shown or hidden.
|
|
25
33
|
* The event payload is a boolean: `true` when the menu was opened, `false` when it was closed.
|
|
@@ -150,7 +158,7 @@ export class PostMenu {
|
|
|
150
158
|
.flatMap(el => Array.from(getFocusableChildren(el))));
|
|
151
159
|
}
|
|
152
160
|
render() {
|
|
153
|
-
return (h(Host, { key: '
|
|
161
|
+
return (h(Host, { key: '071532c327f80197dda662f77e5cb2444281087d', "data-version": version }, h("post-popovercontainer", { key: '9f70ca4009139e0547026b26be610a02f4f1a95a', placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '3ff1048a8fb27402a82cedc3dc300366063c9601', class: "popover-container", part: "popover-container" }, h("slot", { key: 'bed6c96b7502e0032b746ac6fdf8c3dd6d782e48' })))));
|
|
154
162
|
}
|
|
155
163
|
static get is() { return "post-menu"; }
|
|
156
164
|
static get encapsulation() { return "shadow"; }
|
|
@@ -186,6 +194,8 @@ export class PostMenu {
|
|
|
186
194
|
"tags": [],
|
|
187
195
|
"text": "Defines the placement of the tooltip according to the floating-ui options available at https://floating-ui.com/docs/computePosition#placement.\nTooltips are automatically flipped to the opposite side if there is not enough available space and are shifted\ntowards the viewport if they would overlap edge boundaries."
|
|
188
196
|
},
|
|
197
|
+
"getter": false,
|
|
198
|
+
"setter": false,
|
|
189
199
|
"attribute": "placement",
|
|
190
200
|
"reflect": false,
|
|
191
201
|
"defaultValue": "'bottom'"
|
|
@@ -2,7 +2,7 @@ import { h, Host } from "@stencil/core";
|
|
|
2
2
|
import { version } from "../../../../package";
|
|
3
3
|
export class PostMenuItem {
|
|
4
4
|
render() {
|
|
5
|
-
return (h(Host, { key: '
|
|
5
|
+
return (h(Host, { key: '376ce17a520b6cb74c55c009843df878f99ef411', role: "menuitem", "data-version": version }, h("slot", { key: 'e489c5c09f1527e527e052e9f4349c5b26db6ea9' })));
|
|
6
6
|
}
|
|
7
7
|
static get is() { return "post-menu-item"; }
|
|
8
8
|
}
|
|
@@ -2,11 +2,15 @@ import { h, Host } from "@stencil/core";
|
|
|
2
2
|
import { version } from "../../../../package";
|
|
3
3
|
import { checkType, getRoot } from "../../utils/index";
|
|
4
4
|
export class PostMenuTrigger {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
/**
|
|
6
|
+
* ID of the menu element that this trigger is linked to. Used to open and close the specified menu.
|
|
7
|
+
*/
|
|
8
|
+
for;
|
|
9
9
|
host;
|
|
10
|
+
/**
|
|
11
|
+
* Manages the accessibility attribute `aria-expanded` to indicate whether the associated menu is expanded or collapsed.
|
|
12
|
+
*/
|
|
13
|
+
ariaExpanded = false;
|
|
10
14
|
/**
|
|
11
15
|
* Reference to the slotted button within the trigger, if present.
|
|
12
16
|
* Used to manage click and key events for menu control.
|
|
@@ -67,7 +71,7 @@ export class PostMenuTrigger {
|
|
|
67
71
|
}
|
|
68
72
|
}
|
|
69
73
|
render() {
|
|
70
|
-
return (h(Host, { key: '
|
|
74
|
+
return (h(Host, { key: 'a0fff619978087ce0c67d7d327982424e3784ff0', "data-version": version, "tab-index": "-1" }, h("slot", { key: '93e26150b59e9a01275a6815096e09ff5fac146b' })));
|
|
71
75
|
}
|
|
72
76
|
static get is() { return "post-menu-trigger"; }
|
|
73
77
|
static get originalStyleUrls() {
|
|
@@ -96,6 +100,8 @@ export class PostMenuTrigger {
|
|
|
96
100
|
"tags": [],
|
|
97
101
|
"text": "ID of the menu element that this trigger is linked to. Used to open and close the specified menu."
|
|
98
102
|
},
|
|
103
|
+
"getter": false,
|
|
104
|
+
"setter": false,
|
|
99
105
|
"attribute": "for",
|
|
100
106
|
"reflect": false
|
|
101
107
|
}
|
|
@@ -25,10 +25,22 @@ export class PostPopover {
|
|
|
25
25
|
popoverRef;
|
|
26
26
|
localBeforeToggleHandler;
|
|
27
27
|
host;
|
|
28
|
+
/**
|
|
29
|
+
* Defines the placement of the popover according to the floating-ui options available at https://floating-ui.com/docs/computePosition#placement.
|
|
30
|
+
* Popoverss are automatically flipped to the opposite side if there is not enough available space and are shifted
|
|
31
|
+
* towards the viewport if they would overlap edge boundaries.
|
|
32
|
+
*/
|
|
33
|
+
placement = 'top';
|
|
34
|
+
/**
|
|
35
|
+
* Define the caption of the close button for assistive technology
|
|
36
|
+
*/
|
|
37
|
+
closeButtonCaption;
|
|
38
|
+
/**
|
|
39
|
+
* Show a little indicator arrow
|
|
40
|
+
*/
|
|
41
|
+
// eslint-disable-next-line @stencil-community/ban-default-true
|
|
42
|
+
arrow = true;
|
|
28
43
|
constructor() {
|
|
29
|
-
this.placement = 'top';
|
|
30
|
-
this.closeButtonCaption = undefined;
|
|
31
|
-
this.arrow = true;
|
|
32
44
|
this.localBeforeToggleHandler = this.beforeToggleHandler.bind(this);
|
|
33
45
|
}
|
|
34
46
|
connectedCallback() {
|
|
@@ -91,7 +103,7 @@ export class PostPopover {
|
|
|
91
103
|
this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
|
|
92
104
|
}
|
|
93
105
|
render() {
|
|
94
|
-
return (h(Host, { key: '
|
|
106
|
+
return (h(Host, { key: 'a7976e6c960015ed9b318c75fc8a74afc2337661', "data-version": version }, h("post-popovercontainer", { key: '1b71f4bce3a6866e19c3900c0e82f814508f8144', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: 'b15e45e7fd31edc36fa4c912332984daf0ce9cbc', class: "popover-container" }, h("div", { key: 'adc170a2738c7f88c60e8885d8ee84f10fa1d546', class: "popover-content" }, h("slot", { key: '235dbd1a184353de8d8da038c8c31e3dd7f6dab7' })), h("button", { key: '679fccf088d5589b548ec2186facc6c767aace93', class: "btn-close", onClick: () => this.hide() }, h("span", { key: 'e8f61719cc6e9b6ddf85756005f17b9103406055', class: "visually-hidden" }, this.closeButtonCaption))))));
|
|
95
107
|
}
|
|
96
108
|
static get is() { return "post-popover"; }
|
|
97
109
|
static get encapsulation() { return "shadow"; }
|
|
@@ -127,6 +139,8 @@ export class PostPopover {
|
|
|
127
139
|
"tags": [],
|
|
128
140
|
"text": "Defines the placement of the popover according to the floating-ui options available at https://floating-ui.com/docs/computePosition#placement.\nPopoverss are automatically flipped to the opposite side if there is not enough available space and are shifted\ntowards the viewport if they would overlap edge boundaries."
|
|
129
141
|
},
|
|
142
|
+
"getter": false,
|
|
143
|
+
"setter": false,
|
|
130
144
|
"attribute": "placement",
|
|
131
145
|
"reflect": false,
|
|
132
146
|
"defaultValue": "'top'"
|
|
@@ -145,6 +159,8 @@ export class PostPopover {
|
|
|
145
159
|
"tags": [],
|
|
146
160
|
"text": "Define the caption of the close button for assistive technology"
|
|
147
161
|
},
|
|
162
|
+
"getter": false,
|
|
163
|
+
"setter": false,
|
|
148
164
|
"attribute": "close-button-caption",
|
|
149
165
|
"reflect": false
|
|
150
166
|
},
|
|
@@ -162,6 +178,8 @@ export class PostPopover {
|
|
|
162
178
|
"tags": [],
|
|
163
179
|
"text": "Show a little indicator arrow"
|
|
164
180
|
},
|
|
181
|
+
"getter": false,
|
|
182
|
+
"setter": false,
|
|
165
183
|
"attribute": "arrow",
|
|
166
184
|
"reflect": false,
|
|
167
185
|
"defaultValue": "true"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer polyfill{@supports not selector(:popover-open){[popover]:not(.\:popover-open){display:none}}}:where(post-popovercontainer){box-shadow
|
|
1
|
+
@layer polyfill{@supports not selector(:popover-open){[popover]:not(.\:popover-open){display:none}}}:where(post-popovercontainer){box-shadow:var(--post-device-elevation-300);background:var(--post-current-palette-bg);color:var(--post-current-palette-fg);position:fixed;z-index:1060;width:max-content;margin:0;padding:0;box-sizing:border-box;border:2px solid rgba(0,0,0,0);border-radius:4px;overflow:visible}:where(post-popovercontainer)[tooltip]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}:where(post-popovercontainer):not(:has(.arrow)){box-shadow:var(--post-device-elevation-300)}:where(post-popovercontainer):has(.arrow){filter:drop-shadow(1px 2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(2px 4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(4px 8px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.top){filter:drop-shadow(0px -2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(0px -4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(0px -8px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.left){filter:drop-shadow(-2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(-4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(-8px 0px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.right){filter:drop-shadow(2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(8px 0px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer) .arrow{position:absolute;width:.5825rem;height:.5825rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1}:where(post-popovercontainer) .arrow.top{border-left:2px solid rgba(0,0,0,0);border-top:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.right{border-right:2px solid rgba(0,0,0,0);border-top:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.left{border-left:2px solid rgba(0,0,0,0);border-bottom:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.bottom{border-right:2px solid rgba(0,0,0,0);border-bottom:2px solid rgba(0,0,0,0)}
|
|
@@ -13,11 +13,6 @@ const SIDE_MAP = {
|
|
|
13
13
|
* @slot - Default slot for placing content inside the popovercontainer.
|
|
14
14
|
*/
|
|
15
15
|
export class PostPopovercontainer {
|
|
16
|
-
constructor() {
|
|
17
|
-
this.placement = 'top';
|
|
18
|
-
this.edgeGap = 8;
|
|
19
|
-
this.arrow = false;
|
|
20
|
-
}
|
|
21
16
|
host;
|
|
22
17
|
arrowRef;
|
|
23
18
|
eventTarget;
|
|
@@ -27,8 +22,25 @@ export class PostPopovercontainer {
|
|
|
27
22
|
* Fires whenever the popover gets shown or hidden, passing the new state in event.details as a boolean
|
|
28
23
|
*/
|
|
29
24
|
postToggle;
|
|
25
|
+
/**
|
|
26
|
+
* Whether or not the popover should close when user clicks outside of it
|
|
27
|
+
*/
|
|
28
|
+
manualClose = false;
|
|
29
|
+
/**
|
|
30
|
+
* Defines the placement of the tooltip according to the floating-ui options available at https://floating-ui.com/docs/computePosition#placement.
|
|
31
|
+
* Tooltips are automatically flipped to the opposite side if there is not enough available space and are shifted
|
|
32
|
+
* towards the viewport if they would overlap edge boundaries.
|
|
33
|
+
*/
|
|
34
|
+
placement = 'top';
|
|
35
|
+
/**
|
|
36
|
+
* Gap between the edge of the page and the popover
|
|
37
|
+
*/
|
|
38
|
+
edgeGap = 8;
|
|
39
|
+
/**
|
|
40
|
+
* Wheter or not to display a little pointer arrow
|
|
41
|
+
*/
|
|
42
|
+
arrow = false;
|
|
30
43
|
componentDidLoad() {
|
|
31
|
-
this.host.setAttribute('popover', '');
|
|
32
44
|
this.host.addEventListener('beforetoggle', this.handleToggle.bind(this));
|
|
33
45
|
}
|
|
34
46
|
disconnectedCallback() {
|
|
@@ -146,9 +158,9 @@ export class PostPopovercontainer {
|
|
|
146
158
|
}
|
|
147
159
|
}
|
|
148
160
|
render() {
|
|
149
|
-
return (h(Host, { key: '
|
|
161
|
+
return (h(Host, { key: '6bebf9ab3013796d0eebb3d543411a0e80d2e913', "data-version": version, popover: this.manualClose ? 'manual' : 'auto' }, this.arrow && (h("span", { key: 'd6eca10452a54073a293128e8faf76e45e35c4c5', class: "arrow", ref: el => {
|
|
150
162
|
this.arrowRef = el;
|
|
151
|
-
} })), h("slot", { key: '
|
|
163
|
+
} })), h("slot", { key: '3b6674dfa1b3ffac10c6640717c7ae713577c965' })));
|
|
152
164
|
}
|
|
153
165
|
static get is() { return "post-popovercontainer"; }
|
|
154
166
|
static get originalStyleUrls() {
|
|
@@ -163,6 +175,26 @@ export class PostPopovercontainer {
|
|
|
163
175
|
}
|
|
164
176
|
static get properties() {
|
|
165
177
|
return {
|
|
178
|
+
"manualClose": {
|
|
179
|
+
"type": "boolean",
|
|
180
|
+
"mutable": false,
|
|
181
|
+
"complexType": {
|
|
182
|
+
"original": "boolean",
|
|
183
|
+
"resolved": "boolean",
|
|
184
|
+
"references": {}
|
|
185
|
+
},
|
|
186
|
+
"required": false,
|
|
187
|
+
"optional": false,
|
|
188
|
+
"docs": {
|
|
189
|
+
"tags": [],
|
|
190
|
+
"text": "Whether or not the popover should close when user clicks outside of it"
|
|
191
|
+
},
|
|
192
|
+
"getter": false,
|
|
193
|
+
"setter": false,
|
|
194
|
+
"attribute": "manual-close",
|
|
195
|
+
"reflect": false,
|
|
196
|
+
"defaultValue": "false"
|
|
197
|
+
},
|
|
166
198
|
"placement": {
|
|
167
199
|
"type": "string",
|
|
168
200
|
"mutable": false,
|
|
@@ -183,6 +215,8 @@ export class PostPopovercontainer {
|
|
|
183
215
|
"tags": [],
|
|
184
216
|
"text": "Defines the placement of the tooltip according to the floating-ui options available at https://floating-ui.com/docs/computePosition#placement.\nTooltips are automatically flipped to the opposite side if there is not enough available space and are shifted\ntowards the viewport if they would overlap edge boundaries."
|
|
185
217
|
},
|
|
218
|
+
"getter": false,
|
|
219
|
+
"setter": false,
|
|
186
220
|
"attribute": "placement",
|
|
187
221
|
"reflect": false,
|
|
188
222
|
"defaultValue": "'top'"
|
|
@@ -201,6 +235,8 @@ export class PostPopovercontainer {
|
|
|
201
235
|
"tags": [],
|
|
202
236
|
"text": "Gap between the edge of the page and the popover"
|
|
203
237
|
},
|
|
238
|
+
"getter": false,
|
|
239
|
+
"setter": false,
|
|
204
240
|
"attribute": "edge-gap",
|
|
205
241
|
"reflect": false,
|
|
206
242
|
"defaultValue": "8"
|
|
@@ -219,6 +255,8 @@ export class PostPopovercontainer {
|
|
|
219
255
|
"tags": [],
|
|
220
256
|
"text": "Wheter or not to display a little pointer arrow"
|
|
221
257
|
},
|
|
258
|
+
"getter": false,
|
|
259
|
+
"setter": false,
|
|
222
260
|
"attribute": "arrow",
|
|
223
261
|
"reflect": false,
|
|
224
262
|
"defaultValue": "false"
|