@scania/tegel 1.23.0-feat-dropdown-allow-numbers-beta.4 → 1.23.0-fix-form-components-slider-reset-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/tds-dropdown_2.cjs.entry.js +13 -11
  3. package/dist/cjs/tds-slider.cjs.entry.js +24 -7
  4. package/dist/cjs/tds-table-footer.cjs.entry.js +1 -1
  5. package/dist/cjs/tegel.cjs.js +1 -1
  6. package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +6 -6
  7. package/dist/collection/components/dropdown/dropdown.js +27 -25
  8. package/dist/collection/components/slider/slider.js +25 -8
  9. package/dist/collection/components/table/table-footer/table-footer.js +1 -1
  10. package/dist/components/{p-47c3b5c5.js → p-2523819c.js} +13 -11
  11. package/dist/components/{p-6dcd4146.js → p-462b77e8.js} +2 -2
  12. package/dist/components/tds-dropdown-option.js +1 -1
  13. package/dist/components/tds-dropdown.js +1 -1
  14. package/dist/components/tds-slider.js +24 -7
  15. package/dist/components/tds-table-footer.js +3 -3
  16. package/dist/esm/loader.js +1 -1
  17. package/dist/esm/tds-dropdown_2.entry.js +13 -11
  18. package/dist/esm/tds-slider.entry.js +25 -8
  19. package/dist/esm/tds-table-footer.entry.js +1 -1
  20. package/dist/esm/tegel.js +1 -1
  21. package/dist/tegel/p-75b95094.entry.js +1 -0
  22. package/dist/tegel/p-979f5255.entry.js +1 -0
  23. package/dist/tegel/{p-0d93c6a2.entry.js → p-f1c172a4.entry.js} +1 -1
  24. package/dist/tegel/tegel.esm.js +1 -1
  25. package/dist/types/components/dropdown/dropdown-option/dropdown-option.d.ts +2 -2
  26. package/dist/types/components/dropdown/dropdown.d.ts +8 -8
  27. package/dist/types/components/slider/slider.d.ts +4 -0
  28. package/dist/types/components.d.ts +17 -17
  29. package/package.json +4 -2
  30. package/dist/tegel/p-3609e4da.entry.js +0 -1
  31. package/dist/tegel/p-f91c6e9d.entry.js +0 -1
@@ -8,15 +8,17 @@ import appendHiddenInput from "../../utils/appendHiddenInput";
8
8
  export class TdsDropdown {
9
9
  constructor() {
10
10
  this.setDefaultOption = () => {
11
- if (this.initialValue) {
11
+ if (this.defaultValue) {
12
12
  const children = Array.from(this.host.children).filter((element) => element.tagName === 'TDS-DROPDOWN-OPTION');
13
13
  if (children.length === 0) {
14
14
  console.warn('TDS DROPDOWN: No options found. Disregard if loading data asynchronously.');
15
15
  return;
16
16
  }
17
- const initialValues = typeof this.initialValue === 'object' ? this.initialValue : [this.initialValue];
17
+ const defaultValues = this.multiselect
18
+ ? new Set(this.defaultValue.split(','))
19
+ : [this.defaultValue];
18
20
  const childrenMap = new Map(children.map((element) => [element.value, element]));
19
- const matchedValues = Array.from(initialValues).filter((value) => {
21
+ const matchedValues = Array.from(defaultValues).filter((value) => {
20
22
  const element = childrenMap.get(value);
21
23
  if (element) {
22
24
  element.setSelected(true);
@@ -29,7 +31,7 @@ export class TdsDropdown {
29
31
  this.setValueAttribute();
30
32
  }
31
33
  else {
32
- console.warn(`TDS DROPDOWN: No matching option found for initialValue "${this.initialValue}"`);
34
+ console.warn(`TDS DROPDOWN: No matching option found for defaultValue "${this.defaultValue}"`);
33
35
  }
34
36
  }
35
37
  };
@@ -145,7 +147,7 @@ export class TdsDropdown {
145
147
  var _a, _b;
146
148
  this.tdsChange.emit({
147
149
  name: this.name,
148
- value: (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value)) !== null && _b !== void 0 ? _b : null,
150
+ value: (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value).toString()) !== null && _b !== void 0 ? _b : null,
149
151
  });
150
152
  };
151
153
  this.name = undefined;
@@ -163,7 +165,7 @@ export class TdsDropdown {
163
165
  this.filter = false;
164
166
  this.normalizeText = true;
165
167
  this.noResultText = 'No result';
166
- this.initialValue = undefined;
168
+ this.defaultValue = undefined;
167
169
  this.open = false;
168
170
  this.value = undefined;
169
171
  this.filterResult = undefined;
@@ -199,7 +201,7 @@ export class TdsDropdown {
199
201
  // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
200
202
  async setValue(value, label) {
201
203
  let nextValue;
202
- if (typeof value === 'string' || typeof value === 'number')
204
+ if (typeof value === 'string')
203
205
  nextValue = [value];
204
206
  else
205
207
  nextValue = value;
@@ -355,7 +357,7 @@ export class TdsDropdown {
355
357
  render() {
356
358
  var _a, _b, _c, _d;
357
359
  appendHiddenInput(this.host, this.name, (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value).toString(), this.disabled);
358
- return (h(Host, { key: 'afd54c5eb55a6824c302dc4c8ede449cee82c085', role: "select", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, this.label && this.labelPosition === 'outside' && (h("div", { key: 'bb96452b5c240e55e9b4b2598b9da90e4901922c', class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '3daa5d2f3e70a8619d4b8a3b2a9a73abb9709419', class: `dropdown-select ${this.size} ${this.disabled ? 'disabled' : ''}` }, this.filter ? (h("div", { class: {
360
+ return (h(Host, { key: '1c4995be9b1e47e254ec9976b334c4d74a44263b', role: "select", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, this.label && this.labelPosition === 'outside' && (h("div", { key: 'ad423934dedc56ff39d06bf7746e47d011bed002', class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '99c87c0add1152f47533bf6ef5e6794cffdbb18c', class: `dropdown-select ${this.size} ${this.disabled ? 'disabled' : ''}` }, this.filter ? (h("div", { class: {
359
361
  filter: true,
360
362
  focus: this.filterFocus,
361
363
  disabled: this.disabled,
@@ -405,7 +407,7 @@ export class TdsDropdown {
405
407
  label-inside-as-placeholder
406
408
  ${this.size}
407
409
  ${((_c = this.value) === null || _c === void 0 ? void 0 : _c.length) ? 'selected' : ''}
408
- ` }, 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: 'e06e0d2da1ff7b630c450b4d7c4b791c1e49bb09', ref: (element) => (this.dropdownList = element), class: {
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: 'dd850ac34b473f9cac51ad5bdc8417d994b7946a', ref: (element) => (this.dropdownList = element), class: {
409
411
  'dropdown-list': true,
410
412
  [this.size]: true,
411
413
  [this.getOpenDirection()]: true,
@@ -414,7 +416,7 @@ export class TdsDropdown {
414
416
  'closed': !this.open,
415
417
  [`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
416
418
  [`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
417
- } }, h("slot", { key: '663ec973bc3c5fee4ebef6bb785e04057544ee89', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: 'ed64eb54675e70489efbe411f639ef4377f7b547', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: '00f483bcce9f59ce93791a49ca039d13385ac920', class: `helper ${this.error ? 'error' : ''} ${this.disabled ? 'disabled' : ''}` }, this.error && h("tds-icon", { key: '4aa60b3eceff171bdf799a7c7c9304654944c443', name: "error", size: "16px" }), this.helper))));
419
+ } }, h("slot", { key: '790885487da46ec88e05ad98272cbd43eb6fc7ac', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: '7d9c9f695c5dc2c734fa51a746c6c1c3547d5dec', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: 'b044b0d4dd3e39000fa0262a838aa860451e5986', class: `helper ${this.error ? 'error' : ''} ${this.disabled ? 'disabled' : ''}` }, this.error && h("tds-icon", { key: '506204fd3f113c6a903b616372660902295d0886', name: "error", size: "16px" }), this.helper))));
418
420
  }
419
421
  static get is() { return "tds-dropdown"; }
420
422
  static get encapsulation() { return "shadow"; }
@@ -695,12 +697,12 @@ export class TdsDropdown {
695
697
  "reflect": false,
696
698
  "defaultValue": "'No result'"
697
699
  },
698
- "initialValue": {
699
- "type": "any",
700
+ "defaultValue": {
701
+ "type": "string",
700
702
  "mutable": false,
701
703
  "complexType": {
702
- "original": "string | number | (string | number)[]",
703
- "resolved": "(string | number)[] | number | string",
704
+ "original": "string",
705
+ "resolved": "string",
704
706
  "references": {}
705
707
  },
706
708
  "required": false,
@@ -709,7 +711,7 @@ export class TdsDropdown {
709
711
  "tags": [],
710
712
  "text": "Default value selected in the Dropdown."
711
713
  },
712
- "attribute": "initial-value",
714
+ "attribute": "default-value",
713
715
  "reflect": false
714
716
  }
715
717
  };
@@ -734,8 +736,8 @@ export class TdsDropdown {
734
736
  "text": "Change event for the Dropdown."
735
737
  },
736
738
  "complexType": {
737
- "original": "{\n name: string;\n value: (string | number)[];\n }",
738
- "resolved": "{ name: string; value: (string | number)[]; }",
739
+ "original": "{\n name: string;\n value: string;\n }",
740
+ "resolved": "{ name: string; value: string; }",
739
741
  "references": {}
740
742
  }
741
743
  }, {
@@ -838,10 +840,10 @@ export class TdsDropdown {
838
840
  },
839
841
  "setValue": {
840
842
  "complexType": {
841
- "signature": "(value: string | number | (string | number)[], label?: string) => Promise<{ value: string | number; label: string; }[]>",
843
+ "signature": "(value: string | string[], label?: string) => Promise<{ value: string; label: string; }[]>",
842
844
  "parameters": [{
843
845
  "name": "value",
844
- "type": "string | number | (string | number)[]",
846
+ "type": "string | string[]",
845
847
  "docs": ""
846
848
  }, {
847
849
  "name": "label",
@@ -858,7 +860,7 @@ export class TdsDropdown {
858
860
  "id": "global::HTMLTdsDropdownOptionElement"
859
861
  }
860
862
  },
861
- "return": "Promise<{ value: string | number; label: string; }[]>"
863
+ "return": "Promise<{ value: string; label: string; }[]>"
862
864
  },
863
865
  "docs": {
864
866
  "text": "Method for setting the value of the Dropdown.\n\nSingle selection example:\n\n<code>\ndropdown.setValue('option-1', 'Option 1');\n</code>\n\nMultiselect example:\n\n<code>\ndropdown.setValue(['option-1', 'option-2']);\n</code>",
@@ -867,10 +869,10 @@ export class TdsDropdown {
867
869
  },
868
870
  "appendValue": {
869
871
  "complexType": {
870
- "signature": "(value: string | number) => Promise<void>",
872
+ "signature": "(value: string) => Promise<void>",
871
873
  "parameters": [{
872
874
  "name": "value",
873
- "type": "string | number",
875
+ "type": "string",
874
876
  "docs": ""
875
877
  }],
876
878
  "references": {
@@ -891,10 +893,10 @@ export class TdsDropdown {
891
893
  },
892
894
  "removeValue": {
893
895
  "complexType": {
894
- "signature": "(oldValue: string | number) => Promise<{ value: string | number; label: string; }[]>",
896
+ "signature": "(oldValue: string) => Promise<{ value: string; label: string; }[]>",
895
897
  "parameters": [{
896
898
  "name": "oldValue",
897
- "type": "string | number",
899
+ "type": "string",
898
900
  "docs": ""
899
901
  }],
900
902
  "references": {
@@ -907,7 +909,7 @@ export class TdsDropdown {
907
909
  "id": "global::HTMLTdsDropdownOptionElement"
908
910
  }
909
911
  },
910
- "return": "Promise<{ value: string | number; label: string; }[]>"
912
+ "return": "Promise<{ value: string; label: string; }[]>"
911
913
  },
912
914
  "docs": {
913
915
  "text": "Method for removing a selected value in the Dropdown.",
@@ -1,4 +1,4 @@
1
- import { h } from "@stencil/core";
1
+ import { h, } from "@stencil/core";
2
2
  import generateUniqueId from "../../utils/generateUniqueId";
3
3
  export class TdsSlider {
4
4
  constructor() {
@@ -16,6 +16,7 @@ export class TdsSlider {
16
16
  this.useSnapping = false;
17
17
  this.supposedValueSlot = -1;
18
18
  this.resizeObserverAdded = false;
19
+ this.resetEventListenerAdded = false;
19
20
  this.label = '';
20
21
  this.value = '0';
21
22
  this.min = '0';
@@ -295,26 +296,41 @@ export class TdsSlider {
295
296
  }
296
297
  this.calculateThumbLeftFromValue(this.value);
297
298
  this.updateTrack();
299
+ // Only set the initial value once:
300
+ if (!this.initialValue) {
301
+ this.initialValue = this.value;
302
+ }
303
+ }
304
+ componentDidRender() {
305
+ // Only add the event listener once:
306
+ if (!this.resetEventListenerAdded) {
307
+ const form = this.host.closest('form');
308
+ form.addEventListener('reset', () => {
309
+ this.forceValueUpdate(this.initialValue);
310
+ this.reset();
311
+ });
312
+ this.resetEventListenerAdded = true;
313
+ }
298
314
  }
299
315
  render() {
300
- return (h("div", { key: 'fd7d051192c33b19e8c68cbeaa50ea43149457bb', class: {
316
+ return (h("div", { key: '478b77234be1d2f650d972f633e0fa69373ddc15', class: {
301
317
  'tds-slider-wrapper': true,
302
318
  'read-only': this.readOnly,
303
- } }, h("input", { key: 'd2fe02893f865f5791736cb5f05b5bcd2494e471', class: "tds-slider-native-element", type: "range", name: this.name, min: this.min, max: this.max, value: this.value, disabled: this.disabled }), h("div", { key: '2d436a5654cb20923cd20ed61f9449bd0705edd2', class: {
319
+ } }, h("input", { key: '3df3c581b11ca0a4181335793eb67da17e7c677f', class: "tds-slider-native-element", type: "range", name: this.name, min: this.min, max: this.max, value: this.value, disabled: this.disabled }), h("div", { key: 'c45af15623d4036cdbd1cc40637a724da7cd1886', class: {
304
320
  'tds-slider': true,
305
321
  'disabled': this.disabled,
306
322
  'tds-slider-small': this.useSmall,
307
323
  }, ref: (el) => {
308
324
  this.wrapperElement = el;
309
- } }, h("label", { key: 'd9d444d15acabbbc23c7b7633e5312f405ff9120', class: this.showTickNumbers && 'offset' }, this.label), this.useInput && (h("div", { key: '2f0d0419138851724891e2ab04fef2f3b3e099f1', class: "tds-slider__input-values" }, h("div", { key: '7f23007c0f4a1aa6358ffa7c5aaae027d0927b63', class: "tds-slider__input-value min-value" }, this.min))), this.useControls && (h("div", { key: 'df4a00a40c541b83aa8459dfcdaf22c348e2c80a', class: "tds-slider__controls" }, h("div", { key: '96cc419d369098137895b725f97a8fa3d7d50dfc', class: "tds-slider__control tds-slider__control-minus", onClick: (event) => this.stepLeft(event) }, h("tds-icon", { key: '09ed43c9f2fe81baeada6a07e4cba18027f04ba1', name: "minus", size: "16px" })))), h("div", { key: '402647683b57076bd4ac3ce3d754585a89a48e08', class: "tds-slider-inner" }, this.tickValues.length > 0 && (h("div", { key: 'd80c648eca47c7e52725e967a32fe4a4692a5729', class: "tds-slider__value-dividers-wrapper" }, h("div", { key: '030106df49f12a55c1b32a9c1c257f449629644a', class: "tds-slider__value-dividers" }, this.tickValues.map((value) => (h("div", { class: "tds-slider__value-divider" }, this.showTickNumbers && h("span", null, value))))))), h("div", { key: 'fef7013f82a191c32bc3a4d297f5e10a4db127a1', class: "tds-slider__track", ref: (el) => {
325
+ } }, h("label", { key: '902c3a1ae75d70855bd8352324a8f6f3e75a6248', class: this.showTickNumbers && 'offset' }, this.label), this.useInput && (h("div", { key: 'd49c4c4e4e5c01ec7eb2e43765da935240066fc8', class: "tds-slider__input-values" }, h("div", { key: 'b29361d522e7db6f060554c8e21607b23ee900c9', class: "tds-slider__input-value min-value" }, this.min))), this.useControls && (h("div", { key: '8f6dabc200858de423c434572a7ac03f3e9b1b16', class: "tds-slider__controls" }, h("div", { key: '5bb7d9ce16760b992b4aca73e403d517452b2118', class: "tds-slider__control tds-slider__control-minus", onClick: (event) => this.stepLeft(event) }, h("tds-icon", { key: '5966ddd50b6b6780ba7f9e64ea74061ddfc01d81', name: "minus", size: "16px" })))), h("div", { key: 'a893175a93cbff981f73223b8f803ba4fe70d7ba', class: "tds-slider-inner" }, this.tickValues.length > 0 && (h("div", { key: 'c3a85f6ad96e8b057c879c43b09dc1af402fa7c3', class: "tds-slider__value-dividers-wrapper" }, h("div", { key: 'a167169954a6de1bb7b0695775ce15a795160a48', class: "tds-slider__value-dividers" }, this.tickValues.map((value) => (h("div", { class: "tds-slider__value-divider" }, this.showTickNumbers && h("span", null, value))))))), h("div", { key: '15d212b6e04b8200e1c8e07aeddc96ec46a3d11d', class: "tds-slider__track", ref: (el) => {
310
326
  this.trackElement = el;
311
- }, tabindex: this.disabled ? '-1' : '0' }, h("div", { key: '24a583182c45114d1e011bffef0f81f1e4f93a36', class: "tds-slider__track-fill", ref: (el) => {
327
+ }, tabindex: this.disabled ? '-1' : '0' }, h("div", { key: '208bcaae8fff5c5c0cf0cde765cdc2945c0dcaa1', class: "tds-slider__track-fill", ref: (el) => {
312
328
  this.trackFillElement = el;
313
- } }), h("div", { key: '3bea53237beb92f41264386fb5ac181d1e9966a4', class: "tds-slider__thumb", ref: (el) => {
329
+ } }), h("div", { key: '9cb48a58d4a4247336a5c8d58e365535b4b4a7f4', class: "tds-slider__thumb", ref: (el) => {
314
330
  this.thumbElement = el;
315
- }, onMouseDown: () => this.grabThumb(), onTouchStart: () => this.grabThumb() }, this.tooltip && (h("div", { key: '3ac44629cad3b03524602f9babe7fa4582b38660', class: "tds-slider__value" }, this.value, h("svg", { key: '5adbbcc274555d14454c5329f0eea8c072a3db2c', width: "18", height: "14", viewBox: "0 0 18 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '248b1f8521b89be4214631e411c0ba9c7bcc07a8', d: "M8.15882 12.6915L0.990487 1.54076C0.562658 0.875246 1.0405 0 1.83167 0H16.1683C16.9595 0 17.4373 0.875246 17.0095 1.54076L9.84118 12.6915C9.44754 13.3038 8.55246 13.3038 8.15882 12.6915Z", fill: "currentColor" })))), h("div", { key: 'bc778a9ccd25a5229aa7685cc6c22ed5385b9d98', class: "tds-slider__thumb-inner", ref: (el) => {
331
+ }, onMouseDown: () => this.grabThumb(), onTouchStart: () => this.grabThumb() }, this.tooltip && (h("div", { key: '52b88d0a51bb16c9c87199bcefc6165c613504d1', class: "tds-slider__value" }, this.value, h("svg", { key: '0e57a96dac780b70351c4aac112ad21a93cc5293', width: "18", height: "14", viewBox: "0 0 18 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'bfb6441c14afc4699195c30652d0b63cbe696264', d: "M8.15882 12.6915L0.990487 1.54076C0.562658 0.875246 1.0405 0 1.83167 0H16.1683C16.9595 0 17.4373 0.875246 17.0095 1.54076L9.84118 12.6915C9.44754 13.3038 8.55246 13.3038 8.15882 12.6915Z", fill: "currentColor" })))), h("div", { key: '60a2e5543226c9b283a16c9195d779e38e9ec77d', class: "tds-slider__thumb-inner", ref: (el) => {
316
332
  this.thumbInnerElement = el;
317
- } })))), this.useInput && (h("div", { key: '077ffffeb0986504a2c9fc4e1b08095ec689402c', class: "tds-slider__input-values" }, h("div", { key: '74a528a286e2b49a6739c5817cca8a0436b908b9', class: "tds-slider__input-value", onClick: (event) => this.stepLeft(event) }, this.max), h("div", { key: 'af2a647636c8eecba19637aa92ddda37adc52a1b', class: "tds-slider__input-field-wrapper" }, h("input", { key: '02701d15de6119994f7be13b9c9ac69ae6f2269b', size: this.calculateInputSizeFromMax(), class: "tds-slider__input-field", value: this.value, readOnly: this.readOnly, onBlur: (event) => this.updateSliderValueOnInputChange(event), onKeyDown: (event) => this.handleInputFieldEnterPress(event), type: "number", min: this.min, max: this.max })))), this.useControls && (h("div", { key: 'ef215ef613c381601674d4bb7dbea583a3ddde2a', class: "tds-slider__controls" }, h("div", { key: '4e553194348daf32529c9c8cedc32b0686ac32ff', class: "tds-slider__control tds-slider__control-plus", onClick: (event) => this.stepRight(event) }, h("tds-icon", { key: 'd5d67ea7ff64ed19d28bd078acad56ebda742f93', name: "plus", size: "16px" })))))));
333
+ } })))), this.useInput && (h("div", { key: 'f2b33ee9181c5043ef9a317c65903c95952166f9', class: "tds-slider__input-values" }, h("div", { key: '64494cbab8e9502857e20f264db20395420914ca', class: "tds-slider__input-value", onClick: (event) => this.stepLeft(event) }, this.max), h("div", { key: '05d8485c2c386648b9d72c327b483977755ff746', class: "tds-slider__input-field-wrapper" }, h("input", { key: 'a1c78406290cdca1f24af959699823f656bb8bad', size: this.calculateInputSizeFromMax(), class: "tds-slider__input-field", value: this.value, readOnly: this.readOnly, onBlur: (event) => this.updateSliderValueOnInputChange(event), onKeyDown: (event) => this.handleInputFieldEnterPress(event), type: "number", min: this.min, max: this.max })))), this.useControls && (h("div", { key: 'df1cd75920b192ec5e4ee490a66353ef72b09942', class: "tds-slider__controls" }, h("div", { key: '9b1fe4d993155f225025e8e7b265673f962e73da', class: "tds-slider__control tds-slider__control-plus", onClick: (event) => this.stepRight(event) }, h("tds-icon", { key: '785a35d6e6b9c3c033b3df66b0849541511f97f5', name: "plus", size: "16px" })))))));
318
334
  }
319
335
  static get is() { return "tds-slider"; }
320
336
  static get originalStyleUrls() {
@@ -673,6 +689,7 @@ export class TdsSlider {
673
689
  }
674
690
  };
675
691
  }
692
+ static get elementRef() { return "host"; }
676
693
  static get watchers() {
677
694
  return [{
678
695
  "propName": "value",
@@ -130,7 +130,7 @@ export class TdsTableFooter {
130
130
  return (h(Host, { key: 'ef2cd69929908fa46254c82d0799c1b1a4ee52b3', class: {
131
131
  'tds-table--compact': this.compactDesign,
132
132
  'footer__horizontal-scroll': !!this.horizontalScrollWidth,
133
- }, style: this.getStyles() }, h("tr", { key: 'f18eb0b2a49d1d8df9dacc998138dae4e5f8d256', class: "tds-table__footer-row" }, h("td", { key: 'abb1f6f2971c9fa9b68bfb856882817406d0d87f', class: "tds-table__footer-cell", colSpan: this.columnsNumber }, this.pagination && (h("div", { key: '8226ac0aee40b97cad90035ff9aba54b8365b960', class: "tds-table__pagination" }, h("div", { key: '9b604d5ccb7dbdac0cdb1bc96567d7b29d7fa250', class: "tds-table__row-selector" }, this.rowsperpage && ((_a = this.rowsPerPageValues) === null || _a === void 0 ? void 0 : _a.length) > 0 && (h("div", { key: '716b6830e891305611ceb6213bd696298dbcfe12', class: "rows-per-page" }, h("p", { key: 'd6b7bfff5262fcf0174f6b2d92dcfdedda97dfc2' }, "Rows per page"), h("tds-dropdown", { key: '9da6799f30172a1628a4630aa5474456f6351089', modeVariant: "secondary", id: "rows-dropdown", class: "page-dropdown", size: "xs", initialValue: `${this.rowsPerPageValues[0]}`, onTdsChange: (event) => this.rowsPerPageChange(event) }, this.rowsPerPageValues.map((value) => {
133
+ }, style: this.getStyles() }, h("tr", { key: 'f18eb0b2a49d1d8df9dacc998138dae4e5f8d256', class: "tds-table__footer-row" }, h("td", { key: 'abb1f6f2971c9fa9b68bfb856882817406d0d87f', class: "tds-table__footer-cell", colSpan: this.columnsNumber }, this.pagination && (h("div", { key: '8226ac0aee40b97cad90035ff9aba54b8365b960', class: "tds-table__pagination" }, h("div", { key: '9b604d5ccb7dbdac0cdb1bc96567d7b29d7fa250', class: "tds-table__row-selector" }, this.rowsperpage && ((_a = this.rowsPerPageValues) === null || _a === void 0 ? void 0 : _a.length) > 0 && (h("div", { key: '716b6830e891305611ceb6213bd696298dbcfe12', class: "rows-per-page" }, h("p", { key: 'd6b7bfff5262fcf0174f6b2d92dcfdedda97dfc2' }, "Rows per page"), h("tds-dropdown", { key: '9da6799f30172a1628a4630aa5474456f6351089', modeVariant: "secondary", id: "rows-dropdown", class: "page-dropdown", size: "xs", defaultValue: `${this.rowsPerPageValues[0]}`, onTdsChange: (event) => this.rowsPerPageChange(event) }, this.rowsPerPageValues.map((value) => {
134
134
  return (h("tds-dropdown-option", { value: `${value}` }, value));
135
135
  }))))), h("div", { key: '73c5849886a0144c22b79d31b92a607d8f794483', class: "tds-table__page-selector" }, h("input", { key: 'a297fd5b739df5d4353b045a25ba6e480dbad03e', ref: (element) => (this.inputElement = element), class: "tds-table__page-selector-input", type: "number", min: "1", max: this.pages, value: this.paginationValue, pattern: "[0-9]+", dir: "ltr", onChange: (event) => this.paginationInputChange(event), onAnimationEnd: removeShakeAnimation }), h("p", { key: 'f6d1257c745638b2152843d52c494db23d26b2ca', class: "tds-table__footer-text" }, "of ", h("span", { key: '81b8c076cf322798709eafae1fad43b036127ada' }, this.pages), " pages"), h("button", { key: 'd9789d9d6ccd45f1d0c4e4d427c3ed1bb13e7440', type: "button", class: "tds-table__footer-btn", disabled: this.paginationValue <= 1, onClick: () => this.firstPage() }, h("tds-icon", { key: 'dac60e50f54fd71ae1d89e21e6140bbcbbda6680', name: "skip_backwards", size: "20px" })), h("button", { key: '39810bac01a38c71427192beea48257b7d2dd2b1', type: "button", class: "tds-table__footer-btn", disabled: this.paginationValue <= 1, onClick: () => this.previousPage() }, h("tds-icon", { key: '2987abbbdc7be2c7485d7bfcabcafe94983f5f54', name: "chevron_left", size: "20px" })), h("button", { key: '2252c555a816a4014c130b05ae70d2e25893f460', type: "button", class: "tds-table__footer-btn", disabled: this.paginationValue >= this.pages, onClick: () => this.nextPage() }, h("tds-icon", { key: 'a19c83f25082c82cdac308d3538c274bbce62826', name: "chevron_right", size: "20px" })), h("button", { key: 'e06ec885711559b6e7893d90ada5057292f624e0', type: "button", class: "tds-table__footer-btn", disabled: this.paginationValue >= this.pages, onClick: () => this.lastPage() }, h("tds-icon", { key: '6a8f4218a45cc5bdbb0c8b0711e802ce5f2dfed1', name: "skip_forward", size: "20px" })))))))));
136
136
  }
@@ -72,15 +72,17 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
72
72
  this.tdsBlur = createEvent(this, "tdsBlur", 6);
73
73
  this.tdsInput = createEvent(this, "tdsInput", 6);
74
74
  this.setDefaultOption = () => {
75
- if (this.initialValue) {
75
+ if (this.defaultValue) {
76
76
  const children = Array.from(this.host.children).filter((element) => element.tagName === 'TDS-DROPDOWN-OPTION');
77
77
  if (children.length === 0) {
78
78
  console.warn('TDS DROPDOWN: No options found. Disregard if loading data asynchronously.');
79
79
  return;
80
80
  }
81
- const initialValues = typeof this.initialValue === 'object' ? this.initialValue : [this.initialValue];
81
+ const defaultValues = this.multiselect
82
+ ? new Set(this.defaultValue.split(','))
83
+ : [this.defaultValue];
82
84
  const childrenMap = new Map(children.map((element) => [element.value, element]));
83
- const matchedValues = Array.from(initialValues).filter((value) => {
85
+ const matchedValues = Array.from(defaultValues).filter((value) => {
84
86
  const element = childrenMap.get(value);
85
87
  if (element) {
86
88
  element.setSelected(true);
@@ -93,7 +95,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
93
95
  this.setValueAttribute();
94
96
  }
95
97
  else {
96
- console.warn(`TDS DROPDOWN: No matching option found for initialValue "${this.initialValue}"`);
98
+ console.warn(`TDS DROPDOWN: No matching option found for defaultValue "${this.defaultValue}"`);
97
99
  }
98
100
  }
99
101
  };
@@ -209,7 +211,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
209
211
  var _a, _b;
210
212
  this.tdsChange.emit({
211
213
  name: this.name,
212
- value: (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value)) !== null && _b !== void 0 ? _b : null,
214
+ value: (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value).toString()) !== null && _b !== void 0 ? _b : null,
213
215
  });
214
216
  };
215
217
  this.name = undefined;
@@ -227,7 +229,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
227
229
  this.filter = false;
228
230
  this.normalizeText = true;
229
231
  this.noResultText = 'No result';
230
- this.initialValue = undefined;
232
+ this.defaultValue = undefined;
231
233
  this.open = false;
232
234
  this.value = undefined;
233
235
  this.filterResult = undefined;
@@ -263,7 +265,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
263
265
  // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
264
266
  async setValue(value, label) {
265
267
  let nextValue;
266
- if (typeof value === 'string' || typeof value === 'number')
268
+ if (typeof value === 'string')
267
269
  nextValue = [value];
268
270
  else
269
271
  nextValue = value;
@@ -419,7 +421,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
419
421
  render() {
420
422
  var _a, _b, _c, _d;
421
423
  appendHiddenInput(this.host, this.name, (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value).toString(), this.disabled);
422
- return (h(Host, { key: 'afd54c5eb55a6824c302dc4c8ede449cee82c085', role: "select", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, this.label && this.labelPosition === 'outside' && (h("div", { key: 'bb96452b5c240e55e9b4b2598b9da90e4901922c', class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '3daa5d2f3e70a8619d4b8a3b2a9a73abb9709419', class: `dropdown-select ${this.size} ${this.disabled ? 'disabled' : ''}` }, this.filter ? (h("div", { class: {
424
+ return (h(Host, { key: '1c4995be9b1e47e254ec9976b334c4d74a44263b', role: "select", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, this.label && this.labelPosition === 'outside' && (h("div", { key: 'ad423934dedc56ff39d06bf7746e47d011bed002', class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '99c87c0add1152f47533bf6ef5e6794cffdbb18c', class: `dropdown-select ${this.size} ${this.disabled ? 'disabled' : ''}` }, this.filter ? (h("div", { class: {
423
425
  filter: true,
424
426
  focus: this.filterFocus,
425
427
  disabled: this.disabled,
@@ -469,7 +471,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
469
471
  label-inside-as-placeholder
470
472
  ${this.size}
471
473
  ${((_c = this.value) === null || _c === void 0 ? void 0 : _c.length) ? 'selected' : ''}
472
- ` }, 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: 'e06e0d2da1ff7b630c450b4d7c4b791c1e49bb09', ref: (element) => (this.dropdownList = element), class: {
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: 'dd850ac34b473f9cac51ad5bdc8417d994b7946a', ref: (element) => (this.dropdownList = element), class: {
473
475
  'dropdown-list': true,
474
476
  [this.size]: true,
475
477
  [this.getOpenDirection()]: true,
@@ -478,7 +480,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
478
480
  'closed': !this.open,
479
481
  [`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
480
482
  [`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
481
- } }, h("slot", { key: '663ec973bc3c5fee4ebef6bb785e04057544ee89', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: 'ed64eb54675e70489efbe411f639ef4377f7b547', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: '00f483bcce9f59ce93791a49ca039d13385ac920', class: `helper ${this.error ? 'error' : ''} ${this.disabled ? 'disabled' : ''}` }, this.error && h("tds-icon", { key: '4aa60b3eceff171bdf799a7c7c9304654944c443', name: "error", size: "16px" }), this.helper))));
483
+ } }, h("slot", { key: '790885487da46ec88e05ad98272cbd43eb6fc7ac', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: '7d9c9f695c5dc2c734fa51a746c6c1c3547d5dec', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: 'b044b0d4dd3e39000fa0262a838aa860451e5986', class: `helper ${this.error ? 'error' : ''} ${this.disabled ? 'disabled' : ''}` }, this.error && h("tds-icon", { key: '506204fd3f113c6a903b616372660902295d0886', name: "error", size: "16px" }), this.helper))));
482
484
  }
483
485
  get host() { return this; }
484
486
  static get watchers() { return {
@@ -501,7 +503,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
501
503
  "filter": [4],
502
504
  "normalizeText": [4, "normalize-text"],
503
505
  "noResultText": [1, "no-result-text"],
504
- "initialValue": [8, "initial-value"],
506
+ "defaultValue": [1, "default-value"],
505
507
  "open": [32],
506
508
  "value": [32],
507
509
  "filterResult": [32],
@@ -71,7 +71,7 @@ const TdsDropdownOption = /*@__PURE__*/ proxyCustomElement(class TdsDropdownOpti
71
71
  this.selected = selected;
72
72
  }
73
73
  render() {
74
- return (h(Host, { key: '98f57bb76aa504cbacbd40cbd1c76648f678b58f', role: "option", "aria-disabled": this.disabled, "aria-selected": this.selected }, h("div", { key: 'd22f24e290fc61c14c8b9ca1c908bafd466f6d97', class: `dropdown-option
74
+ return (h(Host, { key: '1cb00a19c5dbcc47e1b2bc97d1d5ccc8ac5a532a', role: "option", "aria-disabled": this.disabled, "aria-selected": this.selected }, h("div", { key: '5deaf44c7306f4b1856200bf0a5640e99fcb449d', class: `dropdown-option
75
75
  ${this.size}
76
76
  ${this.selected ? 'selected' : ''}
77
77
  ${this.disabled ? 'disabled' : ''}
@@ -91,7 +91,7 @@ const TdsDropdownOption = /*@__PURE__*/ proxyCustomElement(class TdsDropdownOpti
91
91
  get host() { return this; }
92
92
  static get style() { return TdsDropdownOptionStyle0; }
93
93
  }, [17, "tds-dropdown-option", {
94
- "value": [8],
94
+ "value": [1],
95
95
  "disabled": [4],
96
96
  "selected": [32],
97
97
  "multiselect": [32],
@@ -1,4 +1,4 @@
1
- import { T as TdsDropdownOption$1, d as defineCustomElement$1 } from './p-6dcd4146.js';
1
+ import { T as TdsDropdownOption$1, d as defineCustomElement$1 } from './p-462b77e8.js';
2
2
 
3
3
  const TdsDropdownOption = TdsDropdownOption$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { T as TdsDropdown$1, d as defineCustomElement$1 } from './p-47c3b5c5.js';
1
+ import { T as TdsDropdown$1, d as defineCustomElement$1 } from './p-2523819c.js';
2
2
 
3
3
  const TdsDropdown = TdsDropdown$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -25,6 +25,7 @@ const TdsSlider$1 = /*@__PURE__*/ proxyCustomElement(class TdsSlider extends H {
25
25
  this.useSnapping = false;
26
26
  this.supposedValueSlot = -1;
27
27
  this.resizeObserverAdded = false;
28
+ this.resetEventListenerAdded = false;
28
29
  this.label = '';
29
30
  this.value = '0';
30
31
  this.min = '0';
@@ -302,27 +303,43 @@ const TdsSlider$1 = /*@__PURE__*/ proxyCustomElement(class TdsSlider extends H {
302
303
  }
303
304
  this.calculateThumbLeftFromValue(this.value);
304
305
  this.updateTrack();
306
+ // Only set the initial value once:
307
+ if (!this.initialValue) {
308
+ this.initialValue = this.value;
309
+ }
310
+ }
311
+ componentDidRender() {
312
+ // Only add the event listener once:
313
+ if (!this.resetEventListenerAdded) {
314
+ const form = this.host.closest('form');
315
+ form.addEventListener('reset', () => {
316
+ this.forceValueUpdate(this.initialValue);
317
+ this.reset();
318
+ });
319
+ this.resetEventListenerAdded = true;
320
+ }
305
321
  }
306
322
  render() {
307
- return (h("div", { key: 'fd7d051192c33b19e8c68cbeaa50ea43149457bb', class: {
323
+ return (h("div", { key: '478b77234be1d2f650d972f633e0fa69373ddc15', class: {
308
324
  'tds-slider-wrapper': true,
309
325
  'read-only': this.readOnly,
310
- } }, h("input", { key: 'd2fe02893f865f5791736cb5f05b5bcd2494e471', class: "tds-slider-native-element", type: "range", name: this.name, min: this.min, max: this.max, value: this.value, disabled: this.disabled }), h("div", { key: '2d436a5654cb20923cd20ed61f9449bd0705edd2', class: {
326
+ } }, h("input", { key: '3df3c581b11ca0a4181335793eb67da17e7c677f', class: "tds-slider-native-element", type: "range", name: this.name, min: this.min, max: this.max, value: this.value, disabled: this.disabled }), h("div", { key: 'c45af15623d4036cdbd1cc40637a724da7cd1886', class: {
311
327
  'tds-slider': true,
312
328
  'disabled': this.disabled,
313
329
  'tds-slider-small': this.useSmall,
314
330
  }, ref: (el) => {
315
331
  this.wrapperElement = el;
316
- } }, h("label", { key: 'd9d444d15acabbbc23c7b7633e5312f405ff9120', class: this.showTickNumbers && 'offset' }, this.label), this.useInput && (h("div", { key: '2f0d0419138851724891e2ab04fef2f3b3e099f1', class: "tds-slider__input-values" }, h("div", { key: '7f23007c0f4a1aa6358ffa7c5aaae027d0927b63', class: "tds-slider__input-value min-value" }, this.min))), this.useControls && (h("div", { key: 'df4a00a40c541b83aa8459dfcdaf22c348e2c80a', class: "tds-slider__controls" }, h("div", { key: '96cc419d369098137895b725f97a8fa3d7d50dfc', class: "tds-slider__control tds-slider__control-minus", onClick: (event) => this.stepLeft(event) }, h("tds-icon", { key: '09ed43c9f2fe81baeada6a07e4cba18027f04ba1', name: "minus", size: "16px" })))), h("div", { key: '402647683b57076bd4ac3ce3d754585a89a48e08', class: "tds-slider-inner" }, this.tickValues.length > 0 && (h("div", { key: 'd80c648eca47c7e52725e967a32fe4a4692a5729', class: "tds-slider__value-dividers-wrapper" }, h("div", { key: '030106df49f12a55c1b32a9c1c257f449629644a', class: "tds-slider__value-dividers" }, this.tickValues.map((value) => (h("div", { class: "tds-slider__value-divider" }, this.showTickNumbers && h("span", null, value))))))), h("div", { key: 'fef7013f82a191c32bc3a4d297f5e10a4db127a1', class: "tds-slider__track", ref: (el) => {
332
+ } }, h("label", { key: '902c3a1ae75d70855bd8352324a8f6f3e75a6248', class: this.showTickNumbers && 'offset' }, this.label), this.useInput && (h("div", { key: 'd49c4c4e4e5c01ec7eb2e43765da935240066fc8', class: "tds-slider__input-values" }, h("div", { key: 'b29361d522e7db6f060554c8e21607b23ee900c9', class: "tds-slider__input-value min-value" }, this.min))), this.useControls && (h("div", { key: '8f6dabc200858de423c434572a7ac03f3e9b1b16', class: "tds-slider__controls" }, h("div", { key: '5bb7d9ce16760b992b4aca73e403d517452b2118', class: "tds-slider__control tds-slider__control-minus", onClick: (event) => this.stepLeft(event) }, h("tds-icon", { key: '5966ddd50b6b6780ba7f9e64ea74061ddfc01d81', name: "minus", size: "16px" })))), h("div", { key: 'a893175a93cbff981f73223b8f803ba4fe70d7ba', class: "tds-slider-inner" }, this.tickValues.length > 0 && (h("div", { key: 'c3a85f6ad96e8b057c879c43b09dc1af402fa7c3', class: "tds-slider__value-dividers-wrapper" }, h("div", { key: 'a167169954a6de1bb7b0695775ce15a795160a48', class: "tds-slider__value-dividers" }, this.tickValues.map((value) => (h("div", { class: "tds-slider__value-divider" }, this.showTickNumbers && h("span", null, value))))))), h("div", { key: '15d212b6e04b8200e1c8e07aeddc96ec46a3d11d', class: "tds-slider__track", ref: (el) => {
317
333
  this.trackElement = el;
318
- }, tabindex: this.disabled ? '-1' : '0' }, h("div", { key: '24a583182c45114d1e011bffef0f81f1e4f93a36', class: "tds-slider__track-fill", ref: (el) => {
334
+ }, tabindex: this.disabled ? '-1' : '0' }, h("div", { key: '208bcaae8fff5c5c0cf0cde765cdc2945c0dcaa1', class: "tds-slider__track-fill", ref: (el) => {
319
335
  this.trackFillElement = el;
320
- } }), h("div", { key: '3bea53237beb92f41264386fb5ac181d1e9966a4', class: "tds-slider__thumb", ref: (el) => {
336
+ } }), h("div", { key: '9cb48a58d4a4247336a5c8d58e365535b4b4a7f4', class: "tds-slider__thumb", ref: (el) => {
321
337
  this.thumbElement = el;
322
- }, onMouseDown: () => this.grabThumb(), onTouchStart: () => this.grabThumb() }, this.tooltip && (h("div", { key: '3ac44629cad3b03524602f9babe7fa4582b38660', class: "tds-slider__value" }, this.value, h("svg", { key: '5adbbcc274555d14454c5329f0eea8c072a3db2c', width: "18", height: "14", viewBox: "0 0 18 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '248b1f8521b89be4214631e411c0ba9c7bcc07a8', d: "M8.15882 12.6915L0.990487 1.54076C0.562658 0.875246 1.0405 0 1.83167 0H16.1683C16.9595 0 17.4373 0.875246 17.0095 1.54076L9.84118 12.6915C9.44754 13.3038 8.55246 13.3038 8.15882 12.6915Z", fill: "currentColor" })))), h("div", { key: 'bc778a9ccd25a5229aa7685cc6c22ed5385b9d98', class: "tds-slider__thumb-inner", ref: (el) => {
338
+ }, onMouseDown: () => this.grabThumb(), onTouchStart: () => this.grabThumb() }, this.tooltip && (h("div", { key: '52b88d0a51bb16c9c87199bcefc6165c613504d1', class: "tds-slider__value" }, this.value, h("svg", { key: '0e57a96dac780b70351c4aac112ad21a93cc5293', width: "18", height: "14", viewBox: "0 0 18 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'bfb6441c14afc4699195c30652d0b63cbe696264', d: "M8.15882 12.6915L0.990487 1.54076C0.562658 0.875246 1.0405 0 1.83167 0H16.1683C16.9595 0 17.4373 0.875246 17.0095 1.54076L9.84118 12.6915C9.44754 13.3038 8.55246 13.3038 8.15882 12.6915Z", fill: "currentColor" })))), h("div", { key: '60a2e5543226c9b283a16c9195d779e38e9ec77d', class: "tds-slider__thumb-inner", ref: (el) => {
323
339
  this.thumbInnerElement = el;
324
- } })))), this.useInput && (h("div", { key: '077ffffeb0986504a2c9fc4e1b08095ec689402c', class: "tds-slider__input-values" }, h("div", { key: '74a528a286e2b49a6739c5817cca8a0436b908b9', class: "tds-slider__input-value", onClick: (event) => this.stepLeft(event) }, this.max), h("div", { key: 'af2a647636c8eecba19637aa92ddda37adc52a1b', class: "tds-slider__input-field-wrapper" }, h("input", { key: '02701d15de6119994f7be13b9c9ac69ae6f2269b', size: this.calculateInputSizeFromMax(), class: "tds-slider__input-field", value: this.value, readOnly: this.readOnly, onBlur: (event) => this.updateSliderValueOnInputChange(event), onKeyDown: (event) => this.handleInputFieldEnterPress(event), type: "number", min: this.min, max: this.max })))), this.useControls && (h("div", { key: 'ef215ef613c381601674d4bb7dbea583a3ddde2a', class: "tds-slider__controls" }, h("div", { key: '4e553194348daf32529c9c8cedc32b0686ac32ff', class: "tds-slider__control tds-slider__control-plus", onClick: (event) => this.stepRight(event) }, h("tds-icon", { key: 'd5d67ea7ff64ed19d28bd078acad56ebda742f93', name: "plus", size: "16px" })))))));
340
+ } })))), this.useInput && (h("div", { key: 'f2b33ee9181c5043ef9a317c65903c95952166f9', class: "tds-slider__input-values" }, h("div", { key: '64494cbab8e9502857e20f264db20395420914ca', class: "tds-slider__input-value", onClick: (event) => this.stepLeft(event) }, this.max), h("div", { key: '05d8485c2c386648b9d72c327b483977755ff746', class: "tds-slider__input-field-wrapper" }, h("input", { key: 'a1c78406290cdca1f24af959699823f656bb8bad', size: this.calculateInputSizeFromMax(), class: "tds-slider__input-field", value: this.value, readOnly: this.readOnly, onBlur: (event) => this.updateSliderValueOnInputChange(event), onKeyDown: (event) => this.handleInputFieldEnterPress(event), type: "number", min: this.min, max: this.max })))), this.useControls && (h("div", { key: 'df1cd75920b192ec5e4ee490a66353ef72b09942', class: "tds-slider__controls" }, h("div", { key: '9b1fe4d993155f225025e8e7b265673f962e73da', class: "tds-slider__control tds-slider__control-plus", onClick: (event) => this.stepRight(event) }, h("tds-icon", { key: '785a35d6e6b9c3c033b3df66b0849541511f97f5', name: "plus", size: "16px" })))))));
325
341
  }
342
+ get host() { return this; }
326
343
  static get watchers() { return {
327
344
  "value": ["handleValueUpdate"]
328
345
  }; }
@@ -1,7 +1,7 @@
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-47c3b5c5.js';
4
- import { d as defineCustomElement$3 } from './p-6dcd4146.js';
3
+ import { d as defineCustomElement$4 } from './p-2523819c.js';
4
+ import { d as defineCustomElement$3 } from './p-462b77e8.js';
5
5
  import { d as defineCustomElement$2 } from './p-18c1245b.js';
6
6
 
7
7
  const tableFooterCss = ":host{box-sizing:border-box;display:table-footer-group;height:var(--tds-spacing-element-48)}:host *{box-sizing:border-box}:host .tds-table__footer-row{background-color:var(--tds-table-footer-background);color:var(--tds-table-color)}:host .tds-table__footer-cell{padding:0 var(--tds-spacing-element-16)}:host .tds-table__footer-cell .tds-table__pagination{height:var(--tds-spacing-element-48);display:flex;align-items:center;justify-content:space-between}:host .tds-table__footer-cell .tds-table__pagination .tds-table__row-selector,:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector{display:flex;align-items:center}:host .tds-table__footer-cell .tds-table__pagination .tds-table__row-selector .rows-per-page,:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector .rows-per-page{display:flex;align-items:center;margin-right:var(--tds-spacing-element-16)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__row-selector .rows-per-page p,:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector .rows-per-page p{margin-right:var(--tds-spacing-element-8)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector-input{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);background-color:var(--tds-table-footer-page-selector-input-background);color:var(--tds-table-color);width:74px;height:30px;border:none;border-radius:var(--tds-spacing-element-4);transition:background-color 250ms ease;margin-right:var(--tds-spacing-element-4);padding-left:var(--tds-spacing-element-16)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector-input:hover{background-color:var(--tds-table-footer-page-selector-input-background-hover)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector-input:disabled{color:var(--tds-table-footer-page-selector-input-color-disabled)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector-input--shake{animation:tds-shake-animation 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;transform:translate3d(0, 0, 0);backface-visibility:hidden;perspective:1000px}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-text{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:1px 8px 0 0}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn{display:flex;justify-content:center;align-items:center;border:none;background-color:transparent;cursor:pointer;height:var(--tds-spacing-element-32);width:var(--tds-spacing-element-32);border-radius:var(--tds-spacing-element-4);transition:background-color 250ms ease;color:var(--tds-table-footer-page-selector-icon)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn:hover{background-color:var(--tds-table-footer-btn-hover)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn:disabled{cursor:default;color:var(--tds-table-footer-page-selector-icon-disabled)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn:disabled:hover{background-color:transparent}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn-svg{height:var(--tds-spacing-element-20);width:var(--tds-spacing-element-20);fill:var(--tds-table-color)}:host(.tds-table--compact){height:var(--tds-spacing-element-32)}:host(.tds-table--compact) .tds-table__footer-cell .tds-table__pagination{height:var(--tds-spacing-element-32)}:host(.tds-table--compact) .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector-input{height:var(--tds-spacing-element-24)}:host(.tds-table--compact) .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn{height:28px;width:28px}:host(.footer__horizontal-scroll){display:inline-table;position:absolute;margin-top:10px}@keyframes tds-shake-animation{10%,90%{transform:translate3d(-1px, 0, 0)}20%,80%{transform:translate3d(2px, 0, 0)}30%,50%,70%{transform:translate3d(-4px, 0, 0)}40%,60%{transform:translate3d(4px, 0, 0)}}tds-dropdown:focus-within::after{content:\"\";position:absolute;bottom:0;left:0;height:100%;width:100%;background-color:transparent;border-radius:var(--tds-spacing-element-4);pointer-events:none;outline:2px solid var(--tds-blue-400);outline-offset:-2px}";
@@ -142,7 +142,7 @@ const TdsTableFooter$1 = /*@__PURE__*/ proxyCustomElement(class TdsTableFooter e
142
142
  return (h(Host, { key: 'ef2cd69929908fa46254c82d0799c1b1a4ee52b3', class: {
143
143
  'tds-table--compact': this.compactDesign,
144
144
  'footer__horizontal-scroll': !!this.horizontalScrollWidth,
145
- }, style: this.getStyles() }, h("tr", { key: 'f18eb0b2a49d1d8df9dacc998138dae4e5f8d256', class: "tds-table__footer-row" }, h("td", { key: 'abb1f6f2971c9fa9b68bfb856882817406d0d87f', class: "tds-table__footer-cell", colSpan: this.columnsNumber }, this.pagination && (h("div", { key: '8226ac0aee40b97cad90035ff9aba54b8365b960', class: "tds-table__pagination" }, h("div", { key: '9b604d5ccb7dbdac0cdb1bc96567d7b29d7fa250', class: "tds-table__row-selector" }, this.rowsperpage && ((_a = this.rowsPerPageValues) === null || _a === void 0 ? void 0 : _a.length) > 0 && (h("div", { key: '716b6830e891305611ceb6213bd696298dbcfe12', class: "rows-per-page" }, h("p", { key: 'd6b7bfff5262fcf0174f6b2d92dcfdedda97dfc2' }, "Rows per page"), h("tds-dropdown", { key: '9da6799f30172a1628a4630aa5474456f6351089', modeVariant: "secondary", id: "rows-dropdown", class: "page-dropdown", size: "xs", initialValue: `${this.rowsPerPageValues[0]}`, onTdsChange: (event) => this.rowsPerPageChange(event) }, this.rowsPerPageValues.map((value) => {
145
+ }, style: this.getStyles() }, h("tr", { key: 'f18eb0b2a49d1d8df9dacc998138dae4e5f8d256', class: "tds-table__footer-row" }, h("td", { key: 'abb1f6f2971c9fa9b68bfb856882817406d0d87f', class: "tds-table__footer-cell", colSpan: this.columnsNumber }, this.pagination && (h("div", { key: '8226ac0aee40b97cad90035ff9aba54b8365b960', class: "tds-table__pagination" }, h("div", { key: '9b604d5ccb7dbdac0cdb1bc96567d7b29d7fa250', class: "tds-table__row-selector" }, this.rowsperpage && ((_a = this.rowsPerPageValues) === null || _a === void 0 ? void 0 : _a.length) > 0 && (h("div", { key: '716b6830e891305611ceb6213bd696298dbcfe12', class: "rows-per-page" }, h("p", { key: 'd6b7bfff5262fcf0174f6b2d92dcfdedda97dfc2' }, "Rows per page"), h("tds-dropdown", { key: '9da6799f30172a1628a4630aa5474456f6351089', modeVariant: "secondary", id: "rows-dropdown", class: "page-dropdown", size: "xs", defaultValue: `${this.rowsPerPageValues[0]}`, onTdsChange: (event) => this.rowsPerPageChange(event) }, this.rowsPerPageValues.map((value) => {
146
146
  return (h("tds-dropdown-option", { value: `${value}` }, value));
147
147
  }))))), h("div", { key: '73c5849886a0144c22b79d31b92a607d8f794483', class: "tds-table__page-selector" }, h("input", { key: 'a297fd5b739df5d4353b045a25ba6e480dbad03e', ref: (element) => (this.inputElement = element), class: "tds-table__page-selector-input", type: "number", min: "1", max: this.pages, value: this.paginationValue, pattern: "[0-9]+", dir: "ltr", onChange: (event) => this.paginationInputChange(event), onAnimationEnd: removeShakeAnimation }), h("p", { key: 'f6d1257c745638b2152843d52c494db23d26b2ca', class: "tds-table__footer-text" }, "of ", h("span", { key: '81b8c076cf322798709eafae1fad43b036127ada' }, this.pages), " pages"), h("button", { key: 'd9789d9d6ccd45f1d0c4e4d427c3ed1bb13e7440', type: "button", class: "tds-table__footer-btn", disabled: this.paginationValue <= 1, onClick: () => this.firstPage() }, h("tds-icon", { key: 'dac60e50f54fd71ae1d89e21e6140bbcbbda6680', name: "skip_backwards", size: "20px" })), h("button", { key: '39810bac01a38c71427192beea48257b7d2dd2b1', type: "button", class: "tds-table__footer-btn", disabled: this.paginationValue <= 1, onClick: () => this.previousPage() }, h("tds-icon", { key: '2987abbbdc7be2c7485d7bfcabcafe94983f5f54', name: "chevron_left", size: "20px" })), h("button", { key: '2252c555a816a4014c130b05ae70d2e25893f460', type: "button", class: "tds-table__footer-btn", disabled: this.paginationValue >= this.pages, onClick: () => this.nextPage() }, h("tds-icon", { key: 'a19c83f25082c82cdac308d3538c274bbce62826', name: "chevron_right", size: "20px" })), h("button", { key: 'e06ec885711559b6e7893d90ada5057292f624e0', type: "button", class: "tds-table__footer-btn", disabled: this.paginationValue >= this.pages, onClick: () => this.lastPage() }, h("tds-icon", { key: '6a8f4218a45cc5bdbb0c8b0711e802ce5f2dfed1', name: "skip_forward", size: "20px" })))))))));
148
148
  }