@ds-autonomie/web-components 1.0.1 → 1.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 (164) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/chunks/{chunk.HH63FIEF.js → chunk.2DGAEK66.js} +12 -3
  3. package/dist/chunks/{chunk.O73OYTYJ.js → chunk.2HV2U4RQ.js} +2 -4
  4. package/dist/chunks/{chunk.EHVJT7BH.js → chunk.2R6P5TGQ.js} +1 -1
  5. package/dist/chunks/chunk.2WSMYCPC.js +24 -0
  6. package/dist/chunks/{chunk.LT7JMZ3T.js → chunk.3HI3T5R2.js} +2 -2
  7. package/dist/chunks/chunk.3I2KXA35.js +126 -0
  8. package/dist/chunks/{chunk.7NWAYDYI.js → chunk.4DWONP4W.js} +3 -3
  9. package/dist/chunks/{chunk.BLPP3Q5H.js → chunk.5324JGM4.js} +11 -4
  10. package/dist/chunks/{chunk.BEB47LM2.js → chunk.5BTJP6HC.js} +2 -2
  11. package/dist/chunks/{chunk.D7CATJYB.js → chunk.6IH66JBY.js} +1 -1
  12. package/dist/chunks/chunk.7HGZSZJK.js +409 -0
  13. package/dist/chunks/{chunk.QKNNLZ2M.js → chunk.AFAQWHMU.js} +3 -3
  14. package/dist/chunks/{chunk.ODSCDJDO.js → chunk.ARVWTY56.js} +5 -4
  15. package/dist/chunks/{chunk.KOH5V4C6.js → chunk.B4O7IAPL.js} +21 -17
  16. package/dist/chunks/chunk.CCTWXABH.js +13 -0
  17. package/dist/chunks/chunk.CMJ2SRTL.js +26 -0
  18. package/dist/chunks/{chunk.DURVPB6M.js → chunk.D6DEGG4H.js} +25 -6
  19. package/dist/chunks/{chunk.UV53JTE3.js → chunk.DOMRNQHQ.js} +1 -1
  20. package/dist/chunks/{chunk.NDEZEB3Z.js → chunk.EDRQ2QWB.js} +10 -5
  21. package/dist/chunks/{chunk.XSCX6TC5.js → chunk.EXIGM5NV.js} +4 -1
  22. package/dist/chunks/{chunk.4A3WMGMZ.js → chunk.FHDPJN6L.js} +1 -1
  23. package/dist/chunks/{chunk.YS7MY5CH.js → chunk.FHGXKQDW.js} +18 -24
  24. package/dist/chunks/{chunk.KDAK2GXX.js → chunk.FKIKQX6B.js} +1 -1
  25. package/dist/chunks/{chunk.ABGBXXKA.js → chunk.FTWZNCEH.js} +1 -1
  26. package/dist/chunks/{chunk.6FAUBLR3.js → chunk.G3ESG6Q5.js} +1 -1
  27. package/dist/chunks/{chunk.WHK7EFIM.js → chunk.GP5Z27QB.js} +7 -4
  28. package/dist/chunks/{chunk.2HUORR44.js → chunk.GRV3MK3D.js} +1 -1
  29. package/dist/chunks/{chunk.JETXIC4F.js → chunk.HPK6C7NJ.js} +1 -1
  30. package/dist/chunks/{chunk.UZLQVFDR.js → chunk.IJL7YMFL.js} +2 -2
  31. package/dist/chunks/{chunk.GYTA2LJC.js → chunk.J6XP4AFN.js} +1 -1
  32. package/dist/chunks/{chunk.PWWER3ZK.js → chunk.JJ3GF7YP.js} +48 -24
  33. package/dist/chunks/{chunk.OVK7QCA7.js → chunk.JLMY5OVR.js} +13 -9
  34. package/dist/chunks/{chunk.N6VVY6XD.js → chunk.K6YLMID4.js} +6 -3
  35. package/dist/chunks/{chunk.5XUV3SRW.js → chunk.KOZIER6A.js} +11 -6
  36. package/dist/chunks/{chunk.A2PAK6VF.js → chunk.LUHEO6AS.js} +2 -2
  37. package/dist/chunks/{chunk.7ZCCXTFG.js → chunk.MDFIMRCC.js} +2 -2
  38. package/dist/chunks/{chunk.WNHQYL5W.js → chunk.MTZZV3NB.js} +4 -20
  39. package/dist/chunks/{chunk.5XL2LZLC.js → chunk.NBPVVWJU.js} +14 -0
  40. package/dist/chunks/{chunk.HC5BO5YV.js → chunk.NHYFVEGM.js} +5 -16
  41. package/dist/chunks/{chunk.MOWTZFON.js → chunk.NKVYNBAI.js} +1 -1
  42. package/dist/chunks/{chunk.IRQOFNJE.js → chunk.NQU3YD5L.js} +8 -3
  43. package/dist/chunks/{chunk.WIEJJS3W.js → chunk.OGQBKAFT.js} +1 -1
  44. package/dist/chunks/{chunk.WSVP75MH.js → chunk.ORSUTGLR.js} +1 -1
  45. package/dist/chunks/chunk.OXSDZ5LQ.js +865 -0
  46. package/dist/chunks/{chunk.MY434P47.js → chunk.P2AJBSND.js} +2 -2
  47. package/dist/chunks/chunk.QSNJ4FV6.js +54 -0
  48. package/dist/chunks/{chunk.4XT2OJD2.js → chunk.RDVFMQLV.js} +8 -4
  49. package/dist/chunks/{chunk.INCGVIAQ.js → chunk.TINRLVWL.js} +1 -1
  50. package/dist/chunks/{chunk.5LT3B7MI.js → chunk.UQYPPFBJ.js} +1 -1
  51. package/dist/chunks/{chunk.42W4S2HN.js → chunk.VM355VAS.js} +1 -1
  52. package/dist/chunks/{chunk.G7AELPSO.js → chunk.VRU3XH45.js} +4 -4
  53. package/dist/chunks/{chunk.UA32LJYW.js → chunk.WG5VRMQG.js} +2 -2
  54. package/dist/chunks/{chunk.AR5HJD7F.js → chunk.X6RQ2SQC.js} +1 -1
  55. package/dist/chunks/{chunk.HLYGKGDG.js → chunk.XJPCULMC.js} +8 -5
  56. package/dist/chunks/chunk.YRBTSDUN.js +134 -0
  57. package/dist/chunks/chunk.ZQJVCRB2.js +10 -0
  58. package/dist/chunks/{chunk.RIJQGADY.js → chunk.ZW4JE66G.js} +11 -4
  59. package/dist/chunks/{chunk.K6WCEYZI.js → chunk.ZXVIEHXI.js} +1 -1
  60. package/dist/components/accordion/accordion.js +7 -7
  61. package/dist/components/alert/alert.js +9 -8
  62. package/dist/components/animation/animation.js +2 -2
  63. package/dist/components/avatar/avatar.d.ts +1 -1
  64. package/dist/components/avatar/avatar.js +7 -6
  65. package/dist/components/avatar-group/avatar-group.d.ts +1 -1
  66. package/dist/components/badge/badge.d.ts +1 -1
  67. package/dist/components/breadcrumb/breadcrumb.js +7 -7
  68. package/dist/components/breadcrumb-item/breadcrumb-item.js +2 -2
  69. package/dist/components/button/button.js +9 -8
  70. package/dist/components/checkbox/checkbox.js +8 -7
  71. package/dist/components/checkbox-button/checkbox-button.js +6 -6
  72. package/dist/components/checkbox-group/checkbox-group.d.ts +1 -0
  73. package/dist/components/checkbox-group/checkbox-group.js +3 -3
  74. package/dist/components/combobox/combobox.d.ts +175 -0
  75. package/dist/components/combobox/combobox.js +37 -0
  76. package/dist/components/combobox/combobox.styles.d.ts +2 -0
  77. package/dist/components/combobox/combobox.styles.js +9 -0
  78. package/dist/components/dialog/dialog.js +9 -8
  79. package/dist/components/divider/divider.d.ts +1 -1
  80. package/dist/components/drawer/drawer.js +10 -9
  81. package/dist/components/dropdown/dropdown.js +3 -3
  82. package/dist/components/format-bytes/format-bytes.js +2 -2
  83. package/dist/components/format-date/format-date.js +2 -2
  84. package/dist/components/format-number/format-number.js +2 -2
  85. package/dist/components/icon/icon.js +5 -5
  86. package/dist/components/icon-button/icon-button.d.ts +1 -1
  87. package/dist/components/icon-button/icon-button.js +7 -6
  88. package/dist/components/include/include.js +2 -2
  89. package/dist/components/input/input.d.ts +1 -1
  90. package/dist/components/input/input.js +10 -9
  91. package/dist/components/input/input.styles.js +1 -1
  92. package/dist/components/input-mask/input-mask.d.ts +1 -0
  93. package/dist/components/input-mask/input-mask.js +6 -5
  94. package/dist/components/input-mask/input-mask.styles.js +1 -1
  95. package/dist/components/input-phone/input-phone.d.ts +1 -1
  96. package/dist/components/input-phone/input-phone.js +24 -23
  97. package/dist/components/input-phone/input-phone.styles.js +1 -1
  98. package/dist/components/menu/menu.d.ts +1 -1
  99. package/dist/components/menu-item/menu-item.d.ts +1 -1
  100. package/dist/components/menu-item/menu-item.js +6 -6
  101. package/dist/components/menu-label/menu-label.d.ts +1 -1
  102. package/dist/components/mutation-observer/mutation-observer.js +2 -2
  103. package/dist/components/option/option.js +8 -8
  104. package/dist/components/option/option.styles.js +1 -1
  105. package/dist/components/progress-bar/progress-bar.d.ts +1 -1
  106. package/dist/components/progress-bar/progress-bar.js +3 -2
  107. package/dist/components/progress-ring/progress-ring.d.ts +1 -2
  108. package/dist/components/progress-ring/progress-ring.js +2 -2
  109. package/dist/components/radio/radio.js +6 -6
  110. package/dist/components/radio-button/radio-button.js +2 -2
  111. package/dist/components/radio-group/radio-group.js +2 -2
  112. package/dist/components/relative-time/relative-time.js +2 -2
  113. package/dist/components/resize-observer/resize-observer.js +2 -2
  114. package/dist/components/select/select.d.ts +4 -0
  115. package/dist/components/select/select.js +13 -12
  116. package/dist/components/select/select.styles.js +1 -1
  117. package/dist/components/skeleton/skeleton.d.ts +1 -1
  118. package/dist/components/spinner/spinner.js +2 -2
  119. package/dist/components/step/step.d.ts +39 -0
  120. package/dist/components/step/step.js +24 -0
  121. package/dist/components/step/step.styles.d.ts +2 -0
  122. package/dist/components/step/step.styles.js +8 -0
  123. package/dist/components/step/step.utils.d.ts +3 -0
  124. package/dist/components/step/step.utils.js +7 -0
  125. package/dist/components/stepper/stepper.d.ts +23 -0
  126. package/dist/components/stepper/stepper.js +10 -0
  127. package/dist/components/stepper/stepper.styles.d.ts +2 -0
  128. package/dist/components/stepper/stepper.styles.js +8 -0
  129. package/dist/components/tab/tab.d.ts +1 -1
  130. package/dist/components/tab/tab.js +3 -3
  131. package/dist/components/tab-group/tab-group.d.ts +1 -1
  132. package/dist/components/tab-group/tab-group.js +3 -3
  133. package/dist/components/tab-panel/tab-panel.d.ts +1 -1
  134. package/dist/components/tab-panel/tab-panel.js +2 -2
  135. package/dist/components/tag/tag.js +9 -8
  136. package/dist/components/textarea/textarea.d.ts +1 -0
  137. package/dist/components/textarea/textarea.js +4 -3
  138. package/dist/components/tooltip/tooltip.js +3 -3
  139. package/dist/components/tree/tree.d.ts +2 -1
  140. package/dist/components/tree/tree.js +12 -11
  141. package/dist/components/tree-item/tree-item.d.ts +1 -1
  142. package/dist/components/tree-item/tree-item.js +11 -10
  143. package/dist/custom-elements.json +1325 -41
  144. package/dist/design-system.d.ts +3 -0
  145. package/dist/design-system.js +112 -95
  146. package/dist/internal/debounce.d.ts +1 -1
  147. package/dist/internal/debounce.js +3 -3
  148. package/dist/internal/default-value.d.ts +1 -1
  149. package/dist/internal/default-value.js +24 -21
  150. package/dist/internal/watch.js +1 -1
  151. package/dist/themes/dsa-wc-theme.css +79 -6
  152. package/dist/themes/dsa-wc-theme.min.css +1 -1
  153. package/dist/themes/dsa-wc-theme.styles.js +85 -6
  154. package/dist/translations/en-gb.js +1 -1
  155. package/dist/translations/en.js +1 -1
  156. package/dist/translations/fr.js +1 -1
  157. package/dist/utilities/directives.d.ts +1 -0
  158. package/dist/utilities/directives.js +7 -0
  159. package/dist/utilities/localize.d.ts +7 -0
  160. package/dist/utilities/localize.js +1 -1
  161. package/dist/vscode.html-custom-data.json +169 -6
  162. package/dist/web-types.json +737 -9
  163. package/package.json +2 -2
  164. package/dist/chunks/chunk.GI7VDIWX.js +0 -24
@@ -3,16 +3,19 @@ import {
3
3
  } from "./chunk.VRY3E2XG.js";
4
4
  import {
5
5
  defaultValue
6
- } from "./chunk.GI7VDIWX.js";
6
+ } from "./chunk.CMJ2SRTL.js";
7
7
  import {
8
8
  FormControlController
9
9
  } from "./chunk.KIFBWPW5.js";
10
10
  import {
11
11
  HasSlotController
12
12
  } from "./chunk.YIY5RM53.js";
13
+ import {
14
+ ifDefinedAndNotEmpty
15
+ } from "./chunk.ZQJVCRB2.js";
13
16
  import {
14
17
  watch
15
- } from "./chunk.D7CATJYB.js";
18
+ } from "./chunk.6IH66JBY.js";
16
19
  import {
17
20
  ShoelaceElement
18
21
  } from "./chunk.YCXTCVAZ.js";
@@ -245,8 +248,8 @@ var DSATextarea = class extends ShoelaceElement {
245
248
  part="textarea"
246
249
  id="input"
247
250
  class="textarea__control"
248
- title=${hasLabel ? void 0 : this.title}
249
- name=${ifDefined(this.name)}
251
+ title=${ifDefinedAndNotEmpty(hasLabel ? void 0 : this.title)}
252
+ name=${ifDefinedAndNotEmpty(this.name)}
250
253
  .value=${live(this.value)}
251
254
  ?disabled=${this.disabled}
252
255
  ?readonly=${this.readonly}
@@ -262,7 +265,9 @@ var DSATextarea = class extends ShoelaceElement {
262
265
  enterkeyhint=${ifDefined(this.enterkeyhint)}
263
266
  inputmode=${ifDefined(this.inputmode)}
264
267
  aria-describedby=${this.error ? "error-text help-text" : "help-text"}
265
- aria-label=${hasLabel ? void 0 : this.title}
268
+ aria-label=${ifDefinedAndNotEmpty(
269
+ hasLabel ? void 0 : this.title
270
+ )}
266
271
  @change=${this.handleChange}
267
272
  @input=${this.handleInput}
268
273
  @invalid=${this.handleInvalid}
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  icon_button_styles_default
3
3
  } from "./chunk.QFJA3MTV.js";
4
+ import {
5
+ ifDefinedAndNotEmpty
6
+ } from "./chunk.ZQJVCRB2.js";
4
7
  import {
5
8
  ShoelaceElement
6
9
  } from "./chunk.YCXTCVAZ.js";
@@ -68,7 +71,7 @@ var DSAIconButton = class extends ShoelaceElement {
68
71
  )}
69
72
  role=${ifDefined(isLink ? void 0 : "button")}
70
73
  aria-disabled=${this.disabled ? "true" : "false"}
71
- aria-label="${this.label}"
74
+ aria-label=${ifDefinedAndNotEmpty(this.label)}
72
75
  tabindex=${this.disableTabIndex || this.disabled ? "-1" : "0"}
73
76
  @blur=${this.handleBlur}
74
77
  @focus=${this.handleFocus}
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk.XNEONNEJ.js";
7
7
  import {
8
8
  watch
9
- } from "./chunk.D7CATJYB.js";
9
+ } from "./chunk.6IH66JBY.js";
10
10
  import {
11
11
  ShoelaceElement
12
12
  } from "./chunk.YCXTCVAZ.js";
@@ -1,25 +1,28 @@
1
- import {
2
- input_styles_default
3
- } from "./chunk.WNHQYL5W.js";
4
1
  import {
5
2
  getOverridenIconDetails,
6
3
  isPrefixIconOverriden
7
4
  } from "./chunk.KBT2EKLF.js";
5
+ import {
6
+ input_styles_default
7
+ } from "./chunk.MTZZV3NB.js";
8
8
  import {
9
9
  defaultValue
10
- } from "./chunk.GI7VDIWX.js";
10
+ } from "./chunk.CMJ2SRTL.js";
11
11
  import {
12
12
  FormControlController
13
13
  } from "./chunk.KIFBWPW5.js";
14
14
  import {
15
15
  HasSlotController
16
16
  } from "./chunk.YIY5RM53.js";
17
+ import {
18
+ ifDefinedAndNotEmpty
19
+ } from "./chunk.ZQJVCRB2.js";
17
20
  import {
18
21
  LocalizeController
19
- } from "./chunk.5XL2LZLC.js";
22
+ } from "./chunk.NBPVVWJU.js";
20
23
  import {
21
24
  watch
22
- } from "./chunk.D7CATJYB.js";
25
+ } from "./chunk.6IH66JBY.js";
23
26
  import {
24
27
  ShoelaceElement
25
28
  } from "./chunk.YCXTCVAZ.js";
@@ -141,16 +144,6 @@ var DSAInput = class extends ShoelaceElement {
141
144
  handlePasswordToggle() {
142
145
  this.passwordVisible = !this.passwordVisible;
143
146
  }
144
- getPickerIcon() {
145
- switch (this.type) {
146
- case "date":
147
- return "calendar_today";
148
- case "time":
149
- return "schedule";
150
- default:
151
- return void 0;
152
- }
153
- }
154
147
  handleErrorChange() {
155
148
  if (this.error) {
156
149
  this.setAttribute("aria-invalid", "true");
@@ -242,7 +235,6 @@ var DSAInput = class extends ShoelaceElement {
242
235
  const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
243
236
  const hasClearIcon = this.clearable && !this.disabled && !this.readonly && (typeof this.value === "number" || this.value.length > 0);
244
237
  const hasHideIcon = this.type === "password" && !this.disabled;
245
- const pickerIcon = this.getPickerIcon();
246
238
  return html`
247
239
  <div
248
240
  part="form-control"
@@ -303,8 +295,8 @@ var DSAInput = class extends ShoelaceElement {
303
295
  id="input"
304
296
  class="input__control"
305
297
  type=${this.type === "password" && this.passwordVisible ? "text" : this.type}
306
- title=${hasLabel ? void 0 : this.title}
307
- name=${ifDefined(this.name)}
298
+ title=${ifDefinedAndNotEmpty(hasLabel ? void 0 : this.title)}
299
+ name=${ifDefinedAndNotEmpty(this.name)}
308
300
  ?disabled=${this.disabled}
309
301
  ?readonly=${this.readonly}
310
302
  ?required=${this.required}
@@ -323,7 +315,9 @@ var DSAInput = class extends ShoelaceElement {
323
315
  pattern=${ifDefined(this.pattern)}
324
316
  enterkeyhint=${ifDefined(this.enterkeyhint)}
325
317
  inputmode=${ifDefined(this.inputmode)}
326
- aria-label=${hasLabel ? void 0 : this.title}
318
+ aria-label=${ifDefinedAndNotEmpty(
319
+ hasLabel ? void 0 : this.title
320
+ )}
327
321
  aria-describedby=${this.error ? "error-text help-text" : "help-text"}
328
322
  @change=${this.handleChange}
329
323
  @input=${this.handleInput}
@@ -338,7 +332,7 @@ var DSAInput = class extends ShoelaceElement {
338
332
  part="clear-button"
339
333
  class="input__action-button"
340
334
  name="clear"
341
- aria-label=${this.localize.term("clearEntry")}
335
+ label=${this.localize.term("clearEntry")}
342
336
  @click=${this.handleClearClick}
343
337
  ></dsa-icon-button>
344
338
  ` : ""}
@@ -351,12 +345,12 @@ var DSAInput = class extends ShoelaceElement {
351
345
  name=${this.passwordVisible ? "visibility_off" : "visibility"}
352
346
  @click=${this.handlePasswordToggle}
353
347
  ></dsa-icon-button>` : ""}
354
- ${pickerIcon !== void 0 ? html`
348
+ ${this.type === "time" ? html`
355
349
  <dsa-icon-button
356
350
  part="picker-button"
357
351
  class="input__action-button"
358
- name=${pickerIcon}
359
- aria-label=${this.localize.term("clearEntry")}
352
+ name="schedule"
353
+ label=${this.localize.term("selectATime")}
360
354
  @click=${this.showPicker}
361
355
  ></dsa-icon-button>
362
356
  ` : ""}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  LocalizeController
3
- } from "./chunk.5XL2LZLC.js";
3
+ } from "./chunk.NBPVVWJU.js";
4
4
  import {
5
5
  ShoelaceElement
6
6
  } from "./chunk.YCXTCVAZ.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk.YIY5RM53.js";
7
7
  import {
8
8
  watch
9
- } from "./chunk.D7CATJYB.js";
9
+ } from "./chunk.6IH66JBY.js";
10
10
  import {
11
11
  ShoelaceElement
12
12
  } from "./chunk.YCXTCVAZ.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.RMCOWJOW.js";
4
4
  import {
5
5
  watch
6
- } from "./chunk.D7CATJYB.js";
6
+ } from "./chunk.6IH66JBY.js";
7
7
  import {
8
8
  ShoelaceElement
9
9
  } from "./chunk.YCXTCVAZ.js";
@@ -1,15 +1,18 @@
1
1
  import {
2
2
  defaultValue
3
- } from "./chunk.GI7VDIWX.js";
3
+ } from "./chunk.CMJ2SRTL.js";
4
4
  import {
5
5
  FormControlController
6
6
  } from "./chunk.KIFBWPW5.js";
7
7
  import {
8
8
  checkbox_styles_default
9
9
  } from "./chunk.WE6IG5XG.js";
10
+ import {
11
+ ifDefinedAndNotEmpty
12
+ } from "./chunk.ZQJVCRB2.js";
10
13
  import {
11
14
  watch
12
- } from "./chunk.D7CATJYB.js";
15
+ } from "./chunk.6IH66JBY.js";
13
16
  import {
14
17
  ShoelaceElement
15
18
  } from "./chunk.YCXTCVAZ.js";
@@ -150,8 +153,8 @@ var DSACheckbox = class extends ShoelaceElement {
150
153
  <input
151
154
  class="checkbox__input"
152
155
  type="checkbox"
153
- title=${this.title}
154
- name=${this.name}
156
+ title=${ifDefinedAndNotEmpty(this.title)}
157
+ name=${ifDefinedAndNotEmpty(this.name)}
155
158
  value=${ifDefined(this.value)}
156
159
  .indeterminate=${live(this.indeterminate)}
157
160
  .checked=${live(this.checked)}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  LocalizeController
3
- } from "./chunk.5XL2LZLC.js";
3
+ } from "./chunk.NBPVVWJU.js";
4
4
  import {
5
5
  ShoelaceElement
6
6
  } from "./chunk.YCXTCVAZ.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.VFYKLPN2.js";
4
4
  import {
5
5
  watch
6
- } from "./chunk.D7CATJYB.js";
6
+ } from "./chunk.6IH66JBY.js";
7
7
  import {
8
8
  ShoelaceElement
9
9
  } from "./chunk.YCXTCVAZ.js";
@@ -6,10 +6,10 @@ import {
6
6
  } from "./chunk.EMIT7S33.js";
7
7
  import {
8
8
  LocalizeController
9
- } from "./chunk.5XL2LZLC.js";
9
+ } from "./chunk.NBPVVWJU.js";
10
10
  import {
11
11
  watch
12
- } from "./chunk.D7CATJYB.js";
12
+ } from "./chunk.6IH66JBY.js";
13
13
  import {
14
14
  ShoelaceElement
15
15
  } from "./chunk.YCXTCVAZ.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk.YIY5RM53.js";
7
7
  import {
8
8
  watch
9
- } from "./chunk.D7CATJYB.js";
9
+ } from "./chunk.6IH66JBY.js";
10
10
  import {
11
11
  ShoelaceElement
12
12
  } from "./chunk.YCXTCVAZ.js";
@@ -1,18 +1,21 @@
1
1
  import {
2
2
  select_styles_default
3
- } from "./chunk.DURVPB6M.js";
4
- import {
5
- defaultValue
6
- } from "./chunk.GI7VDIWX.js";
3
+ } from "./chunk.D6DEGG4H.js";
7
4
  import {
8
5
  scrollIntoView
9
6
  } from "./chunk.EMIT7S33.js";
7
+ import {
8
+ defaultValue
9
+ } from "./chunk.CMJ2SRTL.js";
10
10
  import {
11
11
  FormControlController
12
12
  } from "./chunk.KIFBWPW5.js";
13
13
  import {
14
14
  HasSlotController
15
15
  } from "./chunk.YIY5RM53.js";
16
+ import {
17
+ ifDefinedAndNotEmpty
18
+ } from "./chunk.ZQJVCRB2.js";
16
19
  import {
17
20
  waitForEvent
18
21
  } from "./chunk.B4BZKR24.js";
@@ -26,10 +29,10 @@ import {
26
29
  } from "./chunk.V7RJROLH.js";
27
30
  import {
28
31
  LocalizeController
29
- } from "./chunk.5XL2LZLC.js";
32
+ } from "./chunk.NBPVVWJU.js";
30
33
  import {
31
34
  watch
32
- } from "./chunk.D7CATJYB.js";
35
+ } from "./chunk.6IH66JBY.js";
33
36
  import {
34
37
  ShoelaceElement
35
38
  } from "./chunk.YCXTCVAZ.js";
@@ -41,6 +44,7 @@ import {
41
44
  import { html } from "lit";
42
45
  import { customElement, property, query, state } from "lit/decorators.js";
43
46
  import { classMap } from "lit/directives/class-map.js";
47
+ import { ifDefined } from "lit/directives/if-defined.js";
44
48
  var DSASelect = class extends ShoelaceElement {
45
49
  constructor() {
46
50
  super(...arguments);
@@ -67,6 +71,7 @@ var DSASelect = class extends ShoelaceElement {
67
71
  this.variant = "base";
68
72
  this.maxOptionsVisible = 3;
69
73
  this.disabled = false;
74
+ this.readonly = false;
70
75
  this.clearable = false;
71
76
  this.open = false;
72
77
  this.hoist = false;
@@ -127,8 +132,10 @@ var DSASelect = class extends ShoelaceElement {
127
132
  if (isClearButton || isIconButton) {
128
133
  return;
129
134
  }
130
- if (event.key === "Escape" && this.open) {
131
- event.preventDefault();
135
+ if (this.open && (event.key === "Tab" || event.key === "Escape")) {
136
+ if (event.key === "Escape") {
137
+ event.preventDefault();
138
+ }
132
139
  event.stopPropagation();
133
140
  this.hide();
134
141
  this.displayInput.focus({ preventScroll: true });
@@ -229,7 +236,7 @@ var DSASelect = class extends ShoelaceElement {
229
236
  const isIconButton = path.some(
230
237
  (el) => el instanceof Element && el.tagName.toLowerCase() === "dsa-icon-button"
231
238
  );
232
- if (this.disabled || isIconButton) {
239
+ if (this.readonly || this.disabled || isIconButton) {
233
240
  return;
234
241
  }
235
242
  event.preventDefault();
@@ -379,6 +386,12 @@ var DSASelect = class extends ShoelaceElement {
379
386
  this.handleOpenChange();
380
387
  }
381
388
  }
389
+ handleReadonlyChange() {
390
+ if (this.readonly) {
391
+ this.open = false;
392
+ this.handleOpenChange();
393
+ }
394
+ }
382
395
  handleValueChange() {
383
396
  const allOptions = this.getAllOptions();
384
397
  const value = Array.isArray(this.value) ? this.value : [this.value];
@@ -387,7 +400,7 @@ var DSASelect = class extends ShoelaceElement {
387
400
  );
388
401
  }
389
402
  async handleOpenChange() {
390
- if (this.open && !this.disabled) {
403
+ if (this.open && !this.disabled && !this.readonly) {
391
404
  this.setCurrentOption(this.selectedOptions[0] || this.getFirstOption());
392
405
  this.emit("dsa-show");
393
406
  this.addOpenListeners();
@@ -420,7 +433,7 @@ var DSASelect = class extends ShoelaceElement {
420
433
  }
421
434
  /** Shows the listbox. */
422
435
  async show() {
423
- if (this.open || this.disabled) {
436
+ if (this.open || this.disabled || this.readonly) {
424
437
  this.open = false;
425
438
  return void 0;
426
439
  }
@@ -429,7 +442,7 @@ var DSASelect = class extends ShoelaceElement {
429
442
  }
430
443
  /** Hides the listbox. */
431
444
  async hide() {
432
- if (!this.open || this.disabled) {
445
+ if (!this.open || this.disabled || this.readonly) {
433
446
  this.open = false;
434
447
  return void 0;
435
448
  }
@@ -467,16 +480,18 @@ var DSASelect = class extends ShoelaceElement {
467
480
  const hasHelpTextSlot = this.hasSlotController.test("help-text");
468
481
  const hasLabel = this.label ? true : !!hasLabelSlot;
469
482
  const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
470
- const hasClearIcon = this.clearable && !this.disabled && isValueDefined;
483
+ const hasClearIcon = this.clearable && !this.disabled && !this.readonly && isValueDefined;
471
484
  const isPlaceholderVisible = this.placeholder && this.value.length === 0;
472
485
  const selectInputWidth = this.displayValue ? isValueDefined ? this.value.length : 1 : void 0;
486
+ const isDisabledOrReadonly = this.disabled || this.readonly;
473
487
  return html`
474
488
  <div
475
489
  part="form-control"
476
490
  class=${classMap({
477
491
  "form-control": true,
478
- "form-control--error": this.error,
492
+ "form-control--error": this.error && !isDisabledOrReadonly,
479
493
  "form-control--disabled": this.disabled,
494
+ "form-control--readonly": this.readonly,
480
495
  "form-control--small": this.size === "small",
481
496
  "form-control--medium": this.size === "medium",
482
497
  "form-control--large": this.size === "large",
@@ -506,6 +521,7 @@ var DSASelect = class extends ShoelaceElement {
506
521
  "select--error": this.error,
507
522
  "select--open": this.open,
508
523
  "select--disabled": this.disabled,
524
+ "select--readonly": this.readonly,
509
525
  "select--multiple": this.multiple,
510
526
  "select--focused": this.hasFocus,
511
527
  "select--placeholder-visible": isPlaceholderVisible,
@@ -546,20 +562,24 @@ var DSASelect = class extends ShoelaceElement {
546
562
  class="select__display-input"
547
563
  type="text"
548
564
  placeholder=${this.placeholder}
549
- .disabled=${this.disabled}
565
+ .disabled=${isDisabledOrReadonly}
550
566
  .value=${this.displayValue ? this.value : this.displayLabel}
551
- size=${selectInputWidth}
567
+ size=${ifDefined(selectInputWidth)}
552
568
  autocomplete="off"
553
569
  spellcheck="false"
554
570
  autocapitalize="off"
555
571
  readonly
556
- title=${hasLabel ? void 0 : this.title}
572
+ title=${ifDefinedAndNotEmpty(hasLabel ? void 0 : this.title)}
557
573
  aria-controls="listbox"
558
574
  aria-expanded=${this.open ? "true" : "false"}
559
575
  aria-haspopup="listbox"
560
- aria-labelledby=${hasLabel ? "label" : void 0}
561
- aria-label=${hasLabel ? void 0 : this.title}
562
- aria-disabled=${this.disabled ? "true" : "false"}
576
+ aria-labelledby=${ifDefinedAndNotEmpty(
577
+ hasLabel ? "label" : void 0
578
+ )}
579
+ aria-label=${ifDefinedAndNotEmpty(
580
+ hasLabel ? void 0 : this.title
581
+ )}
582
+ aria-disabled=${isDisabledOrReadonly ? "true" : "false"}
563
583
  aria-describedby="help-text"
564
584
  role="combobox"
565
585
  tabindex="0"
@@ -607,7 +627,7 @@ var DSASelect = class extends ShoelaceElement {
607
627
  <input
608
628
  class="select__value-input"
609
629
  type="text"
610
- ?disabled=${this.disabled}
630
+ ?disabled=${isDisabledOrReadonly}
611
631
  ?required=${this.required}
612
632
  .value=${Array.isArray(this.value) ? this.value.join(", ") : this.value}
613
633
  tabindex="-1"
@@ -624,12 +644,10 @@ var DSASelect = class extends ShoelaceElement {
624
644
  aria-label=${this.localize.term("clearEntry")}
625
645
  @mousedown=${this.handleClearMouseDown}
626
646
  @click=${this.handleClearClick}
627
- tabindex="-1"
628
647
  >
629
648
  <dsa-icon name="close"></dsa-icon>
630
649
  </button>
631
650
  ` : ""}
632
-
633
651
  <dsa-icon
634
652
  class="select__expand-icon"
635
653
  name="arrow_drop_down"
@@ -660,7 +678,7 @@ var DSASelect = class extends ShoelaceElement {
660
678
  ${this.helpText}
661
679
  </slot>
662
680
 
663
- ${this.error && !this.disabled ? html`<dsa-error-text
681
+ ${this.error && !isDisabledOrReadonly ? html`<dsa-error-text
664
682
  part="form-control-error-text"
665
683
  class="form-control__error-text"
666
684
  >${this.errorMessage}</dsa-error-text
@@ -738,6 +756,9 @@ __decorateClass([
738
756
  __decorateClass([
739
757
  property({ type: Boolean, reflect: true })
740
758
  ], DSASelect.prototype, "disabled", 2);
759
+ __decorateClass([
760
+ property({ type: Boolean })
761
+ ], DSASelect.prototype, "readonly", 2);
741
762
  __decorateClass([
742
763
  property({ type: Boolean })
743
764
  ], DSASelect.prototype, "clearable", 2);
@@ -777,6 +798,9 @@ __decorateClass([
777
798
  __decorateClass([
778
799
  watch("disabled", { waitUntilFirstUpdate: true })
779
800
  ], DSASelect.prototype, "handleDisabledChange", 1);
801
+ __decorateClass([
802
+ watch("readonly", { waitUntilFirstUpdate: true })
803
+ ], DSASelect.prototype, "handleReadonlyChange", 1);
780
804
  __decorateClass([
781
805
  watch("value", { waitUntilFirstUpdate: true })
782
806
  ], DSASelect.prototype, "handleValueChange", 1);
@@ -1,25 +1,28 @@
1
1
  import {
2
2
  input_mask_styles_default
3
- } from "./chunk.O73OYTYJ.js";
3
+ } from "./chunk.2HV2U4RQ.js";
4
4
  import {
5
5
  getMaskedValue,
6
6
  stripSpecialChars
7
7
  } from "./chunk.SQMWMSBA.js";
8
8
  import {
9
9
  defaultValue
10
- } from "./chunk.GI7VDIWX.js";
10
+ } from "./chunk.CMJ2SRTL.js";
11
11
  import {
12
12
  FormControlController
13
13
  } from "./chunk.KIFBWPW5.js";
14
14
  import {
15
15
  HasSlotController
16
16
  } from "./chunk.YIY5RM53.js";
17
+ import {
18
+ ifDefinedAndNotEmpty
19
+ } from "./chunk.ZQJVCRB2.js";
17
20
  import {
18
21
  LocalizeController
19
- } from "./chunk.5XL2LZLC.js";
22
+ } from "./chunk.NBPVVWJU.js";
20
23
  import {
21
24
  watch
22
- } from "./chunk.D7CATJYB.js";
25
+ } from "./chunk.6IH66JBY.js";
23
26
  import {
24
27
  ShoelaceElement
25
28
  } from "./chunk.YCXTCVAZ.js";
@@ -277,8 +280,8 @@ var DSAInputMask = class extends ShoelaceElement {
277
280
  "input-mask__control-with-prefix": hasPrefixIcon
278
281
  })}
279
282
  type="text"
280
- title=${hasLabel ? void 0 : this.title}
281
- name=${ifDefined(this.name)}
283
+ title=${ifDefinedAndNotEmpty(hasLabel ? void 0 : this.title)}
284
+ name=${ifDefinedAndNotEmpty(this.name)}
282
285
  ?disabled=${this.disabled}
283
286
  ?readonly=${this.readonly}
284
287
  ?required=${this.required}
@@ -294,8 +297,10 @@ var DSAInputMask = class extends ShoelaceElement {
294
297
  spellcheck=${this.spellcheck}
295
298
  enterkeyhint=${ifDefined(this.enterkeyhint)}
296
299
  inputmode=${this.inputmode}
297
- aria-label=${hasLabel ? void 0 : this.title}
298
- aria-describedby=${this.error ? "error-text help-text" : "help-text"}
300
+ aria-label=${ifDefinedAndNotEmpty(
301
+ hasLabel ? void 0 : this.title
302
+ )}
303
+ aria-describedby=${this.error ? "input-mask error-text help-text" : "input-mask help-text"}
299
304
  @change=${this.handleChange}
300
305
  @input=${this.handleInput}
301
306
  @invalid=${this.handleInvalid}
@@ -313,7 +318,6 @@ var DSAInputMask = class extends ShoelaceElement {
313
318
  type="button"
314
319
  aria-label=${this.localize.term("clearEntry")}
315
320
  @click=${this.handleClearClick}
316
- tabindex="-1"
317
321
  >
318
322
  <slot name="clear-icon">
319
323
  <dsa-icon name="close"></dsa-icon>
@@ -1,9 +1,12 @@
1
1
  import {
2
2
  tag_styles_default
3
3
  } from "./chunk.WFHOSUOX.js";
4
+ import {
5
+ ifDefinedAndNotEmpty
6
+ } from "./chunk.ZQJVCRB2.js";
4
7
  import {
5
8
  LocalizeController
6
- } from "./chunk.5XL2LZLC.js";
9
+ } from "./chunk.NBPVVWJU.js";
7
10
  import {
8
11
  ShoelaceElement
9
12
  } from "./chunk.YCXTCVAZ.js";
@@ -43,7 +46,7 @@ var DSATag = class extends ShoelaceElement {
43
46
  // Modifiers
44
47
  "tag--removable": this.removable
45
48
  })}
46
- title=${this.label}
49
+ title=${ifDefinedAndNotEmpty(this.label)}
47
50
  >
48
51
  <slot part="prefix" name="prefix" class="tag__prefix"></slot>
49
52
 
@@ -56,7 +59,7 @@ var DSATag = class extends ShoelaceElement {
56
59
  part="remove-button"
57
60
  exportparts="base:remove-button__base"
58
61
  name="close"
59
- label=${this.localize.term("remove")}
62
+ label=${`${this.localize.term("remove")} ${this.label}`}
60
63
  class="tag__remove"
61
64
  @click=${this.handleRemoveClick}
62
65
  ?disable-tab-index=${this.disableRemovableFocus}
@@ -1,9 +1,9 @@
1
- import {
2
- drawer_styles_default
3
- } from "./chunk.DXVNWE2M.js";
4
1
  import {
5
2
  Modal
6
3
  } from "./chunk.ISAFRNR2.js";
4
+ import {
5
+ drawer_styles_default
6
+ } from "./chunk.DXVNWE2M.js";
7
7
  import {
8
8
  lockBodyScrolling,
9
9
  unlockBodyScrolling
@@ -11,6 +11,9 @@ import {
11
11
  import {
12
12
  HasSlotController
13
13
  } from "./chunk.YIY5RM53.js";
14
+ import {
15
+ ifDefinedAndNotEmpty
16
+ } from "./chunk.ZQJVCRB2.js";
14
17
  import {
15
18
  waitForEvent
16
19
  } from "./chunk.B4BZKR24.js";
@@ -24,10 +27,10 @@ import {
24
27
  } from "./chunk.V7RJROLH.js";
25
28
  import {
26
29
  LocalizeController
27
- } from "./chunk.5XL2LZLC.js";
30
+ } from "./chunk.NBPVVWJU.js";
28
31
  import {
29
32
  watch
30
- } from "./chunk.D7CATJYB.js";
33
+ } from "./chunk.6IH66JBY.js";
31
34
  import {
32
35
  ShoelaceElement
33
36
  } from "./chunk.YCXTCVAZ.js";
@@ -260,7 +263,9 @@ var DSADrawer = class extends ShoelaceElement {
260
263
  role="dialog"
261
264
  aria-modal="true"
262
265
  aria-hidden=${this.open ? "false" : "true"}
263
- aria-label=${ifDefined(this.noHeader ? this.label : void 0)}
266
+ aria-label=${ifDefinedAndNotEmpty(
267
+ this.noHeader ? this.label : void 0
268
+ )}
264
269
  aria-labelledby=${ifDefined(!this.noHeader ? "title" : void 0)}
265
270
  tabindex="0"
266
271
  >
@@ -11,13 +11,13 @@ import {
11
11
  } from "./chunk.V7RJROLH.js";
12
12
  import {
13
13
  LocalizeController
14
- } from "./chunk.5XL2LZLC.js";
14
+ } from "./chunk.NBPVVWJU.js";
15
15
  import {
16
16
  alert_styles_default
17
17
  } from "./chunk.Z6TBD2AC.js";
18
18
  import {
19
19
  watch
20
- } from "./chunk.D7CATJYB.js";
20
+ } from "./chunk.6IH66JBY.js";
21
21
  import {
22
22
  ShoelaceElement
23
23
  } from "./chunk.YCXTCVAZ.js";