@ds-autonomie/web-components 1.8.0 → 1.9.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 (219) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/chunks/{chunk.KZIAHLAV.js → chunk.27JQOQHL.js} +31 -13
  3. package/dist/chunks/{chunk.K55HKFUM.js → chunk.2CCVOCSE.js} +11 -0
  4. package/dist/chunks/chunk.2TCYCYJQ.js +187 -0
  5. package/dist/chunks/chunk.3BOLT7UM.js +168 -0
  6. package/dist/chunks/{chunk.WMEXYRBL.js → chunk.3EDVQPST.js} +1 -1
  7. package/dist/chunks/chunk.47IWI2IO.js +51 -0
  8. package/dist/chunks/{chunk.BEGWFCAR.js → chunk.4Z3LVWYW.js} +23 -3
  9. package/dist/chunks/{chunk.5MXBL3PY.js → chunk.5QYMKLPJ.js} +1 -1
  10. package/dist/chunks/{chunk.TRMEXXU2.js → chunk.5X3ZLYWR.js} +4 -4
  11. package/dist/chunks/chunk.65HTBW2L.js +31 -0
  12. package/dist/chunks/{chunk.5KOTVDN5.js → chunk.66WACVGP.js} +13 -2
  13. package/dist/chunks/{chunk.TFXRULTL.js → chunk.74YBAWFQ.js} +1 -1
  14. package/dist/chunks/chunk.7NRLP2GK.js +172 -0
  15. package/dist/chunks/{chunk.F4KJFS2T.js → chunk.7PEABCEV.js} +1 -1
  16. package/dist/chunks/{chunk.SEH7BBNZ.js → chunk.7ZBFOFLF.js} +2 -2
  17. package/dist/chunks/chunk.BFG2T6XK.js +76 -0
  18. package/dist/chunks/{chunk.DMP5NRB3.js → chunk.BMSQX3ZA.js} +134 -118
  19. package/dist/chunks/{chunk.IFXLU6P3.js → chunk.BVRGK5ZO.js} +27 -4
  20. package/dist/chunks/{chunk.AXJZDS4O.js → chunk.BWQBVIRR.js} +1 -1
  21. package/dist/chunks/{chunk.VN7U4QIC.js → chunk.CFTA3QKA.js} +1 -1
  22. package/dist/chunks/{chunk.F6EDQPCA.js → chunk.CPEI3G7E.js} +1 -1
  23. package/dist/chunks/{chunk.WTGBJNXJ.js → chunk.CURRLKGD.js} +1 -1
  24. package/dist/chunks/{chunk.MIO6K4QD.js → chunk.DAQJDIFW.js} +1 -1
  25. package/dist/chunks/{chunk.ZC74GTBL.js → chunk.DX25IW4S.js} +0 -4
  26. package/dist/chunks/{chunk.ZCNXAXKX.js → chunk.EETYUDWR.js} +12 -1
  27. package/dist/chunks/{chunk.OIWFTO2A.js → chunk.EFCI6CBB.js} +17 -5
  28. package/dist/chunks/chunk.ESYJVRG3.js +129 -0
  29. package/dist/chunks/{chunk.ADG7SYDH.js → chunk.G2S6QEJM.js} +1 -1
  30. package/dist/chunks/{chunk.MUBB5GXY.js → chunk.GOSPYXFS.js} +5 -8
  31. package/dist/chunks/chunk.H4XXY6QB.js +73 -0
  32. package/dist/chunks/chunk.HAJSA7VP.js +53 -0
  33. package/dist/chunks/chunk.HW4HC4GP.js +61 -0
  34. package/dist/chunks/{chunk.B5DEC3ZW.js → chunk.IEBTPGUT.js} +2 -1
  35. package/dist/chunks/{chunk.CJIL3BLA.js → chunk.JJ67JVYV.js} +2 -0
  36. package/dist/chunks/{chunk.7XNMTM6N.js → chunk.KAXMDDPV.js} +1 -1
  37. package/dist/chunks/{chunk.NEIICCKM.js → chunk.KUC4IPNW.js} +24 -6
  38. package/dist/chunks/{chunk.MZMKGGW2.js → chunk.LG4WLLQM.js} +1 -1
  39. package/dist/chunks/{chunk.ZBTNUV7V.js → chunk.LJ7Y3MBX.js} +5 -5
  40. package/dist/chunks/{chunk.DFH66YHJ.js → chunk.MHEF6WDT.js} +1 -1
  41. package/dist/chunks/{chunk.XEZX466O.js → chunk.MMHCJ5DA.js} +1 -1
  42. package/dist/chunks/chunk.N5UMZAXE.js +264 -0
  43. package/dist/chunks/chunk.N7H2OIPT.js +82 -0
  44. package/dist/chunks/{chunk.6A2LWKQY.js → chunk.NZK7MHS3.js} +1 -1
  45. package/dist/chunks/{chunk.N6EX6BDJ.js → chunk.ONIFK4NH.js} +28 -0
  46. package/dist/chunks/{chunk.KY6SFO3D.js → chunk.OXPE4AH7.js} +1 -1
  47. package/dist/chunks/chunk.OZWZRPR2.js +56 -0
  48. package/dist/chunks/{chunk.VZIVZSLP.js → chunk.P6TKBTE3.js} +1 -1
  49. package/dist/chunks/chunk.PFGVYROJ.js +26 -0
  50. package/dist/chunks/{chunk.HWR5JOYI.js → chunk.POJ5NHBX.js} +1 -1
  51. package/dist/chunks/{chunk.6OP6GCU4.js → chunk.R4Y6XOHR.js} +12 -2
  52. package/dist/chunks/{chunk.L5YSEAAK.js → chunk.RFLSIZXC.js} +1 -1
  53. package/dist/chunks/{chunk.JGWZGEQY.js → chunk.RZ3LYIA4.js} +4 -4
  54. package/dist/chunks/{chunk.43PVVN7Q.js → chunk.S7OQV6LL.js} +1 -1
  55. package/dist/chunks/chunk.S7VHPQOI.js +239 -0
  56. package/dist/chunks/{chunk.PO3AZ63O.js → chunk.T7VLQ7RI.js} +2 -1
  57. package/dist/chunks/{chunk.7UXBTLEE.js → chunk.TUWCKMLU.js} +2 -2
  58. package/dist/chunks/chunk.TWRM2VNQ.js +131 -0
  59. package/dist/chunks/{chunk.C7BQI7NH.js → chunk.UVCXXEVO.js} +1 -1
  60. package/dist/chunks/{chunk.YF45VJOV.js → chunk.UXKJPQ6X.js} +1 -1
  61. package/dist/chunks/{chunk.DNSF5O4C.js → chunk.UXXDCLQD.js} +1 -1
  62. package/dist/chunks/{chunk.C33YMWL6.js → chunk.V5O2GRVM.js} +15 -3
  63. package/dist/chunks/{chunk.EKWYMXQO.js → chunk.VNAE4DJZ.js} +1 -0
  64. package/dist/chunks/{chunk.RXBDBWWT.js → chunk.VWZFYMC7.js} +6 -0
  65. package/dist/chunks/{chunk.22WSILHD.js → chunk.WNODOQAI.js} +1 -1
  66. package/dist/chunks/chunk.XM5ZLNIT.js +32 -0
  67. package/dist/chunks/chunk.YA5XTUZW.js +76 -0
  68. package/dist/chunks/{chunk.DIC5NUF5.js → chunk.YAF5P5CP.js} +4 -0
  69. package/dist/chunks/chunk.YDZQSSJE.js +77 -0
  70. package/dist/components/accordion/accordion.js +5 -5
  71. package/dist/components/alert/alert.js +7 -7
  72. package/dist/components/avatar/avatar.js +4 -4
  73. package/dist/components/badge/badge.d.ts +3 -0
  74. package/dist/components/badge/badge.js +3 -2
  75. package/dist/components/badge/badge.styles.js +1 -1
  76. package/dist/components/breadcrumb/breadcrumb.js +5 -5
  77. package/dist/components/breadcrumb-item/breadcrumb-item.js +2 -2
  78. package/dist/components/button/button.js +6 -6
  79. package/dist/components/checkbox/checkbox.d.ts +3 -0
  80. package/dist/components/checkbox/checkbox.js +6 -5
  81. package/dist/components/checkbox/checkbox.styles.js +1 -1
  82. package/dist/components/checkbox-button/checkbox-button.js +3 -3
  83. package/dist/components/combobox/combobox.d.ts +0 -1
  84. package/dist/components/combobox/combobox.js +9 -9
  85. package/dist/components/dialog/dialog.js +7 -7
  86. package/dist/components/download-card/download-card.js +3 -3
  87. package/dist/components/download-link/download-link.js +3 -3
  88. package/dist/components/drawer/drawer.js +7 -7
  89. package/dist/components/dropdown/dropdown.js +2 -2
  90. package/dist/components/error-message-panel/error-message-panel.js +2 -2
  91. package/dist/components/footer-sitemap-item/footer-sitemap-item.js +1 -1
  92. package/dist/components/format-bytes/format-bytes.js +2 -2
  93. package/dist/components/format-date/format-date.js +2 -2
  94. package/dist/components/format-number/format-number.js +2 -2
  95. package/dist/components/header/header.assets.d.ts +2 -0
  96. package/dist/components/header/header.assets.js +9 -0
  97. package/dist/components/header/header.d.ts +37 -0
  98. package/dist/components/header/header.js +17 -0
  99. package/dist/components/header/header.styles.d.ts +2 -0
  100. package/dist/components/header/header.styles.js +8 -0
  101. package/dist/components/header-external-link/header-external-link.d.ts +18 -0
  102. package/dist/components/header-external-link/header-external-link.js +9 -0
  103. package/dist/components/header-external-link/header-external-link.style.d.ts +2 -0
  104. package/dist/components/header-external-link/header-external-link.style.js +18 -0
  105. package/dist/components/header-search/header-search.d.ts +45 -0
  106. package/dist/components/header-search/header-search.js +12 -0
  107. package/dist/components/header-search/header-search.styles.d.ts +2 -0
  108. package/dist/components/header-search/header-search.styles.js +8 -0
  109. package/dist/components/icon/icon.js +3 -3
  110. package/dist/components/icon-button/icon-button.d.ts +2 -1
  111. package/dist/components/icon-button/icon-button.js +5 -5
  112. package/dist/components/icon-button/icon-button.styles.js +1 -1
  113. package/dist/components/input/input.js +6 -6
  114. package/dist/components/input-mask/input-mask.js +2 -2
  115. package/dist/components/input-phone/input-phone.configs.d.ts +4 -3
  116. package/dist/components/input-phone/input-phone.configs.js +3 -3
  117. package/dist/components/input-phone/input-phone.d.ts +8 -8
  118. package/dist/components/input-phone/input-phone.js +16 -16
  119. package/dist/components/input-phone/input-phone.styles.js +1 -1
  120. package/dist/components/input-phone/input-phone.utils.d.ts +3 -3
  121. package/dist/components/input-phone/input-phone.utils.js +5 -5
  122. package/dist/components/menu-item/menu-item.js +3 -3
  123. package/dist/components/option/option.js +5 -5
  124. package/dist/components/pagination/pagination.d.ts +2 -2
  125. package/dist/components/pagination/pagination.js +9 -8
  126. package/dist/components/pagination/pagination.styles.js +1 -1
  127. package/dist/components/progress-bar/progress-bar.js +2 -2
  128. package/dist/components/radio/radio.js +3 -3
  129. package/dist/components/relative-time/relative-time.js +2 -2
  130. package/dist/components/select/select.js +8 -8
  131. package/dist/components/skeleton/skeleton.d.ts +1 -0
  132. package/dist/components/skeleton/skeleton.js +5 -3
  133. package/dist/components/skip-link-item/skip-link-item.d.ts +1 -0
  134. package/dist/components/skip-link-item/skip-link-item.js +1 -1
  135. package/dist/components/skip-links/skip-links.d.ts +0 -6
  136. package/dist/components/skip-links/skip-links.js +2 -2
  137. package/dist/components/skip-links/skip-links.styles.js +1 -1
  138. package/dist/components/spinner/spinner.js +2 -2
  139. package/dist/components/step/step.js +6 -6
  140. package/dist/components/tab/tab.js +2 -2
  141. package/dist/components/tab-group/tab-group.js +2 -2
  142. package/dist/components/table/table-body/table-body.d.ts +8 -3
  143. package/dist/components/table/table-body/table-body.js +5 -1
  144. package/dist/components/table/table-caption/table-caption.d.ts +6 -2
  145. package/dist/components/table/table-caption/table-caption.js +7 -3
  146. package/dist/components/table/table-caption/table-caption.styles.js +1 -1
  147. package/dist/components/table/table-cell/table-cell.d.ts +6 -2
  148. package/dist/components/table/table-cell/table-cell.js +5 -1
  149. package/dist/components/table/table-expanded-row/table-expanded-row.d.ts +17 -0
  150. package/dist/components/table/table-expanded-row/table-expanded-row.js +47 -0
  151. package/dist/components/table/table-expanded-row/table-expanded-row.styles.d.ts +2 -0
  152. package/dist/components/table/table-expanded-row/table-expanded-row.styles.js +8 -0
  153. package/dist/components/table/table-head/table-head.d.ts +8 -3
  154. package/dist/components/table/table-head/table-head.js +5 -1
  155. package/dist/components/table/table-header-cell/table-header-cell.d.ts +8 -1
  156. package/dist/components/table/table-header-cell/table-header-cell.js +7 -4
  157. package/dist/components/table/table-header-cell/table-header-cell.styles.js +1 -1
  158. package/dist/components/table/table-header-row/table-header-row.d.ts +4 -2
  159. package/dist/components/table/table-header-row/table-header-row.js +7 -4
  160. package/dist/components/table/table-header-row/table-header-row.styles.js +1 -1
  161. package/dist/components/table/table-row/table-row.d.ts +48 -1
  162. package/dist/components/table/table-row/table-row.js +5 -2
  163. package/dist/components/table/table-row/table-row.styles.js +1 -1
  164. package/dist/components/table/table.d.ts +23 -1
  165. package/dist/components/table/table.js +2 -2
  166. package/dist/components/table/table.styles.js +1 -1
  167. package/dist/components/table-container/table-container.d.ts +4 -2
  168. package/dist/components/table-container/table-container.js +3 -1
  169. package/dist/components/tag/tag.js +7 -7
  170. package/dist/components/tooltip/tooltip.js +2 -2
  171. package/dist/components/tree/tree.js +11 -10
  172. package/dist/components/tree-item/tree-item.js +10 -9
  173. package/dist/components/tree-item/tree-item.styles.js +1 -1
  174. package/dist/custom-elements.json +2490 -991
  175. package/dist/design-system.d.ts +3 -0
  176. package/dist/design-system.js +119 -103
  177. package/dist/events/dsa-submit.d.ts +7 -0
  178. package/dist/events/dsa-submit.js +1 -0
  179. package/dist/events/dsa-table-row-all-change-selection.d.ts +7 -0
  180. package/dist/events/dsa-table-row-all-change-selection.js +1 -0
  181. package/dist/events/dsa-table-row-all-selected.d.ts +10 -0
  182. package/dist/events/dsa-table-row-all-selected.js +1 -0
  183. package/dist/events/dsa-table-row-change-selection.d.ts +7 -0
  184. package/dist/events/dsa-table-row-change-selection.js +1 -0
  185. package/dist/events/dsa-table-row-click.d.ts +7 -0
  186. package/dist/events/dsa-table-row-click.js +1 -0
  187. package/dist/events/dsa-table-row-expand-change.d.ts +7 -0
  188. package/dist/events/dsa-table-row-expand-change.js +1 -0
  189. package/dist/events/dsa-table-row-selected.d.ts +11 -0
  190. package/dist/events/dsa-table-row-selected.js +1 -0
  191. package/dist/events/events.d.ts +6 -0
  192. package/dist/internal/loading-state-element.d.ts +7 -0
  193. package/dist/internal/loading-state-element.js +23 -0
  194. package/dist/themes/dsa-wc-theme.css +53 -3
  195. package/dist/themes/dsa-wc-theme.min.css +1 -1
  196. package/dist/themes/dsa-wc-theme.styles.js +56 -3
  197. package/dist/translations/en-gb.js +1 -1
  198. package/dist/translations/en.js +1 -1
  199. package/dist/translations/fr.js +1 -1
  200. package/dist/utilities/localize.d.ts +10 -1
  201. package/dist/utilities/localize.js +1 -1
  202. package/dist/utilities/storybook.d.ts +1 -0
  203. package/dist/utilities/storybook.js +12 -0
  204. package/dist/vscode.html-custom-data.json +168 -14
  205. package/dist/web-types.json +913 -70
  206. package/package.json +1 -1
  207. package/dist/chunks/chunk.2AHY5V6G.js +0 -25
  208. package/dist/chunks/chunk.65JZEQ4F.js +0 -33
  209. package/dist/chunks/chunk.6ZQ4OQ2C.js +0 -51
  210. package/dist/chunks/chunk.CHM74JXS.js +0 -74
  211. package/dist/chunks/chunk.HL632DKM.js +0 -86
  212. package/dist/chunks/chunk.M2SPGS54.js +0 -31
  213. package/dist/chunks/chunk.MVKY65HC.js +0 -33
  214. package/dist/chunks/chunk.OBTE6PY7.js +0 -41
  215. package/dist/chunks/chunk.TB6DCJYX.js +0 -57
  216. package/dist/chunks/chunk.UCJGKOXX.js +0 -10
  217. package/dist/chunks/chunk.Z4V2DJQS.js +0 -44
  218. package/dist/chunks/{chunk.JOIYVWUG.js → chunk.5MB36CJO.js} +1 -1
  219. package/dist/chunks/{chunk.V7MYOBN4.js → chunk.QZTW3WMM.js} +3 -3
@@ -1,23 +1,23 @@
1
1
  import {
2
2
  DSASelect
3
- } from "./chunk.ADG7SYDH.js";
4
- import {
5
- frenchFlag,
6
- frenchNumberPrefix,
7
- phoneInputValidityRegex,
8
- phonePrefixOptions
9
- } from "./chunk.6ZQ4OQ2C.js";
3
+ } from "./chunk.G2S6QEJM.js";
10
4
  import {
11
5
  maskedValueToRawValue,
12
6
  rawValueToMaskedValue,
13
7
  stripSpecialChars
14
8
  } from "./chunk.7OLEA3GQ.js";
15
9
  import {
16
- PhoneConfig
17
- } from "./chunk.UCJGKOXX.js";
10
+ getPhoneConfig
11
+ } from "./chunk.65HTBW2L.js";
18
12
  import {
19
13
  input_phone_styles_default
20
- } from "./chunk.MUBB5GXY.js";
14
+ } from "./chunk.GOSPYXFS.js";
15
+ import {
16
+ frenchFlagOption,
17
+ frenchFlagSelect,
18
+ frenchNumberPrefix,
19
+ phonePrefixOptions
20
+ } from "./chunk.ESYJVRG3.js";
21
21
  import {
22
22
  defaultValue
23
23
  } from "./chunk.CMJ2SRTL.js";
@@ -56,12 +56,14 @@ var DSAInputPhone = class extends ShoelaceElement {
56
56
  this.hasSlotController = new HasSlotController(
57
57
  this,
58
58
  "help-text",
59
- "label",
60
- "prefix"
59
+ "label"
61
60
  );
62
61
  this.localize = new LocalizeController(this);
63
62
  this.hasFocus = false;
64
63
  this.maskedNumber = "";
64
+ this.phoneConfig = getPhoneConfig("+33");
65
+ this.placeholder = this.phoneConfig.placeholder;
66
+ this.pattern = this.phoneConfig.pattern;
65
67
  this.title = "";
66
68
  this.name = "";
67
69
  this.value = "";
@@ -74,13 +76,12 @@ var DSAInputPhone = class extends ShoelaceElement {
74
76
  this.helpText = "";
75
77
  this.clearable = false;
76
78
  this.disabled = false;
77
- this.placeholder = PhoneConfig.placeholder;
79
+ this.inputPrefix = "";
78
80
  this.readonly = false;
79
81
  this.error = false;
80
82
  this.errorMessage = "";
81
83
  this.form = "";
82
84
  this.required = false;
83
- this.pattern = PhoneConfig.pattern;
84
85
  this.placement = "bottom-start";
85
86
  }
86
87
  /** Gets the validity state object */
@@ -126,7 +127,10 @@ var DSAInputPhone = class extends ShoelaceElement {
126
127
  }
127
128
  handleDocumentKeyUp() {
128
129
  const strippedValue = stripSpecialChars(this.inputEl.value);
129
- const newValue = maskedValueToRawValue(strippedValue, PhoneConfig.mask);
130
+ const newValue = maskedValueToRawValue(
131
+ strippedValue,
132
+ this.phoneConfig.mask
133
+ );
130
134
  const maskedValue = rawValueToMaskedValue(newValue, this.placeholder);
131
135
  this.phoneNumber = newValue;
132
136
  this.maskedNumber = maskedValue;
@@ -229,6 +233,11 @@ var DSAInputPhone = class extends ShoelaceElement {
229
233
  }
230
234
  this.formControlController.setValidity(this.disabled);
231
235
  }
236
+ updatePhoneConfig() {
237
+ this.phoneConfig = getPhoneConfig(this.phonePrefix);
238
+ this.placeholder = this.phoneConfig.placeholder;
239
+ this.pattern = this.phoneConfig.pattern;
240
+ }
232
241
  async handleValueChange() {
233
242
  await this.updateComplete;
234
243
  this.formControlController.updateValidity();
@@ -269,9 +278,14 @@ var DSAInputPhone = class extends ShoelaceElement {
269
278
  }
270
279
  /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
271
280
  checkValidity() {
272
- if (this.phoneNumber === "" && this.required)
273
- return false;
274
- return phoneInputValidityRegex.test(this.value);
281
+ var _a;
282
+ const isValidInput = (_a = this.inputEl) == null ? void 0 : _a.checkValidity();
283
+ if (this.phoneNumber.length === 0) {
284
+ return isValidInput != null ? isValidInput : false;
285
+ }
286
+ const matches = this.value.match(this.pattern);
287
+ const patternMatch = matches !== null;
288
+ return patternMatch;
275
289
  }
276
290
  /** Gets the associated form, if one exists. */
277
291
  getForm() {
@@ -279,9 +293,14 @@ var DSAInputPhone = class extends ShoelaceElement {
279
293
  }
280
294
  /** Checks for validity and shows the browser's validation message if the control is invalid. */
281
295
  reportValidity() {
282
- if (this.phoneNumber === "" && this.required)
283
- return false;
284
- return phoneInputValidityRegex.test(this.value);
296
+ var _a;
297
+ const isValidInput = (_a = this.inputEl) == null ? void 0 : _a.reportValidity();
298
+ if (this.phoneNumber.length === 0) {
299
+ return isValidInput != null ? isValidInput : false;
300
+ }
301
+ const matches = this.value.match(this.pattern);
302
+ const patternMatch = matches !== null;
303
+ return patternMatch;
285
304
  }
286
305
  /** Sets a custom validation message. Pass an empty string to restore validity. */
287
306
  setCustomValidity(message) {
@@ -292,16 +311,16 @@ var DSAInputPhone = class extends ShoelaceElement {
292
311
  var _a;
293
312
  const hasLabelSlot = this.hasSlotController.test("label");
294
313
  const hasHelpTextSlot = this.hasSlotController.test("help-text");
295
- const hasPrefixIcon = this.hasSlotController.test("prefix");
296
314
  const hasLabel = this.label ? true : !!hasLabelSlot;
297
315
  const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
298
316
  const hasClearIcon = this.clearable && !this.disabled && !this.readonly && (typeof this.phoneNumber === "number" || ((_a = this.phoneNumber) == null ? void 0 : _a.length) > 0);
299
317
  const placeholder = this.placeholder.substring(
300
318
  this.maskedNumber.length || 0
301
319
  );
302
- return html`<div
303
- part="form-control"
304
- class=${classMap({
320
+ return html`
321
+ <div
322
+ part="form-control"
323
+ class=${classMap({
305
324
  "form-control": true,
306
325
  "form-control--error": this.error,
307
326
  "form-control--readonly": this.readonly,
@@ -312,57 +331,54 @@ var DSAInputPhone = class extends ShoelaceElement {
312
331
  "form-control--has-label": hasLabel,
313
332
  "form-control--has-help-text": hasHelpText
314
333
  })}
315
- >
316
- <label
317
- part="form-control-label"
318
- class='form-control__label'
319
- for="input-phone"
320
- aria-hidden=${hasLabel ? "false" : "true"}
321
-
322
334
  >
323
- ${this.required ? html`<span class="form-control__label-required">*</span>` : ""}
324
- <slot name="label">${this.label}</slot>
325
- </label>
335
+ <label
336
+ part="form-control-label"
337
+ class='form-control__label'
338
+ for="input-phone"
339
+ aria-hidden=${hasLabel ? "false" : "true"}
340
+ >
341
+ ${this.required ? html`<span class="form-control__label-required">*</span>` : ""}
342
+ <slot name="label">${this.label}</slot>
343
+ </label>
326
344
  <slot name="tooltip" class="form-control__tooltip"></slot>
327
345
 
328
- <div part="base" class="input-phone__input form-control__field" >
346
+ <div part="base" class="input-phone__input form-control__field" >
329
347
 
330
- <dsa-select
331
- id="prefix"
332
- part="select"
333
- class=${classMap({
348
+ <dsa-select
349
+ id="prefix"
350
+ part="select"
351
+ class=${classMap({
334
352
  "input-phone__select": true,
335
353
  "input-phone__select-error": this.error
336
354
  })}
337
- .variant=${live(this.variant)}
338
- .value=${this.phonePrefix}
339
- ?disabled=${this.disabled || this.readonly}
340
- title=${this.localize.term("countryCallingCode")}
341
- .placement=${this.placement}
342
- hoist
343
- .size=${this.size}
344
- @dsa-change=${this.handlePhonePrefixChange}
345
- @keydown=${this.handlePhonePrefixKeydown}
346
- enterkeyhint="enter"
347
- display-value
348
- no-sync-width
349
- >
350
- ${frenchFlag}
351
- ${phonePrefixOptions.map((option) => {
352
- return html`<dsa-option value=${option.value} .size=${this.size}>
353
- ${frenchFlag} (${option.value}) ${this.localize.term(option.label)}
354
- </dsa-option>`;
355
+ .variant=${live(this.variant)}
356
+ .value=${this.phonePrefix}
357
+ ?disabled=${this.disabled || this.readonly}
358
+ title=${this.localize.term("countryCallingCode")}
359
+ .placement=${this.placement}
360
+ hoist
361
+ .size=${this.size}
362
+ @dsa-change=${this.handlePhonePrefixChange}
363
+ @keydown=${this.handlePhonePrefixKeydown}
364
+ enterkeyhint="enter"
365
+ display-value
366
+ no-sync-width
367
+ >
368
+ ${frenchFlagSelect}
369
+ ${phonePrefixOptions.map((option, index) => {
370
+ return html`
371
+ <dsa-option value=${option.value} .size=${this.size}>
372
+ ${frenchFlagOption(`option_${index}`)}
373
+ ${this.localize.term(option.label)} (${option.value})
374
+ </dsa-option>
375
+ `;
355
376
  })}
356
- </dsa-select>
377
+ </dsa-select>
357
378
 
358
- <div
359
- part="mask"
379
+ <div
360
380
  class=${classMap({
361
381
  "input-phone": true,
362
- // Sizes
363
- "input-phone--small": this.size === "small",
364
- "input-phone--medium": this.size === "medium",
365
- "input-phone--large": this.size === "large",
366
382
  // States
367
383
  "input-phone--error": this.error,
368
384
  "input-phone--on-layer": this.variant === "layer",
@@ -373,56 +389,55 @@ var DSAInputPhone = class extends ShoelaceElement {
373
389
  "input-phone--empty": this.phoneNumber === ""
374
390
  })}
375
391
  >
376
-
377
-
392
+ <span>${this.inputPrefix}</span>
378
393
 
379
-
380
- <div class=${classMap({
394
+ <div class="input-phone__mask">
395
+ <div
396
+ class=${classMap({
381
397
  "input-phone__placeholder": true
382
- })} aria-placeholder=${placeholder} aria-hidden="true"
398
+ })}
399
+ aria-placeholder=${placeholder} aria-hidden="true"
383
400
  >
384
401
  <span class="input-phone__value" aria-hidden="true">
385
402
  ${this.maskedNumber}</span>
386
403
  ${placeholder}
387
- </div
388
- >
404
+ </div>
389
405
 
390
406
 
391
- <input
392
- part="input"
393
- id="input-phone"
394
- class=${classMap({
395
- "input-phone__control": true,
396
- "input-phone__control-with-prefix": hasPrefixIcon
407
+ <input
408
+ part="input"
409
+ id="input-phone"
410
+ class=${classMap({
411
+ "input-phone__control": true
397
412
  })}
398
- type="text"
399
- title=${ifDefinedAndNotEmpty(this.title)}
400
- name=${ifDefinedAndNotEmpty(this.name)}
401
- ?disabled=${this.disabled}
402
- ?readonly=${this.readonly}
403
- ?required=${this.required}
404
- minlength=${ifDefined(this.minlength)}
405
- maxlength=${ifDefined(this.placeholder.length)}
406
- size=${ifDefined(this.placeholder.length)}
407
- placeholder=${ifDefined(this.placeholder)}
408
- .value=${live(this.maskedNumber)}
409
- autocomplete='tel-national'
410
- autocorrect=${ifDefined(this.autocorrect)}
411
- ?autofocus=${this.autofocus}
412
- spellcheck=${this.spellcheck}
413
- enterkeyhint=${ifDefined(this.enterkeyhint)}
414
- inputmode='tel'
415
- aria-label=${ifDefinedAndNotEmpty(hasLabel ? this.label : this.title)}
416
- aria-describedby=${this.error ? "input-phone error-text help-text" : "input-phone help-text"}
417
- @change=${this.handleChange}
418
- @keyup=${this.handleDocumentKeyUp}
419
- @keydown=${this.handleKeyDown}
420
- @focus=${this.handleFocus}
421
- @blur=${this.handleBlur}
422
- @invalid=${this.handleInvalid}
423
- />
424
-
413
+ type="text"
414
+ title=${ifDefinedAndNotEmpty(this.title)}
415
+ name=${ifDefinedAndNotEmpty(this.name)}
416
+ ?disabled=${this.disabled}
417
+ ?readonly=${this.readonly}
418
+ ?required=${this.required}
419
+ minlength=${ifDefined(this.placeholder.length)}
420
+ maxlength=${ifDefined(this.placeholder.length)}
421
+ size=${ifDefined(this.placeholder.length)}
422
+ placeholder=${ifDefined(this.placeholder)}
423
+ .value=${live(this.maskedNumber)}
424
+ autocomplete='tel-national'
425
+ ?autofocus=${this.autofocus}
426
+ enterkeyhint=${ifDefined(this.enterkeyhint)}
427
+ inputmode='tel'
428
+ aria-label=${ifDefinedAndNotEmpty(
429
+ hasLabel ? this.label : this.title
430
+ )}
431
+ aria-describedby=${this.error ? "input-phone error-text help-text" : "input-phone help-text"}
432
+ @change=${this.handleChange}
433
+ @keyup=${this.handleDocumentKeyUp}
434
+ @keydown=${this.handleKeyDown}
435
+ @focus=${this.handleFocus}
436
+ @blur=${this.handleBlur}
437
+ @invalid=${this.handleInvalid}
438
+ />
425
439
 
440
+ </div>
426
441
  ${hasClearIcon ? html`
427
442
  <dsa-icon-button
428
443
  part="clear-button"
@@ -433,8 +448,6 @@ var DSAInputPhone = class extends ShoelaceElement {
433
448
  >
434
449
  </dsa-icon-button>
435
450
  ` : ""}
436
-
437
-
438
451
  </div>
439
452
  </div>
440
453
 
@@ -468,6 +481,15 @@ __decorateClass([
468
481
  __decorateClass([
469
482
  state()
470
483
  ], DSAInputPhone.prototype, "maskedNumber", 2);
484
+ __decorateClass([
485
+ state()
486
+ ], DSAInputPhone.prototype, "phoneConfig", 2);
487
+ __decorateClass([
488
+ state()
489
+ ], DSAInputPhone.prototype, "placeholder", 2);
490
+ __decorateClass([
491
+ state()
492
+ ], DSAInputPhone.prototype, "pattern", 2);
471
493
  __decorateClass([
472
494
  property()
473
495
  ], DSAInputPhone.prototype, "title", 2);
@@ -505,8 +527,8 @@ __decorateClass([
505
527
  property({ type: Boolean, reflect: true })
506
528
  ], DSAInputPhone.prototype, "disabled", 2);
507
529
  __decorateClass([
508
- state()
509
- ], DSAInputPhone.prototype, "placeholder", 2);
530
+ property({ attribute: "input-prefix" })
531
+ ], DSAInputPhone.prototype, "inputPrefix", 2);
510
532
  __decorateClass([
511
533
  property({ type: Boolean, reflect: true })
512
534
  ], DSAInputPhone.prototype, "readonly", 2);
@@ -522,15 +544,6 @@ __decorateClass([
522
544
  __decorateClass([
523
545
  property({ type: Boolean, reflect: true })
524
546
  ], DSAInputPhone.prototype, "required", 2);
525
- __decorateClass([
526
- state()
527
- ], DSAInputPhone.prototype, "pattern", 2);
528
- __decorateClass([
529
- property({ type: Number })
530
- ], DSAInputPhone.prototype, "minlength", 2);
531
- __decorateClass([
532
- property()
533
- ], DSAInputPhone.prototype, "autocorrect", 2);
534
547
  __decorateClass([
535
548
  property({ type: Boolean })
536
549
  ], DSAInputPhone.prototype, "autofocus", 2);
@@ -543,6 +556,9 @@ __decorateClass([
543
556
  __decorateClass([
544
557
  watch("disabled", { waitUntilFirstUpdate: true })
545
558
  ], DSAInputPhone.prototype, "handleDisabledChange", 1);
559
+ __decorateClass([
560
+ watch("phonePrefix")
561
+ ], DSAInputPhone.prototype, "updatePhoneConfig", 1);
546
562
  __decorateClass([
547
563
  watch("value", { waitUntilFirstUpdate: true })
548
564
  ], DSAInputPhone.prototype, "handleValueChange", 1);
@@ -17,14 +17,13 @@ var badge_styles_default = css`
17
17
  justify-content: center;
18
18
  align-items: center;
19
19
  white-space: pre;
20
- font: var(--dsa-wc-badge-font);
21
20
  border-radius: var(--dsa-wc-badge-border-radius);
22
21
  white-space: nowrap;
23
- padding: var(--spacing-8, 0.5rem);
24
22
  user-select: none;
25
23
  cursor: inherit;
26
- height: var(--dsa-wc-badge-dot-size);
27
- min-width: var(--dsa-wc-badge-dot-size);
24
+ }
25
+ .badge slot {
26
+ padding: 2px;
28
27
  }
29
28
 
30
29
  /* Variant modifiers */
@@ -53,6 +52,30 @@ var badge_styles_default = css`
53
52
  color: var(--dsa-wc-badge-text-color-danger);
54
53
  }
55
54
 
55
+ /*
56
+ * Size modifiers
57
+ */
58
+
59
+ .badge--small {
60
+ padding: var(--dsa-wc-badge-dot-small-padding);
61
+ }
62
+ .badge--small.badge--has-text {
63
+ font: var(--dsa-wc-badge-small-font);
64
+ padding: var(--dsa-wc-badge-text-small-padding);
65
+ line-height: 1;
66
+ min-width: var(--dsa-wc-badge-text-small-min-width);
67
+ }
68
+
69
+ .badge--medium {
70
+ padding: var(--dsa-wc-badge-dot-padding);
71
+ }
72
+ .badge--medium.badge--has-text {
73
+ font: var(--dsa-wc-badge-font);
74
+ padding: var(--dsa-wc-badge-text-padding);
75
+ line-height: 1;
76
+ min-width: var(--dsa-wc-badge-text-min-width);
77
+ }
78
+
56
79
  /* Pulse modifier */
57
80
  .badge--pulse {
58
81
  animation: pulse 1.5s var(--dsa-wc-no-animations-duration, infinite);
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk.DXQY7NLW.js";
11
11
  import {
12
12
  LocalizeController
13
- } from "./chunk.KZIAHLAV.js";
13
+ } from "./chunk.27JQOQHL.js";
14
14
  import {
15
15
  watch
16
16
  } from "./chunk.6IH66JBY.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.SGIGGO5M.js";
4
4
  import {
5
5
  LocalizeController
6
- } from "./chunk.KZIAHLAV.js";
6
+ } from "./chunk.27JQOQHL.js";
7
7
  import {
8
8
  ifDefinedAndNotEmpty
9
9
  } from "./chunk.ZQJVCRB2.js";
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk.YIY5RM53.js";
18
18
  import {
19
19
  LocalizeController
20
- } from "./chunk.KZIAHLAV.js";
20
+ } from "./chunk.27JQOQHL.js";
21
21
  import {
22
22
  watch
23
23
  } from "./chunk.6IH66JBY.js";
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk.V7RJROLH.js";
15
15
  import {
16
16
  LocalizeController
17
- } from "./chunk.KZIAHLAV.js";
17
+ } from "./chunk.27JQOQHL.js";
18
18
  import {
19
19
  watch
20
20
  } from "./chunk.6IH66JBY.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.2DGAEK66.js";
4
4
  import {
5
5
  LocalizeController
6
- } from "./chunk.KZIAHLAV.js";
6
+ } from "./chunk.27JQOQHL.js";
7
7
  import {
8
8
  watch
9
9
  } from "./chunk.6IH66JBY.js";
@@ -28,10 +28,6 @@ var skip_links_styles_default = css`
28
28
  align-items: center;
29
29
  gap: var(--dsa-wc-skip-link-list-gap);
30
30
  }
31
-
32
- .slot_links {
33
- display: none;
34
- }
35
31
  `;
36
32
 
37
33
  export {
@@ -3,10 +3,13 @@ import {
3
3
  } from "./chunk.CMJ2SRTL.js";
4
4
  import {
5
5
  checkbox_styles_default
6
- } from "./chunk.DIC5NUF5.js";
6
+ } from "./chunk.YAF5P5CP.js";
7
7
  import {
8
8
  FormControlController
9
9
  } from "./chunk.KIFBWPW5.js";
10
+ import {
11
+ HasSlotController
12
+ } from "./chunk.YIY5RM53.js";
10
13
  import {
11
14
  watch
12
15
  } from "./chunk.6IH66JBY.js";
@@ -34,6 +37,7 @@ var DSACheckbox = class extends ShoelaceElement {
34
37
  defaultValue: (control) => control.defaultChecked,
35
38
  setValue: (control, checked) => control.checked = checked
36
39
  });
40
+ this.hasSlotController = new HasSlotController(this, "[default]");
37
41
  this.hasFocus = false;
38
42
  this.title = "";
39
43
  this.name = "";
@@ -47,6 +51,7 @@ var DSACheckbox = class extends ShoelaceElement {
47
51
  this.errorMessage = "";
48
52
  this.form = "";
49
53
  this.required = false;
54
+ this.ariaLabel = "";
50
55
  }
51
56
  /** Gets the validity state object */
52
57
  get validity() {
@@ -127,6 +132,7 @@ var DSACheckbox = class extends ShoelaceElement {
127
132
  this.formControlController.updateValidity();
128
133
  }
129
134
  render() {
135
+ const hasLabelSlot = this.hasSlotController.test("[default]");
130
136
  return html`
131
137
  <div
132
138
  part="base"
@@ -147,6 +153,7 @@ var DSACheckbox = class extends ShoelaceElement {
147
153
  "checkbox--readonly": this.readonly,
148
154
  "checkbox--focused": this.hasFocus,
149
155
  "checkbox--indeterminate": this.indeterminate,
156
+ "checkbox--has-label": hasLabelSlot,
150
157
  "checkbox--small": this.size === "small",
151
158
  "checkbox--medium": this.size === "medium",
152
159
  "checkbox--large": this.size === "large"
@@ -162,6 +169,7 @@ var DSACheckbox = class extends ShoelaceElement {
162
169
  .checked=${live(this.checked)}
163
170
  .disabled=${this.disabled || this.readonly}
164
171
  .required=${this.required}
172
+ aria-label=${ifDefinedAndNotEmpty(this.ariaLabel)}
165
173
  aria-checked=${this.checked ? "true" : "false"}
166
174
  aria-describedby=${ifDefined(this.error ? "error-text" : void 0)}
167
175
  @click=${this.handleClick}
@@ -254,6 +262,9 @@ __decorateClass([
254
262
  __decorateClass([
255
263
  property({ type: Boolean, reflect: true })
256
264
  ], DSACheckbox.prototype, "required", 2);
265
+ __decorateClass([
266
+ property({ attribute: "aria-label" })
267
+ ], DSACheckbox.prototype, "ariaLabel", 2);
257
268
  __decorateClass([
258
269
  watch("disabled", { waitUntilFirstUpdate: true })
259
270
  ], DSACheckbox.prototype, "handleDisabledChange", 1);
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  DSATableCell
3
- } from "./chunk.C33YMWL6.js";
3
+ } from "./chunk.V5O2GRVM.js";
4
4
  import {
5
5
  table_header_cell_styles_default
6
- } from "./chunk.6OP6GCU4.js";
6
+ } from "./chunk.R4Y6XOHR.js";
7
7
  import {
8
8
  LocalizeController
9
- } from "./chunk.KZIAHLAV.js";
9
+ } from "./chunk.27JQOQHL.js";
10
10
  import {
11
11
  TABLE_SORT_CYCLE
12
12
  } from "./chunk.HB7A2UQ7.js";
@@ -27,6 +27,7 @@ var DSATableHeaderCell = class extends DSATableCell {
27
27
  this.localize = new LocalizeController(this);
28
28
  this.nextSortDirection = this.getNextSortDirection();
29
29
  this.isHovered = false;
30
+ this.textContent = "";
30
31
  this.role = "columnheader";
31
32
  this.sortable = false;
32
33
  this.alignment = "left";
@@ -60,6 +61,10 @@ var DSATableHeaderCell = class extends DSATableCell {
60
61
  handleMouseOut() {
61
62
  this.isHovered = false;
62
63
  }
64
+ handleSlotChange() {
65
+ var _a;
66
+ this.textContent = (_a = this.innerText) != null ? _a : "";
67
+ }
63
68
  handleSortableChange() {
64
69
  if (this.sortable) {
65
70
  this.setAttribute("aria-sort", this.sortDirection);
@@ -86,6 +91,9 @@ var DSATableHeaderCell = class extends DSATableCell {
86
91
  this.button.blur();
87
92
  }
88
93
  render() {
94
+ if (this.loading) {
95
+ return html`<dsa-skeleton effect=${this.skeletonEffect}></dsa-skeleton>`;
96
+ }
89
97
  if (this.sortable) {
90
98
  const visualSortDirection = this.isHovered ? this.nextSortDirection : this.sortDirection;
91
99
  return html`
@@ -94,7 +102,8 @@ var DSATableHeaderCell = class extends DSATableCell {
94
102
  part="sort-button"
95
103
  aria-label=${this.localize.term(
96
104
  "nextSortDirection",
97
- this.nextSortDirection
105
+ this.nextSortDirection,
106
+ this.innerText
98
107
  )}
99
108
  class=${classMap({
100
109
  "sort-button--align-right": this.alignment === "right",
@@ -104,7 +113,7 @@ var DSATableHeaderCell = class extends DSATableCell {
104
113
  @mouseover=${this.handleMouseOver}
105
114
  @mouseout=${this.handleMouseOut}
106
115
  >
107
- <slot></slot>
116
+ <slot @slotchange=${this.handleSlotChange}></slot>
108
117
  <dsa-icon
109
118
  class=${classMap({
110
119
  "sort-button-icon": true,
@@ -129,6 +138,9 @@ __decorateClass([
129
138
  __decorateClass([
130
139
  state()
131
140
  ], DSATableHeaderCell.prototype, "isHovered", 2);
141
+ __decorateClass([
142
+ state()
143
+ ], DSATableHeaderCell.prototype, "textContent", 2);
132
144
  __decorateClass([
133
145
  property({ reflect: true })
134
146
  ], DSATableHeaderCell.prototype, "role", 2);