@ds-autonomie/web-components 1.22.0 → 1.22.2

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 (98) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/chunks/{chunk.VNMWTFVO.js → chunk.36WWRNIP.js} +1 -1
  3. package/dist/chunks/{chunk.2VU7NSY7.js → chunk.3JBCFU7B.js} +10 -13
  4. package/dist/chunks/{chunk.FKH6KEDL.js → chunk.46QRHHLQ.js} +1 -1
  5. package/dist/chunks/{chunk.7X34WK67.js → chunk.4CA7E26P.js} +1 -1
  6. package/dist/chunks/{chunk.P2P5GFMH.js → chunk.4MDEHTR2.js} +1 -1
  7. package/dist/chunks/{chunk.JLVXPL5R.js → chunk.4QQ5B4IL.js} +1 -1
  8. package/dist/chunks/{chunk.QETNM6GH.js → chunk.5DAITYVK.js} +1 -1
  9. package/dist/chunks/{chunk.FFOPYN2D.js → chunk.5NEMV7VX.js} +1 -1
  10. package/dist/chunks/{chunk.OZ2GKA3Q.js → chunk.5X4QTZAP.js} +14 -0
  11. package/dist/chunks/{chunk.SFHGJXSK.js → chunk.6YV75XW5.js} +1 -1
  12. package/dist/chunks/{chunk.7KOLZTM3.js → chunk.7YZDEXJY.js} +1 -1
  13. package/dist/chunks/{chunk.RO4GF54B.js → chunk.A5FZ3ZP6.js} +1 -1
  14. package/dist/chunks/{chunk.OCNKNMKH.js → chunk.BETV66IR.js} +1 -1
  15. package/dist/chunks/{chunk.5YEMK3DP.js → chunk.BUDRSMFF.js} +1 -1
  16. package/dist/chunks/{chunk.KJAINX7S.js → chunk.BYTDEMP3.js} +15 -10
  17. package/dist/chunks/{chunk.YIY5RM53.js → chunk.DA6UU6UL.js} +17 -0
  18. package/dist/chunks/{chunk.F3PPHPHQ.js → chunk.EEKMHAZ5.js} +2 -0
  19. package/dist/chunks/{chunk.CHM44KW2.js → chunk.EJ4VOCOO.js} +2 -2
  20. package/dist/chunks/{chunk.5JEDGGYG.js → chunk.F4QJBOMR.js} +2 -2
  21. package/dist/chunks/{chunk.HGJQAQMA.js → chunk.FCXJCZEG.js} +1 -1
  22. package/dist/chunks/{chunk.Y7CSNRKE.js → chunk.FN3YT4DB.js} +1 -1
  23. package/dist/chunks/{chunk.VL2SR4PG.js → chunk.FPXW7ZMC.js} +1 -1
  24. package/dist/chunks/{chunk.JXXICII7.js → chunk.GBFSCUF6.js} +1 -1
  25. package/dist/chunks/{chunk.MJ3ZLDHO.js → chunk.GL4GU5DO.js} +1 -1
  26. package/dist/chunks/chunk.GTPD4VLY.js +49 -0
  27. package/dist/chunks/{chunk.66WACVGP.js → chunk.GUSO7ZX7.js} +1 -1
  28. package/dist/chunks/{chunk.K747M6BH.js → chunk.KSSPTHJA.js} +1 -1
  29. package/dist/chunks/{chunk.HARFFGFD.js → chunk.LE6KR6YZ.js} +1 -1
  30. package/dist/chunks/{chunk.JGKD2B3X.js → chunk.LJ7KTL3R.js} +4 -0
  31. package/dist/chunks/{chunk.QWFM2SG7.js → chunk.M4JDLOFR.js} +2 -4
  32. package/dist/chunks/{chunk.B37WL5J4.js → chunk.MKM7ZZA3.js} +19 -3
  33. package/dist/chunks/{chunk.ICX3S4EG.js → chunk.NZSU3FNO.js} +1 -1
  34. package/dist/chunks/{chunk.VDTPZZIJ.js → chunk.OEYZ3CTB.js} +1 -1
  35. package/dist/chunks/{chunk.YZHYS4OW.js → chunk.OOD25N36.js} +1 -1
  36. package/dist/chunks/{chunk.RY6MZCI7.js → chunk.PGUC3I5F.js} +1 -1
  37. package/dist/chunks/{chunk.T7SB5KS2.js → chunk.QBK6A3R2.js} +4 -8
  38. package/dist/chunks/{chunk.LLRC7DN3.js → chunk.QUB3Z4YN.js} +4 -4
  39. package/dist/chunks/{chunk.AQ5OXVUV.js → chunk.RC7QZSCE.js} +2 -2
  40. package/dist/chunks/{chunk.NOBPKKL3.js → chunk.SDJYJZWB.js} +1 -1
  41. package/dist/chunks/{chunk.W635ZS25.js → chunk.SG6IR57O.js} +1 -1
  42. package/dist/chunks/{chunk.FBSX53CA.js → chunk.W45NKAQM.js} +4 -3
  43. package/dist/chunks/{chunk.R6V5EIMQ.js → chunk.WUZDHRQQ.js} +1 -1
  44. package/dist/chunks/{chunk.DE4CISVH.js → chunk.XOAAGTHU.js} +1 -1
  45. package/dist/components/badge/badge.js +2 -2
  46. package/dist/components/breadcrumb-item/breadcrumb-item.js +2 -2
  47. package/dist/components/button/button.js +2 -2
  48. package/dist/components/card/card.js +2 -2
  49. package/dist/components/checkbox/checkbox.js +3 -3
  50. package/dist/components/checkbox/checkbox.styles.js +1 -1
  51. package/dist/components/checkbox-button/checkbox-button.js +2 -2
  52. package/dist/components/checkbox-group/checkbox-group.js +2 -2
  53. package/dist/components/combobox/combobox.js +2 -2
  54. package/dist/components/dialog/dialog.js +2 -2
  55. package/dist/components/drawer/drawer.js +2 -2
  56. package/dist/components/dropdown/dropdown.js +1 -1
  57. package/dist/components/error-message-panel/error-message-panel.js +2 -2
  58. package/dist/components/file-upload/file-upload.js +2 -2
  59. package/dist/components/filter/filter-button/filter-button.js +2 -2
  60. package/dist/components/filter/filter-range/filter-range.js +5 -5
  61. package/dist/components/filter/filter-select/filter-select.js +4 -4
  62. package/dist/components/footer/footer.js +2 -2
  63. package/dist/components/footer-content-block/footer-content-block.js +2 -2
  64. package/dist/components/footer-mandatory-mentions/footer-mandatory-mentions.js +2 -2
  65. package/dist/components/footer-sitemap/footer-sitemap.js +2 -2
  66. package/dist/components/header/header.js +2 -2
  67. package/dist/components/input/input.js +3 -3
  68. package/dist/components/input-date/input-date.js +2 -2
  69. package/dist/components/input-mask/input-mask.js +2 -2
  70. package/dist/components/input-phone/input-phone.js +6 -6
  71. package/dist/components/menu-item/menu-item.js +3 -3
  72. package/dist/components/menu-item/menu-item.styles.js +1 -1
  73. package/dist/components/menu-navigation/menu-navigation.d.ts +0 -10
  74. package/dist/components/menu-navigation/menu-navigation.js +2 -2
  75. package/dist/components/menu-navigation/menu-navigation.styles.js +1 -1
  76. package/dist/components/navbar/navbar-link/navbar-link.js +2 -2
  77. package/dist/components/navbar/navbar-menu/navbar-menu.js +4 -4
  78. package/dist/components/pagination/pagination.js +5 -5
  79. package/dist/components/pagination-button/pagination-button.js +2 -2
  80. package/dist/components/profile-button/profile-button.js +2 -2
  81. package/dist/components/radio-button/radio-button.js +3 -3
  82. package/dist/components/radio-group/radio-group.js +2 -2
  83. package/dist/components/select/select.js +2 -2
  84. package/dist/components/step/step.js +2 -2
  85. package/dist/components/tab/tab.d.ts +3 -0
  86. package/dist/components/tab/tab.js +3 -2
  87. package/dist/components/tab/tab.styles.js +1 -1
  88. package/dist/components/table/table-caption/table-caption.js +2 -2
  89. package/dist/components/table-container/table-container.js +2 -2
  90. package/dist/components/textarea/textarea.js +2 -2
  91. package/dist/components/tree/tree.js +3 -3
  92. package/dist/components/tree-item/tree-item.js +3 -3
  93. package/dist/custom-elements.json +30 -84
  94. package/dist/design-system.js +43 -43
  95. package/dist/internal/slot.js +3 -0
  96. package/dist/web-types.json +17 -41
  97. package/package.json +1 -1
  98. package/dist/chunks/chunk.MV4EVP4W.js +0 -117
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @ds-autonomie/web-components
2
2
 
3
+ ## 1.22.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 3620e71: `dropdown` : le dropdown ne doit pas se fermer quand le focus est sur le premier élément d'un menu-navigation et l'utilisateur appuie sur Tab
8
+
9
+ ## 1.22.1
10
+
11
+ ### Patch Changes
12
+
13
+ - acaea01: `tab` : suppression du décalage des titres d'onglet lors du changement d'onglet actif
14
+ - 4ed942f: `combobox` : prise en compte de la valeur si elle est ajoutée avant les options associées
15
+ - 89ca0d1: `checkbox`: Déplacement de l'astérisque des checkbox requises vers la gauche
16
+ - 2481f61: `checkbox`: en mode "readonly": ajout du focus, retrait de la classe CSS "disabled", retrait de la possibilité de cocher/décocher au click
17
+ `checkbox-button`: en mode "readonly": ajout du focus
18
+ - 189ce6c: `menu-navigation` : résolution du problème d'event listener sur les éléments du menu
19
+ - a8e8a08: `filter-range` : mise à jour de la valeur affichée quand les valeurs `start` et `end` sont modifiées dynamiquement
20
+
3
21
  ## 1.22.0
4
22
 
5
23
  ### Minor Changes
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk.EMIT7S33.js";
11
11
  import {
12
12
  HasSlotController
13
- } from "./chunk.YIY5RM53.js";
13
+ } from "./chunk.DA6UU6UL.js";
14
14
  import {
15
15
  waitForEvent
16
16
  } from "./chunk.B4BZKR24.js";
@@ -24,7 +24,7 @@ var menu_navigation_styles_default = css`
24
24
  }
25
25
 
26
26
  /* Menu Navigation Item */
27
- a {
27
+ ::slotted(a) {
28
28
  position: relative;
29
29
  display: flex;
30
30
  align-items: stretch;
@@ -35,20 +35,20 @@ var menu_navigation_styles_default = css`
35
35
  font: var(--dsa-wc-menu-item-font);
36
36
  padding: var(--dsa-wc-menu-navigation-item-padding);
37
37
  }
38
- :host(.level-2) a {
38
+ :host(.level-2) ::slotted(a) {
39
39
  padding-inline-start: var(--dsa-spacing-48);
40
40
  }
41
- a:hover,
42
- a[aria-current='page']:hover {
41
+ ::slotted(a:hover),
42
+ ::slotted(a[aria-current='page']:hover) {
43
43
  background-color: var(--dsa-wc-menu-item-hover-background-color);
44
44
  color: var(--dsa-wc-menu-item-hover-color);
45
45
  }
46
- a:focus-visible {
46
+ ::slotted(a:focus-visible) {
47
47
  outline: var(--dsa-wc-focus-ring);
48
48
  outline-offset: var(--dsa-wc-menu-item-focus-ring-offset);
49
49
  opacity: 1;
50
50
  }
51
- a[aria-current='page'] {
51
+ ::slotted(a[aria-current='page']) {
52
52
  color: var(--dsa-wc-menu-navigation-item-current-color);
53
53
  background-color: var(
54
54
  --dsa-wc-menu-navigation-item-current-background-color
@@ -56,22 +56,19 @@ var menu_navigation_styles_default = css`
56
56
  font: var(--dsa-wc-menu-item-font-current);
57
57
  }
58
58
  @media (forced-colors: active) {
59
- a:hover,
60
- a:focus-visible {
59
+ ::slotted(a:hover),
60
+ ::slotted(a:focus-visible) {
61
61
  outline: var(--dsa-wc-focus-ring);
62
62
  outline-offset: var(--dsa-wc-menu-item-focus-ring-offset);
63
63
  }
64
64
  }
65
65
 
66
66
  /* remove browser default list styles */
67
- li {
67
+ ::slotted(li) {
68
68
  list-style: none;
69
69
  }
70
- .slotted_items {
71
- display: none;
72
- }
73
70
 
74
- dsa-divider {
71
+ ::slotted(dsa-divider) {
75
72
  --spacing-start: var(--dsa-wc-menu-divider-spacing);
76
73
  --spacing-end: var(--dsa-wc-menu-divider-spacing);
77
74
  }
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk.KIFBWPW5.js";
16
16
  import {
17
17
  HasSlotController
18
- } from "./chunk.YIY5RM53.js";
18
+ } from "./chunk.DA6UU6UL.js";
19
19
  import {
20
20
  waitForEvent
21
21
  } from "./chunk.B4BZKR24.js";
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk.KIFBWPW5.js";
18
18
  import {
19
19
  HasSlotController
20
- } from "./chunk.YIY5RM53.js";
20
+ } from "./chunk.DA6UU6UL.js";
21
21
  import {
22
22
  LocalizeController
23
23
  } from "./chunk.5MBTOZ4X.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk.AEGNM2GN.js";
7
7
  import {
8
8
  HasSlotController
9
- } from "./chunk.YIY5RM53.js";
9
+ } from "./chunk.DA6UU6UL.js";
10
10
  import {
11
11
  LocalizeController
12
12
  } from "./chunk.5MBTOZ4X.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.SUFR3KIW.js";
4
4
  import {
5
5
  HasSlotController
6
- } from "./chunk.YIY5RM53.js";
6
+ } from "./chunk.DA6UU6UL.js";
7
7
  import {
8
8
  ShoelaceElement
9
9
  } from "./chunk.YCXTCVAZ.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.MILDW5D6.js";
4
4
  import {
5
5
  HasSlotController
6
- } from "./chunk.YIY5RM53.js";
6
+ } from "./chunk.DA6UU6UL.js";
7
7
  import {
8
8
  LocalizeController
9
9
  } from "./chunk.5MBTOZ4X.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk.CCTWXABH.js";
7
7
  import {
8
8
  HasSlotController
9
- } from "./chunk.YIY5RM53.js";
9
+ } from "./chunk.DA6UU6UL.js";
10
10
  import {
11
11
  LocalizeController
12
12
  } from "./chunk.5MBTOZ4X.js";
@@ -23,6 +23,20 @@ var tab_styles_default = css`
23
23
  cursor: pointer;
24
24
  }
25
25
 
26
+ .tab__content {
27
+ display: flex;
28
+ flex-direction: column;
29
+ align-items: center;
30
+ }
31
+ .tab__width-placeholder {
32
+ content: attr(data-label);
33
+ font-weight: 700;
34
+ visibility: hidden;
35
+ display: inline-block;
36
+ height: 0;
37
+ overflow: hidden;
38
+ }
39
+
26
40
  .tab:hover:not(.tab--disabled) {
27
41
  color: var(--dsa-wc-tab-color-hover);
28
42
  }
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk.R426GAXO.js";
11
11
  import {
12
12
  HasSlotController
13
- } from "./chunk.YIY5RM53.js";
13
+ } from "./chunk.DA6UU6UL.js";
14
14
  import {
15
15
  waitForEvent
16
16
  } from "./chunk.B4BZKR24.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk.HQKKL7C7.js";
10
10
  import {
11
11
  DSAInput
12
- } from "./chunk.RO4GF54B.js";
12
+ } from "./chunk.A5FZ3ZP6.js";
13
13
  import {
14
14
  normalizeStr
15
15
  } from "./chunk.O4MZVDWB.js";
@@ -20,7 +20,7 @@ import {
20
20
  } from "./chunk.KIFBWPW5.js";
21
21
  import {
22
22
  HasSlotController
23
- } from "./chunk.YIY5RM53.js";
23
+ } from "./chunk.DA6UU6UL.js";
24
24
  import {
25
25
  LocalizeController
26
26
  } from "./chunk.5MBTOZ4X.js";
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk.DEYEKOVU.js";
8
8
  import {
9
9
  HasSlotController
10
- } from "./chunk.YIY5RM53.js";
10
+ } from "./chunk.DA6UU6UL.js";
11
11
  import {
12
12
  LocalizeController
13
13
  } from "./chunk.5MBTOZ4X.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk.PFGVYROJ.js";
7
7
  import {
8
8
  HasSlotController
9
- } from "./chunk.YIY5RM53.js";
9
+ } from "./chunk.DA6UU6UL.js";
10
10
  import {
11
11
  LocalizeController
12
12
  } from "./chunk.5MBTOZ4X.js";
@@ -6,13 +6,13 @@ import {
6
6
  } from "./chunk.E3B2D5KE.js";
7
7
  import {
8
8
  checkbox_styles_default
9
- } from "./chunk.T7SB5KS2.js";
9
+ } from "./chunk.QBK6A3R2.js";
10
10
  import {
11
11
  FormControlController
12
12
  } from "./chunk.KIFBWPW5.js";
13
13
  import {
14
14
  HasSlotController
15
- } from "./chunk.YIY5RM53.js";
15
+ } from "./chunk.DA6UU6UL.js";
16
16
  import {
17
17
  watch
18
18
  } from "./chunk.6IH66JBY.js";
@@ -67,7 +67,12 @@ var DSACheckbox = class extends ShoelaceElement {
67
67
  firstUpdated() {
68
68
  this.formControlController.updateValidity();
69
69
  }
70
- handleClick() {
70
+ handleClick(event) {
71
+ if (this.disabled || this.readonly) {
72
+ event.preventDefault();
73
+ event.stopPropagation();
74
+ return;
75
+ }
71
76
  this.checked = !this.checked;
72
77
  this.indeterminate = false;
73
78
  this.emit("dsa-change");
@@ -97,9 +102,8 @@ var DSACheckbox = class extends ShoelaceElement {
97
102
  handleReadonlyChange() {
98
103
  this.input.setAttribute(
99
104
  "aria-disabled",
100
- this.disabled || this.readonly ? "true" : "false"
105
+ this.readonly || this.disabled ? "true" : "false"
101
106
  );
102
- this.input.tabIndex = this.readonly || this.disabled ? -1 : 0;
103
107
  }
104
108
  handleStateChange() {
105
109
  this.input.checked = this.checked;
@@ -164,7 +168,7 @@ var DSACheckbox = class extends ShoelaceElement {
164
168
  checkbox: true,
165
169
  "checkbox--checked": this.checked,
166
170
  "checkbox--error": this.error,
167
- "checkbox--disabled": this.disabled || this.readonly,
171
+ "checkbox--disabled": this.disabled,
168
172
  "checkbox--readonly": this.readonly,
169
173
  "checkbox--focused": this.hasFocus,
170
174
  "checkbox--indeterminate": this.indeterminate,
@@ -188,14 +192,15 @@ var DSACheckbox = class extends ShoelaceElement {
188
192
  aria-label=${ifDefinedAndNotEmpty(this.ariaLabel)}
189
193
  aria-checked=${this.checked ? "true" : "false"}
190
194
  aria-describedby=${ifDefined(this.error ? "error-text" : void 0)}
191
- aria-disabled=${this.disabled || this.readonly}
192
- aria-invalid=${this.error}
195
+ aria-disabled=${ifDefined(
196
+ this.disabled || this.readonly ? "true" : void 0
197
+ )}
198
+ aria-invalid=${ifDefined(this.error ? "true" : void 0)}
193
199
  @click=${this.handleClick}
194
200
  @input=${this.handleInput}
195
201
  @invalid=${this.handleInvalid}
196
202
  @blur=${this.handleBlur}
197
203
  @focus=${this.handleFocus}
198
- tabindex=${this.readonly || this.disabled ? -1 : 0}
199
204
  />
200
205
 
201
206
  <span
@@ -219,8 +224,8 @@ var DSACheckbox = class extends ShoelaceElement {
219
224
  </span>
220
225
 
221
226
  <div part="label" class="checkbox__label">
222
- <slot></slot>
223
227
  ${this.required ? html`<span class="checkbox__label-required">*</span>` : ""}
228
+ <slot></slot>
224
229
  </div>
225
230
  </label>
226
231
  ${this.error && !this.disabled && !this.readonly && this.errorMessage ? renderFormElementErrors(this.errorMessage) : ""}
@@ -46,6 +46,22 @@ var HasSlotController = class {
46
46
  }
47
47
  }
48
48
  };
49
+ function getInnerHTML(slot) {
50
+ if (!slot) {
51
+ return "";
52
+ }
53
+ const nodes = slot.assignedNodes({ flatten: true });
54
+ let html = "";
55
+ [...nodes].forEach((node) => {
56
+ if (node.nodeType === Node.ELEMENT_NODE) {
57
+ html += node.outerHTML;
58
+ }
59
+ if (node.nodeType === Node.TEXT_NODE) {
60
+ html += node.textContent;
61
+ }
62
+ });
63
+ return html;
64
+ }
49
65
  function getTextContent(slot) {
50
66
  if (!slot) {
51
67
  return "";
@@ -62,5 +78,6 @@ function getTextContent(slot) {
62
78
 
63
79
  export {
64
80
  HasSlotController,
81
+ getInnerHTML,
65
82
  getTextContent
66
83
  };
@@ -153,11 +153,13 @@ var DSAFilterRange = class extends FilterBase {
153
153
  if (this.currentStartValue !== this.start) {
154
154
  this.currentStartValue = this.start;
155
155
  }
156
+ this.value = this.getRangeValue();
156
157
  }
157
158
  handleEndPropChange() {
158
159
  if (this.currentEndValue !== this.end) {
159
160
  this.currentEndValue = this.end;
160
161
  }
162
+ this.value = this.getRangeValue();
161
163
  }
162
164
  handleCurrentValuesChange() {
163
165
  if (this.drawer) {
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk.LP7HSAS3.js";
4
4
  import {
5
5
  DSARadioGroup
6
- } from "./chunk.JXXICII7.js";
6
+ } from "./chunk.GBFSCUF6.js";
7
7
  import {
8
8
  HasSlotController
9
- } from "./chunk.YIY5RM53.js";
9
+ } from "./chunk.DA6UU6UL.js";
10
10
  import {
11
11
  watch
12
12
  } from "./chunk.6IH66JBY.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DSASelect
3
- } from "./chunk.FKH6KEDL.js";
3
+ } from "./chunk.46QRHHLQ.js";
4
4
  import {
5
5
  maskedValueToRawValue,
6
6
  rawValueToMaskedValue,
@@ -28,7 +28,7 @@ import {
28
28
  } from "./chunk.KIFBWPW5.js";
29
29
  import {
30
30
  HasSlotController
31
- } from "./chunk.YIY5RM53.js";
31
+ } from "./chunk.DA6UU6UL.js";
32
32
  import {
33
33
  watch
34
34
  } from "./chunk.6IH66JBY.js";
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk.KIFBWPW5.js";
13
13
  import {
14
14
  HasSlotController
15
- } from "./chunk.YIY5RM53.js";
15
+ } from "./chunk.DA6UU6UL.js";
16
16
  import {
17
17
  watch
18
18
  } from "./chunk.6IH66JBY.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk.PFGVYROJ.js";
7
7
  import {
8
8
  HasSlotController
9
- } from "./chunk.YIY5RM53.js";
9
+ } from "./chunk.DA6UU6UL.js";
10
10
  import {
11
11
  watch
12
12
  } from "./chunk.6IH66JBY.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.UYGZPSDY.js";
4
4
  import {
5
5
  HasSlotController
6
- } from "./chunk.YIY5RM53.js";
6
+ } from "./chunk.DA6UU6UL.js";
7
7
  import {
8
8
  waitForEvent
9
9
  } from "./chunk.B4BZKR24.js";
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk.KIFBWPW5.js";
16
16
  import {
17
17
  HasSlotController
18
- } from "./chunk.YIY5RM53.js";
18
+ } from "./chunk.DA6UU6UL.js";
19
19
  import {
20
20
  watch
21
21
  } from "./chunk.6IH66JBY.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.G4ODEI4O.js";
4
4
  import {
5
5
  HasSlotController
6
- } from "./chunk.YIY5RM53.js";
6
+ } from "./chunk.DA6UU6UL.js";
7
7
  import {
8
8
  ShoelaceElement
9
9
  } from "./chunk.YCXTCVAZ.js";
@@ -0,0 +1,49 @@
1
+ import {
2
+ menu_navigation_styles_default
3
+ } from "./chunk.3JBCFU7B.js";
4
+ import {
5
+ ShoelaceElement
6
+ } from "./chunk.YCXTCVAZ.js";
7
+ import {
8
+ __decorateClass
9
+ } from "./chunk.6M63UXML.js";
10
+
11
+ // src/components/menu-navigation/menu-navigation.ts
12
+ import { html } from "lit";
13
+ import { customElement, query } from "lit/decorators.js";
14
+ var DSAMenuNavigation = class extends ShoelaceElement {
15
+ connectedCallback() {
16
+ super.connectedCallback();
17
+ this.addEventListener("keydown", this.handleKeyDown);
18
+ if (this.classList.contains("level-2")) {
19
+ const menuItems = this.querySelectorAll("dsa-menu-item");
20
+ menuItems.forEach((menuItem) => {
21
+ menuItem.classList.add("level-2");
22
+ });
23
+ }
24
+ }
25
+ disconnectedCallback() {
26
+ super.disconnectedCallback();
27
+ this.removeEventListener("keydown", this.handleKeyDown);
28
+ }
29
+ handleKeyDown(event) {
30
+ if (event.key === " ") {
31
+ event.preventDefault();
32
+ }
33
+ }
34
+ // A change of attributes on the slotted elements does not trigger the "slotchange" event, so we add an observer
35
+ render() {
36
+ return html`<slot role="list" @keydown=${this.handleKeyDown}></slot>`;
37
+ }
38
+ };
39
+ DSAMenuNavigation.styles = menu_navigation_styles_default;
40
+ __decorateClass([
41
+ query("slot")
42
+ ], DSAMenuNavigation.prototype, "defaultSlot", 2);
43
+ DSAMenuNavigation = __decorateClass([
44
+ customElement("dsa-menu-navigation")
45
+ ], DSAMenuNavigation);
46
+
47
+ export {
48
+ DSAMenuNavigation
49
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  HasSlotController
3
- } from "./chunk.YIY5RM53.js";
3
+ } from "./chunk.DA6UU6UL.js";
4
4
  import {
5
5
  badge_styles_default
6
6
  } from "./chunk.BVRGK5ZO.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.YTRQPTZ3.js";
4
4
  import {
5
5
  HasSlotController
6
- } from "./chunk.YIY5RM53.js";
6
+ } from "./chunk.DA6UU6UL.js";
7
7
  import {
8
8
  ShoelaceElement
9
9
  } from "./chunk.YCXTCVAZ.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk.KIFBWPW5.js";
5
5
  import {
6
6
  HasSlotController
7
- } from "./chunk.YIY5RM53.js";
7
+ } from "./chunk.DA6UU6UL.js";
8
8
  import {
9
9
  button_styles_default
10
10
  } from "./chunk.BPEI35FP.js";
@@ -124,6 +124,10 @@ var menu_item_styles_default = css`
124
124
  visibility: visible;
125
125
  }
126
126
 
127
+ :host(.level-2) .menu-item {
128
+ padding-inline-start: 27px;
129
+ }
130
+
127
131
  @media (forced-colors: active) {
128
132
  :host(:hover:not([aria-disabled='true'])) .menu-item,
129
133
  :host(:focus-visible) .menu-item {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.PCO6EOKB.js";
4
4
  import {
5
5
  HasSlotController
6
- } from "./chunk.YIY5RM53.js";
6
+ } from "./chunk.DA6UU6UL.js";
7
7
  import {
8
8
  watch
9
9
  } from "./chunk.6IH66JBY.js";
@@ -60,7 +60,6 @@ var DSACheckboxButton = class extends ShoelaceElement {
60
60
  "aria-disabled",
61
61
  this.disabled || this.readonly ? "true" : "false"
62
62
  );
63
- this.input.tabIndex = this.readonly || this.disabled ? -1 : 0;
64
63
  }
65
64
  handleErrorChange() {
66
65
  if (this.error) {
@@ -103,14 +102,13 @@ var DSACheckboxButton = class extends ShoelaceElement {
103
102
  aria-disabled=${ifDefined(
104
103
  this.disabled || this.readonly ? "true" : void 0
105
104
  )}
106
- aria-invalid=${this.error}
105
+ aria-invalid=${ifDefined(this.error ? "true" : void 0)}
107
106
  type="button"
108
107
  value=${ifDefined(this.value)}
109
108
  @blur=${this.handleBlur}
110
109
  @focus=${this.handleFocus}
111
110
  @click=${this.handleClick}
112
111
  title="${this.innerText}"
113
- tabindex=${this.readonly || this.disabled ? -1 : 0}
114
112
  >
115
113
  ${this.readonly ? html`<dsa-icon
116
114
  name="lock"
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  tab_styles_default
3
- } from "./chunk.OZ2GKA3Q.js";
3
+ } from "./chunk.5X4QTZAP.js";
4
+ import {
5
+ getInnerHTML
6
+ } from "./chunk.DA6UU6UL.js";
4
7
  import {
5
8
  LocalizeController
6
9
  } from "./chunk.5MBTOZ4X.js";
@@ -16,7 +19,7 @@ import {
16
19
 
17
20
  // src/components/tab/tab.ts
18
21
  import { html } from "lit";
19
- import { customElement, property, query } from "lit/decorators.js";
22
+ import { customElement, property, query, state } from "lit/decorators.js";
20
23
  import { classMap } from "lit/directives/class-map.js";
21
24
  import { ifDefined } from "lit/directives/if-defined.js";
22
25
  var id = 0;
@@ -26,6 +29,7 @@ var DSATab = class extends ShoelaceElement {
26
29
  this.localize = new LocalizeController(this);
27
30
  this.attrId = ++id;
28
31
  this.componentId = `dsa-tab-${this.attrId}`;
32
+ this.slotContent = "";
29
33
  this.panel = "";
30
34
  this.active = false;
31
35
  this.closable = false;
@@ -43,6 +47,9 @@ var DSATab = class extends ShoelaceElement {
43
47
  });
44
48
  }
45
49
  }
50
+ handleSlotChange() {
51
+ this.slotContent = getInnerHTML(this.defaultSlot);
52
+ }
46
53
  handleCloseClick(event) {
47
54
  event.stopPropagation();
48
55
  this.emit("dsa-close");
@@ -76,7 +83,10 @@ var DSATab = class extends ShoelaceElement {
76
83
  })}
77
84
  tabindex=${ifDefined(this.disabled ? "-1" : null)}
78
85
  >
79
- <slot></slot>
86
+ <div class="tab__content">
87
+ <slot part="label" @slotchange=${this.handleSlotChange}></slot>
88
+ <div class="tab__width-placeholder">${this.slotContent}</div>
89
+ </div>
80
90
  ${this.closable ? html`
81
91
  <dsa-icon-button
82
92
  part="close-button"
@@ -98,6 +108,12 @@ __decorateClass([
98
108
  __decorateClass([
99
109
  query("[part~=close-button]")
100
110
  ], DSATab.prototype, "closeButton", 2);
111
+ __decorateClass([
112
+ query("slot:not([name])")
113
+ ], DSATab.prototype, "defaultSlot", 2);
114
+ __decorateClass([
115
+ state()
116
+ ], DSATab.prototype, "slotContent", 2);
101
117
  __decorateClass([
102
118
  property({ reflect: true })
103
119
  ], DSATab.prototype, "panel", 2);
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk.BJAMGNY4.js";
7
7
  import {
8
8
  HasSlotController
9
- } from "./chunk.YIY5RM53.js";
9
+ } from "./chunk.DA6UU6UL.js";
10
10
  import {
11
11
  LocalizeController
12
12
  } from "./chunk.5MBTOZ4X.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk.E3B2D5KE.js";
7
7
  import {
8
8
  HasSlotController
9
- } from "./chunk.YIY5RM53.js";
9
+ } from "./chunk.DA6UU6UL.js";
10
10
  import {
11
11
  watch
12
12
  } from "./chunk.6IH66JBY.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.KC5MVFGS.js";
4
4
  import {
5
5
  HasSlotController
6
- } from "./chunk.YIY5RM53.js";
6
+ } from "./chunk.DA6UU6UL.js";
7
7
  import {
8
8
  LocalizeController
9
9
  } from "./chunk.5MBTOZ4X.js";
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk.KIFBWPW5.js";
13
13
  import {
14
14
  HasSlotController
15
- } from "./chunk.YIY5RM53.js";
15
+ } from "./chunk.DA6UU6UL.js";
16
16
  import {
17
17
  watch
18
18
  } from "./chunk.6IH66JBY.js";