@scania/tegel 1.28.1-dropdown-testing-beta.0 → 1.28.1-dropdown-testing-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.
- package/dist/cjs/tds-dropdown_2.cjs.entry.js +10 -5
- package/dist/collection/components/dropdown/dropdown.js +10 -5
- package/dist/components/{p-1f80aa2c.js → p-6037aab0.js} +10 -5
- package/dist/components/tds-dropdown.js +1 -1
- package/dist/components/tds-table-footer.js +1 -1
- package/dist/esm/tds-dropdown_2.entry.js +10 -5
- package/dist/tegel/p-07ee8ec0.entry.js +1 -0
- package/dist/tegel/tegel.esm.js +1 -1
- package/package.json +1 -1
- package/dist/tegel/p-342e182c.entry.js +0 -1
|
@@ -237,8 +237,13 @@ const TdsDropdown = class {
|
|
|
237
237
|
this.selectedOptions = [];
|
|
238
238
|
}
|
|
239
239
|
handleValueChange(newValue) {
|
|
240
|
+
console.log('---------------------------------');
|
|
241
|
+
console.log('handleValueChange', newValue);
|
|
240
242
|
// Normalize to array
|
|
241
243
|
const normalizedValue = this.normalizeValue(newValue);
|
|
244
|
+
console.log('normalizedValue', normalizedValue);
|
|
245
|
+
console.log('this.selectedOptions', this.selectedOptions);
|
|
246
|
+
console.log('this.value', this.value);
|
|
242
247
|
// Only update if actually changed
|
|
243
248
|
if (this.hasValueChanged(normalizedValue, this.selectedOptions)) {
|
|
244
249
|
console.log('IF statement');
|
|
@@ -487,9 +492,9 @@ const TdsDropdown = class {
|
|
|
487
492
|
}
|
|
488
493
|
render() {
|
|
489
494
|
appendHiddenInput(this.host, this.name, this.selectedOptions.join(','), this.disabled);
|
|
490
|
-
return (index.h(index.Host, { key: '
|
|
495
|
+
return (index.h(index.Host, { key: 'd6bcaaad392348e1715b764c221701d713f99822', class: {
|
|
491
496
|
[`tds-mode-variant-${this.modeVariant}`]: Boolean(this.modeVariant),
|
|
492
|
-
} }, this.label && this.labelPosition === 'outside' && (index.h("div", { key: '
|
|
497
|
+
} }, this.label && this.labelPosition === 'outside' && (index.h("div", { key: '30d60535f3e8e52867338981d9efd073360c987e', class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), index.h("div", { key: '71e975f4d0e776133f2d9402290ec6e162b3e524', class: {
|
|
493
498
|
'dropdown-select': true,
|
|
494
499
|
[this.size]: true,
|
|
495
500
|
'disabled': this.disabled,
|
|
@@ -539,7 +544,7 @@ const TdsDropdown = class {
|
|
|
539
544
|
label-inside-as-placeholder
|
|
540
545
|
${this.size}
|
|
541
546
|
${this.selectedOptions.length ? 'selected' : ''}
|
|
542
|
-
` }, 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: '
|
|
547
|
+
` }, 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: 'a45982b49140d0df067cbbd0a8a6f4e94277ebdc', role: "listbox", "aria-label": this.tdsAriaLabel, "aria-orientation": "vertical", "aria-multiselectable": this.multiselect, ref: (element) => {
|
|
543
548
|
this.dropdownList = element;
|
|
544
549
|
}, class: {
|
|
545
550
|
'dropdown-list': true,
|
|
@@ -550,11 +555,11 @@ const TdsDropdown = class {
|
|
|
550
555
|
'closed': !this.open,
|
|
551
556
|
[`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
|
|
552
557
|
[`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
|
|
553
|
-
} }, index.h("slot", { key: '
|
|
558
|
+
} }, index.h("slot", { key: 'bd6118fb958f58e04fe5e76a21b2f1d8d17d7d7c', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (index.h("div", { key: 'f2154c03b00802c8d5c25660bbe96eab21edbe47', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (index.h("div", { key: '574be347266e526d6e52996a60d5ea248e5ec916', class: {
|
|
554
559
|
helper: true,
|
|
555
560
|
error: this.error,
|
|
556
561
|
disabled: this.disabled,
|
|
557
|
-
} }, this.error && index.h("tds-icon", { key: '
|
|
562
|
+
} }, this.error && index.h("tds-icon", { key: '58422a9e510fdf76d7041fc91a46c678135ebfa9', name: "error", size: "16px" }), this.helper))));
|
|
558
563
|
}
|
|
559
564
|
get host() { return index.getElement(this); }
|
|
560
565
|
static get watchers() { return {
|
|
@@ -158,8 +158,13 @@ export class TdsDropdown {
|
|
|
158
158
|
this.selectedOptions = [];
|
|
159
159
|
}
|
|
160
160
|
handleValueChange(newValue) {
|
|
161
|
+
console.log('---------------------------------');
|
|
162
|
+
console.log('handleValueChange', newValue);
|
|
161
163
|
// Normalize to array
|
|
162
164
|
const normalizedValue = this.normalizeValue(newValue);
|
|
165
|
+
console.log('normalizedValue', normalizedValue);
|
|
166
|
+
console.log('this.selectedOptions', this.selectedOptions);
|
|
167
|
+
console.log('this.value', this.value);
|
|
163
168
|
// Only update if actually changed
|
|
164
169
|
if (this.hasValueChanged(normalizedValue, this.selectedOptions)) {
|
|
165
170
|
console.log('IF statement');
|
|
@@ -408,9 +413,9 @@ export class TdsDropdown {
|
|
|
408
413
|
}
|
|
409
414
|
render() {
|
|
410
415
|
appendHiddenInput(this.host, this.name, this.selectedOptions.join(','), this.disabled);
|
|
411
|
-
return (h(Host, { key: '
|
|
416
|
+
return (h(Host, { key: 'd6bcaaad392348e1715b764c221701d713f99822', class: {
|
|
412
417
|
[`tds-mode-variant-${this.modeVariant}`]: Boolean(this.modeVariant),
|
|
413
|
-
} }, this.label && this.labelPosition === 'outside' && (h("div", { key: '
|
|
418
|
+
} }, this.label && this.labelPosition === 'outside' && (h("div", { key: '30d60535f3e8e52867338981d9efd073360c987e', class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '71e975f4d0e776133f2d9402290ec6e162b3e524', class: {
|
|
414
419
|
'dropdown-select': true,
|
|
415
420
|
[this.size]: true,
|
|
416
421
|
'disabled': this.disabled,
|
|
@@ -460,7 +465,7 @@ export class TdsDropdown {
|
|
|
460
465
|
label-inside-as-placeholder
|
|
461
466
|
${this.size}
|
|
462
467
|
${this.selectedOptions.length ? 'selected' : ''}
|
|
463
|
-
` }, 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: '
|
|
468
|
+
` }, 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: 'a45982b49140d0df067cbbd0a8a6f4e94277ebdc', role: "listbox", "aria-label": this.tdsAriaLabel, "aria-orientation": "vertical", "aria-multiselectable": this.multiselect, ref: (element) => {
|
|
464
469
|
this.dropdownList = element;
|
|
465
470
|
}, class: {
|
|
466
471
|
'dropdown-list': true,
|
|
@@ -471,11 +476,11 @@ export class TdsDropdown {
|
|
|
471
476
|
'closed': !this.open,
|
|
472
477
|
[`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
|
|
473
478
|
[`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
|
|
474
|
-
} }, h("slot", { key: '
|
|
479
|
+
} }, h("slot", { key: 'bd6118fb958f58e04fe5e76a21b2f1d8d17d7d7c', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: 'f2154c03b00802c8d5c25660bbe96eab21edbe47', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: '574be347266e526d6e52996a60d5ea248e5ec916', class: {
|
|
475
480
|
helper: true,
|
|
476
481
|
error: this.error,
|
|
477
482
|
disabled: this.disabled,
|
|
478
|
-
} }, this.error && h("tds-icon", { key: '
|
|
483
|
+
} }, this.error && h("tds-icon", { key: '58422a9e510fdf76d7041fc91a46c678135ebfa9', name: "error", size: "16px" }), this.helper))));
|
|
479
484
|
}
|
|
480
485
|
static get is() { return "tds-dropdown"; }
|
|
481
486
|
static get encapsulation() { return "shadow"; }
|
|
@@ -222,8 +222,13 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
222
222
|
this.selectedOptions = [];
|
|
223
223
|
}
|
|
224
224
|
handleValueChange(newValue) {
|
|
225
|
+
console.log('---------------------------------');
|
|
226
|
+
console.log('handleValueChange', newValue);
|
|
225
227
|
// Normalize to array
|
|
226
228
|
const normalizedValue = this.normalizeValue(newValue);
|
|
229
|
+
console.log('normalizedValue', normalizedValue);
|
|
230
|
+
console.log('this.selectedOptions', this.selectedOptions);
|
|
231
|
+
console.log('this.value', this.value);
|
|
227
232
|
// Only update if actually changed
|
|
228
233
|
if (this.hasValueChanged(normalizedValue, this.selectedOptions)) {
|
|
229
234
|
console.log('IF statement');
|
|
@@ -472,9 +477,9 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
472
477
|
}
|
|
473
478
|
render() {
|
|
474
479
|
appendHiddenInput(this.host, this.name, this.selectedOptions.join(','), this.disabled);
|
|
475
|
-
return (h(Host, { key: '
|
|
480
|
+
return (h(Host, { key: 'd6bcaaad392348e1715b764c221701d713f99822', class: {
|
|
476
481
|
[`tds-mode-variant-${this.modeVariant}`]: Boolean(this.modeVariant),
|
|
477
|
-
} }, this.label && this.labelPosition === 'outside' && (h("div", { key: '
|
|
482
|
+
} }, this.label && this.labelPosition === 'outside' && (h("div", { key: '30d60535f3e8e52867338981d9efd073360c987e', class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '71e975f4d0e776133f2d9402290ec6e162b3e524', class: {
|
|
478
483
|
'dropdown-select': true,
|
|
479
484
|
[this.size]: true,
|
|
480
485
|
'disabled': this.disabled,
|
|
@@ -524,7 +529,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
524
529
|
label-inside-as-placeholder
|
|
525
530
|
${this.size}
|
|
526
531
|
${this.selectedOptions.length ? 'selected' : ''}
|
|
527
|
-
` }, 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: '
|
|
532
|
+
` }, 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: 'a45982b49140d0df067cbbd0a8a6f4e94277ebdc', role: "listbox", "aria-label": this.tdsAriaLabel, "aria-orientation": "vertical", "aria-multiselectable": this.multiselect, ref: (element) => {
|
|
528
533
|
this.dropdownList = element;
|
|
529
534
|
}, class: {
|
|
530
535
|
'dropdown-list': true,
|
|
@@ -535,11 +540,11 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
535
540
|
'closed': !this.open,
|
|
536
541
|
[`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
|
|
537
542
|
[`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
|
|
538
|
-
} }, h("slot", { key: '
|
|
543
|
+
} }, h("slot", { key: 'bd6118fb958f58e04fe5e76a21b2f1d8d17d7d7c', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: 'f2154c03b00802c8d5c25660bbe96eab21edbe47', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: '574be347266e526d6e52996a60d5ea248e5ec916', class: {
|
|
539
544
|
helper: true,
|
|
540
545
|
error: this.error,
|
|
541
546
|
disabled: this.disabled,
|
|
542
|
-
} }, this.error && h("tds-icon", { key: '
|
|
547
|
+
} }, this.error && h("tds-icon", { key: '58422a9e510fdf76d7041fc91a46c678135ebfa9', name: "error", size: "16px" }), this.helper))));
|
|
543
548
|
}
|
|
544
549
|
get host() { return this; }
|
|
545
550
|
static get watchers() { return {
|
|
@@ -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-1ef7423a.js';
|
|
3
|
-
import { d as defineCustomElement$4 } from './p-
|
|
3
|
+
import { d as defineCustomElement$4 } from './p-6037aab0.js';
|
|
4
4
|
import { d as defineCustomElement$3 } from './p-9ba3c16e.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './p-9b40a24d.js';
|
|
6
6
|
|
|
@@ -233,8 +233,13 @@ const TdsDropdown = class {
|
|
|
233
233
|
this.selectedOptions = [];
|
|
234
234
|
}
|
|
235
235
|
handleValueChange(newValue) {
|
|
236
|
+
console.log('---------------------------------');
|
|
237
|
+
console.log('handleValueChange', newValue);
|
|
236
238
|
// Normalize to array
|
|
237
239
|
const normalizedValue = this.normalizeValue(newValue);
|
|
240
|
+
console.log('normalizedValue', normalizedValue);
|
|
241
|
+
console.log('this.selectedOptions', this.selectedOptions);
|
|
242
|
+
console.log('this.value', this.value);
|
|
238
243
|
// Only update if actually changed
|
|
239
244
|
if (this.hasValueChanged(normalizedValue, this.selectedOptions)) {
|
|
240
245
|
console.log('IF statement');
|
|
@@ -483,9 +488,9 @@ const TdsDropdown = class {
|
|
|
483
488
|
}
|
|
484
489
|
render() {
|
|
485
490
|
appendHiddenInput(this.host, this.name, this.selectedOptions.join(','), this.disabled);
|
|
486
|
-
return (h(Host, { key: '
|
|
491
|
+
return (h(Host, { key: 'd6bcaaad392348e1715b764c221701d713f99822', class: {
|
|
487
492
|
[`tds-mode-variant-${this.modeVariant}`]: Boolean(this.modeVariant),
|
|
488
|
-
} }, this.label && this.labelPosition === 'outside' && (h("div", { key: '
|
|
493
|
+
} }, this.label && this.labelPosition === 'outside' && (h("div", { key: '30d60535f3e8e52867338981d9efd073360c987e', class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '71e975f4d0e776133f2d9402290ec6e162b3e524', class: {
|
|
489
494
|
'dropdown-select': true,
|
|
490
495
|
[this.size]: true,
|
|
491
496
|
'disabled': this.disabled,
|
|
@@ -535,7 +540,7 @@ const TdsDropdown = class {
|
|
|
535
540
|
label-inside-as-placeholder
|
|
536
541
|
${this.size}
|
|
537
542
|
${this.selectedOptions.length ? 'selected' : ''}
|
|
538
|
-
` }, 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: '
|
|
543
|
+
` }, 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: 'a45982b49140d0df067cbbd0a8a6f4e94277ebdc', role: "listbox", "aria-label": this.tdsAriaLabel, "aria-orientation": "vertical", "aria-multiselectable": this.multiselect, ref: (element) => {
|
|
539
544
|
this.dropdownList = element;
|
|
540
545
|
}, class: {
|
|
541
546
|
'dropdown-list': true,
|
|
@@ -546,11 +551,11 @@ const TdsDropdown = class {
|
|
|
546
551
|
'closed': !this.open,
|
|
547
552
|
[`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
|
|
548
553
|
[`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
|
|
549
|
-
} }, h("slot", { key: '
|
|
554
|
+
} }, h("slot", { key: 'bd6118fb958f58e04fe5e76a21b2f1d8d17d7d7c', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: 'f2154c03b00802c8d5c25660bbe96eab21edbe47', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: '574be347266e526d6e52996a60d5ea248e5ec916', class: {
|
|
550
555
|
helper: true,
|
|
551
556
|
error: this.error,
|
|
552
557
|
disabled: this.disabled,
|
|
553
|
-
} }, this.error && h("tds-icon", { key: '
|
|
558
|
+
} }, this.error && h("tds-icon", { key: '58422a9e510fdf76d7041fc91a46c678135ebfa9', name: "error", size: "16px" }), this.helper))));
|
|
554
559
|
}
|
|
555
560
|
get host() { return getElement(this); }
|
|
556
561
|
static get watchers() { return {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as o,h as s,H as e,g as i}from"./p-2049fab2.js";const d=t=>null==t?"":t.toString(),r=t=>t.map((t=>d(t))),l=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=>d(o.value)===d(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,e,i;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!==(i=null===(e=(s=this.host).getBoundingClientRect)||void 0===e?void 0:e.call(s).top)&&void 0!==i?i:0)+d+57>window.innerHeight?"up":"down"}return this.openDirection},this.handleToggleOpen=()=>{this.disabled||(this.open=!this.open,this.open&&this.focusInputElement())},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.value=""),this.tdsFocus.emit(t),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){console.log("---------------------------------"),console.log("handleValueChange",t);const o=this.normalizeValue(t);console.log("normalizedValue",o),console.log("this.selectedOptions",this.selectedOptions),console.log("this.value",this.value),this.hasValueChanged(o,this.selectedOptions)?(console.log("IF statement"),this.updateDropdownStateFromUser(o)):(console.log("ELSE statement"),this.updateDropdownStateFromUser(o))}normalizeValue(t){return null==t||""===t?[]:this.multiselect?Array.isArray(t)?r(t):t.toString().split(",").filter((t=>""!==t)):Array.isArray(t)?[d(t[0])]:[d(t)]}hasValueChanged(t,o){return t.length!==o.length||t.some((t=>!o.includes(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=>d(o.value)===d(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(d(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){let o;return o=Array.isArray(t)?r(t):[d(t)],this.updateDropdownStateFromUser(o),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(){this.focusInputElement(),this.handleFocus({})}async close(){this.open=!1}onAnyClick(t){this.open&&!t.composedPath().includes(this.host)&&(this.open=!1)}async onKeyDown(t){const{activeElement:o}=document;if(!o)return;const s=this.getChildren();if("ArrowDown"===t.key){const t=o.nextElementSibling?s.findIndex((t=>t===o.nextElementSibling)):0;s[((t,o)=>{if(void 0===t[o])return 0;for(let s=o;s<t.length;s++)if(!t[s].disabled)return s})(s,t)].focus()}else"ArrowUp"===t.key?s[((t,o)=>{if(void 0===t[o])return t.length-1;for(let s=o;s>=0;s--)if(!t[s].disabled)return s})(s,o.nextElementSibling?this.getChildren().findIndex((t=>t===o.previousElementSibling)):0)].focus():"Escape"===t.key&&(this.open=!1)}handleOpenState(){this.filter&&this.multiselect&&(this.open||(this.inputElement.value=this.selectedOptions.length?this.getValue():""))}handleDefaultValueChange(t){null!=t&&(this.internalDefaultValue=d(t),this.setDefaultOption())}componentWillLoad(){if(null==this.value){if(null!=this.defaultValue){const t=d(this.defaultValue),o=this.multiselect?t.split(",").map(d):[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)}disconnectedCallback(){const t=this.host.closest("form");t&&t.removeEventListener("reset",this.resetInput)}connectedCallback(){this.tdsAriaLabel||console.warn("Tegel Dropdown component: tdsAriaLabel prop is missing")}render(){return((t,o,s,e)=>{let i=t.querySelector("input");t.querySelector("input")||(i=t.ownerDocument.createElement("input"),i.type="hidden",t.appendChild(i)),i.disabled=e,i.name=o,i.value=s||""})(this.host,this.name,this.selectedOptions.join(","),this.disabled),s(e,{key:"d6bcaaad392348e1715b764c221701d713f99822",class:{[`tds-mode-variant-${this.modeVariant}`]:Boolean(this.modeVariant)}},this.label&&"outside"===this.labelPosition&&s("div",{key:"30d60535f3e8e52867338981d9efd073360c987e",class:"label-outside "+(this.disabled?"disabled":"")},this.label),s("div",{key:"71e975f4d0e776133f2d9402290ec6e162b3e524",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",{class:`label-inside ${this.size}`},this.label),this.label&&"inside"===this.labelPosition&&!this.placeholder&&s("div",{class:`\n label-inside-as-placeholder\n ${this.size}\n ${this.selectedOptions.length?"selected":""}\n `},this.label),s("input",{"aria-label":this.tdsAriaLabel,"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",{tabIndex: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-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",{class:`label-inside ${this.size}`},this.label),this.label&&"inside"===this.labelPosition&&!this.placeholder&&s("div",{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:"a45982b49140d0df067cbbd0a8a6f4e94277ebdc",role:"listbox","aria-label":this.tdsAriaLabel,"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:"bd6118fb958f58e04fe5e76a21b2f1d8d17d7d7c",onSlotchange:()=>this.handleSlotChange()}),0===this.filterResult&&""!==this.noResultText&&s("div",{key:"f2154c03b00802c8d5c25660bbe96eab21edbe47",class:`no-result ${this.size}`},this.noResultText)),this.helper&&s("div",{key:"574be347266e526d6e52996a60d5ea248e5ec916",class:{helper:!0,error:this.error,disabled:this.disabled}},this.error&&s("tds-icon",{key:"58422a9e510fdf76d7041fc91a46c678135ebfa9",name:"error",size:"16px"}),this.helper))}get host(){return i(this)}static get watchers(){return{value:["handleValueChange"],open:["handleOpenState"],defaultValue:["handleDefaultValueChange"]}}};l.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-color:var(--tds-dropdown-border-bottom-open)}:host button:focus::before{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background:var(--tds-dropdown-border-bottom-open)}:host button.error{border-bottom:1px solid var(--tds-negative)}:host button.error:focus{border-bottom-color:transparent}:host button.error:focus::before{content:"";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-negative)}:host button:disabled{color:var(--tds-dropdown-disabled-color);border-bottom:1px solid transparent}:host button .menu-icon{margin-right:0}: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 .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-color:transparent}:host .filter.focus::before{content:"";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-dropdown-border-bottom-open)}:host .filter.error{border-bottom:1px solid var(--tds-negative)}:host .filter.error.focus{border-bottom-color:transparent}:host .filter.error.focus::before{content:"";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-negative)}: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{transition:border-bottom-color var(--tds-motion-duration-fast-02) var(--tds-motion-easing-scania)}:host .dropdown-select button:focus{border-bottom-color:var(--tds-dropdown-border-bottom)}: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-negative)}: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-negative)}:host .helper.disabled{color:var(--tds-dropdown-disabled-color)}:host .dropdown-list{z-index:100;position:absolute;margin-top:1px;width:100%;transform-origin:top;box-shadow:rgba(0, 0, 0, 0.1) 0 2px 3px 0;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;box-shadow:rgba(0, 0, 0, 0.1) 0 -1px 3px 0;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 n=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.selected=!1,this.multiselect=!1,this.size="lg"}async setSelected(t){this.selected=t}valueWatcher(t){this.internalValue=d(t)}componentWillLoad(){this.internalValue=d(this.value)}render(){return s(e,{key:"74a589238e0aa9efbb7f0d04acf1327277182dd8"},s("div",{key:"0ae5f014516383833b2504c4dfe3c317e44d1ef9",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,class:{[this.size]:!0}},s("div",{slot:"label"},s("slot",null)))):s("button",{role:"option","aria-disabled":this.disabled,"aria-selected":this.selected,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 i(this)}static get watchers(){return{value:["valueWatcher"]}}};n.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-blue-400);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{background-color:var(--tds-dropdown-option-background-hover);cursor:pointer}:host .dropdown-option:hover.disabled{background-color:var(--tds-dropdown-option-background);cursor:not-allowed}:host([hidden]){display:none}";export{l as tds_dropdown,n as tds_dropdown_option}
|
package/dist/tegel/tegel.esm.js
CHANGED
|
@@ -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-1286da6a",[[1,"tds-header-launcher",{"tdsAriaLabel":[1,"tds-aria-label"],"open":[32],"buttonEl":[32],"hasListTypeMenu":[32]},[[8,"click","onAnyClick"],[8,"keydown","handleKeyDown"]]]]],["p-97e88e6e",[[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-918a3c1a",[[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-0bd4fd5c",[[1,"tds-header-hamburger",{"tdsAriaLabel":[1,"tds-aria-label"]}]]],["p-132c0d81",[[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]}]]],["p-6c8b40f7",[[1,"tds-header-brand-symbol"]]],["p-7ef50e7f",[[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-9858b0fe",[[1,"tds-side-menu-user",{"heading":[1],"subheading":[1],"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"]}]]],["p-8e9c6ef4",[[1,"tds-accordion-item",{"header":[1],"expandIconPosition":[1,"expand-icon-position"],"disabled":[4],"expanded":[4],"paddingReset":[4,"padding-reset"],"ariaLevelValue":[1,"aria-level-value"],"toggleAccordionItem":[64]}]]],["p-1120575b",[[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-710c42c5",[[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-1078b1b4",[[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],"helper":[1],"tdsAriaLabel":[1,"tds-aria-label"],"focusInput":[32],"reset":[64],"setValue":[64]},[[0,"focus","handleFocusIn"],[0,"focusout","handleFocusOut"]]]]],["p-87929060",[[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-4e8e7bcd",[[1,"tds-footer-group",{"titleText":[1,"title-text"],"tdsListAriaLabel":[1,"tds-list-aria-label"],"open":[32],"isMobile":[32]},[[9,"resize","handleResize"]]]]],["p-981e6232",[[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"],"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-3c348fcb",[[4,"tds-header-launcher-list"]]],["p-c163d44f",[[1,"tds-header-launcher-list-item"]]],["p-27777c26",[[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-c1b7d773",[[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-a56ad3d8",[[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],"initializeModal":[64],"cleanupModal":[64]},[[10,"keydown","handleFocusTrap"]]]]],["p-2446dfb6",[[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-7486e9f9",[[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"],"childRef":[32],"close":[64]}]]],["p-faa512fd",[[1,"tds-side-menu-close-button"]]],["p-2deba066",[[1,"tds-side-menu-collapse-button",{"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-05da560e",[[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-eff1d877",[[1,"tds-step",{"index":[1],"state":[1],"tdsAriaCurrent":[1,"tds-aria-current"],"hideLabels":[32],"size":[32],"orientation":[32],"labelPosition":[32]},[[16,"internalTdsPropsChange","handlePropsChange"]]]]],["p-1cda8fe6",[[1,"tds-table-body-input-wrapper",{"showIcon":[4,"show-icon"],"renderSlot":[32],"inputFocused":[32],"compactDesign":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-2fbf2fdb",[[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-9f187848",[[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-d515fcdb",[[1,"tds-table-header-input-wrapper",{"showIcon":[4,"show-icon"],"compactDesign":[4,"compact-design"],"renderSlot":[32],"inputFocused":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-2551fd5b",[[1,"tds-table-toolbar",{"tableTitle":[513,"table-title"],"filter":[516],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"whiteBackground":[32],"tableId":[32],"horizontalScrollWidth":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-135f2276",[[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-37e979b3",[[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-1978cb0d",[[1,"tds-accordion",{"modeVariant":[1,"mode-variant"],"hideLastBorder":[4,"hide-last-border"]}]]],["p-e102ca15",[[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-a10b3a4a",[[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-c5e50096",[[1,"tds-breadcrumb",{"current":[4]}]]],["p-618d6b4f",[[1,"tds-breadcrumbs",{"tdsAriaLabel":[1,"tds-aria-label"]}]]],["p-d38039b3",[[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"],"onlyIcon":[32]}]]],["p-dfe24bb1",[[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-54ac3ec2",[[1,"tds-folder-tab",{"disabled":[4],"selected":[32],"tabWidth":[32],"setTabWidth":[64],"setSelected":[64]}]]],["p-dfe4bb23",[[1,"tds-footer",{"modeVariant":[1,"mode-variant"]}]]],["p-0c421cde",[[1,"tds-footer-item"]]],["p-354d3986",[[4,"tds-header"]]],["p-4de2807c",[[1,"tds-header-dropdown-list-user",{"imgUrl":[1,"img-url"],"imgAlt":[1,"img-alt"],"header":[1],"subheader":[1]}]]],["p-ca32a270",[[4,"tds-header-launcher-grid",{"headingElement":[32]}]]],["p-6b675e89",[[1,"tds-header-launcher-grid-item"]]],["p-8a4837ae",[[4,"tds-header-launcher-grid-title"]]],["p-c23a3f12",[[4,"tds-header-launcher-list-title"]]],["p-646d1df4",[[1,"tds-header-title"]]],["p-27e64ae1",[[1,"tds-inline-tab",{"disabled":[4],"selected":[32],"setSelected":[64]}]]],["p-e88b2128",[[1,"tds-link",{"disabled":[4],"underline":[4],"standalone":[4]}]]],["p-33f1f60e",[[1,"tds-navigation-tab",{"disabled":[4],"selected":[32],"setSelected":[64]}]]],["p-2faeb483",[[1,"tds-popover-menu-item",{"disabled":[4]}]]],["p-0e5c6384",[[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"]}]]],["p-ccbafacd",[[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-b210d23c",[[1,"tds-side-menu-dropdown-list",{"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapsedSideMenuEventHandler"]]]]],["p-e5e9bd0c",[[1,"tds-side-menu-dropdown-list-item",{"selected":[4],"dropdownHasIcon":[32],"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-304f5a5c",[[1,"tds-side-menu-overlay"]]],["p-8f1aead7",[[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-08ad6a21",[[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-9ef67795",[[1,"tds-table-body-row-expandable",{"colSpan":[2,"col-span"],"rowId":[513,"row-id"],"expanded":[516],"overflow":[513],"autoCollapse":[4,"auto-collapse"],"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-4cafd755",[[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]}]]],["p-ab00e6e4",[[1,"tds-header-launcher-button",{"active":[4],"tdsAriaLabel":[1,"tds-aria-label"]}]]],["p-7f2228be",[[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-319e992d",[[1,"tds-divider",{"orientation":[1]}]]],["p-c0cbc9f5",[[1,"tds-header-dropdown-list",{"size":[513],"headingElement":[32]}]]],["p-58b928e5",[[1,"tds-header-dropdown-list-item",{"selected":[4],"size":[513]}]]],["p-d6d8cb7f",[[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]},[[4,"reset","handleFormReset"]],{"indeterminate":["handleIndeterminateState"]}]]],["p-342e182c",[[17,"tds-dropdown-option",{"value":[8],"disabled":[4],"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],"appendValue":[64]},[[9,"mousedown","onAnyClick"],[0,"keydown","onKeyDown"]],{"value":["handleValueChange"],"open":["handleOpenState"],"defaultValue":["handleDefaultValueChange"]}]]],["p-8afeb375",[[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-286f470e",[[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-5c8fd75e",[[1,"tds-side-menu-user-image",{"src":[1],"alt":[1]}],[1,"tds-side-menu-user-label",{"heading":[1],"subheading":[1]}]]],["p-003184ea",[[1,"tds-side-menu-item",{"selected":[4],"active":[4],"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-4241afd6",[[1,"tds-header-item",{"active":[4],"selected":[4]}],[1,"tds-core-header-item"]]],["p-0e37277e",[[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-1286da6a",[[1,"tds-header-launcher",{"tdsAriaLabel":[1,"tds-aria-label"],"open":[32],"buttonEl":[32],"hasListTypeMenu":[32]},[[8,"click","onAnyClick"],[8,"keydown","handleKeyDown"]]]]],["p-97e88e6e",[[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-918a3c1a",[[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-0bd4fd5c",[[1,"tds-header-hamburger",{"tdsAriaLabel":[1,"tds-aria-label"]}]]],["p-132c0d81",[[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]}]]],["p-6c8b40f7",[[1,"tds-header-brand-symbol"]]],["p-7ef50e7f",[[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-9858b0fe",[[1,"tds-side-menu-user",{"heading":[1],"subheading":[1],"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"]}]]],["p-8e9c6ef4",[[1,"tds-accordion-item",{"header":[1],"expandIconPosition":[1,"expand-icon-position"],"disabled":[4],"expanded":[4],"paddingReset":[4,"padding-reset"],"ariaLevelValue":[1,"aria-level-value"],"toggleAccordionItem":[64]}]]],["p-1120575b",[[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-710c42c5",[[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-1078b1b4",[[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],"helper":[1],"tdsAriaLabel":[1,"tds-aria-label"],"focusInput":[32],"reset":[64],"setValue":[64]},[[0,"focus","handleFocusIn"],[0,"focusout","handleFocusOut"]]]]],["p-87929060",[[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-4e8e7bcd",[[1,"tds-footer-group",{"titleText":[1,"title-text"],"tdsListAriaLabel":[1,"tds-list-aria-label"],"open":[32],"isMobile":[32]},[[9,"resize","handleResize"]]]]],["p-981e6232",[[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"],"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-3c348fcb",[[4,"tds-header-launcher-list"]]],["p-c163d44f",[[1,"tds-header-launcher-list-item"]]],["p-27777c26",[[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-c1b7d773",[[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-a56ad3d8",[[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],"initializeModal":[64],"cleanupModal":[64]},[[10,"keydown","handleFocusTrap"]]]]],["p-2446dfb6",[[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-7486e9f9",[[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"],"childRef":[32],"close":[64]}]]],["p-faa512fd",[[1,"tds-side-menu-close-button"]]],["p-2deba066",[[1,"tds-side-menu-collapse-button",{"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-05da560e",[[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-eff1d877",[[1,"tds-step",{"index":[1],"state":[1],"tdsAriaCurrent":[1,"tds-aria-current"],"hideLabels":[32],"size":[32],"orientation":[32],"labelPosition":[32]},[[16,"internalTdsPropsChange","handlePropsChange"]]]]],["p-1cda8fe6",[[1,"tds-table-body-input-wrapper",{"showIcon":[4,"show-icon"],"renderSlot":[32],"inputFocused":[32],"compactDesign":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-2fbf2fdb",[[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-9f187848",[[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-d515fcdb",[[1,"tds-table-header-input-wrapper",{"showIcon":[4,"show-icon"],"compactDesign":[4,"compact-design"],"renderSlot":[32],"inputFocused":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-2551fd5b",[[1,"tds-table-toolbar",{"tableTitle":[513,"table-title"],"filter":[516],"verticalDividers":[32],"compactDesign":[32],"noMinWidth":[32],"whiteBackground":[32],"tableId":[32],"horizontalScrollWidth":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-135f2276",[[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-37e979b3",[[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-1978cb0d",[[1,"tds-accordion",{"modeVariant":[1,"mode-variant"],"hideLastBorder":[4,"hide-last-border"]}]]],["p-e102ca15",[[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-a10b3a4a",[[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-c5e50096",[[1,"tds-breadcrumb",{"current":[4]}]]],["p-618d6b4f",[[1,"tds-breadcrumbs",{"tdsAriaLabel":[1,"tds-aria-label"]}]]],["p-d38039b3",[[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"],"onlyIcon":[32]}]]],["p-dfe24bb1",[[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-54ac3ec2",[[1,"tds-folder-tab",{"disabled":[4],"selected":[32],"tabWidth":[32],"setTabWidth":[64],"setSelected":[64]}]]],["p-dfe4bb23",[[1,"tds-footer",{"modeVariant":[1,"mode-variant"]}]]],["p-0c421cde",[[1,"tds-footer-item"]]],["p-354d3986",[[4,"tds-header"]]],["p-4de2807c",[[1,"tds-header-dropdown-list-user",{"imgUrl":[1,"img-url"],"imgAlt":[1,"img-alt"],"header":[1],"subheader":[1]}]]],["p-ca32a270",[[4,"tds-header-launcher-grid",{"headingElement":[32]}]]],["p-6b675e89",[[1,"tds-header-launcher-grid-item"]]],["p-8a4837ae",[[4,"tds-header-launcher-grid-title"]]],["p-c23a3f12",[[4,"tds-header-launcher-list-title"]]],["p-646d1df4",[[1,"tds-header-title"]]],["p-27e64ae1",[[1,"tds-inline-tab",{"disabled":[4],"selected":[32],"setSelected":[64]}]]],["p-e88b2128",[[1,"tds-link",{"disabled":[4],"underline":[4],"standalone":[4]}]]],["p-33f1f60e",[[1,"tds-navigation-tab",{"disabled":[4],"selected":[32],"setSelected":[64]}]]],["p-2faeb483",[[1,"tds-popover-menu-item",{"disabled":[4]}]]],["p-0e5c6384",[[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"]}]]],["p-ccbafacd",[[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-b210d23c",[[1,"tds-side-menu-dropdown-list",{"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapsedSideMenuEventHandler"]]]]],["p-e5e9bd0c",[[1,"tds-side-menu-dropdown-list-item",{"selected":[4],"dropdownHasIcon":[32],"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-304f5a5c",[[1,"tds-side-menu-overlay"]]],["p-8f1aead7",[[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-08ad6a21",[[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-9ef67795",[[1,"tds-table-body-row-expandable",{"colSpan":[2,"col-span"],"rowId":[513,"row-id"],"expanded":[516],"overflow":[513],"autoCollapse":[4,"auto-collapse"],"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-4cafd755",[[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]}]]],["p-ab00e6e4",[[1,"tds-header-launcher-button",{"active":[4],"tdsAriaLabel":[1,"tds-aria-label"]}]]],["p-7f2228be",[[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-319e992d",[[1,"tds-divider",{"orientation":[1]}]]],["p-c0cbc9f5",[[1,"tds-header-dropdown-list",{"size":[513],"headingElement":[32]}]]],["p-58b928e5",[[1,"tds-header-dropdown-list-item",{"selected":[4],"size":[513]}]]],["p-d6d8cb7f",[[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]},[[4,"reset","handleFormReset"]],{"indeterminate":["handleIndeterminateState"]}]]],["p-07ee8ec0",[[17,"tds-dropdown-option",{"value":[8],"disabled":[4],"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],"appendValue":[64]},[[9,"mousedown","onAnyClick"],[0,"keydown","onKeyDown"]],{"value":["handleValueChange"],"open":["handleOpenState"],"defaultValue":["handleDefaultValueChange"]}]]],["p-8afeb375",[[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-286f470e",[[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-5c8fd75e",[[1,"tds-side-menu-user-image",{"src":[1],"alt":[1]}],[1,"tds-side-menu-user-label",{"heading":[1],"subheading":[1]}]]],["p-003184ea",[[1,"tds-side-menu-item",{"selected":[4],"active":[4],"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-4241afd6",[[1,"tds-header-item",{"active":[4],"selected":[4]}],[1,"tds-core-header-item"]]],["p-0e37277e",[[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 +0,0 @@
|
|
|
1
|
-
import{r as t,c as o,h as s,H as e,g as i}from"./p-2049fab2.js";const d=t=>null==t?"":t.toString(),r=t=>t.map((t=>d(t))),l=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=>d(o.value)===d(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,e,i;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!==(i=null===(e=(s=this.host).getBoundingClientRect)||void 0===e?void 0:e.call(s).top)&&void 0!==i?i:0)+d+57>window.innerHeight?"up":"down"}return this.openDirection},this.handleToggleOpen=()=>{this.disabled||(this.open=!this.open,this.open&&this.focusInputElement())},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.value=""),this.tdsFocus.emit(t),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);this.hasValueChanged(o,this.selectedOptions)?(console.log("IF statement"),this.updateDropdownStateFromUser(o)):(console.log("ELSE statement"),this.updateDropdownStateFromUser(o))}normalizeValue(t){return null==t||""===t?[]:this.multiselect?Array.isArray(t)?r(t):t.toString().split(",").filter((t=>""!==t)):Array.isArray(t)?[d(t[0])]:[d(t)]}hasValueChanged(t,o){return t.length!==o.length||t.some((t=>!o.includes(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=>d(o.value)===d(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(d(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){let o;return o=Array.isArray(t)?r(t):[d(t)],this.updateDropdownStateFromUser(o),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(){this.focusInputElement(),this.handleFocus({})}async close(){this.open=!1}onAnyClick(t){this.open&&!t.composedPath().includes(this.host)&&(this.open=!1)}async onKeyDown(t){const{activeElement:o}=document;if(!o)return;const s=this.getChildren();if("ArrowDown"===t.key){const t=o.nextElementSibling?s.findIndex((t=>t===o.nextElementSibling)):0;s[((t,o)=>{if(void 0===t[o])return 0;for(let s=o;s<t.length;s++)if(!t[s].disabled)return s})(s,t)].focus()}else"ArrowUp"===t.key?s[((t,o)=>{if(void 0===t[o])return t.length-1;for(let s=o;s>=0;s--)if(!t[s].disabled)return s})(s,o.nextElementSibling?this.getChildren().findIndex((t=>t===o.previousElementSibling)):0)].focus():"Escape"===t.key&&(this.open=!1)}handleOpenState(){this.filter&&this.multiselect&&(this.open||(this.inputElement.value=this.selectedOptions.length?this.getValue():""))}handleDefaultValueChange(t){null!=t&&(this.internalDefaultValue=d(t),this.setDefaultOption())}componentWillLoad(){if(null==this.value){if(null!=this.defaultValue){const t=d(this.defaultValue),o=this.multiselect?t.split(",").map(d):[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)}disconnectedCallback(){const t=this.host.closest("form");t&&t.removeEventListener("reset",this.resetInput)}connectedCallback(){this.tdsAriaLabel||console.warn("Tegel Dropdown component: tdsAriaLabel prop is missing")}render(){return((t,o,s,e)=>{let i=t.querySelector("input");t.querySelector("input")||(i=t.ownerDocument.createElement("input"),i.type="hidden",t.appendChild(i)),i.disabled=e,i.name=o,i.value=s||""})(this.host,this.name,this.selectedOptions.join(","),this.disabled),s(e,{key:"7ee79daed49179d9387a1b281aff1cc4a97403f0",class:{[`tds-mode-variant-${this.modeVariant}`]:Boolean(this.modeVariant)}},this.label&&"outside"===this.labelPosition&&s("div",{key:"35da58ed409a467fd0441f0133157a3c254b9157",class:"label-outside "+(this.disabled?"disabled":"")},this.label),s("div",{key:"f6e9d260856703f7bc31422a633dd4b0c197f5d8",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",{class:`label-inside ${this.size}`},this.label),this.label&&"inside"===this.labelPosition&&!this.placeholder&&s("div",{class:`\n label-inside-as-placeholder\n ${this.size}\n ${this.selectedOptions.length?"selected":""}\n `},this.label),s("input",{"aria-label":this.tdsAriaLabel,"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",{tabIndex: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-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",{class:`label-inside ${this.size}`},this.label),this.label&&"inside"===this.labelPosition&&!this.placeholder&&s("div",{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:"01ad0f7fef4a64f277947782212a433bc790b8d0",role:"listbox","aria-label":this.tdsAriaLabel,"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:"3312056b97b92a8ca5778c174008893d4903e942",onSlotchange:()=>this.handleSlotChange()}),0===this.filterResult&&""!==this.noResultText&&s("div",{key:"b9eeb81328b52d6219800373d6ab2bfaf6c8ca54",class:`no-result ${this.size}`},this.noResultText)),this.helper&&s("div",{key:"0a6b887423a986032c17150c2d88b215560a715e",class:{helper:!0,error:this.error,disabled:this.disabled}},this.error&&s("tds-icon",{key:"c83cfc2dae4227c69b9a87caaa5412f54581d145",name:"error",size:"16px"}),this.helper))}get host(){return i(this)}static get watchers(){return{value:["handleValueChange"],open:["handleOpenState"],defaultValue:["handleDefaultValueChange"]}}};l.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-color:var(--tds-dropdown-border-bottom-open)}:host button:focus::before{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background:var(--tds-dropdown-border-bottom-open)}:host button.error{border-bottom:1px solid var(--tds-negative)}:host button.error:focus{border-bottom-color:transparent}:host button.error:focus::before{content:"";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-negative)}:host button:disabled{color:var(--tds-dropdown-disabled-color);border-bottom:1px solid transparent}:host button .menu-icon{margin-right:0}: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 .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-color:transparent}:host .filter.focus::before{content:"";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-dropdown-border-bottom-open)}:host .filter.error{border-bottom:1px solid var(--tds-negative)}:host .filter.error.focus{border-bottom-color:transparent}:host .filter.error.focus::before{content:"";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-negative)}: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{transition:border-bottom-color var(--tds-motion-duration-fast-02) var(--tds-motion-easing-scania)}:host .dropdown-select button:focus{border-bottom-color:var(--tds-dropdown-border-bottom)}: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-negative)}: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-negative)}:host .helper.disabled{color:var(--tds-dropdown-disabled-color)}:host .dropdown-list{z-index:100;position:absolute;margin-top:1px;width:100%;transform-origin:top;box-shadow:rgba(0, 0, 0, 0.1) 0 2px 3px 0;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;box-shadow:rgba(0, 0, 0, 0.1) 0 -1px 3px 0;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 n=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.selected=!1,this.multiselect=!1,this.size="lg"}async setSelected(t){this.selected=t}valueWatcher(t){this.internalValue=d(t)}componentWillLoad(){this.internalValue=d(this.value)}render(){return s(e,{key:"74a589238e0aa9efbb7f0d04acf1327277182dd8"},s("div",{key:"0ae5f014516383833b2504c4dfe3c317e44d1ef9",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,class:{[this.size]:!0}},s("div",{slot:"label"},s("slot",null)))):s("button",{role:"option","aria-disabled":this.disabled,"aria-selected":this.selected,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 i(this)}static get watchers(){return{value:["valueWatcher"]}}};n.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-blue-400);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{background-color:var(--tds-dropdown-option-background-hover);cursor:pointer}:host .dropdown-option:hover.disabled{background-color:var(--tds-dropdown-option-background);cursor:not-allowed}:host([hidden]){display:none}";export{l as tds_dropdown,n as tds_dropdown_option}
|