@scania/tegel 1.23.0-feat-dropdown-allow-numbers-testing-2-beta.3 → 1.23.0-fix-form-components-slider-reset-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/tds-dropdown_2.cjs.entry.js +18 -51
  3. package/dist/cjs/tds-slider.cjs.entry.js +32 -7
  4. package/dist/cjs/tds-table-footer.cjs.entry.js +1 -1
  5. package/dist/cjs/tds-tooltip.cjs.entry.js +1 -1
  6. package/dist/cjs/tegel.cjs.js +1 -1
  7. package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +10 -12
  8. package/dist/collection/components/dropdown/dropdown.js +28 -59
  9. package/dist/collection/components/slider/slider.js +33 -8
  10. package/dist/collection/components/table/table-footer/table-footer.js +1 -1
  11. package/dist/collection/components/tooltip/tooltip.css +5 -0
  12. package/dist/components/{p-24467411.js → p-2523819c.js} +14 -45
  13. package/dist/components/{p-3687e4bf.js → p-462b77e8.js} +6 -8
  14. package/dist/components/tds-dropdown-option.js +1 -1
  15. package/dist/components/tds-dropdown.js +1 -1
  16. package/dist/components/tds-slider.js +32 -7
  17. package/dist/components/tds-table-footer.js +3 -3
  18. package/dist/components/tds-tooltip.js +1 -1
  19. package/dist/esm/loader.js +1 -1
  20. package/dist/esm/tds-dropdown_2.entry.js +18 -51
  21. package/dist/esm/tds-slider.entry.js +33 -8
  22. package/dist/esm/tds-table-footer.entry.js +1 -1
  23. package/dist/esm/tds-tooltip.entry.js +1 -1
  24. package/dist/esm/tegel.js +1 -1
  25. package/dist/tegel/p-1dc00838.entry.js +1 -0
  26. package/dist/tegel/{p-443d8501.entry.js → p-220affa9.entry.js} +1 -1
  27. package/dist/tegel/p-979f5255.entry.js +1 -0
  28. package/dist/tegel/{p-0d93c6a2.entry.js → p-f1c172a4.entry.js} +1 -1
  29. package/dist/tegel/tegel.esm.js +1 -1
  30. package/dist/types/components/dropdown/dropdown-option/dropdown-option.d.ts +2 -2
  31. package/dist/types/components/dropdown/dropdown.d.ts +8 -10
  32. package/dist/types/components/slider/slider.d.ts +6 -0
  33. package/dist/types/components.d.ts +17 -17
  34. package/package.json +4 -2
  35. package/dist/tegel/p-f91c6e9d.entry.js +0 -1
  36. package/dist/tegel/p-fd19d8b5.entry.js +0 -1
@@ -14,19 +14,17 @@ export class TdsDropdownOption {
14
14
  this.label = this.host.textContent.trim();
15
15
  };
16
16
  this.handleSingleSelect = () => {
17
- console.log('handleSingleSelect');
18
17
  if (!this.disabled) {
19
18
  this.selected = true;
20
19
  this.parentElement.appendValue(this.value);
21
20
  this.parentElement.close();
22
- // this.tdsSelect.emit({
23
- // value: this.value,
24
- // selected: this.selected,
25
- // });
21
+ this.tdsSelect.emit({
22
+ value: this.value,
23
+ selected: this.selected,
24
+ });
26
25
  }
27
26
  };
28
27
  this.handleMultiselect = (event) => {
29
- console.log('handleMultiselect');
30
28
  if (!this.disabled) {
31
29
  if (event.detail.checked) {
32
30
  this.parentElement.appendValue(this.value);
@@ -64,7 +62,7 @@ export class TdsDropdownOption {
64
62
  this.selected = selected;
65
63
  }
66
64
  render() {
67
- return (h(Host, { key: 'd6dbab3370006993f079697dc3d0fbcc92857b85', role: "option", "aria-disabled": this.disabled, "aria-selected": this.selected }, h("div", { key: '18c409c6d38be0a23bd6e43e7db90101b0322b4c', class: `dropdown-option
65
+ return (h(Host, { key: '1cb00a19c5dbcc47e1b2bc97d1d5ccc8ac5a532a', role: "option", "aria-disabled": this.disabled, "aria-selected": this.selected }, h("div", { key: '5deaf44c7306f4b1856200bf0a5640e99fcb449d', class: `dropdown-option
68
66
  ${this.size}
69
67
  ${this.selected ? 'selected' : ''}
70
68
  ${this.disabled ? 'disabled' : ''}
@@ -96,11 +94,11 @@ export class TdsDropdownOption {
96
94
  static get properties() {
97
95
  return {
98
96
  "value": {
99
- "type": "any",
97
+ "type": "string",
100
98
  "mutable": false,
101
99
  "complexType": {
102
- "original": "string | number",
103
- "resolved": "number | string",
100
+ "original": "string",
101
+ "resolved": "string",
104
102
  "references": {}
105
103
  },
106
104
  "required": false,
@@ -151,8 +149,8 @@ export class TdsDropdownOption {
151
149
  "text": "Click event for the Dropdown option."
152
150
  },
153
151
  "complexType": {
154
- "original": "{\n selected: boolean;\n value: string | number;\n }",
155
- "resolved": "{ selected: boolean; value: string | number; }",
152
+ "original": "{\n selected: boolean;\n value: string;\n }",
153
+ "resolved": "{ selected: boolean; value: string; }",
156
154
  "references": {}
157
155
  }
158
156
  }, {
@@ -8,21 +8,17 @@ import appendHiddenInput from "../../utils/appendHiddenInput";
8
8
  export class TdsDropdown {
9
9
  constructor() {
10
10
  this.setDefaultOption = () => {
11
- console.log('start of setDefaultOption');
12
- if (this.initialValue) {
13
- console.log('heej2');
14
- console.log('this.initialValue', this.initialValue, typeof this.initialValue);
15
- this.initialValue = 1;
16
- console.log('this.initialValue', this.initialValue, typeof this.initialValue);
11
+ if (this.defaultValue) {
17
12
  const children = Array.from(this.host.children).filter((element) => element.tagName === 'TDS-DROPDOWN-OPTION');
18
13
  if (children.length === 0) {
19
14
  console.warn('TDS DROPDOWN: No options found. Disregard if loading data asynchronously.');
20
15
  return;
21
16
  }
22
- const initialValues = typeof this.initialValue === 'object' ? this.initialValue : [this.initialValue];
17
+ const defaultValues = this.multiselect
18
+ ? new Set(this.defaultValue.split(','))
19
+ : [this.defaultValue];
23
20
  const childrenMap = new Map(children.map((element) => [element.value, element]));
24
- console.log('childrenMap', childrenMap);
25
- const matchedValues = Array.from(initialValues).filter((value) => {
21
+ const matchedValues = Array.from(defaultValues).filter((value) => {
26
22
  const element = childrenMap.get(value);
27
23
  if (element) {
28
24
  element.setSelected(true);
@@ -30,28 +26,14 @@ export class TdsDropdown {
30
26
  }
31
27
  return false;
32
28
  });
33
- console.log('matchedValues', matchedValues);
34
- console.log('aaa');
35
29
  if (matchedValues.length > 0) {
36
- console.log('if');
37
- this.internalReset(); // new
38
- console.log('this.value', this.value);
39
30
  this.value = [...new Set(this.value ? [...this.value, ...matchedValues] : matchedValues)];
40
- console.log('this.value', this.value);
41
31
  this.setValueAttribute();
42
- this.selectChildrenAsSelectedBasedOnSelectionProp(); // new
43
- this.handleChange(); // new
44
32
  }
45
33
  else {
46
- console.log('else');
47
- 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}"`);
48
35
  }
49
- // this.tdsSelect.emit({
50
- // value: this.value,
51
- // selected: true,
52
- // });
53
36
  }
54
- console.log('end of setDefaultOption - this.value: ', this.value, typeof this.value);
55
37
  };
56
38
  /* Returns a list of all children that are tds-dropdown-option elements */
57
39
  this.getChildren = () => {
@@ -109,20 +91,11 @@ export class TdsDropdown {
109
91
  };
110
92
  this.setValueAttribute = () => {
111
93
  var _a;
112
- console.log('this.valuez', this.value);
113
94
  if (!this.value || ((_a = this.value) === null || _a === void 0 ? void 0 : _a.toString()) === '') {
114
- console.log('iff');
115
95
  this.host.removeAttribute('value');
116
96
  }
117
97
  else {
118
- console.log('elsee');
119
- // console.log('heeeeejjjjjj');
120
- // console.log(this.host.getAttribute('value'));
121
- // this.host.setAttribute('value', this.value.map((val) => val).toString());
122
- // console.log('setting to this: ', this.value.map((val) => val).toString());
123
- this.host.setAttribute('value', 'x');
124
- // console.log(this.host.getAttribute('value'));
125
- // console.log('===============================');
98
+ this.host.setAttribute('value', this.value.map((val) => val).toString());
126
99
  }
127
100
  };
128
101
  this.handleFilter = (event) => {
@@ -174,7 +147,7 @@ export class TdsDropdown {
174
147
  var _a, _b;
175
148
  this.tdsChange.emit({
176
149
  name: this.name,
177
- 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,
178
151
  });
179
152
  };
180
153
  this.name = undefined;
@@ -192,7 +165,7 @@ export class TdsDropdown {
192
165
  this.filter = false;
193
166
  this.normalizeText = true;
194
167
  this.noResultText = 'No result';
195
- this.initialValue = undefined;
168
+ this.defaultValue = undefined;
196
169
  this.open = false;
197
170
  this.value = undefined;
198
171
  this.filterResult = undefined;
@@ -228,7 +201,7 @@ export class TdsDropdown {
228
201
  // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
229
202
  async setValue(value, label) {
230
203
  let nextValue;
231
- if (typeof value === 'string' || typeof value === 'number')
204
+ if (typeof value === 'string')
232
205
  nextValue = [value];
233
206
  else
234
207
  nextValue = value;
@@ -347,10 +320,6 @@ export class TdsDropdown {
347
320
  }
348
321
  }
349
322
  componentWillLoad() {
350
- // this.setDefaultOption();
351
- }
352
- componentDidLoad() {
353
- console.log('setting thing inside componentDidLoad');
354
323
  this.setDefaultOption();
355
324
  }
356
325
  /** Method to handle slot changes */
@@ -388,7 +357,7 @@ export class TdsDropdown {
388
357
  render() {
389
358
  var _a, _b, _c, _d;
390
359
  appendHiddenInput(this.host, this.name, (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value).toString(), this.disabled);
391
- return (h(Host, { key: 'cc2fd6faa970a384ff86677ea20d1d4af08afeae', role: "select", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, this.label && this.labelPosition === 'outside' && (h("div", { key: '7dd327f0a247120bd8179bad01dc88ed95e4b685', class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: 'ec93a609894235996f88d568acb4d84368b3f692', 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: {
392
361
  filter: true,
393
362
  focus: this.filterFocus,
394
363
  disabled: this.disabled,
@@ -438,7 +407,7 @@ export class TdsDropdown {
438
407
  label-inside-as-placeholder
439
408
  ${this.size}
440
409
  ${((_c = this.value) === null || _c === void 0 ? void 0 : _c.length) ? 'selected' : ''}
441
- ` }, 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: '01539e2bebab01fa90cee51bf5ffe1f21b83f3ca', 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: {
442
411
  'dropdown-list': true,
443
412
  [this.size]: true,
444
413
  [this.getOpenDirection()]: true,
@@ -447,7 +416,7 @@ export class TdsDropdown {
447
416
  'closed': !this.open,
448
417
  [`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
449
418
  [`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
450
- } }, h("slot", { key: 'd071d35f8c17874a28bdff6d9c1078d2c8bc2484', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: '45ba8b738e399d5c67a0eafe95f7b5ca26a0d615', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: '8dd913de3e053725f21b719e4cee8b0d2816d797', class: `helper ${this.error ? 'error' : ''} ${this.disabled ? 'disabled' : ''}` }, this.error && h("tds-icon", { key: '1fe06b1c2be207adead120a3ebc323277d33c94e', 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))));
451
420
  }
452
421
  static get is() { return "tds-dropdown"; }
453
422
  static get encapsulation() { return "shadow"; }
@@ -728,12 +697,12 @@ export class TdsDropdown {
728
697
  "reflect": false,
729
698
  "defaultValue": "'No result'"
730
699
  },
731
- "initialValue": {
732
- "type": "any",
700
+ "defaultValue": {
701
+ "type": "string",
733
702
  "mutable": false,
734
703
  "complexType": {
735
- "original": "string | number | (string | number)[]",
736
- "resolved": "(string | number)[] | number | string",
704
+ "original": "string",
705
+ "resolved": "string",
737
706
  "references": {}
738
707
  },
739
708
  "required": false,
@@ -742,7 +711,7 @@ export class TdsDropdown {
742
711
  "tags": [],
743
712
  "text": "Default value selected in the Dropdown."
744
713
  },
745
- "attribute": "initial-value",
714
+ "attribute": "default-value",
746
715
  "reflect": false
747
716
  }
748
717
  };
@@ -767,8 +736,8 @@ export class TdsDropdown {
767
736
  "text": "Change event for the Dropdown."
768
737
  },
769
738
  "complexType": {
770
- "original": "{\n name: string;\n value: (string | number)[];\n }",
771
- "resolved": "{ name: string; value: (string | number)[]; }",
739
+ "original": "{\n name: string;\n value: string;\n }",
740
+ "resolved": "{ name: string; value: string; }",
772
741
  "references": {}
773
742
  }
774
743
  }, {
@@ -871,10 +840,10 @@ export class TdsDropdown {
871
840
  },
872
841
  "setValue": {
873
842
  "complexType": {
874
- "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; }[]>",
875
844
  "parameters": [{
876
845
  "name": "value",
877
- "type": "string | number | (string | number)[]",
846
+ "type": "string | string[]",
878
847
  "docs": ""
879
848
  }, {
880
849
  "name": "label",
@@ -891,7 +860,7 @@ export class TdsDropdown {
891
860
  "id": "global::HTMLTdsDropdownOptionElement"
892
861
  }
893
862
  },
894
- "return": "Promise<{ value: string | number; label: string; }[]>"
863
+ "return": "Promise<{ value: string; label: string; }[]>"
895
864
  },
896
865
  "docs": {
897
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>",
@@ -900,10 +869,10 @@ export class TdsDropdown {
900
869
  },
901
870
  "appendValue": {
902
871
  "complexType": {
903
- "signature": "(value: string | number) => Promise<void>",
872
+ "signature": "(value: string) => Promise<void>",
904
873
  "parameters": [{
905
874
  "name": "value",
906
- "type": "string | number",
875
+ "type": "string",
907
876
  "docs": ""
908
877
  }],
909
878
  "references": {
@@ -924,10 +893,10 @@ export class TdsDropdown {
924
893
  },
925
894
  "removeValue": {
926
895
  "complexType": {
927
- "signature": "(oldValue: string | number) => Promise<{ value: string | number; label: string; }[]>",
896
+ "signature": "(oldValue: string) => Promise<{ value: string; label: string; }[]>",
928
897
  "parameters": [{
929
898
  "name": "oldValue",
930
- "type": "string | number",
899
+ "type": "string",
931
900
  "docs": ""
932
901
  }],
933
902
  "references": {
@@ -940,7 +909,7 @@ export class TdsDropdown {
940
909
  "id": "global::HTMLTdsDropdownOptionElement"
941
910
  }
942
911
  },
943
- "return": "Promise<{ value: string | number; label: string; }[]>"
912
+ "return": "Promise<{ value: string; label: string; }[]>"
944
913
  },
945
914
  "docs": {
946
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,11 @@ export class TdsSlider {
16
16
  this.useSnapping = false;
17
17
  this.supposedValueSlot = -1;
18
18
  this.resizeObserverAdded = false;
19
+ this.resetEventListenerAdded = false;
20
+ this.resetToInitialValue = () => {
21
+ this.forceValueUpdate(this.initialValue);
22
+ this.reset();
23
+ };
19
24
  this.label = '';
20
25
  this.value = '0';
21
26
  this.min = '0';
@@ -295,26 +300,45 @@ export class TdsSlider {
295
300
  }
296
301
  this.calculateThumbLeftFromValue(this.value);
297
302
  this.updateTrack();
303
+ // Only set the initial value once:
304
+ if (!this.initialValue) {
305
+ this.initialValue = this.value;
306
+ }
307
+ }
308
+ componentDidRender() {
309
+ // Only add the event listener once:
310
+ if (!this.resetEventListenerAdded) {
311
+ const form = this.host.closest('form');
312
+ form.addEventListener('reset', this.resetToInitialValue);
313
+ this.resetEventListenerAdded = true;
314
+ }
315
+ }
316
+ disconnectedCallback() {
317
+ if (this.resetEventListenerAdded) {
318
+ const form = this.host.closest('form');
319
+ form.removeEventListener('reset', this.resetToInitialValue);
320
+ this.resetEventListenerAdded = false;
321
+ }
298
322
  }
299
323
  render() {
300
- return (h("div", { key: 'fd7d051192c33b19e8c68cbeaa50ea43149457bb', class: {
324
+ return (h("div", { key: '63ea8117e50706f80560bf1c738adfd34e2ffade', class: {
301
325
  'tds-slider-wrapper': true,
302
326
  '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: {
327
+ } }, h("input", { key: '7f3913b7aed2b7f60a51e4e98f4676504479d54b', 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: '538960334a39ca0e6433a9c42bee53fc6672e9f3', class: {
304
328
  'tds-slider': true,
305
329
  'disabled': this.disabled,
306
330
  'tds-slider-small': this.useSmall,
307
331
  }, ref: (el) => {
308
332
  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) => {
333
+ } }, h("label", { key: '34a702130336ce556cd076d17737f19fca879173', class: this.showTickNumbers && 'offset' }, this.label), this.useInput && (h("div", { key: '31637244738afb7b4bebda45975883eab15fc143', class: "tds-slider__input-values" }, h("div", { key: '8f25a51e0f969e803975033ac5cd9de189ff382f', class: "tds-slider__input-value min-value" }, this.min))), this.useControls && (h("div", { key: '5bb85d505ad5d6fa56aa98324c0ccc6becc1cac8', class: "tds-slider__controls" }, h("div", { key: '9d28ac902fe71e5b984d1581680bb0b9ff839d5f', class: "tds-slider__control tds-slider__control-minus", onClick: (event) => this.stepLeft(event) }, h("tds-icon", { key: 'd1a9cb77050503995092d5b8c954be63fd47e8ac', name: "minus", size: "16px" })))), h("div", { key: '197087cd83b899584b9e5b50d90a9ff5469bec75', class: "tds-slider-inner" }, this.tickValues.length > 0 && (h("div", { key: '0508886c27cf9e050d4cad370567f86abe4e99cc', class: "tds-slider__value-dividers-wrapper" }, h("div", { key: 'd49d39bda80d5f0d59954a4e1111b68bb3b913fc', 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: '7cdf0b42f24292d0d676c693c551e27e9d91acfb', class: "tds-slider__track", ref: (el) => {
310
334
  this.trackElement = el;
311
- }, tabindex: this.disabled ? '-1' : '0' }, h("div", { key: '24a583182c45114d1e011bffef0f81f1e4f93a36', class: "tds-slider__track-fill", ref: (el) => {
335
+ }, tabindex: this.disabled ? '-1' : '0' }, h("div", { key: 'f4707af65bffecb418b0aefa8d5bd55055b94203', class: "tds-slider__track-fill", ref: (el) => {
312
336
  this.trackFillElement = el;
313
- } }), h("div", { key: '3bea53237beb92f41264386fb5ac181d1e9966a4', class: "tds-slider__thumb", ref: (el) => {
337
+ } }), h("div", { key: 'ad4c0500f2914c0d5c005f7f640e76cf3fd08568', class: "tds-slider__thumb", ref: (el) => {
314
338
  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) => {
339
+ }, onMouseDown: () => this.grabThumb(), onTouchStart: () => this.grabThumb() }, this.tooltip && (h("div", { key: '9609b93ff20975991f43c97b469f697b04098fc1', class: "tds-slider__value" }, this.value, h("svg", { key: 'd2dd8e895d4e7c1afb398355afc57354cf544bce', width: "18", height: "14", viewBox: "0 0 18 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'c707a07e816dc4f1ec60c69b451ae0abb91e845d', 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: '536a9cc10e038fb0923062633cc30deada006d42', class: "tds-slider__thumb-inner", ref: (el) => {
316
340
  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" })))))));
341
+ } })))), this.useInput && (h("div", { key: 'c715bfb5737d0e8a093a671ee8ce9ab8f430cf75', class: "tds-slider__input-values" }, h("div", { key: '332c7b19d7a773e71236cd4a003d198aff18ff45', class: "tds-slider__input-value", onClick: (event) => this.stepLeft(event) }, this.max), h("div", { key: 'cc74d8c3a68928a619d5cb97551b42a7e37b7aee', class: "tds-slider__input-field-wrapper" }, h("input", { key: '8ea3c0e38ada475aef1c85de7afc304e9fafcfe7', 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: 'ac446557daecd66ceffb387f40cade3856722a06', class: "tds-slider__controls" }, h("div", { key: '641cb0da0d990af682975bb21263187e9bc50707', class: "tds-slider__control tds-slider__control-plus", onClick: (event) => this.stepRight(event) }, h("tds-icon", { key: '0efffdea211e8de23c6f3a119956620b60c63d4b', name: "plus", size: "16px" })))))));
318
342
  }
319
343
  static get is() { return "tds-slider"; }
320
344
  static get originalStyleUrls() {
@@ -673,6 +697,7 @@ export class TdsSlider {
673
697
  }
674
698
  };
675
699
  }
700
+ static get elementRef() { return "host"; }
676
701
  static get watchers() {
677
702
  return [{
678
703
  "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
  }
@@ -1,3 +1,7 @@
1
+ :host {
2
+ position: absolute;
3
+ }
4
+
1
5
  .tds-tooltip {
2
6
  box-sizing: border-box;
3
7
  font: var(--tds-detail-05);
@@ -7,6 +11,7 @@
7
11
  border-radius: 4px;
8
12
  padding: 8px;
9
13
  word-wrap: break-word;
14
+ white-space: normal;
10
15
  max-width: 192px;
11
16
  z-index: 900;
12
17
  opacity: 0;
@@ -72,21 +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
- console.log('start of setDefaultOption');
76
- if (this.initialValue) {
77
- console.log('heej2');
78
- console.log('this.initialValue', this.initialValue, typeof this.initialValue);
79
- this.initialValue = 1;
80
- console.log('this.initialValue', this.initialValue, typeof this.initialValue);
75
+ if (this.defaultValue) {
81
76
  const children = Array.from(this.host.children).filter((element) => element.tagName === 'TDS-DROPDOWN-OPTION');
82
77
  if (children.length === 0) {
83
78
  console.warn('TDS DROPDOWN: No options found. Disregard if loading data asynchronously.');
84
79
  return;
85
80
  }
86
- const initialValues = typeof this.initialValue === 'object' ? this.initialValue : [this.initialValue];
81
+ const defaultValues = this.multiselect
82
+ ? new Set(this.defaultValue.split(','))
83
+ : [this.defaultValue];
87
84
  const childrenMap = new Map(children.map((element) => [element.value, element]));
88
- console.log('childrenMap', childrenMap);
89
- const matchedValues = Array.from(initialValues).filter((value) => {
85
+ const matchedValues = Array.from(defaultValues).filter((value) => {
90
86
  const element = childrenMap.get(value);
91
87
  if (element) {
92
88
  element.setSelected(true);
@@ -94,28 +90,14 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
94
90
  }
95
91
  return false;
96
92
  });
97
- console.log('matchedValues', matchedValues);
98
- console.log('aaa');
99
93
  if (matchedValues.length > 0) {
100
- console.log('if');
101
- this.internalReset(); // new
102
- console.log('this.value', this.value);
103
94
  this.value = [...new Set(this.value ? [...this.value, ...matchedValues] : matchedValues)];
104
- console.log('this.value', this.value);
105
95
  this.setValueAttribute();
106
- this.selectChildrenAsSelectedBasedOnSelectionProp(); // new
107
- this.handleChange(); // new
108
96
  }
109
97
  else {
110
- console.log('else');
111
- 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}"`);
112
99
  }
113
- // this.tdsSelect.emit({
114
- // value: this.value,
115
- // selected: true,
116
- // });
117
100
  }
118
- console.log('end of setDefaultOption - this.value: ', this.value, typeof this.value);
119
101
  };
120
102
  /* Returns a list of all children that are tds-dropdown-option elements */
121
103
  this.getChildren = () => {
@@ -173,20 +155,11 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
173
155
  };
174
156
  this.setValueAttribute = () => {
175
157
  var _a;
176
- console.log('this.valuez', this.value);
177
158
  if (!this.value || ((_a = this.value) === null || _a === void 0 ? void 0 : _a.toString()) === '') {
178
- console.log('iff');
179
159
  this.host.removeAttribute('value');
180
160
  }
181
161
  else {
182
- console.log('elsee');
183
- // console.log('heeeeejjjjjj');
184
- // console.log(this.host.getAttribute('value'));
185
- // this.host.setAttribute('value', this.value.map((val) => val).toString());
186
- // console.log('setting to this: ', this.value.map((val) => val).toString());
187
- this.host.setAttribute('value', 'x');
188
- // console.log(this.host.getAttribute('value'));
189
- // console.log('===============================');
162
+ this.host.setAttribute('value', this.value.map((val) => val).toString());
190
163
  }
191
164
  };
192
165
  this.handleFilter = (event) => {
@@ -238,7 +211,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
238
211
  var _a, _b;
239
212
  this.tdsChange.emit({
240
213
  name: this.name,
241
- 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,
242
215
  });
243
216
  };
244
217
  this.name = undefined;
@@ -256,7 +229,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
256
229
  this.filter = false;
257
230
  this.normalizeText = true;
258
231
  this.noResultText = 'No result';
259
- this.initialValue = undefined;
232
+ this.defaultValue = undefined;
260
233
  this.open = false;
261
234
  this.value = undefined;
262
235
  this.filterResult = undefined;
@@ -292,7 +265,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
292
265
  // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
293
266
  async setValue(value, label) {
294
267
  let nextValue;
295
- if (typeof value === 'string' || typeof value === 'number')
268
+ if (typeof value === 'string')
296
269
  nextValue = [value];
297
270
  else
298
271
  nextValue = value;
@@ -411,10 +384,6 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
411
384
  }
412
385
  }
413
386
  componentWillLoad() {
414
- // this.setDefaultOption();
415
- }
416
- componentDidLoad() {
417
- console.log('setting thing inside componentDidLoad');
418
387
  this.setDefaultOption();
419
388
  }
420
389
  /** Method to handle slot changes */
@@ -452,7 +421,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
452
421
  render() {
453
422
  var _a, _b, _c, _d;
454
423
  appendHiddenInput(this.host, this.name, (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value).toString(), this.disabled);
455
- return (h(Host, { key: 'cc2fd6faa970a384ff86677ea20d1d4af08afeae', role: "select", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, this.label && this.labelPosition === 'outside' && (h("div", { key: '7dd327f0a247120bd8179bad01dc88ed95e4b685', class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: 'ec93a609894235996f88d568acb4d84368b3f692', 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: {
456
425
  filter: true,
457
426
  focus: this.filterFocus,
458
427
  disabled: this.disabled,
@@ -502,7 +471,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
502
471
  label-inside-as-placeholder
503
472
  ${this.size}
504
473
  ${((_c = this.value) === null || _c === void 0 ? void 0 : _c.length) ? 'selected' : ''}
505
- ` }, 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: '01539e2bebab01fa90cee51bf5ffe1f21b83f3ca', 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: {
506
475
  'dropdown-list': true,
507
476
  [this.size]: true,
508
477
  [this.getOpenDirection()]: true,
@@ -511,7 +480,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
511
480
  'closed': !this.open,
512
481
  [`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
513
482
  [`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
514
- } }, h("slot", { key: 'd071d35f8c17874a28bdff6d9c1078d2c8bc2484', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: '45ba8b738e399d5c67a0eafe95f7b5ca26a0d615', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: '8dd913de3e053725f21b719e4cee8b0d2816d797', class: `helper ${this.error ? 'error' : ''} ${this.disabled ? 'disabled' : ''}` }, this.error && h("tds-icon", { key: '1fe06b1c2be207adead120a3ebc323277d33c94e', 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))));
515
484
  }
516
485
  get host() { return this; }
517
486
  static get watchers() { return {
@@ -534,7 +503,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
534
503
  "filter": [4],
535
504
  "normalizeText": [4, "normalize-text"],
536
505
  "noResultText": [1, "no-result-text"],
537
- "initialValue": [8, "initial-value"],
506
+ "defaultValue": [1, "default-value"],
538
507
  "open": [32],
539
508
  "value": [32],
540
509
  "filterResult": [32],
@@ -23,19 +23,17 @@ const TdsDropdownOption = /*@__PURE__*/ proxyCustomElement(class TdsDropdownOpti
23
23
  this.label = this.host.textContent.trim();
24
24
  };
25
25
  this.handleSingleSelect = () => {
26
- console.log('handleSingleSelect');
27
26
  if (!this.disabled) {
28
27
  this.selected = true;
29
28
  this.parentElement.appendValue(this.value);
30
29
  this.parentElement.close();
31
- // this.tdsSelect.emit({
32
- // value: this.value,
33
- // selected: this.selected,
34
- // });
30
+ this.tdsSelect.emit({
31
+ value: this.value,
32
+ selected: this.selected,
33
+ });
35
34
  }
36
35
  };
37
36
  this.handleMultiselect = (event) => {
38
- console.log('handleMultiselect');
39
37
  if (!this.disabled) {
40
38
  if (event.detail.checked) {
41
39
  this.parentElement.appendValue(this.value);
@@ -73,7 +71,7 @@ const TdsDropdownOption = /*@__PURE__*/ proxyCustomElement(class TdsDropdownOpti
73
71
  this.selected = selected;
74
72
  }
75
73
  render() {
76
- return (h(Host, { key: 'd6dbab3370006993f079697dc3d0fbcc92857b85', role: "option", "aria-disabled": this.disabled, "aria-selected": this.selected }, h("div", { key: '18c409c6d38be0a23bd6e43e7db90101b0322b4c', 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
77
75
  ${this.size}
78
76
  ${this.selected ? 'selected' : ''}
79
77
  ${this.disabled ? 'disabled' : ''}
@@ -93,7 +91,7 @@ const TdsDropdownOption = /*@__PURE__*/ proxyCustomElement(class TdsDropdownOpti
93
91
  get host() { return this; }
94
92
  static get style() { return TdsDropdownOptionStyle0; }
95
93
  }, [17, "tds-dropdown-option", {
96
- "value": [8],
94
+ "value": [1],
97
95
  "disabled": [4],
98
96
  "selected": [32],
99
97
  "multiselect": [32],
@@ -1,4 +1,4 @@
1
- import { T as TdsDropdownOption$1, d as defineCustomElement$1 } from './p-3687e4bf.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;