@swisspost/design-system-components 7.4.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-f32e5185.js → index-a1440961.js} +15 -2
- package/dist/cjs/{index-1cc8e4e1.js → index-baad16da.js} +8 -17
- package/dist/cjs/index.cjs.js +18 -20
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-549b9aab.js → package-28cba29c.js} +1 -1
- package/dist/cjs/{post-accordion-e0a2c3c3.js → post-accordion-fc746a6f.js} +2 -2
- package/dist/cjs/{post-accordion-item-772332db.js → post-accordion-item-c0492b73.js} +6 -7
- package/dist/cjs/post-accordion-item.cjs.entry.js +4 -5
- package/dist/cjs/post-accordion.cjs.entry.js +3 -3
- package/dist/cjs/{post-alert-42220c7a.js → post-alert-0612ad51.js} +8 -9
- package/dist/cjs/post-alert.cjs.entry.js +4 -5
- package/dist/cjs/{post-card-control-45047568.js → post-card-control-2fd18624.js} +4 -4
- package/dist/cjs/post-card-control.cjs.entry.js +3 -3
- package/dist/cjs/post-collapsible-trigger-8d39196e.js +206 -0
- package/dist/cjs/{post-collapsible-trigger.cjs.entry.js → post-collapsible_2.cjs.entry.js} +7 -5
- package/dist/cjs/post-components.cjs.js +3 -3
- package/dist/cjs/{post-icon-d136be35.js → post-icon-bd260560.js} +5 -6
- package/dist/cjs/post-icon.cjs.entry.js +4 -5
- package/dist/cjs/{post-popover-1024d72f.js → post-popover-303e76ef.js} +3 -3
- package/dist/cjs/post-popover.cjs.entry.js +3 -3
- package/dist/cjs/{post-popovercontainer-f5dd6284.js → post-popovercontainer-c64bde39.js} +8 -9
- package/dist/cjs/post-popovercontainer.cjs.entry.js +3 -3
- package/dist/cjs/{post-rating-df981989.js → post-rating-dc7bd246.js} +3 -3
- package/dist/cjs/post-rating.cjs.entry.js +3 -3
- package/dist/cjs/{post-tab-header-17fe11d6.js → post-tab-header-06c40218.js} +3 -3
- package/dist/cjs/post-tab-header.cjs.entry.js +3 -3
- package/dist/cjs/{post-tab-panel-a47c8cfe.js → post-tab-panel-54fbdb66.js} +3 -3
- package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
- package/dist/cjs/{post-tabs-766f8241.js → post-tabs-52b9d638.js} +3 -3
- package/dist/cjs/post-tabs.cjs.entry.js +3 -3
- package/dist/cjs/{post-tag-65ec8149.js → post-tag-4aba2155.js} +3 -3
- package/dist/cjs/post-tag.cjs.entry.js +3 -3
- package/dist/cjs/{post-tooltip-2efd6509.js → post-tooltip-3c695f60.js} +4 -4
- package/dist/cjs/post-tooltip.cjs.entry.js +4 -5
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +7 -9
- package/dist/collection/components/post-alert/post-alert.js +3 -3
- package/dist/collection/components/post-card-control/post-card-control.js +2 -2
- package/dist/collection/components/post-collapsible/post-collapsible.js +12 -14
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +14 -19
- package/dist/collection/components/post-icon/post-icon.js +1 -1
- package/dist/collection/components/post-popover/post-popover.js +2 -2
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +3 -3
- package/dist/collection/components/post-rating/post-rating.js +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 +1 -1
- package/dist/collection/components/post-tag/post-tag.js +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +2 -2
- package/dist/collection/utils/get-root.js +7 -0
- package/dist/collection/utils/index.js +1 -0
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +13 -9
- package/dist/components/post-alert2.js +3 -3
- package/dist/components/post-card-control2.js +2 -2
- package/dist/components/post-collapsible-trigger2.js +22 -10
- package/dist/components/post-collapsible2.js +12 -14
- package/dist/components/post-icon2.js +1 -1
- package/dist/components/post-popover2.js +1 -1
- package/dist/components/post-popovercontainer2.js +6 -7
- package/dist/components/post-rating2.js +1 -1
- package/dist/components/post-tab-header2.js +1 -1
- package/dist/components/post-tab-panel2.js +1 -1
- package/dist/components/post-tabs2.js +1 -1
- package/dist/components/post-tag2.js +1 -1
- package/dist/components/post-tooltip2.js +1 -1
- package/dist/docs.json +23 -22
- package/dist/esm/{index-9ace3232.js → index-189d3985.js} +8 -17
- package/dist/esm/{index-29d17d6d.js → index-d1eba94c.js} +14 -2
- package/dist/esm/index.js +17 -19
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{package-91140d77.js → package-3e4546f5.js} +1 -1
- package/dist/esm/{post-accordion-09978cd3.js → post-accordion-1cbd089a.js} +2 -2
- package/dist/esm/{post-accordion-item-4210d17f.js → post-accordion-item-316ee985.js} +6 -7
- package/dist/esm/post-accordion-item.entry.js +4 -5
- package/dist/esm/post-accordion.entry.js +3 -3
- package/dist/esm/{post-alert-64d34792.js → post-alert-6fa442b9.js} +6 -7
- package/dist/esm/post-alert.entry.js +4 -5
- package/dist/esm/{post-card-control-244f45f6.js → post-card-control-41356aa4.js} +4 -4
- package/dist/esm/post-card-control.entry.js +3 -3
- package/dist/esm/post-collapsible-trigger-6f4ba350.js +203 -0
- package/dist/esm/post-collapsible_2.entry.js +7 -0
- package/dist/esm/post-components.js +4 -4
- package/dist/esm/{post-icon-f05c6d37.js → post-icon-fe467f6a.js} +4 -5
- package/dist/esm/post-icon.entry.js +4 -5
- package/dist/esm/{post-popover-a094d059.js → post-popover-c9998136.js} +3 -3
- package/dist/esm/post-popover.entry.js +3 -3
- package/dist/esm/{post-popovercontainer-1faa005e.js → post-popovercontainer-62ced3d7.js} +8 -9
- package/dist/esm/post-popovercontainer.entry.js +3 -3
- package/dist/esm/{post-rating-62590a88.js → post-rating-49ace0e9.js} +3 -3
- package/dist/esm/post-rating.entry.js +3 -3
- package/dist/esm/{post-tab-header-1b88d56e.js → post-tab-header-696a7aae.js} +3 -3
- package/dist/esm/post-tab-header.entry.js +3 -3
- package/dist/esm/{post-tab-panel-fac73181.js → post-tab-panel-c00910fb.js} +3 -3
- package/dist/esm/post-tab-panel.entry.js +3 -3
- package/dist/esm/{post-tabs-4528a1a5.js → post-tabs-a7990c9e.js} +3 -3
- package/dist/esm/post-tabs.entry.js +3 -3
- package/dist/esm/{post-tag-8b82ff5c.js → post-tag-d9650103.js} +3 -3
- package/dist/esm/post-tag.entry.js +3 -3
- package/dist/esm/{post-tooltip-1156bdc7.js → post-tooltip-cf07e816.js} +4 -4
- package/dist/esm/post-tooltip.entry.js +4 -5
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-0aee269b.entry.js +1 -0
- package/dist/post-components/p-2240981f.entry.js +1 -0
- package/dist/post-components/{p-4dc0b726.js → p-266adbdd.js} +1 -1
- package/dist/post-components/p-27cb2e60.entry.js +1 -0
- package/dist/post-components/p-2c9277b1.entry.js +1 -0
- package/dist/post-components/p-3764a23a.entry.js +1 -0
- package/dist/post-components/{p-0df6bfe1.js → p-382f85c4.js} +1 -1
- package/dist/post-components/p-48ed21f0.entry.js +1 -0
- package/dist/post-components/p-496cee95.entry.js +1 -0
- package/dist/post-components/p-4ce46830.entry.js +1 -0
- package/dist/post-components/p-5135c965.entry.js +1 -0
- package/dist/post-components/{p-eff7cef8.js → p-5c4773cb.js} +2 -2
- package/dist/post-components/p-660ecc23.js +1 -0
- package/dist/post-components/p-69145fd2.js +1 -0
- package/dist/post-components/p-6af42a67.entry.js +1 -0
- package/dist/post-components/{p-21bdf1f3.js → p-6c701d9f.js} +1 -1
- package/dist/post-components/p-7095990e.js +1 -0
- package/dist/post-components/p-7481e37a.entry.js +1 -0
- package/dist/post-components/{p-04dc2d21.js → p-783e67bc.js} +1 -1
- package/dist/post-components/p-8f0ee57c.entry.js +1 -0
- package/dist/post-components/p-90479234.js +1 -0
- package/dist/post-components/p-a4794190.js +1 -0
- package/dist/post-components/{p-a8dc1aa1.js → p-a4e13e9c.js} +1 -1
- package/dist/post-components/{p-bdb6c1b8.js → p-ab26873d.js} +1 -1
- package/dist/post-components/p-b08aca79.entry.js +1 -0
- package/dist/post-components/p-beb27e06.js +1 -0
- package/dist/post-components/{p-8c7f0075.js → p-c0f265c8.js} +2 -2
- package/dist/post-components/{p-8e975b46.js → p-e024aa18.js} +1 -1
- package/dist/post-components/p-ea063aae.entry.js +1 -0
- package/dist/post-components/p-f732d73c.js +1 -0
- package/dist/post-components/p-f91c0e1b.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 +2 -3
- package/dist/types/components/post-collapsible/post-collapsible.d.ts +3 -4
- package/dist/types/components/post-collapsible-trigger/post-collapsible-trigger.d.ts +6 -5
- package/dist/types/components.d.ts +4 -4
- package/dist/types/utils/get-root.d.ts +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/package.json +10 -10
- package/dist/cjs/check-type-64af82a9.js +0 -16
- package/dist/cjs/post-collapsible-d71942e3.js +0 -87
- package/dist/cjs/post-collapsible-trigger-a7e32ead.js +0 -115
- package/dist/cjs/post-collapsible.cjs.entry.js +0 -15
- package/dist/esm/check-type-8828dbe4.js +0 -14
- package/dist/esm/post-collapsible-4ddc1db3.js +0 -85
- package/dist/esm/post-collapsible-trigger-b0100e8c.js +0 -113
- package/dist/esm/post-collapsible-trigger.entry.js +0 -6
- package/dist/esm/post-collapsible.entry.js +0 -7
- package/dist/post-components/p-10cd6860.entry.js +0 -1
- package/dist/post-components/p-158d0eee.entry.js +0 -1
- package/dist/post-components/p-1f9ddbd4.js +0 -1
- package/dist/post-components/p-2da9a13c.js +0 -1
- package/dist/post-components/p-39b6f635.entry.js +0 -1
- package/dist/post-components/p-3cb6b887.entry.js +0 -1
- package/dist/post-components/p-4a3f67ab.js +0 -1
- package/dist/post-components/p-5ef247ea.entry.js +0 -1
- package/dist/post-components/p-67d41a4b.entry.js +0 -1
- package/dist/post-components/p-78111d97.entry.js +0 -1
- package/dist/post-components/p-7f3045f5.entry.js +0 -1
- package/dist/post-components/p-80708279.entry.js +0 -1
- package/dist/post-components/p-8c9bd744.entry.js +0 -1
- package/dist/post-components/p-9170a653.js +0 -1
- package/dist/post-components/p-9656cf35.js +0 -1
- package/dist/post-components/p-9fa0742e.js +0 -1
- package/dist/post-components/p-ac500761.js +0 -1
- package/dist/post-components/p-b53753a0.js +0 -1
- package/dist/post-components/p-bd0695bf.js +0 -1
- package/dist/post-components/p-c297c7d1.entry.js +0 -1
- package/dist/post-components/p-c8fe8c37.js +0 -1
- package/dist/post-components/p-d1c71b7d.entry.js +0 -1
- package/dist/post-components/p-d9e5275c.entry.js +0 -1
- package/dist/post-components/p-f7101c7f.entry.js +0 -1
- package/dist/post-components/p-ffdd17d8.entry.js +0 -1
|
@@ -266,14 +266,14 @@ const PostCardControl = /*@__PURE__*/ proxyCustomElement(class PostCardControl e
|
|
|
266
266
|
this.hasIcon = Boolean(this.host.querySelector('[slot="icon"]') || this.icon);
|
|
267
267
|
}
|
|
268
268
|
render() {
|
|
269
|
-
return (h(Host, { key: '
|
|
269
|
+
return (h(Host, { key: 'a99c4d289e6546d08bc43b55347e3faab514a6ed', "data-version": version, onClick: this.cardClickHandler }, h("div", { key: '3d5f19d37ad0dac2c0526dfab9bc915609eb73b6', class: {
|
|
270
270
|
'card-control': true,
|
|
271
271
|
'is-checked': this.checked,
|
|
272
272
|
'is-disabled': this.disabled,
|
|
273
273
|
'is-focused': this.focused,
|
|
274
274
|
'is-valid': this.validity !== null && this.validity !== 'false',
|
|
275
275
|
'is-invalid': this.validity === 'false',
|
|
276
|
-
}, "data-host-context": this.hostContext.join(' ') }, h("input", { key: '
|
|
276
|
+
}, "data-host-context": this.hostContext.join(' ') }, h("input", { key: '305fce2f7405918dba56e604c6579aa96609034c', ref: el => (this.control = el), id: this.controlId, class: "card-control--input form-check-input", type: this.type, name: this.name, value: this.value, checked: this.checked, "aria-describedby": `${this.controlId}_label ${this.controlId}_content`, "aria-disabled": this.disabled, "aria-invalid": this.validity === 'false', onClick: this.controlClickHandler, onInput: this.controlChangeHandler, onChange: this.controlChangeHandler, onFocus: this.controlFocusHandler, onBlur: this.controlFocusHandler, onKeyDown: this.controlKeyDownHandler }), h("label", { key: 'e6de984f7e2cb6c6128f1875127e980c956fb5c8', id: `${this.controlId}_label`, htmlFor: this.controlId, class: "card-control--label form-check-label" }, this.label, this.description ? (h("div", { class: "card-control--description" }, this.description)) : null), this.hasIcon ? (h("div", { class: "card-control--icon" }, h("slot", { name: "icon" }, this.icon ? h("post-icon", { name: this.icon }) : null))) : null, h("div", { key: '770c2382527e7bfe90a520ac82b0219f26da75d0', id: `${this.controlId}_content`, class: "card-control--content" }, h("slot", { key: '5f0e50844a19db803257feb27a16ebfb9a55dddc' })))));
|
|
277
277
|
}
|
|
278
278
|
componentDidRender() {
|
|
279
279
|
this.groupCollectMembers();
|
|
@@ -12,6 +12,14 @@ function debounce(callback, timeout = 200) {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
function getRoot(element) {
|
|
16
|
+
const root = element.getRootNode();
|
|
17
|
+
if (root instanceof Document || root instanceof ShadowRoot) {
|
|
18
|
+
return root;
|
|
19
|
+
}
|
|
20
|
+
throw new Error('Attempting to access root node before the element is attached to the document or shadow tree.');
|
|
21
|
+
}
|
|
22
|
+
|
|
15
23
|
const PostCollapsibleTrigger = /*@__PURE__*/ proxyCustomElement(class PostCollapsibleTrigger extends HTMLElement {
|
|
16
24
|
constructor() {
|
|
17
25
|
super();
|
|
@@ -48,6 +56,18 @@ const PostCollapsibleTrigger = /*@__PURE__*/ proxyCustomElement(class PostCollap
|
|
|
48
56
|
connectedCallback() {
|
|
49
57
|
this.observer.observe(this.host, { childList: true, subtree: true });
|
|
50
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Attach a "postToggle" event listener to the root node
|
|
61
|
+
* to update the trigger's "aria-expanded" attribute whenever the controlled post-collapsible is toggled
|
|
62
|
+
*/
|
|
63
|
+
componentWillLoad() {
|
|
64
|
+
this.root = getRoot(this.host);
|
|
65
|
+
this.root.addEventListener('postToggle', (e) => {
|
|
66
|
+
if (!this.trigger || !e.target.isEqualNode(this.collapsible))
|
|
67
|
+
return;
|
|
68
|
+
this.trigger.setAttribute('aria-expanded', `${e.detail}`);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
51
71
|
/**
|
|
52
72
|
* Add the "data-version" to the host element and set the trigger
|
|
53
73
|
*/
|
|
@@ -63,14 +83,6 @@ const PostCollapsibleTrigger = /*@__PURE__*/ proxyCustomElement(class PostCollap
|
|
|
63
83
|
disconnectedCallback() {
|
|
64
84
|
this.observer.disconnect();
|
|
65
85
|
}
|
|
66
|
-
/**
|
|
67
|
-
* Update the "aria-expanded" attribute on the trigger anytime the controlled post-collapsible is toggled
|
|
68
|
-
*/
|
|
69
|
-
setAriaExpanded(e) {
|
|
70
|
-
if (!this.trigger || !e.target.isEqualNode(this.collapsible))
|
|
71
|
-
return;
|
|
72
|
-
this.trigger.setAttribute('aria-expanded', `${e.detail}`);
|
|
73
|
-
}
|
|
74
86
|
/**
|
|
75
87
|
* Update the "aria-controls" and "aria-expanded" attributes on the trigger button
|
|
76
88
|
*/
|
|
@@ -88,7 +100,7 @@ const PostCollapsibleTrigger = /*@__PURE__*/ proxyCustomElement(class PostCollap
|
|
|
88
100
|
* Retrieve the post-collapsible controlled by the trigger
|
|
89
101
|
*/
|
|
90
102
|
get collapsible() {
|
|
91
|
-
const ref =
|
|
103
|
+
const ref = this.root.getElementById(this.for);
|
|
92
104
|
if (ref && ref.localName === 'post-collapsible') {
|
|
93
105
|
return ref;
|
|
94
106
|
}
|
|
@@ -112,7 +124,7 @@ const PostCollapsibleTrigger = /*@__PURE__*/ proxyCustomElement(class PostCollap
|
|
|
112
124
|
}, [0, "post-collapsible-trigger", {
|
|
113
125
|
"for": [1],
|
|
114
126
|
"update": [64]
|
|
115
|
-
},
|
|
127
|
+
}, undefined, {
|
|
116
128
|
"for": ["setAriaAttributes"]
|
|
117
129
|
}]);
|
|
118
130
|
function defineCustomElement() {
|
|
@@ -37,15 +37,12 @@ const PostCollapsible = /*@__PURE__*/ proxyCustomElement(class PostCollapsible e
|
|
|
37
37
|
this.isOpen = true;
|
|
38
38
|
this.collapsed = false;
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
checkEmptyOrType(
|
|
42
|
-
|
|
43
|
-
connectedCallback() {
|
|
44
|
-
this.validateCollapsed();
|
|
40
|
+
collapsedChange() {
|
|
41
|
+
checkEmptyOrType(this.collapsed, 'boolean', 'The `collapsed` property of the `post-collapsible` must be a boolean.');
|
|
42
|
+
void this.toggle(!this.collapsed);
|
|
45
43
|
}
|
|
46
44
|
componentDidLoad() {
|
|
47
|
-
|
|
48
|
-
void this.toggle(false);
|
|
45
|
+
this.collapsedChange();
|
|
49
46
|
this.isLoaded = true;
|
|
50
47
|
this.updateTriggers();
|
|
51
48
|
}
|
|
@@ -57,15 +54,16 @@ const PostCollapsible = /*@__PURE__*/ proxyCustomElement(class PostCollapsible e
|
|
|
57
54
|
async toggle(open = !this.isOpen) {
|
|
58
55
|
if (open === this.isOpen)
|
|
59
56
|
return open;
|
|
60
|
-
this.isOpen =
|
|
57
|
+
this.isOpen = open;
|
|
58
|
+
this.collapsed = !open;
|
|
61
59
|
if (this.isLoaded)
|
|
62
|
-
this.postToggle.emit(
|
|
60
|
+
this.postToggle.emit(open);
|
|
63
61
|
const animation = open ? expand(this.host) : collapse(this.host);
|
|
64
62
|
if (!this.isLoaded || isMotionReduced())
|
|
65
63
|
animation.finish();
|
|
66
64
|
await animation.finished;
|
|
67
65
|
animation.commitStyles();
|
|
68
|
-
return
|
|
66
|
+
return open;
|
|
69
67
|
}
|
|
70
68
|
/**
|
|
71
69
|
* Update all post-collapsible-trigger elements referring to the collapsible
|
|
@@ -75,18 +73,18 @@ const PostCollapsible = /*@__PURE__*/ proxyCustomElement(class PostCollapsible e
|
|
|
75
73
|
triggers.forEach(trigger => trigger.update());
|
|
76
74
|
}
|
|
77
75
|
render() {
|
|
78
|
-
return (h(Host, { key: '
|
|
76
|
+
return (h(Host, { key: '47ab19bf719a505dce35955d6250462acea47eee', "data-version": version }, h("slot", { key: 'd7fe5746afe1c343e9ec4c02878d8dead9360c26' })));
|
|
79
77
|
}
|
|
80
78
|
get host() { return this; }
|
|
81
79
|
static get watchers() { return {
|
|
82
|
-
"collapsed": ["
|
|
80
|
+
"collapsed": ["collapsedChange"]
|
|
83
81
|
}; }
|
|
84
82
|
static get style() { return PostCollapsibleStyle0; }
|
|
85
83
|
}, [1, "post-collapsible", {
|
|
86
|
-
"collapsed": [
|
|
84
|
+
"collapsed": [1028],
|
|
87
85
|
"toggle": [64]
|
|
88
86
|
}, undefined, {
|
|
89
|
-
"collapsed": ["
|
|
87
|
+
"collapsed": ["collapsedChange"]
|
|
90
88
|
}]);
|
|
91
89
|
function defineCustomElement() {
|
|
92
90
|
if (typeof customElements === "undefined") {
|
|
@@ -87,7 +87,7 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
|
|
|
87
87
|
})
|
|
88
88
|
.filter(([_key, value]) => value !== null)
|
|
89
89
|
.reduce((styles, [key, value]) => Object.assign(styles, { [key]: value }), {});
|
|
90
|
-
return (h(Host, { key: '
|
|
90
|
+
return (h(Host, { key: '95fa0f7a09d3430bb5d621e01b57188742920eb4', "data-version": version }, h("span", { key: 'c824e3705dc83665bb6f7649381654e6d1e07dfb', style: svgStyles })));
|
|
91
91
|
}
|
|
92
92
|
get host() { return this; }
|
|
93
93
|
static get watchers() { return {
|
|
@@ -96,7 +96,7 @@ const PostPopover = /*@__PURE__*/ proxyCustomElement(class PostPopover extends H
|
|
|
96
96
|
this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
|
|
97
97
|
}
|
|
98
98
|
render() {
|
|
99
|
-
return (h(Host, { key: '
|
|
99
|
+
return (h(Host, { key: '97db4a92db81f3a84ca272af8f79981cf181024d', "data-version": version }, h("post-popovercontainer", { key: '291247845dc11572a5722aa949c1dfa74e521edd', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '92137bf8c92633c8578c89c7b0c8252b0b59e2fa', class: "popover-container" }, h("div", { key: '06f79f59e90ca439b552380af0e151084adadf03', class: "popover-content" }, h("slot", { key: 'c37c742ac7cf24f9440ac3b862761fcd937f7658' })), h("button", { key: '0e6f316574720e0f901af56e0dbb99f86e36c5b4', class: "btn-close", onClick: () => this.hide() }, h("span", { key: '77c41e8e8df74649ce9ca21740c77e78336905e6', class: "visually-hidden" }, this.closeButtonCaption))))));
|
|
100
100
|
}
|
|
101
101
|
get host() { return this; }
|
|
102
102
|
static get style() { return PostPopoverStyle0; }
|
|
@@ -1210,9 +1210,9 @@ function isTopLayer(element) {
|
|
|
1210
1210
|
}
|
|
1211
1211
|
});
|
|
1212
1212
|
}
|
|
1213
|
-
function isContainingBlock(
|
|
1213
|
+
function isContainingBlock(elementOrCss) {
|
|
1214
1214
|
const webkit = isWebKit();
|
|
1215
|
-
const css = getComputedStyle(
|
|
1215
|
+
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
|
1216
1216
|
|
|
1217
1217
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1218
1218
|
return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
|
|
@@ -1220,11 +1220,10 @@ function isContainingBlock(element) {
|
|
|
1220
1220
|
function getContainingBlock(element) {
|
|
1221
1221
|
let currentNode = getParentNode(element);
|
|
1222
1222
|
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1223
|
-
if (isTopLayer(currentNode)) {
|
|
1224
|
-
return null;
|
|
1225
|
-
}
|
|
1226
1223
|
if (isContainingBlock(currentNode)) {
|
|
1227
1224
|
return currentNode;
|
|
1225
|
+
} else if (isTopLayer(currentNode)) {
|
|
1226
|
+
return null;
|
|
1228
1227
|
}
|
|
1229
1228
|
currentNode = getParentNode(currentNode);
|
|
1230
1229
|
}
|
|
@@ -2175,9 +2174,9 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2175
2174
|
}
|
|
2176
2175
|
}
|
|
2177
2176
|
render() {
|
|
2178
|
-
return (h(Host, { key: '
|
|
2177
|
+
return (h(Host, { key: 'd157ffbb6acb382add7b003f7865eb7c7d77a2b5', "data-version": version }, this.arrow && (h("span", { key: 'cc47843bc00d401c0679474e41661b6b1dcbae01', class: "arrow", ref: el => {
|
|
2179
2178
|
this.arrowRef = el;
|
|
2180
|
-
} })), h("slot", { key: '
|
|
2179
|
+
} })), h("slot", { key: '75eb62cf77965fa96fbb3dabcf264c2daff3e2f4' })));
|
|
2181
2180
|
}
|
|
2182
2181
|
get host() { return this; }
|
|
2183
2182
|
static get style() { return PostPopovercontainerStyle0; }
|
|
@@ -74,7 +74,7 @@ const PostRating = /*@__PURE__*/ proxyCustomElement(class PostRating extends HTM
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
render() {
|
|
77
|
-
return (h(Host, { key: '
|
|
77
|
+
return (h(Host, { key: 'ae0484c022555a4a5ed0343cc060b7076a1c581e', "data-version": version }, h("div", { key: '3765eaaccec1dd709b28d8a63b54fc0ed69b4c15', role: "slider", class: "rating", tabindex: "0", "aria-label": this.label, "aria-valuemin": "0", "aria-valuemax": this.stars, "aria-valuenow": this.currentRating, "aria-valuetext": `${this.currentRating} out of ${this.stars}`, "aria-readonly": this.readonly ? 'true' : 'false', onKeyDown: this.keydownHandler, onBlur: this.blurHandler }, Array.from({ length: this.stars }).map((v, i) => (h("div", { key: `star-${v}`, "aria-hidden": "true", class: {
|
|
78
78
|
'star': true,
|
|
79
79
|
'before-hover': i < this.hoveredIndex,
|
|
80
80
|
'active': i < Math.round(this.currentRating),
|
|
@@ -20,7 +20,7 @@ const PostTabHeader = /*@__PURE__*/ proxyCustomElement(class PostTabHeader exten
|
|
|
20
20
|
this.tabId = `tab-${this.host.id || crypto.randomUUID()}`;
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (h(Host, { key: '
|
|
23
|
+
return (h(Host, { key: 'ba101bdcdf05591293e07ab35aadb812862d8cc0', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '276d95c72fc7014f8002f249f2bbab591ee8754d' })));
|
|
24
24
|
}
|
|
25
25
|
get host() { return this; }
|
|
26
26
|
static get watchers() { return {
|
|
@@ -17,7 +17,7 @@ const PostTabPanel = /*@__PURE__*/ proxyCustomElement(class PostTabPanel extends
|
|
|
17
17
|
this.panelId = `panel-${this.host.id || crypto.randomUUID()}`;
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: 'bd31fce17f303414e7d077fbc001b543d05e362c', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: '746b85fa6378312abb2f1e92cb4fffceafac1fc7' })));
|
|
21
21
|
}
|
|
22
22
|
get host() { return this; }
|
|
23
23
|
static get style() { return PostTabPanelStyle0; }
|
|
@@ -143,7 +143,7 @@ const PostTabs = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLEle
|
|
|
143
143
|
nextTab.focus();
|
|
144
144
|
}
|
|
145
145
|
render() {
|
|
146
|
-
return (h(Host, { key: '
|
|
146
|
+
return (h(Host, { key: 'd0f37718e538b9dd4b5e0eed0dde161576725e25', "data-version": version }, h("div", { key: '1d3380b6317cad0bde525136854e93ee20e3bfbf', class: "tabs-wrapper", part: "tabs" }, h("div", { key: 'bc5cf13c94629e2938eb4ea85deb5ebd6c2b2dac', class: "tabs", role: "tablist" }, h("slot", { key: '4fde604e204df192946080b652d60c27d7ff6cee', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: '755b7153a2a8c683abf15d33a0d9180e8aa29db0', class: "tab-content", part: "content" }, h("slot", { key: '23263344474597c54a7d8cc355d22919cb8685f1', onSlotchange: () => this.moveMisplacedTabs() }))));
|
|
147
147
|
}
|
|
148
148
|
get host() { return this; }
|
|
149
149
|
static get style() { return PostTabsStyle0; }
|
|
@@ -35,7 +35,7 @@ const PostTag = /*@__PURE__*/ proxyCustomElement(class PostTag extends HTMLEleme
|
|
|
35
35
|
this.setClasses();
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
|
-
return (h(Host, { key: '
|
|
38
|
+
return (h(Host, { key: '5b29f617d1f9dbba914664263ccace77e18fdd10', "data-version": version }, h("div", { key: '25d9431e746f0d677704c97dc9bd27023a502efb', class: this.classes }, this.icon ? h("post-icon", { name: this.icon }) : null, h("div", { key: 'e13004f14169d4abccd3df8d0245bc2f361f0b81', class: "tag-text" }, h("slot", { key: '567d61fae24d649c64c9ea53685a627f7e45fde1' })))));
|
|
39
39
|
}
|
|
40
40
|
get host() { return this; }
|
|
41
41
|
static get watchers() { return {
|
|
@@ -4958,7 +4958,7 @@ const PostTooltip = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends H
|
|
|
4958
4958
|
}
|
|
4959
4959
|
render() {
|
|
4960
4960
|
const popoverClass = `${this.arrow ? ' has-arrow' : ''}`;
|
|
4961
|
-
return (h(Host, { key: '
|
|
4961
|
+
return (h(Host, { key: '939e17d222f1102dbfe3532d1cfe11b2777e4373', "data-version": version$1, role: "tooltip", onPointerOver: this.handleInterest, onPointerOut: this.handleInterestLost, onFocusIn: this.handleInterest, onFocusOut: this.handleInterestLost }, h("post-popovercontainer", { key: 'fe5388550554ebb39c8f5b59668b86483b5cb141', class: popoverClass, arrow: this.arrow, placement: this.placement, ref: (el) => (this.popoverRef = el) }, h("slot", { key: '90275f38a63f5d6f18b915718b738f29246b2843' }))));
|
|
4962
4962
|
}
|
|
4963
4963
|
get host() { return this; }
|
|
4964
4964
|
static get watchers() { return {
|
package/dist/docs.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2024-07-
|
|
2
|
+
"timestamp": "2024-07-23T09:56:20",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
|
-
"version": "4.19.
|
|
5
|
+
"version": "4.19.2",
|
|
6
6
|
"typescriptVersion": "5.4.5"
|
|
7
7
|
},
|
|
8
8
|
"components": [
|
|
@@ -217,10 +217,10 @@
|
|
|
217
217
|
"resolved": "boolean",
|
|
218
218
|
"references": {}
|
|
219
219
|
},
|
|
220
|
-
"mutable":
|
|
220
|
+
"mutable": true,
|
|
221
221
|
"attr": "collapsed",
|
|
222
222
|
"reflectToAttr": false,
|
|
223
|
-
"docs": "If `true`, the element is
|
|
223
|
+
"docs": "If `true`, the element is collapsed otherwise it is displayed.",
|
|
224
224
|
"docsTags": [],
|
|
225
225
|
"default": "false",
|
|
226
226
|
"values": [
|
|
@@ -327,7 +327,7 @@
|
|
|
327
327
|
"listeners": [
|
|
328
328
|
{
|
|
329
329
|
"event": "postToggle",
|
|
330
|
-
"capture":
|
|
330
|
+
"capture": true,
|
|
331
331
|
"passive": false
|
|
332
332
|
}
|
|
333
333
|
],
|
|
@@ -350,10 +350,12 @@
|
|
|
350
350
|
],
|
|
351
351
|
"dependents": [],
|
|
352
352
|
"dependencies": [
|
|
353
|
+
"post-collapsible-trigger",
|
|
353
354
|
"post-collapsible"
|
|
354
355
|
],
|
|
355
356
|
"dependencyGraph": {
|
|
356
357
|
"post-accordion-item": [
|
|
358
|
+
"post-collapsible-trigger",
|
|
357
359
|
"post-collapsible"
|
|
358
360
|
]
|
|
359
361
|
}
|
|
@@ -933,10 +935,10 @@
|
|
|
933
935
|
"resolved": "boolean",
|
|
934
936
|
"references": {}
|
|
935
937
|
},
|
|
936
|
-
"mutable":
|
|
938
|
+
"mutable": true,
|
|
937
939
|
"attr": "collapsed",
|
|
938
940
|
"reflectToAttr": false,
|
|
939
|
-
"docs": "If `true`, the element is
|
|
941
|
+
"docs": "If `true`, the element is collapsed otherwise it is displayed.",
|
|
940
942
|
"docsTags": [],
|
|
941
943
|
"default": "false",
|
|
942
944
|
"values": [
|
|
@@ -1075,20 +1077,19 @@
|
|
|
1075
1077
|
}
|
|
1076
1078
|
],
|
|
1077
1079
|
"events": [],
|
|
1078
|
-
"listeners": [
|
|
1079
|
-
{
|
|
1080
|
-
"event": "postToggle",
|
|
1081
|
-
"target": "document",
|
|
1082
|
-
"capture": false,
|
|
1083
|
-
"passive": false
|
|
1084
|
-
}
|
|
1085
|
-
],
|
|
1080
|
+
"listeners": [],
|
|
1086
1081
|
"styles": [],
|
|
1087
1082
|
"slots": [],
|
|
1088
1083
|
"parts": [],
|
|
1089
|
-
"dependents": [
|
|
1084
|
+
"dependents": [
|
|
1085
|
+
"post-accordion-item"
|
|
1086
|
+
],
|
|
1090
1087
|
"dependencies": [],
|
|
1091
|
-
"dependencyGraph": {
|
|
1088
|
+
"dependencyGraph": {
|
|
1089
|
+
"post-accordion-item": [
|
|
1090
|
+
"post-collapsible-trigger"
|
|
1091
|
+
]
|
|
1092
|
+
}
|
|
1092
1093
|
},
|
|
1093
1094
|
{
|
|
1094
1095
|
"filePath": "src/components/post-icon/post-icon.tsx",
|
|
@@ -1374,7 +1375,7 @@
|
|
|
1374
1375
|
"Placement": {
|
|
1375
1376
|
"location": "import",
|
|
1376
1377
|
"path": "@floating-ui/dom",
|
|
1377
|
-
"id": "../../node_modules/.pnpm/@floating-ui+dom@1.6.
|
|
1378
|
+
"id": "../../node_modules/.pnpm/@floating-ui+dom@1.6.8/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts::Placement"
|
|
1378
1379
|
}
|
|
1379
1380
|
}
|
|
1380
1381
|
},
|
|
@@ -1623,7 +1624,7 @@
|
|
|
1623
1624
|
"Placement": {
|
|
1624
1625
|
"location": "import",
|
|
1625
1626
|
"path": "@floating-ui/dom",
|
|
1626
|
-
"id": "../../node_modules/.pnpm/@floating-ui+dom@1.6.
|
|
1627
|
+
"id": "../../node_modules/.pnpm/@floating-ui+dom@1.6.8/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts::Placement"
|
|
1627
1628
|
}
|
|
1628
1629
|
}
|
|
1629
1630
|
},
|
|
@@ -2426,7 +2427,7 @@
|
|
|
2426
2427
|
"Placement": {
|
|
2427
2428
|
"location": "import",
|
|
2428
2429
|
"path": "@floating-ui/dom",
|
|
2429
|
-
"id": "../../node_modules/.pnpm/@floating-ui+dom@1.6.
|
|
2430
|
+
"id": "../../node_modules/.pnpm/@floating-ui+dom@1.6.8/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts::Placement"
|
|
2430
2431
|
}
|
|
2431
2432
|
}
|
|
2432
2433
|
},
|
|
@@ -2641,10 +2642,10 @@
|
|
|
2641
2642
|
"docstring": "",
|
|
2642
2643
|
"path": "src/components/post-alert/alert-types.ts"
|
|
2643
2644
|
},
|
|
2644
|
-
"../../node_modules/.pnpm/@floating-ui+dom@1.6.
|
|
2645
|
+
"../../node_modules/.pnpm/@floating-ui+dom@1.6.8/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts::Placement": {
|
|
2645
2646
|
"declaration": "any",
|
|
2646
2647
|
"docstring": "",
|
|
2647
|
-
"path": "../../node_modules/.pnpm/@floating-ui+dom@1.6.
|
|
2648
|
+
"path": "../../node_modules/.pnpm/@floating-ui+dom@1.6.8/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts"
|
|
2648
2649
|
}
|
|
2649
2650
|
}
|
|
2650
2651
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const NAMESPACE = 'post-components';
|
|
2
|
-
const BUILD = /* post-components */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: true, hasRenderFn: true, hostListener: true, hostListenerTarget:
|
|
2
|
+
const BUILD = /* post-components */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: true, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Platform v4.19.
|
|
5
|
+
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
8
|
var __export = (target, all) => {
|
|
@@ -68,10 +68,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
68
68
|
return import(
|
|
69
69
|
/* webpackMode: "lazy" */
|
|
70
70
|
'./post-card-control.entry.js').then(processMod, consoleError);
|
|
71
|
-
case 'post-collapsible-trigger':
|
|
72
|
-
return import(
|
|
73
|
-
/* webpackMode: "lazy" */
|
|
74
|
-
'./post-collapsible-trigger.entry.js').then(processMod, consoleError);
|
|
75
71
|
case 'post-popover':
|
|
76
72
|
return import(
|
|
77
73
|
/* webpackMode: "lazy" */
|
|
@@ -100,10 +96,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
100
96
|
return import(
|
|
101
97
|
/* webpackMode: "lazy" */
|
|
102
98
|
'./post-tooltip.entry.js').then(processMod, consoleError);
|
|
103
|
-
case 'post-
|
|
99
|
+
case 'post-collapsible_2':
|
|
104
100
|
return import(
|
|
105
101
|
/* webpackMode: "lazy" */
|
|
106
|
-
'./post-
|
|
102
|
+
'./post-collapsible_2.entry.js').then(processMod, consoleError);
|
|
107
103
|
case 'post-popovercontainer':
|
|
108
104
|
return import(
|
|
109
105
|
/* webpackMode: "lazy" */
|
|
@@ -452,13 +448,12 @@ var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
|
452
448
|
};
|
|
453
449
|
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
454
450
|
var _a;
|
|
455
|
-
const styleContainerDocument = styleContainerNode;
|
|
456
451
|
const scopeId2 = getScopeId(cmpMeta);
|
|
457
452
|
const style = styles.get(scopeId2);
|
|
458
453
|
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
459
454
|
if (style) {
|
|
460
455
|
if (typeof style === "string") {
|
|
461
|
-
styleContainerNode =
|
|
456
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
462
457
|
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
463
458
|
let styleElm;
|
|
464
459
|
if (!appliedStyles) {
|
|
@@ -481,8 +476,8 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
481
476
|
appliedStyles.add(scopeId2);
|
|
482
477
|
}
|
|
483
478
|
}
|
|
484
|
-
} else if (!
|
|
485
|
-
|
|
479
|
+
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
480
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
486
481
|
}
|
|
487
482
|
}
|
|
488
483
|
return scopeId2;
|
|
@@ -1655,7 +1650,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1655
1650
|
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
1656
1651
|
if (listeners) {
|
|
1657
1652
|
listeners.map(([flags, name, method]) => {
|
|
1658
|
-
const target =
|
|
1653
|
+
const target = elm;
|
|
1659
1654
|
const handler = hostListenerProxy(hostRef, method);
|
|
1660
1655
|
const opts = hostListenerOpts(flags);
|
|
1661
1656
|
plt.ael(target, name, handler, opts);
|
|
@@ -1677,10 +1672,6 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1677
1672
|
consoleError(e);
|
|
1678
1673
|
}
|
|
1679
1674
|
};
|
|
1680
|
-
var getHostListenerTarget = (elm, flags) => {
|
|
1681
|
-
if (flags & 4 /* TargetDocument */) return doc;
|
|
1682
|
-
return elm;
|
|
1683
|
-
};
|
|
1684
1675
|
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
1685
1676
|
passive: (flags & 1 /* Passive */) !== 0,
|
|
1686
1677
|
capture: (flags & 2 /* Capture */) !== 0
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { E as EMPTY_VALUES } from './constants-8d548297.js';
|
|
2
2
|
import { c as checkOneOf } from './check-one-of-6b3ef8eb.js';
|
|
3
|
-
import { c as checkType } from './check-type-8828dbe4.js';
|
|
4
3
|
|
|
5
4
|
function emptyOr(check) {
|
|
6
5
|
return (...args) => {
|
|
@@ -15,8 +14,21 @@ function checkPattern(value, pattern, errorMessage) {
|
|
|
15
14
|
throw new Error(errorMessage);
|
|
16
15
|
}
|
|
17
16
|
|
|
17
|
+
function checkType(value, type, error) {
|
|
18
|
+
const typeIsArray = type === 'array';
|
|
19
|
+
const valueIsArray = Array.isArray(value);
|
|
20
|
+
if (typeIsArray || valueIsArray) {
|
|
21
|
+
if (valueIsArray !== typeIsArray)
|
|
22
|
+
throw new Error(error);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
if (typeof value !== type)
|
|
26
|
+
throw new Error(error);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
18
30
|
const checkEmptyOrOneOf = emptyOr(checkOneOf);
|
|
19
31
|
const checkEmptyOrPattern = emptyOr(checkPattern);
|
|
20
32
|
const checkEmptyOrType = emptyOr(checkType);
|
|
21
33
|
|
|
22
|
-
export {
|
|
34
|
+
export { checkType as a, checkEmptyOrPattern as b, checkEmptyOrOneOf as c, checkEmptyOrType as d };
|
package/dist/esm/index.js
CHANGED
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
export { P as PostAccordion } from './post-accordion-
|
|
2
|
-
export { P as PostAccordionItem } from './post-accordion-item-
|
|
3
|
-
export { P as PostAlert } from './post-alert-
|
|
4
|
-
export { P as PostCardControl } from './post-card-control-
|
|
5
|
-
export { P as PostCollapsible } from './post-collapsible-
|
|
6
|
-
export { P as
|
|
7
|
-
export { P as
|
|
8
|
-
export { P as
|
|
9
|
-
export { P as
|
|
10
|
-
export { P as
|
|
11
|
-
export { P as
|
|
12
|
-
export { P as
|
|
13
|
-
export { P as
|
|
14
|
-
export { P as
|
|
15
|
-
|
|
16
|
-
import './
|
|
17
|
-
import './package-91140d77.js';
|
|
1
|
+
export { P as PostAccordion } from './post-accordion-1cbd089a.js';
|
|
2
|
+
export { P as PostAccordionItem } from './post-accordion-item-316ee985.js';
|
|
3
|
+
export { P as PostAlert } from './post-alert-6fa442b9.js';
|
|
4
|
+
export { P as PostCardControl } from './post-card-control-41356aa4.js';
|
|
5
|
+
export { P as PostCollapsible, a as PostCollapsibleTrigger } from './post-collapsible-trigger-6f4ba350.js';
|
|
6
|
+
export { P as PostIcon } from './post-icon-fe467f6a.js';
|
|
7
|
+
export { P as PostPopover } from './post-popover-c9998136.js';
|
|
8
|
+
export { P as PostPopovercontainer } from './post-popovercontainer-62ced3d7.js';
|
|
9
|
+
export { P as PostRating } from './post-rating-49ace0e9.js';
|
|
10
|
+
export { P as PostTabs } from './post-tabs-a7990c9e.js';
|
|
11
|
+
export { P as PostTabHeader } from './post-tab-header-696a7aae.js';
|
|
12
|
+
export { P as PostTabPanel } from './post-tab-panel-c00910fb.js';
|
|
13
|
+
export { P as PostTooltip } from './post-tooltip-cf07e816.js';
|
|
14
|
+
export { P as PostTag } from './post-tag-d9650103.js';
|
|
15
|
+
import './index-189d3985.js';
|
|
16
|
+
import './package-3e4546f5.js';
|
|
18
17
|
import './heading-levels-5b7b4349.js';
|
|
19
18
|
import './check-one-of-6b3ef8eb.js';
|
|
20
|
-
import './index-
|
|
19
|
+
import './index-d1eba94c.js';
|
|
21
20
|
import './constants-8d548297.js';
|
|
22
|
-
import './check-type-8828dbe4.js';
|
|
23
21
|
import './fade-7fd71785.js';
|
|
24
22
|
import './check-non-empty-58bd6b17.js';
|
|
25
23
|
import './attribute-observer-37fa950a.js';
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-189d3985.js';
|
|
2
|
+
export { s as setNonce } from './index-189d3985.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["post-accordion-item",[[1,"post-accordion-item",{"collapsed":[
|
|
8
|
+
return bootstrapLazy([["post-accordion-item",[[1,"post-accordion-item",{"collapsed":[1028],"headingLevel":[2,"heading-level"],"id":[32],"toggle":[64]},[[2,"postToggle","onCollapseToggle"]],{"headingLevel":["validateHeadingLevel"]}]]],["post-alert",[[1,"post-alert",{"dismissible":[4],"dismissLabel":[1,"dismiss-label"],"fixed":[4],"icon":[1],"type":[1],"alertId":[32],"classes":[32],"hasActions":[32],"hasHeading":[32],"onDismissButtonClick":[32],"dismiss":[64]},null,{"dismissible":["validateDismissible"],"dismissLabel":["validateDismissLabel"],"fixed":["validateFixed"],"icon":["validateIcon"],"type":["validateType"]}]]],["post-card-control",[[65,"post-card-control",{"label":[1],"description":[1],"type":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[1028],"validity":[1025],"icon":[1],"focused":[32],"reset":[64],"groupReset":[64]},null,{"label":["validateControlLabel"],"type":["validateControlType"],"checked":["updateControlChecked"],"disabled":["updateControlDisbled"]}]]],["post-popovercontainer",[[4,"post-popovercontainer",{"placement":[1],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]],["post-popover",[[1,"post-popover",{"placement":[1],"closeButtonCaption":[1,"close-button-caption"],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]],["post-icon",[[1,"post-icon",{"animation":[1],"base":[1],"flipH":[4,"flip-h"],"flipV":[4,"flip-v"],"name":[1],"rotate":[2],"scale":[2],"svgStyles":[32],"svgOutput":[32]},null,{"animation":["validateAnimation"],"base":["validateBase"],"flipH":["validateFlipH"],"flipV":["validateFlipV"],"name":["validateName"],"rotate":["validateRotate"],"scale":["validateScale"]}]]],["post-rating",[[1,"post-rating",{"label":[1],"stars":[2],"currentRating":[1026,"current-rating"],"readonly":[4],"hoveredIndex":[32]}]]],["post-tag",[[1,"post-tag",{"variant":[1],"size":[1],"icon":[1],"classes":[32]},null,{"variant":["variantChanged"],"size":["sizeChanged"]}]]],["post-tooltip",[[1,"post-tooltip",{"placement":[1],"arrow":[4],"delayed":[4],"show":[64],"hide":[64],"toggle":[64]},null,{"delayed":["validateDelayed"]}]]],["post-accordion",[[1,"post-accordion",{"headingLevel":[2,"heading-level"],"multiple":[4],"toggle":[64],"expandAll":[64],"collapseAll":[64]},[[0,"postToggle","collapseToggleHandler"]],{"headingLevel":["validateHeadingLevel"]}]]],["post-tab-header",[[1,"post-tab-header",{"panel":[1],"tabId":[32]},null,{"panel":["validateFor"]}]]],["post-tab-panel",[[1,"post-tab-panel",{"name":[1],"panelId":[32]}]]],["post-tabs",[[1,"post-tabs",{"activePanel":[1,"active-panel"],"show":[64]}]]],["post-collapsible_2",[[1,"post-collapsible",{"collapsed":[1028],"toggle":[64]},null,{"collapsed":["collapsedChange"]}],[0,"post-collapsible-trigger",{"for":[1],"update":[64]},null,{"for":["setAriaAttributes"]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
2
|
-
import { v as version } from './package-
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-189d3985.js';
|
|
2
|
+
import { v as version } from './package-3e4546f5.js';
|
|
3
3
|
import { H as HEADING_LEVELS } from './heading-levels-5b7b4349.js';
|
|
4
4
|
import { c as checkOneOf } from './check-one-of-6b3ef8eb.js';
|
|
5
5
|
|