@swisspost/design-system-components 7.4.0 → 7.4.2
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.cjs.js +16 -16
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-549b9aab.js → package-5113c92f.js} +1 -1
- package/dist/cjs/{post-accordion-e0a2c3c3.js → post-accordion-59af7fde.js} +1 -1
- package/dist/cjs/{post-accordion-item-772332db.js → post-accordion-item-fada2164.js} +4 -5
- package/dist/cjs/post-accordion-item.cjs.entry.js +2 -2
- package/dist/cjs/post-accordion.cjs.entry.js +2 -2
- package/dist/cjs/{post-alert-42220c7a.js → post-alert-5b7f997f.js} +1 -1
- package/dist/cjs/post-alert.cjs.entry.js +2 -2
- package/dist/cjs/{post-card-control-45047568.js → post-card-control-6f478acd.js} +1 -1
- package/dist/cjs/post-card-control.cjs.entry.js +2 -2
- package/dist/cjs/{post-collapsible-d71942e3.js → post-collapsible-a91113c0.js} +11 -13
- package/dist/cjs/{post-collapsible-trigger-a7e32ead.js → post-collapsible-trigger-f40101fa.js} +1 -1
- package/dist/cjs/post-collapsible-trigger.cjs.entry.js +2 -2
- package/dist/cjs/post-collapsible.cjs.entry.js +2 -2
- package/dist/cjs/post-components.cjs.js +1 -1
- package/dist/cjs/{post-icon-d136be35.js → post-icon-0def31ec.js} +1 -1
- package/dist/cjs/post-icon.cjs.entry.js +2 -2
- package/dist/cjs/{post-popover-1024d72f.js → post-popover-be69c26e.js} +1 -1
- package/dist/cjs/post-popover.cjs.entry.js +2 -2
- package/dist/cjs/{post-popovercontainer-f5dd6284.js → post-popovercontainer-84f11eb0.js} +1 -1
- package/dist/cjs/post-popovercontainer.cjs.entry.js +2 -2
- package/dist/cjs/{post-rating-df981989.js → post-rating-41203973.js} +1 -1
- package/dist/cjs/post-rating.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-header-17fe11d6.js → post-tab-header-c72b203a.js} +1 -1
- package/dist/cjs/post-tab-header.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-panel-a47c8cfe.js → post-tab-panel-90b73d39.js} +1 -1
- package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/{post-tabs-766f8241.js → post-tabs-d0792a69.js} +1 -1
- package/dist/cjs/post-tabs.cjs.entry.js +2 -2
- package/dist/cjs/{post-tag-65ec8149.js → post-tag-24479b84.js} +2 -2
- package/dist/cjs/post-tag.cjs.entry.js +2 -2
- package/dist/cjs/{post-tooltip-2efd6509.js → post-tooltip-27257d27.js} +1 -1
- package/dist/cjs/post-tooltip.cjs.entry.js +2 -2
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +7 -9
- package/dist/collection/components/post-collapsible/post-collapsible.js +12 -14
- package/dist/collection/components/post-tag/post-tag.css +1 -1
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +5 -7
- package/dist/components/post-collapsible2.js +12 -14
- package/dist/components/post-tag2.js +1 -1
- package/dist/docs.json +6 -6
- package/dist/esm/index.js +16 -16
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-91140d77.js → package-4ebb684c.js} +1 -1
- package/dist/esm/{post-accordion-09978cd3.js → post-accordion-e137e18d.js} +1 -1
- package/dist/esm/{post-accordion-item-4210d17f.js → post-accordion-item-f501f922.js} +4 -5
- package/dist/esm/post-accordion-item.entry.js +2 -2
- package/dist/esm/post-accordion.entry.js +2 -2
- package/dist/esm/{post-alert-64d34792.js → post-alert-3848b25b.js} +1 -1
- package/dist/esm/post-alert.entry.js +2 -2
- package/dist/esm/{post-card-control-244f45f6.js → post-card-control-f050bdb2.js} +1 -1
- package/dist/esm/post-card-control.entry.js +2 -2
- package/dist/esm/{post-collapsible-4ddc1db3.js → post-collapsible-f94c17be.js} +11 -13
- package/dist/esm/{post-collapsible-trigger-b0100e8c.js → post-collapsible-trigger-c5d72506.js} +1 -1
- package/dist/esm/post-collapsible-trigger.entry.js +2 -2
- package/dist/esm/post-collapsible.entry.js +2 -2
- package/dist/esm/post-components.js +1 -1
- package/dist/esm/{post-icon-f05c6d37.js → post-icon-020a3368.js} +1 -1
- package/dist/esm/post-icon.entry.js +2 -2
- package/dist/esm/{post-popover-a094d059.js → post-popover-286651d5.js} +1 -1
- package/dist/esm/post-popover.entry.js +2 -2
- package/dist/esm/{post-popovercontainer-1faa005e.js → post-popovercontainer-7c524ae4.js} +1 -1
- package/dist/esm/post-popovercontainer.entry.js +2 -2
- package/dist/esm/{post-rating-62590a88.js → post-rating-cb5405d4.js} +1 -1
- package/dist/esm/post-rating.entry.js +2 -2
- package/dist/esm/{post-tab-header-1b88d56e.js → post-tab-header-52a77cbb.js} +1 -1
- package/dist/esm/post-tab-header.entry.js +2 -2
- package/dist/esm/{post-tab-panel-fac73181.js → post-tab-panel-78e67b03.js} +1 -1
- package/dist/esm/post-tab-panel.entry.js +2 -2
- package/dist/esm/{post-tabs-4528a1a5.js → post-tabs-ee13f6a6.js} +1 -1
- package/dist/esm/post-tabs.entry.js +2 -2
- package/dist/esm/{post-tag-8b82ff5c.js → post-tag-12786e7a.js} +2 -2
- package/dist/esm/post-tag.entry.js +2 -2
- package/dist/esm/{post-tooltip-1156bdc7.js → post-tooltip-5bd9f7a5.js} +1 -1
- package/dist/esm/post-tooltip.entry.js +2 -2
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-14d08ad2.entry.js +1 -0
- package/dist/post-components/p-181b2e1d.entry.js +1 -0
- package/dist/post-components/p-280e70ba.entry.js +1 -0
- package/dist/post-components/p-31fb25df.entry.js +1 -0
- package/dist/post-components/{p-4dc0b726.js → p-332d13dd.js} +1 -1
- package/dist/post-components/{p-9656cf35.js → p-46c46fc2.js} +1 -1
- package/dist/post-components/{p-8e975b46.js → p-4cda601e.js} +1 -1
- package/dist/post-components/p-5e973a71.entry.js +1 -0
- package/dist/post-components/p-640d2005.entry.js +1 -0
- package/dist/post-components/{p-9170a653.js → p-64293798.js} +1 -1
- package/dist/post-components/{p-eff7cef8.js → p-6a544450.js} +1 -1
- package/dist/post-components/p-6fff6514.js +1 -0
- package/dist/post-components/{p-9fa0742e.js → p-75372e01.js} +1 -1
- package/dist/post-components/p-7edb781c.entry.js +1 -0
- package/dist/post-components/{p-bdb6c1b8.js → p-88b699bc.js} +1 -1
- package/dist/post-components/p-8a051cbb.entry.js +1 -0
- package/dist/post-components/p-9564622e.js +1 -0
- package/dist/post-components/{p-0df6bfe1.js → p-a2c37208.js} +1 -1
- package/dist/post-components/{p-bd0695bf.js → p-a832ad75.js} +1 -1
- package/dist/post-components/p-b2cdd6ad.entry.js +1 -0
- package/dist/post-components/p-b5e45a29.entry.js +1 -0
- package/dist/post-components/p-bcde3d69.entry.js +1 -0
- package/dist/post-components/p-c8630095.entry.js +1 -0
- package/dist/post-components/{p-2da9a13c.js → p-c921c283.js} +1 -1
- package/dist/post-components/p-db424922.entry.js +1 -0
- package/dist/post-components/p-e1c2d238.entry.js +1 -0
- package/dist/post-components/{p-04dc2d21.js → p-efdb344e.js} +1 -1
- package/dist/post-components/p-f17db01a.js +1 -0
- package/dist/post-components/{p-a8dc1aa1.js → p-fa558703.js} +1 -1
- package/dist/post-components/{p-21bdf1f3.js → p-fd5a4c91.js} +1 -1
- package/dist/post-components/p-feef0573.entry.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.d.ts +4 -4
- package/package.json +2 -2
- 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-39b6f635.entry.js +0 -1
- package/dist/post-components/p-3cb6b887.entry.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-b53753a0.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
|
@@ -9,7 +9,6 @@ import { checkEmptyOrOneOf } from "../../utils/index";
|
|
|
9
9
|
export class PostAccordionItem {
|
|
10
10
|
constructor() {
|
|
11
11
|
this.id = undefined;
|
|
12
|
-
this.isOpen = undefined;
|
|
13
12
|
this.collapsed = false;
|
|
14
13
|
this.headingLevel = 2;
|
|
15
14
|
}
|
|
@@ -20,12 +19,12 @@ export class PostAccordionItem {
|
|
|
20
19
|
this.validateHeadingLevel();
|
|
21
20
|
}
|
|
22
21
|
componentWillLoad() {
|
|
23
|
-
this.isOpen = !this.collapsed;
|
|
24
22
|
this.id = this.host.id || `a${crypto.randomUUID()}`;
|
|
25
23
|
}
|
|
24
|
+
// capture to make sure the "collapsed" property is updated before the event is consumed
|
|
26
25
|
onCollapseToggle(event) {
|
|
27
26
|
if (event.target.localName === 'post-accordion-item') {
|
|
28
|
-
this.
|
|
27
|
+
this.collapsed = !event.detail;
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
30
|
/**
|
|
@@ -37,7 +36,7 @@ export class PostAccordionItem {
|
|
|
37
36
|
render() {
|
|
38
37
|
var _a;
|
|
39
38
|
const HeadingTag = `h${(_a = this.headingLevel) !== null && _a !== void 0 ? _a : 2}`;
|
|
40
|
-
return (h(Host, { key: '
|
|
39
|
+
return (h(Host, { key: 'd021bf895019606800fa6cf3a85a2ea0a2fea7e4', id: this.id, "data-version": version }, h("div", { key: '8a78f2511889eb90d2cbdccf00f76802e043a1e7', part: "accordion-item", class: "accordion-item" }, h(HeadingTag, { key: '15c6f07e53179d669f71d6232dad30b77903ae15', class: "accordion-header", id: `${this.id}--header` }, h("button", { key: '59b0ac3109ab8b0da0de914898551dc453eb807e', "aria-controls": `${this.id}--collapse`, "aria-expanded": `${!this.collapsed}`, class: `accordion-button${this.collapsed ? ' collapsed' : ''}`, onClick: () => this.toggle(), type: "button" }, h("slot", { key: '9cdac36ffca69fd85437b4eaddf1ea707b3655e3', name: "header" }))), h("post-collapsible", { key: '4c4ec07c214e972975672f6c41b3a33b418969df', id: `${this.id}--collapse`, collapsed: this.collapsed, ref: el => (this.collapsible = el) }, h("div", { key: '619f81dc481230eecbc83f9078edeb6a60e6b52f', class: "accordion-body" }, h("slot", { key: '76117f156050fd17fc4acec2d429f57640d6c951' }))))));
|
|
41
40
|
}
|
|
42
41
|
static get is() { return "post-accordion-item"; }
|
|
43
42
|
static get encapsulation() { return "shadow"; }
|
|
@@ -55,7 +54,7 @@ export class PostAccordionItem {
|
|
|
55
54
|
return {
|
|
56
55
|
"collapsed": {
|
|
57
56
|
"type": "boolean",
|
|
58
|
-
"mutable":
|
|
57
|
+
"mutable": true,
|
|
59
58
|
"complexType": {
|
|
60
59
|
"original": "boolean",
|
|
61
60
|
"resolved": "boolean",
|
|
@@ -65,7 +64,7 @@ export class PostAccordionItem {
|
|
|
65
64
|
"optional": true,
|
|
66
65
|
"docs": {
|
|
67
66
|
"tags": [],
|
|
68
|
-
"text": "If `true`, the element is
|
|
67
|
+
"text": "If `true`, the element is collapsed otherwise it is displayed."
|
|
69
68
|
},
|
|
70
69
|
"attribute": "collapsed",
|
|
71
70
|
"reflect": false,
|
|
@@ -102,8 +101,7 @@ export class PostAccordionItem {
|
|
|
102
101
|
}
|
|
103
102
|
static get states() {
|
|
104
103
|
return {
|
|
105
|
-
"id": {}
|
|
106
|
-
"isOpen": {}
|
|
104
|
+
"id": {}
|
|
107
105
|
};
|
|
108
106
|
}
|
|
109
107
|
static get methods() {
|
|
@@ -143,7 +141,7 @@ export class PostAccordionItem {
|
|
|
143
141
|
"name": "postToggle",
|
|
144
142
|
"method": "onCollapseToggle",
|
|
145
143
|
"target": undefined,
|
|
146
|
-
"capture":
|
|
144
|
+
"capture": true,
|
|
147
145
|
"passive": false
|
|
148
146
|
}];
|
|
149
147
|
}
|
|
@@ -11,15 +11,12 @@ export class PostCollapsible {
|
|
|
11
11
|
this.isOpen = true;
|
|
12
12
|
this.collapsed = false;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
checkEmptyOrType(
|
|
16
|
-
|
|
17
|
-
connectedCallback() {
|
|
18
|
-
this.validateCollapsed();
|
|
14
|
+
collapsedChange() {
|
|
15
|
+
checkEmptyOrType(this.collapsed, 'boolean', 'The `collapsed` property of the `post-collapsible` must be a boolean.');
|
|
16
|
+
void this.toggle(!this.collapsed);
|
|
19
17
|
}
|
|
20
18
|
componentDidLoad() {
|
|
21
|
-
|
|
22
|
-
void this.toggle(false);
|
|
19
|
+
this.collapsedChange();
|
|
23
20
|
this.isLoaded = true;
|
|
24
21
|
this.updateTriggers();
|
|
25
22
|
}
|
|
@@ -31,15 +28,16 @@ export class PostCollapsible {
|
|
|
31
28
|
async toggle(open = !this.isOpen) {
|
|
32
29
|
if (open === this.isOpen)
|
|
33
30
|
return open;
|
|
34
|
-
this.isOpen =
|
|
31
|
+
this.isOpen = open;
|
|
32
|
+
this.collapsed = !open;
|
|
35
33
|
if (this.isLoaded)
|
|
36
|
-
this.postToggle.emit(
|
|
34
|
+
this.postToggle.emit(open);
|
|
37
35
|
const animation = open ? expand(this.host) : collapse(this.host);
|
|
38
36
|
if (!this.isLoaded || isMotionReduced())
|
|
39
37
|
animation.finish();
|
|
40
38
|
await animation.finished;
|
|
41
39
|
animation.commitStyles();
|
|
42
|
-
return
|
|
40
|
+
return open;
|
|
43
41
|
}
|
|
44
42
|
/**
|
|
45
43
|
* Update all post-collapsible-trigger elements referring to the collapsible
|
|
@@ -49,7 +47,7 @@ export class PostCollapsible {
|
|
|
49
47
|
triggers.forEach(trigger => trigger.update());
|
|
50
48
|
}
|
|
51
49
|
render() {
|
|
52
|
-
return (h(Host, { key: '
|
|
50
|
+
return (h(Host, { key: 'b86f11ba3139c76bb077ef9f634afaaf7ab62ef5', "data-version": version }, h("slot", { key: '0f3a8275a8c6a41bfa97b59ee567c3c0da8e84d0' })));
|
|
53
51
|
}
|
|
54
52
|
static get is() { return "post-collapsible"; }
|
|
55
53
|
static get encapsulation() { return "shadow"; }
|
|
@@ -67,7 +65,7 @@ export class PostCollapsible {
|
|
|
67
65
|
return {
|
|
68
66
|
"collapsed": {
|
|
69
67
|
"type": "boolean",
|
|
70
|
-
"mutable":
|
|
68
|
+
"mutable": true,
|
|
71
69
|
"complexType": {
|
|
72
70
|
"original": "boolean",
|
|
73
71
|
"resolved": "boolean",
|
|
@@ -77,7 +75,7 @@ export class PostCollapsible {
|
|
|
77
75
|
"optional": true,
|
|
78
76
|
"docs": {
|
|
79
77
|
"tags": [],
|
|
80
|
-
"text": "If `true`, the element is
|
|
78
|
+
"text": "If `true`, the element is collapsed otherwise it is displayed."
|
|
81
79
|
},
|
|
82
80
|
"attribute": "collapsed",
|
|
83
81
|
"reflect": false,
|
|
@@ -132,7 +130,7 @@ export class PostCollapsible {
|
|
|
132
130
|
static get watchers() {
|
|
133
131
|
return [{
|
|
134
132
|
"propName": "collapsed",
|
|
135
|
-
"methodName": "
|
|
133
|
+
"methodName": "collapsedChange"
|
|
136
134
|
}];
|
|
137
135
|
}
|
|
138
136
|
}
|
|
@@ -28,4 +28,4 @@
|
|
|
28
28
|
* THE SOFTWARE.
|
|
29
29
|
*//*!
|
|
30
30
|
* Copyright 2021 by Swiss Post, Information Technology
|
|
31
|
-
*/.tag,.tag:where(:has(:not(pre))){--post-tag-bg: hsl(0, 0%, 90%);--post-tag-fg: #000;display:inline-flex;align-items:center;gap:.25rem;padding:0 .5rem;max-width:
|
|
31
|
+
*/.tag,.tag:where(:has(:not(pre))){--post-tag-bg: hsl(0, 0%, 90%);--post-tag-fg: #000;display:inline-flex;align-items:center;gap:.25rem;padding:0 .5rem;max-width:100%;background-color:var(--post-tag-bg);border:1px solid rgba(0,0,0,0);border-radius:.25rem;font-size:1rem;line-height:1.875rem;white-space:nowrap;color:var(--post-tag-fg)}.tag post-icon,.tag:where(:has(:not(pre))) post-icon{flex:0 0 auto;width:1.25rem;height:1.25rem}.tag .tag-text,.tag:where(:has(:not(pre))) .tag-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tag .tag-text svg,.tag .tag-text img,.tag:where(:has(:not(pre))) .tag-text svg,.tag:where(:has(:not(pre))) .tag-text img{display:inline-block;height:1.25rem !important;vertical-align:text-top}.tag.tag-sm,.tag:where(:has(:not(pre))).tag-sm{line-height:1.5rem}.tag.tag-sm .tag-icon,.tag:where(:has(:not(pre))).tag-sm .tag-icon{width:1rem;height:1rem}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{--post-tag-bg: #fff;--post-tag-fg: #000}.tag.tag-yellow,.tag:where(:has(:not(pre))).tag-yellow{--post-tag-bg: #fc0;--post-tag-fg: #000}.tag.tag-success,.tag:where(:has(:not(pre))).tag-success{--post-tag-bg: #2c871d;--post-tag-fg: #fff}.tag.tag-warning,.tag:where(:has(:not(pre))).tag-warning{--post-tag-bg: #f49e00;--post-tag-fg: #000}.tag.tag-danger,.tag:where(:has(:not(pre))).tag-danger{--post-tag-bg: #a51728;--post-tag-fg: #fff}.tag.tag-info,.tag:where(:has(:not(pre))).tag-info{--post-tag-bg: #cce4ee;--post-tag-fg: #000}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{border-color:var(--post-contrast-color)}pre .tag,pre .tag:where(:has(:not(pre))){display:inline;padding:initial;max-width:initial;background:initial;border:initial;border-radius:initial;font-size:inherit;line-height:inherit;white-space:unset}*,*:before,*:after{box-sizing:border-box}.tag-text ::slotted(svg),.tag-text ::slotted(img){display:inline-block !important;height:1.25rem !important;vertical-align:text-top !important}
|
|
@@ -13,7 +13,6 @@ const PostAccordionItem = /*@__PURE__*/ proxyCustomElement(class PostAccordionIt
|
|
|
13
13
|
this.__registerHost();
|
|
14
14
|
this.__attachShadow();
|
|
15
15
|
this.id = undefined;
|
|
16
|
-
this.isOpen = undefined;
|
|
17
16
|
this.collapsed = false;
|
|
18
17
|
this.headingLevel = 2;
|
|
19
18
|
}
|
|
@@ -24,12 +23,12 @@ const PostAccordionItem = /*@__PURE__*/ proxyCustomElement(class PostAccordionIt
|
|
|
24
23
|
this.validateHeadingLevel();
|
|
25
24
|
}
|
|
26
25
|
componentWillLoad() {
|
|
27
|
-
this.isOpen = !this.collapsed;
|
|
28
26
|
this.id = this.host.id || `a${crypto.randomUUID()}`;
|
|
29
27
|
}
|
|
28
|
+
// capture to make sure the "collapsed" property is updated before the event is consumed
|
|
30
29
|
onCollapseToggle(event) {
|
|
31
30
|
if (event.target.localName === 'post-accordion-item') {
|
|
32
|
-
this.
|
|
31
|
+
this.collapsed = !event.detail;
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
34
|
/**
|
|
@@ -41,7 +40,7 @@ const PostAccordionItem = /*@__PURE__*/ proxyCustomElement(class PostAccordionIt
|
|
|
41
40
|
render() {
|
|
42
41
|
var _a;
|
|
43
42
|
const HeadingTag = `h${(_a = this.headingLevel) !== null && _a !== void 0 ? _a : 2}`;
|
|
44
|
-
return (h(Host, { key: '
|
|
43
|
+
return (h(Host, { key: 'd021bf895019606800fa6cf3a85a2ea0a2fea7e4', id: this.id, "data-version": version }, h("div", { key: '8a78f2511889eb90d2cbdccf00f76802e043a1e7', part: "accordion-item", class: "accordion-item" }, h(HeadingTag, { key: '15c6f07e53179d669f71d6232dad30b77903ae15', class: "accordion-header", id: `${this.id}--header` }, h("button", { key: '59b0ac3109ab8b0da0de914898551dc453eb807e', "aria-controls": `${this.id}--collapse`, "aria-expanded": `${!this.collapsed}`, class: `accordion-button${this.collapsed ? ' collapsed' : ''}`, onClick: () => this.toggle(), type: "button" }, h("slot", { key: '9cdac36ffca69fd85437b4eaddf1ea707b3655e3', name: "header" }))), h("post-collapsible", { key: '4c4ec07c214e972975672f6c41b3a33b418969df', id: `${this.id}--collapse`, collapsed: this.collapsed, ref: el => (this.collapsible = el) }, h("div", { key: '619f81dc481230eecbc83f9078edeb6a60e6b52f', class: "accordion-body" }, h("slot", { key: '76117f156050fd17fc4acec2d429f57640d6c951' }))))));
|
|
45
44
|
}
|
|
46
45
|
get host() { return this; }
|
|
47
46
|
static get watchers() { return {
|
|
@@ -49,12 +48,11 @@ const PostAccordionItem = /*@__PURE__*/ proxyCustomElement(class PostAccordionIt
|
|
|
49
48
|
}; }
|
|
50
49
|
static get style() { return PostAccordionItemStyle0; }
|
|
51
50
|
}, [1, "post-accordion-item", {
|
|
52
|
-
"collapsed": [
|
|
51
|
+
"collapsed": [1028],
|
|
53
52
|
"headingLevel": [2, "heading-level"],
|
|
54
53
|
"id": [32],
|
|
55
|
-
"isOpen": [32],
|
|
56
54
|
"toggle": [64]
|
|
57
|
-
}, [[
|
|
55
|
+
}, [[2, "postToggle", "onCollapseToggle"]], {
|
|
58
56
|
"headingLevel": ["validateHeadingLevel"]
|
|
59
57
|
}]);
|
|
60
58
|
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: 'b86f11ba3139c76bb077ef9f634afaaf7ab62ef5', "data-version": version }, h("slot", { key: '0f3a8275a8c6a41bfa97b59ee567c3c0da8e84d0' })));
|
|
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") {
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
|
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
3
|
import { d as defineCustomElement$1 } from './post-icon2.js';
|
|
4
4
|
|
|
5
|
-
const postTagCss = "/*!\n * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n\n * The MIT License (MIT)\n\n * Copyright (c) 2011-2020 Twitter, Inc.\n * Copyright (c) 2011-2020 The Bootstrap Authors\n\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *//*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.tag,.tag:where(:has(:not(pre))){--post-tag-bg:hsl(0, 0%, 90%);--post-tag-fg:#000;display:inline-flex;align-items:center;gap:.25rem;padding:0 .5rem;max-width:
|
|
5
|
+
const postTagCss = "/*!\n * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n\n * The MIT License (MIT)\n\n * Copyright (c) 2011-2020 Twitter, Inc.\n * Copyright (c) 2011-2020 The Bootstrap Authors\n\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *//*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.tag,.tag:where(:has(:not(pre))){--post-tag-bg:hsl(0, 0%, 90%);--post-tag-fg:#000;display:inline-flex;align-items:center;gap:.25rem;padding:0 .5rem;max-width:100%;background-color:var(--post-tag-bg);border:1px solid rgba(0,0,0,0);border-radius:.25rem;font-size:1rem;line-height:1.875rem;white-space:nowrap;color:var(--post-tag-fg)}.tag post-icon,.tag:where(:has(:not(pre))) post-icon{flex:0 0 auto;width:1.25rem;height:1.25rem}.tag .tag-text,.tag:where(:has(:not(pre))) .tag-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tag .tag-text svg,.tag .tag-text img,.tag:where(:has(:not(pre))) .tag-text svg,.tag:where(:has(:not(pre))) .tag-text img{display:inline-block;height:1.25rem !important;vertical-align:text-top}.tag.tag-sm,.tag:where(:has(:not(pre))).tag-sm{line-height:1.5rem}.tag.tag-sm .tag-icon,.tag:where(:has(:not(pre))).tag-sm .tag-icon{width:1rem;height:1rem}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{--post-tag-bg:#fff;--post-tag-fg:#000}.tag.tag-yellow,.tag:where(:has(:not(pre))).tag-yellow{--post-tag-bg:#fc0;--post-tag-fg:#000}.tag.tag-success,.tag:where(:has(:not(pre))).tag-success{--post-tag-bg:#2c871d;--post-tag-fg:#fff}.tag.tag-warning,.tag:where(:has(:not(pre))).tag-warning{--post-tag-bg:#f49e00;--post-tag-fg:#000}.tag.tag-danger,.tag:where(:has(:not(pre))).tag-danger{--post-tag-bg:#a51728;--post-tag-fg:#fff}.tag.tag-info,.tag:where(:has(:not(pre))).tag-info{--post-tag-bg:#cce4ee;--post-tag-fg:#000}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{border-color:var(--post-contrast-color)}pre .tag,pre .tag:where(:has(:not(pre))){display:inline;padding:initial;max-width:initial;background:initial;border:initial;border-radius:initial;font-size:inherit;line-height:inherit;white-space:unset}*,*:before,*:after{box-sizing:border-box}.tag-text ::slotted(svg),.tag-text ::slotted(img){display:inline-block !important;height:1.25rem !important;vertical-align:text-top !important}";
|
|
6
6
|
const PostTagStyle0 = postTagCss;
|
|
7
7
|
|
|
8
8
|
const PostTag = /*@__PURE__*/ proxyCustomElement(class PostTag extends HTMLElement {
|
package/dist/docs.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2024-
|
|
2
|
+
"timestamp": "2024-08-12T11:31:37",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.19.1",
|
|
@@ -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
|
],
|
|
@@ -933,10 +933,10 @@
|
|
|
933
933
|
"resolved": "boolean",
|
|
934
934
|
"references": {}
|
|
935
935
|
},
|
|
936
|
-
"mutable":
|
|
936
|
+
"mutable": true,
|
|
937
937
|
"attr": "collapsed",
|
|
938
938
|
"reflectToAttr": false,
|
|
939
|
-
"docs": "If `true`, the element is
|
|
939
|
+
"docs": "If `true`, the element is collapsed otherwise it is displayed.",
|
|
940
940
|
"docsTags": [],
|
|
941
941
|
"default": "false",
|
|
942
942
|
"values": [
|
package/dist/esm/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
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 PostCollapsibleTrigger } from './post-collapsible-trigger-
|
|
7
|
-
export { P as PostIcon } from './post-icon-
|
|
8
|
-
export { P as PostPopover } from './post-popover-
|
|
9
|
-
export { P as PostPopovercontainer } from './post-popovercontainer-
|
|
10
|
-
export { P as PostRating } from './post-rating-
|
|
11
|
-
export { P as PostTabs } from './post-tabs-
|
|
12
|
-
export { P as PostTabHeader } from './post-tab-header-
|
|
13
|
-
export { P as PostTabPanel } from './post-tab-panel-
|
|
14
|
-
export { P as PostTooltip } from './post-tooltip-
|
|
15
|
-
export { P as PostTag } from './post-tag-
|
|
1
|
+
export { P as PostAccordion } from './post-accordion-e137e18d.js';
|
|
2
|
+
export { P as PostAccordionItem } from './post-accordion-item-f501f922.js';
|
|
3
|
+
export { P as PostAlert } from './post-alert-3848b25b.js';
|
|
4
|
+
export { P as PostCardControl } from './post-card-control-f050bdb2.js';
|
|
5
|
+
export { P as PostCollapsible } from './post-collapsible-f94c17be.js';
|
|
6
|
+
export { P as PostCollapsibleTrigger } from './post-collapsible-trigger-c5d72506.js';
|
|
7
|
+
export { P as PostIcon } from './post-icon-020a3368.js';
|
|
8
|
+
export { P as PostPopover } from './post-popover-286651d5.js';
|
|
9
|
+
export { P as PostPopovercontainer } from './post-popovercontainer-7c524ae4.js';
|
|
10
|
+
export { P as PostRating } from './post-rating-cb5405d4.js';
|
|
11
|
+
export { P as PostTabs } from './post-tabs-ee13f6a6.js';
|
|
12
|
+
export { P as PostTabHeader } from './post-tab-header-52a77cbb.js';
|
|
13
|
+
export { P as PostTabPanel } from './post-tab-panel-78e67b03.js';
|
|
14
|
+
export { P as PostTooltip } from './post-tooltip-5bd9f7a5.js';
|
|
15
|
+
export { P as PostTag } from './post-tag-12786e7a.js';
|
|
16
16
|
import './index-9ace3232.js';
|
|
17
|
-
import './package-
|
|
17
|
+
import './package-4ebb684c.js';
|
|
18
18
|
import './heading-levels-5b7b4349.js';
|
|
19
19
|
import './check-one-of-6b3ef8eb.js';
|
|
20
20
|
import './index-29d17d6d.js';
|
package/dist/esm/loader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
|
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-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-collapsible-trigger",[[0,"post-collapsible-trigger",{"for":[1],"update":[64]},[[4,"postToggle","setAriaExpanded"]],{"for":["setAriaAttributes"]}]]],["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",[[1,"post-collapsible",{"collapsed":[1028],"toggle":[64]},null,{"collapsed":["collapsedChange"]}]]],["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"]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-9ace3232.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-4ebb684c.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
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-9ace3232.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-4ebb684c.js';
|
|
3
3
|
import { H as HEADING_LEVELS } from './heading-levels-5b7b4349.js';
|
|
4
4
|
import { c as checkEmptyOrOneOf } from './index-29d17d6d.js';
|
|
5
5
|
|
|
@@ -10,7 +10,6 @@ const PostAccordionItem = class {
|
|
|
10
10
|
constructor(hostRef) {
|
|
11
11
|
registerInstance(this, hostRef);
|
|
12
12
|
this.id = undefined;
|
|
13
|
-
this.isOpen = undefined;
|
|
14
13
|
this.collapsed = false;
|
|
15
14
|
this.headingLevel = 2;
|
|
16
15
|
}
|
|
@@ -21,12 +20,12 @@ const PostAccordionItem = class {
|
|
|
21
20
|
this.validateHeadingLevel();
|
|
22
21
|
}
|
|
23
22
|
componentWillLoad() {
|
|
24
|
-
this.isOpen = !this.collapsed;
|
|
25
23
|
this.id = this.host.id || `a${crypto.randomUUID()}`;
|
|
26
24
|
}
|
|
25
|
+
// capture to make sure the "collapsed" property is updated before the event is consumed
|
|
27
26
|
onCollapseToggle(event) {
|
|
28
27
|
if (event.target.localName === 'post-accordion-item') {
|
|
29
|
-
this.
|
|
28
|
+
this.collapsed = !event.detail;
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
31
|
/**
|
|
@@ -38,7 +37,7 @@ const PostAccordionItem = class {
|
|
|
38
37
|
render() {
|
|
39
38
|
var _a;
|
|
40
39
|
const HeadingTag = `h${(_a = this.headingLevel) !== null && _a !== void 0 ? _a : 2}`;
|
|
41
|
-
return (h(Host, { key: '
|
|
40
|
+
return (h(Host, { key: 'd021bf895019606800fa6cf3a85a2ea0a2fea7e4', id: this.id, "data-version": version }, h("div", { key: '8a78f2511889eb90d2cbdccf00f76802e043a1e7', part: "accordion-item", class: "accordion-item" }, h(HeadingTag, { key: '15c6f07e53179d669f71d6232dad30b77903ae15', class: "accordion-header", id: `${this.id}--header` }, h("button", { key: '59b0ac3109ab8b0da0de914898551dc453eb807e', "aria-controls": `${this.id}--collapse`, "aria-expanded": `${!this.collapsed}`, class: `accordion-button${this.collapsed ? ' collapsed' : ''}`, onClick: () => this.toggle(), type: "button" }, h("slot", { key: '9cdac36ffca69fd85437b4eaddf1ea707b3655e3', name: "header" }))), h("post-collapsible", { key: '4c4ec07c214e972975672f6c41b3a33b418969df', id: `${this.id}--collapse`, collapsed: this.collapsed, ref: el => (this.collapsible = el) }, h("div", { key: '619f81dc481230eecbc83f9078edeb6a60e6b52f', class: "accordion-body" }, h("slot", { key: '76117f156050fd17fc4acec2d429f57640d6c951' }))))));
|
|
42
41
|
}
|
|
43
42
|
get host() { return getElement(this); }
|
|
44
43
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { P as post_accordion_item } from './post-accordion-item-
|
|
1
|
+
export { P as post_accordion_item } from './post-accordion-item-f501f922.js';
|
|
2
2
|
import './index-9ace3232.js';
|
|
3
|
-
import './package-
|
|
3
|
+
import './package-4ebb684c.js';
|
|
4
4
|
import './heading-levels-5b7b4349.js';
|
|
5
5
|
import './index-29d17d6d.js';
|
|
6
6
|
import './constants-8d548297.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { P as post_accordion } from './post-accordion-
|
|
1
|
+
export { P as post_accordion } from './post-accordion-e137e18d.js';
|
|
2
2
|
import './index-9ace3232.js';
|
|
3
|
-
import './package-
|
|
3
|
+
import './package-4ebb684c.js';
|
|
4
4
|
import './heading-levels-5b7b4349.js';
|
|
5
5
|
import './check-one-of-6b3ef8eb.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-9ace3232.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-4ebb684c.js';
|
|
3
3
|
import { f as fadeOut } from './fade-7fd71785.js';
|
|
4
4
|
import { a as checkEmptyOrPattern, c as checkEmptyOrOneOf } from './index-29d17d6d.js';
|
|
5
5
|
import { c as checkType } from './check-type-8828dbe4.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { P as post_alert } from './post-alert-
|
|
1
|
+
export { P as post_alert } from './post-alert-3848b25b.js';
|
|
2
2
|
import './index-9ace3232.js';
|
|
3
|
-
import './package-
|
|
3
|
+
import './package-4ebb684c.js';
|
|
4
4
|
import './fade-7fd71785.js';
|
|
5
5
|
import './index-29d17d6d.js';
|
|
6
6
|
import './constants-8d548297.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-9ace3232.js';
|
|
2
2
|
import { c as checkOneOf } from './check-one-of-6b3ef8eb.js';
|
|
3
3
|
import { c as checkNonEmpty } from './check-non-empty-58bd6b17.js';
|
|
4
|
-
import { v as version } from './package-
|
|
4
|
+
import { v as version } from './package-4ebb684c.js';
|
|
5
5
|
|
|
6
6
|
function parse(scss) {
|
|
7
7
|
return Object.entries(scss).reduce((object, [path, value]) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { P as post_card_control } from './post-card-control-
|
|
1
|
+
export { P as post_card_control } from './post-card-control-f050bdb2.js';
|
|
2
2
|
import './index-9ace3232.js';
|
|
3
3
|
import './check-one-of-6b3ef8eb.js';
|
|
4
4
|
import './check-non-empty-58bd6b17.js';
|
|
5
5
|
import './constants-8d548297.js';
|
|
6
|
-
import './package-
|
|
6
|
+
import './package-4ebb684c.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-9ace3232.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-4ebb684c.js';
|
|
3
3
|
import { b as checkEmptyOrType } from './index-29d17d6d.js';
|
|
4
4
|
|
|
5
5
|
function isMotionReduced() {
|
|
@@ -35,15 +35,12 @@ const PostCollapsible = class {
|
|
|
35
35
|
this.isOpen = true;
|
|
36
36
|
this.collapsed = false;
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
checkEmptyOrType(
|
|
40
|
-
|
|
41
|
-
connectedCallback() {
|
|
42
|
-
this.validateCollapsed();
|
|
38
|
+
collapsedChange() {
|
|
39
|
+
checkEmptyOrType(this.collapsed, 'boolean', 'The `collapsed` property of the `post-collapsible` must be a boolean.');
|
|
40
|
+
void this.toggle(!this.collapsed);
|
|
43
41
|
}
|
|
44
42
|
componentDidLoad() {
|
|
45
|
-
|
|
46
|
-
void this.toggle(false);
|
|
43
|
+
this.collapsedChange();
|
|
47
44
|
this.isLoaded = true;
|
|
48
45
|
this.updateTriggers();
|
|
49
46
|
}
|
|
@@ -55,15 +52,16 @@ const PostCollapsible = class {
|
|
|
55
52
|
async toggle(open = !this.isOpen) {
|
|
56
53
|
if (open === this.isOpen)
|
|
57
54
|
return open;
|
|
58
|
-
this.isOpen =
|
|
55
|
+
this.isOpen = open;
|
|
56
|
+
this.collapsed = !open;
|
|
59
57
|
if (this.isLoaded)
|
|
60
|
-
this.postToggle.emit(
|
|
58
|
+
this.postToggle.emit(open);
|
|
61
59
|
const animation = open ? expand(this.host) : collapse(this.host);
|
|
62
60
|
if (!this.isLoaded || isMotionReduced())
|
|
63
61
|
animation.finish();
|
|
64
62
|
await animation.finished;
|
|
65
63
|
animation.commitStyles();
|
|
66
|
-
return
|
|
64
|
+
return open;
|
|
67
65
|
}
|
|
68
66
|
/**
|
|
69
67
|
* Update all post-collapsible-trigger elements referring to the collapsible
|
|
@@ -73,11 +71,11 @@ const PostCollapsible = class {
|
|
|
73
71
|
triggers.forEach(trigger => trigger.update());
|
|
74
72
|
}
|
|
75
73
|
render() {
|
|
76
|
-
return (h(Host, { key: '
|
|
74
|
+
return (h(Host, { key: 'b86f11ba3139c76bb077ef9f634afaaf7ab62ef5', "data-version": version }, h("slot", { key: '0f3a8275a8c6a41bfa97b59ee567c3c0da8e84d0' })));
|
|
77
75
|
}
|
|
78
76
|
get host() { return getElement(this); }
|
|
79
77
|
static get watchers() { return {
|
|
80
|
-
"collapsed": ["
|
|
78
|
+
"collapsed": ["collapsedChange"]
|
|
81
79
|
}; }
|
|
82
80
|
};
|
|
83
81
|
PostCollapsible.style = PostCollapsibleStyle0;
|
package/dist/esm/{post-collapsible-trigger-b0100e8c.js → post-collapsible-trigger-c5d72506.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, g as getElement } from './index-9ace3232.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-4ebb684c.js';
|
|
3
3
|
import { c as checkType } from './check-type-8828dbe4.js';
|
|
4
4
|
import { c as checkNonEmpty } from './check-non-empty-58bd6b17.js';
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { P as post_collapsible_trigger } from './post-collapsible-trigger-
|
|
1
|
+
export { P as post_collapsible_trigger } from './post-collapsible-trigger-c5d72506.js';
|
|
2
2
|
import './index-9ace3232.js';
|
|
3
|
-
import './package-
|
|
3
|
+
import './package-4ebb684c.js';
|
|
4
4
|
import './check-type-8828dbe4.js';
|
|
5
5
|
import './check-non-empty-58bd6b17.js';
|
|
6
6
|
import './constants-8d548297.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { P as post_collapsible } from './post-collapsible-
|
|
1
|
+
export { P as post_collapsible } from './post-collapsible-f94c17be.js';
|
|
2
2
|
import './index-9ace3232.js';
|
|
3
|
-
import './package-
|
|
3
|
+
import './package-4ebb684c.js';
|
|
4
4
|
import './index-29d17d6d.js';
|
|
5
5
|
import './constants-8d548297.js';
|
|
6
6
|
import './check-one-of-6b3ef8eb.js';
|