@ds-autonomie/web-components 2.1.0 → 2.2.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 (168) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/cdn/chunks/{chunk.ZDLDKWEM.js → chunk.2APAO2OW.js} +1 -1
  3. package/cdn/chunks/{chunk.JTHUYIYP.js → chunk.2DJERWBI.js} +5 -5
  4. package/cdn/chunks/{chunk.QCSRN6TI.js → chunk.3JMBGIZN.js} +1 -1
  5. package/cdn/chunks/{chunk.Z2IR3WWE.js → chunk.4NC4QO64.js} +1 -1
  6. package/cdn/chunks/{chunk.OZEY33RC.js → chunk.5LXQ3RKQ.js} +2 -22
  7. package/cdn/chunks/{chunk.JSVJ7J76.js → chunk.6QTMZJGH.js} +1 -1
  8. package/cdn/chunks/{chunk.6E6G25TQ.js → chunk.A33BZOMA.js} +1 -1
  9. package/cdn/chunks/{chunk.LRMXGBIU.js → chunk.ATHAYO6A.js} +155 -4
  10. package/cdn/chunks/{chunk.Z6DEWBVS.js → chunk.C62MMBV4.js} +10 -0
  11. package/cdn/chunks/{chunk.5AFQZ4HE.js → chunk.CYMM2ZAV.js} +6 -0
  12. package/cdn/chunks/chunk.F7NUIVDV.js +10 -0
  13. package/cdn/chunks/{chunk.OVD3Q2LV.js → chunk.FHOCNAJ4.js} +5 -2
  14. package/cdn/chunks/{chunk.KTAPO27T.js → chunk.HYTYRM6S.js} +1 -1
  15. package/cdn/chunks/{chunk.S4BW7KNM.js → chunk.J73YJOU4.js} +1 -1
  16. package/cdn/chunks/chunk.KELDA33H.js +198 -0
  17. package/cdn/chunks/{chunk.R6BGXKHX.js → chunk.LNBAAP45.js} +1 -1
  18. package/cdn/chunks/{chunk.MEYHIAQ5.js → chunk.M7QHADJH.js} +5 -1
  19. package/cdn/chunks/chunk.MJLKYERJ.js +348 -0
  20. package/cdn/chunks/chunk.PWL7QCVG.js +9 -0
  21. package/cdn/chunks/{chunk.Y5CXRULD.js → chunk.UAQ7MMLI.js} +1 -1
  22. package/cdn/chunks/{chunk.PMMQ5QVY.js → chunk.XQAKSW3W.js} +12 -1
  23. package/cdn/chunks/{chunk.NPJ5ZOJ4.js → chunk.YQQNMFZF.js} +20 -85
  24. package/cdn/chunks/{chunk.E4GNTJPS.js → chunk.YS6XV3LD.js} +1 -1
  25. package/cdn/components/checkbox/checkbox.d.ts +1 -0
  26. package/cdn/components/checkbox/checkbox.js +6 -1
  27. package/cdn/components/checkbox-button/checkbox-button.d.ts +1 -0
  28. package/cdn/components/checkbox-button/checkbox-button.js +1 -1
  29. package/cdn/components/checkbox-group/checkbox-group.d.ts +5 -8
  30. package/cdn/components/checkbox-group/checkbox-group.js +3 -5
  31. package/cdn/components/checkbox-group/checkbox-group.styles.js +1 -1
  32. package/cdn/components/combobox/combobox.d.ts +3 -2
  33. package/cdn/components/combobox/combobox.js +3 -2
  34. package/cdn/components/file-upload/file-upload.d.ts +3 -2
  35. package/cdn/components/filter-base/filter-base-stories.js +1 -1
  36. package/cdn/components/filter-counter/filter-counter.js +5 -4
  37. package/cdn/components/filter-date/filter-date.js +1 -1
  38. package/cdn/components/filter-range/filter-range.js +5 -4
  39. package/cdn/components/filter-select/filter-select.d.ts +5 -3
  40. package/cdn/components/filter-select/filter-select.js +8 -7
  41. package/cdn/components/input/input.js +5 -4
  42. package/cdn/components/input-date/input-date.js +4 -3
  43. package/cdn/components/input-mask/input-mask.js +3 -2
  44. package/cdn/components/input-otp/input-otp.d.ts +90 -0
  45. package/cdn/components/input-otp/input-otp.js +38 -0
  46. package/cdn/components/input-otp/input-otp.styles.d.ts +2 -0
  47. package/cdn/components/input-otp/input-otp.styles.js +11 -0
  48. package/cdn/components/input-otp/input-otp.utils.d.ts +3 -0
  49. package/cdn/components/input-otp/input-otp.utils.js +11 -0
  50. package/cdn/components/input-phone/input-phone.js +7 -6
  51. package/cdn/components/navbar-link/navbar-link.js +1 -1
  52. package/cdn/components/pagination/pagination.js +8 -7
  53. package/cdn/components/radio-button/radio-button.js +4 -4
  54. package/cdn/components/radio-group/radio-group.d.ts +3 -2
  55. package/cdn/components/radio-group/radio-group.js +3 -3
  56. package/cdn/components/select/select.d.ts +4 -2
  57. package/cdn/components/select/select.js +3 -2
  58. package/cdn/components/step/step.js +2 -1
  59. package/cdn/components/tab/tab.js +1 -1
  60. package/cdn/components/table-body/table-body.js +2 -2
  61. package/cdn/components/table-header-row/table-header-row.js +8 -5
  62. package/cdn/components/table-row/table-row.js +6 -1
  63. package/cdn/components/textarea/textarea.js +3 -2
  64. package/cdn/components/tree/tree.js +8 -3
  65. package/cdn/components/tree-item/tree-item.js +6 -1
  66. package/cdn/custom-elements.json +517 -41
  67. package/cdn/design-system.d.ts +2 -0
  68. package/cdn/design-system.js +111 -98
  69. package/cdn/internal/a11y-warning.d.ts +2 -0
  70. package/cdn/internal/a11y-warning.js +4 -0
  71. package/cdn/internal/components/date-field/date-field.js +6 -1
  72. package/cdn/internal/components/form-control/form-control-layout.js +6 -1
  73. package/cdn/themes/dsa-wc-theme.css +14 -0
  74. package/cdn/themes/dsa-wc-theme.min.css +1 -1
  75. package/cdn/themes/dsa-wc-theme.styles.js +14 -0
  76. package/cdn/utilities/storybook.js +1 -1
  77. package/cdn/vscode.html-custom-data.json +76 -7
  78. package/cdn/web-types.json +314 -35
  79. package/dist/chunks/chunk.5P2EEOC5.js +196 -0
  80. package/dist/chunks/{chunk.VOOE2BQV.js → chunk.6HR34L7E.js} +2 -22
  81. package/dist/chunks/{chunk.Y72CHU6D.js → chunk.6JHM36KH.js} +5 -1
  82. package/dist/chunks/{chunk.LKCPAJMF.js → chunk.B6LMEZTV.js} +5 -2
  83. package/dist/chunks/{chunk.OHPSPLZO.js → chunk.DDDHV2NU.js} +5 -5
  84. package/dist/chunks/{chunk.P4HRQ2D7.js → chunk.DHDRABMZ.js} +1 -1
  85. package/dist/chunks/chunk.F7NUIVDV.js +10 -0
  86. package/dist/chunks/{chunk.D3SHMAJT.js → chunk.H3FSR35C.js} +1 -1
  87. package/dist/chunks/{chunk.T4BUHP4L.js → chunk.I5HR7JYK.js} +10 -1
  88. package/dist/chunks/{chunk.NCECJWN7.js → chunk.KN6RQWYN.js} +1 -1
  89. package/dist/chunks/{chunk.JX7OISYA.js → chunk.KUYI27GJ.js} +186 -30
  90. package/dist/chunks/{chunk.ZGQUBAEK.js → chunk.L3LZ4MKX.js} +1 -1
  91. package/dist/chunks/{chunk.BXOGG3JO.js → chunk.LTCZARVI.js} +1 -1
  92. package/dist/chunks/{chunk.AF5WMYR2.js → chunk.MYSJOWY5.js} +1 -1
  93. package/dist/chunks/chunk.PWL7QCVG.js +9 -0
  94. package/dist/chunks/chunk.UDJJFUZ3.js +335 -0
  95. package/dist/chunks/{chunk.YXXLXJPE.js → chunk.UEWG3G4R.js} +6 -0
  96. package/dist/chunks/{chunk.WWANVBI5.js → chunk.UWGAOHHQ.js} +1 -1
  97. package/dist/chunks/{chunk.EGH3AVD7.js → chunk.VBW5RZBM.js} +1 -1
  98. package/dist/chunks/{chunk.XXHMFUD7.js → chunk.WRPRKCVY.js} +1 -1
  99. package/dist/chunks/{chunk.G422H4DZ.js → chunk.WUOMKASN.js} +10 -0
  100. package/dist/chunks/{chunk.ZYTDWH4E.js → chunk.XJMGXWLM.js} +20 -85
  101. package/dist/chunks/{chunk.6GN2WDDT.js → chunk.Y52TCF24.js} +1 -1
  102. package/dist/components/checkbox/checkbox.d.ts +1 -0
  103. package/dist/components/checkbox/checkbox.js +6 -1
  104. package/dist/components/checkbox-button/checkbox-button.d.ts +1 -0
  105. package/dist/components/checkbox-button/checkbox-button.js +1 -1
  106. package/dist/components/checkbox-group/checkbox-group.d.ts +5 -8
  107. package/dist/components/checkbox-group/checkbox-group.js +3 -4
  108. package/dist/components/checkbox-group/checkbox-group.styles.js +1 -1
  109. package/dist/components/combobox/combobox.d.ts +3 -2
  110. package/dist/components/combobox/combobox.js +3 -2
  111. package/dist/components/file-upload/file-upload.d.ts +3 -2
  112. package/dist/components/filter-base/filter-base-stories.js +1 -1
  113. package/dist/components/filter-counter/filter-counter.js +5 -4
  114. package/dist/components/filter-date/filter-date.js +1 -1
  115. package/dist/components/filter-range/filter-range.js +5 -4
  116. package/dist/components/filter-select/filter-select.d.ts +5 -3
  117. package/dist/components/filter-select/filter-select.js +8 -7
  118. package/dist/components/input/input.js +5 -4
  119. package/dist/components/input-date/input-date.js +4 -3
  120. package/dist/components/input-mask/input-mask.js +3 -2
  121. package/dist/components/input-otp/input-otp.d.ts +90 -0
  122. package/dist/components/input-otp/input-otp.js +31 -0
  123. package/dist/components/input-otp/input-otp.styles.d.ts +2 -0
  124. package/dist/components/input-otp/input-otp.styles.js +9 -0
  125. package/dist/components/input-otp/input-otp.utils.d.ts +3 -0
  126. package/dist/components/input-otp/input-otp.utils.js +11 -0
  127. package/dist/components/input-phone/input-phone.js +7 -6
  128. package/dist/components/navbar-link/navbar-link.js +1 -1
  129. package/dist/components/pagination/pagination.js +8 -7
  130. package/dist/components/radio-button/radio-button.js +4 -4
  131. package/dist/components/radio-group/radio-group.d.ts +3 -2
  132. package/dist/components/radio-group/radio-group.js +3 -3
  133. package/dist/components/select/select.d.ts +4 -2
  134. package/dist/components/select/select.js +3 -2
  135. package/dist/components/step/step.js +2 -1
  136. package/dist/components/tab/tab.js +1 -1
  137. package/dist/components/table-body/table-body.js +2 -2
  138. package/dist/components/table-header-row/table-header-row.js +7 -4
  139. package/dist/components/table-row/table-row.js +6 -1
  140. package/dist/components/textarea/textarea.js +3 -2
  141. package/dist/components/tree/tree.js +8 -3
  142. package/dist/components/tree-item/tree-item.js +6 -1
  143. package/dist/custom-elements.json +517 -41
  144. package/dist/design-system.d.ts +2 -0
  145. package/dist/design-system.js +111 -98
  146. package/dist/internal/a11y-warning.d.ts +2 -0
  147. package/dist/internal/a11y-warning.js +4 -0
  148. package/dist/internal/components/date-field/date-field.js +6 -1
  149. package/dist/internal/components/form-control/form-control-layout.js +6 -1
  150. package/dist/themes/dsa-wc-theme.css +14 -0
  151. package/dist/themes/dsa-wc-theme.min.css +1 -1
  152. package/dist/themes/dsa-wc-theme.styles.js +14 -0
  153. package/dist/utilities/storybook.js +1 -1
  154. package/dist/vscode.html-custom-data.json +76 -7
  155. package/dist/web-types.json +314 -35
  156. package/package.json +1 -1
  157. package/cdn/chunks/chunk.PS4PM6DJ.js +0 -164
  158. package/cdn/internal/test/disable-a11y-warnings.d.ts +0 -2
  159. package/cdn/internal/test/disable-a11y-warnings.js +0 -10
  160. package/dist/chunks/chunk.AYDVF4T3.js +0 -157
  161. package/dist/internal/test/disable-a11y-warnings.d.ts +0 -2
  162. package/dist/internal/test/disable-a11y-warnings.js +0 -10
  163. package/cdn/chunks/{chunk.PGT2WHXR.js → chunk.BCLU5KXE.js} +3 -3
  164. package/cdn/chunks/{chunk.COR7P3QG.js → chunk.NSE76EM5.js} +3 -3
  165. package/cdn/chunks/{chunk.P33HFS7T.js → chunk.V2UYRTUC.js} +3 -3
  166. package/dist/chunks/{chunk.WOV5QN3O.js → chunk.3OHVWJYG.js} +3 -3
  167. package/dist/chunks/{chunk.7BFH35RV.js → chunk.63MNXWSY.js} +3 -3
  168. package/dist/chunks/{chunk.MEPTPSE5.js → chunk.DUTPVTUZ.js} +3 -3
@@ -15,22 +15,6 @@ var checkbox_group_styles_default = css`
15
15
  display: block;
16
16
  }
17
17
 
18
- .visually-hidden {
19
- position: absolute;
20
- width: 1px;
21
- height: 1px;
22
- padding: 0;
23
- margin: -1px;
24
- overflow: hidden;
25
- clip: rect(0, 0, 0, 0);
26
- white-space: nowrap;
27
- border: 0;
28
- }
29
-
30
- .checkbox-group__default-slot {
31
- display: none;
32
- }
33
-
34
18
  .checkbox-group__list-container {
35
19
  display: inline-block;
36
20
  }
@@ -38,18 +22,14 @@ var checkbox_group_styles_default = css`
38
22
  gap: var(--dsa-spacing-8);
39
23
  }
40
24
 
41
- :not(.form-control--options-horizontal)
25
+ .form-control:not(.form-control--options-horizontal)
42
26
  .checkbox-group__list--checkbox-buttons {
43
27
  flex-wrap: wrap;
44
28
  min-width: 120px;
45
29
  max-width: 400px;
46
30
  }
47
31
 
48
- .checkbox-group__listitem {
49
- display: contents;
50
- }
51
-
52
- :not(form-control--options-horizontal) dsa-checkbox-button {
32
+ .form-control:not(.form-control--options-horizontal) dsa-checkbox-button {
53
33
  max-width: 400px;
54
34
  }
55
35
  `;
@@ -334,7 +334,11 @@ var DSAInternalDateField = class extends ShoelaceElement {
334
334
  this.formControlController.setValidity(this.disabled);
335
335
  }
336
336
  async handleValueChange() {
337
- if (this.value !== "") {
337
+ if (this.value === "") {
338
+ this.selectedDay = "";
339
+ this.selectedMonth = "";
340
+ this.selectedYear = "";
341
+ } else {
338
342
  this.selectedDay = `${new Date(this.value).getDate()}`.padStart(2, "0");
339
343
  this.selectedMonth = `${new Date(this.value).getMonth() + 1}`.padStart(
340
344
  2,
@@ -4,6 +4,9 @@ import {
4
4
  import {
5
5
  getStepIcon
6
6
  } from "./chunk.CCTWXABH.js";
7
+ import {
8
+ a11yWarning
9
+ } from "./chunk.PWL7QCVG.js";
7
10
  import {
8
11
  HasSlotController
9
12
  } from "./chunk.YIY5RM53.js";
@@ -88,8 +91,8 @@ var DSAStep = class extends ShoelaceElement {
88
91
  const isButton = this.clickable && !this.href;
89
92
  const tag = this.getTag();
90
93
  if (this.clickable && !hasTitle) {
91
- console.warn(
92
- "(DSA) When clickable, the `dsa-step` element must have either a `step-title` attribute or an elemennt in its `title` slot"
94
+ a11yWarning(
95
+ "When clickable, the `dsa-step` element must have either a `step-title` attribute or an elemennt in its `title` slot"
93
96
  );
94
97
  }
95
98
  return html`
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  DSASelect
3
- } from "./chunk.6GN2WDDT.js";
3
+ } from "./chunk.Y52TCF24.js";
4
+ import {
5
+ getPhoneConfig
6
+ } from "./chunk.65HTBW2L.js";
4
7
  import {
5
8
  input_phone_styles_default
6
9
  } from "./chunk.6QAB5TYJ.js";
@@ -13,12 +16,9 @@ import {
13
16
  rawValueToMaskedValue,
14
17
  stripSpecialChars
15
18
  } from "./chunk.7OLEA3GQ.js";
16
- import {
17
- getPhoneConfig
18
- } from "./chunk.65HTBW2L.js";
19
19
  import {
20
20
  FormControlLayout
21
- } from "./chunk.T4BUHP4L.js";
21
+ } from "./chunk.I5HR7JYK.js";
22
22
  import {
23
23
  defaultValue
24
24
  } from "./chunk.CMJ2SRTL.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.IPUOJRFA.js";
4
4
  import {
5
5
  FormControlLayout
6
- } from "./chunk.T4BUHP4L.js";
6
+ } from "./chunk.I5HR7JYK.js";
7
7
  import {
8
8
  defaultValue
9
9
  } from "./chunk.CMJ2SRTL.js";
@@ -0,0 +1,10 @@
1
+ // src/components/input-otp/input-otp.utils.ts
2
+ var REGEXP_ONLY_DIGITS = "^\\d*$";
3
+ var REGEXP_ONLY_LETTERS = "^[a-zA-Z]*$";
4
+ var REGEXP_ONLY_DIGITS_AND_LETTERS = "^[a-zA-Z0-9]*$";
5
+
6
+ export {
7
+ REGEXP_ONLY_DIGITS,
8
+ REGEXP_ONLY_LETTERS,
9
+ REGEXP_ONLY_DIGITS_AND_LETTERS
10
+ };
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk.VNFFOE7Z.js";
12
12
  import {
13
13
  FormControlLayout
14
- } from "./chunk.T4BUHP4L.js";
14
+ } from "./chunk.I5HR7JYK.js";
15
15
  import {
16
16
  defaultValue
17
17
  } from "./chunk.CMJ2SRTL.js";
@@ -1,3 +1,6 @@
1
+ import {
2
+ a11yWarning
3
+ } from "./chunk.PWL7QCVG.js";
1
4
  import {
2
5
  renderFormElementErrors
3
6
  } from "./chunk.IZBHR7GP.js";
@@ -15,6 +18,7 @@ import {
15
18
  import { html } from "lit";
16
19
  import { property } from "lit/decorators.js";
17
20
  import { classMap } from "lit/directives/class-map.js";
21
+ import { ifDefined } from "lit/directives/if-defined.js";
18
22
  var FormControlLayout = class extends ShoelaceElement {
19
23
  constructor() {
20
24
  super(...arguments);
@@ -51,6 +55,11 @@ var FormControlLayout = class extends ShoelaceElement {
51
55
  const hasHelpTextSlot = this.hasSlotController.test("help-text");
52
56
  const hasLabel = this.label ? true : !!hasLabelSlot;
53
57
  const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
58
+ if (!hasLabel) {
59
+ a11yWarning(
60
+ "Form controls require a label attribute or a label slot for accessibility"
61
+ );
62
+ }
54
63
  return html`
55
64
  <div
56
65
  part="form-control"
@@ -69,7 +78,7 @@ var FormControlLayout = class extends ShoelaceElement {
69
78
  part="form-control-label"
70
79
  class='form-control__label'
71
80
  for="input"
72
- aria-hidden=${hasLabel ? "false" : "true"}
81
+ aria-hidden=${ifDefined(hasLabel ? void 0 : "true")}
73
82
  >
74
83
  ${this.required ? html`<span class="form-control__label-required">*</span>` : ""}
75
84
  <slot name="label">${this.label}</slot>
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DSARadioGroup
3
- } from "./chunk.JX7OISYA.js";
3
+ } from "./chunk.KUYI27GJ.js";
4
4
  import {
5
5
  FormToggleButton
6
6
  } from "./chunk.GGXJ2MP3.js";
@@ -1,9 +1,12 @@
1
+ import {
2
+ radio_group_styles_default
3
+ } from "./chunk.3XIJ443Y.js";
1
4
  import {
2
5
  wrapIndex
3
6
  } from "./chunk.HV63L5BF.js";
4
7
  import {
5
- radio_group_styles_default
6
- } from "./chunk.3XIJ443Y.js";
8
+ a11yWarning
9
+ } from "./chunk.PWL7QCVG.js";
7
10
  import {
8
11
  renderFormElementErrors
9
12
  } from "./chunk.IZBHR7GP.js";
@@ -19,17 +22,170 @@ import {
19
22
  import {
20
23
  watch
21
24
  } from "./chunk.NOMN6DGD.js";
25
+ import {
26
+ ifDefinedAndNotEmpty
27
+ } from "./chunk.ZQJVCRB2.js";
22
28
  import {
23
29
  ShoelaceElement
24
30
  } from "./chunk.XZ5FE34T.js";
31
+ import {
32
+ component_styles_default
33
+ } from "./chunk.TUVJKY7S.js";
25
34
  import {
26
35
  __decorateClass
27
36
  } from "./chunk.S3NI7NKU.js";
28
37
 
29
38
  // src/components/radio-group/radio-group.ts
39
+ import { html as html2 } from "lit";
40
+ import { customElement as customElement2, property as property2, query as query2, state as state2 } from "lit/decorators.js";
41
+ import { classMap as classMap2 } from "lit/directives/class-map.js";
42
+
43
+ // src/internal/components/button-group/button-group.ts
30
44
  import { html } from "lit";
31
45
  import { customElement, property, query, state } from "lit/decorators.js";
32
46
  import { classMap } from "lit/directives/class-map.js";
47
+
48
+ // src/internal/components/button-group/button-group.styles.ts
49
+ import { css } from "lit";
50
+ var button_group_styles_default = css`
51
+ ${component_styles_default}
52
+
53
+ :host {
54
+ display: inline-block;
55
+ }
56
+
57
+ .button-group {
58
+ display: flex;
59
+ flex-wrap: wrap;
60
+ gap: var(--dsa-spacing-8);
61
+ }
62
+
63
+ .button-group--squeezed {
64
+ gap: 0;
65
+ }
66
+
67
+ .button-group--vertical {
68
+ flex-direction: column;
69
+ min-width: 120px;
70
+ max-width: 400px;
71
+ }
72
+
73
+ .button-group--horizontal {
74
+ flex-direction: row;
75
+ }
76
+ `;
77
+
78
+ // src/internal/components/button-group/button-group.ts
79
+ var DSAInternalButtonGroup = class extends ShoelaceElement {
80
+ constructor() {
81
+ super(...arguments);
82
+ this.disableRole = false;
83
+ this.label = "";
84
+ this.squeezed = false;
85
+ this.horizontal = false;
86
+ }
87
+ handleFocus(event) {
88
+ const button = findButton(event.target);
89
+ button == null ? void 0 : button.classList.add("dsa-button-group__button--focus");
90
+ }
91
+ handleBlur(event) {
92
+ const button = findButton(event.target);
93
+ button == null ? void 0 : button.classList.remove("dsa-button-group__button--focus");
94
+ }
95
+ handleMouseOver(event) {
96
+ const button = findButton(event.target);
97
+ button == null ? void 0 : button.classList.add("dsa-button-group__button--hover");
98
+ }
99
+ handleMouseOut(event) {
100
+ const button = findButton(event.target);
101
+ button == null ? void 0 : button.classList.remove("dsa-button-group__button--hover");
102
+ }
103
+ handleSlotChange() {
104
+ const slottedElements = [
105
+ ...this.defaultSlot.assignedElements({ flatten: true })
106
+ ];
107
+ slottedElements.forEach((el) => {
108
+ const index = slottedElements.indexOf(el);
109
+ const button = findButton(el);
110
+ if (button !== null) {
111
+ button.classList.add("dsa-button-group__button");
112
+ if (this.squeezed) {
113
+ button.classList.toggle(
114
+ "dsa-button-group__button--first",
115
+ index === 0
116
+ );
117
+ button.classList.toggle(
118
+ "dsa-button-group__button--inner",
119
+ index > 0 && index < slottedElements.length - 1
120
+ );
121
+ button.classList.toggle(
122
+ "dsa-button-group__button--last",
123
+ index === slottedElements.length - 1
124
+ );
125
+ }
126
+ button.classList.toggle(
127
+ "dsa-button-group__button--radio",
128
+ button.tagName.toLowerCase() === "dsa-radio-button"
129
+ );
130
+ button.classList.toggle(
131
+ "dsa-button-group__button--checkbox",
132
+ button.tagName.toLowerCase() === "dsa-checkbox-button"
133
+ );
134
+ button.classList.toggle(
135
+ "dsa-button-group__button--vertical",
136
+ !this.horizontal
137
+ );
138
+ }
139
+ });
140
+ }
141
+ render() {
142
+ return html`
143
+ <div
144
+ part="base"
145
+ class=${classMap({
146
+ "button-group": true,
147
+ "button-group--squeezed": this.squeezed,
148
+ "button-group--vertical": !this.horizontal,
149
+ "button-group--horizontal": this.horizontal
150
+ })}
151
+ role="${this.disableRole ? "presentation" : "group"}"
152
+ aria-label=${ifDefinedAndNotEmpty(this.label)}
153
+ @focusout=${this.handleBlur}
154
+ @focusin=${this.handleFocus}
155
+ @mouseover=${this.handleMouseOver}
156
+ @mouseout=${this.handleMouseOut}
157
+ >
158
+ <slot @slotchange=${this.handleSlotChange}></slot>
159
+ </div>
160
+ `;
161
+ }
162
+ };
163
+ DSAInternalButtonGroup.styles = button_group_styles_default;
164
+ __decorateClass([
165
+ query("slot")
166
+ ], DSAInternalButtonGroup.prototype, "defaultSlot", 2);
167
+ __decorateClass([
168
+ state()
169
+ ], DSAInternalButtonGroup.prototype, "disableRole", 2);
170
+ __decorateClass([
171
+ property()
172
+ ], DSAInternalButtonGroup.prototype, "label", 2);
173
+ __decorateClass([
174
+ property({ type: Boolean })
175
+ ], DSAInternalButtonGroup.prototype, "squeezed", 2);
176
+ __decorateClass([
177
+ property({ type: Boolean })
178
+ ], DSAInternalButtonGroup.prototype, "horizontal", 2);
179
+ DSAInternalButtonGroup = __decorateClass([
180
+ customElement("dsa-internal-button-group")
181
+ ], DSAInternalButtonGroup);
182
+ function findButton(el) {
183
+ var _a;
184
+ const selector = "dsa-button, dsa-radio-button, dsa-checkbox-button, dsa-pagination-button";
185
+ return (_a = el.closest(selector)) != null ? _a : el.querySelector(selector);
186
+ }
187
+
188
+ // src/components/radio-group/radio-group.ts
33
189
  var DSARadioGroup = class extends ShoelaceElement {
34
190
  constructor() {
35
191
  super(...arguments);
@@ -307,14 +463,14 @@ var DSARadioGroup = class extends ShoelaceElement {
307
463
  const hasLabel = this.label ? true : !!hasLabelSlot;
308
464
  const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
309
465
  if (!hasLabel) {
310
- console.warn(
311
- "(a11y) <dsa-radio-group> requires a label attribute or a label slot for accessibility"
466
+ a11yWarning(
467
+ "<dsa-radio-group> requires a label attribute or a label slot for accessibility"
312
468
  );
313
469
  }
314
- return html`
470
+ return html2`
315
471
  <fieldset
316
472
  part="form-control"
317
- class=${classMap({
473
+ class=${classMap2({
318
474
  "form-control": true,
319
475
  "form-control--error": this.error,
320
476
  "form-control--medium": true,
@@ -329,9 +485,9 @@ var DSARadioGroup = class extends ShoelaceElement {
329
485
  aria-describedby=${this.error ? "error-text help-text" : "help-text"}
330
486
  aria-invalid=${this.error}
331
487
  >
332
- ${this.hideLabel ? html`<dsa-visually-hidden id="label"
488
+ ${this.hideLabel ? html2`<dsa-visually-hidden id="label"
333
489
  ><slot name="label">${this.label}</slot></dsa-visually-hidden
334
- >` : html`
490
+ >` : html2`
335
491
  <span
336
492
  part="form-control-label"
337
493
  id="label"
@@ -339,7 +495,7 @@ var DSARadioGroup = class extends ShoelaceElement {
339
495
  aria-hidden=${hasLabel ? "false" : "true"}
340
496
  @click=${this.handleLabelClick}
341
497
  >
342
- ${this.required ? html`<span class="form-control__label-required">*</span>` : ""}
498
+ ${this.required ? html2`<span class="form-control__label-required">*</span>` : ""}
343
499
  <slot name="label">${this.label}</slot>
344
500
  </span>
345
501
  `}
@@ -363,7 +519,7 @@ var DSARadioGroup = class extends ShoelaceElement {
363
519
  </label>
364
520
  </div>
365
521
 
366
- ${this.hasRadioButtons ? html`
522
+ ${this.hasRadioButtons ? html2`
367
523
  <dsa-internal-button-group
368
524
  part="button-group"
369
525
  exportparts="base:button-group__base"
@@ -375,7 +531,7 @@ var DSARadioGroup = class extends ShoelaceElement {
375
531
  >
376
532
  <slot></slot>
377
533
  </dsa-internal-button-group>
378
- ` : html`
534
+ ` : html2`
379
535
  <slot
380
536
  @click=${this.handleRadioClick}
381
537
  @keydown=${this.handleKeyDown}
@@ -404,55 +560,55 @@ var DSARadioGroup = class extends ShoelaceElement {
404
560
  };
405
561
  DSARadioGroup.styles = radio_group_styles_default;
406
562
  __decorateClass([
407
- query("slot:not([name])")
563
+ query2("slot:not([name])")
408
564
  ], DSARadioGroup.prototype, "defaultSlot", 2);
409
565
  __decorateClass([
410
- query(".radio-group__validation-input")
566
+ query2(".radio-group__validation-input")
411
567
  ], DSARadioGroup.prototype, "validationInput", 2);
412
568
  __decorateClass([
413
- state()
569
+ state2()
414
570
  ], DSARadioGroup.prototype, "hasRadioButtons", 2);
415
571
  __decorateClass([
416
- state()
572
+ state2()
417
573
  ], DSARadioGroup.prototype, "readonlyRadioButtonValue", 2);
418
574
  __decorateClass([
419
- state()
575
+ state2()
420
576
  ], DSARadioGroup.prototype, "defaultValue", 2);
421
577
  __decorateClass([
422
- property()
578
+ property2()
423
579
  ], DSARadioGroup.prototype, "label", 2);
424
580
  __decorateClass([
425
- property({ attribute: "help-text" })
581
+ property2({ attribute: "help-text" })
426
582
  ], DSARadioGroup.prototype, "helpText", 2);
427
583
  __decorateClass([
428
- property()
584
+ property2()
429
585
  ], DSARadioGroup.prototype, "name", 2);
430
586
  __decorateClass([
431
- property({ reflect: true })
587
+ property2({ reflect: true })
432
588
  ], DSARadioGroup.prototype, "value", 2);
433
589
  __decorateClass([
434
- property({ type: Boolean, reflect: true })
590
+ property2({ type: Boolean, reflect: true })
435
591
  ], DSARadioGroup.prototype, "deselectable", 2);
436
592
  __decorateClass([
437
- property({ reflect: true })
593
+ property2({ reflect: true })
438
594
  ], DSARadioGroup.prototype, "form", 2);
439
595
  __decorateClass([
440
- property({ type: Boolean, reflect: true })
596
+ property2({ type: Boolean, reflect: true })
441
597
  ], DSARadioGroup.prototype, "required", 2);
442
598
  __decorateClass([
443
- property({ type: Boolean, reflect: true })
599
+ property2({ type: Boolean, reflect: true })
444
600
  ], DSARadioGroup.prototype, "disabled", 2);
445
601
  __decorateClass([
446
- property({ type: Boolean, reflect: true })
602
+ property2({ type: Boolean, reflect: true })
447
603
  ], DSARadioGroup.prototype, "readonly", 2);
448
604
  __decorateClass([
449
- property({ type: Boolean })
605
+ property2({ type: Boolean })
450
606
  ], DSARadioGroup.prototype, "horizontal", 2);
451
607
  __decorateClass([
452
- property({ type: Boolean })
608
+ property2({ type: Boolean })
453
609
  ], DSARadioGroup.prototype, "error", 2);
454
610
  __decorateClass([
455
- property({
611
+ property2({
456
612
  attribute: "error-message",
457
613
  converter: {
458
614
  fromAttribute: (value) => value ? value.split("|") : "",
@@ -467,7 +623,7 @@ __decorateClass([
467
623
  })
468
624
  ], DSARadioGroup.prototype, "errorMessage", 2);
469
625
  __decorateClass([
470
- property({ type: Boolean, attribute: "hide-label" })
626
+ property2({ type: Boolean, attribute: "hide-label" })
471
627
  ], DSARadioGroup.prototype, "hideLabel", 2);
472
628
  __decorateClass([
473
629
  watch("value")
@@ -482,7 +638,7 @@ __decorateClass([
482
638
  watch("readonly")
483
639
  ], DSARadioGroup.prototype, "handleReadonlyChange", 1);
484
640
  DSARadioGroup = __decorateClass([
485
- customElement("dsa-radio-group")
641
+ customElement2("dsa-radio-group")
486
642
  ], DSARadioGroup);
487
643
 
488
644
  export {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.O4MZVDWB.js";
4
4
  import {
5
5
  FormControlLayout
6
- } from "./chunk.T4BUHP4L.js";
6
+ } from "./chunk.I5HR7JYK.js";
7
7
  import {
8
8
  combobox_styles_default
9
9
  } from "./chunk.FQMS24GI.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.RWGL6D5U.js";
4
4
  import {
5
5
  FormControlLayout
6
- } from "./chunk.T4BUHP4L.js";
6
+ } from "./chunk.I5HR7JYK.js";
7
7
  import {
8
8
  getDateFromISO,
9
9
  getISOFormattedDate
@@ -20,7 +20,7 @@ var errorArgTypes = {
20
20
  };
21
21
  var errorMessageArgTypes = {
22
22
  name: "error-message",
23
- description: 'An error message that is shown when `error` is set to true. If there are several messages, must be a string of messages separated by a pipe, e.g. "Error 1|Error 2|Error 3"',
23
+ description: 'The error message or messages that are shown when \u201Cerror\u201D is set to \u201Ctrue\u201D. To display several messages, they must be separated by a pipe character, e.g. "Error 1|Error 2|Error 3\u201D',
24
24
  table: {
25
25
  defaultValue: { summary: "''" },
26
26
  type: {
@@ -0,0 +1,9 @@
1
+ // src/internal/a11y-warning.ts
2
+ var A11Y_WARNING_START = "(DSA a11y) ";
3
+ function a11yWarning(message) {
4
+ console.warn(`${A11Y_WARNING_START}${message}`);
5
+ }
6
+
7
+ export {
8
+ a11yWarning
9
+ };