@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
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface PostHeader extends Components.PostHeader, HTMLElement {}
|
|
4
|
-
export const PostHeader: {
|
|
5
|
-
prototype: PostHeader;
|
|
6
|
-
new (): PostHeader;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { v as version } from './package.js';
|
|
3
|
-
|
|
4
|
-
/* eslint-disable no-undefined,no-param-reassign,no-shadow */
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Throttle execution of a function. Especially useful for rate limiting
|
|
8
|
-
* execution of handlers on events like resize and scroll.
|
|
9
|
-
*
|
|
10
|
-
* @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher)
|
|
11
|
-
* are most useful.
|
|
12
|
-
* @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through,
|
|
13
|
-
* as-is, to `callback` when the throttled-function is executed.
|
|
14
|
-
* @param {object} [options] - An object to configure options.
|
|
15
|
-
* @param {boolean} [options.noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds
|
|
16
|
-
* while the throttled-function is being called. If noTrailing is false or unspecified, callback will be executed
|
|
17
|
-
* one final time after the last throttled-function call. (After the throttled-function has not been called for
|
|
18
|
-
* `delay` milliseconds, the internal counter is reset).
|
|
19
|
-
* @param {boolean} [options.noLeading] - Optional, defaults to false. If noLeading is false, the first throttled-function call will execute callback
|
|
20
|
-
* immediately. If noLeading is true, the first the callback execution will be skipped. It should be noted that
|
|
21
|
-
* callback will never executed if both noLeading = true and noTrailing = true.
|
|
22
|
-
* @param {boolean} [options.debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is
|
|
23
|
-
* false (at end), schedule `callback` to execute after `delay` ms.
|
|
24
|
-
*
|
|
25
|
-
* @returns {Function} A new, throttled, function.
|
|
26
|
-
*/
|
|
27
|
-
function throttle (delay, callback, options) {
|
|
28
|
-
var _ref = options || {},
|
|
29
|
-
_ref$noTrailing = _ref.noTrailing,
|
|
30
|
-
noTrailing = _ref$noTrailing === void 0 ? false : _ref$noTrailing,
|
|
31
|
-
_ref$noLeading = _ref.noLeading,
|
|
32
|
-
noLeading = _ref$noLeading === void 0 ? false : _ref$noLeading,
|
|
33
|
-
_ref$debounceMode = _ref.debounceMode,
|
|
34
|
-
debounceMode = _ref$debounceMode === void 0 ? undefined : _ref$debounceMode;
|
|
35
|
-
/*
|
|
36
|
-
* After wrapper has stopped being called, this timeout ensures that
|
|
37
|
-
* `callback` is executed at the proper times in `throttle` and `end`
|
|
38
|
-
* debounce modes.
|
|
39
|
-
*/
|
|
40
|
-
var timeoutID;
|
|
41
|
-
var cancelled = false;
|
|
42
|
-
|
|
43
|
-
// Keep track of the last time `callback` was executed.
|
|
44
|
-
var lastExec = 0;
|
|
45
|
-
|
|
46
|
-
// Function to clear existing timeout
|
|
47
|
-
function clearExistingTimeout() {
|
|
48
|
-
if (timeoutID) {
|
|
49
|
-
clearTimeout(timeoutID);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// Function to cancel next exec
|
|
54
|
-
function cancel(options) {
|
|
55
|
-
var _ref2 = options || {},
|
|
56
|
-
_ref2$upcomingOnly = _ref2.upcomingOnly,
|
|
57
|
-
upcomingOnly = _ref2$upcomingOnly === void 0 ? false : _ref2$upcomingOnly;
|
|
58
|
-
clearExistingTimeout();
|
|
59
|
-
cancelled = !upcomingOnly;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/*
|
|
63
|
-
* The `wrapper` function encapsulates all of the throttling / debouncing
|
|
64
|
-
* functionality and when executed will limit the rate at which `callback`
|
|
65
|
-
* is executed.
|
|
66
|
-
*/
|
|
67
|
-
function wrapper() {
|
|
68
|
-
for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
69
|
-
arguments_[_key] = arguments[_key];
|
|
70
|
-
}
|
|
71
|
-
var self = this;
|
|
72
|
-
var elapsed = Date.now() - lastExec;
|
|
73
|
-
if (cancelled) {
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// Execute `callback` and update the `lastExec` timestamp.
|
|
78
|
-
function exec() {
|
|
79
|
-
lastExec = Date.now();
|
|
80
|
-
callback.apply(self, arguments_);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/*
|
|
84
|
-
* If `debounceMode` is true (at begin) this is used to clear the flag
|
|
85
|
-
* to allow future `callback` executions.
|
|
86
|
-
*/
|
|
87
|
-
function clear() {
|
|
88
|
-
timeoutID = undefined;
|
|
89
|
-
}
|
|
90
|
-
if (!noLeading && debounceMode && !timeoutID) {
|
|
91
|
-
/*
|
|
92
|
-
* Since `wrapper` is being called for the first time and
|
|
93
|
-
* `debounceMode` is true (at begin), execute `callback`
|
|
94
|
-
* and noLeading != true.
|
|
95
|
-
*/
|
|
96
|
-
exec();
|
|
97
|
-
}
|
|
98
|
-
clearExistingTimeout();
|
|
99
|
-
if (debounceMode === undefined && elapsed > delay) {
|
|
100
|
-
if (noLeading) {
|
|
101
|
-
/*
|
|
102
|
-
* In throttle mode with noLeading, if `delay` time has
|
|
103
|
-
* been exceeded, update `lastExec` and schedule `callback`
|
|
104
|
-
* to execute after `delay` ms.
|
|
105
|
-
*/
|
|
106
|
-
lastExec = Date.now();
|
|
107
|
-
if (!noTrailing) {
|
|
108
|
-
timeoutID = setTimeout(debounceMode ? clear : exec, delay);
|
|
109
|
-
}
|
|
110
|
-
} else {
|
|
111
|
-
/*
|
|
112
|
-
* In throttle mode without noLeading, if `delay` time has been exceeded, execute
|
|
113
|
-
* `callback`.
|
|
114
|
-
*/
|
|
115
|
-
exec();
|
|
116
|
-
}
|
|
117
|
-
} else if (noTrailing !== true) {
|
|
118
|
-
/*
|
|
119
|
-
* In trailing throttle mode, since `delay` time has not been
|
|
120
|
-
* exceeded, schedule `callback` to execute `delay` ms after most
|
|
121
|
-
* recent execution.
|
|
122
|
-
*
|
|
123
|
-
* If `debounceMode` is true (at begin), schedule `clear` to execute
|
|
124
|
-
* after `delay` ms.
|
|
125
|
-
*
|
|
126
|
-
* If `debounceMode` is false (at end), schedule `callback` to
|
|
127
|
-
* execute after `delay` ms.
|
|
128
|
-
*/
|
|
129
|
-
timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
wrapper.cancel = cancel;
|
|
133
|
-
|
|
134
|
-
// Return the wrapper function.
|
|
135
|
-
return wrapper;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
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}}";
|
|
139
|
-
const PostHeaderStyle0 = postHeaderCss;
|
|
140
|
-
|
|
141
|
-
const PostHeader = /*@__PURE__*/ proxyCustomElement(class PostHeader extends HTMLElement {
|
|
142
|
-
constructor() {
|
|
143
|
-
super();
|
|
144
|
-
this.__registerHost();
|
|
145
|
-
this.__attachShadow();
|
|
146
|
-
this.scrollParent = null;
|
|
147
|
-
this.throttledScroll = () => this.handleScrollEvent();
|
|
148
|
-
this.throttledResize = throttle(50, () => this.handleResize());
|
|
149
|
-
this.device = null;
|
|
150
|
-
this.mobileMenuExtended = false;
|
|
151
|
-
}
|
|
152
|
-
componentWillRender() {
|
|
153
|
-
this.scrollParent = this.getScrollParent(this.host);
|
|
154
|
-
this.scrollParent.addEventListener('scroll', this.throttledScroll, { passive: true });
|
|
155
|
-
window.addEventListener('resize', this.throttledResize, { passive: true });
|
|
156
|
-
this.handleResize();
|
|
157
|
-
this.handleScrollEvent();
|
|
158
|
-
}
|
|
159
|
-
handlePostMainNavigationClosed() {
|
|
160
|
-
this.mobileMenuExtended = false;
|
|
161
|
-
}
|
|
162
|
-
handleScrollEvent() {
|
|
163
|
-
// Credits: "https://github.com/qeremy/so/blob/master/so.dom.js#L426"
|
|
164
|
-
const st = Math.max(0, this.scrollParent instanceof Document
|
|
165
|
-
? this.scrollParent.documentElement.scrollTop
|
|
166
|
-
: this.scrollParent.scrollTop);
|
|
167
|
-
this.host.style.setProperty('--header-scroll-top', `${st}px`);
|
|
168
|
-
}
|
|
169
|
-
getScrollParent(node) {
|
|
170
|
-
let currentParent = node.parentElement;
|
|
171
|
-
while (currentParent) {
|
|
172
|
-
if (currentParent.nodeName === 'BODY') {
|
|
173
|
-
return document;
|
|
174
|
-
}
|
|
175
|
-
if (this.isScrollable(currentParent)) {
|
|
176
|
-
return currentParent;
|
|
177
|
-
}
|
|
178
|
-
currentParent = currentParent.parentElement;
|
|
179
|
-
}
|
|
180
|
-
return document;
|
|
181
|
-
}
|
|
182
|
-
isScrollable(node) {
|
|
183
|
-
if (!(node instanceof HTMLElement || node instanceof SVGElement)) {
|
|
184
|
-
return false;
|
|
185
|
-
}
|
|
186
|
-
const style = getComputedStyle(node);
|
|
187
|
-
return ['overflow', 'overflow-x', 'overflow-y'].some(propertyName => {
|
|
188
|
-
const value = style.getPropertyValue(propertyName);
|
|
189
|
-
return value === 'auto' || value === 'scroll';
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
handleResize() {
|
|
193
|
-
const width = window === null || window === void 0 ? void 0 : window.innerWidth;
|
|
194
|
-
if (width >= 1024) {
|
|
195
|
-
this.device = 'desktop';
|
|
196
|
-
this.mobileMenuExtended = false; // Close any open mobile menu
|
|
197
|
-
}
|
|
198
|
-
else if (width >= 600) {
|
|
199
|
-
this.device = 'tablet';
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
this.device = 'mobile';
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
handleMobileMenuToggle() {
|
|
206
|
-
this.mobileMenuExtended = !this.mobileMenuExtended;
|
|
207
|
-
}
|
|
208
|
-
render() {
|
|
209
|
-
const mainNavClasses = ['main-navigation'];
|
|
210
|
-
if (this.mobileMenuExtended) {
|
|
211
|
-
mainNavClasses.push('extended');
|
|
212
|
-
}
|
|
213
|
-
return (h(Host, { key: 'a09985740ff01e4f38e7bbe5e0b9012d77e7cba2', version: version }, h("div", { key: 'c612b90e757d916036bee002d7bba8abfeb19073', class: "global-header" }, h("div", { key: 'd11c51f756d1c7a8c0b4f3b9625cfbe8cae88435', class: "global-sub" }, h("div", { key: '43fb63bfe0350ffca0e44fd611bb6bbe6c3eef0c', class: "logo" }, h("slot", { key: '8d90d7f20b0fd6a7cbc93e5dd95ad8200c027822', name: "post-logo" }))), h("div", { key: 'b1bc83b4fcb3a0af6ffd99976af4acf454b3d29d', class: "global-sub" }, this.device === 'desktop' && h("slot", { key: 'bbe38f3e0d070bfd84e1656e7dd631816df0101c', name: "meta-navigation" }), h("slot", { key: 'b1483eea11ecdc9cddf122077cf0746d88f69239', name: "global-controls" }), this.device === 'desktop' && h("slot", { key: '785f557f30bffc5cd282a0505e9ffc7e3e6e1029', name: "post-language-switch" }), h("div", { key: 'f088ddb3df417929525b22a09fa3be113042e48f', onClick: () => this.handleMobileMenuToggle(), class: "mobile-toggle" }, h("slot", { key: 'de65884a443290e057ed911289818d5a323f5a9c', name: "post-togglebutton" })))), h("div", { key: '56ebdec46003a6ead4f3710dc9c0f60e9a86ed8d', class: "title-header d-flex space-between align-center" }, h("slot", { key: '8e61e4711ea8018e51fd11c5b5faa30a1ad9445c', name: "title" }), h("div", { key: '4d762d1f4d3f45470d52af167c7f4a71651e7970', class: "global-sub" }, h("slot", { key: 'c8c5b73b1fa0e665a7133ae8db0212ef8948ba29', name: "local-controls" }), h("slot", { key: '212640155af85dfab34182ab236bfe72456e77b1' }))), h("div", { key: 'c4004d443fd546fac8a2651482725fae99c2db6c', class: mainNavClasses.join(' ') }, h("slot", { key: '783787f85d25d9e42d96213ae77f6c689f872b70', name: "post-mainnavigation" }), (this.device === 'mobile' || this.device === 'tablet') && (h("slot", { key: '04cfd7d09d03ab85ac9c12f9c3d6cb31fbb65fc2', name: "meta-navigation" })), (this.device === 'mobile' || this.device === 'tablet') && (h("slot", { key: '117e76f18fdc93493115428e1cd0d6a119c7a652', name: "post-language-switch" })))));
|
|
214
|
-
}
|
|
215
|
-
get host() { return this; }
|
|
216
|
-
static get style() { return PostHeaderStyle0; }
|
|
217
|
-
}, [1, "post-header", {
|
|
218
|
-
"device": [32],
|
|
219
|
-
"mobileMenuExtended": [32]
|
|
220
|
-
}, [[0, "postMainNavigationClosed", "handlePostMainNavigationClosed"]]]);
|
|
221
|
-
function defineCustomElement() {
|
|
222
|
-
if (typeof customElements === "undefined") {
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
const components = ["post-header"];
|
|
226
|
-
components.forEach(tagName => { switch (tagName) {
|
|
227
|
-
case "post-header":
|
|
228
|
-
if (!customElements.get(tagName)) {
|
|
229
|
-
customElements.define(tagName, PostHeader);
|
|
230
|
-
}
|
|
231
|
-
break;
|
|
232
|
-
} });
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
export { PostHeader as P, defineCustomElement as d };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface PostLanguageOption extends Components.PostLanguageOption, HTMLElement {}
|
|
4
|
-
export const PostLanguageOption: {
|
|
5
|
-
prototype: PostLanguageOption;
|
|
6
|
-
new (): PostLanguageOption;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { d as checkEmptyOrType } from './index2.js';
|
|
3
|
-
import { v as version } from './package.js';
|
|
4
|
-
import { c as checkType } from './check-type.js';
|
|
5
|
-
|
|
6
|
-
const postLanguageOptionCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:inline-block;width:fit-content}button{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button}a{color:inherit;text-decoration:none}:is(a,button){cursor:pointer;display:flex;align-items:center;justify-content:center;height:100%;width:100%;padding:var(--post-language-option-padding)}";
|
|
7
|
-
const PostLanguageOptionStyle0 = postLanguageOptionCss;
|
|
8
|
-
|
|
9
|
-
const PostLanguageOption = /*@__PURE__*/ proxyCustomElement(class PostLanguageOption extends HTMLElement {
|
|
10
|
-
constructor() {
|
|
11
|
-
super();
|
|
12
|
-
this.__registerHost();
|
|
13
|
-
this.__attachShadow();
|
|
14
|
-
this.postChange = createEvent(this, "postChange", 7);
|
|
15
|
-
this.code = undefined;
|
|
16
|
-
this.active = undefined;
|
|
17
|
-
this.name = undefined;
|
|
18
|
-
this.url = undefined;
|
|
19
|
-
}
|
|
20
|
-
validateCode(value = this.code) {
|
|
21
|
-
checkType(value, 'string', 'The "code" property of the post-language-option component must be a string.');
|
|
22
|
-
}
|
|
23
|
-
validateActiveProp(value = this.active) {
|
|
24
|
-
checkEmptyOrType(value, 'boolean', 'The "active" property of the post-language-option component must be a boolean value.');
|
|
25
|
-
}
|
|
26
|
-
validateName(value = this.name) {
|
|
27
|
-
checkEmptyOrType(value, 'string', 'The "name" property of the post-language-option component must be a string.');
|
|
28
|
-
}
|
|
29
|
-
validateUrl(value = this.url) {
|
|
30
|
-
checkEmptyOrType(value, 'string', 'The "url" property of the post-language-option component must be a valid URL.');
|
|
31
|
-
}
|
|
32
|
-
componentDidLoad() {
|
|
33
|
-
this.validateCode();
|
|
34
|
-
this.validateActiveProp();
|
|
35
|
-
this.validateName();
|
|
36
|
-
this.validateUrl();
|
|
37
|
-
if (!this.name && this.isNameRequired()) {
|
|
38
|
-
throw new Error('The "name" property of the post-language-option component is required when the full language name is not displayed.');
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Selects the language option programmatically.
|
|
43
|
-
*/
|
|
44
|
-
async select() {
|
|
45
|
-
this.active = true;
|
|
46
|
-
this.emitChange();
|
|
47
|
-
}
|
|
48
|
-
emitChange() {
|
|
49
|
-
this.postChange.emit(this.code);
|
|
50
|
-
}
|
|
51
|
-
isNameRequired() {
|
|
52
|
-
return this.host.textContent.toLowerCase() === this.code.toLowerCase();
|
|
53
|
-
}
|
|
54
|
-
render() {
|
|
55
|
-
const lang = this.code.toLowerCase();
|
|
56
|
-
return (h(Host, { key: '0a80e062fecb20c7277b89f49a4d774fda80a18e', "data-version": version, role: "listitem" }, this.url ? (h("a", { "aria-current": this.active ? 'page' : undefined, "aria-label": this.name, href: this.url, hrefLang: lang, lang: lang, onClick: () => this.emitChange() }, h("slot", null))) : (h("button", { "aria-current": this.active ? 'true' : undefined, "aria-label": this.name, lang: lang, onClick: () => this.emitChange() }, h("slot", null)))));
|
|
57
|
-
}
|
|
58
|
-
get host() { return this; }
|
|
59
|
-
static get watchers() { return {
|
|
60
|
-
"code": ["validateCode"],
|
|
61
|
-
"active": ["validateActiveProp"],
|
|
62
|
-
"name": ["validateName"],
|
|
63
|
-
"url": ["validateUrl"]
|
|
64
|
-
}; }
|
|
65
|
-
static get style() { return PostLanguageOptionStyle0; }
|
|
66
|
-
}, [1, "post-language-option", {
|
|
67
|
-
"code": [1],
|
|
68
|
-
"active": [1540],
|
|
69
|
-
"name": [1],
|
|
70
|
-
"url": [1],
|
|
71
|
-
"select": [64]
|
|
72
|
-
}, undefined, {
|
|
73
|
-
"code": ["validateCode"],
|
|
74
|
-
"active": ["validateActiveProp"],
|
|
75
|
-
"name": ["validateName"],
|
|
76
|
-
"url": ["validateUrl"]
|
|
77
|
-
}]);
|
|
78
|
-
function defineCustomElement() {
|
|
79
|
-
if (typeof customElements === "undefined") {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
const components = ["post-language-option"];
|
|
83
|
-
components.forEach(tagName => { switch (tagName) {
|
|
84
|
-
case "post-language-option":
|
|
85
|
-
if (!customElements.get(tagName)) {
|
|
86
|
-
customElements.define(tagName, PostLanguageOption);
|
|
87
|
-
}
|
|
88
|
-
break;
|
|
89
|
-
} });
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export { PostLanguageOption as P, defineCustomElement as d };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface PostListItem extends Components.PostListItem, HTMLElement {}
|
|
4
|
-
export const PostListItem: {
|
|
5
|
-
prototype: PostListItem;
|
|
6
|
-
new (): PostListItem;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
|
|
3
|
-
const postListItemCss = ":host{display:flex}";
|
|
4
|
-
const PostListItemStyle0 = postListItemCss;
|
|
5
|
-
|
|
6
|
-
const PostListItem = /*@__PURE__*/ proxyCustomElement(class PostListItem extends HTMLElement {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
this.__registerHost();
|
|
10
|
-
this.__attachShadow();
|
|
11
|
-
}
|
|
12
|
-
connectedCallback() {
|
|
13
|
-
this.host.setAttribute('slot', 'post-list-item');
|
|
14
|
-
}
|
|
15
|
-
render() {
|
|
16
|
-
return (h(Host, { key: 'bbf12424f2997b7d2e7cd9e272def0bf2838f94f', role: "listitem" }, h("slot", { key: '2ce4e71879485f16ad90dfddbd1b79512107bdb0' })));
|
|
17
|
-
}
|
|
18
|
-
get host() { return this; }
|
|
19
|
-
static get style() { return PostListItemStyle0; }
|
|
20
|
-
}, [1, "post-list-item"]);
|
|
21
|
-
function defineCustomElement() {
|
|
22
|
-
if (typeof customElements === "undefined") {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
const components = ["post-list-item"];
|
|
26
|
-
components.forEach(tagName => { switch (tagName) {
|
|
27
|
-
case "post-list-item":
|
|
28
|
-
if (!customElements.get(tagName)) {
|
|
29
|
-
customElements.define(tagName, PostListItem);
|
|
30
|
-
}
|
|
31
|
-
break;
|
|
32
|
-
} });
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export { PostListItem as P, defineCustomElement as d };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface PostList extends Components.PostList, HTMLElement {}
|
|
4
|
-
export const PostList: {
|
|
5
|
-
prototype: PostList;
|
|
6
|
-
new (): PostList;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { v as version } from './package.js';
|
|
3
|
-
|
|
4
|
-
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}";
|
|
5
|
-
const PostListStyle0 = postListCss;
|
|
6
|
-
|
|
7
|
-
const PostList = /*@__PURE__*/ proxyCustomElement(class PostList extends HTMLElement {
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
10
|
-
this.__registerHost();
|
|
11
|
-
this.titleId = undefined;
|
|
12
|
-
this.titleHidden = false;
|
|
13
|
-
this.horizontal = false;
|
|
14
|
-
}
|
|
15
|
-
componentWillLoad() {
|
|
16
|
-
/**
|
|
17
|
-
* Get the id set on the host element or use a random id by default
|
|
18
|
-
*/
|
|
19
|
-
this.titleId = `list-${crypto.randomUUID()}`;
|
|
20
|
-
}
|
|
21
|
-
componentDidLoad() {
|
|
22
|
-
this.checkTitle();
|
|
23
|
-
}
|
|
24
|
-
checkTitle() {
|
|
25
|
-
if (!this.titleEl.textContent.trim()) {
|
|
26
|
-
throw new Error('Please provide a title to the list component. Title is mandatory for accessibility purposes.');
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
render() {
|
|
30
|
-
return (h(Host, { key: '017f05c43fa95bb93c856bbeddd5d26cbc2f4cfa', "data-version": version }, h("div", { key: '71fd7d32c761cecf7b4d5d5f39cedb3bf668a0cb', ref: el => (this.titleEl = el), id: this.titleId, class: `list-title${this.titleHidden ? ' visually-hidden' : ''}` }, h("slot", { key: 'fe0e03d5d25f6a975e04be00549facae49a0970b' })), h("div", { key: 'bb717e4338396c86fa28dbf8236f5f185823f9be', role: "list", "aria-labelledby": this.titleId }, h("slot", { key: '7fd25cab433f5fbbafaa7ca01f42774823cbf579', name: "post-list-item" }))));
|
|
31
|
-
}
|
|
32
|
-
get host() { return this; }
|
|
33
|
-
static get style() { return PostListStyle0; }
|
|
34
|
-
}, [4, "post-list", {
|
|
35
|
-
"titleHidden": [4, "title-hidden"],
|
|
36
|
-
"horizontal": [4],
|
|
37
|
-
"titleId": [32]
|
|
38
|
-
}]);
|
|
39
|
-
function defineCustomElement() {
|
|
40
|
-
if (typeof customElements === "undefined") {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
const components = ["post-list"];
|
|
44
|
-
components.forEach(tagName => { switch (tagName) {
|
|
45
|
-
case "post-list":
|
|
46
|
-
if (!customElements.get(tagName)) {
|
|
47
|
-
customElements.define(tagName, PostList);
|
|
48
|
-
}
|
|
49
|
-
break;
|
|
50
|
-
} });
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export { PostList as P, defineCustomElement as d };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface PostMainnavigation extends Components.PostMainnavigation, HTMLElement {}
|
|
4
|
-
export const PostMainnavigation: {
|
|
5
|
-
prototype: PostMainnavigation;
|
|
6
|
-
new (): PostMainnavigation;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
|
|
3
|
-
const postMainnavigationCss = "*,::before,::after{box-sizing:border-box}@media screen and (min-width: 1024px){slot[name=back-button],[slot=back-button]{display:none}}@media screen and (min-width: 1024px){h2{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}}post-mainnavigation{height:100%}:host{height:100%;display:block}.main-navigation{margin-block:0;list-style:none;display:flex;padding-left:0;gap:1rem}@media screen and (max-width: 1023.99px){.main-navigation{flex-direction:column}}.main-navigation>post-list{display:flex;align-items:stretch;gap:1rem;height:100%}@media screen and (max-width: 1023.99px){.main-navigation>post-list{flex-direction:column}}.main-navigation a,.main-navigation post-megadropdown-toggle{height:100%;display:flex;align-items:center}";
|
|
4
|
-
const PostMainnavigationStyle0 = postMainnavigationCss;
|
|
5
|
-
|
|
6
|
-
const PostMainnavigation = /*@__PURE__*/ proxyCustomElement(class PostMainnavigation extends HTMLElement {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
this.__registerHost();
|
|
10
|
-
this.postToggle = createEvent(this, "postToggle", 7);
|
|
11
|
-
}
|
|
12
|
-
handleMegadropdownToggled(event) {
|
|
13
|
-
// Find next element sibling
|
|
14
|
-
let megalodon;
|
|
15
|
-
let target = event.target;
|
|
16
|
-
while (target !== null) {
|
|
17
|
-
if (target.tagName === 'POST-MEGADROPDOWN') {
|
|
18
|
-
megalodon = target;
|
|
19
|
-
break;
|
|
20
|
-
}
|
|
21
|
-
target = target.nextElementSibling;
|
|
22
|
-
}
|
|
23
|
-
if (megalodon)
|
|
24
|
-
megalodon.toggle(event.target);
|
|
25
|
-
}
|
|
26
|
-
handleBackButtonClick() {
|
|
27
|
-
this.postToggle.emit();
|
|
28
|
-
}
|
|
29
|
-
render() {
|
|
30
|
-
return (h(Host, { key: '7179d087e93ab9e14dc21e16b52beaf965c53cd3', slot: "post-mainnavigation" }, h("div", { key: '2aede886c29972bf1dfebbe4513c4acf2e47c6ea', onClick: () => this.handleBackButtonClick(), class: "back-button" }, h("slot", { key: '4697ec520be78fccee832a358b349f68081b2f54', name: "back-button" })), h("nav", { key: '5bae57025152af07b9d68a19a07b61d0149d31dc', class: "main-navigation" }, h("slot", { key: 'e2a73a4b814a39a7cb1f7733f87c3c588f484006' }))));
|
|
31
|
-
}
|
|
32
|
-
static get style() { return PostMainnavigationStyle0; }
|
|
33
|
-
}, [4, "post-mainnavigation", undefined, [[0, "postToggle", "handleMegadropdownToggled"]]]);
|
|
34
|
-
function defineCustomElement() {
|
|
35
|
-
if (typeof customElements === "undefined") {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
const components = ["post-mainnavigation"];
|
|
39
|
-
components.forEach(tagName => { switch (tagName) {
|
|
40
|
-
case "post-mainnavigation":
|
|
41
|
-
if (!customElements.get(tagName)) {
|
|
42
|
-
customElements.define(tagName, PostMainnavigation);
|
|
43
|
-
}
|
|
44
|
-
break;
|
|
45
|
-
} });
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export { PostMainnavigation as P, defineCustomElement as d };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface PostMegadropdownTrigger extends Components.PostMegadropdownTrigger, HTMLElement {}
|
|
4
|
-
export const PostMegadropdownTrigger: {
|
|
5
|
-
prototype: PostMegadropdownTrigger;
|
|
6
|
-
new (): PostMegadropdownTrigger;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { P as PostMegadropdownTrigger$1, d as defineCustomElement$1 } from './post-megadropdown-trigger2.js';
|
|
2
|
-
|
|
3
|
-
const PostMegadropdownTrigger = PostMegadropdownTrigger$1;
|
|
4
|
-
const defineCustomElement = defineCustomElement$1;
|
|
5
|
-
|
|
6
|
-
export { PostMegadropdownTrigger, defineCustomElement };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
|
|
3
|
-
const postMegadropdownTriggerCss = ":host{display:inline-block}";
|
|
4
|
-
const PostMegadropdownTriggerStyle0 = postMegadropdownTriggerCss;
|
|
5
|
-
|
|
6
|
-
const PostMegadropdownTrigger = /*@__PURE__*/ proxyCustomElement(class PostMegadropdownTrigger extends HTMLElement {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
this.__registerHost();
|
|
10
|
-
this.__attachShadow();
|
|
11
|
-
this.postToggle = createEvent(this, "postToggle", 7);
|
|
12
|
-
this.toggled = false;
|
|
13
|
-
}
|
|
14
|
-
handleClick() {
|
|
15
|
-
this.toggled = !this.toggled;
|
|
16
|
-
this.postToggle.emit();
|
|
17
|
-
}
|
|
18
|
-
render() {
|
|
19
|
-
return (h(Host, { key: 'd139b405fe28c7334c01eec4846a6f8b5bf1e261', slot: "post-megadropdown-trigger" }, h("button", { key: 'd3aee53488359a79764974d440d7a058d5d96873', "aria-expanded": this.toggled, onClick: () => this.handleClick() }, h("slot", { key: '7012055defbb7c8058481db5c4129919847010c6' }))));
|
|
20
|
-
}
|
|
21
|
-
static get style() { return PostMegadropdownTriggerStyle0; }
|
|
22
|
-
}, [1, "post-megadropdown-trigger", {
|
|
23
|
-
"toggled": [32]
|
|
24
|
-
}]);
|
|
25
|
-
function defineCustomElement() {
|
|
26
|
-
if (typeof customElements === "undefined") {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
const components = ["post-megadropdown-trigger"];
|
|
30
|
-
components.forEach(tagName => { switch (tagName) {
|
|
31
|
-
case "post-megadropdown-trigger":
|
|
32
|
-
if (!customElements.get(tagName)) {
|
|
33
|
-
customElements.define(tagName, PostMegadropdownTrigger);
|
|
34
|
-
}
|
|
35
|
-
break;
|
|
36
|
-
} });
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export { PostMegadropdownTrigger as P, defineCustomElement as d };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface PostMegadropdown extends Components.PostMegadropdown, HTMLElement {}
|
|
4
|
-
export const PostMegadropdown: {
|
|
5
|
-
prototype: PostMegadropdown;
|
|
6
|
-
new (): PostMegadropdown;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|