@riverty/web-components 6.1.0 → 6.2.1

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 (256) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/custom-elements.json +160 -1
  3. package/dist/cjs/{index-DJ4H_bFj.js → index-BnETQtSf.js} +9 -382
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/r-accordion-panel.cjs.entry.js +1 -1
  6. package/dist/cjs/r-accordion-section.cjs.entry.js +1 -1
  7. package/dist/cjs/r-accordion-trigger.cjs.entry.js +1 -1
  8. package/dist/cjs/r-accordion.cjs.entry.js +1 -1
  9. package/dist/cjs/r-alert.cjs.entry.js +9 -6
  10. package/dist/cjs/r-badge.cjs.entry.js +1 -1
  11. package/dist/cjs/r-button.cjs.entry.js +6 -2
  12. package/dist/cjs/r-checkbox-group.cjs.entry.js +1 -1
  13. package/dist/cjs/r-checkbox.cjs.entry.js +4 -4
  14. package/dist/cjs/r-design-system-devtools.cjs.entry.js +1 -1
  15. package/dist/cjs/r-dialog.cjs.entry.js +1 -1
  16. package/dist/cjs/r-hint_2.cjs.entry.js +3 -3
  17. package/dist/cjs/r-icon-button_2.cjs.entry.js +24 -4
  18. package/dist/cjs/r-icon.cjs.entry.js +2 -2
  19. package/dist/cjs/r-illustration.cjs.entry.js +396 -0
  20. package/dist/cjs/r-input-code.cjs.entry.js +34 -12
  21. package/dist/cjs/r-input-date.cjs.entry.js +7 -7
  22. package/dist/cjs/r-input-password.cjs.entry.js +3 -3
  23. package/dist/cjs/r-input-phone-number.cjs.entry.js +4 -4
  24. package/dist/cjs/r-input.cjs.entry.js +5 -4
  25. package/dist/cjs/r-list-item.cjs.entry.js +1 -1
  26. package/dist/cjs/r-pagination.cjs.entry.js +56 -50
  27. package/dist/cjs/r-panel.cjs.entry.js +3 -3
  28. package/dist/cjs/r-popover-action.cjs.entry.js +2 -2
  29. package/dist/cjs/r-popover-content.cjs.entry.js +2 -2
  30. package/dist/cjs/r-popover-headline.cjs.entry.js +2 -2
  31. package/dist/cjs/r-popover-trigger.cjs.entry.js +2 -2
  32. package/dist/cjs/r-popover.cjs.entry.js +46 -5
  33. package/dist/cjs/r-progress-bar.cjs.entry.js +2 -2
  34. package/dist/cjs/r-radio-button-description.cjs.entry.js +2 -2
  35. package/dist/cjs/r-radio-button-leading.cjs.entry.js +2 -2
  36. package/dist/cjs/r-radio-button-title.cjs.entry.js +2 -2
  37. package/dist/cjs/r-radio-button-trailing.cjs.entry.js +2 -2
  38. package/dist/cjs/r-radio-button.cjs.entry.js +8 -7
  39. package/dist/cjs/r-radio-group.cjs.entry.js +83 -10
  40. package/dist/cjs/r-select-option.cjs.entry.js +2 -2
  41. package/dist/cjs/r-select.cjs.entry.js +6 -4
  42. package/dist/cjs/r-skip-link.cjs.entry.js +2 -2
  43. package/dist/cjs/r-stepper-item.cjs.entry.js +19 -4
  44. package/dist/cjs/r-stepper.cjs.entry.js +76 -3
  45. package/dist/cjs/r-tab-panel.cjs.entry.js +2 -2
  46. package/dist/cjs/r-tab.cjs.entry.js +3 -3
  47. package/dist/cjs/r-tabs-list.cjs.entry.js +4 -4
  48. package/dist/cjs/r-tabs.cjs.entry.js +2 -2
  49. package/dist/cjs/r-textarea.cjs.entry.js +1 -1
  50. package/dist/cjs/r-toast-group.cjs.entry.js +13 -4
  51. package/dist/cjs/r-toast.cjs.entry.js +87 -18
  52. package/dist/cjs/web-components.cjs.js +2 -2
  53. package/dist/collection/collection-manifest.json +1 -0
  54. package/dist/collection/components/alert/alert.css +4 -3
  55. package/dist/collection/components/alert/alert.js +7 -4
  56. package/dist/collection/components/button/button.js +30 -1
  57. package/dist/collection/components/button/exports.js +1 -0
  58. package/dist/collection/components/checkbox/checkbox.js +3 -3
  59. package/dist/collection/components/icon/exports.js +1 -1
  60. package/dist/collection/components/icon/icon.js +1 -1
  61. package/dist/collection/components/icon/riverty-kit.js +1 -1
  62. package/dist/collection/components/illustration/data.js +112 -0
  63. package/dist/collection/components/illustration/exports.js +3 -0
  64. package/dist/collection/components/illustration/illustration.css +52 -0
  65. package/dist/collection/components/illustration/illustration.js +540 -0
  66. package/dist/collection/components/illustration/illustrations-ui-kit.js +2 -0
  67. package/dist/collection/components/input/exports.js +1 -0
  68. package/dist/collection/components/input/input.css +3 -0
  69. package/dist/collection/components/input/input.js +47 -2
  70. package/dist/collection/components/input-code/input-code.css +6 -0
  71. package/dist/collection/components/input-code/input-code.js +48 -10
  72. package/dist/collection/components/input-date/input-date.js +6 -6
  73. package/dist/collection/components/input-password/input-password.js +2 -2
  74. package/dist/collection/components/input-phone-number/input-phone-number.js +3 -3
  75. package/dist/collection/components/label/label.js +2 -2
  76. package/dist/collection/components/pagination/pagination.css +33 -72
  77. package/dist/collection/components/pagination/pagination.js +194 -48
  78. package/dist/collection/components/panel/panel.js +2 -2
  79. package/dist/collection/components/popover/popover.css +0 -1
  80. package/dist/collection/components/popover/popover.js +44 -3
  81. package/dist/collection/components/popover-action/popover-action.js +1 -1
  82. package/dist/collection/components/popover-content/popover-content.js +1 -1
  83. package/dist/collection/components/popover-headline/popover-headline.js +1 -1
  84. package/dist/collection/components/popover-trigger/popover-trigger.js +1 -1
  85. package/dist/collection/components/progress-bar/progress-bar.js +1 -1
  86. package/dist/collection/components/radio-button/radio-button.js +7 -6
  87. package/dist/collection/components/radio-button-description/radio-button-description.js +1 -1
  88. package/dist/collection/components/radio-button-leading/radio-button-leading.js +1 -1
  89. package/dist/collection/components/radio-button-title/radio-button-title.js +1 -1
  90. package/dist/collection/components/radio-button-trailing/radio-button-trailing.js +1 -1
  91. package/dist/collection/components/radio-group/radio-group.css +4 -1
  92. package/dist/collection/components/radio-group/radio-group.js +100 -8
  93. package/dist/collection/components/select/select.js +5 -3
  94. package/dist/collection/components/select-option/select-option.js +1 -1
  95. package/dist/collection/components/skip-link/skip-link.js +1 -1
  96. package/dist/collection/components/stepper/stepper.css +4 -1
  97. package/dist/collection/components/stepper/stepper.js +125 -1
  98. package/dist/collection/components/stepper-item/stepper-item.css +22 -9
  99. package/dist/collection/components/stepper-item/stepper-item.js +36 -2
  100. package/dist/collection/components/tab/tab.js +2 -2
  101. package/dist/collection/components/tab-panel/tab-panel.js +1 -1
  102. package/dist/collection/components/tabs/tabs.js +1 -1
  103. package/dist/collection/components/tabs-list/tabs-list.js +3 -3
  104. package/dist/collection/components/toast/toast.css +9 -9
  105. package/dist/collection/components/toast/toast.js +109 -21
  106. package/dist/collection/components/toast-group/toast-group.css +5 -11
  107. package/dist/collection/components/toast-group/toast-group.js +12 -3
  108. package/dist/collection/components/tooltip/tooltip.js +23 -3
  109. package/dist/esm/{index-Da7qOBFr.js → index-CTxpqopm.js} +9 -382
  110. package/dist/esm/loader.js +3 -3
  111. package/dist/esm/r-accordion-panel.entry.js +1 -1
  112. package/dist/esm/r-accordion-section.entry.js +1 -1
  113. package/dist/esm/r-accordion-trigger.entry.js +1 -1
  114. package/dist/esm/r-accordion.entry.js +1 -1
  115. package/dist/esm/r-alert.entry.js +9 -6
  116. package/dist/esm/r-badge.entry.js +1 -1
  117. package/dist/esm/r-button.entry.js +6 -2
  118. package/dist/esm/r-checkbox-group.entry.js +1 -1
  119. package/dist/esm/r-checkbox.entry.js +4 -4
  120. package/dist/esm/r-design-system-devtools.entry.js +1 -1
  121. package/dist/esm/r-dialog.entry.js +1 -1
  122. package/dist/esm/r-hint_2.entry.js +3 -3
  123. package/dist/esm/r-icon-button_2.entry.js +24 -4
  124. package/dist/esm/r-icon.entry.js +2 -2
  125. package/dist/esm/r-illustration.entry.js +394 -0
  126. package/dist/esm/r-input-code.entry.js +34 -12
  127. package/dist/esm/r-input-date.entry.js +7 -7
  128. package/dist/esm/r-input-password.entry.js +3 -3
  129. package/dist/esm/r-input-phone-number.entry.js +4 -4
  130. package/dist/esm/r-input.entry.js +5 -4
  131. package/dist/esm/r-list-item.entry.js +1 -1
  132. package/dist/esm/r-pagination.entry.js +56 -50
  133. package/dist/esm/r-panel.entry.js +3 -3
  134. package/dist/esm/r-popover-action.entry.js +2 -2
  135. package/dist/esm/r-popover-content.entry.js +2 -2
  136. package/dist/esm/r-popover-headline.entry.js +2 -2
  137. package/dist/esm/r-popover-trigger.entry.js +2 -2
  138. package/dist/esm/r-popover.entry.js +46 -5
  139. package/dist/esm/r-progress-bar.entry.js +2 -2
  140. package/dist/esm/r-radio-button-description.entry.js +2 -2
  141. package/dist/esm/r-radio-button-leading.entry.js +2 -2
  142. package/dist/esm/r-radio-button-title.entry.js +2 -2
  143. package/dist/esm/r-radio-button-trailing.entry.js +2 -2
  144. package/dist/esm/r-radio-button.entry.js +8 -7
  145. package/dist/esm/r-radio-group.entry.js +83 -10
  146. package/dist/esm/r-select-option.entry.js +2 -2
  147. package/dist/esm/r-select.entry.js +6 -4
  148. package/dist/esm/r-skip-link.entry.js +2 -2
  149. package/dist/esm/r-stepper-item.entry.js +19 -4
  150. package/dist/esm/r-stepper.entry.js +76 -3
  151. package/dist/esm/r-tab-panel.entry.js +2 -2
  152. package/dist/esm/r-tab.entry.js +3 -3
  153. package/dist/esm/r-tabs-list.entry.js +4 -4
  154. package/dist/esm/r-tabs.entry.js +2 -2
  155. package/dist/esm/r-textarea.entry.js +1 -1
  156. package/dist/esm/r-toast-group.entry.js +13 -4
  157. package/dist/esm/r-toast.entry.js +87 -18
  158. package/dist/esm/web-components.js +3 -3
  159. package/dist/types/components/alert/alert.d.ts +1 -0
  160. package/dist/types/components/button/button.d.ts +8 -1
  161. package/dist/types/components/button/exports.d.ts +2 -0
  162. package/dist/types/components/icon/exports.d.ts +1 -1
  163. package/dist/types/components/icon/riverty-kit.d.ts +1 -1
  164. package/dist/types/components/illustration/data.d.ts +52 -0
  165. package/dist/types/components/illustration/exports.d.ts +23 -0
  166. package/dist/types/components/illustration/illustration.d.ts +51 -0
  167. package/dist/types/components/illustration/illustrations-ui-kit.d.ts +21 -0
  168. package/dist/types/components/input/exports.d.ts +2 -0
  169. package/dist/types/components/input/input.d.ts +15 -1
  170. package/dist/types/components/input-code/input-code.d.ts +15 -1
  171. package/dist/types/components/pagination/pagination.d.ts +19 -0
  172. package/dist/types/components/popover/popover.d.ts +9 -0
  173. package/dist/types/components/radio-group/radio-group.d.ts +16 -0
  174. package/dist/types/components/stepper/stepper.d.ts +11 -0
  175. package/dist/types/components/stepper-item/stepper-item.d.ts +7 -0
  176. package/dist/types/components/toast/toast.d.ts +10 -4
  177. package/dist/types/components/tooltip/tooltip.d.ts +5 -0
  178. package/dist/types/components.d.ts +273 -7
  179. package/dist/web-components/p-02b22f8e.entry.js +1 -0
  180. package/dist/web-components/{p-d054eb4d.entry.js → p-075a8dc8.entry.js} +1 -1
  181. package/dist/web-components/{p-8a66d20c.entry.js → p-0a34d33b.entry.js} +1 -1
  182. package/dist/web-components/{p-8c31cbd5.entry.js → p-10cc9983.entry.js} +1 -1
  183. package/dist/web-components/{p-d7726e46.entry.js → p-253068b9.entry.js} +1 -1
  184. package/dist/web-components/{p-3884c6e7.entry.js → p-3b8c8951.entry.js} +1 -1
  185. package/dist/web-components/{p-550e2237.entry.js → p-3beacdab.entry.js} +1 -1
  186. package/dist/web-components/p-4214867d.entry.js +1 -0
  187. package/dist/web-components/{p-3f60c6c0.entry.js → p-42c857e9.entry.js} +1 -1
  188. package/dist/web-components/{p-7fed6f4d.entry.js → p-44f87e16.entry.js} +1 -1
  189. package/dist/web-components/p-477614c5.entry.js +1 -0
  190. package/dist/web-components/{p-1da75540.entry.js → p-495ba3d2.entry.js} +1 -1
  191. package/dist/web-components/{p-19407a14.entry.js → p-4de76291.entry.js} +1 -1
  192. package/dist/web-components/{p-cd5daad2.entry.js → p-55600d47.entry.js} +1 -1
  193. package/dist/web-components/{p-c95b6470.entry.js → p-562051aa.entry.js} +1 -1
  194. package/dist/web-components/p-5b850e0f.entry.js +1 -0
  195. package/dist/web-components/p-6013dfc8.entry.js +1 -0
  196. package/dist/web-components/{p-6cc2ea2c.entry.js → p-62e7ae04.entry.js} +1 -1
  197. package/dist/web-components/p-71519d37.entry.js +1 -0
  198. package/dist/web-components/p-88f7b47f.entry.js +1 -0
  199. package/dist/web-components/p-8975a6a3.entry.js +1 -0
  200. package/dist/web-components/{p-6bb44ec6.entry.js → p-8e125826.entry.js} +1 -1
  201. package/dist/web-components/p-91cc0bde.entry.js +1 -0
  202. package/dist/web-components/{p-0347feff.entry.js → p-93435fcd.entry.js} +1 -1
  203. package/dist/web-components/p-947969d7.entry.js +1 -0
  204. package/dist/web-components/{p-cdd88c5a.entry.js → p-95396b5c.entry.js} +1 -1
  205. package/dist/web-components/p-9de3a1a5.entry.js +1 -0
  206. package/dist/web-components/p-9f583ed1.entry.js +1 -0
  207. package/dist/web-components/p-CTxpqopm.js +2 -0
  208. package/dist/web-components/{p-5eeb7002.entry.js → p-a1086abe.entry.js} +1 -1
  209. package/dist/web-components/{p-f9d5004c.entry.js → p-bbba6d79.entry.js} +1 -1
  210. package/dist/web-components/{p-c478712b.entry.js → p-bde44ec4.entry.js} +1 -1
  211. package/dist/web-components/p-bfc7e6c0.entry.js +1 -0
  212. package/dist/web-components/p-c1030394.entry.js +1 -0
  213. package/dist/web-components/{p-26ef77d6.entry.js → p-c80a5541.entry.js} +1 -1
  214. package/dist/web-components/{p-9ef1bbee.entry.js → p-c96ee61a.entry.js} +1 -1
  215. package/dist/web-components/{p-8dac326b.entry.js → p-caf8f067.entry.js} +1 -1
  216. package/dist/web-components/p-cc363c3d.entry.js +1 -0
  217. package/dist/web-components/p-cf4ff357.entry.js +1 -0
  218. package/dist/web-components/p-d0310ed4.entry.js +1 -0
  219. package/dist/web-components/p-d1412932.entry.js +1 -0
  220. package/dist/web-components/{p-62b788bf.entry.js → p-d2447e30.entry.js} +1 -1
  221. package/dist/web-components/p-dc9cca06.entry.js +1 -0
  222. package/dist/web-components/p-e5b943a2.entry.js +1 -0
  223. package/dist/web-components/{p-4cc58c6a.entry.js → p-e67b13df.entry.js} +1 -1
  224. package/dist/web-components/p-efec231a.entry.js +1 -0
  225. package/dist/web-components/{p-4595fa8e.entry.js → p-f867e4c3.entry.js} +1 -1
  226. package/dist/web-components/p-ff6b1b8f.entry.js +1 -0
  227. package/dist/web-components/web-components.esm.js +1 -1
  228. package/package.json +5 -2
  229. package/dist/collection/components/icon/bundled-icons/all-kit.json +0 -1
  230. package/dist/collection/components/icon/bundled-icons/riverty-kit.json +0 -1
  231. package/dist/web-components/bundled-icons/all-kit.json +0 -1
  232. package/dist/web-components/bundled-icons/riverty-kit.json +0 -1
  233. package/dist/web-components/p-159822fe.entry.js +0 -1
  234. package/dist/web-components/p-4f261b63.entry.js +0 -1
  235. package/dist/web-components/p-50893211.entry.js +0 -1
  236. package/dist/web-components/p-589baaf9.entry.js +0 -1
  237. package/dist/web-components/p-60341de2.entry.js +0 -1
  238. package/dist/web-components/p-63fd817d.entry.js +0 -1
  239. package/dist/web-components/p-67fa3f84.entry.js +0 -1
  240. package/dist/web-components/p-70784685.entry.js +0 -1
  241. package/dist/web-components/p-7ce57332.entry.js +0 -1
  242. package/dist/web-components/p-92c7cf33.entry.js +0 -1
  243. package/dist/web-components/p-Da7qOBFr.js +0 -2
  244. package/dist/web-components/p-a7d22c76.entry.js +0 -1
  245. package/dist/web-components/p-b96d59ca.entry.js +0 -1
  246. package/dist/web-components/p-b98ab649.entry.js +0 -1
  247. package/dist/web-components/p-ba801820.entry.js +0 -1
  248. package/dist/web-components/p-bfc8c077.entry.js +0 -1
  249. package/dist/web-components/p-c05b05da.entry.js +0 -1
  250. package/dist/web-components/p-c1e748f2.entry.js +0 -1
  251. package/dist/web-components/p-d433a828.entry.js +0 -1
  252. package/dist/web-components/p-d819c8e5.entry.js +0 -1
  253. package/dist/web-components/p-e4dc60f0.entry.js +0 -1
  254. package/dist/web-components/p-f7adb875.entry.js +0 -1
  255. package/dist/collection/components/icon/{icon-data.js → data.js} +0 -0
  256. package/dist/types/components/icon/{icon-data.d.ts → data.d.ts} +1 -1
@@ -71,8 +71,36 @@ export class RadioGroup {
71
71
  this.contributeToFormData = (event) => {
72
72
  appendControlToFormData(this.host, event.formData);
73
73
  };
74
+ /**
75
+ * Handles parent radio group value changes for nested groups.
76
+ * If this is a nested group with a parentValue specified, it will reset when
77
+ * the parent group's value changes to something other than the parentValue.
78
+ */
79
+ this.onParentGroupChange = (event) => {
80
+ // Only proceed if this group has a parentValue specified (indicating it's nested)
81
+ if (!this.parentValue)
82
+ return;
83
+ const parentNewValue = event.detail.value;
84
+ // If parent changed to a different value than our parentValue, reset this nested group
85
+ if (parentNewValue !== this.parentValue) {
86
+ this.clearValue();
87
+ // Emit rReset event to notify that the nested group was automatically reset
88
+ this.rReset.emit({
89
+ element: this.host,
90
+ value: null
91
+ });
92
+ }
93
+ };
74
94
  }
75
95
  rChangeAction(event) {
96
+ // Only handle events from direct children, not from nested radio-groups
97
+ const targetElement = event.target;
98
+ const isDirectChild = targetElement.parentElement === this.host;
99
+ if (!isDirectChild) {
100
+ return; // Ignore events from nested radio-groups
101
+ }
102
+ // Stop event from bubbling to parent radio-groups
103
+ event.stopPropagation();
76
104
  this.resetValidity();
77
105
  this.setValue(event.detail.value);
78
106
  }
@@ -82,6 +110,14 @@ export class RadioGroup {
82
110
  * to their initial values.
83
111
  */
84
112
  radioButtonClickAction(event) {
113
+ // Only handle events from direct children, not from nested radio-groups
114
+ const targetElement = event.target;
115
+ const isDirectChild = targetElement.parentElement === this.host;
116
+ if (!isDirectChild) {
117
+ return; // Ignore events from nested radio-groups
118
+ }
119
+ // Stop event from bubbling to parent radio-groups
120
+ event.stopPropagation();
85
121
  !event.target.disabled && event.target.select();
86
122
  }
87
123
  get selectedIndex() {
@@ -93,6 +129,7 @@ export class RadioGroup {
93
129
  return isnativeFirstElement || isNoSelected ? this.radioButtonElements.length - 1 : this.selectedIndex - 1;
94
130
  }
95
131
  get focusedRadioButtonEl() {
132
+ // Query all descendants to find focused element, but it will only be used for direct children
96
133
  return this.host.querySelector('r-radio-button.focused');
97
134
  }
98
135
  get focusedRadioButtonElIndex() {
@@ -108,6 +145,14 @@ export class RadioGroup {
108
145
  }
109
146
  radioButtonKeydownAction(event) {
110
147
  var _a;
148
+ // Only handle events from direct children, not from nested radio-groups
149
+ const targetElement = event.target;
150
+ const isDirectChild = targetElement.parentElement === this.host;
151
+ if (!isDirectChild) {
152
+ return; // Ignore events from nested radio-groups
153
+ }
154
+ // Stop event from bubbling to parent radio-groups
155
+ event.stopPropagation();
111
156
  switch (event.detail.code) {
112
157
  case 'ArrowUp':
113
158
  case 'ArrowLeft':
@@ -254,7 +299,8 @@ export class RadioGroup {
254
299
  return this.host.closest('form') || document.querySelector(`#${this.form}`) || null;
255
300
  }
256
301
  get radioButtonElements() {
257
- return this.host.querySelectorAll('r-radio-button:not([disabled]:not([disabled="false"]))');
302
+ // Use :scope > to only select direct children, excluding nested radio-group buttons
303
+ return this.host.querySelectorAll(':scope > r-radio-button:not([disabled]:not([disabled="false"]))');
258
304
  }
259
305
  get selectedRadioButtonElement() {
260
306
  return Array.from(this.radioButtonElements).find(el => el.checked || el.hasAttribute('checked')) || null;
@@ -292,6 +338,11 @@ export class RadioGroup {
292
338
  const el = this.nativeSelectedEl || this.nativeFirstEl;
293
339
  el === null || el === void 0 ? void 0 : el.setAttribute('tabindex', '0');
294
340
  }
341
+ get parentRadioGroup() {
342
+ var _a;
343
+ // Find the parent radio group element
344
+ return ((_a = this.host.parentElement) === null || _a === void 0 ? void 0 : _a.closest('r-radio-group')) || null;
345
+ }
295
346
  connectFormEventListeners() {
296
347
  var _a, _b, _c;
297
348
  (_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.addEventListener('formdata', this.contributeToFormData);
@@ -304,11 +355,28 @@ export class RadioGroup {
304
355
  (_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.removeEventListener('reset', this.onResetForm);
305
356
  (_c = this.parentFormEl) === null || _c === void 0 ? void 0 : _c.removeEventListener('submit', this.onSubmitForm);
306
357
  }
358
+ connectParentGroupListener() {
359
+ // Only connect if this is a nested group (has parentValue specified)
360
+ if (this.parentValue && this.parentRadioGroup) {
361
+ this.parentRadioGroup.addEventListener('rChange', this.onParentGroupChange);
362
+ }
363
+ }
364
+ disconnectParentGroupListener() {
365
+ if (this.parentValue && this.parentRadioGroup) {
366
+ this.parentRadioGroup.removeEventListener('rChange', this.onParentGroupChange);
367
+ }
368
+ }
369
+ get ariaDescribedBy() {
370
+ const messageId = `${this.uniqueId}-message`;
371
+ return this.hint ? `${this.uniqueId}-hint ${messageId}` : messageId;
372
+ }
307
373
  connectedCallback() {
308
374
  this.connectFormEventListeners();
375
+ this.connectParentGroupListener();
309
376
  }
310
377
  disconnectedCallback() {
311
378
  this.disconnectFormEventListeners();
379
+ this.disconnectParentGroupListener();
312
380
  }
313
381
  componentWillLoad() {
314
382
  const { required, name } = this;
@@ -323,18 +391,23 @@ export class RadioGroup {
323
391
  this.passPropsToGroupItems({ name, required });
324
392
  this.setTabindex();
325
393
  if (this.autofocus) {
326
- queueMicrotask(() => {
394
+ // Use setTimeout to ensure setValue has completed and checked state is synced
395
+ setTimeout(() => {
327
396
  this.setFocus();
328
- });
397
+ }, 0);
329
398
  }
330
399
  }
331
400
  render() {
332
401
  const { label, hint, fieldIndicator, error, uniqueId, invalid } = this;
333
- return (h(Host, { key: '598a714f75ce283c76278d52fb7684c5818700f9' }, h("div", { key: '0c691e6738d11dcc8b621fe90b356980944ce5ec', class: "r-radio-group", onClick: this.onLabelClick }, label &&
334
- h("div", { key: '3071e2dedc5e9935bd6f80cc3e01883d8bffacc6', class: "r-radio-group--label-container" }, h("r-label", { key: '6175d4620468c3d2b06790baf11673c47e797bd7', id: `${uniqueId}-label`, class: "r-radio-group--label", "field-indicator": fieldIndicator }, label), h("slot", { key: '9c3595a94234b99bec2001c9667c53cd41d8fdde', name: "popover" })), hint &&
335
- h("r-hint", { key: '8d9ef5dbaacac8a9cae05a633c942c8009b3d686', id: `${uniqueId}-hint`, class: "r-radio-group--hint", role: "note" }, hint), h("div", { key: '9206c8f841cc20ee632f58da3775e1d967730c58', class: "r-radio-group--content" }, h("slot", { key: '1f7edd0e36e16956acf7dbe5dd17c16a43b39666' }))), invalid && error &&
336
- h("r-hint", { key: 'e4780947cede5a39e553d639eb37aeb842f1cda3', "aria-live": "polite", id: `${uniqueId}-message`, role: "alert", variant: "error" }, error), this.validityState !== 'valid' && this.validityMessage &&
337
- h("r-hint", { key: '4c9867129f7da323cc9e99b350332ac1d5740a0e', "aria-live": "polite", id: `${uniqueId}-message`, role: "alert", variant: "error" }, this.customErrorMessage || this.validityMessage)));
402
+ const fieldsetAttrs = {
403
+ 'aria-invalid': `${invalid || false}`,
404
+ 'aria-describedby': this.ariaDescribedBy
405
+ };
406
+ return (h(Host, { key: 'bd1b1d42f3efab78cf0a2cce7b1a1e2568f21765' }, h("fieldset", Object.assign({ key: 'c449667b014cf8aeea4176b0d94c82573b661182', class: "r-radio-group" }, fieldsetAttrs, { onClick: this.onLabelClick }), label &&
407
+ h("legend", { key: '212e27fd8d20b31cf6d84078870ec59796bb59c6', class: "r-radio-group--label-container" }, h("r-label", { key: '69907b0e2bdb49bcdea00d1849bc0c5c4d3404ae', id: `${uniqueId}-label`, class: "r-radio-group--label", "field-indicator": fieldIndicator }, label), h("slot", { key: 'd208c147248154ba26ecc5b412233d2cf479bb68', name: "popover" })), hint &&
408
+ h("r-hint", { key: 'b409e053226d88ac3619524b2d63864b49972985', id: `${uniqueId}-hint`, class: "r-radio-group--hint", role: "note" }, hint), h("div", { key: 'c8e98214e9b14f6fdcf97677b392abd14d653a56', class: "r-radio-group--content" }, h("slot", { key: '5e4aa07801e8f1bd7ec3262511d28f553d8740a7' })), h("div", { key: 'a576e8c91d33877eb677d5551ac18d10924586fd', id: `${uniqueId}-message`, "aria-live": "polite", role: "alert", class: "r-radio-group--message" }, invalid && error &&
409
+ h("r-hint", { key: '98f7fa6855c0803ae5d31a3a248c146679204af9', variant: "error" }, error), this.validityState !== 'valid' && this.validityMessage &&
410
+ h("r-hint", { key: 'de1997af842a7e5fdb887a830fd0fe701e4fa5ce', variant: "error" }, this.customErrorMessage || this.validityMessage)))));
338
411
  }
339
412
  static get is() { return "r-radio-group"; }
340
413
  static get encapsulation() { return "shadow"; }
@@ -642,6 +715,25 @@ export class RadioGroup {
642
715
  "setter": false,
643
716
  "reflect": false,
644
717
  "defaultValue": "false"
718
+ },
719
+ "parentValue": {
720
+ "type": "string",
721
+ "attribute": "parent-value",
722
+ "mutable": false,
723
+ "complexType": {
724
+ "original": "string",
725
+ "resolved": "string",
726
+ "references": {}
727
+ },
728
+ "required": false,
729
+ "optional": true,
730
+ "docs": {
731
+ "tags": [],
732
+ "text": "For nested radio groups: specifies the parent radio button value that this nested group belongs to.\nWhen the parent group's value changes to a different value, this nested group will be automatically reset.\nThis ensures nested selections are only maintained when their parent context is active."
733
+ },
734
+ "getter": false,
735
+ "setter": false,
736
+ "reflect": false
645
737
  }
646
738
  };
647
739
  }
@@ -445,7 +445,9 @@ export class Select {
445
445
  if (!this.isExpanded)
446
446
  return;
447
447
  e.stopPropagation();
448
- if (!this.host.contains(e.target)) {
448
+ const path = e.composedPath ? e.composedPath() : [];
449
+ const isInsideSelect = path.includes(this.host);
450
+ if (!isInsideSelect) {
449
451
  this.collapse();
450
452
  this.reportValidity();
451
453
  }
@@ -1080,8 +1082,8 @@ export class Select {
1080
1082
  disabled,
1081
1083
  required: isRequired
1082
1084
  };
1083
- return (h(Host, { key: '7f1fb8ee95b7da1cd7aad0d212d1efa9da744dc2', "data-value": this.currentValue, expanded: !this.disabled && this.isExpanded, "data-listbox-position": this.listboxPositionState, "data-initial-value": this.initial['value'], "data-is-placeholder": `${!!this.isPlaceholder}`, "data-value-focused": `${!!this.isValueFocused}`, "data-option-focused": `${!!this.focusedOption}`, "data-validity-state": `${this.validityState || ''}`, "data-validity-message": `${this.validityMessage || ''}`, "data-readonly": `${!!this.isReadonly}`, "data-touched": `${this.touched}`, "data-dirty": `${this.dirty}` }, h("div", { key: 'cb2a21da12f1f1c0dc298f42338d32b709f62375', class: `r-select--label ${!internal ? 'r-select--label__margin-bottom' : ''}` }, h("div", { key: 'd293ba41b9846d24ba4a2c44fb8fcb9895637c03', class: internal ? 'visually-hidden' : 'r-select--label-container' }, h("label", { key: 'b562d22174f435deed545a94d0fd7ce0233ba3de', id: `${uniqueId}-label`, onClick: this.isInteractive ? this.onValueClick : null }, h("r-label", Object.assign({ key: '2412f39f04b62a1fac018b588fb463efc9760ae0' }, labelAttr), label)), h("slot", { key: '99c5c78534118199fc1e99daac2737b78d55bc28', name: "popover" })), hint &&
1084
- h("r-hint", { key: '74f3cf98c25ba600e8faf8a1793d56ab14c01466', id: `${uniqueId}-hint`, class: "r-select--hint" }, hint)), h("div", { key: '1960780639c8896bc52d1b62269d9453645132ef', class: "r-select" }, h("select", Object.assign({ key: '2b9d75c37066bfeb8e06b4097ecc73bd96358702', class: "r-select--native", ref: el => this.nativeElement = el }, nativeAttrs)), h("div", { key: '3eff5f8f263a013e0ba7ba64eace1da6167b6d1f', class: "r-select--container" }, this.combobox ? this.renderCombobox(comboboxAttrs) : this.renderSelect(comboboxAttrs), h("div", Object.assign({ key: 'bbfb28e905d17feee0bd2693faac327d8ef97894', role: "listbox", tabindex: "-1", id: `${uniqueId}-list`, class: "r-select--options", ref: el => this.listboxElement = el }, listboxAttrs), (this.isNoResultsFound || !((_a = this.optionElements) === null || _a === void 0 ? void 0 : _a.length)) && h("r-select-option", { key: '319993c58f2133c271c2db357d22132497751958', "data-no-results": "true", value: "no_results" }, this.noResultsFound), h("slot", { key: 'bbb21659679bb22e3aeb9471a34e3e007ab835d8', onSlotchange: this.handleSlotChange })))), h("div", { key: '5971e5c4f3bbb453dcae9f3ecbdf2c2f14cf0293', id: `${uniqueId}-message`, "aria-live": "polite", "aria-atomic": "true", ref: (el) => this.messageContainer = el, class: this.hasMessage && !internal ? 'r-select--message' : 'visually-hidden' }, this.hasMessage && h("r-hint", { key: '1c1aba3c4f3baa93cd6ecab59dd40d99ad5bd0b2', variant: this.invalid ? 'error' : 'success' }, this.hasError && this.error, this.hasValidationError && this.validityMessage))));
1085
+ return (h(Host, { key: 'f52fa96bdacace6070cd2baa15f8fab939d05916', "data-value": this.currentValue, expanded: !this.disabled && this.isExpanded, "data-listbox-position": this.listboxPositionState, "data-initial-value": this.initial['value'], "data-is-placeholder": `${!!this.isPlaceholder}`, "data-value-focused": `${!!this.isValueFocused}`, "data-option-focused": `${!!this.focusedOption}`, "data-validity-state": `${this.validityState || ''}`, "data-validity-message": `${this.validityMessage || ''}`, "data-readonly": `${!!this.isReadonly}`, "data-touched": `${this.touched}`, "data-dirty": `${this.dirty}` }, h("div", { key: '80326d43674f8caac11678ca4d5a6ca8178f9454', class: `r-select--label ${!internal ? 'r-select--label__margin-bottom' : ''}` }, h("div", { key: '25fa25960350a338c7c9156d38c974c0ad8a0861', class: internal ? 'visually-hidden' : 'r-select--label-container' }, h("label", { key: 'b52ac4d91e32df39459492bbeaf166d2a71d165c', id: `${uniqueId}-label`, onClick: this.isInteractive ? this.onValueClick : null }, h("r-label", Object.assign({ key: 'ac75955086f424e781baf66e6853cbc89ec20d56' }, labelAttr), label)), h("slot", { key: '4cd953da5c64a473070ce4b8a3e5721a36561685', name: "popover" })), hint &&
1086
+ h("r-hint", { key: '2d6a2e9eae51d56f31886725274c637e76ab4d75', id: `${uniqueId}-hint`, class: "r-select--hint" }, hint)), h("div", { key: '8107a1d2475d11d6e827d7394ade84f9c4c85ea5', class: "r-select" }, h("select", Object.assign({ key: 'd7a60a4ff2f8f568da1ea90d859d5de78a1e73ef', class: "r-select--native", ref: el => this.nativeElement = el }, nativeAttrs)), h("div", { key: '9d49470c7e4cc179dfd93cb1233e2bbf86ac7641', class: "r-select--container" }, this.combobox ? this.renderCombobox(comboboxAttrs) : this.renderSelect(comboboxAttrs), h("div", Object.assign({ key: '9594f3439c7591a4e4ef359a205a55d1c56dbb80', role: "listbox", tabindex: "-1", id: `${uniqueId}-list`, class: "r-select--options", ref: el => this.listboxElement = el }, listboxAttrs), (this.isNoResultsFound || !((_a = this.optionElements) === null || _a === void 0 ? void 0 : _a.length)) && h("r-select-option", { key: 'ae0ef701ff3e7db4c17aba7d57265122c3bf6587', "data-no-results": "true", value: "no_results" }, this.noResultsFound), h("slot", { key: '012fcee55283c7bc5a3230ff23b692eca33d853b', onSlotchange: this.handleSlotChange })))), h("div", { key: '94fc769d8eeb0bd92f1d12d553b033a3de9ad8dc', id: `${uniqueId}-message`, "aria-live": "polite", "aria-atomic": "true", ref: (el) => this.messageContainer = el, class: this.hasMessage && !internal ? 'r-select--message' : 'visually-hidden' }, this.hasMessage && h("r-hint", { key: '881e60130bd3cbc9004aacbb027911357286a516', variant: this.invalid ? 'error' : 'success' }, this.hasError && this.error, this.hasValidationError && this.validityMessage))));
1085
1087
  }
1086
1088
  static get is() { return "r-select"; }
1087
1089
  static get encapsulation() { return "shadow"; }
@@ -128,7 +128,7 @@ export class SelectOption {
128
128
  size: iconSize,
129
129
  color: iconColor
130
130
  };
131
- return (h(Host, { key: 'd059d75cec11ef39ddea8c4ddc9ce8bc9d1a57e7', id: uniqueId, role: "option", onClick: this.handleClick, onKeydown: this.handleKeydown, "aria-disabled": `${disabled}`, "aria-selected": `${this.isSelected}`, "data-value": this.definedValue, "data-focused": `${this.isFocused}` }, h("div", { key: '70fa5c2fc9194d197b4124b6afad296d2849032c', class: "r-select-option" }, icon && h("span", { key: '07bdfeb2d8330c989e6b59c34ee85cac029135cb', class: "r-select-option--icon" }, h("r-icon", Object.assign({ key: '358748199ca580e8a9d397ed4f5642a722703441' }, iconAttributes))), !icon && hasIconSlot && h("span", { key: '60a4e6059188b27d0fbe6e9b0134882cea803d90', class: "r-select-option--icon" }, h("slot", { key: '08b11beec2c086b21ab92ad6cab080bae1cd0eac', name: "icon" })), h("span", { key: '4397696c7b8ec172098d9bd82e0c89c55781bb91', class: "r-select-option--label" }, h("slot", { key: 'b9dddec8b9c455f130ed38577c9321cb6aced0dd' })))));
131
+ return (h(Host, { key: 'd75c7a753d325360d4bee79ef7b96fbedd2d9b96', id: uniqueId, role: "option", onClick: this.handleClick, onKeydown: this.handleKeydown, "aria-disabled": `${disabled}`, "aria-selected": `${this.isSelected}`, "data-value": this.definedValue, "data-focused": `${this.isFocused}` }, h("div", { key: '8d8d449a5352f90d7731df10ea011856537b02f4', class: "r-select-option" }, icon && h("span", { key: 'f74192805472c8023b921f0a2869772f4c007d78', class: "r-select-option--icon" }, h("r-icon", Object.assign({ key: '6ac112921c222e83df33b2cf0113f3b158a98407' }, iconAttributes))), !icon && hasIconSlot && h("span", { key: '8c5779ab3446a8d4b8880bf1f9958f02d32ca5e4', class: "r-select-option--icon" }, h("slot", { key: '05647b1a0f7fb6f3c996461a825d8d60bb966b50', name: "icon" })), h("span", { key: 'a4de330d788288995da81cd7cbe7a9f8e9ba44c0', class: "r-select-option--label" }, h("slot", { key: '2cb6ac3d005a3bf9b75b0c23d27cbf1930bc15cc' })))));
132
132
  }
133
133
  static get is() { return "r-select-option"; }
134
134
  static get encapsulation() { return "shadow"; }
@@ -5,7 +5,7 @@ export class SkipLink {
5
5
  this.position = 'center';
6
6
  }
7
7
  render() {
8
- return (h(Host, { key: '5097cfa89ded56bcfb98dc24ca0b1e42c389e4ae' }, h("slot", { key: 'bba803efc4b82b0612e270665d5f80b740a786f1' })));
8
+ return (h(Host, { key: '08280b6003ccf78bf96eba9778fd3ddcaebc8947' }, h("slot", { key: '7808e8156601912e0192fe0b74bdedda2c359e1c' })));
9
9
  }
10
10
  static get is() { return "r-skip-link"; }
11
11
  static get encapsulation() { return "shadow"; }
@@ -1,6 +1,9 @@
1
1
  .r-stepper {
2
2
  display: var(--r-stepper--display, flex);
3
3
  align-items: var(--r-stepper--align-items, top);
4
+ list-style-type: var(--r-stepper--list-style-type, none);
5
+ padding: var(--r-stepper--padding, 0);
6
+ margin: var(--r-stepper--margin, 0);
4
7
  }
5
8
  .r-stepper > r-stepper-item,
6
9
  .r-stepper ::slotted(r-stepper-item) {
@@ -17,6 +20,6 @@
17
20
  position: var(--r-stepper-divider--position, relative);
18
21
  width: var(--r-stepper-divider--width, 100%);
19
22
  height: var(--r-stepper-divider--height, 1px);
20
- top: var(--r-stepper-divider--top, 10px);
23
+ top: var(--r-stepper-divider--top, 0.625rem);
21
24
  background-color: var(--r-stepper-divider--background-color, var(--r-text-regular, #282828));
22
25
  }
@@ -1,17 +1,87 @@
1
1
  import { h, Host } from "@stencil/core";
2
+ const OFFSET = 20;
2
3
  export class Stepper {
3
4
  constructor() {
4
5
  /** Complete steps. Default value 0 */
5
6
  this.completed = 0;
6
7
  /** _DEPRECATED_ (use `completed` instead) Completed steps. Default value 0 */
7
8
  this.completeSteps = 0;
9
+ /** Label for completed steps for screen reader users. */
10
+ this.completedStepsLabel = 'Completed';
11
+ this.handleSlotChange = () => {
12
+ this.setStepStatus();
13
+ this.updateVisibilityOfStepText();
14
+ };
15
+ }
16
+ handleCompletedStepsLabelChange() {
17
+ this.setStepStatus();
18
+ }
19
+ onResize() {
20
+ this.updateVisibilityOfStepText();
8
21
  }
9
22
  get hasSteps() {
10
23
  return this.host.querySelectorAll('r-stepper-item').length > 0;
11
24
  }
25
+ componentDidLoad() {
26
+ this.setStepStatus();
27
+ this.updateVisibilityOfStepText();
28
+ }
29
+ setStepStatus() {
30
+ var _a;
31
+ const innerSteps = ((_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('r-stepper-item')) || [];
32
+ const slotSteps = this.host.querySelectorAll('r-stepper-item') || [];
33
+ const allSteps = [...Array.from(innerSteps), ...Array.from(slotSteps)];
34
+ allSteps === null || allSteps === void 0 ? void 0 : allSteps.forEach((step) => {
35
+ const existingSpan = step.querySelector('.visually-hidden');
36
+ if (existingSpan) {
37
+ existingSpan.remove();
38
+ }
39
+ const span = document.createElement('span');
40
+ span.className = 'visually-hidden';
41
+ span.textContent = `${step.complete ? `${this.completedStepsLabel}.` : ''}`;
42
+ step.prepend(span);
43
+ });
44
+ }
45
+ getTextElementWidth(stepElement) {
46
+ var _a;
47
+ const textElement = (_a = stepElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.r-stepper-item--text');
48
+ if (!textElement)
49
+ return 0;
50
+ // Temporarily remove visually-hidden to get the natural width
51
+ const wasHidden = textElement.classList.contains('visually-hidden');
52
+ if (wasHidden) {
53
+ textElement.classList.remove('visually-hidden');
54
+ }
55
+ const width = textElement.offsetWidth;
56
+ // Restore the previous state
57
+ if (wasHidden) {
58
+ textElement.classList.add('visually-hidden');
59
+ }
60
+ return width;
61
+ }
62
+ updateVisibilityOfStepText() {
63
+ const slotSteps = this.host.querySelectorAll('r-stepper-item') || [];
64
+ let totalWidth = 0;
65
+ slotSteps.forEach((step) => {
66
+ totalWidth += this.getTextElementWidth(step) + OFFSET;
67
+ });
68
+ const isOverflowing = totalWidth >= this.host.offsetWidth;
69
+ if (isOverflowing) {
70
+ slotSteps.forEach((step) => {
71
+ var _a;
72
+ (_a = step.shadowRoot.querySelector('.r-stepper-item--text')) === null || _a === void 0 ? void 0 : _a.classList.add('visually-hidden');
73
+ });
74
+ }
75
+ else {
76
+ slotSteps.forEach((step) => {
77
+ var _a;
78
+ (_a = step.shadowRoot.querySelector('.r-stepper-item--text')) === null || _a === void 0 ? void 0 : _a.classList.remove('visually-hidden');
79
+ });
80
+ }
81
+ }
12
82
  render() {
13
83
  const completed = this.completed || this.completeSteps;
14
- return (h(Host, { key: '196ddb8922499f7222418d19cd6ddc994c211119' }, h("div", { key: '2220fcb8ec2125a15db198ec7948780d8d331e50', class: "r-stepper" }, !this.hasSteps && Array.from({ length: this.total }, (_, index) => (h("r-stepper-item", { number: index + 1, complete: completed > index, active: completed === index, key: index }))), h("slot", { key: '69c7eb87d53b67b19efc6da0ab489debc7e6b06c' }))));
84
+ return (h(Host, { key: '9a8684fe78d610b90c824a8bd06371efc222b94a' }, h("ol", { key: '89c37db27cab79946f29e5302784f3a17c853cef', class: "r-stepper", "aria-label": this.label || null }, !this.hasSteps && Array.from({ length: this.total }, (_, index) => (h("r-stepper-item", { number: index + 1, complete: completed > index, active: completed === index, key: index }))), h("slot", { key: '92d043648fb9c12ca5222a569ec40a917798af5a', onSlotchange: this.handleSlotChange }))));
15
85
  }
16
86
  static get is() { return "r-stepper"; }
17
87
  static get encapsulation() { return "shadow"; }
@@ -85,8 +155,62 @@ export class Stepper {
85
155
  "getter": false,
86
156
  "setter": false,
87
157
  "reflect": false
158
+ },
159
+ "label": {
160
+ "type": "string",
161
+ "attribute": "label",
162
+ "mutable": false,
163
+ "complexType": {
164
+ "original": "string",
165
+ "resolved": "string",
166
+ "references": {}
167
+ },
168
+ "required": false,
169
+ "optional": true,
170
+ "docs": {
171
+ "tags": [],
172
+ "text": "Label for the stepper for screen reader users."
173
+ },
174
+ "getter": false,
175
+ "setter": false,
176
+ "reflect": true
177
+ },
178
+ "completedStepsLabel": {
179
+ "type": "string",
180
+ "attribute": "completed-steps-label",
181
+ "mutable": false,
182
+ "complexType": {
183
+ "original": "string",
184
+ "resolved": "string",
185
+ "references": {}
186
+ },
187
+ "required": false,
188
+ "optional": true,
189
+ "docs": {
190
+ "tags": [],
191
+ "text": "Label for completed steps for screen reader users."
192
+ },
193
+ "getter": false,
194
+ "setter": false,
195
+ "reflect": true,
196
+ "defaultValue": "'Completed'"
88
197
  }
89
198
  };
90
199
  }
91
200
  static get elementRef() { return "host"; }
201
+ static get watchers() {
202
+ return [{
203
+ "propName": "completedStepsLabel",
204
+ "methodName": "handleCompletedStepsLabelChange"
205
+ }];
206
+ }
207
+ static get listeners() {
208
+ return [{
209
+ "name": "resize",
210
+ "method": "onResize",
211
+ "target": "window",
212
+ "capture": false,
213
+ "passive": true
214
+ }];
215
+ }
92
216
  }
@@ -12,22 +12,35 @@
12
12
  --r-stepper-item--indicator--border-color: transparent;
13
13
  }
14
14
 
15
+ ::slotted(.visually-hidden),
16
+ [data-visually-hidden-only=true],
17
+ .visually-hidden {
18
+ position: absolute;
19
+ width: 1px;
20
+ height: 1px;
21
+ padding: 0;
22
+ margin: -1px;
23
+ overflow: hidden;
24
+ clip: rect(0, 0, 0, 0);
25
+ border: 0;
26
+ }
27
+
15
28
  .r-stepper-item {
16
29
  display: var(--r-stepper-item--display, flex);
17
30
  flex-direction: var(--r-stepper-item--flex-direction, column);
18
31
  align-items: var(--r-stepper-item--align-items, center);
19
32
  justify-content: var(--r-stepper-item--justify-content, center);
20
- font-size: var(--r-stepper-item--font-size, var(--r-font-size-200, 13px));
33
+ font-size: var(--r-stepper-item--font-size, var(--r-font-size-200, 0.8125rem));
21
34
  color: var(--r-stepper-item--color, var(--r-text-regular, #282828));
22
35
  font-family: var(--r-stepper-item--font-family, var(--r-font-family-text, system-ui));
23
- width: var(--r-stepper-item--width, 36px);
36
+ width: var(--r-stepper-item--width, var(--r-spacing-225, 2.25rem));
24
37
  white-space: var(--r-stepper-item--white-space, nowrap);
25
- gap: var(--r-stepper-item--gap, 8px);
38
+ gap: var(--r-stepper-item--gap, var(--r-spacing-100, 0.5rem));
26
39
  }
27
40
  .r-stepper-item--indicator {
28
- width: var(--r-stepper-item--indicator--width, 20px);
29
- height: var(--r-stepper-item--indicator--height, 20px);
30
- line-height: var(--r-stepper-item--indicator--line-height, 20px);
41
+ width: var(--r-stepper-item--indicator--width, var(--r-spacing-125, 1.25rem));
42
+ height: var(--r-stepper-item--indicator--height, var(--r-spacing-125, 1.25rem));
43
+ line-height: var(--r-stepper-item--indicator--line-height, var(--r-spacing-125, 1.25rem));
31
44
  border-radius: var(--r-stepper-item--indicator--border-radius, 50%);
32
45
  background-color: var(--r-stepper-item--indicator--background-color, transparent);
33
46
  display: var(--r-stepper-item--indicator--display, flex);
@@ -36,14 +49,14 @@
36
49
  border-width: var(--r-stepper-item--indicator--border-width, 1px);
37
50
  border-style: var(--r-stepper-item--indicator--border-style, solid);
38
51
  border-color: var(--r-stepper-item--indicator--border-color, var(--r-text-regular, #282828));
39
- margin-left: var(--r-stepper-item--indicator--margin-left, 8px);
40
- margin-right: var(--r-stepper-item--indicator--margin-right, 8px);
52
+ margin-left: var(--r-stepper-item--indicator--margin-left, var(--r-spacing-100, 0.5rem));
53
+ margin-right: var(--r-stepper-item--indicator--margin-right, var(--r-spacing-100, 0.5rem));
41
54
  }
42
55
  .r-stepper-item--indicator--step-number {
43
56
  vertical-align: var(--r-stepper-item--step-number--vertical-align, middle);
44
57
  }
45
58
  .r-stepper-item--text {
46
- font-size: var(--r-stepper-item--text--font-size, var(--r-font-size-200, 13px));
59
+ font-size: var(--r-stepper-item--text--font-size, var(--r-font-size-200, 0.8125rem));
47
60
  color: var(--r-stepper-item--text--color, var(--r-text-regular, #282828));
48
61
  text-align: var(--r-stepper-item--text--text-align, center);
49
62
  }
@@ -6,13 +6,28 @@ export class StepperItem {
6
6
  /** Defines a property active that determines whether the step is active */
7
7
  this.active = false;
8
8
  }
9
+ /**
10
+ * Checks if the slot contains only visually-hidden elements (no visible text).
11
+ * Returns true if only visually-hidden elements are present.
12
+ */
13
+ get hasOnlyVisuallyHiddenContent() {
14
+ var _a;
15
+ const textContent = ((_a = this.host.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || '';
16
+ const visuallyHiddenElement = this.host.querySelector('.visually-hidden');
17
+ if (!visuallyHiddenElement) {
18
+ return false;
19
+ }
20
+ const visuallyHiddenText = visuallyHiddenElement.textContent || '';
21
+ const remainingText = textContent.replace(visuallyHiddenText.trim(), '').trim();
22
+ return !remainingText.length;
23
+ }
9
24
  get hasText() {
10
25
  return this.host.textContent.trim().length > 0;
11
26
  }
12
27
  render() {
13
28
  const number = this.number || this.stepNumber;
14
- return (h(Host, { key: '3613c92e8ac7583bf5e3db7e90edca9a921fa475' }, h("div", { key: 'ca2c38443d9a855baea829e99ec9c642c279a3be', class: "r-stepper-item" }, h("div", { key: '513f01a9a3ac3a87c3622b14f051765121308241', class: "r-stepper-item--indicator" }, this.complete ? (h("r-icon", { name: "check", size: "s" })) : this.icon ? (h("r-icon", { name: this.icon, size: "s" })) : number !== undefined ? (h("span", { class: "r-stepper-item--indicator--step-number" }, number)) : null), this.hasText &&
15
- h("div", { key: 'cec8659e5ff31608b05c6f62798a8a1048cd7539', class: "r-stepper-item--text" }, h("slot", { key: '6a9d581948decc8a15e66401275cb85bf52bb459' })))));
29
+ return (h(Host, { key: '4f55b5491ec5eee7cad6313fa85e7d6cc89b2178', role: "listitem", "aria-current": this.active ? 'step' : null }, h("div", { key: '2864f0e19f2f11af0f8674b9a701cd948024c085', class: "r-stepper-item" }, h("div", { key: 'de896ec98a13a4b20965a3ca58c5517a30de1f74', class: "r-stepper-item--indicator" }, this.complete ? (h("r-icon", { name: "check", size: "s" })) : this.icon ? (h("r-icon", { name: this.icon, iconAriaLabel: this.label, size: "s" })) : number !== undefined ? (h("span", { "aria-hidden": `${!this.hasOnlyVisuallyHiddenContent}`, class: "r-stepper-item--indicator--step-number" }, number)) : null), this.hasText &&
30
+ h("div", { key: 'cf3b6b5e3f4454830ecce06a6b6c16225aadd93e', "data-visually-hidden-only": `${this.hasOnlyVisuallyHiddenContent}`, class: "r-stepper-item--text" }, h("slot", { key: '65bd1f231c445f9681750c71ef156297edbf05fb' })))));
16
31
  }
17
32
  static get is() { return "r-stepper-item"; }
18
33
  static get encapsulation() { return "shadow"; }
@@ -130,6 +145,25 @@ export class StepperItem {
130
145
  "getter": false,
131
146
  "setter": false,
132
147
  "reflect": true
148
+ },
149
+ "label": {
150
+ "type": "string",
151
+ "attribute": "label",
152
+ "mutable": false,
153
+ "complexType": {
154
+ "original": "string",
155
+ "resolved": "string",
156
+ "references": {}
157
+ },
158
+ "required": false,
159
+ "optional": true,
160
+ "docs": {
161
+ "tags": [],
162
+ "text": "Label for the step icon for screen reader users."
163
+ },
164
+ "getter": false,
165
+ "setter": false,
166
+ "reflect": true
133
167
  }
134
168
  };
135
169
  }
@@ -43,9 +43,9 @@ export class RTab {
43
43
  'aria-selected': `${active}`,
44
44
  'aria-disabled': `${disabled}`
45
45
  };
46
- return (h(Host, Object.assign({ key: '619d576a8efdfa1f941be9760312d7254a922f10', onClick: this.handleClick, onKeyUp: this.handleKeyup, onKeyDown: this.handleKeydown }, hostAttrs), h("span", { key: '15d69c67544bdb845df4b10411ff3e55fb5671a2', class: "r-tab" }, disabled ?
46
+ return (h(Host, Object.assign({ key: '270a02c942f223ef5ac0f9f83d33c51bfd88c1c7', onClick: this.handleClick, onKeyUp: this.handleKeyup, onKeyDown: this.handleKeydown }, hostAttrs), h("span", { key: '60bbf17ad69478028579b61d03ca316a55ce52ea', class: "r-tab" }, disabled ?
47
47
  h("r-icon", { class: "r-tab--disabled-icon", size: "s", name: "circle-slash" })
48
- : h("slot", { name: "icon" }), h("slot", { key: '59e5f0740a92f1cfeb71ab9709db2f2a13152fb4' }))));
48
+ : h("slot", { name: "icon" }), h("slot", { key: '5b0582bebdf14a0de908d23d2a08d80cf1850b50' }))));
49
49
  }
50
50
  static get is() { return "r-tab"; }
51
51
  static get encapsulation() { return "shadow"; }
@@ -12,7 +12,7 @@ export class RTabPanel {
12
12
  active,
13
13
  'aria-labelledby': tabId
14
14
  };
15
- return (h(Host, Object.assign({ key: 'db95a245a8aa8900e1cea5af71ac488352954299', class: "r-typography" }, hostAttrs), h("div", { key: '0e720978d72a9d9ba9da367794ac96c49737d854', class: "r-tab-panel" }, h("slot", { key: 'f16a0da6c7d3d2c1e0c57778837bdb47879468b4' }))));
15
+ return (h(Host, Object.assign({ key: 'f58718704b5625e82bfa531bcbf2b6c94c2e1ae3', class: "r-typography" }, hostAttrs), h("div", { key: '75dc2720b47da749a4d1e168e20338b94724a369', class: "r-tab-panel" }, h("slot", { key: '9710a7fc07751091c4ec0c97ae1d205ae540fdfd' }))));
16
16
  }
17
17
  static get is() { return "r-tab-panel"; }
18
18
  static get encapsulation() { return "shadow"; }
@@ -261,7 +261,7 @@ export class RTabs {
261
261
  this._changeFocusTab(e.target, e.detail.keycode);
262
262
  }
263
263
  render() {
264
- return (h(Host, { key: 'b058fd461951dad54e7eb73f7dc5df838c864ebd', class: "r-tabs" }, h("slot", { key: '8e93fded06f0f01dc326e8368aac200d36613753' })));
264
+ return (h(Host, { key: '0737bf78e596f8fb9d4a2ec10f1503d1072f2683', class: "r-tabs" }, h("slot", { key: '5bc87b17930c9ea159ef29335c6b11f0f4c7d43e' })));
265
265
  }
266
266
  static get is() { return "r-tabs"; }
267
267
  static get encapsulation() { return "shadow"; }
@@ -158,9 +158,9 @@ export class RTabsList {
158
158
  (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
159
159
  }
160
160
  render() {
161
- return (h(Host, { key: '8191b15343491c66259b583930ee73916c6bbd9e', scrollable: `${this.scrollable}`, role: "tablist" }, h("div", { key: 'e5c2a308889986b80549aba5b9a7bec8e6961891', class: "r-tabs-list" }, this.scrollable &&
162
- h("div", { key: '62e6abb4a9e5ff9c553162c6de4176c8ce4c0407', "aria-hidden": "true", class: "r-tabs-list--scroll-button-container" }, this.renderScrollButton('left', this.firstItemVisible, this.scrollLeft, this.scrollLeftTooltip), !this.firstItemVisible && h("div", { key: '62e5c2ca7e76323ff367940cd9ab1cb6e5b6db74', class: "r-tabs-list--scroll-indicator" })), h("div", { key: '5f0b264eb4abaf51d4e2f3a85a92d89ff9e378f5', class: "r-tabs-list--tabs-container", ref: (el) => this.containerRef = el, onScroll: this.updateScrollState }, h("slot", { key: '38f6060007491fa9b50cf7cf7d36372c32e63d97' })), this.scrollable &&
163
- h("div", { key: 'd51473735f550b81b5ba630126fe3bcc41848648', "aria-hidden": "true", class: "r-tabs-list--scroll-button-container" }, !this.lastItemVisible && h("div", { key: '89d712984dd7797cbca0df86989cf8eedcd95a61', class: "r-tabs-list--scroll-indicator" }), this.renderScrollButton('right', this.lastItemVisible, this.scrollRight, this.scrollRightTooltip)))));
161
+ return (h(Host, { key: '19666af123fe058aa3e654c153ad84ec16861a59', scrollable: `${this.scrollable}`, role: "tablist" }, h("div", { key: '5de7241f57b419133f81ae565bf517873a8e9268', class: "r-tabs-list" }, this.scrollable &&
162
+ h("div", { key: 'ff5edcbb61dd4ba9be3e0baf22822edbcbf8ec6d', "aria-hidden": "true", class: "r-tabs-list--scroll-button-container" }, this.renderScrollButton('left', this.firstItemVisible, this.scrollLeft, this.scrollLeftTooltip), !this.firstItemVisible && h("div", { key: '76fbeab529e2a7869ac7e946b1c0863969114888', class: "r-tabs-list--scroll-indicator" })), h("div", { key: 'd520b386242700c000daf85eba8d50fb014fc616', class: "r-tabs-list--tabs-container", ref: (el) => this.containerRef = el, onScroll: this.updateScrollState }, h("slot", { key: 'f8534275445ed4d32154519f0a8f592ee7ea3353' })), this.scrollable &&
163
+ h("div", { key: '8ca03d4864eba5af975de4dd6dc6fd3c3e8be108', "aria-hidden": "true", class: "r-tabs-list--scroll-button-container" }, !this.lastItemVisible && h("div", { key: '1a0534b79bbe3273a73f48530a3a17ccac0d7826', class: "r-tabs-list--scroll-indicator" }), this.renderScrollButton('right', this.lastItemVisible, this.scrollRight, this.scrollRightTooltip)))));
164
164
  }
165
165
  static get is() { return "r-tabs-list"; }
166
166
  static get encapsulation() { return "shadow"; }