@scania/tegel 1.38.0-feat-text-field-add-types-and-props-beta.0 → 1.38.0-support-paste-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 (89) hide show
  1. package/dist/cjs/handlePasteEvent-901439bf.js +33 -0
  2. package/dist/cjs/index-ca8040ad.js +4 -4
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/tds-core-header-item_2.cjs.entry.js +1 -1
  5. package/dist/cjs/tds-dropdown_2.cjs.entry.js +22 -55
  6. package/dist/cjs/tds-navigation-tab.cjs.entry.js +1 -1
  7. package/dist/cjs/tds-side-menu-collapse-button.cjs.entry.js +6 -4
  8. package/dist/cjs/tds-side-menu-dropdown-list-item.cjs.entry.js +1 -1
  9. package/dist/cjs/tds-side-menu-item.cjs.entry.js +1 -1
  10. package/dist/cjs/tds-slider.cjs.entry.js +10 -39
  11. package/dist/cjs/tds-text-field.cjs.entry.js +31 -8
  12. package/dist/cjs/tds-textarea.cjs.entry.js +18 -3
  13. package/dist/cjs/tegel.cjs.js +1 -1
  14. package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +3 -13
  15. package/dist/collection/components/dropdown/dropdown.js +20 -56
  16. package/dist/collection/components/header/header-item/header-item.css +3 -3
  17. package/dist/collection/components/side-menu/side-menu-collapse-button/side-menu-collapse-button.js +6 -4
  18. package/dist/collection/components/side-menu/side-menu-dropdown-list-item/side-menu-dropdown-list-item.css +6 -84
  19. package/dist/collection/components/side-menu/side-menu-item/side-menu-item.css +6 -82
  20. package/dist/collection/components/slider/slider.css +28 -24
  21. package/dist/collection/components/slider/slider.js +9 -38
  22. package/dist/collection/components/tabs/navigation-tabs/navigation-tab/navigation-tab.css +1 -1
  23. package/dist/collection/components/text-field/text-field.js +33 -46
  24. package/dist/collection/components/textarea/textarea.js +18 -3
  25. package/dist/collection/utils/handlePasteEvent.js +29 -0
  26. package/dist/components/p-0cf97292.js +31 -0
  27. package/dist/components/{p-072bf53a.js → p-63437b77.js} +1 -1
  28. package/dist/components/{p-ad6babcd.js → p-6adb1ce3.js} +1 -1
  29. package/dist/components/{p-de36fc8a.js → p-94bfc9f4.js} +20 -44
  30. package/dist/components/{p-c4318e35.js → p-d64878cb.js} +3 -13
  31. package/dist/components/{p-92c2da85.js → p-ea381f94.js} +1 -1
  32. package/dist/components/tds-dropdown-option.js +1 -1
  33. package/dist/components/tds-dropdown.js +1 -1
  34. package/dist/components/tds-header-brand-symbol.js +1 -1
  35. package/dist/components/tds-header-dropdown.js +1 -1
  36. package/dist/components/tds-header-hamburger.js +1 -1
  37. package/dist/components/tds-header-item.js +1 -1
  38. package/dist/components/tds-header-launcher-button.js +1 -1
  39. package/dist/components/tds-header-launcher.js +2 -2
  40. package/dist/components/tds-navigation-tab.js +1 -1
  41. package/dist/components/tds-side-menu-collapse-button.js +7 -5
  42. package/dist/components/tds-side-menu-dropdown-list-item.js +1 -1
  43. package/dist/components/tds-side-menu-dropdown.js +1 -1
  44. package/dist/components/tds-side-menu-item.js +1 -1
  45. package/dist/components/tds-slider.js +12 -59
  46. package/dist/components/tds-table-footer.js +2 -2
  47. package/dist/components/tds-text-field.js +210 -1
  48. package/dist/components/tds-textarea.js +18 -3
  49. package/dist/esm/handlePasteEvent-eefa3884.js +31 -0
  50. package/dist/esm/index-51d04e39.js +4 -4
  51. package/dist/esm/loader.js +1 -1
  52. package/dist/esm/tds-core-header-item_2.entry.js +1 -1
  53. package/dist/esm/tds-dropdown_2.entry.js +22 -55
  54. package/dist/esm/tds-navigation-tab.entry.js +1 -1
  55. package/dist/esm/tds-side-menu-collapse-button.entry.js +6 -4
  56. package/dist/esm/tds-side-menu-dropdown-list-item.entry.js +1 -1
  57. package/dist/esm/tds-side-menu-item.entry.js +1 -1
  58. package/dist/esm/tds-slider.entry.js +10 -39
  59. package/dist/esm/tds-text-field.entry.js +31 -8
  60. package/dist/esm/tds-textarea.entry.js +19 -4
  61. package/dist/esm/tegel.js +1 -1
  62. package/dist/tegel/p-06d3490c.entry.js +1 -0
  63. package/dist/tegel/p-0cf97292.js +1 -0
  64. package/dist/tegel/p-397c8969.entry.js +1 -0
  65. package/dist/tegel/p-5c077bb9.entry.js +1 -0
  66. package/dist/tegel/p-61a1dc59.entry.js +1 -0
  67. package/dist/tegel/p-a0591e58.entry.js +1 -0
  68. package/dist/tegel/p-a4f83463.entry.js +1 -0
  69. package/dist/tegel/p-a7a4fb4b.entry.js +1 -0
  70. package/dist/tegel/p-ae438c2e.entry.js +1 -0
  71. package/dist/tegel/{p-ecb34850.entry.js → p-db38b4f2.entry.js} +1 -1
  72. package/dist/tegel/tegel.css +1 -1
  73. package/dist/tegel/tegel.esm.js +1 -1
  74. package/dist/types/components/dropdown/dropdown.d.ts +0 -4
  75. package/dist/types/components/slider/slider.d.ts +0 -2
  76. package/dist/types/components/text-field/text-field.d.ts +2 -5
  77. package/dist/types/components/textarea/textarea.d.ts +2 -0
  78. package/dist/types/components.d.ts +2 -18
  79. package/dist/types/utils/handlePasteEvent.d.ts +9 -0
  80. package/package.json +1 -1
  81. package/dist/components/p-5e6035ad.js +0 -191
  82. package/dist/tegel/p-2c9ea0be.entry.js +0 -1
  83. package/dist/tegel/p-2f9b15f6.entry.js +0 -1
  84. package/dist/tegel/p-336f2de3.entry.js +0 -1
  85. package/dist/tegel/p-56ff5780.entry.js +0 -1
  86. package/dist/tegel/p-628dc7f7.entry.js +0 -1
  87. package/dist/tegel/p-c465f9b8.entry.js +0 -1
  88. package/dist/tegel/p-c4f701f6.entry.js +0 -1
  89. package/dist/tegel/p-cd5103e3.entry.js +0 -1
@@ -62,7 +62,7 @@
62
62
  background-color: var(--tds-navigation-tabs-tab-indicator-background-hover);
63
63
  z-index: 1;
64
64
  }
65
- :host .navigation-tab-item:hover:focus-within::after {
65
+ :host .navigation-tab-item:focus-visible::after {
66
66
  bottom: 3px;
67
67
  }
68
68
  :host .selected ::slotted(*) {
@@ -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 { handlePasteEvent } from "../../utils/handlePasteEvent";
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.
@@ -27,8 +28,6 @@ export class TdsTextField {
27
28
  this.maxLength = undefined;
28
29
  this.autofocus = false;
29
30
  this.tdsAriaLabel = undefined;
30
- this.required = false;
31
- this.autocomplete = 'off';
32
31
  this.focusInput = false;
33
32
  }
34
33
  handleChange(event) {
@@ -52,6 +51,30 @@ export class TdsTextField {
52
51
  this.value = value;
53
52
  this.tdsInput.emit(event);
54
53
  }
54
+ // Handle paste events to ensure input events are triggered
55
+ handlePaste(event) {
56
+ const inputEl = event.target;
57
+ // Create a value processor for number inputs with min/max validation
58
+ const valueProcessor = (value) => {
59
+ if (this.type === 'number') {
60
+ const numericValue = Number(value);
61
+ if (this.min !== undefined && numericValue < Number(this.min)) {
62
+ return String(this.min);
63
+ }
64
+ if (this.max !== undefined && numericValue > Number(this.max)) {
65
+ return String(this.max);
66
+ }
67
+ }
68
+ return value;
69
+ };
70
+ // Create a callback to handle the synthetic input event
71
+ const onInputCallback = (syntheticEvent) => {
72
+ this.value = inputEl.value;
73
+ this.tdsInput.emit(syntheticEvent);
74
+ };
75
+ // Use the utility function
76
+ handlePasteEvent(inputEl, onInputCallback, valueProcessor);
77
+ }
55
78
  /** Set the input as focus when clicking the whole Text Field with suffix/prefix */
56
79
  handleFocus(event) {
57
80
  this.textInput.focus();
@@ -73,7 +96,7 @@ export class TdsTextField {
73
96
  var _a;
74
97
  const usesPrefixSlot = hasSlot('prefix', this.host);
75
98
  const usesSuffixSlot = hasSlot('suffix', this.host);
76
- return (h("div", { key: '5176142333959937bf50a57083231c904bc904a5', class: {
99
+ return (h("div", { key: 'b37e6dd9aa339eeee50726de43b819c9a0dafad3', class: {
77
100
  'form-text-field': true,
78
101
  'form-text-field-nomin': this.noMinWidth,
79
102
  'text-field-focus': this.focusInput && !this.disabled,
@@ -91,19 +114,19 @@ export class TdsTextField {
91
114
  'form-text-field-sm': this.size === 'sm',
92
115
  'form-text-field-error': this.state === 'error',
93
116
  'form-text-field-success': this.state === 'success',
94
- } }, this.labelPosition === 'outside' && (h("div", { key: 'e2bf45f7635233e9d85edf3bdb8ce11270bc7662', class: "text-field-label-outside" }, h("label", { key: '223b6f56c6367aa1f3350cf5192323353815d7aa', htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), h("div", { key: '15549969c2aad58376b8a4398a189d1adae4ac38', onClick: () => this.textInput.focus(), class: "text-field-container" }, usesPrefixSlot && (h("div", { key: '2317c9f118169e7492016640b8ee16f06ff99c03', class: {
117
+ } }, this.labelPosition === 'outside' && (h("div", { key: '7ac5bf6dec464b5216e77a1fefe765b5ebfabfbd', class: "text-field-label-outside" }, h("label", { key: '6b4e66e93f67a3e299e6777006c468bc17c7bef1', htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), h("div", { key: '2e14fcb37fecca77461e15cece8ae0086aa26ad4', onClick: () => this.textInput.focus(), class: "text-field-container" }, usesPrefixSlot && (h("div", { key: 'f6a4d22482c7a036e25386ed2173c9d8689664f7', class: {
95
118
  'text-field-slot-wrap-prefix': true,
96
119
  'text-field-error': this.state === 'error',
97
120
  'text-field-success': this.state === 'success',
98
121
  'text-field-default': this.state === 'default',
99
- } }, h("slot", { key: '82ed6f444853365bfdba485477c51a224dfe8694', name: "prefix" }))), h("div", { key: '41009c0b3e0037f56c118040dfd1fd8b30046d1b', class: "text-field-input-container" }, h("input", { key: '22873b319a55725e23a1c0f394dc1b287b266610', ref: (inputEl) => {
122
+ } }, h("slot", { key: '2ab91f5db4dcea2ee7c24e0705593b34f6eccc51', name: "prefix" }))), h("div", { key: '7a6114e3cce7c286292b7f16301a2d11e0ef535b', class: "text-field-input-container" }, h("input", { key: '51c00d7f54c8b49051d50ff5375da082ca4482b0', ref: (inputEl) => {
100
123
  this.textInput = inputEl;
101
124
  }, class: {
102
125
  'text-field-input': true,
103
126
  'text-field-input-sm': this.size === 'sm',
104
127
  'text-field-input-md': this.size === 'md',
105
128
  'text-field-input-lg': this.size === 'lg',
106
- }, type: this.type, disabled: this.disabled, readonly: this.disabled ? false : this.readOnly, placeholder: this.placeholder, value: this.value, autofocus: this.autofocus, maxlength: this.maxLength, name: this.name, min: this.min, max: this.max, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onFocus: (event) => {
129
+ }, type: this.type, disabled: this.disabled, readonly: this.disabled ? false : this.readOnly, placeholder: this.placeholder, value: this.value, autofocus: this.autofocus, maxlength: this.maxLength, name: this.name, min: this.min, max: this.max, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onPaste: (event) => this.handlePaste(event), onFocus: (event) => {
107
130
  if (!this.readOnly) {
108
131
  this.handleFocus(event);
109
132
  }
@@ -111,13 +134,13 @@ export class TdsTextField {
111
134
  if (!this.readOnly) {
112
135
  this.handleBlur(event);
113
136
  }
114
- }, "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}`, required: this.required, autocomplete: this.autocomplete }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { key: '75991eafd96aba94557ab7a049778a3ea97b2ae7', class: "text-field-label-inside", htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), usesSuffixSlot && (h("div", { key: 'fffe2ff86f1e52b8ea8fc2783062c8b0395f237e', class: {
137
+ }, "aria-invalid": this.state === 'error' ? 'true' : 'false', "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: 'bcdcbaa0abfe6d15519c5bdf4a713c672e4ae039', class: "text-field-label-inside", htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), usesSuffixSlot && (h("div", { key: '186d2831637d2e5817879a1b8f578c36fba07e06', class: {
115
138
  'text-field-slot-wrap-suffix': true,
116
139
  'text-field-error': this.state === 'error',
117
140
  'text-field-success': this.state === 'success',
118
141
  'text-field-default': this.state === 'default',
119
142
  'tds-u-display-none': this.readOnly,
120
- } }, h("slot", { key: '8f5525e5dea933ec1d592c81cb94d3516944fe36', name: "suffix" }))), this.readOnly && !this.hideReadOnlyIcon && (h("span", { key: 'c6db63da6886396b3185c1c2848ffb02172d8bb7', class: "text-field-icon__readonly" }, h("tds-tooltip", { key: '1c97a0f9a27445bc3db63507954379126935fcfa', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: '7cc3a6788517d70c9dd19206fc20922ecd2e0452', id: "readonly-tooltip", name: "edit_inactive", size: "20px" })))), h("div", { key: '4b55eb60fa52b4323ddafc302c0ad6eacd5ac4a5', "aria-live": "assertive" }, (this.helper || this.maxLength > 0) && (h("div", { key: '988750b05a617a6919548042ade5692d754da6b6', class: "text-field-helper", id: `text-field-helper-element-${this.uuid}` }, this.state === 'error' && (h("div", { key: 'b9f0a3bdbbcd1bac146f4bed21b9998ef436e80b', class: "text-field-helper-error-state" }, !this.readOnly && h("tds-icon", { key: 'b811d4216d615ad6ada5dc2cb88ab8f82dd87b47', name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, !this.readOnly && this.maxLength > 0 && (h("span", { key: 'c0ce5dc118f23327e9746c4d7784a61586913289', class: {
143
+ } }, h("slot", { key: 'ddb3f21a1189e36530ab62a3166115f0c805974a', name: "suffix" }))), this.readOnly && !this.hideReadOnlyIcon && (h("span", { key: '0a03400c53cdde6795474e38b55ac4a62c738f22', class: "text-field-icon__readonly" }, h("tds-tooltip", { key: 'f06d7f697adfe89a46b9255f5b2d1fc68c5c391b', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: 'b1a9cbadc4723e339835685a977978f268c497d3', id: "readonly-tooltip", name: "edit_inactive", size: "20px" })))), h("div", { key: 'bd0fe776e4b7d0500a9c6755635eb6b81dae1b31', "aria-live": "assertive" }, (this.helper || this.maxLength > 0) && (h("div", { key: '9e6db2662ec9e2e7f4045ae95b6d5c3de2cddc0f', class: "text-field-helper", id: `text-field-helper-element-${this.uuid}` }, this.state === 'error' && (h("div", { key: '498d9d7f555466aa7c32f7f68c63e06c56470b4e', class: "text-field-helper-error-state" }, !this.readOnly && h("tds-icon", { key: '3b90488f2e7e26317789b00d6e33bbb2b329e571', name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, !this.readOnly && this.maxLength > 0 && (h("span", { key: '0f6d239f926f0287b6e6be3806f57a44a64a422b', class: {
121
144
  'text-field-textcounter-divider': true,
122
145
  'text-field-textcounter-disabled': this.disabled,
123
146
  } }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, " / ", this.maxLength)))))));
@@ -140,8 +163,8 @@ export class TdsTextField {
140
163
  "type": "string",
141
164
  "mutable": false,
142
165
  "complexType": {
143
- "original": "'text' | 'password' | 'number' | 'email' | 'tel'",
144
- "resolved": "\"email\" | \"number\" | \"password\" | \"tel\" | \"text\"",
166
+ "original": "'text' | 'password' | 'number'",
167
+ "resolved": "\"number\" | \"password\" | \"text\"",
145
168
  "references": {}
146
169
  },
147
170
  "required": false,
@@ -472,42 +495,6 @@ export class TdsTextField {
472
495
  },
473
496
  "attribute": "tds-aria-label",
474
497
  "reflect": false
475
- },
476
- "required": {
477
- "type": "boolean",
478
- "mutable": false,
479
- "complexType": {
480
- "original": "boolean",
481
- "resolved": "boolean",
482
- "references": {}
483
- },
484
- "required": false,
485
- "optional": false,
486
- "docs": {
487
- "tags": [],
488
- "text": "Makes the text field required"
489
- },
490
- "attribute": "required",
491
- "reflect": false,
492
- "defaultValue": "false"
493
- },
494
- "autocomplete": {
495
- "type": "string",
496
- "mutable": false,
497
- "complexType": {
498
- "original": "string",
499
- "resolved": "string",
500
- "references": {}
501
- },
502
- "required": false,
503
- "optional": false,
504
- "docs": {
505
- "tags": [],
506
- "text": "Value to be used for the text field's autocomplete attribute"
507
- },
508
- "attribute": "autocomplete",
509
- "reflect": false,
510
- "defaultValue": "'off'"
511
498
  }
512
499
  };
513
500
  }
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import generateUniqueId from "../../utils/generateUniqueId";
3
+ import { handlePasteEvent } from "../../utils/handlePasteEvent";
3
4
  export class TdsTextarea {
4
5
  constructor() {
5
6
  this.uuid = generateUniqueId();
@@ -36,6 +37,19 @@ export class TdsTextarea {
36
37
  this.tdsInput.emit(event);
37
38
  }
38
39
  }
40
+ // Handle paste events to ensure input events are triggered
41
+ handlePaste(event) {
42
+ if (event.target instanceof HTMLTextAreaElement) {
43
+ const textareaEl = event.target;
44
+ // Create a callback to handle the synthetic input event
45
+ const onInputCallback = (syntheticEvent) => {
46
+ this.value = textareaEl.value;
47
+ this.tdsInput.emit(syntheticEvent);
48
+ };
49
+ // Use the utility function (no value processor needed for textarea)
50
+ handlePasteEvent(textareaEl, onInputCallback);
51
+ }
52
+ }
39
53
  /* Set the input as focus when clicking the whole textarea with suffix/prefix */
40
54
  handleFocus(event) {
41
55
  this.textEl.focus();
@@ -60,7 +74,7 @@ export class TdsTextarea {
60
74
  }
61
75
  render() {
62
76
  var _a;
63
- return (h("div", { key: '873fc5866c777549e56d115e7bce64a62fdd5c0c', class: {
77
+ return (h("div", { key: 'e723f8a641f578ffa97ada5746d900e49eb79252', class: {
64
78
  'textarea-container': true,
65
79
  'textarea-label-inside': this.labelPosition === 'inside',
66
80
  'textarea-focus': this.focusInput,
@@ -70,7 +84,7 @@ export class TdsTextarea {
70
84
  'textarea-data': this.value !== '',
71
85
  [`textarea-${this.state}`]: this.state === 'error' || this.state === 'success',
72
86
  'no-min-width': this.noMinWidth,
73
- } }, this.labelPosition !== 'no-label' && (h("label", { key: '09f5df4efb39b7e3eb71d8567adc5cffd374ad66', htmlFor: `textarea-element-${this.uuid}`, class: 'textarea-label' }, this.label)), h("div", { key: '57bd6d6e2e7a1919d668625a675e4a20421af965', class: "textarea-wrapper" }, h("textarea", { key: '69955de378170f86c7a942d5f8101aa2ff9440f4', id: `textarea-element-${this.uuid}`, class: 'textarea-input', ref: (inputEl) => {
87
+ } }, this.labelPosition !== 'no-label' && (h("label", { key: 'd2dbcc394a2790218f31738d5b5b9525b1fc0846', htmlFor: `textarea-element-${this.uuid}`, class: 'textarea-label' }, this.label)), h("div", { key: '163cd6db0ad8bcbe3d50444c78eea1c38463c450', class: "textarea-wrapper" }, h("textarea", { key: 'b1311130a28ec0a9053d98aff1afd009f22628fb', id: `textarea-element-${this.uuid}`, class: 'textarea-input', ref: (inputEl) => {
74
88
  this.textEl = inputEl;
75
89
  }, 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) => {
76
90
  if (!this.readOnly) {
@@ -80,7 +94,7 @@ export class TdsTextarea {
80
94
  if (!this.readOnly) {
81
95
  this.handleBlur(event);
82
96
  }
83
- }, 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: '0fded8e72f3f6d8e6f53cb57df94f480df17ce53', class: "textarea-resizer-icon" }, h("svg", { key: '6b41ae06bbedfa5ba88991bc6856f80ca8a4b6f8', width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'c4f731e7483bade2d0dbd545302afc278039a122', "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: '94bc8eed69418751ad240087201827a0ef0185b4', class: "textarea-icon__readonly" }, h("tds-tooltip", { key: '231983d3994030724a06358f37dd0e53f91d78d4', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: '9e7f16d10939227a5c8c87f00ddd653a58c094ad', id: "readonly-tooltip", name: "edit_inactive", svgTitle: "inactive" })))), h("span", { key: '67222f0c93979caf49881c591cd99eb4c97ebdc1', class: 'textarea-helper', "aria-live": "assertive", id: `textarea-helper-element-${this.uuid}` }, this.state === 'error' && this.helper && !this.readOnly && (h("tds-icon", { key: 'cbde13084b090f7eea4bd80da47373ec941e1981', name: "error", size: "16px" })), this.helper), this.maxLength > 0 && (h("div", { key: '5895277b2e07f4c8f2990f624eb0797dffd0b1f0', class: 'textarea-textcounter' }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: '97afedbb5aaf02461a38f39643298b6c2650c52f', class: "textfield-textcounter-divider" }, " / "), " ", this.maxLength))));
97
+ }, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onPaste: (event) => this.handlePaste(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: 'b423c1b6f9652c3aa95447f33100eba166b7de06', class: "textarea-resizer-icon" }, h("svg", { key: 'c254d5ac9fc72500c2263b49c3c4e3642b9097bb', width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'a6ee4ec8cbb32d6fbc11fb03cbdc9af6f456805b', "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: '0e28490b93e622ad1322c1adc591329fde3920cd', class: "textarea-icon__readonly" }, h("tds-tooltip", { key: '792b4866942b26634f8cef72d00ca11b03ba3fbe', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: '2b809a91f13c09be470feafd622389e78f1ed4ca', id: "readonly-tooltip", name: "edit_inactive", svgTitle: "inactive" })))), h("span", { key: '0c8937b9279a72d4805bb880b38be59e086c5e39', class: 'textarea-helper', "aria-live": "assertive", id: `textarea-helper-element-${this.uuid}` }, this.state === 'error' && this.helper && !this.readOnly && (h("tds-icon", { key: '77ab9eff4a502d6ebd6959bd4ed957b9a1aa1a58', name: "error", size: "16px" })), this.helper), this.maxLength > 0 && (h("div", { key: 'a011f0e2c0e7a22fe243c967f67e022e0439d9b2', class: 'textarea-textcounter' }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: 'cba5a9f73a0c74826f8722eb1ae861e8ddce5bb5', class: "textfield-textcounter-divider" }, " / "), " ", this.maxLength))));
84
98
  }
85
99
  static get is() { return "tds-textarea"; }
86
100
  static get encapsulation() { return "scoped"; }
@@ -503,4 +517,5 @@ export class TdsTextarea {
503
517
  }
504
518
  };
505
519
  }
520
+ static get elementRef() { return "host"; }
506
521
  }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Utility function to handle paste events and trigger input events
3
+ * This ensures that paste operations properly trigger tdsInput events
4
+ *
5
+ * @param element - The HTMLInputElement or HTMLTextAreaElement that received the paste
6
+ * @param onInputCallback - Callback function to handle the input event
7
+ * @param valueProcessor - Optional function to process the value before setting it
8
+ */
9
+ export function handlePasteEvent(element, onInputCallback, valueProcessor) {
10
+ // Use setTimeout to ensure the paste content is processed before we trigger the input event
11
+ setTimeout(() => {
12
+ let value = element.value;
13
+ // Apply value processing if provided (e.g., for number inputs with min/max validation)
14
+ if (valueProcessor) {
15
+ value = valueProcessor(value);
16
+ element.value = value;
17
+ }
18
+ // Create a synthetic input event to maintain consistency
19
+ const syntheticInputEvent = new InputEvent('input', {
20
+ bubbles: true,
21
+ cancelable: true,
22
+ inputType: 'insertFromPaste',
23
+ data: null,
24
+ isComposing: false,
25
+ });
26
+ // Trigger the callback with the synthetic event
27
+ onInputCallback(syntheticInputEvent);
28
+ }, 0);
29
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Utility function to handle paste events and trigger input events
3
+ * This ensures that paste operations properly trigger tdsInput events
4
+ *
5
+ * @param element - The HTMLInputElement or HTMLTextAreaElement that received the paste
6
+ * @param onInputCallback - Callback function to handle the input event
7
+ * @param valueProcessor - Optional function to process the value before setting it
8
+ */
9
+ function handlePasteEvent(element, onInputCallback, valueProcessor) {
10
+ // Use setTimeout to ensure the paste content is processed before we trigger the input event
11
+ setTimeout(() => {
12
+ let value = element.value;
13
+ // Apply value processing if provided (e.g., for number inputs with min/max validation)
14
+ if (valueProcessor) {
15
+ value = valueProcessor(value);
16
+ element.value = value;
17
+ }
18
+ // Create a synthetic input event to maintain consistency
19
+ const syntheticInputEvent = new InputEvent('input', {
20
+ bubbles: true,
21
+ cancelable: true,
22
+ inputType: 'insertFromPaste',
23
+ data: null,
24
+ isComposing: false,
25
+ });
26
+ // Trigger the callback with the synthetic event
27
+ onInputCallback(syntheticInputEvent);
28
+ }, 0);
29
+ }
30
+
31
+ export { handlePasteEvent as h };
@@ -1,7 +1,7 @@
1
1
  import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
2
2
  import { i as inheritAriaAttributes } from './p-0bd4c19c.js';
3
3
  import { d as defineCustomElement$3 } from './p-9ad61cb5.js';
4
- import { d as defineCustomElement$2 } from './p-ad6babcd.js';
4
+ import { d as defineCustomElement$2 } from './p-6adb1ce3.js';
5
5
  import { d as defineCustomElement$1 } from './p-b390ece5.js';
6
6
 
7
7
  const headerLauncherButtonCss = ":host{display:block}:host tds-header-item{display:block}:host .icon{position:relative;margin-left:-6px;left:3px;transition:all 0.2s ease-in-out}";
@@ -2,7 +2,7 @@ import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
2
2
  import { d as dfs } from './p-52bf0fdf.js';
3
3
  import { d as defineCustomElement$1 } from './p-9ad61cb5.js';
4
4
 
5
- const headerItemCss = ":host ::slotted(button),:host ::slotted(a){all:unset;box-sizing:border-box;background-color:var(--tds-header-background);border-right:1px solid var(--tds-header--basic-element-border);width:100%;height:100%;cursor:pointer;padding:0 24px;display:flex;align-items:center;gap:8px}:host ::slotted(button) *,:host ::slotted(a) *{box-sizing:border-box}:host ::slotted(button:hover),:host ::slotted(a:hover){background-color:var(--tds-header-item-hover)}:host ::slotted(button:focus-visible),:host ::slotted(a:focus-visible){border:none;outline:2px solid var(--tds-focus-outline-color);box-shadow:inset 0 0 0 3px var(--tds-white);outline-offset:-2px}:host .component-active ::slotted(button),:host .component-active ::slotted(a){background-color:var(--tds-header--basic-element-background-open);color:var(--tds-header-nav-item-dropdown-opened-color);border-color:var(--tds-header--basic-element-border-open)}:host .component-selected:not(.component-active) ::slotted(button),:host .component-selected:not(.component-active) ::slotted(a){background-color:var(--tds-header--basic-element-background-selected);padding-top:4px;border-bottom-style:solid;border-bottom-width:4px;border-bottom-color:var(--tds-nav-item-border-color-active)}";
5
+ const headerItemCss = ":host ::slotted(button),:host ::slotted(a){all:unset;box-sizing:border-box;background-color:var(--tds-header-background);border-right:1px solid var(--tds-header--basic-element-border);width:100%;height:100%;cursor:pointer;padding:0 24px;display:flex;align-items:center;gap:8px}:host ::slotted(button) *,:host ::slotted(a) *{box-sizing:border-box}:host ::slotted(button:hover),:host ::slotted(a:hover){background-color:var(--tds-header-item-hover)}:host ::slotted(button:focus-visible),:host ::slotted(a:focus-visible){outline:2px solid var(--tds-focus-outline-color);box-shadow:0 0 0 1px var(--tds-white);outline-offset:1px;z-index:1}:host .component-active ::slotted(button),:host .component-active ::slotted(a){background-color:var(--tds-header--basic-element-background-open);color:var(--tds-header-nav-item-dropdown-opened-color);border-color:var(--tds-header--basic-element-border-open)}:host .component-selected:not(.component-active) ::slotted(button),:host .component-selected:not(.component-active) ::slotted(a){background-color:var(--tds-header--basic-element-background-selected);padding-top:4px;border-bottom-style:solid;border-bottom-width:4px;border-bottom-color:var(--tds-nav-item-border-color-active)}";
6
6
  const TdsHeaderItemStyle0 = headerItemCss;
7
7
 
8
8
  const TdsHeaderItem = /*@__PURE__*/ proxyCustomElement(class TdsHeaderItem extends H {
@@ -78,7 +78,6 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
78
78
  this.tdsFocus = createEvent(this, "tdsFocus", 6);
79
79
  this.tdsBlur = createEvent(this, "tdsBlur", 6);
80
80
  this.tdsInput = createEvent(this, "tdsInput", 6);
81
- this.hasFocus = false;
82
81
  this.setDefaultOption = () => {
83
82
  if (this.internalDefaultValue) {
84
83
  // Convert the internal default value to an array if it's not already
@@ -161,7 +160,6 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
161
160
  this.handleFilter = (event) => {
162
161
  this.tdsInput.emit(event);
163
162
  const query = event.target.value.toLowerCase();
164
- this.filterQuery = query;
165
163
  /* Check if the query is empty, and if so, show all options */
166
164
  const children = this.getChildren();
167
165
  if (query === '') {
@@ -187,33 +185,26 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
187
185
  }
188
186
  };
189
187
  this.handleFilterReset = () => {
190
- // only reset selected values when filterquery is blank
191
- if (!this.filterQuery.length) {
192
- this.reset();
193
- }
188
+ this.reset();
194
189
  this.inputElement.value = '';
195
190
  this.handleFilter({ target: { value: '' } });
196
191
  this.inputElement.focus();
197
192
  // Add this line to ensure internal value is cleared
198
193
  this.internalValue = '';
199
194
  };
200
- this.handleFocus = () => {
195
+ this.handleFocus = (event) => {
201
196
  this.open = true;
202
197
  this.filterFocus = true;
203
- if (this.inputElement) {
198
+ if (this.multiselect && this.inputElement) {
204
199
  this.inputElement.value = '';
205
200
  }
206
- // Focus event is now handled by focusin listener
201
+ this.tdsFocus.emit(event);
207
202
  if (this.filter) {
208
203
  this.handleFilter({ target: { value: '' } });
209
204
  }
210
205
  };
211
- this.handleBlur = () => {
212
- // Handle internal state changes when component loses focus
213
- this.filterFocus = false;
214
- if (this.inputElement) {
215
- this.inputElement.value = this.getValue();
216
- }
206
+ this.handleBlur = (event) => {
207
+ this.tdsBlur.emit(event);
217
208
  };
218
209
  this.resetInput = () => {
219
210
  const inputEl = this.host.querySelector('input');
@@ -245,7 +236,6 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
245
236
  this.filterFocus = undefined;
246
237
  this.internalDefaultValue = undefined;
247
238
  this.selectedOptions = [];
248
- this.filterQuery = '';
249
239
  }
250
240
  handleValueChange(newValue) {
251
241
  // Normalize to array
@@ -389,7 +379,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
389
379
  }
390
380
  }
391
381
  // Always trigger the focus event to open the dropdown
392
- this.handleFocus();
382
+ this.handleFocus({});
393
383
  }
394
384
  /** Method for closing the Dropdown. */
395
385
  async close() {
@@ -411,25 +401,6 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
411
401
  }
412
402
  }
413
403
  }
414
- onFocusIn(event) {
415
- // Check if the focus is within this dropdown component
416
- if (this.host.contains(event.target)) {
417
- if (!this.hasFocus) {
418
- this.hasFocus = true;
419
- this.tdsFocus.emit(event);
420
- }
421
- }
422
- }
423
- onFocusOut(event) {
424
- // Only emit blur if focus is actually leaving the entire dropdown component
425
- const relatedTarget = event.relatedTarget;
426
- // If relatedTarget is null (focus going to body/window) or outside the component, emit blur
427
- if (this.hasFocus && (!relatedTarget || !this.host.contains(relatedTarget))) {
428
- this.hasFocus = false;
429
- this.handleBlur();
430
- this.tdsBlur.emit(event);
431
- }
432
- }
433
404
  async onKeyDown(event) {
434
405
  var _a;
435
406
  // Get the active element
@@ -549,9 +520,9 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
549
520
  // Generate unique IDs for associating labels and helpers with the input/button
550
521
  const labelId = this.label ? `dropdown-label-${this.name || generateUniqueId()}` : undefined;
551
522
  const helperId = this.helper ? `dropdown-helper-${this.name || generateUniqueId()}` : undefined;
552
- return (h(Host, { key: '66323582950b2ac2a9e15cbcde747ab377af8c4b', class: {
523
+ return (h(Host, { key: '69cdc96b6983b9556b4a9133ef8a0d2fa1e9e18e', class: {
553
524
  [`tds-mode-variant-${this.modeVariant}`]: Boolean(this.modeVariant),
554
- } }, this.label && this.labelPosition === 'outside' && (h("div", { key: 'f931805898336e462f931705f6d6b7bec8b2516a', id: labelId, class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '56097022f7ae2d0a5501ab0dfbf1f802d3c5802f', class: {
525
+ } }, this.label && this.labelPosition === 'outside' && (h("div", { key: '1cc3f825bc81ca34af7bbe845bd900531f724172', id: labelId, class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '213f3149de4b9bc4c147ab658d6d5199d3360181', class: {
555
526
  'dropdown-select': true,
556
527
  [this.size]: true,
557
528
  'disabled': this.disabled,
@@ -568,7 +539,13 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
568
539
  // eslint-disable-next-line no-return-assign
569
540
  ref: (inputEl) => (this.inputElement = inputEl), class: {
570
541
  placeholder: this.labelPosition === 'inside',
571
- }, type: "text", placeholder: this.filterFocus ? '' : this.placeholder, value: this.multiselect && this.filterFocus ? this.filterQuery : this.getValue(), disabled: this.disabled, onInput: (event) => this.handleFilter(event), onFocus: () => this.handleFocus(), onKeyDown: (event) => {
542
+ }, type: "text", placeholder: this.filterFocus ? '' : this.placeholder, value: this.multiselect && this.filterFocus ? '' : this.getValue(), disabled: this.disabled, onInput: (event) => this.handleFilter(event), onBlur: (event) => {
543
+ this.filterFocus = false;
544
+ if (this.multiselect) {
545
+ this.inputElement.value = this.getValue();
546
+ }
547
+ this.handleBlur(event);
548
+ }, onFocus: (event) => this.handleFocus(event), onKeyDown: (event) => {
572
549
  if (event.key === 'Escape') {
573
550
  this.open = false;
574
551
  }
@@ -595,7 +572,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
595
572
  label-inside-as-placeholder
596
573
  ${this.size}
597
574
  ${this.selectedOptions.length ? 'selected' : ''}
598
- ` }, 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: '165c4d884bd364ecbbc61f071e1302a31213b538', role: "listbox", "aria-label": this.tdsAriaLabel, inert: !this.open, "aria-orientation": "vertical", "aria-multiselectable": this.multiselect, ref: (element) => {
575
+ ` }, 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: 'af7815b0cb8b36e37278965094d5198a9ff5aba9', role: "listbox", "aria-label": this.tdsAriaLabel, inert: !this.open, "aria-orientation": "vertical", "aria-multiselectable": this.multiselect, ref: (element) => {
599
576
  this.dropdownList = element;
600
577
  }, class: {
601
578
  'dropdown-list': true,
@@ -606,11 +583,11 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
606
583
  'closed': !this.open,
607
584
  [`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
608
585
  [`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
609
- } }, h("slot", { key: '3ad8c4742a8f8a8483769be189042b557ed7a37c', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: '71918f0b750cf920246034a19444f6e694333031', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: 'ce6219f445aa2282ef31434b8a363c62c635d347', id: helperId, class: {
586
+ } }, h("slot", { key: '736b82b5f716fa818c17ae161341bc6b131d9cf2', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: 'f1c1471cbec4a6dd8830a8540f54e142c559d539', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: 'aa138a349c073158785ae1177c0879604f6b8d90', id: helperId, class: {
610
587
  helper: true,
611
588
  error: this.error,
612
589
  disabled: this.disabled,
613
- } }, this.error && h("tds-icon", { key: '1868cc5a58e787aa686754cea80b1a9b3b1f3a82', name: "error", size: "16px" }), this.helper))));
590
+ } }, this.error && h("tds-icon", { key: '936a8bd7db8a0ed994d6827c26bbb6732420fea4', name: "error", size: "16px" }), this.helper))));
614
591
  }
615
592
  get host() { return this; }
616
593
  static get watchers() { return {
@@ -644,7 +621,6 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
644
621
  "filterFocus": [32],
645
622
  "internalDefaultValue": [32],
646
623
  "selectedOptions": [32],
647
- "filterQuery": [32],
648
624
  "setValue": [64],
649
625
  "reset": [64],
650
626
  "removeValue": [64],
@@ -652,7 +628,7 @@ const TdsDropdown = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends H
652
628
  "close": [64],
653
629
  "updateDisplay": [64],
654
630
  "appendValue": [64]
655
- }, [[9, "mousedown", "onAnyClick"], [0, "focusin", "onFocusIn"], [0, "focusout", "onFocusOut"], [0, "keydown", "onKeyDown"]], {
631
+ }, [[9, "mousedown", "onAnyClick"], [0, "keydown", "onKeyDown"]], {
656
632
  "value": ["handleValueChange"],
657
633
  "open": ["handleOpenState"],
658
634
  "defaultValue": ["handleDefaultValueChange"]
@@ -66,18 +66,10 @@ const TdsDropdownOption = /*@__PURE__*/ proxyCustomElement(class TdsDropdownOpti
66
66
  }
67
67
  };
68
68
  this.handleFocus = (event) => {
69
- // Focus events are now handled by the parent dropdown component
70
- // Only emit if this is a standalone option (not within a dropdown)
71
- if (!this.parentElement) {
72
- this.tdsFocus.emit(event);
73
- }
69
+ this.tdsFocus.emit(event);
74
70
  };
75
71
  this.handleBlur = (event) => {
76
- // Blur events are now handled by the parent dropdown component
77
- // Only emit if this is a standalone option (not within a dropdown)
78
- if (!this.parentElement) {
79
- this.tdsBlur.emit(event);
80
- }
72
+ this.tdsBlur.emit(event);
81
73
  };
82
74
  this.value = undefined;
83
75
  this.internalValue = undefined;
@@ -98,7 +90,7 @@ const TdsDropdownOption = /*@__PURE__*/ proxyCustomElement(class TdsDropdownOpti
98
90
  this.internalValue = convertToString(this.value);
99
91
  }
100
92
  render() {
101
- return (h(Host, { key: '5448be3efbb06ae6d0fa3797f4b724c2d656d7a3' }, h("div", { key: '78945300c0bddb4ce95ab6f8de50eded1383dec7', class: `dropdown-option
93
+ return (h(Host, { key: 'd35a3153be292b1656d0efca93f06bfc1357041b' }, h("div", { key: '384353f9868a3fb559ca4140d5cd4f5553e024ad', class: `dropdown-option
102
94
  ${this.size}
103
95
  ${this.selected ? 'selected' : ''}
104
96
  ${this.disabled ? 'disabled' : ''}
@@ -108,8 +100,6 @@ const TdsDropdownOption = /*@__PURE__*/ proxyCustomElement(class TdsDropdownOpti
108
100
  }
109
101
  } }, h("tds-checkbox", { onTdsChange: (event) => {
110
102
  this.handleMultiselect(event);
111
- }, onTdsBlur: (event) => {
112
- event.stopPropagation();
113
103
  }, disabled: this.disabled, checked: this.selected, tdsAriaLabel: this.tdsAriaLabel, class: {
114
104
  [this.size]: true,
115
105
  } }, h("div", { slot: "label" }, h("slot", null))))) : (h("button", { role: "option", "aria-disabled": this.disabled, "aria-selected": this.selected, "aria-label": this.tdsAriaLabel, onClick: () => {
@@ -1,7 +1,7 @@
1
1
  import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
2
2
  import { d as dfs } from './p-52bf0fdf.js';
3
3
 
4
- const sideMenuItemCss = ":host{display:block}:host .component ::slotted(a),:host .component ::slotted(button){all:unset;box-sizing:border-box;height:68px;width:100%;display:flex;align-items:center;gap:10px;padding:0 22px;border:none;background-color:var(--tds-sidebar-side-menu-background-cover);font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);color:var(--tds-sidebar-side-menu-single-item-color);cursor:pointer}:host .component ::slotted(tds-side-menu-user),:host .component-has-user ::slotted(button){all:unset;box-sizing:border-box;height:68px;width:100%;display:flex;align-items:center;gap:16px;padding:0 22px 0 16px;border:none;background-color:var(--tds-sidebar-side-menu-background-cover);font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);color:var(--tds-sidebar-side-menu-single-item-color);cursor:pointer}:host .component tds-icon{color:red !important}:host .component ::slotted(a:focus-visible),:host .component ::slotted(button:focus-visible){outline:2px solid var(--tds-focus-outline-color);box-shadow:inset 0 0 0 3px var(--tds-white);outline-offset:-2px}:host .component:hover ::slotted(a),:host .component:hover ::slotted(button),:host .component:hover ::slotted(tds-side-menu-user){background-color:var(--tds-sidebar-item-state-hover);position:relative}:host .component:hover ::slotted(a)::before,:host .component:hover ::slotted(button)::before,:host .component:hover ::slotted(tds-side-menu-user)::before{content:\"\";position:absolute;top:0;left:0;width:4px;height:100%;background-color:var(--tds-side-menu-item-hover-indicator)}:host .component:hover ::slotted(a:focus-visible),:host .component:hover ::slotted(button:focus-visible),:host .component:hover ::slotted(tds-side-menu-user:focus-visible){background-color:var(--tds-sidebar-item-state-hover);position:relative}:host .component:hover ::slotted(a:focus-visible)::before,:host .component:hover ::slotted(button:focus-visible)::before,:host .component:hover ::slotted(tds-side-menu-user:focus-visible)::before{content:\"\";position:absolute;top:3px;left:3px;width:4px;height:calc(100% - 6px);background-color:var(--tds-side-menu-item-hover-indicator)}:host .component:active ::slotted(a),:host .component:active ::slotted(button),:host .component:active ::slotted(tds-side-menu-user){background-color:var(--tds-sidemenu-item-state-active);position:relative}:host .component:active ::slotted(a)::before,:host .component:active ::slotted(button)::before,:host .component:active ::slotted(tds-side-menu-user)::before{content:\"\";position:absolute;top:0;left:0;width:4px;height:100%;background-color:var(--tds-side-menu-item-pressed-indicator)}:host .component:active ::slotted(a:focus-visible),:host .component:active ::slotted(button:focus-visible),:host .component:active ::slotted(tds-side-menu-user:focus-visible){background-color:var(--tds-sidemenu-item-state-active);position:relative}:host .component:active ::slotted(a:focus-visible)::before,:host .component:active ::slotted(button:focus-visible)::before,:host .component:active ::slotted(tds-side-menu-user:focus-visible)::before{content:\"\";position:absolute;top:3px;left:3px;width:4px;height:calc(100% - 6px);background-color:var(--tds-side-menu-item-pressed-indicator)}:host .component-collapsed ::slotted(a),:host .component-collapsed ::slotted(button){padding:0;display:flex;justify-content:center;align-items:center;position:relative}:host .component-selected:not(:host .component-active) ::slotted(a),:host .component-selected:not(:host .component-active) ::slotted(button),:host .component-selected:not(:host .component-active) ::slotted(tds-side-menu-user){background-color:var(--tds-sidebar-item-state-selected);position:relative}:host .component-selected:not(:host .component-active) ::slotted(a)::before,:host .component-selected:not(:host .component-active) ::slotted(button)::before,:host .component-selected:not(:host .component-active) ::slotted(tds-side-menu-user)::before{content:\"\";position:absolute;top:0;left:0;width:4px;height:100%;background-color:var(--tds-sidebar-side-menu-single-subitem-selected-border-color)}:host .component-selected:not(:host .component-active) ::slotted(a:focus-visible),:host .component-selected:not(:host .component-active) ::slotted(button:focus-visible),:host .component-selected:not(:host .component-active) ::slotted(tds-side-menu-user:focus-visible){background-color:var(--tds-sidebar-item-state-selected);position:relative}:host .component-selected:not(:host .component-active) ::slotted(a:focus-visible)::before,:host .component-selected:not(:host .component-active) ::slotted(button:focus-visible)::before,:host .component-selected:not(:host .component-active) ::slotted(tds-side-menu-user:focus-visible)::before{content:\"\";position:absolute;top:3px;left:3px;width:4px;height:calc(100% - 6px);background-color:var(--tds-sidebar-side-menu-single-subitem-selected-border-color)}@media (min-width: 992px){:host .component.component-collapsed ::slotted(a),:host .component.component-collapsed ::slotted(button){color:rgba(90, 90, 90, 0);overflow:hidden}}";
4
+ const sideMenuItemCss = ":host{display:block}:host .component ::slotted(a),:host .component ::slotted(button){all:unset;box-sizing:border-box;height:68px;width:100%;display:flex;align-items:center;gap:10px;padding:0 22px;border:none;background-color:var(--tds-sidebar-side-menu-background-cover);font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);color:var(--tds-sidebar-side-menu-single-item-color);cursor:pointer}:host .component ::slotted(tds-side-menu-user),:host .component-has-user ::slotted(button){all:unset;box-sizing:border-box;height:68px;width:100%;display:flex;align-items:center;gap:16px;padding:0 22px 0 16px;border:none;background-color:var(--tds-sidebar-side-menu-background-cover);font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);color:var(--tds-sidebar-side-menu-single-item-color);cursor:pointer}:host .component tds-icon{color:red !important}:host .component ::slotted(a:focus-visible),:host .component ::slotted(button:focus-visible){outline:2px solid var(--tds-focus-outline-color);box-shadow:0 0 0 1px var(--tds-white);outline-offset:1px;z-index:1}:host .component:hover ::slotted(a),:host .component:hover ::slotted(button){background-color:var(--tds-sidebar-item-state-hover)}:host .component:active ::slotted(a),:host .component:active ::slotted(button){background-color:var(--tds-sidemenu-item-state-active)}:host .component-collapsed ::slotted(a),:host .component-collapsed ::slotted(button){padding:0;display:flex;justify-content:center;align-items:center;position:relative}:host .component-selected:not(:host .component-active) ::slotted(a),:host .component-selected:not(:host .component-active) ::slotted(button),:host .component-selected:not(:host .component-active) ::slotted(tds-side-menu-user){position:relative;background-color:var(--tds-sidebar-item-state-selected)}:host .component-selected:not(:host .component-active) ::slotted(a)::before,:host .component-selected:not(:host .component-active) ::slotted(button)::before,:host .component-selected:not(:host .component-active) ::slotted(tds-side-menu-user)::before{content:\"\";position:absolute;top:0;left:0;width:4px;height:100%;background-color:var(--tds-sidebar-side-menu-single-subitem-selected-border-color)}@media (min-width: 992px){:host .component.component-collapsed ::slotted(a),:host .component.component-collapsed ::slotted(button){color:rgba(90, 90, 90, 0);overflow:hidden}}";
5
5
  const TdsSideMenuItemStyle0 = sideMenuItemCss;
6
6
 
7
7
  const TdsSideMenuItem = /*@__PURE__*/ proxyCustomElement(class TdsSideMenuItem extends H {
@@ -1,4 +1,4 @@
1
- import { T as TdsDropdownOption$1, d as defineCustomElement$1 } from './p-c4318e35.js';
1
+ import { T as TdsDropdownOption$1, d as defineCustomElement$1 } from './p-d64878cb.js';
2
2
 
3
3
  const TdsDropdownOption = TdsDropdownOption$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { T as TdsDropdown$1, d as defineCustomElement$1 } from './p-de36fc8a.js';
1
+ import { T as TdsDropdown$1, d as defineCustomElement$1 } from './p-94bfc9f4.js';
2
2
 
3
3
  const TdsDropdown = TdsDropdown$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,6 +1,6 @@
1
1
  import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
2
2
  import { d as defineCustomElement$3 } from './p-9ad61cb5.js';
3
- import { d as defineCustomElement$2 } from './p-ad6babcd.js';
3
+ import { d as defineCustomElement$2 } from './p-6adb1ce3.js';
4
4
 
5
5
  const headerBrandSymbolCss = ":host tds-header-item{display:none}:host tds-header-item ::slotted(*){background-image:var(--tds-background-image-scania-symbol-svg-local), var(--tds-background-image-scania-symbol-svg);background-size:30px auto;background-position:center;background-repeat:no-repeat}@media (min-width: 992px){:host tds-header-item{display:block}}";
6
6
  const TdsHeaderBrandSymbolStyle0 = headerBrandSymbolCss;
@@ -1,7 +1,7 @@
1
1
  import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
2
2
  import { g as generateUniqueId } from './p-11648030.js';
3
3
  import { d as defineCustomElement$6 } from './p-9ad61cb5.js';
4
- import { d as defineCustomElement$5 } from './p-ad6babcd.js';
4
+ import { d as defineCustomElement$5 } from './p-6adb1ce3.js';
5
5
  import { d as defineCustomElement$4 } from './p-b390ece5.js';
6
6
  import { d as defineCustomElement$3 } from './p-df84759a.js';
7
7
  import { d as defineCustomElement$2 } from './p-d3866be7.js';
@@ -1,7 +1,7 @@
1
1
  import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
2
2
  import { i as inheritAriaAttributes } from './p-0bd4c19c.js';
3
3
  import { d as defineCustomElement$4 } from './p-9ad61cb5.js';
4
- import { d as defineCustomElement$3 } from './p-ad6babcd.js';
4
+ import { d as defineCustomElement$3 } from './p-6adb1ce3.js';
5
5
  import { d as defineCustomElement$2 } from './p-b390ece5.js';
6
6
 
7
7
  const headerHamburgerCss = ":host{color:var(--tds-white)}:host tds-header-item{display:block}:host .icon{position:relative;margin-left:-6px;left:3px;transition:background 0.2s ease-in-out, color 0.2s ease-in-out}@media screen and (min-width: 992px){:host tds-header-item{display:none}:host([persistent]) tds-header-item{display:block}}";
@@ -1,4 +1,4 @@
1
- import { T as TdsHeaderItem$1, d as defineCustomElement$1 } from './p-ad6babcd.js';
1
+ import { T as TdsHeaderItem$1, d as defineCustomElement$1 } from './p-6adb1ce3.js';
2
2
 
3
3
  const TdsHeaderItem = TdsHeaderItem$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { T as TdsHeaderLauncherButton$1, d as defineCustomElement$1 } from './p-072bf53a.js';
1
+ import { T as TdsHeaderLauncherButton$1, d as defineCustomElement$1 } from './p-63437b77.js';
2
2
 
3
3
  const TdsHeaderLauncherButton = TdsHeaderLauncherButton$1;
4
4
  const defineCustomElement = defineCustomElement$1;