@swisspost/design-system-components 9.0.0-next.8 → 9.0.0
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/index-e1f32cce.js +16 -36
- package/dist/cjs/index.cjs.js +23 -44
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-a2b895fc.js → package-3ed88bb9.js} +1 -1
- package/dist/cjs/{post-accordion-3ce01432.js → post-accordion-9ef382e8.js} +2 -2
- package/dist/cjs/post-accordion-item-5f685bee.js +52 -0
- package/dist/cjs/post-accordion-item.cjs.entry.js +2 -2
- package/dist/cjs/post-accordion.cjs.entry.js +2 -2
- package/dist/cjs/post-alert-88adc668.js +99 -0
- package/dist/cjs/{post-banner.cjs.entry.js → post-alert.cjs.entry.js} +3 -3
- package/dist/cjs/post-card-control-c6e5c427.js +272 -0
- package/dist/cjs/post-card-control.cjs.entry.js +2 -2
- package/dist/cjs/{post-collapsible-trigger-8ca4d85b.js → post-collapsible-trigger-1764e6dc.js} +12 -7
- package/dist/cjs/post-collapsible_2.cjs.entry.js +2 -3
- package/dist/cjs/post-components.cjs.js +1 -1
- package/dist/cjs/post-icon-f735da00.js +139 -0
- package/dist/cjs/{post-language-option.cjs.entry.js → post-icon.cjs.entry.js} +4 -3
- package/dist/cjs/post-logo-2cd8ae98.js +39 -0
- package/dist/cjs/{post-breadcrumb-item.cjs.entry.js → post-logo.cjs.entry.js} +3 -3
- package/dist/cjs/post-popover-36c854a4.js +131 -0
- package/dist/cjs/post-popover.cjs.entry.js +2 -3
- package/dist/cjs/{post-megadropdown-trigger-7376d867.js → post-popovercontainer-cb4793c1.js} +142 -545
- package/dist/cjs/post-popovercontainer.cjs.entry.js +11 -0
- package/dist/cjs/post-rating-d5073d8d.js +88 -0
- package/dist/cjs/post-rating.cjs.entry.js +2 -2
- package/dist/cjs/post-tab-header-b756d9b1.js +32 -0
- package/dist/cjs/post-tab-header.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-panel-34aed8e6.js → post-tab-panel-97b79ecd.js} +2 -2
- package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/{post-tabs-dd2da5d2.js → post-tabs-834497f2.js} +8 -6
- package/dist/cjs/post-tabs.cjs.entry.js +2 -2
- package/dist/cjs/post-tag-c70fb945.js +47 -0
- package/dist/cjs/post-tag.cjs.entry.js +2 -2
- package/dist/cjs/post-tooltip-20ebe011.js +69 -0
- package/dist/cjs/{post-tooltip-3e0c1509.js → post-tooltip-trigger-6f4c9748.js} +506 -556
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +12 -0
- package/dist/cjs/post-tooltip.cjs.entry.js +2 -6
- package/dist/collection/collection-manifest.json +3 -17
- package/dist/collection/components/post-accordion/post-accordion.css +1 -1
- package/dist/collection/components/post-accordion/post-accordion.js +2 -2
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +8 -19
- package/dist/collection/components/post-alert/alert-types.js +1 -0
- package/dist/collection/components/post-alert/post-alert.css +35 -0
- package/dist/collection/components/{post-banner/post-banner.js → post-alert/post-alert.js} +68 -39
- package/dist/collection/components/post-card-control/post-card-control.css +30 -2
- package/dist/collection/components/post-card-control/post-card-control.js +8 -8
- package/dist/collection/components/post-collapsible/post-collapsible.js +2 -4
- package/dist/collection/components/post-icon/post-icon.css +1 -1
- package/dist/collection/components/post-icon/post-icon.js +52 -13
- package/dist/collection/components/post-logo/post-logo.js +1 -1
- package/dist/collection/components/post-popover/post-popover.css +30 -2
- package/dist/collection/components/post-popover/post-popover.js +10 -6
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +31 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +180 -52
- package/dist/collection/components/post-rating/post-rating.css +29 -1
- package/dist/collection/components/post-rating/post-rating.js +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.css +29 -1
- package/dist/collection/components/post-tab-header/post-tab-header.js +1 -1
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +1 -1
- package/dist/collection/components/post-tabs/post-tabs.css +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +6 -4
- package/dist/collection/components/post-tag/post-tag.css +29 -1
- package/dist/collection/components/post-tag/post-tag.js +2 -2
- package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +60 -213
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.css +1 -0
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +230 -0
- package/dist/collection/index.js +2 -16
- package/dist/components/index.js +2 -16
- package/dist/components/index2.js +1 -1
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +10 -27
- package/dist/components/post-accordion2.js +1 -1
- package/dist/components/{post-menu.d.ts → post-alert.d.ts} +4 -4
- package/dist/components/post-alert.js +6 -0
- package/dist/components/post-alert2.js +136 -0
- package/dist/components/post-card-control2.js +3 -3
- package/dist/components/post-collapsible-trigger2.js +8 -1
- package/dist/components/post-collapsible2.js +3 -5
- package/dist/components/post-icon2.js +54 -15
- package/dist/components/post-logo2.js +2 -2
- package/dist/components/post-popover2.js +35 -8
- package/dist/components/post-popovercontainer2.js +136 -41
- package/dist/components/post-rating2.js +2 -2
- package/dist/components/post-tab-header2.js +2 -2
- package/dist/components/post-tab-panel2.js +1 -1
- package/dist/components/post-tabs2.js +7 -5
- package/dist/components/post-tag2.js +2 -2
- package/dist/components/{post-banner.d.ts → post-tooltip-trigger.d.ts} +4 -4
- package/dist/components/post-tooltip-trigger.js +6 -0
- package/dist/components/post-tooltip-trigger2.js +4968 -0
- package/dist/components/post-tooltip2.js +32 -4962
- package/dist/docs.json +290 -1288
- package/dist/esm/{index-f8a00dc0.js → index-69587a51.js} +1 -1
- package/dist/esm/index-e1b64755.js +16 -36
- package/dist/esm/index.js +19 -26
- package/dist/esm/loader.js +1 -1
- package/dist/esm/package-983f957d.js +3 -0
- package/dist/esm/{post-accordion-19e88941.js → post-accordion-ad570427.js} +2 -2
- package/dist/esm/post-accordion-item-4db0aa2a.js +50 -0
- package/dist/esm/post-accordion-item.entry.js +3 -3
- package/dist/esm/post-accordion.entry.js +2 -2
- package/dist/esm/post-alert-1e9fbdfa.js +97 -0
- package/dist/esm/{post-banner.entry.js → post-alert.entry.js} +3 -3
- package/dist/esm/post-card-control-ccb189a8.js +270 -0
- package/dist/esm/post-card-control.entry.js +2 -2
- package/dist/esm/{post-collapsible-trigger-1d939eb6.js → post-collapsible-trigger-45fe328a.js} +12 -7
- package/dist/esm/post-collapsible_2.entry.js +3 -4
- package/dist/esm/post-components.js +1 -1
- package/dist/esm/post-icon-3fc4dd7d.js +137 -0
- package/dist/esm/post-icon.entry.js +8 -0
- package/dist/esm/post-logo-e6cdea13.js +37 -0
- package/dist/esm/post-logo.entry.js +7 -0
- package/dist/esm/post-popover-afdf4906.js +129 -0
- package/dist/esm/post-popover.entry.js +2 -3
- package/dist/esm/{post-megadropdown-trigger-210b4ab3.js → post-popovercontainer-b19b7606.js} +144 -538
- package/dist/esm/post-popovercontainer.entry.js +3 -0
- package/dist/esm/post-rating-f60024fa.js +86 -0
- package/dist/esm/post-rating.entry.js +2 -2
- package/dist/esm/post-tab-header-333e15d5.js +30 -0
- package/dist/esm/post-tab-header.entry.js +2 -2
- package/dist/esm/{post-tab-panel-afce8d40.js → post-tab-panel-0ddb05a2.js} +2 -2
- package/dist/esm/post-tab-panel.entry.js +2 -2
- package/dist/esm/{post-tabs-fbb42496.js → post-tabs-ab7853cf.js} +8 -6
- package/dist/esm/post-tabs.entry.js +2 -2
- package/dist/esm/post-tag-4a7d14b9.js +45 -0
- package/dist/esm/post-tag.entry.js +2 -2
- package/dist/esm/post-tooltip-c03cd719.js +67 -0
- package/dist/esm/{post-tooltip-7101ed24.js → post-tooltip-trigger-1fefc8ad.js} +506 -556
- package/dist/esm/post-tooltip-trigger.entry.js +4 -0
- package/dist/esm/post-tooltip.entry.js +2 -6
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-0a45da5e.entry.js +1 -0
- package/dist/post-components/p-12e82863.entry.js +1 -0
- package/dist/post-components/p-1386b77d.js +1 -0
- package/dist/post-components/p-1528b798.js +1 -0
- package/dist/post-components/p-18dc1299.entry.js +1 -0
- package/dist/post-components/p-1a8f6c84.entry.js +1 -0
- package/dist/post-components/p-256453ca.js +1 -0
- package/dist/post-components/p-3272ebad.js +1 -0
- package/dist/post-components/p-3596035e.js +1 -0
- package/dist/post-components/p-3668f4fa.entry.js +1 -0
- package/dist/post-components/p-375845d4.js +1 -0
- package/dist/post-components/p-381de59d.entry.js +1 -0
- package/dist/post-components/p-4e68c514.js +1 -0
- package/dist/post-components/p-4eb5d9a1.entry.js +1 -0
- package/dist/post-components/p-61a7d216.js +1 -0
- package/dist/post-components/{p-0338f9da.js → p-788e64fb.js} +1 -1
- package/dist/post-components/p-7d5b41d1.js +1 -0
- package/dist/post-components/p-82ea24e7.js +1 -0
- package/dist/post-components/p-85c4d04f.js +1 -0
- package/dist/post-components/p-85c6d001.entry.js +1 -0
- package/dist/post-components/p-8e555dda.js +15 -0
- package/dist/post-components/p-962a6f36.entry.js +1 -0
- package/dist/post-components/p-a76c71bc.js +1 -0
- package/dist/post-components/p-a7e8fd41.entry.js +1 -0
- package/dist/post-components/p-ac216bd0.entry.js +1 -0
- package/dist/post-components/p-b17ecbee.entry.js +1 -0
- package/dist/post-components/p-bb4227ad.entry.js +1 -0
- package/dist/post-components/p-bc294d0b.js +1 -0
- package/dist/post-components/p-d0b3c5d3.entry.js +1 -0
- package/dist/post-components/p-d4e148d8.entry.js +1 -0
- package/dist/post-components/p-d9809281.js +1 -0
- package/dist/post-components/p-eb1e7a49.js +1 -0
- package/dist/post-components/p-f35291d5.entry.js +1 -0
- package/dist/post-components/p-fc3bfe08.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-accordion/post-accordion.d.ts +1 -1
- package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +1 -5
- package/dist/types/components/post-alert/alert-types.d.ts +2 -0
- package/dist/types/components/post-alert/post-alert.d.ts +54 -0
- package/dist/types/components/post-card-control/post-card-control.d.ts +7 -7
- package/dist/types/components/post-icon/post-icon.d.ts +1 -1
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +31 -13
- package/dist/types/components/post-tag/post-tag.d.ts +1 -1
- package/dist/types/components/post-tooltip/post-tooltip.d.ts +20 -34
- package/dist/types/components/post-tooltip-trigger/post-tooltip-trigger.d.ts +47 -0
- package/dist/types/components.d.ts +124 -490
- package/dist/types/index.d.ts +2 -16
- package/loaders/index.d.ts +4 -32
- package/loaders/index.js +4 -18
- package/loaders/index2.js +1 -1
- package/loaders/package.js +1 -1
- package/loaders/post-accordion-item.js +11 -28
- package/loaders/post-accordion.js +1 -1
- package/loaders/{post-menu.d.ts → post-alert.d.ts} +4 -4
- package/loaders/post-alert.js +139 -0
- package/loaders/post-card-control.js +3 -3
- package/loaders/post-collapsible-trigger2.js +8 -1
- package/loaders/post-collapsible2.js +3 -5
- package/loaders/post-icon2.js +54 -15
- package/loaders/post-logo.js +2 -2
- package/loaders/post-popover.js +35 -8
- package/loaders/post-popovercontainer2.js +136 -41
- package/loaders/post-rating.js +2 -2
- package/loaders/post-tab-header.js +2 -2
- package/loaders/post-tab-panel.js +1 -1
- package/loaders/post-tabs.js +7 -5
- package/loaders/post-tag.js +2 -2
- package/loaders/{post-avatar.d.ts → post-tooltip-trigger.d.ts} +4 -4
- package/loaders/post-tooltip-trigger.js +4971 -0
- package/loaders/post-tooltip.js +32 -4962
- package/package.json +5 -7
- package/dist/cjs/attribute-observer-10f08c04.js +0 -27
- package/dist/cjs/get-root-7a3498ef.js +0 -11
- package/dist/cjs/post-accordion-item-81601b1e.js +0 -62
- package/dist/cjs/post-avatar-b1c97f51.js +0 -148
- package/dist/cjs/post-avatar.cjs.entry.js +0 -13
- package/dist/cjs/post-back-to-top-0ce98569.js +0 -98
- package/dist/cjs/post-back-to-top.cjs.entry.js +0 -14
- package/dist/cjs/post-banner-8611eab5.js +0 -90
- package/dist/cjs/post-breadcrumb-item-2075462a.js +0 -49
- package/dist/cjs/post-card-control-acd30573.js +0 -272
- package/dist/cjs/post-closebutton_10.cjs.entry.js +0 -25
- package/dist/cjs/post-language-option-cf32d0ed.js +0 -68
- package/dist/cjs/post-menu-a3b7b63b.js +0 -176
- package/dist/cjs/post-menu-item-28ab1a72.js +0 -20
- package/dist/cjs/post-menu-item.cjs.entry.js +0 -11
- package/dist/cjs/post-menu-trigger-821839f5.js +0 -75
- package/dist/cjs/post-menu-trigger.cjs.entry.js +0 -13
- package/dist/cjs/post-menu.cjs.entry.js +0 -11
- package/dist/cjs/post-popover-c4f50134.js +0 -104
- package/dist/cjs/post-rating-3a87ca46.js +0 -88
- package/dist/cjs/post-tab-header-5fdb05a1.js +0 -32
- package/dist/cjs/post-tag-59232922.js +0 -47
- package/dist/cjs/post-togglebutton-59c6357b.js +0 -28
- package/dist/cjs/post-togglebutton.cjs.entry.js +0 -11
- package/dist/collection/animations/slide.js +0 -23
- package/dist/collection/components/post-avatar/post-avatar.css +0 -3
- package/dist/collection/components/post-avatar/post-avatar.js +0 -237
- package/dist/collection/components/post-back-to-top/post-back-to-top.css +0 -1
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +0 -107
- package/dist/collection/components/post-banner/banner-types.js +0 -1
- package/dist/collection/components/post-banner/post-banner.css +0 -3
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +0 -1
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +0 -83
- package/dist/collection/components/post-closebutton/post-closebutton.js +0 -12
- package/dist/collection/components/post-header/post-header.css +0 -1
- package/dist/collection/components/post-header/post-header.js +0 -103
- package/dist/collection/components/post-language-option/post-language-option.css +0 -3
- package/dist/collection/components/post-language-option/post-language-option.js +0 -191
- package/dist/collection/components/post-list/post-list.css +0 -3
- package/dist/collection/components/post-list/post-list.js +0 -87
- package/dist/collection/components/post-list-item/post-list-item.css +0 -1
- package/dist/collection/components/post-list-item/post-list-item.js +0 -25
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +0 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +0 -61
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +0 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +0 -137
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +0 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +0 -48
- package/dist/collection/components/post-menu/post-menu.css +0 -3
- package/dist/collection/components/post-menu/post-menu.js +0 -278
- package/dist/collection/components/post-menu-item/post-menu-item.css +0 -1
- package/dist/collection/components/post-menu-item/post-menu-item.js +0 -20
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.css +0 -1
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +0 -104
- package/dist/collection/components/post-togglebutton/post-togglebutton.css +0 -1
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +0 -56
- package/dist/collection/utils/is-focusable.js +0 -26
- package/dist/components/attribute-observer.js +0 -25
- package/dist/components/get-root.js +0 -9
- package/dist/components/post-avatar.d.ts +0 -11
- package/dist/components/post-avatar.js +0 -6
- package/dist/components/post-avatar2.js +0 -173
- package/dist/components/post-back-to-top.d.ts +0 -11
- package/dist/components/post-back-to-top.js +0 -6
- package/dist/components/post-back-to-top2.js +0 -123
- package/dist/components/post-banner.js +0 -6
- package/dist/components/post-banner2.js +0 -125
- package/dist/components/post-breadcrumb-item.d.ts +0 -11
- package/dist/components/post-breadcrumb-item.js +0 -6
- package/dist/components/post-breadcrumb-item2.js +0 -72
- package/dist/components/post-closebutton.d.ts +0 -11
- package/dist/components/post-closebutton.js +0 -6
- package/dist/components/post-closebutton2.js +0 -34
- package/dist/components/post-header.d.ts +0 -11
- package/dist/components/post-header.js +0 -6
- package/dist/components/post-header2.js +0 -235
- package/dist/components/post-language-option.d.ts +0 -11
- package/dist/components/post-language-option.js +0 -6
- package/dist/components/post-language-option2.js +0 -92
- package/dist/components/post-list-item.d.ts +0 -11
- package/dist/components/post-list-item.js +0 -6
- package/dist/components/post-list-item2.js +0 -35
- package/dist/components/post-list.d.ts +0 -11
- package/dist/components/post-list.js +0 -6
- package/dist/components/post-list2.js +0 -53
- package/dist/components/post-mainnavigation.d.ts +0 -11
- package/dist/components/post-mainnavigation.js +0 -6
- package/dist/components/post-mainnavigation2.js +0 -48
- package/dist/components/post-megadropdown-trigger.d.ts +0 -11
- package/dist/components/post-megadropdown-trigger.js +0 -6
- package/dist/components/post-megadropdown-trigger2.js +0 -39
- package/dist/components/post-megadropdown.d.ts +0 -11
- package/dist/components/post-megadropdown.js +0 -6
- package/dist/components/post-megadropdown2.js +0 -67
- package/dist/components/post-menu-item.d.ts +0 -11
- package/dist/components/post-menu-item.js +0 -6
- package/dist/components/post-menu-item2.js +0 -33
- package/dist/components/post-menu-trigger.d.ts +0 -11
- package/dist/components/post-menu-trigger.js +0 -6
- package/dist/components/post-menu-trigger2.js +0 -92
- package/dist/components/post-menu.js +0 -6
- package/dist/components/post-menu2.js +0 -201
- package/dist/components/post-togglebutton.d.ts +0 -11
- package/dist/components/post-togglebutton.js +0 -6
- package/dist/components/post-togglebutton2.js +0 -43
- package/dist/esm/attribute-observer-37fa950a.js +0 -25
- package/dist/esm/get-root-7af2e0d1.js +0 -9
- package/dist/esm/package-9cafe148.js +0 -3
- package/dist/esm/post-accordion-item-33bbe4de.js +0 -60
- package/dist/esm/post-avatar-d15a9f9e.js +0 -146
- package/dist/esm/post-avatar.entry.js +0 -5
- package/dist/esm/post-back-to-top-bcf46150.js +0 -96
- package/dist/esm/post-back-to-top.entry.js +0 -6
- package/dist/esm/post-banner-bf5e6a18.js +0 -88
- package/dist/esm/post-breadcrumb-item-e3b41f74.js +0 -47
- package/dist/esm/post-breadcrumb-item.entry.js +0 -7
- package/dist/esm/post-card-control-f0788f6f.js +0 -270
- package/dist/esm/post-closebutton_10.entry.js +0 -8
- package/dist/esm/post-language-option-1436370d.js +0 -66
- package/dist/esm/post-language-option.entry.js +0 -7
- package/dist/esm/post-menu-e853e28b.js +0 -174
- package/dist/esm/post-menu-item-86d4c7ab.js +0 -18
- package/dist/esm/post-menu-item.entry.js +0 -3
- package/dist/esm/post-menu-trigger-80c2bdf4.js +0 -73
- package/dist/esm/post-menu-trigger.entry.js +0 -5
- package/dist/esm/post-menu.entry.js +0 -3
- package/dist/esm/post-popover-7195d05a.js +0 -102
- package/dist/esm/post-rating-8baf86fe.js +0 -86
- package/dist/esm/post-tab-header-a1d1d9d0.js +0 -30
- package/dist/esm/post-tag-d67b6a19.js +0 -45
- package/dist/esm/post-togglebutton-c3fb912d.js +0 -26
- package/dist/esm/post-togglebutton.entry.js +0 -3
- package/dist/post-components/p-00fa0152.js +0 -1
- package/dist/post-components/p-1667387e.entry.js +0 -1
- package/dist/post-components/p-19551c18.entry.js +0 -1
- package/dist/post-components/p-1b627f80.js +0 -1
- package/dist/post-components/p-24673919.js +0 -1
- package/dist/post-components/p-266b734f.entry.js +0 -1
- package/dist/post-components/p-282115c4.js +0 -1
- package/dist/post-components/p-2d0ffc1e.entry.js +0 -1
- package/dist/post-components/p-45018d7e.entry.js +0 -1
- package/dist/post-components/p-485dafcf.js +0 -1
- package/dist/post-components/p-4a647a78.js +0 -1
- package/dist/post-components/p-4abfa65b.js +0 -1
- package/dist/post-components/p-517f2b1f.entry.js +0 -1
- package/dist/post-components/p-55224ee7.entry.js +0 -1
- package/dist/post-components/p-558a9849.js +0 -1
- package/dist/post-components/p-59b31557.js +0 -1
- package/dist/post-components/p-5d1db85c.entry.js +0 -1
- package/dist/post-components/p-61e79941.js +0 -1
- package/dist/post-components/p-679978de.entry.js +0 -1
- package/dist/post-components/p-6a842b96.entry.js +0 -1
- package/dist/post-components/p-6adeaa6c.js +0 -1
- package/dist/post-components/p-6cea23cd.js +0 -15
- package/dist/post-components/p-71f03424.js +0 -1
- package/dist/post-components/p-8c2568c1.entry.js +0 -1
- package/dist/post-components/p-8fd3a3cb.entry.js +0 -1
- package/dist/post-components/p-939f2ba7.js +0 -1
- package/dist/post-components/p-a4c39296.entry.js +0 -1
- package/dist/post-components/p-af5d3b89.entry.js +0 -1
- package/dist/post-components/p-b4423249.entry.js +0 -1
- package/dist/post-components/p-c31a7d65.entry.js +0 -1
- package/dist/post-components/p-c544bb82.js +0 -1
- package/dist/post-components/p-ccb6dfa1.js +0 -1
- package/dist/post-components/p-d0b8820a.js +0 -1
- package/dist/post-components/p-d36adfb5.js +0 -1
- package/dist/post-components/p-da6a8268.entry.js +0 -1
- package/dist/post-components/p-ece14d88.js +0 -1
- package/dist/post-components/p-f0f8427e.js +0 -1
- package/dist/post-components/p-f2e1b4d8.js +0 -1
- package/dist/post-components/p-f627744e.js +0 -1
- package/dist/post-components/p-f7b6b96a.entry.js +0 -1
- package/dist/post-components/p-f812e93d.entry.js +0 -1
- package/dist/post-components/p-f8d41c32.js +0 -1
- package/dist/post-components/p-fc91cbc2.js +0 -1
- package/dist/post-components/p-fe516cdf.entry.js +0 -1
- package/dist/post-components/p-fe7467fb.entry.js +0 -1
- package/dist/types/animations/slide.d.ts +0 -2
- package/dist/types/components/post-avatar/post-avatar.d.ts +0 -51
- package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +0 -19
- package/dist/types/components/post-banner/banner-types.d.ts +0 -2
- package/dist/types/components/post-banner/post-banner.d.ts +0 -49
- package/dist/types/components/post-breadcrumb-item/post-breadcrumb-item.d.ts +0 -15
- package/dist/types/components/post-closebutton/post-closebutton.d.ts +0 -7
- package/dist/types/components/post-header/post-header.d.ts +0 -16
- package/dist/types/components/post-language-option/post-language-option.d.ts +0 -40
- package/dist/types/components/post-list/post-list.d.ts +0 -24
- package/dist/types/components/post-list-item/post-list-item.d.ts +0 -8
- package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +0 -10
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +0 -23
- package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +0 -10
- package/dist/types/components/post-menu/post-menu.d.ts +0 -47
- package/dist/types/components/post-menu-item/post-menu-item.d.ts +0 -4
- package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +0 -27
- package/dist/types/components/post-togglebutton/post-togglebutton.d.ts +0 -13
- package/dist/types/utils/is-focusable.d.ts +0 -1
- package/loaders/attribute-observer.js +0 -25
- package/loaders/get-root.js +0 -9
- package/loaders/post-avatar.js +0 -176
- package/loaders/post-back-to-top.d.ts +0 -11
- package/loaders/post-back-to-top.js +0 -126
- package/loaders/post-banner.d.ts +0 -11
- package/loaders/post-banner.js +0 -128
- package/loaders/post-breadcrumb-item.d.ts +0 -11
- package/loaders/post-breadcrumb-item.js +0 -75
- package/loaders/post-closebutton.d.ts +0 -11
- package/loaders/post-closebutton.js +0 -37
- package/loaders/post-header.d.ts +0 -11
- package/loaders/post-header.js +0 -238
- package/loaders/post-language-option.d.ts +0 -11
- package/loaders/post-language-option.js +0 -95
- package/loaders/post-list-item.d.ts +0 -11
- package/loaders/post-list-item.js +0 -38
- package/loaders/post-list.d.ts +0 -11
- package/loaders/post-list.js +0 -56
- package/loaders/post-mainnavigation.d.ts +0 -11
- package/loaders/post-mainnavigation.js +0 -51
- package/loaders/post-megadropdown-trigger.d.ts +0 -11
- package/loaders/post-megadropdown-trigger.js +0 -42
- package/loaders/post-megadropdown.d.ts +0 -11
- package/loaders/post-megadropdown.js +0 -70
- package/loaders/post-menu-item.d.ts +0 -11
- package/loaders/post-menu-item.js +0 -36
- package/loaders/post-menu-trigger.d.ts +0 -11
- package/loaders/post-menu-trigger.js +0 -95
- package/loaders/post-menu.js +0 -204
- package/loaders/post-togglebutton.d.ts +0 -11
- package/loaders/post-togglebutton.js +0 -46
package/dist/cjs/{post-megadropdown-trigger-7376d867.js → post-popovercontainer-cb4793c1.js}
RENAMED
|
@@ -1,143 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index-e1f32cce.js');
|
|
4
|
-
const _package = require('./package-
|
|
5
|
-
const index$1 = require('./index-824d2b71.js');
|
|
6
|
-
const checkNonEmpty = require('./check-non-empty-eeaa8f77.js');
|
|
7
|
-
const checkType = require('./check-type-64af82a9.js');
|
|
8
|
-
|
|
9
|
-
const PostClosebutton = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
}
|
|
13
|
-
render() {
|
|
14
|
-
return (index.h(index.Host, { key: '4e03f31cdefe37e70ae44d8c7baaa71abf660db4', "data-version": _package.version }, index.h("button", { key: 'bcb645f50e587470fbdc6bee7b369c58aef403fd', class: "btn btn-icon-close" }, index.h("post-icon", { key: '5860a0b4c8a2cfd740cca788b22377e2e4bc9614', "aria-hidden": "true", name: "2043" }), index.h("span", { key: '4381a0a47c99703b0a6ca9f864b69437afff167f', class: "visually-hidden" }, index.h("slot", { key: '55a72682749ddac4716463c21f8bc31a89f285b9' })))));
|
|
15
|
-
}
|
|
16
|
-
get host() { return index.getElement(this); }
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const postIconCss = ":host{container-name:post-icon;container-type:inline-size;display:inline-block;width:1em;height:1em;vertical-align:-0.15em}svg{display:block;width:100%;height:100%;fill:currentColor;forced-color-adjust:preserve-parent-color}@container post-icon (max-width: 23.98px){svg{--pis-16: block}}@container post-icon (min-width: 24px) and (max-width: 31.98px){svg{--pis-24: block}}@container post-icon (min-width: 32px) and (max-width: 39.98px){svg{--pis-32: block}}@container post-icon (min-width: 40px) and (max-width: 47.98px){svg{--pis-40: block}}@container post-icon (min-width: 48px) and (max-width: 63.98px){svg{--pis-48: block}}@container post-icon (min-width: 64px){svg{--pis-64: block}}:host([flip-h]:not([flip-h=false])){scale:-1 1}:host([flip-v]:not([flip-v=false])){scale:1 -1}:host([flip-h][flip-v]:not([flip-h=false],[flip-v=false])){scale:-1}:host([animation]){transform-origin:center}:host([animation=cylon]){animation:icon-animation-cylon .75s ease-in-out infinite alternate}:host([animation=cylon-vertical]){animation:icon-animation-cylon-vertical .75s ease-in-out infinite alternate}:host([animation=spin]){animation:icon-animation-spin 2s linear infinite normal}:host([animation=spin-reverse]){animation:icon-animation-spin 2s linear infinite reverse}:host([animation=fade]){animation:icon-animation-fade .75s ease-in-out infinite alternate}:host([animation=throb]){animation:icon-animation-throb .75s ease-in-out infinite alternate}@keyframes icon-animation-cylon{from{transform:translateX(-25%)}to{transform:translateX(25%)}}@keyframes icon-animation-cylon-vertical{from{transform:translateY(25%)}to{transform:translateY(-25%)}}@keyframes icon-animation-fade{from{opacity:.1}to{opacity:1}}@keyframes icon-animation-spin{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes icon-animation-throb{from{opacity:.5;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}";
|
|
20
|
-
const PostIconStyle0 = postIconCss;
|
|
21
|
-
|
|
22
|
-
const CDN_URL = 'https://unpkg.com/@swisspost/design-system-icons/public/post-icons';
|
|
23
|
-
const ANIMATION_NAMES = [
|
|
24
|
-
'cylon',
|
|
25
|
-
'cylon-vertical',
|
|
26
|
-
'spin',
|
|
27
|
-
'spin-reverse',
|
|
28
|
-
'fade',
|
|
29
|
-
'throb',
|
|
30
|
-
];
|
|
31
|
-
const ANIMATION_KEYS = [...ANIMATION_NAMES];
|
|
32
|
-
const PostIcon = class {
|
|
33
|
-
constructor(hostRef) {
|
|
34
|
-
index.registerInstance(this, hostRef);
|
|
35
|
-
this.animation = null;
|
|
36
|
-
this.base = null;
|
|
37
|
-
this.flipH = false;
|
|
38
|
-
this.flipV = false;
|
|
39
|
-
this.name = undefined;
|
|
40
|
-
this.rotate = null;
|
|
41
|
-
this.scale = null;
|
|
42
|
-
}
|
|
43
|
-
validateAnimation(newValue = this.animation) {
|
|
44
|
-
if (newValue !== undefined)
|
|
45
|
-
index$1.checkEmptyOrOneOf(newValue, ANIMATION_KEYS, `The post-icon "animation" prop requires one of the following values: ${ANIMATION_KEYS.join(', ')}.`);
|
|
46
|
-
}
|
|
47
|
-
validateBase(newValue = this.base) {
|
|
48
|
-
index$1.checkEmptyOrType(newValue, 'string', 'The post-icon "base" prop should be a string.');
|
|
49
|
-
}
|
|
50
|
-
validateFlipH(newValue = this.flipH) {
|
|
51
|
-
index$1.checkEmptyOrType(newValue, 'boolean', 'The post-icon "flipH" prop should be a boolean.');
|
|
52
|
-
}
|
|
53
|
-
validateFlipV(newValue = this.flipV) {
|
|
54
|
-
index$1.checkEmptyOrType(newValue, 'boolean', 'The post-icon "flipV" prop should be a boolean.');
|
|
55
|
-
}
|
|
56
|
-
validateName(newValue = this.name) {
|
|
57
|
-
checkNonEmpty.checkNonEmpty(newValue, 'The post-icon "name" prop is required!.');
|
|
58
|
-
checkType.checkType(newValue, 'string', 'The post-icon "name" prop should be a string.');
|
|
59
|
-
}
|
|
60
|
-
validateRotate(newValue = this.rotate) {
|
|
61
|
-
index$1.checkEmptyOrType(newValue, 'number', 'The post-icon "rotate" prop should be a number.');
|
|
62
|
-
}
|
|
63
|
-
validateScale(newValue = this.scale) {
|
|
64
|
-
index$1.checkEmptyOrType(newValue, 'number', 'The post-icon "scale" prop should be a number.');
|
|
65
|
-
}
|
|
66
|
-
getPath() {
|
|
67
|
-
var _a, _b, _c, _d, _e, _f;
|
|
68
|
-
// Construct icon path from different possible sources
|
|
69
|
-
const metaBase = (_b = (_a = document.head
|
|
70
|
-
.querySelector('meta[name="design-system-settings"][data-post-icon-base]')) === null || _a === void 0 ? void 0 : _a.getAttribute('data-post-icon-base')) !== null && _b !== void 0 ? _b : null;
|
|
71
|
-
const baseHref = (_c = document.getElementsByTagName('base')[0]) === null || _c === void 0 ? void 0 : _c.href;
|
|
72
|
-
const fileBase = `${(_f = (_e = (_d = this.base) !== null && _d !== void 0 ? _d : metaBase) !== null && _e !== void 0 ? _e : baseHref) !== null && _f !== void 0 ? _f : CDN_URL}/`.replace(/\/\/$/, '/');
|
|
73
|
-
const fileName = `${this.name}.svg#i-${this.name}`;
|
|
74
|
-
const filePath = `${fileBase}${fileName}`;
|
|
75
|
-
return new URL(filePath, window.location.origin).toString();
|
|
76
|
-
}
|
|
77
|
-
getStyles() {
|
|
78
|
-
return Object.entries({
|
|
79
|
-
transform: (this.scale && !isNaN(Number(this.scale)) ? 'scale(' + this.scale + ')' : '') +
|
|
80
|
-
(this.rotate && !isNaN(Number(this.rotate)) ? ' rotate(' + this.rotate + 'deg)' : ''),
|
|
81
|
-
})
|
|
82
|
-
.filter(([_key, value]) => value !== null)
|
|
83
|
-
.reduce((styles, [key, value]) => Object.assign(styles, { [key]: value }), {});
|
|
84
|
-
}
|
|
85
|
-
componentDidLoad() {
|
|
86
|
-
this.validateBase();
|
|
87
|
-
this.validateName();
|
|
88
|
-
this.validateFlipH();
|
|
89
|
-
this.validateFlipV();
|
|
90
|
-
this.validateScale();
|
|
91
|
-
this.validateRotate();
|
|
92
|
-
this.validateAnimation();
|
|
93
|
-
}
|
|
94
|
-
render() {
|
|
95
|
-
return (index.h(index.Host, { key: '1a04eea6f1039329937a9f58d64778c272088018', "data-version": _package.version }, index.h("svg", { key: '843d95a54a58f839bfa1031d2aa834c70fbc6f9e', style: this.getStyles() }, index.h("use", { key: 'e93c6a6fd50ebd4757c92c1ee02f9c8cd65a65b7', href: this.getPath() }))));
|
|
96
|
-
}
|
|
97
|
-
get host() { return index.getElement(this); }
|
|
98
|
-
static get watchers() { return {
|
|
99
|
-
"animation": ["validateAnimation"],
|
|
100
|
-
"base": ["validateBase"],
|
|
101
|
-
"flipH": ["validateFlipH"],
|
|
102
|
-
"flipV": ["validateFlipV"],
|
|
103
|
-
"name": ["validateName"],
|
|
104
|
-
"rotate": ["validateRotate"],
|
|
105
|
-
"scale": ["validateScale"]
|
|
106
|
-
}; }
|
|
107
|
-
};
|
|
108
|
-
PostIcon.style = PostIconStyle0;
|
|
109
|
-
|
|
110
|
-
const postLogoCss = ":host,.logo{display:inline-block}:host,:host .logo>svg,.logo,.logo .logo>svg{height:100%}.description{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}";
|
|
111
|
-
const PostLogoStyle0 = postLogoCss;
|
|
112
|
-
|
|
113
|
-
const PostLogo = class {
|
|
114
|
-
constructor(hostRef) {
|
|
115
|
-
index.registerInstance(this, hostRef);
|
|
116
|
-
this.url = undefined;
|
|
117
|
-
}
|
|
118
|
-
validateUrl() {
|
|
119
|
-
index$1.checkEmptyOrUrl(this.url, 'The "url" property of the post-logo is invalid');
|
|
120
|
-
}
|
|
121
|
-
componentDidLoad() {
|
|
122
|
-
this.validateUrl();
|
|
123
|
-
this.checkDescription();
|
|
124
|
-
}
|
|
125
|
-
checkDescription() {
|
|
126
|
-
if (!this.host.textContent) {
|
|
127
|
-
console.warn('Be sure to add descriptive text in the post-logo to ensure good accessibility of the component.');
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
render() {
|
|
131
|
-
const logoLink = this.url && (typeof this.url === 'string' ? this.url : this.url.href);
|
|
132
|
-
const LogoTag = logoLink ? 'a' : 'span';
|
|
133
|
-
return (index.h(index.Host, { key: 'ec5f82baaa08c75a03808a6cda7a9971152a54d6', "data-version": _package.version, slot: "post-logo" }, index.h(LogoTag, Object.assign({ key: 'ce6aeff4dfab0612376e4c6aa14c74c438213b5d', class: "logo" }, (logoLink ? { href: logoLink } : {})), index.h("span", { key: 'fa6f8ecaf3c3a4a8e60a8c8e2171dbd25d585ede', class: "description" }, index.h("slot", { key: '2dcff76129e8e054e58244b2aa77a5b51e059b6b', onSlotchange: () => this.checkDescription() })), index.h("svg", { key: '468282e3c21fb6cfc97fccee64298abe43542da5', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 72 72", "aria-hidden": "true" }, index.h("g", { key: 'd3f4e0a6a7372991ccef5be9fad206cab2f553e7', id: "Logo" }, index.h("rect", { key: '3f17ddd240131ce23faf1e73a76ca4f702b029d7', fill: "#ffcc00", x: "0", y: "0", width: "72", height: "72" }), index.h("polygon", { key: '1b714023d9e587a57571fd86a9515701ec77f993', fill: "#ff0000", points: "34,32.3 34,19 19.7,19 19.7,29.1 10,29.1 10,42.9 19.7,42.9 19.7,53 34,53 34,39.7 30.6,39.7 30.6,49.8 23.1,49.8 23.1,39.7 13.4,39.7 13.4,32.3 23.1,32.3 23.1,22.2 30.6,22.2 30.6,32.3" }), index.h("path", { key: 'b4064875cbad1263ac2278613fdf5db8d1697c2a', d: "M53.56234,31.10526c0,2.41272-1.99154,4.29475-4.51723,4.29475H45.2v-8.3h3.84511C51.66802,27.1,53.56234,28.78889,53.56234,31.10526z M50.69666,19H36v34h9.2V42.9h5.49666c6.75131,0,11.9971-5.15137,11.9971-11.8057C62.69376,24.39136,57.35099,19,50.69666,19z" }))))));
|
|
134
|
-
}
|
|
135
|
-
get host() { return index.getElement(this); }
|
|
136
|
-
static get watchers() { return {
|
|
137
|
-
"url": ["validateUrl"]
|
|
138
|
-
}; }
|
|
139
|
-
};
|
|
140
|
-
PostLogo.style = PostLogoStyle0;
|
|
4
|
+
const _package = require('./package-3ed88bb9.js');
|
|
141
5
|
|
|
142
6
|
/**
|
|
143
7
|
* Custom positioning reference element.
|
|
@@ -1333,7 +1197,7 @@ function isOverflowElement(element) {
|
|
|
1333
1197
|
overflowX,
|
|
1334
1198
|
overflowY,
|
|
1335
1199
|
display
|
|
1336
|
-
} = getComputedStyle
|
|
1200
|
+
} = getComputedStyle(element);
|
|
1337
1201
|
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
|
|
1338
1202
|
}
|
|
1339
1203
|
function isTableElement(element) {
|
|
@@ -1350,7 +1214,7 @@ function isTopLayer(element) {
|
|
|
1350
1214
|
}
|
|
1351
1215
|
function isContainingBlock(elementOrCss) {
|
|
1352
1216
|
const webkit = isWebKit();
|
|
1353
|
-
const css = isElement(elementOrCss) ? getComputedStyle
|
|
1217
|
+
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
|
1354
1218
|
|
|
1355
1219
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1356
1220
|
return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
|
|
@@ -1374,7 +1238,7 @@ function isWebKit() {
|
|
|
1374
1238
|
function isLastTraversableNode(node) {
|
|
1375
1239
|
return ['html', 'body', '#document'].includes(getNodeName(node));
|
|
1376
1240
|
}
|
|
1377
|
-
function getComputedStyle
|
|
1241
|
+
function getComputedStyle(element) {
|
|
1378
1242
|
return getWindow(element).getComputedStyle(element);
|
|
1379
1243
|
}
|
|
1380
1244
|
function getNodeScroll(element) {
|
|
@@ -1432,7 +1296,7 @@ function getOverflowAncestors(node, list, traverseIframes) {
|
|
|
1432
1296
|
}
|
|
1433
1297
|
|
|
1434
1298
|
function getCssDimensions(element) {
|
|
1435
|
-
const css = getComputedStyle
|
|
1299
|
+
const css = getComputedStyle(element);
|
|
1436
1300
|
// In testing environments, the `width` and `height` properties are empty
|
|
1437
1301
|
// strings for SVG elements, returning NaN. Fallback to `0` in this case.
|
|
1438
1302
|
let width = parseFloat(css.width) || 0;
|
|
@@ -1537,7 +1401,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
1537
1401
|
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
1538
1402
|
const iframeScale = getScale(currentIFrame);
|
|
1539
1403
|
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
1540
|
-
const css = getComputedStyle
|
|
1404
|
+
const css = getComputedStyle(currentIFrame);
|
|
1541
1405
|
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
1542
1406
|
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
1543
1407
|
x *= iframeScale.x;
|
|
@@ -1617,7 +1481,7 @@ function getDocumentRect(element) {
|
|
|
1617
1481
|
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
1618
1482
|
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
1619
1483
|
const y = -scroll.scrollTop;
|
|
1620
|
-
if (getComputedStyle
|
|
1484
|
+
if (getComputedStyle(body).direction === 'rtl') {
|
|
1621
1485
|
x += max(html.clientWidth, body.clientWidth) - width;
|
|
1622
1486
|
}
|
|
1623
1487
|
return {
|
|
@@ -1693,7 +1557,7 @@ function hasFixedPositionAncestor(element, stopNode) {
|
|
|
1693
1557
|
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
|
|
1694
1558
|
return false;
|
|
1695
1559
|
}
|
|
1696
|
-
return getComputedStyle
|
|
1560
|
+
return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
|
|
1697
1561
|
}
|
|
1698
1562
|
|
|
1699
1563
|
// A "clipping ancestor" is an `overflow` element with the characteristic of
|
|
@@ -1706,12 +1570,12 @@ function getClippingElementAncestors(element, cache) {
|
|
|
1706
1570
|
}
|
|
1707
1571
|
let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
|
|
1708
1572
|
let currentContainingBlockComputedStyle = null;
|
|
1709
|
-
const elementIsFixed = getComputedStyle
|
|
1573
|
+
const elementIsFixed = getComputedStyle(element).position === 'fixed';
|
|
1710
1574
|
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
1711
1575
|
|
|
1712
1576
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1713
1577
|
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1714
|
-
const computedStyle = getComputedStyle
|
|
1578
|
+
const computedStyle = getComputedStyle(currentNode);
|
|
1715
1579
|
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
1716
1580
|
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
|
|
1717
1581
|
currentContainingBlockComputedStyle = null;
|
|
@@ -1802,11 +1666,11 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
1802
1666
|
}
|
|
1803
1667
|
|
|
1804
1668
|
function isStaticPositioned(element) {
|
|
1805
|
-
return getComputedStyle
|
|
1669
|
+
return getComputedStyle(element).position === 'static';
|
|
1806
1670
|
}
|
|
1807
1671
|
|
|
1808
1672
|
function getTrueOffsetParent(element, polyfill) {
|
|
1809
|
-
if (!isHTMLElement(element) || getComputedStyle
|
|
1673
|
+
if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
|
|
1810
1674
|
return null;
|
|
1811
1675
|
}
|
|
1812
1676
|
if (polyfill) {
|
|
@@ -1858,7 +1722,7 @@ const getElementRects = async function (data) {
|
|
|
1858
1722
|
};
|
|
1859
1723
|
|
|
1860
1724
|
function isRTL(element) {
|
|
1861
|
-
return getComputedStyle
|
|
1725
|
+
return getComputedStyle(element).direction === 'rtl';
|
|
1862
1726
|
}
|
|
1863
1727
|
|
|
1864
1728
|
const platform = {
|
|
@@ -2177,34 +2041,40 @@ const computePosition = (reference, floating, options) => {
|
|
|
2177
2041
|
}
|
|
2178
2042
|
`,E=null;function I(e){if(E===null)try{E=new CSSStyleSheet,E.replaceSync(C);}catch{E=!1;}if(E===!1){let t=document.createElement("style");t.textContent=C,e instanceof Document?e.head.prepend(t):e.prepend(t);}else e.adoptedStyleSheets=[E,...e.adoptedStyleSheets];}function K(){window.ToggleEvent=window.ToggleEvent||c;function e(n){return n?.includes(":popover-open")&&(n=n.replace(J,"$1.\\:popover-open")),n}f(Document.prototype,"querySelector",e),f(Document.prototype,"querySelectorAll",e),f(Element.prototype,"querySelector",e),f(Element.prototype,"querySelectorAll",e),f(Element.prototype,"matches",e),f(Element.prototype,"closest",e),f(DocumentFragment.prototype,"querySelectorAll",e),f(DocumentFragment.prototype,"querySelectorAll",e),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;let n=(this.getAttribute("popover")||"").toLowerCase();return n===""||n=="auto"?"auto":"manual"},set(n){this.setAttribute("popover",n);}},showPopover:{enumerable:!0,configurable:!0,value(){S(this);}},hidePopover:{enumerable:!0,configurable:!0,value(){m(this,!0,!0);}},togglePopover:{enumerable:!0,configurable:!0,value(n){h.get(this)==="showing"&&n===void 0||n===!1?m(this,!0,!0):(n===void 0||n===!0)&&S(this);}}});let t=Element.prototype.attachShadow;t&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(n){let s=t.call(this,n);return I(s),s}}});let o=HTMLElement.prototype.attachInternals;o&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){let n=o.call(this);return n.shadowRoot&&I(n.shadowRoot),n}}});let r=new WeakMap;function i(n){Object.defineProperties(n.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(s){if(s===null)this.removeAttribute("popovertarget"),r.delete(this);else if(s instanceof Element)this.setAttribute("popovertarget",""),r.set(this,s);else throw new TypeError("popoverTargetElement must be an element or null")},get(){if(this.localName!=="button"&&this.localName!=="input"||this.localName==="input"&&this.type!=="reset"&&this.type!=="image"&&this.type!=="button"||this.disabled||this.form&&this.type==="submit")return null;let s=r.get(this);if(s&&s.isConnected)return s;if(s&&!s.isConnected)return r.delete(this),null;let u=v(this),w=this.getAttribute("popovertarget");return (u instanceof Document||u instanceof B)&&w&&u.getElementById(w)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){let s=(this.getAttribute("popovertargetaction")||"").toLowerCase();return s==="show"||s==="hide"?s:"toggle"},set(s){this.setAttribute("popovertargetaction",s);}}});}i(HTMLButtonElement),i(HTMLInputElement);let l=n=>{if(!n.isTrusted)return;let s=n.composedPath()[0];if(!(s instanceof Element)||s?.shadowRoot)return;let u=v(s);if(!(u instanceof B||u instanceof Document))return;let w=s.closest("[popovertargetaction],[popovertarget]");if(w){O(w),n.preventDefault();return}},a=n=>{let s=n.key,u=n.target;!n.defaultPrevented&&u&&(s==="Escape"||s==="Esc")&&T(u.ownerDocument,!0,!0);};(n=>{n.addEventListener("click",l),n.addEventListener("keydown",a),n.addEventListener("pointerdown",x),n.addEventListener("pointerup",x);})(document),I(document);}j()||K();})();
|
|
2179
2043
|
|
|
2180
|
-
const postPopovercontainerCss = "@layer polyfill{@supports not selector(:popover-open){[popover]:not(.\\:popover-open){display:none}}}:where(post-popovercontainer){box-shadow:.5px 3px 4px rgba(0,0,0,.1),2px 4px 10px 4px rgba(0,0,0,.12);
|
|
2044
|
+
const postPopovercontainerCss = "@keyframes popIn{from{transform:scale(0.9);opacity:0;transition-property:transform,opacity,overlay,display;transition-behavior:allow-discrete;transition-duration:var(--post-transition-duration, 0.35s);transition-timing-function:linear(0, 0.007, 0.029 2.2%, 0.118 4.7%, 0.625 14.4%, 0.826 19%, 0.902, 0.962, 1.008 26.1%, 1.041 28.7%, 1.064 32.1%, 1.07 36%, 1.061 40.5%, 1.015 53.4%, 0.999 61.6%, 0.995 71.2%, 1)}to{opacity:1;transform:scale(1)}}/*!\n * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n\n * The MIT License (MIT)\n\n * Copyright (c) 2011-2020 Twitter, Inc.\n * Copyright (c) 2011-2020 The Bootstrap Authors\n\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *//*!\n * Copyright 2021 by Swiss Post, Information Technology\n */@layer polyfill{@supports not selector(:popover-open){[popover]:not(.\\:popover-open){display:none}}}:where(post-popovercontainer){background-color:rgba(0,0,0,0);border:rgba(0,0,0,0);position:fixed;margin:0;padding:0;overflow:visible}:where(post-popovercontainer)>div{box-shadow:.5px 3px 4px rgba(0,0,0,.1),2px 4px 10px 4px rgba(0,0,0,.12);width:max-content;display:flex;align-items:center;max-width:100%;color:var(--post-contrast-color);background-color:rgb(var(--post-bg-rgb));border:2px solid rgba(0,0,0,0);border-radius:4px}:where(post-popovercontainer)>div.animate-pop-in{animation:popIn .25s ease-out forwards}:where(post-popovercontainer)[tooltip]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}:where(post-popovercontainer)[safe-space]::after{content:\"\";position:fixed;inset:0;z-index:-1;pointer-events:auto}:where(post-popovercontainer)[safe-space=triangle]::after{clip-path:polygon(var(--post-safe-space-cursor-x, 0) var(--post-safe-space-cursor-y, 0), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)))}:where(post-popovercontainer)[safe-space=trapezoid]::after{clip-path:polygon(var(--post-safe-space-trigger-x-start, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-start, 0)), var(--post-safe-space-trigger-x-end, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-end, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)))}:where(post-popovercontainer):has(.arrow)>div{filter:drop-shadow(1px 2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(2px 4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(4px 8px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.top)>div{filter:drop-shadow(0px -2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(0px -4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(0px -8px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.left)>div{filter:drop-shadow(-2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(-4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(-8px 0px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.right)>div{filter:drop-shadow(2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(8px 0px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer) .arrow{position:absolute;width:.5825rem;height:.5825rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1}:where(post-popovercontainer) .arrow.top{border-block-start:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.right{border-block-start:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.left{border-block-end:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.bottom{border-block-end:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0)}";
|
|
2181
2045
|
const PostPopovercontainerStyle0 = postPopovercontainerCss;
|
|
2182
2046
|
|
|
2183
|
-
const SIDE_MAP = {
|
|
2184
|
-
top: 'bottom',
|
|
2185
|
-
right: 'left',
|
|
2186
|
-
bottom: 'top',
|
|
2187
|
-
left: 'right',
|
|
2188
|
-
};
|
|
2189
2047
|
const PostPopovercontainer = class {
|
|
2190
2048
|
constructor(hostRef) {
|
|
2191
2049
|
index.registerInstance(this, hostRef);
|
|
2192
2050
|
this.postToggle = index.createEvent(this, "postToggle", 7);
|
|
2193
2051
|
this.placement = 'top';
|
|
2194
2052
|
this.edgeGap = 8;
|
|
2053
|
+
this.animation = null;
|
|
2195
2054
|
this.arrow = false;
|
|
2055
|
+
this.safeSpace = undefined;
|
|
2056
|
+
}
|
|
2057
|
+
/**
|
|
2058
|
+
* Updates cursor position for safe space feature when popover is open.
|
|
2059
|
+
* Sets CSS custom properties for dynamic styling of safe area.
|
|
2060
|
+
* @param event MouseEvent with cursor position
|
|
2061
|
+
*/
|
|
2062
|
+
mouseTrackingHandler(event) {
|
|
2063
|
+
this.host.style.setProperty('--post-safe-space-cursor-x', `${event.clientX}px`);
|
|
2064
|
+
this.host.style.setProperty('--post-safe-space-cursor-y', `${event.clientY}px`);
|
|
2196
2065
|
}
|
|
2197
2066
|
componentDidLoad() {
|
|
2198
2067
|
this.host.setAttribute('popover', '');
|
|
2199
2068
|
this.host.addEventListener('beforetoggle', this.handleToggle.bind(this));
|
|
2200
2069
|
}
|
|
2201
2070
|
disconnectedCallback() {
|
|
2202
|
-
if (typeof this.clearAutoUpdate === 'function')
|
|
2071
|
+
if (typeof this.clearAutoUpdate === 'function') {
|
|
2203
2072
|
this.clearAutoUpdate();
|
|
2073
|
+
}
|
|
2204
2074
|
}
|
|
2205
2075
|
/**
|
|
2206
|
-
* Programmatically display the
|
|
2207
|
-
* @param target An element with [data-
|
|
2076
|
+
* Programmatically display the popovercontainer
|
|
2077
|
+
* @param target An element with [data-popover-target="id"] where the popovercontainer should be shown
|
|
2208
2078
|
*/
|
|
2209
2079
|
async show(target) {
|
|
2210
2080
|
if (!this.toggleTimeoutId) {
|
|
@@ -2214,7 +2084,7 @@ const PostPopovercontainer = class {
|
|
|
2214
2084
|
}
|
|
2215
2085
|
}
|
|
2216
2086
|
/**
|
|
2217
|
-
* Programmatically hide
|
|
2087
|
+
* Programmatically hide the popovercontainer
|
|
2218
2088
|
*/
|
|
2219
2089
|
async hide() {
|
|
2220
2090
|
if (!this.toggleTimeoutId) {
|
|
@@ -2223,8 +2093,8 @@ const PostPopovercontainer = class {
|
|
|
2223
2093
|
}
|
|
2224
2094
|
}
|
|
2225
2095
|
/**
|
|
2226
|
-
* Toggle
|
|
2227
|
-
* @param target An element with [data-
|
|
2096
|
+
* Toggle popovercontainer display
|
|
2097
|
+
* @param target An element with [data-popover-target="id"] where the popovercontainer should be shown
|
|
2228
2098
|
* @param force Pass true to always show or false to always hide
|
|
2229
2099
|
*/
|
|
2230
2100
|
async toggle(target, force) {
|
|
@@ -2235,11 +2105,11 @@ const PostPopovercontainer = class {
|
|
|
2235
2105
|
this.host.togglePopover(force);
|
|
2236
2106
|
this.toggleTimeoutId = null;
|
|
2237
2107
|
}
|
|
2238
|
-
return this.host.matches(':where(:popover-open, .popover-open');
|
|
2108
|
+
return this.host.matches(':where(:popover-open, .popover-open)');
|
|
2239
2109
|
}
|
|
2240
2110
|
/**
|
|
2241
|
-
* Start or stop auto updates based on
|
|
2242
|
-
*
|
|
2111
|
+
* Start or stop auto updates based on popovercontainer events.
|
|
2112
|
+
* Popovercontainers can be closed or opened with other methods than class members,
|
|
2243
2113
|
* therefore listening to the toggle event is safer for cleaning up.
|
|
2244
2114
|
* @param e ToggleEvent
|
|
2245
2115
|
*/
|
|
@@ -2248,29 +2118,54 @@ const PostPopovercontainer = class {
|
|
|
2248
2118
|
const isOpen = e.newState === 'open';
|
|
2249
2119
|
if (isOpen) {
|
|
2250
2120
|
this.startAutoupdates();
|
|
2121
|
+
if (this.safeSpace)
|
|
2122
|
+
window.addEventListener('mousemove', this.mouseTrackingHandler.bind(this));
|
|
2251
2123
|
}
|
|
2252
2124
|
else {
|
|
2253
2125
|
if (typeof this.clearAutoUpdate === 'function')
|
|
2254
2126
|
this.clearAutoUpdate();
|
|
2127
|
+
if (this.safeSpace)
|
|
2128
|
+
window.removeEventListener('mousemove', this.mouseTrackingHandler.bind(this));
|
|
2255
2129
|
}
|
|
2256
2130
|
this.postToggle.emit(isOpen);
|
|
2257
2131
|
}
|
|
2258
2132
|
/**
|
|
2259
2133
|
* Start listening for DOM updates, scroll events etc. that have
|
|
2260
|
-
* an influence on
|
|
2134
|
+
* an influence on popovercontainer positioning
|
|
2261
2135
|
*/
|
|
2262
2136
|
startAutoupdates() {
|
|
2263
2137
|
this.clearAutoUpdate = autoUpdate(this.eventTarget, this.host, this.calculatePosition.bind(this));
|
|
2264
2138
|
}
|
|
2265
2139
|
async calculatePosition() {
|
|
2140
|
+
const { x, y, middlewareData, placement } = await this.computeMainPosition();
|
|
2141
|
+
const currentPlacement = placement.split('-')[0];
|
|
2142
|
+
// Position popover
|
|
2143
|
+
this.host.style.left = `${x}px`;
|
|
2144
|
+
this.host.style.top = `${y}px`;
|
|
2145
|
+
// Position arrow if enabled
|
|
2146
|
+
if (this.arrow && middlewareData.arrow) {
|
|
2147
|
+
const { x: arrowX, y: arrowY } = middlewareData.arrow;
|
|
2148
|
+
const staticSide = PostPopovercontainer.STATIC_SIDES[currentPlacement];
|
|
2149
|
+
if (staticSide) {
|
|
2150
|
+
Object.assign(this.arrowRef.style, {
|
|
2151
|
+
left: arrowX ? `${arrowX}px` : '',
|
|
2152
|
+
top: arrowY ? `${arrowY}px` : '',
|
|
2153
|
+
[staticSide]: '-7px',
|
|
2154
|
+
});
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
// Handle safe space if enabled
|
|
2158
|
+
if (this.safeSpace && this.eventTarget) {
|
|
2159
|
+
await this.updateSafeSpaceBoundaries(currentPlacement);
|
|
2160
|
+
}
|
|
2161
|
+
}
|
|
2162
|
+
async computeMainPosition() {
|
|
2266
2163
|
const gap = this.edgeGap;
|
|
2267
2164
|
const middleware = [
|
|
2268
2165
|
flip(),
|
|
2269
2166
|
inline(),
|
|
2270
2167
|
shift({
|
|
2271
2168
|
padding: gap,
|
|
2272
|
-
// Prevents shifting away from the anchor too far, while shifting as far as possible
|
|
2273
|
-
// https://floating-ui.com/docs/shift#limiter
|
|
2274
2169
|
limiter: limitShift({
|
|
2275
2170
|
offset: 32,
|
|
2276
2171
|
}),
|
|
@@ -2282,403 +2177,105 @@ const PostPopovercontainer = class {
|
|
|
2282
2177
|
});
|
|
2283
2178
|
},
|
|
2284
2179
|
}),
|
|
2285
|
-
offset(this.arrow ? gap + 4 : gap),
|
|
2180
|
+
offset(this.arrow ? gap + 4 : gap),
|
|
2286
2181
|
];
|
|
2287
2182
|
if (this.arrow) {
|
|
2288
2183
|
middleware.push(arrow({ element: this.arrowRef, padding: gap }));
|
|
2289
2184
|
}
|
|
2290
|
-
|
|
2185
|
+
return computePosition(this.eventTarget, this.host, {
|
|
2291
2186
|
placement: this.placement || 'top',
|
|
2292
2187
|
strategy: 'fixed',
|
|
2293
2188
|
middleware,
|
|
2294
2189
|
});
|
|
2295
|
-
// Tooltip
|
|
2296
|
-
this.host.style.left = `${x}px`;
|
|
2297
|
-
this.host.style.top = `${y}px`;
|
|
2298
|
-
// Arrow
|
|
2299
|
-
if (this.arrow) {
|
|
2300
|
-
// Tutorial: https://codesandbox.io/s/mystifying-kare-ee3hmh?file=/src/index.js
|
|
2301
|
-
const side = currentPlacement.split('-')[0];
|
|
2302
|
-
const { x: arrowX, y: arrowY } = middlewareData.arrow;
|
|
2303
|
-
const staticSide = SIDE_MAP[side];
|
|
2304
|
-
const offsetBorderLineJoin = 2;
|
|
2305
|
-
Object.assign(this.arrowRef.style, {
|
|
2306
|
-
top: arrowY ? `${arrowY}px` : '',
|
|
2307
|
-
left: arrowX ? `${arrowX}px` : '',
|
|
2308
|
-
[staticSide]: `${-this.arrowRef.offsetWidth / 2 - offsetBorderLineJoin}px`,
|
|
2309
|
-
});
|
|
2310
|
-
// Add position as a class to be able to style arrow for HCM
|
|
2311
|
-
this.arrowRef.classList.remove(...Object.values(SIDE_MAP));
|
|
2312
|
-
this.arrowRef.classList.add(staticSide);
|
|
2313
|
-
}
|
|
2314
|
-
}
|
|
2315
|
-
render() {
|
|
2316
|
-
return (index.h(index.Host, { key: 'b8be8594adfd503c47f85872508d5bbd3473cc5a', "data-version": _package.version }, this.arrow && (index.h("span", { key: 'f046737966eb3b801af1e888555178543ea015eb', class: "arrow", ref: el => {
|
|
2317
|
-
this.arrowRef = el;
|
|
2318
|
-
} })), index.h("slot", { key: '5d478472a83442d47e4f16ff8121782c8e6a524b' })));
|
|
2319
|
-
}
|
|
2320
|
-
get host() { return index.getElement(this); }
|
|
2321
|
-
};
|
|
2322
|
-
PostPopovercontainer.style = PostPopovercontainerStyle0;
|
|
2323
|
-
|
|
2324
|
-
const postListCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */post-list{display:flex;gap:var(--post-list-title-gap);flex-direction:column;align-items:flex-start}post-list>div[role=list]{flex-direction:column;display:flex;gap:var(--post-list-item-gap)}post-list[horizontal]:not([horizontal=false]){flex-direction:row;align-items:baseline}post-list[horizontal]:not([horizontal=false])>div[role=list]{flex-direction:row;align-items:center}post-list>.list-title.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}post-list>.list-title.visually-hidden:not(caption){position:absolute !important}";
|
|
2325
|
-
const PostListStyle0 = postListCss;
|
|
2326
|
-
|
|
2327
|
-
const PostList = class {
|
|
2328
|
-
constructor(hostRef) {
|
|
2329
|
-
index.registerInstance(this, hostRef);
|
|
2330
|
-
this.titleId = undefined;
|
|
2331
|
-
this.titleHidden = false;
|
|
2332
|
-
this.horizontal = false;
|
|
2333
|
-
}
|
|
2334
|
-
componentWillLoad() {
|
|
2335
|
-
/**
|
|
2336
|
-
* Get the id set on the host element or use a random id by default
|
|
2337
|
-
*/
|
|
2338
|
-
this.titleId = `list-${crypto.randomUUID()}`;
|
|
2339
|
-
}
|
|
2340
|
-
componentDidLoad() {
|
|
2341
|
-
this.checkTitle();
|
|
2342
|
-
}
|
|
2343
|
-
checkTitle() {
|
|
2344
|
-
if (!this.titleEl.textContent.trim()) {
|
|
2345
|
-
throw new Error('Please provide a title to the list component. Title is mandatory for accessibility purposes.');
|
|
2346
|
-
}
|
|
2347
|
-
}
|
|
2348
|
-
render() {
|
|
2349
|
-
return (index.h(index.Host, { key: '017f05c43fa95bb93c856bbeddd5d26cbc2f4cfa', "data-version": _package.version }, index.h("div", { key: '71fd7d32c761cecf7b4d5d5f39cedb3bf668a0cb', ref: el => (this.titleEl = el), id: this.titleId, class: `list-title${this.titleHidden ? ' visually-hidden' : ''}` }, index.h("slot", { key: 'fe0e03d5d25f6a975e04be00549facae49a0970b' })), index.h("div", { key: 'bb717e4338396c86fa28dbf8236f5f185823f9be', role: "list", "aria-labelledby": this.titleId }, index.h("slot", { key: '7fd25cab433f5fbbafaa7ca01f42774823cbf579', name: "post-list-item" }))));
|
|
2350
|
-
}
|
|
2351
|
-
get host() { return index.getElement(this); }
|
|
2352
|
-
};
|
|
2353
|
-
PostList.style = PostListStyle0;
|
|
2354
|
-
|
|
2355
|
-
const postListItemCss = ":host{display:flex}";
|
|
2356
|
-
const PostListItemStyle0 = postListItemCss;
|
|
2357
|
-
|
|
2358
|
-
const PostListItem = class {
|
|
2359
|
-
constructor(hostRef) {
|
|
2360
|
-
index.registerInstance(this, hostRef);
|
|
2361
|
-
}
|
|
2362
|
-
connectedCallback() {
|
|
2363
|
-
this.host.setAttribute('slot', 'post-list-item');
|
|
2364
|
-
}
|
|
2365
|
-
render() {
|
|
2366
|
-
return (index.h(index.Host, { key: 'bbf12424f2997b7d2e7cd9e272def0bf2838f94f', role: "listitem" }, index.h("slot", { key: '2ce4e71879485f16ad90dfddbd1b79512107bdb0' })));
|
|
2367
|
-
}
|
|
2368
|
-
get host() { return index.getElement(this); }
|
|
2369
|
-
};
|
|
2370
|
-
PostListItem.style = PostListItemStyle0;
|
|
2371
|
-
|
|
2372
|
-
/* eslint-disable no-undefined,no-param-reassign,no-shadow */
|
|
2373
|
-
|
|
2374
|
-
/**
|
|
2375
|
-
* Throttle execution of a function. Especially useful for rate limiting
|
|
2376
|
-
* execution of handlers on events like resize and scroll.
|
|
2377
|
-
*
|
|
2378
|
-
* @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher)
|
|
2379
|
-
* are most useful.
|
|
2380
|
-
* @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through,
|
|
2381
|
-
* as-is, to `callback` when the throttled-function is executed.
|
|
2382
|
-
* @param {object} [options] - An object to configure options.
|
|
2383
|
-
* @param {boolean} [options.noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds
|
|
2384
|
-
* while the throttled-function is being called. If noTrailing is false or unspecified, callback will be executed
|
|
2385
|
-
* one final time after the last throttled-function call. (After the throttled-function has not been called for
|
|
2386
|
-
* `delay` milliseconds, the internal counter is reset).
|
|
2387
|
-
* @param {boolean} [options.noLeading] - Optional, defaults to false. If noLeading is false, the first throttled-function call will execute callback
|
|
2388
|
-
* immediately. If noLeading is true, the first the callback execution will be skipped. It should be noted that
|
|
2389
|
-
* callback will never executed if both noLeading = true and noTrailing = true.
|
|
2390
|
-
* @param {boolean} [options.debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is
|
|
2391
|
-
* false (at end), schedule `callback` to execute after `delay` ms.
|
|
2392
|
-
*
|
|
2393
|
-
* @returns {Function} A new, throttled, function.
|
|
2394
|
-
*/
|
|
2395
|
-
function throttle (delay, callback, options) {
|
|
2396
|
-
var _ref = options || {},
|
|
2397
|
-
_ref$noTrailing = _ref.noTrailing,
|
|
2398
|
-
noTrailing = _ref$noTrailing === void 0 ? false : _ref$noTrailing,
|
|
2399
|
-
_ref$noLeading = _ref.noLeading,
|
|
2400
|
-
noLeading = _ref$noLeading === void 0 ? false : _ref$noLeading,
|
|
2401
|
-
_ref$debounceMode = _ref.debounceMode,
|
|
2402
|
-
debounceMode = _ref$debounceMode === void 0 ? undefined : _ref$debounceMode;
|
|
2403
|
-
/*
|
|
2404
|
-
* After wrapper has stopped being called, this timeout ensures that
|
|
2405
|
-
* `callback` is executed at the proper times in `throttle` and `end`
|
|
2406
|
-
* debounce modes.
|
|
2407
|
-
*/
|
|
2408
|
-
var timeoutID;
|
|
2409
|
-
var cancelled = false;
|
|
2410
|
-
|
|
2411
|
-
// Keep track of the last time `callback` was executed.
|
|
2412
|
-
var lastExec = 0;
|
|
2413
|
-
|
|
2414
|
-
// Function to clear existing timeout
|
|
2415
|
-
function clearExistingTimeout() {
|
|
2416
|
-
if (timeoutID) {
|
|
2417
|
-
clearTimeout(timeoutID);
|
|
2418
|
-
}
|
|
2419
|
-
}
|
|
2420
|
-
|
|
2421
|
-
// Function to cancel next exec
|
|
2422
|
-
function cancel(options) {
|
|
2423
|
-
var _ref2 = options || {},
|
|
2424
|
-
_ref2$upcomingOnly = _ref2.upcomingOnly,
|
|
2425
|
-
upcomingOnly = _ref2$upcomingOnly === void 0 ? false : _ref2$upcomingOnly;
|
|
2426
|
-
clearExistingTimeout();
|
|
2427
|
-
cancelled = !upcomingOnly;
|
|
2428
|
-
}
|
|
2429
|
-
|
|
2430
|
-
/*
|
|
2431
|
-
* The `wrapper` function encapsulates all of the throttling / debouncing
|
|
2432
|
-
* functionality and when executed will limit the rate at which `callback`
|
|
2433
|
-
* is executed.
|
|
2434
|
-
*/
|
|
2435
|
-
function wrapper() {
|
|
2436
|
-
for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2437
|
-
arguments_[_key] = arguments[_key];
|
|
2438
|
-
}
|
|
2439
|
-
var self = this;
|
|
2440
|
-
var elapsed = Date.now() - lastExec;
|
|
2441
|
-
if (cancelled) {
|
|
2442
|
-
return;
|
|
2443
|
-
}
|
|
2444
|
-
|
|
2445
|
-
// Execute `callback` and update the `lastExec` timestamp.
|
|
2446
|
-
function exec() {
|
|
2447
|
-
lastExec = Date.now();
|
|
2448
|
-
callback.apply(self, arguments_);
|
|
2449
|
-
}
|
|
2450
|
-
|
|
2451
|
-
/*
|
|
2452
|
-
* If `debounceMode` is true (at begin) this is used to clear the flag
|
|
2453
|
-
* to allow future `callback` executions.
|
|
2454
|
-
*/
|
|
2455
|
-
function clear() {
|
|
2456
|
-
timeoutID = undefined;
|
|
2457
|
-
}
|
|
2458
|
-
if (!noLeading && debounceMode && !timeoutID) {
|
|
2459
|
-
/*
|
|
2460
|
-
* Since `wrapper` is being called for the first time and
|
|
2461
|
-
* `debounceMode` is true (at begin), execute `callback`
|
|
2462
|
-
* and noLeading != true.
|
|
2463
|
-
*/
|
|
2464
|
-
exec();
|
|
2465
2190
|
}
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
} else if (noTrailing !== true) {
|
|
2486
|
-
/*
|
|
2487
|
-
* In trailing throttle mode, since `delay` time has not been
|
|
2488
|
-
* exceeded, schedule `callback` to execute `delay` ms after most
|
|
2489
|
-
* recent execution.
|
|
2490
|
-
*
|
|
2491
|
-
* If `debounceMode` is true (at begin), schedule `clear` to execute
|
|
2492
|
-
* after `delay` ms.
|
|
2493
|
-
*
|
|
2494
|
-
* If `debounceMode` is false (at end), schedule `callback` to
|
|
2495
|
-
* execute after `delay` ms.
|
|
2496
|
-
*/
|
|
2497
|
-
timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
|
|
2498
|
-
}
|
|
2499
|
-
}
|
|
2500
|
-
wrapper.cancel = cancel;
|
|
2501
|
-
|
|
2502
|
-
// Return the wrapper function.
|
|
2503
|
-
return wrapper;
|
|
2504
|
-
}
|
|
2505
|
-
|
|
2506
|
-
const postHeaderCss = "*,::before,::after{box-sizing:border-box}:host{--global-header-height:72px;--main-header-height:56px;--header-height:calc(var(--global-header-height) + var(--main-header-height))}@media screen and (max-width: 1023.99px){:host{--global-header-height:64px}}.d-flex{display:flex}.space-between{justify-content:space-between}.global-header{background-color:#fc0;display:flex;justify-content:space-between;align-items:center;position:sticky;padding-inline-start:4px;padding-inline-end:12px;height:var(--global-header-height)}@media screen and (max-width: 1023.99px){.global-header{top:0}}@media screen and (min-width: 1024px){.global-header{top:calc((var(--global-header-height) - 24px)*-1)}}slot[name=post-logo]{align-self:flex-end}.global-sub{display:flex;align-items:center;gap:2rem;height:var(--global-header-height)}.align-end{align-items:flex-end}.logo{flex:1 0 auto;height:var(--global-header-height);width:var(--global-header-height);min-height:24px;align-self:flex-end}@media screen and (min-width: 1024px){.logo{height:calc(var(--global-header-height) - var(--header-scroll-top))}}::slotted(ul){margin-block:0;list-style:none;display:flex;padding-left:0;gap:1rem}.title-header,.main-navigation{display:flex;align-items:center;padding-inline:12px;background:#fff}.title-header{height:var(--main-header-height);display:flex;align-items:center}@media screen and (max-width: 1023.99px){.title-header{border-bottom:1px solid #000}}:host(:not(:has([slot=title]))) .title-header{display:none}::slotted(h1){margin:0 !important;font-size:28px !important}.main-navigation{position:sticky;top:24px;height:var(--main-header-height)}@media screen and (min-width: 1024px){.main-navigation{border-bottom:1px solid #000}}@media screen and (max-width: 1023.99px){.main-navigation{display:none;position:absolute;top:var(--header-height);bottom:0;width:100%;background-color:#fff;height:auto}.main-navigation.extended{display:block}}@media screen and (min-width: 1024px){.mobile-toggle{display:none}}";
|
|
2507
|
-
const PostHeaderStyle0 = postHeaderCss;
|
|
2508
|
-
|
|
2509
|
-
const PostHeader = class {
|
|
2510
|
-
constructor(hostRef) {
|
|
2511
|
-
index.registerInstance(this, hostRef);
|
|
2512
|
-
this.scrollParent = null;
|
|
2513
|
-
this.throttledScroll = () => this.handleScrollEvent();
|
|
2514
|
-
this.throttledResize = throttle(50, () => this.handleResize());
|
|
2515
|
-
this.device = null;
|
|
2516
|
-
this.mobileMenuExtended = false;
|
|
2517
|
-
}
|
|
2518
|
-
componentWillRender() {
|
|
2519
|
-
this.scrollParent = this.getScrollParent(this.host);
|
|
2520
|
-
this.scrollParent.addEventListener('scroll', this.throttledScroll, { passive: true });
|
|
2521
|
-
window.addEventListener('resize', this.throttledResize, { passive: true });
|
|
2522
|
-
this.handleResize();
|
|
2523
|
-
this.handleScrollEvent();
|
|
2524
|
-
}
|
|
2525
|
-
handlePostMainNavigationClosed() {
|
|
2526
|
-
this.mobileMenuExtended = false;
|
|
2527
|
-
}
|
|
2528
|
-
handleScrollEvent() {
|
|
2529
|
-
// Credits: "https://github.com/qeremy/so/blob/master/so.dom.js#L426"
|
|
2530
|
-
const st = Math.max(0, this.scrollParent instanceof Document
|
|
2531
|
-
? this.scrollParent.documentElement.scrollTop
|
|
2532
|
-
: this.scrollParent.scrollTop);
|
|
2533
|
-
this.host.style.setProperty('--header-scroll-top', `${st}px`);
|
|
2534
|
-
}
|
|
2535
|
-
getScrollParent(node) {
|
|
2536
|
-
let currentParent = node.parentElement;
|
|
2537
|
-
while (currentParent) {
|
|
2538
|
-
if (currentParent.nodeName === 'BODY') {
|
|
2539
|
-
return document;
|
|
2191
|
+
async updateSafeSpaceBoundaries(currentPlacement) {
|
|
2192
|
+
const targetRect = this.eventTarget.getBoundingClientRect();
|
|
2193
|
+
const popoverRect = this.host.getBoundingClientRect();
|
|
2194
|
+
const isVertical = currentPlacement === 'top' || currentPlacement === 'bottom';
|
|
2195
|
+
// Helper function to get positioning data based on placement
|
|
2196
|
+
const getPositioningData = (placement, popoverRect, targetRect) => {
|
|
2197
|
+
if (placement === 'top' || placement === 'bottom') {
|
|
2198
|
+
return {
|
|
2199
|
+
popover: {
|
|
2200
|
+
y: placement === 'top' ? popoverRect.bottom : popoverRect.top,
|
|
2201
|
+
xStart: popoverRect.left,
|
|
2202
|
+
xEnd: popoverRect.right,
|
|
2203
|
+
},
|
|
2204
|
+
trigger: {
|
|
2205
|
+
y: placement === 'top' ? targetRect.top : targetRect.bottom,
|
|
2206
|
+
xStart: targetRect.left,
|
|
2207
|
+
xEnd: targetRect.right,
|
|
2208
|
+
},
|
|
2209
|
+
};
|
|
2540
2210
|
}
|
|
2541
|
-
|
|
2542
|
-
|
|
2211
|
+
else {
|
|
2212
|
+
// left or right
|
|
2213
|
+
return {
|
|
2214
|
+
popover: {
|
|
2215
|
+
x: placement === 'left' ? popoverRect.right : popoverRect.left,
|
|
2216
|
+
yStart: popoverRect.top,
|
|
2217
|
+
yEnd: popoverRect.bottom,
|
|
2218
|
+
},
|
|
2219
|
+
trigger: {
|
|
2220
|
+
x: placement === 'left' ? targetRect.left : targetRect.right,
|
|
2221
|
+
yStart: targetRect.top,
|
|
2222
|
+
yEnd: targetRect.bottom,
|
|
2223
|
+
},
|
|
2224
|
+
};
|
|
2543
2225
|
}
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
if (!(node instanceof HTMLElement || node instanceof SVGElement)) {
|
|
2550
|
-
return false;
|
|
2551
|
-
}
|
|
2552
|
-
const style = getComputedStyle(node);
|
|
2553
|
-
return ['overflow', 'overflow-x', 'overflow-y'].some(propertyName => {
|
|
2554
|
-
const value = style.getPropertyValue(propertyName);
|
|
2555
|
-
return value === 'auto' || value === 'scroll';
|
|
2226
|
+
};
|
|
2227
|
+
const posData = getPositioningData(currentPlacement, popoverRect, targetRect);
|
|
2228
|
+
// Clear previous values
|
|
2229
|
+
PostPopovercontainer.PROPERTIES_TO_CLEAR.forEach(prop => {
|
|
2230
|
+
this.host.style.removeProperty(prop);
|
|
2556
2231
|
});
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
this.
|
|
2562
|
-
this.
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
this.device = 'tablet';
|
|
2232
|
+
if (isVertical) {
|
|
2233
|
+
// For top/bottom placement
|
|
2234
|
+
this.host.style.setProperty('--post-safe-space-popover-y', `${posData.popover.y}px`);
|
|
2235
|
+
this.host.style.setProperty('--post-safe-space-popover-x-start', `${posData.popover.xStart}px`);
|
|
2236
|
+
this.host.style.setProperty('--post-safe-space-popover-x-end', `${posData.popover.xEnd}px`);
|
|
2237
|
+
this.host.style.setProperty('--post-safe-space-trigger-y', `${posData.trigger.y}px`);
|
|
2238
|
+
this.host.style.setProperty('--post-safe-space-trigger-x-start', `${posData.trigger.xStart}px`);
|
|
2239
|
+
this.host.style.setProperty('--post-safe-space-trigger-x-end', `${posData.trigger.xEnd}px`);
|
|
2566
2240
|
}
|
|
2567
2241
|
else {
|
|
2568
|
-
|
|
2242
|
+
// For left/right placement
|
|
2243
|
+
this.host.style.setProperty('--post-safe-space-popover-x', `${posData.popover.x}px`);
|
|
2244
|
+
this.host.style.setProperty('--post-safe-space-popover-y-start', `${posData.popover.yStart}px`);
|
|
2245
|
+
this.host.style.setProperty('--post-safe-space-popover-y-end', `${posData.popover.yEnd}px`);
|
|
2246
|
+
this.host.style.setProperty('--post-safe-space-trigger-x', `${posData.trigger.x}px`);
|
|
2247
|
+
this.host.style.setProperty('--post-safe-space-trigger-y-start', `${posData.trigger.yStart}px`);
|
|
2248
|
+
this.host.style.setProperty('--post-safe-space-trigger-y-end', `${posData.trigger.yEnd}px`);
|
|
2569
2249
|
}
|
|
2570
2250
|
}
|
|
2571
|
-
handleMobileMenuToggle() {
|
|
2572
|
-
this.mobileMenuExtended = !this.mobileMenuExtended;
|
|
2573
|
-
}
|
|
2574
2251
|
render() {
|
|
2575
|
-
const
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
return (index.h(index.Host, { key: 'a09985740ff01e4f38e7bbe5e0b9012d77e7cba2', version: _package.version }, index.h("div", { key: 'c612b90e757d916036bee002d7bba8abfeb19073', class: "global-header" }, index.h("div", { key: 'd11c51f756d1c7a8c0b4f3b9625cfbe8cae88435', class: "global-sub" }, index.h("div", { key: '43fb63bfe0350ffca0e44fd611bb6bbe6c3eef0c', class: "logo" }, index.h("slot", { key: '8d90d7f20b0fd6a7cbc93e5dd95ad8200c027822', name: "post-logo" }))), index.h("div", { key: 'b1bc83b4fcb3a0af6ffd99976af4acf454b3d29d', class: "global-sub" }, this.device === 'desktop' && index.h("slot", { key: 'bbe38f3e0d070bfd84e1656e7dd631816df0101c', name: "meta-navigation" }), index.h("slot", { key: 'b1483eea11ecdc9cddf122077cf0746d88f69239', name: "global-controls" }), this.device === 'desktop' && index.h("slot", { key: '785f557f30bffc5cd282a0505e9ffc7e3e6e1029', name: "post-language-switch" }), index.h("div", { key: 'f088ddb3df417929525b22a09fa3be113042e48f', onClick: () => this.handleMobileMenuToggle(), class: "mobile-toggle" }, index.h("slot", { key: 'de65884a443290e057ed911289818d5a323f5a9c', name: "post-togglebutton" })))), index.h("div", { key: '56ebdec46003a6ead4f3710dc9c0f60e9a86ed8d', class: "title-header d-flex space-between align-center" }, index.h("slot", { key: '8e61e4711ea8018e51fd11c5b5faa30a1ad9445c', name: "title" }), index.h("div", { key: '4d762d1f4d3f45470d52af167c7f4a71651e7970', class: "global-sub" }, index.h("slot", { key: 'c8c5b73b1fa0e665a7133ae8db0212ef8948ba29', name: "local-controls" }), index.h("slot", { key: '212640155af85dfab34182ab236bfe72456e77b1' }))), index.h("div", { key: 'c4004d443fd546fac8a2651482725fae99c2db6c', class: mainNavClasses.join(' ') }, index.h("slot", { key: '783787f85d25d9e42d96213ae77f6c689f872b70', name: "post-mainnavigation" }), (this.device === 'mobile' || this.device === 'tablet') && (index.h("slot", { key: '04cfd7d09d03ab85ac9c12f9c3d6cb31fbb65fc2', name: "meta-navigation" })), (this.device === 'mobile' || this.device === 'tablet') && (index.h("slot", { key: '117e76f18fdc93493115428e1cd0d6a119c7a652', name: "post-language-switch" })))));
|
|
2252
|
+
const animationClass = this.animation ? `animate-${this.animation}` : '';
|
|
2253
|
+
return (index.h(index.Host, { key: '98ea26b46803e8aa98cc2cec53798d994c0ff856', "data-version": _package.version }, index.h("div", { key: '230fa7df2963b36e67a4559f07010f7213240e3c', class: animationClass }, this.arrow && (index.h("span", { key: '58647eb14ef84ff04b04b7dec0bbb38b9bcd4b69', class: "arrow", ref: el => {
|
|
2254
|
+
this.arrowRef = el;
|
|
2255
|
+
} })), index.h("slot", { key: 'de0afc53f013ac7d4cdd06e0e2d7746a8e0971dc' }))));
|
|
2580
2256
|
}
|
|
2581
2257
|
get host() { return index.getElement(this); }
|
|
2582
2258
|
};
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
const PostMainnavigation = class {
|
|
2589
|
-
constructor(hostRef) {
|
|
2590
|
-
index.registerInstance(this, hostRef);
|
|
2591
|
-
this.postToggle = index.createEvent(this, "postToggle", 7);
|
|
2592
|
-
}
|
|
2593
|
-
handleMegadropdownToggled(event) {
|
|
2594
|
-
// Find next element sibling
|
|
2595
|
-
let megalodon;
|
|
2596
|
-
let target = event.target;
|
|
2597
|
-
while (target !== null) {
|
|
2598
|
-
if (target.tagName === 'POST-MEGADROPDOWN') {
|
|
2599
|
-
megalodon = target;
|
|
2600
|
-
break;
|
|
2601
|
-
}
|
|
2602
|
-
target = target.nextElementSibling;
|
|
2603
|
-
}
|
|
2604
|
-
if (megalodon)
|
|
2605
|
-
megalodon.toggle(event.target);
|
|
2606
|
-
}
|
|
2607
|
-
handleBackButtonClick() {
|
|
2608
|
-
this.postToggle.emit();
|
|
2609
|
-
}
|
|
2610
|
-
render() {
|
|
2611
|
-
return (index.h(index.Host, { key: '7179d087e93ab9e14dc21e16b52beaf965c53cd3', slot: "post-mainnavigation" }, index.h("div", { key: '2aede886c29972bf1dfebbe4513c4acf2e47c6ea', onClick: () => this.handleBackButtonClick(), class: "back-button" }, index.h("slot", { key: '4697ec520be78fccee832a358b349f68081b2f54', name: "back-button" })), index.h("nav", { key: '5bae57025152af07b9d68a19a07b61d0149d31dc', class: "main-navigation" }, index.h("slot", { key: 'e2a73a4b814a39a7cb1f7733f87c3c588f484006' }))));
|
|
2612
|
-
}
|
|
2613
|
-
};
|
|
2614
|
-
PostMainnavigation.style = PostMainnavigationStyle0;
|
|
2615
|
-
|
|
2616
|
-
const postMegadropdownCss = "*,::before,::after{box-sizing:border-box}post-popovercontainer{background-color:#fafafa;width:100%;border-bottom:1px solid #000}@media screen and (max-width: 1023.99px){post-popovercontainer{position:absolute;top:var(--header-height) !important;bottom:0;left:0;width:100%;height:auto}}.megadropdown{display:flex;gap:1rem;padding:1.5rem;border-radius:0 0 3px 3px}@media screen and (max-width: 1023.99px){.megadropdown{flex-direction:column}}.megadropdown post-list{display:flex;flex-direction:column;gap:.5rem}.megadropdown post-list-item{border-bottom:1px solid gray}.megadropdown post-list-item>a{padding-block:.25rem;display:block;text-decoration:none}.back-button{display:none}@media screen and (max-width: 1023.99px){.back-button{display:block}}post-closebutton{margin-left:auto}@media screen and (max-width: 1023.99px){post-closebutton{display:none}}h3{font-size:20px}";
|
|
2617
|
-
const PostMegadropdownStyle0 = postMegadropdownCss;
|
|
2618
|
-
|
|
2619
|
-
const PostMegadropdown = class {
|
|
2620
|
-
constructor(hostRef) {
|
|
2621
|
-
index.registerInstance(this, hostRef);
|
|
2622
|
-
}
|
|
2623
|
-
/**
|
|
2624
|
-
* Show megadropdown
|
|
2625
|
-
* @param element HTMLElement
|
|
2626
|
-
* @returns boolean
|
|
2627
|
-
*/
|
|
2628
|
-
async show(element) {
|
|
2629
|
-
return this.popoverRef.show(element);
|
|
2630
|
-
}
|
|
2631
|
-
/**
|
|
2632
|
-
* Hide megadropdown
|
|
2633
|
-
* @returns boolean
|
|
2634
|
-
*/
|
|
2635
|
-
async hide() {
|
|
2636
|
-
return this.popoverRef.hide();
|
|
2637
|
-
}
|
|
2638
|
-
/**
|
|
2639
|
-
* Toggle megadropdown
|
|
2640
|
-
* @param element HTMLElement
|
|
2641
|
-
* @param force boolean
|
|
2642
|
-
* @returns boolean
|
|
2643
|
-
*/
|
|
2644
|
-
async toggle(element, force) {
|
|
2645
|
-
return this.popoverRef.toggle(element, force !== null && force !== void 0 ? force : undefined);
|
|
2646
|
-
}
|
|
2647
|
-
handleBackButtonClick() {
|
|
2648
|
-
this.hide();
|
|
2649
|
-
}
|
|
2650
|
-
render() {
|
|
2651
|
-
return (index.h(index.Host, { key: '9b8e17f4120259f55ed3dbce4780559cb8876540', slot: "post-mainnavigation" }, index.h("post-popovercontainer", { key: 'ac48d1fffbcdff5aa20d9f2f6fed9beb4dd3be23', placement: "bottom", "edge-gap": "0", ref: el => (this.popoverRef = el) }, index.h("div", { key: 'af02d9fd35973b6d889b639f1d856dd3d9921ae1', class: "megadropdown" }, index.h("div", { key: '445aa9b1a04e63c0d2b17466c610a30662f3db0e', onClick: () => this.handleBackButtonClick(), class: "back-button" }, index.h("slot", { key: '8d8f4cad3d5860fdfc1c615e7122ab5dd2ca5ed3', name: "back-button" })), index.h("slot", { key: 'c9ba8c0941f86fd29a44153e186cd679bcd678f5' })))));
|
|
2652
|
-
}
|
|
2259
|
+
PostPopovercontainer.STATIC_SIDES = {
|
|
2260
|
+
top: 'bottom',
|
|
2261
|
+
right: 'left',
|
|
2262
|
+
bottom: 'top',
|
|
2263
|
+
left: 'right',
|
|
2653
2264
|
};
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2265
|
+
PostPopovercontainer.PROPERTIES_TO_CLEAR = [
|
|
2266
|
+
'--post-safe-space-popover-x',
|
|
2267
|
+
'--post-safe-space-popover-y',
|
|
2268
|
+
'--post-safe-space-popover-x-start',
|
|
2269
|
+
'--post-safe-space-popover-x-end',
|
|
2270
|
+
'--post-safe-space-popover-y-start',
|
|
2271
|
+
'--post-safe-space-popover-y-end',
|
|
2272
|
+
'--post-safe-space-trigger-x',
|
|
2273
|
+
'--post-safe-space-trigger-y',
|
|
2274
|
+
'--post-safe-space-trigger-x-start',
|
|
2275
|
+
'--post-safe-space-trigger-x-end',
|
|
2276
|
+
'--post-safe-space-trigger-y-start',
|
|
2277
|
+
'--post-safe-space-trigger-y-end',
|
|
2278
|
+
];
|
|
2279
|
+
PostPopovercontainer.style = PostPopovercontainerStyle0;
|
|
2658
2280
|
|
|
2659
|
-
const PostMegadropdownTrigger = class {
|
|
2660
|
-
constructor(hostRef) {
|
|
2661
|
-
index.registerInstance(this, hostRef);
|
|
2662
|
-
this.postToggle = index.createEvent(this, "postToggle", 7);
|
|
2663
|
-
this.toggled = false;
|
|
2664
|
-
}
|
|
2665
|
-
handleClick() {
|
|
2666
|
-
this.toggled = !this.toggled;
|
|
2667
|
-
this.postToggle.emit();
|
|
2668
|
-
}
|
|
2669
|
-
render() {
|
|
2670
|
-
return (index.h(index.Host, { key: 'd139b405fe28c7334c01eec4846a6f8b5bf1e261', slot: "post-megadropdown-trigger" }, index.h("button", { key: 'd3aee53488359a79764974d440d7a058d5d96873', "aria-expanded": this.toggled, onClick: () => this.handleClick() }, index.h("slot", { key: '7012055defbb7c8058481db5c4129919847010c6' }))));
|
|
2671
|
-
}
|
|
2672
|
-
};
|
|
2673
|
-
PostMegadropdownTrigger.style = PostMegadropdownTriggerStyle0;
|
|
2674
|
-
|
|
2675
|
-
exports.PostClosebutton = PostClosebutton;
|
|
2676
|
-
exports.PostHeader = PostHeader;
|
|
2677
|
-
exports.PostIcon = PostIcon;
|
|
2678
|
-
exports.PostList = PostList;
|
|
2679
|
-
exports.PostListItem = PostListItem;
|
|
2680
|
-
exports.PostLogo = PostLogo;
|
|
2681
|
-
exports.PostMainnavigation = PostMainnavigation;
|
|
2682
|
-
exports.PostMegadropdown = PostMegadropdown;
|
|
2683
|
-
exports.PostMegadropdownTrigger = PostMegadropdownTrigger;
|
|
2684
2281
|
exports.PostPopovercontainer = PostPopovercontainer;
|