@swisspost/design-system-components 10.0.0-next.47 → 10.0.0-next.48
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-CZyXYkIN.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +4 -4
- package/dist/cjs/post-avatar.cjs.entry.js +91 -54
- package/dist/cjs/post-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/post-banner.cjs.entry.js +3 -3
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +1 -1
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/post-card-control.cjs.entry.js +1 -1
- package/dist/cjs/post-closebutton_15.cjs.entry.js +4 -5
- package/dist/cjs/post-collapsible_2.cjs.entry.js +2 -2
- package/dist/cjs/post-components.cjs.js +1 -1
- package/dist/cjs/post-footer.cjs.entry.js +1 -1
- package/dist/cjs/post-linkarea.cjs.entry.js +1 -1
- package/dist/cjs/post-popover.cjs.entry.js +1 -1
- package/dist/cjs/post-rating.cjs.entry.js +1 -1
- package/dist/cjs/post-tab-header.cjs.entry.js +1 -1
- package/dist/cjs/post-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/post-tabs.cjs.entry.js +2 -2
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +1 -1
- package/dist/cjs/post-tooltip.cjs.entry.js +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.js +90 -57
- package/dist/collection/components/post-banner/post-banner.js +2 -2
- package/dist/collection/components/post-closebutton/post-closebutton.js +1 -19
- package/dist/collection/components/post-menu/post-menu.js +4 -1
- package/dist/collection/components/post-tabs/post-tabs.js +3 -3
- package/dist/collection/utils/event-from.js +2 -2
- 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 +99 -62
- package/dist/components/post-back-to-top.js +6 -7
- 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 +13 -14
- package/dist/components/post-card-control.js +8 -9
- 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 +10 -11
- package/dist/components/post-header.js +6 -7
- package/dist/components/post-icon.js +1 -1
- package/dist/components/post-icon2.js +153 -0
- package/dist/components/post-language-option.js +8 -9
- package/dist/components/post-language-switch.js +12 -13
- package/dist/components/post-linkarea.js +3 -4
- package/dist/components/post-list-item.js +3 -4
- package/dist/components/post-list.js +4 -5
- package/dist/components/post-logo.js +5 -6
- package/dist/components/post-mainnavigation.js +4 -5
- package/dist/components/post-megadropdown-trigger.js +6 -7
- package/dist/components/post-megadropdown.js +7 -8
- 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 +222 -0
- package/dist/components/post-popover.js +6 -7
- package/dist/components/post-popovercontainer.js +1 -1
- package/dist/components/post-popovercontainer2.js +3018 -0
- package/dist/components/post-rating.js +8 -9
- package/dist/components/post-tab-header.js +6 -7
- package/dist/components/post-tab-panel.js +6 -7
- package/dist/components/post-tabs.js +7 -8
- package/dist/components/post-togglebutton.js +3 -4
- package/dist/components/post-tooltip-trigger.js +6 -7
- package/dist/components/post-tooltip.js +6 -7
- package/dist/components/react/index.d.ts +33 -0
- package/dist/components/react/index.js +2315 -0
- package/dist/components/react/p-0Ltezq5O.js +3 -0
- package/dist/components/{p-i0-mizzM.js → react/p-38PqL5iD.js} +1 -1
- package/dist/components/react/p-BLchVpF6.js +14 -0
- package/dist/components/react/p-C35MCWIp.js +35 -0
- package/dist/components/{p-336Lbkey.js → react/p-CGsAj6ij.js} +1 -1
- 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-DP5pj8mq.js → react/p-Ce7jgYmK.js} +1 -1
- package/dist/components/{p-BSvy4uym.js → react/p-CiYSngKM.js} +7 -7
- package/dist/components/{p-Cxrx7SXz.js → react/p-Da5wbVP8.js} +1 -1
- package/dist/components/{p-DVGX_JCp.js → react/p-Dq9F2i7n.js} +2 -2
- package/dist/components/{p-DEi5TIMq.js → react/p-DzYquz3e.js} +2 -2
- package/dist/components/{p-pHxypsHK.js → react/p-JHuJA2Lv.js} +4 -4
- package/dist/components/react/p-SbIC4aZX.js +11 -0
- package/dist/components/{p-C0H2ohSv.js → react/p-Tg0GNTZM.js} +2 -2
- package/dist/components/{p-8U5GFtQP.js → react/p-kraHE1r3.js} +2 -2
- package/dist/components/{p-BM8mtEfS.js → react/p-q8Fvf8A0.js} +1 -1
- package/dist/components/react/p-r4txK0AC.js +3 -0
- 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 +226 -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 +333 -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 +101 -0
- package/dist/components/react/post-language-switch.d.ts +11 -0
- package/dist/components/react/post-language-switch.js +159 -0
- package/dist/components/react/post-linkarea.d.ts +11 -0
- package/dist/components/react/post-linkarea.js +46 -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 +197 -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 +20 -30
- 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-0Ltezq5O.js +3 -0
- package/dist/esm/post-accordion_2.entry.js +5 -5
- package/dist/esm/post-avatar.entry.js +92 -55
- package/dist/esm/post-back-to-top.entry.js +2 -2
- package/dist/esm/post-banner.entry.js +4 -4
- package/dist/esm/post-breadcrumb-item_2.entry.js +2 -2
- package/dist/esm/post-breadcrumbs.entry.js +2 -2
- package/dist/esm/post-card-control.entry.js +2 -2
- package/dist/esm/post-closebutton_15.entry.js +6 -7
- package/dist/esm/post-collapsible_2.entry.js +3 -3
- package/dist/esm/post-components.js +1 -1
- package/dist/esm/post-footer.entry.js +2 -2
- package/dist/esm/post-linkarea.entry.js +1 -1
- package/dist/esm/post-popover.entry.js +2 -2
- package/dist/esm/post-rating.entry.js +2 -2
- package/dist/esm/post-tab-header.entry.js +2 -2
- package/dist/esm/post-tab-panel.entry.js +2 -2
- package/dist/esm/post-tabs.entry.js +2 -2
- package/dist/esm/post-tooltip-trigger.entry.js +2 -2
- package/dist/esm/post-tooltip.entry.js +2 -2
- 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-0Ltezq5O.js +1 -0
- package/dist/post-components/{p-bbe02ba3.entry.js → p-16772417.entry.js} +1 -1
- package/dist/post-components/{p-45007aac.entry.js → p-38d3d441.entry.js} +1 -1
- package/dist/post-components/{p-f67b616a.entry.js → p-3c71f590.entry.js} +1 -1
- package/dist/post-components/{p-a2fa5ce4.entry.js → p-40f21542.entry.js} +1 -1
- package/dist/post-components/{p-031f7489.entry.js → p-4243cdd1.entry.js} +1 -1
- package/dist/post-components/p-4c18cb8c.entry.js +1 -0
- package/dist/post-components/{p-c1cf39cb.entry.js → p-51dc7647.entry.js} +1 -1
- package/dist/post-components/{p-e9802b56.entry.js → p-6777e505.entry.js} +1 -1
- package/dist/post-components/{p-2f698af4.entry.js → p-6add880f.entry.js} +1 -1
- package/dist/post-components/{p-2ca196d6.entry.js → p-8363fedb.entry.js} +1 -1
- package/dist/post-components/p-83998038.entry.js +1 -0
- package/dist/post-components/{p-d0d92071.entry.js → p-85bb1b5e.entry.js} +1 -1
- package/dist/post-components/{p-3adbdda7.entry.js → p-8f4d8685.entry.js} +1 -1
- package/dist/post-components/{p-1e6a068a.entry.js → p-95ad536d.entry.js} +1 -1
- package/dist/post-components/{p-9428231b.entry.js → p-9d806e89.entry.js} +1 -1
- package/dist/post-components/{p-BWC0gtGU.js → p-VmK3ABCB.js} +1 -1
- package/dist/post-components/{p-57703aee.entry.js → p-aad86320.entry.js} +1 -1
- package/dist/post-components/p-c3e38acf.entry.js +1 -0
- package/dist/post-components/{p-ab8017bb.entry.js → p-d61bb2ff.entry.js} +1 -1
- package/dist/post-components/p-kraHE1r3.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- 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 +13 -10
- package/dist/types/components/post-closebutton/post-closebutton.d.ts +0 -6
- package/dist/types/components/post-menu/post-menu.d.ts +3 -0
- package/dist/types/components/post-tabs/post-tabs.d.ts +2 -2
- package/dist/types/components.d.ts +0 -19
- package/dist/types/utils/component-on-ready.d.ts +2 -2
- package/hydrate/index.js +110 -70
- package/hydrate/index.mjs +110 -70
- package/package.json +19 -9
- package/dist/components/p-Z01QMrov.js +0 -3
- package/dist/esm/package-Z01QMrov.js +0 -3
- package/dist/post-components/p-7b8ab026.entry.js +0 -1
- package/dist/post-components/p-8U5GFtQP.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-e96239c4.entry.js +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,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../../types/components";
|
|
2
|
+
|
|
3
|
+
interface PostTooltip extends Components.PostTooltip, HTMLElement {}
|
|
4
|
+
export const PostTooltip: {
|
|
5
|
+
prototype: PostTooltip;
|
|
6
|
+
new (): PostTooltip;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
+
import { v as version } from './p-0Ltezq5O.js';
|
|
3
|
+
import { d as checkEmptyOrOneOf } from './p-CV7fm1rW.js';
|
|
4
|
+
import './p-CJ80BZ06.js';
|
|
5
|
+
import { d as defineCustomElement$2, a as PLACEMENT_TYPES } from './p-Ce7jgYmK.js';
|
|
6
|
+
|
|
7
|
+
const postTooltipCss = ":host{display:none}:host([open]){display:contents}post-popovercontainer[arrow]::after{position:absolute;content:\"\";inset:-13px;z-index:-1}post-popovercontainer>div{color:var(--post-current-fg);background-color:var(--post-current-bg);padding:var(--post-core-dimension-4) var(--post-core-dimension-8);max-width:280px;min-height:32px;word-wrap:break-word;white-space:normal}";
|
|
8
|
+
|
|
9
|
+
const PostTooltip$1 = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends H {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.__registerHost();
|
|
13
|
+
this.__attachShadow();
|
|
14
|
+
/**
|
|
15
|
+
* Defines the position of the tooltip relative to its trigger.
|
|
16
|
+
* Tooltips are automatically flipped to the opposite side if there is not enough available space and are shifted towards the viewport if they would overlap edge boundaries.
|
|
17
|
+
* For supported values and behavior details, see the [Floating UI placement documentation](https://floating-ui.com/docs/computePosition#placement).
|
|
18
|
+
*/
|
|
19
|
+
this.placement = 'top';
|
|
20
|
+
/**
|
|
21
|
+
* Whether or not to display a little pointer arrow
|
|
22
|
+
*/
|
|
23
|
+
this.arrow = false;
|
|
24
|
+
/**
|
|
25
|
+
* Indicates the open state of the tooltip
|
|
26
|
+
*/
|
|
27
|
+
this.open = false;
|
|
28
|
+
}
|
|
29
|
+
validatePlacement() {
|
|
30
|
+
checkEmptyOrOneOf(this, 'placement', PLACEMENT_TYPES);
|
|
31
|
+
}
|
|
32
|
+
componentWillLoad() {
|
|
33
|
+
this.validatePlacement();
|
|
34
|
+
}
|
|
35
|
+
componentDidLoad() {
|
|
36
|
+
if (!this.host.id) {
|
|
37
|
+
console.error(
|
|
38
|
+
/*prettier-ignore*/
|
|
39
|
+
'No id set: <post-tooltip> must have an id, linking it to it\'s target element with a <post-tooltip-trigger> element.');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Programmatically display the tooltip.
|
|
44
|
+
* @param target An element where the tooltip should be shown
|
|
45
|
+
*/
|
|
46
|
+
async show(target) {
|
|
47
|
+
if (this.open)
|
|
48
|
+
return;
|
|
49
|
+
this.popoverRef.show(target);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Programmatically hide this tooltip.
|
|
53
|
+
*/
|
|
54
|
+
async hide() {
|
|
55
|
+
this.popoverRef.hide();
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Toggle tooltip display.
|
|
59
|
+
* @param target An element where the tooltip should be shown
|
|
60
|
+
* @param [force] Pass true to always show or false to always hide
|
|
61
|
+
*/
|
|
62
|
+
async toggle(target, force) {
|
|
63
|
+
this.popoverRef.toggle(target, force);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Set the open state based on the toggle event.
|
|
67
|
+
* @param e Popovercontainer toggle event
|
|
68
|
+
*/
|
|
69
|
+
handleToggle(e) {
|
|
70
|
+
this.open = e.detail;
|
|
71
|
+
}
|
|
72
|
+
render() {
|
|
73
|
+
const popoverClass = `${this.arrow ? 'has-arrow' : ''}`;
|
|
74
|
+
return (h(Host, { key: 'c5f293812e33520ea5a2c9224e93fe5e5e41cbe0', "data-version": version }, h("post-popovercontainer", { key: '7ec57e1a2315d95e7cb696cf6d2d1a1d8ae77257', safeSpace: "trapezoid", class: popoverClass, role: "tooltip", arrow: this.arrow, animation: this.animation, placement: this.placement, onPostToggle: e => this.handleToggle(e), ref: (el) => (this.popoverRef = el) }, h("slot", { key: '79c91307707c56345acb136a45acdae859d54c2b' }))));
|
|
75
|
+
}
|
|
76
|
+
get host() { return this; }
|
|
77
|
+
static get watchers() { return {
|
|
78
|
+
"placement": ["validatePlacement"]
|
|
79
|
+
}; }
|
|
80
|
+
static get style() { return postTooltipCss; }
|
|
81
|
+
}, [1, "post-tooltip", {
|
|
82
|
+
"placement": [1],
|
|
83
|
+
"arrow": [4],
|
|
84
|
+
"animation": [1],
|
|
85
|
+
"open": [1540],
|
|
86
|
+
"show": [64],
|
|
87
|
+
"hide": [64],
|
|
88
|
+
"toggle": [64]
|
|
89
|
+
}, undefined, {
|
|
90
|
+
"placement": ["validatePlacement"]
|
|
91
|
+
}]);
|
|
92
|
+
function defineCustomElement$1() {
|
|
93
|
+
if (typeof customElements === "undefined") {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const components = ["post-tooltip", "post-popovercontainer"];
|
|
97
|
+
components.forEach(tagName => { switch (tagName) {
|
|
98
|
+
case "post-tooltip":
|
|
99
|
+
if (!customElements.get(tagName)) {
|
|
100
|
+
customElements.define(tagName, PostTooltip$1);
|
|
101
|
+
}
|
|
102
|
+
break;
|
|
103
|
+
case "post-popovercontainer":
|
|
104
|
+
if (!customElements.get(tagName)) {
|
|
105
|
+
defineCustomElement$2();
|
|
106
|
+
}
|
|
107
|
+
break;
|
|
108
|
+
} });
|
|
109
|
+
}
|
|
110
|
+
defineCustomElement$1();
|
|
111
|
+
|
|
112
|
+
const PostTooltip = PostTooltip$1;
|
|
113
|
+
const defineCustomElement = defineCustomElement$1;
|
|
114
|
+
|
|
115
|
+
export { PostTooltip, defineCustomElement };
|
package/dist/docs.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2025-09-
|
|
2
|
+
"timestamp": "2025-09-15T11:02:00",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.35.0",
|
|
@@ -215,15 +215,15 @@
|
|
|
215
215
|
"docsTags": [
|
|
216
216
|
{
|
|
217
217
|
"name": "part",
|
|
218
|
-
"text": "button - The
|
|
218
|
+
"text": "button - The element that toggles the accordion item (header button)."
|
|
219
219
|
},
|
|
220
220
|
{
|
|
221
221
|
"name": "part",
|
|
222
|
-
"text": "body - The
|
|
222
|
+
"text": "body - The container element that holds the accordion item's content."
|
|
223
223
|
},
|
|
224
224
|
{
|
|
225
225
|
"name": "slot",
|
|
226
|
-
"text": "logo - Slot for
|
|
226
|
+
"text": "logo - Slot for placing a logo in the accordion item’s header, before the content."
|
|
227
227
|
},
|
|
228
228
|
{
|
|
229
229
|
"name": "slot",
|
|
@@ -378,7 +378,7 @@
|
|
|
378
378
|
},
|
|
379
379
|
{
|
|
380
380
|
"name": "logo",
|
|
381
|
-
"docs": "Slot for
|
|
381
|
+
"docs": "Slot for placing a logo in the accordion item’s header, before the content."
|
|
382
382
|
}
|
|
383
383
|
],
|
|
384
384
|
"parts": [
|
|
@@ -388,11 +388,11 @@
|
|
|
388
388
|
},
|
|
389
389
|
{
|
|
390
390
|
"name": "body",
|
|
391
|
-
"docs": "The
|
|
391
|
+
"docs": "The container element that holds the accordion item's content."
|
|
392
392
|
},
|
|
393
393
|
{
|
|
394
394
|
"name": "button",
|
|
395
|
-
"docs": "The
|
|
395
|
+
"docs": "The element that toggles the accordion item (header button)."
|
|
396
396
|
}
|
|
397
397
|
],
|
|
398
398
|
"dependents": [
|
|
@@ -702,7 +702,7 @@
|
|
|
702
702
|
],
|
|
703
703
|
"listeners": [
|
|
704
704
|
{
|
|
705
|
-
"event": "
|
|
705
|
+
"event": "click",
|
|
706
706
|
"capture": false,
|
|
707
707
|
"passive": false
|
|
708
708
|
}
|
|
@@ -1256,22 +1256,7 @@
|
|
|
1256
1256
|
"usage": {},
|
|
1257
1257
|
"props": [],
|
|
1258
1258
|
"methods": [],
|
|
1259
|
-
"events": [
|
|
1260
|
-
{
|
|
1261
|
-
"event": "postClick",
|
|
1262
|
-
"detail": "void",
|
|
1263
|
-
"bubbles": true,
|
|
1264
|
-
"complexType": {
|
|
1265
|
-
"original": "void",
|
|
1266
|
-
"resolved": "void",
|
|
1267
|
-
"references": {}
|
|
1268
|
-
},
|
|
1269
|
-
"cancelable": true,
|
|
1270
|
-
"composed": true,
|
|
1271
|
-
"docs": "An event emitted when the close button is clicked.\nIt has no payload.",
|
|
1272
|
-
"docsTags": []
|
|
1273
|
-
}
|
|
1274
|
-
],
|
|
1259
|
+
"events": [],
|
|
1275
1260
|
"listeners": [],
|
|
1276
1261
|
"styles": [],
|
|
1277
1262
|
"slots": [
|
|
@@ -2753,7 +2738,12 @@
|
|
|
2753
2738
|
"tag": "post-menu",
|
|
2754
2739
|
"readme": "# post-menu\n\n\n",
|
|
2755
2740
|
"docs": "",
|
|
2756
|
-
"docsTags": [
|
|
2741
|
+
"docsTags": [
|
|
2742
|
+
{
|
|
2743
|
+
"name": "part",
|
|
2744
|
+
"text": "menu - The container element that holds the list of menu items."
|
|
2745
|
+
}
|
|
2746
|
+
],
|
|
2757
2747
|
"usage": {},
|
|
2758
2748
|
"props": [
|
|
2759
2749
|
{
|
|
@@ -2964,7 +2954,7 @@
|
|
|
2964
2954
|
"parts": [
|
|
2965
2955
|
{
|
|
2966
2956
|
"name": "menu",
|
|
2967
|
-
"docs": ""
|
|
2957
|
+
"docs": "The container element that holds the list of menu items."
|
|
2968
2958
|
}
|
|
2969
2959
|
],
|
|
2970
2960
|
"dependents": [
|
|
@@ -4046,11 +4036,11 @@
|
|
|
4046
4036
|
},
|
|
4047
4037
|
{
|
|
4048
4038
|
"name": "part",
|
|
4049
|
-
"text": "tabs -
|
|
4039
|
+
"text": "tabs - The container element that holds the set of tabs."
|
|
4050
4040
|
},
|
|
4051
4041
|
{
|
|
4052
4042
|
"name": "part",
|
|
4053
|
-
"text": "content -
|
|
4043
|
+
"text": "content - The container element that displays the content of the currently active tab."
|
|
4054
4044
|
}
|
|
4055
4045
|
],
|
|
4056
4046
|
"usage": {},
|
|
@@ -4184,11 +4174,11 @@
|
|
|
4184
4174
|
"parts": [
|
|
4185
4175
|
{
|
|
4186
4176
|
"name": "content",
|
|
4187
|
-
"docs": "
|
|
4177
|
+
"docs": "The container element that displays the content of the currently active tab."
|
|
4188
4178
|
},
|
|
4189
4179
|
{
|
|
4190
4180
|
"name": "tabs",
|
|
4191
|
-
"docs": "
|
|
4181
|
+
"docs": "The container element that holds the set of tabs."
|
|
4192
4182
|
}
|
|
4193
4183
|
],
|
|
4194
4184
|
"dependents": [],
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validates if an event should be processed based on target and nesting criteria
|
|
3
|
+
* @param event - The event to validate
|
|
4
|
+
* @param tag - The expected local name of the event target
|
|
5
|
+
* @param host - The host element for nested component checking
|
|
6
|
+
* @param ignoreNestedComponents - Whether to ignore events from nested components
|
|
7
|
+
* @returns true if the event should be processed, false otherwise
|
|
8
|
+
*/
|
|
9
|
+
function shouldProcessEvent(event, tag, host, ignoreNestedComponents) {
|
|
10
|
+
if (!(event instanceof Event && event.target instanceof HTMLElement))
|
|
11
|
+
return false;
|
|
12
|
+
const eventTarget = event.target;
|
|
13
|
+
if (eventTarget.localName !== tag)
|
|
14
|
+
return false;
|
|
15
|
+
if (ignoreNestedComponents) {
|
|
16
|
+
// Find the closest parent with the same tag as the host
|
|
17
|
+
const closestParentWithSameTag = findClosestParentWithTag(eventTarget, host.localName);
|
|
18
|
+
if (closestParentWithSameTag !== host)
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Decorator that guards event handlers to only execute when the event meets certain criteria.
|
|
25
|
+
* @param tag - The local name of the element that should be the target of the event
|
|
26
|
+
* @param option - Configuration options for the event guard
|
|
27
|
+
* @param option.ignoreNestedComponents - Whether to ignore events from nested components
|
|
28
|
+
*/
|
|
29
|
+
function EventFrom(tag, option = { ignoreNestedComponents: true }) {
|
|
30
|
+
return function (target, propertyKey, descriptor) {
|
|
31
|
+
if (descriptor) {
|
|
32
|
+
const originalMethod = descriptor.value;
|
|
33
|
+
descriptor.value = function (event) {
|
|
34
|
+
if (!shouldProcessEvent(event, tag, this.host, option.ignoreNestedComponents)) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
return originalMethod.call(this, event);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
// Creates a hidden storage property for the original method using a
|
|
42
|
+
// modified key format (__[property]_original) to avoid naming conflicts
|
|
43
|
+
const privateKey = `__${propertyKey}_original`;
|
|
44
|
+
// Create hidden storage for original method
|
|
45
|
+
Object.defineProperty(target, privateKey, {
|
|
46
|
+
writable: true,
|
|
47
|
+
configurable: true
|
|
48
|
+
});
|
|
49
|
+
// Replace property with getter/setter
|
|
50
|
+
Object.defineProperty(target, propertyKey, {
|
|
51
|
+
// Getter returns original method
|
|
52
|
+
get() {
|
|
53
|
+
return this[privateKey];
|
|
54
|
+
},
|
|
55
|
+
// Setter wraps original method with extra code
|
|
56
|
+
set(originalFunction) {
|
|
57
|
+
if (typeof originalFunction === 'function') {
|
|
58
|
+
// Store original and add new behavior
|
|
59
|
+
this[privateKey] = (event) => {
|
|
60
|
+
if (!shouldProcessEvent(event, tag, this.host, option.ignoreNestedComponents)) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
return originalFunction.call(this, event);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
this[privateKey] = originalFunction;
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
configurable: true,
|
|
71
|
+
enumerable: true
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Traverses up the DOM (including crossing shadow DOM boundaries) to find the closest ancestor
|
|
78
|
+
* that matches the specified tag name.
|
|
79
|
+
* @param element - The starting element
|
|
80
|
+
* @param tagName - The tag name to match (e.g., 'post-accordion')
|
|
81
|
+
* @returns The closest matching ancestor or null if none found
|
|
82
|
+
*/
|
|
83
|
+
function findClosestParentWithTag(element, tagName) {
|
|
84
|
+
let current = element;
|
|
85
|
+
while (current) {
|
|
86
|
+
if (current.localName === tagName) {
|
|
87
|
+
return current;
|
|
88
|
+
}
|
|
89
|
+
// Check regular parent first
|
|
90
|
+
if (current.parentElement) {
|
|
91
|
+
current = current.parentElement;
|
|
92
|
+
}
|
|
93
|
+
// If no parentElement, check if we're in a shadow root
|
|
94
|
+
else if (current.parentNode instanceof ShadowRoot) {
|
|
95
|
+
current = current.parentNode.host;
|
|
96
|
+
}
|
|
97
|
+
// No more parents to check
|
|
98
|
+
else {
|
|
99
|
+
current = null;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export { EventFrom as E };
|
|
@@ -94,10 +94,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
94
94
|
}
|
|
95
95
|
switch(bundleId) {
|
|
96
96
|
|
|
97
|
-
case 'post-avatar':
|
|
98
|
-
return import(
|
|
99
|
-
/* webpackMode: "lazy" */
|
|
100
|
-
'./post-avatar.entry.js').then(processMod, consoleError);
|
|
101
97
|
case 'post-card-control':
|
|
102
98
|
return import(
|
|
103
99
|
/* webpackMode: "lazy" */
|
|
@@ -126,6 +122,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
126
122
|
return import(
|
|
127
123
|
/* webpackMode: "lazy" */
|
|
128
124
|
'./post-tooltip.entry.js').then(processMod, consoleError);
|
|
125
|
+
case 'post-avatar':
|
|
126
|
+
return import(
|
|
127
|
+
/* webpackMode: "lazy" */
|
|
128
|
+
'./post-avatar.entry.js').then(processMod, consoleError);
|
|
129
129
|
case 'post-back-to-top':
|
|
130
130
|
return import(
|
|
131
131
|
/* webpackMode: "lazy" */
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
const EMPTY_VALUES = [undefined, null, '', NaN];
|
|
2
|
+
|
|
3
|
+
function isValueEmpty(value) {
|
|
4
|
+
return EMPTY_VALUES.some(v => v === value);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function requiredAnd(check) {
|
|
8
|
+
return (component, prop, ...extraArgs) => {
|
|
9
|
+
const componentName = component.host.localName;
|
|
10
|
+
const value = component[prop];
|
|
11
|
+
const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component is not defined.`;
|
|
12
|
+
if (isValueEmpty(value)) {
|
|
13
|
+
throw new Error(message);
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
check(component, prop, ...extraArgs);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function checkOneOf(component, prop, possibleValues) {
|
|
22
|
+
const componentName = component.host.localName;
|
|
23
|
+
const value = component[prop];
|
|
24
|
+
const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component must be one of the following values: ${possibleValues.join(', ')}.`;
|
|
25
|
+
if (!possibleValues.includes(value)) {
|
|
26
|
+
console.error(message);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function checkPattern(component, prop, pattern) {
|
|
31
|
+
const componentName = component.host.localName;
|
|
32
|
+
const value = component[prop];
|
|
33
|
+
const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component must follow the format \`${pattern}\`.`;
|
|
34
|
+
if (typeof value !== 'string' || !pattern.test(value)) {
|
|
35
|
+
console.error(message);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function checkType(component, prop, type) {
|
|
40
|
+
const componentName = component.host.localName;
|
|
41
|
+
const value = component[prop];
|
|
42
|
+
const typeIsArray = type === 'array';
|
|
43
|
+
const valueIsArray = Array.isArray(value);
|
|
44
|
+
const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component must be of type \`${type}\`.`;
|
|
45
|
+
if (typeIsArray || valueIsArray) {
|
|
46
|
+
if (valueIsArray !== typeIsArray) {
|
|
47
|
+
console.error(message);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
else if (typeof value !== type) {
|
|
51
|
+
console.error(message);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function checkUrl(component, prop) {
|
|
56
|
+
const componentName = component.host.localName;
|
|
57
|
+
const value = component[prop];
|
|
58
|
+
const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component is invalid.`;
|
|
59
|
+
if (typeof value !== 'string' && !(value instanceof URL)) {
|
|
60
|
+
console.error(message);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
try {
|
|
64
|
+
new URL(value, 'https://www.post.ch');
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
console.error(message);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function emptyOr(check) {
|
|
72
|
+
return (component, prop, ...extraArgs) => {
|
|
73
|
+
const value = component[prop];
|
|
74
|
+
if (!isValueEmpty(value)) {
|
|
75
|
+
check(component, prop, ...extraArgs);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const checkEmptyOrOneOf = emptyOr(checkOneOf);
|
|
81
|
+
const checkEmptyOrPattern = emptyOr(checkPattern);
|
|
82
|
+
const checkEmptyOrType = emptyOr(checkType);
|
|
83
|
+
const checkEmptyOrUrl = emptyOr(checkUrl);
|
|
84
|
+
const checkRequiredAndOneOf = requiredAnd(checkOneOf);
|
|
85
|
+
const checkRequiredAndType = requiredAnd(checkType);
|
|
86
|
+
const checkRequiredAndUrl = requiredAnd(checkUrl);
|
|
87
|
+
|
|
88
|
+
export { checkEmptyOrType as a, checkRequiredAndOneOf as b, checkRequiredAndType as c, checkEmptyOrOneOf as d, checkEmptyOrPattern as e, checkRequiredAndUrl as f, checkEmptyOrUrl as g };
|
package/dist/esm/loader.js
CHANGED
|
@@ -4,7 +4,7 @@ export { s as setNonce } from './index-C8a0ddDa.js';
|
|
|
4
4
|
const defineCustomElements = async (win, options) => {
|
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
|
6
6
|
await globalScripts();
|
|
7
|
-
return bootstrapLazy([["post-breadcrumbs",[[1,"post-breadcrumbs",{"homeUrl":[1,"home-url"],"homeText":[1,"home-text"],"breadcrumbItems":[32],"isConcatenated":[32],"lastWindowWidth":[32]},null,{"homeUrl":["validateHomeUrl"],"homeText":["validateHomeText"]}]]],["post-footer",[[1,"post-footer",{"label":[1],"device":[32],"gridSlotDisplayed":[32]},null,{"label":["validateLabel"]}]]],["post-back-to-top",[[1,"post-back-to-top",{"label":[513],"belowFold":[32]},null,{"label":["validateLabel"],"belowFold":["watchBelowFold"]}]]],["post-card-control",[[65,"post-card-control",{"label":[513],"description":[1],"type":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[1028],"validity":[1028],"icon":[1],"focused":[32],"reset":[64],"groupReset":[64]},null,{"label":["validateControlLabel"],"description":["validateControlDescription"],"type":["validateControlType"],"name":["validateControlName"],"value":["validateControlValue"],"icon":["validateControlIcon"],"checked":["updateControlChecked"],"disabled":["updateControlDisabled"]}]]],["post-popover",[[1,"post-popover",{"placement":[1],"closeButtonCaption":[1,"close-button-caption"],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]},null,{"placement":["validatePlacement"],"closeButtonCaption":["validateCloseButtonCaption"]}]]],["post-rating",[[1,"post-rating",{"label":[1],"stars":[2],"currentRating":[1026,"current-rating"],"readonly":[4],"hoveredIndex":[32]},null,{"label":["validateLabel"],"stars":["validateStars"],"currentRating":["validateCurrentRating"]}]]],["post-tooltip",[[1,"post-tooltip",{"placement":[1],"arrow":[4],"animation":[1],"open":[1540],"show":[64],"hide":[64],"toggle":[64]},null,{"placement":["validatePlacement"]}]]],["post-avatar",[[1,"post-avatar",{"firstname":[513],"lastname":[1],"userid":[1],"email":[1],"slottedImage":[32],"avatarType":[32],"imageUrl":[32],"imageAlt":[32],"initials":[32]},null,{"firstname":["validateFirstname"],"lastname":["validateLastname"],"userid":["
|
|
7
|
+
return bootstrapLazy([["post-breadcrumbs",[[1,"post-breadcrumbs",{"homeUrl":[1,"home-url"],"homeText":[1,"home-text"],"breadcrumbItems":[32],"isConcatenated":[32],"lastWindowWidth":[32]},null,{"homeUrl":["validateHomeUrl"],"homeText":["validateHomeText"]}]]],["post-footer",[[1,"post-footer",{"label":[1],"device":[32],"gridSlotDisplayed":[32]},null,{"label":["validateLabel"]}]]],["post-back-to-top",[[1,"post-back-to-top",{"label":[513],"belowFold":[32]},null,{"label":["validateLabel"],"belowFold":["watchBelowFold"]}]]],["post-card-control",[[65,"post-card-control",{"label":[513],"description":[1],"type":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[1028],"validity":[1028],"icon":[1],"focused":[32],"reset":[64],"groupReset":[64]},null,{"label":["validateControlLabel"],"description":["validateControlDescription"],"type":["validateControlType"],"name":["validateControlName"],"value":["validateControlValue"],"icon":["validateControlIcon"],"checked":["updateControlChecked"],"disabled":["updateControlDisabled"]}]]],["post-popover",[[1,"post-popover",{"placement":[1],"closeButtonCaption":[1,"close-button-caption"],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]},null,{"placement":["validatePlacement"],"closeButtonCaption":["validateCloseButtonCaption"]}]]],["post-rating",[[1,"post-rating",{"label":[1],"stars":[2],"currentRating":[1026,"current-rating"],"readonly":[4],"hoveredIndex":[32]},null,{"label":["validateLabel"],"stars":["validateStars"],"currentRating":["validateCurrentRating"]}]]],["post-tooltip",[[1,"post-tooltip",{"placement":[1],"arrow":[4],"animation":[1],"open":[1540],"show":[64],"hide":[64],"toggle":[64]},null,{"placement":["validatePlacement"]}]]],["post-avatar",[[1,"post-avatar",{"firstname":[513],"lastname":[1],"userid":[1],"email":[1],"slottedImage":[32],"avatarType":[32],"imageUrl":[32],"imageAlt":[32],"initials":[32],"storageKey":[32]},null,{"firstname":["validateFirstname"],"lastname":["validateLastname"],"userid":["updateUserid"],"email":["updateEmail"]}]]],["post-banner",[[1,"post-banner",{"type":[513],"hasActions":[32],"dismiss":[64]},[[0,"click","onCloseButtonClick"]],{"type":["validateType"]}]]],["post-linkarea",[[1,"post-linkarea"]]],["post-tab-header",[[1,"post-tab-header",{"panel":[513],"tabId":[32]},null,{"panel":["validateFor"]}]]],["post-tab-panel",[[1,"post-tab-panel",{"name":[513],"panelId":[32]},null,{"name":["validateName"]}]]],["post-tabs",[[1,"post-tabs",{"activePanel":[1,"active-panel"],"fullWidth":[516,"full-width"],"show":[64]}]]],["post-tooltip-trigger",[[1,"post-tooltip-trigger",{"for":[513],"delay":[2]},null,{"for":["validateControlFor"]}]]],["post-collapsible_2",[[1,"post-collapsible",{"collapsed":[1028],"toggle":[64]},null,{"collapsed":["collapsedChange"]}],[1,"post-collapsible-trigger",{"for":[513],"update":[64]},null,{"for":["validateAriaAttributes"]}]]],["post-closebutton_15",[[1,"post-language-switch",{"caption":[1],"description":[1],"variant":[1],"activeLang":[32]},[[0,"postChange","handlePostChange"],[0,"postLanguageOptionInitiallyActive","handleInitiallyActive"]],{"caption":["validateCaption"],"description":["validateDescription"],"variant":["validateVariant"]}],[1,"post-closebutton"],[4,"post-mainnavigation",{"canScrollLeft":[32],"canScrollRight":[32]},[[9,"mouseup","stopScrolling"],[9,"mouseleave","stopScrolling"]]],[1,"post-header",{"device":[32],"hasNavigation":[32],"mobileMenuExtended":[32],"megadropdownOpen":[32],"toggleMobileMenu":[64]},null,{"device":["lockBody"],"mobileMenuExtended":["lockBody"]}],[4,"post-language-option",{"code":[1],"active":[1540],"variant":[1],"name":[1],"url":[1],"select":[64]},null,{"code":["validateCode"],"variant":["validateVariant"],"name":["validateName"],"url":["validateUrl"]}],[4,"post-list",{"titleHidden":[4,"title-hidden"],"horizontal":[516],"titleId":[32]}],[1,"post-list-item"],[1,"post-logo",{"url":[1]},null,{"url":["validateUrl"]}],[4,"post-megadropdown",{"device":[32],"isVisible":[32],"animationClass":[32],"toggle":[64],"show":[64],"hide":[64],"focusFirst":[64]}],[4,"post-megadropdown-trigger",{"for":[1],"ariaExpanded":[32]},null,{"for":["validateControlFor"]}],[1,"post-togglebutton",{"toggled":[1028]}],[1,"post-menu",{"placement":[1],"isVisible":[32],"toggle":[64],"show":[64],"hide":[64]},null,{"placement":["validatePlacement"]}],[4,"post-menu-trigger",{"for":[513],"ariaExpanded":[32]},null,{"for":["validateControlFor"]}],[4,"post-popovercontainer",{"placement":[1],"edgeGap":[2,"edge-gap"],"animation":[1],"arrow":[4],"manualClose":[4,"manual-close"],"safeSpace":[513,"safe-space"],"show":[64],"hide":[64],"toggle":[64]},null,{"placement":["validatePlacement"],"edgeGap":["validateEdgeGap"],"safeSpace":["validateSafeSpace"]}],[1,"post-icon",{"animation":[1],"base":[1],"flipH":[4,"flip-h"],"flipV":[4,"flip-v"],"name":[513],"rotate":[2],"scale":[2]},null,{"animation":["validateAnimation"],"base":["validateBase"],"name":["validateName"],"rotate":["validateRotate"],"scale":["validateScale"]}]]],["post-accordion_2",[[1,"post-accordion-item",{"collapsed":[1028],"headingLevel":[2,"heading-level"],"id":[32],"slottedLogo":[32],"toggle":[64]},[[2,"postToggle","onCollapseToggle"]],{"headingLevel":["validateHeadingLevel"]}],[1,"post-accordion",{"headingLevel":[2,"heading-level"],"multiple":[4],"toggle":[64],"expandAll":[64],"collapseAll":[64]},[[0,"postToggle","collapseToggleHandler"]],{"headingLevel":["validateHeadingLevel"]}]]],["post-breadcrumb-item_2",[[1,"post-breadcrumb-item",{"url":[1],"fullUrl":[32]},null,{"url":["validateUrl"]}],[4,"post-menu-item"]]]], options);
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export { defineCustomElements };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, a as getElement } from './index-C8a0ddDa.js';
|
|
2
|
-
import { v as version } from './package-
|
|
3
|
-
import {
|
|
2
|
+
import { v as version } from './package-0Ltezq5O.js';
|
|
3
|
+
import { b as checkRequiredAndOneOf, d as checkEmptyOrOneOf } from './index-VmK3ABCB.js';
|
|
4
4
|
import './breakpoints-_0G7tavk.js';
|
|
5
|
-
import { E as EventFrom } from './event-from-
|
|
5
|
+
import { E as EventFrom } from './event-from-kraHE1r3.js';
|
|
6
6
|
import { n as nanoid } from './index.browser-BLchVpF6.js';
|
|
7
7
|
|
|
8
8
|
const HEADING_LEVELS = [1, 2, 3, 4, 5, 6];
|
|
@@ -162,10 +162,10 @@ const PostAccordionItem = class {
|
|
|
162
162
|
render() {
|
|
163
163
|
const headingLevel = this.host.closest('post-accordion')?.getAttribute('heading-level');
|
|
164
164
|
const HeadingTag = `h${headingLevel ?? this.headingLevel ?? 2}`;
|
|
165
|
-
return (h(Host, { key: '
|
|
165
|
+
return (h(Host, { key: 'b98847d19894430b6f65130aebf8673a45afd1e6', id: this.id, "data-version": version }, h("div", { key: 'f26f9d3a4a1f59db23b4698b321e28e112c3eed0', part: "accordion-item", class: "accordion-item" }, h("post-collapsible-trigger", { key: '14bdacce04d67a03655f600feeaeec065e0fc198', for: `${this.id}--collapse` }, h(HeadingTag, { key: '7a07a70d172306ce37f8bd0143b21ed7ec0cab8a', class: "accordion-header", id: `${this.id}--header` }, h("button", { key: '5ad0698a62df5c4b2c0a77ff622090b20f348e9c', type: "button", class: `accordion-button${this.collapsed ? ' collapsed' : ''}`, part: "button" }, h("span", { key: '6e5fcb0c9efa8a57e05fd162c72b9c170a8210c6', class: {
|
|
166
166
|
'logo-container': true,
|
|
167
167
|
'has-image': !!this.slottedLogo,
|
|
168
|
-
} }, h("slot", { key: '
|
|
168
|
+
} }, h("slot", { key: '41a1409f723bf52de893324ce45d4e7f31eb8908', name: "logo", onSlotchange: this.onSlotLogoChange.bind(this) })), h("slot", { key: '7186adfe4a4fe67f4dbaeb7569820d0d06c18428', name: "header" }), h("post-icon", { key: 'fbfcbdc9947a8c7cf80d861aba3a77be0dff91d1', name: "2051" })))), h("post-collapsible", { key: '5de19aab5eb0134b7c3e7f43e5c2da0cb8413908', id: `${this.id}--collapse`, collapsed: this.collapsed, ref: el => (this.collapsible = el) }, h("div", { key: '5112ba8604ea177af4d88033f682c2a4cc6c4ffd', class: "accordion-body", part: "body" }, h("slot", { key: 'd70ab76842fced3f7dec812471685071e377bc61' }))))));
|
|
169
169
|
}
|
|
170
170
|
get host() { return getElement(this); }
|
|
171
171
|
static get watchers() { return {
|