@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.
Files changed (177) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/custom-elements.json +8 -0
  3. package/dist/cjs/{index-BnETQtSf.js → index-DJ4H_bFj.js} +382 -5
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/r-accordion-item.cjs.entry.js +1 -1
  6. package/dist/cjs/r-accordion-panel.cjs.entry.js +1 -1
  7. package/dist/cjs/r-accordion-section.cjs.entry.js +1 -1
  8. package/dist/cjs/r-accordion-trigger.cjs.entry.js +1 -1
  9. package/dist/cjs/r-accordion.cjs.entry.js +1 -1
  10. package/dist/cjs/r-alert.cjs.entry.js +1 -1
  11. package/dist/cjs/r-badge.cjs.entry.js +1 -1
  12. package/dist/cjs/r-button.cjs.entry.js +1 -1
  13. package/dist/cjs/r-checkbox-group.cjs.entry.js +1 -1
  14. package/dist/cjs/r-checkbox.cjs.entry.js +1 -1
  15. package/dist/cjs/r-design-system-devtools.cjs.entry.js +1 -1
  16. package/dist/cjs/r-dialog.cjs.entry.js +8 -10
  17. package/dist/cjs/r-hint_3.cjs.entry.js +1 -1
  18. package/dist/cjs/r-icon-button.cjs.entry.js +1 -1
  19. package/dist/cjs/r-icon.cjs.entry.js +1 -1
  20. package/dist/cjs/r-input-code.cjs.entry.js +1 -1
  21. package/dist/cjs/r-input-date.cjs.entry.js +1 -1
  22. package/dist/cjs/r-input-password.cjs.entry.js +1 -1
  23. package/dist/cjs/r-input-phone-number.cjs.entry.js +1 -1
  24. package/dist/cjs/r-input.cjs.entry.js +16 -5
  25. package/dist/cjs/r-list-item.cjs.entry.js +5 -6
  26. package/dist/cjs/r-pagination.cjs.entry.js +1 -1
  27. package/dist/cjs/r-panel.cjs.entry.js +1 -1
  28. package/dist/cjs/r-popover-action.cjs.entry.js +1 -1
  29. package/dist/cjs/r-popover-content.cjs.entry.js +1 -1
  30. package/dist/cjs/r-popover-headline.cjs.entry.js +1 -1
  31. package/dist/cjs/r-popover-trigger.cjs.entry.js +1 -1
  32. package/dist/cjs/r-popover.cjs.entry.js +1 -1
  33. package/dist/cjs/r-progress-bar.cjs.entry.js +1 -1
  34. package/dist/cjs/r-radio-button-description.cjs.entry.js +1 -1
  35. package/dist/cjs/r-radio-button-leading.cjs.entry.js +1 -1
  36. package/dist/cjs/r-radio-button-title.cjs.entry.js +1 -1
  37. package/dist/cjs/r-radio-button-trailing.cjs.entry.js +1 -1
  38. package/dist/cjs/r-radio-button.cjs.entry.js +1 -1
  39. package/dist/cjs/r-radio-group.cjs.entry.js +1 -1
  40. package/dist/cjs/r-select-option.cjs.entry.js +1 -1
  41. package/dist/cjs/r-select.cjs.entry.js +1 -1
  42. package/dist/cjs/r-skip-link.cjs.entry.js +1 -1
  43. package/dist/cjs/r-stepper-item.cjs.entry.js +1 -1
  44. package/dist/cjs/r-stepper.cjs.entry.js +1 -1
  45. package/dist/cjs/r-tab-panel.cjs.entry.js +1 -1
  46. package/dist/cjs/r-tab.cjs.entry.js +1 -1
  47. package/dist/cjs/r-tabs-list.cjs.entry.js +1 -1
  48. package/dist/cjs/r-tabs.cjs.entry.js +1 -1
  49. package/dist/cjs/r-textarea.cjs.entry.js +1 -1
  50. package/dist/cjs/r-toast-group.cjs.entry.js +15 -5
  51. package/dist/cjs/r-toast.cjs.entry.js +10 -10
  52. package/dist/cjs/web-components.cjs.js +2 -2
  53. package/dist/collection/components/dialog/dialog.css +1 -1
  54. package/dist/collection/components/dialog/dialog.js +23 -8
  55. package/dist/collection/components/input/input.js +15 -4
  56. package/dist/collection/components/list-item/list-item/list-item.css +19 -11
  57. package/dist/collection/components/list-item/list-item/list-item.js +41 -4
  58. package/dist/collection/components/toast/toast.css +8 -2
  59. package/dist/collection/components/toast/toast.js +8 -8
  60. package/dist/collection/components/toast-group/toast-group.css +14 -13
  61. package/dist/collection/components/toast-group/toast-group.js +14 -4
  62. package/dist/esm/{index-CTxpqopm.js → index-Da7qOBFr.js} +382 -5
  63. package/dist/esm/loader.js +3 -3
  64. package/dist/esm/r-accordion-item.entry.js +1 -1
  65. package/dist/esm/r-accordion-panel.entry.js +1 -1
  66. package/dist/esm/r-accordion-section.entry.js +1 -1
  67. package/dist/esm/r-accordion-trigger.entry.js +1 -1
  68. package/dist/esm/r-accordion.entry.js +1 -1
  69. package/dist/esm/r-alert.entry.js +1 -1
  70. package/dist/esm/r-badge.entry.js +1 -1
  71. package/dist/esm/r-button.entry.js +1 -1
  72. package/dist/esm/r-checkbox-group.entry.js +1 -1
  73. package/dist/esm/r-checkbox.entry.js +1 -1
  74. package/dist/esm/r-design-system-devtools.entry.js +1 -1
  75. package/dist/esm/r-dialog.entry.js +8 -10
  76. package/dist/esm/r-hint_3.entry.js +1 -1
  77. package/dist/esm/r-icon-button.entry.js +1 -1
  78. package/dist/esm/r-icon.entry.js +1 -1
  79. package/dist/esm/r-input-code.entry.js +1 -1
  80. package/dist/esm/r-input-date.entry.js +1 -1
  81. package/dist/esm/r-input-password.entry.js +1 -1
  82. package/dist/esm/r-input-phone-number.entry.js +1 -1
  83. package/dist/esm/r-input.entry.js +16 -5
  84. package/dist/esm/r-list-item.entry.js +5 -6
  85. package/dist/esm/r-pagination.entry.js +1 -1
  86. package/dist/esm/r-panel.entry.js +1 -1
  87. package/dist/esm/r-popover-action.entry.js +1 -1
  88. package/dist/esm/r-popover-content.entry.js +1 -1
  89. package/dist/esm/r-popover-headline.entry.js +1 -1
  90. package/dist/esm/r-popover-trigger.entry.js +1 -1
  91. package/dist/esm/r-popover.entry.js +1 -1
  92. package/dist/esm/r-progress-bar.entry.js +1 -1
  93. package/dist/esm/r-radio-button-description.entry.js +1 -1
  94. package/dist/esm/r-radio-button-leading.entry.js +1 -1
  95. package/dist/esm/r-radio-button-title.entry.js +1 -1
  96. package/dist/esm/r-radio-button-trailing.entry.js +1 -1
  97. package/dist/esm/r-radio-button.entry.js +1 -1
  98. package/dist/esm/r-radio-group.entry.js +1 -1
  99. package/dist/esm/r-select-option.entry.js +1 -1
  100. package/dist/esm/r-select.entry.js +1 -1
  101. package/dist/esm/r-skip-link.entry.js +1 -1
  102. package/dist/esm/r-stepper-item.entry.js +1 -1
  103. package/dist/esm/r-stepper.entry.js +1 -1
  104. package/dist/esm/r-tab-panel.entry.js +1 -1
  105. package/dist/esm/r-tab.entry.js +1 -1
  106. package/dist/esm/r-tabs-list.entry.js +1 -1
  107. package/dist/esm/r-tabs.entry.js +1 -1
  108. package/dist/esm/r-textarea.entry.js +1 -1
  109. package/dist/esm/r-toast-group.entry.js +15 -5
  110. package/dist/esm/r-toast.entry.js +10 -10
  111. package/dist/esm/web-components.js +3 -3
  112. package/dist/types/components/dialog/dialog.d.ts +6 -1
  113. package/dist/types/components/input/input.d.ts +1 -0
  114. package/dist/types/components/list-item/list-item/list-item.d.ts +6 -1
  115. package/dist/types/components/toast-group/toast-group.d.ts +2 -0
  116. package/dist/types/components.d.ts +35 -0
  117. package/dist/web-components/{p-aecd025b.entry.js → p-00ca474f.entry.js} +1 -1
  118. package/dist/web-components/{p-3fc2b23b.entry.js → p-00eb6986.entry.js} +1 -1
  119. package/dist/web-components/{p-2d85c0f3.entry.js → p-0735fd75.entry.js} +1 -1
  120. package/dist/web-components/{p-9c40f9cd.entry.js → p-0bb04d79.entry.js} +1 -1
  121. package/dist/web-components/{p-ef0f43e0.entry.js → p-0f4eea22.entry.js} +1 -1
  122. package/dist/web-components/{p-4cf01f30.entry.js → p-1c2497de.entry.js} +1 -1
  123. package/dist/web-components/p-2265dae1.entry.js +1 -0
  124. package/dist/web-components/{p-03ff9abf.entry.js → p-230e44ae.entry.js} +1 -1
  125. package/dist/web-components/{p-735da2bb.entry.js → p-24bbf3b6.entry.js} +1 -1
  126. package/dist/web-components/{p-3ea6a1be.entry.js → p-28718c50.entry.js} +1 -1
  127. package/dist/web-components/{p-1157b7f4.entry.js → p-2b2f581a.entry.js} +1 -1
  128. package/dist/web-components/{p-0a424361.entry.js → p-3b4e3faf.entry.js} +1 -1
  129. package/dist/web-components/p-3bc93d65.entry.js +1 -0
  130. package/dist/web-components/{p-dc93ed55.entry.js → p-429213ea.entry.js} +1 -1
  131. package/dist/web-components/{p-c60294d4.entry.js → p-43eff76a.entry.js} +1 -1
  132. package/dist/web-components/{p-c7a9da98.entry.js → p-44ae9f33.entry.js} +1 -1
  133. package/dist/web-components/{p-66c454ce.entry.js → p-4652635a.entry.js} +1 -1
  134. package/dist/web-components/{p-e50503d0.entry.js → p-4bd3e077.entry.js} +1 -1
  135. package/dist/web-components/{p-89ff32dc.entry.js → p-4e3df002.entry.js} +1 -1
  136. package/dist/web-components/p-51a5804b.entry.js +1 -0
  137. package/dist/web-components/{p-e273950c.entry.js → p-72fa1fd1.entry.js} +1 -1
  138. package/dist/web-components/{p-135be1d5.entry.js → p-755cc697.entry.js} +1 -1
  139. package/dist/web-components/{p-e74c363a.entry.js → p-77155630.entry.js} +1 -1
  140. package/dist/web-components/{p-48dfb286.entry.js → p-7fccc301.entry.js} +1 -1
  141. package/dist/web-components/{p-988a7731.entry.js → p-85a9af42.entry.js} +1 -1
  142. package/dist/web-components/{p-24130cdb.entry.js → p-87f39749.entry.js} +1 -1
  143. package/dist/web-components/{p-c9b2389b.entry.js → p-89136369.entry.js} +1 -1
  144. package/dist/web-components/{p-77dc268e.entry.js → p-8c577cda.entry.js} +1 -1
  145. package/dist/web-components/{p-6b7d5236.entry.js → p-99ba15d9.entry.js} +1 -1
  146. package/dist/web-components/{p-900923ab.entry.js → p-9eb1f262.entry.js} +1 -1
  147. package/dist/web-components/p-Da7qOBFr.js +2 -0
  148. package/dist/web-components/{p-2394508f.entry.js → p-a022f356.entry.js} +1 -1
  149. package/dist/web-components/{p-df81177e.entry.js → p-a58124c4.entry.js} +1 -1
  150. package/dist/web-components/{p-8d2f4097.entry.js → p-a683612d.entry.js} +1 -1
  151. package/dist/web-components/{p-9891afb8.entry.js → p-a7e7f8fa.entry.js} +1 -1
  152. package/dist/web-components/{p-fdf70aed.entry.js → p-ad4292d8.entry.js} +1 -1
  153. package/dist/web-components/p-c09a863b.entry.js +1 -0
  154. package/dist/web-components/{p-71d6c4d7.entry.js → p-c7f8e59b.entry.js} +1 -1
  155. package/dist/web-components/{p-f625b739.entry.js → p-c937bd92.entry.js} +1 -1
  156. package/dist/web-components/p-cbcd7699.entry.js +1 -0
  157. package/dist/web-components/p-e0e2f2b2.entry.js +1 -0
  158. package/dist/web-components/{p-8d6a35e3.entry.js → p-e49b1ec3.entry.js} +1 -1
  159. package/dist/web-components/p-e4b66277.entry.js +1 -0
  160. package/dist/web-components/p-e6a31881.entry.js +1 -0
  161. package/dist/web-components/{p-05ba30ba.entry.js → p-f1e22caa.entry.js} +1 -1
  162. package/dist/web-components/{p-10724c18.entry.js → p-f22696e0.entry.js} +1 -1
  163. package/dist/web-components/p-f6a92287.entry.js +1 -0
  164. package/dist/web-components/p-f7adb875.entry.js +1 -0
  165. package/dist/web-components/web-components.esm.js +1 -1
  166. package/package.json +1 -1
  167. package/dist/web-components/p-0ac858b8.entry.js +0 -1
  168. package/dist/web-components/p-0bb0de18.entry.js +0 -1
  169. package/dist/web-components/p-1ed3efd7.entry.js +0 -1
  170. package/dist/web-components/p-20f979ff.entry.js +0 -1
  171. package/dist/web-components/p-31c8388d.entry.js +0 -1
  172. package/dist/web-components/p-333707b2.entry.js +0 -1
  173. package/dist/web-components/p-61f78bf6.entry.js +0 -1
  174. package/dist/web-components/p-8f719321.entry.js +0 -1
  175. package/dist/web-components/p-9f583ed1.entry.js +0 -1
  176. package/dist/web-components/p-CTxpqopm.js +0 -2
  177. 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
- var _a, _b;
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([aria-hidden=true]) {
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, var(--r-spacing-100, 1rem));
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: 'f5413c4a9e1335b4a4e2f37cef036acbc7c05770', id: this.uniqueId, role: `${this.isError ? 'alert' : 'status'}`, "aria-live": "polite", "aria-label": `${headline}`, "aria-hidden": `${this.isOpen ? 'false' : 'true'}` }, h("div", { key: '3a222a7eaac62655c1cc7361865321c6a130f1fc', class: "r-toast" }, this.hasLeading &&
162
- h("div", { key: '91d8dd470641658118be1e7c99c4e2cf648fce5f', class: "r-toast--leading" }, this.hasLeadingSlot && h("slot", { key: '2c877ff1c79839e66c5f7ec79926a4f5eb807d02', name: "leading" }), this.hasLeadingIcon && h("r-icon", Object.assign({ key: 'f238d9fc8eb6f0360bc97587e0b3ab9b2d077314', class: "r-toast--leading-icon" }, leadingIconAttrs))), h("div", { key: '568bb66c165a3f3d9e52c74fc51673283e3789f8', class: "r-toast--main" }, this.hasHeadline &&
163
- h("h2", { key: '2267cbc787dfe1d9de4b35bc81981c3fe0df8deb', class: "r-toast--headline" }, h("slot", { key: '0a64068708db344d785db7d94fdb7edfcdf4fb7e', name: "headline" }, headline)), this.hasContent &&
164
- h("div", { key: 'e4b198949b659f7724ca2191145da9e577546bdf', class: "r-toast--content r-typography" }, h("slot", { key: 'bd063b802fd04ee1606e4934511a2f48ec2c9304', onSlotchange: this.handleSlotChange })), this.hasAction &&
165
- h("div", { key: '38c9af908aa62379cf9c914426bfb7d7ba707608', class: "r-toast--action" }, h("slot", { key: 'e25437e3a9298f21a9e6c7fd1b86cccaa096b44d', name: "action" }, this.hasActionLink &&
166
- h("a", Object.assign({ key: '9cae694c50dd9aab6acde4924dce66ec7823c5b9', class: "r-toast--action-link" }, actionAttrs), action)))), this.hasTrailing &&
167
- h("div", { key: 'fd7207cb911423a81a3ac80a26cbc025e5689e16', class: "r-toast--trailing" }, this.hasTrailingSlot && h("slot", { key: '5bcd5167e2299f62c20ed80be93dd06a8303dcab', name: "trailing" }), this.isDismissManual &&
168
- h("r-icon-button", Object.assign({ key: 'c33a87247c3ff02dc3ed4d4205f20fcdf2259f2e' }, trailingIconAttrs, { class: "r-toast--trailing-button", onClick: this.handleTrailingButtonClick, "aria-label": this.dismissLabel }), h("slot", { key: '05ddb2629df06aaa350c88b442df7894a2f4bcd7', name: "dismiss" }))))));
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: 767px) {
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([aria-hidden=false]) {
11
- --display: block;
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, none);
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-reverse);
34
- justify-content: var(--r-toast-group--justify-content, flex-end);
35
- gap: var(--r-toast-group--gap, 16px);
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('aria-hidden', `${this.hasChildren}`);
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.children.length < 1;
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: 'cd72702e1eee0d746e85c2022038972dea391dba' }, h("div", { key: '86bce60683eab444715fa266d39cada11bf19ce4', class: "r-toast-group" }, h("slot", { key: '594c29dc3b2ba4762d8a5b7876a47923d11f6f86', onSlotchange: this.updateHiddenState }))));
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 "shadow"; }
28
+ static get encapsulation() { return "scoped"; }
19
29
  static get originalStyleUrls() {
20
30
  return {
21
31
  "$": ["toast-group.css"]