@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swisspost/design-system-components",
|
|
3
|
-
"version": "9.0.0-next.
|
|
3
|
+
"version": "9.0.0-next.14",
|
|
4
4
|
"description": "A collection of web components built with Stencil JS for the Swiss Post Design System.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -26,36 +26,39 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@floating-ui/dom": "1.6.13",
|
|
28
28
|
"@oddbird/popover-polyfill": "0.3.7",
|
|
29
|
-
"@swisspost/design-system-icons": "9.0.0-next.
|
|
30
|
-
"@swisspost/design-system-styles": "9.0.0-next.
|
|
29
|
+
"@swisspost/design-system-icons": "9.0.0-next.14",
|
|
30
|
+
"@swisspost/design-system-styles": "9.0.0-next.14",
|
|
31
31
|
"ally.js": "1.4.1",
|
|
32
32
|
"long-press-event": "2.5.0",
|
|
33
33
|
"nanoid": "5.0.9"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
+
"@eslint/compat": "1.2.5",
|
|
37
|
+
"@eslint/js": "9.18.0",
|
|
36
38
|
"@percy/cli": "1.30.6",
|
|
37
39
|
"@percy/cypress": "3.1.2",
|
|
38
|
-
"@stencil-community/eslint-plugin": "0.
|
|
39
|
-
"@stencil/angular-output-target": "0.
|
|
40
|
-
"@stencil/core": "4.
|
|
41
|
-
"@stencil/react-output-target": "0.
|
|
40
|
+
"@stencil-community/eslint-plugin": "0.9.0",
|
|
41
|
+
"@stencil/angular-output-target": "0.10.2",
|
|
42
|
+
"@stencil/core": "4.25.1",
|
|
43
|
+
"@stencil/react-output-target": "0.8.2",
|
|
42
44
|
"@stencil/sass": "3.0.12",
|
|
43
45
|
"@types/jest": "29.5.14",
|
|
44
46
|
"@types/node": "22.10.5",
|
|
45
|
-
"@typescript-eslint/eslint-plugin": "7.18.0",
|
|
46
47
|
"@typescript-eslint/parser": "7.18.0",
|
|
47
48
|
"bootstrap": "5.3.3",
|
|
48
49
|
"cypress": "13.13.2",
|
|
49
50
|
"cypress-axe": "1.5.0",
|
|
50
51
|
"cypress-storybook": "1.0.0",
|
|
51
|
-
"eslint": "
|
|
52
|
-
"eslint-plugin-react": "7.37.
|
|
52
|
+
"eslint": "9.18.0",
|
|
53
|
+
"eslint-plugin-react": "7.37.4",
|
|
54
|
+
"globals": "15.14.0",
|
|
53
55
|
"rimraf": "6.0.1",
|
|
54
56
|
"rollup-plugin-postcss": "4.0.2",
|
|
55
57
|
"sass": "1.78.0",
|
|
56
58
|
"throttle-debounce": "5.0.2",
|
|
57
59
|
"ts-jest": "29.2.5",
|
|
58
|
-
"typescript": "5.5.4"
|
|
60
|
+
"typescript": "5.5.4",
|
|
61
|
+
"typescript-eslint": "8.20.0"
|
|
59
62
|
},
|
|
60
63
|
"keywords": [
|
|
61
64
|
"components",
|
|
@@ -66,17 +69,17 @@
|
|
|
66
69
|
"frontend"
|
|
67
70
|
],
|
|
68
71
|
"scripts": {
|
|
69
|
-
"
|
|
72
|
+
"play": "stencil build --dev --port 9200 --serve --watch --docs --docs-readme",
|
|
70
73
|
"start": "stencil build --dev --watch --docs --docs-readme",
|
|
71
74
|
"build": "pnpm clean && stencil build --docs-readme",
|
|
72
75
|
"clean": "rimraf www dist loader loaders",
|
|
73
|
-
"test": "pnpm run unit",
|
|
74
76
|
"unit": "stencil test --spec",
|
|
75
77
|
"unit:watch": "stencil test --spec --watchAll --silent",
|
|
76
78
|
"e2e": "cypress run --browser chrome",
|
|
77
|
-
"e2e:ci": "xvfb-run -a cypress run --browser chrome",
|
|
78
79
|
"e2e:watch": "cypress open",
|
|
79
|
-
"
|
|
80
|
-
"lint": "eslint
|
|
80
|
+
"e2e:ci": "xvfb-run -a cypress run --browser chrome",
|
|
81
|
+
"lint": "eslint",
|
|
82
|
+
"lint:fix": "eslint --fix",
|
|
83
|
+
"generate": "stencil generate"
|
|
81
84
|
}
|
|
82
85
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const fadeDuration = 200;
|
|
4
|
-
const fadedOutKeyframe = { opacity: '0' };
|
|
5
|
-
const fadedInKeyframe = { opacity: '1' };
|
|
6
|
-
const fadeIn = (el) => el.animate([fadedOutKeyframe, fadedInKeyframe], { duration: fadeDuration });
|
|
7
|
-
const fadeOut = (el) => el.animate([fadedInKeyframe, fadedOutKeyframe], { duration: fadeDuration });
|
|
8
|
-
|
|
9
|
-
exports.fadeIn = fadeIn;
|
|
10
|
-
exports.fadeOut = fadeOut;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const index = require('./index-f1b08cdb.js');
|
|
4
|
-
const slide = require('./slide-5d51abe8.js');
|
|
5
|
-
const _package = require('./package-0bd6fb0d.js');
|
|
6
|
-
const checkType = require('./check-type-64af82a9.js');
|
|
7
|
-
const checkNonEmpty = require('./check-non-empty-eeaa8f77.js');
|
|
8
|
-
|
|
9
|
-
const postBackToTopCss = ":host{--post-floating-button-translate-y:calc(-1 * var(--post-core-dimension-112));position:fixed;top:var(--post-device-position-1);right:var(--post-device-position-1)}:host .back-to-top{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button;box-shadow:.5px 3px 4px rgba(0,0,0,.1),2px 4px 10px 4px rgba(0,0,0,.12);cursor:pointer;border-radius:var(--post-device-border-radius-round);width:var(--post-device-sizing-interactive-button-height-2);height:var(--post-device-sizing-interactive-button-height-2);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-button-secondary-enabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-enabled-bg);display:flex;align-items:center;justify-content:center}:host .back-to-top{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host .back-to-top:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host .back-to-top:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}:host .back-to-top:hover{border-color:var(--post-scheme-color-interactive-button-secondary-hover-stroke);color:var(--post-scheme-color-interactive-button-secondary-hover-fg);background-color:var(--post-scheme-color-interactive-button-secondary-hover-bg)}:host .back-to-top post-icon{height:var(--post-device-sizing-interactive-button-icon-3);width:var(--post-device-sizing-interactive-button-icon-3)}:host .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}";
|
|
10
|
-
const PostBackToTopStyle0 = postBackToTopCss;
|
|
11
|
-
|
|
12
|
-
const PostBackToTop = class {
|
|
13
|
-
constructor(hostRef) {
|
|
14
|
-
index.registerInstance(this, hostRef);
|
|
15
|
-
this.handleScroll = () => {
|
|
16
|
-
this.belowFold = this.isBelowFold();
|
|
17
|
-
};
|
|
18
|
-
this.label = undefined;
|
|
19
|
-
this.belowFold = false;
|
|
20
|
-
}
|
|
21
|
-
isBelowFold() {
|
|
22
|
-
return window.scrollY > window.innerHeight;
|
|
23
|
-
}
|
|
24
|
-
// Watch for changes in belowFold
|
|
25
|
-
watchBelowFold(newValue) {
|
|
26
|
-
if (newValue) {
|
|
27
|
-
slide.slideUp(this.el, this.translateY);
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
slide.slideDown(this.el, this.translateY);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
scrollToTop() {
|
|
34
|
-
window.scrollTo({
|
|
35
|
-
top: 0,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
// Validate the label
|
|
39
|
-
validateLabel() {
|
|
40
|
-
checkType.checkType(this.label, 'string', 'The label property of the Back to Top component is required for accessibility purposes. Please ensure it is set.');
|
|
41
|
-
checkNonEmpty.checkNonEmpty(this.label, 'The label property of the Back to Top component must not be empty. Please provide a proper text for the label');
|
|
42
|
-
}
|
|
43
|
-
// Set the initial state
|
|
44
|
-
componentWillLoad() {
|
|
45
|
-
this.belowFold = this.isBelowFold();
|
|
46
|
-
}
|
|
47
|
-
componentDidLoad() {
|
|
48
|
-
window.addEventListener('scroll', this.handleScroll, false);
|
|
49
|
-
this.translateY = window
|
|
50
|
-
.getComputedStyle(this.el)
|
|
51
|
-
.getPropertyValue('--post-floating-button-translate-y');
|
|
52
|
-
if (!this.belowFold) {
|
|
53
|
-
this.el.style.transform = `translateY(${this.translateY})`;
|
|
54
|
-
}
|
|
55
|
-
// Initial load
|
|
56
|
-
if (this.belowFold) {
|
|
57
|
-
slide.slideUp(this.el, this.translateY);
|
|
58
|
-
}
|
|
59
|
-
this.validateLabel();
|
|
60
|
-
}
|
|
61
|
-
disconnectedCallback() {
|
|
62
|
-
window.removeEventListener('scroll', this.handleScroll);
|
|
63
|
-
}
|
|
64
|
-
render() {
|
|
65
|
-
return (index.h(index.Host, { key: '92d56ff9055c2af38ae47b28c3af20771eed9a39', "data-version": _package.version }, index.h("button", { key: 'ae305dd5b5a3f8d97553945e547ad45e824e6b7d', class: "back-to-top", "aria-hidden": this.belowFold ? 'false' : 'true', tabindex: this.belowFold ? '0' : '-1', onClick: this.scrollToTop }, index.h("post-icon", { key: '37792f99d6ef79df4260f6ad1c5780e545f7870a', "aria-hidden": "true", name: "3026" }), index.h("span", { key: '8768101a26e259c2bd0695a97e6bb4077ad31ae6', class: "visually-hidden" }, this.label))));
|
|
66
|
-
}
|
|
67
|
-
get el() { return index.getElement(this); }
|
|
68
|
-
static get watchers() { return {
|
|
69
|
-
"belowFold": ["watchBelowFold"],
|
|
70
|
-
"label": ["validateLabel"]
|
|
71
|
-
}; }
|
|
72
|
-
};
|
|
73
|
-
PostBackToTop.style = PostBackToTopStyle0;
|
|
74
|
-
|
|
75
|
-
exports.PostBackToTop = PostBackToTop;
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const index = require('./index-f1b08cdb.js');
|
|
4
|
-
const _package = require('./package-0bd6fb0d.js');
|
|
5
|
-
const fade = require('./fade-35a3633a.js');
|
|
6
|
-
const index$1 = require('./index-5d4e0aed.js');
|
|
7
|
-
const index_browser = require('./index.browser-2f65f583.js');
|
|
8
|
-
const checkType = require('./check-type-64af82a9.js');
|
|
9
|
-
const checkNonEmpty = require('./check-non-empty-eeaa8f77.js');
|
|
10
|
-
|
|
11
|
-
const BANNER_TYPES = ['neutral', 'success', 'warning', 'danger', 'info'];
|
|
12
|
-
|
|
13
|
-
const postBannerCss = ".banner,.alert{min-height:calc(var(--post-device-sizing-notification-icon-2) + (2 * var(--post-device-spacing-padding-10)));box-sizing:border-box;box-shadow:var(--post-device-elevation-100);border-radius:var(--post-device-border-radius-2);padding:var(--post-device-spacing-padding-10) var(--post-device-spacing-padding-10);padding-inline-start:calc(var(--post-device-spacing-padding-10) + var(--post-device-sizing-notification-icon-2) + var(--post-device-spacing-gap-inline-6));font-weight:400;border-style:var(--post-core-border-style-solid);border-width:var(--post-device-border-width-default);position:relative;color:var(--post-scheme-color-surface-default-fg);background-color:var(--post-scheme-color-signal-neutral);border-color:var(--post-scheme-color-signal-neutral-dark);color-scheme:var(--post-core-bg-scheme-light)}.banner:not(.no-icon)::before,.alert:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.24 5.24 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.24 5.24 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.3 6.3 0 0 0-.325 1.997 6.6 6.6 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 1 1 1.334 1.334 1.336 1.336 0 0 1-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.8 11.8 0 0 0 4 15.92'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-signal-neutral-dark)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner:not(.no-icon)::before,.alert:not(.no-icon)::before{color:CanvasText}}.banner:has(>post-icon)::before,.alert:has(>post-icon)::before{content:none}.banner>post-icon,.alert>post-icon{background-color:var(--post-scheme-color-signal-neutral);color:var(--post-scheme-color-signal-neutral-dark)}.banner::before,.alert::before{content:\"\";display:block}.banner::before,.banner>post-icon,.alert::before,.alert>post-icon{position:absolute;height:var(--post-device-sizing-notification-icon-2);width:var(--post-device-sizing-notification-icon-2);left:var(--post-device-spacing-padding-10);top:var(--post-device-spacing-padding-10)}.banner.no-icon,.alert.no-icon{min-height:calc(2*var(--post-device-spacing-padding-10) + var(--post-core-dimension-24));padding-inline-start:var(--post-device-spacing-padding-10)}.banner.no-icon::before,.alert.no-icon::before{content:unset}.banner.no-icon>post-icon,.alert.no-icon>post-icon{display:none}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner,.alert{filter:none !important;border:2px solid CanvasText}}.banner:not(.banner-action):not(.alert-action),.alert:not(.banner-action):not(.alert-action){display:flex;flex-direction:column;justify-content:center;gap:var(--post-core-dimension-4)}.banner:not(.banner-action):not(.alert-action) a,.alert:not(.banner-action):not(.alert-action) a{font-weight:400}.banner:not(.banner-action):not(.alert-action) hr,.alert:not(.banner-action):not(.alert-action) hr{margin-block:var(--post-core-dimension-8) var(--post-core-dimension-12) !important}.banner:not(.banner-action):not(.alert-action)>*,.alert:not(.banner-action):not(.alert-action)>*{margin:0}.banner-container{border:unset;background-color:rgba(0,0,0,0)}.banner-dismissible,.alert-dismissible{pointer-events:auto;position:relative}.banner-dismissible:not(.banner-action):not(.alert-action),.alert-dismissible:not(.banner-action):not(.alert-action){padding-inline-end:calc(var(--post-device-spacing-padding-10) + var(--post-device-spacing-gap-inline-6) + var(--post-core-dimension-24))}.banner-dismissible>.btn-close,.alert-dismissible>.btn-close{position:absolute;inset-block-start:1rem;inset-inline-end:var(--post-device-spacing-padding-10)}.banner-buttons,.alert-buttons{display:flex;align-items:center;justify-content:flex-start;flex-direction:row-reverse;margin-block-start:var(--post-device-spacing-padding-block-10);gap:var(--post-device-spacing-gap-1)}@media (max-width: 779.98px){.banner-buttons,.alert-buttons{flex-direction:column}}.banner-action>.banner-content,.banner-action>.alert-content,.alert-action>.banner-content,.alert-action>.alert-content{display:flex;flex-direction:column;justify-content:center;gap:var(--post-core-dimension-4)}.banner-action>.banner-content a,.banner-action>.alert-content a,.alert-action>.banner-content a,.alert-action>.alert-content a{font-weight:400}.banner-action>.banner-content hr,.banner-action>.alert-content hr,.alert-action>.banner-content hr,.alert-action>.alert-content hr{margin-block:var(--post-core-dimension-8) var(--post-core-dimension-12) !important}.banner-action>.banner-content>*,.banner-action>.alert-content>*,.alert-action>.banner-content>*,.alert-action>.alert-content>*{margin:0}@media (max-width: 779.98px){.banner-action,.alert-action{flex-direction:column;align-items:stretch}.banner-action>.banner-content,.banner-action>.alert-content,.alert-action>.banner-content,.alert-action>.alert-content{padding-inline-start:var(--post-device-spacing-gap-inline-6)var(--post-device-sizing-notification-icon-2);padding-inline-end:var(--post-device-spacing-gap-inline-6)var(--post-core-dimension-24)}.banner-action.no-icon>.banner-content,.banner-action.no-icon>.alert-content,.alert-action.no-icon>.banner-content,.alert-action.no-icon>.alert-content{padding-inline-start:0}.banner-action>.banner-buttons,.banner-action>.alert-buttons,.alert-action>.banner-buttons,.alert-action>.alert-buttons{display:flex}.banner-action>.banner-buttons>.btn,.banner-action>.banner-buttons>::slotted(.btn),.banner-action>.alert-buttons>.btn,.banner-action>.alert-buttons>::slotted(.btn),.alert-action>.banner-buttons>.btn,.alert-action>.banner-buttons>::slotted(.btn),.alert-action>.alert-buttons>.btn,.alert-action>.alert-buttons>::slotted(.btn){flex:1 0 0;width:100%}.banner-action>.banner-buttons>.btn:first-child,.banner-action>.banner-buttons>::slotted(.btn:first-child),.banner-action>.alert-buttons>.btn:first-child,.banner-action>.alert-buttons>::slotted(.btn:first-child),.alert-action>.banner-buttons>.btn:first-child,.alert-action>.banner-buttons>::slotted(.btn:first-child),.alert-action>.alert-buttons>.btn:first-child,.alert-action>.alert-buttons>::slotted(.btn:first-child){margin-inline-start:0}}.banner-neutral,.alert-neutral{background-color:var(--post-scheme-color-signal-neutral);border-color:var(--post-scheme-color-signal-neutral-dark);color-scheme:var(--post-core-bg-scheme-light)}.banner-neutral:not(.no-icon)::before,.alert-neutral:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.24 5.24 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.24 5.24 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.3 6.3 0 0 0-.325 1.997 6.6 6.6 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 1 1 1.334 1.334 1.336 1.336 0 0 1-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.8 11.8 0 0 0 4 15.92'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-signal-neutral-dark)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-neutral:not(.no-icon)::before,.alert-neutral:not(.no-icon)::before{color:CanvasText}}.banner-neutral:has(>post-icon)::before,.alert-neutral:has(>post-icon)::before{content:none}.banner-neutral>post-icon,.alert-neutral>post-icon{background-color:var(--post-scheme-color-signal-neutral);color:var(--post-scheme-color-signal-neutral-dark)}.banner-success,.alert-success{background-color:var(--post-scheme-color-interactive-notification-success-bg);border-color:var(--post-scheme-color-interactive-notification-success-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-success:not(.no-icon)::before,.alert-success:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-success-icon)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-success:not(.no-icon)::before,.alert-success:not(.no-icon)::before{color:CanvasText}}.banner-success:has(>post-icon)::before,.alert-success:has(>post-icon)::before{content:none}.banner-success>post-icon,.alert-success>post-icon{background-color:var(--post-scheme-color-interactive-notification-success-bg);color:var(--post-scheme-color-interactive-notification-success-icon)}.banner-warning,.alert-warning{background-color:var(--post-scheme-color-interactive-notification-warning-bg);border-color:var(--post-scheme-color-interactive-notification-warning-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-warning:not(.no-icon)::before,.alert-warning:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-warning-icon)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-warning:not(.no-icon)::before,.alert-warning:not(.no-icon)::before{color:CanvasText}}.banner-warning:has(>post-icon)::before,.alert-warning:has(>post-icon)::before{content:none}.banner-warning>post-icon,.alert-warning>post-icon{background-color:var(--post-scheme-color-interactive-notification-warning-bg);color:var(--post-scheme-color-interactive-notification-warning-icon)}.banner-error,.alert-error{background-color:var(--post-scheme-color-interactive-notification-error-bg);border-color:var(--post-scheme-color-interactive-notification-error-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-error:not(.no-icon)::before,.alert-error:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-error-icon)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-error:not(.no-icon)::before,.alert-error:not(.no-icon)::before{color:CanvasText}}.banner-error:has(>post-icon)::before,.alert-error:has(>post-icon)::before{content:none}.banner-error>post-icon,.alert-error>post-icon{background-color:var(--post-scheme-color-interactive-notification-error-bg);color:var(--post-scheme-color-interactive-notification-error-icon)}.banner-info,.alert-info{background-color:var(--post-scheme-color-interactive-notification-info-bg);border-color:var(--post-scheme-color-interactive-notification-info-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-info:not(.no-icon)::before,.alert-info:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.33 25.33v-16h-4.67V12h2v13.33h-2V28h6.67v-2.67zM14.67 4h2.67v2.67h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-info-icon)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-info:not(.no-icon)::before,.alert-info:not(.no-icon)::before{color:CanvasText}}.banner-info:has(>post-icon)::before,.alert-info:has(>post-icon)::before{content:none}.banner-info>post-icon,.alert-info>post-icon{background-color:var(--post-scheme-color-interactive-notification-info-bg);color:var(--post-scheme-color-interactive-notification-info-icon)}.banner-danger,.alert-danger{background-color:var(--post-scheme-color-interactive-notification-error-bg);border-color:var(--post-scheme-color-interactive-notification-error-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-danger:not(.no-icon)::before,.alert-danger:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-error-icon)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-danger:not(.no-icon)::before,.alert-danger:not(.no-icon)::before{color:CanvasText}}.banner-danger:has(>post-icon)::before,.alert-danger:has(>post-icon)::before{content:none}.banner-danger>post-icon,.alert-danger>post-icon{background-color:var(--post-scheme-color-interactive-notification-error-bg);color:var(--post-scheme-color-interactive-notification-error-icon)}.btn-close{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button;border-radius:var(--post-device-border-radius-round);color:#000;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.btn-close::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;content:\"\";display:block;height:var(--post-core-dimension-24);width:var(--post-core-dimension-24)}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:#000}.btn-close:disabled{color:var(--post-gray-40)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:Highlight}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}:host ::slotted(*){margin:0 !important}.visually-hidden{width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.visually-hidden:not(caption){position:absolute !important}";
|
|
14
|
-
const PostBannerStyle0 = postBannerCss;
|
|
15
|
-
|
|
16
|
-
const PostBanner = class {
|
|
17
|
-
constructor(hostRef) {
|
|
18
|
-
index.registerInstance(this, hostRef);
|
|
19
|
-
this.postDismissed = index.createEvent(this, "postDismissed", 7);
|
|
20
|
-
this.bannerId = `p${index_browser.nanoid(6)}`;
|
|
21
|
-
this.classes = undefined;
|
|
22
|
-
this.hasActions = undefined;
|
|
23
|
-
this.hasHeading = undefined;
|
|
24
|
-
this.onDismissButtonClick = () => this.dismiss();
|
|
25
|
-
this.dismissible = false;
|
|
26
|
-
this.dismissLabel = undefined;
|
|
27
|
-
this.icon = undefined;
|
|
28
|
-
this.type = 'neutral';
|
|
29
|
-
}
|
|
30
|
-
validateDismissible(isDismissible = this.dismissible) {
|
|
31
|
-
checkType.checkType(isDismissible, 'boolean', 'The post-banner "dismissible" prop should be a boolean.');
|
|
32
|
-
setTimeout(() => this.validateDismissLabel());
|
|
33
|
-
}
|
|
34
|
-
validateDismissLabel(dismissLabel = this.dismissLabel) {
|
|
35
|
-
if (this.dismissible) {
|
|
36
|
-
checkNonEmpty.checkNonEmpty(dismissLabel, 'Dismissible post-banner\'s require a "dismiss-label" prop.');
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
validateIcon(icon = this.icon) {
|
|
40
|
-
index$1.checkEmptyOrPattern(icon, /\d{4}|none/, 'The post-banner "icon" prop should be a 4-digits string.');
|
|
41
|
-
}
|
|
42
|
-
validateType(type = this.type) {
|
|
43
|
-
index$1.checkEmptyOrOneOf(type, BANNER_TYPES, `The post-banner requires a type form: ${BANNER_TYPES.join(', ')}`);
|
|
44
|
-
}
|
|
45
|
-
componentDidLoad() {
|
|
46
|
-
this.validateDismissible();
|
|
47
|
-
this.validateIcon();
|
|
48
|
-
this.validateType();
|
|
49
|
-
}
|
|
50
|
-
componentWillRender() {
|
|
51
|
-
this.hasHeading = this.host.querySelectorAll('[slot=heading]').length > 0;
|
|
52
|
-
this.hasActions = this.host.querySelectorAll('[slot=actions]').length > 0;
|
|
53
|
-
this.classes = `banner ${this.type ? 'banner-' + this.type : ''}`;
|
|
54
|
-
if (this.dismissible)
|
|
55
|
-
this.classes += ' banner-dismissible';
|
|
56
|
-
if (this.hasActions)
|
|
57
|
-
this.classes += ' banner-action';
|
|
58
|
-
if (this.icon === 'none')
|
|
59
|
-
this.classes += ' no-icon';
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Triggers banner dismissal programmatically (same as clicking on the close button (×)).
|
|
63
|
-
*/
|
|
64
|
-
async dismiss() {
|
|
65
|
-
const dismissal = fade.fadeOut(this.host);
|
|
66
|
-
await dismissal.finished;
|
|
67
|
-
this.host.remove();
|
|
68
|
-
this.postDismissed.emit();
|
|
69
|
-
}
|
|
70
|
-
render() {
|
|
71
|
-
const defaultBannerContent = [
|
|
72
|
-
this.hasHeading && (index.h("div", { key: `${this.bannerId}-heading`, class: "banner-heading" }, index.h("slot", { key: 'ac8774db27af4057a85f04f5864534c14f387cd7', name: "heading" }))),
|
|
73
|
-
index.h("slot", { key: `${this.bannerId}-message` }),
|
|
74
|
-
];
|
|
75
|
-
const actionBannerContent = [
|
|
76
|
-
index.h("div", { key: `${this.bannerId}-content`, class: "banner-content" }, defaultBannerContent),
|
|
77
|
-
index.h("div", { key: `${this.bannerId}-buttons`, class: "banner-buttons" }, index.h("slot", { key: 'e3652af90a4b54bf1297e4c78a32d64305674ff7', name: "actions" })),
|
|
78
|
-
];
|
|
79
|
-
return (index.h(index.Host, { key: '21bfb98ce6f38c03dca18877cd99d5ac2ebbafaf', "data-version": _package.version }, index.h("div", { key: '728c307293908b86d6951d9edc420d8cf9074bc8', role: "alert", class: this.classes, part: this.classes }, this.dismissible && (index.h("button", { key: '6ac2f33805ae8dfc8f4a9444fa98153ce5009c72', class: "btn-close", onClick: this.onDismissButtonClick }, index.h("span", { key: 'ad9dd25cc1c43555115192ec04ce05ec54b793d4', class: "visually-hidden" }, this.dismissLabel))), this.icon && this.icon !== 'none' && (index.h("post-icon", { key: `${this.bannerId}-icon`, name: this.icon })), this.hasActions ? actionBannerContent : defaultBannerContent)));
|
|
80
|
-
}
|
|
81
|
-
get host() { return index.getElement(this); }
|
|
82
|
-
static get watchers() { return {
|
|
83
|
-
"dismissible": ["validateDismissible"],
|
|
84
|
-
"dismissLabel": ["validateDismissLabel"],
|
|
85
|
-
"icon": ["validateIcon"],
|
|
86
|
-
"type": ["validateType"]
|
|
87
|
-
}; }
|
|
88
|
-
};
|
|
89
|
-
PostBanner.style = PostBannerStyle0;
|
|
90
|
-
|
|
91
|
-
exports.PostBanner = PostBanner;
|