@scania/tegel 1.37.1-expose-filter-input-value-beta.0 → 1.37.1-expose-filter-input-value-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -173,10 +173,8 @@ const TdsDropdown = class {
173
173
  this.inputElement.focus();
174
174
  };
175
175
  this.handleFilter = (event) => {
176
- // Emit the tdsInput event with the input value, following the same pattern as other components
177
176
  this.tdsInput.emit(event);
178
- const inputEl = event.target;
179
- const query = inputEl.value.toLowerCase();
177
+ const query = event.target.value.toLowerCase();
180
178
  /* Check if the query is empty, and if so, show all options */
181
179
  const children = this.getChildren();
182
180
  if (query === '') {
@@ -204,16 +202,7 @@ const TdsDropdown = class {
204
202
  this.handleFilterReset = () => {
205
203
  this.reset();
206
204
  this.inputElement.value = '';
207
- // Create a proper InputEvent for the filter reset
208
- const resetEvent = new InputEvent('input', {
209
- bubbles: true,
210
- cancelable: true,
211
- });
212
- Object.defineProperty(resetEvent, 'target', {
213
- value: this.inputElement,
214
- writable: false,
215
- });
216
- this.handleFilter(resetEvent);
205
+ this.handleFilter({ target: { value: '' } });
217
206
  this.inputElement.focus();
218
207
  // Add this line to ensure internal value is cleared
219
208
  this.internalValue = '';
@@ -226,16 +215,7 @@ const TdsDropdown = class {
226
215
  }
227
216
  this.tdsFocus.emit(event);
228
217
  if (this.filter) {
229
- // Create a proper InputEvent for the filter focus
230
- const focusEvent = new InputEvent('input', {
231
- bubbles: true,
232
- cancelable: true,
233
- });
234
- Object.defineProperty(focusEvent, 'target', {
235
- value: this.inputElement,
236
- writable: false,
237
- });
238
- this.handleFilter(focusEvent);
218
+ this.handleFilter({ target: { value: '' } });
239
219
  }
240
220
  };
241
221
  this.handleBlur = (event) => {
@@ -555,9 +535,9 @@ const TdsDropdown = class {
555
535
  // Generate unique IDs for associating labels and helpers with the input/button
556
536
  const labelId = this.label ? `dropdown-label-${this.name || generateUniqueId.generateUniqueId()}` : undefined;
557
537
  const helperId = this.helper ? `dropdown-helper-${this.name || generateUniqueId.generateUniqueId()}` : undefined;
558
- return (index.h(index.Host, { key: 'f289633d0270a882cfd961878d73261d4560a468', class: {
538
+ return (index.h(index.Host, { key: '69cdc96b6983b9556b4a9133ef8a0d2fa1e9e18e', class: {
559
539
  [`tds-mode-variant-${this.modeVariant}`]: Boolean(this.modeVariant),
560
- } }, this.label && this.labelPosition === 'outside' && (index.h("div", { key: 'd44c53c472461705ca763c89499de08ba4a95807', id: labelId, class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), index.h("div", { key: 'e1c9301b13af161832a9198730f2ddb8652bf034', class: {
540
+ } }, this.label && this.labelPosition === 'outside' && (index.h("div", { key: '1cc3f825bc81ca34af7bbe845bd900531f724172', id: labelId, class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), index.h("div", { key: '213f3149de4b9bc4c147ab658d6d5199d3360181', class: {
561
541
  'dropdown-select': true,
562
542
  [this.size]: true,
563
543
  'disabled': this.disabled,
@@ -607,7 +587,7 @@ const TdsDropdown = class {
607
587
  label-inside-as-placeholder
608
588
  ${this.size}
609
589
  ${this.selectedOptions.length ? 'selected' : ''}
610
- ` }, this.label)), index.h("div", { class: `placeholder ${this.size}` }, this.selectedOptions.length ? this.getValue() : this.placeholder), index.h("tds-icon", { "aria-label": "Open/Close dropdown", svgTitle: "Open/Close dropdown", class: `menu-icon ${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))))), index.h("div", { key: '6da753a8a99f529c12e3b2f932a2c18c3849cc67', role: "listbox", "aria-label": this.tdsAriaLabel, inert: !this.open, "aria-orientation": "vertical", "aria-multiselectable": this.multiselect, ref: (element) => {
590
+ ` }, this.label)), index.h("div", { class: `placeholder ${this.size}` }, this.selectedOptions.length ? this.getValue() : this.placeholder), index.h("tds-icon", { "aria-label": "Open/Close dropdown", svgTitle: "Open/Close dropdown", class: `menu-icon ${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))))), index.h("div", { key: 'af7815b0cb8b36e37278965094d5198a9ff5aba9', role: "listbox", "aria-label": this.tdsAriaLabel, inert: !this.open, "aria-orientation": "vertical", "aria-multiselectable": this.multiselect, ref: (element) => {
611
591
  this.dropdownList = element;
612
592
  }, class: {
613
593
  'dropdown-list': true,
@@ -618,11 +598,11 @@ const TdsDropdown = class {
618
598
  'closed': !this.open,
619
599
  [`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
620
600
  [`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
621
- } }, index.h("slot", { key: '58e394cc7faabdd8db13e015397f363e10642a3b', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (index.h("div", { key: '5b9c48f28e07e5e85f86229c87cf74edf1fe97b0', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (index.h("div", { key: 'b49c0686ee4c3b776fcee30e84933ee2a94b3cb5', id: helperId, class: {
601
+ } }, index.h("slot", { key: '736b82b5f716fa818c17ae161341bc6b131d9cf2', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (index.h("div", { key: 'f1c1471cbec4a6dd8830a8540f54e142c559d539', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (index.h("div", { key: 'aa138a349c073158785ae1177c0879604f6b8d90', id: helperId, class: {
622
602
  helper: true,
623
603
  error: this.error,
624
604
  disabled: this.disabled,
625
- } }, this.error && index.h("tds-icon", { key: 'bd271a668f55f0da8d8e605fd9e445026a1da6b0', name: "error", size: "16px" }), this.helper))));
605
+ } }, this.error && index.h("tds-icon", { key: '936a8bd7db8a0ed994d6827c26bbb6732420fea4', name: "error", size: "16px" }), this.helper))));
626
606
  }
627
607
  get host() { return index.getElement(this); }
628
608
  static get watchers() { return {
@@ -94,10 +94,8 @@ export class TdsDropdown {
94
94
  this.inputElement.focus();
95
95
  };
96
96
  this.handleFilter = (event) => {
97
- // Emit the tdsInput event with the input value, following the same pattern as other components
98
97
  this.tdsInput.emit(event);
99
- const inputEl = event.target;
100
- const query = inputEl.value.toLowerCase();
98
+ const query = event.target.value.toLowerCase();
101
99
  /* Check if the query is empty, and if so, show all options */
102
100
  const children = this.getChildren();
103
101
  if (query === '') {
@@ -125,16 +123,7 @@ export class TdsDropdown {
125
123
  this.handleFilterReset = () => {
126
124
  this.reset();
127
125
  this.inputElement.value = '';
128
- // Create a proper InputEvent for the filter reset
129
- const resetEvent = new InputEvent('input', {
130
- bubbles: true,
131
- cancelable: true,
132
- });
133
- Object.defineProperty(resetEvent, 'target', {
134
- value: this.inputElement,
135
- writable: false,
136
- });
137
- this.handleFilter(resetEvent);
126
+ this.handleFilter({ target: { value: '' } });
138
127
  this.inputElement.focus();
139
128
  // Add this line to ensure internal value is cleared
140
129
  this.internalValue = '';
@@ -147,16 +136,7 @@ export class TdsDropdown {
147
136
  }
148
137
  this.tdsFocus.emit(event);
149
138
  if (this.filter) {
150
- // Create a proper InputEvent for the filter focus
151
- const focusEvent = new InputEvent('input', {
152
- bubbles: true,
153
- cancelable: true,
154
- });
155
- Object.defineProperty(focusEvent, 'target', {
156
- value: this.inputElement,
157
- writable: false,
158
- });
159
- this.handleFilter(focusEvent);
139
+ this.handleFilter({ target: { value: '' } });
160
140
  }
161
141
  };
162
142
  this.handleBlur = (event) => {
@@ -476,9 +456,9 @@ export class TdsDropdown {
476
456
  // Generate unique IDs for associating labels and helpers with the input/button
477
457
  const labelId = this.label ? `dropdown-label-${this.name || generateUniqueId()}` : undefined;
478
458
  const helperId = this.helper ? `dropdown-helper-${this.name || generateUniqueId()}` : undefined;
479
- return (h(Host, { key: 'f289633d0270a882cfd961878d73261d4560a468', class: {
459
+ return (h(Host, { key: '69cdc96b6983b9556b4a9133ef8a0d2fa1e9e18e', class: {
480
460
  [`tds-mode-variant-${this.modeVariant}`]: Boolean(this.modeVariant),
481
- } }, this.label && this.labelPosition === 'outside' && (h("div", { key: 'd44c53c472461705ca763c89499de08ba4a95807', id: labelId, class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: 'e1c9301b13af161832a9198730f2ddb8652bf034', class: {
461
+ } }, this.label && this.labelPosition === 'outside' && (h("div", { key: '1cc3f825bc81ca34af7bbe845bd900531f724172', id: labelId, class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '213f3149de4b9bc4c147ab658d6d5199d3360181', class: {
482
462
  'dropdown-select': true,
483
463
  [this.size]: true,
484
464
  'disabled': this.disabled,
@@ -528,7 +508,7 @@ export class TdsDropdown {
528
508
  label-inside-as-placeholder
529
509
  ${this.size}
530
510
  ${this.selectedOptions.length ? 'selected' : ''}
531
- ` }, 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: '6da753a8a99f529c12e3b2f932a2c18c3849cc67', role: "listbox", "aria-label": this.tdsAriaLabel, inert: !this.open, "aria-orientation": "vertical", "aria-multiselectable": this.multiselect, ref: (element) => {
511
+ ` }, 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) => {
532
512
  this.dropdownList = element;
533
513
  }, class: {
534
514
  'dropdown-list': true,
@@ -539,11 +519,11 @@ export class TdsDropdown {
539
519
  'closed': !this.open,
540
520
  [`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
541
521
  [`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
542
- } }, h("slot", { key: '58e394cc7faabdd8db13e015397f363e10642a3b', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: '5b9c48f28e07e5e85f86229c87cf74edf1fe97b0', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: 'b49c0686ee4c3b776fcee30e84933ee2a94b3cb5', id: helperId, class: {
522
+ } }, 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: {
543
523
  helper: true,
544
524
  error: this.error,
545
525
  disabled: this.disabled,
546
- } }, this.error && h("tds-icon", { key: 'bd271a668f55f0da8d8e605fd9e445026a1da6b0', name: "error", size: "16px" }), this.helper))));
526
+ } }, this.error && h("tds-icon", { key: '936a8bd7db8a0ed994d6827c26bbb6732420fea4', name: "error", size: "16px" }), this.helper))));
547
527
  }
548
528
  static get is() { return "tds-dropdown"; }
549
529
  static get encapsulation() { return "shadow"; }
@@ -158,10 +158,8 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
158
158
  this.inputElement.focus();
159
159
  };
160
160
  this.handleFilter = (event) => {
161
- // Emit the tdsInput event with the input value, following the same pattern as other components
162
161
  this.tdsInput.emit(event);
163
- const inputEl = event.target;
164
- const query = inputEl.value.toLowerCase();
162
+ const query = event.target.value.toLowerCase();
165
163
  /* Check if the query is empty, and if so, show all options */
166
164
  const children = this.getChildren();
167
165
  if (query === '') {
@@ -189,16 +187,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
189
187
  this.handleFilterReset = () => {
190
188
  this.reset();
191
189
  this.inputElement.value = '';
192
- // Create a proper InputEvent for the filter reset
193
- const resetEvent = new InputEvent('input', {
194
- bubbles: true,
195
- cancelable: true,
196
- });
197
- Object.defineProperty(resetEvent, 'target', {
198
- value: this.inputElement,
199
- writable: false,
200
- });
201
- this.handleFilter(resetEvent);
190
+ this.handleFilter({ target: { value: '' } });
202
191
  this.inputElement.focus();
203
192
  // Add this line to ensure internal value is cleared
204
193
  this.internalValue = '';
@@ -211,16 +200,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
211
200
  }
212
201
  this.tdsFocus.emit(event);
213
202
  if (this.filter) {
214
- // Create a proper InputEvent for the filter focus
215
- const focusEvent = new InputEvent('input', {
216
- bubbles: true,
217
- cancelable: true,
218
- });
219
- Object.defineProperty(focusEvent, 'target', {
220
- value: this.inputElement,
221
- writable: false,
222
- });
223
- this.handleFilter(focusEvent);
203
+ this.handleFilter({ target: { value: '' } });
224
204
  }
225
205
  };
226
206
  this.handleBlur = (event) => {
@@ -540,9 +520,9 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
540
520
  // Generate unique IDs for associating labels and helpers with the input/button
541
521
  const labelId = this.label ? `dropdown-label-${this.name || generateUniqueId()}` : undefined;
542
522
  const helperId = this.helper ? `dropdown-helper-${this.name || generateUniqueId()}` : undefined;
543
- return (h(Host, { key: 'f289633d0270a882cfd961878d73261d4560a468', class: {
523
+ return (h(Host, { key: '69cdc96b6983b9556b4a9133ef8a0d2fa1e9e18e', class: {
544
524
  [`tds-mode-variant-${this.modeVariant}`]: Boolean(this.modeVariant),
545
- } }, this.label && this.labelPosition === 'outside' && (h("div", { key: 'd44c53c472461705ca763c89499de08ba4a95807', id: labelId, class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: 'e1c9301b13af161832a9198730f2ddb8652bf034', 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: {
546
526
  'dropdown-select': true,
547
527
  [this.size]: true,
548
528
  'disabled': this.disabled,
@@ -592,7 +572,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
592
572
  label-inside-as-placeholder
593
573
  ${this.size}
594
574
  ${this.selectedOptions.length ? 'selected' : ''}
595
- ` }, 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: '6da753a8a99f529c12e3b2f932a2c18c3849cc67', 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) => {
596
576
  this.dropdownList = element;
597
577
  }, class: {
598
578
  'dropdown-list': true,
@@ -603,11 +583,11 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
603
583
  'closed': !this.open,
604
584
  [`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
605
585
  [`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
606
- } }, h("slot", { key: '58e394cc7faabdd8db13e015397f363e10642a3b', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: '5b9c48f28e07e5e85f86229c87cf74edf1fe97b0', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: 'b49c0686ee4c3b776fcee30e84933ee2a94b3cb5', 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: {
607
587
  helper: true,
608
588
  error: this.error,
609
589
  disabled: this.disabled,
610
- } }, this.error && h("tds-icon", { key: 'bd271a668f55f0da8d8e605fd9e445026a1da6b0', name: "error", size: "16px" }), this.helper))));
590
+ } }, this.error && h("tds-icon", { key: '936a8bd7db8a0ed994d6827c26bbb6732420fea4', name: "error", size: "16px" }), this.helper))));
611
591
  }
612
592
  get host() { return this; }
613
593
  static get watchers() { return {
@@ -1,4 +1,4 @@
1
- import { T as TdsDropdown$1, d as defineCustomElement$1 } from './p-85b600b8.js';
1
+ import { T as TdsDropdown$1, d as defineCustomElement$1 } from './p-94bfc9f4.js';
2
2
 
3
3
  const TdsDropdown = TdsDropdown$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,6 +1,6 @@
1
1
  import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-28ef5186.js';
2
2
  import { d as defineCustomElement$5 } from './p-44f5b5e1.js';
3
- import { d as defineCustomElement$4 } from './p-85b600b8.js';
3
+ import { d as defineCustomElement$4 } from './p-94bfc9f4.js';
4
4
  import { d as defineCustomElement$3 } from './p-d64878cb.js';
5
5
  import { d as defineCustomElement$2 } from './p-b390ece5.js';
6
6
 
@@ -169,10 +169,8 @@ const TdsDropdown = class {
169
169
  this.inputElement.focus();
170
170
  };
171
171
  this.handleFilter = (event) => {
172
- // Emit the tdsInput event with the input value, following the same pattern as other components
173
172
  this.tdsInput.emit(event);
174
- const inputEl = event.target;
175
- const query = inputEl.value.toLowerCase();
173
+ const query = event.target.value.toLowerCase();
176
174
  /* Check if the query is empty, and if so, show all options */
177
175
  const children = this.getChildren();
178
176
  if (query === '') {
@@ -200,16 +198,7 @@ const TdsDropdown = class {
200
198
  this.handleFilterReset = () => {
201
199
  this.reset();
202
200
  this.inputElement.value = '';
203
- // Create a proper InputEvent for the filter reset
204
- const resetEvent = new InputEvent('input', {
205
- bubbles: true,
206
- cancelable: true,
207
- });
208
- Object.defineProperty(resetEvent, 'target', {
209
- value: this.inputElement,
210
- writable: false,
211
- });
212
- this.handleFilter(resetEvent);
201
+ this.handleFilter({ target: { value: '' } });
213
202
  this.inputElement.focus();
214
203
  // Add this line to ensure internal value is cleared
215
204
  this.internalValue = '';
@@ -222,16 +211,7 @@ const TdsDropdown = class {
222
211
  }
223
212
  this.tdsFocus.emit(event);
224
213
  if (this.filter) {
225
- // Create a proper InputEvent for the filter focus
226
- const focusEvent = new InputEvent('input', {
227
- bubbles: true,
228
- cancelable: true,
229
- });
230
- Object.defineProperty(focusEvent, 'target', {
231
- value: this.inputElement,
232
- writable: false,
233
- });
234
- this.handleFilter(focusEvent);
214
+ this.handleFilter({ target: { value: '' } });
235
215
  }
236
216
  };
237
217
  this.handleBlur = (event) => {
@@ -551,9 +531,9 @@ const TdsDropdown = class {
551
531
  // Generate unique IDs for associating labels and helpers with the input/button
552
532
  const labelId = this.label ? `dropdown-label-${this.name || generateUniqueId()}` : undefined;
553
533
  const helperId = this.helper ? `dropdown-helper-${this.name || generateUniqueId()}` : undefined;
554
- return (h(Host, { key: 'f289633d0270a882cfd961878d73261d4560a468', class: {
534
+ return (h(Host, { key: '69cdc96b6983b9556b4a9133ef8a0d2fa1e9e18e', class: {
555
535
  [`tds-mode-variant-${this.modeVariant}`]: Boolean(this.modeVariant),
556
- } }, this.label && this.labelPosition === 'outside' && (h("div", { key: 'd44c53c472461705ca763c89499de08ba4a95807', id: labelId, class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: 'e1c9301b13af161832a9198730f2ddb8652bf034', class: {
536
+ } }, this.label && this.labelPosition === 'outside' && (h("div", { key: '1cc3f825bc81ca34af7bbe845bd900531f724172', id: labelId, class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '213f3149de4b9bc4c147ab658d6d5199d3360181', class: {
557
537
  'dropdown-select': true,
558
538
  [this.size]: true,
559
539
  'disabled': this.disabled,
@@ -603,7 +583,7 @@ const TdsDropdown = class {
603
583
  label-inside-as-placeholder
604
584
  ${this.size}
605
585
  ${this.selectedOptions.length ? 'selected' : ''}
606
- ` }, 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: '6da753a8a99f529c12e3b2f932a2c18c3849cc67', role: "listbox", "aria-label": this.tdsAriaLabel, inert: !this.open, "aria-orientation": "vertical", "aria-multiselectable": this.multiselect, ref: (element) => {
586
+ ` }, 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) => {
607
587
  this.dropdownList = element;
608
588
  }, class: {
609
589
  'dropdown-list': true,
@@ -614,11 +594,11 @@ const TdsDropdown = class {
614
594
  'closed': !this.open,
615
595
  [`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
616
596
  [`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
617
- } }, h("slot", { key: '58e394cc7faabdd8db13e015397f363e10642a3b', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: '5b9c48f28e07e5e85f86229c87cf74edf1fe97b0', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: 'b49c0686ee4c3b776fcee30e84933ee2a94b3cb5', id: helperId, class: {
597
+ } }, 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: {
618
598
  helper: true,
619
599
  error: this.error,
620
600
  disabled: this.disabled,
621
- } }, this.error && h("tds-icon", { key: 'bd271a668f55f0da8d8e605fd9e445026a1da6b0', name: "error", size: "16px" }), this.helper))));
601
+ } }, this.error && h("tds-icon", { key: '936a8bd7db8a0ed994d6827c26bbb6732420fea4', name: "error", size: "16px" }), this.helper))));
622
602
  }
623
603
  get host() { return getElement(this); }
624
604
  static get watchers() { return {
@@ -0,0 +1 @@
1
+ import{r as t,c as o,h as s,H as i,g as e}from"./p-2049fab2.js";import{g as d}from"./p-11648030.js";const r=t=>null==t?"":t.toString(),l=t=>t.map((t=>r(t))),n=class{constructor(s){t(this,s),this.tdsChange=o(this,"tdsChange",6),this.tdsFocus=o(this,"tdsFocus",6),this.tdsBlur=o(this,"tdsBlur",6),this.tdsInput=o(this,"tdsInput",6),this.setDefaultOption=()=>{if(this.internalDefaultValue){const t=this.multiselect?this.internalDefaultValue.split(","):[this.internalDefaultValue];this.updateDropdownStateInternal(t)}},this.getChildren=()=>{const t=Array.from(this.host.children).filter((t=>"TDS-DROPDOWN-OPTION"===t.tagName));return 0===t.length&&console.warn("TDS DROPDOWN: No options found. Disregard if loading data asynchronously."),t},this.getSelectedChildren=()=>0===this.selectedOptions.length?[]:this.selectedOptions.map((t=>{var o;return null===(o=this.getChildren())||void 0===o?void 0:o.find((o=>r(o.value)===r(t)))})).filter(Boolean),this.getSelectedChildrenLabels=()=>{var t;return null===(t=this.getSelectedChildren())||void 0===t?void 0:t.map((t=>t.textContent.trim()))},this.getValue=()=>{const t=this.getSelectedChildrenLabels();return t?null==t?void 0:t.join(", "):""},this.setValueAttribute=()=>{0===this.selectedOptions.length?this.host.removeAttribute("value"):this.host.setAttribute("value",this.selectedOptions.join(","))},this.getOpenDirection=()=>{var t,o,s,i,e;if("auto"===this.openDirection||!this.openDirection){const d=null!==(o=null===(t=this.dropdownList)||void 0===t?void 0:t.offsetHeight)&&void 0!==o?o:0;return(null!==(e=null===(i=(s=this.host).getBoundingClientRect)||void 0===i?void 0:i.call(s).top)&&void 0!==e?e:0)+d+57>window.innerHeight?"up":"down"}return this.openDirection},this.handleToggleOpen=()=>{if(!this.disabled&&(this.open=!this.open,this.open))if(this.filter)this.focusInputElement();else{const t=this.host.shadowRoot.querySelector("button");t&&t.focus()}},this.focusInputElement=()=>{this.inputElement&&this.inputElement.focus()},this.handleFilter=t=>{this.tdsInput.emit(t);const o=t.target.value.toLowerCase(),s=this.getChildren();""===o?(s.forEach((t=>(t.removeAttribute("hidden"),t))),this.filterResult=null):this.filterResult=s.filter((t=>(this.normalizeString(t.textContent).toLowerCase().includes(this.normalizeString(o).toLowerCase())?t.removeAttribute("hidden"):t.setAttribute("hidden",""),!t.hasAttribute("hidden")))).length},this.handleFilterReset=()=>{this.reset(),this.inputElement.value="",this.handleFilter({target:{value:""}}),this.inputElement.focus(),this.internalValue=""},this.handleFocus=t=>{this.open=!0,this.filterFocus=!0,this.multiselect&&this.inputElement&&(this.inputElement.value=""),this.tdsFocus.emit(t),this.filter&&this.handleFilter({target:{value:""}})},this.handleBlur=t=>{this.tdsBlur.emit(t)},this.resetInput=()=>{this.host.querySelector("input")&&this.reset()},this.name=void 0,this.disabled=!1,this.helper=void 0,this.label=void 0,this.labelPosition=void 0,this.modeVariant=null,this.openDirection="auto",this.placeholder=void 0,this.size="lg",this.animation="slide",this.error=!1,this.multiselect=!1,this.filter=!1,this.normalizeText=!0,this.noResultText="No result",this.defaultValue=void 0,this.value=null,this.tdsAriaLabel=void 0,this.open=!1,this.internalValue=void 0,this.filterResult=void 0,this.filterFocus=void 0,this.internalDefaultValue=void 0,this.selectedOptions=[]}handleValueChange(t){const o=this.normalizeValue(t);(function(t,o){return t.length!==o.length||t.some((t=>!o.includes(t)))})(o,this.selectedOptions)&&this.updateDropdownStateFromUser(o)}normalizeValue(t){return null==t||""===t?[]:this.multiselect?Array.isArray(t)?l(t):t.toString().split(",").filter((t=>""!==t)):Array.isArray(t)?[r(t[0])]:[r(t)]}updateDropdownStateInternal(t){this.updateDropdownState(t,!1)}updateDropdownStateFromUser(t){this.updateDropdownState(t,!0)}updateDropdownState(t,o=!0){const s=this.validateValues(t);this.selectedOptions=[...s],this.value=this.multiselect?this.selectedOptions:this.selectedOptions[0]||null,this.internalValue=this.getValue(),this.updateOptionElements(),this.updateDisplayValue(),o&&this.emitChange(),this.setValueAttribute()}validateValues(t){const o=this.getChildren();return o&&0!==o.length?t.filter((t=>{const s=o.some((o=>r(o.value)===r(t)));return s||console.warn(`Option with value "${t}" does not exist`),s})):(console.warn("No dropdown options found"),t)}updateOptionElements(){var t;null===(t=this.getChildren())||void 0===t||t.forEach((t=>{t.setSelected(this.selectedOptions.includes(r(t.value)))}))}updateDisplayValue(){this.internalValue=this.getSelectedChildrenLabels().join(", "),this.filter&&this.inputElement&&(this.inputElement.value=this.internalValue)}emitChange(){const t=this.multiselect?this.selectedOptions.join(","):this.selectedOptions[0]||null;this.tdsChange.emit({name:this.name,value:null!=t?t:null})}async setValue(t,o){let s;return s=Array.isArray(t)?l(t):[r(t)],this.updateDropdownStateFromUser(s),this.getSelectedChildren().map((t=>({value:t.value,label:t.textContent.trim()})))}async reset(){this.updateDropdownStateFromUser([])}async removeValue(t){const o=this.selectedOptions.filter((o=>o!==t));this.updateDropdownStateFromUser(o)}async focusElement(){if(this.filter)this.focusInputElement();else{const t=this.host.shadowRoot.querySelector("button");t&&t.focus()}this.handleFocus({})}async close(){this.open=!1}async updateDisplay(){this.updateDisplayValue()}onAnyClick(t){this.open&&!t.composedPath().includes(this.host)&&(this.open=!1)}async onKeyDown(t){var o;const{activeElement:s}=document;if(!s)return;const i=this.getChildren();if("ArrowDown"===t.key){const t=s.nextElementSibling?i.findIndex((t=>t===s.nextElementSibling)):0;i[((t,o)=>{if(void 0===t[o])return 0;for(let s=o;s<t.length;s++)if(!t[s].disabled)return s})(i,t)].focus()}else if("ArrowUp"===t.key)i[((t,o)=>{if(void 0===t[o])return t.length-1;for(let s=o;s>=0;s--)if(!t[s].disabled)return s})(i,s.nextElementSibling?this.getChildren().findIndex((t=>t===s.previousElementSibling)):0)].focus();else if("Escape"===t.key)if(this.open=!1,this.filter)null===(o=this.inputElement)||void 0===o||o.focus();else{const t=this.host.shadowRoot.querySelector("button");null==t||t.focus()}}handleOpenState(){this.filter&&this.multiselect&&(this.open||(this.inputElement.value=this.selectedOptions.length?this.getValue():"")),this.updateDropdownListInertState()}handleDefaultValueChange(t){null!=t&&(this.internalDefaultValue=r(t),this.setDefaultOption())}componentWillLoad(){if(null==this.value){if(null!=this.defaultValue){const t=r(this.defaultValue),o=this.multiselect?t.split(",").map(r):[t];this.updateDropdownStateInternal(o)}}else{const t=this.normalizeValue(this.value);this.updateDropdownStateInternal(t)}}handleSlotChange(){this.setDefaultOption()}normalizeString(t){return this.normalizeText?t.normalize("NFD").replace(/\p{Diacritic}/gu,""):t}async appendValue(t){this.updateDropdownStateFromUser(this.multiselect?[...this.selectedOptions,t]:[t])}componentDidRender(){const t=this.host.closest("form");t&&t.addEventListener("reset",this.resetInput),this.updateDropdownListInertState()}disconnectedCallback(){const t=this.host.closest("form");t&&t.removeEventListener("reset",this.resetInput)}updateDropdownListInertState(){this.dropdownList&&(this.open?this.dropdownList.removeAttribute("inert"):this.dropdownList.setAttribute("inert",""))}render(){((t,o,s,i)=>{let e=t.querySelector("input");t.querySelector("input")||(e=t.ownerDocument.createElement("input"),e.type="hidden",t.appendChild(e)),e.disabled=i,e.name=o,e.value=s||""})(this.host,this.name,this.selectedOptions.join(","),this.disabled);const t=this.label?`dropdown-label-${this.name||d()}`:void 0,o=this.helper?`dropdown-helper-${this.name||d()}`:void 0;return s(i,{key:"69cdc96b6983b9556b4a9133ef8a0d2fa1e9e18e",class:{[`tds-mode-variant-${this.modeVariant}`]:Boolean(this.modeVariant)}},this.label&&"outside"===this.labelPosition&&s("div",{key:"1cc3f825bc81ca34af7bbe845bd900531f724172",id:t,class:"label-outside "+(this.disabled?"disabled":"")},this.label),s("div",{key:"213f3149de4b9bc4c147ab658d6d5199d3360181",class:{"dropdown-select":!0,[this.size]:!0,disabled:this.disabled}},this.filter?s("div",{class:{filter:!0,focus:this.filterFocus,disabled:this.disabled,error:this.error}},s("div",{class:"value-wrapper"},this.label&&"inside"===this.labelPosition&&this.placeholder&&s("div",{id:t,class:`label-inside ${this.size}`},this.label),this.label&&"inside"===this.labelPosition&&!this.placeholder&&s("div",{id:t,class:`\n label-inside-as-placeholder\n ${this.size}\n ${this.selectedOptions.length?"selected":""}\n `},this.label),s("input",{"aria-label":this.tdsAriaLabel,"aria-labelledby":t,"aria-describedby":o,"aria-disabled":this.disabled,ref:t=>this.inputElement=t,class:{placeholder:"inside"===this.labelPosition},type:"text",placeholder:this.filterFocus?"":this.placeholder,value:this.multiselect&&this.filterFocus?"":this.getValue(),disabled:this.disabled,onInput:t=>this.handleFilter(t),onBlur:t=>{this.filterFocus=!1,this.multiselect&&(this.inputElement.value=this.getValue()),this.handleBlur(t)},onFocus:t=>this.handleFocus(t),onKeyDown:t=>{"Escape"===t.key&&(this.open=!1)}})),s("tds-icon",{tabIndex:0,role:"button","aria-label":"Clear filter",svgTitle:"Clear filter",onClick:this.handleFilterReset,onKeyDown:t=>{"Enter"===t.key&&this.handleFilterReset()},class:{"clear-icon":!0,hide:!(this.open&&""!==this.inputElement.value)},name:"cross",size:"16px"}),s("tds-icon",{tdsAriaHidden:!0,role:"button","aria-label":"Open/Close dropdown",svgTitle:"Open/Close dropdown",onClick:this.handleToggleOpen,onKeyDown:t=>{"Enter"===t.key&&this.handleToggleOpen()},class:"menu-icon "+(this.open?"open":"closed"),name:"chevron_down",size:"16px"})):s("button",{"aria-label":this.tdsAriaLabel,"aria-labelledby":t,"aria-describedby":o,"aria-disabled":this.disabled,onClick:()=>this.handleToggleOpen(),onKeyDown:t=>{"Escape"===t.key&&(this.open=!1)},class:`\n ${this.selectedOptions.length?"value":"placeholder"}\n ${this.open?"open":"closed"}\n ${this.error?"error":""}\n `,disabled:this.disabled},s("div",{class:`value-wrapper ${this.size}`},this.label&&"inside"===this.labelPosition&&this.placeholder&&s("div",{id:t,class:`label-inside ${this.size}`},this.label),this.label&&"inside"===this.labelPosition&&!this.placeholder&&s("div",{id:t,class:`\n label-inside-as-placeholder\n ${this.size}\n ${this.selectedOptions.length?"selected":""}\n `},this.label),s("div",{class:`placeholder ${this.size}`},this.selectedOptions.length?this.getValue():this.placeholder),s("tds-icon",{"aria-label":"Open/Close dropdown",svgTitle:"Open/Close dropdown",class:"menu-icon "+(this.open?"open":"closed"),name:"chevron_down",size:"16px"})))),s("div",{key:"af7815b0cb8b36e37278965094d5198a9ff5aba9",role:"listbox","aria-label":this.tdsAriaLabel,inert:!this.open,"aria-orientation":"vertical","aria-multiselectable":this.multiselect,ref:t=>{this.dropdownList=t},class:{"dropdown-list":!0,[this.size]:!0,[this.getOpenDirection()]:!0,"label-outside":this.label&&"outside"===this.labelPosition,open:this.open,closed:!this.open,[`animation-enter-${this.animation}`]:"none"!==this.animation&&this.open,[`animation-exit-${this.animation}`]:"none"!==this.animation&&!this.open}},s("slot",{key:"736b82b5f716fa818c17ae161341bc6b131d9cf2",onSlotchange:()=>this.handleSlotChange()}),0===this.filterResult&&""!==this.noResultText&&s("div",{key:"f1c1471cbec4a6dd8830a8540f54e142c559d539",class:`no-result ${this.size}`},this.noResultText)),this.helper&&s("div",{key:"aa138a349c073158785ae1177c0879604f6b8d90",id:o,class:{helper:!0,error:this.error,disabled:this.disabled}},this.error&&s("tds-icon",{key:"936a8bd7db8a0ed994d6827c26bbb6732420fea4",name:"error",size:"16px"}),this.helper))}get host(){return e(this)}static get watchers(){return{value:["handleValueChange"],open:["handleOpenState"],defaultValue:["handleDefaultValueChange"]}}};n.style='@charset "UTF-8";:host button{all:unset;height:100%;width:100%;background-color:var(--tds-dropdown-bg);border-bottom:1px solid var(--tds-dropdown-border-bottom);border-radius:var(--tds-dropdown-border-radius)}:host button:hover{border-bottom:1px solid var(--tds-dropdown-border-bottom-hover)}:host button .value-wrapper{padding:0 16px;display:flex;align-items:center;justify-content:space-between}:host button.placeholder{color:var(--tds-dropdown-placeholder-color);line-height:1.3}:host button.value{color:var(--tds-dropdown-value-color);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);line-height:1.3}:host button:focus{border-bottom:0}:host button.error{border-bottom:1px solid var(--tds-dropdown-error)}:host button.error:focus{border-bottom-color:transparent}:host button.error:focus::before{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background:var(--tds-dropdown-error)}:host button:disabled{color:var(--tds-dropdown-disabled-color);border-bottom:1px solid transparent}:host button .menu-icon{margin-right:0}:host .dropdown-select:focus-within{outline:2px solid var(--tds-focus-outline-color);box-shadow:0 0 0 1px var(--tds-white);outline-offset:1px;z-index:1}:host .filter{display:flex;align-items:center;justify-content:space-between;height:100%;background-color:var(--tds-dropdown-bg);border-bottom:1px solid var(--tds-dropdown-border-bottom);padding-left:16px;border-radius:4px 4px 0 0}:host .filter:hover{border-bottom:1px solid var(--tds-dropdown-border-bottom-hover)}:host .filter.disabled{color:var(--tds-dropdown-disabled-color);border-bottom:1px solid transparent}:host .filter.disabled .value-wrapper input{color:var(--tds-dropdown-disabled-color)}:host .filter .value-wrapper{display:flex;width:100%;height:100%}:host .filter .value-wrapper input{color:var(--tds-dropdown-filter-input-color)}:host .filter .label-inside-as-placeholder{position:absolute;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);line-height:1.3;color:var(--tds-dropdown-placeholder-color)}:host .filter .label-inside-as-placeholder.lg{top:20px}:host .filter .label-inside-as-placeholder.md{top:16px}:host .filter .label-inside-as-placeholder.sm{display:none}:host .filter .label-inside-as-placeholder.selected{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:all 0.2s ease-in-out}:host .filter .label-inside-as-placeholder.selected.lg{top:12px}:host .filter .label-inside-as-placeholder.selected.md{top:8px}:host .filter .label-inside-as-placeholder.selected.sm{display:none}:host .filter .label-inside-as-placeholder.selected+.placeholder:not(.sm){margin-top:8px}:host .filter.focus{border-bottom:0}:host .filter.focus:hover{border-bottom:0}:host .filter.error{border-bottom:1px solid var(--tds-dropdown-error)}:host .filter.error.focus{border-bottom-color:transparent}:host .filter.error.focus::before{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background:var(--tds-dropdown-error)}:host .filter input{flex:1;all:unset;width:100%}:host .filter input::placeholder{color:var(--tds-dropdown-placeholder-color)}:host .filter input:disabled::placeholder{color:var(--tds-dropdown-disabled-color)}:host .filter tds-icon{cursor:pointer}:host .filter .menu-icon{margin-right:16px}:host .filter .clear-icon{margin:0 8px;color:var(--tds-dropdown-clear-icon-color);padding-right:8px;border-right:1px solid var(--tds-dropdown-clear-icon-color)}:host .filter .clear-icon:hover{color:var(--tds-dropdown-clear-icon-hover-color)}:host .filter .clear-icon.hide{display:none;visibility:hidden}:host{--tds-scrollbar-width-standard:thin;--tds-scrollbar-width:10px;--tds-scrollbar-height:10px;--tds-scrollbar-thumb-border-width:3px;--tds-scrollbar-thumb-border-hover-width:2px}body{scrollbar-width:thin}:host{display:block;position:relative;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls)}:host .label-outside{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);color:var(--tds-dropdown-label-color);margin-bottom:8px}:host .label-outside.disabled{color:var(--tds-dropdown-disabled-color)}:host .dropdown-select{position:relative}:host .dropdown-select button:focus{outline:2px solid var(--tds-focus-outline-color);box-shadow:0 0 0 1px var(--tds-white);outline-offset:1px;z-index:1;border-radius:0}:host .dropdown-select button{transition:border-bottom-color var(--tds-motion-duration-fast-02) var(--tds-motion-easing-scania)}:host .dropdown-select button:hover{border-bottom-color:var(--tds-dropdown-border-bottom-hover)}:host .dropdown-select button{border-bottom-color:var(--tds-dropdown-border-bottom)}:host .dropdown-select button.error{border-bottom-color:var(--tds-dropdown-error)}:host .dropdown-select button.error:focus{border-bottom-color:transparent}:host .dropdown-select.disabled .label-inside,:host .dropdown-select.disabled .placeholder,:host .dropdown-select.disabled .label-inside-as-placeholder,:host .dropdown-select.disabled .value-wrapper{color:var(--tds-dropdown-disabled-color)}:host .dropdown-select.disabled button{border:none}:host .dropdown-select .label-inside{position:absolute;font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);color:var(--tds-dropdown-label-inside-color)}:host .dropdown-select .label-inside.lg{top:12px;left:16px}:host .dropdown-select .label-inside.md{top:8px;left:16px}:host .dropdown-select .label-inside.sm{display:none}:host .dropdown-select .label-inside.xs{display:none}:host .dropdown-select .label-inside+.placeholder:not(.sm){margin-top:8px}:host .dropdown-select .placeholder{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:var(--tds-placeholder-margin);}:host .dropdown-select .placeholder.xs{line-height:1}:host .dropdown-select .label-inside-as-placeholder{color:var(--tds-dropdown-placeholder-color)}:host .dropdown-select .label-inside-as-placeholder.selected{position:absolute;font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:all 0.2s ease-in-out}:host .dropdown-select .label-inside-as-placeholder.selected.lg{top:12px}:host .dropdown-select .label-inside-as-placeholder.selected.md{top:8px}:host .dropdown-select .label-inside-as-placeholder.selected.sm{display:none}:host .dropdown-select .label-inside-as-placeholder.selected+.placeholder:not(.sm){margin-top:8px}:host .dropdown-select.lg{height:55px}:host .dropdown-select.md{height:47px}:host .dropdown-select.sm{height:39px}:host .dropdown-select.xs{height:29px}:host .helper{margin-top:4px;color:var(--tds-dropdown-helper-color);font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);display:flex;align-items:center;gap:8px}:host .helper.error{color:var(--tds-dropdown-error)}:host .helper.disabled{color:var(--tds-dropdown-disabled-color)}:host .dropdown-list{z-index:100;position:absolute;width:100%;transform-origin:top;box-shadow:0 2px 3px 0 rgba(0, 0, 0, 0.1);border-radius:var(--tds-dropdown-list-border-radius-down);overflow-y:auto;transform:scaleY(0);pointer-events:none}:host .dropdown-list:hover::-webkit-scrollbar-thumb{border:var(--tds-scrollbar-thumb-border-hover-width) solid transparent;background:var(--tds-scrollbar-hover-thumb-color);background-clip:padding-box}:host .dropdown-list::-webkit-scrollbar{width:var(--tds-scrollbar-width)}:host .dropdown-list::-webkit-scrollbar-track{background:var(--tds-scrollbar-track-color)}:host .dropdown-list::-webkit-scrollbar-thumb{border-radius:40px;background:var(--tds-scrollbar-thumb-color);border:var(--tds-scrollbar-thumb-border-width) solid transparent;background-clip:padding-box}:host .dropdown-list::-webkit-scrollbar-button{height:0;width:0}@supports not selector(::-webkit-scrollbar){:host .dropdown-list{scrollbar-color:var(--tds-scrollbar-thumb-color) var(--tds-scrollbar-track-color);scrollbar-width:var(--tds-scrollbar-width-standard)}}:host .dropdown-list.lg{max-height:312px}:host .dropdown-list.md{max-height:312px}:host .dropdown-list.sm{max-height:260px}:host .dropdown-list.xs{max-height:260px}:host .dropdown-list.up{bottom:100%;margin-top:0;margin-bottom:1px;transform-origin:bottom;display:flex;flex-direction:column-reverse;border-radius:var(--tds-dropdown-list-border-radius-up)}:host .dropdown-list.up.label-outside{bottom:calc(100% - 24px)}:host .dropdown-list.closed{transform:scaleY(0);pointer-events:none}:host .dropdown-list.open{transform:scaleY(1);visibility:visible;opacity:1;pointer-events:auto}:host .dropdown-list.animation-enter-slide{transition:transform var(--tds-motion-duration-moderate-01) var(--tds-motion-easing-enter)}:host .dropdown-list.animation-exit-slide{transition:transform var(--tds-motion-duration-moderate-01) var(--tds-motion-easing-exit)}:host .dropdown-list .no-result{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);display:flex;align-items:center;padding:0 16px;background-color:var(--tds-dropdown-bg)}:host .dropdown-list .no-result.lg{height:56px}:host .dropdown-list .no-result.md{height:48px}:host .dropdown-list .no-result.sm{height:40px}:host .dropdown-list .no-result.xs{height:40px}:host .menu-icon{color:var(--tds-dropdown-menu-icon-color)}:host tds-icon{transition:transform var(--tds-motion-duration-fast-02) var(--tds-motion-easing-scania)}:host tds-icon.open{transform:rotateZ(180deg)}';const a=class{constructor(s){t(this,s),this.tdsSelect=o(this,"tdsSelect",6),this.tdsFocus=o(this,"tdsFocus",6),this.tdsBlur=o(this,"tdsBlur",6),this.parentElement=null,this.label="",this.componentWillRender=()=>{var t,o,s;this.host.parentElement&&(this.parentElement="TDS-DROPDOWN"===(null===(t=this.host.parentElement)||void 0===t?void 0:t.tagName)?this.host.parentElement:this.host.getRootNode().host,this.parentElement&&(this.multiselect=null!==(o=this.parentElement.multiselect)&&void 0!==o&&o,this.size=this.parentElement.size||"lg"),this.label=(null===(s=this.host.textContent)||void 0===s?void 0:s.trim())||"")},this.handleSingleSelect=()=>{this.disabled||(this.selected=!0,this.parentElement.appendValue(this.internalValue),this.parentElement.close(),this.tdsSelect.emit({value:this.internalValue,selected:this.selected}))},this.handleMultiselect=t=>{this.disabled||(t.detail.checked?(this.parentElement.appendValue(this.internalValue),this.selected=!0,this.tdsSelect.emit({value:this.internalValue,selected:this.selected})):(this.parentElement.removeValue(this.internalValue),this.selected=!1,this.tdsSelect.emit({value:this.internalValue,selected:this.selected})),t.stopPropagation())},this.handleFocus=t=>{this.tdsFocus.emit(t)},this.handleBlur=t=>{this.tdsBlur.emit(t)},this.value=void 0,this.internalValue=void 0,this.disabled=!1,this.tdsAriaLabel=void 0,this.selected=!1,this.multiselect=!1,this.size="lg"}async setSelected(t){this.selected=t}valueWatcher(t){this.internalValue=r(t)}componentWillLoad(){this.internalValue=r(this.value)}render(){return s(i,{key:"d35a3153be292b1656d0efca93f06bfc1357041b"},s("div",{key:"384353f9868a3fb559ca4140d5cd4f5553e024ad",class:`dropdown-option\n ${this.size}\n ${this.selected?"selected":""}\n ${this.disabled?"disabled":""}\n `},this.multiselect?s("div",{class:"multiselect",onKeyDown:t=>{"Escape"===t.key&&this.parentElement.close()}},s("tds-checkbox",{onTdsChange:t=>{this.handleMultiselect(t)},disabled:this.disabled,checked:this.selected,tdsAriaLabel:this.tdsAriaLabel,class:{[this.size]:!0}},s("div",{slot:"label"},s("slot",null)))):s("button",{role:"option","aria-disabled":this.disabled,"aria-selected":this.selected,"aria-label":this.tdsAriaLabel,onClick:()=>{this.handleSingleSelect()},onFocus:t=>this.handleFocus(t),onBlur:t=>this.handleBlur(t),disabled:this.disabled,class:this.size},s("div",{class:"single-select"},s("slot",null),this.selected&&s("tds-icon",{name:"tick",size:"16px"})))))}static get delegatesFocus(){return!0}get host(){return e(this)}static get watchers(){return{value:["valueWatcher"]}}};a.style=":host{box-sizing:border-box;display:block;background-color:var(--tds-dropdown-option-background)}:host *{box-sizing:border-box}:host .dropdown-option{color:var(--tds-dropdown-option-color);border-bottom:1px solid var(--tds-dropdown-option-border);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);overflow-wrap:anywhere;transition:background-color var(--tds-motion-duration-fast-02) var(--tds-motion-easing-scania)}:host .dropdown-option.selected{background-color:var(--tds-dropdown-option-background-selected)}:host .dropdown-option.disabled{color:var(--tds-dropdown-option-color-disabled)}:host .dropdown-option button:focus{outline:2px solid var(--tds-dropdown-option-focus);box-shadow:inset 0 0 0 3px var(--tds-white);outline-offset:-2px}:host .dropdown-option button{all:unset;width:100%}:host .dropdown-option button.lg{padding:19px 0 20px}:host .dropdown-option button.md{padding:15px 0 16px}:host .dropdown-option button.sm{padding:11px 0 12px}:host .dropdown-option button.xs{padding:7px 0 8px}:host .dropdown-option button .single-select{display:flex;align-items:center;justify-content:space-between;padding:0 16px}:host .dropdown-option .multiselect{width:100%;height:100%}:host .dropdown-option .multiselect tds-checkbox{display:flex;height:100%;width:100%}:host .dropdown-option .multiselect tds-checkbox.lg{padding:15px 16px 16px}:host .dropdown-option .multiselect tds-checkbox.md{padding:11px 16px 12px}:host .dropdown-option .multiselect tds-checkbox.sm{padding:7px 16px 8px}:host .dropdown-option .multiselect tds-checkbox.xs{padding:7px 16px 8px}:host .dropdown-option:hover{border-bottom-color:var(--tds-dropdown-option-border-hover);cursor:pointer}:host .dropdown-option:hover.disabled{border-bottom-color:var(--tds-dropdown-option-border-hover);cursor:not-allowed}:host([hidden]){display:none}";export{n as tds_dropdown,a as tds_dropdown_option}
@@ -1 +1 @@
1
- import{p as e,b as a}from"./p-2049fab2.js";export{s as setNonce}from"./p-2049fab2.js";import{g as t}from"./p-e1255160.js";(()=>{const a=import.meta.url,t={};return""!==a&&(t.resourcesUrl=new URL(".",a).href),e(t)})().then((async e=>(await t(),a(JSON.parse('[["p-9b0c886e",[[1,"tds-header-launcher",{"tdsAriaLabel":[1,"tds-aria-label"],"open":[32],"buttonEl":[32],"hasListTypeMenu":[32]},[[8,"click","onAnyClick"],[8,"keydown","handleKeyDown"]]]]],["p-3022d31d",[[1,"tds-header-dropdown",{"label":[1],"noDropdownIcon":[4,"no-dropdown-icon"],"selected":[4],"tdsAriaLabel":[1,"tds-aria-label"],"open":[32],"buttonEl":[32]},[[4,"click","onAnyClick"],[8,"keydown","handleKeyDown"]]]]],["p-1c75f8a7",[[1,"tds-table-footer",{"pagination":[516],"paginationValue":[1538,"pagination-value"],"rowsperpage":[516],"rowsPerPageValues":[16],"pages":[514],"cols":[2],"columnsNumber":[32],"compactDesign":[32],"lastCorrectValue":[32],"tableId":[32],"horizontalScrollWidth":[32],"rowsPerPageValue":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-f9c17612",[[1,"tds-header-hamburger",{"tdsAriaLabel":[1,"tds-aria-label"]}]]],["p-a98767ea",[[6,"tds-text-field",{"type":[513],"labelPosition":[1,"label-position"],"label":[1],"min":[8],"max":[8],"helper":[1],"placeholder":[1],"value":[513],"disabled":[4],"readOnly":[4,"read-only"],"hideReadOnlyIcon":[4,"hide-read-only-icon"],"size":[1],"modeVariant":[1,"mode-variant"],"noMinWidth":[4,"no-min-width"],"name":[1],"state":[1],"maxLength":[2,"max-length"],"autofocus":[4],"tdsAriaLabel":[1,"tds-aria-label"],"focusInput":[32],"focusElement":[64]}]]],["p-cd5103e3",[[2,"tds-textarea",{"label":[1],"name":[1],"helper":[1],"cols":[2],"rows":[2],"labelPosition":[1,"label-position"],"placeholder":[1],"value":[1],"disabled":[4],"readOnly":[4,"read-only"],"hideReadOnlyIcon":[4,"hide-read-only-icon"],"state":[1],"maxLength":[2,"max-length"],"modeVariant":[1,"mode-variant"],"autofocus":[4],"noMinWidth":[4,"no-min-width"],"tdsAriaLabel":[1,"tds-aria-label"],"focusInput":[32],"focusElement":[64]}]]],["p-c7b0253c",[[1,"tds-header-brand-symbol"]]],["p-a66a4a4e",[[1,"tds-side-menu-dropdown",{"defaultOpen":[4,"default-open"],"buttonLabel":[1,"button-label"],"selected":[4],"open":[4],"hoverState":[32],"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapsedSideMenuEventHandler"],[1,"pointerenter","onEventPointerEnter"],[0,"focusin","onEventFocus"],[1,"pointerleave","onEventPointerLeave"],[0,"focusout","onEventBlur"],[0,"keydown","handleKeyDown"]]]]],["p-b20f250b",[[1,"tds-side-menu-user",{"heading":[1],"subheading":[1],"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"]}]]],["p-5734c6ef",[[1,"tds-accordion-item",{"header":[1],"expandIconPosition":[1,"expand-icon-position"],"disabled":[4],"expanded":[516],"paddingReset":[4,"padding-reset"],"ariaLevelValue":[1,"aria-level-value"],"toggleAccordionItem":[64],"expand":[64],"collapse":[64],"isExpanded":[64]}]]],["p-bcd5e06d",[[1,"tds-banner",{"icon":[1],"header":[1],"subheader":[1],"variant":[1],"bannerId":[1,"banner-id"],"hidden":[516],"roleType":[1,"role-type"],"hideBanner":[64],"showBanner":[64]}]]],["p-4a77edf1",[[1,"tds-card",{"modeVariant":[1,"mode-variant"],"imagePlacement":[1,"image-placement"],"header":[1],"subheader":[1],"bodyImg":[1,"body-img"],"bodyImgAlt":[1,"body-img-alt"],"bodyDivider":[4,"body-divider"],"clickable":[4],"stretch":[4],"cardId":[1,"card-id"]}]]],["p-3ebe93ff",[[2,"tds-datetime",{"type":[513],"value":[1537],"min":[1],"max":[1],"defaultValue":[1,"default-value"],"disabled":[4],"size":[1],"noMinWidth":[4,"no-min-width"],"modeVariant":[1,"mode-variant"],"name":[1],"state":[1],"autofocus":[4],"label":[1],"labelPosition":[1,"label-position"],"helper":[1],"tdsAriaLabel":[1,"tds-aria-label"],"focusInput":[32],"reset":[64],"setValue":[64],"focusElement":[64]},[[0,"focusin","handleFocusIn"],[0,"focusout","handleFocusOut"]]]]],["p-8c841698",[[1,"tds-folder-tabs",{"modeVariant":[1,"mode-variant"],"defaultSelectedIndex":[2,"default-selected-index"],"selectedIndex":[514,"selected-index"],"tdsScrollLeftAriaLabel":[1,"tds-scroll-left-aria-label"],"tdsScrollRightAriaLabel":[1,"tds-scroll-right-aria-label"],"buttonWidth":[32],"showLeftScroll":[32],"showRightScroll":[32],"selectTab":[64],"reinitialize":[64]},null,{"selectedIndex":["handleSelectedIndexUpdate"]}]]],["p-6a615ac1",[[1,"tds-footer-group",{"titleText":[1,"title-text"],"tdsListAriaLabel":[1,"tds-list-aria-label"],"open":[32],"isMobile":[32]},[[9,"resize","handleResize"]]]]],["p-7013249b",[[1,"tds-header-cell",{"cellKey":[513,"cell-key"],"cellValue":[513,"cell-value"],"customWidth":[513,"custom-width"],"sortable":[4],"textAlign":[513,"text-align"],"disablePadding":[516,"disable-padding"],"tdsAriaLabelSortButton":[513,"tds-aria-label-sort-button"],"textAlignState":[32],"sortingDirection":[32],"sortedByMyKey":[32],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"multiselect":[32],"enableToolbarDesign":[32],"tableId":[32],"expandableRows":[32]},[[16,"internalTdsPropChange","internalTdsPropChangeListener"],[16,"internalSortButtonClicked","updateOptionsContent"]]]]],["p-601a74ad",[[4,"tds-header-launcher-list"]]],["p-7caad569",[[1,"tds-header-launcher-list-item"]]],["p-614bcd4b",[[1,"tds-inline-tabs",{"modeVariant":[1,"mode-variant"],"defaultSelectedIndex":[2,"default-selected-index"],"selectedIndex":[514,"selected-index"],"tdsScrollLeftAriaLabel":[1,"tds-scroll-left-aria-label"],"tdsScrollRightAriaLabel":[1,"tds-scroll-right-aria-label"],"leftPadding":[514,"left-padding"],"showLeftScroll":[32],"showRightScroll":[32],"selectTab":[64],"reinitialize":[64]},null,{"selectedIndex":["handleSelectedIndexUpdate"]}]]],["p-e3c2b6b4",[[1,"tds-message",{"header":[1],"modeVariant":[1,"mode-variant"],"variant":[1],"noIcon":[4,"no-icon"],"minimal":[4],"tdsAlertDialog":[1,"tds-alert-dialog"],"tdsAriaLabel":[1,"tds-aria-label"]}]]],["p-9b2257f3",[[1,"tds-modal",{"header":[1],"prevent":[4],"size":[1],"actionsPosition":[1,"actions-position"],"selector":[1],"referenceEl":[16],"show":[4],"closable":[4],"tdsAlertDialog":[1,"tds-alert-dialog"],"isShown":[32],"activeElementIndex":[32],"showModal":[64],"closeModal":[64],"isOpen":[64],"initializeModal":[64],"cleanupModal":[64]},[[10,"keydown","handleFocusTrap"]]]]],["p-c0b26507",[[1,"tds-navigation-tabs",{"modeVariant":[1,"mode-variant"],"defaultSelectedIndex":[2,"default-selected-index"],"selectedIndex":[514,"selected-index"],"leftPadding":[514,"left-padding"],"tdsScrollLeftAriaLabel":[1,"tds-scroll-left-aria-label"],"tdsScrollRightAriaLabel":[1,"tds-scroll-right-aria-label"],"showLeftScroll":[32],"showRightScroll":[32],"selectTab":[64],"reinitialize":[64]},null,{"selectedIndex":["handleSelectedIndexUpdate"]}]]],["p-c15eba7d",[[6,"tds-popover-menu",{"selector":[1],"referenceEl":[16],"show":[4],"defaultShow":[4,"default-show"],"placement":[1],"animation":[1],"offsetSkidding":[2,"offset-skidding"],"offsetDistance":[2,"offset-distance"],"fluidWidth":[4,"fluid-width"],"modeVariant":[1,"mode-variant"],"childRef":[32],"close":[64]}]]],["p-525c81b1",[[1,"tds-side-menu-close-button"]]],["p-06d3490c",[[1,"tds-side-menu-collapse-button",{"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-ae438c2e",[[0,"tds-slider",{"label":[1],"value":[1025],"min":[1],"max":[1],"ticks":[1],"showTickNumbers":[4,"show-tick-numbers"],"tooltip":[4],"disabled":[4],"readOnly":[4,"read-only"],"controls":[4],"input":[4],"step":[1],"name":[1],"thumbSize":[1,"thumb-size"],"snap":[4],"tdsAriaLabel":[1,"tds-aria-label"],"sliderId":[1,"slider-id"],"tdsReadOnlyAriaLabel":[1,"tds-read-only-aria-label"],"reset":[64]},[[0,"keydown","handleKeydown"],[9,"mouseup","handleRelease"],[9,"touchend","handleRelease"],[9,"mousemove","handleMove"],[9,"touchmove","handleMove"]],{"value":["handleValueUpdate"]}]]],["p-84de314b",[[1,"tds-step",{"index":[1],"state":[1],"tdsAriaCurrent":[1,"tds-aria-current"],"hideLabels":[32],"size":[32],"orientation":[32],"labelPosition":[32]},[[16,"internalTdsPropsChange","handlePropsChange"]]]]],["p-fbffe3aa",[[1,"tds-table-body-input-wrapper",{"showIcon":[4,"show-icon"],"renderSlot":[32],"inputFocused":[32],"compactDesign":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-d0f09796",[[1,"tds-table-body-row",{"selected":[516],"disabled":[516],"clickable":[516],"multiselect":[32],"mainCheckBoxStatus":[32],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-bd935506",[[1,"tds-table-header",{"allSelected":[1540,"all-selected"],"selected":[1540],"disabled":[1540],"indeterminate":[4],"multiselect":[32],"expandableRows":[32],"mainCheckboxSelected":[32],"mainExpendSelected":[32],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"whiteBackground":[32],"enableToolbarDesign":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"],[16,"internalTdsRowExpanded","internalTdsRowExpandedListener"]]]]],["p-3ec01fb3",[[1,"tds-table-header-input-wrapper",{"showIcon":[4,"show-icon"],"compactDesign":[4,"compact-design"],"renderSlot":[32],"inputFocused":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-3a92d554",[[1,"tds-table-toolbar",{"tableTitle":[513,"table-title"],"filter":[516],"tdsSearchAriaLabel":[1,"tds-search-aria-label"],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"whiteBackground":[32],"tableId":[32],"horizontalScrollWidth":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-49364819",[[1,"tds-toast",{"toastId":[1,"toast-id"],"header":[1],"subheader":[1],"variant":[1],"hidden":[516],"closable":[4],"toastRole":[1,"toast-role"],"tdsCloseAriaLabel":[1,"tds-close-aria-label"],"tdsAriaLive":[1,"tds-aria-live"],"hideToast":[64],"showToast":[64]}]]],["p-650b98bf",[[1,"tds-accordion",{"modeVariant":[1,"mode-variant"],"hideLastBorder":[4,"hide-last-border"]}]]],["p-87219f00",[[1,"tds-badge",{"value":[1],"hidden":[516],"size":[1],"tdsAriaLive":[1,"tds-aria-live"],"tdsAriaLabel":[32],"shape":[32],"text":[32]},null,{"value":["watchProps"],"size":["watchProps"]}]]],["p-72006dd7",[[1,"tds-block",{"modeVariant":[1,"mode-variant"],"componentTag":[1,"component-tag"]}]]],["p-f4b5e80b",[[1,"tds-body-cell",{"cellValue":[520,"cell-value"],"cellKey":[520,"cell-key"],"disablePadding":[516,"disable-padding"],"textAlign":[513,"text-align"],"textAlignState":[32],"activeSorting":[32],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"tableId":[32]},[[16,"internalTdsPropChange","internalTdsPropChangeListener"],[16,"internalTdsHover","internalTdsHoverListener"],[16,"internalTdsTextAlign","internalTdsTextAlignListener"]]]]],["p-b734b309",[[1,"tds-breadcrumb",{"current":[4]}]]],["p-1b471db7",[[1,"tds-breadcrumbs",{"tdsAriaLabel":[1,"tds-aria-label"]}]]],["p-a74cb560",[[6,"tds-button",{"text":[1],"type":[1],"variant":[1],"size":[1],"disabled":[4],"fullbleed":[4],"modeVariant":[1,"mode-variant"],"animation":[1],"tdsAriaLabel":[1,"tds-aria-label"],"name":[1],"value":[1],"onlyIcon":[32]},[[0,"keydown","handleKeyDown"],[0,"keyup","handleKeyUp"]]]]],["p-303acf88",[[6,"tds-chip",{"type":[1],"size":[1],"chipId":[1,"chip-id"],"checked":[1540],"name":[1],"value":[1],"disabled":[4],"tdsAriaLabel":[1,"tds-aria-label"]},[[16,"internalRadioOnChange","handleInternaRadioChange"]]]]],["p-dc375d3e",[[1,"tds-folder-tab",{"disabled":[4],"selected":[32],"tabWidth":[32],"setTabWidth":[64],"setSelected":[64]}]]],["p-bb1d069f",[[1,"tds-footer",{"modeVariant":[1,"mode-variant"]}]]],["p-bdc913a0",[[1,"tds-footer-item"]]],["p-a829417c",[[4,"tds-header"]]],["p-7d427dff",[[1,"tds-header-dropdown-list-user",{"imgUrl":[1,"img-url"],"imgAlt":[1,"img-alt"],"header":[1],"subheader":[1]}]]],["p-22b6223e",[[4,"tds-header-launcher-grid",{"headingElement":[32]}]]],["p-6e57997e",[[1,"tds-header-launcher-grid-item"]]],["p-debd6adc",[[4,"tds-header-launcher-grid-title"]]],["p-9099d978",[[4,"tds-header-launcher-list-title"]]],["p-1bbef1a5",[[1,"tds-header-title"]]],["p-52adc30c",[[1,"tds-inline-tab",{"disabled":[4],"selected":[32],"setSelected":[64]}]]],["p-b994e7ac",[[1,"tds-link",{"disabled":[4],"underline":[4],"standalone":[4]}]]],["p-106e048d",[[1,"tds-navigation-tab",{"disabled":[4],"selected":[32],"setSelected":[64]}]]],["p-bcdf13e0",[[1,"tds-popover-menu-item",{"disabled":[4]}]]],["p-86e99fdb",[[6,"tds-radio-button",{"name":[1],"value":[1],"radioId":[1,"radio-id"],"checked":[516],"required":[4],"disabled":[4],"tdsAriaLabel":[1,"tds-aria-label"],"tdsTabIndex":[2,"tds-tab-index"],"focusElement":[64]}]]],["p-0cfe8671",[[1,"tds-side-menu",{"open":[1028],"persistent":[4],"collapsed":[1028],"isUpperSlotEmpty":[32],"isCollapsed":[32],"initialCollapsedState":[32],"activeElementIndex":[32]},[[8,"keydown","handleKeyDown"],[10,"keydown","handleFocusTrap"],[16,"internalTdsCollapse","collapsedSideMenuEventHandler"]],{"collapsed":["onCollapsedChange"],"open":["onOpenChange"]}]]],["p-46c9af0f",[[1,"tds-side-menu-dropdown-list",{"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapsedSideMenuEventHandler"]]]]],["p-a0591e58",[[1,"tds-side-menu-dropdown-list-item",{"selected":[4],"dropdownHasIcon":[32],"dropdownHasUser":[32],"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-27c2f109",[[1,"tds-side-menu-overlay"]]],["p-5dd2aac8",[[0,"tds-spinner",{"size":[1],"variant":[1]}]]],["p-177386d5",[[1,"tds-stepper",{"orientation":[1],"labelPosition":[1,"label-position"],"size":[1],"hideLabels":[4,"hide-labels"],"stepperId":[1,"stepper-id"],"tdsAriaLabel":[1,"tds-aria-label"]},null,{"orientation":["handleDirectionChange"],"labelPosition":["handleLabelPositionChange"],"size":["handleSizeChange"],"hideLabels":["handleHideLabelsChange"]}]]],["p-08f63e5d",[[1,"tds-table",{"verticalDividers":[516,"vertical-dividers"],"compactDesign":[516,"compact-design"],"noMinWidth":[516,"no-min-width"],"multiselect":[516],"expandableRows":[516,"expandable-rows"],"responsive":[516],"modeVariant":[513,"mode-variant"],"zebraMode":[513,"zebra-mode"],"horizontalScrollWidth":[1,"horizontal-scroll-width"],"tableId":[1,"table-id"],"enableHorizontalScrollToolbarDesign":[32],"enableHorizontalScrollFooterDesign":[32],"getSelectedRows":[64]},null,{"multiselect":["multiselectChanged"],"expandableRows":["enableExpandableRowsChanged"],"compactDesign":["compactDesignChanged"],"verticalDividers":["verticalDividersChanged"],"noMinWidth":["noMinWidthChanged"],"zebraMode":["zebraModeChanged"],"modeVariant":["modeVariantChanged"],"horizontalScrollWidth":["widthChanged"]}]]],["p-aec3e4cf",[[4,"tds-table-body",{"multiselect":[32],"enablePaginationTableBody":[32],"expandableRows":[32],"multiselectArray":[32],"multiselectArrayJSON":[32],"mainCheckboxStatus":[32],"columnsNumber":[32],"zebraMode":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"],[16,"internalTdsRowChange","bodyCheckboxListener"]]]]],["p-f2232281",[[1,"tds-table-body-row-expandable",{"colSpan":[2,"col-span"],"rowId":[513,"row-id"],"expanded":[516],"overflow":[513],"autoCollapse":[4,"auto-collapse"],"tdsAriaLabelExpandButton":[513,"tds-aria-label-expand-button"],"isExpanded":[32],"tableId":[32],"columnsNumber":[32],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"modeVariant":[32],"expand":[64],"collapse":[64]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"],[16,"tdsChange","handleRowExpand"]],{"expanded":["watchExpanded"]}]]],["p-704682d6",[[6,"tds-tag",{"text":[1],"size":[1],"variant":[1]}]]],["p-a6238890",[[6,"tds-toggle",{"checked":[516],"required":[4],"size":[1],"name":[1],"headline":[1],"disabled":[4],"toggleId":[1,"toggle-id"],"tdsAriaLabel":[1,"tds-aria-label"],"toggle":[64],"focusElement":[64]}]]],["p-462a6049",[[1,"tds-header-launcher-button",{"active":[4],"tdsAriaLabel":[1,"tds-aria-label"]}]]],["p-25d026a6",[[1,"tds-divider",{"orientation":[1],"variant":[1]}]]],["p-7cb9790d",[[1,"tds-header-dropdown-list",{"size":[513],"headingElement":[32]}]]],["p-cf7af8f2",[[1,"tds-header-dropdown-list-item",{"selected":[4],"size":[513]}]]],["p-3c923401",[[17,"tds-dropdown-option",{"value":[8],"disabled":[4],"tdsAriaLabel":[1,"tds-aria-label"],"internalValue":[32],"selected":[32],"multiselect":[32],"size":[32],"setSelected":[64]},null,{"value":["valueWatcher"]}],[1,"tds-dropdown",{"name":[1],"disabled":[4],"helper":[1],"label":[1],"labelPosition":[1,"label-position"],"modeVariant":[1,"mode-variant"],"openDirection":[1,"open-direction"],"placeholder":[1],"size":[1],"animation":[1],"error":[4],"multiselect":[4],"filter":[4],"normalizeText":[4,"normalize-text"],"noResultText":[1,"no-result-text"],"defaultValue":[8,"default-value"],"value":[1032],"tdsAriaLabel":[1,"tds-aria-label"],"open":[32],"internalValue":[32],"filterResult":[32],"filterFocus":[32],"internalDefaultValue":[32],"selectedOptions":[32],"setValue":[64],"reset":[64],"removeValue":[64],"focusElement":[64],"close":[64],"updateDisplay":[64],"appendValue":[64]},[[9,"mousedown","onAnyClick"],[0,"keydown","onKeyDown"]],{"value":["handleValueChange"],"open":["handleOpenState"],"defaultValue":["handleDefaultValueChange"]}]]],["p-abad3489",[[6,"tds-popover-canvas",{"selector":[1],"referenceEl":[16],"defaultShow":[4,"default-show"],"show":[4],"placement":[1],"offsetSkidding":[2,"offset-skidding"],"animation":[1],"offsetDistance":[2,"offset-distance"],"modifiers":[16],"tdsAlertDialog":[1,"tds-alert-dialog"],"childRef":[32],"close":[64]}]]],["p-23fb4dee",[[6,"tds-tooltip",{"text":[1],"selector":[1],"referenceEl":[16],"defaultShow":[4,"default-show"],"mouseOverTooltip":[4,"mouse-over-tooltip"],"trigger":[1],"show":[1028],"placement":[1],"offsetSkidding":[2,"offset-skidding"],"offsetDistance":[2,"offset-distance"],"tdsAriaDescribedby":[1,"tds-aria-describedby"]},[[8,"keydown","handleKeyDown"]]]]],["p-5bca9fe7",[[1,"tds-side-menu-user-image",{"src":[1],"alt":[1]}],[1,"tds-side-menu-user-label",{"heading":[1],"subheading":[1]}]]],["p-5c077bb9",[[1,"tds-side-menu-item",{"selected":[4],"active":[4],"collapsed":[32],"hasUserComponent":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-8c2695af",[[6,"tds-checkbox",{"name":[1],"checkboxId":[1,"checkbox-id"],"disabled":[4],"required":[4],"checked":[1540],"indeterminate":[1028],"value":[1],"tdsAriaLabel":[1,"tds-aria-label"],"tdsAriaDescribedby":[1,"tds-aria-describedby"],"toggleCheckbox":[64],"focusElement":[64]},[[4,"reset","handleFormReset"]],{"indeterminate":["handleIndeterminateState"]}]]],["p-0cac9ea6",[[6,"tds-popover-core",{"selector":[1],"referenceEl":[16],"defaultShow":[4,"default-show"],"animation":[1],"show":[4],"placement":[1],"offsetSkidding":[2,"offset-skidding"],"offsetDistance":[2,"offset-distance"],"modifiers":[16],"trigger":[1],"autoHide":[4,"auto-hide"],"renderedShowValue":[32],"popperInstance":[32],"target":[32],"isShown":[32],"disableLogic":[32],"hasShownAtLeastOnce":[32],"openedByKeyboard":[32],"close":[64]},[[8,"click","onAnyClick"],[8,"internalTdsShow","onTdsShow"],[8,"keydown","handleKeydown"]],{"show":["onShowChange"],"referenceEl":["onReferenceElChanged"],"trigger":["onTriggerChanged"],"isShown":["onIsShownChange"]}]]],["p-61a1dc59",[[1,"tds-header-item",{"active":[4],"selected":[4]}],[1,"tds-core-header-item"]]],["p-eff87481",[[1,"tds-icon",{"name":[513],"size":[513],"svgTitle":[1,"svg-title"],"tdsAriaHidden":[4,"tds-aria-hidden"],"svgDescription":[1,"svg-description"],"icons_object":[32],"arrayOfIcons":[32]}]]]]'),e))));
1
+ import{p as e,b as a}from"./p-2049fab2.js";export{s as setNonce}from"./p-2049fab2.js";import{g as t}from"./p-e1255160.js";(()=>{const a=import.meta.url,t={};return""!==a&&(t.resourcesUrl=new URL(".",a).href),e(t)})().then((async e=>(await t(),a(JSON.parse('[["p-9b0c886e",[[1,"tds-header-launcher",{"tdsAriaLabel":[1,"tds-aria-label"],"open":[32],"buttonEl":[32],"hasListTypeMenu":[32]},[[8,"click","onAnyClick"],[8,"keydown","handleKeyDown"]]]]],["p-3022d31d",[[1,"tds-header-dropdown",{"label":[1],"noDropdownIcon":[4,"no-dropdown-icon"],"selected":[4],"tdsAriaLabel":[1,"tds-aria-label"],"open":[32],"buttonEl":[32]},[[4,"click","onAnyClick"],[8,"keydown","handleKeyDown"]]]]],["p-1c75f8a7",[[1,"tds-table-footer",{"pagination":[516],"paginationValue":[1538,"pagination-value"],"rowsperpage":[516],"rowsPerPageValues":[16],"pages":[514],"cols":[2],"columnsNumber":[32],"compactDesign":[32],"lastCorrectValue":[32],"tableId":[32],"horizontalScrollWidth":[32],"rowsPerPageValue":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-f9c17612",[[1,"tds-header-hamburger",{"tdsAriaLabel":[1,"tds-aria-label"]}]]],["p-a98767ea",[[6,"tds-text-field",{"type":[513],"labelPosition":[1,"label-position"],"label":[1],"min":[8],"max":[8],"helper":[1],"placeholder":[1],"value":[513],"disabled":[4],"readOnly":[4,"read-only"],"hideReadOnlyIcon":[4,"hide-read-only-icon"],"size":[1],"modeVariant":[1,"mode-variant"],"noMinWidth":[4,"no-min-width"],"name":[1],"state":[1],"maxLength":[2,"max-length"],"autofocus":[4],"tdsAriaLabel":[1,"tds-aria-label"],"focusInput":[32],"focusElement":[64]}]]],["p-cd5103e3",[[2,"tds-textarea",{"label":[1],"name":[1],"helper":[1],"cols":[2],"rows":[2],"labelPosition":[1,"label-position"],"placeholder":[1],"value":[1],"disabled":[4],"readOnly":[4,"read-only"],"hideReadOnlyIcon":[4,"hide-read-only-icon"],"state":[1],"maxLength":[2,"max-length"],"modeVariant":[1,"mode-variant"],"autofocus":[4],"noMinWidth":[4,"no-min-width"],"tdsAriaLabel":[1,"tds-aria-label"],"focusInput":[32],"focusElement":[64]}]]],["p-c7b0253c",[[1,"tds-header-brand-symbol"]]],["p-a66a4a4e",[[1,"tds-side-menu-dropdown",{"defaultOpen":[4,"default-open"],"buttonLabel":[1,"button-label"],"selected":[4],"open":[4],"hoverState":[32],"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapsedSideMenuEventHandler"],[1,"pointerenter","onEventPointerEnter"],[0,"focusin","onEventFocus"],[1,"pointerleave","onEventPointerLeave"],[0,"focusout","onEventBlur"],[0,"keydown","handleKeyDown"]]]]],["p-b20f250b",[[1,"tds-side-menu-user",{"heading":[1],"subheading":[1],"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"]}]]],["p-5734c6ef",[[1,"tds-accordion-item",{"header":[1],"expandIconPosition":[1,"expand-icon-position"],"disabled":[4],"expanded":[516],"paddingReset":[4,"padding-reset"],"ariaLevelValue":[1,"aria-level-value"],"toggleAccordionItem":[64],"expand":[64],"collapse":[64],"isExpanded":[64]}]]],["p-bcd5e06d",[[1,"tds-banner",{"icon":[1],"header":[1],"subheader":[1],"variant":[1],"bannerId":[1,"banner-id"],"hidden":[516],"roleType":[1,"role-type"],"hideBanner":[64],"showBanner":[64]}]]],["p-4a77edf1",[[1,"tds-card",{"modeVariant":[1,"mode-variant"],"imagePlacement":[1,"image-placement"],"header":[1],"subheader":[1],"bodyImg":[1,"body-img"],"bodyImgAlt":[1,"body-img-alt"],"bodyDivider":[4,"body-divider"],"clickable":[4],"stretch":[4],"cardId":[1,"card-id"]}]]],["p-3ebe93ff",[[2,"tds-datetime",{"type":[513],"value":[1537],"min":[1],"max":[1],"defaultValue":[1,"default-value"],"disabled":[4],"size":[1],"noMinWidth":[4,"no-min-width"],"modeVariant":[1,"mode-variant"],"name":[1],"state":[1],"autofocus":[4],"label":[1],"labelPosition":[1,"label-position"],"helper":[1],"tdsAriaLabel":[1,"tds-aria-label"],"focusInput":[32],"reset":[64],"setValue":[64],"focusElement":[64]},[[0,"focusin","handleFocusIn"],[0,"focusout","handleFocusOut"]]]]],["p-8c841698",[[1,"tds-folder-tabs",{"modeVariant":[1,"mode-variant"],"defaultSelectedIndex":[2,"default-selected-index"],"selectedIndex":[514,"selected-index"],"tdsScrollLeftAriaLabel":[1,"tds-scroll-left-aria-label"],"tdsScrollRightAriaLabel":[1,"tds-scroll-right-aria-label"],"buttonWidth":[32],"showLeftScroll":[32],"showRightScroll":[32],"selectTab":[64],"reinitialize":[64]},null,{"selectedIndex":["handleSelectedIndexUpdate"]}]]],["p-6a615ac1",[[1,"tds-footer-group",{"titleText":[1,"title-text"],"tdsListAriaLabel":[1,"tds-list-aria-label"],"open":[32],"isMobile":[32]},[[9,"resize","handleResize"]]]]],["p-7013249b",[[1,"tds-header-cell",{"cellKey":[513,"cell-key"],"cellValue":[513,"cell-value"],"customWidth":[513,"custom-width"],"sortable":[4],"textAlign":[513,"text-align"],"disablePadding":[516,"disable-padding"],"tdsAriaLabelSortButton":[513,"tds-aria-label-sort-button"],"textAlignState":[32],"sortingDirection":[32],"sortedByMyKey":[32],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"multiselect":[32],"enableToolbarDesign":[32],"tableId":[32],"expandableRows":[32]},[[16,"internalTdsPropChange","internalTdsPropChangeListener"],[16,"internalSortButtonClicked","updateOptionsContent"]]]]],["p-601a74ad",[[4,"tds-header-launcher-list"]]],["p-7caad569",[[1,"tds-header-launcher-list-item"]]],["p-614bcd4b",[[1,"tds-inline-tabs",{"modeVariant":[1,"mode-variant"],"defaultSelectedIndex":[2,"default-selected-index"],"selectedIndex":[514,"selected-index"],"tdsScrollLeftAriaLabel":[1,"tds-scroll-left-aria-label"],"tdsScrollRightAriaLabel":[1,"tds-scroll-right-aria-label"],"leftPadding":[514,"left-padding"],"showLeftScroll":[32],"showRightScroll":[32],"selectTab":[64],"reinitialize":[64]},null,{"selectedIndex":["handleSelectedIndexUpdate"]}]]],["p-e3c2b6b4",[[1,"tds-message",{"header":[1],"modeVariant":[1,"mode-variant"],"variant":[1],"noIcon":[4,"no-icon"],"minimal":[4],"tdsAlertDialog":[1,"tds-alert-dialog"],"tdsAriaLabel":[1,"tds-aria-label"]}]]],["p-9b2257f3",[[1,"tds-modal",{"header":[1],"prevent":[4],"size":[1],"actionsPosition":[1,"actions-position"],"selector":[1],"referenceEl":[16],"show":[4],"closable":[4],"tdsAlertDialog":[1,"tds-alert-dialog"],"isShown":[32],"activeElementIndex":[32],"showModal":[64],"closeModal":[64],"isOpen":[64],"initializeModal":[64],"cleanupModal":[64]},[[10,"keydown","handleFocusTrap"]]]]],["p-c0b26507",[[1,"tds-navigation-tabs",{"modeVariant":[1,"mode-variant"],"defaultSelectedIndex":[2,"default-selected-index"],"selectedIndex":[514,"selected-index"],"leftPadding":[514,"left-padding"],"tdsScrollLeftAriaLabel":[1,"tds-scroll-left-aria-label"],"tdsScrollRightAriaLabel":[1,"tds-scroll-right-aria-label"],"showLeftScroll":[32],"showRightScroll":[32],"selectTab":[64],"reinitialize":[64]},null,{"selectedIndex":["handleSelectedIndexUpdate"]}]]],["p-c15eba7d",[[6,"tds-popover-menu",{"selector":[1],"referenceEl":[16],"show":[4],"defaultShow":[4,"default-show"],"placement":[1],"animation":[1],"offsetSkidding":[2,"offset-skidding"],"offsetDistance":[2,"offset-distance"],"fluidWidth":[4,"fluid-width"],"modeVariant":[1,"mode-variant"],"childRef":[32],"close":[64]}]]],["p-525c81b1",[[1,"tds-side-menu-close-button"]]],["p-06d3490c",[[1,"tds-side-menu-collapse-button",{"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-ae438c2e",[[0,"tds-slider",{"label":[1],"value":[1025],"min":[1],"max":[1],"ticks":[1],"showTickNumbers":[4,"show-tick-numbers"],"tooltip":[4],"disabled":[4],"readOnly":[4,"read-only"],"controls":[4],"input":[4],"step":[1],"name":[1],"thumbSize":[1,"thumb-size"],"snap":[4],"tdsAriaLabel":[1,"tds-aria-label"],"sliderId":[1,"slider-id"],"tdsReadOnlyAriaLabel":[1,"tds-read-only-aria-label"],"reset":[64]},[[0,"keydown","handleKeydown"],[9,"mouseup","handleRelease"],[9,"touchend","handleRelease"],[9,"mousemove","handleMove"],[9,"touchmove","handleMove"]],{"value":["handleValueUpdate"]}]]],["p-84de314b",[[1,"tds-step",{"index":[1],"state":[1],"tdsAriaCurrent":[1,"tds-aria-current"],"hideLabels":[32],"size":[32],"orientation":[32],"labelPosition":[32]},[[16,"internalTdsPropsChange","handlePropsChange"]]]]],["p-fbffe3aa",[[1,"tds-table-body-input-wrapper",{"showIcon":[4,"show-icon"],"renderSlot":[32],"inputFocused":[32],"compactDesign":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-d0f09796",[[1,"tds-table-body-row",{"selected":[516],"disabled":[516],"clickable":[516],"multiselect":[32],"mainCheckBoxStatus":[32],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-bd935506",[[1,"tds-table-header",{"allSelected":[1540,"all-selected"],"selected":[1540],"disabled":[1540],"indeterminate":[4],"multiselect":[32],"expandableRows":[32],"mainCheckboxSelected":[32],"mainExpendSelected":[32],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"whiteBackground":[32],"enableToolbarDesign":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"],[16,"internalTdsRowExpanded","internalTdsRowExpandedListener"]]]]],["p-3ec01fb3",[[1,"tds-table-header-input-wrapper",{"showIcon":[4,"show-icon"],"compactDesign":[4,"compact-design"],"renderSlot":[32],"inputFocused":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-3a92d554",[[1,"tds-table-toolbar",{"tableTitle":[513,"table-title"],"filter":[516],"tdsSearchAriaLabel":[1,"tds-search-aria-label"],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"whiteBackground":[32],"tableId":[32],"horizontalScrollWidth":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-49364819",[[1,"tds-toast",{"toastId":[1,"toast-id"],"header":[1],"subheader":[1],"variant":[1],"hidden":[516],"closable":[4],"toastRole":[1,"toast-role"],"tdsCloseAriaLabel":[1,"tds-close-aria-label"],"tdsAriaLive":[1,"tds-aria-live"],"hideToast":[64],"showToast":[64]}]]],["p-650b98bf",[[1,"tds-accordion",{"modeVariant":[1,"mode-variant"],"hideLastBorder":[4,"hide-last-border"]}]]],["p-87219f00",[[1,"tds-badge",{"value":[1],"hidden":[516],"size":[1],"tdsAriaLive":[1,"tds-aria-live"],"tdsAriaLabel":[32],"shape":[32],"text":[32]},null,{"value":["watchProps"],"size":["watchProps"]}]]],["p-72006dd7",[[1,"tds-block",{"modeVariant":[1,"mode-variant"],"componentTag":[1,"component-tag"]}]]],["p-f4b5e80b",[[1,"tds-body-cell",{"cellValue":[520,"cell-value"],"cellKey":[520,"cell-key"],"disablePadding":[516,"disable-padding"],"textAlign":[513,"text-align"],"textAlignState":[32],"activeSorting":[32],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"tableId":[32]},[[16,"internalTdsPropChange","internalTdsPropChangeListener"],[16,"internalTdsHover","internalTdsHoverListener"],[16,"internalTdsTextAlign","internalTdsTextAlignListener"]]]]],["p-b734b309",[[1,"tds-breadcrumb",{"current":[4]}]]],["p-1b471db7",[[1,"tds-breadcrumbs",{"tdsAriaLabel":[1,"tds-aria-label"]}]]],["p-a74cb560",[[6,"tds-button",{"text":[1],"type":[1],"variant":[1],"size":[1],"disabled":[4],"fullbleed":[4],"modeVariant":[1,"mode-variant"],"animation":[1],"tdsAriaLabel":[1,"tds-aria-label"],"name":[1],"value":[1],"onlyIcon":[32]},[[0,"keydown","handleKeyDown"],[0,"keyup","handleKeyUp"]]]]],["p-303acf88",[[6,"tds-chip",{"type":[1],"size":[1],"chipId":[1,"chip-id"],"checked":[1540],"name":[1],"value":[1],"disabled":[4],"tdsAriaLabel":[1,"tds-aria-label"]},[[16,"internalRadioOnChange","handleInternaRadioChange"]]]]],["p-dc375d3e",[[1,"tds-folder-tab",{"disabled":[4],"selected":[32],"tabWidth":[32],"setTabWidth":[64],"setSelected":[64]}]]],["p-bb1d069f",[[1,"tds-footer",{"modeVariant":[1,"mode-variant"]}]]],["p-bdc913a0",[[1,"tds-footer-item"]]],["p-a829417c",[[4,"tds-header"]]],["p-7d427dff",[[1,"tds-header-dropdown-list-user",{"imgUrl":[1,"img-url"],"imgAlt":[1,"img-alt"],"header":[1],"subheader":[1]}]]],["p-22b6223e",[[4,"tds-header-launcher-grid",{"headingElement":[32]}]]],["p-6e57997e",[[1,"tds-header-launcher-grid-item"]]],["p-debd6adc",[[4,"tds-header-launcher-grid-title"]]],["p-9099d978",[[4,"tds-header-launcher-list-title"]]],["p-1bbef1a5",[[1,"tds-header-title"]]],["p-52adc30c",[[1,"tds-inline-tab",{"disabled":[4],"selected":[32],"setSelected":[64]}]]],["p-b994e7ac",[[1,"tds-link",{"disabled":[4],"underline":[4],"standalone":[4]}]]],["p-106e048d",[[1,"tds-navigation-tab",{"disabled":[4],"selected":[32],"setSelected":[64]}]]],["p-bcdf13e0",[[1,"tds-popover-menu-item",{"disabled":[4]}]]],["p-86e99fdb",[[6,"tds-radio-button",{"name":[1],"value":[1],"radioId":[1,"radio-id"],"checked":[516],"required":[4],"disabled":[4],"tdsAriaLabel":[1,"tds-aria-label"],"tdsTabIndex":[2,"tds-tab-index"],"focusElement":[64]}]]],["p-0cfe8671",[[1,"tds-side-menu",{"open":[1028],"persistent":[4],"collapsed":[1028],"isUpperSlotEmpty":[32],"isCollapsed":[32],"initialCollapsedState":[32],"activeElementIndex":[32]},[[8,"keydown","handleKeyDown"],[10,"keydown","handleFocusTrap"],[16,"internalTdsCollapse","collapsedSideMenuEventHandler"]],{"collapsed":["onCollapsedChange"],"open":["onOpenChange"]}]]],["p-46c9af0f",[[1,"tds-side-menu-dropdown-list",{"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapsedSideMenuEventHandler"]]]]],["p-a0591e58",[[1,"tds-side-menu-dropdown-list-item",{"selected":[4],"dropdownHasIcon":[32],"dropdownHasUser":[32],"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-27c2f109",[[1,"tds-side-menu-overlay"]]],["p-5dd2aac8",[[0,"tds-spinner",{"size":[1],"variant":[1]}]]],["p-177386d5",[[1,"tds-stepper",{"orientation":[1],"labelPosition":[1,"label-position"],"size":[1],"hideLabels":[4,"hide-labels"],"stepperId":[1,"stepper-id"],"tdsAriaLabel":[1,"tds-aria-label"]},null,{"orientation":["handleDirectionChange"],"labelPosition":["handleLabelPositionChange"],"size":["handleSizeChange"],"hideLabels":["handleHideLabelsChange"]}]]],["p-08f63e5d",[[1,"tds-table",{"verticalDividers":[516,"vertical-dividers"],"compactDesign":[516,"compact-design"],"noMinWidth":[516,"no-min-width"],"multiselect":[516],"expandableRows":[516,"expandable-rows"],"responsive":[516],"modeVariant":[513,"mode-variant"],"zebraMode":[513,"zebra-mode"],"horizontalScrollWidth":[1,"horizontal-scroll-width"],"tableId":[1,"table-id"],"enableHorizontalScrollToolbarDesign":[32],"enableHorizontalScrollFooterDesign":[32],"getSelectedRows":[64]},null,{"multiselect":["multiselectChanged"],"expandableRows":["enableExpandableRowsChanged"],"compactDesign":["compactDesignChanged"],"verticalDividers":["verticalDividersChanged"],"noMinWidth":["noMinWidthChanged"],"zebraMode":["zebraModeChanged"],"modeVariant":["modeVariantChanged"],"horizontalScrollWidth":["widthChanged"]}]]],["p-aec3e4cf",[[4,"tds-table-body",{"multiselect":[32],"enablePaginationTableBody":[32],"expandableRows":[32],"multiselectArray":[32],"multiselectArrayJSON":[32],"mainCheckboxStatus":[32],"columnsNumber":[32],"zebraMode":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"],[16,"internalTdsRowChange","bodyCheckboxListener"]]]]],["p-f2232281",[[1,"tds-table-body-row-expandable",{"colSpan":[2,"col-span"],"rowId":[513,"row-id"],"expanded":[516],"overflow":[513],"autoCollapse":[4,"auto-collapse"],"tdsAriaLabelExpandButton":[513,"tds-aria-label-expand-button"],"isExpanded":[32],"tableId":[32],"columnsNumber":[32],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"modeVariant":[32],"expand":[64],"collapse":[64]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"],[16,"tdsChange","handleRowExpand"]],{"expanded":["watchExpanded"]}]]],["p-704682d6",[[6,"tds-tag",{"text":[1],"size":[1],"variant":[1]}]]],["p-a6238890",[[6,"tds-toggle",{"checked":[516],"required":[4],"size":[1],"name":[1],"headline":[1],"disabled":[4],"toggleId":[1,"toggle-id"],"tdsAriaLabel":[1,"tds-aria-label"],"toggle":[64],"focusElement":[64]}]]],["p-462a6049",[[1,"tds-header-launcher-button",{"active":[4],"tdsAriaLabel":[1,"tds-aria-label"]}]]],["p-25d026a6",[[1,"tds-divider",{"orientation":[1],"variant":[1]}]]],["p-7cb9790d",[[1,"tds-header-dropdown-list",{"size":[513],"headingElement":[32]}]]],["p-cf7af8f2",[[1,"tds-header-dropdown-list-item",{"selected":[4],"size":[513]}]]],["p-397c8969",[[17,"tds-dropdown-option",{"value":[8],"disabled":[4],"tdsAriaLabel":[1,"tds-aria-label"],"internalValue":[32],"selected":[32],"multiselect":[32],"size":[32],"setSelected":[64]},null,{"value":["valueWatcher"]}],[1,"tds-dropdown",{"name":[1],"disabled":[4],"helper":[1],"label":[1],"labelPosition":[1,"label-position"],"modeVariant":[1,"mode-variant"],"openDirection":[1,"open-direction"],"placeholder":[1],"size":[1],"animation":[1],"error":[4],"multiselect":[4],"filter":[4],"normalizeText":[4,"normalize-text"],"noResultText":[1,"no-result-text"],"defaultValue":[8,"default-value"],"value":[1032],"tdsAriaLabel":[1,"tds-aria-label"],"open":[32],"internalValue":[32],"filterResult":[32],"filterFocus":[32],"internalDefaultValue":[32],"selectedOptions":[32],"setValue":[64],"reset":[64],"removeValue":[64],"focusElement":[64],"close":[64],"updateDisplay":[64],"appendValue":[64]},[[9,"mousedown","onAnyClick"],[0,"keydown","onKeyDown"]],{"value":["handleValueChange"],"open":["handleOpenState"],"defaultValue":["handleDefaultValueChange"]}]]],["p-abad3489",[[6,"tds-popover-canvas",{"selector":[1],"referenceEl":[16],"defaultShow":[4,"default-show"],"show":[4],"placement":[1],"offsetSkidding":[2,"offset-skidding"],"animation":[1],"offsetDistance":[2,"offset-distance"],"modifiers":[16],"tdsAlertDialog":[1,"tds-alert-dialog"],"childRef":[32],"close":[64]}]]],["p-23fb4dee",[[6,"tds-tooltip",{"text":[1],"selector":[1],"referenceEl":[16],"defaultShow":[4,"default-show"],"mouseOverTooltip":[4,"mouse-over-tooltip"],"trigger":[1],"show":[1028],"placement":[1],"offsetSkidding":[2,"offset-skidding"],"offsetDistance":[2,"offset-distance"],"tdsAriaDescribedby":[1,"tds-aria-describedby"]},[[8,"keydown","handleKeyDown"]]]]],["p-5bca9fe7",[[1,"tds-side-menu-user-image",{"src":[1],"alt":[1]}],[1,"tds-side-menu-user-label",{"heading":[1],"subheading":[1]}]]],["p-5c077bb9",[[1,"tds-side-menu-item",{"selected":[4],"active":[4],"collapsed":[32],"hasUserComponent":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-8c2695af",[[6,"tds-checkbox",{"name":[1],"checkboxId":[1,"checkbox-id"],"disabled":[4],"required":[4],"checked":[1540],"indeterminate":[1028],"value":[1],"tdsAriaLabel":[1,"tds-aria-label"],"tdsAriaDescribedby":[1,"tds-aria-describedby"],"toggleCheckbox":[64],"focusElement":[64]},[[4,"reset","handleFormReset"]],{"indeterminate":["handleIndeterminateState"]}]]],["p-0cac9ea6",[[6,"tds-popover-core",{"selector":[1],"referenceEl":[16],"defaultShow":[4,"default-show"],"animation":[1],"show":[4],"placement":[1],"offsetSkidding":[2,"offset-skidding"],"offsetDistance":[2,"offset-distance"],"modifiers":[16],"trigger":[1],"autoHide":[4,"auto-hide"],"renderedShowValue":[32],"popperInstance":[32],"target":[32],"isShown":[32],"disableLogic":[32],"hasShownAtLeastOnce":[32],"openedByKeyboard":[32],"close":[64]},[[8,"click","onAnyClick"],[8,"internalTdsShow","onTdsShow"],[8,"keydown","handleKeydown"]],{"show":["onShowChange"],"referenceEl":["onReferenceElChanged"],"trigger":["onTriggerChanged"],"isShown":["onIsShownChange"]}]]],["p-61a1dc59",[[1,"tds-header-item",{"active":[4],"selected":[4]}],[1,"tds-core-header-item"]]],["p-eff87481",[[1,"tds-icon",{"name":[513],"size":[513],"svgTitle":[1,"svg-title"],"tdsAriaHidden":[4,"tds-aria-hidden"],"svgDescription":[1,"svg-description"],"icons_object":[32],"arrayOfIcons":[32]}]]]]'),e))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scania/tegel",
3
- "version": "1.37.1-expose-filter-input-value-beta.0",
3
+ "version": "1.37.1-expose-filter-input-value-beta.1",
4
4
  "description": "Tegel Design System",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -1 +0,0 @@
1
- import{r as t,c as o,h as s,H as i,g as e}from"./p-2049fab2.js";import{g as d}from"./p-11648030.js";const r=t=>null==t?"":t.toString(),l=t=>t.map((t=>r(t))),n=class{constructor(s){t(this,s),this.tdsChange=o(this,"tdsChange",6),this.tdsFocus=o(this,"tdsFocus",6),this.tdsBlur=o(this,"tdsBlur",6),this.tdsInput=o(this,"tdsInput",6),this.setDefaultOption=()=>{if(this.internalDefaultValue){const t=this.multiselect?this.internalDefaultValue.split(","):[this.internalDefaultValue];this.updateDropdownStateInternal(t)}},this.getChildren=()=>{const t=Array.from(this.host.children).filter((t=>"TDS-DROPDOWN-OPTION"===t.tagName));return 0===t.length&&console.warn("TDS DROPDOWN: No options found. Disregard if loading data asynchronously."),t},this.getSelectedChildren=()=>0===this.selectedOptions.length?[]:this.selectedOptions.map((t=>{var o;return null===(o=this.getChildren())||void 0===o?void 0:o.find((o=>r(o.value)===r(t)))})).filter(Boolean),this.getSelectedChildrenLabels=()=>{var t;return null===(t=this.getSelectedChildren())||void 0===t?void 0:t.map((t=>t.textContent.trim()))},this.getValue=()=>{const t=this.getSelectedChildrenLabels();return t?null==t?void 0:t.join(", "):""},this.setValueAttribute=()=>{0===this.selectedOptions.length?this.host.removeAttribute("value"):this.host.setAttribute("value",this.selectedOptions.join(","))},this.getOpenDirection=()=>{var t,o,s,i,e;if("auto"===this.openDirection||!this.openDirection){const d=null!==(o=null===(t=this.dropdownList)||void 0===t?void 0:t.offsetHeight)&&void 0!==o?o:0;return(null!==(e=null===(i=(s=this.host).getBoundingClientRect)||void 0===i?void 0:i.call(s).top)&&void 0!==e?e:0)+d+57>window.innerHeight?"up":"down"}return this.openDirection},this.handleToggleOpen=()=>{if(!this.disabled&&(this.open=!this.open,this.open))if(this.filter)this.focusInputElement();else{const t=this.host.shadowRoot.querySelector("button");t&&t.focus()}},this.focusInputElement=()=>{this.inputElement&&this.inputElement.focus()},this.handleFilter=t=>{this.tdsInput.emit(t);const o=t.target.value.toLowerCase(),s=this.getChildren();""===o?(s.forEach((t=>(t.removeAttribute("hidden"),t))),this.filterResult=null):this.filterResult=s.filter((t=>(this.normalizeString(t.textContent).toLowerCase().includes(this.normalizeString(o).toLowerCase())?t.removeAttribute("hidden"):t.setAttribute("hidden",""),!t.hasAttribute("hidden")))).length},this.handleFilterReset=()=>{this.reset(),this.inputElement.value="";const t=new InputEvent("input",{bubbles:!0,cancelable:!0});Object.defineProperty(t,"target",{value:this.inputElement,writable:!1}),this.handleFilter(t),this.inputElement.focus(),this.internalValue=""},this.handleFocus=t=>{if(this.open=!0,this.filterFocus=!0,this.multiselect&&this.inputElement&&(this.inputElement.value=""),this.tdsFocus.emit(t),this.filter){const t=new InputEvent("input",{bubbles:!0,cancelable:!0});Object.defineProperty(t,"target",{value:this.inputElement,writable:!1}),this.handleFilter(t)}},this.handleBlur=t=>{this.tdsBlur.emit(t)},this.resetInput=()=>{this.host.querySelector("input")&&this.reset()},this.name=void 0,this.disabled=!1,this.helper=void 0,this.label=void 0,this.labelPosition=void 0,this.modeVariant=null,this.openDirection="auto",this.placeholder=void 0,this.size="lg",this.animation="slide",this.error=!1,this.multiselect=!1,this.filter=!1,this.normalizeText=!0,this.noResultText="No result",this.defaultValue=void 0,this.value=null,this.tdsAriaLabel=void 0,this.open=!1,this.internalValue=void 0,this.filterResult=void 0,this.filterFocus=void 0,this.internalDefaultValue=void 0,this.selectedOptions=[]}handleValueChange(t){const o=this.normalizeValue(t);(function(t,o){return t.length!==o.length||t.some((t=>!o.includes(t)))})(o,this.selectedOptions)&&this.updateDropdownStateFromUser(o)}normalizeValue(t){return null==t||""===t?[]:this.multiselect?Array.isArray(t)?l(t):t.toString().split(",").filter((t=>""!==t)):Array.isArray(t)?[r(t[0])]:[r(t)]}updateDropdownStateInternal(t){this.updateDropdownState(t,!1)}updateDropdownStateFromUser(t){this.updateDropdownState(t,!0)}updateDropdownState(t,o=!0){const s=this.validateValues(t);this.selectedOptions=[...s],this.value=this.multiselect?this.selectedOptions:this.selectedOptions[0]||null,this.internalValue=this.getValue(),this.updateOptionElements(),this.updateDisplayValue(),o&&this.emitChange(),this.setValueAttribute()}validateValues(t){const o=this.getChildren();return o&&0!==o.length?t.filter((t=>{const s=o.some((o=>r(o.value)===r(t)));return s||console.warn(`Option with value "${t}" does not exist`),s})):(console.warn("No dropdown options found"),t)}updateOptionElements(){var t;null===(t=this.getChildren())||void 0===t||t.forEach((t=>{t.setSelected(this.selectedOptions.includes(r(t.value)))}))}updateDisplayValue(){this.internalValue=this.getSelectedChildrenLabels().join(", "),this.filter&&this.inputElement&&(this.inputElement.value=this.internalValue)}emitChange(){const t=this.multiselect?this.selectedOptions.join(","):this.selectedOptions[0]||null;this.tdsChange.emit({name:this.name,value:null!=t?t:null})}async setValue(t,o){let s;return s=Array.isArray(t)?l(t):[r(t)],this.updateDropdownStateFromUser(s),this.getSelectedChildren().map((t=>({value:t.value,label:t.textContent.trim()})))}async reset(){this.updateDropdownStateFromUser([])}async removeValue(t){const o=this.selectedOptions.filter((o=>o!==t));this.updateDropdownStateFromUser(o)}async focusElement(){if(this.filter)this.focusInputElement();else{const t=this.host.shadowRoot.querySelector("button");t&&t.focus()}this.handleFocus({})}async close(){this.open=!1}async updateDisplay(){this.updateDisplayValue()}onAnyClick(t){this.open&&!t.composedPath().includes(this.host)&&(this.open=!1)}async onKeyDown(t){var o;const{activeElement:s}=document;if(!s)return;const i=this.getChildren();if("ArrowDown"===t.key){const t=s.nextElementSibling?i.findIndex((t=>t===s.nextElementSibling)):0;i[((t,o)=>{if(void 0===t[o])return 0;for(let s=o;s<t.length;s++)if(!t[s].disabled)return s})(i,t)].focus()}else if("ArrowUp"===t.key)i[((t,o)=>{if(void 0===t[o])return t.length-1;for(let s=o;s>=0;s--)if(!t[s].disabled)return s})(i,s.nextElementSibling?this.getChildren().findIndex((t=>t===s.previousElementSibling)):0)].focus();else if("Escape"===t.key)if(this.open=!1,this.filter)null===(o=this.inputElement)||void 0===o||o.focus();else{const t=this.host.shadowRoot.querySelector("button");null==t||t.focus()}}handleOpenState(){this.filter&&this.multiselect&&(this.open||(this.inputElement.value=this.selectedOptions.length?this.getValue():"")),this.updateDropdownListInertState()}handleDefaultValueChange(t){null!=t&&(this.internalDefaultValue=r(t),this.setDefaultOption())}componentWillLoad(){if(null==this.value){if(null!=this.defaultValue){const t=r(this.defaultValue),o=this.multiselect?t.split(",").map(r):[t];this.updateDropdownStateInternal(o)}}else{const t=this.normalizeValue(this.value);this.updateDropdownStateInternal(t)}}handleSlotChange(){this.setDefaultOption()}normalizeString(t){return this.normalizeText?t.normalize("NFD").replace(/\p{Diacritic}/gu,""):t}async appendValue(t){this.updateDropdownStateFromUser(this.multiselect?[...this.selectedOptions,t]:[t])}componentDidRender(){const t=this.host.closest("form");t&&t.addEventListener("reset",this.resetInput),this.updateDropdownListInertState()}disconnectedCallback(){const t=this.host.closest("form");t&&t.removeEventListener("reset",this.resetInput)}updateDropdownListInertState(){this.dropdownList&&(this.open?this.dropdownList.removeAttribute("inert"):this.dropdownList.setAttribute("inert",""))}render(){((t,o,s,i)=>{let e=t.querySelector("input");t.querySelector("input")||(e=t.ownerDocument.createElement("input"),e.type="hidden",t.appendChild(e)),e.disabled=i,e.name=o,e.value=s||""})(this.host,this.name,this.selectedOptions.join(","),this.disabled);const t=this.label?`dropdown-label-${this.name||d()}`:void 0,o=this.helper?`dropdown-helper-${this.name||d()}`:void 0;return s(i,{key:"f289633d0270a882cfd961878d73261d4560a468",class:{[`tds-mode-variant-${this.modeVariant}`]:Boolean(this.modeVariant)}},this.label&&"outside"===this.labelPosition&&s("div",{key:"d44c53c472461705ca763c89499de08ba4a95807",id:t,class:"label-outside "+(this.disabled?"disabled":"")},this.label),s("div",{key:"e1c9301b13af161832a9198730f2ddb8652bf034",class:{"dropdown-select":!0,[this.size]:!0,disabled:this.disabled}},this.filter?s("div",{class:{filter:!0,focus:this.filterFocus,disabled:this.disabled,error:this.error}},s("div",{class:"value-wrapper"},this.label&&"inside"===this.labelPosition&&this.placeholder&&s("div",{id:t,class:`label-inside ${this.size}`},this.label),this.label&&"inside"===this.labelPosition&&!this.placeholder&&s("div",{id:t,class:`\n label-inside-as-placeholder\n ${this.size}\n ${this.selectedOptions.length?"selected":""}\n `},this.label),s("input",{"aria-label":this.tdsAriaLabel,"aria-labelledby":t,"aria-describedby":o,"aria-disabled":this.disabled,ref:t=>this.inputElement=t,class:{placeholder:"inside"===this.labelPosition},type:"text",placeholder:this.filterFocus?"":this.placeholder,value:this.multiselect&&this.filterFocus?"":this.getValue(),disabled:this.disabled,onInput:t=>this.handleFilter(t),onBlur:t=>{this.filterFocus=!1,this.multiselect&&(this.inputElement.value=this.getValue()),this.handleBlur(t)},onFocus:t=>this.handleFocus(t),onKeyDown:t=>{"Escape"===t.key&&(this.open=!1)}})),s("tds-icon",{tabIndex:0,role:"button","aria-label":"Clear filter",svgTitle:"Clear filter",onClick:this.handleFilterReset,onKeyDown:t=>{"Enter"===t.key&&this.handleFilterReset()},class:{"clear-icon":!0,hide:!(this.open&&""!==this.inputElement.value)},name:"cross",size:"16px"}),s("tds-icon",{tdsAriaHidden:!0,role:"button","aria-label":"Open/Close dropdown",svgTitle:"Open/Close dropdown",onClick:this.handleToggleOpen,onKeyDown:t=>{"Enter"===t.key&&this.handleToggleOpen()},class:"menu-icon "+(this.open?"open":"closed"),name:"chevron_down",size:"16px"})):s("button",{"aria-label":this.tdsAriaLabel,"aria-labelledby":t,"aria-describedby":o,"aria-disabled":this.disabled,onClick:()=>this.handleToggleOpen(),onKeyDown:t=>{"Escape"===t.key&&(this.open=!1)},class:`\n ${this.selectedOptions.length?"value":"placeholder"}\n ${this.open?"open":"closed"}\n ${this.error?"error":""}\n `,disabled:this.disabled},s("div",{class:`value-wrapper ${this.size}`},this.label&&"inside"===this.labelPosition&&this.placeholder&&s("div",{id:t,class:`label-inside ${this.size}`},this.label),this.label&&"inside"===this.labelPosition&&!this.placeholder&&s("div",{id:t,class:`\n label-inside-as-placeholder\n ${this.size}\n ${this.selectedOptions.length?"selected":""}\n `},this.label),s("div",{class:`placeholder ${this.size}`},this.selectedOptions.length?this.getValue():this.placeholder),s("tds-icon",{"aria-label":"Open/Close dropdown",svgTitle:"Open/Close dropdown",class:"menu-icon "+(this.open?"open":"closed"),name:"chevron_down",size:"16px"})))),s("div",{key:"6da753a8a99f529c12e3b2f932a2c18c3849cc67",role:"listbox","aria-label":this.tdsAriaLabel,inert:!this.open,"aria-orientation":"vertical","aria-multiselectable":this.multiselect,ref:t=>{this.dropdownList=t},class:{"dropdown-list":!0,[this.size]:!0,[this.getOpenDirection()]:!0,"label-outside":this.label&&"outside"===this.labelPosition,open:this.open,closed:!this.open,[`animation-enter-${this.animation}`]:"none"!==this.animation&&this.open,[`animation-exit-${this.animation}`]:"none"!==this.animation&&!this.open}},s("slot",{key:"58e394cc7faabdd8db13e015397f363e10642a3b",onSlotchange:()=>this.handleSlotChange()}),0===this.filterResult&&""!==this.noResultText&&s("div",{key:"5b9c48f28e07e5e85f86229c87cf74edf1fe97b0",class:`no-result ${this.size}`},this.noResultText)),this.helper&&s("div",{key:"b49c0686ee4c3b776fcee30e84933ee2a94b3cb5",id:o,class:{helper:!0,error:this.error,disabled:this.disabled}},this.error&&s("tds-icon",{key:"bd271a668f55f0da8d8e605fd9e445026a1da6b0",name:"error",size:"16px"}),this.helper))}get host(){return e(this)}static get watchers(){return{value:["handleValueChange"],open:["handleOpenState"],defaultValue:["handleDefaultValueChange"]}}};n.style='@charset "UTF-8";:host button{all:unset;height:100%;width:100%;background-color:var(--tds-dropdown-bg);border-bottom:1px solid var(--tds-dropdown-border-bottom);border-radius:var(--tds-dropdown-border-radius)}:host button:hover{border-bottom:1px solid var(--tds-dropdown-border-bottom-hover)}:host button .value-wrapper{padding:0 16px;display:flex;align-items:center;justify-content:space-between}:host button.placeholder{color:var(--tds-dropdown-placeholder-color);line-height:1.3}:host button.value{color:var(--tds-dropdown-value-color);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);line-height:1.3}:host button:focus{border-bottom:0}:host button.error{border-bottom:1px solid var(--tds-dropdown-error)}:host button.error:focus{border-bottom-color:transparent}:host button.error:focus::before{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background:var(--tds-dropdown-error)}:host button:disabled{color:var(--tds-dropdown-disabled-color);border-bottom:1px solid transparent}:host button .menu-icon{margin-right:0}:host .dropdown-select:focus-within{outline:2px solid var(--tds-focus-outline-color);box-shadow:0 0 0 1px var(--tds-white);outline-offset:1px;z-index:1}:host .filter{display:flex;align-items:center;justify-content:space-between;height:100%;background-color:var(--tds-dropdown-bg);border-bottom:1px solid var(--tds-dropdown-border-bottom);padding-left:16px;border-radius:4px 4px 0 0}:host .filter:hover{border-bottom:1px solid var(--tds-dropdown-border-bottom-hover)}:host .filter.disabled{color:var(--tds-dropdown-disabled-color);border-bottom:1px solid transparent}:host .filter.disabled .value-wrapper input{color:var(--tds-dropdown-disabled-color)}:host .filter .value-wrapper{display:flex;width:100%;height:100%}:host .filter .value-wrapper input{color:var(--tds-dropdown-filter-input-color)}:host .filter .label-inside-as-placeholder{position:absolute;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);line-height:1.3;color:var(--tds-dropdown-placeholder-color)}:host .filter .label-inside-as-placeholder.lg{top:20px}:host .filter .label-inside-as-placeholder.md{top:16px}:host .filter .label-inside-as-placeholder.sm{display:none}:host .filter .label-inside-as-placeholder.selected{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:all 0.2s ease-in-out}:host .filter .label-inside-as-placeholder.selected.lg{top:12px}:host .filter .label-inside-as-placeholder.selected.md{top:8px}:host .filter .label-inside-as-placeholder.selected.sm{display:none}:host .filter .label-inside-as-placeholder.selected+.placeholder:not(.sm){margin-top:8px}:host .filter.focus{border-bottom:0}:host .filter.focus:hover{border-bottom:0}:host .filter.error{border-bottom:1px solid var(--tds-dropdown-error)}:host .filter.error.focus{border-bottom-color:transparent}:host .filter.error.focus::before{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background:var(--tds-dropdown-error)}:host .filter input{flex:1;all:unset;width:100%}:host .filter input::placeholder{color:var(--tds-dropdown-placeholder-color)}:host .filter input:disabled::placeholder{color:var(--tds-dropdown-disabled-color)}:host .filter tds-icon{cursor:pointer}:host .filter .menu-icon{margin-right:16px}:host .filter .clear-icon{margin:0 8px;color:var(--tds-dropdown-clear-icon-color);padding-right:8px;border-right:1px solid var(--tds-dropdown-clear-icon-color)}:host .filter .clear-icon:hover{color:var(--tds-dropdown-clear-icon-hover-color)}:host .filter .clear-icon.hide{display:none;visibility:hidden}:host{--tds-scrollbar-width-standard:thin;--tds-scrollbar-width:10px;--tds-scrollbar-height:10px;--tds-scrollbar-thumb-border-width:3px;--tds-scrollbar-thumb-border-hover-width:2px}body{scrollbar-width:thin}:host{display:block;position:relative;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls)}:host .label-outside{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);color:var(--tds-dropdown-label-color);margin-bottom:8px}:host .label-outside.disabled{color:var(--tds-dropdown-disabled-color)}:host .dropdown-select{position:relative}:host .dropdown-select button:focus{outline:2px solid var(--tds-focus-outline-color);box-shadow:0 0 0 1px var(--tds-white);outline-offset:1px;z-index:1;border-radius:0}:host .dropdown-select button{transition:border-bottom-color var(--tds-motion-duration-fast-02) var(--tds-motion-easing-scania)}:host .dropdown-select button:hover{border-bottom-color:var(--tds-dropdown-border-bottom-hover)}:host .dropdown-select button{border-bottom-color:var(--tds-dropdown-border-bottom)}:host .dropdown-select button.error{border-bottom-color:var(--tds-dropdown-error)}:host .dropdown-select button.error:focus{border-bottom-color:transparent}:host .dropdown-select.disabled .label-inside,:host .dropdown-select.disabled .placeholder,:host .dropdown-select.disabled .label-inside-as-placeholder,:host .dropdown-select.disabled .value-wrapper{color:var(--tds-dropdown-disabled-color)}:host .dropdown-select.disabled button{border:none}:host .dropdown-select .label-inside{position:absolute;font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);color:var(--tds-dropdown-label-inside-color)}:host .dropdown-select .label-inside.lg{top:12px;left:16px}:host .dropdown-select .label-inside.md{top:8px;left:16px}:host .dropdown-select .label-inside.sm{display:none}:host .dropdown-select .label-inside.xs{display:none}:host .dropdown-select .label-inside+.placeholder:not(.sm){margin-top:8px}:host .dropdown-select .placeholder{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:var(--tds-placeholder-margin);}:host .dropdown-select .placeholder.xs{line-height:1}:host .dropdown-select .label-inside-as-placeholder{color:var(--tds-dropdown-placeholder-color)}:host .dropdown-select .label-inside-as-placeholder.selected{position:absolute;font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:all 0.2s ease-in-out}:host .dropdown-select .label-inside-as-placeholder.selected.lg{top:12px}:host .dropdown-select .label-inside-as-placeholder.selected.md{top:8px}:host .dropdown-select .label-inside-as-placeholder.selected.sm{display:none}:host .dropdown-select .label-inside-as-placeholder.selected+.placeholder:not(.sm){margin-top:8px}:host .dropdown-select.lg{height:55px}:host .dropdown-select.md{height:47px}:host .dropdown-select.sm{height:39px}:host .dropdown-select.xs{height:29px}:host .helper{margin-top:4px;color:var(--tds-dropdown-helper-color);font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);display:flex;align-items:center;gap:8px}:host .helper.error{color:var(--tds-dropdown-error)}:host .helper.disabled{color:var(--tds-dropdown-disabled-color)}:host .dropdown-list{z-index:100;position:absolute;width:100%;transform-origin:top;box-shadow:0 2px 3px 0 rgba(0, 0, 0, 0.1);border-radius:var(--tds-dropdown-list-border-radius-down);overflow-y:auto;transform:scaleY(0);pointer-events:none}:host .dropdown-list:hover::-webkit-scrollbar-thumb{border:var(--tds-scrollbar-thumb-border-hover-width) solid transparent;background:var(--tds-scrollbar-hover-thumb-color);background-clip:padding-box}:host .dropdown-list::-webkit-scrollbar{width:var(--tds-scrollbar-width)}:host .dropdown-list::-webkit-scrollbar-track{background:var(--tds-scrollbar-track-color)}:host .dropdown-list::-webkit-scrollbar-thumb{border-radius:40px;background:var(--tds-scrollbar-thumb-color);border:var(--tds-scrollbar-thumb-border-width) solid transparent;background-clip:padding-box}:host .dropdown-list::-webkit-scrollbar-button{height:0;width:0}@supports not selector(::-webkit-scrollbar){:host .dropdown-list{scrollbar-color:var(--tds-scrollbar-thumb-color) var(--tds-scrollbar-track-color);scrollbar-width:var(--tds-scrollbar-width-standard)}}:host .dropdown-list.lg{max-height:312px}:host .dropdown-list.md{max-height:312px}:host .dropdown-list.sm{max-height:260px}:host .dropdown-list.xs{max-height:260px}:host .dropdown-list.up{bottom:100%;margin-top:0;margin-bottom:1px;transform-origin:bottom;display:flex;flex-direction:column-reverse;border-radius:var(--tds-dropdown-list-border-radius-up)}:host .dropdown-list.up.label-outside{bottom:calc(100% - 24px)}:host .dropdown-list.closed{transform:scaleY(0);pointer-events:none}:host .dropdown-list.open{transform:scaleY(1);visibility:visible;opacity:1;pointer-events:auto}:host .dropdown-list.animation-enter-slide{transition:transform var(--tds-motion-duration-moderate-01) var(--tds-motion-easing-enter)}:host .dropdown-list.animation-exit-slide{transition:transform var(--tds-motion-duration-moderate-01) var(--tds-motion-easing-exit)}:host .dropdown-list .no-result{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);display:flex;align-items:center;padding:0 16px;background-color:var(--tds-dropdown-bg)}:host .dropdown-list .no-result.lg{height:56px}:host .dropdown-list .no-result.md{height:48px}:host .dropdown-list .no-result.sm{height:40px}:host .dropdown-list .no-result.xs{height:40px}:host .menu-icon{color:var(--tds-dropdown-menu-icon-color)}:host tds-icon{transition:transform var(--tds-motion-duration-fast-02) var(--tds-motion-easing-scania)}:host tds-icon.open{transform:rotateZ(180deg)}';const a=class{constructor(s){t(this,s),this.tdsSelect=o(this,"tdsSelect",6),this.tdsFocus=o(this,"tdsFocus",6),this.tdsBlur=o(this,"tdsBlur",6),this.parentElement=null,this.label="",this.componentWillRender=()=>{var t,o,s;this.host.parentElement&&(this.parentElement="TDS-DROPDOWN"===(null===(t=this.host.parentElement)||void 0===t?void 0:t.tagName)?this.host.parentElement:this.host.getRootNode().host,this.parentElement&&(this.multiselect=null!==(o=this.parentElement.multiselect)&&void 0!==o&&o,this.size=this.parentElement.size||"lg"),this.label=(null===(s=this.host.textContent)||void 0===s?void 0:s.trim())||"")},this.handleSingleSelect=()=>{this.disabled||(this.selected=!0,this.parentElement.appendValue(this.internalValue),this.parentElement.close(),this.tdsSelect.emit({value:this.internalValue,selected:this.selected}))},this.handleMultiselect=t=>{this.disabled||(t.detail.checked?(this.parentElement.appendValue(this.internalValue),this.selected=!0,this.tdsSelect.emit({value:this.internalValue,selected:this.selected})):(this.parentElement.removeValue(this.internalValue),this.selected=!1,this.tdsSelect.emit({value:this.internalValue,selected:this.selected})),t.stopPropagation())},this.handleFocus=t=>{this.tdsFocus.emit(t)},this.handleBlur=t=>{this.tdsBlur.emit(t)},this.value=void 0,this.internalValue=void 0,this.disabled=!1,this.tdsAriaLabel=void 0,this.selected=!1,this.multiselect=!1,this.size="lg"}async setSelected(t){this.selected=t}valueWatcher(t){this.internalValue=r(t)}componentWillLoad(){this.internalValue=r(this.value)}render(){return s(i,{key:"d35a3153be292b1656d0efca93f06bfc1357041b"},s("div",{key:"384353f9868a3fb559ca4140d5cd4f5553e024ad",class:`dropdown-option\n ${this.size}\n ${this.selected?"selected":""}\n ${this.disabled?"disabled":""}\n `},this.multiselect?s("div",{class:"multiselect",onKeyDown:t=>{"Escape"===t.key&&this.parentElement.close()}},s("tds-checkbox",{onTdsChange:t=>{this.handleMultiselect(t)},disabled:this.disabled,checked:this.selected,tdsAriaLabel:this.tdsAriaLabel,class:{[this.size]:!0}},s("div",{slot:"label"},s("slot",null)))):s("button",{role:"option","aria-disabled":this.disabled,"aria-selected":this.selected,"aria-label":this.tdsAriaLabel,onClick:()=>{this.handleSingleSelect()},onFocus:t=>this.handleFocus(t),onBlur:t=>this.handleBlur(t),disabled:this.disabled,class:this.size},s("div",{class:"single-select"},s("slot",null),this.selected&&s("tds-icon",{name:"tick",size:"16px"})))))}static get delegatesFocus(){return!0}get host(){return e(this)}static get watchers(){return{value:["valueWatcher"]}}};a.style=":host{box-sizing:border-box;display:block;background-color:var(--tds-dropdown-option-background)}:host *{box-sizing:border-box}:host .dropdown-option{color:var(--tds-dropdown-option-color);border-bottom:1px solid var(--tds-dropdown-option-border);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);overflow-wrap:anywhere;transition:background-color var(--tds-motion-duration-fast-02) var(--tds-motion-easing-scania)}:host .dropdown-option.selected{background-color:var(--tds-dropdown-option-background-selected)}:host .dropdown-option.disabled{color:var(--tds-dropdown-option-color-disabled)}:host .dropdown-option button:focus{outline:2px solid var(--tds-dropdown-option-focus);box-shadow:inset 0 0 0 3px var(--tds-white);outline-offset:-2px}:host .dropdown-option button{all:unset;width:100%}:host .dropdown-option button.lg{padding:19px 0 20px}:host .dropdown-option button.md{padding:15px 0 16px}:host .dropdown-option button.sm{padding:11px 0 12px}:host .dropdown-option button.xs{padding:7px 0 8px}:host .dropdown-option button .single-select{display:flex;align-items:center;justify-content:space-between;padding:0 16px}:host .dropdown-option .multiselect{width:100%;height:100%}:host .dropdown-option .multiselect tds-checkbox{display:flex;height:100%;width:100%}:host .dropdown-option .multiselect tds-checkbox.lg{padding:15px 16px 16px}:host .dropdown-option .multiselect tds-checkbox.md{padding:11px 16px 12px}:host .dropdown-option .multiselect tds-checkbox.sm{padding:7px 16px 8px}:host .dropdown-option .multiselect tds-checkbox.xs{padding:7px 16px 8px}:host .dropdown-option:hover{border-bottom-color:var(--tds-dropdown-option-border-hover);cursor:pointer}:host .dropdown-option:hover.disabled{border-bottom-color:var(--tds-dropdown-option-border-hover);cursor:not-allowed}:host([hidden]){display:none}";export{n as tds_dropdown,a as tds_dropdown_option}