@scania/tegel 1.38.0-handleValueChange-correct-logic-beta.0 → 1.38.0-text-field-support-aria-invalid-beta.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 (71) hide show
  1. package/dist/cjs/index-ca8040ad.js +4 -4
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/tds-core-header-item_2.cjs.entry.js +1 -1
  4. package/dist/cjs/tds-dropdown_2.cjs.entry.js +21 -49
  5. package/dist/cjs/tds-side-menu-collapse-button.cjs.entry.js +6 -4
  6. package/dist/cjs/tds-side-menu-dropdown-list-item.cjs.entry.js +1 -1
  7. package/dist/cjs/tds-side-menu-item.cjs.entry.js +1 -1
  8. package/dist/cjs/tds-slider.cjs.entry.js +10 -39
  9. package/dist/cjs/tds-text-field.cjs.entry.js +33 -5
  10. package/dist/cjs/tegel.cjs.js +1 -1
  11. package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +3 -13
  12. package/dist/collection/components/dropdown/dropdown.js +18 -48
  13. package/dist/collection/components/header/header-item/header-item.css +3 -3
  14. package/dist/collection/components/side-menu/side-menu-collapse-button/side-menu-collapse-button.js +6 -4
  15. package/dist/collection/components/side-menu/side-menu-dropdown-list-item/side-menu-dropdown-list-item.css +6 -84
  16. package/dist/collection/components/side-menu/side-menu-item/side-menu-item.css +6 -82
  17. package/dist/collection/components/slider/slider.css +28 -24
  18. package/dist/collection/components/slider/slider.js +9 -38
  19. package/dist/collection/components/text-field/text-field.js +6 -5
  20. package/dist/collection/utils/getAriaInvalid.js +27 -0
  21. package/dist/components/{p-072bf53a.js → p-63437b77.js} +1 -1
  22. package/dist/components/{p-ad6babcd.js → p-6adb1ce3.js} +1 -1
  23. package/dist/components/{p-9a47d831.js → p-94bfc9f4.js} +19 -37
  24. package/dist/components/{p-c4318e35.js → p-d64878cb.js} +3 -13
  25. package/dist/components/{p-92c2da85.js → p-ea381f94.js} +1 -1
  26. package/dist/components/tds-dropdown-option.js +1 -1
  27. package/dist/components/tds-dropdown.js +1 -1
  28. package/dist/components/tds-header-brand-symbol.js +1 -1
  29. package/dist/components/tds-header-dropdown.js +1 -1
  30. package/dist/components/tds-header-hamburger.js +1 -1
  31. package/dist/components/tds-header-item.js +1 -1
  32. package/dist/components/tds-header-launcher-button.js +1 -1
  33. package/dist/components/tds-header-launcher.js +2 -2
  34. package/dist/components/tds-side-menu-collapse-button.js +7 -5
  35. package/dist/components/tds-side-menu-dropdown-list-item.js +1 -1
  36. package/dist/components/tds-side-menu-dropdown.js +1 -1
  37. package/dist/components/tds-side-menu-item.js +1 -1
  38. package/dist/components/tds-slider.js +12 -59
  39. package/dist/components/tds-table-footer.js +2 -2
  40. package/dist/components/tds-text-field.js +213 -1
  41. package/dist/esm/index-51d04e39.js +4 -4
  42. package/dist/esm/loader.js +1 -1
  43. package/dist/esm/tds-core-header-item_2.entry.js +1 -1
  44. package/dist/esm/tds-dropdown_2.entry.js +21 -49
  45. package/dist/esm/tds-side-menu-collapse-button.entry.js +6 -4
  46. package/dist/esm/tds-side-menu-dropdown-list-item.entry.js +1 -1
  47. package/dist/esm/tds-side-menu-item.entry.js +1 -1
  48. package/dist/esm/tds-slider.entry.js +10 -39
  49. package/dist/esm/tds-text-field.entry.js +33 -5
  50. package/dist/esm/tegel.js +1 -1
  51. package/dist/tegel/p-06d3490c.entry.js +1 -0
  52. package/dist/tegel/p-3233451c.entry.js +1 -0
  53. package/dist/tegel/p-397c8969.entry.js +1 -0
  54. package/dist/tegel/p-5c077bb9.entry.js +1 -0
  55. package/dist/tegel/p-61a1dc59.entry.js +1 -0
  56. package/dist/tegel/p-a0591e58.entry.js +1 -0
  57. package/dist/tegel/p-ae438c2e.entry.js +1 -0
  58. package/dist/tegel/tegel.css +1 -1
  59. package/dist/tegel/tegel.esm.js +1 -1
  60. package/dist/types/components/dropdown/dropdown.d.ts +0 -3
  61. package/dist/types/components/slider/slider.d.ts +0 -2
  62. package/dist/types/utils/getAriaInvalid.d.ts +14 -0
  63. package/package.json +1 -1
  64. package/dist/components/p-a0c21704.js +0 -187
  65. package/dist/tegel/p-2c9ea0be.entry.js +0 -1
  66. package/dist/tegel/p-2f9b15f6.entry.js +0 -1
  67. package/dist/tegel/p-336f2de3.entry.js +0 -1
  68. package/dist/tegel/p-7368906f.entry.js +0 -1
  69. package/dist/tegel/p-a98767ea.entry.js +0 -1
  70. package/dist/tegel/p-c465f9b8.entry.js +0 -1
  71. package/dist/tegel/p-c4f701f6.entry.js +0 -1
@@ -43,76 +43,17 @@
43
43
  :host .component ::slotted(a:focus-visible),
44
44
  :host .component ::slotted(button:focus-visible) {
45
45
  outline: 2px solid var(--tds-focus-outline-color);
46
- box-shadow: inset 0 0 0 3px var(--tds-white);
47
- outline-offset: -2px;
46
+ box-shadow: 0 0 0 1px var(--tds-white);
47
+ outline-offset: 1px;
48
+ z-index: 1;
48
49
  }
49
50
  :host .component:hover ::slotted(a),
50
- :host .component:hover ::slotted(button),
51
- :host .component:hover ::slotted(tds-side-menu-user) {
51
+ :host .component:hover ::slotted(button) {
52
52
  background-color: var(--tds-sidebar-item-state-hover);
53
- position: relative;
54
- }
55
- :host .component:hover ::slotted(a)::before,
56
- :host .component:hover ::slotted(button)::before,
57
- :host .component:hover ::slotted(tds-side-menu-user)::before {
58
- content: "";
59
- position: absolute;
60
- top: 0;
61
- left: 0;
62
- width: 4px;
63
- height: 100%;
64
- background-color: var(--tds-side-menu-item-hover-indicator);
65
- }
66
- :host .component:hover ::slotted(a:focus-visible),
67
- :host .component:hover ::slotted(button:focus-visible),
68
- :host .component:hover ::slotted(tds-side-menu-user:focus-visible) {
69
- background-color: var(--tds-sidebar-item-state-hover);
70
- position: relative;
71
- }
72
- :host .component:hover ::slotted(a:focus-visible)::before,
73
- :host .component:hover ::slotted(button:focus-visible)::before,
74
- :host .component:hover ::slotted(tds-side-menu-user:focus-visible)::before {
75
- content: "";
76
- position: absolute;
77
- top: 3px;
78
- left: 3px;
79
- width: 4px;
80
- height: calc(100% - 6px);
81
- background-color: var(--tds-side-menu-item-hover-indicator);
82
53
  }
83
54
  :host .component:active ::slotted(a),
84
- :host .component:active ::slotted(button),
85
- :host .component:active ::slotted(tds-side-menu-user) {
86
- background-color: var(--tds-sidemenu-item-state-active);
87
- position: relative;
88
- }
89
- :host .component:active ::slotted(a)::before,
90
- :host .component:active ::slotted(button)::before,
91
- :host .component:active ::slotted(tds-side-menu-user)::before {
92
- content: "";
93
- position: absolute;
94
- top: 0;
95
- left: 0;
96
- width: 4px;
97
- height: 100%;
98
- background-color: var(--tds-side-menu-item-pressed-indicator);
99
- }
100
- :host .component:active ::slotted(a:focus-visible),
101
- :host .component:active ::slotted(button:focus-visible),
102
- :host .component:active ::slotted(tds-side-menu-user:focus-visible) {
55
+ :host .component:active ::slotted(button) {
103
56
  background-color: var(--tds-sidemenu-item-state-active);
104
- position: relative;
105
- }
106
- :host .component:active ::slotted(a:focus-visible)::before,
107
- :host .component:active ::slotted(button:focus-visible)::before,
108
- :host .component:active ::slotted(tds-side-menu-user:focus-visible)::before {
109
- content: "";
110
- position: absolute;
111
- top: 3px;
112
- left: 3px;
113
- width: 4px;
114
- height: calc(100% - 6px);
115
- background-color: var(--tds-side-menu-item-pressed-indicator);
116
57
  }
117
58
  :host .component-collapsed ::slotted(a),
118
59
  :host .component-collapsed ::slotted(button) {
@@ -125,8 +66,8 @@
125
66
  :host .component-selected:not(:host .component-active) ::slotted(a),
126
67
  :host .component-selected:not(:host .component-active) ::slotted(button),
127
68
  :host .component-selected:not(:host .component-active) ::slotted(tds-side-menu-user) {
128
- background-color: var(--tds-sidebar-item-state-selected);
129
69
  position: relative;
70
+ background-color: var(--tds-sidebar-item-state-selected);
130
71
  }
131
72
  :host .component-selected:not(:host .component-active) ::slotted(a)::before,
132
73
  :host .component-selected:not(:host .component-active) ::slotted(button)::before,
@@ -139,23 +80,6 @@
139
80
  height: 100%;
140
81
  background-color: var(--tds-sidebar-side-menu-single-subitem-selected-border-color);
141
82
  }
142
- :host .component-selected:not(:host .component-active) ::slotted(a:focus-visible),
143
- :host .component-selected:not(:host .component-active) ::slotted(button:focus-visible),
144
- :host .component-selected:not(:host .component-active) ::slotted(tds-side-menu-user:focus-visible) {
145
- background-color: var(--tds-sidebar-item-state-selected);
146
- position: relative;
147
- }
148
- :host .component-selected:not(:host .component-active) ::slotted(a:focus-visible)::before,
149
- :host .component-selected:not(:host .component-active) ::slotted(button:focus-visible)::before,
150
- :host .component-selected:not(:host .component-active) ::slotted(tds-side-menu-user:focus-visible)::before {
151
- content: "";
152
- position: absolute;
153
- top: 3px;
154
- left: 3px;
155
- width: 4px;
156
- height: calc(100% - 6px);
157
- background-color: var(--tds-sidebar-side-menu-single-subitem-selected-border-color);
158
- }
159
83
 
160
84
  @media (min-width: 992px) {
161
85
  :host .component.component-collapsed ::slotted(a),
@@ -27,6 +27,12 @@ tds-slider .sr-only {
27
27
  pointer-events: none;
28
28
  }
29
29
 
30
+ .tds-slider-wrapper:focus-within {
31
+ outline: 2px solid var(--tds-blue-400);
32
+ outline-offset: 2px;
33
+ border-radius: var(--tds-spacing-element-4);
34
+ }
35
+
30
36
  .tds-slider {
31
37
  width: 100%;
32
38
  display: flex;
@@ -38,12 +44,6 @@ tds-slider .sr-only {
38
44
  height: 20px;
39
45
  position: relative;
40
46
  }
41
- .tds-slider .tds-slider-inner:focus-within .tds-slider__thumb-inner {
42
- outline: var(--tds-slider-thumb-focus-outline);
43
- box-shadow: var(--tds-slider-thumb-focus-box-shadow);
44
- outline-offset: var(--tds-slider-thumb-focus-outline-offset);
45
- z-index: 1;
46
- }
47
47
  .tds-slider .tds-slider__controls {
48
48
  position: relative;
49
49
  top: -25px;
@@ -81,22 +81,29 @@ tds-slider .sr-only {
81
81
  justify-content: center;
82
82
  border-radius: 4px 4px 0 0;
83
83
  }
84
- .tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper tds-text-field .text-field-input[type=number] {
85
- width: auto;
86
- padding: 12px;
84
+ .tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper input.tds-slider__input-field {
85
+ font: var(--tds-detail-02);
86
+ letter-spacing: var(--tds-detail-02-ls);
87
+ color: var(--tds-slider-inputfield-number-color);
88
+ border: 0;
89
+ background-color: transparent;
87
90
  text-align: center;
91
+ padding: 12px;
92
+ box-shadow: inset 0 -1px 0 var(--tds-slider-inputfield-box-shadow);
93
+ border-radius: 4px 4px 0 0;
88
94
  appearance: textfield;
89
95
  }
90
- .tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper tds-text-field .text-field-input[type=number]::-webkit-outer-spin-button,
91
- .tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper tds-text-field .text-field-input[type=number]::-webkit-inner-spin-button {
92
- appearance: none;
93
- margin: 0;
96
+ .tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper input.tds-slider__input-field:hover {
97
+ box-shadow: inset 0 -1px 0 var(--tds-grey-600);
94
98
  }
95
- .tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper tds-text-field .text-field-input:read-only {
96
- text-align: left;
99
+ .tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper input.tds-slider__input-field:focus {
100
+ box-shadow: inset 0 -2px 0 var(--tds-blue-400);
101
+ outline: 0;
97
102
  }
98
- .tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper tds-text-field .text-field-icon__readonly {
99
- right: 12px;
103
+ .tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper input.tds-slider__input-field::-webkit-outer-spin-button,
104
+ .tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper input.tds-slider__input-field::-webkit-inner-spin-button {
105
+ appearance: none;
106
+ margin: 0;
100
107
  }
101
108
  .tds-slider label {
102
109
  font: var(--tds-detail-05);
@@ -115,7 +122,7 @@ tds-slider .sr-only {
115
122
  letter-spacing: var(--tds-detail-01-ls);
116
123
  user-select: none;
117
124
  border-radius: 4px;
118
- padding: 8px 11px;
125
+ padding: 8px;
119
126
  position: absolute;
120
127
  transform: translate(-50%, -100%);
121
128
  top: -24px;
@@ -132,9 +139,6 @@ tds-slider .sr-only {
132
139
  .tds-slider .tds-slider__thumb {
133
140
  position: absolute;
134
141
  }
135
- .tds-slider .tds-slider__thumb:hover .tds-slider__value {
136
- display: block;
137
- }
138
142
  .tds-slider .tds-slider__thumb .tds-slider__thumb-inner {
139
143
  width: 20px;
140
144
  height: 20px;
@@ -160,7 +164,7 @@ tds-slider .sr-only {
160
164
  }
161
165
  .tds-slider .tds-slider__thumb .tds-slider__thumb-inner:hover::before {
162
166
  display: block;
163
- background-color: var(--tds-slider-thumb-hover);
167
+ opacity: 0.08;
164
168
  }
165
169
  .tds-slider .tds-slider__thumb .tds-slider__thumb-inner.pressed {
166
170
  width: 24px;
@@ -168,7 +172,7 @@ tds-slider .sr-only {
168
172
  }
169
173
  .tds-slider .tds-slider__thumb .tds-slider__thumb-inner.pressed::before {
170
174
  display: block;
171
- background-color: var(--tds-slider-thumb-pressed);
175
+ opacity: 0.16 !important;
172
176
  }
173
177
  .tds-slider .tds-slider__value-dividers-wrapper {
174
178
  position: relative;
@@ -303,7 +307,7 @@ tds-slider .sr-only {
303
307
  }
304
308
 
305
309
  .tds-slider .tds-slider__controls .tds-slider__control {
306
- cursor: pointer;
310
+ cursor: default;
307
311
  }
308
312
  .tds-slider .tds-slider__controls .tds-slider__control.tds-slider__control-minus tds-icon, .tds-slider .tds-slider__controls .tds-slider__control.tds-slider__control-plus tds-icon {
309
313
  color: var(--tds-slider-controls-color);
@@ -267,25 +267,6 @@ export class TdsSlider {
267
267
  const rounded = this.roundToStep(newValue);
268
268
  this.forceValueUpdate(rounded.toString());
269
269
  }
270
- /** Updates the slider value when using tds-text-field (reads value from host element) */
271
- updateSliderValueFromTextField(event) {
272
- const hostEl = event.target; // tds-text-field host element exposes a value prop
273
- const raw = hostEl && typeof hostEl.value !== 'undefined' ? hostEl.value : '';
274
- let newValue = parseFloat(raw);
275
- if (Number.isNaN(newValue)) {
276
- return;
277
- }
278
- const minNum = parseFloat(this.min);
279
- const maxNum = parseFloat(this.max);
280
- if (newValue < minNum) {
281
- newValue = minNum;
282
- }
283
- else if (newValue > maxNum) {
284
- newValue = maxNum;
285
- }
286
- const rounded = this.roundToStep(newValue);
287
- this.forceValueUpdate(rounded.toString());
288
- }
289
270
  /** Updates the slider value based on the current input value when enter is pressed */
290
271
  handleInputFieldEnterPress(event) {
291
272
  event.stopPropagation();
@@ -306,16 +287,7 @@ export class TdsSlider {
306
287
  }
307
288
  }
308
289
  calculateInputSizeFromMax() {
309
- const input = this.host.querySelector('tds-text-field input[type="number"]');
310
- if (input) {
311
- if (this.readOnly) {
312
- // explicit size to fit suffix icon
313
- input.style.width = `${52 + this.max.length * 8}px`;
314
- }
315
- else {
316
- input.setAttribute('size', `${this.max.length}`);
317
- }
318
- }
290
+ return this.max.length;
319
291
  }
320
292
  controlsStep(delta, event) {
321
293
  if (this.readOnly || this.disabled) {
@@ -386,7 +358,6 @@ export class TdsSlider {
386
358
  }
387
359
  }
388
360
  componentDidLoad() {
389
- this.calculateInputSizeFromMax();
390
361
  if (!this.resizeObserverAdded) {
391
362
  this.resizeObserverAdded = true;
392
363
  const resizeObserver = new ResizeObserver(() => {
@@ -430,30 +401,30 @@ export class TdsSlider {
430
401
  }
431
402
  render() {
432
403
  const ariaLabel = this.readOnly ? this.tdsReadOnlyAriaLabel : this.label || this.tdsAriaLabel;
433
- return (h("div", { key: '6077f356c7723ce54bdee208039af07154499684', class: {
404
+ return (h("div", { key: 'b4dd7706df0be052f0028a5f8ba6b6158f403b13', class: {
434
405
  'tds-slider-wrapper': true,
435
406
  'read-only': this.readOnly,
436
- } }, h("input", { key: '0ee6d0f1c8661bdcae6a3df5eca7b154306338eb', class: "tds-slider-native-element", type: "range", name: this.name, min: this.min, max: this.max, step: this.step, value: this.value, disabled: this.disabled }), h("div", { key: 'cfb2700cf9d16c204182a72f9f00ccd03b58ef89', class: "sr-only", "aria-live": "assertive", ref: (el) => {
407
+ } }, h("input", { key: '672c2aaa6dfee6489cd5e764ef151728c2af10fc', class: "tds-slider-native-element", type: "range", name: this.name, min: this.min, max: this.max, step: this.step, value: this.value, disabled: this.disabled }), h("div", { key: '8c7200436a9ef6524a3b2d554a2556bda8cc6afd', class: "sr-only", "aria-live": "assertive", ref: (el) => {
437
408
  this.ariaLiveElement = el;
438
- } }), h("div", { key: 'b90c1d06afd96682a108b24506660e7544c4be38', class: {
409
+ } }), h("div", { key: '1ce8e7ddccd19ca15733683768900c8fcde514d3', class: {
439
410
  'tds-slider': true,
440
411
  'disabled': this.disabled,
441
412
  'tds-slider-small': this.useSmall,
442
413
  }, ref: (el) => {
443
414
  this.wrapperElement = el;
444
- }, "aria-disabled": this.disabled ? 'true' : 'false' }, h("label", { key: '3d0bc3f42de59e4397dc8da0edf7ec29802ee8ab', id: `${this.sliderId}-label`, class: this.showTickNumbers && 'offset' }, this.label), this.useInput && (h("div", { key: 'c3868e2225cc4dacf60d23e31bdb2b106b85ce22', class: "tds-slider__input-values" }, h("div", { key: 'af100279435087101f37043ea083e5e33d930079', class: "tds-slider__input-value min-value" }, this.min))), this.useControls && (h("div", { key: '83c0078ec0ae39d29582e1ff1f4c3fc5f3a09483', class: "tds-slider__controls" }, h("div", { key: '31947e6cd76c35b8b8e7c0fb92b777e3bf8538b7', class: "tds-slider__control tds-slider__control-minus", onClick: (event) => this.stepLeft(event), role: "button", "aria-label": "Decrease value", tabindex: this.disabled || this.readOnly ? '-1' : '0' }, h("tds-icon", { key: '4c005f8c628236482eecdac51bd43a860f9e38d9', name: "minus", size: "16px" })))), h("div", { key: 'c6f21ded71244d202e255a90039f03872af09d5a', class: "tds-slider-inner", tabIndex: -1 }, this.tickValues.length > 0 && (h("div", { key: 'df1e820e1077ccec24826e38ba1b1fdd8dc0ae90', class: "tds-slider__value-dividers-wrapper" }, h("div", { key: 'f8cadf57f46068f61d1afc2bbcc30997a750705b', class: "tds-slider__value-dividers" }, this.tickValues.map((value) => (h("div", { class: "tds-slider__value-divider" }, this.showTickNumbers && h("span", null, value))))))), h("div", { key: '389ba385948b6772e803b7b9ec858061451f7534', class: "tds-slider__track", ref: (el) => {
415
+ }, "aria-disabled": this.disabled ? 'true' : 'false' }, h("label", { key: '54616f1cb5e4c13541f6f5fa700ddf4b1c4a9493', id: `${this.sliderId}-label`, class: this.showTickNumbers && 'offset' }, this.label), this.useInput && (h("div", { key: 'f6b8283409e9fb74ebf5fe89af5d88c29fde904d', class: "tds-slider__input-values" }, h("div", { key: '30532947c70dc8e0612fea3c01c25a5e86dacfca', class: "tds-slider__input-value min-value" }, this.min))), this.useControls && (h("div", { key: '6c001b8caba4a396bb9f4f4f3ba7b9ee6ca36f84', class: "tds-slider__controls" }, h("div", { key: '7a5804b789f84a4cd749c21d0ecc4b73bf7bae09', class: "tds-slider__control tds-slider__control-minus", onClick: (event) => this.stepLeft(event), role: "button", "aria-label": "Decrease value", tabindex: this.disabled || this.readOnly ? '-1' : '0' }, h("tds-icon", { key: '41db4dc1a8fda4972303fd48400078035648ca5c', name: "minus", size: "16px" })))), h("div", { key: 'f3cb2039ec4245b1d5c58bb819675381c4490197', class: "tds-slider-inner", tabIndex: -1 }, this.tickValues.length > 0 && (h("div", { key: '38bf8ca015894f3a42a0e9e33800cc7f0ff9c8d5', class: "tds-slider__value-dividers-wrapper" }, h("div", { key: '6a5aaa5d652d55f23db24b1b531664d125fc2a23', class: "tds-slider__value-dividers" }, this.tickValues.map((value) => (h("div", { class: "tds-slider__value-divider" }, this.showTickNumbers && h("span", null, value))))))), h("div", { key: '0c99475a8bdb1fdec04358421ec34630111a63b8', class: "tds-slider__track", ref: (el) => {
445
416
  this.trackElement = el;
446
417
  }, tabindex: this.disabled ? '-1' : '0', role: "presentation", onFocus: () => {
447
418
  if (this.thumbElement) {
448
419
  this.thumbElement.focus();
449
420
  }
450
- } }, h("div", { key: '5409aec334156fc5c5ac6a2cdbcb38ee50e35259', class: "tds-slider__track-fill", ref: (el) => {
421
+ } }, h("div", { key: 'd3ece50db5fbc17e4ebbf4272faa17fcf201dccf', class: "tds-slider__track-fill", ref: (el) => {
451
422
  this.trackFillElement = el;
452
- } }), h("div", { key: '8e0953ed9771846db11b9f79f6844065494f1b01', class: "tds-slider__thumb", ref: (el) => {
423
+ } }), h("div", { key: 'c304176e6a240820418d80aa8bfad35fbbdaf0f4', class: "tds-slider__thumb", ref: (el) => {
453
424
  this.thumbElement = el;
454
- }, onMouseDown: () => this.grabThumb(), onTouchStart: () => this.grabThumb(), role: "slider", "aria-valuemin": this.min, "aria-valuemax": this.max, "aria-valuenow": this.value, "aria-valuetext": `${this.value} of ${this.max}`, "aria-labelledby": `${this.sliderId}-label`, "aria-grabbed": this.thumbGrabbed ? 'true' : 'false', "aria-label": ariaLabel, tabindex: this.disabled ? '-1' : '0' }, this.tooltip && (h("div", { key: 'ed08cca6219adff68babc9c535aff278a1b3325e', class: "tds-slider__value" }, this.value, h("svg", { key: 'dc46d041d7c123400a42ea9c9472cf0a329eb4a1', width: "18", height: "14", viewBox: "0 0 18 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '3d46edb2069bd056a2ae09efa4bfa7f6319afe3b', d: "M8.15882 12.6915L0.990487 1.54076C0.562658 0.875246 1.0405 0 1.83167 0H16.1683C16.9595 0 17.4373 0.875246 17.0095 1.54076L9.84118 12.6915C9.44754 13.3038 8.55246 13.3038 8.15882 12.6915Z", fill: "currentColor" })))), h("div", { key: '202f2b005a969cd7eb3396c14ef6f72224fcd56a', class: "tds-slider__thumb-inner", ref: (el) => {
425
+ }, onMouseDown: () => this.grabThumb(), onTouchStart: () => this.grabThumb(), role: "slider", "aria-valuemin": this.min, "aria-valuemax": this.max, "aria-valuenow": this.value, "aria-valuetext": `${this.value} of ${this.max}`, "aria-labelledby": `${this.sliderId}-label`, "aria-grabbed": this.thumbGrabbed ? 'true' : 'false', "aria-label": ariaLabel, tabindex: this.disabled ? '-1' : '0' }, this.tooltip && (h("div", { key: '7c46c4f8b3cc3bf3aeae7c841a2f38e7b3d1dfbb', class: "tds-slider__value" }, this.value, h("svg", { key: '871a05a8fc1560c8e94071172c57563d63e10f22', width: "18", height: "14", viewBox: "0 0 18 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '0c99295a2049b3aac5d0472880e63acc4318fa07', d: "M8.15882 12.6915L0.990487 1.54076C0.562658 0.875246 1.0405 0 1.83167 0H16.1683C16.9595 0 17.4373 0.875246 17.0095 1.54076L9.84118 12.6915C9.44754 13.3038 8.55246 13.3038 8.15882 12.6915Z", fill: "currentColor" })))), h("div", { key: 'bf42f5b512d3041a88bd8cc420a5a4aaeb875e49', class: "tds-slider__thumb-inner", ref: (el) => {
455
426
  this.thumbInnerElement = el;
456
- } })))), this.useInput && (h("div", { key: 'ca2e84c4bccc24ebbc58a4915f62b5ecb77462c9', class: "tds-slider__input-values" }, h("div", { key: '58fdb8a9a25b9f15314aab8ffaee9424fbb26458', class: "tds-slider__input-value", onClick: (event) => this.stepLeft(event) }, this.max), h("div", { key: '4cba8f4c2b8a89922dbaa9eec4c2f9d12f43b62c', class: "tds-slider__input-field-wrapper" }, h("tds-text-field", { key: '65d311769aa5202134676cf9c4652132fbfc364d', noMinWidth: true, size: "sm", type: "number", value: this.value, min: this.min, max: this.max, readOnly: this.readOnly, disabled: this.disabled, onTdsChange: (e) => console.log(e), tdsAriaLabel: this.readOnly ? this.tdsReadOnlyAriaLabel : undefined, onTdsBlur: (event) => this.updateSliderValueFromTextField(event), onKeyDown: (event) => this.handleInputFieldEnterPress(event) })))), this.useControls && (h("div", { key: 'da8881158bee1aec2724a0e71af3faa88bc0eb17', class: "tds-slider__controls" }, h("div", { key: '241b11a3bee6ce8cf3e53ba77a095e2fb0cdb8a6', class: "tds-slider__control tds-slider__control-plus", onClick: (event) => this.stepRight(event), role: "button", "aria-label": "Increase value", tabindex: this.disabled || this.readOnly ? '-1' : '0' }, h("tds-icon", { key: 'c8e5466b53a1fe6abaaab77741e4adb7ec197341', name: "plus", size: "16px" })))))));
427
+ } })))), this.useInput && (h("div", { key: '9a1ed941f13b84e738500921b12aeb21ace2464c', class: "tds-slider__input-values" }, h("div", { key: '2bdf5b0fb2687075b2fc12ce931859d2f26a0685', class: "tds-slider__input-value", onClick: (event) => this.stepLeft(event) }, this.max), h("div", { key: '480825ddccd550527ac18f046c6a8ce26baaba87', class: "tds-slider__input-field-wrapper" }, h("input", { key: '94a1446990ea0ae3955e8db9f0119e4a0ec71970', size: this.calculateInputSizeFromMax(), class: "tds-slider__input-field", value: this.value, "aria-label": this.readOnly ? this.tdsReadOnlyAriaLabel : undefined, onBlur: (event) => this.updateSliderValueOnInputChange(event), onKeyDown: (event) => this.handleInputFieldEnterPress(event), type: "number", min: this.min, max: this.max, step: this.step })))), this.useControls && (h("div", { key: 'b7415e621df023ffe0eca844d9970454d01c72ce', class: "tds-slider__controls" }, h("div", { key: '044a984a7212d56f8c1bcb5709608d90677d7647', class: "tds-slider__control tds-slider__control-plus", onClick: (event) => this.stepRight(event), role: "button", "aria-label": "Increase value", tabindex: this.disabled || this.readOnly ? '-1' : '0' }, h("tds-icon", { key: '0b6410f7fb4af32681c3f49f29c9696e871bfd5a', name: "plus", size: "16px" })))))));
457
428
  }
458
429
  static get is() { return "tds-slider"; }
459
430
  static get originalStyleUrls() {
@@ -1,6 +1,7 @@
1
1
  import { h } from "@stencil/core";
2
2
  import hasSlot from "../../utils/hasSlot";
3
3
  import generateUniqueId from "../../utils/generateUniqueId";
4
+ import { getAriaInvalid } from "../../utils/getAriaInvalid";
4
5
  /**
5
6
  * @slot prefix - Slot for the prefix in the component.
6
7
  * @slot suffix - Slot for the suffix in the component. Suffix is hidden when the input is in readonly state.
@@ -71,7 +72,7 @@ export class TdsTextField {
71
72
  var _a;
72
73
  const usesPrefixSlot = hasSlot('prefix', this.host);
73
74
  const usesSuffixSlot = hasSlot('suffix', this.host);
74
- return (h("div", { key: 'b9fa2b03ce2a0b196dc6083614420d6f83675e3d', class: {
75
+ return (h("div", { key: '323df30951c2ee070b043228f78c3045b33e2fc9', class: {
75
76
  'form-text-field': true,
76
77
  'form-text-field-nomin': this.noMinWidth,
77
78
  'text-field-focus': this.focusInput && !this.disabled,
@@ -89,12 +90,12 @@ export class TdsTextField {
89
90
  'form-text-field-sm': this.size === 'sm',
90
91
  'form-text-field-error': this.state === 'error',
91
92
  'form-text-field-success': this.state === 'success',
92
- } }, this.labelPosition === 'outside' && (h("div", { key: '7110b867aba9a9ba62b796f67caeccf22a4a8060', class: "text-field-label-outside" }, h("label", { key: '6b0b6c7d17bb236f1203dfaf793ba0a3bc2d8efb', htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), h("div", { key: '5603d3e78b290a78d7c482a0dac7e1f0efb9af7f', onClick: () => this.textInput.focus(), class: "text-field-container" }, usesPrefixSlot && (h("div", { key: '9accb59dffa061d7947d4392310cb1717a395363', class: {
93
+ } }, this.labelPosition === 'outside' && (h("div", { key: 'fe9768bbf8999dc49f90e096bfd138710a91e7bb', class: "text-field-label-outside" }, h("label", { key: '91d39c768b49e7867a87f7fc78b50ec4034c4560', htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), h("div", { key: 'abb84b67da94a281e986891a00a8bd348ad3b131', onClick: () => this.textInput.focus(), class: "text-field-container" }, usesPrefixSlot && (h("div", { key: '4661114d6fe3e809ee7c0254686c9feb55fce6ad', class: {
93
94
  'text-field-slot-wrap-prefix': true,
94
95
  'text-field-error': this.state === 'error',
95
96
  'text-field-success': this.state === 'success',
96
97
  'text-field-default': this.state === 'default',
97
- } }, h("slot", { key: '739e089cdb9798dc108b68c4858c90bf75e18958', name: "prefix" }))), h("div", { key: 'e4229be4e4bf421319184e798b98afcbaa361413', class: "text-field-input-container" }, h("input", { key: 'f462b4c0d49e4e070090f6a14df52af66b87648d', ref: (inputEl) => {
98
+ } }, h("slot", { key: '40aac31a850fb3ad1d703834b578c73a35c9f255', name: "prefix" }))), h("div", { key: '1c85331cb4dd7a03527c3730996f07a5d25293d7', class: "text-field-input-container" }, h("input", { key: '498c3ae25cc2508c28dd2e5f8483c35adb9f8bb9', ref: (inputEl) => {
98
99
  this.textInput = inputEl;
99
100
  }, class: {
100
101
  'text-field-input': true,
@@ -109,13 +110,13 @@ export class TdsTextField {
109
110
  if (!this.readOnly) {
110
111
  this.handleBlur(event);
111
112
  }
112
- }, "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label, "aria-describedby": `text-field-helper-element-${this.uuid}`, "aria-readonly": this.readOnly, id: `text-field-input-element-${this.uuid}` }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { key: 'ac16cff7856d65503fa30f7eb23d2936377e72d4', class: "text-field-label-inside", htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), usesSuffixSlot && (h("div", { key: 'b70453ec36ca62f584b26b0e6dc4b3f0cde2ff54', class: {
113
+ }, "aria-invalid": getAriaInvalid(this.host, this.state), "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label, "aria-describedby": `text-field-helper-element-${this.uuid}`, "aria-readonly": this.readOnly, id: `text-field-input-element-${this.uuid}` }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { key: '41a2f20f416c65fb2d7d9992286f4bc9c9dcc52c', class: "text-field-label-inside", htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), usesSuffixSlot && (h("div", { key: '2b7b63efd24c1398d2d40a3d5a48d3003931cff8', class: {
113
114
  'text-field-slot-wrap-suffix': true,
114
115
  'text-field-error': this.state === 'error',
115
116
  'text-field-success': this.state === 'success',
116
117
  'text-field-default': this.state === 'default',
117
118
  'tds-u-display-none': this.readOnly,
118
- } }, h("slot", { key: '7e50b20d90a68f9af583b8f2ade5c742e2d52351', name: "suffix" }))), this.readOnly && !this.hideReadOnlyIcon && (h("span", { key: '72e2cf4f2872d247ac6f28e935e8185aafef6dec', class: "text-field-icon__readonly" }, h("tds-tooltip", { key: '171bdde8535c6bbd08eec60d87d9aa5bae1f98bd', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: '05e7e8898ee3fcf81fb011aa2141092e8b749e37', id: "readonly-tooltip", name: "edit_inactive", size: "20px" })))), h("div", { key: '0c16d399b376d9aebed2aabf759cb7319c5745cf', "aria-live": "assertive" }, (this.helper || this.maxLength > 0) && (h("div", { key: '280eed9185c8cffa29e3cf62425f1f1f377f3abc', class: "text-field-helper", id: `text-field-helper-element-${this.uuid}` }, this.state === 'error' && (h("div", { key: 'ddf07e469173a574a848cd2ff816bcc535940340', class: "text-field-helper-error-state" }, !this.readOnly && h("tds-icon", { key: 'b5b06dba13fb8911828153341b631facfc016c88', name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, !this.readOnly && this.maxLength > 0 && (h("span", { key: 'a4c41817f19b32e575423d5bbe19c28a38031e6e', class: {
119
+ } }, h("slot", { key: 'b594b47a2ee6bfb393b44c8b704232881e53c119', name: "suffix" }))), this.readOnly && !this.hideReadOnlyIcon && (h("span", { key: '5a9d4e1492b908a397881a42f9c0229d32e2a457', class: "text-field-icon__readonly" }, h("tds-tooltip", { key: '02bb93263fc40d5d6aeb2dda3ad5ac49f2e2ccf6', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: 'e926eb2de3946822875badbcc7e325e9981b8271', id: "readonly-tooltip", name: "edit_inactive", size: "20px" })))), h("div", { key: 'ac28d59eb12ef9efe38cd940daf1299b06dd4446', "aria-live": "assertive" }, (this.helper || this.maxLength > 0) && (h("div", { key: 'd1b09c6f543f0e985476b798ee642c6a11cb7485', class: "text-field-helper", id: `text-field-helper-element-${this.uuid}` }, this.state === 'error' && (h("div", { key: '160ca65e021a3f313b828dbcf82b158036d748ad', class: "text-field-helper-error-state" }, !this.readOnly && h("tds-icon", { key: '34bb9eaa6c267d882fc28a9b80fd331523bd981b', name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, !this.readOnly && this.maxLength > 0 && (h("span", { key: '6b1ad7dbce2e2fe37e116c1d8f0b11f2dfe00260', class: {
119
120
  'text-field-textcounter-divider': true,
120
121
  'text-field-textcounter-disabled': this.disabled,
121
122
  } }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, " / ", this.maxLength)))))));
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Gets the appropriate aria-invalid value for form components.
3
+ *
4
+ * This utility handles cross-framework compatibility by checking for an explicit
5
+ * aria-invalid attribute on the host element first, then falling back to the
6
+ * component's state. It properly handles both string and boolean values that
7
+ * may be passed from different frameworks (especially React).
8
+ *
9
+ * @param host - The host element to check for aria-invalid attribute
10
+ * @param state - The component's state ('error', 'success', 'default')
11
+ * @returns The aria-invalid value as a string ('true' or 'false')
12
+ *
13
+ */
14
+ export const getAriaInvalid = (host, state) => {
15
+ // Check if aria-invalid is explicitly set on the host element
16
+ const hostAriaInvalid = host.getAttribute('aria-invalid');
17
+ if (hostAriaInvalid !== null) {
18
+ // Handle boolean values from React (true/false as strings)
19
+ if (hostAriaInvalid === 'true' || hostAriaInvalid === 'false') {
20
+ return hostAriaInvalid;
21
+ }
22
+ // Handle other string values (convert to string for consistency)
23
+ return String(hostAriaInvalid);
24
+ }
25
+ // Fallback to state-based aria-invalid
26
+ return state === 'error' ? 'true' : 'false';
27
+ };
@@ -1,7 +1,7 @@
1
1
  import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
2
2
  import { i as inheritAriaAttributes } from './p-0bd4c19c.js';
3
3
  import { d as defineCustomElement$3 } from './p-9ad61cb5.js';
4
- import { d as defineCustomElement$2 } from './p-ad6babcd.js';
4
+ import { d as defineCustomElement$2 } from './p-6adb1ce3.js';
5
5
  import { d as defineCustomElement$1 } from './p-b390ece5.js';
6
6
 
7
7
  const headerLauncherButtonCss = ":host{display:block}:host tds-header-item{display:block}:host .icon{position:relative;margin-left:-6px;left:3px;transition:all 0.2s ease-in-out}";
@@ -2,7 +2,7 @@ import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
2
2
  import { d as dfs } from './p-52bf0fdf.js';
3
3
  import { d as defineCustomElement$1 } from './p-9ad61cb5.js';
4
4
 
5
- const headerItemCss = ":host ::slotted(button),:host ::slotted(a){all:unset;box-sizing:border-box;background-color:var(--tds-header-background);border-right:1px solid var(--tds-header--basic-element-border);width:100%;height:100%;cursor:pointer;padding:0 24px;display:flex;align-items:center;gap:8px}:host ::slotted(button) *,:host ::slotted(a) *{box-sizing:border-box}:host ::slotted(button:hover),:host ::slotted(a:hover){background-color:var(--tds-header-item-hover)}:host ::slotted(button:focus-visible),:host ::slotted(a:focus-visible){border:none;outline:2px solid var(--tds-focus-outline-color);box-shadow:inset 0 0 0 3px var(--tds-white);outline-offset:-2px}:host .component-active ::slotted(button),:host .component-active ::slotted(a){background-color:var(--tds-header--basic-element-background-open);color:var(--tds-header-nav-item-dropdown-opened-color);border-color:var(--tds-header--basic-element-border-open)}:host .component-selected:not(.component-active) ::slotted(button),:host .component-selected:not(.component-active) ::slotted(a){background-color:var(--tds-header--basic-element-background-selected);padding-top:4px;border-bottom-style:solid;border-bottom-width:4px;border-bottom-color:var(--tds-nav-item-border-color-active)}";
5
+ const headerItemCss = ":host ::slotted(button),:host ::slotted(a){all:unset;box-sizing:border-box;background-color:var(--tds-header-background);border-right:1px solid var(--tds-header--basic-element-border);width:100%;height:100%;cursor:pointer;padding:0 24px;display:flex;align-items:center;gap:8px}:host ::slotted(button) *,:host ::slotted(a) *{box-sizing:border-box}:host ::slotted(button:hover),:host ::slotted(a:hover){background-color:var(--tds-header-item-hover)}:host ::slotted(button:focus-visible),:host ::slotted(a:focus-visible){outline:2px solid var(--tds-focus-outline-color);box-shadow:0 0 0 1px var(--tds-white);outline-offset:1px;z-index:1}:host .component-active ::slotted(button),:host .component-active ::slotted(a){background-color:var(--tds-header--basic-element-background-open);color:var(--tds-header-nav-item-dropdown-opened-color);border-color:var(--tds-header--basic-element-border-open)}:host .component-selected:not(.component-active) ::slotted(button),:host .component-selected:not(.component-active) ::slotted(a){background-color:var(--tds-header--basic-element-background-selected);padding-top:4px;border-bottom-style:solid;border-bottom-width:4px;border-bottom-color:var(--tds-nav-item-border-color-active)}";
6
6
  const TdsHeaderItemStyle0 = headerItemCss;
7
7
 
8
8
  const TdsHeaderItem = /*@__PURE__*/ proxyCustomElement(class TdsHeaderItem extends H {
@@ -67,7 +67,7 @@ const TdsDropdownStyle0 = dropdownCss;
67
67
  function hasValueChanged(newValue, currentValue) {
68
68
  if (newValue.length !== currentValue.length)
69
69
  return true;
70
- return newValue.some((val, i) => val !== currentValue[i]);
70
+ return newValue.some((val) => !currentValue.includes(val));
71
71
  }
72
72
  const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H {
73
73
  constructor() {
@@ -78,7 +78,6 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
78
78
  this.tdsFocus = createEvent(this, "tdsFocus", 6);
79
79
  this.tdsBlur = createEvent(this, "tdsBlur", 6);
80
80
  this.tdsInput = createEvent(this, "tdsInput", 6);
81
- this.hasFocus = false;
82
81
  this.setDefaultOption = () => {
83
82
  if (this.internalDefaultValue) {
84
83
  // Convert the internal default value to an array if it's not already
@@ -193,23 +192,19 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
193
192
  // Add this line to ensure internal value is cleared
194
193
  this.internalValue = '';
195
194
  };
196
- this.handleFocus = () => {
195
+ this.handleFocus = (event) => {
197
196
  this.open = true;
198
197
  this.filterFocus = true;
199
198
  if (this.multiselect && this.inputElement) {
200
199
  this.inputElement.value = '';
201
200
  }
202
- // Focus event is now handled by focusin listener
201
+ this.tdsFocus.emit(event);
203
202
  if (this.filter) {
204
203
  this.handleFilter({ target: { value: '' } });
205
204
  }
206
205
  };
207
- this.handleBlur = () => {
208
- // Handle internal state changes when component loses focus
209
- this.filterFocus = false;
210
- if (this.multiselect && this.inputElement) {
211
- this.inputElement.value = this.getValue();
212
- }
206
+ this.handleBlur = (event) => {
207
+ this.tdsBlur.emit(event);
213
208
  };
214
209
  this.resetInput = () => {
215
210
  const inputEl = this.host.querySelector('input');
@@ -384,7 +379,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
384
379
  }
385
380
  }
386
381
  // Always trigger the focus event to open the dropdown
387
- this.handleFocus();
382
+ this.handleFocus({});
388
383
  }
389
384
  /** Method for closing the Dropdown. */
390
385
  async close() {
@@ -406,25 +401,6 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
406
401
  }
407
402
  }
408
403
  }
409
- onFocusIn(event) {
410
- // Check if the focus is within this dropdown component
411
- if (this.host.contains(event.target)) {
412
- if (!this.hasFocus) {
413
- this.hasFocus = true;
414
- this.tdsFocus.emit(event);
415
- }
416
- }
417
- }
418
- onFocusOut(event) {
419
- // Only emit blur if focus is actually leaving the entire dropdown component
420
- const relatedTarget = event.relatedTarget;
421
- // If relatedTarget is null (focus going to body/window) or outside the component, emit blur
422
- if (this.hasFocus && (!relatedTarget || !this.host.contains(relatedTarget))) {
423
- this.hasFocus = false;
424
- this.handleBlur();
425
- this.tdsBlur.emit(event);
426
- }
427
- }
428
404
  async onKeyDown(event) {
429
405
  var _a;
430
406
  // Get the active element
@@ -544,9 +520,9 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
544
520
  // Generate unique IDs for associating labels and helpers with the input/button
545
521
  const labelId = this.label ? `dropdown-label-${this.name || generateUniqueId()}` : undefined;
546
522
  const helperId = this.helper ? `dropdown-helper-${this.name || generateUniqueId()}` : undefined;
547
- return (h(Host, { key: 'fc01da19c2eeb9c225dea61e473e4c8c64adce9a', class: {
523
+ return (h(Host, { key: '69cdc96b6983b9556b4a9133ef8a0d2fa1e9e18e', class: {
548
524
  [`tds-mode-variant-${this.modeVariant}`]: Boolean(this.modeVariant),
549
- } }, this.label && this.labelPosition === 'outside' && (h("div", { key: 'f6a3c12162a750dfdaf7069b4c31b1b8e64d6d31', id: labelId, class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: 'c31cab097be72ebebeb9538a721e281f36365405', class: {
525
+ } }, this.label && this.labelPosition === 'outside' && (h("div", { key: '1cc3f825bc81ca34af7bbe845bd900531f724172', id: labelId, class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '213f3149de4b9bc4c147ab658d6d5199d3360181', class: {
550
526
  'dropdown-select': true,
551
527
  [this.size]: true,
552
528
  'disabled': this.disabled,
@@ -563,7 +539,13 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
563
539
  // eslint-disable-next-line no-return-assign
564
540
  ref: (inputEl) => (this.inputElement = inputEl), class: {
565
541
  placeholder: this.labelPosition === 'inside',
566
- }, type: "text", placeholder: this.filterFocus ? '' : this.placeholder, value: this.multiselect && this.filterFocus ? '' : this.getValue(), disabled: this.disabled, onInput: (event) => this.handleFilter(event), onFocus: () => this.handleFocus(), onKeyDown: (event) => {
542
+ }, type: "text", placeholder: this.filterFocus ? '' : this.placeholder, value: this.multiselect && this.filterFocus ? '' : this.getValue(), disabled: this.disabled, onInput: (event) => this.handleFilter(event), onBlur: (event) => {
543
+ this.filterFocus = false;
544
+ if (this.multiselect) {
545
+ this.inputElement.value = this.getValue();
546
+ }
547
+ this.handleBlur(event);
548
+ }, onFocus: (event) => this.handleFocus(event), onKeyDown: (event) => {
567
549
  if (event.key === 'Escape') {
568
550
  this.open = false;
569
551
  }
@@ -590,7 +572,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
590
572
  label-inside-as-placeholder
591
573
  ${this.size}
592
574
  ${this.selectedOptions.length ? 'selected' : ''}
593
- ` }, this.label)), h("div", { class: `placeholder ${this.size}` }, this.selectedOptions.length ? this.getValue() : this.placeholder), h("tds-icon", { "aria-label": "Open/Close dropdown", svgTitle: "Open/Close dropdown", class: `menu-icon ${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))))), h("div", { key: 'd4fe7a4e58238ff30e1d2edd1adda57363cd35ca', role: "listbox", "aria-label": this.tdsAriaLabel, inert: !this.open, "aria-orientation": "vertical", "aria-multiselectable": this.multiselect, ref: (element) => {
575
+ ` }, this.label)), h("div", { class: `placeholder ${this.size}` }, this.selectedOptions.length ? this.getValue() : this.placeholder), h("tds-icon", { "aria-label": "Open/Close dropdown", svgTitle: "Open/Close dropdown", class: `menu-icon ${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))))), h("div", { key: 'af7815b0cb8b36e37278965094d5198a9ff5aba9', role: "listbox", "aria-label": this.tdsAriaLabel, inert: !this.open, "aria-orientation": "vertical", "aria-multiselectable": this.multiselect, ref: (element) => {
594
576
  this.dropdownList = element;
595
577
  }, class: {
596
578
  'dropdown-list': true,
@@ -601,11 +583,11 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
601
583
  'closed': !this.open,
602
584
  [`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
603
585
  [`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
604
- } }, h("slot", { key: '883d2ffb1497304b8c3ef8131062769a91516d97', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: 'cc808c5d33b97f400cd4d6e0544f3da78f81f7a8', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: '66226ce4194e4e0c8d7e618b874c52180aa007f2', id: helperId, class: {
586
+ } }, h("slot", { key: '736b82b5f716fa818c17ae161341bc6b131d9cf2', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: 'f1c1471cbec4a6dd8830a8540f54e142c559d539', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: 'aa138a349c073158785ae1177c0879604f6b8d90', id: helperId, class: {
605
587
  helper: true,
606
588
  error: this.error,
607
589
  disabled: this.disabled,
608
- } }, this.error && h("tds-icon", { key: 'c2dd9ccb39957ef4cd2e9e0e0af3dbfdf531f20e', name: "error", size: "16px" }), this.helper))));
590
+ } }, this.error && h("tds-icon", { key: '936a8bd7db8a0ed994d6827c26bbb6732420fea4', name: "error", size: "16px" }), this.helper))));
609
591
  }
610
592
  get host() { return this; }
611
593
  static get watchers() { return {
@@ -646,7 +628,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
646
628
  "close": [64],
647
629
  "updateDisplay": [64],
648
630
  "appendValue": [64]
649
- }, [[9, "mousedown", "onAnyClick"], [0, "focusin", "onFocusIn"], [0, "focusout", "onFocusOut"], [0, "keydown", "onKeyDown"]], {
631
+ }, [[9, "mousedown", "onAnyClick"], [0, "keydown", "onKeyDown"]], {
650
632
  "value": ["handleValueChange"],
651
633
  "open": ["handleOpenState"],
652
634
  "defaultValue": ["handleDefaultValueChange"]
@@ -66,18 +66,10 @@ const TdsDropdownOption = /*@__PURE__*/ proxyCustomElement(class TdsDropdownOpti
66
66
  }
67
67
  };
68
68
  this.handleFocus = (event) => {
69
- // Focus events are now handled by the parent dropdown component
70
- // Only emit if this is a standalone option (not within a dropdown)
71
- if (!this.parentElement) {
72
- this.tdsFocus.emit(event);
73
- }
69
+ this.tdsFocus.emit(event);
74
70
  };
75
71
  this.handleBlur = (event) => {
76
- // Blur events are now handled by the parent dropdown component
77
- // Only emit if this is a standalone option (not within a dropdown)
78
- if (!this.parentElement) {
79
- this.tdsBlur.emit(event);
80
- }
72
+ this.tdsBlur.emit(event);
81
73
  };
82
74
  this.value = undefined;
83
75
  this.internalValue = undefined;
@@ -98,7 +90,7 @@ const TdsDropdownOption = /*@__PURE__*/ proxyCustomElement(class TdsDropdownOpti
98
90
  this.internalValue = convertToString(this.value);
99
91
  }
100
92
  render() {
101
- return (h(Host, { key: '5448be3efbb06ae6d0fa3797f4b724c2d656d7a3' }, h("div", { key: '78945300c0bddb4ce95ab6f8de50eded1383dec7', class: `dropdown-option
93
+ return (h(Host, { key: 'd35a3153be292b1656d0efca93f06bfc1357041b' }, h("div", { key: '384353f9868a3fb559ca4140d5cd4f5553e024ad', class: `dropdown-option
102
94
  ${this.size}
103
95
  ${this.selected ? 'selected' : ''}
104
96
  ${this.disabled ? 'disabled' : ''}
@@ -108,8 +100,6 @@ const TdsDropdownOption = /*@__PURE__*/ proxyCustomElement(class TdsDropdownOpti
108
100
  }
109
101
  } }, h("tds-checkbox", { onTdsChange: (event) => {
110
102
  this.handleMultiselect(event);
111
- }, onTdsBlur: (event) => {
112
- event.stopPropagation();
113
103
  }, disabled: this.disabled, checked: this.selected, tdsAriaLabel: this.tdsAriaLabel, class: {
114
104
  [this.size]: true,
115
105
  } }, h("div", { slot: "label" }, h("slot", null))))) : (h("button", { role: "option", "aria-disabled": this.disabled, "aria-selected": this.selected, "aria-label": this.tdsAriaLabel, onClick: () => {