@riverty/web-components 5.4.0 → 5.5.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/CHANGELOG.md +20 -0
- package/custom-elements.json +8 -0
- package/dist/cjs/{index-BnETQtSf.js → index-DJ4H_bFj.js} +382 -5
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/r-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/r-accordion-panel.cjs.entry.js +1 -1
- package/dist/cjs/r-accordion-section.cjs.entry.js +1 -1
- package/dist/cjs/r-accordion-trigger.cjs.entry.js +1 -1
- package/dist/cjs/r-accordion.cjs.entry.js +1 -1
- package/dist/cjs/r-alert.cjs.entry.js +1 -1
- package/dist/cjs/r-badge.cjs.entry.js +1 -1
- package/dist/cjs/r-button.cjs.entry.js +1 -1
- package/dist/cjs/r-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/r-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/r-design-system-devtools.cjs.entry.js +1 -1
- package/dist/cjs/r-dialog.cjs.entry.js +8 -10
- package/dist/cjs/r-hint_3.cjs.entry.js +1 -1
- package/dist/cjs/r-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/r-icon.cjs.entry.js +1 -1
- package/dist/cjs/r-input-code.cjs.entry.js +1 -1
- package/dist/cjs/r-input-date.cjs.entry.js +1 -1
- package/dist/cjs/r-input-password.cjs.entry.js +1 -1
- package/dist/cjs/r-input-phone-number.cjs.entry.js +1 -1
- package/dist/cjs/r-input.cjs.entry.js +16 -5
- package/dist/cjs/r-list-item.cjs.entry.js +5 -6
- package/dist/cjs/r-pagination.cjs.entry.js +1 -1
- package/dist/cjs/r-panel.cjs.entry.js +1 -1
- package/dist/cjs/r-popover-action.cjs.entry.js +1 -1
- package/dist/cjs/r-popover-content.cjs.entry.js +1 -1
- package/dist/cjs/r-popover-headline.cjs.entry.js +1 -1
- package/dist/cjs/r-popover-trigger.cjs.entry.js +1 -1
- package/dist/cjs/r-popover.cjs.entry.js +1 -1
- package/dist/cjs/r-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/r-radio-button-description.cjs.entry.js +1 -1
- package/dist/cjs/r-radio-button-leading.cjs.entry.js +1 -1
- package/dist/cjs/r-radio-button-title.cjs.entry.js +1 -1
- package/dist/cjs/r-radio-button-trailing.cjs.entry.js +1 -1
- package/dist/cjs/r-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/r-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/r-select-option.cjs.entry.js +1 -1
- package/dist/cjs/r-select.cjs.entry.js +1 -1
- package/dist/cjs/r-skip-link.cjs.entry.js +1 -1
- package/dist/cjs/r-stepper-item.cjs.entry.js +1 -1
- package/dist/cjs/r-stepper.cjs.entry.js +1 -1
- package/dist/cjs/r-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/r-tab.cjs.entry.js +1 -1
- package/dist/cjs/r-tabs-list.cjs.entry.js +1 -1
- package/dist/cjs/r-tabs.cjs.entry.js +1 -1
- package/dist/cjs/r-textarea.cjs.entry.js +1 -1
- package/dist/cjs/r-toast-group.cjs.entry.js +15 -5
- package/dist/cjs/r-toast.cjs.entry.js +10 -10
- package/dist/cjs/web-components.cjs.js +2 -2
- package/dist/collection/components/dialog/dialog.css +1 -1
- package/dist/collection/components/dialog/dialog.js +23 -8
- package/dist/collection/components/input/input.js +15 -4
- package/dist/collection/components/list-item/list-item/list-item.css +19 -11
- package/dist/collection/components/list-item/list-item/list-item.js +41 -4
- package/dist/collection/components/toast/toast.css +8 -2
- package/dist/collection/components/toast/toast.js +8 -8
- package/dist/collection/components/toast-group/toast-group.css +14 -13
- package/dist/collection/components/toast-group/toast-group.js +14 -4
- package/dist/esm/{index-CTxpqopm.js → index-Da7qOBFr.js} +382 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/r-accordion-item.entry.js +1 -1
- package/dist/esm/r-accordion-panel.entry.js +1 -1
- package/dist/esm/r-accordion-section.entry.js +1 -1
- package/dist/esm/r-accordion-trigger.entry.js +1 -1
- package/dist/esm/r-accordion.entry.js +1 -1
- package/dist/esm/r-alert.entry.js +1 -1
- package/dist/esm/r-badge.entry.js +1 -1
- package/dist/esm/r-button.entry.js +1 -1
- package/dist/esm/r-checkbox-group.entry.js +1 -1
- package/dist/esm/r-checkbox.entry.js +1 -1
- package/dist/esm/r-design-system-devtools.entry.js +1 -1
- package/dist/esm/r-dialog.entry.js +8 -10
- package/dist/esm/r-hint_3.entry.js +1 -1
- package/dist/esm/r-icon-button.entry.js +1 -1
- package/dist/esm/r-icon.entry.js +1 -1
- package/dist/esm/r-input-code.entry.js +1 -1
- package/dist/esm/r-input-date.entry.js +1 -1
- package/dist/esm/r-input-password.entry.js +1 -1
- package/dist/esm/r-input-phone-number.entry.js +1 -1
- package/dist/esm/r-input.entry.js +16 -5
- package/dist/esm/r-list-item.entry.js +5 -6
- package/dist/esm/r-pagination.entry.js +1 -1
- package/dist/esm/r-panel.entry.js +1 -1
- package/dist/esm/r-popover-action.entry.js +1 -1
- package/dist/esm/r-popover-content.entry.js +1 -1
- package/dist/esm/r-popover-headline.entry.js +1 -1
- package/dist/esm/r-popover-trigger.entry.js +1 -1
- package/dist/esm/r-popover.entry.js +1 -1
- package/dist/esm/r-progress-bar.entry.js +1 -1
- package/dist/esm/r-radio-button-description.entry.js +1 -1
- package/dist/esm/r-radio-button-leading.entry.js +1 -1
- package/dist/esm/r-radio-button-title.entry.js +1 -1
- package/dist/esm/r-radio-button-trailing.entry.js +1 -1
- package/dist/esm/r-radio-button.entry.js +1 -1
- package/dist/esm/r-radio-group.entry.js +1 -1
- package/dist/esm/r-select-option.entry.js +1 -1
- package/dist/esm/r-select.entry.js +1 -1
- package/dist/esm/r-skip-link.entry.js +1 -1
- package/dist/esm/r-stepper-item.entry.js +1 -1
- package/dist/esm/r-stepper.entry.js +1 -1
- package/dist/esm/r-tab-panel.entry.js +1 -1
- package/dist/esm/r-tab.entry.js +1 -1
- package/dist/esm/r-tabs-list.entry.js +1 -1
- package/dist/esm/r-tabs.entry.js +1 -1
- package/dist/esm/r-textarea.entry.js +1 -1
- package/dist/esm/r-toast-group.entry.js +15 -5
- package/dist/esm/r-toast.entry.js +10 -10
- package/dist/esm/web-components.js +3 -3
- package/dist/types/components/dialog/dialog.d.ts +6 -1
- package/dist/types/components/input/input.d.ts +1 -0
- package/dist/types/components/list-item/list-item/list-item.d.ts +6 -1
- package/dist/types/components/toast-group/toast-group.d.ts +2 -0
- package/dist/types/components.d.ts +35 -0
- package/dist/web-components/{p-aecd025b.entry.js → p-00ca474f.entry.js} +1 -1
- package/dist/web-components/{p-3fc2b23b.entry.js → p-00eb6986.entry.js} +1 -1
- package/dist/web-components/{p-2d85c0f3.entry.js → p-0735fd75.entry.js} +1 -1
- package/dist/web-components/{p-9c40f9cd.entry.js → p-0bb04d79.entry.js} +1 -1
- package/dist/web-components/{p-ef0f43e0.entry.js → p-0f4eea22.entry.js} +1 -1
- package/dist/web-components/{p-4cf01f30.entry.js → p-1c2497de.entry.js} +1 -1
- package/dist/web-components/p-2265dae1.entry.js +1 -0
- package/dist/web-components/{p-03ff9abf.entry.js → p-230e44ae.entry.js} +1 -1
- package/dist/web-components/{p-735da2bb.entry.js → p-24bbf3b6.entry.js} +1 -1
- package/dist/web-components/{p-3ea6a1be.entry.js → p-28718c50.entry.js} +1 -1
- package/dist/web-components/{p-1157b7f4.entry.js → p-2b2f581a.entry.js} +1 -1
- package/dist/web-components/{p-0a424361.entry.js → p-3b4e3faf.entry.js} +1 -1
- package/dist/web-components/p-3bc93d65.entry.js +1 -0
- package/dist/web-components/{p-dc93ed55.entry.js → p-429213ea.entry.js} +1 -1
- package/dist/web-components/{p-c60294d4.entry.js → p-43eff76a.entry.js} +1 -1
- package/dist/web-components/{p-c7a9da98.entry.js → p-44ae9f33.entry.js} +1 -1
- package/dist/web-components/{p-66c454ce.entry.js → p-4652635a.entry.js} +1 -1
- package/dist/web-components/{p-e50503d0.entry.js → p-4bd3e077.entry.js} +1 -1
- package/dist/web-components/{p-89ff32dc.entry.js → p-4e3df002.entry.js} +1 -1
- package/dist/web-components/p-51a5804b.entry.js +1 -0
- package/dist/web-components/{p-e273950c.entry.js → p-72fa1fd1.entry.js} +1 -1
- package/dist/web-components/{p-135be1d5.entry.js → p-755cc697.entry.js} +1 -1
- package/dist/web-components/{p-e74c363a.entry.js → p-77155630.entry.js} +1 -1
- package/dist/web-components/{p-48dfb286.entry.js → p-7fccc301.entry.js} +1 -1
- package/dist/web-components/{p-988a7731.entry.js → p-85a9af42.entry.js} +1 -1
- package/dist/web-components/{p-24130cdb.entry.js → p-87f39749.entry.js} +1 -1
- package/dist/web-components/{p-c9b2389b.entry.js → p-89136369.entry.js} +1 -1
- package/dist/web-components/{p-77dc268e.entry.js → p-8c577cda.entry.js} +1 -1
- package/dist/web-components/{p-6b7d5236.entry.js → p-99ba15d9.entry.js} +1 -1
- package/dist/web-components/{p-900923ab.entry.js → p-9eb1f262.entry.js} +1 -1
- package/dist/web-components/p-Da7qOBFr.js +2 -0
- package/dist/web-components/{p-2394508f.entry.js → p-a022f356.entry.js} +1 -1
- package/dist/web-components/{p-df81177e.entry.js → p-a58124c4.entry.js} +1 -1
- package/dist/web-components/{p-8d2f4097.entry.js → p-a683612d.entry.js} +1 -1
- package/dist/web-components/{p-9891afb8.entry.js → p-a7e7f8fa.entry.js} +1 -1
- package/dist/web-components/{p-fdf70aed.entry.js → p-ad4292d8.entry.js} +1 -1
- package/dist/web-components/p-c09a863b.entry.js +1 -0
- package/dist/web-components/{p-71d6c4d7.entry.js → p-c7f8e59b.entry.js} +1 -1
- package/dist/web-components/{p-f625b739.entry.js → p-c937bd92.entry.js} +1 -1
- package/dist/web-components/p-cbcd7699.entry.js +1 -0
- package/dist/web-components/p-e0e2f2b2.entry.js +1 -0
- package/dist/web-components/{p-8d6a35e3.entry.js → p-e49b1ec3.entry.js} +1 -1
- package/dist/web-components/p-e4b66277.entry.js +1 -0
- package/dist/web-components/p-e6a31881.entry.js +1 -0
- package/dist/web-components/{p-05ba30ba.entry.js → p-f1e22caa.entry.js} +1 -1
- package/dist/web-components/{p-10724c18.entry.js → p-f22696e0.entry.js} +1 -1
- package/dist/web-components/p-f6a92287.entry.js +1 -0
- package/dist/web-components/p-f7adb875.entry.js +1 -0
- package/dist/web-components/web-components.esm.js +1 -1
- package/package.json +1 -1
- package/dist/web-components/p-0ac858b8.entry.js +0 -1
- package/dist/web-components/p-0bb0de18.entry.js +0 -1
- package/dist/web-components/p-1ed3efd7.entry.js +0 -1
- package/dist/web-components/p-20f979ff.entry.js +0 -1
- package/dist/web-components/p-31c8388d.entry.js +0 -1
- package/dist/web-components/p-333707b2.entry.js +0 -1
- package/dist/web-components/p-61f78bf6.entry.js +0 -1
- package/dist/web-components/p-8f719321.entry.js +0 -1
- package/dist/web-components/p-9f583ed1.entry.js +0 -1
- package/dist/web-components/p-CTxpqopm.js +0 -2
- package/dist/web-components/p-caca2855.entry.js +0 -1
|
@@ -18,14 +18,13 @@ export class RListItem {
|
|
|
18
18
|
this.expanded = !this.expanded;
|
|
19
19
|
}
|
|
20
20
|
get isLeadingIcon() {
|
|
21
|
-
|
|
22
|
-
return ((_a = this.leadingIcon) === null || _a === void 0 ? void 0 : _a.length) > 0 || ((_b = this.leadingIconSrc) === null || _b === void 0 ? void 0 : _b.length) > 0;
|
|
21
|
+
return !!this.leadingIcon || !!this.leadingIconSrc;
|
|
23
22
|
}
|
|
24
23
|
get isLeadingSlot() {
|
|
25
24
|
return this.isEl('[slot="leading"]');
|
|
26
25
|
}
|
|
27
26
|
get isLeading() {
|
|
28
|
-
return this.isLeadingIcon || this.isLeadingSlot;
|
|
27
|
+
return (this.isLeadingIcon && !this.hideLeadingIcon) || this.isLeadingSlot;
|
|
29
28
|
}
|
|
30
29
|
get isTrailingIcon() {
|
|
31
30
|
var _a, _b;
|
|
@@ -82,7 +81,7 @@ export class RListItem {
|
|
|
82
81
|
const TagName = this.tagName;
|
|
83
82
|
const itemAttrs = Object.assign({ href: TagName === 'a' ? this.href : null }, (this.disabled ? { role: 'link', 'aria-disabled': 'true' } : null));
|
|
84
83
|
const ListItemContent = (h(TagName, Object.assign({ class: "r-list-item" }, itemAttrs), this.isLeading &&
|
|
85
|
-
h("span", { class: "r-list-item--leading" }, h("slot", { name: "leading" }, this.isLeadingIcon &&
|
|
84
|
+
h("span", { class: "r-list-item--leading" }, h("slot", { name: "leading" }, this.isLeadingIcon && !this.hideLeadingIcon &&
|
|
86
85
|
h("r-icon", { class: "r-list-item--leading-icon", name: leadingIcon, src: leadingIconSrc }))), h("span", { class: "r-list-item--text" }, !this.isTextSlot ?
|
|
87
86
|
h(Fragment, null, (this.isHeadlineSlot || headline) &&
|
|
88
87
|
h("span", { class: "r-list-item--headline" }, h("slot", { name: "headline" }, headline)), (description || this.isDescriptionSlot || subtext) &&
|
|
@@ -170,6 +169,25 @@ export class RListItem {
|
|
|
170
169
|
"setter": false,
|
|
171
170
|
"reflect": false
|
|
172
171
|
},
|
|
172
|
+
"truncateDescription": {
|
|
173
|
+
"type": "boolean",
|
|
174
|
+
"attribute": "truncate-description",
|
|
175
|
+
"mutable": false,
|
|
176
|
+
"complexType": {
|
|
177
|
+
"original": "boolean",
|
|
178
|
+
"resolved": "boolean",
|
|
179
|
+
"references": {}
|
|
180
|
+
},
|
|
181
|
+
"required": false,
|
|
182
|
+
"optional": true,
|
|
183
|
+
"docs": {
|
|
184
|
+
"tags": [],
|
|
185
|
+
"text": "When enabled, the description is limited to a single line and truncated with an ellipsis if it overflows."
|
|
186
|
+
},
|
|
187
|
+
"getter": false,
|
|
188
|
+
"setter": false,
|
|
189
|
+
"reflect": false
|
|
190
|
+
},
|
|
173
191
|
"leadingIcon": {
|
|
174
192
|
"type": "string",
|
|
175
193
|
"attribute": "leading-icon",
|
|
@@ -214,6 +232,25 @@ export class RListItem {
|
|
|
214
232
|
"setter": false,
|
|
215
233
|
"reflect": false
|
|
216
234
|
},
|
|
235
|
+
"hideLeadingIcon": {
|
|
236
|
+
"type": "boolean",
|
|
237
|
+
"attribute": "hide-leading-icon",
|
|
238
|
+
"mutable": false,
|
|
239
|
+
"complexType": {
|
|
240
|
+
"original": "boolean",
|
|
241
|
+
"resolved": "boolean",
|
|
242
|
+
"references": {}
|
|
243
|
+
},
|
|
244
|
+
"required": false,
|
|
245
|
+
"optional": true,
|
|
246
|
+
"docs": {
|
|
247
|
+
"tags": [],
|
|
248
|
+
"text": "Defines if the leading icon shall become hidden."
|
|
249
|
+
},
|
|
250
|
+
"getter": false,
|
|
251
|
+
"setter": false,
|
|
252
|
+
"reflect": false
|
|
253
|
+
},
|
|
217
254
|
"trailingIcon": {
|
|
218
255
|
"type": "string",
|
|
219
256
|
"attribute": "trailing-icon",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
--r-toast--content--margin-top: var(--r-spacing-050, 0.5rem);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
:host([
|
|
33
|
+
:host([data-visually-hidden=true]) {
|
|
34
34
|
--r-toast--host--transition: all 0.15s;
|
|
35
35
|
--r-toast--host--transition-delay: 0.15s;
|
|
36
36
|
--r-toast--host--opacity: 0;
|
|
@@ -82,6 +82,12 @@
|
|
|
82
82
|
:host .r-toast--trailing-button:active {
|
|
83
83
|
--r-button--transform: scale(0.94);
|
|
84
84
|
}
|
|
85
|
+
@media (prefers-reduced-motion) {
|
|
86
|
+
:host {
|
|
87
|
+
--r-toast--transition: none;
|
|
88
|
+
--r-toast--host--animation-name: none;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
85
91
|
|
|
86
92
|
.r-toast {
|
|
87
93
|
font-family: var(--r-toast--font-family, var(--r-font-family-text, system-ui));
|
|
@@ -90,7 +96,7 @@
|
|
|
90
96
|
flex-direction: var(--r-toast--flex-direction, row);
|
|
91
97
|
align-items: var(--r-toast--align-items, stretch);
|
|
92
98
|
gap: var(--r-toast--gap, var(--r-spacing-075, 0.75rem));
|
|
93
|
-
padding: var(--r-toast--padding,
|
|
99
|
+
padding: var(--r-toast--padding, 16px);
|
|
94
100
|
border-width: var(--r-toast--border-width, 1px);
|
|
95
101
|
border-style: var(--r-toast--border-style, solid);
|
|
96
102
|
border-color: var(--r-toast--border-color, var(--r-status-info-regular, #466882));
|
|
@@ -158,14 +158,14 @@ export class Toast {
|
|
|
158
158
|
name: trailingIcon,
|
|
159
159
|
size: 'm'
|
|
160
160
|
};
|
|
161
|
-
return (h(Host, { key: '
|
|
162
|
-
h("div", { key: '
|
|
163
|
-
h("h2", { key: '
|
|
164
|
-
h("div", { key: '
|
|
165
|
-
h("div", { key: '
|
|
166
|
-
h("a", Object.assign({ key: '
|
|
167
|
-
h("div", { key: '
|
|
168
|
-
h("r-icon-button", Object.assign({ key: '
|
|
161
|
+
return (h(Host, { key: 'd89f4e9245d32cd1f622beed7c053442c1977e7f', id: this.uniqueId, role: "alert", "aria-live": `${this.isError ? 'assertive' : 'polite'}`, "data-visually-hidden": `${this.isOpen ? 'false' : 'true'}` }, h("div", { key: '5292d419fa8122136b8694a47140418a2c3bbf1c', class: "r-toast" }, this.hasLeading &&
|
|
162
|
+
h("div", { key: '39d348a25e1dffb2c0dc6c550d94e0ee5a791089', class: "r-toast--leading" }, this.hasLeadingSlot && h("slot", { key: '92693e79818ea57423bd56364bad96c4e85a8fb7', name: "leading" }), this.hasLeadingIcon && h("r-icon", Object.assign({ key: 'a6c8491b3bf1af387c228ab110775d380dc33afd', class: "r-toast--leading-icon" }, leadingIconAttrs))), h("div", { key: '78e914e294adb359116045937146caaf9f82b4e6', class: "r-toast--main" }, this.hasHeadline &&
|
|
163
|
+
h("h2", { key: 'f33e94e74a2f93dc7bfb28f83120d79f07d3b254', class: "r-toast--headline" }, h("slot", { key: '3e61d7eb3b319dd00205bd010074edd1f2f809ba', name: "headline" }, headline)), this.hasContent &&
|
|
164
|
+
h("div", { key: '6d098697465a8c84c5dca4abcf5b7eab04ff4a23', class: "r-toast--content r-typography" }, h("slot", { key: '8ad7f7ce97edcbd601a7e08b48a2cd766d32e8bf', onSlotchange: this.handleSlotChange })), this.hasAction &&
|
|
165
|
+
h("div", { key: '7b0df2b4f747b7436ddaa34c87b876d5d8023921', class: "r-toast--action" }, h("slot", { key: '9811a95fc1261f7565d31b2a54ca97a9a36ec236', name: "action" }, this.hasActionLink &&
|
|
166
|
+
h("a", Object.assign({ key: 'bbbd7f3f63da45f374d40152269fe68b359e298d', class: "r-toast--action-link" }, actionAttrs), action)))), this.hasTrailing &&
|
|
167
|
+
h("div", { key: '6a000a3e1e6dfbbbfe83b64ad550b39df030bef3', class: "r-toast--trailing" }, this.hasTrailingSlot && h("slot", { key: '90ab154036ef2206394d1c43ad48a4973eec520f', name: "trailing" }), this.isDismissManual &&
|
|
168
|
+
h("r-icon-button", Object.assign({ key: '1433d0151fb3673d98b51f476e8bbe43d8f7ebd6' }, trailingIconAttrs, { class: "r-toast--trailing-button", onClick: this.handleTrailingButtonClick, "aria-label": this.dismissLabel }), h("slot", { key: 'c47c59fbc4097fdaf4f3a4f27beab833dcef4f0e', name: "dismiss" }))))));
|
|
169
169
|
}
|
|
170
170
|
static get is() { return "r-toast"; }
|
|
171
171
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@media (max-width:
|
|
1
|
+
@media (max-width: 48rem) {
|
|
2
2
|
:host {
|
|
3
3
|
--width: auto;
|
|
4
4
|
--right: 24px;
|
|
@@ -7,12 +7,19 @@
|
|
|
7
7
|
--padding-right: 0;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
:host([
|
|
11
|
-
|
|
10
|
+
:host([data-visually-hidden=true]) {
|
|
11
|
+
position: absolute;
|
|
12
|
+
width: 1px;
|
|
13
|
+
height: 1px;
|
|
14
|
+
padding: 0;
|
|
15
|
+
margin: -1px;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
clip: rect(0, 0, 0, 0);
|
|
18
|
+
border: 0;
|
|
12
19
|
}
|
|
13
20
|
|
|
14
21
|
:host {
|
|
15
|
-
display: var(--display,
|
|
22
|
+
display: var(--display, block);
|
|
16
23
|
position: var(--position, fixed);
|
|
17
24
|
top: var(--top, 32px);
|
|
18
25
|
right: var(--right, 0);
|
|
@@ -30,13 +37,7 @@
|
|
|
30
37
|
.r-toast-group {
|
|
31
38
|
position: relative;
|
|
32
39
|
display: var(--r-toast-group--display, flex);
|
|
33
|
-
flex-direction: var(--r-toast-group--flex-direction, column
|
|
34
|
-
justify-content: var(--r-toast-group--justify-content, flex-
|
|
35
|
-
gap: var(--r-toast-group--gap,
|
|
36
|
-
}
|
|
37
|
-
.r-toast-group ::slotted(r-toast[aria-hidden=true]) {
|
|
38
|
-
--animation-name: slideOut;
|
|
39
|
-
}
|
|
40
|
-
.r-toast-group ::slotted(r-toast[aria-hidden=false]) {
|
|
41
|
-
--animation-name: slideIn;
|
|
40
|
+
flex-direction: var(--r-toast-group--flex-direction, column);
|
|
41
|
+
justify-content: var(--r-toast-group--justify-content, flex-start);
|
|
42
|
+
gap: var(--r-toast-group--gap, var(--r-spacing-100, 1rem));
|
|
42
43
|
}
|
|
@@ -2,20 +2,30 @@ import { Host, h } from "@stencil/core";
|
|
|
2
2
|
export class ToastGroup {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.updateHiddenState = () => {
|
|
5
|
-
this.host.setAttribute('
|
|
5
|
+
this.host.setAttribute('data-visually-hidden', `${!this.hasChildren}`);
|
|
6
|
+
};
|
|
7
|
+
this.observeSlotContentChange = () => {
|
|
8
|
+
this.observer = new MutationObserver(() => {
|
|
9
|
+
this.updateHiddenState();
|
|
10
|
+
});
|
|
11
|
+
this.observer.observe(this.host, {
|
|
12
|
+
childList: true,
|
|
13
|
+
subtree: true
|
|
14
|
+
});
|
|
6
15
|
};
|
|
7
16
|
}
|
|
8
17
|
get hasChildren() {
|
|
9
|
-
return this.host.
|
|
18
|
+
return this.host.querySelectorAll('r-toast').length > 0;
|
|
10
19
|
}
|
|
11
20
|
componentWillLoad() {
|
|
12
21
|
this.updateHiddenState();
|
|
22
|
+
this.observeSlotContentChange();
|
|
13
23
|
}
|
|
14
24
|
render() {
|
|
15
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: '95e0b29bb1b6a45aabb4e7f5da283997c6b707a8' }, h("div", { key: '4b42e40646381d78f2b812f483ea993992ec7f12', class: "r-toast-group" }, h("slot", { key: 'db3cca9551652a78d9c1579532894fc86ca02b73' }))));
|
|
16
26
|
}
|
|
17
27
|
static get is() { return "r-toast-group"; }
|
|
18
|
-
static get encapsulation() { return "
|
|
28
|
+
static get encapsulation() { return "scoped"; }
|
|
19
29
|
static get originalStyleUrls() {
|
|
20
30
|
return {
|
|
21
31
|
"$": ["toast-group.css"]
|