@scania/tegel 1.23.0 → 1.24.0-fix-CDEP-264-button-allow-boolean-props-testing-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/tds-block.cjs.entry.js +17 -13
  3. package/dist/cjs/tds-button.cjs.entry.js +1 -1
  4. package/dist/cjs/tds-checkbox.cjs.entry.js +9 -2
  5. package/dist/cjs/tds-chip.cjs.entry.js +13 -1
  6. package/dist/cjs/tds-dropdown_2.cjs.entry.js +21 -3
  7. package/dist/cjs/tds-icon.cjs.entry.js +1 -1
  8. package/dist/cjs/tds-link.cjs.entry.js +5 -3
  9. package/dist/cjs/tds-popover-core.cjs.entry.js +1 -1
  10. package/dist/cjs/tds-slider.cjs.entry.js +33 -7
  11. package/dist/cjs/tds-toggle.cjs.entry.js +1 -1
  12. package/dist/cjs/tds-tooltip.cjs.entry.js +1 -1
  13. package/dist/cjs/tegel.cjs.js +1 -1
  14. package/dist/collection/components/banner/banner.js +1 -1
  15. package/dist/collection/components/block/block.css +11 -5
  16. package/dist/collection/components/block/block.js +16 -12
  17. package/dist/collection/components/button/button.css +2 -2
  18. package/dist/collection/components/checkbox/checkbox.js +19 -3
  19. package/dist/collection/components/chip/chip.js +39 -1
  20. package/dist/collection/components/dropdown/dropdown.js +21 -3
  21. package/dist/collection/components/icon/icon.js +1 -1
  22. package/dist/collection/components/icon/iconsArray.js +20 -20
  23. package/dist/collection/components/link/link.css +7 -1
  24. package/dist/collection/components/link/link.js +22 -2
  25. package/dist/collection/components/popover-core/tds-popover-core.css +36 -29
  26. package/dist/collection/components/slider/slider.js +34 -8
  27. package/dist/collection/components/toggle/toggle.css +4 -2
  28. package/dist/collection/components/tooltip/tooltip.css +5 -0
  29. package/dist/components/{p-462b77e8.js → p-4030e9bc.js} +2 -2
  30. package/dist/components/{p-2523819c.js → p-4f1aa84f.js} +22 -4
  31. package/dist/components/{p-e02b091c.js → p-5e1a9abc.js} +1 -1
  32. package/dist/components/{p-c48c68b3.js → p-8a2d7b2f.js} +1 -1
  33. package/dist/components/{p-dcfecf4d.js → p-aea7fa6b.js} +1 -1
  34. package/dist/components/{p-e4d7c655.js → p-d921fe75.js} +10 -3
  35. package/dist/components/{p-18c1245b.js → p-e323cd2a.js} +1 -1
  36. package/dist/components/tds-accordion-item.js +1 -1
  37. package/dist/components/tds-banner.js +1 -1
  38. package/dist/components/tds-block.js +17 -13
  39. package/dist/components/tds-button.js +1 -1
  40. package/dist/components/tds-checkbox.js +1 -1
  41. package/dist/components/tds-chip.js +14 -2
  42. package/dist/components/tds-datetime.js +1 -1
  43. package/dist/components/tds-dropdown-option.js +1 -1
  44. package/dist/components/tds-dropdown.js +1 -1
  45. package/dist/components/tds-folder-tabs.js +1 -1
  46. package/dist/components/tds-footer-group.js +1 -1
  47. package/dist/components/tds-header-cell.js +1 -1
  48. package/dist/components/tds-header-dropdown.js +3 -3
  49. package/dist/components/tds-header-hamburger.js +1 -1
  50. package/dist/components/tds-header-launcher-button.js +1 -1
  51. package/dist/components/tds-header-launcher.js +4 -4
  52. package/dist/components/tds-icon.js +1 -1
  53. package/dist/components/tds-inline-tabs.js +1 -1
  54. package/dist/components/tds-link.js +7 -4
  55. package/dist/components/tds-message.js +1 -1
  56. package/dist/components/tds-modal.js +1 -1
  57. package/dist/components/tds-navigation-tabs.js +1 -1
  58. package/dist/components/tds-popover-canvas.js +1 -1
  59. package/dist/components/tds-popover-core.js +1 -1
  60. package/dist/components/tds-popover-menu.js +1 -1
  61. package/dist/components/tds-side-menu-close-button.js +1 -1
  62. package/dist/components/tds-side-menu-dropdown.js +1 -1
  63. package/dist/components/tds-slider.js +34 -8
  64. package/dist/components/tds-step.js +1 -1
  65. package/dist/components/tds-table-body-input-wrapper.js +1 -1
  66. package/dist/components/tds-table-body-row.js +1 -1
  67. package/dist/components/tds-table-footer.js +4 -4
  68. package/dist/components/tds-table-header-input-wrapper.js +1 -1
  69. package/dist/components/tds-table-header.js +1 -1
  70. package/dist/components/tds-table-toolbar.js +1 -1
  71. package/dist/components/tds-text-field.js +1 -1
  72. package/dist/components/tds-textarea.js +1 -1
  73. package/dist/components/tds-toast.js +1 -1
  74. package/dist/components/tds-toggle.js +1 -1
  75. package/dist/components/tds-tooltip.js +2 -2
  76. package/dist/esm/loader.js +1 -1
  77. package/dist/esm/tds-block.entry.js +17 -13
  78. package/dist/esm/tds-button.entry.js +1 -1
  79. package/dist/esm/tds-checkbox.entry.js +9 -2
  80. package/dist/esm/tds-chip.entry.js +13 -1
  81. package/dist/esm/tds-dropdown_2.entry.js +21 -3
  82. package/dist/esm/tds-icon.entry.js +1 -1
  83. package/dist/esm/tds-link.entry.js +5 -3
  84. package/dist/esm/tds-popover-core.entry.js +1 -1
  85. package/dist/esm/tds-slider.entry.js +34 -8
  86. package/dist/esm/tds-toggle.entry.js +1 -1
  87. package/dist/esm/tds-tooltip.entry.js +1 -1
  88. package/dist/esm/tegel.js +1 -1
  89. package/dist/tegel/p-14f12f43.entry.js +1 -0
  90. package/dist/tegel/{p-443d8501.entry.js → p-220affa9.entry.js} +1 -1
  91. package/dist/tegel/p-2557b79b.entry.js +1 -0
  92. package/dist/tegel/{p-590b5f55.entry.js → p-4e3e2601.entry.js} +1 -1
  93. package/dist/tegel/p-6a52ed63.entry.js +1 -0
  94. package/dist/tegel/{p-845e1fca.entry.js → p-75f4c807.entry.js} +1 -1
  95. package/dist/tegel/{p-e0ce5daa.entry.js → p-868435cd.entry.js} +1 -1
  96. package/dist/tegel/p-9aefb942.entry.js +1 -0
  97. package/dist/tegel/p-e13935b6.entry.js +1 -0
  98. package/dist/tegel/p-e97a2700.entry.js +1 -0
  99. package/dist/tegel/p-fc0079d2.entry.js +1 -0
  100. package/dist/tegel/tegel.css +2 -2
  101. package/dist/tegel/tegel.esm.js +1 -1
  102. package/dist/types/components/block/block.d.ts +1 -2
  103. package/dist/types/components/checkbox/checkbox.d.ts +2 -0
  104. package/dist/types/components/chip/chip.d.ts +11 -0
  105. package/dist/types/components/dropdown/dropdown.d.ts +3 -0
  106. package/dist/types/components/link/link.d.ts +2 -0
  107. package/dist/types/components/slider/slider.d.ts +7 -0
  108. package/dist/types/components.d.ts +13 -0
  109. package/dist/types/types/Icons.d.ts +1 -1
  110. package/package.json +4 -2
  111. package/dist/tegel/p-23ddcd21.entry.js +0 -1
  112. package/dist/tegel/p-979f5255.entry.js +0 -1
  113. package/dist/tegel/p-a464920f.entry.js +0 -1
  114. package/dist/tegel/p-c3513f1f.entry.js +0 -1
  115. package/dist/tegel/p-db00f607.entry.js +0 -1
  116. package/dist/tegel/p-f91c6e9d.entry.js +0 -1
  117. package/dist/tegel/p-fe9b385f.entry.js +0 -1
@@ -5150,40 +5150,42 @@ html {
5150
5150
  :root,
5151
5151
  .tds-mode-light {
5152
5152
  --tds-block-color: var(--tds-grey-985);
5153
+ --tds-block-background: var(--tds-grey-50);
5153
5154
  --tds-block-background-primary: var(--tds-grey-50);
5154
- --tds-block-background-nested-primary: var(--tds-white);
5155
5155
  --tds-block-background-secondary: var(--tds-white);
5156
- --tds-block-background-nested-secondary: var(--tds-grey-50);
5157
- --tds-block-background: var(--tds-block-background-primary);
5158
- --tds-block-background-nested: var(--tds-block-background-nested-primary);
5156
+ --tds-block-background-even: var(--tds-grey-50);
5157
+ --tds-block-background-odd: var(--tds-white);
5159
5158
  }
5160
5159
  :root .tds-mode-variant-primary,
5161
5160
  .tds-mode-light .tds-mode-variant-primary {
5162
- --tds-block-background: var(--tds-block-background-primary);
5163
- --tds-block-background-nested: var(--tds-block-background-nested-primary);
5161
+ --tds-block-background: var(--tds-grey-50);
5162
+ --tds-block-background-even: var(--tds-grey-50);
5163
+ --tds-block-background-odd: var(--tds-white);
5164
5164
  }
5165
5165
  :root .tds-mode-variant-secondary,
5166
5166
  .tds-mode-light .tds-mode-variant-secondary {
5167
- --tds-block-background: var(--tds-block-background-secondary);
5168
- --tds-block-background-nested: var(--tds-block-background-nested-secondary);
5167
+ --tds-block-background: var(--tds-white);
5168
+ --tds-block-background-even: var(--tds-white);
5169
+ --tds-block-background-odd: var(--tds-grey-50);
5169
5170
  }
5170
5171
 
5171
5172
  .tds-mode-dark {
5172
5173
  --tds-block-color: var(--tds-grey-50);
5174
+ --tds-block-background: var(--tds-grey-900);
5173
5175
  --tds-block-background-primary: var(--tds-grey-900);
5174
- --tds-block-background-nested-primary: var(--tds-grey-868);
5175
5176
  --tds-block-background-secondary: var(--tds-grey-868);
5176
- --tds-block-background-nested-secondary: var(--tds-grey-900);
5177
- --tds-block-background: var(--tds-block-background-primary);
5178
- --tds-block-background-nested: var(--tds-block-background-nested-primary);
5177
+ --tds-block-background-even: var(--tds-grey-900);
5178
+ --tds-block-background-odd: var(--tds-grey-868);
5179
5179
  }
5180
5180
  .tds-mode-dark .tds-mode-variant-primary {
5181
- --tds-block-background: var(--tds-block-background-primary);
5182
- --tds-block-background-nested: var(--tds-block-background-nested-primary);
5181
+ --tds-block-background: var(--tds-grey-900);
5182
+ --tds-block-background-even: var(--tds-grey-900);
5183
+ --tds-block-background-odd: var(--tds-grey-868);
5183
5184
  }
5184
5185
  .tds-mode-dark .tds-mode-variant-secondary {
5185
- --tds-block-background: var(--tds-block-background-secondary);
5186
- --tds-block-background-nested: var(--tds-block-background-nested-secondary);
5186
+ --tds-block-background: var(--tds-grey-868);
5187
+ --tds-block-background-even: var(--tds-grey-868);
5188
+ --tds-block-background-odd: var(--tds-grey-900);
5187
5189
  }
5188
5190
 
5189
5191
  :root,
@@ -6098,34 +6100,39 @@ html {
6098
6100
 
6099
6101
  :root,
6100
6102
  .tds-mode-light {
6101
- --tds-link: var(--tds-blue-500);
6103
+ --tds-link: var(--tds-blue-400);
6102
6104
  --tds-link-hover: var(--tds-blue-400);
6103
6105
  --tds-link-focus: var(--tds-blue-400);
6104
- --tds-link-visited: var(--tds-grey-900);
6106
+ --tds-link-visited: var(--tds-blue-700);
6105
6107
  --tds-link-disabled: var(--tds-grey-400);
6106
6108
  }
6107
6109
  :root tds-toast,
6108
6110
  .tds-mode-light tds-toast {
6109
- --tds-link: var(--tds-blue-300);
6111
+ --tds-link: var(--tds-blue-400);
6110
6112
  --tds-link-hover: var(--tds-blue-400);
6111
6113
  --tds-link-focus: var(--tds-blue-400);
6112
- --tds-link-visited: var(--tds-blue-100);
6113
- --tds-link-disabled: var(--tds-grey-800);
6114
+ --tds-link-visited: var(--tds-blue-700);
6115
+ --tds-link-disabled: var(--tds-grey-400);
6114
6116
  }
6115
6117
 
6116
6118
  .tds-mode-dark {
6117
6119
  --tds-link: var(--tds-blue-300);
6118
- --tds-link-hover: var(--tds-blue-400);
6119
- --tds-link-focus: var(--tds-blue-400);
6120
+ --tds-link-hover: var(--tds-blue-300);
6121
+ --tds-link-focus: var(--tds-blue-300);
6120
6122
  --tds-link-visited: var(--tds-blue-100);
6121
- --tds-link-disabled: var(--tds-grey-800);
6123
+ --tds-link-disabled: var(--tds-grey-700);
6122
6124
  }
6123
6125
  .tds-mode-dark tds-toast {
6124
- --tds-link: var(--tds-blue-500);
6125
- --tds-link-hover: var(--tds-blue-400);
6126
- --tds-link-focus: var(--tds-blue-400);
6127
- --tds-link-visited: var(--tds-grey-900);
6128
- --tds-link-disabled: var(--tds-grey-400);
6126
+ --tds-link: var(--tds-blue-300);
6127
+ --tds-link-hover: var(--tds-blue-300);
6128
+ --tds-link-focus: var(--tds-blue-300);
6129
+ --tds-link-visited: var(--tds-blue-100);
6130
+ --tds-link-disabled: var(--tds-grey-700);
6131
+ }
6132
+
6133
+ tds-link tds-icon {
6134
+ padding-bottom: 4px;
6135
+ padding-left: 5px;
6129
6136
  }
6130
6137
 
6131
6138
  :root,
@@ -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,46 @@ 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
+ this.formElement = this.host.closest('form');
312
+ if (this.formElement) {
313
+ this.formElement.addEventListener('reset', this.resetToInitialValue);
314
+ this.resetEventListenerAdded = true;
315
+ }
316
+ }
317
+ }
318
+ disconnectedCallback() {
319
+ if (this.resetEventListenerAdded && this.formElement) {
320
+ this.formElement.removeEventListener('reset', this.resetToInitialValue);
321
+ this.resetEventListenerAdded = false;
322
+ }
298
323
  }
299
324
  render() {
300
- return (h("div", { key: 'fd7d051192c33b19e8c68cbeaa50ea43149457bb', class: {
325
+ return (h("div", { key: 'ed4c71d1701e0711d8b01c015f137f6a3f10457e', class: {
301
326
  'tds-slider-wrapper': true,
302
327
  '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: {
328
+ } }, h("input", { key: '7d85ba109ec41e45a4ced646cfe092832b2013a7', 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: '7c32efe653a6437068026e0b612bd1cdb0fd580d', class: {
304
329
  'tds-slider': true,
305
330
  'disabled': this.disabled,
306
331
  'tds-slider-small': this.useSmall,
307
332
  }, ref: (el) => {
308
333
  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) => {
334
+ } }, h("label", { key: '5561410214fda42ddb4553084f312de9943f825b', class: this.showTickNumbers && 'offset' }, this.label), this.useInput && (h("div", { key: '37340de05febbca285f031bd8df7d9c2588e315d', class: "tds-slider__input-values" }, h("div", { key: 'e973831529eb93eb0b0da6c5f92bd838dfb9bcdb', class: "tds-slider__input-value min-value" }, this.min))), this.useControls && (h("div", { key: '1a710d2d1ffac7533f9bae2908d4341d3b40e2f0', class: "tds-slider__controls" }, h("div", { key: '0a741834782d8e69a7d55e6cd87a3fdf4938d744', class: "tds-slider__control tds-slider__control-minus", onClick: (event) => this.stepLeft(event) }, h("tds-icon", { key: '8c67943ac2e15d742726e76c2b4c029d15c20f32', name: "minus", size: "16px" })))), h("div", { key: '96c4229007fbe882e106bcc3deb34f504c9604e3', class: "tds-slider-inner" }, this.tickValues.length > 0 && (h("div", { key: '905fc1a02070f5419f76ec5d60d8f55d89d4650b', class: "tds-slider__value-dividers-wrapper" }, h("div", { key: 'd2ccbea1b6e26ab1855c81e71730bebea0da37d8', 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: '30c9b4bb6f59631d443345ee6d1edf1973a83d0b', class: "tds-slider__track", ref: (el) => {
310
335
  this.trackElement = el;
311
- }, tabindex: this.disabled ? '-1' : '0' }, h("div", { key: '24a583182c45114d1e011bffef0f81f1e4f93a36', class: "tds-slider__track-fill", ref: (el) => {
336
+ }, tabindex: this.disabled ? '-1' : '0' }, h("div", { key: '7acbccae98c481c4cfaeb2dc66d67a2e19575b93', class: "tds-slider__track-fill", ref: (el) => {
312
337
  this.trackFillElement = el;
313
- } }), h("div", { key: '3bea53237beb92f41264386fb5ac181d1e9966a4', class: "tds-slider__thumb", ref: (el) => {
338
+ } }), h("div", { key: '46a5c3135c5f765d5fb0845372dc3854586fa44d', class: "tds-slider__thumb", ref: (el) => {
314
339
  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) => {
340
+ }, onMouseDown: () => this.grabThumb(), onTouchStart: () => this.grabThumb() }, this.tooltip && (h("div", { key: 'd39cd29d1e6302f8bd4a3d827797f8822e24b84d', class: "tds-slider__value" }, this.value, h("svg", { key: '5946f90b70b2afb2efc7f3a3bc5817a82ac3ca4a', width: "18", height: "14", viewBox: "0 0 18 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '9456df642aca39b94b17bb529ca02e2d6a2fde6c', 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: 'b4ca73a085f837d7e87e3334b8e58e5638125118', class: "tds-slider__thumb-inner", ref: (el) => {
316
341
  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" })))))));
342
+ } })))), this.useInput && (h("div", { key: '6574286ac7764807fd1e18875d6fa39ab7f7b304', class: "tds-slider__input-values" }, h("div", { key: '57a92adf59551f551c4ae06355c276a69b34028a', class: "tds-slider__input-value", onClick: (event) => this.stepLeft(event) }, this.max), h("div", { key: '0e1632ca8c9510177d349147749e3162aa46f219', class: "tds-slider__input-field-wrapper" }, h("input", { key: '094d194bce54d1073a5d657f7bc3f30107f5fe41', 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: '207398a3fd02e11f09c70ebbb8b293d6c16afd1f', class: "tds-slider__controls" }, h("div", { key: 'ca93ce9a55d0db25a3eaefd6e4dbc53106afc895', class: "tds-slider__control tds-slider__control-plus", onClick: (event) => this.stepRight(event) }, h("tds-icon", { key: '6ab123f8701fdd93580a61c500ae6da658b547fd', name: "plus", size: "16px" })))))));
318
343
  }
319
344
  static get is() { return "tds-slider"; }
320
345
  static get originalStyleUrls() {
@@ -673,6 +698,7 @@ export class TdsSlider {
673
698
  }
674
699
  };
675
700
  }
701
+ static get elementRef() { return "host"; }
676
702
  static get watchers() {
677
703
  return [{
678
704
  "propName": "value",
@@ -18,6 +18,7 @@
18
18
  position: relative;
19
19
  display: inline-block;
20
20
  vertical-align: middle;
21
+ cursor: pointer;
21
22
  /* Switch */
22
23
  }
23
24
  .tds-toggle input[type=checkbox]::after, .tds-toggle input[type=checkbox]::before {
@@ -42,10 +43,10 @@
42
43
  left: 4px;
43
44
  top: 4px;
44
45
  }
45
- .tds-toggle input[type=checkbox]:focus {
46
+ .tds-toggle input[type=checkbox]:focus, .tds-toggle input[type=checkbox]:hover {
46
47
  outline: none;
47
48
  }
48
- .tds-toggle input[type=checkbox]:focus::before {
49
+ .tds-toggle input[type=checkbox]:focus::before, .tds-toggle input[type=checkbox]:hover::before {
49
50
  background-color: var(--tds-toggle-off-slider-focus);
50
51
  border: 1px solid var(--tds-toggle-off-border-focus);
51
52
  }
@@ -105,6 +106,7 @@
105
106
  letter-spacing: var(--tds-detail-01-ls);
106
107
  color: var(--tds-toggle-label-color);
107
108
  padding-left: 8px;
109
+ cursor: pointer;
108
110
  }
109
111
  .tds-toggle label.disabled {
110
112
  color: var(--tds-toggle-label-color-disabled);
@@ -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;
@@ -1,6 +1,6 @@
1
1
  import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-28ef5186.js';
2
- import { d as defineCustomElement$2 } from './p-e4d7c655.js';
3
- import { d as defineCustomElement$1 } from './p-18c1245b.js';
2
+ import { d as defineCustomElement$2 } from './p-d921fe75.js';
3
+ import { d as defineCustomElement$1 } from './p-e323cd2a.js';
4
4
 
5
5
  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}";
6
6
  const TdsDropdownOptionStyle0 = dropdownOptionCss;
@@ -1,5 +1,5 @@
1
1
  import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-28ef5186.js';
2
- import { d as defineCustomElement$1 } from './p-18c1245b.js';
2
+ import { d as defineCustomElement$1 } from './p-e323cd2a.js';
3
3
 
4
4
  /**
5
5
  * Find the next focusable element index in a list of focusable elements.
@@ -214,6 +214,12 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
214
214
  value: (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value).toString()) !== null && _b !== void 0 ? _b : null,
215
215
  });
216
216
  };
217
+ this.resetInput = () => {
218
+ const inputEl = this.host.querySelector('input');
219
+ if (inputEl) {
220
+ this.reset();
221
+ }
222
+ };
217
223
  this.name = undefined;
218
224
  this.disabled = false;
219
225
  this.helper = undefined;
@@ -418,10 +424,22 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
418
424
  });
419
425
  });
420
426
  }
427
+ componentDidRender() {
428
+ const form = this.host.closest('form');
429
+ if (form) {
430
+ form.addEventListener('reset', this.resetInput);
431
+ }
432
+ }
433
+ disconnectedCallback() {
434
+ const form = this.host.closest('form');
435
+ if (form) {
436
+ form.removeEventListener('reset', this.resetInput);
437
+ }
438
+ }
421
439
  render() {
422
440
  var _a, _b, _c, _d;
423
441
  appendHiddenInput(this.host, this.name, (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value).toString(), this.disabled);
424
- return (h(Host, { key: '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: {
442
+ return (h(Host, { key: 'b452aebe0997ce114fff5c7527d7305e97bf6462', role: "select", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, this.label && this.labelPosition === 'outside' && (h("div", { key: '356273d3065daebba4d72a7f30f745dab1eb803e', class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: 'c8b617da62a01e0432fee90c243723edde5fecca', class: `dropdown-select ${this.size} ${this.disabled ? 'disabled' : ''}` }, this.filter ? (h("div", { class: {
425
443
  filter: true,
426
444
  focus: this.filterFocus,
427
445
  disabled: this.disabled,
@@ -471,7 +489,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
471
489
  label-inside-as-placeholder
472
490
  ${this.size}
473
491
  ${((_c = this.value) === null || _c === void 0 ? void 0 : _c.length) ? 'selected' : ''}
474
- ` }, this.label)), h("div", { class: `placeholder ${this.size}` }, ((_d = this.value) === null || _d === void 0 ? void 0 : _d.length) ? this.getValue() : this.placeholder), h("tds-icon", { "aria-label": "Open/Close dropdown", svgTitle: "Open/Close dropdown", class: `menu-icon ${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))))), h("div", { key: 'dd850ac34b473f9cac51ad5bdc8417d994b7946a', ref: (element) => (this.dropdownList = element), class: {
492
+ ` }, 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: 'bd702f67929bfd42350b11a9680e007dd74e4bad', ref: (element) => (this.dropdownList = element), class: {
475
493
  'dropdown-list': true,
476
494
  [this.size]: true,
477
495
  [this.getOpenDirection()]: true,
@@ -480,7 +498,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
480
498
  'closed': !this.open,
481
499
  [`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
482
500
  [`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
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))));
501
+ } }, h("slot", { key: '64c67c8aa6aa68089c59de1fdedb915ea4beb3af', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: '2152a99732579e2c2f7e82d450743e67d8b9f263', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: 'fbc4ebc39a4ca4fc49a77ea1160042ad1de005ec', class: `helper ${this.error ? 'error' : ''} ${this.disabled ? 'disabled' : ''}` }, this.error && h("tds-icon", { key: '318107cbe939b82250bb97bfbceae4017e438ba1', name: "error", size: "16px" }), this.helper))));
484
502
  }
485
503
  get host() { return this; }
486
504
  static get watchers() { return {