@swisspost/design-system-components 10.0.0-next.47 → 10.0.0-next.49
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/{event-from-AKK8RQrn.js → event-from-C6kpQwhw.js} +2 -2
- package/dist/cjs/index-CpDyH7Ww.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-wsZ6ig4j.js → package-CR0YynRY.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +6 -6
- package/dist/cjs/post-avatar.cjs.entry.js +107 -80
- package/dist/cjs/post-back-to-top.cjs.entry.js +2 -2
- package/dist/cjs/post-banner.cjs.entry.js +3 -3
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +3 -3
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +4 -4
- package/dist/cjs/post-card-control.cjs.entry.js +4 -4
- package/dist/cjs/post-closebutton_15.cjs.entry.js +133 -74
- package/dist/cjs/post-collapsible_2.cjs.entry.js +4 -4
- package/dist/cjs/post-components.cjs.js +1 -1
- package/dist/cjs/post-footer.cjs.entry.js +3 -3
- package/dist/cjs/post-linkarea.cjs.entry.js +19 -8
- package/dist/cjs/post-popover.cjs.entry.js +3 -3
- package/dist/cjs/post-rating.cjs.entry.js +3 -3
- package/dist/cjs/post-tab-header.cjs.entry.js +3 -3
- package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/post-tabs.cjs.entry.js +2 -2
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +2 -2
- package/dist/cjs/post-tooltip.cjs.entry.js +3 -3
- package/dist/collection/animations/pop-in.js +14 -0
- package/dist/collection/components/post-accordion/post-accordion.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +5 -5
- package/dist/collection/components/post-avatar/avatar-utils.js +16 -0
- package/dist/collection/components/post-avatar/post-avatar.css +1 -1
- package/dist/collection/components/post-avatar/post-avatar.js +119 -82
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +1 -1
- package/dist/collection/components/post-banner/post-banner.js +2 -2
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +1 -1
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -1
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +2 -2
- package/dist/collection/components/post-card-control/post-card-control.css +1 -1
- package/dist/collection/components/post-card-control/post-card-control.js +2 -2
- package/dist/collection/components/post-closebutton/post-closebutton.js +1 -19
- package/dist/collection/components/post-collapsible/post-collapsible.js +1 -1
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +1 -1
- package/dist/collection/components/post-footer/post-footer.css +1 -1
- package/dist/collection/components/post-footer/post-footer.js +1 -1
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +11 -2
- package/dist/collection/components/post-icon/post-icon.js +39 -33
- package/dist/collection/components/post-language-option/post-language-option.css +1 -1
- package/dist/collection/components/post-language-option/post-language-option.js +1 -2
- package/dist/collection/components/post-language-switch/post-language-switch.js +1 -2
- package/dist/collection/components/post-linkarea/post-linkarea.css +1 -1
- package/dist/collection/components/post-linkarea/post-linkarea.js +24 -6
- package/dist/collection/components/post-list/post-list.css +1 -1
- package/dist/collection/components/post-list/post-list.js +1 -1
- 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 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +12 -2
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +1 -1
- package/dist/collection/components/post-menu/post-menu.css +1 -1
- package/dist/collection/components/post-menu/post-menu.js +41 -5
- package/dist/collection/components/post-menu-item/post-menu-item.js +1 -1
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +1 -1
- 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.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +18 -7
- package/dist/collection/components/post-rating/post-rating.css +1 -1
- 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.js +3 -3
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +2 -2
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +1 -1
- package/dist/collection/utils/event-from.js +2 -2
- package/dist/component-names.json +39 -0
- package/dist/{esm/event-from-8U5GFtQP.js → components/event-from.js} +2 -2
- package/dist/components/get-root.js +15 -0
- package/dist/components/index.d.ts +73 -0
- package/dist/components/index.js +36 -2315
- package/dist/components/package.js +3 -0
- package/dist/components/post-accordion-item.js +1 -1
- package/dist/components/post-accordion-item2.js +113 -0
- package/dist/components/post-accordion.js +1 -1
- package/dist/components/post-accordion2.js +138 -0
- package/dist/components/post-avatar.js +117 -88
- package/dist/components/post-back-to-top.js +7 -8
- package/dist/components/post-banner.js +10 -11
- package/dist/components/post-breadcrumb-item.js +1 -1
- package/dist/components/post-breadcrumb-item2.js +79 -0
- package/dist/components/post-breadcrumbs.js +16 -17
- package/dist/components/post-card-control.js +11 -12
- package/dist/components/post-closebutton.js +5 -7
- package/dist/components/post-collapsible-trigger.js +1 -1
- package/dist/components/post-collapsible-trigger2.js +135 -0
- package/dist/components/post-collapsible.js +1 -1
- package/dist/components/post-collapsible2.js +110 -0
- package/dist/components/post-footer.js +12 -13
- package/dist/components/post-header.js +18 -10
- package/dist/components/post-icon.js +1 -1
- package/dist/components/post-icon2.js +159 -0
- package/dist/components/post-language-option.js +10 -12
- package/dist/components/post-language-switch.js +13 -15
- package/dist/components/post-linkarea.js +24 -12
- package/dist/components/post-list-item.js +4 -5
- package/dist/components/post-list.js +6 -7
- package/dist/components/post-logo.js +6 -7
- package/dist/components/post-mainnavigation.js +6 -7
- package/dist/components/post-megadropdown-trigger.js +7 -8
- package/dist/components/post-megadropdown.js +20 -11
- package/dist/components/post-menu-item.js +1 -1
- package/dist/components/post-menu-item2.js +30 -0
- package/dist/components/post-menu-trigger.js +1 -1
- package/dist/components/post-menu-trigger2.js +110 -0
- package/dist/components/post-menu.js +1 -1
- package/dist/components/post-menu2.js +237 -0
- package/dist/components/post-popover.js +8 -9
- package/dist/components/post-popovercontainer.js +1 -1
- package/dist/components/post-popovercontainer2.js +3043 -0
- package/dist/components/post-rating.js +10 -11
- package/dist/components/post-tab-header.js +8 -9
- package/dist/components/post-tab-panel.js +7 -8
- package/dist/components/post-tabs.js +7 -8
- package/dist/components/post-togglebutton.js +4 -5
- package/dist/components/post-tooltip-trigger.js +7 -8
- package/dist/components/post-tooltip.js +8 -9
- package/dist/components/react/index.d.ts +33 -0
- package/dist/components/react/index.js +2315 -0
- package/dist/components/{p-Cxrx7SXz.js → react/p-Amg0f2Yo.js} +40 -34
- package/dist/components/{p-C0H2ohSv.js → react/p-B6vPT8S3.js} +3 -3
- package/dist/components/{p-336Lbkey.js → react/p-BDs0pvkX.js} +2 -2
- package/dist/components/react/p-BLchVpF6.js +14 -0
- package/dist/components/{p-BM8mtEfS.js → react/p-BMdFdJWl.js} +2 -2
- package/dist/components/{p-DP5pj8mq.js → react/p-BS0ZqwA-.js} +31 -6
- package/dist/components/react/p-C35MCWIp.js +35 -0
- package/dist/components/react/p-CJ80BZ06.js +178 -0
- package/dist/{esm/index-BWC0gtGU.js → components/react/p-CV7fm1rW.js} +1 -1
- package/dist/components/react/p-C_2k3G1c.js +264 -0
- package/dist/components/{p-DVGX_JCp.js → react/p-D1oOccKr.js} +3 -3
- package/dist/components/{p-pHxypsHK.js → react/p-D50E7y6E.js} +24 -9
- package/dist/components/react/p-DO48NanC.js +3 -0
- package/dist/components/{p-i0-mizzM.js → react/p-DOo9tmN-.js} +2 -2
- package/dist/components/{p-DEi5TIMq.js → react/p-Do9awHW7.js} +3 -3
- package/dist/components/react/p-SbIC4aZX.js +11 -0
- package/dist/components/{p-8U5GFtQP.js → react/p-kraHE1r3.js} +2 -2
- package/dist/components/react/p-r4txK0AC.js +3 -0
- package/dist/components/{p-BSvy4uym.js → react/p-xelWyg_P.js} +8 -8
- package/dist/components/react/post-accordion-item.d.ts +11 -0
- package/dist/components/react/post-accordion-item.js +6 -0
- package/dist/components/react/post-accordion.d.ts +11 -0
- package/dist/components/react/post-accordion.js +6 -0
- package/dist/components/react/post-avatar.d.ts +11 -0
- package/dist/components/react/post-avatar.js +218 -0
- package/dist/components/react/post-back-to-top.d.ts +11 -0
- package/dist/components/react/post-back-to-top.js +145 -0
- package/dist/components/react/post-banner.d.ts +11 -0
- package/dist/components/react/post-banner.js +99 -0
- package/dist/components/react/post-breadcrumb-item.d.ts +11 -0
- package/dist/components/react/post-breadcrumb-item.js +6 -0
- package/dist/components/react/post-breadcrumbs.d.ts +11 -0
- package/dist/components/react/post-breadcrumbs.js +187 -0
- package/dist/components/react/post-card-control.d.ts +11 -0
- package/dist/components/react/post-card-control.js +327 -0
- package/dist/components/react/post-closebutton.d.ts +11 -0
- package/dist/components/react/post-closebutton.js +50 -0
- package/dist/components/react/post-collapsible-trigger.d.ts +11 -0
- package/dist/components/react/post-collapsible-trigger.js +6 -0
- package/dist/components/react/post-collapsible.d.ts +11 -0
- package/dist/components/react/post-collapsible.js +6 -0
- package/dist/components/react/post-footer.d.ts +11 -0
- package/dist/components/react/post-footer.js +117 -0
- package/dist/components/react/post-header.d.ts +11 -0
- package/dist/components/react/post-header.js +342 -0
- package/dist/components/react/post-icon.d.ts +11 -0
- package/dist/components/react/post-icon.js +6 -0
- package/dist/components/react/post-language-option.d.ts +11 -0
- package/dist/components/react/post-language-option.js +100 -0
- package/dist/components/react/post-language-switch.d.ts +11 -0
- package/dist/components/react/post-language-switch.js +158 -0
- package/dist/components/react/post-linkarea.d.ts +11 -0
- package/dist/components/react/post-linkarea.js +59 -0
- package/dist/components/react/post-list-item.d.ts +11 -0
- package/dist/components/react/post-list-item.js +39 -0
- package/dist/components/react/post-list.d.ts +11 -0
- package/dist/components/react/post-list.js +62 -0
- package/dist/components/react/post-logo.d.ts +11 -0
- package/dist/components/react/post-logo.js +59 -0
- package/dist/components/react/post-mainnavigation.d.ts +11 -0
- package/dist/components/react/post-mainnavigation.js +181 -0
- package/dist/components/react/post-megadropdown-trigger.d.ts +11 -0
- package/dist/components/react/post-megadropdown-trigger.js +137 -0
- package/dist/components/react/post-megadropdown.d.ts +11 -0
- package/dist/components/react/post-megadropdown.js +207 -0
- package/dist/components/react/post-menu-item.d.ts +11 -0
- package/dist/components/react/post-menu-item.js +6 -0
- package/dist/components/react/post-menu-trigger.d.ts +11 -0
- package/dist/components/react/post-menu-trigger.js +6 -0
- package/dist/components/react/post-menu.d.ts +11 -0
- package/dist/components/react/post-menu.js +6 -0
- package/dist/components/react/post-popover.d.ts +11 -0
- package/dist/components/react/post-popover.js +189 -0
- package/dist/components/react/post-popovercontainer.d.ts +11 -0
- package/dist/components/react/post-popovercontainer.js +6 -0
- package/dist/components/react/post-rating.d.ts +11 -0
- package/dist/components/react/post-rating.js +153 -0
- package/dist/components/react/post-tab-header.d.ts +11 -0
- package/dist/components/react/post-tab-header.js +53 -0
- package/dist/components/react/post-tab-panel.d.ts +11 -0
- package/dist/components/react/post-tab-panel.js +55 -0
- package/dist/components/react/post-tabs.d.ts +11 -0
- package/dist/components/react/post-tabs.js +197 -0
- package/dist/components/react/post-togglebutton.d.ts +11 -0
- package/dist/components/react/post-togglebutton.js +57 -0
- package/dist/components/react/post-tooltip-trigger.d.ts +11 -0
- package/dist/components/react/post-tooltip-trigger.js +5223 -0
- package/dist/components/react/post-tooltip.d.ts +11 -0
- package/dist/components/react/post-tooltip.js +115 -0
- package/dist/components/switch-variants.js +3 -0
- package/dist/docs.json +71 -35
- package/dist/esm/event-from-kraHE1r3.js +105 -0
- package/dist/esm/index-C8a0ddDa.js +4 -4
- package/dist/esm/index-VmK3ABCB.js +88 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/package-DO48NanC.js +3 -0
- package/dist/esm/post-accordion_2.entry.js +7 -7
- package/dist/esm/post-avatar.entry.js +108 -81
- package/dist/esm/post-back-to-top.entry.js +3 -3
- package/dist/esm/post-banner.entry.js +4 -4
- package/dist/esm/post-breadcrumb-item_2.entry.js +4 -4
- package/dist/esm/post-breadcrumbs.entry.js +5 -5
- package/dist/esm/post-card-control.entry.js +5 -5
- package/dist/esm/post-closebutton_15.entry.js +135 -76
- package/dist/esm/post-collapsible_2.entry.js +5 -5
- package/dist/esm/post-components.js +1 -1
- package/dist/esm/post-footer.entry.js +4 -4
- package/dist/esm/post-linkarea.entry.js +19 -8
- package/dist/esm/post-popover.entry.js +4 -4
- package/dist/esm/post-rating.entry.js +4 -4
- package/dist/esm/post-tab-header.entry.js +4 -4
- package/dist/esm/post-tab-panel.entry.js +3 -3
- package/dist/esm/post-tabs.entry.js +2 -2
- package/dist/esm/post-tooltip-trigger.entry.js +3 -3
- package/dist/esm/post-tooltip.entry.js +4 -4
- package/dist/loader/cdn.js +1 -0
- package/dist/loader/index.cjs.js +1 -0
- package/{loader → dist/loader}/index.d.ts +1 -1
- package/dist/loader/index.es2017.js +1 -0
- package/{loader → dist/loader}/index.js +1 -1
- package/dist/post-components/p-01bc39c2.entry.js +1 -0
- package/dist/post-components/p-0dc1e940.entry.js +1 -0
- package/dist/post-components/p-16da91bc.entry.js +1 -0
- package/dist/post-components/p-26a04741.entry.js +1 -0
- package/dist/post-components/p-2f2f9b22.entry.js +1 -0
- package/dist/post-components/{p-45007aac.entry.js → p-33008981.entry.js} +1 -1
- package/dist/post-components/p-36358cd4.entry.js +1 -0
- package/dist/post-components/p-71c48d48.entry.js +1 -0
- package/dist/post-components/{p-e9802b56.entry.js → p-84395e1d.entry.js} +1 -1
- package/dist/post-components/p-848c10ac.entry.js +1 -0
- package/dist/post-components/{p-ab8017bb.entry.js → p-8d2e5814.entry.js} +1 -1
- package/dist/post-components/{p-a2fa5ce4.entry.js → p-9dbe6595.entry.js} +1 -1
- package/dist/post-components/p-DO48NanC.js +1 -0
- package/dist/post-components/{p-BWC0gtGU.js → p-VmK3ABCB.js} +1 -1
- package/dist/post-components/p-a982458f.entry.js +1 -0
- package/dist/post-components/{p-f67b616a.entry.js → p-b0aaa058.entry.js} +1 -1
- package/dist/post-components/{p-bbe02ba3.entry.js → p-bdeef760.entry.js} +1 -1
- package/dist/post-components/{p-2f698af4.entry.js → p-d221395c.entry.js} +1 -1
- package/dist/post-components/{p-57703aee.entry.js → p-e49aa78e.entry.js} +1 -1
- package/dist/post-components/p-eb405167.entry.js +1 -0
- package/dist/post-components/p-kraHE1r3.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/animations/pop-in.d.ts +1 -0
- package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +3 -3
- package/dist/types/components/post-avatar/avatar-utils.d.ts +3 -0
- package/dist/types/components/post-avatar/post-avatar.d.ts +17 -13
- package/dist/types/components/post-closebutton/post-closebutton.d.ts +0 -6
- package/dist/types/components/post-header/post-header.d.ts +2 -0
- package/dist/types/components/post-icon/post-icon.d.ts +11 -0
- package/dist/types/components/post-linkarea/post-linkarea.d.ts +6 -0
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +2 -1
- package/dist/types/components/post-menu/post-menu.d.ts +7 -0
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +6 -2
- package/dist/types/components/post-tabs/post-tabs.d.ts +2 -2
- package/dist/types/components.d.ts +19 -22
- package/dist/types/utils/component-on-ready.d.ts +2 -2
- package/hydrate/index.js +308 -201
- package/hydrate/index.mjs +308 -201
- package/package.json +24 -12
- package/dist/components/p-Z01QMrov.js +0 -3
- package/dist/esm/package-Z01QMrov.js +0 -3
- package/dist/post-components/p-031f7489.entry.js +0 -1
- package/dist/post-components/p-1e6a068a.entry.js +0 -1
- package/dist/post-components/p-2ca196d6.entry.js +0 -1
- package/dist/post-components/p-3adbdda7.entry.js +0 -1
- package/dist/post-components/p-7b8ab026.entry.js +0 -1
- package/dist/post-components/p-8U5GFtQP.js +0 -1
- package/dist/post-components/p-9428231b.entry.js +0 -1
- package/dist/post-components/p-Z01QMrov.js +0 -1
- package/dist/post-components/p-ac73ab00.entry.js +0 -1
- package/dist/post-components/p-c1cf39cb.entry.js +0 -1
- package/dist/post-components/p-d0d92071.entry.js +0 -1
- package/dist/post-components/p-e96239c4.entry.js +0 -1
- package/dist/prebuild.js +0 -26
- package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/prebuild.d.ts +0 -1
- package/loader/cdn.js +0 -1
- package/loader/index.cjs.js +0 -1
- package/loader/index.es2017.js +0 -1
- /package/dist/components/{p-CJ80BZ06.js → breakpoints.js} +0 -0
- /package/dist/components/{p-SbIC4aZX.js → fade.js} +0 -0
- /package/dist/components/{p-C35MCWIp.js → get-focusable-children.js} +0 -0
- /package/dist/components/{p-r4txK0AC.js → heading-levels.js} +0 -0
- /package/dist/components/{p-BLchVpF6.js → index.browser.js} +0 -0
- /package/dist/components/{p-CV7fm1rW.js → index2.js} +0 -0
- /package/dist/components/{p-C_2k3G1c.js → long-press-event.js} +0 -0
- /package/dist/components/{p-CBFgkSgY.js → react/p-CBFgkSgY.js} +0 -0
- /package/dist/components/{p-DjIHLduJ.js → react/p-DjIHLduJ.js} +0 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { v as version } from './package.js';
|
|
3
|
+
import { c as checkRequiredAndType } from './index2.js';
|
|
4
|
+
import './breakpoints.js';
|
|
5
|
+
import { E as EventFrom } from './event-from.js';
|
|
6
|
+
import { g as getRoot } from './get-root.js';
|
|
7
|
+
|
|
8
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
9
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
10
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
11
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
12
|
+
else
|
|
13
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
14
|
+
if (d = decorators[i])
|
|
15
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
16
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17
|
+
};
|
|
18
|
+
const PostCollapsibleTrigger = /*@__PURE__*/ proxyCustomElement(class PostCollapsibleTrigger extends HTMLElement {
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
this.__registerHost();
|
|
22
|
+
this.__attachShadow();
|
|
23
|
+
this.observer = new MutationObserver(() => this.setTrigger());
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Set the "aria-controls" and "aria-expanded" attributes on the trigger to match the state of the controlled post-collapsible
|
|
27
|
+
*/
|
|
28
|
+
validateAriaAttributes() {
|
|
29
|
+
checkRequiredAndType(this, 'for', 'string');
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Initiate a mutation observer that updates the trigger whenever necessary
|
|
33
|
+
*/
|
|
34
|
+
connectedCallback() {
|
|
35
|
+
this.root = getRoot(this.host);
|
|
36
|
+
this.root.addEventListener('postToggle', this.handlePostToggle);
|
|
37
|
+
this.observer.observe(this.host, { childList: true, subtree: true });
|
|
38
|
+
}
|
|
39
|
+
componentDidLoad() {
|
|
40
|
+
this.setTrigger();
|
|
41
|
+
if (!this.trigger)
|
|
42
|
+
console.warn('The post-collapsible-trigger must contain a button.');
|
|
43
|
+
this.validateAriaAttributes();
|
|
44
|
+
}
|
|
45
|
+
disconnectedCallback() {
|
|
46
|
+
this.observer.disconnect();
|
|
47
|
+
this.root.removeEventListener('postToggle', this.handlePostToggle);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Update the "aria-controls" and "aria-expanded" attributes on the trigger button
|
|
51
|
+
*/
|
|
52
|
+
async update() {
|
|
53
|
+
this.updateAriaAttributes();
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Private handler for the 'postToggle' event.
|
|
57
|
+
* This updates the trigger's "aria-expanded" attribute based on the event detail.
|
|
58
|
+
*/
|
|
59
|
+
handlePostToggle(e) {
|
|
60
|
+
if (this.trigger) {
|
|
61
|
+
this.trigger.setAttribute('aria-expanded', `${e.detail}`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
updateAriaAttributes() {
|
|
65
|
+
if (!this.trigger)
|
|
66
|
+
return;
|
|
67
|
+
// add the provided id to the aria-controls list
|
|
68
|
+
const ariaControls = this.trigger.getAttribute('aria-controls');
|
|
69
|
+
if (!ariaControls?.includes(this.for)) {
|
|
70
|
+
const newAriaControls = ariaControls ? `${ariaControls} ${this.for}` : this.for;
|
|
71
|
+
this.trigger.setAttribute('aria-controls', newAriaControls);
|
|
72
|
+
}
|
|
73
|
+
// set the aria-expanded to `false` if the controlled collapsible is collapsed or undefined, set it to `true` otherwise
|
|
74
|
+
const isCollapsed = this.collapsible?.collapsed;
|
|
75
|
+
const newAriaExpanded = isCollapsed !== undefined ? !isCollapsed : undefined;
|
|
76
|
+
this.trigger.setAttribute('aria-expanded', `${newAriaExpanded}`);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Toggle the post-collapsible controlled by the trigger
|
|
80
|
+
*/
|
|
81
|
+
async toggleCollapsible() {
|
|
82
|
+
await this.collapsible?.toggle();
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Retrieve the post-collapsible controlled by the trigger
|
|
86
|
+
*/
|
|
87
|
+
get collapsible() {
|
|
88
|
+
const ref = this.root.getElementById(this.for);
|
|
89
|
+
if (ref && ref.localName === 'post-collapsible') {
|
|
90
|
+
return ref;
|
|
91
|
+
}
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Find the button and add the proper event listener and ARIA attributes to it
|
|
96
|
+
*/
|
|
97
|
+
setTrigger() {
|
|
98
|
+
const trigger = this.host.querySelector('button');
|
|
99
|
+
if (!trigger || (this.trigger && trigger.isEqualNode(this.trigger)))
|
|
100
|
+
return;
|
|
101
|
+
this.trigger = trigger;
|
|
102
|
+
this.trigger.addEventListener('click', () => this.toggleCollapsible());
|
|
103
|
+
this.updateAriaAttributes();
|
|
104
|
+
}
|
|
105
|
+
render() {
|
|
106
|
+
return (h(Host, { key: 'd0851c032e622f4a182e1321331e84eaa0440245', "data-version": version }, h("slot", { key: 'd495c42f409de0f9230c01031ecddab69cead1b7' })));
|
|
107
|
+
}
|
|
108
|
+
get host() { return this; }
|
|
109
|
+
static get watchers() { return {
|
|
110
|
+
"for": ["validateAriaAttributes"]
|
|
111
|
+
}; }
|
|
112
|
+
}, [1, "post-collapsible-trigger", {
|
|
113
|
+
"for": [513],
|
|
114
|
+
"update": [64]
|
|
115
|
+
}, undefined, {
|
|
116
|
+
"for": ["validateAriaAttributes"]
|
|
117
|
+
}]);
|
|
118
|
+
__decorate([
|
|
119
|
+
EventFrom('post-collapsible')
|
|
120
|
+
], PostCollapsibleTrigger.prototype, "handlePostToggle", null);
|
|
121
|
+
function defineCustomElement() {
|
|
122
|
+
if (typeof customElements === "undefined") {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
const components = ["post-collapsible-trigger"];
|
|
126
|
+
components.forEach(tagName => { switch (tagName) {
|
|
127
|
+
case "post-collapsible-trigger":
|
|
128
|
+
if (!customElements.get(tagName)) {
|
|
129
|
+
customElements.define(tagName, PostCollapsibleTrigger);
|
|
130
|
+
}
|
|
131
|
+
break;
|
|
132
|
+
} });
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export { PostCollapsibleTrigger as P, defineCustomElement as d };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PostCollapsible$1, d as defineCustomElement$1 } from './
|
|
1
|
+
import { P as PostCollapsible$1, d as defineCustomElement$1 } from './post-collapsible2.js';
|
|
2
2
|
|
|
3
3
|
const PostCollapsible = PostCollapsible$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { v as version } from './package.js';
|
|
3
|
+
import { I as IS_BROWSER } from './breakpoints.js';
|
|
4
|
+
import { e as checkEmptyOrType } from './index2.js';
|
|
5
|
+
|
|
6
|
+
function isMotionReduced() {
|
|
7
|
+
return IS_BROWSER ? window.matchMedia('(prefers-reduced-motion: reduce)').matches : false;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const collapseDuration = 350;
|
|
11
|
+
const collapseEasing = 'ease';
|
|
12
|
+
const collapsedKeyframe = { height: '0', overflow: 'hidden' };
|
|
13
|
+
const animationOptions = {
|
|
14
|
+
duration: collapseDuration,
|
|
15
|
+
easing: collapseEasing,
|
|
16
|
+
fill: 'forwards',
|
|
17
|
+
};
|
|
18
|
+
function collapse(el) {
|
|
19
|
+
const elHeight = IS_BROWSER ? window.getComputedStyle(el).height : `${el.scrollHeight}px`;
|
|
20
|
+
const expandedKeyframe = { height: elHeight };
|
|
21
|
+
return el.animate([expandedKeyframe, collapsedKeyframe], animationOptions);
|
|
22
|
+
}
|
|
23
|
+
function expand(el) {
|
|
24
|
+
const expandedKeyframe = { height: `${el.scrollHeight}px`, offset: 1 };
|
|
25
|
+
const finalKeyframe = { height: 'auto', overflow: 'visible' };
|
|
26
|
+
return el.animate([collapsedKeyframe, expandedKeyframe, finalKeyframe], animationOptions);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const postCollapsibleCss = ":host{display:block;position:relative;overflow:hidden}";
|
|
30
|
+
|
|
31
|
+
const PostCollapsible = /*@__PURE__*/ proxyCustomElement(class PostCollapsible extends HTMLElement {
|
|
32
|
+
constructor() {
|
|
33
|
+
super();
|
|
34
|
+
this.__registerHost();
|
|
35
|
+
this.__attachShadow();
|
|
36
|
+
this.postToggle = createEvent(this, "postToggle", 7);
|
|
37
|
+
this.isLoaded = false;
|
|
38
|
+
this.isOpen = true;
|
|
39
|
+
/**
|
|
40
|
+
* If `true`, the element is collapsed otherwise it is displayed.
|
|
41
|
+
*/
|
|
42
|
+
this.collapsed = false;
|
|
43
|
+
}
|
|
44
|
+
collapsedChange() {
|
|
45
|
+
checkEmptyOrType(this, 'collapsed', 'boolean');
|
|
46
|
+
void this.toggle(!this.collapsed);
|
|
47
|
+
}
|
|
48
|
+
componentDidLoad() {
|
|
49
|
+
this.collapsedChange();
|
|
50
|
+
this.isLoaded = true;
|
|
51
|
+
this.updateTriggers();
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Triggers the collapse programmatically.
|
|
55
|
+
*
|
|
56
|
+
* If there is a collapsing transition running already, it will be reversed.
|
|
57
|
+
*/
|
|
58
|
+
async toggle(open = !this.isOpen) {
|
|
59
|
+
if (open === this.isOpen)
|
|
60
|
+
return open;
|
|
61
|
+
this.isOpen = open;
|
|
62
|
+
this.collapsed = !open;
|
|
63
|
+
if (this.isLoaded)
|
|
64
|
+
this.postToggle.emit(open);
|
|
65
|
+
const animation = open ? expand(this.host) : collapse(this.host);
|
|
66
|
+
if (!this.isLoaded || isMotionReduced())
|
|
67
|
+
animation.finish();
|
|
68
|
+
await animation.finished;
|
|
69
|
+
const isHostRendered = this.host.offsetParent;
|
|
70
|
+
if (isHostRendered)
|
|
71
|
+
animation.commitStyles();
|
|
72
|
+
this.updateTriggers();
|
|
73
|
+
return open;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Update all post-collapsible-trigger elements referring to the collapsible
|
|
77
|
+
*/
|
|
78
|
+
updateTriggers() {
|
|
79
|
+
const triggers = document.querySelectorAll(`post-collapsible-trigger[for="${this.host.id}"]`);
|
|
80
|
+
triggers.forEach(trigger => trigger.update());
|
|
81
|
+
}
|
|
82
|
+
render() {
|
|
83
|
+
return (h(Host, { key: '3a11f1a60c536544881def998bcdf81f6d248837', "data-version": version, tabindex: this.collapsed ? -1 : undefined }, h("slot", { key: '6ea66375cdffefd02c8293aa1542c4cbfce905a4' })));
|
|
84
|
+
}
|
|
85
|
+
get host() { return this; }
|
|
86
|
+
static get watchers() { return {
|
|
87
|
+
"collapsed": ["collapsedChange"]
|
|
88
|
+
}; }
|
|
89
|
+
static get style() { return postCollapsibleCss; }
|
|
90
|
+
}, [1, "post-collapsible", {
|
|
91
|
+
"collapsed": [1028],
|
|
92
|
+
"toggle": [64]
|
|
93
|
+
}, undefined, {
|
|
94
|
+
"collapsed": ["collapsedChange"]
|
|
95
|
+
}]);
|
|
96
|
+
function defineCustomElement() {
|
|
97
|
+
if (typeof customElements === "undefined") {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
const components = ["post-collapsible"];
|
|
101
|
+
components.forEach(tagName => { switch (tagName) {
|
|
102
|
+
case "post-collapsible":
|
|
103
|
+
if (!customElements.get(tagName)) {
|
|
104
|
+
customElements.define(tagName, PostCollapsible);
|
|
105
|
+
}
|
|
106
|
+
break;
|
|
107
|
+
} });
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export { PostCollapsible as P, defineCustomElement as d };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { v as version } from './
|
|
3
|
-
import { c as checkRequiredAndType } from './
|
|
4
|
-
import { b as breakpoint } from './
|
|
5
|
-
import { d as defineCustomElement$6 } from './
|
|
6
|
-
import { d as defineCustomElement$5 } from './
|
|
7
|
-
import { d as defineCustomElement$4 } from './
|
|
8
|
-
import { d as defineCustomElement$3 } from './
|
|
9
|
-
import { d as defineCustomElement$2 } from './
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { v as version } from './package.js';
|
|
3
|
+
import { c as checkRequiredAndType } from './index2.js';
|
|
4
|
+
import { b as breakpoint } from './breakpoints.js';
|
|
5
|
+
import { d as defineCustomElement$6 } from './post-accordion2.js';
|
|
6
|
+
import { d as defineCustomElement$5 } from './post-accordion-item2.js';
|
|
7
|
+
import { d as defineCustomElement$4 } from './post-collapsible2.js';
|
|
8
|
+
import { d as defineCustomElement$3 } from './post-collapsible-trigger2.js';
|
|
9
|
+
import { d as defineCustomElement$2 } from './post-icon2.js';
|
|
10
10
|
|
|
11
|
-
const postFooterCss = ":host{display:block}footer{background-color:#fc0;--post-footer-container-padding-block:32px;--post-footer-container-padding-inline:16px;--post-footer-container-max-width:1200px;--post-footer-grid-template:auto / auto;--post-footer-grid-row-gap:0;--post-footer-grid-column-gap:0;--post-footer-grid-margin-block-end:24px;--post-footer-grid-padding-block-end:0;--post-footer-column-flex-direction:column;--post-footer-column-align-items:start;--post-footer-column-gap:0;--post-footer-post-list-flex-direction:column;--post-footer-post-list-gap:8px;--post-footer-post-list-align-items:start;--post-footer-socialmedia-margin-block-end:var(--post-footer-grid-margin-block-end);--post-footer-app-margin-block-end:var(--post-footer-grid-margin-block-end);--post-footer-businesssectors-margin-block-end:var(--post-footer-grid-margin-block-end);--post-footer-meta-margin-block-end:16px;--post-footer-meta-font-size:inherit;--post-footer-copyright-font-size:var(--post-footer-meta-font-size)}@media screen and (min-width: 600px){footer{--post-footer-container-padding-block:40px;--post-footer-grid-template:repeat(2, auto) / repeat(2, auto);--post-footer-grid-row-gap:32px;--post-footer-grid-column-gap:16px;--post-footer-grid-margin-block-end:32px;--post-footer-grid-padding-block-end:32px;--post-footer-post-list-flex-direction:row;--post-footer-post-list-gap:16px;--post-footer-post-list-align-items:center;--post-footer-meta-margin-block-end:8px}}@media screen and (min-width: 780px){footer{--post-footer-container-padding-inline:40px}}@media screen and (min-width: 1024px){footer{--post-footer-container-padding-block:56px;--post-footer-grid-template:auto / repeat(4, auto);--post-footer-grid-row-gap:0;--post-footer-grid-column-gap:24px;--post-footer-grid-margin-block-end:40px;--post-footer-column-flex-direction:row;--post-footer-column-align-items:center;--post-footer-column-gap:32px;--post-footer-post-list-gap:24px;--post-footer-businesssectors-margin-block-end:24px;--post-footer-meta-font-size:16px}}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.footer-container{box-sizing:content-box;margin:0 auto;padding:var(--post-footer-container-padding-block) var(--post-footer-container-padding-inline);max-width:var(--post-footer-container-max-width)}.footer-grid{display:grid;grid-template:var(--post-footer-grid-template);row-gap:var(--post-footer-grid-row-gap);column-gap:var(--post-footer-grid-column-gap);margin-block-end:var(--post-footer-grid-margin-block-end);padding-block-end:var(--post-footer-grid-padding-block-end)}.footer-grid ::part(button),.footer-grid ::part(body){padding-inline:0}.footer-column{display:flex;flex-direction:var(--post-footer-column-flex-direction);flex-wrap:wrap;justify-content:space-between;align-items:var(--post-footer-column-align-items);column-gap:var(--post-footer-column-gap)}.footer-socialmedia ::slotted(post-list),.footer-app ::slotted(post-list),.footer-businesssectors ::slotted(post-list),.footer-meta ::slotted(post-list){display:flex !important;flex-direction:var(--post-footer-post-list-flex-direction) !important;gap:var(--post-footer-post-list-gap) !important;align-items:var(--post-footer-post-list-align-items) !important}.footer-socialmedia{margin-block-end:var(--post-footer-socialmedia-margin-block-end)}.footer-app{margin-block-end:var(--post-footer-app-margin-block-end)}.footer-businesssectors{margin-block-end:var(--post-footer-businesssectors-margin-block-end)}.footer-meta{margin-block-end:var(--post-footer-meta-margin-block-end);font-size:var(--post-footer-meta-font-size)}.footer-copyright{display:flex;flex-wrap:wrap;column-gap:.5rem;font-size:var(--post-footer-copyright-font-size)}.d-none{display:none}
|
|
11
|
+
const postFooterCss = ":host{display:block}footer{background-color:#fc0;--post-footer-container-padding-block:32px;--post-footer-container-padding-inline:16px;--post-footer-container-max-width:1200px;--post-footer-grid-template:auto / auto;--post-footer-grid-row-gap:0;--post-footer-grid-column-gap:0;--post-footer-grid-margin-block-end:24px;--post-footer-grid-padding-block-end:0;--post-footer-column-flex-direction:column;--post-footer-column-align-items:start;--post-footer-column-gap:0;--post-footer-post-list-flex-direction:column;--post-footer-post-list-gap:8px;--post-footer-post-list-align-items:start;--post-footer-socialmedia-margin-block-end:var(--post-footer-grid-margin-block-end);--post-footer-app-margin-block-end:var(--post-footer-grid-margin-block-end);--post-footer-businesssectors-margin-block-end:var(--post-footer-grid-margin-block-end);--post-footer-meta-margin-block-end:16px;--post-footer-meta-font-size:inherit;--post-footer-copyright-font-size:var(--post-footer-meta-font-size)}@media screen and (min-width: 600px){footer{--post-footer-container-padding-block:40px;--post-footer-grid-template:repeat(2, auto) / repeat(2, auto);--post-footer-grid-row-gap:32px;--post-footer-grid-column-gap:16px;--post-footer-grid-margin-block-end:32px;--post-footer-grid-padding-block-end:32px;--post-footer-post-list-flex-direction:row;--post-footer-post-list-gap:16px;--post-footer-post-list-align-items:center;--post-footer-meta-margin-block-end:8px}}@media screen and (min-width: 780px){footer{--post-footer-container-padding-inline:40px}}@media screen and (min-width: 1024px){footer{--post-footer-container-padding-block:56px;--post-footer-grid-template:auto / repeat(4, auto);--post-footer-grid-row-gap:0;--post-footer-grid-column-gap:24px;--post-footer-grid-margin-block-end:40px;--post-footer-column-flex-direction:row;--post-footer-column-align-items:center;--post-footer-column-gap:32px;--post-footer-post-list-gap:24px;--post-footer-businesssectors-margin-block-end:24px;--post-footer-meta-font-size:16px}}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.footer-container{box-sizing:content-box;margin:0 auto;padding:var(--post-footer-container-padding-block) var(--post-footer-container-padding-inline);max-width:var(--post-footer-container-max-width)}.footer-grid{display:grid;grid-template:var(--post-footer-grid-template);row-gap:var(--post-footer-grid-row-gap);column-gap:var(--post-footer-grid-column-gap);margin-block-end:var(--post-footer-grid-margin-block-end);padding-block-end:var(--post-footer-grid-padding-block-end)}.footer-grid ::part(button),.footer-grid ::part(body){padding-inline:0}.footer-column{display:flex;flex-direction:var(--post-footer-column-flex-direction);flex-wrap:wrap;justify-content:space-between;align-items:var(--post-footer-column-align-items);column-gap:var(--post-footer-column-gap)}.footer-socialmedia ::slotted(post-list),.footer-app ::slotted(post-list),.footer-businesssectors ::slotted(post-list),.footer-meta ::slotted(post-list){display:flex !important;flex-direction:var(--post-footer-post-list-flex-direction) !important;gap:var(--post-footer-post-list-gap) !important;align-items:var(--post-footer-post-list-align-items) !important}.footer-socialmedia{margin-block-end:var(--post-footer-socialmedia-margin-block-end)}.footer-app{margin-block-end:var(--post-footer-app-margin-block-end)}.footer-businesssectors{margin-block-end:var(--post-footer-businesssectors-margin-block-end)}.footer-meta{margin-block-end:var(--post-footer-meta-margin-block-end);font-size:var(--post-footer-meta-font-size)}.footer-copyright{display:flex;flex-wrap:wrap;column-gap:.5rem;font-size:var(--post-footer-copyright-font-size)}.d-none{display:none}";
|
|
12
12
|
|
|
13
13
|
const GRID_SLOTS = ['grid-1', 'grid-2', 'grid-3', 'grid-4'];
|
|
14
|
-
const PostFooter$1 = /*@__PURE__*/ proxyCustomElement(class PostFooter extends
|
|
14
|
+
const PostFooter$1 = /*@__PURE__*/ proxyCustomElement(class PostFooter extends HTMLElement {
|
|
15
15
|
validateLabel() {
|
|
16
16
|
checkRequiredAndType(this, 'label', 'string');
|
|
17
17
|
}
|
|
@@ -57,7 +57,7 @@ const PostFooter$1 = /*@__PURE__*/ proxyCustomElement(class PostFooter extends H
|
|
|
57
57
|
return GRID_SLOTS.map(slotName => (h("div", { class: { 'd-none': !this.gridSlotDisplayed[slotName] } }, h("slot", { onSlotchange: this.handleGridSlotChange('tablet', 'desktop'), name: slotName }))));
|
|
58
58
|
}
|
|
59
59
|
render() {
|
|
60
|
-
return (h(Host, { key: '
|
|
60
|
+
return (h(Host, { key: '36aa67b511dd3fdb9c0244b89f80c24feb86b3a6', "data-version": version, "data-color-scheme": "light" }, h("footer", { key: '0b4accb1d39734fda0b2ae7e602ae05618d1f6f8' }, h("h2", { key: '3b6147bb75772338192b17da5086e33d45f0cc4e', class: "visually-hidden" }, this.label), h("div", { key: '3ae237e599d226c8413bd785540f2706a61f130f', class: "footer-container" }, h("div", { key: 'c844467c43a718b117cc863beb75ac1ffccc7286', class: "footer-grid" }, this.device === 'mobile' ? this.renderAccordion() : this.renderColumns()), h("div", { key: 'ab0859972f61a8a0b28184654b0b8a7da5d6d199', class: "footer-column" }, h("div", { key: '9356dc60f36a614718b1e668aa6c8f988e611305', class: "footer-socialmedia" }, h("slot", { key: 'aeea4c639ae1b092a90816cebfc892e7ae9608ac', name: "socialmedia" })), h("div", { key: '6404adf8c76f4756c729c453a4f5285577973596', class: "footer-app" }, h("slot", { key: 'ebfbf7f1b5db296b1de165035156819043d2a329', name: "app" }))), h("div", { key: '38017619c9da0f5abd0b34e9406f94e239e54b99', class: "footer-businesssectors" }, h("slot", { key: '93f13e71cbd102074b6f2a55c369470f66b3ae8d', name: "businesssectors" })), h("div", { key: '88c077c96627d557a47d3136a65196b67fafc2c1', class: "footer-meta" }, h("slot", { key: '9c0f64a2f2d715d6b420938efa63c861415376bd', name: "meta" })), h("div", { key: '1dc3cdbe0cb628d7e688c15de5959758e8837489', class: "footer-copyright" }, h("slot", { key: 'b62fe042ac7b098747bb21605fed2fa6883dbb23', name: "copyright" }))))));
|
|
61
61
|
}
|
|
62
62
|
get host() { return this; }
|
|
63
63
|
static get watchers() { return {
|
|
@@ -109,7 +109,6 @@ function defineCustomElement$1() {
|
|
|
109
109
|
break;
|
|
110
110
|
} });
|
|
111
111
|
}
|
|
112
|
-
defineCustomElement$1();
|
|
113
112
|
|
|
114
113
|
const PostFooter = PostFooter$1;
|
|
115
114
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as throttle, b as breakpoint } from './
|
|
3
|
-
import { v as version } from './
|
|
4
|
-
import { g as getFocusableChildren } from './
|
|
5
|
-
import { E as EventFrom } from './
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { t as throttle, b as breakpoint } from './breakpoints.js';
|
|
3
|
+
import { v as version } from './package.js';
|
|
4
|
+
import { g as getFocusableChildren } from './get-focusable-children.js';
|
|
5
|
+
import { E as EventFrom } from './event-from.js';
|
|
6
6
|
|
|
7
7
|
const easing = 'ease';
|
|
8
8
|
const duration = 500;
|
|
@@ -28,7 +28,7 @@ function slideDown(el, translateSize = '-100%') {
|
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
const postHeaderCss = "*,::before,::after{box-sizing:border-box}:host{z-index:1020;position:relative;--post-logo-height:calc(var(--post-global-header-expanded-height) - var(--post-header-scroll-top, 0px));--post-global-header-top:calc( var(--post-global-header-reduced-height) - var(--post-global-header-expanded-height) );--post-local-header-top:calc( var(--post-global-header-reduced-height) + var(--post-local-header-reduced-height) - var(--post-local-header-expanded-height) );--post-global-controls-top:clamp( 1000 * var(--post-global-header-top), calc(-1 * min(var(--post-header-scroll-top, 0px) / 4, var(--post-global-header-reduced-height))), 0px )}@media screen and (min-width: 1024px){:host:has(.global-sub>*:not(.logo):focus-within),:host:has(.local-sub:focus-within){--post-global-header-top:0;--post-local-header-top:var(--post-global-header-expanded-height);--post-logo-height:var(--post-global-header-expanded-height);--post-global-controls-top:0}}
|
|
31
|
+
const postHeaderCss = "*,::before,::after{box-sizing:border-box}:host{z-index:1020;position:relative;--post-logo-height:calc(var(--post-global-header-expanded-height) - var(--post-header-scroll-top, 0px));--post-global-header-top:calc( var(--post-global-header-reduced-height) - var(--post-global-header-expanded-height) );--post-local-header-top:calc( var(--post-global-header-reduced-height) + var(--post-local-header-reduced-height) - var(--post-local-header-expanded-height) );--post-global-controls-top:clamp( 1000 * var(--post-global-header-top), calc(-1 * min(var(--post-header-scroll-top, 0px) / 4, var(--post-global-header-reduced-height))), 0px )}@media screen and (min-width: 1024px){:host:has(.global-sub>*:not(.logo):focus-within),:host:has(.local-sub:focus-within){--post-global-header-top:0;--post-local-header-top:var(--post-global-header-expanded-height);--post-logo-height:var(--post-global-header-expanded-height);--post-global-controls-top:0}}.d-flex{display:flex}.space-between{justify-content:space-between}.global-header{background-color:#fc0;display:flex;justify-content:space-between;position:sticky;padding-inline:4px;height:var(--post-global-header-expanded-height)}@media screen and (max-width: 1023.98px){.global-header{z-index:4;inset-block-start:0}}@media screen and (min-width: 1024px){.global-header{z-index:5;padding-inline-end:8px;inset-block-start:var(--post-global-header-top);transition:inset-block-start .2s ease-in-out}}.global-header:has(+.local-header.no-navigation.no-title){box-shadow:var(--post-device-elevation-300)}.global-sub{display:flex;align-items:center;gap:24px}@media screen and (min-width: 1024px){.global-sub:not(:has(.logo)){position:relative;transition:inset-block-start .2s ease-in-out;inset-block-start:var(--post-global-controls-top)}.global-sub:not(:last-child):not(:first-child){flex-grow:1}}.align-end{align-items:flex-end}.logo{flex:1 0 auto;height:var(--post-global-header-expanded-height);width:var(--post-global-header-expanded-height);min-height:var(--post-global-header-reduced-height);align-self:flex-end}@media screen and (min-width: 1024px){.logo{transition:height .2 ease-in-out;height:var(--post-logo-height)}}::slotted(ul){margin-block:0 !important;list-style:none;display:flex;padding-inline-start:0;gap:1rem;flex-shrink:0 !important}.local-header{display:flex;position:sticky;inset-block-start:var(--post-local-header-top);flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px;min-height:var(--post-local-header-expanded-min-height);background:#fff;transition:box-shadow .2s ease-in-out}.local-header::after{content:\"\";position:absolute;width:100%;height:1px;background-color:#e1e0dc;inset-block-end:-1px;z-index:1}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.local-header::after{background-color:Highlight}}@media screen and (min-width: 1024px){.local-header{z-index:3;box-shadow:var(--post-device-elevation-300);transition:box-shadow .2s ease-in-out,inset-block-start .2s ease-in-out}.local-header:not(.no-title){padding-block-start:18px}}@media screen and (max-width: 1023.98px){.local-header{z-index:3;padding-block:8px;flex-wrap:wrap;gap:12px}.local-header.local-header-mobile-extended::after{inset-block-end:0}.local-header:not(.local-header-mobile-extended){box-shadow:var(--post-device-elevation-300)}}.local-header.no-navigation{padding-block:0}.local-header.no-navigation .navigation{display:none}.local-header.no-navigation.no-title{display:none}.local-sub{margin-inline-end:16px}@media screen and (max-width: 1023.98px){.local-sub{margin-inline-end:4px}}::slotted(.list-inline){margin:0 !important;z-index:3 !important;position:relative !important}@media screen and (min-width: 1024px){.mobile-toggle{display:none}}.navigation{width:100%}@media screen and (min-width: 1024px){.navigation{inset-block-start:var(--post-global-header-reduced-height)}.navigation::before{display:block;content:\"\";position:absolute;inset:0;z-index:2;background:#fff}}@media screen and (max-width: 1023.98px){.navigation{position:sticky;z-index:2;inset-inline:0;inset-block-start:var(--post-header-height)}.mobile-menu{background-color:#fafafa}::slotted(post-mainnavigation),.navigation-footer{padding-block:16px 24px;padding-inline:40px}::slotted(post-mainnavigation),.navigation-footer,.navigation-target-group{display:none;flex-direction:column}.navigation.extended ::slotted(post-mainnavigation),.navigation.extended .navigation-footer,.navigation.extended .navigation-target-group{display:flex}::slotted(post-mainnavigation){padding-block:24px}.navigation.extended>div{display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;height:calc(min(var(--post-header-scroll-parent-height, 100dvh),100dvh) - var(--post-header-height))}.navigation.extended.megadropdown-open>div{overflow-y:hidden}.navigation.extended ::slotted(post-mainnavigation){flex-grow:1 !important}.navigation-footer{background-color:#f0efed;gap:24px}.navigation-footer ::slotted(post-language-switch){margin-top:16px}}@media screen and (max-width: 1023.98px)and (max-width: 599.98px){.navigation-footer{gap:16px}}@media screen and (max-width: 599.98px){::slotted(post-mainnavigation),.navigation-footer{padding-inline:16px}}";
|
|
32
32
|
|
|
33
33
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
34
34
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -40,7 +40,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
40
40
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
41
41
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
42
42
|
};
|
|
43
|
-
const PostHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends
|
|
43
|
+
const PostHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends HTMLElement {
|
|
44
44
|
get hasMobileMenu() {
|
|
45
45
|
return this.device !== 'desktop' && this.hasNavigation;
|
|
46
46
|
}
|
|
@@ -77,6 +77,7 @@ const PostHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends H
|
|
|
77
77
|
this.throttledResize = throttle(50, () => this.updateLocalHeaderHeight());
|
|
78
78
|
this.device = breakpoint.get('device');
|
|
79
79
|
this.hasNavigation = false;
|
|
80
|
+
this.hasTitle = false;
|
|
80
81
|
this.mobileMenuExtended = false;
|
|
81
82
|
this.megadropdownOpen = false;
|
|
82
83
|
this.breakpointChange = (e) => {
|
|
@@ -113,6 +114,7 @@ const PostHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends H
|
|
|
113
114
|
this.host.addEventListener('click', this.handleLinkClick);
|
|
114
115
|
window.addEventListener('postBreakpoint:device', this.breakpointChange);
|
|
115
116
|
this.checkNavigationExistence();
|
|
117
|
+
this.checkTitleExistence();
|
|
116
118
|
this.switchLanguageSwitchMode();
|
|
117
119
|
this.handleScrollParentResize();
|
|
118
120
|
this.lockBody(false, this.mobileMenuExtended, 'mobileMenuExtended');
|
|
@@ -150,6 +152,9 @@ const PostHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends H
|
|
|
150
152
|
checkNavigationExistence() {
|
|
151
153
|
this.hasNavigation = this.host.querySelectorAll('post-mainnavigation').length > 0;
|
|
152
154
|
}
|
|
155
|
+
checkTitleExistence() {
|
|
156
|
+
this.hasTitle = this.host.querySelectorAll('[slot="title"]').length > 0;
|
|
157
|
+
}
|
|
153
158
|
async closeMobileMenu() {
|
|
154
159
|
this.mobileMenuAnimation.finish();
|
|
155
160
|
const menuButton = this.getMenuButton();
|
|
@@ -289,9 +294,12 @@ const PostHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends H
|
|
|
289
294
|
const localHeaderClasses = ['local-header'];
|
|
290
295
|
if (this.mobileMenuExtended)
|
|
291
296
|
localHeaderClasses.push('local-header-mobile-extended');
|
|
292
|
-
if (!this.hasNavigation)
|
|
297
|
+
if (this.device !== 'desktop' || !this.hasNavigation)
|
|
293
298
|
localHeaderClasses.push('no-navigation');
|
|
294
|
-
|
|
299
|
+
if (!this.hasTitle)
|
|
300
|
+
localHeaderClasses.push('no-title');
|
|
301
|
+
return (h(Host, { key: 'd327fc8735749f46cb8b38531a8514978f92c197', "data-version": version, "data-color-scheme": "light" }, h("div", { key: '07b7a4861cc11d55fce5d749a1d074d37900b48f', class: "global-header" }, h("div", { key: 'bb23cf58b62b53e273921bb0a27a2371983bc8a8', class: "global-sub" }, h("div", { key: '0028ff1ba8be25a238d944eaf25f9679b9e163c6', class: "logo" }, h("slot", { key: '98e0584188a391b99df904fbdf463606548859c7', name: "post-logo" }))), h("div", { key: '6da75517e0923191cc4d478a3f0c7e20d89b860d', class: "global-sub" }, this.device === 'desktop' && h("slot", { key: 'bf5730915d734e9accb0e10bcd0d48ee99781930', name: "target-group" })), h("div", { key: '64f3eafd98d8c34248de4fb78619bb7f3147e5e9', class: "global-sub" }, !this.hasMobileMenu && (h("slot", { key: 'c3ad33a44bf25fede0afbea50937626142e69b6e', name: "meta-navigation" })), h("slot", { key: 'e85d50753a40958be785deebfe01ffbee91f120b', name: "global-controls" }), !this.hasMobileMenu && h("slot", { key: 'e423f47daa544cb7bd11ed54f0ecef93a50e6470', name: "post-language-switch" }), this.hasNavigation && (h("div", { key: '96be5d590fbee1986238e1b7b22a1e6928c1c97f', onClick: () => this.toggleMobileMenu(), class: "mobile-toggle" }, h("slot", { key: '4c9db8b0c416cbd2ffa4e1df6b05aea757bdc6a6', name: "post-togglebutton" }))))), h("div", { key: '43285a4032f7ae356145ce6fb62e3c9896ad8542', class: localHeaderClasses.join(' ') }, h("slot", { key: '74c2313baa4da4bf37d13189c07645374df684d1', name: "title", onSlotchange: () => this.checkTitleExistence() }), this.hasTitle &&
|
|
302
|
+
(h("div", { key: '414b5378922221715071a5d8cfc0b7920018a5b3', class: "local-sub" }, h("slot", { key: 'acb09003e517669a50405a04e5dafa983e78b5f2', name: "local-controls" }), h("slot", { key: '8e1043c4d2e25b6b9432a2ba1885d2128abb9f85' }))), this.device === 'desktop' && this.renderNavigation()), this.device !== 'desktop' && this.renderNavigation()));
|
|
295
303
|
}
|
|
296
304
|
get host() { return this; }
|
|
297
305
|
static get watchers() { return {
|
|
@@ -302,6 +310,7 @@ const PostHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends H
|
|
|
302
310
|
}, [1, "post-header", {
|
|
303
311
|
"device": [32],
|
|
304
312
|
"hasNavigation": [32],
|
|
313
|
+
"hasTitle": [32],
|
|
305
314
|
"mobileMenuExtended": [32],
|
|
306
315
|
"megadropdownOpen": [32],
|
|
307
316
|
"toggleMobileMenu": [64]
|
|
@@ -325,7 +334,6 @@ function defineCustomElement$1() {
|
|
|
325
334
|
break;
|
|
326
335
|
} });
|
|
327
336
|
}
|
|
328
|
-
defineCustomElement$1();
|
|
329
337
|
|
|
330
338
|
const PostHeader = PostHeader$1;
|
|
331
339
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { I as IS_BROWSER } from './breakpoints.js';
|
|
3
|
+
import { d as checkEmptyOrOneOf, e as checkEmptyOrType, c as checkRequiredAndType } from './index2.js';
|
|
4
|
+
import { v as version } from './package.js';
|
|
5
|
+
|
|
6
|
+
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)}}";
|
|
7
|
+
|
|
8
|
+
const CDN_URL = `https://unpkg.com/@swisspost/design-system-icons@${version}/public/post-icons/`;
|
|
9
|
+
const ANIMATION_NAMES = [
|
|
10
|
+
'cylon',
|
|
11
|
+
'cylon-vertical',
|
|
12
|
+
'spin',
|
|
13
|
+
'spin-reverse',
|
|
14
|
+
'fade',
|
|
15
|
+
'throb',
|
|
16
|
+
];
|
|
17
|
+
const ANIMATION_KEYS = [...ANIMATION_NAMES];
|
|
18
|
+
const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLElement {
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
this.__registerHost();
|
|
22
|
+
this.__attachShadow();
|
|
23
|
+
/**
|
|
24
|
+
* When set to `true`, the icon will be flipped horizontally.
|
|
25
|
+
*/
|
|
26
|
+
this.flipH = false;
|
|
27
|
+
/**
|
|
28
|
+
* When set to `true`, the icon will be flipped vertically.
|
|
29
|
+
*/
|
|
30
|
+
this.flipV = false;
|
|
31
|
+
}
|
|
32
|
+
validateAnimation() {
|
|
33
|
+
checkEmptyOrOneOf(this, 'animation', ANIMATION_KEYS);
|
|
34
|
+
}
|
|
35
|
+
validateBase() {
|
|
36
|
+
checkEmptyOrType(this, 'base', 'string');
|
|
37
|
+
}
|
|
38
|
+
validateName() {
|
|
39
|
+
checkRequiredAndType(this, 'name', 'string');
|
|
40
|
+
}
|
|
41
|
+
validateRotate() {
|
|
42
|
+
checkEmptyOrType(this, 'rotate', 'number');
|
|
43
|
+
}
|
|
44
|
+
validateScale() {
|
|
45
|
+
checkEmptyOrType(this, 'scale', 'number');
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Construct the icon URL according to the following rules:
|
|
49
|
+
* 1. `@base` (absolute URL) → use directly.
|
|
50
|
+
* 2. `@base` (relative URL) → resolve with `base href` and/or `origin`
|
|
51
|
+
* - If `base href` is absolute → use just that.
|
|
52
|
+
* - If `base href` is relative → prepend with `origin`.
|
|
53
|
+
* - If `base href` does not exist → use only `origin`.
|
|
54
|
+
* 3. `@meta` (absolute URL) → use directly.
|
|
55
|
+
* 4. `@meta` (relative URL) → resolve with `base href` and/or `origin`. (same as above)
|
|
56
|
+
* 5. `CDN_URL` fallback → `https://unpkg.com/...`.
|
|
57
|
+
**/
|
|
58
|
+
getUrl() {
|
|
59
|
+
const fileName = `${this.name}.svg`;
|
|
60
|
+
if (!IS_BROWSER && !this.base) {
|
|
61
|
+
return `${CDN_URL}${fileName}`;
|
|
62
|
+
}
|
|
63
|
+
const isAbsolute = (url) => /^https?:\/\//.test(url);
|
|
64
|
+
const normalizeUrl = (url) => (url && !url.endsWith('/') ? `${url}/` : url);
|
|
65
|
+
const cleanUrl = (url) => url.replace(/([^:])\/\//g, '$1/');
|
|
66
|
+
const currentDomain = IS_BROWSER ? window.location.origin : '';
|
|
67
|
+
const baseHref = IS_BROWSER
|
|
68
|
+
? document.querySelector('base[href]')?.getAttribute('href') || ''
|
|
69
|
+
: '';
|
|
70
|
+
const metaIconBase = IS_BROWSER
|
|
71
|
+
? document.querySelector('meta[name="design-system-settings"]')?.getAttribute('data-post-icon-base') || ''
|
|
72
|
+
: '';
|
|
73
|
+
// Function to build the first part of the URL when 'this.base' or 'metaIconBase' are relative
|
|
74
|
+
const buildUrlWithBase = (relativeUrl) => {
|
|
75
|
+
const normalizedHref = normalizeUrl(baseHref);
|
|
76
|
+
const normalizedRelative = normalizeUrl(relativeUrl);
|
|
77
|
+
if (isAbsolute(normalizedHref)) {
|
|
78
|
+
return `${normalizedHref}${normalizedRelative}`;
|
|
79
|
+
}
|
|
80
|
+
return `${currentDomain}${normalizedHref}${normalizedRelative}`;
|
|
81
|
+
};
|
|
82
|
+
let url;
|
|
83
|
+
// Highest Priority is this.base
|
|
84
|
+
if (this.base) {
|
|
85
|
+
url = isAbsolute(this.base)
|
|
86
|
+
? `${normalizeUrl(this.base)}${fileName}`
|
|
87
|
+
: `${buildUrlWithBase(this.base)}${fileName}`;
|
|
88
|
+
return cleanUrl(url);
|
|
89
|
+
}
|
|
90
|
+
// Second Priority is metaIconBase
|
|
91
|
+
if (metaIconBase) {
|
|
92
|
+
url = isAbsolute(metaIconBase)
|
|
93
|
+
? `${normalizeUrl(metaIconBase)}${fileName}`
|
|
94
|
+
: `${buildUrlWithBase(metaIconBase)}${fileName}`;
|
|
95
|
+
return cleanUrl(url);
|
|
96
|
+
}
|
|
97
|
+
// Fallback to CDN
|
|
98
|
+
return cleanUrl(`${CDN_URL}${fileName}`);
|
|
99
|
+
}
|
|
100
|
+
getStyles() {
|
|
101
|
+
const url = this.getUrl();
|
|
102
|
+
return Object.entries({
|
|
103
|
+
'-webkit-mask-image': `url(${url})`,
|
|
104
|
+
'mask-image': `url('${url}')`,
|
|
105
|
+
'transform': (this.scale && !isNaN(Number(this.scale)) ? 'scale(' + this.scale + ')' : '') +
|
|
106
|
+
(this.rotate && !isNaN(Number(this.rotate)) ? ' rotate(' + this.rotate + 'deg)' : ''),
|
|
107
|
+
})
|
|
108
|
+
.filter(([_key, value]) => value !== null)
|
|
109
|
+
.reduce((styles, [key, value]) => Object.assign(styles, { [key]: value }), {});
|
|
110
|
+
}
|
|
111
|
+
componentDidLoad() {
|
|
112
|
+
this.validateBase();
|
|
113
|
+
this.validateName();
|
|
114
|
+
this.validateScale();
|
|
115
|
+
this.validateRotate();
|
|
116
|
+
this.validateAnimation();
|
|
117
|
+
}
|
|
118
|
+
render() {
|
|
119
|
+
return (h(Host, { key: '521fb549cef7d0838c999628cf69c5c23e87dfc6', "data-version": version }, h("span", { key: 'cc9ca579bd90fee8cec7868c697bfe59dd677246', style: this.getStyles() })));
|
|
120
|
+
}
|
|
121
|
+
get host() { return this; }
|
|
122
|
+
static get watchers() { return {
|
|
123
|
+
"animation": ["validateAnimation"],
|
|
124
|
+
"base": ["validateBase"],
|
|
125
|
+
"name": ["validateName"],
|
|
126
|
+
"rotate": ["validateRotate"],
|
|
127
|
+
"scale": ["validateScale"]
|
|
128
|
+
}; }
|
|
129
|
+
static get style() { return postIconCss; }
|
|
130
|
+
}, [1, "post-icon", {
|
|
131
|
+
"animation": [1],
|
|
132
|
+
"base": [1],
|
|
133
|
+
"flipH": [4, "flip-h"],
|
|
134
|
+
"flipV": [4, "flip-v"],
|
|
135
|
+
"name": [513],
|
|
136
|
+
"rotate": [2],
|
|
137
|
+
"scale": [2]
|
|
138
|
+
}, undefined, {
|
|
139
|
+
"animation": ["validateAnimation"],
|
|
140
|
+
"base": ["validateBase"],
|
|
141
|
+
"name": ["validateName"],
|
|
142
|
+
"rotate": ["validateRotate"],
|
|
143
|
+
"scale": ["validateScale"]
|
|
144
|
+
}]);
|
|
145
|
+
function defineCustomElement() {
|
|
146
|
+
if (typeof customElements === "undefined") {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
const components = ["post-icon"];
|
|
150
|
+
components.forEach(tagName => { switch (tagName) {
|
|
151
|
+
case "post-icon":
|
|
152
|
+
if (!customElements.get(tagName)) {
|
|
153
|
+
customElements.define(tagName, PostIcon);
|
|
154
|
+
}
|
|
155
|
+
break;
|
|
156
|
+
} });
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export { PostIcon as P, defineCustomElement as d };
|