@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,8 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
2
|
-
import {
|
|
3
|
-
import { g as getAttributeObserver } from './attribute-observer-2f203993.js';
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-f4d19816.js';
|
|
2
|
+
import { g as getAttributeObserver } from './attribute-observer-009deee5.js';
|
|
4
3
|
import { d as checkEmptyOrType } from './index-8f8fe5b0.js';
|
|
4
|
+
import { I as IS_BROWSER } from './breakpoints-7812702e.js';
|
|
5
|
+
import { v as version$1 } from './package-8986a24c.js';
|
|
5
6
|
|
|
6
7
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
7
8
|
|
|
@@ -4507,274 +4508,14 @@ module.exports = exports['default'];
|
|
|
4507
4508
|
|
|
4508
4509
|
const isFocusable = /*@__PURE__*/getDefaultExportFromCjs(focusable.exports);
|
|
4509
4510
|
|
|
4510
|
-
/*!
|
|
4511
|
-
* long-press-event - v@version@
|
|
4512
|
-
* Pure JavaScript long-press-event
|
|
4513
|
-
* https://github.com/john-doherty/long-press-event
|
|
4514
|
-
* @author John Doherty <www.johndoherty.info>
|
|
4515
|
-
* @license MIT
|
|
4516
|
-
*/
|
|
4517
|
-
(function (window, document) {
|
|
4518
|
-
|
|
4519
|
-
// local timer object based on rAF
|
|
4520
|
-
var timer = null;
|
|
4521
|
-
|
|
4522
|
-
// check if we're using a touch screen
|
|
4523
|
-
var hasPointerEvents = (('PointerEvent' in window) || (window.navigator && 'msPointerEnabled' in window.navigator));
|
|
4524
|
-
var isTouch = (('ontouchstart' in window) || (navigator.MaxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0));
|
|
4525
|
-
|
|
4526
|
-
// switch to pointer events or touch events if using a touch screen
|
|
4527
|
-
var mouseDown = hasPointerEvents ? 'pointerdown' : isTouch ? 'touchstart' : 'mousedown';
|
|
4528
|
-
var mouseUp = hasPointerEvents ? 'pointerup' : isTouch ? 'touchend' : 'mouseup';
|
|
4529
|
-
var mouseMove = hasPointerEvents ? 'pointermove' : isTouch ? 'touchmove' : 'mousemove';
|
|
4530
|
-
var mouseLeave = hasPointerEvents ? 'pointerleave' : isTouch ? 'touchleave' : 'mouseleave';
|
|
4531
|
-
|
|
4532
|
-
// track number of pixels the mouse moves during long press
|
|
4533
|
-
var startX = 0; // mouse x position when timer started
|
|
4534
|
-
var startY = 0; // mouse y position when timer started
|
|
4535
|
-
var maxDiffX = 10; // max number of X pixels the mouse can move during long press before it is canceled
|
|
4536
|
-
var maxDiffY = 10; // max number of Y pixels the mouse can move during long press before it is canceled
|
|
4537
|
-
|
|
4538
|
-
// patch CustomEvent to allow constructor creation (IE/Chrome)
|
|
4539
|
-
if (typeof window.CustomEvent !== 'function') {
|
|
4540
|
-
|
|
4541
|
-
window.CustomEvent = function (event, params) {
|
|
4542
|
-
|
|
4543
|
-
params = params || { bubbles: false, cancelable: false, detail: undefined };
|
|
4544
|
-
|
|
4545
|
-
var evt = document.createEvent('CustomEvent');
|
|
4546
|
-
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
|
|
4547
|
-
return evt;
|
|
4548
|
-
};
|
|
4549
|
-
|
|
4550
|
-
window.CustomEvent.prototype = window.Event.prototype;
|
|
4551
|
-
}
|
|
4552
|
-
|
|
4553
|
-
// requestAnimationFrame() shim by Paul Irish
|
|
4554
|
-
window.requestAnimFrame = (function () {
|
|
4555
|
-
return window.requestAnimationFrame ||
|
|
4556
|
-
window.webkitRequestAnimationFrame ||
|
|
4557
|
-
window.mozRequestAnimationFrame ||
|
|
4558
|
-
window.oRequestAnimationFrame ||
|
|
4559
|
-
window.msRequestAnimationFrame || function (callback) {
|
|
4560
|
-
window.setTimeout(callback, 1000 / 60);
|
|
4561
|
-
};
|
|
4562
|
-
})();
|
|
4563
|
-
|
|
4564
|
-
/**
|
|
4565
|
-
* Behaves the same as setTimeout except uses requestAnimationFrame() where possible for better performance
|
|
4566
|
-
* @param {function} fn The callback function
|
|
4567
|
-
* @param {int} delay The delay in milliseconds
|
|
4568
|
-
* @returns {object} handle to the timeout object
|
|
4569
|
-
*/
|
|
4570
|
-
function requestTimeout(fn, delay) {
|
|
4571
|
-
|
|
4572
|
-
if (!window.requestAnimationFrame && !window.webkitRequestAnimationFrame &&
|
|
4573
|
-
!(window.mozRequestAnimationFrame && window.mozCancelRequestAnimationFrame) && // Firefox 5 ships without cancel support
|
|
4574
|
-
!window.oRequestAnimationFrame && !window.msRequestAnimationFrame) return window.setTimeout(fn, delay);
|
|
4575
|
-
|
|
4576
|
-
var start = new Date().getTime();
|
|
4577
|
-
var handle = {};
|
|
4578
|
-
|
|
4579
|
-
var loop = function () {
|
|
4580
|
-
var current = new Date().getTime();
|
|
4581
|
-
var delta = current - start;
|
|
4582
|
-
|
|
4583
|
-
if (delta >= delay) {
|
|
4584
|
-
fn.call();
|
|
4585
|
-
}
|
|
4586
|
-
else {
|
|
4587
|
-
handle.value = requestAnimFrame(loop);
|
|
4588
|
-
}
|
|
4589
|
-
};
|
|
4590
|
-
|
|
4591
|
-
handle.value = requestAnimFrame(loop);
|
|
4592
|
-
|
|
4593
|
-
return handle;
|
|
4594
|
-
}
|
|
4595
|
-
|
|
4596
|
-
/**
|
|
4597
|
-
* Behaves the same as clearTimeout except uses cancelRequestAnimationFrame() where possible for better performance
|
|
4598
|
-
* @param {object} handle The callback function
|
|
4599
|
-
* @returns {void}
|
|
4600
|
-
*/
|
|
4601
|
-
function clearRequestTimeout(handle) {
|
|
4602
|
-
if (handle) {
|
|
4603
|
-
window.cancelAnimationFrame ? window.cancelAnimationFrame(handle.value) :
|
|
4604
|
-
window.webkitCancelAnimationFrame ? window.webkitCancelAnimationFrame(handle.value) :
|
|
4605
|
-
window.webkitCancelRequestAnimationFrame ? window.webkitCancelRequestAnimationFrame(handle.value) : /* Support for legacy API */
|
|
4606
|
-
window.mozCancelRequestAnimationFrame ? window.mozCancelRequestAnimationFrame(handle.value) :
|
|
4607
|
-
window.oCancelRequestAnimationFrame ? window.oCancelRequestAnimationFrame(handle.value) :
|
|
4608
|
-
window.msCancelRequestAnimationFrame ? window.msCancelRequestAnimationFrame(handle.value) :
|
|
4609
|
-
clearTimeout(handle);
|
|
4610
|
-
}
|
|
4611
|
-
}
|
|
4612
|
-
|
|
4613
|
-
/**
|
|
4614
|
-
* Fires the 'long-press' event on element
|
|
4615
|
-
* @param {MouseEvent|PointerEvent|TouchEvent} originalEvent The original event being fired
|
|
4616
|
-
* @returns {void}
|
|
4617
|
-
*/
|
|
4618
|
-
function fireLongPressEvent(originalEvent) {
|
|
4619
|
-
|
|
4620
|
-
clearLongPressTimer();
|
|
4621
|
-
|
|
4622
|
-
originalEvent = unifyEvent(originalEvent);
|
|
4623
|
-
|
|
4624
|
-
// fire the long-press event
|
|
4625
|
-
var allowClickEvent = this.dispatchEvent(new CustomEvent('long-press', {
|
|
4626
|
-
bubbles: true,
|
|
4627
|
-
cancelable: true,
|
|
4628
|
-
|
|
4629
|
-
// custom event data (legacy)
|
|
4630
|
-
detail: {
|
|
4631
|
-
clientX: originalEvent.clientX,
|
|
4632
|
-
clientY: originalEvent.clientY,
|
|
4633
|
-
offsetX: originalEvent.offsetX,
|
|
4634
|
-
offsetY: originalEvent.offsetY,
|
|
4635
|
-
pageX: originalEvent.pageX,
|
|
4636
|
-
pageY: originalEvent.pageY
|
|
4637
|
-
},
|
|
4638
|
-
|
|
4639
|
-
// add coordinate data that would typically acompany a touch/click event
|
|
4640
|
-
clientX: originalEvent.clientX,
|
|
4641
|
-
clientY: originalEvent.clientY,
|
|
4642
|
-
offsetX: originalEvent.offsetX,
|
|
4643
|
-
offsetY: originalEvent.offsetY,
|
|
4644
|
-
pageX: originalEvent.pageX,
|
|
4645
|
-
pageY: originalEvent.pageY,
|
|
4646
|
-
screenX: originalEvent.screenX,
|
|
4647
|
-
screenY: originalEvent.screenY
|
|
4648
|
-
}));
|
|
4649
|
-
|
|
4650
|
-
if (!allowClickEvent) {
|
|
4651
|
-
// suppress the next click event if e.preventDefault() was called in long-press handler
|
|
4652
|
-
document.addEventListener('click', function suppressEvent(e) {
|
|
4653
|
-
document.removeEventListener('click', suppressEvent, true);
|
|
4654
|
-
cancelEvent(e);
|
|
4655
|
-
}, true);
|
|
4656
|
-
}
|
|
4657
|
-
}
|
|
4658
|
-
|
|
4659
|
-
/**
|
|
4660
|
-
* consolidates mouse, touch, and Pointer events
|
|
4661
|
-
* @param {MouseEvent|PointerEvent|TouchEvent} e The original event being fired
|
|
4662
|
-
* @returns {MouseEvent|PointerEvent|Touch}
|
|
4663
|
-
*/
|
|
4664
|
-
function unifyEvent(e) {
|
|
4665
|
-
if (e.changedTouches !== undefined) {
|
|
4666
|
-
return e.changedTouches[0];
|
|
4667
|
-
}
|
|
4668
|
-
return e;
|
|
4669
|
-
}
|
|
4670
|
-
|
|
4671
|
-
/**
|
|
4672
|
-
* method responsible for starting the long press timer
|
|
4673
|
-
* @param {event} e - event object
|
|
4674
|
-
* @returns {void}
|
|
4675
|
-
*/
|
|
4676
|
-
function startLongPressTimer(e) {
|
|
4677
|
-
|
|
4678
|
-
clearLongPressTimer();
|
|
4679
|
-
|
|
4680
|
-
var el = e.target;
|
|
4681
|
-
|
|
4682
|
-
// get delay from html attribute if it exists, otherwise default to 1500
|
|
4683
|
-
var longPressDelayInMs = parseInt(getNearestAttribute(el, 'data-long-press-delay', '1500'), 10); // default 1500
|
|
4684
|
-
|
|
4685
|
-
// start the timer
|
|
4686
|
-
timer = requestTimeout(fireLongPressEvent.bind(el, e), longPressDelayInMs);
|
|
4687
|
-
}
|
|
4688
|
-
|
|
4689
|
-
/**
|
|
4690
|
-
* method responsible for clearing a pending long press timer
|
|
4691
|
-
* @param {event} e - event object
|
|
4692
|
-
* @returns {void}
|
|
4693
|
-
*/
|
|
4694
|
-
function clearLongPressTimer(e) {
|
|
4695
|
-
clearRequestTimeout(timer);
|
|
4696
|
-
timer = null;
|
|
4697
|
-
}
|
|
4698
|
-
|
|
4699
|
-
/**
|
|
4700
|
-
* Cancels the current event
|
|
4701
|
-
* @param {object} e - browser event object
|
|
4702
|
-
* @returns {void}
|
|
4703
|
-
*/
|
|
4704
|
-
function cancelEvent(e) {
|
|
4705
|
-
e.stopImmediatePropagation();
|
|
4706
|
-
e.preventDefault();
|
|
4707
|
-
e.stopPropagation();
|
|
4708
|
-
}
|
|
4709
|
-
|
|
4710
|
-
/**
|
|
4711
|
-
* Starts the timer on mouse down and logs current position
|
|
4712
|
-
* @param {object} e - browser event object
|
|
4713
|
-
* @returns {void}
|
|
4714
|
-
*/
|
|
4715
|
-
function mouseDownHandler(e) {
|
|
4716
|
-
startX = e.clientX;
|
|
4717
|
-
startY = e.clientY;
|
|
4718
|
-
startLongPressTimer(e);
|
|
4719
|
-
}
|
|
4720
|
-
|
|
4721
|
-
/**
|
|
4722
|
-
* If the mouse moves n pixels during long-press, cancel the timer
|
|
4723
|
-
* @param {object} e - browser event object
|
|
4724
|
-
* @returns {void}
|
|
4725
|
-
*/
|
|
4726
|
-
function mouseMoveHandler(e) {
|
|
4727
|
-
|
|
4728
|
-
// calculate total number of pixels the pointer has moved
|
|
4729
|
-
var diffX = Math.abs(startX - e.clientX);
|
|
4730
|
-
var diffY = Math.abs(startY - e.clientY);
|
|
4731
|
-
|
|
4732
|
-
// if pointer has moved more than allowed, cancel the long-press timer and therefore the event
|
|
4733
|
-
if (diffX >= maxDiffX || diffY >= maxDiffY) {
|
|
4734
|
-
clearLongPressTimer();
|
|
4735
|
-
}
|
|
4736
|
-
}
|
|
4737
|
-
|
|
4738
|
-
/**
|
|
4739
|
-
* Gets attribute off HTML element or nearest parent
|
|
4740
|
-
* @param {object} el - HTML element to retrieve attribute from
|
|
4741
|
-
* @param {string} attributeName - name of the attribute
|
|
4742
|
-
* @param {any} defaultValue - default value to return if no match found
|
|
4743
|
-
* @returns {any} attribute value or defaultValue
|
|
4744
|
-
*/
|
|
4745
|
-
function getNearestAttribute(el, attributeName, defaultValue) {
|
|
4746
|
-
|
|
4747
|
-
// walk up the dom tree looking for data-action and data-trigger
|
|
4748
|
-
while (el && el !== document.documentElement) {
|
|
4749
|
-
|
|
4750
|
-
var attributeValue = el.getAttribute(attributeName);
|
|
4751
|
-
|
|
4752
|
-
if (attributeValue) {
|
|
4753
|
-
return attributeValue;
|
|
4754
|
-
}
|
|
4755
|
-
|
|
4756
|
-
el = el.parentNode;
|
|
4757
|
-
}
|
|
4758
|
-
|
|
4759
|
-
return defaultValue;
|
|
4760
|
-
}
|
|
4761
|
-
|
|
4762
|
-
// hook events that clear a pending long press event
|
|
4763
|
-
document.addEventListener(mouseUp, clearLongPressTimer, true);
|
|
4764
|
-
document.addEventListener(mouseLeave, clearLongPressTimer, true);
|
|
4765
|
-
document.addEventListener(mouseMove, mouseMoveHandler, true);
|
|
4766
|
-
document.addEventListener('wheel', clearLongPressTimer, true);
|
|
4767
|
-
document.addEventListener('scroll', clearLongPressTimer, true);
|
|
4768
|
-
document.addEventListener('contextmenu', clearLongPressTimer, true);
|
|
4769
|
-
|
|
4770
|
-
// hook events that can trigger a long press event
|
|
4771
|
-
document.addEventListener(mouseDown, mouseDownHandler, true); // <- start
|
|
4772
|
-
|
|
4773
|
-
}(window, document));
|
|
4774
|
-
|
|
4775
4511
|
const postTooltipCss = "post-popovercontainer[arrow]::after{position:absolute;content:\"\";inset:-13px;z-index:-1}post-popovercontainer>div{padding:var(--post-core-dimension-4) var(--post-core-dimension-8);max-width:calc(224px - var(--post-core-dimension-8));min-height:var(--post-core-dimension-16)}";
|
|
4776
4512
|
const PostTooltipStyle0 = postTooltipCss;
|
|
4777
4513
|
|
|
4514
|
+
if (IS_BROWSER) {
|
|
4515
|
+
(async () => {
|
|
4516
|
+
await import('./long-press-event-04d24397.js');
|
|
4517
|
+
})();
|
|
4518
|
+
}
|
|
4778
4519
|
const OPEN_DELAY = 650; // matches HTML title delay
|
|
4779
4520
|
/**
|
|
4780
4521
|
* @slot default - Slot for the content of the tooltip.
|
|
@@ -4799,7 +4540,8 @@ let tooltipTimeout = null;
|
|
|
4799
4540
|
* @returns
|
|
4800
4541
|
*/
|
|
4801
4542
|
const globalInterestHandler = (e) => {
|
|
4802
|
-
const
|
|
4543
|
+
const eventTarget = e.target;
|
|
4544
|
+
const targetElement = eventTarget.closest(tooltipTargetAttributeSelector);
|
|
4803
4545
|
globalCurrentTarget = targetElement;
|
|
4804
4546
|
if (!targetElement || !('getAttribute' in targetElement)) {
|
|
4805
4547
|
clearTimeout(tooltipTimeout);
|
|
@@ -4811,7 +4553,7 @@ const globalInterestHandler = (e) => {
|
|
|
4811
4553
|
const tooltip = document.getElementById(tooltipTarget);
|
|
4812
4554
|
// Determine if the tooltip was triggered by a focus event
|
|
4813
4555
|
const triggeredByFocus = e.type === 'focusin';
|
|
4814
|
-
|
|
4556
|
+
tooltip?.show(targetElement, triggeredByFocus);
|
|
4815
4557
|
if (hideTooltipTimeout) {
|
|
4816
4558
|
window.clearTimeout(hideTooltipTimeout);
|
|
4817
4559
|
hideTooltipTimeout = null;
|
|
@@ -4844,35 +4586,18 @@ const globalHideTooltip = (tooltip) => {
|
|
|
4844
4586
|
hideTooltipTimeout = null;
|
|
4845
4587
|
}, 42);
|
|
4846
4588
|
};
|
|
4847
|
-
/**
|
|
4848
|
-
* Patch some accessibility features that are hard to remember or understand
|
|
4849
|
-
* @param {HTMLElement} trigger
|
|
4850
|
-
*/
|
|
4851
|
-
const patchAccessibilityFeatures = (trigger) => {
|
|
4852
|
-
const describedBy = trigger.getAttribute('aria-describedby');
|
|
4853
|
-
const id = trigger.getAttribute(tooltipTargetAttribute);
|
|
4854
|
-
// Add tooltip to aria-describedby
|
|
4855
|
-
if (!describedBy?.includes(id)) {
|
|
4856
|
-
const newDescribedBy = describedBy ? `${describedBy} ${id}` : id;
|
|
4857
|
-
trigger.setAttribute('aria-describedby', newDescribedBy);
|
|
4858
|
-
}
|
|
4859
|
-
// Make element focusable
|
|
4860
|
-
if (!isFocusable(trigger)) {
|
|
4861
|
-
trigger.setAttribute('tabindex', '0');
|
|
4862
|
-
}
|
|
4863
|
-
};
|
|
4864
|
-
// Initialize a mutation observer for patching accessibility features
|
|
4865
|
-
const triggerObserver = getAttributeObserver(tooltipTargetAttribute, patchAccessibilityFeatures);
|
|
4866
4589
|
const PostTooltip = class {
|
|
4867
4590
|
constructor(hostRef) {
|
|
4868
4591
|
registerInstance(this, hostRef);
|
|
4592
|
+
this.wasOpenedByFocus = false;
|
|
4593
|
+
// Initialize a mutation observer for patching accessibility features
|
|
4594
|
+
this.triggerObserver = IS_BROWSER
|
|
4595
|
+
? getAttributeObserver(tooltipTargetAttribute, this.patchAccessibilityFeatures)
|
|
4596
|
+
: null;
|
|
4869
4597
|
this.placement = 'top';
|
|
4870
4598
|
this.arrow = true;
|
|
4871
4599
|
this.delayed = false;
|
|
4872
4600
|
}
|
|
4873
|
-
popoverRef;
|
|
4874
|
-
wasOpenedByFocus = false;
|
|
4875
|
-
get host() { return getElement(this); }
|
|
4876
4601
|
validateDelayed() {
|
|
4877
4602
|
checkEmptyOrType(this, 'delayed', 'boolean');
|
|
4878
4603
|
}
|
|
@@ -4899,9 +4624,9 @@ const PostTooltip = class {
|
|
|
4899
4624
|
document.addEventListener('focusout', globalInterestLostHandler);
|
|
4900
4625
|
document.addEventListener('long-press', globalInterestHandler);
|
|
4901
4626
|
// Initially run the accessibility patcher on all triggers
|
|
4902
|
-
document.querySelectorAll('[data-tooltip-target]').forEach(patchAccessibilityFeatures);
|
|
4627
|
+
document.querySelectorAll('[data-tooltip-target]').forEach(this.patchAccessibilityFeatures);
|
|
4903
4628
|
// Start watching for future triggers
|
|
4904
|
-
triggerObserver
|
|
4629
|
+
this.triggerObserver?.observe(document.body, {
|
|
4905
4630
|
subtree: true,
|
|
4906
4631
|
childList: true,
|
|
4907
4632
|
attributeFilter: [tooltipTargetAttribute],
|
|
@@ -4922,7 +4647,7 @@ const PostTooltip = class {
|
|
|
4922
4647
|
document.removeEventListener('focusin', globalInterestHandler);
|
|
4923
4648
|
document.removeEventListener('focusout', globalInterestLostHandler);
|
|
4924
4649
|
document.removeEventListener('long-press', globalInterestHandler);
|
|
4925
|
-
triggerObserver
|
|
4650
|
+
this.triggerObserver?.disconnect();
|
|
4926
4651
|
}
|
|
4927
4652
|
}
|
|
4928
4653
|
/**
|
|
@@ -4986,10 +4711,28 @@ const PostTooltip = class {
|
|
|
4986
4711
|
globalHideTooltip(this);
|
|
4987
4712
|
this.host.style.pointerEvents = 'auto';
|
|
4988
4713
|
}
|
|
4714
|
+
/**
|
|
4715
|
+
* Patch some accessibility features that are hard to remember or understand
|
|
4716
|
+
* @param {HTMLElement} trigger
|
|
4717
|
+
*/
|
|
4718
|
+
patchAccessibilityFeatures(trigger) {
|
|
4719
|
+
const describedBy = trigger.getAttribute('aria-describedby');
|
|
4720
|
+
const id = trigger.getAttribute(tooltipTargetAttribute);
|
|
4721
|
+
// Add tooltip to aria-describedby
|
|
4722
|
+
if (!describedBy?.includes(id)) {
|
|
4723
|
+
const newDescribedBy = describedBy ? `${describedBy} ${id}` : id;
|
|
4724
|
+
trigger.setAttribute('aria-describedby', newDescribedBy);
|
|
4725
|
+
}
|
|
4726
|
+
// Make element focusable
|
|
4727
|
+
if (!isFocusable(trigger)) {
|
|
4728
|
+
trigger.setAttribute('tabindex', '0');
|
|
4729
|
+
}
|
|
4730
|
+
}
|
|
4989
4731
|
render() {
|
|
4990
4732
|
const popoverClass = `${this.arrow ? ' has-arrow' : ''}`;
|
|
4991
|
-
return (h(Host, { key: '
|
|
4733
|
+
return (h(Host, { key: 'f6e535d23220c3b53840913882b7302d54cc6a89', "data-version": version$1, role: "tooltip", onPointerOver: this.handleInterest, onPointerOut: this.handleInterestLost, onFocusIn: this.handleInterest, onFocusOut: this.handleInterestLost }, h("post-popovercontainer", { key: '25aaaee555958fdacd3aa204b90d09ab14289b51', class: popoverClass, arrow: this.arrow, placement: this.placement, ref: (el) => (this.popoverRef = el) }, h("slot", { key: '81ae53f9ab5189253a256861b6df5a2cd31fe678' }))));
|
|
4992
4734
|
}
|
|
4735
|
+
get host() { return getElement(this); }
|
|
4993
4736
|
static get watchers() { return {
|
|
4994
4737
|
"delayed": ["validateDelayed"]
|
|
4995
4738
|
}; }
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export { P as post_tooltip } from './post-tooltip-
|
|
2
|
-
import './index-
|
|
3
|
-
import './
|
|
4
|
-
import './
|
|
1
|
+
export { P as post_tooltip } from './post-tooltip-f64bd0cc.js';
|
|
2
|
+
import './index-f4d19816.js';
|
|
3
|
+
import './attribute-observer-009deee5.js';
|
|
4
|
+
import './breakpoints-7812702e.js';
|
|
5
5
|
import './index-8f8fe5b0.js';
|
|
6
6
|
import './constants-8d548297.js';
|
|
7
7
|
import './check-one-of-0bee20f5.js';
|
|
8
8
|
import './check-type-37d5d307.js';
|
|
9
9
|
import './check-url-17962bc8.js';
|
|
10
|
+
import './package-8986a24c.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{P as PostAccordion}from"./p-
|
|
1
|
+
export{P as PostAccordion}from"./p-b003b381.js";export{P as PostAccordionItem}from"./p-ab4073be.js";export{P as PostAvatar}from"./p-49c5aa99.js";export{P as PostBackToTop}from"./p-3aa766a6.js";export{P as PostBanner}from"./p-9aaf9f54.js";export{P as PostBreadcrumb}from"./p-be37cf2a.js";export{P as PostBreadcrumbItem,a as PostMenuItem}from"./p-ccbb51fe.js";export{P as PostCardControl}from"./p-6ee81c5d.js";export{P as PostClosebutton,a as PostHeader,b as PostIcon,c as PostLanguageOption,d as PostLanguageSwitch,e as PostList,f as PostListItem,g as PostLogo,h as PostMainnavigation,i as PostMegadropdown,j as PostMegadropdownTrigger,k as PostMenu,l as PostMenuTrigger,m as PostPopovercontainer,n as PostTogglebutton}from"./p-3b0158b3.js";export{P as PostCollapsible,a as PostCollapsibleTrigger}from"./p-32173742.js";export{P as PostFooter}from"./p-5f54b77f.js";export{P as PostLinkarea}from"./p-338a2507.js";export{P as PostPopover}from"./p-f27e5691.js";export{P as PostRating}from"./p-58f453dd.js";export{P as PostTabs}from"./p-1038fc25.js";export{P as PostTabHeader}from"./p-c31b56ed.js";export{P as PostTabPanel}from"./p-60bb7f26.js";export{P as PostTag}from"./p-78b4c699.js";export{P as PostTooltip}from"./p-abd7eb91.js";import"./p-9e461613.js";import"./p-40db8cd5.js";import"./p-247a1668.js";import"./p-d45df336.js";import"./p-722ffaae.js";import"./p-0889c759.js";import"./p-e585c6fe.js";import"./p-440193f4.js";import"./p-7709c14a.js";import"./p-85fdc2d3.js";import"./p-5959f2bd.js";import"./p-181c73d5.js";import"./p-9b052461.js";import"./p-64e3de38.js";import"./p-6b31a76a.js";import"./p-0f398677.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as t}from"./p-722ffaae.js";function e(e,n){return t?new MutationObserver((function(t){t.forEach((t=>{"attributes"===t.type&&t.attributeName===e&&n(t.target),"childList"===t.type&&t.addedNodes.forEach((t=>{t.nodeType===Node.ELEMENT_NODE&&t.hasAttribute(e)&&n(t)}))}))})):null}export{e as g}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as a,H as i,g as e}from"./p-9e461613.js";import{v as o}from"./p-40db8cd5.js";import{f as r,a as h}from"./p-64e3de38.js";import"./p-722ffaae.js";const n=class{constructor(a){t(this,a),this.postChange=s(this,"postChange",7),this.isLoaded=!1,this.activePanel=void 0}get tabs(){return Array.from(this.host.querySelectorAll("post-tab-header")).filter((t=>t.closest("post-tabs")===this.host))}componentDidLoad(){this.moveMisplacedTabs(),this.enableTabs(),this.show(this.activePanel||this.tabs[0]?.panel),this.isLoaded=!0}async show(t){if(t===this.activeTab?.panel)return;const s=this.activeTab,a=this.host.querySelector(`post-tab-header[panel=${t}]`);this.activateTab(a),this.showing&&(this.showing.effect.target.style.display="none",this.showing.finish()),!s||this.showing||this.hiding||this.hidePanel(s.panel),this.hiding&&await this.hiding.finished,this.showSelectedPanel(),this.showing&&await this.showing.finished,this.isLoaded&&this.postChange.emit(this.activeTab.panel)}moveMisplacedTabs(){this.tabs&&this.tabs.forEach((t=>{"tabs"!==t.getAttribute("slot")&&t.setAttribute("slot","tabs")}))}enableTabs(){this.tabs&&(this.tabs.forEach((async t=>{if(await(s=t,"function"==typeof s.componentOnReady?s.componentOnReady():new Promise((t=>{return a=()=>{t(s)},"function"==typeof requestAnimationFrame?requestAnimationFrame(a):setTimeout(a);var a}))),t.getAttribute("aria-controls"))return;var s;const a=this.getPanel(t.panel);t.setAttribute("aria-controls",a.id),a.setAttribute("aria-labelledby",t.id),t.addEventListener("click",(()=>{this.show(t.panel)})),t.addEventListener("keydown",(s=>{"Enter"!==s.key&&" "!==s.key||(s.preventDefault(),this.show(t.panel))})),t.addEventListener("keydown",(s=>{"ArrowRight"!==s.key&&"ArrowLeft"!==s.key||this.navigateTabs(t,s.key)}))})),this.activeTab&&!this.activeTab.isConnected&&this.show(this.tabs[0]?.panel))}activateTab(t){this.activeTab&&(this.activeTab.setAttribute("aria-selected","false"),this.activeTab.setAttribute("tabindex","-1"),this.activeTab.classList.remove("active")),t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0"),t.classList.add("active"),this.activeTab=t}hidePanel(t){const s=this.getPanel(t);s&&(this.hiding=r(s),this.hiding.onfinish=()=>{s.style.display="none",this.hiding=null})}showSelectedPanel(){const t=this.getPanel(this.activeTab.panel);t.style.display="block",this.isLoaded&&(this.showing=h(t),this.showing.onfinish=()=>{this.showing=null})}getPanel(t){return this.host.querySelector(`post-tab-panel[name=${t}]`)}navigateTabs(t,s){const a=Array.from(this.tabs).indexOf(t);let i;i="ArrowRight"===s?this.tabs[a+1]||this.tabs[0]:this.tabs[a-1]||this.tabs[this.tabs.length-1],i&&i.focus()}render(){return a(i,{key:"dae24eee55a75f9b825f590883a9c1e896c1e9fc","data-version":o},a("div",{key:"0a26de80b8267ddc30455b0b5afbf10ae521232b",class:"tabs-wrapper",part:"tabs"},a("div",{key:"826cb0a4355eeb5ddc07288e1e68fc72785c095f",class:"tabs",role:"tablist"},a("slot",{key:"94ce90bc3dc8ff4b5012fcfa3c0039b188c14002",name:"tabs",onSlotchange:()=>this.enableTabs()}))),a("div",{key:"462f80f3368431344910cc317f1c0f42112dc99a",class:"tab-content",part:"content"},a("slot",{key:"57a80ac790ca75f3b62382994c21a3a3c78004cc",onSlotchange:()=>this.moveMisplacedTabs()})))}get host(){return e(this)}};n.style='.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}';export{n as P}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{P as post_collapsible,a as post_collapsible_trigger}from"./p-32173742.js";import"./p-9e461613.js";import"./p-40db8cd5.js";import"./p-722ffaae.js";import"./p-e585c6fe.js";import"./p-440193f4.js";import"./p-d45df336.js";import"./p-7709c14a.js";import"./p-85fdc2d3.js";import"./p-181c73d5.js";import"./p-0889c759.js";import"./p-6b31a76a.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{P as post_linkarea}from"./p-338a2507.js";import"./p-9e461613.js";import"./p-40db8cd5.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as i,H as e,g as o}from"./p-9e461613.js";import{v as a}from"./p-40db8cd5.js";import{I as r}from"./p-722ffaae.js";import{d as h}from"./p-e585c6fe.js";import{c}from"./p-7709c14a.js";import{c as l}from"./p-181c73d5.js";import{e as n}from"./p-0889c759.js";import{g as d}from"./p-6b31a76a.js";const p={height:"0",overflow:"hidden"},b={duration:350,easing:"ease",fill:"forwards"},g=class{constructor(i){t(this,i),this.postToggle=s(this,"postToggle",7),this.isLoaded=!1,this.isOpen=!0,this.collapsed=!1}collapsedChange(){h(this,"collapsed","boolean"),this.toggle(!this.collapsed)}componentDidLoad(){this.collapsedChange(),this.isLoaded=!0,this.updateTriggers()}async toggle(t=!this.isOpen){if(t===this.isOpen)return t;this.isOpen=t,this.collapsed=!t,this.isLoaded&&this.postToggle.emit(t);const s=t?(i=this.host).animate([p,{height:`${i.scrollHeight}px`,offset:1},{height:"auto",overflow:"visible"}],b):function(t){const s=r?window.getComputedStyle(t).height:`${t.scrollHeight}px`;return t.animate([{height:s},p],b)}(this.host);var i;return(!this.isLoaded||r&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)&&s.finish(),await s.finished,this.host.offsetParent&&s.commitStyles(),this.updateTriggers(),t}updateTriggers(){document.querySelectorAll(`post-collapsible-trigger[for="${this.host.id}"]`).forEach((t=>t.update()))}render(){return i(e,{key:"a678bc639dfd7686d8e1bd57ca0f09984a24ab61","data-version":a,tabindex:this.collapsed?-1:void 0},i("slot",{key:"e0b88ac152fa09314b4bc01c9abdb11480e2cb4d"}))}get host(){return o(this)}static get watchers(){return{collapsed:["collapsedChange"]}}};g.style=":host{display:block;position:relative;overflow:hidden}";const f=class{constructor(s){t(this,s),this.observer=new MutationObserver((()=>this.setTrigger())),this.for=void 0}validateAriaAttributes(){l(this,"for"),c(this,"for","string",'The post-collapsible-trigger "for" prop should be a id.')}connectedCallback(){this.root=d(this.host),this.root.addEventListener("postToggle",this.handlePostToggle),this.observer.observe(this.host,{childList:!0,subtree:!0})}componentDidLoad(){this.setTrigger(),this.trigger||console.warn("The post-collapsible-trigger must contain a button."),this.validateAriaAttributes()}disconnectedCallback(){this.observer.disconnect(),this.root.removeEventListener("postToggle",this.handlePostToggle)}async update(){this.updateAriaAttributes()}handlePostToggle(t){n(this.host,t,{targetLocalName:"post-collapsible"},(()=>{this.trigger&&this.trigger.setAttribute("aria-expanded",`${t.detail}`)}))}updateAriaAttributes(){if(!this.trigger)return;const t=this.trigger.getAttribute("aria-controls");t?.includes(this.for)||this.trigger.setAttribute("aria-controls",t?`${t} ${this.for}`:this.for);const s=this.collapsible?.collapsed;this.trigger.setAttribute("aria-expanded",`${void 0!==s?!s:void 0}`)}async toggleCollapsible(){await(this.collapsible?.toggle())}get collapsible(){const t=this.root.getElementById(this.for);return t&&"post-collapsible"===t.localName?t:null}setTrigger(){const t=this.host.querySelector("button");!t||this.trigger&&t.isEqualNode(this.trigger)||(this.trigger=t,this.trigger.addEventListener("click",(()=>this.toggleCollapsible())),this.updateAriaAttributes())}render(){return i(e,{key:"cd703fe34b8c82afc5956b58724d36b06054bc0b","data-version":a},i("slot",{key:"5abe4ba2b8922b941cc8aebbc7039e34e1853855"}))}get host(){return o(this)}static get watchers(){return{for:["validateAriaAttributes"]}}};export{g as P,f as a}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as t,H as s,g as a}from"./p-9e461613.js";import{v as r}from"./p-40db8cd5.js";const n=["a"].join(","),o=`:where(${n})`,i=class{constructor(t){e(this,t)}dispatchClick({ctrlKey:e,shiftKey:t,altKey:s,metaKey:a}){const r=this.host.querySelector(`[data-link]${o}`)??this.host.querySelector(o);if(!r)throw new Error(`The \`post-linkarea\` component must contain an interactive element. Possible elements are: ${n}.`);r.dispatchEvent(new MouseEvent("click",{ctrlKey:e,shiftKey:t,altKey:s,metaKey:a}))}render(){return t(s,{key:"56e4b032fa8976cc120bff5f1c36d55167e54e98","data-version":r,onClick:e=>this.dispatchClick(e),tabindex:"0"},t("slot",{key:"25568fab2a47d765757c00fbee4f2999c1da16d1"}))}get host(){return a(this)}};i.style=":host{display:contents;cursor:pointer}";export{i as P}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{P as post_tabs}from"./p-1038fc25.js";import"./p-9e461613.js";import"./p-40db8cd5.js";import"./p-64e3de38.js";import"./p-722ffaae.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as o,H as e,g as i}from"./p-9e461613.js";import{s,a}from"./p-9b052461.js";import{v as r}from"./p-40db8cd5.js";import{c}from"./p-7709c14a.js";import{c as n}from"./p-181c73d5.js";import"./p-722ffaae.js";const h=class{constructor(o){t(this,o),this.handleScroll=()=>{this.belowFold=this.isBelowFold()},this.label=void 0,this.belowFold=!1}isBelowFold(){return window.scrollY>window.innerHeight}watchBelowFold(t){t?s(this.host,this.translateY):a(this.host,this.translateY)}scrollToTop(){window.scrollTo({top:0,behavior:"smooth"})}getSecondPixelValue(t){for(const o of t){const t=o.match(/\b\d+px\b/g);if(t&&t.length>1)return t[1]}}animateButton(){const t=window.getComputedStyle(this.host).getPropertyValue("top"),o=this.host.shadowRoot.querySelector("button"),e=getComputedStyle(o).getPropertyValue("--post-back-to-top-elevation").split(","),i=this.getSecondPixelValue(e);this.translateY=String(-1-parseFloat(t.replace("px",""))-parseFloat(i.replace("px","")))+"px",this.belowFold&&s(this.host,this.translateY),this.belowFold||(this.host.style.transform=`translateY(${this.translateY})`)}validateLabel(){n(this,"label"),c(this,"label","string")}componentWillLoad(){this.belowFold=this.isBelowFold()}componentDidLoad(){window.addEventListener("scroll",this.handleScroll,!1),this.animateButton(),this.validateLabel()}disconnectedCallback(){window.removeEventListener("scroll",this.handleScroll)}render(){return o(e,{key:"c1ab6c5e7619ad829d64aea16c59a923310cf091","data-version":r},o("button",{key:"99e10e4d16c8d82521b001c3b3d902d8ba47ee92",class:"back-to-top","aria-hidden":this.belowFold?"false":"true",tabindex:this.belowFold?"0":"-1",onClick:this.scrollToTop},o("post-icon",{key:"5a6a1b472b45fcc466127ece7091617e4700ee16","aria-hidden":"true",name:"3026"}),o("span",{key:"c8502e4822347d48034f6a936203e3314c7ae91e",class:"visually-hidden"},this.label)))}get host(){return i(this)}static get watchers(){return{belowFold:["watchBelowFold"],label:["validateLabel"]}}};h.style=":host{--post-floating-button-position-top:var(--post-device-position-4);--post-back-to-top-position-top:calc( var(--post-header-height) + var(--post-floating-button-position-top) );--post-back-to-top-elevation:var(--post-device-elevation-300);position:fixed;inset-block-start:var(--post-back-to-top-position-top);inset-inline-end:var(--post-device-position-1)}:host .back-to-top{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;box-shadow:var(--post-back-to-top-elevation);cursor:pointer;border-radius:var(--post-device-border-radius-round);width:var(--post-device-sizing-interactive-button-height-2);height:var(--post-device-sizing-interactive-button-height-2);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-button-secondary-enabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-enabled-bg);display:flex;align-items:center;justify-content:center}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top{background-color:ButtonFace !important}:host .back-to-top:hover{background-color:Highlight !important}}:host .back-to-top{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host .back-to-top:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host .back-to-top:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}:host .back-to-top:hover{border-color:var(--post-scheme-color-interactive-button-secondary-hover-stroke);color:var(--post-scheme-color-interactive-button-secondary-hover-fg);background-color:var(--post-scheme-color-interactive-button-secondary-hover-bg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:hover{color:HighlightText !important}}:host .back-to-top post-icon{height:var(--post-device-sizing-interactive-button-icon-3);width:var(--post-device-sizing-interactive-button-icon-3)}:host .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}";export{h as P}
|