@ds-autonomie/web-components 2.5.0 → 2.5.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 (175) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/cdn/chunks/{chunk.J5KWVZHL.js → chunk.2BQQJKFU.js} +19 -111
  3. package/cdn/chunks/{chunk.A5QRPK4Q.js → chunk.3XJTVFZ2.js} +1 -1
  4. package/cdn/chunks/{chunk.3OSWL542.js → chunk.53DHJKYL.js} +0 -6
  5. package/cdn/chunks/{chunk.5BQ2BGS6.js → chunk.6KSC4CRL.js} +1 -0
  6. package/cdn/chunks/{chunk.HG4TPK7J.js → chunk.7CBNLWGC.js} +15 -153
  7. package/cdn/chunks/{chunk.5UVKMYSG.js → chunk.BQX4GGIU.js} +18 -12
  8. package/cdn/chunks/{chunk.H2OEFMQC.js → chunk.BWYI3OOJ.js} +0 -6
  9. package/cdn/chunks/chunk.CAWNJ57J.js +291 -0
  10. package/cdn/chunks/{chunk.URME4YZI.js → chunk.E2ERJT5L.js} +4 -121
  11. package/cdn/chunks/{chunk.CMRQV2SO.js → chunk.EVV7CPIX.js} +3 -3
  12. package/cdn/chunks/{chunk.2N65UIM6.js → chunk.IPKU2NK6.js} +23 -1
  13. package/cdn/chunks/{chunk.UM64ZD3C.js → chunk.JUCW3BPM.js} +1 -1
  14. package/cdn/chunks/{chunk.EF2VOGBL.js → chunk.LYIECKOK.js} +1 -1
  15. package/cdn/chunks/{chunk.WLND36JK.js → chunk.MMT7DZQU.js} +19 -10
  16. package/cdn/chunks/{chunk.BKVL3A5I.js → chunk.MRBMS4RB.js} +6 -2
  17. package/cdn/chunks/{chunk.VRC57YIG.js → chunk.NNXRECFT.js} +1 -1
  18. package/cdn/chunks/chunk.NON7TU3E.js +15 -0
  19. package/cdn/chunks/{chunk.L3ZYNSI3.js → chunk.OCDDQJHV.js} +3 -3
  20. package/cdn/chunks/{chunk.BNLQUWBO.js → chunk.OQUR5UM4.js} +1 -1
  21. package/cdn/chunks/{chunk.LZCR7P7U.js → chunk.PQ4KTIXS.js} +3 -129
  22. package/cdn/chunks/chunk.PT3QFRYN.js +336 -0
  23. package/cdn/chunks/{chunk.AJFNFADL.js → chunk.QUA6RD7E.js} +1 -1
  24. package/cdn/chunks/{chunk.TY7NQYTC.js → chunk.T6APUNAB.js} +21 -113
  25. package/cdn/chunks/{chunk.2YVHHVLG.js → chunk.UORXHDBJ.js} +3 -2
  26. package/cdn/chunks/{chunk.2FF44G4Y.js → chunk.WWI5IYQY.js} +3 -3
  27. package/cdn/chunks/{chunk.JVTWZUNG.js → chunk.XODAGFNB.js} +1 -1
  28. package/cdn/chunks/chunk.YGJ3KERC.js +290 -0
  29. package/cdn/chunks/{chunk.3KJHZGAI.js → chunk.ZHNP2Z3B.js} +1 -1
  30. package/cdn/components/checkbox/checkbox.js +3 -3
  31. package/cdn/components/checkbox-button/checkbox-button.js +2 -2
  32. package/cdn/components/checkbox-card/checkbox-card.js +2 -2
  33. package/cdn/components/checkbox-group/checkbox-group.js +1 -1
  34. package/cdn/components/filter-counter/filter-counter.js +11 -8
  35. package/cdn/components/filter-date/filter-date.js +1 -1
  36. package/cdn/components/filter-range/filter-range.js +11 -8
  37. package/cdn/components/filter-select/filter-select.js +12 -9
  38. package/cdn/components/input/input.d.ts +13 -77
  39. package/cdn/components/input/input.js +11 -8
  40. package/cdn/components/input-date/input-date.d.ts +4 -42
  41. package/cdn/components/input-date/input-date.js +5 -4
  42. package/cdn/components/input-date/input-date.styles.js +2 -2
  43. package/cdn/components/input-mask/input-mask.d.ts +3 -50
  44. package/cdn/components/input-mask/input-mask.js +2 -1
  45. package/cdn/components/input-native/input-native.d.ts +57 -0
  46. package/cdn/components/input-native/input-native.js +43 -0
  47. package/cdn/components/{input/input.styles.js → input-native/input-native.styles.js} +4 -3
  48. package/cdn/components/{input/input.utils.d.ts → input-native/input-native.utils.d.ts} +1 -1
  49. package/cdn/components/{input/input.utils.js → input-native/input-native.utils.js} +1 -1
  50. package/cdn/components/input-otp/input-otp.d.ts +6 -50
  51. package/cdn/components/input-otp/input-otp.js +2 -1
  52. package/cdn/components/input-phone/input-phone.d.ts +5 -36
  53. package/cdn/components/input-phone/input-phone.js +2 -1
  54. package/cdn/components/input-time/input-time.d.ts +5 -54
  55. package/cdn/components/input-time/input-time.js +4 -3
  56. package/cdn/components/input-time/input-time.styles.js +2 -2
  57. package/cdn/components/pagination/pagination.js +11 -8
  58. package/cdn/components/radio/radio.js +1 -1
  59. package/cdn/components/radio-card/radio-card.js +2 -2
  60. package/cdn/components/tab-group/tab-group.d.ts +2 -0
  61. package/cdn/components/tab-group/tab-group.js +1 -1
  62. package/cdn/components/table/table.js +2 -2
  63. package/cdn/components/table/table.styles.js +1 -1
  64. package/cdn/components/table-body/table-body.js +3 -3
  65. package/cdn/components/table-head/table-head.js +3 -3
  66. package/cdn/components/table-header-cell/table-header-cell.js +2 -2
  67. package/cdn/components/table-header-cell/table-header-cell.styles.js +1 -1
  68. package/cdn/components/table-header-row/table-header-row.js +5 -5
  69. package/cdn/components/table-row/table-row.js +3 -3
  70. package/cdn/components/tree/tree.js +5 -5
  71. package/cdn/components/tree-item/tree-item.js +3 -3
  72. package/cdn/custom-elements.json +750 -2288
  73. package/cdn/design-system.js +70 -67
  74. package/cdn/internal/components/checkbox-box/checkbox-box.styles.js +0 -6
  75. package/cdn/internal/components/date-field/date-field.d.ts +11 -0
  76. package/cdn/internal/components/date-field/date-field.js +23 -1
  77. package/cdn/internal/components/input-base/input-base.d.ts +118 -0
  78. package/cdn/internal/components/input-base/input-base.js +313 -0
  79. package/cdn/internal/components/input-base/input-base.styles.js +302 -0
  80. package/cdn/internal/components/input-base/input-base.utils.d.ts +1 -0
  81. package/cdn/internal/components/input-base/input-base.utils.js +1 -0
  82. package/cdn/internal/components/radio-icon/radio-icon.styles.js +0 -6
  83. package/cdn/vscode.html-custom-data.json +15 -320
  84. package/cdn/web-types.json +200 -1244
  85. package/dist/chunks/chunk.3CWUZQRT.js +325 -0
  86. package/dist/chunks/{chunk.OKUA77L4.js → chunk.4S7APMGY.js} +18 -12
  87. package/dist/chunks/{chunk.PWVYG6XN.js → chunk.4ZAABSYS.js} +0 -6
  88. package/dist/chunks/{chunk.IE7IGJZB.js → chunk.63BQQE4G.js} +23 -1
  89. package/dist/chunks/{chunk.OWV6XZFR.js → chunk.7QLR3F26.js} +1 -1
  90. package/dist/chunks/{chunk.XVFPRM26.js → chunk.AHHKOQL3.js} +1 -1
  91. package/dist/chunks/{chunk.P2LEUT2Q.js → chunk.BYB2ODNQ.js} +4 -121
  92. package/dist/chunks/{chunk.3ZF3W6DC.js → chunk.DHCXNXX3.js} +1 -1
  93. package/dist/chunks/chunk.DJNQIAYV.js +283 -0
  94. package/dist/chunks/{chunk.DRFXWCPL.js → chunk.DKIEKIV4.js} +3 -129
  95. package/dist/chunks/{chunk.OHDR6G6J.js → chunk.DMIXIORN.js} +3 -3
  96. package/dist/chunks/{chunk.IICLN6L3.js → chunk.DUPWIWDC.js} +15 -153
  97. package/dist/chunks/{chunk.Z2A5AEMU.js → chunk.DXRDCCL4.js} +1 -1
  98. package/dist/chunks/{chunk.54CFE45F.js → chunk.L2B7WMWE.js} +3 -3
  99. package/dist/chunks/{chunk.62WXVS5Q.js → chunk.NKOMMJMK.js} +6 -2
  100. package/dist/chunks/{chunk.7XUPS5FG.js → chunk.PHSUFADX.js} +1 -0
  101. package/dist/chunks/chunk.QFO2VDJ3.js +286 -0
  102. package/dist/chunks/{chunk.DFBKUH2U.js → chunk.RGHMS6RU.js} +1 -1
  103. package/dist/chunks/{chunk.ORLKMJIV.js → chunk.SFD6GJDA.js} +19 -10
  104. package/dist/chunks/{chunk.ZRW5L2NC.js → chunk.SGKW2DOH.js} +3 -2
  105. package/dist/chunks/{chunk.H7ZLX7SO.js → chunk.TODRUEYV.js} +3 -3
  106. package/dist/chunks/chunk.ULPMZDTP.js +13 -0
  107. package/dist/chunks/{chunk.2BZBH3CX.js → chunk.URDP5HQR.js} +0 -6
  108. package/dist/chunks/{chunk.EY2LRNGD.js → chunk.X6M22EYD.js} +21 -113
  109. package/dist/chunks/{chunk.OMUELARQ.js → chunk.Y4CDJYQO.js} +19 -111
  110. package/dist/chunks/{chunk.RS4S7SAD.js → chunk.Y6XPKQ25.js} +1 -1
  111. package/dist/chunks/{chunk.Y3I7GUNB.js → chunk.Z42XBNIN.js} +1 -1
  112. package/dist/chunks/{chunk.DISFQ7ZU.js → chunk.ZMMQOF24.js} +1 -1
  113. package/dist/components/checkbox/checkbox.js +3 -3
  114. package/dist/components/checkbox-button/checkbox-button.js +2 -2
  115. package/dist/components/checkbox-card/checkbox-card.js +2 -2
  116. package/dist/components/checkbox-group/checkbox-group.js +1 -1
  117. package/dist/components/filter-counter/filter-counter.js +11 -8
  118. package/dist/components/filter-date/filter-date.js +1 -1
  119. package/dist/components/filter-range/filter-range.js +11 -8
  120. package/dist/components/filter-select/filter-select.js +12 -9
  121. package/dist/components/input/input.d.ts +13 -77
  122. package/dist/components/input/input.js +11 -8
  123. package/dist/components/input-date/input-date.d.ts +4 -42
  124. package/dist/components/input-date/input-date.js +5 -4
  125. package/dist/components/input-date/input-date.styles.js +2 -2
  126. package/dist/components/input-mask/input-mask.d.ts +3 -50
  127. package/dist/components/input-mask/input-mask.js +2 -1
  128. package/dist/components/input-native/input-native.d.ts +57 -0
  129. package/dist/components/input-native/input-native.js +35 -0
  130. package/dist/components/input-native/input-native.styles.d.ts +2 -0
  131. package/dist/components/input-native/input-native.styles.js +10 -0
  132. package/dist/components/{input/input.utils.d.ts → input-native/input-native.utils.d.ts} +1 -1
  133. package/dist/components/{input/input.utils.js → input-native/input-native.utils.js} +1 -1
  134. package/dist/components/input-otp/input-otp.d.ts +6 -50
  135. package/dist/components/input-otp/input-otp.js +2 -1
  136. package/dist/components/input-phone/input-phone.d.ts +5 -36
  137. package/dist/components/input-phone/input-phone.js +2 -1
  138. package/dist/components/input-time/input-time.d.ts +5 -54
  139. package/dist/components/input-time/input-time.js +4 -3
  140. package/dist/components/input-time/input-time.styles.js +2 -2
  141. package/dist/components/pagination/pagination.js +11 -8
  142. package/dist/components/radio/radio.js +1 -1
  143. package/dist/components/radio-card/radio-card.js +2 -2
  144. package/dist/components/tab-group/tab-group.d.ts +2 -0
  145. package/dist/components/tab-group/tab-group.js +1 -1
  146. package/dist/components/table/table.js +2 -2
  147. package/dist/components/table/table.styles.js +1 -1
  148. package/dist/components/table-body/table-body.js +3 -3
  149. package/dist/components/table-head/table-head.js +3 -3
  150. package/dist/components/table-header-cell/table-header-cell.js +2 -2
  151. package/dist/components/table-header-cell/table-header-cell.styles.js +1 -1
  152. package/dist/components/table-header-row/table-header-row.js +5 -5
  153. package/dist/components/table-row/table-row.js +3 -3
  154. package/dist/components/tree/tree.js +5 -5
  155. package/dist/components/tree-item/tree-item.js +3 -3
  156. package/dist/custom-elements.json +750 -2288
  157. package/dist/design-system.js +70 -67
  158. package/dist/internal/components/checkbox-box/checkbox-box.styles.js +0 -6
  159. package/dist/internal/components/date-field/date-field.d.ts +11 -0
  160. package/dist/internal/components/date-field/date-field.js +23 -1
  161. package/dist/internal/components/input-base/input-base.d.ts +118 -0
  162. package/dist/internal/components/input-base/input-base.js +313 -0
  163. package/dist/internal/components/input-base/input-base.styles.d.ts +2 -0
  164. package/dist/internal/components/input-base/input-base.styles.js +302 -0
  165. package/dist/internal/components/input-base/input-base.utils.d.ts +1 -0
  166. package/dist/internal/components/input-base/input-base.utils.js +1 -0
  167. package/dist/internal/components/radio-icon/radio-icon.styles.js +0 -6
  168. package/dist/vscode.html-custom-data.json +15 -320
  169. package/dist/web-types.json +200 -1244
  170. package/package.json +17 -17
  171. package/cdn/chunks/chunk.5F7AUS4F.js +0 -703
  172. package/dist/chunks/chunk.JJT6FP7U.js +0 -690
  173. package/dist/components/input/input.styles.js +0 -9
  174. /package/cdn/components/{input/input.styles.d.ts → input-native/input-native.styles.d.ts} +0 -0
  175. /package/{dist/components/input/input.styles.d.ts → cdn/internal/components/input-base/input-base.styles.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @ds-autonomie/web-components
2
2
 
3
+ ## 2.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 20ad518: `input`, `input-phone`, `input-otp` : communalisation du code
8
+ - 5e7de2a: `checkbox`: correction d'un bug empechant l'utilisation de liens dans le label
9
+ - 0258fb3: `tab-group`: retrait du focus sur les flèches de scroll et le groupe
10
+ - b163af1: `checkbox-group`: attente du chargement des composants enfants
11
+ `tab-group`: attente du chargement des composants enfants
12
+ `tree`: attente du chargement des composants enfants
13
+ - 7387de1: `table-header-cell`: restriction de l'effet de survol aux tableaux triables, élargissement du bouton de tri
14
+
3
15
  ## 2.5.0
4
16
 
5
17
  ### Minor Changes
@@ -17,17 +17,11 @@ import {
17
17
  stripSpecialChars
18
18
  } from "./chunk.7OLEA3GQ.js";
19
19
  import {
20
- FormControlLayout
21
- } from "./chunk.E73QKLNL.js";
20
+ InputBase
21
+ } from "./chunk.YGJ3KERC.js";
22
22
  import {
23
23
  l
24
24
  } from "./chunk.7PPSHHT2.js";
25
- import {
26
- defaultValue
27
- } from "./chunk.YY5FKN3H.js";
28
- import {
29
- FormControlController
30
- } from "./chunk.3NWILHZZ.js";
31
25
  import {
32
26
  LocalizeController
33
27
  } from "./chunk.CAMVBH5H.js";
@@ -57,14 +51,10 @@ import {
57
51
  } from "./chunk.4ZGVANML.js";
58
52
 
59
53
  // src/components/input-phone/input-phone.ts
60
- var DSAInputPhone = class extends FormControlLayout {
54
+ var DSAInputPhone = class extends InputBase {
61
55
  constructor() {
62
56
  super(...arguments);
63
- this.formControlController = new FormControlController(this, {
64
- assumeInteractionOn: ["dsa-blur", "dsa-input"]
65
- });
66
57
  this.localize = new LocalizeController(this);
67
- this.hasFocus = false;
68
58
  this.maskedNumber = "";
69
59
  this.phoneConfig = getPhoneConfig("+33");
70
60
  this.placeholder = this.phoneConfig.placeholder;
@@ -72,8 +62,6 @@ var DSAInputPhone = class extends FormControlLayout {
72
62
  this.value = "";
73
63
  this.phonePrefix = "+33";
74
64
  this.phoneNumber = "";
75
- this.defaultValue = "";
76
- this.clearable = false;
77
65
  this.inputPrefix = "";
78
66
  this.placement = "bottom-start";
79
67
  }
@@ -85,27 +73,20 @@ var DSAInputPhone = class extends FormControlLayout {
85
73
  patternMatch = matches !== null;
86
74
  }
87
75
  const validityState = {
88
- badInput: this.inputEl.validity.badInput,
89
- customError: this.inputEl.validity.customError,
76
+ badInput: this.input.validity.badInput,
77
+ customError: this.input.validity.customError,
90
78
  patternMismatch: !patternMatch,
91
- rangeOverflow: this.inputEl.validity.rangeOverflow,
92
- rangeUnderflow: this.inputEl.validity.rangeUnderflow,
93
- stepMismatch: this.inputEl.validity.stepMismatch,
94
- tooLong: this.inputEl.validity.tooLong,
95
- tooShort: this.inputEl.validity.tooShort,
96
- typeMismatch: this.inputEl.validity.typeMismatch,
97
- valid: patternMatch !== void 0 ? patternMatch : this.inputEl.validity.valid,
98
- valueMissing: this.inputEl.validity.valueMissing
79
+ rangeOverflow: this.input.validity.rangeOverflow,
80
+ rangeUnderflow: this.input.validity.rangeUnderflow,
81
+ stepMismatch: this.input.validity.stepMismatch,
82
+ tooLong: this.input.validity.tooLong,
83
+ tooShort: this.input.validity.tooShort,
84
+ typeMismatch: this.input.validity.typeMismatch,
85
+ valid: patternMatch !== void 0 ? patternMatch : this.input.validity.valid,
86
+ valueMissing: this.input.validity.valueMissing
99
87
  };
100
88
  return validityState;
101
89
  }
102
- /** Gets the validation message */
103
- get validationMessage() {
104
- return this.inputEl.validationMessage;
105
- }
106
- firstUpdated() {
107
- this.formControlController.updateValidity();
108
- }
109
90
  connectedCallback() {
110
91
  super.connectedCallback();
111
92
  this.defaultValue = this.value;
@@ -116,7 +97,7 @@ var DSAInputPhone = class extends FormControlLayout {
116
97
  );
117
98
  }
118
99
  handleDocumentKeyUp() {
119
- const strippedValue = stripSpecialChars(this.inputEl.value);
100
+ const strippedValue = stripSpecialChars(this.input.value);
120
101
  const newValue = maskedValueToRawValue(
121
102
  strippedValue,
122
103
  this.phoneConfig.mask
@@ -124,7 +105,7 @@ var DSAInputPhone = class extends FormControlLayout {
124
105
  const maskedValue = rawValueToMaskedValue(newValue, this.placeholder);
125
106
  this.phoneNumber = newValue;
126
107
  this.maskedNumber = maskedValue;
127
- this.inputEl.value = maskedValue;
108
+ this.input.value = maskedValue;
128
109
  this.updateValue();
129
110
  this.formControlController.updateValidity();
130
111
  this.emit("dsa-input");
@@ -177,28 +158,6 @@ var DSAInputPhone = class extends FormControlLayout {
177
158
  this.emit("dsa-change");
178
159
  }
179
160
  }
180
- handleKeyDown(event) {
181
- const hasModifier = event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;
182
- if (event.key === "Enter" && !hasModifier) {
183
- setTimeout(() => {
184
- if (!event.defaultPrevented && !event.isComposing) {
185
- this.formControlController.submit();
186
- }
187
- });
188
- }
189
- }
190
- handleFocus() {
191
- this.hasFocus = true;
192
- this.emit("dsa-focus");
193
- }
194
- handleBlur() {
195
- this.hasFocus = false;
196
- this.emit("dsa-blur");
197
- }
198
- handleInvalid(event) {
199
- this.formControlController.setValidity(false);
200
- this.formControlController.emitInvalidEvent(event);
201
- }
202
161
  // Clear Icon handlers
203
162
  handleClearIconClick(event) {
204
163
  this.phonePrefix = "+33";
@@ -206,7 +165,7 @@ var DSAInputPhone = class extends FormControlLayout {
206
165
  this.emit("dsa-clear");
207
166
  this.emit("dsa-input");
208
167
  this.emit("dsa-change");
209
- this.inputEl.focus();
168
+ this.input.focus();
210
169
  event.stopPropagation();
211
170
  }
212
171
  getDescriptionIds() {
@@ -240,37 +199,10 @@ var DSAInputPhone = class extends FormControlLayout {
240
199
  handlePhoneChange() {
241
200
  this.updateValue();
242
201
  }
243
- /** Sets focus on the input. */
244
- focus(options) {
245
- this.inputEl.focus(options);
246
- }
247
- /** Removes focus from the input. */
248
- blur() {
249
- this.inputEl.blur();
250
- }
251
- /** Selects all the text in the input. */
252
- select() {
253
- this.inputEl.select();
254
- }
255
- /** Sets the start and end positions of the text selection (0-based). */
256
- setSelectionRange(selectionStart, selectionEnd, selectionDirection = "none") {
257
- this.inputEl.setSelectionRange(
258
- selectionStart,
259
- selectionEnd,
260
- selectionDirection
261
- );
262
- }
263
- /** Replaces a range of text with a new string. */
264
- setRangeText(replacement, start, end, selectMode) {
265
- this.inputEl.setRangeText(replacement, start, end, selectMode);
266
- if (this.phoneNumber !== this.inputEl.value) {
267
- this.phoneNumber = this.inputEl.value;
268
- }
269
- }
270
202
  /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
271
203
  checkValidity() {
272
204
  var _a;
273
- const isValidInput = (_a = this.inputEl) == null ? void 0 : _a.checkValidity();
205
+ const isValidInput = (_a = this.input) == null ? void 0 : _a.checkValidity();
274
206
  if (this.phoneNumber.length === 0) {
275
207
  return isValidInput != null ? isValidInput : false;
276
208
  }
@@ -278,14 +210,10 @@ var DSAInputPhone = class extends FormControlLayout {
278
210
  const patternMatch = matches !== null;
279
211
  return patternMatch;
280
212
  }
281
- /** Gets the associated form, if one exists. */
282
- getForm() {
283
- return this.formControlController.getForm();
284
- }
285
213
  /** Checks for validity and shows the browser's validation message if the control is invalid. */
286
214
  reportValidity() {
287
215
  var _a;
288
- const isValidInput = (_a = this.inputEl) == null ? void 0 : _a.reportValidity();
216
+ const isValidInput = (_a = this.input) == null ? void 0 : _a.reportValidity();
289
217
  if (this.phoneNumber.length === 0) {
290
218
  return isValidInput != null ? isValidInput : false;
291
219
  }
@@ -293,11 +221,6 @@ var DSAInputPhone = class extends FormControlLayout {
293
221
  const patternMatch = matches !== null;
294
222
  return patternMatch;
295
223
  }
296
- /** Sets a custom validation message. Pass an empty string to restore validity. */
297
- setCustomValidity(message) {
298
- this.inputEl.setCustomValidity(message);
299
- this.formControlController.updateValidity();
300
- }
301
224
  renderInput() {
302
225
  var _a;
303
226
  const hasLabelSlot = this.hasSlotController.test("label");
@@ -426,13 +349,10 @@ var DSAInputPhone = class extends FormControlLayout {
426
349
  DSAInputPhone.styles = input_phone_styles_default;
427
350
  __decorateClass([
428
351
  e(".input-phone__control")
429
- ], DSAInputPhone.prototype, "inputEl", 2);
352
+ ], DSAInputPhone.prototype, "input", 2);
430
353
  __decorateClass([
431
354
  e(".input-phone__select")
432
355
  ], DSAInputPhone.prototype, "phonePrefixEl", 2);
433
- __decorateClass([
434
- r()
435
- ], DSAInputPhone.prototype, "hasFocus", 2);
436
356
  __decorateClass([
437
357
  r()
438
358
  ], DSAInputPhone.prototype, "maskedNumber", 2);
@@ -454,21 +374,9 @@ __decorateClass([
454
374
  __decorateClass([
455
375
  n({ attribute: false })
456
376
  ], DSAInputPhone.prototype, "phoneNumber", 2);
457
- __decorateClass([
458
- defaultValue()
459
- ], DSAInputPhone.prototype, "defaultValue", 2);
460
- __decorateClass([
461
- n({ type: Boolean })
462
- ], DSAInputPhone.prototype, "clearable", 2);
463
377
  __decorateClass([
464
378
  n({ attribute: "input-prefix" })
465
379
  ], DSAInputPhone.prototype, "inputPrefix", 2);
466
- __decorateClass([
467
- n({ type: Boolean })
468
- ], DSAInputPhone.prototype, "autofocus", 2);
469
- __decorateClass([
470
- n()
471
- ], DSAInputPhone.prototype, "enterkeyhint", 2);
472
380
  __decorateClass([
473
381
  n({ reflect: true })
474
382
  ], DSAInputPhone.prototype, "placement", 2);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  table_styles_default
3
- } from "./chunk.5BQ2BGS6.js";
3
+ } from "./chunk.6KSC4CRL.js";
4
4
  import {
5
5
  watch
6
6
  } from "./chunk.4FQJ3QJK.js";
@@ -22,12 +22,6 @@ var radio_icon_styles_default = i`
22
22
  display: contents;
23
23
  }
24
24
 
25
- :host::after {
26
- content: '';
27
- position: absolute;
28
- inset: 0;
29
- }
30
-
31
25
  .radio__control--small {
32
26
  --toggle-size: var(--dsa-wc-radio-size-small);
33
27
  --toggle-inner-size: var(--dsa-wc-radio-inner-size-small);
@@ -12,6 +12,7 @@ var table_styles_default = i`
12
12
  :host {
13
13
  display: table;
14
14
  width: 100%;
15
+ height: 100%;
15
16
  }
16
17
  `;
17
18
 
@@ -1,26 +1,20 @@
1
+ import {
2
+ input_time_styles_default
3
+ } from "./chunk.WWI5IYQY.js";
1
4
  import {
2
5
  compareTimeStrings,
3
6
  setTimeStringValue,
4
7
  timeStringToObject
5
8
  } from "./chunk.IONY2GZF.js";
6
9
  import {
7
- input_time_styles_default
8
- } from "./chunk.2FF44G4Y.js";
9
- import {
10
- FormControlLayout
11
- } from "./chunk.E73QKLNL.js";
10
+ InputBase
11
+ } from "./chunk.YGJ3KERC.js";
12
12
  import {
13
13
  scrollIntoView
14
14
  } from "./chunk.EMIT7S33.js";
15
15
  import {
16
16
  l
17
17
  } from "./chunk.7PPSHHT2.js";
18
- import {
19
- defaultValue
20
- } from "./chunk.YY5FKN3H.js";
21
- import {
22
- FormControlController
23
- } from "./chunk.3NWILHZZ.js";
24
18
  import {
25
19
  waitForEvent
26
20
  } from "./chunk.B4BZKR24.js";
@@ -61,40 +55,21 @@ import {
61
55
  } from "./chunk.4ZGVANML.js";
62
56
 
63
57
  // src/components/input-time/input-time.ts
64
- var DSAInputTime = class extends FormControlLayout {
58
+ var DSAInputTime = class extends InputBase {
65
59
  constructor() {
66
60
  super(...arguments);
67
- this.formControlController = new FormControlController(this, {
68
- assumeInteractionOn: ["dsa-blur", "dsa-input"]
69
- });
70
61
  this.localize = new LocalizeController(this);
71
62
  this.isTimePickerOpen = false;
72
- this.hasFocus = false;
73
- this.value = "";
74
- this.defaultValue = "";
75
- this.clearable = false;
76
63
  this.min = "00:00";
77
64
  this.max = "23:59";
78
65
  this.step = 60;
79
66
  }
80
- /** Gets the validity state object */
81
- get validity() {
82
- return this.nativeInput.validity;
83
- }
84
- /** Gets the validation message */
85
- get validationMessage() {
86
- return this.nativeInput.validationMessage;
87
- }
88
67
  connectedCallback() {
89
68
  super.connectedCallback();
90
69
  this.handleDocumentFocusIn = this.handleDocumentFocusIn.bind(this);
91
70
  this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);
92
71
  this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this);
93
72
  }
94
- async firstUpdated() {
95
- await this.updateComplete;
96
- this.formControlController.updateValidity();
97
- }
98
73
  //Adds opened dropdown event listeners
99
74
  addOpenListeners() {
100
75
  document.addEventListener("focusin", this.handleDocumentFocusIn);
@@ -141,43 +116,8 @@ var DSAInputTime = class extends FormControlLayout {
141
116
  this.toggleTimePicker();
142
117
  }
143
118
  }
144
- handleInputBlur() {
145
- this.hasFocus = false;
146
- this.emit("dsa-blur");
147
- }
148
- handleInputChange() {
149
- this.emit("dsa-change");
150
- }
151
- handleInputClearClick(event) {
152
- this.value = "";
153
- this.emit("dsa-clear");
154
- this.emit("dsa-input");
155
- this.emit("dsa-change");
156
- this.nativeInput.focus();
157
- event.stopPropagation();
158
- }
159
- handleInputFocus() {
160
- this.hasFocus = true;
161
- this.emit("dsa-focus");
162
- }
163
- handleInputInput() {
164
- this.value = this.nativeInput.value;
165
- this.formControlController.updateValidity();
166
- this.emit("dsa-input");
167
- }
168
- handleInputInvalid(event) {
169
- this.formControlController.setValidity(false);
170
- this.formControlController.emitInvalidEvent(event);
171
- }
172
- handleInputKeyDown(event) {
173
- const hasModifier = event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;
174
- if (event.key === "Enter" && !hasModifier) {
175
- setTimeout(() => {
176
- if (!event.defaultPrevented && !event.isComposing) {
177
- this.formControlController.submit();
178
- }
179
- });
180
- }
119
+ handleKeyDown(event) {
120
+ super.handleKeyDown(event);
181
121
  if (event.key === " ") {
182
122
  event.preventDefault();
183
123
  this.showTimePicker();
@@ -189,13 +129,6 @@ var DSAInputTime = class extends FormControlLayout {
189
129
  ids = [...ids, "selected-value", "help-text", "description"];
190
130
  return ids.join(" ");
191
131
  }
192
- handleDisabledChange() {
193
- this.formControlController.setValidity(this.disabled);
194
- }
195
- handleStepChange() {
196
- this.nativeInput.step = String(this.step);
197
- this.formControlController.updateValidity();
198
- }
199
132
  async handleValueChange() {
200
133
  await this.updateComplete;
201
134
  this.formControlController.updateValidity();
@@ -232,20 +165,6 @@ var DSAInputTime = class extends FormControlLayout {
232
165
  this.emit("dsa-after-hide");
233
166
  }
234
167
  }
235
- /** Sets focus on the input. */
236
- focus(options) {
237
- this.nativeInput.focus(options);
238
- }
239
- /** Removes focus from the input. */
240
- blur() {
241
- this.nativeInput.blur();
242
- }
243
- /** Selects all the text in the input. */
244
- select() {
245
- if (this.nativeInput instanceof HTMLInputElement) {
246
- this.nativeInput.select();
247
- }
248
- }
249
168
  /** Shows or hides the time picker */
250
169
  toggleTimePicker() {
251
170
  if (!this.isTimePickerOpen) {
@@ -272,33 +191,6 @@ var DSAInputTime = class extends FormControlLayout {
272
191
  this.isTimePickerOpen = false;
273
192
  return await waitForEvent(this, "dsa-after-hide");
274
193
  }
275
- /** Passes the stepUp method to the native input element */
276
- stepUp(stepNumber) {
277
- this.nativeInput.stepUp(stepNumber);
278
- this.value = this.nativeInput.value;
279
- }
280
- /** Passes the stepDown method to the native input element */
281
- stepDown(stepNumber) {
282
- this.nativeInput.stepDown(stepNumber);
283
- this.value = this.nativeInput.value;
284
- }
285
- /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
286
- checkValidity() {
287
- return this.nativeInput.checkValidity();
288
- }
289
- /** Gets the associated form, if one exists. */
290
- getForm() {
291
- return this.formControlController.getForm();
292
- }
293
- /** Checks for validity and shows the browser's validation message if the control is invalid. */
294
- reportValidity() {
295
- return this.nativeInput.reportValidity();
296
- }
297
- /** Sets a custom validation message. Pass an empty string to restore validity. */
298
- setCustomValidity(message) {
299
- this.nativeInput.setCustomValidity(message);
300
- this.formControlController.updateValidity();
301
- }
302
194
  scrollSelectedTimeUnitsIntoView() {
303
195
  const selectedTimeUnits = this.popup.querySelectorAll(
304
196
  '[aria-selected="true"]'
@@ -545,12 +437,12 @@ var DSAInputTime = class extends FormControlLayout {
545
437
  aria-label=${ifDefinedAndNotEmpty(hasLabel ? void 0 : this.title)}
546
438
  aria-describedby=${this.getDescriptionIds()}
547
439
  aria-invalid=${o(this.error ? "true" : void 0)}
548
- @change=${this.handleInputChange}
549
- @input=${this.handleInputInput}
550
- @invalid=${this.handleInputInvalid}
551
- @keydown=${this.handleInputKeyDown}
552
- @focus=${this.handleInputFocus}
553
- @blur=${this.handleInputBlur}
440
+ @change=${this.handleChange}
441
+ @input=${this.handleInput}
442
+ @invalid=${this.handleInvalid}
443
+ @keydown=${this.handleKeyDown}
444
+ @focus=${this.handleFocus}
445
+ @blur=${this.handleBlur}
554
446
  />
555
447
 
556
448
  ${hasSuffixIcon ? x`<slot
@@ -564,7 +456,7 @@ var DSAInputTime = class extends FormControlLayout {
564
456
  class="input__action-button"
565
457
  name="clear"
566
458
  label=${this.localize.term("clearEntry")}
567
- @click=${this.handleInputClearClick}
459
+ @click=${this.handleClearClick}
568
460
  library="system"
569
461
  ></dsa-icon-button>
570
462
  ` : ""}
@@ -613,9 +505,6 @@ var DSAInputTime = class extends FormControlLayout {
613
505
  }
614
506
  };
615
507
  DSAInputTime.styles = input_time_styles_default;
616
- __decorateClass([
617
- e("input")
618
- ], DSAInputTime.prototype, "nativeInput", 2);
619
508
  __decorateClass([
620
509
  e(".icon-button--time")
621
510
  ], DSAInputTime.prototype, "timePickerButton", 2);
@@ -625,18 +514,6 @@ __decorateClass([
625
514
  __decorateClass([
626
515
  r()
627
516
  ], DSAInputTime.prototype, "isTimePickerOpen", 2);
628
- __decorateClass([
629
- r()
630
- ], DSAInputTime.prototype, "hasFocus", 2);
631
- __decorateClass([
632
- n()
633
- ], DSAInputTime.prototype, "value", 2);
634
- __decorateClass([
635
- defaultValue()
636
- ], DSAInputTime.prototype, "defaultValue", 2);
637
- __decorateClass([
638
- n({ type: Boolean })
639
- ], DSAInputTime.prototype, "clearable", 2);
640
517
  __decorateClass([
641
518
  n()
642
519
  ], DSAInputTime.prototype, "min", 2);
@@ -653,21 +530,6 @@ __decorateClass([
653
530
  }
654
531
  })
655
532
  ], DSAInputTime.prototype, "step", 2);
656
- __decorateClass([
657
- n()
658
- ], DSAInputTime.prototype, "autocomplete", 2);
659
- __decorateClass([
660
- n({ type: Boolean })
661
- ], DSAInputTime.prototype, "autofocus", 2);
662
- __decorateClass([
663
- n()
664
- ], DSAInputTime.prototype, "enterkeyhint", 2);
665
- __decorateClass([
666
- watch("disabled", { waitUntilFirstUpdate: true })
667
- ], DSAInputTime.prototype, "handleDisabledChange", 1);
668
- __decorateClass([
669
- watch("step", { waitUntilFirstUpdate: true })
670
- ], DSAInputTime.prototype, "handleStepChange", 1);
671
533
  __decorateClass([
672
534
  watch("value", { waitUntilFirstUpdate: true })
673
535
  ], DSAInputTime.prototype, "handleValueChange", 1);
@@ -154,18 +154,24 @@ var DSACheckboxGroup = class extends ShoelaceElement {
154
154
  }
155
155
  }
156
156
  handleSlotChange() {
157
- const allCheckboxes = this.getAllCheckboxes();
158
- allCheckboxes.forEach((checkbox) => {
159
- checkbox.checked = this.value.includes(checkbox.value);
160
- checkbox.parentDisabled = this.disabled;
161
- checkbox.parentReadonly = this.readonly;
162
- });
163
- this.hasCheckboxButtons = allCheckboxes.some(
164
- (checkbox) => checkbox.tagName.toLowerCase() === "dsa-checkbox-button"
165
- );
166
- this.hasCheckboxCards = allCheckboxes.some(
167
- (checkbox) => checkbox.tagName.toLowerCase() === "dsa-checkbox-card"
168
- );
157
+ if (customElements.get("dsa-checkbox") || customElements.get("dsa-checkbox-button") || customElements.get("dsa-checkbox-card")) {
158
+ const allCheckboxes = this.getAllCheckboxes();
159
+ allCheckboxes.forEach((checkbox) => {
160
+ checkbox.checked = this.value.includes(checkbox.value);
161
+ checkbox.parentDisabled = this.disabled;
162
+ checkbox.parentReadonly = this.readonly;
163
+ });
164
+ this.hasCheckboxButtons = allCheckboxes.some(
165
+ (checkbox) => checkbox.tagName.toLowerCase() === "dsa-checkbox-button"
166
+ );
167
+ this.hasCheckboxCards = allCheckboxes.some(
168
+ (checkbox) => checkbox.tagName.toLowerCase() === "dsa-checkbox-card"
169
+ );
170
+ } else {
171
+ customElements.whenDefined("dsa-checkbox").then(() => this.handleSlotChange());
172
+ customElements.whenDefined("dsa-checkbox-button").then(() => this.handleSlotChange());
173
+ customElements.whenDefined("dsa-checkbox-card").then(() => this.handleSlotChange());
174
+ }
169
175
  }
170
176
  handleInvalid(event) {
171
177
  this.formControlController.setValidity(false);
@@ -22,12 +22,6 @@ var checkbox_box_styles_default = i`
22
22
  display: contents;
23
23
  }
24
24
 
25
- :host::after {
26
- content: '';
27
- position: absolute;
28
- inset: 0;
29
- }
30
-
31
25
  .checkbox__control--small {
32
26
  --toggle-size: var(--dsa-wc-checkbox-size-small);
33
27
  }