@swisspost/design-system-components 9.0.0-next.2 → 9.0.0-next.21
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-non-empty-bd99d236.js +15 -0
- package/dist/cjs/check-one-of-75d270b5.js +13 -0
- package/dist/cjs/check-type-cdbf6d29.js +21 -0
- package/dist/cjs/check-url-220a286c.js +19 -0
- package/dist/cjs/debounce-158fd76f.js +13 -0
- package/dist/cjs/fade-72d5ef55.js +14 -0
- package/dist/cjs/get-root-7a3498ef.js +11 -0
- package/dist/cjs/index-23e36ff7.js +37 -0
- package/dist/cjs/{index-c15bd800.js → index-5acef487.js} +54 -17
- package/dist/cjs/index.browser-2f65f583.js +15 -0
- package/dist/cjs/index.cjs.js +56 -27
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-a7150f64.js → package-c6bc9e82.js} +1 -1
- package/dist/cjs/{post-accordion-62d2fd79.js → post-accordion-d1345784.js} +9 -8
- package/dist/cjs/post-accordion-item-a796d803.js +64 -0
- package/dist/cjs/post-accordion-item.cjs.entry.js +8 -5
- package/dist/cjs/post-accordion.cjs.entry.js +4 -4
- package/dist/cjs/post-avatar-b4e96354.js +144 -0
- package/dist/cjs/post-avatar.cjs.entry.js +13 -0
- package/dist/cjs/post-back-to-top-fc541c6b.js +76 -0
- package/dist/cjs/post-back-to-top.cjs.entry.js +15 -0
- package/dist/cjs/post-banner-46522b4f.js +96 -0
- package/dist/cjs/post-banner.cjs.entry.js +19 -0
- package/dist/cjs/post-breadcrumb-799d34da.js +112 -0
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +17 -0
- package/dist/cjs/post-breadcrumb.cjs.entry.js +13 -0
- package/dist/cjs/post-card-control-7bf7d3f2.js +283 -0
- package/dist/cjs/post-card-control.cjs.entry.js +5 -5
- package/dist/cjs/post-closebutton_15.cjs.entry.js +34 -0
- package/dist/cjs/{post-collapsible-trigger-9dca8493.js → post-collapsible-trigger-0568e3ec.js} +50 -56
- package/dist/cjs/post-collapsible_2.cjs.entry.js +10 -6
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/post-footer-f87a556b.js +88 -0
- package/dist/cjs/post-footer.cjs.entry.js +11 -0
- package/dist/cjs/post-linkarea-0ccf93fc.js +30 -0
- package/dist/cjs/post-linkarea.cjs.entry.js +11 -0
- package/dist/cjs/post-menu-item-eba24c40.js +68 -0
- package/dist/cjs/post-popover-35f679f6.js +106 -0
- package/dist/cjs/post-popover.cjs.entry.js +4 -4
- package/dist/cjs/{post-rating-db5a397a.js → post-rating-d12fa214.js} +16 -6
- package/dist/cjs/post-rating.cjs.entry.js +3 -3
- package/dist/cjs/post-tab-header-89dca04b.js +33 -0
- package/dist/cjs/post-tab-header.cjs.entry.js +5 -4
- package/dist/cjs/{post-tab-panel-d59cf1ec.js → post-tab-panel-ad1ab180.js} +6 -5
- package/dist/cjs/post-tab-panel.cjs.entry.js +4 -3
- package/dist/cjs/{post-tabs-7afae61a.js → post-tabs-0db75745.js} +23 -16
- package/dist/cjs/post-tabs.cjs.entry.js +4 -4
- package/dist/cjs/post-tag-396a46c9.js +47 -0
- package/dist/cjs/post-tag.cjs.entry.js +3 -3
- package/dist/cjs/post-togglebutton-69983699.js +3861 -0
- package/dist/cjs/{post-tooltip-432852c7.js → post-tooltip-7174ea97.js} +38 -25
- package/dist/cjs/post-tooltip.cjs.entry.js +8 -6
- package/dist/cjs/slide-8ae17ee4.js +28 -0
- package/dist/collection/animations/collapse.js +5 -5
- package/dist/collection/animations/fade.js +6 -2
- package/dist/collection/animations/slide.js +23 -0
- package/dist/collection/collection-manifest.json +22 -3
- package/dist/collection/components/post-accordion/post-accordion.css +1 -1
- package/dist/collection/components/post-accordion/post-accordion.js +5 -3
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +29 -11
- package/dist/collection/components/post-avatar/post-avatar.css +3 -0
- package/dist/collection/components/post-avatar/post-avatar.js +234 -0
- package/dist/collection/components/post-back-to-top/post-back-to-top.css +1 -0
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +109 -0
- package/dist/collection/components/post-banner/banner-types.js +1 -0
- package/dist/collection/components/post-banner/post-banner.css +3 -0
- package/dist/collection/components/{post-alert/post-alert.js → post-banner/post-banner.js} +51 -73
- package/dist/collection/components/post-breadcrumb/post-breadcrumb.css +3 -0
- package/dist/collection/components/post-breadcrumb/post-breadcrumb.js +163 -0
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -0
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +98 -0
- package/dist/collection/components/post-card-control/post-card-control.css +1 -1
- package/dist/collection/components/post-card-control/post-card-control.js +55 -43
- package/dist/collection/components/post-closebutton/post-closebutton.js +13 -0
- package/dist/collection/components/post-collapsible/post-collapsible.css +1 -1
- package/dist/collection/components/post-collapsible/post-collapsible.js +15 -6
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +21 -20
- package/dist/collection/components/post-footer/post-footer.css +1 -0
- package/dist/collection/components/post-footer/post-footer.js +76 -0
- package/dist/collection/components/post-header/post-header.css +1 -0
- package/dist/collection/components/post-header/post-header.js +267 -0
- package/dist/collection/components/post-icon/post-icon.js +80 -47
- package/dist/collection/components/post-language-option/post-language-option.css +3 -0
- package/dist/collection/components/post-language-option/post-language-option.js +224 -0
- package/dist/collection/components/post-language-switch/post-language-switch.css +1 -0
- package/dist/collection/components/post-language-switch/post-language-switch.js +164 -0
- package/dist/collection/components/post-language-switch/switch-variants.js +1 -0
- package/dist/collection/components/post-linkarea/post-linkarea.css +1 -0
- package/dist/collection/components/post-linkarea/post-linkarea.js +30 -0
- package/dist/collection/components/post-list/post-list.css +3 -0
- package/dist/collection/components/post-list/post-list.js +90 -0
- package/dist/collection/components/post-list-item/post-list-item.css +1 -0
- package/dist/collection/components/post-list-item/post-list-item.js +26 -0
- package/dist/collection/components/post-logo/post-logo.css +1 -1
- package/dist/collection/components/post-logo/post-logo.js +4 -3
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -0
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +255 -0
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -0
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +268 -0
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -0
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +127 -0
- package/dist/collection/components/post-menu/post-menu.css +3 -0
- package/dist/collection/components/post-menu/post-menu.js +297 -0
- package/dist/collection/components/post-menu-item/post-menu-item.js +8 -0
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.css +1 -0
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +122 -0
- package/dist/collection/components/post-popover/post-popover.css +1 -1
- package/dist/collection/components/post-popover/post-popover.js +6 -3
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +193 -38
- package/dist/collection/components/post-rating/post-rating.css +1 -1
- package/dist/collection/components/post-rating/post-rating.js +13 -2
- package/dist/collection/components/post-tab-header/post-tab-header.css +2 -2
- package/dist/collection/components/post-tab-header/post-tab-header.js +6 -4
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +4 -2
- package/dist/collection/components/post-tabs/post-tabs.css +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +17 -14
- package/dist/collection/components/post-tag/post-tag.css +1 -1
- package/dist/collection/components/post-tag/post-tag.js +3 -2
- package/dist/collection/components/post-togglebutton/post-togglebutton.css +1 -0
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +75 -0
- package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +35 -17
- package/dist/collection/index.js +21 -2
- package/dist/collection/utils/attribute-observer.js +4 -4
- package/dist/collection/utils/breakpoints.js +50 -0
- 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 +33 -0
- package/dist/collection/utils/property-checkers/check-non-empty.js +6 -2
- package/dist/collection/utils/property-checkers/check-one-of.js +8 -3
- package/dist/collection/utils/property-checkers/check-pattern.js +8 -3
- package/dist/collection/utils/property-checkers/check-type.js +11 -6
- package/dist/collection/utils/property-checkers/check-url.js +11 -6
- package/dist/collection/utils/property-checkers/empty-or.js +5 -2
- package/dist/collection/utils/sass-export.js +8 -5
- package/dist/components/attribute-observer.js +4 -4
- package/dist/components/check-non-empty.js +6 -2
- package/dist/components/check-one-of.js +8 -3
- package/dist/components/check-type.js +11 -6
- package/dist/components/debounce.js +11 -0
- package/dist/components/fade.js +6 -2
- package/dist/components/get-focusable-children.js +35 -0
- package/dist/components/get-root.js +9 -0
- package/dist/components/index.browser.js +13 -0
- package/dist/components/index.js +21 -2
- package/dist/components/index2.js +25 -12
- package/dist/components/index3.js +135 -0
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +36 -16
- package/dist/components/post-accordion2.js +6 -5
- package/dist/components/post-avatar.d.ts +11 -0
- package/dist/components/post-avatar.js +6 -0
- package/dist/components/post-avatar2.js +169 -0
- package/dist/components/post-back-to-top.d.ts +11 -0
- package/dist/components/post-back-to-top.js +6 -0
- package/dist/components/post-back-to-top2.js +101 -0
- package/dist/components/post-banner.d.ts +11 -0
- package/dist/components/post-banner.js +6 -0
- package/dist/components/post-banner2.js +131 -0
- package/dist/components/post-breadcrumb-item.d.ts +11 -0
- package/dist/components/post-breadcrumb-item.js +6 -0
- package/dist/components/post-breadcrumb-item2.js +82 -0
- package/dist/components/post-breadcrumb.d.ts +11 -0
- package/dist/components/post-breadcrumb.js +6 -0
- package/dist/components/post-breadcrumb2.js +169 -0
- package/dist/components/post-card-control2.js +50 -39
- package/dist/components/post-closebutton.d.ts +11 -0
- package/dist/components/post-closebutton.js +6 -0
- package/dist/components/post-closebutton2.js +34 -0
- package/dist/components/post-collapsible-trigger2.js +23 -38
- package/dist/components/post-collapsible2.js +22 -14
- package/dist/components/post-footer.d.ts +11 -0
- package/dist/components/post-footer.js +6 -0
- package/dist/components/post-footer2.js +128 -0
- package/dist/components/post-header.d.ts +11 -0
- package/dist/components/post-header.js +6 -0
- package/dist/components/post-header2.js +217 -0
- package/dist/components/post-icon2.js +82 -46
- package/dist/components/post-language-option.d.ts +11 -0
- package/dist/components/post-language-option.js +6 -0
- package/dist/components/post-language-option2.js +102 -0
- package/dist/components/post-language-switch.d.ts +11 -0
- package/dist/components/post-language-switch.js +6 -0
- package/dist/components/post-language-switch2.js +135 -0
- package/dist/components/post-linkarea.d.ts +11 -0
- package/dist/components/post-linkarea.js +6 -0
- package/dist/components/post-linkarea2.js +42 -0
- package/dist/components/post-list-item.d.ts +11 -0
- package/dist/components/post-list-item.js +6 -0
- package/dist/components/post-list-item2.js +35 -0
- package/dist/components/{post-alert.d.ts → post-list.d.ts} +4 -4
- package/dist/components/post-list.js +6 -0
- package/dist/components/post-list2.js +55 -0
- package/dist/components/post-logo2.js +5 -5
- package/dist/components/post-mainnavigation.d.ts +11 -0
- package/dist/components/post-mainnavigation.js +6 -0
- package/dist/components/post-mainnavigation2.js +258 -0
- package/dist/components/post-megadropdown-trigger.d.ts +11 -0
- package/dist/components/post-megadropdown-trigger.js +6 -0
- package/dist/components/post-megadropdown-trigger2.js +113 -0
- package/dist/components/post-megadropdown.d.ts +11 -0
- package/dist/components/post-megadropdown.js +6 -0
- package/dist/components/post-megadropdown2.js +186 -0
- package/dist/components/post-menu-item.d.ts +11 -0
- package/dist/components/post-menu-item.js +6 -0
- package/dist/components/post-menu-item2.js +27 -0
- package/dist/components/post-menu-trigger.d.ts +11 -0
- package/dist/components/post-menu-trigger.js +6 -0
- package/dist/components/post-menu-trigger2.js +109 -0
- package/dist/components/post-menu.d.ts +11 -0
- package/dist/components/post-menu.js +6 -0
- package/dist/components/post-menu2.js +193 -0
- package/dist/components/post-popover2.js +6 -4
- package/dist/components/post-popovercontainer2.js +227 -59
- package/dist/components/post-rating2.js +14 -4
- package/dist/components/post-tab-header2.js +7 -6
- package/dist/components/post-tab-panel2.js +4 -3
- package/dist/components/post-tabs2.js +20 -13
- package/dist/components/post-tag2.js +3 -3
- package/dist/components/post-togglebutton.d.ts +11 -0
- package/dist/components/post-togglebutton.js +6 -0
- package/dist/components/post-togglebutton2.js +61 -0
- package/dist/components/post-tooltip2.js +35 -22
- package/dist/components/slide.js +25 -0
- package/dist/docs.json +1956 -270
- package/dist/esm/{attribute-observer-37fa950a.js → attribute-observer-2f203993.js} +4 -4
- package/dist/esm/check-non-empty-258a56b3.js +13 -0
- package/dist/esm/check-one-of-0bee20f5.js +11 -0
- package/dist/esm/check-type-37d5d307.js +19 -0
- package/dist/esm/check-url-17962bc8.js +17 -0
- package/dist/esm/debounce-e54c7131.js +11 -0
- package/dist/esm/fade-1f3cacf4.js +11 -0
- package/dist/esm/get-root-7af2e0d1.js +9 -0
- package/dist/esm/{index-0b56fc28.js → index-40846676.js} +54 -17
- package/dist/esm/index-8f8fe5b0.js +32 -0
- package/dist/esm/index.browser-51485f85.js +13 -0
- package/dist/esm/index.js +32 -22
- package/dist/esm/loader.js +3 -3
- package/dist/esm/package-5614c98b.js +3 -0
- package/dist/esm/{post-accordion-6f4d2b9a.js → post-accordion-f6d1834d.js} +9 -8
- package/dist/esm/post-accordion-item-7cb93300.js +62 -0
- package/dist/esm/post-accordion-item.entry.js +8 -5
- package/dist/esm/post-accordion.entry.js +4 -4
- package/dist/esm/post-avatar-96108967.js +142 -0
- package/dist/esm/post-avatar.entry.js +5 -0
- package/dist/esm/post-back-to-top-7f8a61c8.js +74 -0
- package/dist/esm/post-back-to-top.entry.js +7 -0
- package/dist/esm/post-banner-bb69bce8.js +94 -0
- package/dist/esm/post-banner.entry.js +11 -0
- package/dist/esm/post-breadcrumb-9d9efa4e.js +110 -0
- package/dist/esm/post-breadcrumb-item_2.entry.js +8 -0
- package/dist/esm/post-breadcrumb.entry.js +5 -0
- package/dist/esm/post-card-control-fdced7d5.js +281 -0
- package/dist/esm/post-card-control.entry.js +5 -5
- package/dist/esm/post-closebutton_15.entry.js +12 -0
- package/dist/esm/{post-collapsible-trigger-85c2064a.js → post-collapsible-trigger-17b2f067.js} +49 -55
- package/dist/esm/post-collapsible_2.entry.js +10 -6
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/post-footer-2dcd8159.js +86 -0
- package/dist/esm/post-footer.entry.js +3 -0
- package/dist/esm/post-linkarea-06c5144d.js +28 -0
- package/dist/esm/post-linkarea.entry.js +3 -0
- package/dist/esm/post-menu-item-e917bf99.js +65 -0
- package/dist/esm/post-popover-67a3cbf2.js +104 -0
- package/dist/esm/post-popover.entry.js +4 -4
- package/dist/esm/{post-rating-d9fc0b40.js → post-rating-9613bee8.js} +16 -6
- package/dist/esm/post-rating.entry.js +3 -3
- package/dist/esm/post-tab-header-dff3a025.js +31 -0
- package/dist/esm/post-tab-header.entry.js +5 -4
- package/dist/esm/{post-tab-panel-926439f4.js → post-tab-panel-2b3f82a8.js} +6 -5
- package/dist/esm/post-tab-panel.entry.js +4 -3
- package/dist/esm/{post-tabs-13b2d9a6.js → post-tabs-46d1165f.js} +23 -16
- package/dist/esm/post-tabs.entry.js +4 -4
- package/dist/esm/post-tag-4176268e.js +45 -0
- package/dist/esm/post-tag.entry.js +3 -3
- package/dist/esm/post-togglebutton-5892c5bd.js +3845 -0
- package/dist/esm/{post-tooltip-3cde6b53.js → post-tooltip-5a45a569.js} +38 -25
- package/dist/esm/post-tooltip.entry.js +8 -6
- package/dist/esm/slide-62768431.js +25 -0
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-017dc6c7.js +1 -0
- package/dist/post-components/p-0227b899.js +1 -0
- package/dist/post-components/p-04895a54.js +1 -0
- package/dist/post-components/p-04c38bfe.entry.js +1 -0
- package/dist/post-components/p-07a0a626.js +1 -0
- package/dist/post-components/p-12573893.js +1 -0
- package/dist/post-components/p-1289b0a7.entry.js +1 -0
- package/dist/post-components/p-12a11565.js +1 -0
- package/dist/post-components/p-1542a80e.entry.js +1 -0
- package/dist/post-components/p-181c73d5.js +1 -0
- package/dist/post-components/p-254a9bd2.entry.js +1 -0
- package/dist/post-components/p-28500934.entry.js +1 -0
- package/dist/post-components/p-2b1281af.js +1 -0
- package/dist/post-components/p-2c69e7f2.entry.js +1 -0
- package/dist/post-components/p-30132b19.entry.js +1 -0
- package/dist/post-components/p-30af1d48.js +1 -0
- package/dist/post-components/p-3bdeb686.entry.js +1 -0
- package/dist/post-components/p-47cb31dd.js +1 -0
- package/dist/post-components/p-4af6dbed.js +1 -0
- package/dist/post-components/p-4f41f63e.js +1 -0
- package/dist/post-components/p-52790b8b.js +1 -0
- package/dist/post-components/p-5959f2bd.js +1 -0
- package/dist/post-components/{p-82dcf8c6.js → p-59ca0a13.js} +3 -3
- package/dist/post-components/p-5aaa5703.entry.js +1 -0
- package/dist/post-components/p-64e3de38.js +1 -0
- package/dist/post-components/p-67a45f16.js +1 -0
- package/dist/post-components/p-6d8ac9bd.entry.js +1 -0
- package/dist/post-components/p-7709c14a.js +1 -0
- package/dist/post-components/p-77cc2a5e.entry.js +1 -0
- package/dist/post-components/p-79c552fb.js +1 -0
- package/dist/post-components/p-7dd05e6d.entry.js +1 -0
- package/dist/post-components/p-803b7598.js +1 -0
- package/dist/post-components/p-85fdc2d3.js +1 -0
- package/dist/post-components/p-9748a355.js +1 -0
- package/dist/post-components/p-98fcf90b.entry.js +1 -0
- package/dist/post-components/p-994fae4c.entry.js +1 -0
- package/dist/post-components/p-a805515a.entry.js +1 -0
- package/dist/post-components/p-b5b48f66.entry.js +1 -0
- package/dist/post-components/p-b9bf5a5f.js +1 -0
- package/dist/post-components/p-c6b3a926.js +1 -0
- package/dist/post-components/p-c9dd3cdb.entry.js +1 -0
- package/dist/post-components/p-cb5e4a06.js +1 -0
- package/dist/post-components/p-d45df336.js +1 -0
- package/dist/post-components/p-dd4a5c0a.entry.js +1 -0
- package/dist/post-components/p-e1baac59.js +1 -0
- package/dist/post-components/p-e585c6fe.js +1 -0
- package/dist/post-components/p-e6d54838.entry.js +1 -0
- package/dist/post-components/p-f4b0cc7d.js +1 -0
- package/dist/post-components/p-fc91cbc2.js +1 -0
- package/dist/post-components/p-fe8c300c.js +1 -0
- package/dist/post-components/p-ff95dcd3.js +2 -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 -0
- package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +8 -2
- package/dist/types/components/post-avatar/post-avatar.d.ts +51 -0
- package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +19 -0
- package/dist/types/components/post-banner/banner-types.d.ts +2 -0
- package/dist/types/components/post-banner/post-banner.d.ts +49 -0
- package/dist/types/components/post-breadcrumb/post-breadcrumb.d.ts +30 -0
- package/dist/types/components/post-breadcrumb-item/post-breadcrumb-item.d.ts +20 -0
- package/dist/types/components/post-card-control/post-card-control.d.ts +9 -9
- package/dist/types/components/post-closebutton/post-closebutton.d.ts +7 -0
- package/dist/types/components/post-footer/post-footer.d.ts +23 -0
- package/dist/types/components/post-header/post-header.d.ts +45 -0
- package/dist/types/components/post-icon/post-icon.d.ts +14 -12
- package/dist/types/components/post-language-option/post-language-option.d.ts +45 -0
- package/dist/types/components/post-language-switch/post-language-switch.d.ts +31 -0
- package/dist/types/components/post-language-switch/switch-variants.d.ts +2 -0
- package/dist/types/components/post-linkarea/post-linkarea.d.ts +5 -0
- package/dist/types/components/post-list/post-list.d.ts +24 -0
- package/dist/types/components/post-list-item/post-list-item.d.ts +8 -0
- package/dist/types/components/post-logo/post-logo.d.ts +1 -1
- package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +70 -0
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +57 -0
- package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +31 -0
- package/dist/types/components/post-menu/post-menu.d.ts +48 -0
- package/dist/types/components/post-menu-item/post-menu-item.d.ts +3 -0
- package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +28 -0
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +23 -1
- package/dist/types/components/post-tab-header/post-tab-header.d.ts +1 -1
- package/dist/types/components/post-tabs/post-tabs.d.ts +1 -1
- package/dist/types/components/post-tag/post-tag.d.ts +1 -1
- package/dist/types/components/post-togglebutton/post-togglebutton.d.ts +15 -0
- package/dist/types/components.d.ts +609 -48
- 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 +22 -3
- package/dist/types/utils/attribute-observer.d.ts +1 -1
- package/dist/types/utils/breakpoints.d.ts +12 -0
- package/dist/types/utils/component-on-ready.d.ts +1 -1
- package/dist/types/utils/get-focusable-children.d.ts +1 -0
- package/dist/types/utils/get-root.d.ts +1 -1
- package/dist/types/utils/property-checkers/check-non-empty.d.ts +3 -1
- package/dist/types/utils/property-checkers/check-one-of.d.ts +3 -1
- package/dist/types/utils/property-checkers/check-pattern.d.ts +3 -1
- package/dist/types/utils/property-checkers/check-type.d.ts +3 -1
- package/dist/types/utils/property-checkers/check-url.d.ts +3 -1
- package/dist/types/utils/property-checkers/index.d.ts +12 -4
- package/dist/types/utils/sass-export.d.ts +5 -1
- package/loaders/attribute-observer.js +4 -4
- package/loaders/check-non-empty.js +6 -2
- package/loaders/check-one-of.js +8 -3
- package/loaders/check-type.js +11 -6
- package/loaders/debounce.js +11 -0
- package/loaders/fade.js +6 -2
- package/loaders/get-focusable-children.js +35 -0
- package/loaders/get-root.js +9 -0
- package/loaders/index.browser.js +13 -0
- package/loaders/index.d.ts +40 -2
- package/loaders/index.js +21 -2
- package/loaders/index2.js +25 -12
- package/loaders/index3.js +135 -0
- package/loaders/package.js +1 -1
- package/loaders/post-accordion-item.js +1 -81
- package/loaders/post-accordion-item2.js +103 -0
- package/loaders/post-accordion.js +6 -5
- package/loaders/post-avatar.d.ts +11 -0
- package/loaders/post-avatar.js +172 -0
- package/loaders/post-back-to-top.d.ts +11 -0
- package/loaders/post-back-to-top.js +104 -0
- package/loaders/post-banner.d.ts +11 -0
- package/loaders/post-banner.js +134 -0
- package/loaders/post-breadcrumb-item.d.ts +11 -0
- package/loaders/post-breadcrumb-item.js +6 -0
- package/loaders/post-breadcrumb-item2.js +82 -0
- package/loaders/post-breadcrumb.d.ts +11 -0
- package/loaders/post-breadcrumb.js +172 -0
- package/loaders/post-card-control.js +50 -39
- package/loaders/post-closebutton.d.ts +11 -0
- package/loaders/post-closebutton.js +37 -0
- package/loaders/post-collapsible-trigger2.js +23 -38
- package/loaders/post-collapsible2.js +21 -13
- package/loaders/post-footer.d.ts +11 -0
- package/loaders/post-footer.js +131 -0
- package/loaders/post-header.d.ts +11 -0
- package/loaders/post-header.js +220 -0
- package/loaders/post-icon2.js +82 -46
- package/loaders/post-language-option.d.ts +11 -0
- package/loaders/post-language-option.js +105 -0
- package/loaders/post-language-switch.d.ts +11 -0
- package/loaders/post-language-switch.js +138 -0
- package/loaders/post-linkarea.d.ts +11 -0
- package/loaders/post-linkarea.js +45 -0
- package/loaders/post-list-item.d.ts +11 -0
- package/loaders/post-list-item.js +38 -0
- package/loaders/{post-alert.d.ts → post-list.d.ts} +4 -4
- package/loaders/post-list.js +58 -0
- package/loaders/post-logo.js +6 -6
- package/loaders/post-mainnavigation.d.ts +11 -0
- package/loaders/post-mainnavigation.js +261 -0
- package/loaders/post-megadropdown-trigger.d.ts +11 -0
- package/loaders/post-megadropdown-trigger.js +116 -0
- package/loaders/post-megadropdown.d.ts +11 -0
- package/loaders/post-megadropdown.js +189 -0
- package/loaders/post-menu-item.d.ts +11 -0
- package/loaders/post-menu-item.js +6 -0
- package/loaders/post-menu-item2.js +27 -0
- package/loaders/post-menu-trigger.d.ts +11 -0
- package/loaders/post-menu-trigger.js +6 -0
- package/loaders/post-menu-trigger2.js +109 -0
- package/loaders/post-menu.d.ts +11 -0
- package/loaders/post-menu.js +6 -0
- package/loaders/post-menu2.js +193 -0
- package/loaders/post-popover.js +6 -4
- package/loaders/post-popovercontainer2.js +227 -59
- package/loaders/post-rating.js +14 -4
- package/loaders/post-tab-header.js +7 -6
- package/loaders/post-tab-panel.js +4 -3
- package/loaders/post-tabs.js +20 -13
- package/loaders/post-tag.js +3 -3
- package/loaders/post-togglebutton.d.ts +11 -0
- package/loaders/post-togglebutton.js +64 -0
- package/loaders/post-tooltip.js +34 -21
- package/loaders/slide.js +25 -0
- package/package.json +26 -20
- package/dist/cjs/check-non-empty-eeaa8f77.js +0 -11
- package/dist/cjs/check-one-of-f4f5d0c0.js +0 -8
- package/dist/cjs/fade-35a3633a.js +0 -10
- package/dist/cjs/index-01f30442.js +0 -52
- package/dist/cjs/post-accordion-item-7b348fa5.js +0 -51
- package/dist/cjs/post-alert-fca3a4a3.js +0 -98
- package/dist/cjs/post-alert.cjs.entry.js +0 -16
- package/dist/cjs/post-card-control-b4e4b4d5.js +0 -272
- package/dist/cjs/post-icon-3934be0b.js +0 -104
- package/dist/cjs/post-icon.cjs.entry.js +0 -15
- package/dist/cjs/post-logo-c3603fc7.js +0 -39
- package/dist/cjs/post-logo.cjs.entry.js +0 -14
- package/dist/cjs/post-popover-15f9620a.js +0 -104
- package/dist/cjs/post-popovercontainer-7d536276.js +0 -2186
- package/dist/cjs/post-popovercontainer.cjs.entry.js +0 -11
- package/dist/cjs/post-tab-header-29b8d4e1.js +0 -32
- package/dist/cjs/post-tag-b7d0bbff.js +0 -47
- package/dist/collection/components/post-alert/alert-types.js +0 -1
- package/dist/collection/components/post-alert/post-alert.css +0 -7
- package/dist/components/post-alert.js +0 -6
- package/dist/components/post-alert2.js +0 -136
- package/dist/esm/check-non-empty-58bd6b17.js +0 -9
- package/dist/esm/check-one-of-6b3ef8eb.js +0 -6
- package/dist/esm/fade-7fd71785.js +0 -7
- package/dist/esm/index-f41b763f.js +0 -46
- package/dist/esm/package-3d758f77.js +0 -3
- package/dist/esm/post-accordion-item-6b5a65ad.js +0 -49
- package/dist/esm/post-alert-f19db551.js +0 -96
- package/dist/esm/post-alert.entry.js +0 -8
- package/dist/esm/post-card-control-1b5df6cb.js +0 -270
- package/dist/esm/post-icon-40929043.js +0 -102
- package/dist/esm/post-icon.entry.js +0 -7
- package/dist/esm/post-logo-c6351ba8.js +0 -37
- package/dist/esm/post-logo.entry.js +0 -6
- package/dist/esm/post-popover-58149de7.js +0 -102
- package/dist/esm/post-popovercontainer-8bde9fc3.js +0 -2184
- package/dist/esm/post-popovercontainer.entry.js +0 -3
- package/dist/esm/post-tab-header-ae8feb19.js +0 -30
- package/dist/esm/post-tag-887d5fbe.js +0 -45
- package/dist/post-components/p-0b71bf5a.js +0 -1
- package/dist/post-components/p-0e09dc41.js +0 -1
- package/dist/post-components/p-19e54be9.js +0 -1
- package/dist/post-components/p-1e8f0f36.js +0 -1
- package/dist/post-components/p-22257eff.entry.js +0 -1
- package/dist/post-components/p-249ac168.entry.js +0 -1
- package/dist/post-components/p-2737eaf5.js +0 -1
- package/dist/post-components/p-2b10e265.js +0 -1
- package/dist/post-components/p-3325086e.js +0 -1
- package/dist/post-components/p-3b823fee.entry.js +0 -1
- package/dist/post-components/p-45f4c803.entry.js +0 -1
- package/dist/post-components/p-47935dbb.js +0 -1
- package/dist/post-components/p-486fbbce.entry.js +0 -1
- package/dist/post-components/p-4a7fb0f3.entry.js +0 -1
- package/dist/post-components/p-5f231c2c.js +0 -1
- package/dist/post-components/p-611b3c41.js +0 -1
- package/dist/post-components/p-6a28f8b9.js +0 -1
- package/dist/post-components/p-6adeaa6c.js +0 -1
- package/dist/post-components/p-6ed3497a.entry.js +0 -1
- package/dist/post-components/p-820c5c19.entry.js +0 -1
- package/dist/post-components/p-8aeb549f.entry.js +0 -1
- package/dist/post-components/p-92aeec3c.js +0 -1
- package/dist/post-components/p-9a99cfc7.js +0 -1
- package/dist/post-components/p-aa8a08dc.entry.js +0 -1
- package/dist/post-components/p-b095519d.js +0 -1
- package/dist/post-components/p-b99fdec3.js +0 -1
- package/dist/post-components/p-ba40b28a.entry.js +0 -1
- package/dist/post-components/p-c62de925.js +0 -1
- package/dist/post-components/p-d2101b8a.entry.js +0 -1
- package/dist/post-components/p-d2f9de94.js +0 -2
- package/dist/post-components/p-d7a44f45.js +0 -1
- package/dist/post-components/p-db4b8ea1.entry.js +0 -1
- package/dist/post-components/p-deb4131c.js +0 -1
- package/dist/post-components/p-eedc6ae8.entry.js +0 -1
- package/dist/post-components/p-f217f420.js +0 -1
- package/dist/post-components/p-f707d163.entry.js +0 -1
- package/dist/types/components/post-alert/alert-types.d.ts +0 -2
- package/dist/types/components/post-alert/post-alert.d.ts +0 -54
- package/loaders/post-alert.js +0 -139
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { r as registerInstance, g as getElement, h, H as Host } from './index-40846676.js';
|
|
2
|
+
import { v as version } from './package-5614c98b.js';
|
|
3
|
+
|
|
4
|
+
class Breakpoint {
|
|
5
|
+
breakpointMap;
|
|
6
|
+
current = {
|
|
7
|
+
key: '',
|
|
8
|
+
name: '',
|
|
9
|
+
};
|
|
10
|
+
constructor() {
|
|
11
|
+
if (!this.breakpointMap) {
|
|
12
|
+
const keys = this.getStyles('--post-breakpoint-keys');
|
|
13
|
+
const names = this.getStyles('--post-breakpoint-names');
|
|
14
|
+
const widths = this.getStyles('--post-breakpoint-widths');
|
|
15
|
+
this.breakpointMap = widths
|
|
16
|
+
.map((width, i) => ({
|
|
17
|
+
minWidth: Number(width),
|
|
18
|
+
key: keys[i],
|
|
19
|
+
name: names[i],
|
|
20
|
+
}))
|
|
21
|
+
.reverse();
|
|
22
|
+
window.addEventListener('resize', () => this.updateHandler(), { passive: true });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
getStyles(propertyName) {
|
|
26
|
+
const styles = getComputedStyle(document.documentElement);
|
|
27
|
+
return (styles
|
|
28
|
+
.getPropertyValue(propertyName)
|
|
29
|
+
?.split(',')
|
|
30
|
+
.map(w => w.trim()) ?? []);
|
|
31
|
+
}
|
|
32
|
+
updateHandler(emitEvents = true) {
|
|
33
|
+
const calculated = this.breakpointMap.find(({ minWidth }) => innerWidth >= minWidth);
|
|
34
|
+
if (this.current.key !== calculated.key) {
|
|
35
|
+
this.current.key = calculated.key;
|
|
36
|
+
if (emitEvents)
|
|
37
|
+
this.dispatchEvent('key');
|
|
38
|
+
}
|
|
39
|
+
if (this.current.name !== calculated.name) {
|
|
40
|
+
this.current.name = calculated.name;
|
|
41
|
+
if (emitEvents)
|
|
42
|
+
this.dispatchEvent('name');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
dispatchEvent(type) {
|
|
46
|
+
window.dispatchEvent(new CustomEvent(`postBreakpoint:${type}`, { detail: this.current[type] }));
|
|
47
|
+
}
|
|
48
|
+
get(type) {
|
|
49
|
+
this.updateHandler(false);
|
|
50
|
+
return this.current[type];
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const breakpoint = new Breakpoint();
|
|
54
|
+
|
|
55
|
+
const postFooterCss = ":host{display:block}footer{background-color:#fc0;--post-footer-container-padding-block:32px;--post-footer-container-padding-inline:16px;--post-footer-container-max-width:1200px;--post-footer-grid-template:auto / auto;--post-footer-grid-row-gap:0;--post-footer-grid-column-gap:0;--post-footer-grid-margin-block-end:24px;--post-footer-grid-padding-block-end:0;--post-footer-column-flex-direction:column;--post-footer-column-align-items:start;--post-footer-column-gap:0;--post-footer-post-list-flex-direction:column;--post-footer-post-list-gap:8px;--post-footer-post-list-align-items:start;--post-footer-socialmedia-margin-block-end:var(--post-footer-grid-margin-block-end);--post-footer-app-margin-block-end:var(--post-footer-grid-margin-block-end);--post-footer-businesssectors-margin-block-end:var(--post-footer-grid-margin-block-end);--post-footer-meta-margin-block-end:16px;--post-footer-meta-font-size:inherit;--post-footer-copyright-font-size:var(--post-footer-meta-font-size)}@media screen and (min-width: 600px){footer{--post-footer-container-padding-block:40px;--post-footer-grid-template:repeat(2, auto) / repeat(2, auto);--post-footer-grid-row-gap:32px;--post-footer-grid-column-gap:16px;--post-footer-grid-margin-block-end:32px;--post-footer-grid-padding-block-end:32px;--post-footer-post-list-flex-direction:row;--post-footer-post-list-gap:16px;--post-footer-post-list-align-items:center;--post-footer-meta-margin-block-end:8px}}@media screen and (min-width: 780px){footer{--post-footer-container-padding-inline:40px}}@media screen and (min-width: 1024px){footer{--post-footer-container-padding-block:56px;--post-footer-grid-template:auto / repeat(4, auto);--post-footer-grid-row-gap:0;--post-footer-grid-column-gap:24px;--post-footer-grid-margin-block-end:40px;--post-footer-column-flex-direction:row;--post-footer-column-align-items:center;--post-footer-column-gap:32px;--post-footer-post-list-gap:24px;--post-footer-businesssectors-margin-block-end:24px;--post-footer-meta-font-size:16px}}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.footer-container{box-sizing:content-box;margin:0 auto;padding:var(--post-footer-container-padding-block) var(--post-footer-container-padding-inline);max-width:var(--post-footer-container-max-width)}.footer-grid{display:grid;grid-template:var(--post-footer-grid-template);row-gap:var(--post-footer-grid-row-gap);column-gap:var(--post-footer-grid-column-gap);margin-block-end:var(--post-footer-grid-margin-block-end);padding-block-end:var(--post-footer-grid-padding-block-end)}.footer-grid ::part(button),.footer-grid ::part(body){padding-inline:0}.footer-column{display:flex;flex-direction:var(--post-footer-column-flex-direction);flex-wrap:wrap;justify-content:space-between;align-items:var(--post-footer-column-align-items);column-gap:var(--post-footer-column-gap)}.footer-socialmedia ::slotted(post-list),.footer-app ::slotted(post-list),.footer-businesssectors ::slotted(post-list),.footer-meta ::slotted(post-list){display:flex !important;flex-direction:var(--post-footer-post-list-flex-direction) !important;gap:var(--post-footer-post-list-gap) !important;align-items:var(--post-footer-post-list-align-items) !important}.footer-socialmedia{margin-block-end:var(--post-footer-socialmedia-margin-block-end)}.footer-app{margin-block-end:var(--post-footer-app-margin-block-end)}.footer-businesssectors{margin-block-end:var(--post-footer-businesssectors-margin-block-end)}.footer-meta{margin-block-end:var(--post-footer-meta-margin-block-end);font-size:var(--post-footer-meta-font-size)}.footer-copyright{display:flex;flex-wrap:wrap;column-gap:.5rem;font-size:var(--post-footer-copyright-font-size)}";
|
|
56
|
+
const PostFooterStyle0 = postFooterCss;
|
|
57
|
+
|
|
58
|
+
const PostFooter = class {
|
|
59
|
+
constructor(hostRef) {
|
|
60
|
+
registerInstance(this, hostRef);
|
|
61
|
+
this.label = undefined;
|
|
62
|
+
this.isMobile = breakpoint.get('name') === 'mobile';
|
|
63
|
+
}
|
|
64
|
+
get host() { return getElement(this); }
|
|
65
|
+
connectedCallback() {
|
|
66
|
+
window.addEventListener('postBreakpoint:name', this.breakpointChange.bind(this));
|
|
67
|
+
}
|
|
68
|
+
breakpointChange(e) {
|
|
69
|
+
this.isMobile = e.detail === 'mobile';
|
|
70
|
+
}
|
|
71
|
+
renderAccordion() {
|
|
72
|
+
return (h("div", { class: "footer-grid" }, h("post-accorddion", { "heading-level": "3", multiple: true }, h("post-accordion-item", { collapsed: true }, h("span", { slot: "header" }, h("slot", { name: "grid-1-title" })), h("slot", { name: "grid-1" })), h("post-accordion-item", { collapsed: true }, h("span", { slot: "header" }, h("slot", { name: "grid-2-title" })), h("slot", { name: "grid-2" })), h("post-accordion-item", { collapsed: true }, h("span", { slot: "header" }, h("slot", { name: "grid-3-title" })), h("slot", { name: "grid-3" })), h("post-accordion-item", { collapsed: true }, h("span", { slot: "header" }, h("slot", { name: "grid-4-title" })), h("slot", { name: "grid-4" })))));
|
|
73
|
+
}
|
|
74
|
+
renderGrid() {
|
|
75
|
+
return (h("div", { class: "footer-grid" }, h("div", null, h("slot", { name: "grid-1" })), h("div", null, h("slot", { name: "grid-2" })), h("div", null, h("slot", { name: "grid-3" })), h("div", null, h("slot", { name: "grid-4" }))));
|
|
76
|
+
}
|
|
77
|
+
render() {
|
|
78
|
+
return (h(Host, { key: '14370a1cfd730a0b0353c88c95f265aefb57c480', "data-version": version }, h("footer", { key: '7208e9d465eb0b469887e7cfae66674db2092dbd' }, h("h2", { key: 'b392c866326374ae27704baaba0dd28c3001ee62', class: "visually-hidden" }, this.label), h("div", { key: '13411ad6e0b55ee17cf9bf77b155aa1c2810f057', class: "footer-container" }, this.isMobile ? this.renderAccordion() : this.renderGrid(), h("div", { key: '4815ae94cd43eca92482ad3c93f107243b26890e', class: "footer-column" }, h("div", { key: 'edc787dc5fc96169c323f15254b6088024a6f19d', class: "footer-socialmedia" }, h("slot", { key: '0971e342ac6f3913c408a535ce0746080e3f57af', name: "socialmedia" })), h("div", { key: 'da583c9ed819181bf2732277f4e6ee22df2e3022', class: "footer-app" }, h("slot", { key: 'b6dab5cfa1f4dc9c049f24d3e08416ef5a27e0aa', name: "app" }))), h("div", { key: '53a5c04129d24dfb64eedd46e95b5c78142a3fd7', class: "footer-businesssectors" }, h("slot", { key: '470f4294778b8978bf6eb168e2b47ff29ef43d07', name: "businesssectors" })), h("div", { key: '45d734ded794352b951f2891bbdba081e05a99d5', class: "footer-meta" }, h("slot", { key: '4d0da53c2eb79e111f0f05278a0972f046eebfa9', name: "meta" })), h("div", { key: 'f95fb7ed3cc09218a3d4a554c619b6f379d5135d', class: "footer-copyright" }, h("slot", { key: '9cdcec805152413693dced0f0d55ac1b1121c70e', name: "copyright" }))))));
|
|
79
|
+
}
|
|
80
|
+
disconnectedCallback() {
|
|
81
|
+
window.removeEventListener('postBreakpoint:name', this.breakpointChange.bind(this));
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
PostFooter.style = PostFooterStyle0;
|
|
85
|
+
|
|
86
|
+
export { PostFooter as P };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { r as registerInstance, g as getElement, h, H as Host } from './index-40846676.js';
|
|
2
|
+
import { v as version } from './package-5614c98b.js';
|
|
3
|
+
|
|
4
|
+
const postLinkareaCss = "post-linkarea{display:contents;cursor:pointer}";
|
|
5
|
+
const PostLinkareaStyle0 = postLinkareaCss;
|
|
6
|
+
|
|
7
|
+
const INTERACTIVE_ELEMENTS = ['a'].join(',');
|
|
8
|
+
const INTERACTIVE_ELEMENTS_SELECTOR = `:where(${INTERACTIVE_ELEMENTS})`;
|
|
9
|
+
const PostLinkarea = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
registerInstance(this, hostRef);
|
|
12
|
+
}
|
|
13
|
+
get host() { return getElement(this); }
|
|
14
|
+
dispatchClick({ ctrlKey, shiftKey, altKey, metaKey }) {
|
|
15
|
+
const interactiveElement = this.host.querySelector(`[data-link]${INTERACTIVE_ELEMENTS_SELECTOR}`) ??
|
|
16
|
+
this.host.querySelector(INTERACTIVE_ELEMENTS_SELECTOR);
|
|
17
|
+
if (!interactiveElement) {
|
|
18
|
+
throw new Error(`The \`post-linkarea\` component must contain an interactive element. Possible elements are: ${INTERACTIVE_ELEMENTS}.`);
|
|
19
|
+
}
|
|
20
|
+
interactiveElement.dispatchEvent(new MouseEvent('click', { ctrlKey, shiftKey, altKey, metaKey }));
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
return (h(Host, { key: 'c27bb1e548eecbef9b981ebadea8a9a30a06a89c', "data-version": version, onClick: e => this.dispatchClick(e), tabindex: "0" }, h("slot", { key: '9e5bd5c6032ed87bc2c6e9eed96dc79f19295325' })));
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
PostLinkarea.style = PostLinkareaStyle0;
|
|
27
|
+
|
|
28
|
+
export { PostLinkarea as P };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { r as registerInstance, g as getElement, h, H as Host } from './index-40846676.js';
|
|
2
|
+
import { v as version } from './package-5614c98b.js';
|
|
3
|
+
import { b as checkEmptyOrUrl } from './index-8f8fe5b0.js';
|
|
4
|
+
|
|
5
|
+
const postBreadcrumbItemCss = ":host{display:flex;align-items:center;justify-content:start;gap:var(--post-device-spacing-gap-inline-5)}:host post-icon{box-sizing:border-box;height:var(--post-core-dimension-24);width:var(--post-core-dimension-24);padding-block:var(--post-core-dimension-4);padding-inline:var(--post-core-dimension-4)}.breadcrumb-item{white-space:nowrap;line-height:150%;padding-block:var(--post-device-spacing-padding-block-7);color:var(--post-scheme-color-interactive-primary-enabled-fg1);text-decoration:var(--post-core-text-decoration-none)}.breadcrumb-item{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}.breadcrumb-item: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){.breadcrumb-item:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.breadcrumb-item: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){.breadcrumb-item:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.breadcrumb-item:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);text-decoration:var(--post-core-text-decoration-underline)}.breadcrumb-item:focus-visible{border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.breadcrumb-item,.breadcrumb-item:focus,.breadcrumb-item:hover{color:LinkText !important}.breadcrumb-item:visited{color:VisitedText !important}}";
|
|
6
|
+
const PostBreadcrumbItemStyle0 = postBreadcrumbItemCss;
|
|
7
|
+
|
|
8
|
+
const PostBreadcrumbItem = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.url = undefined;
|
|
12
|
+
this.fullUrl = undefined;
|
|
13
|
+
}
|
|
14
|
+
get host() { return getElement(this); }
|
|
15
|
+
validUrl;
|
|
16
|
+
validateUrl() {
|
|
17
|
+
try {
|
|
18
|
+
this.validUrl = this.constructUrl(this.url);
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
this.validUrl = undefined;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
// Helper to construct a valid URL string or return undefined
|
|
25
|
+
constructUrl(value) {
|
|
26
|
+
const hasBaseURL = /^https?:\/\//.test(String(this.url));
|
|
27
|
+
if (typeof value === 'string') {
|
|
28
|
+
this.fullUrl = hasBaseURL ? value : `${window.location.origin}${value}`;
|
|
29
|
+
checkEmptyOrUrl(this, 'fullUrl');
|
|
30
|
+
return this.fullUrl;
|
|
31
|
+
}
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
connectedCallback() {
|
|
35
|
+
this.validateUrl();
|
|
36
|
+
}
|
|
37
|
+
handleKeyDown(event) {
|
|
38
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
39
|
+
const linkElement = this.host.shadowRoot?.querySelector('a');
|
|
40
|
+
if (linkElement) {
|
|
41
|
+
event.preventDefault();
|
|
42
|
+
linkElement.click();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
render() {
|
|
47
|
+
const BreadcrumbTag = this.validUrl ? 'a' : 'span';
|
|
48
|
+
return (h(Host, { key: 'd0444118aa031f4cf6f5161d7aa21900e9768348', "data-version": version }, h("post-icon", { key: '719a76e6e86bbb02526c4610acefb3ad253454af', name: "2111", class: "breadcrumb-item-icon" }), h(BreadcrumbTag, { key: '3f5ffb9c77567dba35efa7938029cd519de55474', class: "breadcrumb-item", ...(this.validUrl ? { href: this.validUrl } : {}), onKeyDown: event => this.handleKeyDown(event) }, h("slot", { key: 'bb1be29905c1533f2238a47a346fb35d6a7645fd' }))));
|
|
49
|
+
}
|
|
50
|
+
static get watchers() { return {
|
|
51
|
+
"url": ["validateUrl"]
|
|
52
|
+
}; }
|
|
53
|
+
};
|
|
54
|
+
PostBreadcrumbItem.style = PostBreadcrumbItemStyle0;
|
|
55
|
+
|
|
56
|
+
const PostMenuItem = class {
|
|
57
|
+
constructor(hostRef) {
|
|
58
|
+
registerInstance(this, hostRef);
|
|
59
|
+
}
|
|
60
|
+
render() {
|
|
61
|
+
return (h(Host, { key: '376ce17a520b6cb74c55c009843df878f99ef411', role: "menuitem", "data-version": version }, h("slot", { key: 'e489c5c09f1527e527e052e9f4349c5b26db6ea9' })));
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export { PostBreadcrumbItem as P, PostMenuItem as a };
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { g as getElement, r as registerInstance, h, H as Host } from './index-40846676.js';
|
|
2
|
+
import { v as version } from './package-5614c98b.js';
|
|
3
|
+
import { g as getAttributeObserver } from './attribute-observer-2f203993.js';
|
|
4
|
+
|
|
5
|
+
const postPopoverCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.btn-close{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);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}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{background-color:ButtonFace !important}.btn-close:hover{background-color:Highlight !important}}.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:#999}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:Highlight}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}*{box-sizing:border-box}:host{display:block}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.popover-container{display:flex;align-items:self-start;padding:.5em;min-width:160px;max-width:280px;max-width:100%}.popover-content{padding:.5em;flex-grow:1}.btn-close{color:inherit}";
|
|
6
|
+
const PostPopoverStyle0 = postPopoverCss;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @slot default - Slot for placing content inside the popover.
|
|
10
|
+
*/
|
|
11
|
+
let popoverInstances = 0;
|
|
12
|
+
const popoverTargetAttribute = 'data-popover-target';
|
|
13
|
+
const globalToggleHandler = (e) => {
|
|
14
|
+
const target = e.target;
|
|
15
|
+
if (!target || !('getAttribute' in target))
|
|
16
|
+
return;
|
|
17
|
+
const popoverTarget = target.getAttribute(popoverTargetAttribute);
|
|
18
|
+
if (!popoverTarget || ('key' in e && e.key !== 'Enter'))
|
|
19
|
+
return;
|
|
20
|
+
const popover = document.getElementById(popoverTarget);
|
|
21
|
+
popover?.toggle(target);
|
|
22
|
+
};
|
|
23
|
+
// Initialize a mutation observer for patching accessibility features
|
|
24
|
+
const triggerObserver = getAttributeObserver(popoverTargetAttribute, trigger => {
|
|
25
|
+
const force = trigger.hasAttribute(popoverTargetAttribute);
|
|
26
|
+
trigger.setAttribute('aria-expanded', force ? 'false' : null);
|
|
27
|
+
});
|
|
28
|
+
const PostPopover = class {
|
|
29
|
+
popoverRef;
|
|
30
|
+
localBeforeToggleHandler;
|
|
31
|
+
get host() { return getElement(this); }
|
|
32
|
+
constructor(hostRef) {
|
|
33
|
+
registerInstance(this, hostRef);
|
|
34
|
+
this.placement = 'top';
|
|
35
|
+
this.closeButtonCaption = undefined;
|
|
36
|
+
this.arrow = true;
|
|
37
|
+
this.localBeforeToggleHandler = this.beforeToggleHandler.bind(this);
|
|
38
|
+
}
|
|
39
|
+
connectedCallback() {
|
|
40
|
+
// Set up accessibility patcher and event listeners for the first component
|
|
41
|
+
if (popoverInstances === 0) {
|
|
42
|
+
window.addEventListener('pointerup', globalToggleHandler);
|
|
43
|
+
window.addEventListener('keydown', globalToggleHandler);
|
|
44
|
+
triggerObserver.observe(document.body, {
|
|
45
|
+
subtree: true,
|
|
46
|
+
childList: true,
|
|
47
|
+
attributeFilter: [popoverTargetAttribute],
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
popoverInstances++;
|
|
51
|
+
this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
|
|
52
|
+
}
|
|
53
|
+
componentDidLoad() {
|
|
54
|
+
this.popoverRef.addEventListener('beforetoggle', this.localBeforeToggleHandler);
|
|
55
|
+
}
|
|
56
|
+
disconnectedCallback() {
|
|
57
|
+
popoverInstances--;
|
|
58
|
+
// Remove listeners and observer after the last popover has been destructed
|
|
59
|
+
if (popoverInstances === 0) {
|
|
60
|
+
window.removeEventListener('click', globalToggleHandler);
|
|
61
|
+
window.removeEventListener('keydown', globalToggleHandler);
|
|
62
|
+
triggerObserver.disconnect();
|
|
63
|
+
}
|
|
64
|
+
this.popoverRef.removeEventListener('beforetoggle', this.localBeforeToggleHandler);
|
|
65
|
+
this.triggers.forEach(trigger => trigger.removeAttribute('aria-expanded'));
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Programmatically display the popover
|
|
69
|
+
* @param target An element with [data-popover-target="id"] where the popover should be shown
|
|
70
|
+
*/
|
|
71
|
+
async show(target) {
|
|
72
|
+
this.popoverRef.show(target);
|
|
73
|
+
target.setAttribute('aria-expanded', 'true');
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Programmatically hide this popover
|
|
77
|
+
*/
|
|
78
|
+
async hide() {
|
|
79
|
+
this.popoverRef.hide();
|
|
80
|
+
this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Toggle popover display
|
|
84
|
+
* @param target An element with [data-popover-target="id"] where the popover should be anchored to
|
|
85
|
+
* @param force Pass true to always show or false to always hide
|
|
86
|
+
*/
|
|
87
|
+
async toggle(target, force) {
|
|
88
|
+
const newState = await this.popoverRef.toggle(target, force);
|
|
89
|
+
this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
|
|
90
|
+
target.setAttribute('aria-expanded', `${newState}`);
|
|
91
|
+
}
|
|
92
|
+
get triggers() {
|
|
93
|
+
return document.querySelectorAll(`[${popoverTargetAttribute}="${this.host.id}"]`);
|
|
94
|
+
}
|
|
95
|
+
beforeToggleHandler() {
|
|
96
|
+
this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
|
|
97
|
+
}
|
|
98
|
+
render() {
|
|
99
|
+
return (h(Host, { key: 'a7976e6c960015ed9b318c75fc8a74afc2337661', "data-version": version }, h("post-popovercontainer", { key: '1b71f4bce3a6866e19c3900c0e82f814508f8144', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: 'b15e45e7fd31edc36fa4c912332984daf0ce9cbc', class: "popover-container" }, h("div", { key: 'adc170a2738c7f88c60e8885d8ee84f10fa1d546', class: "popover-content" }, h("slot", { key: '235dbd1a184353de8d8da038c8c31e3dd7f6dab7' })), h("button", { key: '679fccf088d5589b548ec2186facc6c767aace93', class: "btn-close", onClick: () => this.hide() }, h("span", { key: 'e8f61719cc6e9b6ddf85756005f17b9103406055', class: "visually-hidden" }, this.closeButtonCaption))))));
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
PostPopover.style = PostPopoverStyle0;
|
|
103
|
+
|
|
104
|
+
export { PostPopover as P };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { P as post_popover } from './post-popover-
|
|
2
|
-
import './index-
|
|
3
|
-
import './package-
|
|
4
|
-
import './attribute-observer-
|
|
1
|
+
export { P as post_popover } from './post-popover-67a3cbf2.js';
|
|
2
|
+
import './index-40846676.js';
|
|
3
|
+
import './package-5614c98b.js';
|
|
4
|
+
import './attribute-observer-2f203993.js';
|
|
@@ -1,15 +1,26 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host
|
|
2
|
-
import { v as version } from './package-
|
|
1
|
+
import { g as getElement, r as registerInstance, c as createEvent, h, H as Host } from './index-40846676.js';
|
|
2
|
+
import { v as version } from './package-5614c98b.js';
|
|
3
3
|
|
|
4
|
-
const postRatingCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:inline-block}.rating{display:flex;flex-wrap:wrap;overflow:hidden;margin:0 -
|
|
4
|
+
const postRatingCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:inline-block}.rating{display:flex;flex-wrap:wrap;overflow:hidden;margin:0 calc(var(--post-core-dimension-4)*-1);border-radius:4px}.rating .star{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fff;position:relative;width:2rem;height:2rem;cursor:pointer}.rating .star .stroke,.rating .star .fill{display:block;width:100%;height:100%;transition:all ease 100ms}.rating .star .stroke{position:absolute;inset:auto;z-index:1;color:var(--post-rating-star-stroke)}.rating .star .fill{margin:1px;width:calc(100% - 2px);height:calc(100% - 2px);color:var(--post-rating-star-fill)}.rating .star.before-hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.active{--post-rating-star-stroke:hsl(0, 0%, 20%);--post-rating-star-fill:#fc0}.rating .star.hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.after-active{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:hsl(0, 0%, 80%)}.rating :focus{outline:none}.rating:focus-visible{outline-offset:var(--post-core-dimension-2);outline:var(--post-core-dimension-2) solid #1976c8}.rating[aria-readonly=true] .star,.rating[aria-disabled=true] .star{cursor:default}.rating[aria-disabled=true] .star{--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:#fff}.rating[aria-disabled=true] .star.active{cursor:default;--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:hsl(0, 0%, 90%)}";
|
|
5
5
|
const PostRatingStyle0 = postRatingCss;
|
|
6
6
|
|
|
7
7
|
const PostRating = class {
|
|
8
|
+
hasChanged = false;
|
|
9
|
+
get host() { return getElement(this); }
|
|
10
|
+
/**
|
|
11
|
+
* An event emitted whenever the component's value has changed (on input).
|
|
12
|
+
* The event payload can be used like so: `event.detail.value`.
|
|
13
|
+
*/
|
|
14
|
+
postInput;
|
|
15
|
+
/**
|
|
16
|
+
* An event emitted whenever the component's value has changed (on blur).
|
|
17
|
+
* The event payload can be used like so: `event.detail.value`.
|
|
18
|
+
*/
|
|
19
|
+
postChange;
|
|
8
20
|
constructor(hostRef) {
|
|
9
21
|
registerInstance(this, hostRef);
|
|
10
22
|
this.postInput = createEvent(this, "postInput", 7);
|
|
11
23
|
this.postChange = createEvent(this, "postChange", 7);
|
|
12
|
-
this.hasChanged = false;
|
|
13
24
|
this.hoveredIndex = undefined;
|
|
14
25
|
this.label = 'Rating';
|
|
15
26
|
this.stars = 5;
|
|
@@ -71,7 +82,7 @@ const PostRating = class {
|
|
|
71
82
|
}
|
|
72
83
|
}
|
|
73
84
|
render() {
|
|
74
|
-
return (h(Host, { key: '
|
|
85
|
+
return (h(Host, { key: '4ccdf384b9a4cfc462d5d3f4a7caab659b6ba2b0', "data-version": version }, h("div", { key: '7ab53083bcdff6586b1de7f1c9e5fa546728fc6f', role: "slider", class: "rating", tabindex: "0", "aria-label": this.label, "aria-valuemin": "0", "aria-valuemax": this.stars, "aria-valuenow": this.currentRating, "aria-valuetext": `${this.currentRating} out of ${this.stars}`, "aria-readonly": this.readonly ? 'true' : 'false', onKeyDown: this.keydownHandler, onBlur: this.blurHandler }, Array.from({ length: this.stars }).map((v, i) => (h("div", { key: `star-${v}`, "aria-hidden": "true", class: {
|
|
75
86
|
'star': true,
|
|
76
87
|
'before-hover': i < this.hoveredIndex,
|
|
77
88
|
'active': i < Math.round(this.currentRating),
|
|
@@ -79,7 +90,6 @@ const PostRating = class {
|
|
|
79
90
|
'after-active': i > this.hoveredIndex && i < this.currentRating,
|
|
80
91
|
}, onClick: () => this.update(i + 1), onMouseEnter: e => this.hoverHandler(i, e), onMouseLeave: e => this.hoverHandler(i, e) }, h("post-icon", { name: "2062", class: "stroke" }), h("post-icon", { name: "2574", class: "fill" })))))));
|
|
81
92
|
}
|
|
82
|
-
get host() { return getElement(this); }
|
|
83
93
|
};
|
|
84
94
|
PostRating.style = PostRatingStyle0;
|
|
85
95
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { P as post_rating } from './post-rating-
|
|
2
|
-
import './index-
|
|
3
|
-
import './package-
|
|
1
|
+
export { P as post_rating } from './post-rating-9613bee8.js';
|
|
2
|
+
import './index-40846676.js';
|
|
3
|
+
import './package-5614c98b.js';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { r as registerInstance, g as getElement, h, H as Host } from './index-40846676.js';
|
|
2
|
+
import { v as version } from './package-5614c98b.js';
|
|
3
|
+
import { c as checkNonEmpty } from './check-non-empty-258a56b3.js';
|
|
4
|
+
import { n as nanoid } from './index.browser-51485f85.js';
|
|
5
|
+
|
|
6
|
+
const postTabHeaderCss = ".tab-title[role=tab]{display:inline-block;cursor:pointer;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);outline-color:currentColor;opacity:.7;color:#000;text-decoration:none;background-color:rgba(0,0,0,0)}.tab-title[role=tab]:focus{background-color:unset;color:#000}.tab-title[role=tab]:hover{opacity:1;background-color:rgba(0,0,0,.6);color:#fff}.tab-title[role=tab]:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:rgba(0,0,0,.6);color:#fff;box-shadow:none}.tab-title[role=tab]:focus-visible::after{content:\"\";display:block;position:absolute;top:2px;right:1px;bottom:0;left:1px;box-shadow:0 0 0 1px #fff,0 0 0 2px #333}.tab-title[role=tab].active{z-index:1;border-right-color:#ccc;border-left-color:#ccc;opacity:1;background-color:#fff;color:#000;font-weight:700}.tab-title[role=tab].active::before{content:\"\";display:block;position:absolute;top:0;right:-1px;left:-1px;height:var(--post-core-dimension-4);background-color:#fc0}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title[role=tab]:hover{background-color:rgba(255,255,255,.2)}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title[role=tab]:focus-visible{background-color:rgba(255,255,255,.2)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title[role=tab]{opacity:1;border-left-color:Canvas;border-right-color:Canvas;color:LinkText}.tab-title[role=tab]:hover,.tab-title[role=tab]:focus,.tab-title[role=tab]:focus-within,.tab-title[role=tab]:focus-visible{outline:var(--post-core-dimension-2) solid Highlight;outline-offset:calc(var(--post-core-dimension-4)*-1)}.tab-title[role=tab].active{border-left-color:ButtonText;border-right-color:ButtonText;color:Highlight}.tab-title[role=tab].active::before{background-color:Highlight}}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}.tab-title{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title{background-color:ButtonFace !important}.tab-title:hover{background-color:Highlight !important}}";
|
|
7
|
+
const PostTabHeaderStyle0 = postTabHeaderCss;
|
|
8
|
+
|
|
9
|
+
const PostTabHeader = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
registerInstance(this, hostRef);
|
|
12
|
+
this.tabId = undefined;
|
|
13
|
+
this.panel = undefined;
|
|
14
|
+
}
|
|
15
|
+
get host() { return getElement(this); }
|
|
16
|
+
validateFor() {
|
|
17
|
+
checkNonEmpty(this, 'panel');
|
|
18
|
+
}
|
|
19
|
+
componentWillLoad() {
|
|
20
|
+
this.tabId = `tab-${this.host.id || nanoid(6)}`;
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
return (h(Host, { key: '336824660de90bf5c570e9739947927a32612fbd', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '8bfe0b57fa96044692e2db3fd983ccde427558e7' })));
|
|
24
|
+
}
|
|
25
|
+
static get watchers() { return {
|
|
26
|
+
"panel": ["validateFor"]
|
|
27
|
+
}; }
|
|
28
|
+
};
|
|
29
|
+
PostTabHeader.style = PostTabHeaderStyle0;
|
|
30
|
+
|
|
31
|
+
export { PostTabHeader as P };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { P as post_tab_header } from './post-tab-header-
|
|
2
|
-
import './index-
|
|
3
|
-
import './package-
|
|
4
|
-
import './check-non-empty-
|
|
1
|
+
export { P as post_tab_header } from './post-tab-header-dff3a025.js';
|
|
2
|
+
import './index-40846676.js';
|
|
3
|
+
import './package-5614c98b.js';
|
|
4
|
+
import './check-non-empty-258a56b3.js';
|
|
5
5
|
import './constants-8d548297.js';
|
|
6
|
+
import './index.browser-51485f85.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host
|
|
2
|
-
import { v as version } from './package-
|
|
1
|
+
import { r as registerInstance, g as getElement, h, H as Host } from './index-40846676.js';
|
|
2
|
+
import { v as version } from './package-5614c98b.js';
|
|
3
|
+
import { n as nanoid } from './index.browser-51485f85.js';
|
|
3
4
|
|
|
4
5
|
const postTabPanelCss = ":host{display:none}";
|
|
5
6
|
const PostTabPanelStyle0 = postTabPanelCss;
|
|
@@ -10,14 +11,14 @@ const PostTabPanel = class {
|
|
|
10
11
|
this.panelId = undefined;
|
|
11
12
|
this.name = undefined;
|
|
12
13
|
}
|
|
14
|
+
get host() { return getElement(this); }
|
|
13
15
|
componentWillLoad() {
|
|
14
16
|
// get the id set on the host element or use a random id by default
|
|
15
|
-
this.panelId = `panel-${this.host.id ||
|
|
17
|
+
this.panelId = `panel-${this.host.id || nanoid(6)}`;
|
|
16
18
|
}
|
|
17
19
|
render() {
|
|
18
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: '8331ab54bda793a120dc467d8406cc0a02a5c480', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: '7da6d67b69150a70ee290ad8ef9b95684ea3f83d' })));
|
|
19
21
|
}
|
|
20
|
-
get host() { return getElement(this); }
|
|
21
22
|
};
|
|
22
23
|
PostTabPanel.style = PostTabPanelStyle0;
|
|
23
24
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { P as post_tab_panel } from './post-tab-panel-
|
|
2
|
-
import './index-
|
|
3
|
-
import './package-
|
|
1
|
+
export { P as post_tab_panel } from './post-tab-panel-2b3f82a8.js';
|
|
2
|
+
import './index-40846676.js';
|
|
3
|
+
import './package-5614c98b.js';
|
|
4
|
+
import './index.browser-51485f85.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host
|
|
2
|
-
import { v as version } from './package-
|
|
3
|
-
import { f as fadeOut, a as fadeIn } from './fade-
|
|
1
|
+
import { r as registerInstance, c as createEvent, g as getElement, h, H as Host } from './index-40846676.js';
|
|
2
|
+
import { v as version } from './package-5614c98b.js';
|
|
3
|
+
import { f as fadeOut, a as fadeIn } from './fade-1f3cacf4.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Invoke the `componentOnReady` method if it is available, simulate it otherwise
|
|
7
7
|
* @see https://stenciljs.com/docs/api#componentonready
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
function componentOnReady(el) {
|
|
10
10
|
if (typeof el.componentOnReady === 'function') {
|
|
11
11
|
return el.componentOnReady();
|
|
12
12
|
}
|
|
@@ -15,31 +15,40 @@ const componentOnReady = (el) => {
|
|
|
15
15
|
resolve(el);
|
|
16
16
|
}));
|
|
17
17
|
}
|
|
18
|
-
}
|
|
19
|
-
|
|
18
|
+
}
|
|
19
|
+
function customOnReady(callback) {
|
|
20
20
|
if (typeof requestAnimationFrame === 'function') {
|
|
21
21
|
return requestAnimationFrame(callback);
|
|
22
22
|
}
|
|
23
23
|
return setTimeout(callback);
|
|
24
|
-
}
|
|
24
|
+
}
|
|
25
25
|
|
|
26
|
-
const postTabsCss = ".tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:rgba(
|
|
26
|
+
const postTabsCss = ".tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:rgba(0,0,0,.02)}.tabs-wrapper::after{content:\"\";position:absolute;bottom:0;width:100%;height:1px;background-color:#ccc}.tabs-wrapper .tabs{background-color:rgba(0,0,0,0) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tabs-wrapper::after{background-color:ButtonBorder}}.tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;white-space:nowrap;margin-block:0;padding-inline-start:0;list-style:none}.tabs::after{content:\"\";display:block;flex:1 0 auto;width:1rem}.tab-content{padding-top:1rem}:host{display:block}";
|
|
27
27
|
const PostTabsStyle0 = postTabsCss;
|
|
28
28
|
|
|
29
29
|
const PostTabs = class {
|
|
30
30
|
constructor(hostRef) {
|
|
31
31
|
registerInstance(this, hostRef);
|
|
32
32
|
this.postChange = createEvent(this, "postChange", 7);
|
|
33
|
-
this.isLoaded = false;
|
|
34
33
|
this.activePanel = undefined;
|
|
35
34
|
}
|
|
35
|
+
activeTab;
|
|
36
|
+
showing;
|
|
37
|
+
hiding;
|
|
38
|
+
isLoaded = false;
|
|
36
39
|
get tabs() {
|
|
37
|
-
return this.host.querySelectorAll('post-tab-header');
|
|
40
|
+
return Array.from(this.host.querySelectorAll('post-tab-header')).filter(tab => tab.closest('post-tabs') === this.host);
|
|
38
41
|
}
|
|
42
|
+
get host() { return getElement(this); }
|
|
43
|
+
/**
|
|
44
|
+
* An event emitted after the active tab changes, when the fade in transition of its associated panel is finished.
|
|
45
|
+
* The payload is the name of the newly shown panel.
|
|
46
|
+
*/
|
|
47
|
+
postChange;
|
|
39
48
|
componentDidLoad() {
|
|
40
49
|
this.moveMisplacedTabs();
|
|
41
50
|
this.enableTabs();
|
|
42
|
-
const initiallyActivePanel = this.activePanel || this.tabs
|
|
51
|
+
const initiallyActivePanel = this.activePanel || this.tabs[0]?.panel;
|
|
43
52
|
void this.show(initiallyActivePanel);
|
|
44
53
|
this.isLoaded = true;
|
|
45
54
|
}
|
|
@@ -48,9 +57,8 @@ const PostTabs = class {
|
|
|
48
57
|
* Any other panel that was previously shown becomes hidden and its associated tab is unselected.
|
|
49
58
|
*/
|
|
50
59
|
async show(panelName) {
|
|
51
|
-
var _a;
|
|
52
60
|
// do nothing if the tab is already active
|
|
53
|
-
if (panelName ===
|
|
61
|
+
if (panelName === this.activeTab?.panel) {
|
|
54
62
|
return;
|
|
55
63
|
}
|
|
56
64
|
const previousTab = this.activeTab;
|
|
@@ -110,7 +118,7 @@ const PostTabs = class {
|
|
|
110
118
|
});
|
|
111
119
|
// if the currently active tab was removed from the DOM then select the first one
|
|
112
120
|
if (this.activeTab && !this.activeTab.isConnected) {
|
|
113
|
-
void this.show(this.tabs
|
|
121
|
+
void this.show(this.tabs[0]?.panel);
|
|
114
122
|
}
|
|
115
123
|
}
|
|
116
124
|
activateTab(tab) {
|
|
@@ -162,9 +170,8 @@ const PostTabs = class {
|
|
|
162
170
|
nextTab.focus();
|
|
163
171
|
}
|
|
164
172
|
render() {
|
|
165
|
-
return (h(Host, { key: '
|
|
173
|
+
return (h(Host, { key: 'dae24eee55a75f9b825f590883a9c1e896c1e9fc', "data-version": version }, h("div", { key: '0a26de80b8267ddc30455b0b5afbf10ae521232b', class: "tabs-wrapper", part: "tabs" }, h("div", { key: '826cb0a4355eeb5ddc07288e1e68fc72785c095f', class: "tabs", role: "tablist" }, h("slot", { key: '94ce90bc3dc8ff4b5012fcfa3c0039b188c14002', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: '462f80f3368431344910cc317f1c0f42112dc99a', class: "tab-content", part: "content" }, h("slot", { key: '57a80ac790ca75f3b62382994c21a3a3c78004cc', onSlotchange: () => this.moveMisplacedTabs() }))));
|
|
166
174
|
}
|
|
167
|
-
get host() { return getElement(this); }
|
|
168
175
|
};
|
|
169
176
|
PostTabs.style = PostTabsStyle0;
|
|
170
177
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { P as post_tabs } from './post-tabs-
|
|
2
|
-
import './index-
|
|
3
|
-
import './package-
|
|
4
|
-
import './fade-
|
|
1
|
+
export { P as post_tabs } from './post-tabs-46d1165f.js';
|
|
2
|
+
import './index-40846676.js';
|
|
3
|
+
import './package-5614c98b.js';
|
|
4
|
+
import './fade-1f3cacf4.js';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { g as getElement, r as registerInstance, h, H as Host } from './index-40846676.js';
|
|
2
|
+
import { v as version } from './package-5614c98b.js';
|
|
3
|
+
|
|
4
|
+
const postTagCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.tag,.tag:where(:has(:not(pre))){--post-tag-bg:hsl(0, 0%, 90%);--post-tag-fg:#000;display:inline-flex;align-items:center;gap:var(--post-core-dimension-4);padding:0 var(--post-core-dimension-8);max-width:100%;background-color:var(--post-tag-bg);border:var(--post-core-dimension-1) solid rgba(0,0,0,0);border-radius:var(--post-core-dimension-4);font-size:1rem;line-height:calc(var(--post-core-dimension-32) - var(--post-core-dimension-1)*2);white-space:nowrap;color:var(--post-tag-fg)}.tag post-icon,.tag:where(:has(:not(pre))) post-icon{flex:0 0 auto;width:1.25rem;height:1.25rem}.tag .tag-text,.tag:where(:has(:not(pre))) .tag-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tag .tag-text svg,.tag .tag-text img,.tag:where(:has(:not(pre))) .tag-text svg,.tag:where(:has(:not(pre))) .tag-text img{display:inline-block;height:1.25rem !important;vertical-align:text-top}.tag.tag-sm,.tag:where(:has(:not(pre))).tag-sm{line-height:var(--post-core-dimension-24)}.tag.tag-sm .tag-icon,.tag:where(:has(:not(pre))).tag-sm .tag-icon{width:1rem;height:1rem}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{--post-tag-bg:#fff;--post-tag-fg:#000}.tag.tag-yellow,.tag:where(:has(:not(pre))).tag-yellow{--post-tag-bg:#fc0;--post-tag-fg:#000}.tag.tag-success,.tag:where(:has(:not(pre))).tag-success{--post-tag-bg:#2c871d;--post-tag-fg:#fff}.tag.tag-warning,.tag:where(:has(:not(pre))).tag-warning{--post-tag-bg:#f49e00;--post-tag-fg:#000}.tag.tag-danger,.tag:where(:has(:not(pre))).tag-danger{--post-tag-bg:#a51728;--post-tag-fg:#fff}.tag.tag-info,.tag:where(:has(:not(pre))).tag-info{--post-tag-bg:#cce4ee;--post-tag-fg:#000}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{border-color:#000}pre .tag,pre .tag:where(:has(:not(pre))){display:inline;padding:initial;max-width:initial;background:initial;border:initial;border-radius:initial;font-size:inherit;line-height:inherit;white-space:unset}*,*:before,*:after{box-sizing:border-box}.tag-text ::slotted(svg),.tag-text ::slotted(img){display:inline-block !important;height:1.25rem !important;vertical-align:text-top !important}";
|
|
5
|
+
const PostTagStyle0 = postTagCss;
|
|
6
|
+
|
|
7
|
+
const PostTag = class {
|
|
8
|
+
get host() { return getElement(this); }
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.classes = undefined;
|
|
12
|
+
this.variant = undefined;
|
|
13
|
+
this.size = null;
|
|
14
|
+
this.icon = null;
|
|
15
|
+
this.setClasses = this.setClasses.bind(this);
|
|
16
|
+
}
|
|
17
|
+
variantChanged() {
|
|
18
|
+
this.setClasses();
|
|
19
|
+
}
|
|
20
|
+
sizeChanged() {
|
|
21
|
+
this.setClasses();
|
|
22
|
+
}
|
|
23
|
+
setClasses() {
|
|
24
|
+
this.classes = [
|
|
25
|
+
'tag',
|
|
26
|
+
this.size ? `tag-${this.size}` : null,
|
|
27
|
+
this.variant ? `tag-${this.variant}` : null,
|
|
28
|
+
]
|
|
29
|
+
.filter(c => c !== null)
|
|
30
|
+
.join(' ');
|
|
31
|
+
}
|
|
32
|
+
connectedCallback() {
|
|
33
|
+
this.setClasses();
|
|
34
|
+
}
|
|
35
|
+
render() {
|
|
36
|
+
return (h(Host, { key: '4ca273166b81099dd8fc0f69d3d38215e3d7ccbc', "data-version": version }, h("div", { key: 'b6c4eb6a3bf8cbaad18cf6277dab79bd6e350f0a', class: this.classes }, this.icon ? h("post-icon", { name: this.icon }) : null, h("div", { key: '4f9e8cf6b2c723e31d60e30464c1106a9f72b5b4', class: "tag-text" }, h("slot", { key: '819a4e6ff743386f8d5d6b1d94dea9ee4a612784' })))));
|
|
37
|
+
}
|
|
38
|
+
static get watchers() { return {
|
|
39
|
+
"variant": ["variantChanged"],
|
|
40
|
+
"size": ["sizeChanged"]
|
|
41
|
+
}; }
|
|
42
|
+
};
|
|
43
|
+
PostTag.style = PostTagStyle0;
|
|
44
|
+
|
|
45
|
+
export { PostTag as P };
|