@swisspost/design-system-components 9.0.0-next.12 → 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/.config/bindings.angular.js +4 -0
- package/dist/cjs/{attribute-observer-10f08c04.js → attribute-observer-6d8b886b.js} +4 -4
- package/dist/cjs/{check-one-of-f4f5d0c0.js → check-one-of-ef931478.js} +2 -1
- package/dist/cjs/{check-type-64af82a9.js → check-type-696d2c51.js} +4 -4
- package/dist/cjs/{check-url-3ffdd2fb.js → check-url-1cf6fb0d.js} +2 -1
- package/dist/cjs/{debounce-1151afe3.js → debounce-158fd76f.js} +2 -1
- package/dist/cjs/fade-72d5ef55.js +14 -0
- package/dist/cjs/{index-f1b08cdb.js → index-0ee3ab4a.js} +334 -152
- package/dist/cjs/{index-5d4e0aed.js → index-bea4ac42.js} +7 -5
- package/dist/cjs/index.cjs.js +30 -28
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-0bd6fb0d.js → package-7d11b6ea.js} +1 -1
- package/dist/cjs/{post-accordion-7aadd881.js → post-accordion-29861d97.js} +15 -8
- package/dist/cjs/{post-accordion-item-bd033c7f.js → post-accordion-item-0da0f7aa.js} +20 -13
- package/dist/cjs/post-accordion-item.cjs.entry.js +7 -7
- package/dist/cjs/post-accordion.cjs.entry.js +4 -4
- package/dist/cjs/{post-avatar-5dbdf70d.js → post-avatar-01b9cd6d.js} +29 -21
- 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 +5 -5
- package/dist/cjs/post-banner-33929088.js +110 -0
- package/dist/cjs/post-banner.cjs.entry.js +8 -8
- package/dist/cjs/{post-breadcrumb-531c4f79.js → post-breadcrumb-1384018e.js} +41 -34
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +7 -7
- package/dist/cjs/post-breadcrumb.cjs.entry.js +5 -5
- package/dist/cjs/post-card-control-4c85eda3.js +314 -0
- package/dist/cjs/post-card-control.cjs.entry.js +4 -4
- package/dist/cjs/post-closebutton_15.cjs.entry.js +8 -8
- package/dist/cjs/{post-collapsible-trigger-02924200.js → post-collapsible-trigger-0fb2596a.js} +47 -35
- package/dist/cjs/post-collapsible_2.cjs.entry.js +8 -8
- package/dist/cjs/post-components.cjs.js +3 -3
- package/dist/cjs/{post-footer-96d7bd47.js → post-footer-f621a563.js} +18 -12
- 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-3f73fb4d.js → post-menu-item-ab3e2e7e.js} +12 -9
- package/dist/cjs/{post-popover-64195ffd.js → post-popover-a2ba9226.js} +24 -10
- package/dist/cjs/post-popover.cjs.entry.js +4 -4
- package/dist/cjs/{post-rating-bd27ebfc.js → post-rating-c402c294.js} +33 -10
- package/dist/cjs/post-rating.cjs.entry.js +3 -3
- package/dist/cjs/post-tab-header-c819517d.js +36 -0
- package/dist/cjs/post-tab-header.cjs.entry.js +3 -3
- package/dist/cjs/{post-tab-panel-3eedcd19.js → post-tab-panel-3cb207f3.js} +9 -6
- package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
- package/dist/cjs/{post-tabs-ea94b243.js → post-tabs-b6fa39c3.js} +29 -18
- package/dist/cjs/post-tabs.cjs.entry.js +4 -4
- package/dist/cjs/{post-tag-1d75024b.js → post-tag-9c366519.js} +20 -9
- package/dist/cjs/post-tag.cjs.entry.js +3 -3
- package/dist/cjs/{post-togglebutton-876f7892.js → post-togglebutton-d49bec2c.js} +682 -221
- package/dist/cjs/{post-tooltip-e4ef3c7e.js → post-tooltip-425c01ba.js} +24 -12
- package/dist/cjs/post-tooltip.cjs.entry.js +8 -8
- package/dist/cjs/{slide-5d51abe8.js → slide-8ae17ee4.js} +4 -4
- package/dist/collection/animations/collapse.js +5 -5
- package/dist/collection/animations/fade.js +6 -2
- package/dist/collection/animations/slide.js +4 -4
- package/dist/collection/collection-manifest.json +4 -3
- package/dist/collection/components/post-accordion/post-accordion.js +16 -6
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +21 -11
- package/dist/collection/components/post-avatar/post-avatar.js +35 -20
- 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 +14 -8
- package/dist/collection/components/post-banner/post-banner.css +1 -1
- package/dist/collection/components/post-banner/post-banner.js +40 -14
- package/dist/collection/components/post-breadcrumb/post-breadcrumb.js +41 -31
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +10 -6
- package/dist/collection/components/post-card-control/post-card-control.css +1 -1
- package/dist/collection/components/post-card-control/post-card-control.js +104 -43
- package/dist/collection/components/post-closebutton/post-closebutton.js +2 -1
- package/dist/collection/components/post-collapsible/post-collapsible.js +16 -6
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +25 -21
- package/dist/collection/components/post-footer/post-footer.js +9 -5
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +90 -15
- package/dist/collection/components/post-icon/post-icon.js +93 -23
- package/dist/collection/components/post-language-option/post-language-option.js +37 -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 +24 -7
- 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 +19 -6
- package/dist/collection/components/post-list-item/post-list-item.js +2 -1
- package/dist/collection/components/post-logo/post-logo.js +8 -4
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +197 -17
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +134 -64
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +18 -11
- package/dist/collection/components/post-menu/post-menu.js +56 -33
- package/dist/collection/components/post-menu-item/post-menu-item.js +1 -1
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +24 -16
- package/dist/collection/components/post-popover/post-popover.css +1 -1
- package/dist/collection/components/post-popover/post-popover.js +26 -5
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +55 -8
- package/dist/collection/components/post-rating/post-rating.js +39 -7
- package/dist/collection/components/post-tab-header/post-tab-header.css +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.js +9 -5
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +9 -5
- package/dist/collection/components/post-tabs/post-tabs.css +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +25 -18
- package/dist/collection/components/post-tag/post-tag.css +1 -1
- package/dist/collection/components/post-tag/post-tag.js +23 -5
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +18 -14
- package/dist/collection/components/post-tooltip/post-tooltip.js +26 -9
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/attribute-observer.js +4 -4
- package/dist/collection/utils/breakpoints.js +9 -6
- package/dist/collection/utils/component-on-ready.js +4 -4
- package/dist/collection/utils/debounce.js +2 -1
- package/dist/collection/utils/get-focusable-children.js +2 -2
- package/dist/collection/utils/property-checkers/check-one-of.js +2 -1
- package/dist/collection/utils/property-checkers/check-pattern.js +2 -1
- package/dist/collection/utils/property-checkers/check-type.js +4 -4
- package/dist/collection/utils/property-checkers/check-url.js +2 -1
- package/dist/collection/utils/property-checkers/empty-or.js +2 -1
- package/dist/collection/utils/sass-export.js +8 -5
- package/dist/components/index.js +36 -35
- package/dist/components/{post-collapsible-trigger2.js → p-05590ac0.js} +30 -27
- package/dist/components/{post-breadcrumb2.js → p-146677d1.js} +50 -43
- 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} +21 -15
- package/dist/components/{post-tooltip2.js → p-2d9b46b4.js} +26 -14
- package/dist/components/p-38778a14.js +345 -0
- package/dist/components/p-3aba7629.js +29 -0
- package/dist/components/{post-togglebutton2.js → p-3cee636a.js} +20 -17
- 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/{loaders/slide.js → dist/components/p-4af6dbed.js} +4 -4
- package/dist/components/{post-list2.js → p-536eba02.js} +19 -9
- package/dist/components/p-5653923a.js +44 -0
- package/dist/components/{post-footer2.js → p-58878996.js} +23 -17
- package/dist/components/{post-logo2.js → p-5f51ec58.js} +10 -7
- package/{loaders/post-popovercontainer2.js → dist/components/p-60cf53cc.js} +34 -11
- package/dist/components/p-64e3de38.js +11 -0
- package/dist/components/{post-accordion-item2.js → p-68ecd276.js} +26 -19
- package/dist/components/p-75b8b652.js +54 -0
- package/dist/components/{post-tab-panel2.js → p-78e1d893.js} +11 -8
- package/dist/components/{check-type.js → p-8562c7dc.js} +4 -4
- package/{loaders/post-menu-trigger2.js → dist/components/p-8b053fd5.js} +27 -20
- package/dist/components/{post-icon2.js → p-91031e3b.js} +85 -28
- package/dist/components/{post-menu2.js → p-91882483.js} +60 -65
- package/dist/{esm/attribute-observer-37fa950a.js → components/p-9748a355.js} +4 -4
- package/dist/components/{post-list-item2.js → p-9e4b1f10.js} +4 -4
- package/dist/components/{post-accordion2.js → p-a3a004e6.js} +17 -10
- package/dist/components/{post-popover2.js → p-af23f7de.js} +26 -12
- package/dist/components/{post-collapsible2.js → p-b018d864.js} +23 -14
- package/dist/components/{check-non-empty.js → p-b095519d.js} +1 -1
- package/dist/components/{check-one-of.js → p-bacd3e2c.js} +2 -1
- package/dist/components/{post-closebutton2.js → p-bf14d264.js} +6 -6
- package/dist/components/{post-breadcrumb-item2.js → p-c7c1d466.js} +13 -10
- package/dist/components/{post-tag2.js → p-cab43cee.js} +22 -11
- package/dist/components/{post-menu-item2.js → p-ccccf0c3.js} +4 -4
- package/dist/components/{post-tabs2.js → p-ce854a7d.js} +30 -19
- package/dist/components/{post-avatar2.js → p-d3fb70af.js} +31 -23
- package/dist/components/{post-language-option2.js → p-d47bb5bf.js} +32 -12
- package/dist/components/{debounce.js → p-e1baac59.js} +2 -1
- package/dist/components/{post-back-to-top2.js → p-e20366a6.js} +20 -15
- package/dist/components/{index2.js → p-eabb09ad.js} +9 -6
- package/dist/components/{post-language-switch2.js → p-f6d80d76.js} +29 -17
- package/dist/components/p-f7b9f90a.js +135 -0
- package/dist/components/{post-rating2.js → p-fc59de7c.js} +35 -12
- 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 +335 -156
- package/{loaders/attribute-observer.js → dist/esm/attribute-observer-2f203993.js} +4 -4
- package/{loaders/check-one-of.js → dist/esm/check-one-of-0d5858c0.js} +2 -1
- package/dist/esm/{check-type-8828dbe4.js → check-type-a6ccc9a3.js} +4 -4
- package/dist/esm/{check-url-a974431e.js → check-url-0bd876f7.js} +2 -1
- package/dist/esm/{debounce-abe98cc2.js → debounce-e54c7131.js} +2 -1
- package/dist/esm/fade-1f3cacf4.js +11 -0
- package/dist/esm/{index-6bfe6554.js → index-2c232bf2.js} +334 -152
- package/dist/esm/{index-b49c9904.js → index-d1bbbd88.js} +7 -5
- package/dist/esm/index.js +29 -28
- package/dist/esm/loader.js +3 -3
- package/dist/esm/package-8c98af5e.js +3 -0
- package/dist/esm/{post-accordion-ca48eb18.js → post-accordion-49fba403.js} +15 -8
- package/dist/esm/{post-accordion-item-a461f2a7.js → post-accordion-item-c516517a.js} +20 -13
- package/dist/esm/post-accordion-item.entry.js +7 -7
- package/dist/esm/post-accordion.entry.js +4 -4
- package/dist/esm/{post-avatar-0da1a2e8.js → post-avatar-b527ac63.js} +29 -21
- 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 +5 -5
- package/dist/esm/post-banner-0ad7758b.js +108 -0
- package/dist/esm/post-banner.entry.js +8 -8
- package/dist/esm/{post-breadcrumb-85ffd02f.js → post-breadcrumb-57bca9dd.js} +41 -34
- package/dist/esm/post-breadcrumb-item_2.entry.js +7 -7
- package/dist/esm/post-breadcrumb.entry.js +5 -5
- package/dist/esm/post-card-control-ea741f60.js +312 -0
- package/dist/esm/post-card-control.entry.js +4 -4
- package/dist/esm/post-closebutton_15.entry.js +8 -8
- package/dist/esm/{post-collapsible-trigger-883db3bf.js → post-collapsible-trigger-31155750.js} +47 -35
- package/dist/esm/post-collapsible_2.entry.js +8 -8
- package/dist/esm/post-components.js +4 -4
- package/dist/esm/{post-footer-7b0eb067.js → post-footer-cdde2086.js} +18 -12
- 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-37f637a3.js → post-menu-item-db732728.js} +12 -9
- package/dist/esm/{post-popover-c24ecd38.js → post-popover-00f427ac.js} +24 -10
- package/dist/esm/post-popover.entry.js +4 -4
- package/dist/esm/{post-rating-e1c66e5c.js → post-rating-cdcb2a1d.js} +33 -10
- package/dist/esm/post-rating.entry.js +3 -3
- package/dist/esm/post-tab-header-1d4113cb.js +34 -0
- package/dist/esm/post-tab-header.entry.js +3 -3
- package/dist/esm/{post-tab-panel-73b56a16.js → post-tab-panel-7a5c03ef.js} +9 -6
- package/dist/esm/post-tab-panel.entry.js +3 -3
- package/dist/esm/{post-tabs-02e523b8.js → post-tabs-308190c0.js} +29 -18
- package/dist/esm/post-tabs.entry.js +4 -4
- package/dist/esm/{post-tag-43aba068.js → post-tag-aebbda10.js} +20 -9
- package/dist/esm/post-tag.entry.js +3 -3
- package/dist/esm/{post-togglebutton-c2231709.js → post-togglebutton-95ba85d2.js} +682 -221
- package/dist/esm/{post-tooltip-8271950c.js → post-tooltip-918d3a54.js} +24 -12
- package/dist/esm/post-tooltip.entry.js +8 -8
- package/dist/{components/slide.js → esm/slide-62768431.js} +4 -4
- 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-1fda117c.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-e2f886ab.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-4af6dbed.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-64e3de38.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-7c9758fa.js +1 -0
- 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-9748a355.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-b0afc087.entry.js +1 -0
- 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-c510d968.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/animations/collapse.d.ts +2 -2
- package/dist/types/animations/fade.d.ts +2 -2
- package/dist/types/animations/slide.d.ts +2 -2
- package/dist/types/components/post-header/post-header.d.ts +11 -2
- package/dist/types/components/post-icon/post-icon.d.ts +1 -1
- 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/post-tabs/post-tabs.d.ts +1 -1
- package/dist/types/components.d.ts +51 -25
- package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/.config/bindings.angular.d.ts +2 -0
- package/dist/types/index.d.ts +3 -2
- package/dist/types/stencil-public-runtime.d.ts +6 -0
- package/dist/types/utils/attribute-observer.d.ts +1 -1
- package/dist/types/utils/component-on-ready.d.ts +1 -1
- package/dist/types/utils/get-focusable-children.d.ts +1 -1
- package/dist/types/utils/sass-export.d.ts +5 -1
- package/loaders/index.d.ts +2 -0
- package/loaders/index.js +3 -2
- package/loaders/{post-collapsible-trigger2.js → p-05590ac0.js} +30 -27
- package/loaders/{post-breadcrumb-item2.js → p-1beacb73.js} +13 -10
- package/loaders/p-2083ae2c.js +3 -0
- package/loaders/p-3aba7629.js +29 -0
- package/loaders/p-3e8554e7.js +1646 -0
- package/{dist/esm/slide-3422b8a3.js → loaders/p-4af6dbed.js} +4 -4
- package/loaders/{index2.js → p-56ad4838.js} +9 -6
- package/{dist/components/post-popovercontainer2.js → loaders/p-60cf53cc.js} +34 -11
- package/loaders/p-64e3de38.js +11 -0
- package/loaders/{post-accordion-item2.js → p-83baa315.js} +26 -19
- package/loaders/{check-type.js → p-8562c7dc.js} +4 -4
- package/{dist/components/post-menu-trigger2.js → loaders/p-8b053fd5.js} +27 -20
- package/loaders/{post-menu2.js → p-91882483.js} +60 -65
- package/{dist/components/attribute-observer.js → loaders/p-9748a355.js} +4 -4
- package/loaders/{post-collapsible2.js → p-9fac5d7d.js} +23 -14
- package/loaders/{check-non-empty.js → p-b095519d.js} +1 -1
- package/{dist/esm/check-one-of-6b3ef8eb.js → loaders/p-bacd3e2c.js} +2 -1
- package/loaders/{post-menu-item2.js → p-ccccf0c3.js} +4 -4
- package/loaders/{debounce.js → p-e1baac59.js} +2 -1
- package/loaders/{post-icon2.js → p-f7177e26.js} +85 -28
- package/loaders/p-f7b9f90a.js +135 -0
- package/loaders/post-accordion-item.js +1 -1
- package/loaders/post-accordion.js +17 -10
- package/loaders/post-avatar.js +31 -23
- package/loaders/post-back-to-top.js +20 -15
- package/loaders/post-banner.js +42 -23
- package/loaders/post-breadcrumb-item.js +1 -1
- package/loaders/post-breadcrumb.js +50 -43
- package/loaders/post-card-control.js +93 -51
- package/loaders/post-closebutton.js +6 -6
- package/loaders/post-collapsible-trigger.js +1 -1
- package/loaders/post-collapsible.js +1 -1
- package/loaders/post-footer.js +23 -17
- package/loaders/post-header.js +74 -154
- package/loaders/post-icon.js +1 -1
- package/loaders/post-language-option.js +32 -12
- package/loaders/post-language-switch.js +29 -17
- package/loaders/post-linkarea.d.ts +11 -0
- package/loaders/post-linkarea.js +47 -0
- package/loaders/post-list-item.js +4 -4
- package/loaders/post-list.js +19 -9
- package/loaders/post-logo.js +10 -7
- package/loaders/post-mainnavigation.js +197 -8
- package/loaders/post-megadropdown-trigger.js +21 -15
- package/loaders/post-megadropdown.js +119 -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 +26 -12
- package/loaders/post-popovercontainer.js +1 -1
- package/loaders/post-rating.js +35 -12
- package/loaders/post-tab-header.js +13 -10
- package/loaders/post-tab-panel.js +11 -8
- package/loaders/post-tabs.js +30 -19
- package/loaders/post-tag.js +22 -11
- package/loaders/post-togglebutton.js +20 -17
- package/loaders/post-tooltip.js +26 -14
- package/package.json +19 -16
- package/dist/cjs/fade-35a3633a.js +0 -10
- package/dist/cjs/post-back-to-top-71bc912c.js +0 -75
- package/dist/cjs/post-banner-d4e0c73c.js +0 -91
- package/dist/cjs/post-card-control-332f6f1f.js +0 -272
- package/dist/cjs/post-tab-header-1f057694.js +0 -33
- package/dist/components/fade.js +0 -7
- package/dist/components/package.js +0 -3
- package/dist/components/post-banner2.js +0 -126
- package/dist/components/post-card-control2.js +0 -303
- package/dist/components/post-header2.js +0 -279
- package/dist/components/post-mainnavigation2.js +0 -48
- package/dist/components/post-megadropdown2.js +0 -100
- package/dist/components/post-tab-header2.js +0 -51
- package/dist/esm/fade-7fd71785.js +0 -7
- package/dist/esm/package-f8f7bb40.js +0 -3
- package/dist/esm/post-back-to-top-77471a90.js +0 -73
- package/dist/esm/post-banner-b0af5bd3.js +0 -89
- package/dist/esm/post-card-control-3225eb57.js +0 -270
- package/dist/esm/post-tab-header-6a9b0153.js +0 -31
- package/dist/post-components/p-025688e5.js +0 -1
- package/dist/post-components/p-08b51b35.entry.js +0 -1
- package/dist/post-components/p-0e216cc4.js +0 -2
- package/dist/post-components/p-24c92608.js +0 -1
- package/dist/post-components/p-25a57971.js +0 -1
- package/dist/post-components/p-2737eaf5.js +0 -1
- package/dist/post-components/p-2cb4a8f1.js +0 -1
- package/dist/post-components/p-33b64e0c.js +0 -1
- package/dist/post-components/p-34d70cd5.js +0 -1
- package/dist/post-components/p-350f3900.entry.js +0 -1
- package/dist/post-components/p-35bc4554.js +0 -1
- package/dist/post-components/p-38b259a4.entry.js +0 -1
- package/dist/post-components/p-3c6cef1e.entry.js +0 -1
- package/dist/post-components/p-4a713cf8.js +0 -1
- package/dist/post-components/p-4b5e2b24.js +0 -1
- package/dist/post-components/p-515e0f96.js +0 -1
- package/dist/post-components/p-5467b223.js +0 -1
- package/dist/post-components/p-54e58fc2.entry.js +0 -1
- package/dist/post-components/p-637759d6.js +0 -1
- package/dist/post-components/p-6adeaa6c.js +0 -1
- package/dist/post-components/p-7589a19f.js +0 -1
- package/dist/post-components/p-7cce7342.entry.js +0 -1
- package/dist/post-components/p-819e19de.js +0 -1
- package/dist/post-components/p-82d48128.js +0 -1
- package/dist/post-components/p-85171893.entry.js +0 -1
- package/dist/post-components/p-882fdd0c.entry.js +0 -1
- package/dist/post-components/p-94399c69.js +0 -1
- package/dist/post-components/p-9a02b162.entry.js +0 -1
- package/dist/post-components/p-b1f5bc26.js +0 -1
- package/dist/post-components/p-b2f239a1.entry.js +0 -1
- package/dist/post-components/p-b571e5c8.js +0 -1
- package/dist/post-components/p-ba530822.js +0 -1
- package/dist/post-components/p-bae1c85f.entry.js +0 -1
- package/dist/post-components/p-bdabdec5.js +0 -1
- package/dist/post-components/p-c1225174.entry.js +0 -1
- package/dist/post-components/p-c372a141.entry.js +0 -1
- package/dist/post-components/p-c87c5d59.entry.js +0 -1
- package/dist/post-components/p-d04c1b7f.entry.js +0 -1
- package/dist/post-components/p-da300843.entry.js +0 -1
- package/dist/post-components/p-fec04a15.entry.js +0 -1
- package/loaders/fade.js +0 -7
- 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/{index.browser.js → p-5959f2bd.js} +0 -0
- /package/dist/components/{get-root.js → p-fc91cbc2.js} +0 -0
- /package/dist/post-components/{p-4a3f67ab.js → p-8562c7dc.js} +0 -0
- /package/dist/post-components/{p-611b3c41.js → p-bacd3e2c.js} +0 -0
- /package/dist/post-components/{p-b22656b1.js → p-cb9ab938.js} +0 -0
- /package/dist/post-components/{p-d4f93f2b.js → p-e1baac59.js} +0 -0
- /package/loaders/{heading-levels.js → p-247a1668.js} +0 -0
- /package/loaders/{constants.js → p-440193f4.js} +0 -0
- /package/loaders/{index.browser.js → p-5959f2bd.js} +0 -0
- /package/loaders/{get-root.js → p-fc91cbc2.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const easing = 'ease';
|
|
2
2
|
const duration = 500;
|
|
3
3
|
const fill = 'forwards';
|
|
4
|
-
|
|
4
|
+
function slideUp(el, translateSize = '100%') {
|
|
5
5
|
return el.animate([
|
|
6
6
|
{ transform: `translateY(${translateSize})` }, // Starting position (no translation)
|
|
7
7
|
{ transform: 'translateY(0)' }, // End position
|
|
@@ -10,8 +10,8 @@ const slideUp = (el, translateSize = '100%') => {
|
|
|
10
10
|
easing,
|
|
11
11
|
fill,
|
|
12
12
|
});
|
|
13
|
-
}
|
|
14
|
-
|
|
13
|
+
}
|
|
14
|
+
function slideDown(el, translateSize = '100%') {
|
|
15
15
|
return el.animate([
|
|
16
16
|
{ transform: 'translateY(0)' }, // Starting position (no translation)
|
|
17
17
|
{ transform: `translateY(${translateSize})` }, // End position
|
|
@@ -20,6 +20,6 @@ const slideDown = (el, translateSize = '100%') => {
|
|
|
20
20
|
easing,
|
|
21
21
|
fill,
|
|
22
22
|
});
|
|
23
|
-
}
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
export { slideDown as a, slideUp as s };
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
import { E as EMPTY_VALUES } from './
|
|
2
|
-
import { c as checkOneOf } from './
|
|
3
|
-
import { c as checkType } from './
|
|
1
|
+
import { E as EMPTY_VALUES } from './p-440193f4.js';
|
|
2
|
+
import { c as checkOneOf } from './p-bacd3e2c.js';
|
|
3
|
+
import { c as checkType } from './p-8562c7dc.js';
|
|
4
4
|
|
|
5
5
|
function emptyOr(check) {
|
|
6
6
|
return (...args) => {
|
|
7
7
|
const value = args[0];
|
|
8
|
-
if (!EMPTY_VALUES.some(v => v === value))
|
|
8
|
+
if (!EMPTY_VALUES.some(v => v === value)) {
|
|
9
9
|
check(...args);
|
|
10
|
+
}
|
|
10
11
|
};
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
function checkPattern(value, pattern, errorMessage) {
|
|
14
|
-
if (typeof value !== 'string' || !pattern.test(value))
|
|
15
|
+
if (typeof value !== 'string' || !pattern.test(value)) {
|
|
15
16
|
throw new Error(errorMessage);
|
|
17
|
+
}
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
function checkUrl(value, error) {
|
|
19
|
-
if (typeof value !== 'string' && !(value instanceof URL))
|
|
21
|
+
if (typeof value !== 'string' && !(value instanceof URL)) {
|
|
20
22
|
throw new Error(error);
|
|
23
|
+
}
|
|
21
24
|
try {
|
|
22
25
|
new URL(value);
|
|
23
26
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { proxyCustomElement,
|
|
2
|
-
import { v as version } from './
|
|
1
|
+
import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-3e8554e7.js';
|
|
2
|
+
import { v as version } from './p-2083ae2c.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Custom positioning reference element.
|
|
@@ -2103,7 +2103,7 @@ const computePosition = (reference, floating, options) => {
|
|
|
2103
2103
|
}
|
|
2104
2104
|
`,E=null;function I(e){if(E===null)try{E=new CSSStyleSheet,E.replaceSync(C);}catch{E=!1;}if(E===!1){let t=document.createElement("style");t.textContent=C,e instanceof Document?e.head.prepend(t):e.prepend(t);}else e.adoptedStyleSheets=[E,...e.adoptedStyleSheets];}function K(){window.ToggleEvent=window.ToggleEvent||c;function e(n){return n?.includes(":popover-open")&&(n=n.replace(J,"$1.\\:popover-open")),n}f(Document.prototype,"querySelector",e),f(Document.prototype,"querySelectorAll",e),f(Element.prototype,"querySelector",e),f(Element.prototype,"querySelectorAll",e),f(Element.prototype,"matches",e),f(Element.prototype,"closest",e),f(DocumentFragment.prototype,"querySelectorAll",e),f(DocumentFragment.prototype,"querySelectorAll",e),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;let n=(this.getAttribute("popover")||"").toLowerCase();return n===""||n=="auto"?"auto":"manual"},set(n){this.setAttribute("popover",n);}},showPopover:{enumerable:!0,configurable:!0,value(){S(this);}},hidePopover:{enumerable:!0,configurable:!0,value(){m(this,!0,!0);}},togglePopover:{enumerable:!0,configurable:!0,value(n){h.get(this)==="showing"&&n===void 0||n===!1?m(this,!0,!0):(n===void 0||n===!0)&&S(this);}}});let t=Element.prototype.attachShadow;t&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(n){let s=t.call(this,n);return I(s),s}}});let o=HTMLElement.prototype.attachInternals;o&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){let n=o.call(this);return n.shadowRoot&&I(n.shadowRoot),n}}});let r=new WeakMap;function i(n){Object.defineProperties(n.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(s){if(s===null)this.removeAttribute("popovertarget"),r.delete(this);else if(s instanceof Element)this.setAttribute("popovertarget",""),r.set(this,s);else throw new TypeError("popoverTargetElement must be an element or null")},get(){if(this.localName!=="button"&&this.localName!=="input"||this.localName==="input"&&this.type!=="reset"&&this.type!=="image"&&this.type!=="button"||this.disabled||this.form&&this.type==="submit")return null;let s=r.get(this);if(s&&s.isConnected)return s;if(s&&!s.isConnected)return r.delete(this),null;let u=v(this),w=this.getAttribute("popovertarget");return (u instanceof Document||u instanceof B)&&w&&u.getElementById(w)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){let s=(this.getAttribute("popovertargetaction")||"").toLowerCase();return s==="show"||s==="hide"?s:"toggle"},set(s){this.setAttribute("popovertargetaction",s);}}});}i(HTMLButtonElement),i(HTMLInputElement);let l=n=>{if(!n.isTrusted)return;let s=n.composedPath()[0];if(!(s instanceof Element)||s?.shadowRoot)return;let u=v(s);if(!(u instanceof B||u instanceof Document))return;let w=s.closest("[popovertargetaction],[popovertarget]");if(w){O(w),n.preventDefault();return}},a=n=>{let s=n.key,u=n.target;!n.defaultPrevented&&u&&(s==="Escape"||s==="Esc")&&T(u.ownerDocument,!0,!0);};(n=>{n.addEventListener("click",l),n.addEventListener("keydown",a),n.addEventListener("pointerdown",x),n.addEventListener("pointerup",x);})(document),I(document);}j()||K();})();
|
|
2105
2105
|
|
|
2106
|
-
const postPopovercontainerCss = "@layer polyfill{@supports not selector(:popover-open){[popover]:not(.\\:popover-open){display:none}}}:where(post-popovercontainer){box-shadow
|
|
2106
|
+
const postPopovercontainerCss = "@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)}";
|
|
2107
2107
|
const PostPopovercontainerStyle0 = postPopovercontainerCss;
|
|
2108
2108
|
|
|
2109
2109
|
const SIDE_MAP = {
|
|
@@ -2112,17 +2112,40 @@ const SIDE_MAP = {
|
|
|
2112
2112
|
bottom: 'top',
|
|
2113
2113
|
left: 'right',
|
|
2114
2114
|
};
|
|
2115
|
-
const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopovercontainer extends
|
|
2115
|
+
const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopovercontainer extends H {
|
|
2116
2116
|
constructor() {
|
|
2117
2117
|
super();
|
|
2118
2118
|
this.__registerHost();
|
|
2119
2119
|
this.postToggle = createEvent(this, "postToggle", 7);
|
|
2120
|
-
this.placement = 'top';
|
|
2121
|
-
this.edgeGap = 8;
|
|
2122
|
-
this.arrow = false;
|
|
2123
2120
|
}
|
|
2121
|
+
get host() { return this; }
|
|
2122
|
+
arrowRef;
|
|
2123
|
+
eventTarget;
|
|
2124
|
+
clearAutoUpdate;
|
|
2125
|
+
toggleTimeoutId;
|
|
2126
|
+
/**
|
|
2127
|
+
* Fires whenever the popover gets shown or hidden, passing the new state in event.details as a boolean
|
|
2128
|
+
*/
|
|
2129
|
+
postToggle;
|
|
2130
|
+
/**
|
|
2131
|
+
* Whether or not the popover should close when user clicks outside of it
|
|
2132
|
+
*/
|
|
2133
|
+
manualClose = false;
|
|
2134
|
+
/**
|
|
2135
|
+
* Defines the placement of the tooltip according to the floating-ui options available at https://floating-ui.com/docs/computePosition#placement.
|
|
2136
|
+
* Tooltips are automatically flipped to the opposite side if there is not enough available space and are shifted
|
|
2137
|
+
* towards the viewport if they would overlap edge boundaries.
|
|
2138
|
+
*/
|
|
2139
|
+
placement = 'top';
|
|
2140
|
+
/**
|
|
2141
|
+
* Gap between the edge of the page and the popover
|
|
2142
|
+
*/
|
|
2143
|
+
edgeGap = 8;
|
|
2144
|
+
/**
|
|
2145
|
+
* Wheter or not to display a little pointer arrow
|
|
2146
|
+
*/
|
|
2147
|
+
arrow = false;
|
|
2124
2148
|
componentDidLoad() {
|
|
2125
|
-
this.host.setAttribute('popover', '');
|
|
2126
2149
|
this.host.addEventListener('beforetoggle', this.handleToggle.bind(this));
|
|
2127
2150
|
}
|
|
2128
2151
|
disconnectedCallback() {
|
|
@@ -2240,13 +2263,13 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2240
2263
|
}
|
|
2241
2264
|
}
|
|
2242
2265
|
render() {
|
|
2243
|
-
return (h(Host, { key: '
|
|
2266
|
+
return (h(Host, { key: '6bebf9ab3013796d0eebb3d543411a0e80d2e913', "data-version": version, popover: this.manualClose ? 'manual' : 'auto' }, this.arrow && (h("span", { key: 'd6eca10452a54073a293128e8faf76e45e35c4c5', class: "arrow", ref: el => {
|
|
2244
2267
|
this.arrowRef = el;
|
|
2245
|
-
} })), h("slot", { key: '
|
|
2268
|
+
} })), h("slot", { key: '3b6674dfa1b3ffac10c6640717c7ae713577c965' })));
|
|
2246
2269
|
}
|
|
2247
|
-
get host() { return this; }
|
|
2248
2270
|
static get style() { return PostPopovercontainerStyle0; }
|
|
2249
2271
|
}, [4, "post-popovercontainer", {
|
|
2272
|
+
"manualClose": [4, "manual-close"],
|
|
2250
2273
|
"placement": [1],
|
|
2251
2274
|
"edgeGap": [2, "edge-gap"],
|
|
2252
2275
|
"arrow": [4],
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const fadeDuration = 200;
|
|
2
|
+
const fadedOutKeyframe = { opacity: '0' };
|
|
3
|
+
const fadedInKeyframe = { opacity: '1' };
|
|
4
|
+
function fadeIn(el) {
|
|
5
|
+
return el.animate([fadedOutKeyframe, fadedInKeyframe], { duration: fadeDuration });
|
|
6
|
+
}
|
|
7
|
+
function fadeOut(el) {
|
|
8
|
+
return el.animate([fadedInKeyframe, fadedOutKeyframe], { duration: fadeDuration });
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { fadeIn as a, fadeOut as f };
|
|
@@ -1,25 +1,34 @@
|
|
|
1
|
-
import { proxyCustomElement,
|
|
2
|
-
import { v as version } from './
|
|
3
|
-
import { H as HEADING_LEVELS } from './
|
|
4
|
-
import { b as checkEmptyOrOneOf } from './
|
|
5
|
-
import { n as nanoid } from './
|
|
6
|
-
import { d as defineCustomElement$3 } from './
|
|
7
|
-
import { d as defineCustomElement$2 } from './
|
|
8
|
-
import { d as defineCustomElement$1 } from './
|
|
1
|
+
import { p as proxyCustomElement, H, h, c as Host } from './p-3e8554e7.js';
|
|
2
|
+
import { v as version } from './p-2083ae2c.js';
|
|
3
|
+
import { H as HEADING_LEVELS } from './p-247a1668.js';
|
|
4
|
+
import { b as checkEmptyOrOneOf } from './p-56ad4838.js';
|
|
5
|
+
import { n as nanoid } from './p-5959f2bd.js';
|
|
6
|
+
import { d as defineCustomElement$3 } from './p-9fac5d7d.js';
|
|
7
|
+
import { d as defineCustomElement$2 } from './p-05590ac0.js';
|
|
8
|
+
import { d as defineCustomElement$1 } from './p-f7177e26.js';
|
|
9
9
|
|
|
10
10
|
const postAccordionItemCss = ":host::after{display:block;content:\"\";margin-top:calc(var(--post-device-border-width-default)*-1);border-bottom:var(--post-device-border-width-default) var(--post-core-border-style-solid) var(--post-scheme-color-interactive-primary-enabled-stroke)}:host:has(.accordion-button:hover)::after{border-color:var(--post-scheme-color-interactive-primary-hover-stroke)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host:has(.accordion-button:hover)::after{border-color:Highlight}}.accordion-header{color:var(--post-scheme-color-interactive-primary-enabled-fg1);font-size:var(--post-device-font-size-5);margin:0;line-height:var(--post-device-line-height-heading);font-weight:var(--post-device-font-weight-black)}.accordion-button{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button;display:flex;position:relative;width:100%;align-items:center;text-align:start;gap:var(--post-device-spacing-gap-7);padding:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default)) calc(var(--post-device-spacing-padding-5) + var(--post-device-border-width-default));cursor:pointer}.accordion-button::before{display:block;position:absolute;content:\"\";inset:0;bottom:auto;border-top:var(--post-accordion-button-border-top)}.accordion-button{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}.accordion-button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.accordion-button:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.accordion-button slot::slotted(span[slot=header]){flex-grow:1}.accordion-button post-icon{flex:none;width:var(--post-core-dimension-24);aspect-ratio:1;transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1)}.accordion-button.collapsed{padding-block-start:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default));padding-block-end:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default))}.accordion-button.collapsed post-icon{transform:rotate(-180deg)}.accordion-button:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}.accordion-button>::slotted(.text-truncate){display:block}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:hover,.accordion-button:focus-visible{color:Highlight}}.accordion-body{padding-block-start:var(--post-device-spacing-padding-15);padding-block-end:calc(var(--post-device-spacing-padding-block-25) + var(--post-device-border-width-default));padding-inline:var(--post-device-spacing-padding-5)}.logo-container{display:none;width:var(--post-device-sizing-logo-1);aspect-ratio:1}.logo-container.has-image{display:block}.logo-container slot::slotted(img){display:block;width:100%;height:100%;object-fit:cover}.accordion-button>::slotted(:first-child),.accordion-body>::slotted(:first-child){margin-block-start:0 !important}.accordion-button>::slotted(:last-child),.accordion-body>::slotted(:last-child){margin-block-end:0 !important}";
|
|
11
11
|
const PostAccordionItemStyle0 = postAccordionItemCss;
|
|
12
12
|
|
|
13
|
-
const PostAccordionItem = /*@__PURE__*/ proxyCustomElement(class PostAccordionItem extends
|
|
13
|
+
const PostAccordionItem = /*@__PURE__*/ proxyCustomElement(class PostAccordionItem extends H {
|
|
14
14
|
constructor() {
|
|
15
15
|
super();
|
|
16
16
|
this.__registerHost();
|
|
17
17
|
this.__attachShadow();
|
|
18
|
-
this.id = undefined;
|
|
19
|
-
this.slottedLogo = undefined;
|
|
20
|
-
this.collapsed = false;
|
|
21
|
-
this.headingLevel = undefined;
|
|
22
18
|
}
|
|
19
|
+
collapsible;
|
|
20
|
+
get host() { return this; }
|
|
21
|
+
id;
|
|
22
|
+
slottedLogo;
|
|
23
|
+
/**
|
|
24
|
+
* If `true`, the element is collapsed otherwise it is displayed.
|
|
25
|
+
*/
|
|
26
|
+
collapsed = false;
|
|
27
|
+
/**
|
|
28
|
+
* Defines the hierarchical level of the accordion item header within the headings structure.
|
|
29
|
+
* @deprecated set the `heading-level` property on the parent `post-accordion` instead.
|
|
30
|
+
*/
|
|
31
|
+
headingLevel;
|
|
23
32
|
validateHeadingLevel(newValue = this.headingLevel) {
|
|
24
33
|
checkEmptyOrOneOf(newValue, HEADING_LEVELS, 'The `heading-level` property of the `post-accordion-item` must be a number between 1 and 6.');
|
|
25
34
|
}
|
|
@@ -49,15 +58,13 @@ const PostAccordionItem = /*@__PURE__*/ proxyCustomElement(class PostAccordionIt
|
|
|
49
58
|
this.slottedLogo = this.host.querySelector('img[slot="logo"]');
|
|
50
59
|
}
|
|
51
60
|
render() {
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
return (h(Host, { key: '77851385edd1910f539ce61f1bf90bcebdeaa9ee', id: this.id, "data-version": version }, h("div", { key: '0d7ab4f69e350658908ac54aa1bdbdf07003f0e1', part: "accordion-item", class: "accordion-item" }, h("post-collapsible-trigger", { key: 'b0cc3c14a98575e1db7093a668557ee021fd7f8e', for: `${this.id}--collapse` }, h(HeadingTag, { key: '33f3066f1a866b519084012517d548dd9abd8093', class: "accordion-header", id: `${this.id}--header` }, h("button", { key: '1c29d71ea84789427c4bb4ca6f75f56ef0bc242e', type: "button", class: `accordion-button${this.collapsed ? ' collapsed' : ''}`, part: "button" }, h("span", { key: '0324ff7aa3e48a4b7964f043ae99cb5e136fbb54', class: {
|
|
61
|
+
const headingLevel = this.host.closest('post-accordion')?.getAttribute('heading-level');
|
|
62
|
+
const HeadingTag = `h${headingLevel ?? this.headingLevel ?? 2}`;
|
|
63
|
+
return (h(Host, { key: 'f1275370d7aff41e1fc60285395af35a1ecc90e7', id: this.id, "data-version": version }, h("div", { key: 'd74f762805143939a891e40cfa7a4779ea29921d', part: "accordion-item", class: "accordion-item" }, h("post-collapsible-trigger", { key: '5ddad810d8b1f8564bdaaf2b09e9e89eee96e007', for: `${this.id}--collapse` }, h(HeadingTag, { key: 'fc6dc947d426bb31de04e83d8c9795a0c826733c', class: "accordion-header", id: `${this.id}--header` }, h("button", { key: 'bd8005bb87e8e00fee57794bd73c5f06cb642a3d', type: "button", class: `accordion-button${this.collapsed ? ' collapsed' : ''}`, part: "button" }, h("span", { key: '89eb0b80e63867e2dcd6b27d95c6519d1e86b10d', class: {
|
|
56
64
|
'logo-container': true,
|
|
57
65
|
'has-image': !!this.slottedLogo,
|
|
58
|
-
} }, h("slot", { key: '
|
|
66
|
+
} }, h("slot", { key: '0940530a15ce04b50af007db7f1530ae3c6a456d', name: "logo", onSlotchange: this.onSlotLogoChange.bind(this) })), h("slot", { key: 'f06a6b067727be0667b4ea9384e75ee8aa435bfc', name: "header" }), h("post-icon", { key: '460b2c22083cc3049e0c83fc690cb44e3f984db7', name: "2051" })))), h("post-collapsible", { key: '2411f1f93d136ae0bfcbf0da9bb2902d7da0e2a0', id: `${this.id}--collapse`, collapsed: this.collapsed, ref: el => (this.collapsible = el) }, h("div", { key: 'e648a76e35c28bc1aa5cc57233bf6e8277532294', class: "accordion-body", part: "body" }, h("slot", { key: '7841fff45f2132990d8f1577dfe7d3707d1eb46c' }))))));
|
|
59
67
|
}
|
|
60
|
-
get host() { return this; }
|
|
61
68
|
static get watchers() { return {
|
|
62
69
|
"headingLevel": ["validateHeadingLevel"]
|
|
63
70
|
}; }
|
|
@@ -2,12 +2,12 @@ function checkType(value, type, error) {
|
|
|
2
2
|
const typeIsArray = type === 'array';
|
|
3
3
|
const valueIsArray = Array.isArray(value);
|
|
4
4
|
if (typeIsArray || valueIsArray) {
|
|
5
|
-
if (valueIsArray !== typeIsArray)
|
|
5
|
+
if (valueIsArray !== typeIsArray) {
|
|
6
6
|
throw new Error(error);
|
|
7
|
+
}
|
|
7
8
|
}
|
|
8
|
-
else {
|
|
9
|
-
|
|
10
|
-
throw new Error(error);
|
|
9
|
+
else if (typeof value !== type) {
|
|
10
|
+
throw new Error(error);
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
import { proxyCustomElement,
|
|
2
|
-
import { v as version } from './
|
|
3
|
-
import { c as checkType } from './
|
|
4
|
-
import { g as getRoot } from './
|
|
1
|
+
import { p as proxyCustomElement, H, h, c as Host } from './p-3e8554e7.js';
|
|
2
|
+
import { v as version } from './p-2083ae2c.js';
|
|
3
|
+
import { c as checkType } from './p-8562c7dc.js';
|
|
4
|
+
import { g as getRoot } from './p-fc91cbc2.js';
|
|
5
5
|
|
|
6
6
|
const postMenuTriggerCss = ":host{display:inline-block}";
|
|
7
7
|
const PostMenuTriggerStyle0 = postMenuTriggerCss;
|
|
8
8
|
|
|
9
|
-
const PostMenuTrigger = /*@__PURE__*/ proxyCustomElement(class PostMenuTrigger extends
|
|
9
|
+
const PostMenuTrigger = /*@__PURE__*/ proxyCustomElement(class PostMenuTrigger extends H {
|
|
10
10
|
constructor() {
|
|
11
11
|
super();
|
|
12
12
|
this.__registerHost();
|
|
13
|
-
/**
|
|
14
|
-
* Reference to the slotted button within the trigger, if present.
|
|
15
|
-
* Used to manage click and key events for menu control.
|
|
16
|
-
*/
|
|
17
|
-
this.slottedButton = null;
|
|
18
|
-
this.handleKeyDown = (e) => {
|
|
19
|
-
if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
|
|
20
|
-
e.preventDefault();
|
|
21
|
-
this.handleToggle();
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
this.for = undefined;
|
|
25
|
-
this.ariaExpanded = false;
|
|
26
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* ID of the menu element that this trigger is linked to. Used to open and close the specified menu.
|
|
16
|
+
*/
|
|
17
|
+
for;
|
|
18
|
+
get host() { return this; }
|
|
19
|
+
/**
|
|
20
|
+
* Manages the accessibility attribute `aria-expanded` to indicate whether the associated menu is expanded or collapsed.
|
|
21
|
+
*/
|
|
22
|
+
ariaExpanded = false;
|
|
23
|
+
/**
|
|
24
|
+
* Reference to the slotted button within the trigger, if present.
|
|
25
|
+
* Used to manage click and key events for menu control.
|
|
26
|
+
*/
|
|
27
|
+
slottedButton = null;
|
|
28
|
+
root;
|
|
27
29
|
/**
|
|
28
30
|
* Watch for changes to the `for` property to validate its type and ensure it is a string.
|
|
29
31
|
* @param forValue - The new value of the `for` property.
|
|
@@ -46,6 +48,12 @@ const PostMenuTrigger = /*@__PURE__*/ proxyCustomElement(class PostMenuTrigger e
|
|
|
46
48
|
console.warn(`No post-menu found with ID: ${this.for}`);
|
|
47
49
|
}
|
|
48
50
|
}
|
|
51
|
+
handleKeyDown = (e) => {
|
|
52
|
+
if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
|
|
53
|
+
e.preventDefault();
|
|
54
|
+
this.handleToggle();
|
|
55
|
+
}
|
|
56
|
+
};
|
|
49
57
|
componentDidLoad() {
|
|
50
58
|
this.root = getRoot(this.host);
|
|
51
59
|
this.validateControlFor();
|
|
@@ -72,9 +80,8 @@ const PostMenuTrigger = /*@__PURE__*/ proxyCustomElement(class PostMenuTrigger e
|
|
|
72
80
|
}
|
|
73
81
|
}
|
|
74
82
|
render() {
|
|
75
|
-
return (h(Host, { key: '
|
|
83
|
+
return (h(Host, { key: 'a0fff619978087ce0c67d7d327982424e3784ff0', "data-version": version, "tab-index": "-1" }, h("slot", { key: '93e26150b59e9a01275a6815096e09ff5fac146b' })));
|
|
76
84
|
}
|
|
77
|
-
get host() { return this; }
|
|
78
85
|
static get watchers() { return {
|
|
79
86
|
"for": ["validateControlFor"]
|
|
80
87
|
}; }
|
|
@@ -1,75 +1,50 @@
|
|
|
1
|
-
import { proxyCustomElement,
|
|
2
|
-
import { v as version } from './
|
|
3
|
-
import { g as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const focusableSelector = `:where(${[
|
|
7
|
-
'button',
|
|
8
|
-
'input:not([type="hidden"])',
|
|
9
|
-
'[tabindex]',
|
|
10
|
-
'select',
|
|
11
|
-
'textarea',
|
|
12
|
-
'[contenteditable]',
|
|
13
|
-
'a[href]',
|
|
14
|
-
'iframe',
|
|
15
|
-
'audio[controls]',
|
|
16
|
-
'video[controls]',
|
|
17
|
-
'area[href]',
|
|
18
|
-
'details > summary:first-of-type',
|
|
19
|
-
].join(',')})`;
|
|
20
|
-
const focusDisablingSelector = `:where(${[
|
|
21
|
-
'[inert]',
|
|
22
|
-
'[inert] *',
|
|
23
|
-
':disabled',
|
|
24
|
-
'dialog:not([open]) *',
|
|
25
|
-
'[popover]:not(:popover-open) *',
|
|
26
|
-
'details:not([open]) > *:not(details > summary:first-of-type)',
|
|
27
|
-
'details:not([open]) > *:not(details > summary:first-of-type) *',
|
|
28
|
-
'[tabindex^="-"]',
|
|
29
|
-
].join(',')})`;
|
|
30
|
-
const getFocusableChildren = (element) => {
|
|
31
|
-
return element.querySelectorAll(`& > ${focusableSelector}:not(${focusDisablingSelector})`);
|
|
32
|
-
};
|
|
1
|
+
import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-3e8554e7.js';
|
|
2
|
+
import { v as version } from './p-2083ae2c.js';
|
|
3
|
+
import { g as getFocusableChildren } from './p-3aba7629.js';
|
|
4
|
+
import { g as getRoot } from './p-fc91cbc2.js';
|
|
5
|
+
import { d as defineCustomElement$1 } from './p-60cf53cc.js';
|
|
33
6
|
|
|
34
7
|
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)}.popover-container{display:flex;flex-direction:column}";
|
|
35
8
|
const PostMenuStyle0 = postMenuCss;
|
|
36
9
|
|
|
37
|
-
const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends
|
|
10
|
+
const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends H {
|
|
38
11
|
constructor() {
|
|
39
12
|
super();
|
|
40
13
|
this.__registerHost();
|
|
41
14
|
this.__attachShadow();
|
|
42
15
|
this.toggleMenu = createEvent(this, "toggleMenu", 7);
|
|
43
|
-
this.lastFocusedElement = null;
|
|
44
|
-
this.KEYCODES = {
|
|
45
|
-
SPACE: ' ',
|
|
46
|
-
ENTER: 'Enter',
|
|
47
|
-
UP: 'ArrowUp',
|
|
48
|
-
DOWN: 'ArrowDown',
|
|
49
|
-
TAB: 'Tab',
|
|
50
|
-
HOME: 'Home',
|
|
51
|
-
END: 'End',
|
|
52
|
-
ESCAPE: 'Escape',
|
|
53
|
-
};
|
|
54
|
-
this.handleKeyDown = (e) => {
|
|
55
|
-
e.stopPropagation();
|
|
56
|
-
if (e.key === this.KEYCODES.ESCAPE) {
|
|
57
|
-
this.toggle(this.host);
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
if (Object.values(this.KEYCODES).includes(e.key)) {
|
|
61
|
-
this.controlKeyDownHandler(e);
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
this.handleClick = (e) => {
|
|
65
|
-
const target = e.target;
|
|
66
|
-
if (['BUTTON', 'A', 'INPUT', 'SELECT', 'TEXTAREA'].includes(target.tagName)) {
|
|
67
|
-
this.toggle(this.host);
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
this.placement = 'bottom';
|
|
71
|
-
this.isVisible = false;
|
|
72
16
|
}
|
|
17
|
+
popoverRef;
|
|
18
|
+
lastFocusedElement = null;
|
|
19
|
+
KEYCODES = {
|
|
20
|
+
SPACE: ' ',
|
|
21
|
+
ENTER: 'Enter',
|
|
22
|
+
UP: 'ArrowUp',
|
|
23
|
+
DOWN: 'ArrowDown',
|
|
24
|
+
TAB: 'Tab',
|
|
25
|
+
HOME: 'Home',
|
|
26
|
+
END: 'End',
|
|
27
|
+
ESCAPE: 'Escape',
|
|
28
|
+
};
|
|
29
|
+
get host() { return this; }
|
|
30
|
+
/**
|
|
31
|
+
* Defines the placement of the tooltip according to the floating-ui options available at https://floating-ui.com/docs/computePosition#placement.
|
|
32
|
+
* Tooltips are automatically flipped to the opposite side if there is not enough available space and are shifted
|
|
33
|
+
* towards the viewport if they would overlap edge boundaries.
|
|
34
|
+
*/
|
|
35
|
+
placement = 'bottom';
|
|
36
|
+
/**
|
|
37
|
+
* Holds the current visibility state of the menu.
|
|
38
|
+
* This state is internally managed to track whether the menu is open (`true`) or closed (`false`),
|
|
39
|
+
* and updates automatically when the menu is toggled.
|
|
40
|
+
*/
|
|
41
|
+
isVisible = false;
|
|
42
|
+
/**
|
|
43
|
+
* Emits when the menu is shown or hidden.
|
|
44
|
+
* The event payload is a boolean: `true` when the menu was opened, `false` when it was closed.
|
|
45
|
+
**/
|
|
46
|
+
toggleMenu;
|
|
47
|
+
root;
|
|
73
48
|
connectedCallback() {
|
|
74
49
|
this.root = getRoot(this.host);
|
|
75
50
|
this.host.addEventListener('keydown', this.handleKeyDown);
|
|
@@ -89,7 +64,12 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends HTMLEle
|
|
|
89
64
|
* Toggles the menu visibility based on its current state.
|
|
90
65
|
*/
|
|
91
66
|
async toggle(target) {
|
|
92
|
-
this.isVisible
|
|
67
|
+
if (this.isVisible) {
|
|
68
|
+
await this.hide();
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
await this.show(target);
|
|
72
|
+
}
|
|
93
73
|
}
|
|
94
74
|
/**
|
|
95
75
|
* Displays the popover menu, focusing the first menu item.
|
|
@@ -123,6 +103,22 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends HTMLEle
|
|
|
123
103
|
console.error('hide: popoverRef is null or undefined');
|
|
124
104
|
}
|
|
125
105
|
}
|
|
106
|
+
handleKeyDown = (e) => {
|
|
107
|
+
e.stopPropagation();
|
|
108
|
+
if (e.key === this.KEYCODES.ESCAPE) {
|
|
109
|
+
this.toggle(this.host);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (Object.values(this.KEYCODES).includes(e.key)) {
|
|
113
|
+
this.controlKeyDownHandler(e);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
handleClick = (e) => {
|
|
117
|
+
const target = e.target;
|
|
118
|
+
if (['BUTTON', 'A', 'INPUT', 'SELECT', 'TEXTAREA'].includes(target.tagName)) {
|
|
119
|
+
this.toggle(this.host);
|
|
120
|
+
}
|
|
121
|
+
};
|
|
126
122
|
controlKeyDownHandler(e) {
|
|
127
123
|
const menuItems = this.getSlottedItems();
|
|
128
124
|
if (!menuItems.length) {
|
|
@@ -171,9 +167,8 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends HTMLEle
|
|
|
171
167
|
.flatMap(el => Array.from(getFocusableChildren(el))));
|
|
172
168
|
}
|
|
173
169
|
render() {
|
|
174
|
-
return (h(Host, { key: '
|
|
170
|
+
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' })))));
|
|
175
171
|
}
|
|
176
|
-
get host() { return this; }
|
|
177
172
|
static get style() { return PostMenuStyle0; }
|
|
178
173
|
}, [1, "post-menu", {
|
|
179
174
|
"placement": [1],
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
function getAttributeObserver(attribute, handler) {
|
|
2
2
|
/**
|
|
3
3
|
* Handle attribute changes and childList changes from the observer
|
|
4
4
|
* @param {MutationRecord[]} mutationList
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
function observerHandler(mutationList) {
|
|
7
7
|
mutationList.forEach(mutation => {
|
|
8
8
|
if (mutation.type === 'attributes' && mutation.attributeName === attribute) {
|
|
9
9
|
handler(mutation.target);
|
|
@@ -17,9 +17,9 @@ const getAttributeObserver = (attribute, handler) => {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
-
}
|
|
20
|
+
}
|
|
21
21
|
// Initialize a mutation observer for patching accessibility features
|
|
22
22
|
return new MutationObserver(observerHandler);
|
|
23
|
-
}
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
export { getAttributeObserver as g };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { proxyCustomElement,
|
|
2
|
-
import { v as version } from './
|
|
3
|
-
import { c as checkEmptyOrType } from './
|
|
1
|
+
import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-3e8554e7.js';
|
|
2
|
+
import { v as version } from './p-2083ae2c.js';
|
|
3
|
+
import { c as checkEmptyOrType } from './p-56ad4838.js';
|
|
4
4
|
|
|
5
5
|
function isMotionReduced() {
|
|
6
6
|
return window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
@@ -14,33 +14,43 @@ const animationOptions = {
|
|
|
14
14
|
easing: collapseEasing,
|
|
15
15
|
fill: 'forwards',
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
function collapse(el) {
|
|
18
18
|
const expandedKeyframe = { height: window.getComputedStyle(el).height };
|
|
19
19
|
return el.animate([expandedKeyframe, collapsedKeyframe], animationOptions);
|
|
20
|
-
}
|
|
21
|
-
|
|
20
|
+
}
|
|
21
|
+
function expand(el) {
|
|
22
22
|
const expandedKeyframe = { height: `${el.scrollHeight}px`, offset: 1 };
|
|
23
|
-
const finalKeyframe = { height: 'auto' };
|
|
23
|
+
const finalKeyframe = { height: 'auto', overflow: 'visible' };
|
|
24
24
|
return el.animate([collapsedKeyframe, expandedKeyframe, finalKeyframe], animationOptions);
|
|
25
|
-
}
|
|
25
|
+
}
|
|
26
26
|
|
|
27
27
|
const postCollapsibleCss = ":host{display:block;position:relative;overflow:hidden}";
|
|
28
28
|
const PostCollapsibleStyle0 = postCollapsibleCss;
|
|
29
29
|
|
|
30
|
-
const PostCollapsible = /*@__PURE__*/ proxyCustomElement(class PostCollapsible extends
|
|
30
|
+
const PostCollapsible = /*@__PURE__*/ proxyCustomElement(class PostCollapsible extends H {
|
|
31
31
|
constructor() {
|
|
32
32
|
super();
|
|
33
33
|
this.__registerHost();
|
|
34
34
|
this.__attachShadow();
|
|
35
35
|
this.postToggle = createEvent(this, "postToggle", 7);
|
|
36
|
-
this.isLoaded = false;
|
|
37
|
-
this.isOpen = true;
|
|
38
|
-
this.collapsed = false;
|
|
39
36
|
}
|
|
37
|
+
isLoaded = false;
|
|
38
|
+
isOpen = true;
|
|
39
|
+
get host() { return this; }
|
|
40
|
+
/**
|
|
41
|
+
* If `true`, the element is collapsed otherwise it is displayed.
|
|
42
|
+
*/
|
|
43
|
+
collapsed = false;
|
|
40
44
|
collapsedChange() {
|
|
41
45
|
checkEmptyOrType(this.collapsed, 'boolean', 'The `collapsed` property of the `post-collapsible` must be a boolean.');
|
|
42
46
|
void this.toggle(!this.collapsed);
|
|
43
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* An event emitted when the collapse element is shown or hidden, before the transition.
|
|
50
|
+
*
|
|
51
|
+
* The event payload is a boolean: `true` if the collapsible was opened, `false` if it was closed.
|
|
52
|
+
*/
|
|
53
|
+
postToggle;
|
|
44
54
|
componentDidLoad() {
|
|
45
55
|
this.collapsedChange();
|
|
46
56
|
this.isLoaded = true;
|
|
@@ -75,9 +85,8 @@ const PostCollapsible = /*@__PURE__*/ proxyCustomElement(class PostCollapsible e
|
|
|
75
85
|
triggers.forEach(trigger => trigger.update());
|
|
76
86
|
}
|
|
77
87
|
render() {
|
|
78
|
-
return (h(Host, { key: '
|
|
88
|
+
return (h(Host, { key: '3ba9983562f5fabec602f23d8698bacb3ff0dbdc', "data-version": version, tabindex: this.collapsed ? -1 : undefined }, h("slot", { key: '010369b851198dab8eed76a2ab26627d480c97d4' })));
|
|
79
89
|
}
|
|
80
|
-
get host() { return this; }
|
|
81
90
|
static get watchers() { return {
|
|
82
91
|
"collapsed": ["collapsedChange"]
|
|
83
92
|
}; }
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { proxyCustomElement,
|
|
2
|
-
import { v as version } from './
|
|
1
|
+
import { p as proxyCustomElement, H, h, c as Host } from './p-3e8554e7.js';
|
|
2
|
+
import { v as version } from './p-2083ae2c.js';
|
|
3
3
|
|
|
4
|
-
const PostMenuItem = /*@__PURE__*/ proxyCustomElement(class PostMenuItem extends
|
|
4
|
+
const PostMenuItem = /*@__PURE__*/ proxyCustomElement(class PostMenuItem extends H {
|
|
5
5
|
constructor() {
|
|
6
6
|
super();
|
|
7
7
|
this.__registerHost();
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '376ce17a520b6cb74c55c009843df878f99ef411', role: "menuitem", "data-version": version }, h("slot", { key: 'e489c5c09f1527e527e052e9f4349c5b26db6ea9' })));
|
|
11
11
|
}
|
|
12
12
|
}, [4, "post-menu-item"]);
|
|
13
13
|
function defineCustomElement() {
|