@scania/tegel 1.22.0-feat-dropdown-allow-numbers-testing-beta.0 → 1.22.0-feat-dropdown-allow-numbers-testing-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/tds-dropdown_2.cjs.entry.js +35 -5
- package/dist/collection/components/dropdown/dropdown.js +37 -7
- package/dist/components/{p-4449e91e.js → p-96b91aeb.js} +35 -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 +35 -5
- package/dist/tegel/p-367b181b.entry.js +1 -0
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/types/components/dropdown/dropdown.d.ts +1 -1
- package/dist/types/components.d.ts +2 -2
- package/package.json +1 -1
- package/dist/tegel/p-e1df12b3.entry.js +0 -1
|
@@ -212,7 +212,8 @@ const TdsDropdown = class {
|
|
|
212
212
|
var _a, _b;
|
|
213
213
|
this.tdsChange.emit({
|
|
214
214
|
name: this.name,
|
|
215
|
-
value:
|
|
215
|
+
// value: this.value?.map((value) => value).toString() ?? null,
|
|
216
|
+
value: (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value)) !== null && _b !== void 0 ? _b : null,
|
|
216
217
|
});
|
|
217
218
|
};
|
|
218
219
|
this.name = undefined;
|
|
@@ -265,24 +266,53 @@ const TdsDropdown = class {
|
|
|
265
266
|
// @ts-ignore
|
|
266
267
|
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
|
|
267
268
|
async setValue(value, label) {
|
|
269
|
+
console.log('inside setValue');
|
|
270
|
+
// if (value === '10') {
|
|
271
|
+
// console.log('value is 10, for debugging purposes we will change it to a number');
|
|
272
|
+
// value = 10;
|
|
273
|
+
// }
|
|
274
|
+
console.log('value', value);
|
|
275
|
+
console.log('typeof value', typeof value);
|
|
268
276
|
let nextValue;
|
|
269
277
|
if (typeof value === 'string' || typeof value === 'number')
|
|
270
278
|
nextValue = [value];
|
|
271
279
|
else
|
|
272
280
|
nextValue = value;
|
|
281
|
+
console.log('nextValue', nextValue);
|
|
282
|
+
console.log('typeof nextValue', typeof nextValue);
|
|
273
283
|
if (!this.multiselect && nextValue.length > 1) {
|
|
274
284
|
console.warn('Tried to select multiple items, but multiselect is not enabled.');
|
|
275
285
|
nextValue = [nextValue[0]];
|
|
276
286
|
}
|
|
277
287
|
nextValue = [...new Set(nextValue)];
|
|
288
|
+
console.log('in the middle, nextValue is', nextValue);
|
|
278
289
|
this.internalReset();
|
|
290
|
+
console.log('a ____ nextValue', nextValue);
|
|
291
|
+
console.log('a __________________________________');
|
|
279
292
|
for (let i = 0; i < nextValue.length; i++) {
|
|
280
|
-
|
|
293
|
+
console.log('i=', i);
|
|
294
|
+
console.log('nextValue[i]=', nextValue[i]);
|
|
295
|
+
console.log('this.getChildren()', this.getChildren());
|
|
296
|
+
this.getChildren().forEach((element) => {
|
|
297
|
+
console.log('... ', element.value, typeof element.value);
|
|
298
|
+
});
|
|
299
|
+
const optionExist = this.getChildren().some((element) => {
|
|
300
|
+
console.log('element.value', element.value, typeof element.value);
|
|
301
|
+
return element.value === nextValue[i];
|
|
302
|
+
});
|
|
303
|
+
console.log('optionExist', optionExist);
|
|
281
304
|
if (!optionExist) {
|
|
282
305
|
nextValue.splice(i, 1);
|
|
283
306
|
}
|
|
307
|
+
console.log('---------------');
|
|
284
308
|
}
|
|
309
|
+
console.log('b __________________________________');
|
|
310
|
+
console.log('b ____ nextValue', nextValue);
|
|
311
|
+
console.log('this.value', this.value);
|
|
312
|
+
console.log('at the end of setValue, nextValue is', nextValue);
|
|
285
313
|
this.value = nextValue;
|
|
314
|
+
console.log('this.value is updated now');
|
|
315
|
+
console.log('this.value', this.value);
|
|
286
316
|
this.setValueAttribute();
|
|
287
317
|
this.selectChildrenAsSelectedBasedOnSelectionProp();
|
|
288
318
|
this.handleChange();
|
|
@@ -422,7 +452,7 @@ const TdsDropdown = class {
|
|
|
422
452
|
render() {
|
|
423
453
|
var _a, _b, _c, _d;
|
|
424
454
|
appendHiddenInput(this.host, this.name, (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value).toString(), this.disabled);
|
|
425
|
-
return (index.h(index.Host, { key: '
|
|
455
|
+
return (index.h(index.Host, { key: '52ccd98c3606dd19f2b32792a280dbe8b015b968', role: "select", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, this.label && this.labelPosition === 'outside' && (index.h("div", { key: '0f9495857f58980019a7dcfefc4960e77f48a975', class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), index.h("div", { key: '4e6cfba13885a93250153e1989197d3beeaf3e31', class: `dropdown-select ${this.size} ${this.disabled ? 'disabled' : ''}` }, this.filter ? (index.h("div", { class: {
|
|
426
456
|
filter: true,
|
|
427
457
|
focus: this.filterFocus,
|
|
428
458
|
disabled: this.disabled,
|
|
@@ -472,7 +502,7 @@ const TdsDropdown = class {
|
|
|
472
502
|
label-inside-as-placeholder
|
|
473
503
|
${this.size}
|
|
474
504
|
${((_c = this.value) === null || _c === void 0 ? void 0 : _c.length) ? 'selected' : ''}
|
|
475
|
-
` }, this.label)), index.h("div", { class: `placeholder ${this.size}` }, ((_d = this.value) === null || _d === void 0 ? void 0 : _d.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: '
|
|
505
|
+
` }, this.label)), index.h("div", { class: `placeholder ${this.size}` }, ((_d = this.value) === null || _d === void 0 ? void 0 : _d.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: '387d1107d50121dc5bf3be6cf8ed90239c149c1d', ref: (element) => (this.dropdownList = element), class: {
|
|
476
506
|
'dropdown-list': true,
|
|
477
507
|
[this.size]: true,
|
|
478
508
|
[this.getOpenDirection()]: true,
|
|
@@ -481,7 +511,7 @@ const TdsDropdown = class {
|
|
|
481
511
|
'closed': !this.open,
|
|
482
512
|
[`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
|
|
483
513
|
[`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
|
|
484
|
-
} }, index.h("slot", { key: '
|
|
514
|
+
} }, index.h("slot", { key: '3fda40ff091612c41866b5e68affe4cfb47bc474', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (index.h("div", { key: 'e0964aa330b2743c0baa8661a21c30718298eebc', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (index.h("div", { key: '65103d52603300f5c1f50f054f74ffe4a2769f64', class: `helper ${this.error ? 'error' : ''} ${this.disabled ? 'disabled' : ''}` }, this.error && index.h("tds-icon", { key: '67a4727755ec5f0b8444f8837dccda7bf339c69d', name: "error", size: "16px" }), this.helper))));
|
|
485
515
|
}
|
|
486
516
|
get host() { return index.getElement(this); }
|
|
487
517
|
static get watchers() { return {
|
|
@@ -147,7 +147,8 @@ export class TdsDropdown {
|
|
|
147
147
|
var _a, _b;
|
|
148
148
|
this.tdsChange.emit({
|
|
149
149
|
name: this.name,
|
|
150
|
-
value:
|
|
150
|
+
// value: this.value?.map((value) => value).toString() ?? null,
|
|
151
|
+
value: (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value)) !== null && _b !== void 0 ? _b : null,
|
|
151
152
|
});
|
|
152
153
|
};
|
|
153
154
|
this.name = undefined;
|
|
@@ -200,24 +201,53 @@ export class TdsDropdown {
|
|
|
200
201
|
// @ts-ignore
|
|
201
202
|
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
|
|
202
203
|
async setValue(value, label) {
|
|
204
|
+
console.log('inside setValue');
|
|
205
|
+
// if (value === '10') {
|
|
206
|
+
// console.log('value is 10, for debugging purposes we will change it to a number');
|
|
207
|
+
// value = 10;
|
|
208
|
+
// }
|
|
209
|
+
console.log('value', value);
|
|
210
|
+
console.log('typeof value', typeof value);
|
|
203
211
|
let nextValue;
|
|
204
212
|
if (typeof value === 'string' || typeof value === 'number')
|
|
205
213
|
nextValue = [value];
|
|
206
214
|
else
|
|
207
215
|
nextValue = value;
|
|
216
|
+
console.log('nextValue', nextValue);
|
|
217
|
+
console.log('typeof nextValue', typeof nextValue);
|
|
208
218
|
if (!this.multiselect && nextValue.length > 1) {
|
|
209
219
|
console.warn('Tried to select multiple items, but multiselect is not enabled.');
|
|
210
220
|
nextValue = [nextValue[0]];
|
|
211
221
|
}
|
|
212
222
|
nextValue = [...new Set(nextValue)];
|
|
223
|
+
console.log('in the middle, nextValue is', nextValue);
|
|
213
224
|
this.internalReset();
|
|
225
|
+
console.log('a ____ nextValue', nextValue);
|
|
226
|
+
console.log('a __________________________________');
|
|
214
227
|
for (let i = 0; i < nextValue.length; i++) {
|
|
215
|
-
|
|
228
|
+
console.log('i=', i);
|
|
229
|
+
console.log('nextValue[i]=', nextValue[i]);
|
|
230
|
+
console.log('this.getChildren()', this.getChildren());
|
|
231
|
+
this.getChildren().forEach((element) => {
|
|
232
|
+
console.log('... ', element.value, typeof element.value);
|
|
233
|
+
});
|
|
234
|
+
const optionExist = this.getChildren().some((element) => {
|
|
235
|
+
console.log('element.value', element.value, typeof element.value);
|
|
236
|
+
return element.value === nextValue[i];
|
|
237
|
+
});
|
|
238
|
+
console.log('optionExist', optionExist);
|
|
216
239
|
if (!optionExist) {
|
|
217
240
|
nextValue.splice(i, 1);
|
|
218
241
|
}
|
|
242
|
+
console.log('---------------');
|
|
219
243
|
}
|
|
244
|
+
console.log('b __________________________________');
|
|
245
|
+
console.log('b ____ nextValue', nextValue);
|
|
246
|
+
console.log('this.value', this.value);
|
|
247
|
+
console.log('at the end of setValue, nextValue is', nextValue);
|
|
220
248
|
this.value = nextValue;
|
|
249
|
+
console.log('this.value is updated now');
|
|
250
|
+
console.log('this.value', this.value);
|
|
221
251
|
this.setValueAttribute();
|
|
222
252
|
this.selectChildrenAsSelectedBasedOnSelectionProp();
|
|
223
253
|
this.handleChange();
|
|
@@ -357,7 +387,7 @@ export class TdsDropdown {
|
|
|
357
387
|
render() {
|
|
358
388
|
var _a, _b, _c, _d;
|
|
359
389
|
appendHiddenInput(this.host, this.name, (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value).toString(), this.disabled);
|
|
360
|
-
return (h(Host, { key: '
|
|
390
|
+
return (h(Host, { key: '52ccd98c3606dd19f2b32792a280dbe8b015b968', role: "select", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, this.label && this.labelPosition === 'outside' && (h("div", { key: '0f9495857f58980019a7dcfefc4960e77f48a975', class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '4e6cfba13885a93250153e1989197d3beeaf3e31', class: `dropdown-select ${this.size} ${this.disabled ? 'disabled' : ''}` }, this.filter ? (h("div", { class: {
|
|
361
391
|
filter: true,
|
|
362
392
|
focus: this.filterFocus,
|
|
363
393
|
disabled: this.disabled,
|
|
@@ -407,7 +437,7 @@ export class TdsDropdown {
|
|
|
407
437
|
label-inside-as-placeholder
|
|
408
438
|
${this.size}
|
|
409
439
|
${((_c = this.value) === null || _c === void 0 ? void 0 : _c.length) ? 'selected' : ''}
|
|
410
|
-
` }, this.label)), h("div", { class: `placeholder ${this.size}` }, ((_d = this.value) === null || _d === void 0 ? void 0 : _d.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: '
|
|
440
|
+
` }, this.label)), h("div", { class: `placeholder ${this.size}` }, ((_d = this.value) === null || _d === void 0 ? void 0 : _d.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: '387d1107d50121dc5bf3be6cf8ed90239c149c1d', ref: (element) => (this.dropdownList = element), class: {
|
|
411
441
|
'dropdown-list': true,
|
|
412
442
|
[this.size]: true,
|
|
413
443
|
[this.getOpenDirection()]: true,
|
|
@@ -416,7 +446,7 @@ export class TdsDropdown {
|
|
|
416
446
|
'closed': !this.open,
|
|
417
447
|
[`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
|
|
418
448
|
[`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
|
|
419
|
-
} }, h("slot", { key: '
|
|
449
|
+
} }, h("slot", { key: '3fda40ff091612c41866b5e68affe4cfb47bc474', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: 'e0964aa330b2743c0baa8661a21c30718298eebc', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: '65103d52603300f5c1f50f054f74ffe4a2769f64', class: `helper ${this.error ? 'error' : ''} ${this.disabled ? 'disabled' : ''}` }, this.error && h("tds-icon", { key: '67a4727755ec5f0b8444f8837dccda7bf339c69d', name: "error", size: "16px" }), this.helper))));
|
|
420
450
|
}
|
|
421
451
|
static get is() { return "tds-dropdown"; }
|
|
422
452
|
static get encapsulation() { return "shadow"; }
|
|
@@ -736,8 +766,8 @@ export class TdsDropdown {
|
|
|
736
766
|
"text": "Change event for the Dropdown."
|
|
737
767
|
},
|
|
738
768
|
"complexType": {
|
|
739
|
-
"original": "{\n name: string;\n value: string;\n }",
|
|
740
|
-
"resolved": "{ name: string; value: string; }",
|
|
769
|
+
"original": "{\n name: string;\n value: string | number;\n }",
|
|
770
|
+
"resolved": "{ name: string; value: string | number; }",
|
|
741
771
|
"references": {}
|
|
742
772
|
}
|
|
743
773
|
}, {
|
|
@@ -211,7 +211,8 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
211
211
|
var _a, _b;
|
|
212
212
|
this.tdsChange.emit({
|
|
213
213
|
name: this.name,
|
|
214
|
-
value:
|
|
214
|
+
// value: this.value?.map((value) => value).toString() ?? null,
|
|
215
|
+
value: (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value)) !== null && _b !== void 0 ? _b : null,
|
|
215
216
|
});
|
|
216
217
|
};
|
|
217
218
|
this.name = undefined;
|
|
@@ -264,24 +265,53 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
264
265
|
// @ts-ignore
|
|
265
266
|
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
|
|
266
267
|
async setValue(value, label) {
|
|
268
|
+
console.log('inside setValue');
|
|
269
|
+
// if (value === '10') {
|
|
270
|
+
// console.log('value is 10, for debugging purposes we will change it to a number');
|
|
271
|
+
// value = 10;
|
|
272
|
+
// }
|
|
273
|
+
console.log('value', value);
|
|
274
|
+
console.log('typeof value', typeof value);
|
|
267
275
|
let nextValue;
|
|
268
276
|
if (typeof value === 'string' || typeof value === 'number')
|
|
269
277
|
nextValue = [value];
|
|
270
278
|
else
|
|
271
279
|
nextValue = value;
|
|
280
|
+
console.log('nextValue', nextValue);
|
|
281
|
+
console.log('typeof nextValue', typeof nextValue);
|
|
272
282
|
if (!this.multiselect && nextValue.length > 1) {
|
|
273
283
|
console.warn('Tried to select multiple items, but multiselect is not enabled.');
|
|
274
284
|
nextValue = [nextValue[0]];
|
|
275
285
|
}
|
|
276
286
|
nextValue = [...new Set(nextValue)];
|
|
287
|
+
console.log('in the middle, nextValue is', nextValue);
|
|
277
288
|
this.internalReset();
|
|
289
|
+
console.log('a ____ nextValue', nextValue);
|
|
290
|
+
console.log('a __________________________________');
|
|
278
291
|
for (let i = 0; i < nextValue.length; i++) {
|
|
279
|
-
|
|
292
|
+
console.log('i=', i);
|
|
293
|
+
console.log('nextValue[i]=', nextValue[i]);
|
|
294
|
+
console.log('this.getChildren()', this.getChildren());
|
|
295
|
+
this.getChildren().forEach((element) => {
|
|
296
|
+
console.log('... ', element.value, typeof element.value);
|
|
297
|
+
});
|
|
298
|
+
const optionExist = this.getChildren().some((element) => {
|
|
299
|
+
console.log('element.value', element.value, typeof element.value);
|
|
300
|
+
return element.value === nextValue[i];
|
|
301
|
+
});
|
|
302
|
+
console.log('optionExist', optionExist);
|
|
280
303
|
if (!optionExist) {
|
|
281
304
|
nextValue.splice(i, 1);
|
|
282
305
|
}
|
|
306
|
+
console.log('---------------');
|
|
283
307
|
}
|
|
308
|
+
console.log('b __________________________________');
|
|
309
|
+
console.log('b ____ nextValue', nextValue);
|
|
310
|
+
console.log('this.value', this.value);
|
|
311
|
+
console.log('at the end of setValue, nextValue is', nextValue);
|
|
284
312
|
this.value = nextValue;
|
|
313
|
+
console.log('this.value is updated now');
|
|
314
|
+
console.log('this.value', this.value);
|
|
285
315
|
this.setValueAttribute();
|
|
286
316
|
this.selectChildrenAsSelectedBasedOnSelectionProp();
|
|
287
317
|
this.handleChange();
|
|
@@ -421,7 +451,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
421
451
|
render() {
|
|
422
452
|
var _a, _b, _c, _d;
|
|
423
453
|
appendHiddenInput(this.host, this.name, (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value).toString(), this.disabled);
|
|
424
|
-
return (h(Host, { key: '
|
|
454
|
+
return (h(Host, { key: '52ccd98c3606dd19f2b32792a280dbe8b015b968', role: "select", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, this.label && this.labelPosition === 'outside' && (h("div", { key: '0f9495857f58980019a7dcfefc4960e77f48a975', class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '4e6cfba13885a93250153e1989197d3beeaf3e31', class: `dropdown-select ${this.size} ${this.disabled ? 'disabled' : ''}` }, this.filter ? (h("div", { class: {
|
|
425
455
|
filter: true,
|
|
426
456
|
focus: this.filterFocus,
|
|
427
457
|
disabled: this.disabled,
|
|
@@ -471,7 +501,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
471
501
|
label-inside-as-placeholder
|
|
472
502
|
${this.size}
|
|
473
503
|
${((_c = this.value) === null || _c === void 0 ? void 0 : _c.length) ? 'selected' : ''}
|
|
474
|
-
` }, this.label)), h("div", { class: `placeholder ${this.size}` }, ((_d = this.value) === null || _d === void 0 ? void 0 : _d.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: '
|
|
504
|
+
` }, this.label)), h("div", { class: `placeholder ${this.size}` }, ((_d = this.value) === null || _d === void 0 ? void 0 : _d.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: '387d1107d50121dc5bf3be6cf8ed90239c149c1d', ref: (element) => (this.dropdownList = element), class: {
|
|
475
505
|
'dropdown-list': true,
|
|
476
506
|
[this.size]: true,
|
|
477
507
|
[this.getOpenDirection()]: true,
|
|
@@ -480,7 +510,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
|
|
|
480
510
|
'closed': !this.open,
|
|
481
511
|
[`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
|
|
482
512
|
[`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
|
|
483
|
-
} }, h("slot", { key: '
|
|
513
|
+
} }, h("slot", { key: '3fda40ff091612c41866b5e68affe4cfb47bc474', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: 'e0964aa330b2743c0baa8661a21c30718298eebc', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: '65103d52603300f5c1f50f054f74ffe4a2769f64', class: `helper ${this.error ? 'error' : ''} ${this.disabled ? 'disabled' : ''}` }, this.error && h("tds-icon", { key: '67a4727755ec5f0b8444f8837dccda7bf339c69d', name: "error", size: "16px" }), this.helper))));
|
|
484
514
|
}
|
|
485
515
|
get host() { return this; }
|
|
486
516
|
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-e4d7c655.js';
|
|
3
|
-
import { d as defineCustomElement$4 } from './p-
|
|
3
|
+
import { d as defineCustomElement$4 } from './p-96b91aeb.js';
|
|
4
4
|
import { d as defineCustomElement$3 } from './p-6d69bf43.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './p-a32f9097.js';
|
|
6
6
|
|
|
@@ -208,7 +208,8 @@ const TdsDropdown = class {
|
|
|
208
208
|
var _a, _b;
|
|
209
209
|
this.tdsChange.emit({
|
|
210
210
|
name: this.name,
|
|
211
|
-
value:
|
|
211
|
+
// value: this.value?.map((value) => value).toString() ?? null,
|
|
212
|
+
value: (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value)) !== null && _b !== void 0 ? _b : null,
|
|
212
213
|
});
|
|
213
214
|
};
|
|
214
215
|
this.name = undefined;
|
|
@@ -261,24 +262,53 @@ const TdsDropdown = class {
|
|
|
261
262
|
// @ts-ignore
|
|
262
263
|
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
|
|
263
264
|
async setValue(value, label) {
|
|
265
|
+
console.log('inside setValue');
|
|
266
|
+
// if (value === '10') {
|
|
267
|
+
// console.log('value is 10, for debugging purposes we will change it to a number');
|
|
268
|
+
// value = 10;
|
|
269
|
+
// }
|
|
270
|
+
console.log('value', value);
|
|
271
|
+
console.log('typeof value', typeof value);
|
|
264
272
|
let nextValue;
|
|
265
273
|
if (typeof value === 'string' || typeof value === 'number')
|
|
266
274
|
nextValue = [value];
|
|
267
275
|
else
|
|
268
276
|
nextValue = value;
|
|
277
|
+
console.log('nextValue', nextValue);
|
|
278
|
+
console.log('typeof nextValue', typeof nextValue);
|
|
269
279
|
if (!this.multiselect && nextValue.length > 1) {
|
|
270
280
|
console.warn('Tried to select multiple items, but multiselect is not enabled.');
|
|
271
281
|
nextValue = [nextValue[0]];
|
|
272
282
|
}
|
|
273
283
|
nextValue = [...new Set(nextValue)];
|
|
284
|
+
console.log('in the middle, nextValue is', nextValue);
|
|
274
285
|
this.internalReset();
|
|
286
|
+
console.log('a ____ nextValue', nextValue);
|
|
287
|
+
console.log('a __________________________________');
|
|
275
288
|
for (let i = 0; i < nextValue.length; i++) {
|
|
276
|
-
|
|
289
|
+
console.log('i=', i);
|
|
290
|
+
console.log('nextValue[i]=', nextValue[i]);
|
|
291
|
+
console.log('this.getChildren()', this.getChildren());
|
|
292
|
+
this.getChildren().forEach((element) => {
|
|
293
|
+
console.log('... ', element.value, typeof element.value);
|
|
294
|
+
});
|
|
295
|
+
const optionExist = this.getChildren().some((element) => {
|
|
296
|
+
console.log('element.value', element.value, typeof element.value);
|
|
297
|
+
return element.value === nextValue[i];
|
|
298
|
+
});
|
|
299
|
+
console.log('optionExist', optionExist);
|
|
277
300
|
if (!optionExist) {
|
|
278
301
|
nextValue.splice(i, 1);
|
|
279
302
|
}
|
|
303
|
+
console.log('---------------');
|
|
280
304
|
}
|
|
305
|
+
console.log('b __________________________________');
|
|
306
|
+
console.log('b ____ nextValue', nextValue);
|
|
307
|
+
console.log('this.value', this.value);
|
|
308
|
+
console.log('at the end of setValue, nextValue is', nextValue);
|
|
281
309
|
this.value = nextValue;
|
|
310
|
+
console.log('this.value is updated now');
|
|
311
|
+
console.log('this.value', this.value);
|
|
282
312
|
this.setValueAttribute();
|
|
283
313
|
this.selectChildrenAsSelectedBasedOnSelectionProp();
|
|
284
314
|
this.handleChange();
|
|
@@ -418,7 +448,7 @@ const TdsDropdown = class {
|
|
|
418
448
|
render() {
|
|
419
449
|
var _a, _b, _c, _d;
|
|
420
450
|
appendHiddenInput(this.host, this.name, (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value).toString(), this.disabled);
|
|
421
|
-
return (h(Host, { key: '
|
|
451
|
+
return (h(Host, { key: '52ccd98c3606dd19f2b32792a280dbe8b015b968', role: "select", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, this.label && this.labelPosition === 'outside' && (h("div", { key: '0f9495857f58980019a7dcfefc4960e77f48a975', class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '4e6cfba13885a93250153e1989197d3beeaf3e31', class: `dropdown-select ${this.size} ${this.disabled ? 'disabled' : ''}` }, this.filter ? (h("div", { class: {
|
|
422
452
|
filter: true,
|
|
423
453
|
focus: this.filterFocus,
|
|
424
454
|
disabled: this.disabled,
|
|
@@ -468,7 +498,7 @@ const TdsDropdown = class {
|
|
|
468
498
|
label-inside-as-placeholder
|
|
469
499
|
${this.size}
|
|
470
500
|
${((_c = this.value) === null || _c === void 0 ? void 0 : _c.length) ? 'selected' : ''}
|
|
471
|
-
` }, this.label)), h("div", { class: `placeholder ${this.size}` }, ((_d = this.value) === null || _d === void 0 ? void 0 : _d.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: '
|
|
501
|
+
` }, this.label)), h("div", { class: `placeholder ${this.size}` }, ((_d = this.value) === null || _d === void 0 ? void 0 : _d.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: '387d1107d50121dc5bf3be6cf8ed90239c149c1d', ref: (element) => (this.dropdownList = element), class: {
|
|
472
502
|
'dropdown-list': true,
|
|
473
503
|
[this.size]: true,
|
|
474
504
|
[this.getOpenDirection()]: true,
|
|
@@ -477,7 +507,7 @@ const TdsDropdown = class {
|
|
|
477
507
|
'closed': !this.open,
|
|
478
508
|
[`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
|
|
479
509
|
[`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
|
|
480
|
-
} }, h("slot", { key: '
|
|
510
|
+
} }, h("slot", { key: '3fda40ff091612c41866b5e68affe4cfb47bc474', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: 'e0964aa330b2743c0baa8661a21c30718298eebc', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: '65103d52603300f5c1f50f054f74ffe4a2769f64', class: `helper ${this.error ? 'error' : ''} ${this.disabled ? 'disabled' : ''}` }, this.error && h("tds-icon", { key: '67a4727755ec5f0b8444f8837dccda7bf339c69d', name: "error", size: "16px" }), this.helper))));
|
|
481
511
|
}
|
|
482
512
|
get host() { return getElement(this); }
|
|
483
513
|
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=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.defaultValue){const t=Array.from(this.host.children).filter((t=>"TDS-DROPDOWN-OPTION"===t.tagName));if(0===t.length)return void console.warn("TDS DROPDOWN: No options found. Disregard if loading data asynchronously.");const o=this.multiselect?new Set(this.defaultValue.split(",")):[this.defaultValue],s=new Map(t.map((t=>[t.value,t]))),e=Array.from(o).filter((t=>{const o=s.get(t);return!!o&&(o.setSelected(!0),!0)}));e.length>0?(this.value=[...new Set(this.value?[...this.value,...e]:e)],this.setValueAttribute()):console.warn(`TDS DROPDOWN: No matching option found for defaultValue "${this.defaultValue}"`)}},this.getChildren=()=>{const t=Array.from(this.host.children).filter((t=>"TDS-DROPDOWN-OPTION"===t.tagName));if(0!==t.length)return t;console.warn("TDS DROPDOWN: Data missing. Disregard if loading data asynchronously.")},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.getSelectedChildren=()=>{var t;return null===(t=this.value)||void 0===t?void 0:t.map((t=>this.getChildren().find((o=>o.value===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=()=>{var t;this.value&&""!==(null===(t=this.value)||void 0===t?void 0:t.toString())?this.host.setAttribute("value",this.value.map((t=>t)).toString()):this.host.removeAttribute("value")},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.value}}),this.inputElement.focus()},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.handleChange=()=>{var t,o;this.tdsChange.emit({name:this.name,value:null!==(o=null===(t=this.value)||void 0===t?void 0:t.map((t=>t)))&&void 0!==o?o:null})},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.open=!1,this.value=void 0,this.filterResult=void 0,this.filterFocus=void 0}async reset(){this.dropdownList.scrollTop=0,this.internalReset(),this.handleChange()}async focusElement(){this.focusInputElement(),this.handleFocus({})}async setValue(t,o){let s;console.log("inside setValue"),console.log("value",t),console.log("typeof value",typeof t),s="string"==typeof t||"number"==typeof t?[t]:t,console.log("nextValue",s),console.log("typeof nextValue",typeof s),!this.multiselect&&s.length>1&&(console.warn("Tried to select multiple items, but multiselect is not enabled."),s=[s[0]]),s=[...new Set(s)],console.log("in the middle, nextValue is",s),this.internalReset(),console.log("a ____ nextValue",s),console.log("a __________________________________");for(let t=0;t<s.length;t++){console.log("i=",t),console.log("nextValue[i]=",s[t]),console.log("this.getChildren()",this.getChildren()),this.getChildren().forEach((t=>{console.log("... ",t.value,typeof t.value)}));const o=this.getChildren().some((o=>(console.log("element.value",o.value,typeof o.value),o.value===s[t])));console.log("optionExist",o),o||s.splice(t,1),console.log("---------------")}console.log("b __________________________________"),console.log("b ____ nextValue",s),console.log("this.value",this.value),console.log("at the end of setValue, nextValue is",s),this.value=s,console.log("this.value is updated now"),console.log("this.value",this.value),this.setValueAttribute(),this.selectChildrenAsSelectedBasedOnSelectionProp(),this.handleChange();const e=this.getSelectedChildren().map((t=>({value:t.value,label:t.textContent.trim()})));return this.filter&&(this.inputElement.value=this.getValue()),e}async appendValue(t){this.setValue(this.multiselect&&this.value?[...this.value,t]:t)}async removeValue(t){var o,s;let e;return this.multiselect?null===(o=this.getChildren())||void 0===o||o.forEach((o=>{var s;return o.value===t&&(this.value=null===(s=this.value)||void 0===s?void 0:s.filter((t=>t!==o.value)),e=o.textContent.trim(),o.setSelected(!1)),o})):this.reset(),this.handleChange(),this.setValueAttribute(),null===(s=this.value)||void 0===s?void 0:s.map((t=>({value:t,label:e})))}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.getValue()))}componentWillLoad(){this.setDefaultOption()}handleSlotChange(){this.setDefaultOption()}normalizeString(t){return this.normalizeText?t.normalize("NFD").replace(/\p{Diacritic}/gu,""):t}internalReset(){this.getChildren().forEach((t=>(t.setSelected(!1),t))),this.value=null,this.setValueAttribute()}selectChildrenAsSelectedBasedOnSelectionProp(){this.getChildren().forEach((t=>{this.value.forEach((o=>{t.value!==o?this.multiselect||t.setSelected(!1):t.setSelected(!0)}))}))}render(){var t,o,i,d;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,null===(t=this.value)||void 0===t?void 0:t.map((t=>t)).toString(),this.disabled),s(e,{key:"52ccd98c3606dd19f2b32792a280dbe8b015b968",role:"select",class:this.modeVariant?`tds-mode-variant-${this.modeVariant}`:""},this.label&&"outside"===this.labelPosition&&s("div",{key:"0f9495857f58980019a7dcfefc4960e77f48a975",class:"label-outside "+(this.disabled?"disabled":"")},this.label),s("div",{key:"4e6cfba13885a93250153e1989197d3beeaf3e31",class:`dropdown-select ${this.size} ${this.disabled?"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 ${(null===(o=this.value)||void 0===o?void 0:o.length)?"selected":""}\n `},this.label),s("input",{ref:t=>this.inputElement=t,class:"inside"===this.labelPosition?"placeholder":"",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.open=!0,this.filterFocus=!0,this.multiselect&&(this.inputElement.value=""),this.handleFocus(t),this.handleFilter({target:{value:""}})},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 "+(this.open&&""!==this.inputElement.value?"":"hide"),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",{onClick:()=>this.handleToggleOpen(),onKeyDown:t=>{"Escape"===t.key&&(this.open=!1)},class:`\n ${this.value?"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 ${(null===(i=this.value)||void 0===i?void 0:i.length)?"selected":""}\n `},this.label),s("div",{class:`placeholder ${this.size}`},(null===(d=this.value)||void 0===d?void 0:d.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:"387d1107d50121dc5bf3be6cf8ed90239c149c1d",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:"3fda40ff091612c41866b5e68affe4cfb47bc474",onSlotchange:()=>this.handleSlotChange()}),0===this.filterResult&&""!==this.noResultText&&s("div",{key:"e0964aa330b2743c0baa8661a21c30718298eebc",class:`no-result ${this.size}`},this.noResultText)),this.helper&&s("div",{key:"65103d52603300f5c1f50f054f74ffe4a2769f64",class:`helper ${this.error?"error":""} ${this.disabled?"disabled":""}`},this.error&&s("tds-icon",{key:"67a4727755ec5f0b8444f8837dccda7bf339c69d",name:"error",size:"16px"}),this.helper))}get host(){return i(this)}static get watchers(){return{open:["handleOpenState"]}}};d.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 r=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.componentWillRender=()=>{this.parentElement="TDS-DROPDOWN"===this.host.parentElement.tagName?this.host.parentElement:this.host.getRootNode().host,this.multiselect=this.parentElement.multiselect,this.size=this.parentElement.size,this.label=this.host.textContent.trim()},this.handleSingleSelect=()=>{this.disabled||(this.selected=!0,this.parentElement.appendValue(this.value),this.parentElement.close(),this.tdsSelect.emit({value:this.value,selected:this.selected}))},this.handleMultiselect=t=>{this.disabled||(t.detail.checked?(this.parentElement.appendValue(this.value),this.selected=!0,this.tdsSelect.emit({value:this.value,selected:this.selected})):(this.parentElement.removeValue(this.value),this.selected=!1,this.tdsSelect.emit({value:this.value,selected:this.selected})),t.stopPropagation())},this.handleFocus=t=>{this.tdsFocus.emit(t)},this.handleBlur=t=>{this.tdsBlur.emit(t)},this.value=void 0,this.disabled=!1,this.selected=!1,this.multiselect=void 0,this.size="lg"}async setSelected(t){this.selected=t}render(){return s(e,{key:"98f57bb76aa504cbacbd40cbd1c76648f678b58f",role:"option","aria-disabled":this.disabled,"aria-selected":this.selected},s("div",{key:"d22f24e290fc61c14c8b9ca1c908bafd466f6d97",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",{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)}};r.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{d as tds_dropdown,r as tds_dropdown_option}
|
package/dist/tegel/tegel.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-2049fab2.js";export{s as setNonce}from"./p-2049fab2.js";import{g as a}from"./p-e1255160.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((async e=>(await a(),t(JSON.parse('[["p-06d2fa56",[[1,"tds-header-launcher",{"open":[32],"buttonEl":[32],"hasListTypeMenu":[32]},[[8,"click","onAnyClick"]]]]],["p-7097a39a",[[1,"tds-header-dropdown",{"label":[1],"noDropdownIcon":[4,"no-dropdown-icon"],"selected":[4],"open":[32],"buttonEl":[32]},[[4,"click","onAnyClick"]]]]],["p-f1c172a4",[[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-1bc2c73c",[[1,"tds-header-hamburger"]]],["p-54a105a4",[[1,"tds-header-brand-symbol"]]],["p-4ab7461e",[[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"]]]]],["p-dcbd977f",[[1,"tds-side-menu-user",{"heading":[1],"subheading":[1],"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"]}]]],["p-930e767e",[[1,"tds-accordion-item",{"header":[1],"expandIconPosition":[1,"expand-icon-position"],"disabled":[4],"expanded":[4],"paddingReset":[4,"padding-reset"],"toggleAccordionItem":[64]}]]],["p-1a2f3852",[[1,"tds-banner",{"icon":[1],"header":[1],"subheader":[1],"variant":[1],"bannerId":[1,"banner-id"],"hidden":[516],"hideBanner":[64],"showBanner":[64]}]]],["p-d1cbe5be",[[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-ad434031",[[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],"focusInput":[32],"reset":[64],"setValue":[64]},[[0,"focus","handleFocusIn"],[0,"focusout","handleFocusOut"]]]]],["p-c790ef93",[[1,"tds-folder-tabs",{"modeVariant":[1,"mode-variant"],"defaultSelectedIndex":[2,"default-selected-index"],"selectedIndex":[514,"selected-index"],"buttonWidth":[32],"showLeftScroll":[32],"showRightScroll":[32],"selectTab":[64],"reinitialize":[64]},null,{"selectedIndex":["handleSelectedIndexUpdate"]}]]],["p-b4c7099f",[[1,"tds-footer-group",{"titleText":[1,"title-text"],"open":[32]}]]],["p-987084a5",[[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-6938329a",[[4,"tds-header-launcher-list"]]],["p-5d0e8f1e",[[1,"tds-header-launcher-list-item"]]],["p-a642c800",[[1,"tds-inline-tabs",{"modeVariant":[1,"mode-variant"],"defaultSelectedIndex":[2,"default-selected-index"],"selectedIndex":[514,"selected-index"],"leftPadding":[514,"left-padding"],"showLeftScroll":[32],"showRightScroll":[32],"selectTab":[64],"reinitialize":[64]},null,{"selectedIndex":["handleSelectedIndexUpdate"]}]]],["p-a9654cd4",[[1,"tds-message",{"header":[1],"modeVariant":[1,"mode-variant"],"variant":[1],"noIcon":[4,"no-icon"],"minimal":[4]}]]],["p-5a891dd2",[[1,"tds-modal",{"header":[1],"prevent":[4],"size":[1],"actionsPosition":[1,"actions-position"],"selector":[1],"referenceEl":[16],"show":[4],"closable":[4],"isShown":[32],"showModal":[64],"closeModal":[64],"initializeModal":[64],"cleanupModal":[64]}]]],["p-91dcddd5",[[1,"tds-navigation-tabs",{"modeVariant":[1,"mode-variant"],"defaultSelectedIndex":[2,"default-selected-index"],"selectedIndex":[514,"selected-index"],"leftPadding":[514,"left-padding"],"showLeftScroll":[32],"showRightScroll":[32],"selectTab":[64],"reinitialize":[64]},null,{"selectedIndex":["handleSelectedIndexUpdate"]}]]],["p-dd060c11",[[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-c18b2746",[[1,"tds-side-menu-close-button"]]],["p-0f38bea7",[[1,"tds-side-menu-collapse-button",{"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-f91c6e9d",[[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],"sliderId":[1,"slider-id"],"reset":[64]},[[0,"keydown","handleKeydown"],[9,"mouseup","handleRelease"],[9,"touchend","handleRelease"],[9,"mousemove","handleMove"],[9,"touchmove","handleMove"]],{"value":["handleValueUpdate"]}]]],["p-c917d8be",[[1,"tds-step",{"index":[1],"state":[1],"hideLabels":[32],"size":[32],"orientation":[32],"labelPosition":[32]},[[16,"internalTdsPropsChange","handlePropsChange"]]]]],["p-9de400f4",[[1,"tds-table-body-input-wrapper",{"showIcon":[4,"show-icon"],"renderSlot":[32],"inputFocused":[32],"compactDesign":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-9c2dfecc",[[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-1634247e",[[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-ff5cd75f",[[1,"tds-table-header-input-wrapper",{"showIcon":[4,"show-icon"],"compactDesign":[4,"compact-design"],"renderSlot":[32],"inputFocused":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-bb129d43",[[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-7d39487c",[[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"],"size":[1],"modeVariant":[1,"mode-variant"],"noMinWidth":[4,"no-min-width"],"name":[1],"state":[1],"maxLength":[2,"max-length"],"autofocus":[4],"focusInput":[32],"focusElement":[64]}]]],["p-12303135",[[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"],"state":[1],"maxLength":[2,"max-length"],"modeVariant":[1,"mode-variant"],"autofocus":[4],"noMinWidth":[4,"no-min-width"],"focusInput":[32]}]]],["p-088bfcd4",[[1,"tds-toast",{"toastId":[1,"toast-id"],"header":[1],"subheader":[1],"variant":[1],"hidden":[516],"closable":[4],"toastRole":[1,"toast-role"],"hideToast":[64],"showToast":[64]}]]],["p-443d8501",[[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"]}]]],["p-47bf836e",[[1,"tds-accordion",{"modeVariant":[1,"mode-variant"],"hideLastBorder":[4,"hide-last-border"]}]]],["p-26ae4a93",[[1,"tds-badge",{"value":[1],"hidden":[516],"size":[1],"shape":[32],"text":[32]},null,{"value":["watchProps"],"size":["watchProps"]}]]],["p-db00f607",[[1,"tds-block",{"modeVariant":[1,"mode-variant"]}]]],["p-7a83cf55",[[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-0df92ce7",[[1,"tds-breadcrumb",{"current":[4]}]]],["p-cd5219ac",[[1,"tds-breadcrumbs"]]],["p-845e1fca",[[6,"tds-button",{"text":[1],"type":[1],"variant":[1],"size":[1],"disabled":[4],"fullbleed":[4],"modeVariant":[1,"mode-variant"],"animation":[1],"onlyIcon":[32]}]]],["p-fe9b385f",[[6,"tds-chip",{"type":[1],"size":[1],"chipId":[1,"chip-id"],"checked":[1540],"name":[1],"value":[1],"disabled":[4]}]]],["p-e86f2d31",[[1,"tds-folder-tab",{"disabled":[4],"selected":[32],"tabWidth":[32],"setTabWidth":[64],"setSelected":[64]}]]],["p-bda3d846",[[1,"tds-footer",{"modeVariant":[1,"mode-variant"]}]]],["p-ed02ad2b",[[1,"tds-footer-item"]]],["p-7cb43ebe",[[4,"tds-header"]]],["p-ede11de8",[[1,"tds-header-dropdown-list-user",{"imgUrl":[1,"img-url"],"imgAlt":[1,"img-alt"],"header":[1],"subheader":[1]}]]],["p-f841f094",[[4,"tds-header-launcher-grid",{"headingElement":[32]}]]],["p-9bf7f5cd",[[1,"tds-header-launcher-grid-item"]]],["p-e65dba91",[[4,"tds-header-launcher-grid-title"]]],["p-50fcdc56",[[4,"tds-header-launcher-list-title"]]],["p-959a6780",[[1,"tds-header-title"]]],["p-b00bcf39",[[1,"tds-inline-tab",{"disabled":[4],"selected":[32],"setSelected":[64]}]]],["p-c3513f1f",[[1,"tds-link",{"disabled":[4],"underline":[4]}]]],["p-ff7ae8a3",[[1,"tds-navigation-tab",{"disabled":[4],"selected":[32],"setSelected":[64]}]]],["p-062adc6d",[[1,"tds-popover-menu-item",{"disabled":[4]}]]],["p-f9325536",[[6,"tds-radio-button",{"name":[1],"value":[1],"radioId":[1,"radio-id"],"checked":[516],"required":[4],"disabled":[4]}]]],["p-4a7a977b",[[1,"tds-side-menu",{"open":[4],"persistent":[4],"collapsed":[1028],"isUpperSlotEmpty":[32],"isCollapsed":[32],"initialCollapsedState":[32]},[[16,"internalTdsCollapse","collapsedSideMenuEventHandler"]],{"collapsed":["onCollapsedChange"]}]]],["p-b9e37cf2",[[1,"tds-side-menu-dropdown-list",{"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapsedSideMenuEventHandler"]]]]],["p-2e44b4e9",[[1,"tds-side-menu-dropdown-list-item",{"selected":[4],"dropdownHasIcon":[32],"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-6aabf7e1",[[1,"tds-side-menu-overlay"]]],["p-57f95a1b",[[0,"tds-spinner",{"size":[1],"variant":[1]}]]],["p-5db5c8f4",[[1,"tds-stepper",{"orientation":[1],"labelPosition":[1,"label-position"],"size":[1],"hideLabels":[4,"hide-labels"],"stepperId":[1,"stepper-id"]},null,{"orientation":["handleDirectionChange"],"labelPosition":["handleLabelPositionChange"],"size":["handleSizeChange"],"hideLabels":["handleHideLabelsChange"]}]]],["p-51e49417",[[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-aed1c5cf",[[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-bcae4d3a",[[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-23ddcd21",[[6,"tds-toggle",{"checked":[516],"required":[4],"size":[1],"name":[1],"headline":[1],"disabled":[4],"toggleId":[1,"toggle-id"],"toggle":[64]}]]],["p-e7108828",[[1,"tds-header-item",{"active":[4],"selected":[4]}],[1,"tds-core-header-item"]]],["p-b9ac3122",[[1,"tds-header-launcher-button",{"active":[4]}]]],["p-6b405a0f",[[1,"tds-divider",{"orientation":[1]}]]],["p-6c26e66f",[[1,"tds-header-dropdown-list",{"size":[513],"headingElement":[32]}]]],["p-de540cc0",[[1,"tds-header-dropdown-list-item",{"selected":[4],"size":[513]}]]],["p-a464920f",[[6,"tds-checkbox",{"name":[1],"checkboxId":[1,"checkbox-id"],"disabled":[4],"required":[4],"checked":[1540],"indeterminate":[1028],"value":[1],"toggleCheckbox":[64]},null,{"indeterminate":["handleIndeterminateState"]}]]],["p-e1df12b3",[[17,"tds-dropdown-option",{"value":[8],"disabled":[4],"selected":[32],"multiselect":[32],"size":[32],"setSelected":[64]}],[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":[1,"default-value"],"open":[32],"value":[32],"filterResult":[32],"filterFocus":[32],"reset":[64],"focusElement":[64],"setValue":[64],"appendValue":[64],"removeValue":[64],"close":[64]},[[9,"mousedown","onAnyClick"],[0,"keydown","onKeyDown"]],{"open":["handleOpenState"]}]]],["p-f45d905c",[[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],"childRef":[32],"close":[64]}]]],["p-7d83ba98",[[1,"tds-side-menu-user-image",{"src":[1],"alt":[1]}],[1,"tds-side-menu-user-label",{"heading":[1],"subheading":[1]}]]],["p-a5a67770",[[1,"tds-side-menu-item",{"selected":[4],"active":[4],"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-590b5f55",[[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],"close":[64]},[[8,"click","onAnyClick"],[8,"internalTdsShow","onTdsShow"]],{"show":["onShowChange"],"referenceEl":["onReferenceElChanged"],"trigger":["onTriggerChanged"]}]]],["p-07825c63",[[1,"tds-icon",{"name":[513],"size":[513],"svgTitle":[1,"svg-title"],"svgDescription":[1,"svg-description"],"icons_object":[32],"arrayOfIcons":[32]}]]]]'),e))));
|
|
1
|
+
import{p as e,b as t}from"./p-2049fab2.js";export{s as setNonce}from"./p-2049fab2.js";import{g as a}from"./p-e1255160.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((async e=>(await a(),t(JSON.parse('[["p-06d2fa56",[[1,"tds-header-launcher",{"open":[32],"buttonEl":[32],"hasListTypeMenu":[32]},[[8,"click","onAnyClick"]]]]],["p-7097a39a",[[1,"tds-header-dropdown",{"label":[1],"noDropdownIcon":[4,"no-dropdown-icon"],"selected":[4],"open":[32],"buttonEl":[32]},[[4,"click","onAnyClick"]]]]],["p-f1c172a4",[[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-1bc2c73c",[[1,"tds-header-hamburger"]]],["p-54a105a4",[[1,"tds-header-brand-symbol"]]],["p-4ab7461e",[[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"]]]]],["p-dcbd977f",[[1,"tds-side-menu-user",{"heading":[1],"subheading":[1],"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"]}]]],["p-930e767e",[[1,"tds-accordion-item",{"header":[1],"expandIconPosition":[1,"expand-icon-position"],"disabled":[4],"expanded":[4],"paddingReset":[4,"padding-reset"],"toggleAccordionItem":[64]}]]],["p-1a2f3852",[[1,"tds-banner",{"icon":[1],"header":[1],"subheader":[1],"variant":[1],"bannerId":[1,"banner-id"],"hidden":[516],"hideBanner":[64],"showBanner":[64]}]]],["p-d1cbe5be",[[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-ad434031",[[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],"focusInput":[32],"reset":[64],"setValue":[64]},[[0,"focus","handleFocusIn"],[0,"focusout","handleFocusOut"]]]]],["p-c790ef93",[[1,"tds-folder-tabs",{"modeVariant":[1,"mode-variant"],"defaultSelectedIndex":[2,"default-selected-index"],"selectedIndex":[514,"selected-index"],"buttonWidth":[32],"showLeftScroll":[32],"showRightScroll":[32],"selectTab":[64],"reinitialize":[64]},null,{"selectedIndex":["handleSelectedIndexUpdate"]}]]],["p-b4c7099f",[[1,"tds-footer-group",{"titleText":[1,"title-text"],"open":[32]}]]],["p-987084a5",[[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-6938329a",[[4,"tds-header-launcher-list"]]],["p-5d0e8f1e",[[1,"tds-header-launcher-list-item"]]],["p-a642c800",[[1,"tds-inline-tabs",{"modeVariant":[1,"mode-variant"],"defaultSelectedIndex":[2,"default-selected-index"],"selectedIndex":[514,"selected-index"],"leftPadding":[514,"left-padding"],"showLeftScroll":[32],"showRightScroll":[32],"selectTab":[64],"reinitialize":[64]},null,{"selectedIndex":["handleSelectedIndexUpdate"]}]]],["p-a9654cd4",[[1,"tds-message",{"header":[1],"modeVariant":[1,"mode-variant"],"variant":[1],"noIcon":[4,"no-icon"],"minimal":[4]}]]],["p-5a891dd2",[[1,"tds-modal",{"header":[1],"prevent":[4],"size":[1],"actionsPosition":[1,"actions-position"],"selector":[1],"referenceEl":[16],"show":[4],"closable":[4],"isShown":[32],"showModal":[64],"closeModal":[64],"initializeModal":[64],"cleanupModal":[64]}]]],["p-91dcddd5",[[1,"tds-navigation-tabs",{"modeVariant":[1,"mode-variant"],"defaultSelectedIndex":[2,"default-selected-index"],"selectedIndex":[514,"selected-index"],"leftPadding":[514,"left-padding"],"showLeftScroll":[32],"showRightScroll":[32],"selectTab":[64],"reinitialize":[64]},null,{"selectedIndex":["handleSelectedIndexUpdate"]}]]],["p-dd060c11",[[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-c18b2746",[[1,"tds-side-menu-close-button"]]],["p-0f38bea7",[[1,"tds-side-menu-collapse-button",{"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-f91c6e9d",[[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],"sliderId":[1,"slider-id"],"reset":[64]},[[0,"keydown","handleKeydown"],[9,"mouseup","handleRelease"],[9,"touchend","handleRelease"],[9,"mousemove","handleMove"],[9,"touchmove","handleMove"]],{"value":["handleValueUpdate"]}]]],["p-c917d8be",[[1,"tds-step",{"index":[1],"state":[1],"hideLabels":[32],"size":[32],"orientation":[32],"labelPosition":[32]},[[16,"internalTdsPropsChange","handlePropsChange"]]]]],["p-9de400f4",[[1,"tds-table-body-input-wrapper",{"showIcon":[4,"show-icon"],"renderSlot":[32],"inputFocused":[32],"compactDesign":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-9c2dfecc",[[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-1634247e",[[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-ff5cd75f",[[1,"tds-table-header-input-wrapper",{"showIcon":[4,"show-icon"],"compactDesign":[4,"compact-design"],"renderSlot":[32],"inputFocused":[32],"tableId":[32]},[[16,"internalTdsTablePropChange","internalTdsPropChangeListener"]]]]],["p-bb129d43",[[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-7d39487c",[[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"],"size":[1],"modeVariant":[1,"mode-variant"],"noMinWidth":[4,"no-min-width"],"name":[1],"state":[1],"maxLength":[2,"max-length"],"autofocus":[4],"focusInput":[32],"focusElement":[64]}]]],["p-12303135",[[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"],"state":[1],"maxLength":[2,"max-length"],"modeVariant":[1,"mode-variant"],"autofocus":[4],"noMinWidth":[4,"no-min-width"],"focusInput":[32]}]]],["p-088bfcd4",[[1,"tds-toast",{"toastId":[1,"toast-id"],"header":[1],"subheader":[1],"variant":[1],"hidden":[516],"closable":[4],"toastRole":[1,"toast-role"],"hideToast":[64],"showToast":[64]}]]],["p-443d8501",[[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"]}]]],["p-47bf836e",[[1,"tds-accordion",{"modeVariant":[1,"mode-variant"],"hideLastBorder":[4,"hide-last-border"]}]]],["p-26ae4a93",[[1,"tds-badge",{"value":[1],"hidden":[516],"size":[1],"shape":[32],"text":[32]},null,{"value":["watchProps"],"size":["watchProps"]}]]],["p-db00f607",[[1,"tds-block",{"modeVariant":[1,"mode-variant"]}]]],["p-7a83cf55",[[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-0df92ce7",[[1,"tds-breadcrumb",{"current":[4]}]]],["p-cd5219ac",[[1,"tds-breadcrumbs"]]],["p-845e1fca",[[6,"tds-button",{"text":[1],"type":[1],"variant":[1],"size":[1],"disabled":[4],"fullbleed":[4],"modeVariant":[1,"mode-variant"],"animation":[1],"onlyIcon":[32]}]]],["p-fe9b385f",[[6,"tds-chip",{"type":[1],"size":[1],"chipId":[1,"chip-id"],"checked":[1540],"name":[1],"value":[1],"disabled":[4]}]]],["p-e86f2d31",[[1,"tds-folder-tab",{"disabled":[4],"selected":[32],"tabWidth":[32],"setTabWidth":[64],"setSelected":[64]}]]],["p-bda3d846",[[1,"tds-footer",{"modeVariant":[1,"mode-variant"]}]]],["p-ed02ad2b",[[1,"tds-footer-item"]]],["p-7cb43ebe",[[4,"tds-header"]]],["p-ede11de8",[[1,"tds-header-dropdown-list-user",{"imgUrl":[1,"img-url"],"imgAlt":[1,"img-alt"],"header":[1],"subheader":[1]}]]],["p-f841f094",[[4,"tds-header-launcher-grid",{"headingElement":[32]}]]],["p-9bf7f5cd",[[1,"tds-header-launcher-grid-item"]]],["p-e65dba91",[[4,"tds-header-launcher-grid-title"]]],["p-50fcdc56",[[4,"tds-header-launcher-list-title"]]],["p-959a6780",[[1,"tds-header-title"]]],["p-b00bcf39",[[1,"tds-inline-tab",{"disabled":[4],"selected":[32],"setSelected":[64]}]]],["p-c3513f1f",[[1,"tds-link",{"disabled":[4],"underline":[4]}]]],["p-ff7ae8a3",[[1,"tds-navigation-tab",{"disabled":[4],"selected":[32],"setSelected":[64]}]]],["p-062adc6d",[[1,"tds-popover-menu-item",{"disabled":[4]}]]],["p-f9325536",[[6,"tds-radio-button",{"name":[1],"value":[1],"radioId":[1,"radio-id"],"checked":[516],"required":[4],"disabled":[4]}]]],["p-4a7a977b",[[1,"tds-side-menu",{"open":[4],"persistent":[4],"collapsed":[1028],"isUpperSlotEmpty":[32],"isCollapsed":[32],"initialCollapsedState":[32]},[[16,"internalTdsCollapse","collapsedSideMenuEventHandler"]],{"collapsed":["onCollapsedChange"]}]]],["p-b9e37cf2",[[1,"tds-side-menu-dropdown-list",{"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapsedSideMenuEventHandler"]]]]],["p-2e44b4e9",[[1,"tds-side-menu-dropdown-list-item",{"selected":[4],"dropdownHasIcon":[32],"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-6aabf7e1",[[1,"tds-side-menu-overlay"]]],["p-57f95a1b",[[0,"tds-spinner",{"size":[1],"variant":[1]}]]],["p-5db5c8f4",[[1,"tds-stepper",{"orientation":[1],"labelPosition":[1,"label-position"],"size":[1],"hideLabels":[4,"hide-labels"],"stepperId":[1,"stepper-id"]},null,{"orientation":["handleDirectionChange"],"labelPosition":["handleLabelPositionChange"],"size":["handleSizeChange"],"hideLabels":["handleHideLabelsChange"]}]]],["p-51e49417",[[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-aed1c5cf",[[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-bcae4d3a",[[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-23ddcd21",[[6,"tds-toggle",{"checked":[516],"required":[4],"size":[1],"name":[1],"headline":[1],"disabled":[4],"toggleId":[1,"toggle-id"],"toggle":[64]}]]],["p-e7108828",[[1,"tds-header-item",{"active":[4],"selected":[4]}],[1,"tds-core-header-item"]]],["p-b9ac3122",[[1,"tds-header-launcher-button",{"active":[4]}]]],["p-6b405a0f",[[1,"tds-divider",{"orientation":[1]}]]],["p-6c26e66f",[[1,"tds-header-dropdown-list",{"size":[513],"headingElement":[32]}]]],["p-de540cc0",[[1,"tds-header-dropdown-list-item",{"selected":[4],"size":[513]}]]],["p-a464920f",[[6,"tds-checkbox",{"name":[1],"checkboxId":[1,"checkbox-id"],"disabled":[4],"required":[4],"checked":[1540],"indeterminate":[1028],"value":[1],"toggleCheckbox":[64]},null,{"indeterminate":["handleIndeterminateState"]}]]],["p-367b181b",[[17,"tds-dropdown-option",{"value":[8],"disabled":[4],"selected":[32],"multiselect":[32],"size":[32],"setSelected":[64]}],[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":[1,"default-value"],"open":[32],"value":[32],"filterResult":[32],"filterFocus":[32],"reset":[64],"focusElement":[64],"setValue":[64],"appendValue":[64],"removeValue":[64],"close":[64]},[[9,"mousedown","onAnyClick"],[0,"keydown","onKeyDown"]],{"open":["handleOpenState"]}]]],["p-f45d905c",[[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],"childRef":[32],"close":[64]}]]],["p-7d83ba98",[[1,"tds-side-menu-user-image",{"src":[1],"alt":[1]}],[1,"tds-side-menu-user-label",{"heading":[1],"subheading":[1]}]]],["p-a5a67770",[[1,"tds-side-menu-item",{"selected":[4],"active":[4],"collapsed":[32]},[[16,"internalTdsSideMenuPropChange","collapseSideMenuEventHandler"]]]]],["p-590b5f55",[[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],"close":[64]},[[8,"click","onAnyClick"],[8,"internalTdsShow","onTdsShow"]],{"show":["onShowChange"],"referenceEl":["onReferenceElChanged"],"trigger":["onTriggerChanged"]}]]],["p-07825c63",[[1,"tds-icon",{"name":[513],"size":[513],"svgTitle":[1,"svg-title"],"svgDescription":[1,"svg-description"],"icons_object":[32],"arrayOfIcons":[32]}]]]]'),e))));
|
|
@@ -1850,7 +1850,7 @@ declare global {
|
|
|
1850
1850
|
interface HTMLTdsDropdownElementEventMap {
|
|
1851
1851
|
"tdsChange": {
|
|
1852
1852
|
name: string;
|
|
1853
|
-
value: string;
|
|
1853
|
+
value: string | number;
|
|
1854
1854
|
};
|
|
1855
1855
|
"tdsFocus": FocusEvent;
|
|
1856
1856
|
"tdsBlur": FocusEvent;
|
|
@@ -3093,7 +3093,7 @@ declare namespace LocalJSX {
|
|
|
3093
3093
|
*/
|
|
3094
3094
|
"onTdsChange"?: (event: TdsDropdownCustomEvent<{
|
|
3095
3095
|
name: string;
|
|
3096
|
-
value: string;
|
|
3096
|
+
value: string | number;
|
|
3097
3097
|
}>) => void;
|
|
3098
3098
|
/**
|
|
3099
3099
|
* Focus event for the Dropdown.
|
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=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.defaultValue){const t=Array.from(this.host.children).filter((t=>"TDS-DROPDOWN-OPTION"===t.tagName));if(0===t.length)return void console.warn("TDS DROPDOWN: No options found. Disregard if loading data asynchronously.");const o=this.multiselect?new Set(this.defaultValue.split(",")):[this.defaultValue],s=new Map(t.map((t=>[t.value,t]))),e=Array.from(o).filter((t=>{const o=s.get(t);return!!o&&(o.setSelected(!0),!0)}));e.length>0?(this.value=[...new Set(this.value?[...this.value,...e]:e)],this.setValueAttribute()):console.warn(`TDS DROPDOWN: No matching option found for defaultValue "${this.defaultValue}"`)}},this.getChildren=()=>{const t=Array.from(this.host.children).filter((t=>"TDS-DROPDOWN-OPTION"===t.tagName));if(0!==t.length)return t;console.warn("TDS DROPDOWN: Data missing. Disregard if loading data asynchronously.")},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.getSelectedChildren=()=>{var t;return null===(t=this.value)||void 0===t?void 0:t.map((t=>this.getChildren().find((o=>o.value===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=()=>{var t;this.value&&""!==(null===(t=this.value)||void 0===t?void 0:t.toString())?this.host.setAttribute("value",this.value.map((t=>t)).toString()):this.host.removeAttribute("value")},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.value}}),this.inputElement.focus()},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.handleChange=()=>{var t,o;this.tdsChange.emit({name:this.name,value:null!==(o=null===(t=this.value)||void 0===t?void 0:t.map((t=>t)).toString())&&void 0!==o?o:null})},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.open=!1,this.value=void 0,this.filterResult=void 0,this.filterFocus=void 0}async reset(){this.dropdownList.scrollTop=0,this.internalReset(),this.handleChange()}async focusElement(){this.focusInputElement(),this.handleFocus({})}async setValue(t,o){let s;s="string"==typeof t||"number"==typeof t?[t]:t,!this.multiselect&&s.length>1&&(console.warn("Tried to select multiple items, but multiselect is not enabled."),s=[s[0]]),s=[...new Set(s)],this.internalReset();for(let t=0;t<s.length;t++)this.getChildren().some((o=>o.value===s[t]))||s.splice(t,1);this.value=s,this.setValueAttribute(),this.selectChildrenAsSelectedBasedOnSelectionProp(),this.handleChange();const e=this.getSelectedChildren().map((t=>({value:t.value,label:t.textContent.trim()})));return this.filter&&(this.inputElement.value=this.getValue()),e}async appendValue(t){this.setValue(this.multiselect&&this.value?[...this.value,t]:t)}async removeValue(t){var o,s;let e;return this.multiselect?null===(o=this.getChildren())||void 0===o||o.forEach((o=>{var s;return o.value===t&&(this.value=null===(s=this.value)||void 0===s?void 0:s.filter((t=>t!==o.value)),e=o.textContent.trim(),o.setSelected(!1)),o})):this.reset(),this.handleChange(),this.setValueAttribute(),null===(s=this.value)||void 0===s?void 0:s.map((t=>({value:t,label:e})))}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.getValue()))}componentWillLoad(){this.setDefaultOption()}handleSlotChange(){this.setDefaultOption()}normalizeString(t){return this.normalizeText?t.normalize("NFD").replace(/\p{Diacritic}/gu,""):t}internalReset(){this.getChildren().forEach((t=>(t.setSelected(!1),t))),this.value=null,this.setValueAttribute()}selectChildrenAsSelectedBasedOnSelectionProp(){this.getChildren().forEach((t=>{this.value.forEach((o=>{t.value!==o?this.multiselect||t.setSelected(!1):t.setSelected(!0)}))}))}render(){var t,o,i,d;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,null===(t=this.value)||void 0===t?void 0:t.map((t=>t)).toString(),this.disabled),s(e,{key:"1413334384ceeef946524daa4957df0584f58bc4",role:"select",class:this.modeVariant?`tds-mode-variant-${this.modeVariant}`:""},this.label&&"outside"===this.labelPosition&&s("div",{key:"5bb2c77f26f9b6a3166d3ee28ff8607998d96157",class:"label-outside "+(this.disabled?"disabled":"")},this.label),s("div",{key:"c67f62dfa39b04f7eba6622cf5b712042fed6257",class:`dropdown-select ${this.size} ${this.disabled?"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 ${(null===(o=this.value)||void 0===o?void 0:o.length)?"selected":""}\n `},this.label),s("input",{ref:t=>this.inputElement=t,class:"inside"===this.labelPosition?"placeholder":"",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.open=!0,this.filterFocus=!0,this.multiselect&&(this.inputElement.value=""),this.handleFocus(t),this.handleFilter({target:{value:""}})},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 "+(this.open&&""!==this.inputElement.value?"":"hide"),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",{onClick:()=>this.handleToggleOpen(),onKeyDown:t=>{"Escape"===t.key&&(this.open=!1)},class:`\n ${this.value?"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 ${(null===(i=this.value)||void 0===i?void 0:i.length)?"selected":""}\n `},this.label),s("div",{class:`placeholder ${this.size}`},(null===(d=this.value)||void 0===d?void 0:d.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:"4b5c10d679c6f875d215b1a88897a6a83de1dbff",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:"248b8dfb71396fecd8b8c03ac6633d663de2d012",onSlotchange:()=>this.handleSlotChange()}),0===this.filterResult&&""!==this.noResultText&&s("div",{key:"ad73c3f117a0ea667aeb37f35575af1909cc52fd",class:`no-result ${this.size}`},this.noResultText)),this.helper&&s("div",{key:"e05aeddbe8bb2d445b7539914be7bf6b36863c67",class:`helper ${this.error?"error":""} ${this.disabled?"disabled":""}`},this.error&&s("tds-icon",{key:"668995fb1c364c3ae89e7f1f9a9f89a7978cabe3",name:"error",size:"16px"}),this.helper))}get host(){return i(this)}static get watchers(){return{open:["handleOpenState"]}}};d.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 r=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.componentWillRender=()=>{this.parentElement="TDS-DROPDOWN"===this.host.parentElement.tagName?this.host.parentElement:this.host.getRootNode().host,this.multiselect=this.parentElement.multiselect,this.size=this.parentElement.size,this.label=this.host.textContent.trim()},this.handleSingleSelect=()=>{this.disabled||(this.selected=!0,this.parentElement.appendValue(this.value),this.parentElement.close(),this.tdsSelect.emit({value:this.value,selected:this.selected}))},this.handleMultiselect=t=>{this.disabled||(t.detail.checked?(this.parentElement.appendValue(this.value),this.selected=!0,this.tdsSelect.emit({value:this.value,selected:this.selected})):(this.parentElement.removeValue(this.value),this.selected=!1,this.tdsSelect.emit({value:this.value,selected:this.selected})),t.stopPropagation())},this.handleFocus=t=>{this.tdsFocus.emit(t)},this.handleBlur=t=>{this.tdsBlur.emit(t)},this.value=void 0,this.disabled=!1,this.selected=!1,this.multiselect=void 0,this.size="lg"}async setSelected(t){this.selected=t}render(){return s(e,{key:"98f57bb76aa504cbacbd40cbd1c76648f678b58f",role:"option","aria-disabled":this.disabled,"aria-selected":this.selected},s("div",{key:"d22f24e290fc61c14c8b9ca1c908bafd466f6d97",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",{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)}};r.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{d as tds_dropdown,r as tds_dropdown_option}
|