@scania/tegel 1.32.0-debugging-link-potential-breaking-change-beta.0 → 1.32.0-fix-modal-input-fields-background-color-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 (83) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/modeVariantOverride-082658a4.js +34 -0
  3. package/dist/cjs/tds-block.cjs.entry.js +29 -1
  4. package/dist/cjs/tds-checkbox.cjs.entry.js +2 -8
  5. package/dist/cjs/tds-datetime.cjs.entry.js +3 -10
  6. package/dist/cjs/tds-dropdown_2.cjs.entry.js +9 -30
  7. package/dist/cjs/tds-link.cjs.entry.js +2 -3
  8. package/dist/cjs/tds-radio-button.cjs.entry.js +1 -7
  9. package/dist/cjs/tds-text-field.cjs.entry.js +34 -11
  10. package/dist/cjs/tds-textarea.cjs.entry.js +41 -19
  11. package/dist/cjs/tds-toggle.cjs.entry.js +2 -8
  12. package/dist/cjs/tegel.cjs.js +1 -1
  13. package/dist/collection/components/block/block.js +34 -1
  14. package/dist/collection/components/checkbox/checkbox.js +2 -25
  15. package/dist/collection/components/datetime/datetime.js +3 -27
  16. package/dist/collection/components/dropdown/dropdown.js +9 -30
  17. package/dist/collection/components/link/link.js +2 -3
  18. package/dist/collection/components/radio-button/radio-button.js +1 -28
  19. package/dist/collection/components/text-field/text-field.js +36 -12
  20. package/dist/collection/components/textarea/textarea.js +43 -41
  21. package/dist/collection/components/toggle/toggle.js +2 -25
  22. package/dist/collection/utils/modeVariantOverride.js +30 -0
  23. package/dist/components/{p-728ada7e.js → p-1ef7423a.js} +3 -10
  24. package/dist/components/p-76cfa91a.js +32 -0
  25. package/dist/components/{p-7ad1bc2c.js → p-7ee8b262.js} +1 -1
  26. package/dist/components/{p-0f58e26f.js → p-adbf32b9.js} +9 -30
  27. package/dist/components/tds-block.js +31 -2
  28. package/dist/components/tds-checkbox.js +1 -1
  29. package/dist/components/tds-datetime.js +4 -12
  30. package/dist/components/tds-dropdown-option.js +1 -1
  31. package/dist/components/tds-dropdown.js +1 -1
  32. package/dist/components/tds-link.js +2 -3
  33. package/dist/components/tds-radio-button.js +2 -9
  34. package/dist/components/tds-table-body-row.js +1 -1
  35. package/dist/components/tds-table-footer.js +3 -3
  36. package/dist/components/tds-table-header.js +1 -1
  37. package/dist/components/tds-text-field.js +35 -11
  38. package/dist/components/tds-textarea.js +42 -20
  39. package/dist/components/tds-toggle.js +3 -10
  40. package/dist/esm/loader.js +1 -1
  41. package/dist/esm/modeVariantOverride-da8cbcb3.js +32 -0
  42. package/dist/esm/tds-block.entry.js +29 -1
  43. package/dist/esm/tds-checkbox.entry.js +2 -8
  44. package/dist/esm/tds-datetime.entry.js +3 -10
  45. package/dist/esm/tds-dropdown_2.entry.js +9 -30
  46. package/dist/esm/tds-link.entry.js +2 -3
  47. package/dist/esm/tds-radio-button.entry.js +1 -7
  48. package/dist/esm/tds-text-field.entry.js +34 -11
  49. package/dist/esm/tds-textarea.entry.js +42 -20
  50. package/dist/esm/tds-toggle.entry.js +2 -8
  51. package/dist/esm/tegel.js +1 -1
  52. package/dist/tegel/p-1fe7f572.entry.js +1 -0
  53. package/dist/tegel/p-212e1fff.entry.js +1 -0
  54. package/dist/tegel/p-4ca38ba7.entry.js +1 -0
  55. package/dist/tegel/p-503cea9d.entry.js +1 -0
  56. package/dist/tegel/p-5bb01a99.entry.js +1 -0
  57. package/dist/tegel/p-76cfa91a.js +1 -0
  58. package/dist/tegel/p-ae0fed95.entry.js +1 -0
  59. package/dist/tegel/p-b994e7ac.entry.js +1 -0
  60. package/dist/tegel/p-d2951be7.entry.js +1 -0
  61. package/dist/tegel/p-d6d8cb7f.entry.js +1 -0
  62. package/dist/tegel/tegel.esm.js +1 -1
  63. package/dist/types/components/block/block.d.ts +7 -0
  64. package/dist/types/components/checkbox/checkbox.d.ts +0 -2
  65. package/dist/types/components/datetime/datetime.d.ts +0 -2
  66. package/dist/types/components/radio-button/radio-button.d.ts +0 -3
  67. package/dist/types/components/text-field/text-field.d.ts +8 -0
  68. package/dist/types/components/textarea/textarea.d.ts +8 -3
  69. package/dist/types/components/toggle/toggle.d.ts +0 -3
  70. package/dist/types/components.d.ts +0 -20
  71. package/dist/types/utils/modeVariantOverride.d.ts +2 -0
  72. package/package.json +1 -1
  73. package/dist/collection/utils/accessibility.js +0 -30
  74. package/dist/tegel/p-31c657c0.entry.js +0 -1
  75. package/dist/tegel/p-72006dd7.entry.js +0 -1
  76. package/dist/tegel/p-76faaf70.entry.js +0 -1
  77. package/dist/tegel/p-b58194f9.entry.js +0 -1
  78. package/dist/tegel/p-d9040b7f.entry.js +0 -1
  79. package/dist/tegel/p-e83b5572.entry.js +0 -1
  80. package/dist/tegel/p-eb532e35.entry.js +0 -1
  81. package/dist/tegel/p-f71c3fca.entry.js +0 -1
  82. package/dist/tegel/p-f72577c8.entry.js +0 -1
  83. package/dist/types/utils/accessibility.d.ts +0 -14
@@ -20,14 +20,8 @@ export class TdsRadioButton {
20
20
  this.tdsAriaLabel = undefined;
21
21
  this.tdsTabIndex = undefined;
22
22
  }
23
- /** Method to programmatically focus the radio button element */
24
- async focusElement() {
25
- if (this.inputElement) {
26
- this.inputElement.focus();
27
- }
28
- }
29
23
  render() {
30
- return (h("div", { key: '6f44a40cb5ccf890bdee47d36f47a79d5f8b603c', class: "tds-radio-button" }, h("input", { key: '1da8f9df168c631a634172385c3471a5c6bb03aa', ref: (inputEl) => (this.inputElement = inputEl), "aria-label": this.tdsAriaLabel, class: "tds-form-input", type: "radio", role: "radio", name: this.name, id: this.radioId, value: this.value, checked: this.checked, "aria-checked": this.checked, required: this.required, disabled: this.disabled, onChange: () => this.handleChange(), tabIndex: this.tdsTabIndex }), h("label", { key: '0acf59236ffd3ee0136f2bdef9db8a36afe666ff', htmlFor: this.radioId }, h("slot", { key: 'add4ebdebbb4d5e15126a876c0c0940734b7b068', name: "label" }))));
24
+ return (h("div", { key: 'ca977bcef62ce81be1c0387bc1db7a5bb669f164', class: "tds-radio-button" }, h("input", { key: '939027d597b396cfdab2b47a11465b6e46040036', "aria-label": this.tdsAriaLabel, class: "tds-form-input", type: "radio", role: "radio", name: this.name, id: this.radioId, value: this.value, checked: this.checked, "aria-checked": this.checked, required: this.required, disabled: this.disabled, onChange: () => this.handleChange(), tabIndex: this.tdsTabIndex }), h("label", { key: 'f40293c0fcce1dac843087b71b5e34bdd8e911fa', htmlFor: this.radioId }, h("slot", { key: '4190d41d4e90cd4125c4f997f46cefa44682dae7', name: "label" }))));
31
25
  }
32
26
  static get is() { return "tds-radio-button"; }
33
27
  static get encapsulation() { return "scoped"; }
@@ -203,26 +197,5 @@ export class TdsRadioButton {
203
197
  }
204
198
  }];
205
199
  }
206
- static get methods() {
207
- return {
208
- "focusElement": {
209
- "complexType": {
210
- "signature": "() => Promise<void>",
211
- "parameters": [],
212
- "references": {
213
- "Promise": {
214
- "location": "global",
215
- "id": "global::Promise"
216
- }
217
- },
218
- "return": "Promise<void>"
219
- },
220
- "docs": {
221
- "text": "Method to programmatically focus the radio button element",
222
- "tags": []
223
- }
224
- }
225
- };
226
- }
227
200
  static get elementRef() { return "host"; }
228
201
  }
@@ -1,6 +1,7 @@
1
1
  import { h } from "@stencil/core";
2
2
  import hasSlot from "../../utils/hasSlot";
3
3
  import generateUniqueId from "../../utils/generateUniqueId";
4
+ import { getAdjustedModeVariant } from "../../utils/modeVariantOverride";
4
5
  /**
5
6
  * @slot prefix - Slot for the prefix in the component.
6
7
  * @slot suffix - Slot for the suffix in the component. Suffix is hidden when the input is in readonly state.
@@ -8,6 +9,7 @@ import generateUniqueId from "../../utils/generateUniqueId";
8
9
  export class TdsTextField {
9
10
  constructor() {
10
11
  this.uuid = generateUniqueId();
12
+ this.insideModal = false;
11
13
  this.type = 'text';
12
14
  this.labelPosition = 'no-label';
13
15
  this.label = '';
@@ -28,6 +30,7 @@ export class TdsTextField {
28
30
  this.autofocus = false;
29
31
  this.tdsAriaLabel = undefined;
30
32
  this.focusInput = false;
33
+ this.swapModeVariant = false;
31
34
  }
32
35
  handleChange(event) {
33
36
  this.tdsChange.emit(event);
@@ -72,11 +75,36 @@ export class TdsTextField {
72
75
  console.warn('Tegel Text Field component: prop tdsAriaLabel is missing');
73
76
  }
74
77
  }
78
+ checkIfDarkmode() {
79
+ const darkmode = document.body.classList.contains('tds-mode-dark');
80
+ this.swapModeVariant = this.insideModal && darkmode;
81
+ }
82
+ observeClassChanges() {
83
+ this.mutationObserver = new MutationObserver(() => {
84
+ this.checkIfDarkmode();
85
+ });
86
+ this.mutationObserver.observe(document.body, {
87
+ attributes: true,
88
+ attributeFilter: ['class'],
89
+ });
90
+ }
91
+ componentDidLoad() {
92
+ this.insideModal = !!this.host.closest('tds-modal');
93
+ if (this.insideModal) {
94
+ this.observeClassChanges();
95
+ this.checkIfDarkmode();
96
+ }
97
+ }
98
+ disconnectedCallback() {
99
+ if (this.mutationObserver) {
100
+ this.mutationObserver.disconnect();
101
+ }
102
+ }
75
103
  render() {
76
104
  var _a;
77
105
  const usesPrefixSlot = hasSlot('prefix', this.host);
78
106
  const usesSuffixSlot = hasSlot('suffix', this.host);
79
- return (h("div", { key: '985928ef59662762648f2d95d5decad2e3188e05', class: {
107
+ return (h("div", { key: '3f334104a79f318559f312c5b0e6e29fc42f75ee', class: {
80
108
  'form-text-field': true,
81
109
  'form-text-field-nomin': this.noMinWidth,
82
110
  'text-field-focus': this.focusInput && !this.disabled,
@@ -84,22 +112,17 @@ export class TdsTextField {
84
112
  'text-field-container-label-inside': this.labelPosition === 'inside' && this.size !== 'sm',
85
113
  'form-text-field-disabled': this.disabled,
86
114
  'form-text-field-readonly': this.disabled ? false : this.readOnly,
87
- 'tds-mode-variant-primary': this.readOnly
88
- ? this.modeVariant === 'secondary'
89
- : this.modeVariant === 'primary',
90
- 'tds-mode-variant-secondary': this.readOnly
91
- ? this.modeVariant === 'primary'
92
- : this.modeVariant === 'secondary',
115
+ [getAdjustedModeVariant(this.modeVariant, this.swapModeVariant, this.readOnly)]: true,
93
116
  'form-text-field-md': this.size === 'md',
94
117
  'form-text-field-sm': this.size === 'sm',
95
118
  'form-text-field-error': this.state === 'error',
96
119
  'form-text-field-success': this.state === 'success',
97
- } }, this.labelPosition === 'outside' && (h("div", { key: '7a409b43a1fee8b7b078abc5f96c925ab97bcedc', class: "text-field-label-outside" }, h("label", { key: 'c6bdaab4e6f81a95aa71a4e23a1f02fb1bcef9ec', htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), h("div", { key: '945f7901a92850da22ab84c5fe77e2d97738aaa9', onClick: () => this.textInput.focus(), class: "text-field-container" }, usesPrefixSlot && (h("div", { key: '5d6cb2facb8ff90b7393409b769c2b5e5a860421', class: {
120
+ } }, this.labelPosition === 'outside' && (h("div", { key: 'bceaded603552ec0845941f5ecdb790c1d1b3886', class: "text-field-label-outside" }, h("label", { key: 'a01149b1e584d0324298efb4fc2f0cfbdfe2d6d2', htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), h("div", { key: '7b3969dfdcc5bba6bd19e73fffb7fd7b06d2eaa1', onClick: () => this.textInput.focus(), class: "text-field-container" }, usesPrefixSlot && (h("div", { key: '62664099f52902ca01fe6f689e470d2b599fd3ca', class: {
98
121
  'text-field-slot-wrap-prefix': true,
99
122
  'text-field-error': this.state === 'error',
100
123
  'text-field-success': this.state === 'success',
101
124
  'text-field-default': this.state === 'default',
102
- } }, h("slot", { key: 'b0f0e3ebb96dbd2af021150b68690af566db44b9', name: "prefix" }))), h("div", { key: 'c5b172ee6c561256ab930490113f406b88eae67c', class: "text-field-input-container" }, h("input", { key: '2e0a9070b41bde39a2a0f14b132f474692eb0e04', ref: (inputEl) => {
125
+ } }, h("slot", { key: '0c6f97b881053c1d4fa35c0f9497251cbd36909e', name: "prefix" }))), h("div", { key: 'e730d994ae00054954201672da3df3a2dea65cd8', class: "text-field-input-container" }, h("input", { key: '7f368363f18aa29c56e03cf428fadbe655b2888c', ref: (inputEl) => {
103
126
  this.textInput = inputEl;
104
127
  }, class: {
105
128
  'text-field-input': true,
@@ -114,13 +137,13 @@ export class TdsTextField {
114
137
  if (!this.readOnly) {
115
138
  this.handleBlur(event);
116
139
  }
117
- }, "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label, "aria-describedby": `text-field-helper-element-${this.uuid}`, "aria-readonly": this.readOnly, id: `text-field-input-element-${this.uuid}` }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { key: 'ffb3bbb84ab718c2259134f32ee6dd0eb348cb9f', class: "text-field-label-inside", htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), h("div", { key: '166da0147311d28064b7e03bbefd1a0ee18db5ca', class: "text-field-bar" }), usesSuffixSlot && (h("div", { key: '4bb21d12957bf65d525931c88a5a89fff49d4eaf', class: {
140
+ }, "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label, "aria-describedby": `text-field-helper-element-${this.uuid}`, "aria-readonly": this.readOnly, id: `text-field-input-element-${this.uuid}` }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { key: '41c427a5a0bf58c2a83f58a3b5a045370e5db4b3', class: "text-field-label-inside", htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), h("div", { key: 'a2f5f1a3eb8c1392ba4349d76e065dcbb4f8dde9', class: "text-field-bar" }), usesSuffixSlot && (h("div", { key: 'd6b13341d8f9ee83e5b6f748461e1fad0654dbbd', class: {
118
141
  'text-field-slot-wrap-suffix': true,
119
142
  'text-field-error': this.state === 'error',
120
143
  'text-field-success': this.state === 'success',
121
144
  'text-field-default': this.state === 'default',
122
145
  'tds-u-display-none': this.readOnly,
123
- } }, h("slot", { key: '7e67dbc8f4f67cb0c7d194e01e5787ae18ffab13', name: "suffix" }))), this.readOnly && !this.hideReadOnlyIcon && (h("span", { key: 'd213ec000d837cbd4b711468ef3cfa826cc65ac2', class: "text-field-icon__readonly" }, h("tds-icon", { key: '56b8b76a5771889f9f36ab683dcba6906bff42a6', name: "edit_inactive", size: "20px" }))), h("span", { key: '9e8fa95602a1ce5630f30947b59decc700c06c8b', class: "text-field-icon__readonly-label" }, "This field is non-editable")), h("div", { key: '9e8547e06a25e7da98ff977ac6be1b79d27e4151', "aria-live": "assertive" }, (this.helper || this.maxLength > 0) && (h("div", { key: 'daeea67a48a15d27785f31dfcb69fb75e31ab85b', class: "text-field-helper", id: `text-field-helper-element-${this.uuid}` }, this.state === 'error' && (h("div", { key: '974bad3f97b23d69a20130bf66b6c72ef47f68bc', class: "text-field-helper-error-state" }, !this.readOnly && h("tds-icon", { key: '687cad3cb0451a262f836089851e9a2e08f2c74e', name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, !this.readOnly && this.maxLength > 0 && (h("span", { key: '431709fb793dde8845b20698e722a7c140bb32b6', class: {
146
+ } }, h("slot", { key: '5de22b8fbd8d849f53ba3eeecb213e060f6fa0d7', name: "suffix" }))), this.readOnly && !this.hideReadOnlyIcon && (h("span", { key: 'f2b7bca0b50083547851f87925c81d326031639f', class: "text-field-icon__readonly" }, h("tds-icon", { key: '3b4eec23c95e66bbd0f4aa77daa1ea0122a5e2a9', name: "edit_inactive", size: "20px" }))), h("span", { key: '098d8775f3447537eb1a5d00e845d4222c302827', class: "text-field-icon__readonly-label" }, "This field is non-editable")), h("div", { key: '68caa17dcc66342922171f54e9b21daefbb9fad6', "aria-live": "assertive" }, (this.helper || this.maxLength > 0) && (h("div", { key: '78262f7cbf45be4e25bc6ff2e95f69f8964ae308', class: "text-field-helper", id: `text-field-helper-element-${this.uuid}` }, this.state === 'error' && (h("div", { key: '4e2bf263ef6ba3127ae42bce9eada403825c28e9', class: "text-field-helper-error-state" }, !this.readOnly && h("tds-icon", { key: '85988daade29b03c7ffca789cfe984d6a9e65ed6', name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, !this.readOnly && this.maxLength > 0 && (h("span", { key: '839bd557ac51f77defdca3a32666d0d452a9abca', class: {
124
147
  'text-field-textcounter-divider': true,
125
148
  'text-field-textcounter-disabled': this.disabled,
126
149
  } }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, " / ", this.maxLength)))))));
@@ -480,7 +503,8 @@ export class TdsTextField {
480
503
  }
481
504
  static get states() {
482
505
  return {
483
- "focusInput": {}
506
+ "focusInput": {},
507
+ "swapModeVariant": {}
484
508
  };
485
509
  }
486
510
  static get events() {
@@ -1,8 +1,10 @@
1
1
  import { h } from "@stencil/core";
2
2
  import generateUniqueId from "../../utils/generateUniqueId";
3
+ import { getAdjustedModeVariant } from "../../utils/modeVariantOverride";
3
4
  export class TdsTextarea {
4
5
  constructor() {
5
6
  this.uuid = generateUniqueId();
7
+ this.insideModal = false;
6
8
  this.label = '';
7
9
  this.name = '';
8
10
  this.helper = undefined;
@@ -21,6 +23,7 @@ export class TdsTextarea {
21
23
  this.noMinWidth = false;
22
24
  this.tdsAriaLabel = undefined;
23
25
  this.focusInput = undefined;
26
+ this.swapModeVariant = false;
24
27
  }
25
28
  handleChange(event) {
26
29
  this.tdsChange.emit(event);
@@ -42,40 +45,58 @@ export class TdsTextarea {
42
45
  this.focusInput = true;
43
46
  this.tdsFocus.emit(event);
44
47
  }
45
- /** Method to programmatically focus the textarea element */
46
- async focusElement() {
47
- if (this.textEl) {
48
- this.textEl.focus();
49
- this.focusInput = true;
48
+ // setModeVariant(modeVariant: 'primary' | 'secondary'): string | null {
49
+ // if (this.readOnly && modeVariant === 'primary') {
50
+ // return 'secondary';
51
+ // }
52
+ // if (this.readOnly && modeVariant === 'secondary') {
53
+ // return 'primary';
54
+ // }
55
+ // return modeVariant;
56
+ // }
57
+ connectedCallback() {
58
+ if (!this.tdsAriaLabel && !this.label) {
59
+ console.warn('Tegel Textarea component: specify label or tdsAriaLabel prop for accessibility');
50
60
  }
51
61
  }
52
- setModeVariant(modeVariant) {
53
- if (this.readOnly && modeVariant === 'primary') {
54
- return 'secondary';
55
- }
56
- if (this.readOnly && modeVariant === 'secondary') {
57
- return 'primary';
62
+ checkIfDarkmode() {
63
+ const darkmode = document.body.classList.contains('tds-mode-dark');
64
+ this.swapModeVariant = this.insideModal && darkmode;
65
+ }
66
+ observeClassChanges() {
67
+ this.mutationObserver = new MutationObserver(() => {
68
+ this.checkIfDarkmode();
69
+ });
70
+ this.mutationObserver.observe(document.body, {
71
+ attributes: true,
72
+ attributeFilter: ['class'],
73
+ });
74
+ }
75
+ componentDidLoad() {
76
+ this.insideModal = !!this.host.closest('tds-modal');
77
+ if (this.insideModal) {
78
+ this.observeClassChanges();
79
+ this.checkIfDarkmode();
58
80
  }
59
- return modeVariant;
60
81
  }
61
- connectedCallback() {
62
- if (!this.tdsAriaLabel && !this.label) {
63
- console.warn('Tegel Textarea component: specify label or tdsAriaLabel prop for accessibility');
82
+ disconnectedCallback() {
83
+ if (this.mutationObserver) {
84
+ this.mutationObserver.disconnect();
64
85
  }
65
86
  }
66
87
  render() {
67
88
  var _a;
68
- return (h("div", { key: '06fd8ce87614410858a7d9253fac73a6f1cf20ec', class: {
89
+ return (h("div", { key: '1f0f9e42fb01b4ad16e4017fd5045510317c2633', class: {
69
90
  'textarea-container': true,
70
91
  'textarea-label-inside': this.labelPosition === 'inside',
71
92
  'textarea-focus': this.focusInput,
72
93
  'textarea-disabled': this.disabled,
73
94
  'textarea-readonly': !this.disabled && this.readOnly,
74
- [`tds-mode-variant-${this.setModeVariant(this.modeVariant)}`]: true,
95
+ [getAdjustedModeVariant(this.modeVariant, this.swapModeVariant, this.readOnly)]: true,
75
96
  'textarea-data': this.value !== '',
76
97
  [`textarea-${this.state}`]: this.state === 'error' || this.state === 'success',
77
98
  'no-min-width': this.noMinWidth,
78
- } }, this.labelPosition !== 'no-label' && (h("label", { key: '1a02a333e4164b39fd223c68cc3d27d7c53487fb', htmlFor: `textarea-element-${this.uuid}`, class: 'textarea-label' }, this.label)), h("div", { key: '6d45e8c8427770accc82c7ad9e10fbed016437a4', class: "textarea-wrapper" }, h("textarea", { key: '614c30a5b5077060b1568744cf0800580e746819', id: `textarea-element-${this.uuid}`, class: 'textarea-input', ref: (inputEl) => {
99
+ } }, this.labelPosition !== 'no-label' && (h("label", { key: '5a86f34c46a1388c00017fbf3306dedb9624ab15', htmlFor: `textarea-element-${this.uuid}`, class: 'textarea-label' }, this.label)), h("div", { key: 'a1731e87bda333a2fb517cba22b88537f9316eb7', class: "textarea-wrapper" }, h("textarea", { key: '538b4621bd98b804c8a9d7d686d86c88fb2a2769', id: `textarea-element-${this.uuid}`, class: 'textarea-input', ref: (inputEl) => {
79
100
  this.textEl = inputEl;
80
101
  }, disabled: this.disabled, readonly: !this.disabled && this.readOnly, placeholder: this.placeholder, value: this.value, name: this.name, autofocus: this.autofocus, maxlength: this.maxLength, cols: this.cols, rows: this.rows, onFocus: (event) => {
81
102
  if (!this.readOnly) {
@@ -85,7 +106,7 @@ export class TdsTextarea {
85
106
  if (!this.readOnly) {
86
107
  this.handleBlur(event);
87
108
  }
88
- }, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), "aria-invalid": this.state === 'error' ? 'true' : 'false', "aria-readonly": this.readOnly ? 'true' : 'false', "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label, "aria-describedby": `textarea-helper-element-${this.uuid}` }), h("span", { key: 'e0574ae32d1ce9c69156dc2aa52d8d1881b6ff9b', class: "textarea-resizer-icon" }, h("svg", { key: '23e79729cc099b7e4f07192c05aa4a304b91788a', width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '54891720aa51af768f467be5bd8a72fc7adc8d47', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.8536 0.853553C12.0488 0.658291 12.0488 0.341709 11.8536 0.146447C11.6583 -0.0488155 11.3417 -0.0488155 11.1464 0.146447L0.146447 11.1464C-0.0488155 11.3417 -0.0488155 11.6583 0.146447 11.8536C0.341709 12.0488 0.658291 12.0488 0.853553 11.8536L11.8536 0.853553ZM11.8536 4.64645C12.0488 4.84171 12.0488 5.15829 11.8536 5.35355L5.35355 11.8536C5.15829 12.0488 4.84171 12.0488 4.64645 11.8536C4.45118 11.6583 4.45118 11.3417 4.64645 11.1464L11.1464 4.64645C11.3417 4.45118 11.6583 4.45118 11.8536 4.64645ZM11.8536 8.64645C12.0488 8.84171 12.0488 9.15829 11.8536 9.35355L9.35355 11.8536C9.15829 12.0488 8.84171 12.0488 8.64645 11.8536C8.45118 11.6583 8.45118 11.3417 8.64645 11.1464L11.1464 8.64645C11.3417 8.45118 11.6583 8.45118 11.8536 8.64645Z", fill: "currentColor" }))), !this.disabled && !this.hideReadOnlyIcon && this.readOnly && (h("span", { key: '72e3586f1be99460ced66d640392b4596e5b8c2f', class: "textarea-icon__readonly" }, h("tds-tooltip", { key: '9f84391a75b5ae428c71d3b713a9d281c4475a09', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: '55e195bb50d8b707ec3a403c8c62cad74d738919', id: "readonly-tooltip", name: "edit_inactive", svgTitle: "inactive" })))), h("span", { key: 'ff2043a19ebb129178ecfd36126b0d23eacde4d1', class: 'textarea-helper', "aria-live": "assertive", id: `textarea-helper-element-${this.uuid}` }, this.state === 'error' && this.helper && !this.readOnly && (h("tds-icon", { key: '84b0991ef5ddab7f960ba75db22c65762b0b5d20', name: "error", size: "16px" })), this.helper), this.maxLength > 0 && (h("div", { key: '963b3a3bdafeabec6ad2bd3663c07ed0d4a5b3fd', class: 'textarea-textcounter' }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: '8496a0ae44721cdcd9443e09ff6a709b6d3c704f', class: "textfield-textcounter-divider" }, " / "), " ", this.maxLength))));
109
+ }, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), "aria-invalid": this.state === 'error' ? 'true' : 'false', "aria-readonly": this.readOnly ? 'true' : 'false', "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label, "aria-describedby": `textarea-helper-element-${this.uuid}` }), h("span", { key: '11a0f48f5e8da2ad1a83145133cb42c058446926', class: "textarea-resizer-icon" }, h("svg", { key: '5e1b7c2acc0c0c8bc62d4d4e7605eeefea382075', width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '8b210ff6be5cb8e7a6eef276bc62b210e3d98aca', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.8536 0.853553C12.0488 0.658291 12.0488 0.341709 11.8536 0.146447C11.6583 -0.0488155 11.3417 -0.0488155 11.1464 0.146447L0.146447 11.1464C-0.0488155 11.3417 -0.0488155 11.6583 0.146447 11.8536C0.341709 12.0488 0.658291 12.0488 0.853553 11.8536L11.8536 0.853553ZM11.8536 4.64645C12.0488 4.84171 12.0488 5.15829 11.8536 5.35355L5.35355 11.8536C5.15829 12.0488 4.84171 12.0488 4.64645 11.8536C4.45118 11.6583 4.45118 11.3417 4.64645 11.1464L11.1464 4.64645C11.3417 4.45118 11.6583 4.45118 11.8536 4.64645ZM11.8536 8.64645C12.0488 8.84171 12.0488 9.15829 11.8536 9.35355L9.35355 11.8536C9.15829 12.0488 8.84171 12.0488 8.64645 11.8536C8.45118 11.6583 8.45118 11.3417 8.64645 11.1464L11.1464 8.64645C11.3417 8.45118 11.6583 8.45118 11.8536 8.64645Z", fill: "currentColor" }))), !this.disabled && !this.hideReadOnlyIcon && this.readOnly && (h("span", { key: '1b462603139c3ff096b18e61edb7629c804341a0', class: "textarea-icon__readonly" }, h("tds-tooltip", { key: '3c01c797be9021a5907c4a01906ab614f2943c23', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: '8ceffefeba1632397e8f8e4c3b33eaabafb942fe', id: "readonly-tooltip", name: "edit_inactive", svgTitle: "inactive" })))), h("span", { key: 'd21fac62b5709d6b4a9e79c7ba391a17aa9e3e1b', class: 'textarea-helper', "aria-live": "assertive", id: `textarea-helper-element-${this.uuid}` }, this.state === 'error' && this.helper && !this.readOnly && (h("tds-icon", { key: 'c9f959778bb295f786cb8578610150743b77626d', name: "error", size: "16px" })), this.helper), this.maxLength > 0 && (h("div", { key: 'da11bfe7213be04e0c5699a0385be2c63a08a8b2', class: 'textarea-textcounter' }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: '357b65219a5dfd4c27931d025e183b8bde012345', class: "textfield-textcounter-divider" }, " / "), " ", this.maxLength))));
89
110
  }
90
111
  static get is() { return "tds-textarea"; }
91
112
  static get encapsulation() { return "scoped"; }
@@ -406,7 +427,8 @@ export class TdsTextarea {
406
427
  }
407
428
  static get states() {
408
429
  return {
409
- "focusInput": {}
430
+ "focusInput": {},
431
+ "swapModeVariant": {}
410
432
  };
411
433
  }
412
434
  static get events() {
@@ -487,25 +509,5 @@ export class TdsTextarea {
487
509
  }
488
510
  }];
489
511
  }
490
- static get methods() {
491
- return {
492
- "focusElement": {
493
- "complexType": {
494
- "signature": "() => Promise<void>",
495
- "parameters": [],
496
- "references": {
497
- "Promise": {
498
- "location": "global",
499
- "id": "global::Promise"
500
- }
501
- },
502
- "return": "Promise<void>"
503
- },
504
- "docs": {
505
- "text": "Method to programmatically focus the textarea element",
506
- "tags": []
507
- }
508
- }
509
- };
510
- }
512
+ static get elementRef() { return "host"; }
511
513
  }
@@ -29,12 +29,6 @@ export class TdsToggle {
29
29
  checked: this.checked,
30
30
  };
31
31
  }
32
- /** Method to programmatically focus the toggle element */
33
- async focusElement() {
34
- if (this.inputElement) {
35
- this.inputElement.focus();
36
- }
37
- }
38
32
  componentWillLoad() {
39
33
  this.labelSlot = this.host.querySelector("[slot='label']");
40
34
  }
@@ -44,10 +38,10 @@ export class TdsToggle {
44
38
  }
45
39
  }
46
40
  render() {
47
- return (h("div", { key: '212a541d06f0cc534855ac872cfb386dc1b2d4ff', class: "tds-toggle" }, this.headline && (h("div", { key: '076c51461d4898d2bfa3c86fadd94ac2ad63c7a8', class: {
41
+ return (h("div", { key: '01d3faf866451cf2e09694d614b1cca9defa1f69', class: "tds-toggle" }, this.headline && (h("div", { key: '2809bf2c3653c20ca6b93280b3391255b2285d8c', class: {
48
42
  'toggle-headline': true,
49
43
  'disabled': this.disabled,
50
- } }, this.headline)), h("input", { key: 'e0e849d7b05b77612fc949894cac8befa5b89370', ref: (inputEl) => (this.inputElement = inputEl), "aria-label": this.tdsAriaLabel, "aria-describedby": this.host.getAttribute('aria-describedby'), "aria-labelledby": this.host.getAttribute('aria-labelledby'), "aria-checked": this.checked, "aria-required": this.required, onChange: () => this.handleToggle(), class: `${this.size}`, checked: this.checked, disabled: this.disabled, required: this.required, type: "checkbox", name: this.name, id: this.toggleId, role: "switch" }), this.labelSlot && (h("label", { key: '4d1dcc70f896695657ca7ca68fd832ee4d13417a', class: { disabled: this.disabled }, htmlFor: this.toggleId }, h("slot", { key: '800ea4ee2760efee8cdfe1ac3aee4b3a6f95f199', name: "label" })))));
44
+ } }, this.headline)), h("input", { key: '52ab62b4d4c506ca74533ffafc68247accae612b', "aria-label": this.tdsAriaLabel, "aria-describedby": this.host.getAttribute('aria-describedby'), "aria-labelledby": this.host.getAttribute('aria-labelledby'), "aria-checked": this.checked, "aria-required": this.required, onChange: () => this.handleToggle(), class: `${this.size}`, checked: this.checked, disabled: this.disabled, required: this.required, type: "checkbox", name: this.name, id: this.toggleId, role: "switch" }), this.labelSlot && (h("label", { key: '73f43d7134ff9a9ecded6b8b153b1590014e2a80', class: { disabled: this.disabled }, htmlFor: this.toggleId }, h("slot", { key: 'efe7c2a3f76f9990a00b1156d66b78c0e26e6411', name: "label" })))));
51
45
  }
52
46
  static get is() { return "tds-toggle"; }
53
47
  static get encapsulation() { return "scoped"; }
@@ -242,23 +236,6 @@ export class TdsToggle {
242
236
  "text": "Toggles the Toggle.",
243
237
  "tags": []
244
238
  }
245
- },
246
- "focusElement": {
247
- "complexType": {
248
- "signature": "() => Promise<void>",
249
- "parameters": [],
250
- "references": {
251
- "Promise": {
252
- "location": "global",
253
- "id": "global::Promise"
254
- }
255
- },
256
- "return": "Promise<void>"
257
- },
258
- "docs": {
259
- "text": "Method to programmatically focus the toggle element",
260
- "tags": []
261
- }
262
239
  }
263
240
  };
264
241
  }
@@ -0,0 +1,30 @@
1
+ /** Returns true if the component should be styled as primary mode variant */
2
+ const styleAsPrimaryModeVariant = (modeVariant, swapModeVariant, readOnly = false) => {
3
+ if (swapModeVariant) {
4
+ return readOnly ? modeVariant === 'primary' : modeVariant === 'secondary';
5
+ }
6
+ return readOnly ? modeVariant === 'secondary' : modeVariant === 'primary';
7
+ };
8
+ /** Returns true if the component should be styled as secondary mode variant */
9
+ const styleAsSecondaryModeVariant = (modeVariant, swapModeVariant, readOnly = false) => {
10
+ if (swapModeVariant) {
11
+ return readOnly ? modeVariant === 'secondary' : modeVariant === 'primary';
12
+ }
13
+ return readOnly ? modeVariant === 'primary' : modeVariant === 'secondary';
14
+ };
15
+ /** Returns the potentially adjusted class for the mode variant */
16
+ export const getAdjustedModeVariant = (modeVariant, swapModeVariant, readOnly = false) => {
17
+ if (!modeVariant) {
18
+ return '';
19
+ }
20
+ if (!swapModeVariant) {
21
+ return `tds-mode-variant-${modeVariant}`;
22
+ }
23
+ if (styleAsPrimaryModeVariant(modeVariant, swapModeVariant, readOnly)) {
24
+ return 'tds-mode-variant-primary';
25
+ }
26
+ if (styleAsSecondaryModeVariant(modeVariant, swapModeVariant, readOnly)) {
27
+ return 'tds-mode-variant-secondary';
28
+ }
29
+ return `tds-mode-variant-${modeVariant}`;
30
+ };
@@ -40,12 +40,6 @@ const TdsCheckbox = /*@__PURE__*/ proxyCustomElement(class TdsCheckbox extends H
40
40
  checked: this.checked,
41
41
  };
42
42
  }
43
- /** Method to programmatically focus the checkbox element */
44
- async focusElement() {
45
- if (this.inputElement) {
46
- this.inputElement.focus();
47
- }
48
- }
49
43
  handleIndeterminateState() {
50
44
  this.inputElement.indeterminate = this.indeterminate;
51
45
  }
@@ -70,11 +64,11 @@ const TdsCheckbox = /*@__PURE__*/ proxyCustomElement(class TdsCheckbox extends H
70
64
  }
71
65
  }
72
66
  render() {
73
- return (h("div", { key: '97afce57b6f6ce0d66dabd227f7271b5dc8fe707', class: "tds-checkbox" }, h("input", { key: '18b283a21ff649b9a4935a7b3e6f489cde16073d',
67
+ return (h("div", { key: '8f5104073f1be9323bc0125feab7515759ac7679', class: "tds-checkbox" }, h("input", { key: '8536a1eaefb5b7bdf258a4ddca67660becc797a5',
74
68
  // eslint-disable-next-line no-return-assign
75
69
  ref: (inputElement) => (this.inputElement = inputElement), indeterminate: this.indeterminate, "aria-checked": this.checked, "aria-required": this.required, "aria-label": this.tdsAriaLabel, "aria-describedby": this.tdsAriaDescribedby, required: this.required, type: "checkbox", name: this.name, value: this.value, id: this.checkboxId, checked: this.checked, disabled: this.disabled, onFocus: (event) => this.handleFocus(event), onBlur: (event) => this.handleBlur(event), onChange: () => {
76
70
  this.handleChange();
77
- } }), h("label", { key: '51d15b0eea1fd0f7517ca8d0f669bc02ac59781c', htmlFor: this.checkboxId }, h("slot", { key: 'bb10126c57b177f825ef8cd75da505465b2d6ae3', name: "label" }))));
71
+ } }), h("label", { key: 'e6e065ce109371607c5412ab38ece22d3ac1d626', htmlFor: this.checkboxId }, h("slot", { key: '4698f97ac58203e3f478321da53cc364157ded78', name: "label" }))));
78
72
  }
79
73
  get host() { return this; }
80
74
  static get watchers() { return {
@@ -91,8 +85,7 @@ const TdsCheckbox = /*@__PURE__*/ proxyCustomElement(class TdsCheckbox extends H
91
85
  "value": [1],
92
86
  "tdsAriaLabel": [1, "tds-aria-label"],
93
87
  "tdsAriaDescribedby": [1, "tds-aria-describedby"],
94
- "toggleCheckbox": [64],
95
- "focusElement": [64]
88
+ "toggleCheckbox": [64]
96
89
  }, [[4, "reset", "handleFormReset"]], {
97
90
  "indeterminate": ["handleIndeterminateState"]
98
91
  }]);
@@ -0,0 +1,32 @@
1
+ /** Returns true if the component should be styled as primary mode variant */
2
+ const styleAsPrimaryModeVariant = (modeVariant, swapModeVariant, readOnly = false) => {
3
+ if (swapModeVariant) {
4
+ return readOnly ? modeVariant === 'primary' : modeVariant === 'secondary';
5
+ }
6
+ return readOnly ? modeVariant === 'secondary' : modeVariant === 'primary';
7
+ };
8
+ /** Returns true if the component should be styled as secondary mode variant */
9
+ const styleAsSecondaryModeVariant = (modeVariant, swapModeVariant, readOnly = false) => {
10
+ if (swapModeVariant) {
11
+ return readOnly ? modeVariant === 'secondary' : modeVariant === 'primary';
12
+ }
13
+ return readOnly ? modeVariant === 'primary' : modeVariant === 'secondary';
14
+ };
15
+ /** Returns the potentially adjusted class for the mode variant */
16
+ const getAdjustedModeVariant = (modeVariant, swapModeVariant, readOnly = false) => {
17
+ if (!modeVariant) {
18
+ return '';
19
+ }
20
+ if (!swapModeVariant) {
21
+ return `tds-mode-variant-${modeVariant}`;
22
+ }
23
+ if (styleAsPrimaryModeVariant(modeVariant, swapModeVariant, readOnly)) {
24
+ return 'tds-mode-variant-primary';
25
+ }
26
+ if (styleAsSecondaryModeVariant(modeVariant, swapModeVariant, readOnly)) {
27
+ return 'tds-mode-variant-secondary';
28
+ }
29
+ return `tds-mode-variant-${modeVariant}`;
30
+ };
31
+
32
+ export { getAdjustedModeVariant as g };
@@ -1,6 +1,6 @@
1
1
  import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-28ef5186.js';
2
2
  import { c as convertToString } from './p-a1181b1f.js';
3
- import { d as defineCustomElement$2 } from './p-728ada7e.js';
3
+ import { d as defineCustomElement$2 } from './p-1ef7423a.js';
4
4
  import { d as defineCustomElement$1 } from './p-c715ab56.js';
5
5
 
6
6
  const dropdownOptionCss = ":host{box-sizing:border-box;display:block;background-color:var(--tds-dropdown-option-background)}:host *{box-sizing:border-box}:host .dropdown-option{color:var(--tds-dropdown-option-color);border-bottom:1px solid var(--tds-dropdown-option-border);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);overflow-wrap:anywhere;transition:background-color var(--tds-motion-duration-fast-02) var(--tds-motion-easing-scania)}:host .dropdown-option.selected{background-color:var(--tds-dropdown-option-background-selected)}:host .dropdown-option.disabled{color:var(--tds-dropdown-option-color-disabled)}:host .dropdown-option button:focus{outline:2px solid var(--tds-blue-400);outline-offset:-2px}:host .dropdown-option button{all:unset;width:100%}:host .dropdown-option button.lg{padding:19px 0 20px}:host .dropdown-option button.md{padding:15px 0 16px}:host .dropdown-option button.sm{padding:11px 0 12px}:host .dropdown-option button.xs{padding:7px 0 8px}:host .dropdown-option button .single-select{display:flex;align-items:center;justify-content:space-between;padding:0 16px}:host .dropdown-option .multiselect{width:100%;height:100%}:host .dropdown-option .multiselect tds-checkbox{display:flex;height:100%;width:100%}:host .dropdown-option .multiselect tds-checkbox.lg{padding:15px 16px 16px}:host .dropdown-option .multiselect tds-checkbox.md{padding:11px 16px 12px}:host .dropdown-option .multiselect tds-checkbox.sm{padding:7px 16px 8px}:host .dropdown-option .multiselect tds-checkbox.xs{padding:7px 16px 8px}:host .dropdown-option:hover{background-color:var(--tds-dropdown-option-background-hover);cursor:pointer}:host .dropdown-option:hover.disabled{background-color:var(--tds-dropdown-option-background);cursor:not-allowed}:host([hidden]){display:none}";
@@ -136,15 +136,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
136
136
  if (!this.disabled) {
137
137
  this.open = !this.open;
138
138
  if (this.open) {
139
- if (this.filter) {
140
- this.focusInputElement();
141
- }
142
- else {
143
- const button = this.host.shadowRoot.querySelector('button');
144
- if (button) {
145
- button.focus();
146
- }
147
- }
139
+ this.focusInputElement();
148
140
  }
149
141
  }
150
142
  };
@@ -190,13 +182,11 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
190
182
  this.handleFocus = (event) => {
191
183
  this.open = true;
192
184
  this.filterFocus = true;
193
- if (this.multiselect && this.inputElement) {
185
+ if (this.multiselect) {
194
186
  this.inputElement.value = '';
195
187
  }
196
188
  this.tdsFocus.emit(event);
197
- if (this.filter) {
198
- this.handleFilter({ target: { value: '' } });
199
- }
189
+ this.handleFilter({ target: { value: '' } });
200
190
  };
201
191
  this.handleBlur = (event) => {
202
192
  this.tdsBlur.emit(event);
@@ -351,18 +341,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
351
341
  }
352
342
  /** Method that forces focus on the input element. */
353
343
  async focusElement() {
354
- if (this.filter) {
355
- // For filter mode, focus the input element
356
- this.focusInputElement();
357
- }
358
- else {
359
- // For non-filter mode, focus the button element
360
- const button = this.host.shadowRoot.querySelector('button');
361
- if (button) {
362
- button.focus();
363
- }
364
- }
365
- // Always trigger the focus event to open the dropdown
344
+ this.focusInputElement();
366
345
  this.handleFocus({});
367
346
  }
368
347
  /** Method for setting the value of the Dropdown.
@@ -515,9 +494,9 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
515
494
  // Generate unique IDs for associating labels and helpers with the input/button
516
495
  const labelId = this.label ? `dropdown-label-${this.name || generateUniqueId()}` : undefined;
517
496
  const helperId = this.helper ? `dropdown-helper-${this.name || generateUniqueId()}` : undefined;
518
- return (h(Host, { key: 'aed0a485fc4634cdba2599fa9792fb6289a7459c', class: {
497
+ return (h(Host, { key: '5c5314d4994b1ca9c09729df6c9b30d9fb6b33d3', class: {
519
498
  [`tds-mode-variant-${this.modeVariant}`]: Boolean(this.modeVariant),
520
- } }, this.label && this.labelPosition === 'outside' && (h("div", { key: '39d11ac06547b133540f037a0c09ddc40b972cb5', id: labelId, class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '8ab624d380289699887b660d30512b2e892f71c0', class: {
499
+ } }, this.label && this.labelPosition === 'outside' && (h("div", { key: '25133dd0a665315edfad6f93a846db0ac82cc16f', id: labelId, class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '3d2a17d8f7bcf7f8aaa8d2ea5397044396b691e1', class: {
521
500
  'dropdown-select': true,
522
501
  [this.size]: true,
523
502
  'disabled': this.disabled,
@@ -567,7 +546,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
567
546
  label-inside-as-placeholder
568
547
  ${this.size}
569
548
  ${this.selectedOptions.length ? 'selected' : ''}
570
- ` }, this.label)), h("div", { class: `placeholder ${this.size}` }, this.selectedOptions.length ? this.getValue() : this.placeholder), h("tds-icon", { "aria-label": "Open/Close dropdown", svgTitle: "Open/Close dropdown", class: `menu-icon ${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))))), h("div", { key: '989c425c5a608444533e33ad83313aa56569c225', role: "listbox", "aria-label": this.tdsAriaLabel, "aria-hidden": this.open ? 'false' : 'true', inert: !this.open, "aria-orientation": "vertical", "aria-multiselectable": this.multiselect, ref: (element) => {
549
+ ` }, this.label)), h("div", { class: `placeholder ${this.size}` }, this.selectedOptions.length ? this.getValue() : this.placeholder), h("tds-icon", { "aria-label": "Open/Close dropdown", svgTitle: "Open/Close dropdown", class: `menu-icon ${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))))), h("div", { key: '4e4a3036983d9f2c53119884f32482a14b16bbff', role: "listbox", "aria-label": this.tdsAriaLabel, "aria-hidden": this.open ? 'false' : 'true', inert: !this.open, "aria-orientation": "vertical", "aria-multiselectable": this.multiselect, ref: (element) => {
571
550
  this.dropdownList = element;
572
551
  }, class: {
573
552
  'dropdown-list': true,
@@ -578,11 +557,11 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
578
557
  'closed': !this.open,
579
558
  [`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
580
559
  [`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
581
- } }, h("slot", { key: '6e54bbb0eacf27cfdbf3b393f2c9e690adb394e8', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: '4bdaf935cd213f63e7a8665b5d6f69ee0589d7b9', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: '112c76fa88eef7798b9b0d435ae03e62880a9ff8', id: helperId, class: {
560
+ } }, h("slot", { key: 'ad34d1c72b7490505aee226e3e1478e68084309d', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: '619071043ec5be2a17b24c9706aa20490f4c4339', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: '4165cfc63988816e39a86a304acacd627aa24567', id: helperId, class: {
582
561
  helper: true,
583
562
  error: this.error,
584
563
  disabled: this.disabled,
585
- } }, this.error && h("tds-icon", { key: '055e681faca85a461b07619c42fa0eb48a6ec028', name: "error", size: "16px" }), this.helper))));
564
+ } }, this.error && h("tds-icon", { key: '90eea26d0166a4acaa066211fa996e2b74ccd575', name: "error", size: "16px" }), this.helper))));
586
565
  }
587
566
  get host() { return this; }
588
567
  static get watchers() { return {