@swisspost/design-system-components 9.0.0-next.33 → 9.0.0-next.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{attribute-observer-6d8b886b.js → attribute-observer-c3a805b2.js} +3 -1
- package/dist/cjs/{breakpoints-c6247c71.js → breakpoints-cdf1b747.js} +12 -7
- package/dist/cjs/get-root-8102fecd.js +17 -0
- package/dist/cjs/{index-d6bf2c66.js → index-b60129c4.js} +2 -2
- package/dist/cjs/index.cjs.js +24 -25
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/long-press-event-6e62d113.js +266 -0
- package/dist/cjs/{package-3562c265.js → package-3426e8f7.js} +1 -1
- package/dist/cjs/{post-accordion-6c5681ba.js → post-accordion-3ac8dca8.js} +5 -5
- package/dist/cjs/{post-accordion-item-05a78451.js → post-accordion-item-aace6bc2.js} +5 -5
- package/dist/cjs/post-accordion-item.cjs.entry.js +5 -4
- package/dist/cjs/post-accordion.cjs.entry.js +4 -3
- package/dist/cjs/{post-avatar-6710a77a.js → post-avatar-53abd22f.js} +5 -4
- package/dist/cjs/post-avatar.cjs.entry.js +4 -3
- package/dist/cjs/{post-back-to-top-d0662842.js → post-back-to-top-b231fc1c.js} +9 -9
- package/dist/cjs/post-back-to-top.cjs.entry.js +4 -3
- package/dist/cjs/{post-banner-bd97db9c.js → post-banner-e6d14bf1.js} +4 -8
- package/dist/cjs/post-banner.cjs.entry.js +4 -3
- package/dist/cjs/{post-breadcrumb-36ab841c.js → post-breadcrumb-a929f2a6.js} +30 -22
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +4 -3
- package/dist/cjs/post-breadcrumb.cjs.entry.js +4 -4
- package/dist/cjs/{post-card-control-155fb433.js → post-card-control-cbee7b86.js} +26 -40
- package/dist/cjs/post-card-control.cjs.entry.js +4 -3
- package/dist/cjs/post-closebutton_15.cjs.entry.js +5 -5
- package/dist/cjs/{post-collapsible-trigger-6601c554.js → post-collapsible-trigger-d1cb592a.js} +24 -41
- package/dist/cjs/post-collapsible_2.cjs.entry.js +5 -5
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/{post-footer-23699aef.js → post-footer-4290dafc.js} +11 -11
- package/dist/cjs/post-footer.cjs.entry.js +4 -4
- package/dist/cjs/{post-linkarea-8e5e1a9f.js → post-linkarea-f22f4f92.js} +5 -5
- package/dist/cjs/post-linkarea.cjs.entry.js +3 -3
- package/dist/cjs/{post-menu-item-8dd94792.js → post-menu-item-afabaa61.js} +4 -4
- package/dist/cjs/{post-popover-858cbd12.js → post-popover-a4c72d38.js} +16 -14
- package/dist/cjs/post-popover.cjs.entry.js +5 -4
- package/dist/cjs/{post-rating-ef592484.js → post-rating-b87616fc.js} +4 -14
- package/dist/cjs/post-rating.cjs.entry.js +3 -3
- package/dist/cjs/{post-tab-header-d785e7fc.js → post-tab-header-45cb6bb4.js} +5 -4
- package/dist/cjs/post-tab-header.cjs.entry.js +4 -3
- package/dist/cjs/{post-tab-panel-41ea371e.js → post-tab-panel-00d16ba7.js} +4 -4
- package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
- package/dist/cjs/{post-tabs-c6f00130.js → post-tabs-2c3a89d0.js} +5 -12
- package/dist/cjs/post-tabs.cjs.entry.js +4 -3
- package/dist/cjs/{post-tag-d1a1176c.js → post-tag-370a2f4d.js} +3 -3
- package/dist/cjs/post-tag.cjs.entry.js +3 -3
- package/dist/cjs/{post-togglebutton-02c56b7b.js → post-togglebutton-2c9552e3.js} +935 -460
- package/dist/cjs/{post-tooltip-3176e280.js → post-tooltip-4d4d2ea9.js} +39 -296
- package/dist/cjs/post-tooltip.cjs.entry.js +5 -4
- package/dist/collection/animations/collapse.js +3 -1
- package/dist/collection/components/post-accordion/post-accordion.js +1 -3
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +0 -2
- package/dist/collection/components/post-avatar/post-avatar.js +3 -4
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +6 -8
- package/dist/collection/components/post-banner/post-banner.js +0 -6
- package/dist/collection/components/post-breadcrumb/post-breadcrumb.js +16 -19
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +0 -2
- package/dist/collection/components/post-card-control/post-card-control.js +24 -40
- package/dist/collection/components/post-closebutton/post-closebutton.css +1 -0
- package/dist/collection/components/post-closebutton/post-closebutton.js +12 -2
- package/dist/collection/components/post-collapsible/post-collapsible.js +4 -10
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +15 -28
- package/dist/collection/components/post-footer/post-footer.js +8 -9
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +13 -22
- package/dist/collection/components/post-icon/post-icon.js +4 -6
- package/dist/collection/components/post-language-option/post-language-option.js +1 -10
- package/dist/collection/components/post-language-switch/post-language-switch.js +7 -19
- package/dist/collection/components/post-linkarea/post-linkarea.css +1 -1
- package/dist/collection/components/post-linkarea/post-linkarea.js +2 -2
- package/dist/collection/components/post-list/post-list.js +1 -3
- package/dist/collection/components/post-list-item/post-list-item.js +1 -2
- package/dist/collection/components/post-logo/post-logo.js +1 -2
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +98 -182
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +20 -30
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +36 -37
- package/dist/collection/components/post-menu/post-menu.js +45 -53
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +13 -15
- package/dist/collection/components/post-popover/post-popover.js +12 -12
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +30 -33
- package/dist/collection/components/post-rating/post-rating.js +1 -12
- package/dist/collection/components/post-tab-header/post-tab-header.js +2 -3
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +2 -3
- package/dist/collection/components/post-tabs/post-tabs.js +1 -10
- package/dist/collection/components/post-tag/post-tag.js +0 -1
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +10 -11
- package/dist/collection/components/post-tooltip/post-tooltip.js +36 -32
- package/dist/collection/utils/attribute-observer.js +2 -1
- package/dist/collection/utils/breakpoints.js +9 -7
- package/dist/collection/utils/environment.js +2 -0
- package/dist/collection/utils/get-root.js +6 -1
- package/dist/collection/utils/index.js +5 -0
- package/dist/collection/utils/is-motion-reduced.js +2 -1
- package/dist/components/attribute-observer.js +3 -1
- package/dist/components/breakpoints.js +12 -8
- package/dist/components/get-root.js +7 -1
- package/dist/components/long-press-event.js +264 -0
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +3 -3
- package/dist/components/post-accordion2.js +3 -3
- package/dist/components/post-avatar2.js +4 -3
- package/dist/components/post-back-to-top2.js +8 -8
- package/dist/components/post-banner2.js +2 -6
- package/dist/components/post-breadcrumb-item2.js +2 -2
- package/dist/components/post-breadcrumb2.js +28 -20
- package/dist/components/post-card-control2.js +25 -39
- package/dist/components/post-closebutton2.js +8 -3
- package/dist/components/post-collapsible-trigger2.js +19 -31
- package/dist/components/post-collapsible2.js +9 -12
- package/dist/components/post-footer2.js +8 -8
- package/dist/components/post-header2.js +15 -23
- package/dist/components/post-icon2.js +5 -5
- package/dist/components/post-language-option2.js +3 -10
- package/dist/components/post-language-switch2.js +9 -18
- package/dist/components/post-linkarea2.js +5 -4
- package/dist/components/post-list-item2.js +2 -2
- package/dist/components/post-list2.js +2 -3
- package/dist/components/post-logo2.js +3 -2
- package/dist/components/post-mainnavigation2.js +94 -182
- package/dist/components/post-megadropdown-trigger2.js +38 -37
- package/dist/components/post-megadropdown2.js +21 -30
- package/dist/components/post-menu-trigger2.js +15 -15
- package/dist/components/post-menu2.js +48 -54
- package/dist/components/post-popover2.js +14 -12
- package/dist/components/post-popovercontainer2.js +638 -36
- package/dist/components/post-rating2.js +2 -12
- package/dist/components/post-tab-header2.js +4 -3
- package/dist/components/post-tab-panel2.js +3 -3
- package/dist/components/post-tabs2.js +3 -10
- package/dist/components/post-tag2.js +1 -1
- package/dist/components/post-togglebutton2.js +12 -11
- package/dist/components/post-tooltip2.js +37 -294
- package/dist/docs.json +21 -15
- package/dist/esm/{attribute-observer-2f203993.js → attribute-observer-009deee5.js} +3 -1
- package/dist/esm/{breakpoints-bbe0c54e.js → breakpoints-7812702e.js} +12 -8
- package/dist/esm/get-root-1b1af46f.js +15 -0
- package/dist/esm/{index-3419e46d.js → index-f4d19816.js} +2 -2
- package/dist/esm/index.js +24 -25
- package/dist/esm/loader.js +3 -3
- package/dist/esm/long-press-event-04d24397.js +264 -0
- package/dist/esm/package-8986a24c.js +3 -0
- package/dist/esm/{post-accordion-024451fa.js → post-accordion-577b52a0.js} +5 -5
- package/dist/esm/{post-accordion-item-19b996d1.js → post-accordion-item-99053b41.js} +5 -5
- package/dist/esm/post-accordion-item.entry.js +5 -4
- package/dist/esm/post-accordion.entry.js +4 -3
- package/dist/esm/{post-avatar-33aed045.js → post-avatar-2914706c.js} +5 -4
- package/dist/esm/post-avatar.entry.js +4 -3
- package/dist/esm/{post-back-to-top-7dd43c3b.js → post-back-to-top-4c7b1b47.js} +9 -9
- package/dist/esm/post-back-to-top.entry.js +4 -3
- package/dist/esm/{post-banner-28d18721.js → post-banner-295fd0f5.js} +4 -8
- package/dist/esm/post-banner.entry.js +4 -3
- package/dist/esm/{post-breadcrumb-d86fae7b.js → post-breadcrumb-1abfb312.js} +30 -22
- package/dist/esm/post-breadcrumb-item_2.entry.js +4 -3
- package/dist/esm/post-breadcrumb.entry.js +4 -4
- package/dist/esm/{post-card-control-aa043898.js → post-card-control-ad72d4f8.js} +26 -40
- package/dist/esm/post-card-control.entry.js +4 -3
- package/dist/esm/post-closebutton_15.entry.js +5 -5
- package/dist/esm/{post-collapsible-trigger-b1612866.js → post-collapsible-trigger-6b4ece20.js} +24 -41
- package/dist/esm/post-collapsible_2.entry.js +5 -5
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/{post-footer-2ed5e520.js → post-footer-a5105e66.js} +11 -11
- package/dist/esm/post-footer.entry.js +4 -4
- package/dist/esm/{post-linkarea-802bf774.js → post-linkarea-22f97a88.js} +5 -5
- package/dist/esm/post-linkarea.entry.js +3 -3
- package/dist/esm/{post-menu-item-d97611d8.js → post-menu-item-9465a1f3.js} +4 -4
- package/dist/esm/{post-popover-e51a7a18.js → post-popover-e9b4569c.js} +16 -14
- package/dist/esm/post-popover.entry.js +5 -4
- package/dist/esm/{post-rating-e1ac47ce.js → post-rating-ae16e3c9.js} +4 -14
- package/dist/esm/post-rating.entry.js +3 -3
- package/dist/esm/{post-tab-header-06dcbf7f.js → post-tab-header-11f23150.js} +5 -4
- package/dist/esm/post-tab-header.entry.js +4 -3
- package/dist/esm/{post-tab-panel-75932601.js → post-tab-panel-0f3a952e.js} +4 -4
- package/dist/esm/post-tab-panel.entry.js +3 -3
- package/dist/esm/{post-tabs-3ef2ea23.js → post-tabs-1192509c.js} +5 -12
- package/dist/esm/post-tabs.entry.js +4 -3
- package/dist/esm/{post-tag-a3b989e0.js → post-tag-8be0a71c.js} +3 -3
- package/dist/esm/post-tag.entry.js +3 -3
- package/dist/esm/{post-togglebutton-db251030.js → post-togglebutton-b634fc7c.js} +935 -460
- package/dist/esm/{post-tooltip-c256d714.js → post-tooltip-f64bd0cc.js} +39 -296
- package/dist/esm/post-tooltip.entry.js +5 -4
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-0f398677.js +1 -0
- package/dist/post-components/p-1038fc25.js +1 -0
- package/dist/post-components/p-30f94eca.entry.js +1 -0
- package/dist/post-components/p-31bb6dc5.entry.js +1 -0
- package/dist/post-components/p-32173742.js +1 -0
- package/dist/post-components/p-338a2507.js +1 -0
- package/dist/post-components/p-36540dd6.entry.js +1 -0
- package/dist/post-components/p-3aa766a6.js +1 -0
- package/dist/post-components/p-3b0158b3.js +1 -0
- package/dist/post-components/p-40db8cd5.js +1 -0
- package/dist/post-components/p-44f13ce4.entry.js +1 -0
- package/dist/post-components/p-46a9324f.entry.js +1 -0
- package/dist/post-components/p-49c5aa99.js +1 -0
- package/dist/post-components/p-4cd4a936.entry.js +1 -0
- package/dist/post-components/p-548ef2f5.entry.js +1 -0
- package/dist/post-components/p-58f453dd.js +1 -0
- package/dist/post-components/p-5f54b77f.js +1 -0
- package/dist/post-components/p-60bb7f26.js +1 -0
- package/dist/post-components/p-60bfa4be.entry.js +1 -0
- package/dist/post-components/p-6b31a76a.js +1 -0
- package/dist/post-components/p-6ee81c5d.js +1 -0
- package/dist/post-components/p-6faad212.entry.js +1 -0
- package/dist/post-components/p-722ffaae.js +1 -0
- package/dist/post-components/p-74a0b44c.entry.js +1 -0
- package/dist/post-components/{p-dbe31632.js → p-78b4c699.js} +1 -1
- package/dist/post-components/p-7aa0468b.entry.js +1 -0
- package/dist/post-components/p-7afc495e.entry.js +1 -0
- package/dist/post-components/p-8db32dab.js +8 -0
- package/dist/post-components/p-96034ba4.entry.js +1 -0
- package/dist/post-components/p-9aaf9f54.js +1 -0
- package/dist/post-components/{p-5c758f41.js → p-9e461613.js} +1 -1
- package/dist/post-components/p-ab4073be.js +1 -0
- package/dist/post-components/p-abd7eb91.js +8 -0
- package/dist/post-components/p-afb8a487.entry.js +1 -0
- package/dist/post-components/p-b003b381.js +1 -0
- package/dist/post-components/p-b97dea1e.entry.js +1 -0
- package/dist/post-components/p-be37cf2a.js +1 -0
- package/dist/post-components/p-c31b56ed.js +1 -0
- package/dist/post-components/p-ccbb51fe.js +1 -0
- package/dist/post-components/p-d3900385.entry.js +1 -0
- package/dist/post-components/p-ef49153c.entry.js +1 -0
- package/dist/post-components/p-f27e5691.js +1 -0
- package/dist/post-components/p-f553019f.entry.js +1 -0
- package/dist/post-components/p-ffc1db17.entry.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-avatar/post-avatar.d.ts +1 -1
- package/dist/types/components/post-card-control/post-card-control.d.ts +1 -1
- package/dist/types/components/post-collapsible-trigger/post-collapsible-trigger.d.ts +4 -14
- package/dist/types/components/post-footer/post-footer.d.ts +2 -2
- package/dist/types/components/post-header/post-header.d.ts +1 -0
- package/dist/types/components/post-icon/post-icon.d.ts +0 -1
- package/dist/types/components/post-language-switch/post-language-switch.d.ts +2 -5
- package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +14 -39
- package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +1 -1
- package/dist/types/components/post-popover/post-popover.d.ts +3 -1
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +1 -1
- package/dist/types/components/post-tooltip/post-tooltip.d.ts +6 -1
- package/dist/types/components.d.ts +4 -4
- package/dist/types/popover-fn.d.ts +11 -0
- package/dist/types/utils/environment.d.ts +2 -0
- package/dist/types/utils/get-root.d.ts +4 -0
- package/dist/types/utils/index.d.ts +5 -0
- package/loaders/attribute-observer.js +3 -1
- package/loaders/breakpoints.js +12 -8
- package/loaders/get-root.js +7 -1
- package/loaders/index.js +3 -3
- package/loaders/long-press-event.js +264 -0
- package/loaders/package.js +1 -1
- package/loaders/post-accordion-item2.js +3 -3
- package/loaders/post-accordion.js +3 -3
- package/loaders/post-avatar.js +4 -3
- package/loaders/post-back-to-top.js +8 -8
- package/loaders/post-banner.js +2 -6
- package/loaders/post-breadcrumb-item2.js +2 -2
- package/loaders/post-breadcrumb.js +28 -20
- package/loaders/post-card-control.js +25 -39
- package/loaders/post-closebutton.js +8 -3
- package/loaders/post-collapsible-trigger2.js +19 -31
- package/loaders/post-collapsible2.js +9 -12
- package/loaders/post-footer.js +8 -8
- package/loaders/post-header.js +15 -23
- package/loaders/post-icon2.js +5 -5
- package/loaders/post-language-option.js +3 -10
- package/loaders/post-language-switch.js +9 -18
- package/loaders/post-linkarea.js +5 -4
- package/loaders/post-list-item.js +2 -2
- package/loaders/post-list.js +2 -3
- package/loaders/post-logo.js +3 -2
- package/loaders/post-mainnavigation.js +94 -182
- package/loaders/post-megadropdown-trigger.js +38 -37
- package/loaders/post-megadropdown.js +21 -30
- package/loaders/post-menu-trigger2.js +15 -15
- package/loaders/post-menu2.js +48 -54
- package/loaders/post-popover.js +14 -12
- package/loaders/post-popovercontainer2.js +638 -36
- package/loaders/post-rating.js +2 -12
- package/loaders/post-tab-header.js +4 -3
- package/loaders/post-tab-panel.js +3 -3
- package/loaders/post-tabs.js +3 -10
- package/loaders/post-tag.js +1 -1
- package/loaders/post-togglebutton.js +12 -11
- package/loaders/post-tooltip.js +37 -294
- package/package.json +5 -5
- package/dist/cjs/debounce-158fd76f.js +0 -13
- package/dist/cjs/get-root-7a3498ef.js +0 -11
- package/dist/components/debounce.js +0 -11
- package/dist/esm/debounce-e54c7131.js +0 -11
- package/dist/esm/get-root-7af2e0d1.js +0 -9
- package/dist/esm/package-da68ab5a.js +0 -3
- package/dist/post-components/p-1376c653.js +0 -1
- package/dist/post-components/p-13835969.js +0 -1
- package/dist/post-components/p-13fdbaf6.entry.js +0 -1
- package/dist/post-components/p-1e2169ae.entry.js +0 -1
- package/dist/post-components/p-23e4c270.entry.js +0 -1
- package/dist/post-components/p-2641e06b.js +0 -1
- package/dist/post-components/p-2d3b16c7.js +0 -1
- package/dist/post-components/p-33c35e15.js +0 -1
- package/dist/post-components/p-3b247d71.entry.js +0 -1
- package/dist/post-components/p-42a5fdf8.js +0 -1
- package/dist/post-components/p-4ed7bab6.js +0 -1
- package/dist/post-components/p-5aeb3656.js +0 -1
- package/dist/post-components/p-5c518421.js +0 -1
- package/dist/post-components/p-6db1a2e0.entry.js +0 -1
- package/dist/post-components/p-6fe98184.entry.js +0 -1
- package/dist/post-components/p-7d731077.entry.js +0 -1
- package/dist/post-components/p-7ee47334.entry.js +0 -1
- package/dist/post-components/p-8223e97b.js +0 -1
- package/dist/post-components/p-8a8376d0.js +0 -1
- package/dist/post-components/p-8bb828cf.entry.js +0 -1
- package/dist/post-components/p-8e55ddd2.js +0 -1
- package/dist/post-components/p-9681efce.js +0 -1
- package/dist/post-components/p-96a59372.entry.js +0 -1
- package/dist/post-components/p-9748a355.js +0 -1
- package/dist/post-components/p-99c8fd43.entry.js +0 -1
- package/dist/post-components/p-ac042f7a.entry.js +0 -1
- package/dist/post-components/p-c34cacb7.js +0 -1
- package/dist/post-components/p-c3a970c5.js +0 -1
- package/dist/post-components/p-c4651d32.entry.js +0 -1
- package/dist/post-components/p-c9b61d31.entry.js +0 -1
- package/dist/post-components/p-d16dd7f9.js +0 -1
- package/dist/post-components/p-d81c5908.entry.js +0 -1
- package/dist/post-components/p-e1baac59.js +0 -1
- package/dist/post-components/p-e2294014.js +0 -15
- package/dist/post-components/p-e8ff8122.js +0 -1
- package/dist/post-components/p-ed78d04a.entry.js +0 -1
- package/dist/post-components/p-f1c0924a.js +0 -1
- package/dist/post-components/p-f1db96d0.entry.js +0 -1
- package/dist/post-components/p-f7aa917f.entry.js +0 -1
- package/dist/post-components/p-f96b80cc.entry.js +0 -1
- package/dist/post-components/p-fc91cbc2.js +0 -1
- package/dist/post-components/p-fd78716d.js +0 -1
- package/loaders/debounce.js +0 -11
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
3
|
import { b as checkUrl } from './index2.js';
|
|
4
|
-
import
|
|
4
|
+
import './breakpoints.js';
|
|
5
5
|
import { d as defineCustomElement$6 } from './post-breadcrumb-item2.js';
|
|
6
6
|
import { d as defineCustomElement$5 } from './post-icon2.js';
|
|
7
7
|
import { d as defineCustomElement$4 } from './post-menu2.js';
|
|
@@ -9,6 +9,16 @@ import { d as defineCustomElement$3 } from './post-menu-item2.js';
|
|
|
9
9
|
import { d as defineCustomElement$2 } from './post-menu-trigger2.js';
|
|
10
10
|
import { d as defineCustomElement$1 } from './post-popovercontainer2.js';
|
|
11
11
|
|
|
12
|
+
function debounce(callback, timeout = 200) {
|
|
13
|
+
let id;
|
|
14
|
+
return (...args) => {
|
|
15
|
+
if (id) {
|
|
16
|
+
clearTimeout(id);
|
|
17
|
+
}
|
|
18
|
+
id = setTimeout(callback, timeout, ...args);
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
12
22
|
const postBreadcrumbCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:flex;align-items:center}.breadcrumbs-nav{display:flex;align-items:center}.hidden-items{gap:var(--post-device-spacing-gap-inline-4);position:absolute;height:0;overflow:hidden;white-space:nowrap}.breadcrumbs-list{display:flex;flex-wrap:nowrap;position:relative;margin:0;padding:0;list-style:none;align-items:center;height:100%;gap:var(--post-device-spacing-gap-inline-4)}post-icon{display:inline-block;box-sizing:border-box;color:var(--post-scheme-color-interactive-primary-enabled-fg1);height:var(--post-core-dimension-24);width:var(--post-core-dimension-24)}.breadcrumb-item-icon{padding-block:var(--post-core-dimension-4);padding-inline:var(--post-core-dimension-4)}li a{display:flex;align-items:center}li a{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}li a: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){li a:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){li a: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){li a:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}li a:focus{border-radius:var(--post-device-border-radius-focus)}li a .home-icon{padding-block:var(--post-device-spacing-padding-4);padding-inline:var(--post-device-spacing-padding-4)}li a .home-icon:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){li a .home-icon a,li a .home-icon:focus,li a .home-icon:hover{color:CanvasText !important}}.menu-trigger-wrapper{display:flex;align-items:center;gap:var(--post-device-spacing-gap-inline-5)}.actual-menu{display:flex;align-items:center}post-menu-trigger{display:flex;align-items:center;padding-block:var(--post-device-spacing-padding-block-7)}post-menu-trigger{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}post-menu-trigger: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){post-menu-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){post-menu-trigger: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){post-menu-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}post-menu-trigger:focus{border-radius:var(--post-device-border-radius-focus)}post-menu-trigger button{background:none;border:none;line-height:150%;font-size:var(--post-device-font-size-6);cursor:pointer;padding:0;color:var(--post-scheme-color-interactive-primary-enabled-fg1)}post-menu-trigger button:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-menu-trigger button a,post-menu-trigger button:focus,post-menu-trigger button:hover{color:LinkText !important}}post-menu::part(popover-container){display:flex;flex-direction:column;align-items:start;padding:.6rem;gap:var(--post-device-spacing-gap-inline-4)}post-menu::part(popover-container) ::slotted(post-menu-item:not(:last-child)){margin-block-end:var(--post-device-spacing-gap-inline-4)}.breadcrumb-item{display:flex;align-items:center;justify-content:center;gap:var(--post-device-spacing-gap-inline-5)}.breadcrumb-item a{text-decoration:none;color:var(--post-scheme-color-surface-default-fg);line-height:150%;padding-block:var(--post-device-spacing-padding-block-7);font-size:var(--post-device-font-size-6)}.breadcrumb-item a{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 a: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 a:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.breadcrumb-item a: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 a:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.breadcrumb-item a:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);text-decoration:var(--post-core-text-decoration-underline)}.breadcrumb-item a:focus-visible{border-radius:var(--post-device-border-radius-focus)}.breadcrumb-item span:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);text-decoration:var(--post-core-text-decoration-underline)}.breadcrumb-item span: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 a,.breadcrumb-item:focus,.breadcrumb-item:hover{color:LinkText !important}.breadcrumb-item:visited{color:VisitedText !important}}post-breadcrumb-item:last-of-type{pointer-events:none;color:var(--post-scheme-color-interactive-primary-selected-fg1);font-weight:var(--post-device-font-weight-bold);text-decoration:var(--post-core-text-decoration-none)}post-breadcrumb-item:last-of-type:hover{color:var(--post-scheme-color-interactive-primary-selected-fg1);text-decoration:none}.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}";
|
|
13
23
|
const PostBreadcrumbStyle0 = postBreadcrumbCss;
|
|
14
24
|
|
|
@@ -17,15 +27,28 @@ const PostBreadcrumb = /*@__PURE__*/ proxyCustomElement(class PostBreadcrumb ext
|
|
|
17
27
|
super();
|
|
18
28
|
this.__registerHost();
|
|
19
29
|
this.__attachShadow();
|
|
30
|
+
// Waits for breadcrumb navigation reference to be available
|
|
31
|
+
this.waitForBreadcrumbRef = debounce(() => {
|
|
32
|
+
if (this.breadcrumbNavRef?.clientWidth > 0) {
|
|
33
|
+
this.checkConcatenation();
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
this.waitForBreadcrumbRef();
|
|
37
|
+
}
|
|
38
|
+
}, 50);
|
|
39
|
+
// Handles resizing to check concatenation
|
|
40
|
+
this.handleResize = () => {
|
|
41
|
+
if (window.innerWidth === this.lastWindowWidth)
|
|
42
|
+
return;
|
|
43
|
+
this.lastWindowWidth = window.innerWidth;
|
|
44
|
+
this.checkConcatenation();
|
|
45
|
+
};
|
|
20
46
|
this.homeUrl = undefined;
|
|
21
47
|
this.homeText = 'Home';
|
|
22
48
|
this.breadcrumbItems = [];
|
|
23
49
|
this.isConcatenated = undefined;
|
|
24
50
|
this.lastWindowWidth = undefined;
|
|
25
51
|
}
|
|
26
|
-
get host() { return this; }
|
|
27
|
-
breadcrumbNavRef;
|
|
28
|
-
lastItem;
|
|
29
52
|
validateUrl() {
|
|
30
53
|
checkUrl(this, 'homeUrl');
|
|
31
54
|
}
|
|
@@ -39,15 +62,6 @@ const PostBreadcrumb = /*@__PURE__*/ proxyCustomElement(class PostBreadcrumb ext
|
|
|
39
62
|
disconnectedCallback() {
|
|
40
63
|
window.removeEventListener('resize', this.handleResize);
|
|
41
64
|
}
|
|
42
|
-
// Waits for breadcrumb navigation reference to be available
|
|
43
|
-
waitForBreadcrumbRef = debounce(() => {
|
|
44
|
-
if (this.breadcrumbNavRef?.clientWidth > 0) {
|
|
45
|
-
this.checkConcatenation();
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
this.waitForBreadcrumbRef();
|
|
49
|
-
}
|
|
50
|
-
}, 50);
|
|
51
65
|
// Updates breadcrumb items and sets the last item
|
|
52
66
|
updateBreadcrumbItems() {
|
|
53
67
|
this.breadcrumbItems = Array.from(this.host.querySelectorAll('post-breadcrumb-item')).map(item => ({
|
|
@@ -56,13 +70,6 @@ const PostBreadcrumb = /*@__PURE__*/ proxyCustomElement(class PostBreadcrumb ext
|
|
|
56
70
|
}));
|
|
57
71
|
this.lastItem = this.breadcrumbItems[this.breadcrumbItems.length - 1];
|
|
58
72
|
}
|
|
59
|
-
// Handles resizing to check concatenation
|
|
60
|
-
handleResize = () => {
|
|
61
|
-
if (window.innerWidth === this.lastWindowWidth)
|
|
62
|
-
return;
|
|
63
|
-
this.lastWindowWidth = window.innerWidth;
|
|
64
|
-
this.checkConcatenation();
|
|
65
|
-
};
|
|
66
73
|
// Determines parent width for concatenation logic
|
|
67
74
|
getParentWidth() {
|
|
68
75
|
let parent = this.host.parentNode;
|
|
@@ -109,6 +116,7 @@ const PostBreadcrumb = /*@__PURE__*/ proxyCustomElement(class PostBreadcrumb ext
|
|
|
109
116
|
}
|
|
110
117
|
} }, item.url ? h("a", { href: item.url }, item.text) : h("span", null, item.text)))))))) : (visibleItems.map(item => (h("post-breadcrumb-item", { url: item.url, key: item.url || item.text }, item.text)))), this.lastItem && (h("post-breadcrumb-item", { key: '31d86d933720b5f6f6928ccfd251443261e9479e', url: this.lastItem.url, "aria-current": "page", tabindex: -1 }, this.lastItem.text))), h("div", { key: '3248d32aa6a73c97c3071be85174fb8634d4e722', class: "hidden-items" }, h("a", { key: '05b0231d3a5793588aa9ede628a7b1e6d2e2faf0', href: this.homeUrl, class: "hidden-breadcrumb-item" }, h("span", { key: '15a63a894124717cfb2be61779c3971772c38397', class: "visually-hidden" }, this.homeText), h("post-icon", { key: '6c893c56b6a34f311fa66d71c4cb523b00535458', name: "home", class: "home-icon" })), this.breadcrumbItems.map(item => (h("post-breadcrumb-item", { url: item.url, key: `hidden-${item.url || item.text}`, class: "hidden-breadcrumb-item" }, item.text)))))));
|
|
111
118
|
}
|
|
119
|
+
get host() { return this; }
|
|
112
120
|
static get watchers() { return {
|
|
113
121
|
"homeUrl": ["validateUrl"]
|
|
114
122
|
}; }
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { c as checkOneOf } from './check-one-of.js';
|
|
3
3
|
import { c as checkNonEmpty } from './check-non-empty.js';
|
|
4
|
+
import './breakpoints.js';
|
|
4
5
|
import { v as version } from './package.js';
|
|
5
6
|
import { d as defineCustomElement$1 } from './post-icon2.js';
|
|
6
7
|
|
|
@@ -9,42 +10,6 @@ const PostCardControlStyle0 = postCardControlCss;
|
|
|
9
10
|
|
|
10
11
|
let cardControlIds = 0;
|
|
11
12
|
const PostCardControl = /*@__PURE__*/ proxyCustomElement(class PostCardControl extends HTMLElement {
|
|
12
|
-
EVENT_MAP = {
|
|
13
|
-
input: 'postInput',
|
|
14
|
-
change: 'postChange',
|
|
15
|
-
};
|
|
16
|
-
KEYCODES = {
|
|
17
|
-
SPACE: 'Space',
|
|
18
|
-
LEFT: 'ArrowLeft',
|
|
19
|
-
UP: 'ArrowUp',
|
|
20
|
-
RIGHT: 'ArrowRight',
|
|
21
|
-
DOWN: 'ArrowDown',
|
|
22
|
-
};
|
|
23
|
-
group = {
|
|
24
|
-
hosts: [],
|
|
25
|
-
members: [],
|
|
26
|
-
first: null,
|
|
27
|
-
last: null,
|
|
28
|
-
checked: null,
|
|
29
|
-
focused: null,
|
|
30
|
-
};
|
|
31
|
-
control;
|
|
32
|
-
controlId = `PostCardControl_${cardControlIds++}`;
|
|
33
|
-
initialChecked;
|
|
34
|
-
hasIcon;
|
|
35
|
-
get host() { return this; }
|
|
36
|
-
internals;
|
|
37
|
-
/**
|
|
38
|
-
* An event emitted whenever the components checked state is toggled.
|
|
39
|
-
* The event payload (emitted under `event.detail.state`) is a boolean: `true` if the component is checked, `false` if it is unchecked.
|
|
40
|
-
*/
|
|
41
|
-
postInput;
|
|
42
|
-
/**
|
|
43
|
-
* An event emitted whenever the components checked state is toggled.
|
|
44
|
-
* The event payload (emitted under `event.detail.state`) is a boolean: `true` if the component is checked, `false` if it is unchecked.
|
|
45
|
-
* <span className="banner banner-sm banner-info">If the component is used with type `radio`, it will only emit this event, when the checked state is changing to `true`.</span>
|
|
46
|
-
*/
|
|
47
|
-
postChange;
|
|
48
13
|
/**
|
|
49
14
|
* A public method to reset the controls `checked` and `validity` state.
|
|
50
15
|
* The validity state is set to `null`, so it's neither valid nor invalid.
|
|
@@ -80,6 +45,26 @@ const PostCardControl = /*@__PURE__*/ proxyCustomElement(class PostCardControl e
|
|
|
80
45
|
this.postInput = createEvent(this, "postInput", 7);
|
|
81
46
|
this.postChange = createEvent(this, "postChange", 7);
|
|
82
47
|
this.internals = this.attachInternals();
|
|
48
|
+
this.EVENT_MAP = {
|
|
49
|
+
input: 'postInput',
|
|
50
|
+
change: 'postChange',
|
|
51
|
+
};
|
|
52
|
+
this.KEYCODES = {
|
|
53
|
+
SPACE: 'Space',
|
|
54
|
+
LEFT: 'ArrowLeft',
|
|
55
|
+
UP: 'ArrowUp',
|
|
56
|
+
RIGHT: 'ArrowRight',
|
|
57
|
+
DOWN: 'ArrowDown',
|
|
58
|
+
};
|
|
59
|
+
this.group = {
|
|
60
|
+
hosts: [],
|
|
61
|
+
members: [],
|
|
62
|
+
first: null,
|
|
63
|
+
last: null,
|
|
64
|
+
checked: null,
|
|
65
|
+
focused: null,
|
|
66
|
+
};
|
|
67
|
+
this.controlId = `PostCardControl_${cardControlIds++}`;
|
|
83
68
|
this.focused = false;
|
|
84
69
|
this.label = undefined;
|
|
85
70
|
this.description = null;
|
|
@@ -236,14 +221,14 @@ const PostCardControl = /*@__PURE__*/ proxyCustomElement(class PostCardControl e
|
|
|
236
221
|
this.hasIcon = Boolean(this.host.querySelector('[slot="icon"]') || this.icon);
|
|
237
222
|
}
|
|
238
223
|
render() {
|
|
239
|
-
return (h(Host, { key: '
|
|
224
|
+
return (h(Host, { key: '9172642a4424a3393c0738feba3a3ef8dcea43e8', "data-version": version, onClick: this.cardClickHandler }, h("div", { key: 'd6e47613dfe9d33647fd2379010275d70cbcbdcb', class: {
|
|
240
225
|
'card-control': true,
|
|
241
226
|
'is-checked': this.checked,
|
|
242
227
|
'is-disabled': this.disabled,
|
|
243
228
|
'is-focused': this.focused,
|
|
244
229
|
'is-valid': this.validity !== null && this.validity !== 'false',
|
|
245
230
|
'is-invalid': this.validity === 'false',
|
|
246
|
-
} }, h("input", { key: '
|
|
231
|
+
} }, h("input", { key: '44b0e5d5c2c6a759300979a5c33c2a65afaaa27d', ref: el => (this.control = el), id: this.controlId, class: "card-control--input", type: this.type, name: this.name, value: this.value, checked: this.checked, "aria-describedby": `${this.controlId}_content`, "aria-disabled": this.disabled, "aria-invalid": this.validity === 'false', onClick: this.controlClickHandler, onInput: this.controlChangeHandler, onChange: this.controlChangeHandler, onFocus: this.controlFocusHandler, onBlur: this.controlFocusHandler, onKeyDown: this.controlKeyDownHandler }), h("label", { key: 'fd3106562bfcb5ca0e7e5704272f927bfb201af5', id: `${this.controlId}_label`, htmlFor: this.controlId, class: "card-control--label" }, this.label, this.description ? (h("div", { class: "card-control--description" }, this.description)) : null), this.hasIcon ? (h("div", { class: "card-control--icon" }, h("slot", { name: "icon" }, this.icon ? h("post-icon", { name: this.icon }) : null))) : null, h("div", { key: 'ebfa245a0e2b6e45384586408614ce85494fbc58', id: `${this.controlId}_content`, class: "card-control--content" }, h("slot", { key: '99b406bc58fbfcd054f1b551a453a7ac1f4276f6' })))));
|
|
247
232
|
}
|
|
248
233
|
componentDidRender() {
|
|
249
234
|
this.setHostContext();
|
|
@@ -266,6 +251,7 @@ const PostCardControl = /*@__PURE__*/ proxyCustomElement(class PostCardControl e
|
|
|
266
251
|
this.reset();
|
|
267
252
|
}
|
|
268
253
|
static get formAssociated() { return true; }
|
|
254
|
+
get host() { return this; }
|
|
269
255
|
static get watchers() { return {
|
|
270
256
|
"label": ["validateControlLabel"],
|
|
271
257
|
"type": ["validateControlType"],
|
|
@@ -274,7 +260,7 @@ const PostCardControl = /*@__PURE__*/ proxyCustomElement(class PostCardControl e
|
|
|
274
260
|
}; }
|
|
275
261
|
static get style() { return PostCardControlStyle0; }
|
|
276
262
|
}, [65, "post-card-control", {
|
|
277
|
-
"label": [
|
|
263
|
+
"label": [513],
|
|
278
264
|
"description": [1],
|
|
279
265
|
"type": [1],
|
|
280
266
|
"name": [1],
|
|
@@ -2,16 +2,21 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
|
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
3
|
import { d as defineCustomElement$1 } from './post-icon2.js';
|
|
4
4
|
|
|
5
|
+
const postClosebuttonCss = ".btn-icon-close{padding:0;border:unset;min-height:unset;min-width:unset;width:var(--post-device-sizing-notification-1);height:var(--post-device-sizing-notification-1);border-radius:var(--post-device-border-radius-round);background-color:var(--post-scheme-color-interactive-button-tertiary-enabled-bg);color:var(--post-scheme-color-interactive-button-tertiary-enabled-fg)}.btn-icon-close>post-icon{min-width:var(--post-device-sizing-interactive-icon-size4);width:var(--post-device-sizing-interactive-icon-size4);height:var(--post-device-sizing-interactive-icon-size4)}.btn-icon-close:not(:disabled):hover,.btn-icon-close.pretend-hover{cursor:pointer;background-color:var(--post-scheme-color-interactive-button-tertiary-hover-bg);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-icon-close:not(:disabled):hover,.btn-icon-close.pretend-hover{color:HighlightText !important}}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}";
|
|
6
|
+
const PostClosebuttonStyle0 = postClosebuttonCss;
|
|
7
|
+
|
|
5
8
|
const PostClosebutton = /*@__PURE__*/ proxyCustomElement(class PostClosebutton extends HTMLElement {
|
|
6
9
|
constructor() {
|
|
7
10
|
super();
|
|
8
11
|
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
9
13
|
}
|
|
10
|
-
get host() { return this; }
|
|
11
14
|
render() {
|
|
12
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: 'cfa55f799fdf9ad0f3ac1eb296e063b5001de997', "data-version": version }, h("button", { key: '7c8a084f6d7278329ddfb5fc4b2b8f992a185666', class: "btn btn-icon-close", type: "button" }, h("post-icon", { key: 'fc74ccb4f0c4c091a02a41cdef918d6c3b065c8c', "aria-hidden": "true", name: "closex" }), h("span", { key: '98478b013714df6d82c6c2f533ac8ecd2abae778', class: "visually-hidden" }, h("slot", { key: '109e2bca4436986dd037d8c29088cc79395bc200' })))));
|
|
13
16
|
}
|
|
14
|
-
|
|
17
|
+
get host() { return this; }
|
|
18
|
+
static get style() { return PostClosebuttonStyle0; }
|
|
19
|
+
}, [1, "post-closebutton"]);
|
|
15
20
|
function defineCustomElement() {
|
|
16
21
|
if (typeof customElements === "undefined") {
|
|
17
22
|
return;
|
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement } from '@stencil/core/internal/client';
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
3
|
import { c as checkType } from './check-type.js';
|
|
4
4
|
import { c as checkNonEmpty } from './check-non-empty.js';
|
|
5
|
-
import
|
|
6
|
-
import { g as getRoot } from './get-root.js';
|
|
5
|
+
import './breakpoints.js';
|
|
7
6
|
import { e as eventGuard } from './event-guard.js';
|
|
7
|
+
import { g as getRoot } from './get-root.js';
|
|
8
8
|
|
|
9
9
|
const PostCollapsibleTrigger = /*@__PURE__*/ proxyCustomElement(class PostCollapsibleTrigger extends HTMLElement {
|
|
10
10
|
constructor() {
|
|
11
11
|
super();
|
|
12
12
|
this.__registerHost();
|
|
13
|
+
this.__attachShadow();
|
|
14
|
+
this.observer = new MutationObserver(() => this.setTrigger());
|
|
13
15
|
this.for = undefined;
|
|
14
16
|
}
|
|
15
|
-
trigger;
|
|
16
|
-
observer = new MutationObserver(() => this.setTrigger());
|
|
17
|
-
root;
|
|
18
|
-
get host() { return this; }
|
|
19
17
|
/**
|
|
20
18
|
* Set the "aria-controls" and "aria-expanded" attributes on the trigger to match the state of the controlled post-collapsible
|
|
21
19
|
*/
|
|
22
|
-
|
|
20
|
+
validateAriaAttributes() {
|
|
23
21
|
checkNonEmpty(this, 'for');
|
|
24
22
|
checkType(this, 'for', 'string', 'The post-collapsible-trigger "for" prop should be a id.');
|
|
25
|
-
void this.update();
|
|
26
23
|
}
|
|
27
24
|
/**
|
|
28
25
|
* Initiate a mutation observer that updates the trigger whenever necessary
|
|
@@ -32,25 +29,12 @@ const PostCollapsibleTrigger = /*@__PURE__*/ proxyCustomElement(class PostCollap
|
|
|
32
29
|
this.root.addEventListener('postToggle', this.handlePostToggle);
|
|
33
30
|
this.observer.observe(this.host, { childList: true, subtree: true });
|
|
34
31
|
}
|
|
35
|
-
/**
|
|
36
|
-
* Attach a "postToggle" event listener to the root node
|
|
37
|
-
* to update the trigger's "aria-expanded" attribute whenever the controlled post-collapsible is toggled
|
|
38
|
-
*/
|
|
39
|
-
componentWillLoad() {
|
|
40
|
-
this.root = getRoot(this.host);
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Add the "data-version" to the host element and set the trigger
|
|
44
|
-
*/
|
|
45
32
|
componentDidLoad() {
|
|
46
|
-
this.host.setAttribute('data-version', version);
|
|
47
33
|
this.setTrigger();
|
|
48
34
|
if (!this.trigger)
|
|
49
35
|
console.warn('The post-collapsible-trigger must contain a button.');
|
|
36
|
+
this.validateAriaAttributes();
|
|
50
37
|
}
|
|
51
|
-
/**
|
|
52
|
-
* Disconnect the mutation observer
|
|
53
|
-
*/
|
|
54
38
|
disconnectedCallback() {
|
|
55
39
|
this.observer.disconnect();
|
|
56
40
|
this.root.removeEventListener('postToggle', this.handlePostToggle);
|
|
@@ -59,7 +43,7 @@ const PostCollapsibleTrigger = /*@__PURE__*/ proxyCustomElement(class PostCollap
|
|
|
59
43
|
* Update the "aria-controls" and "aria-expanded" attributes on the trigger button
|
|
60
44
|
*/
|
|
61
45
|
async update() {
|
|
62
|
-
this.
|
|
46
|
+
this.updateAriaAttributes();
|
|
63
47
|
}
|
|
64
48
|
/**
|
|
65
49
|
* Private handler for the 'postToggle' event.
|
|
@@ -72,7 +56,7 @@ const PostCollapsibleTrigger = /*@__PURE__*/ proxyCustomElement(class PostCollap
|
|
|
72
56
|
}
|
|
73
57
|
});
|
|
74
58
|
}
|
|
75
|
-
|
|
59
|
+
updateAriaAttributes() {
|
|
76
60
|
if (!this.trigger)
|
|
77
61
|
return;
|
|
78
62
|
// add the provided id to the aria-controls list
|
|
@@ -85,7 +69,7 @@ const PostCollapsibleTrigger = /*@__PURE__*/ proxyCustomElement(class PostCollap
|
|
|
85
69
|
const isCollapsed = this.collapsible?.collapsed;
|
|
86
70
|
const newAriaExpanded = isCollapsed !== undefined ? !isCollapsed : undefined;
|
|
87
71
|
this.trigger.setAttribute('aria-expanded', `${newAriaExpanded}`);
|
|
88
|
-
}
|
|
72
|
+
}
|
|
89
73
|
/**
|
|
90
74
|
* Toggle the post-collapsible controlled by the trigger
|
|
91
75
|
*/
|
|
@@ -111,16 +95,20 @@ const PostCollapsibleTrigger = /*@__PURE__*/ proxyCustomElement(class PostCollap
|
|
|
111
95
|
return;
|
|
112
96
|
this.trigger = trigger;
|
|
113
97
|
this.trigger.addEventListener('click', () => this.toggleCollapsible());
|
|
114
|
-
this.
|
|
98
|
+
this.updateAriaAttributes();
|
|
99
|
+
}
|
|
100
|
+
render() {
|
|
101
|
+
return (h(Host, { key: 'cd703fe34b8c82afc5956b58724d36b06054bc0b', "data-version": version }, h("slot", { key: '5abe4ba2b8922b941cc8aebbc7039e34e1853855' })));
|
|
115
102
|
}
|
|
103
|
+
get host() { return this; }
|
|
116
104
|
static get watchers() { return {
|
|
117
|
-
"for": ["
|
|
105
|
+
"for": ["validateAriaAttributes"]
|
|
118
106
|
}; }
|
|
119
|
-
}, [
|
|
120
|
-
"for": [
|
|
107
|
+
}, [1, "post-collapsible-trigger", {
|
|
108
|
+
"for": [513],
|
|
121
109
|
"update": [64]
|
|
122
110
|
}, undefined, {
|
|
123
|
-
"for": ["
|
|
111
|
+
"for": ["validateAriaAttributes"]
|
|
124
112
|
}]);
|
|
125
113
|
function defineCustomElement() {
|
|
126
114
|
if (typeof customElements === "undefined") {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
|
+
import { I as IS_BROWSER } from './breakpoints.js';
|
|
3
4
|
import { e as checkEmptyOrType } from './index2.js';
|
|
4
5
|
|
|
5
6
|
function isMotionReduced() {
|
|
6
|
-
return window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
7
|
+
return IS_BROWSER ? window.matchMedia('(prefers-reduced-motion: reduce)').matches : false;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
const collapseDuration = 350;
|
|
@@ -15,7 +16,8 @@ const animationOptions = {
|
|
|
15
16
|
fill: 'forwards',
|
|
16
17
|
};
|
|
17
18
|
function collapse(el) {
|
|
18
|
-
const
|
|
19
|
+
const elHeight = IS_BROWSER ? window.getComputedStyle(el).height : `${el.scrollHeight}px`;
|
|
20
|
+
const expandedKeyframe = { height: elHeight };
|
|
19
21
|
return el.animate([expandedKeyframe, collapsedKeyframe], animationOptions);
|
|
20
22
|
}
|
|
21
23
|
function expand(el) {
|
|
@@ -33,21 +35,14 @@ const PostCollapsible = /*@__PURE__*/ proxyCustomElement(class PostCollapsible e
|
|
|
33
35
|
this.__registerHost();
|
|
34
36
|
this.__attachShadow();
|
|
35
37
|
this.postToggle = createEvent(this, "postToggle", 7);
|
|
38
|
+
this.isLoaded = false;
|
|
39
|
+
this.isOpen = true;
|
|
36
40
|
this.collapsed = false;
|
|
37
41
|
}
|
|
38
|
-
isLoaded = false;
|
|
39
|
-
isOpen = true;
|
|
40
|
-
get host() { return this; }
|
|
41
42
|
collapsedChange() {
|
|
42
43
|
checkEmptyOrType(this, 'collapsed', 'boolean');
|
|
43
44
|
void this.toggle(!this.collapsed);
|
|
44
45
|
}
|
|
45
|
-
/**
|
|
46
|
-
* An event emitted when the collapse element is shown or hidden, before the transition.
|
|
47
|
-
*
|
|
48
|
-
* The event payload is a boolean: `true` if the collapsible was opened, `false` if it was closed.
|
|
49
|
-
*/
|
|
50
|
-
postToggle;
|
|
51
46
|
componentDidLoad() {
|
|
52
47
|
this.collapsedChange();
|
|
53
48
|
this.isLoaded = true;
|
|
@@ -72,6 +67,7 @@ const PostCollapsible = /*@__PURE__*/ proxyCustomElement(class PostCollapsible e
|
|
|
72
67
|
const isHostRendered = this.host.offsetParent;
|
|
73
68
|
if (isHostRendered)
|
|
74
69
|
animation.commitStyles();
|
|
70
|
+
this.updateTriggers();
|
|
75
71
|
return open;
|
|
76
72
|
}
|
|
77
73
|
/**
|
|
@@ -82,8 +78,9 @@ const PostCollapsible = /*@__PURE__*/ proxyCustomElement(class PostCollapsible e
|
|
|
82
78
|
triggers.forEach(trigger => trigger.update());
|
|
83
79
|
}
|
|
84
80
|
render() {
|
|
85
|
-
return (h(Host, { key: '
|
|
81
|
+
return (h(Host, { key: 'a678bc639dfd7686d8e1bd57ca0f09984a24ab61', "data-version": version, tabindex: this.collapsed ? -1 : undefined }, h("slot", { key: 'e0b88ac152fa09314b4bc01c9abdb11480e2cb4d' })));
|
|
86
82
|
}
|
|
83
|
+
get host() { return this; }
|
|
87
84
|
static get watchers() { return {
|
|
88
85
|
"collapsed": ["collapsedChange"]
|
|
89
86
|
}; }
|
|
@@ -14,15 +14,17 @@ const PostFooter = /*@__PURE__*/ proxyCustomElement(class PostFooter extends HTM
|
|
|
14
14
|
super();
|
|
15
15
|
this.__registerHost();
|
|
16
16
|
this.__attachShadow();
|
|
17
|
+
this.breakpointChange = (e) => {
|
|
18
|
+
this.isMobile = e.detail === 'mobile';
|
|
19
|
+
};
|
|
17
20
|
this.label = undefined;
|
|
18
21
|
this.isMobile = breakpoint.get('name') === 'mobile';
|
|
19
22
|
}
|
|
20
|
-
get host() { return this; }
|
|
21
23
|
connectedCallback() {
|
|
22
|
-
window.addEventListener('postBreakpoint:name', this.breakpointChange
|
|
24
|
+
window.addEventListener('postBreakpoint:name', this.breakpointChange);
|
|
23
25
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
disconnectedCallback() {
|
|
27
|
+
window.removeEventListener('postBreakpoint:name', this.breakpointChange);
|
|
26
28
|
}
|
|
27
29
|
renderAccordion() {
|
|
28
30
|
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" })))));
|
|
@@ -31,11 +33,9 @@ const PostFooter = /*@__PURE__*/ proxyCustomElement(class PostFooter extends HTM
|
|
|
31
33
|
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" }))));
|
|
32
34
|
}
|
|
33
35
|
render() {
|
|
34
|
-
return (h(Host, { key: '
|
|
35
|
-
}
|
|
36
|
-
disconnectedCallback() {
|
|
37
|
-
window.removeEventListener('postBreakpoint:name', this.breakpointChange.bind(this));
|
|
36
|
+
return (h(Host, { key: '4058ba0a63a666b82d274d1c35397c97d280ba49', "data-version": version }, h("footer", { key: '27adf1e2a1439fd69efd6e571fcdd6851304c92a' }, h("h2", { key: '1ca0cd955ec5e6d315521eb5c28c5963ed44856d', class: "visually-hidden" }, this.label), h("div", { key: '27a6f520dee9d6294fa3cd4ebc6fd5062ac327ce', class: "footer-container" }, this.isMobile ? this.renderAccordion() : this.renderGrid(), h("div", { key: '5607004d5e3ea553a86d476ca459b3b3632ef12d', class: "footer-column" }, h("div", { key: 'cd4727970358ffad4ca28fffaccc8a5eab4dec27', class: "footer-socialmedia" }, h("slot", { key: '92e105af21b69640a07c2d35c24bff6aae84abb6', name: "socialmedia" })), h("div", { key: '904b787df3f192593408d99857e213143cec6706', class: "footer-app" }, h("slot", { key: '2f4ab14e20737c6035c175e58982464fe6987724', name: "app" }))), h("div", { key: 'c85b261b4ae0cb1e27f424f460fa2838e1174fb0', class: "footer-businesssectors" }, h("slot", { key: 'c66baa3a1b689d881db68448b9d72d47acd11c7c', name: "businesssectors" })), h("div", { key: '4eebc88279f29eef028766c1fcb90effc1aaf1ca', class: "footer-meta" }, h("slot", { key: 'd689d7c14af01dc13c7f9f0fd170f3974150b9aa', name: "meta" })), h("div", { key: '36f87386755a4ae1186109b46609c6ad9c1d5041', class: "footer-copyright" }, h("slot", { key: 'c37231f795b1a5a407f83aeaf8a8b093713b8db1', name: "copyright" }))))));
|
|
38
37
|
}
|
|
38
|
+
get host() { return this; }
|
|
39
39
|
static get style() { return PostFooterStyle0; }
|
|
40
40
|
}, [1, "post-footer", {
|
|
41
41
|
"label": [1],
|
|
@@ -138,17 +138,10 @@ function throttle (delay, callback, options) {
|
|
|
138
138
|
return wrapper;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
const postHeaderCss = "*,::before,::after{box-sizing:border-box}:host{z-index:1020;position:relative;--global-header-top:calc( (var(--post-global-header-height) - var(--post-global-header-reduced-height)) * -1 );--local-header-top:calc( -1 * (var(--post-local-header-height) - var(--post-main-navigation-height)) + var(--post-global-header-reduced-height) );--logo-height:calc(var(--post-global-header-height) - var(--post-header-scroll-top));--global-controls-top:calc(min((var(--post-header-scroll-top) / 4), 20px) * -1)}:host:has(.global-sub>*:not(.logo):focus-within),:host:has(.local-sub:focus-within){--global-header-top:0;--local-header-top:var(--post-global-header-height);--logo-height:var(--post-global-header-height);--global-controls-top:0}:host(:not(:has([slot=title]))) .local-header{padding-block-start:0}:host(:not(:has([slot=title]))) .local-sub{display:none}.d-flex{display:flex}.space-between{justify-content:space-between}.global-header{background-color:#fc0;display:flex;justify-content:space-between;position:sticky;padding-inline:4px;height:var(--post-global-header-height)}@media screen and (max-width: 1023.98px){.global-header{z-index:3;inset-block-start:0}}@media screen and (min-width: 1024px){.global-header{z-index:5;padding-inline-end:12px;inset-block-start:var(--global-header-top);transition:inset-block-start .2s ease-in-out}}.global-sub{display:flex;align-items:center;gap:24px}@media screen and (min-width: 1024px){.global-sub:not(:has(.logo)){position:relative;transition:inset-block-start .2s ease-in-out;inset-block-start:var(--global-controls-top)}}.align-end{align-items:flex-end}.logo{flex:1 0 auto;height:var(--post-global-header-height);width:var(--post-global-header-height);min-height:var(--post-global-header-reduced-height);align-self:flex-end}@media screen and (min-width: 1024px){.logo{transition:height .2 ease-in-out;height:var(--logo-height)}}::slotted(ul){margin-block:0 !important;list-style:none;display:flex;padding-inline-start:0;gap:1rem;flex-shrink:0 !important}.local-header{display:flex;position:sticky;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px;min-height:var(--post-local-header-min-height);background:#fff;transition:box-shadow .2s ease-in-out}.local-header::after{content:\"\";position:absolute;width:100%;height:1px;background-color:#e1e0dc;inset-block-end:-1px;z-index:1}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.local-header::after{background-color:Highlight}}@media screen and (min-width: 1024px){.local-header{z-index:3;inset-block-start:var(--local-header-top);padding-block-start:18px;box-shadow:var(--post-device-elevation-300);transition:box-shadow .2s ease-in-out,inset-block-start .2s ease-in-out}}@media screen and (max-width: 1023.98px){.local-header{z-index:2;inset-block-start:var(--post-global-header-height);padding-block:8px;flex-wrap:wrap;gap:12px}.local-header.local-header-mobile-extended::after{inset-block-end:0}.local-header:not(.local-header-mobile-extended){box-shadow:var(--post-device-elevation-300)}}.local-sub{margin-inline-end:8px}@media screen and (max-width: 1023.98px){.local-sub{margin-inline-end:4px}}::slotted(.list-inline){margin:0 !important;z-index:3 !important;position:relative !important}@media screen and (min-width: 1024px){.mobile-toggle{display:none}}.navigation{width:100%}@media screen and (min-width: 1024px){.navigation{inset-block-start:var(--post-global-header-reduced-height)}.navigation::before{display:block;content:\"\";position:absolute;inset:0;z-index:2;background:#fff}}@media screen and (max-width: 1023.98px){.navigation{position:sticky;z-index:1;inset-inline:0;inset-block-start:var(--post-header-height)}.mobile-menu{background-color:#fafafa}::slotted(post-mainnavigation),.navigation-footer{display:none;flex-direction:column;padding-block:16px 24px;padding-inline:32px}.navigation.extended ::slotted(post-mainnavigation),.navigation.extended .navigation-footer{display:flex}.navigation.extended>div{display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;height:calc(min(var(--header-scroll-parent-height, 100dvh),100dvh) - var(--post-header-height))}.navigation.extended.megadropdown-open>div{overflow-y:hidden}.navigation.extended ::slotted(post-mainnavigation){flex-grow:1 !important}::slotted(post-mainnavigation){gap:32px}.navigation-footer{background-color:#f0efed;gap:24px}}@media screen and (max-width: 599.98px){::slotted(post-mainnavigation),.navigation-footer{padding-inline:16px}}";
|
|
141
|
+
const postHeaderCss = "*,::before,::after{box-sizing:border-box}:host{z-index:1020;position:relative;--global-header-top:calc( (var(--post-global-header-height) - var(--post-global-header-reduced-height)) * -1 );--local-header-top:calc( -1 * (var(--post-local-header-height) - var(--post-main-navigation-height)) + var(--post-global-header-reduced-height) );--logo-height:calc(var(--post-global-header-height) - var(--post-header-scroll-top, 0px));--global-controls-top:calc(min((var(--post-header-scroll-top) / 4), 20px) * -1)}:host:has(.global-sub>*:not(.logo):focus-within),:host:has(.local-sub:focus-within){--global-header-top:0;--local-header-top:var(--post-global-header-height);--logo-height:var(--post-global-header-height);--global-controls-top:0}:host(:not(:has([slot=title]))) .local-header{padding-block-start:0}:host(:not(:has([slot=title]))) .local-sub{display:none}.d-flex{display:flex}.space-between{justify-content:space-between}.global-header{background-color:#fc0;display:flex;justify-content:space-between;position:sticky;padding-inline:4px;height:var(--post-global-header-height)}@media screen and (max-width: 1023.98px){.global-header{z-index:3;inset-block-start:0}}@media screen and (min-width: 1024px){.global-header{z-index:5;padding-inline-end:12px;inset-block-start:var(--global-header-top);transition:inset-block-start .2s ease-in-out}}.global-sub{display:flex;align-items:center;gap:24px}@media screen and (min-width: 1024px){.global-sub:not(:has(.logo)){position:relative;transition:inset-block-start .2s ease-in-out;inset-block-start:var(--global-controls-top)}}.align-end{align-items:flex-end}.logo{flex:1 0 auto;height:var(--post-global-header-height);width:var(--post-global-header-height);min-height:var(--post-global-header-reduced-height);align-self:flex-end}@media screen and (min-width: 1024px){.logo{transition:height .2 ease-in-out;height:var(--logo-height)}}::slotted(ul){margin-block:0 !important;list-style:none;display:flex;padding-inline-start:0;gap:1rem;flex-shrink:0 !important}.local-header{display:flex;position:sticky;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px;min-height:var(--post-local-header-min-height);background:#fff;transition:box-shadow .2s ease-in-out}.local-header::after{content:\"\";position:absolute;width:100%;height:1px;background-color:#e1e0dc;inset-block-end:-1px;z-index:1}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.local-header::after{background-color:Highlight}}@media screen and (min-width: 1024px){.local-header{z-index:3;inset-block-start:var(--local-header-top);padding-block-start:18px;box-shadow:var(--post-device-elevation-300);transition:box-shadow .2s ease-in-out,inset-block-start .2s ease-in-out}}@media screen and (max-width: 1023.98px){.local-header{z-index:2;inset-block-start:var(--post-global-header-height);padding-block:8px;flex-wrap:wrap;gap:12px}.local-header.local-header-mobile-extended::after{inset-block-end:0}.local-header:not(.local-header-mobile-extended){box-shadow:var(--post-device-elevation-300)}}.local-sub{margin-inline-end:8px}@media screen and (max-width: 1023.98px){.local-sub{margin-inline-end:4px}}::slotted(.list-inline){margin:0 !important;z-index:3 !important;position:relative !important}@media screen and (min-width: 1024px){.mobile-toggle{display:none}}.navigation{width:100%}@media screen and (min-width: 1024px){.navigation{inset-block-start:var(--post-global-header-reduced-height)}.navigation::before{display:block;content:\"\";position:absolute;inset:0;z-index:2;background:#fff}}@media screen and (max-width: 1023.98px){.navigation{position:sticky;z-index:1;inset-inline:0;inset-block-start:var(--post-header-height)}.mobile-menu{background-color:#fafafa}::slotted(post-mainnavigation),.navigation-footer{display:none;flex-direction:column;padding-block:16px 24px;padding-inline:32px}.navigation.extended ::slotted(post-mainnavigation),.navigation.extended .navigation-footer{display:flex}.navigation.extended>div{display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;height:calc(min(var(--header-scroll-parent-height, 100dvh),100dvh) - var(--post-header-height))}.navigation.extended.megadropdown-open>div{overflow-y:hidden}.navigation.extended ::slotted(post-mainnavigation){flex-grow:1 !important}::slotted(post-mainnavigation){gap:32px}.navigation-footer{background-color:#f0efed;gap:24px}}@media screen and (max-width: 599.98px){::slotted(post-mainnavigation),.navigation-footer{padding-inline:16px}}";
|
|
142
142
|
const PostHeaderStyle0 = postHeaderCss;
|
|
143
143
|
|
|
144
144
|
const PostHeader = /*@__PURE__*/ proxyCustomElement(class PostHeader extends HTMLElement {
|
|
145
|
-
firstFocusableEl;
|
|
146
|
-
lastFocusableEl;
|
|
147
|
-
mobileMenu;
|
|
148
|
-
mobileMenuAnimation;
|
|
149
|
-
throttledResize = throttle(50, () => this.handleResize());
|
|
150
|
-
scrollParentResizeObserver;
|
|
151
|
-
localHeaderResizeObserver;
|
|
152
145
|
get scrollParent() {
|
|
153
146
|
const frozenScrollParent = document.querySelector('[data-post-scroll-locked]');
|
|
154
147
|
if (frozenScrollParent)
|
|
@@ -163,7 +156,6 @@ const PostHeader = /*@__PURE__*/ proxyCustomElement(class PostHeader extends HTM
|
|
|
163
156
|
}
|
|
164
157
|
return document.body;
|
|
165
158
|
}
|
|
166
|
-
get host() { return this; }
|
|
167
159
|
lockBody(newValue, _oldValue, propName) {
|
|
168
160
|
const scrollParent = this.scrollParent;
|
|
169
161
|
const mobileMenuExtended = propName === 'mobileMenuExtended' ? newValue : this.mobileMenuExtended;
|
|
@@ -176,15 +168,20 @@ const PostHeader = /*@__PURE__*/ proxyCustomElement(class PostHeader extends HTM
|
|
|
176
168
|
this.host.removeEventListener('keydown', this.keyboardHandler);
|
|
177
169
|
}
|
|
178
170
|
}
|
|
179
|
-
/**
|
|
180
|
-
* An event emitted when the device has changed
|
|
181
|
-
*/
|
|
182
|
-
postUpdateDevice;
|
|
183
171
|
constructor() {
|
|
184
172
|
super();
|
|
185
173
|
this.__registerHost();
|
|
186
174
|
this.__attachShadow();
|
|
187
175
|
this.postUpdateDevice = createEvent(this, "postUpdateDevice", 7);
|
|
176
|
+
this.throttledResize = throttle(50, () => this.handleResize());
|
|
177
|
+
this.megedropdownStateHandler = (event) => {
|
|
178
|
+
eventGuard(this.host, event, {
|
|
179
|
+
targetLocalName: 'post-megadropdown',
|
|
180
|
+
delegatorSelector: 'post-header',
|
|
181
|
+
}, () => {
|
|
182
|
+
this.megadropdownOpen = event.detail.isVisible;
|
|
183
|
+
});
|
|
184
|
+
};
|
|
188
185
|
this.device = null;
|
|
189
186
|
this.mobileMenuExtended = false;
|
|
190
187
|
this.megadropdownOpen = false;
|
|
@@ -206,10 +203,12 @@ const PostHeader = /*@__PURE__*/ proxyCustomElement(class PostHeader extends HTM
|
|
|
206
203
|
document.addEventListener('postToggleMegadropdown', this.megedropdownStateHandler);
|
|
207
204
|
this.host.addEventListener('click', this.handleLinkClick);
|
|
208
205
|
this.handleResize();
|
|
209
|
-
this.handleScrollEvent();
|
|
210
206
|
this.handleScrollParentResize();
|
|
211
207
|
this.lockBody(false, this.mobileMenuExtended, 'mobileMenuExtended');
|
|
212
208
|
}
|
|
209
|
+
componentWillRender() {
|
|
210
|
+
this.handleScrollEvent();
|
|
211
|
+
}
|
|
213
212
|
componentDidRender() {
|
|
214
213
|
this.getFocusableElements();
|
|
215
214
|
this.handleLocalHeaderResize();
|
|
@@ -255,14 +254,6 @@ const PostHeader = /*@__PURE__*/ proxyCustomElement(class PostHeader extends HTM
|
|
|
255
254
|
});
|
|
256
255
|
}
|
|
257
256
|
}
|
|
258
|
-
megedropdownStateHandler = (event) => {
|
|
259
|
-
eventGuard(this.host, event, {
|
|
260
|
-
targetLocalName: 'post-megadropdown',
|
|
261
|
-
delegatorSelector: 'post-header',
|
|
262
|
-
}, () => {
|
|
263
|
-
this.megadropdownOpen = event.detail.isVisible;
|
|
264
|
-
});
|
|
265
|
-
};
|
|
266
257
|
// Get all the focusable elements in the post-header mobile menu
|
|
267
258
|
getFocusableElements() {
|
|
268
259
|
// Get elements in the correct order (different as the DOM order)
|
|
@@ -374,8 +365,9 @@ const PostHeader = /*@__PURE__*/ proxyCustomElement(class PostHeader extends HTM
|
|
|
374
365
|
return (h("div", { class: navigationClasses.join(' '), style: { '--header-navigation-current-inset': `${mobileMenuScrollTop}px` } }, h("div", { class: "mobile-menu", ref: el => (this.mobileMenu = el) }, h("slot", { name: "post-mainnavigation" }), (this.device === 'mobile' || this.device === 'tablet') && (h("div", { class: "navigation-footer" }, h("slot", { name: "meta-navigation" }), h("slot", { name: "post-language-switch" }))))));
|
|
375
366
|
}
|
|
376
367
|
render() {
|
|
377
|
-
return (h(Host, { key: '
|
|
368
|
+
return (h(Host, { key: 'd8b43333c00a612a3a37479750874a1efaf6a855', "data-version": version }, h("div", { key: 'b270fb139cc8730a774785c5535fb3bcdd60c59c', class: "global-header" }, h("div", { key: 'b3161c4b26a1be4707fa6c7360e6779547b7ab30', class: "global-sub" }, h("div", { key: '44ecddd8f91c86d1af0075718b63e6bf034a25b7', class: "logo" }, h("slot", { key: 'de5208255d0cf59707092c984b0fec33d317d38d', name: "post-logo" }))), h("div", { key: '199dc1da25d817b488d5c3402779130c360e0f9a', class: "global-sub" }, this.device === 'desktop' && h("slot", { key: '1337f13908a826022a1bf2a8a1a2e2bfe323900b', name: "meta-navigation" }), h("slot", { key: '2b6fbbcedc8f1803e388fdbcbcd637d6a2605c87', name: "global-controls" }), this.device === 'desktop' && h("slot", { key: '2861c1a0f7639678edd0f584d8f98665fcf84fb0', name: "post-language-switch" }), h("div", { key: '06e2d9a4abe3a804f25ffa303f6f9ed5b7c01b60', onClick: () => this.toggleMobileMenu(), class: "mobile-toggle" }, h("slot", { key: '772407e65d3d8f642c1e80fd8cb42b425eed4848', name: "post-togglebutton" })))), h("div", { key: '7b7a3da2a8cc848632c2e45badc52e23958a6faa', class: 'local-header ' + (this.mobileMenuExtended ? 'local-header-mobile-extended' : '') }, h("slot", { key: '96e4d68bfe0504cc09d57a8b11dabb9139d780f6', name: "title" }), h("div", { key: '240fae6f0f9d2a192a7b94110a9c4571856de90a', class: "local-sub" }, h("slot", { key: '14fd77af7dca02157248bf95d7d253d5f14e9f1e', name: "local-controls" }), h("slot", { key: '6dfac25cb64401123638ddfc6b94bbe89ae78249' })), this.device === 'desktop' && this.renderNavigation()), this.device !== 'desktop' && this.renderNavigation()));
|
|
378
369
|
}
|
|
370
|
+
get host() { return this; }
|
|
379
371
|
static get watchers() { return {
|
|
380
372
|
"device": ["lockBody"],
|
|
381
373
|
"mobileMenuExtended": ["lockBody"]
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { I as IS_BROWSER } from './breakpoints.js';
|
|
2
3
|
import { c as checkEmptyOrOneOf, e as checkEmptyOrType } from './index2.js';
|
|
3
4
|
import { v as version } from './package.js';
|
|
4
5
|
import { c as checkNonEmpty } from './check-non-empty.js';
|
|
@@ -30,8 +31,6 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
|
|
|
30
31
|
this.rotate = null;
|
|
31
32
|
this.scale = null;
|
|
32
33
|
}
|
|
33
|
-
isSSR = typeof window === 'undefined';
|
|
34
|
-
get host() { return this; }
|
|
35
34
|
validateAnimation(newValue = this.animation) {
|
|
36
35
|
if (newValue !== undefined)
|
|
37
36
|
checkEmptyOrOneOf(this, 'animation', ANIMATION_KEYS);
|
|
@@ -62,7 +61,7 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
|
|
|
62
61
|
// the first definition object which defines a domain, will be used to set the domain of the file url
|
|
63
62
|
// the first definition object which defines a slug, will be used to set the slug of the file url
|
|
64
63
|
const urlDefinitions = [this.getUrlDefinition(this.base, 'both')];
|
|
65
|
-
if (
|
|
64
|
+
if (IS_BROWSER) {
|
|
66
65
|
urlDefinitions.push(this.getUrlDefinition(document.head
|
|
67
66
|
.querySelector('meta[name="design-system-settings"][data-post-icon-base]')
|
|
68
67
|
?.getAttribute('data-post-icon-base'), 'relative'));
|
|
@@ -126,8 +125,9 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
|
|
|
126
125
|
this.validateAnimation();
|
|
127
126
|
}
|
|
128
127
|
render() {
|
|
129
|
-
return (h(Host, { key: '
|
|
128
|
+
return (h(Host, { key: 'b3c3efcc03f423a248e231b4b4c5d79c93ae25a6', "data-version": version }, h("span", { key: 'd73d4df11fcccb96d5346f3f8c3e18602bb8d484', style: this.getStyles() })));
|
|
130
129
|
}
|
|
130
|
+
get host() { return this; }
|
|
131
131
|
static get watchers() { return {
|
|
132
132
|
"animation": ["validateAnimation"],
|
|
133
133
|
"base": ["validateBase"],
|
|
@@ -143,7 +143,7 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
|
|
|
143
143
|
"base": [1],
|
|
144
144
|
"flipH": [4, "flip-h"],
|
|
145
145
|
"flipV": [4, "flip-v"],
|
|
146
|
-
"name": [
|
|
146
|
+
"name": [513],
|
|
147
147
|
"rotate": [2],
|
|
148
148
|
"scale": [2]
|
|
149
149
|
}, undefined, {
|