@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,100 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
|
|
2
|
+
import { c as checkRequiredAndType, d as checkEmptyOrOneOf, e as checkEmptyOrType, a as checkEmptyOrUrl } from './p-CV7fm1rW.js';
|
|
3
|
+
import './p-CJ80BZ06.js';
|
|
4
|
+
import { v as version } from './p-DO48NanC.js';
|
|
5
|
+
import { S as SWITCH_VARIANTS } from './p-DjIHLduJ.js';
|
|
6
|
+
|
|
7
|
+
const postLanguageOptionCss = "post-language-option{display:inline-block}post-language-option button{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-option button{background-color:ButtonFace !important}post-language-option button:hover{background-color:Highlight !important}}post-language-option button .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}post-language-option a{color:var(--post-current-fg);text-decoration:none}post-language-option :is(a,button){cursor:pointer;display:flex;align-items:center;justify-content:center;width:100%;height:100%;text-transform:uppercase}post-language-option :is(a,button){outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}post-language-option :is(a,button):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;outline-offset:-2px !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-option :is(a,button):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){post-language-option :is(a,button):is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;outline-offset:-2px !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-option :is(a,button):is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}post-language-option:where([variant=list]) :is(a,button){padding-inline:0;width:40px;height:40px;border-radius:2px}post-language-option:where([variant=list]) :is(a,button):hover{color:#504f4b}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-option:where([variant=list]) :is(a,button){border:1px solid ButtonBorder;color:ButtonText}}post-language-option:where([variant=list])[active]:not([active=false]) :is(a,button){background-color:#050400 !important;color:#fff;pointer-events:none}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-option:where([variant=list])[active]:not([active=false]) :is(a,button){background-color:Highlight !important;color:HighlightText}}post-language-option:where([variant=menu]){min-width:72px}post-language-option:where([variant=menu])[active]:not([active=false]){display:none}post-language-option:where([variant=menu]) :is(a,button){padding-block:13px;padding-inline:16px;box-sizing:border-box;justify-content:flex-start;position:relative;border-radius:0}post-language-option:where([variant=menu]) :is(a,button):hover{color:#fff;background-color:#504f4b}post-language-option:where([variant=menu]):first-child :is(a,button){border-start-start-radius:4px;border-start-end-radius:4px}post-language-option:where([variant=menu]):last-child :is(a,button){border-end-start-radius:4px;border-end-end-radius:4px}";
|
|
8
|
+
|
|
9
|
+
const PostLanguageOption$1 = /*@__PURE__*/ proxyCustomElement(class PostLanguageOption extends H {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.__registerHost();
|
|
13
|
+
this.postChange = createEvent(this, "postChange");
|
|
14
|
+
this.postLanguageOptionInitiallyActive = createEvent(this, "postLanguageOptionInitiallyActive");
|
|
15
|
+
}
|
|
16
|
+
validateCode() {
|
|
17
|
+
checkRequiredAndType(this, 'code', 'string');
|
|
18
|
+
}
|
|
19
|
+
validateVariant() {
|
|
20
|
+
checkEmptyOrOneOf(this, 'variant', SWITCH_VARIANTS);
|
|
21
|
+
}
|
|
22
|
+
validateName() {
|
|
23
|
+
checkEmptyOrType(this, 'name', 'string');
|
|
24
|
+
}
|
|
25
|
+
validateUrl() {
|
|
26
|
+
checkEmptyOrUrl(this, 'url');
|
|
27
|
+
}
|
|
28
|
+
componentDidLoad() {
|
|
29
|
+
this.validateCode();
|
|
30
|
+
this.validateName();
|
|
31
|
+
this.validateUrl();
|
|
32
|
+
if (!this.name && this.isNameRequired()) {
|
|
33
|
+
throw new Error('The "name" property of the post-language-option component is required when the full language name is not displayed.');
|
|
34
|
+
}
|
|
35
|
+
if (this.active) {
|
|
36
|
+
this.postLanguageOptionInitiallyActive.emit(this.code);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Selects the language option programmatically.
|
|
41
|
+
*/
|
|
42
|
+
async select() {
|
|
43
|
+
this.active = true;
|
|
44
|
+
this.emitChange();
|
|
45
|
+
}
|
|
46
|
+
emitChange() {
|
|
47
|
+
this.postChange.emit(this.code);
|
|
48
|
+
}
|
|
49
|
+
isNameRequired() {
|
|
50
|
+
return this.host.textContent.toLowerCase() === this.code.toLowerCase();
|
|
51
|
+
}
|
|
52
|
+
render() {
|
|
53
|
+
const lang = this.code.toLowerCase();
|
|
54
|
+
const emitOnKeyDown = (e) => {
|
|
55
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
56
|
+
this.emitChange();
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
return (h(Host, { key: 'deaee69d7e0c551af5162ae124f78c9418aba062', "data-version": version, role: this.variant === 'list' ? 'listitem' : undefined }, this.url ? (h("a", { "aria-current": this.active ? 'page' : undefined, href: this.url, hrefLang: lang, lang: lang, onClick: () => this.emitChange(), onKeyDown: emitOnKeyDown }, h("slot", null), h("span", { class: "visually-hidden" }, this.name))) : (h("button", { "aria-current": this.active ? 'true' : undefined, lang: lang, onClick: () => this.emitChange(), onKeyDown: emitOnKeyDown }, h("slot", null), h("span", { class: "visually-hidden" }, this.name)))));
|
|
60
|
+
}
|
|
61
|
+
get host() { return this; }
|
|
62
|
+
static get watchers() { return {
|
|
63
|
+
"code": ["validateCode"],
|
|
64
|
+
"variant": ["validateVariant"],
|
|
65
|
+
"name": ["validateName"],
|
|
66
|
+
"url": ["validateUrl"]
|
|
67
|
+
}; }
|
|
68
|
+
static get style() { return postLanguageOptionCss; }
|
|
69
|
+
}, [4, "post-language-option", {
|
|
70
|
+
"code": [1],
|
|
71
|
+
"active": [1540],
|
|
72
|
+
"variant": [1],
|
|
73
|
+
"name": [1],
|
|
74
|
+
"url": [1],
|
|
75
|
+
"select": [64]
|
|
76
|
+
}, undefined, {
|
|
77
|
+
"code": ["validateCode"],
|
|
78
|
+
"variant": ["validateVariant"],
|
|
79
|
+
"name": ["validateName"],
|
|
80
|
+
"url": ["validateUrl"]
|
|
81
|
+
}]);
|
|
82
|
+
function defineCustomElement$1() {
|
|
83
|
+
if (typeof customElements === "undefined") {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const components = ["post-language-option"];
|
|
87
|
+
components.forEach(tagName => { switch (tagName) {
|
|
88
|
+
case "post-language-option":
|
|
89
|
+
if (!customElements.get(tagName)) {
|
|
90
|
+
customElements.define(tagName, PostLanguageOption$1);
|
|
91
|
+
}
|
|
92
|
+
break;
|
|
93
|
+
} });
|
|
94
|
+
}
|
|
95
|
+
defineCustomElement$1();
|
|
96
|
+
|
|
97
|
+
const PostLanguageOption = PostLanguageOption$1;
|
|
98
|
+
const defineCustomElement = defineCustomElement$1;
|
|
99
|
+
|
|
100
|
+
export { PostLanguageOption, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../../types/components";
|
|
2
|
+
|
|
3
|
+
interface PostLanguageSwitch extends Components.PostLanguageSwitch, HTMLElement {}
|
|
4
|
+
export const PostLanguageSwitch: {
|
|
5
|
+
prototype: PostLanguageSwitch;
|
|
6
|
+
new (): PostLanguageSwitch;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
+
import { c as checkRequiredAndType, d as checkEmptyOrOneOf } from './p-CV7fm1rW.js';
|
|
3
|
+
import './p-CJ80BZ06.js';
|
|
4
|
+
import { E as EventFrom } from './p-kraHE1r3.js';
|
|
5
|
+
import { v as version } from './p-DO48NanC.js';
|
|
6
|
+
import { S as SWITCH_VARIANTS } from './p-DjIHLduJ.js';
|
|
7
|
+
import { n as nanoid } from './p-BLchVpF6.js';
|
|
8
|
+
import { d as defineCustomElement$5 } from './p-Amg0f2Yo.js';
|
|
9
|
+
import { d as defineCustomElement$4 } from './p-D50E7y6E.js';
|
|
10
|
+
import { d as defineCustomElement$3 } from './p-BDs0pvkX.js';
|
|
11
|
+
import { d as defineCustomElement$2 } from './p-BS0ZqwA-.js';
|
|
12
|
+
|
|
13
|
+
const postLanguageSwitchCss = ":host{display:flex !important;flex-wrap:wrap;gap:.5rem}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.post-language-switch-dropdown-container{display:flex;flex-direction:column}.post-language-switch-trigger{cursor:pointer;text-transform:uppercase;padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button;text-decoration:none;display:inline-flex;align-items:center;gap:6px;border-radius:24px;font-size:16px;padding:3px 10px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger{background-color:ButtonFace !important}.post-language-switch-trigger:hover{background-color:Highlight !important}}.post-language-switch-trigger{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.post-language-switch-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.post-language-switch-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.post-language-switch-trigger:not(:disabled):hover,.post-language-switch-trigger.pretend-hover{border-color:var(--post-scheme-color-interactive-button-tertiary-hover-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-hover-bg);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}.post-language-switch-trigger post-icon{height:24px;width:24px}.post-language-switch-trigger[aria-expanded=true]{background-color:#050400;color:#fff}.post-language-switch-trigger[aria-expanded=true] post-icon{transform:rotate(180deg)}.post-language-switch-trigger[aria-expanded=true]:hover{background-color:#504f4b;color:#fff}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger{border:1px solid ButtonBorder}.post-language-switch-trigger[aria-expanded=true] post-icon,.post-language-switch-trigger:hover post-icon{color:HighlightText}}post-menu::part(menu){padding-block:0}";
|
|
14
|
+
|
|
15
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
16
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
17
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
18
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
19
|
+
else
|
|
20
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
21
|
+
if (d = decorators[i])
|
|
22
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
23
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
24
|
+
};
|
|
25
|
+
const PostLanguageSwitch$1 = /*@__PURE__*/ proxyCustomElement(class PostLanguageSwitch extends H {
|
|
26
|
+
constructor() {
|
|
27
|
+
super();
|
|
28
|
+
this.__registerHost();
|
|
29
|
+
this.__attachShadow();
|
|
30
|
+
this.menuId = `p${nanoid(11)}`;
|
|
31
|
+
this.listSpanId = `list-span-${nanoid(11)}`;
|
|
32
|
+
/**
|
|
33
|
+
* Whether the component is rendered as a list or a menu
|
|
34
|
+
*/
|
|
35
|
+
this.variant = 'list';
|
|
36
|
+
}
|
|
37
|
+
get languageOptions() {
|
|
38
|
+
return Array.from(this.host.querySelectorAll('post-language-option'));
|
|
39
|
+
}
|
|
40
|
+
validateCaption() {
|
|
41
|
+
checkRequiredAndType(this, 'caption', 'string');
|
|
42
|
+
}
|
|
43
|
+
validateDescription() {
|
|
44
|
+
checkRequiredAndType(this, 'description', 'string');
|
|
45
|
+
}
|
|
46
|
+
validateVariant() {
|
|
47
|
+
checkEmptyOrOneOf(this, 'variant', SWITCH_VARIANTS);
|
|
48
|
+
this.updateChildrenVariant();
|
|
49
|
+
}
|
|
50
|
+
componentDidLoad() {
|
|
51
|
+
this.validateCaption();
|
|
52
|
+
this.validateDescription();
|
|
53
|
+
this.validateVariant();
|
|
54
|
+
// Initially set variants and active language
|
|
55
|
+
// Handles cases where the language-switch is rendered after the language-options have been rendered
|
|
56
|
+
this.updateChildrenVariant();
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Listen for the postChange event and guard it to run only for events originating from a <post-language-option> element.
|
|
60
|
+
*/
|
|
61
|
+
handlePostChange(event) {
|
|
62
|
+
this.activeLang = event.detail;
|
|
63
|
+
// Update the active state in the children post-language-option components
|
|
64
|
+
this.languageOptions.forEach(lang => {
|
|
65
|
+
if (lang.code && lang.code === this.activeLang) {
|
|
66
|
+
lang.setAttribute('active', '');
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
lang.removeAttribute('active');
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
// Hides the dropdown when an option has been clicked
|
|
73
|
+
if (this.variant === 'menu') {
|
|
74
|
+
const menu = this.host.shadowRoot.querySelector('post-menu');
|
|
75
|
+
menu.hide();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Handles cases where the language switch is being rendered before options are available
|
|
80
|
+
* @param event Initially emitted by <post-langauge-option>
|
|
81
|
+
*/
|
|
82
|
+
handleInitiallyActive(event) {
|
|
83
|
+
this.activeLang = event.detail;
|
|
84
|
+
}
|
|
85
|
+
// Update post-language-option variant to have the correct style
|
|
86
|
+
updateChildrenVariant() {
|
|
87
|
+
this.languageOptions.forEach(el => {
|
|
88
|
+
el.setAttribute('variant', this.variant);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
renderList() {
|
|
92
|
+
return (h(Host, { "data-version": version }, h("div", { class: "post-language-switch-list", role: "list", "aria-label": this.caption, "aria-describedby": this.listSpanId }, h("span", { id: this.listSpanId, class: "visually-hidden" }, this.description), h("slot", null))));
|
|
93
|
+
}
|
|
94
|
+
renderDropdown() {
|
|
95
|
+
return (h(Host, { "data-version": version }, h("post-menu-trigger", { for: this.menuId }, h("button", { class: "post-language-switch-trigger" }, this.activeLang, h("span", { class: "visually-hidden" }, this.caption), h("span", { class: "visually-hidden" }, this.description), h("post-icon", { "aria-hidden": "true", name: "chevrondown" }))), h("post-menu", { id: this.menuId, class: "post-language-switch-dropdown-container" }, h("slot", null))));
|
|
96
|
+
}
|
|
97
|
+
render() {
|
|
98
|
+
return this.variant === 'list' ? this.renderList() : this.renderDropdown();
|
|
99
|
+
}
|
|
100
|
+
get host() { return this; }
|
|
101
|
+
static get watchers() { return {
|
|
102
|
+
"caption": ["validateCaption"],
|
|
103
|
+
"description": ["validateDescription"],
|
|
104
|
+
"variant": ["validateVariant"]
|
|
105
|
+
}; }
|
|
106
|
+
static get style() { return postLanguageSwitchCss; }
|
|
107
|
+
}, [1, "post-language-switch", {
|
|
108
|
+
"caption": [1],
|
|
109
|
+
"description": [1],
|
|
110
|
+
"variant": [1],
|
|
111
|
+
"activeLang": [32]
|
|
112
|
+
}, [[0, "postChange", "handlePostChange"], [0, "postLanguageOptionInitiallyActive", "handleInitiallyActive"]], {
|
|
113
|
+
"caption": ["validateCaption"],
|
|
114
|
+
"description": ["validateDescription"],
|
|
115
|
+
"variant": ["validateVariant"]
|
|
116
|
+
}]);
|
|
117
|
+
__decorate([
|
|
118
|
+
EventFrom('post-language-option')
|
|
119
|
+
], PostLanguageSwitch$1.prototype, "handlePostChange", null);
|
|
120
|
+
function defineCustomElement$1() {
|
|
121
|
+
if (typeof customElements === "undefined") {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const components = ["post-language-switch", "post-icon", "post-menu", "post-menu-trigger", "post-popovercontainer"];
|
|
125
|
+
components.forEach(tagName => { switch (tagName) {
|
|
126
|
+
case "post-language-switch":
|
|
127
|
+
if (!customElements.get(tagName)) {
|
|
128
|
+
customElements.define(tagName, PostLanguageSwitch$1);
|
|
129
|
+
}
|
|
130
|
+
break;
|
|
131
|
+
case "post-icon":
|
|
132
|
+
if (!customElements.get(tagName)) {
|
|
133
|
+
defineCustomElement$5();
|
|
134
|
+
}
|
|
135
|
+
break;
|
|
136
|
+
case "post-menu":
|
|
137
|
+
if (!customElements.get(tagName)) {
|
|
138
|
+
defineCustomElement$4();
|
|
139
|
+
}
|
|
140
|
+
break;
|
|
141
|
+
case "post-menu-trigger":
|
|
142
|
+
if (!customElements.get(tagName)) {
|
|
143
|
+
defineCustomElement$3();
|
|
144
|
+
}
|
|
145
|
+
break;
|
|
146
|
+
case "post-popovercontainer":
|
|
147
|
+
if (!customElements.get(tagName)) {
|
|
148
|
+
defineCustomElement$2();
|
|
149
|
+
}
|
|
150
|
+
break;
|
|
151
|
+
} });
|
|
152
|
+
}
|
|
153
|
+
defineCustomElement$1();
|
|
154
|
+
|
|
155
|
+
const PostLanguageSwitch = PostLanguageSwitch$1;
|
|
156
|
+
const defineCustomElement = defineCustomElement$1;
|
|
157
|
+
|
|
158
|
+
export { PostLanguageSwitch, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../../types/components";
|
|
2
|
+
|
|
3
|
+
interface PostLinkarea extends Components.PostLinkarea, HTMLElement {}
|
|
4
|
+
export const PostLinkarea: {
|
|
5
|
+
prototype: PostLinkarea;
|
|
6
|
+
new (): PostLinkarea;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
+
import { v as version } from './p-DO48NanC.js';
|
|
3
|
+
|
|
4
|
+
const postLinkareaCss = ":host{display:block;cursor:pointer}";
|
|
5
|
+
|
|
6
|
+
const INTERACTIVE_ELEMENTS = ['a'].join(',');
|
|
7
|
+
const INTERACTIVE_ELEMENTS_SELECTOR = `:where(${INTERACTIVE_ELEMENTS})`;
|
|
8
|
+
const PostLinkarea$1 = /*@__PURE__*/ proxyCustomElement(class PostLinkarea extends H {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
this.mutationObserver = new MutationObserver(this.checkInteractiveElements.bind(this));
|
|
14
|
+
}
|
|
15
|
+
dispatchClick({ ctrlKey, shiftKey, altKey, metaKey }) {
|
|
16
|
+
this.interactiveElements[0]?.dispatchEvent(new MouseEvent('click', { ctrlKey, shiftKey, altKey, metaKey }));
|
|
17
|
+
}
|
|
18
|
+
checkInteractiveElements() {
|
|
19
|
+
this.interactiveElements = this.host.querySelectorAll(INTERACTIVE_ELEMENTS_SELECTOR);
|
|
20
|
+
if (this.interactiveElements.length > 1) {
|
|
21
|
+
console.error(`The \`post-linkarea\` currently contains ${this.interactiveElements.length} interactive elements when it should contain only one.`);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
connectedCallback() {
|
|
25
|
+
this.mutationObserver.observe(this.host, { childList: true });
|
|
26
|
+
}
|
|
27
|
+
componentWillLoad() {
|
|
28
|
+
this.checkInteractiveElements();
|
|
29
|
+
}
|
|
30
|
+
disconnectedCallback() {
|
|
31
|
+
this.mutationObserver.disconnect();
|
|
32
|
+
}
|
|
33
|
+
render() {
|
|
34
|
+
return (h(Host, { key: '37351b168e654e8c563225061510dacdbda8fef4', "data-version": version, onClick: (e) => this.dispatchClick(e), tabindex: "0" }, h("slot", { key: '26aeb1fc5de5f610ef485396f2cec4c2ba7e5a9a' })));
|
|
35
|
+
}
|
|
36
|
+
get host() { return this; }
|
|
37
|
+
static get style() { return postLinkareaCss; }
|
|
38
|
+
}, [1, "post-linkarea", {
|
|
39
|
+
"interactiveElements": [32]
|
|
40
|
+
}]);
|
|
41
|
+
function defineCustomElement$1() {
|
|
42
|
+
if (typeof customElements === "undefined") {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const components = ["post-linkarea"];
|
|
46
|
+
components.forEach(tagName => { switch (tagName) {
|
|
47
|
+
case "post-linkarea":
|
|
48
|
+
if (!customElements.get(tagName)) {
|
|
49
|
+
customElements.define(tagName, PostLinkarea$1);
|
|
50
|
+
}
|
|
51
|
+
break;
|
|
52
|
+
} });
|
|
53
|
+
}
|
|
54
|
+
defineCustomElement$1();
|
|
55
|
+
|
|
56
|
+
const PostLinkarea = PostLinkarea$1;
|
|
57
|
+
const defineCustomElement = defineCustomElement$1;
|
|
58
|
+
|
|
59
|
+
export { PostLinkarea, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../../types/components";
|
|
2
|
+
|
|
3
|
+
interface PostListItem extends Components.PostListItem, HTMLElement {}
|
|
4
|
+
export const PostListItem: {
|
|
5
|
+
prototype: PostListItem;
|
|
6
|
+
new (): PostListItem;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
+
import { v as version } from './p-DO48NanC.js';
|
|
3
|
+
|
|
4
|
+
const postListItemCss = ":host{display:flex}";
|
|
5
|
+
|
|
6
|
+
const PostListItem$1 = /*@__PURE__*/ proxyCustomElement(class PostListItem extends H {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
11
|
+
}
|
|
12
|
+
connectedCallback() {
|
|
13
|
+
this.host.setAttribute('slot', 'post-list-item');
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return (h(Host, { key: 'd15e750cd663def9363bedd020f09e634aba14c9', role: "listitem", slot: "post-list-item", version: version }, h("slot", { key: '361853e5c5994de4e5a5884cc32d7c7280b62b56' })));
|
|
17
|
+
}
|
|
18
|
+
get host() { return this; }
|
|
19
|
+
static get style() { return postListItemCss; }
|
|
20
|
+
}, [1, "post-list-item"]);
|
|
21
|
+
function defineCustomElement$1() {
|
|
22
|
+
if (typeof customElements === "undefined") {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const components = ["post-list-item"];
|
|
26
|
+
components.forEach(tagName => { switch (tagName) {
|
|
27
|
+
case "post-list-item":
|
|
28
|
+
if (!customElements.get(tagName)) {
|
|
29
|
+
customElements.define(tagName, PostListItem$1);
|
|
30
|
+
}
|
|
31
|
+
break;
|
|
32
|
+
} });
|
|
33
|
+
}
|
|
34
|
+
defineCustomElement$1();
|
|
35
|
+
|
|
36
|
+
const PostListItem = PostListItem$1;
|
|
37
|
+
const defineCustomElement = defineCustomElement$1;
|
|
38
|
+
|
|
39
|
+
export { PostListItem, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../../types/components";
|
|
2
|
+
|
|
3
|
+
interface PostList extends Components.PostList, HTMLElement {}
|
|
4
|
+
export const PostList: {
|
|
5
|
+
prototype: PostList;
|
|
6
|
+
new (): PostList;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
+
import { v as version } from './p-DO48NanC.js';
|
|
3
|
+
import { n as nanoid } from './p-BLchVpF6.js';
|
|
4
|
+
|
|
5
|
+
const postListCss = "post-list{display:flex;flex-direction:column;gap:var(--post-list-title-gap, 0)}post-list>[role=list]{display:flex;flex-direction:column;gap:var(--post-list-item-gap, 0)}post-list:where([horizontal]:not([horizontal=false])){flex-direction:row;align-items:center}post-list:where([horizontal]:not([horizontal=false]))>[role=list]{flex-direction:row;align-items:center}post-list>.list-title.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}";
|
|
6
|
+
|
|
7
|
+
const PostList$1 = /*@__PURE__*/ proxyCustomElement(class PostList extends H {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
/**
|
|
12
|
+
* If `true`, the list title will be hidden. Otherwise, it will be displayed.`
|
|
13
|
+
*/
|
|
14
|
+
this.titleHidden = false;
|
|
15
|
+
/**
|
|
16
|
+
* The list can become horizontal by setting `horizontal="true"` or just `horizontal`
|
|
17
|
+
*/
|
|
18
|
+
this.horizontal = false;
|
|
19
|
+
}
|
|
20
|
+
componentWillLoad() {
|
|
21
|
+
/**
|
|
22
|
+
* Get the id set on the host element or use a random id by default
|
|
23
|
+
*/
|
|
24
|
+
this.titleId = `title-${this.host.id || nanoid(6)}`;
|
|
25
|
+
}
|
|
26
|
+
componentDidLoad() {
|
|
27
|
+
this.checkTitle();
|
|
28
|
+
}
|
|
29
|
+
checkTitle() {
|
|
30
|
+
if (!this.titleEl.textContent.trim()) {
|
|
31
|
+
console.error('Please provide a title to the list component. Title is mandatory for accessibility purposes.');
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
return (h(Host, { key: '27dc0177ba3d81149b6b5dce24d6f18b8f57c9e5', "data-version": version }, h("div", { key: 'f860eaeafc60605c67fb0c47e452ecfdbf03d002', ref: el => (this.titleEl = el), id: this.titleId, class: `list-title${this.titleHidden ? ' visually-hidden' : ''}` }, h("slot", { key: '17e20fdcf588649a9d678f873687cdedaef931aa' })), h("div", { key: 'aebdcd2fe4b5a4d232b0fe3de7f6273c93f505f6', role: "list", "aria-labelledby": this.titleId }, h("slot", { key: 'fa15f227e3251d44d1519421960bb5f3056fc371', name: "post-list-item" }))));
|
|
36
|
+
}
|
|
37
|
+
get host() { return this; }
|
|
38
|
+
static get style() { return postListCss; }
|
|
39
|
+
}, [4, "post-list", {
|
|
40
|
+
"titleHidden": [4, "title-hidden"],
|
|
41
|
+
"horizontal": [516],
|
|
42
|
+
"titleId": [32]
|
|
43
|
+
}]);
|
|
44
|
+
function defineCustomElement$1() {
|
|
45
|
+
if (typeof customElements === "undefined") {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const components = ["post-list"];
|
|
49
|
+
components.forEach(tagName => { switch (tagName) {
|
|
50
|
+
case "post-list":
|
|
51
|
+
if (!customElements.get(tagName)) {
|
|
52
|
+
customElements.define(tagName, PostList$1);
|
|
53
|
+
}
|
|
54
|
+
break;
|
|
55
|
+
} });
|
|
56
|
+
}
|
|
57
|
+
defineCustomElement$1();
|
|
58
|
+
|
|
59
|
+
const PostList = PostList$1;
|
|
60
|
+
const defineCustomElement = defineCustomElement$1;
|
|
61
|
+
|
|
62
|
+
export { PostList, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../../types/components";
|
|
2
|
+
|
|
3
|
+
interface PostLogo extends Components.PostLogo, HTMLElement {}
|
|
4
|
+
export const PostLogo: {
|
|
5
|
+
prototype: PostLogo;
|
|
6
|
+
new (): PostLogo;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
+
import { v as version } from './p-DO48NanC.js';
|
|
3
|
+
import { a as checkEmptyOrUrl } from './p-CV7fm1rW.js';
|
|
4
|
+
import './p-CJ80BZ06.js';
|
|
5
|
+
|
|
6
|
+
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}.logo-link{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.logo-link:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.logo-link:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.logo-link:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.logo-link:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.logo-link :focus,:focus-visible{border-radius:2px}";
|
|
7
|
+
|
|
8
|
+
const PostLogo$1 = /*@__PURE__*/ proxyCustomElement(class PostLogo extends H {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
}
|
|
14
|
+
validateUrl() {
|
|
15
|
+
checkEmptyOrUrl(this, 'url');
|
|
16
|
+
}
|
|
17
|
+
componentDidLoad() {
|
|
18
|
+
this.validateUrl();
|
|
19
|
+
this.checkDescription();
|
|
20
|
+
}
|
|
21
|
+
checkDescription() {
|
|
22
|
+
if (!this.host.textContent) {
|
|
23
|
+
console.warn('Be sure to add descriptive text in the post-logo to ensure good accessibility of the component.');
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
|
+
const logoLink = this.url && (typeof this.url === 'string' ? this.url : this.url.href);
|
|
28
|
+
const LogoTag = logoLink ? 'a' : 'span';
|
|
29
|
+
return (h(Host, { key: '1c268056329697baccc5bf65b1e66acd8531d5f3', "data-version": version }, h(LogoTag, { key: '9b73fc4922a5ea0f72d761e82136ef1111eb7e21', class: `logo ${logoLink ? 'logo-link' : ''}`, ...(logoLink ? { href: logoLink } : {}) }, h("span", { key: '4042a64056f3d22a99d6b245201be20d1afe5dc0', class: "description" }, h("slot", { key: 'eb437f087d952b4f4a961bcba0dc18eb6836c6c9', onSlotchange: () => this.checkDescription() })), h("svg", { key: 'b658e94d0e7f63d2f80245e12017f87f50a0b2c9', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 72 72", "aria-hidden": "true" }, h("g", { key: '90c0c8f64d0c9023dfa7296e68333232b9023276', id: "Logo" }, h("rect", { key: 'a1dfd6e0bcaedb485398f1896603af36e3f119dc', fill: "#ffcc00", x: "0", y: "0", width: "72", height: "72" }), h("polygon", { key: '44d5ee8e45b7b320d75530e00ab1ff8dc4b8e21c', 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: '788524d12213fdfe0d21712b14d72e30d0195b4d', 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" }))))));
|
|
30
|
+
}
|
|
31
|
+
get host() { return this; }
|
|
32
|
+
static get watchers() { return {
|
|
33
|
+
"url": ["validateUrl"]
|
|
34
|
+
}; }
|
|
35
|
+
static get style() { return postLogoCss; }
|
|
36
|
+
}, [1, "post-logo", {
|
|
37
|
+
"url": [1]
|
|
38
|
+
}, undefined, {
|
|
39
|
+
"url": ["validateUrl"]
|
|
40
|
+
}]);
|
|
41
|
+
function defineCustomElement$1() {
|
|
42
|
+
if (typeof customElements === "undefined") {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const components = ["post-logo"];
|
|
46
|
+
components.forEach(tagName => { switch (tagName) {
|
|
47
|
+
case "post-logo":
|
|
48
|
+
if (!customElements.get(tagName)) {
|
|
49
|
+
customElements.define(tagName, PostLogo$1);
|
|
50
|
+
}
|
|
51
|
+
break;
|
|
52
|
+
} });
|
|
53
|
+
}
|
|
54
|
+
defineCustomElement$1();
|
|
55
|
+
|
|
56
|
+
const PostLogo = PostLogo$1;
|
|
57
|
+
const defineCustomElement = defineCustomElement$1;
|
|
58
|
+
|
|
59
|
+
export { PostLogo, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../../types/components";
|
|
2
|
+
|
|
3
|
+
interface PostMainnavigation extends Components.PostMainnavigation, HTMLElement {}
|
|
4
|
+
export const PostMainnavigation: {
|
|
5
|
+
prototype: PostMainnavigation;
|
|
6
|
+
new (): PostMainnavigation;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|