@swisspost/design-system-components 9.0.0-next.4 → 9.0.0-next.6
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/check-type-64af82a9.js +16 -0
- package/dist/cjs/get-root-7a3498ef.js +11 -0
- package/dist/cjs/{index-01f30442.js → index-824d2b71.js} +2 -15
- package/dist/cjs/index-e1f32cce.js +14 -22
- package/dist/cjs/index.cjs.js +37 -30
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-3f706795.js → package-81d89808.js} +1 -1
- package/dist/cjs/{post-accordion-0391f4c5.js → post-accordion-7d2805f4.js} +1 -1
- package/dist/cjs/{post-accordion-item-19ce78d0.js → post-accordion-item-0d8b65b1.js} +2 -2
- package/dist/cjs/post-accordion-item.cjs.entry.js +4 -3
- package/dist/cjs/post-accordion.cjs.entry.js +2 -2
- package/dist/cjs/{post-avatar-ffba1d23.js → post-avatar-0b87e44f.js} +1 -1
- package/dist/cjs/post-avatar.cjs.entry.js +2 -2
- package/dist/cjs/post-banner-e42f02bd.js +90 -0
- package/dist/cjs/{post-alert.cjs.entry.js → post-banner.cjs.entry.js} +5 -4
- package/dist/cjs/{post-breadcrumb-item-42466f8a.js → post-breadcrumb-item-46a8e876.js} +2 -2
- package/dist/cjs/post-breadcrumb-item.cjs.entry.js +4 -3
- package/dist/cjs/post-card-control-7d3c5545.js +272 -0
- package/dist/cjs/post-card-control.cjs.entry.js +2 -2
- package/dist/cjs/post-closebutton_10.cjs.entry.js +25 -0
- package/dist/cjs/{post-collapsible-trigger-c843f028.js → post-collapsible-trigger-ae50d0d4.js} +6 -12
- package/dist/cjs/post-collapsible_2.cjs.entry.js +5 -3
- package/dist/cjs/post-components.cjs.js +1 -1
- package/dist/cjs/{post-language-option-dab6d431.js → post-language-option-c6049337.js} +4 -3
- package/dist/cjs/post-language-option.cjs.entry.js +4 -3
- package/dist/cjs/{post-popovercontainer-1e6be8ad.js → post-megadropdown-trigger-97472602.js} +516 -15
- package/dist/cjs/post-menu-61c31423.js +176 -0
- package/dist/cjs/post-menu-item-4f393cde.js +20 -0
- package/dist/cjs/post-menu-item.cjs.entry.js +11 -0
- package/dist/cjs/post-menu-trigger-44a5f8e9.js +75 -0
- package/dist/cjs/post-menu-trigger.cjs.entry.js +13 -0
- package/dist/cjs/post-menu.cjs.entry.js +11 -0
- package/dist/cjs/{post-popover-4457dd58.js → post-popover-44fdb733.js} +3 -3
- package/dist/cjs/post-popover.cjs.entry.js +2 -2
- package/dist/cjs/{post-rating-236273be.js → post-rating-4d5e7c8e.js} +2 -2
- package/dist/cjs/post-rating.cjs.entry.js +2 -2
- package/dist/cjs/post-tab-header-3fcb40fa.js +32 -0
- package/dist/cjs/post-tab-header.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-panel-e25974be.js → post-tab-panel-b1a41181.js} +2 -2
- package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/{post-tabs-dc99bddf.js → post-tabs-092790e4.js} +3 -3
- package/dist/cjs/post-tabs.cjs.entry.js +2 -2
- package/dist/cjs/{post-tag-a28852a8.js → post-tag-389a43f7.js} +2 -2
- package/dist/cjs/post-tag.cjs.entry.js +2 -2
- package/dist/cjs/{post-tooltip-78e4129b.js → post-tooltip-c42d6853.js} +3 -3
- package/dist/cjs/post-tooltip.cjs.entry.js +4 -3
- package/dist/collection/collection-manifest.json +9 -2
- package/dist/collection/components/post-avatar/post-avatar.js +1 -1
- package/dist/collection/components/post-banner/banner-types.js +1 -0
- package/dist/collection/components/post-banner/post-banner.css +3 -0
- package/dist/collection/components/{post-alert/post-alert.js → post-banner/post-banner.js} +39 -68
- package/dist/collection/components/post-card-control/post-card-control.css +1 -1
- package/dist/collection/components/post-card-control/post-card-control.js +8 -8
- package/dist/collection/components/post-header/post-header.css +1 -0
- package/dist/collection/components/post-header/post-header.js +103 -0
- package/dist/collection/components/post-list/post-list.js +2 -2
- package/dist/collection/components/post-list-item/post-list-item.js +1 -1
- package/dist/collection/components/post-logo/post-logo.js +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -0
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +61 -0
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -0
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +137 -0
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -0
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +48 -0
- package/dist/collection/components/post-menu/post-menu.css +3 -0
- package/dist/collection/components/post-menu/post-menu.js +278 -0
- package/dist/collection/components/post-menu-item/post-menu-item.css +1 -0
- package/dist/collection/components/post-menu-item/post-menu-item.js +20 -0
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.css +1 -0
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +104 -0
- package/dist/collection/components/post-popover/post-popover.css +1 -1
- package/dist/collection/components/post-popover/post-popover.js +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +2 -2
- package/dist/collection/components/post-rating/post-rating.js +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.css +1 -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 +1 -1
- package/dist/collection/components/post-tag/post-tag.js +2 -2
- package/dist/collection/components/post-tooltip/post-tooltip.js +1 -1
- package/dist/collection/index.js +8 -1
- package/dist/collection/utils/is-focusable.js +26 -0
- package/dist/components/get-root.js +9 -0
- package/dist/components/index.js +8 -1
- package/dist/components/package.js +1 -1
- package/dist/components/post-banner.d.ts +11 -0
- package/dist/components/post-banner.js +6 -0
- package/dist/components/post-banner2.js +125 -0
- package/dist/components/post-card-control2.js +3 -3
- package/dist/components/post-collapsible-trigger2.js +1 -8
- package/dist/components/post-header.d.ts +11 -0
- package/dist/components/post-header.js +6 -0
- package/dist/components/post-header2.js +235 -0
- package/dist/components/post-list-item2.js +1 -1
- package/dist/components/post-list2.js +2 -2
- package/dist/components/post-logo2.js +1 -1
- package/dist/components/post-mainnavigation.d.ts +11 -0
- package/dist/components/post-mainnavigation.js +6 -0
- package/dist/components/post-mainnavigation2.js +48 -0
- package/dist/components/post-megadropdown-trigger.d.ts +11 -0
- package/dist/components/post-megadropdown-trigger.js +6 -0
- package/dist/components/post-megadropdown-trigger2.js +39 -0
- package/dist/components/post-megadropdown.d.ts +11 -0
- package/dist/components/post-megadropdown.js +6 -0
- package/dist/components/post-megadropdown2.js +67 -0
- package/dist/components/post-menu-item.d.ts +11 -0
- package/dist/components/post-menu-item.js +6 -0
- package/dist/components/post-menu-item2.js +33 -0
- package/dist/components/post-menu-trigger.d.ts +11 -0
- package/dist/components/post-menu-trigger.js +6 -0
- package/dist/components/post-menu-trigger2.js +92 -0
- package/dist/components/{post-alert.d.ts → post-menu.d.ts} +4 -4
- package/dist/components/post-menu.js +6 -0
- package/dist/components/post-menu2.js +201 -0
- package/dist/components/post-popover2.js +2 -2
- package/dist/components/post-popovercontainer2.js +2 -2
- package/dist/components/post-rating2.js +1 -1
- package/dist/components/post-tab-header2.js +2 -2
- package/dist/components/post-tab-panel2.js +1 -1
- package/dist/components/post-tabs2.js +2 -2
- package/dist/components/post-tag2.js +1 -1
- package/dist/components/post-tooltip2.js +1 -1
- package/dist/docs.json +707 -187
- package/dist/esm/check-type-8828dbe4.js +14 -0
- package/dist/esm/get-root-7af2e0d1.js +9 -0
- package/dist/esm/index-e1b64755.js +14 -22
- package/dist/esm/{index-642cd1f2.js → index-f8a00dc0.js} +2 -14
- package/dist/esm/index.js +23 -23
- package/dist/esm/loader.js +1 -1
- package/dist/esm/package-c65b0409.js +3 -0
- package/dist/esm/{post-accordion-7ef6d6bf.js → post-accordion-c833c272.js} +1 -1
- package/dist/esm/{post-accordion-item-d98c612f.js → post-accordion-item-19fb4776.js} +2 -2
- package/dist/esm/post-accordion-item.entry.js +4 -3
- package/dist/esm/post-accordion.entry.js +2 -2
- package/dist/esm/{post-avatar-f743d28e.js → post-avatar-f43ebc89.js} +1 -1
- package/dist/esm/post-avatar.entry.js +2 -2
- package/dist/esm/post-banner-cf6f756b.js +88 -0
- package/dist/esm/{post-alert.entry.js → post-banner.entry.js} +4 -3
- package/dist/esm/{post-breadcrumb-item-e287afe1.js → post-breadcrumb-item-a93b91a7.js} +2 -2
- package/dist/esm/post-breadcrumb-item.entry.js +4 -3
- package/dist/esm/post-card-control-017fb9b2.js +270 -0
- package/dist/esm/post-card-control.entry.js +2 -2
- package/dist/esm/post-closebutton_10.entry.js +8 -0
- package/dist/esm/{post-collapsible-trigger-1eca7350.js → post-collapsible-trigger-7b3d0fd3.js} +4 -10
- package/dist/esm/post-collapsible_2.entry.js +5 -3
- package/dist/esm/post-components.js +1 -1
- package/dist/esm/{post-language-option-92ce480f.js → post-language-option-05f53f6f.js} +3 -2
- package/dist/esm/post-language-option.entry.js +4 -3
- package/dist/esm/{post-popovercontainer-409abba0.js → post-megadropdown-trigger-3112a42b.js} +509 -17
- package/dist/esm/post-menu-05396ff7.js +174 -0
- package/dist/esm/post-menu-item-bbbb6a7e.js +18 -0
- package/dist/esm/post-menu-item.entry.js +3 -0
- package/dist/esm/post-menu-trigger-f9f4d299.js +73 -0
- package/dist/esm/post-menu-trigger.entry.js +5 -0
- package/dist/esm/post-menu.entry.js +3 -0
- package/dist/esm/{post-popover-a82bae79.js → post-popover-1ae328eb.js} +3 -3
- package/dist/esm/post-popover.entry.js +2 -2
- package/dist/esm/{post-rating-a6513fc9.js → post-rating-75171e3a.js} +2 -2
- package/dist/esm/post-rating.entry.js +2 -2
- package/dist/esm/post-tab-header-d4d40b0e.js +30 -0
- package/dist/esm/post-tab-header.entry.js +2 -2
- package/dist/esm/{post-tab-panel-56ad2836.js → post-tab-panel-79b42d3e.js} +2 -2
- package/dist/esm/post-tab-panel.entry.js +2 -2
- package/dist/esm/{post-tabs-895b4e96.js → post-tabs-4d880ed8.js} +3 -3
- package/dist/esm/post-tabs.entry.js +2 -2
- package/dist/esm/{post-tag-ee91d6a9.js → post-tag-bf91d0a7.js} +2 -2
- package/dist/esm/post-tag.entry.js +2 -2
- package/dist/esm/{post-tooltip-a4d93fd2.js → post-tooltip-7aa14f94.js} +3 -3
- package/dist/esm/post-tooltip.entry.js +4 -3
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-0338f9da.js +1 -0
- package/dist/post-components/p-314c1090.js +1 -0
- package/dist/post-components/p-34e5b9da.entry.js +1 -0
- package/dist/post-components/p-3899ed87.js +1 -0
- package/dist/post-components/p-3b3b57d0.entry.js +1 -0
- package/dist/post-components/p-4221fd16.js +1 -0
- package/dist/post-components/p-470eb29c.js +1 -0
- package/dist/post-components/{p-bc7cfb53.js → p-476a6342.js} +1 -1
- package/dist/post-components/p-499f3c12.entry.js +1 -0
- package/dist/post-components/p-4a3f67ab.js +1 -0
- package/dist/post-components/{p-7b0616c6.js → p-4ac02dc1.js} +1 -1
- package/dist/post-components/p-4cb59994.js +1 -0
- package/dist/post-components/{p-47279ac4.js → p-4cca12fe.js} +2 -2
- package/dist/post-components/p-56bd7eb7.entry.js +1 -0
- package/dist/post-components/p-61b27b51.entry.js +1 -0
- package/dist/post-components/p-6e37b9bf.entry.js +1 -0
- package/dist/post-components/p-7175208c.entry.js +1 -0
- package/dist/post-components/p-71eb2dc7.js +1 -0
- package/dist/post-components/p-7391daa3.entry.js +1 -0
- package/dist/post-components/p-73a5b344.js +1 -0
- package/dist/post-components/{p-5957a7fa.js → p-7a887455.js} +1 -1
- package/dist/post-components/p-7a995b7e.entry.js +1 -0
- package/dist/post-components/p-888ab913.entry.js +1 -0
- package/dist/post-components/p-8927a8e4.entry.js +1 -0
- package/dist/post-components/p-8fb11b22.entry.js +1 -0
- package/dist/post-components/p-916ec6d5.entry.js +1 -0
- package/dist/post-components/p-98d8ba01.js +1 -0
- package/dist/post-components/p-9d94bf34.js +1 -0
- package/dist/post-components/p-a1a1b679.entry.js +1 -0
- package/dist/post-components/p-a87d8337.entry.js +1 -0
- package/dist/post-components/p-ab0556af.entry.js +1 -0
- package/dist/post-components/{p-6ecb14d1.js → p-b8d230eb.js} +1 -1
- package/dist/post-components/p-c6ac2e45.js +1 -0
- package/dist/post-components/p-c94a2ae1.entry.js +1 -0
- package/dist/post-components/{p-2caf9469.js → p-cd06fab9.js} +1 -1
- package/dist/post-components/p-cf298c46.js +1 -0
- package/dist/post-components/p-d2938e9a.entry.js +1 -0
- package/dist/post-components/p-d6ac46af.js +1 -0
- package/dist/post-components/{p-1a53bc7d.js → p-d7c37aca.js} +1 -1
- package/dist/post-components/p-dddc70f6.entry.js +1 -0
- package/dist/post-components/{p-fb7a5867.js → p-ed12b51d.js} +1 -1
- package/dist/post-components/p-fc91cbc2.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-avatar/post-avatar.d.ts +1 -1
- package/dist/types/components/post-banner/banner-types.d.ts +2 -0
- package/dist/types/components/post-banner/post-banner.d.ts +49 -0
- package/dist/types/components/post-card-control/post-card-control.d.ts +7 -7
- package/dist/types/components/post-header/post-header.d.ts +16 -0
- package/dist/types/components/post-list/post-list.d.ts +1 -1
- package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +10 -0
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +23 -0
- package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +10 -0
- package/dist/types/components/post-menu/post-menu.d.ts +47 -0
- package/dist/types/components/post-menu-item/post-menu-item.d.ts +4 -0
- package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +27 -0
- package/dist/types/components/post-tag/post-tag.d.ts +1 -1
- package/dist/types/components.d.ts +266 -79
- package/dist/types/index.d.ts +8 -1
- package/dist/types/utils/is-focusable.d.ts +1 -0
- package/loaders/get-root.js +9 -0
- package/loaders/index.d.ts +16 -2
- package/loaders/index.js +9 -2
- package/loaders/package.js +1 -1
- package/loaders/post-banner.d.ts +11 -0
- package/loaders/post-banner.js +128 -0
- package/loaders/post-card-control.js +3 -3
- package/loaders/post-collapsible-trigger2.js +1 -8
- package/loaders/post-header.d.ts +11 -0
- package/loaders/post-header.js +238 -0
- package/loaders/post-list-item.js +1 -1
- package/loaders/post-list.js +2 -2
- package/loaders/post-logo.js +1 -1
- package/loaders/post-mainnavigation.d.ts +11 -0
- package/loaders/post-mainnavigation.js +51 -0
- package/loaders/post-megadropdown-trigger.d.ts +11 -0
- package/loaders/post-megadropdown-trigger.js +42 -0
- package/loaders/post-megadropdown.d.ts +11 -0
- package/loaders/post-megadropdown.js +70 -0
- package/loaders/post-menu-item.d.ts +11 -0
- package/loaders/post-menu-item.js +36 -0
- package/loaders/post-menu-trigger.d.ts +11 -0
- package/loaders/post-menu-trigger.js +95 -0
- package/loaders/{post-alert.d.ts → post-menu.d.ts} +4 -4
- package/loaders/post-menu.js +204 -0
- package/loaders/post-popover.js +2 -2
- package/loaders/post-popovercontainer2.js +2 -2
- package/loaders/post-rating.js +1 -1
- package/loaders/post-tab-header.js +2 -2
- package/loaders/post-tab-panel.js +1 -1
- package/loaders/post-tabs.js +2 -2
- package/loaders/post-tag.js +1 -1
- package/loaders/post-tooltip.js +1 -1
- package/package.json +5 -4
- package/dist/cjs/post-alert-278229ad.js +0 -98
- package/dist/cjs/post-card-control-37d6a65a.js +0 -272
- package/dist/cjs/post-closebutton-372c1276.js +0 -16
- package/dist/cjs/post-closebutton.cjs.entry.js +0 -11
- package/dist/cjs/post-icon-ca80afce.js +0 -104
- package/dist/cjs/post-icon.cjs.entry.js +0 -15
- package/dist/cjs/post-list-f2c673ef.js +0 -37
- package/dist/cjs/post-list-item-1b6ce0d0.js +0 -22
- package/dist/cjs/post-list-item.cjs.entry.js +0 -10
- package/dist/cjs/post-list.cjs.entry.js +0 -11
- package/dist/cjs/post-logo-ed8e99c0.js +0 -39
- package/dist/cjs/post-logo.cjs.entry.js +0 -14
- package/dist/cjs/post-popovercontainer.cjs.entry.js +0 -11
- package/dist/cjs/post-tab-header-bce47e34.js +0 -32
- package/dist/collection/components/post-alert/alert-types.js +0 -1
- package/dist/collection/components/post-alert/post-alert.css +0 -7
- package/dist/components/post-alert.js +0 -6
- package/dist/components/post-alert2.js +0 -136
- package/dist/esm/package-aaf62247.js +0 -3
- package/dist/esm/post-alert-2aee0a88.js +0 -96
- package/dist/esm/post-card-control-685ca60d.js +0 -270
- package/dist/esm/post-closebutton-a951a0ba.js +0 -14
- package/dist/esm/post-closebutton.entry.js +0 -3
- package/dist/esm/post-icon-29b33e6a.js +0 -102
- package/dist/esm/post-icon.entry.js +0 -7
- package/dist/esm/post-list-5a17eff9.js +0 -35
- package/dist/esm/post-list-item-12ff4b9c.js +0 -20
- package/dist/esm/post-list-item.entry.js +0 -2
- package/dist/esm/post-list.entry.js +0 -3
- package/dist/esm/post-logo-0a072d4b.js +0 -37
- package/dist/esm/post-logo.entry.js +0 -6
- package/dist/esm/post-popovercontainer.entry.js +0 -3
- package/dist/esm/post-tab-header-2bf36bae.js +0 -30
- package/dist/post-components/p-065de04e.entry.js +0 -1
- package/dist/post-components/p-0af20b10.entry.js +0 -1
- package/dist/post-components/p-13e6577d.js +0 -1
- package/dist/post-components/p-16ff4451.entry.js +0 -1
- package/dist/post-components/p-2b777f74.js +0 -1
- package/dist/post-components/p-3a272de8.entry.js +0 -1
- package/dist/post-components/p-3cc61960.js +0 -1
- package/dist/post-components/p-49445ef1.entry.js +0 -1
- package/dist/post-components/p-5a8157b4.js +0 -1
- package/dist/post-components/p-7986d834.js +0 -1
- package/dist/post-components/p-80e5d228.entry.js +0 -1
- package/dist/post-components/p-8618ccea.entry.js +0 -1
- package/dist/post-components/p-8bd32536.js +0 -1
- package/dist/post-components/p-8f36ccda.entry.js +0 -1
- package/dist/post-components/p-9753c9c7.entry.js +0 -1
- package/dist/post-components/p-9cd82521.js +0 -1
- package/dist/post-components/p-a3cc34a3.js +0 -1
- package/dist/post-components/p-a514b746.entry.js +0 -1
- package/dist/post-components/p-a9efdea5.entry.js +0 -1
- package/dist/post-components/p-aae80acd.entry.js +0 -1
- package/dist/post-components/p-b60d2ab7.entry.js +0 -1
- package/dist/post-components/p-b63a3fc2.entry.js +0 -1
- package/dist/post-components/p-ba14d022.js +0 -1
- package/dist/post-components/p-be5b0cdb.entry.js +0 -1
- package/dist/post-components/p-c79c7d00.entry.js +0 -1
- package/dist/post-components/p-cd91c467.entry.js +0 -1
- package/dist/post-components/p-d176f664.js +0 -1
- package/dist/post-components/p-d37c6cc3.js +0 -1
- package/dist/post-components/p-d528afb2.entry.js +0 -1
- package/dist/post-components/p-d793c76b.js +0 -1
- package/dist/post-components/p-dd871b55.js +0 -1
- package/dist/post-components/p-e1925cd1.entry.js +0 -1
- package/dist/post-components/p-fb62c672.js +0 -1
- package/dist/post-components/p-fda6ce34.js +0 -1
- package/dist/post-components/p-fe602d19.entry.js +0 -1
- package/dist/post-components/p-ffb26d24.entry.js +0 -1
- package/dist/types/components/post-alert/alert-types.d.ts +0 -2
- package/dist/types/components/post-alert/post-alert.d.ts +0 -54
- package/loaders/post-alert.js +0 -139
package/dist/esm/{post-popovercontainer-409abba0.js → post-megadropdown-trigger-3112a42b.js}
RENAMED
|
@@ -1,5 +1,146 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
2
|
-
import { v as version } from './package-
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-e1b64755.js';
|
|
2
|
+
import { v as version } from './package-c65b0409.js';
|
|
3
|
+
import { c as checkEmptyOrOneOf, d as checkEmptyOrType, b as checkEmptyOrUrl } from './index-f8a00dc0.js';
|
|
4
|
+
import { c as checkNonEmpty } from './check-non-empty-58bd6b17.js';
|
|
5
|
+
import { c as checkType } from './check-type-8828dbe4.js';
|
|
6
|
+
|
|
7
|
+
const PostClosebutton = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return (h(Host, { key: 'b7e24245bf8319049c57737d754f566abf70b2ff', "data-version": version }, h("button", { key: 'ab26b009632b4050d45eafc4dcab0e8ede55f943', class: "btn btn-icon-close" }, h("post-icon", { key: 'fa8da29f6f0795c3f0128c008e2fd8caee272fe5', "aria-hidden": "true", name: "2043" }), h("span", { key: 'f55941d6449a08911a2432213cf2f4c2b3f961aa', class: "visually-hidden" }, h("slot", { key: '172454f7bbb2fa54f245137c49d4bde0527a1308' })))));
|
|
13
|
+
}
|
|
14
|
+
get host() { return getElement(this); }
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const postIconCss = ":host{display:inline-block;width:1em;height:1em;vertical-align:-0.15em}span{display:block;width:100%;height:100%;fill:currentColor;forced-color-adjust:preserve-parent-color;background-color:currentColor;-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%}: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)}}";
|
|
18
|
+
const PostIconStyle0 = postIconCss;
|
|
19
|
+
|
|
20
|
+
const CDN_URL = 'https://unpkg.com/@swisspost/design-system-icons/public/post-icons';
|
|
21
|
+
const ANIMATION_NAMES = [
|
|
22
|
+
'cylon',
|
|
23
|
+
'cylon-vertical',
|
|
24
|
+
'spin',
|
|
25
|
+
'spin-reverse',
|
|
26
|
+
'fade',
|
|
27
|
+
'throb',
|
|
28
|
+
];
|
|
29
|
+
const ANIMATION_KEYS = [...ANIMATION_NAMES];
|
|
30
|
+
const PostIcon = class {
|
|
31
|
+
constructor(hostRef) {
|
|
32
|
+
registerInstance(this, hostRef);
|
|
33
|
+
this.svgStyles = undefined;
|
|
34
|
+
this.svgOutput = undefined;
|
|
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
|
+
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
|
+
checkEmptyOrType(newValue, 'string', 'The post-icon "base" prop should be a string.');
|
|
49
|
+
}
|
|
50
|
+
validateFlipH(newValue = this.flipH) {
|
|
51
|
+
checkEmptyOrType(newValue, 'boolean', 'The post-icon "flipH" prop should be a boolean.');
|
|
52
|
+
}
|
|
53
|
+
validateFlipV(newValue = this.flipV) {
|
|
54
|
+
checkEmptyOrType(newValue, 'boolean', 'The post-icon "flipV" prop should be a boolean.');
|
|
55
|
+
}
|
|
56
|
+
validateName(newValue = this.name) {
|
|
57
|
+
checkNonEmpty(newValue, 'The post-icon "name" prop is required!.');
|
|
58
|
+
checkType(newValue, 'string', 'The post-icon "name" prop should be a string.');
|
|
59
|
+
}
|
|
60
|
+
validateRotate(newValue = this.rotate) {
|
|
61
|
+
checkEmptyOrType(newValue, 'number', 'The post-icon "rotate" prop should be a number.');
|
|
62
|
+
}
|
|
63
|
+
validateScale(newValue = this.scale) {
|
|
64
|
+
checkEmptyOrType(newValue, 'number', 'The post-icon "scale" prop should be a number.');
|
|
65
|
+
}
|
|
66
|
+
componentDidLoad() {
|
|
67
|
+
this.validateBase();
|
|
68
|
+
this.validateName();
|
|
69
|
+
this.validateFlipH();
|
|
70
|
+
this.validateFlipV();
|
|
71
|
+
this.validateScale();
|
|
72
|
+
this.validateRotate();
|
|
73
|
+
this.validateAnimation();
|
|
74
|
+
}
|
|
75
|
+
componentWillRender() {
|
|
76
|
+
this.setPath();
|
|
77
|
+
}
|
|
78
|
+
setPath() {
|
|
79
|
+
var _a, _b, _c, _d;
|
|
80
|
+
// Construct icon path from different possible sources
|
|
81
|
+
const metaBase = (_b = (_a = document.head
|
|
82
|
+
.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;
|
|
83
|
+
const fileBase = `${(_d = (_c = this.base) !== null && _c !== void 0 ? _c : metaBase) !== null && _d !== void 0 ? _d : CDN_URL}/`.replace(/\/\/$/, '/');
|
|
84
|
+
const fileName = `${this.name}.svg`;
|
|
85
|
+
const filePath = `${fileBase}${fileName}`;
|
|
86
|
+
this.path = new URL(filePath, window.location.origin).toString();
|
|
87
|
+
}
|
|
88
|
+
render() {
|
|
89
|
+
// create inline styles for some properties
|
|
90
|
+
const svgStyles = Object.entries({
|
|
91
|
+
'-webkit-mask-image': `url('${this.path}')`,
|
|
92
|
+
'mask-image': `url('${this.path}')`,
|
|
93
|
+
'transform': (this.scale && !isNaN(Number(this.scale)) ? 'scale(' + this.scale + ')' : '') +
|
|
94
|
+
(this.rotate && !isNaN(Number(this.rotate)) ? ' rotate(' + this.rotate + 'deg)' : ''),
|
|
95
|
+
})
|
|
96
|
+
.filter(([_key, value]) => value !== null)
|
|
97
|
+
.reduce((styles, [key, value]) => Object.assign(styles, { [key]: value }), {});
|
|
98
|
+
return (h(Host, { key: '86c61ac92270e1b46ef63e2bb0ff4683a16ca794', "data-version": version }, h("span", { key: 'ad856363b96d303912c9085d9d45cb911cbedfc6', style: svgStyles })));
|
|
99
|
+
}
|
|
100
|
+
get host() { return getElement(this); }
|
|
101
|
+
static get watchers() { return {
|
|
102
|
+
"animation": ["validateAnimation"],
|
|
103
|
+
"base": ["validateBase"],
|
|
104
|
+
"flipH": ["validateFlipH"],
|
|
105
|
+
"flipV": ["validateFlipV"],
|
|
106
|
+
"name": ["validateName"],
|
|
107
|
+
"rotate": ["validateRotate"],
|
|
108
|
+
"scale": ["validateScale"]
|
|
109
|
+
}; }
|
|
110
|
+
};
|
|
111
|
+
PostIcon.style = PostIconStyle0;
|
|
112
|
+
|
|
113
|
+
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}";
|
|
114
|
+
const PostLogoStyle0 = postLogoCss;
|
|
115
|
+
|
|
116
|
+
const PostLogo = class {
|
|
117
|
+
constructor(hostRef) {
|
|
118
|
+
registerInstance(this, hostRef);
|
|
119
|
+
this.url = undefined;
|
|
120
|
+
}
|
|
121
|
+
validateUrl() {
|
|
122
|
+
checkEmptyOrUrl(this.url, 'The "url" property of the post-logo is invalid');
|
|
123
|
+
}
|
|
124
|
+
componentDidLoad() {
|
|
125
|
+
this.validateUrl();
|
|
126
|
+
this.checkDescription();
|
|
127
|
+
}
|
|
128
|
+
checkDescription() {
|
|
129
|
+
if (!this.host.textContent) {
|
|
130
|
+
console.warn('Be sure to add descriptive text in the post-logo to ensure good accessibility of the component.');
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
render() {
|
|
134
|
+
const logoLink = this.url && (typeof this.url === 'string' ? this.url : this.url.href);
|
|
135
|
+
const LogoTag = logoLink ? 'a' : 'span';
|
|
136
|
+
return (h(Host, { key: '9f23dca4f568ecbcf3d90387b2a9cb4fa1e85a98', "data-version": version, slot: "post-logo" }, h(LogoTag, Object.assign({ key: '1b303363d3a4a829d4ab4b38bc40cbd3107b55e9', class: "logo" }, (logoLink ? { href: logoLink } : {})), h("span", { key: 'de29d53c4bb663053092b905d32f6597bd9a00d5', class: "description" }, h("slot", { key: 'bdfc96e3d9cb9384a61fa8af91c12a4b119f2f3b', onSlotchange: () => this.checkDescription() })), h("svg", { key: 'f2d1e0803c7f2f3a7c425dd5ebd57346c8d967e6', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 72 72", "aria-hidden": "true" }, h("g", { key: '554a2d4edb796b01969555eccb3f0f34e74f0121', id: "Logo" }, h("rect", { key: '7596d8684037b02d015e48539bddda3f44dfcadf', fill: "#ffcc00", x: "0", y: "0", width: "72", height: "72" }), h("polygon", { key: 'f79c5e941f7d87de1484a934565cf363b49914d5', 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" }), h("path", { key: '7c5babc1703e4f74c08b78916a86c553f8cc6edf', 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" }))))));
|
|
137
|
+
}
|
|
138
|
+
get host() { return getElement(this); }
|
|
139
|
+
static get watchers() { return {
|
|
140
|
+
"url": ["validateUrl"]
|
|
141
|
+
}; }
|
|
142
|
+
};
|
|
143
|
+
PostLogo.style = PostLogoStyle0;
|
|
3
144
|
|
|
4
145
|
/**
|
|
5
146
|
* Custom positioning reference element.
|
|
@@ -1195,7 +1336,7 @@ function isOverflowElement(element) {
|
|
|
1195
1336
|
overflowX,
|
|
1196
1337
|
overflowY,
|
|
1197
1338
|
display
|
|
1198
|
-
} = getComputedStyle(element);
|
|
1339
|
+
} = getComputedStyle$1(element);
|
|
1199
1340
|
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
|
|
1200
1341
|
}
|
|
1201
1342
|
function isTableElement(element) {
|
|
@@ -1212,7 +1353,7 @@ function isTopLayer(element) {
|
|
|
1212
1353
|
}
|
|
1213
1354
|
function isContainingBlock(elementOrCss) {
|
|
1214
1355
|
const webkit = isWebKit();
|
|
1215
|
-
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
|
1356
|
+
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
1216
1357
|
|
|
1217
1358
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1218
1359
|
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));
|
|
@@ -1236,7 +1377,7 @@ function isWebKit() {
|
|
|
1236
1377
|
function isLastTraversableNode(node) {
|
|
1237
1378
|
return ['html', 'body', '#document'].includes(getNodeName(node));
|
|
1238
1379
|
}
|
|
1239
|
-
function getComputedStyle(element) {
|
|
1380
|
+
function getComputedStyle$1(element) {
|
|
1240
1381
|
return getWindow(element).getComputedStyle(element);
|
|
1241
1382
|
}
|
|
1242
1383
|
function getNodeScroll(element) {
|
|
@@ -1294,7 +1435,7 @@ function getOverflowAncestors(node, list, traverseIframes) {
|
|
|
1294
1435
|
}
|
|
1295
1436
|
|
|
1296
1437
|
function getCssDimensions(element) {
|
|
1297
|
-
const css = getComputedStyle(element);
|
|
1438
|
+
const css = getComputedStyle$1(element);
|
|
1298
1439
|
// In testing environments, the `width` and `height` properties are empty
|
|
1299
1440
|
// strings for SVG elements, returning NaN. Fallback to `0` in this case.
|
|
1300
1441
|
let width = parseFloat(css.width) || 0;
|
|
@@ -1399,7 +1540,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
1399
1540
|
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
1400
1541
|
const iframeScale = getScale(currentIFrame);
|
|
1401
1542
|
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
1402
|
-
const css = getComputedStyle(currentIFrame);
|
|
1543
|
+
const css = getComputedStyle$1(currentIFrame);
|
|
1403
1544
|
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
1404
1545
|
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
1405
1546
|
x *= iframeScale.x;
|
|
@@ -1479,7 +1620,7 @@ function getDocumentRect(element) {
|
|
|
1479
1620
|
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
1480
1621
|
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
1481
1622
|
const y = -scroll.scrollTop;
|
|
1482
|
-
if (getComputedStyle(body).direction === 'rtl') {
|
|
1623
|
+
if (getComputedStyle$1(body).direction === 'rtl') {
|
|
1483
1624
|
x += max(html.clientWidth, body.clientWidth) - width;
|
|
1484
1625
|
}
|
|
1485
1626
|
return {
|
|
@@ -1555,7 +1696,7 @@ function hasFixedPositionAncestor(element, stopNode) {
|
|
|
1555
1696
|
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
|
|
1556
1697
|
return false;
|
|
1557
1698
|
}
|
|
1558
|
-
return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
|
|
1699
|
+
return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
|
|
1559
1700
|
}
|
|
1560
1701
|
|
|
1561
1702
|
// A "clipping ancestor" is an `overflow` element with the characteristic of
|
|
@@ -1568,12 +1709,12 @@ function getClippingElementAncestors(element, cache) {
|
|
|
1568
1709
|
}
|
|
1569
1710
|
let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
|
|
1570
1711
|
let currentContainingBlockComputedStyle = null;
|
|
1571
|
-
const elementIsFixed = getComputedStyle(element).position === 'fixed';
|
|
1712
|
+
const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
|
|
1572
1713
|
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
1573
1714
|
|
|
1574
1715
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1575
1716
|
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1576
|
-
const computedStyle = getComputedStyle(currentNode);
|
|
1717
|
+
const computedStyle = getComputedStyle$1(currentNode);
|
|
1577
1718
|
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
1578
1719
|
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
|
|
1579
1720
|
currentContainingBlockComputedStyle = null;
|
|
@@ -1664,11 +1805,11 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
1664
1805
|
}
|
|
1665
1806
|
|
|
1666
1807
|
function isStaticPositioned(element) {
|
|
1667
|
-
return getComputedStyle(element).position === 'static';
|
|
1808
|
+
return getComputedStyle$1(element).position === 'static';
|
|
1668
1809
|
}
|
|
1669
1810
|
|
|
1670
1811
|
function getTrueOffsetParent(element, polyfill) {
|
|
1671
|
-
if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
|
|
1812
|
+
if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
|
|
1672
1813
|
return null;
|
|
1673
1814
|
}
|
|
1674
1815
|
if (polyfill) {
|
|
@@ -1720,7 +1861,7 @@ const getElementRects = async function (data) {
|
|
|
1720
1861
|
};
|
|
1721
1862
|
|
|
1722
1863
|
function isRTL(element) {
|
|
1723
|
-
return getComputedStyle(element).direction === 'rtl';
|
|
1864
|
+
return getComputedStyle$1(element).direction === 'rtl';
|
|
1724
1865
|
}
|
|
1725
1866
|
|
|
1726
1867
|
const platform = {
|
|
@@ -2175,12 +2316,363 @@ const PostPopovercontainer = class {
|
|
|
2175
2316
|
}
|
|
2176
2317
|
}
|
|
2177
2318
|
render() {
|
|
2178
|
-
return (h(Host, { key: '
|
|
2319
|
+
return (h(Host, { key: '97a63bfbf098bd3463eb75678e54ddcc9e4790b3', "data-version": version }, this.arrow && (h("span", { key: 'f6eaa7bd6cd3eb63d15e7d91825365661daae7dd', class: "arrow", ref: el => {
|
|
2179
2320
|
this.arrowRef = el;
|
|
2180
|
-
} })), h("slot", { key: '
|
|
2321
|
+
} })), h("slot", { key: '414055000891719b74c2c449fec2c87a60b62047' })));
|
|
2181
2322
|
}
|
|
2182
2323
|
get host() { return getElement(this); }
|
|
2183
2324
|
};
|
|
2184
2325
|
PostPopovercontainer.style = PostPopovercontainerStyle0;
|
|
2185
2326
|
|
|
2186
|
-
|
|
2327
|
+
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}";
|
|
2328
|
+
const PostListStyle0 = postListCss;
|
|
2329
|
+
|
|
2330
|
+
const PostList = class {
|
|
2331
|
+
constructor(hostRef) {
|
|
2332
|
+
registerInstance(this, hostRef);
|
|
2333
|
+
this.titleId = undefined;
|
|
2334
|
+
this.titleHidden = false;
|
|
2335
|
+
this.horizontal = false;
|
|
2336
|
+
}
|
|
2337
|
+
componentWillLoad() {
|
|
2338
|
+
/**
|
|
2339
|
+
* Get the id set on the host element or use a random id by default
|
|
2340
|
+
*/
|
|
2341
|
+
this.titleId = `list-${crypto.randomUUID()}`;
|
|
2342
|
+
}
|
|
2343
|
+
componentDidLoad() {
|
|
2344
|
+
this.checkTitle();
|
|
2345
|
+
}
|
|
2346
|
+
checkTitle() {
|
|
2347
|
+
if (!this.titleEl.textContent.trim()) {
|
|
2348
|
+
throw new Error('Please provide a title to the list component. Title is mandatory for accessibility purposes.');
|
|
2349
|
+
}
|
|
2350
|
+
}
|
|
2351
|
+
render() {
|
|
2352
|
+
return (h(Host, { key: '6c8341a8a31aff079726fb3414cd83017d297ed2', "data-version": version }, h("div", { key: '90a24e049565179ae20becefac3a4edf43b9c975', ref: el => (this.titleEl = el), id: this.titleId, class: `list-title${this.titleHidden ? ' visually-hidden' : ''}` }, h("slot", { key: '81489d927ad208988da2282b129eec660e2f0bd0' })), h("div", { key: '3aa8ec588c4063d396e32a20097714495421609b', role: "list", "aria-labelledby": this.titleId }, h("slot", { key: '0ae0aeb3e0330582d9025a36d37319ec71b0e7b1', name: "post-list-item" }))));
|
|
2353
|
+
}
|
|
2354
|
+
get host() { return getElement(this); }
|
|
2355
|
+
};
|
|
2356
|
+
PostList.style = PostListStyle0;
|
|
2357
|
+
|
|
2358
|
+
const postListItemCss = ":host{display:flex}";
|
|
2359
|
+
const PostListItemStyle0 = postListItemCss;
|
|
2360
|
+
|
|
2361
|
+
const PostListItem = class {
|
|
2362
|
+
constructor(hostRef) {
|
|
2363
|
+
registerInstance(this, hostRef);
|
|
2364
|
+
}
|
|
2365
|
+
connectedCallback() {
|
|
2366
|
+
this.host.setAttribute('slot', 'post-list-item');
|
|
2367
|
+
}
|
|
2368
|
+
render() {
|
|
2369
|
+
return (h(Host, { key: '8336f46e5c7d9b6b921582498e1d7e62086b3d4b', role: "listitem" }, h("slot", { key: '36ca0d6632ca775793f1db91d747894e0037dca2' })));
|
|
2370
|
+
}
|
|
2371
|
+
get host() { return getElement(this); }
|
|
2372
|
+
};
|
|
2373
|
+
PostListItem.style = PostListItemStyle0;
|
|
2374
|
+
|
|
2375
|
+
/* eslint-disable no-undefined,no-param-reassign,no-shadow */
|
|
2376
|
+
|
|
2377
|
+
/**
|
|
2378
|
+
* Throttle execution of a function. Especially useful for rate limiting
|
|
2379
|
+
* execution of handlers on events like resize and scroll.
|
|
2380
|
+
*
|
|
2381
|
+
* @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher)
|
|
2382
|
+
* are most useful.
|
|
2383
|
+
* @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through,
|
|
2384
|
+
* as-is, to `callback` when the throttled-function is executed.
|
|
2385
|
+
* @param {object} [options] - An object to configure options.
|
|
2386
|
+
* @param {boolean} [options.noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds
|
|
2387
|
+
* while the throttled-function is being called. If noTrailing is false or unspecified, callback will be executed
|
|
2388
|
+
* one final time after the last throttled-function call. (After the throttled-function has not been called for
|
|
2389
|
+
* `delay` milliseconds, the internal counter is reset).
|
|
2390
|
+
* @param {boolean} [options.noLeading] - Optional, defaults to false. If noLeading is false, the first throttled-function call will execute callback
|
|
2391
|
+
* immediately. If noLeading is true, the first the callback execution will be skipped. It should be noted that
|
|
2392
|
+
* callback will never executed if both noLeading = true and noTrailing = true.
|
|
2393
|
+
* @param {boolean} [options.debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is
|
|
2394
|
+
* false (at end), schedule `callback` to execute after `delay` ms.
|
|
2395
|
+
*
|
|
2396
|
+
* @returns {Function} A new, throttled, function.
|
|
2397
|
+
*/
|
|
2398
|
+
function throttle (delay, callback, options) {
|
|
2399
|
+
var _ref = options || {},
|
|
2400
|
+
_ref$noTrailing = _ref.noTrailing,
|
|
2401
|
+
noTrailing = _ref$noTrailing === void 0 ? false : _ref$noTrailing,
|
|
2402
|
+
_ref$noLeading = _ref.noLeading,
|
|
2403
|
+
noLeading = _ref$noLeading === void 0 ? false : _ref$noLeading,
|
|
2404
|
+
_ref$debounceMode = _ref.debounceMode,
|
|
2405
|
+
debounceMode = _ref$debounceMode === void 0 ? undefined : _ref$debounceMode;
|
|
2406
|
+
/*
|
|
2407
|
+
* After wrapper has stopped being called, this timeout ensures that
|
|
2408
|
+
* `callback` is executed at the proper times in `throttle` and `end`
|
|
2409
|
+
* debounce modes.
|
|
2410
|
+
*/
|
|
2411
|
+
var timeoutID;
|
|
2412
|
+
var cancelled = false;
|
|
2413
|
+
|
|
2414
|
+
// Keep track of the last time `callback` was executed.
|
|
2415
|
+
var lastExec = 0;
|
|
2416
|
+
|
|
2417
|
+
// Function to clear existing timeout
|
|
2418
|
+
function clearExistingTimeout() {
|
|
2419
|
+
if (timeoutID) {
|
|
2420
|
+
clearTimeout(timeoutID);
|
|
2421
|
+
}
|
|
2422
|
+
}
|
|
2423
|
+
|
|
2424
|
+
// Function to cancel next exec
|
|
2425
|
+
function cancel(options) {
|
|
2426
|
+
var _ref2 = options || {},
|
|
2427
|
+
_ref2$upcomingOnly = _ref2.upcomingOnly,
|
|
2428
|
+
upcomingOnly = _ref2$upcomingOnly === void 0 ? false : _ref2$upcomingOnly;
|
|
2429
|
+
clearExistingTimeout();
|
|
2430
|
+
cancelled = !upcomingOnly;
|
|
2431
|
+
}
|
|
2432
|
+
|
|
2433
|
+
/*
|
|
2434
|
+
* The `wrapper` function encapsulates all of the throttling / debouncing
|
|
2435
|
+
* functionality and when executed will limit the rate at which `callback`
|
|
2436
|
+
* is executed.
|
|
2437
|
+
*/
|
|
2438
|
+
function wrapper() {
|
|
2439
|
+
for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2440
|
+
arguments_[_key] = arguments[_key];
|
|
2441
|
+
}
|
|
2442
|
+
var self = this;
|
|
2443
|
+
var elapsed = Date.now() - lastExec;
|
|
2444
|
+
if (cancelled) {
|
|
2445
|
+
return;
|
|
2446
|
+
}
|
|
2447
|
+
|
|
2448
|
+
// Execute `callback` and update the `lastExec` timestamp.
|
|
2449
|
+
function exec() {
|
|
2450
|
+
lastExec = Date.now();
|
|
2451
|
+
callback.apply(self, arguments_);
|
|
2452
|
+
}
|
|
2453
|
+
|
|
2454
|
+
/*
|
|
2455
|
+
* If `debounceMode` is true (at begin) this is used to clear the flag
|
|
2456
|
+
* to allow future `callback` executions.
|
|
2457
|
+
*/
|
|
2458
|
+
function clear() {
|
|
2459
|
+
timeoutID = undefined;
|
|
2460
|
+
}
|
|
2461
|
+
if (!noLeading && debounceMode && !timeoutID) {
|
|
2462
|
+
/*
|
|
2463
|
+
* Since `wrapper` is being called for the first time and
|
|
2464
|
+
* `debounceMode` is true (at begin), execute `callback`
|
|
2465
|
+
* and noLeading != true.
|
|
2466
|
+
*/
|
|
2467
|
+
exec();
|
|
2468
|
+
}
|
|
2469
|
+
clearExistingTimeout();
|
|
2470
|
+
if (debounceMode === undefined && elapsed > delay) {
|
|
2471
|
+
if (noLeading) {
|
|
2472
|
+
/*
|
|
2473
|
+
* In throttle mode with noLeading, if `delay` time has
|
|
2474
|
+
* been exceeded, update `lastExec` and schedule `callback`
|
|
2475
|
+
* to execute after `delay` ms.
|
|
2476
|
+
*/
|
|
2477
|
+
lastExec = Date.now();
|
|
2478
|
+
if (!noTrailing) {
|
|
2479
|
+
timeoutID = setTimeout(debounceMode ? clear : exec, delay);
|
|
2480
|
+
}
|
|
2481
|
+
} else {
|
|
2482
|
+
/*
|
|
2483
|
+
* In throttle mode without noLeading, if `delay` time has been exceeded, execute
|
|
2484
|
+
* `callback`.
|
|
2485
|
+
*/
|
|
2486
|
+
exec();
|
|
2487
|
+
}
|
|
2488
|
+
} else if (noTrailing !== true) {
|
|
2489
|
+
/*
|
|
2490
|
+
* In trailing throttle mode, since `delay` time has not been
|
|
2491
|
+
* exceeded, schedule `callback` to execute `delay` ms after most
|
|
2492
|
+
* recent execution.
|
|
2493
|
+
*
|
|
2494
|
+
* If `debounceMode` is true (at begin), schedule `clear` to execute
|
|
2495
|
+
* after `delay` ms.
|
|
2496
|
+
*
|
|
2497
|
+
* If `debounceMode` is false (at end), schedule `callback` to
|
|
2498
|
+
* execute after `delay` ms.
|
|
2499
|
+
*/
|
|
2500
|
+
timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
|
|
2501
|
+
}
|
|
2502
|
+
}
|
|
2503
|
+
wrapper.cancel = cancel;
|
|
2504
|
+
|
|
2505
|
+
// Return the wrapper function.
|
|
2506
|
+
return wrapper;
|
|
2507
|
+
}
|
|
2508
|
+
|
|
2509
|
+
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}}";
|
|
2510
|
+
const PostHeaderStyle0 = postHeaderCss;
|
|
2511
|
+
|
|
2512
|
+
const PostHeader = class {
|
|
2513
|
+
constructor(hostRef) {
|
|
2514
|
+
registerInstance(this, hostRef);
|
|
2515
|
+
this.scrollParent = null;
|
|
2516
|
+
this.throttledScroll = () => this.handleScrollEvent();
|
|
2517
|
+
this.throttledResize = throttle(50, () => this.handleResize());
|
|
2518
|
+
this.device = null;
|
|
2519
|
+
this.mobileMenuExtended = false;
|
|
2520
|
+
}
|
|
2521
|
+
componentWillRender() {
|
|
2522
|
+
this.scrollParent = this.getScrollParent(this.host);
|
|
2523
|
+
this.scrollParent.addEventListener('scroll', this.throttledScroll, { passive: true });
|
|
2524
|
+
window.addEventListener('resize', this.throttledResize, { passive: true });
|
|
2525
|
+
this.handleResize();
|
|
2526
|
+
this.handleScrollEvent();
|
|
2527
|
+
}
|
|
2528
|
+
handlePostMainNavigationClosed() {
|
|
2529
|
+
this.mobileMenuExtended = false;
|
|
2530
|
+
}
|
|
2531
|
+
handleScrollEvent() {
|
|
2532
|
+
// Credits: "https://github.com/qeremy/so/blob/master/so.dom.js#L426"
|
|
2533
|
+
const st = Math.max(0, this.scrollParent instanceof Document
|
|
2534
|
+
? this.scrollParent.documentElement.scrollTop
|
|
2535
|
+
: this.scrollParent.scrollTop);
|
|
2536
|
+
this.host.style.setProperty('--header-scroll-top', `${st}px`);
|
|
2537
|
+
}
|
|
2538
|
+
getScrollParent(node) {
|
|
2539
|
+
let currentParent = node.parentElement;
|
|
2540
|
+
while (currentParent) {
|
|
2541
|
+
if (currentParent.nodeName === 'BODY') {
|
|
2542
|
+
return document;
|
|
2543
|
+
}
|
|
2544
|
+
if (this.isScrollable(currentParent)) {
|
|
2545
|
+
return currentParent;
|
|
2546
|
+
}
|
|
2547
|
+
currentParent = currentParent.parentElement;
|
|
2548
|
+
}
|
|
2549
|
+
return document;
|
|
2550
|
+
}
|
|
2551
|
+
isScrollable(node) {
|
|
2552
|
+
if (!(node instanceof HTMLElement || node instanceof SVGElement)) {
|
|
2553
|
+
return false;
|
|
2554
|
+
}
|
|
2555
|
+
const style = getComputedStyle(node);
|
|
2556
|
+
return ['overflow', 'overflow-x', 'overflow-y'].some(propertyName => {
|
|
2557
|
+
const value = style.getPropertyValue(propertyName);
|
|
2558
|
+
return value === 'auto' || value === 'scroll';
|
|
2559
|
+
});
|
|
2560
|
+
}
|
|
2561
|
+
handleResize() {
|
|
2562
|
+
const width = window === null || window === void 0 ? void 0 : window.innerWidth;
|
|
2563
|
+
if (width >= 1024) {
|
|
2564
|
+
this.device = 'desktop';
|
|
2565
|
+
this.mobileMenuExtended = false; // Close any open mobile menu
|
|
2566
|
+
}
|
|
2567
|
+
else if (width >= 600) {
|
|
2568
|
+
this.device = 'tablet';
|
|
2569
|
+
}
|
|
2570
|
+
else {
|
|
2571
|
+
this.device = 'mobile';
|
|
2572
|
+
}
|
|
2573
|
+
}
|
|
2574
|
+
handleMobileMenuToggle() {
|
|
2575
|
+
this.mobileMenuExtended = !this.mobileMenuExtended;
|
|
2576
|
+
}
|
|
2577
|
+
render() {
|
|
2578
|
+
const mainNavClasses = ['main-navigation'];
|
|
2579
|
+
if (this.mobileMenuExtended) {
|
|
2580
|
+
mainNavClasses.push('extended');
|
|
2581
|
+
}
|
|
2582
|
+
return (h(Host, { key: '5a05f890e66ec97d54fd17ca26436392a4e78e9b', version: version }, h("div", { key: '8f9b79cb289d0c613f6d000cf969ce5bf0b3d62a', class: "global-header" }, h("div", { key: '0a482fc3153e29917ed2df1fcbf39492a18918ef', class: "global-sub" }, h("div", { key: '3d25cc42a1fac21906cb2c487d90de84a9f1d029', class: "logo" }, h("slot", { key: '5a14eb7b8f9927083a56e37d53bc4aed3311b6c8', name: "post-logo" })), this.device === 'desktop' && h("slot", { key: '21bc41d4a09536a33ee3d7a98424a00d3969718f', name: "audience-navigation" })), h("div", { key: '6c8fdc5acc99c165bda366e872ceb32d6918b515', class: "global-sub" }, this.device === 'desktop' && h("slot", { key: '88f681de4d63517d73decd436b7084fca410f021', name: "meta-navigation" }), h("slot", { key: 'b6e5c1143fb89e2940f464bac95277bc2741a5c8', name: "global-controls" }), this.device === 'desktop' && h("slot", { key: '2edb30a148ffaae9f864e9babc03228c63a46314', name: "post-language-switch" }), h("div", { key: 'cc0633f19bd9b948fb2456fdc44431984e3a10eb', onClick: () => this.handleMobileMenuToggle(), class: "mobile-toggle" }, h("slot", { key: '26fa9aa29cab7e4048c387ee6c49216dc911f209', name: "post-togglebutton" })))), h("div", { key: '772afbe63ac2f0ae0527e25c6feac75b02365689', class: "title-header d-flex space-between align-center" }, h("slot", { key: '32bf212b1e16df0a2fd7cec6b21a7649458e7660', name: "title" }), h("div", { key: '13bf9f2443fa9c48c6f25a0159896995e170b4dc', class: "global-sub" }, h("slot", { key: 'a20c9414619c9508600c25ef31d5c14f6178f520', name: "local-controls" }), h("slot", { key: 'a87beb7500f4e07396bf4a91ee299a4bebd751bd' }))), h("div", { key: '008c9d1a0acf59a9b54facec5e6aec2f483f8ed7', class: mainNavClasses.join(' ') }, (this.device === 'mobile' || this.device === 'tablet') && (h("slot", { key: 'e8013ae7c0fe3883a4be405409fd3b35e236cf8c', name: "audience-navigation" })), h("slot", { key: '90412d08f0a835714de0a6c635f82aae90abeac2', name: "post-mainnavigation" }), (this.device === 'mobile' || this.device === 'tablet') && (h("slot", { key: '31fb4b34ddabda5f87f65a6c841b64f4a9802d50', name: "meta-navigation" })), (this.device === 'mobile' || this.device === 'tablet') && (h("slot", { key: 'cfd212a052d0b736d049084f492c614131ae7a32', name: "post-language-switch" })))));
|
|
2583
|
+
}
|
|
2584
|
+
get host() { return getElement(this); }
|
|
2585
|
+
};
|
|
2586
|
+
PostHeader.style = PostHeaderStyle0;
|
|
2587
|
+
|
|
2588
|
+
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}";
|
|
2589
|
+
const PostMainnavigationStyle0 = postMainnavigationCss;
|
|
2590
|
+
|
|
2591
|
+
const PostMainnavigation = class {
|
|
2592
|
+
constructor(hostRef) {
|
|
2593
|
+
registerInstance(this, hostRef);
|
|
2594
|
+
this.postToggle = createEvent(this, "postToggle", 7);
|
|
2595
|
+
}
|
|
2596
|
+
handleMegadropdownToggled(event) {
|
|
2597
|
+
// Find next element sibling
|
|
2598
|
+
let megalodon;
|
|
2599
|
+
let target = event.target;
|
|
2600
|
+
while (target !== null) {
|
|
2601
|
+
if (target.tagName === 'POST-MEGADROPDOWN') {
|
|
2602
|
+
megalodon = target;
|
|
2603
|
+
break;
|
|
2604
|
+
}
|
|
2605
|
+
target = target.nextElementSibling;
|
|
2606
|
+
}
|
|
2607
|
+
if (megalodon)
|
|
2608
|
+
megalodon.toggle(event.target);
|
|
2609
|
+
}
|
|
2610
|
+
handleBackButtonClick() {
|
|
2611
|
+
this.postToggle.emit();
|
|
2612
|
+
}
|
|
2613
|
+
render() {
|
|
2614
|
+
return (h(Host, { key: '1c1d1d1c2781f39acc0fd02d3f93f922d801d98f', slot: "post-mainnavigation" }, h("div", { key: '1bc1129c65fc03ec72609438bbf28afe5bc5974b', onClick: () => this.handleBackButtonClick(), class: "back-button" }, h("slot", { key: '6b1bcc25306f1f959a25b18a6319eb696b0cbc2c', name: "back-button" })), h("nav", { key: '0002b55cb82fbf88a69a886c5ec1ba24168c9979', class: "main-navigation" }, h("slot", { key: '15e4558c1202f8f83e09dad76441d6bf7e3e16ea' }))));
|
|
2615
|
+
}
|
|
2616
|
+
};
|
|
2617
|
+
PostMainnavigation.style = PostMainnavigationStyle0;
|
|
2618
|
+
|
|
2619
|
+
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}";
|
|
2620
|
+
const PostMegadropdownStyle0 = postMegadropdownCss;
|
|
2621
|
+
|
|
2622
|
+
const PostMegadropdown = class {
|
|
2623
|
+
constructor(hostRef) {
|
|
2624
|
+
registerInstance(this, hostRef);
|
|
2625
|
+
}
|
|
2626
|
+
/**
|
|
2627
|
+
* Show megadropdown
|
|
2628
|
+
* @param element HTMLElement
|
|
2629
|
+
* @returns boolean
|
|
2630
|
+
*/
|
|
2631
|
+
async show(element) {
|
|
2632
|
+
return this.popoverRef.show(element);
|
|
2633
|
+
}
|
|
2634
|
+
/**
|
|
2635
|
+
* Hide megadropdown
|
|
2636
|
+
* @returns boolean
|
|
2637
|
+
*/
|
|
2638
|
+
async hide() {
|
|
2639
|
+
return this.popoverRef.hide();
|
|
2640
|
+
}
|
|
2641
|
+
/**
|
|
2642
|
+
* Toggle megadropdown
|
|
2643
|
+
* @param element HTMLElement
|
|
2644
|
+
* @param force boolean
|
|
2645
|
+
* @returns boolean
|
|
2646
|
+
*/
|
|
2647
|
+
async toggle(element, force) {
|
|
2648
|
+
return this.popoverRef.toggle(element, force !== null && force !== void 0 ? force : undefined);
|
|
2649
|
+
}
|
|
2650
|
+
handleBackButtonClick() {
|
|
2651
|
+
this.hide();
|
|
2652
|
+
}
|
|
2653
|
+
render() {
|
|
2654
|
+
return (h(Host, { key: '6b30399852561a911c04a79c7c785bb5cf8e68ff', slot: "post-mainnavigation" }, h("post-popovercontainer", { key: 'caa196c59c0177948a73c43033f7399344068d77', placement: "bottom", "edge-gap": "0", ref: el => (this.popoverRef = el) }, h("div", { key: '7c88bd1ca7fac00b9ab0cb1d73252c6990484fb2', class: "megadropdown" }, h("div", { key: '25073177e9c9a05fca93b3b0abbed18f6b2a075b', onClick: () => this.handleBackButtonClick(), class: "back-button" }, h("slot", { key: '06a153e974f60476f2796e03afea3ad86c7560ca', name: "back-button" })), h("slot", { key: 'ea95044efbd609894dd96b3aa8662756e14711af' })))));
|
|
2655
|
+
}
|
|
2656
|
+
};
|
|
2657
|
+
PostMegadropdown.style = PostMegadropdownStyle0;
|
|
2658
|
+
|
|
2659
|
+
const postMegadropdownTriggerCss = ":host{display:inline-block}";
|
|
2660
|
+
const PostMegadropdownTriggerStyle0 = postMegadropdownTriggerCss;
|
|
2661
|
+
|
|
2662
|
+
const PostMegadropdownTrigger = class {
|
|
2663
|
+
constructor(hostRef) {
|
|
2664
|
+
registerInstance(this, hostRef);
|
|
2665
|
+
this.postToggle = createEvent(this, "postToggle", 7);
|
|
2666
|
+
this.toggled = false;
|
|
2667
|
+
}
|
|
2668
|
+
handleClick() {
|
|
2669
|
+
this.toggled = !this.toggled;
|
|
2670
|
+
this.postToggle.emit();
|
|
2671
|
+
}
|
|
2672
|
+
render() {
|
|
2673
|
+
return (h(Host, { key: 'af6dbf6cb97c5f98242e2d3fc31f193d00444b26', slot: "post-megadropdown-trigger" }, h("button", { key: '8160075f3dcb5afdd88a375698a61edfdbe8b7a1', "aria-expanded": this.toggled, onClick: () => this.handleClick() }, h("slot", { key: 'f5be082b15802582540d9a3320d4bf19ca3d98c3' }))));
|
|
2674
|
+
}
|
|
2675
|
+
};
|
|
2676
|
+
PostMegadropdownTrigger.style = PostMegadropdownTriggerStyle0;
|
|
2677
|
+
|
|
2678
|
+
export { PostClosebutton as P, PostIcon as a, PostLogo as b, PostPopovercontainer as c, PostList as d, PostListItem as e, PostHeader as f, PostMainnavigation as g, PostMegadropdown as h, PostMegadropdownTrigger as i };
|