@scania/tegel 1.26.0 → 1.27.0-toast-aria-live.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 (184) hide show
  1. package/dist/cjs/index-ca8040ad.js +4 -4
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/tds-banner.cjs.entry.js +1 -1
  4. package/dist/cjs/tds-checkbox.cjs.entry.js +10 -3
  5. package/dist/cjs/tds-chip.cjs.entry.js +7 -2
  6. package/dist/cjs/tds-dropdown_2.cjs.entry.js +71 -42
  7. package/dist/cjs/tds-folder-tab.cjs.entry.js +21 -2
  8. package/dist/cjs/tds-folder-tabs.cjs.entry.js +4 -2
  9. package/dist/cjs/tds-icon.cjs.entry.js +1 -1
  10. package/dist/cjs/tds-inline-tab.cjs.entry.js +21 -2
  11. package/dist/cjs/tds-inline-tabs.cjs.entry.js +4 -2
  12. package/dist/cjs/tds-link.cjs.entry.js +17 -3
  13. package/dist/cjs/tds-message.cjs.entry.js +15 -3
  14. package/dist/cjs/tds-modal.cjs.entry.js +74 -2
  15. package/dist/cjs/tds-navigation-tab.cjs.entry.js +21 -2
  16. package/dist/cjs/tds-navigation-tabs.cjs.entry.js +6 -4
  17. package/dist/cjs/tds-popover-core.cjs.entry.js +1 -1
  18. package/dist/cjs/tds-text-field.cjs.entry.js +13 -7
  19. package/dist/cjs/tds-textarea.cjs.entry.js +21 -9
  20. package/dist/cjs/tds-toast.cjs.entry.js +11 -4
  21. package/dist/cjs/tds-toggle.cjs.entry.js +2 -2
  22. package/dist/cjs/tds-tooltip.cjs.entry.js +14 -4
  23. package/dist/cjs/tegel.cjs.js +1 -1
  24. package/dist/collection/components/banner/banner.css +1 -1
  25. package/dist/collection/components/banner/banner.js +1 -1
  26. package/dist/collection/components/checkbox/checkbox.js +44 -3
  27. package/dist/collection/components/chip/chip.js +24 -2
  28. package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +2 -2
  29. package/dist/collection/components/dropdown/dropdown.js +86 -40
  30. package/dist/collection/components/icon/icon.js +1 -1
  31. package/dist/collection/components/icon/iconsArray.js +96 -1
  32. package/dist/collection/components/link/link.js +17 -3
  33. package/dist/collection/components/message/message.css +44 -26
  34. package/dist/collection/components/message/message.js +49 -2
  35. package/dist/collection/components/modal/modal.js +103 -3
  36. package/dist/collection/components/popover-core/tds-popover-core.css +596 -53
  37. package/dist/collection/components/tabs/folder-tabs/folder-tab/folder-tab.js +21 -2
  38. package/dist/collection/components/tabs/folder-tabs/folder-tabs.js +40 -2
  39. package/dist/collection/components/tabs/inline-tabs/inline-tab/inline-tab.js +21 -2
  40. package/dist/collection/components/tabs/inline-tabs/inline-tabs.js +40 -2
  41. package/dist/collection/components/tabs/navigation-tabs/navigation-tab/navigation-tab.js +21 -2
  42. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +42 -4
  43. package/dist/collection/components/text-field/text-field.js +31 -8
  44. package/dist/collection/components/textarea/textarea.css +11 -6
  45. package/dist/collection/components/textarea/textarea.js +38 -8
  46. package/dist/collection/components/toast/toast.css +1 -1
  47. package/dist/collection/components/toast/toast.js +45 -3
  48. package/dist/collection/components/toggle/toggle.js +2 -2
  49. package/dist/collection/components/tooltip/tooltip.js +40 -4
  50. package/dist/collection/utils/axeHelpers.js +1 -1
  51. package/dist/components/{p-c65351ab.js → p-14ab9663.js} +12 -3
  52. package/dist/components/p-17338bcb.js +115 -0
  53. package/dist/components/{p-2a43e410.js → p-2d93a742.js} +5 -5
  54. package/dist/components/p-4487c541.js +65 -0
  55. package/dist/components/{p-29d19dc8.js → p-60ff84f2.js} +1 -1
  56. package/dist/components/{p-a64dc22e.js → p-663b8e51.js} +72 -42
  57. package/dist/components/{p-4c1e3344.js → p-83db8b35.js} +1 -1
  58. package/dist/components/{p-b1d21573.js → p-a1181b1f.js} +1 -1
  59. package/dist/components/p-e71e3b2e.js +2052 -0
  60. package/dist/components/tds-accordion-item.js +1 -1
  61. package/dist/components/tds-banner.js +2 -2
  62. package/dist/components/tds-checkbox.js +1 -1
  63. package/dist/components/tds-chip.js +9 -3
  64. package/dist/components/tds-datetime.js +1 -1
  65. package/dist/components/tds-dropdown-option.js +1 -1
  66. package/dist/components/tds-dropdown.js +1 -1
  67. package/dist/components/tds-folder-tab.js +21 -2
  68. package/dist/components/tds-folder-tabs.js +7 -3
  69. package/dist/components/tds-footer-group.js +1 -1
  70. package/dist/components/tds-header-cell.js +1 -1
  71. package/dist/components/tds-header-dropdown.js +3 -3
  72. package/dist/components/tds-header-hamburger.js +1 -1
  73. package/dist/components/tds-header-launcher-button.js +1 -1
  74. package/dist/components/tds-header-launcher.js +4 -4
  75. package/dist/components/tds-icon.js +1 -1
  76. package/dist/components/tds-inline-tab.js +21 -2
  77. package/dist/components/tds-inline-tabs.js +7 -3
  78. package/dist/components/tds-link.js +17 -3
  79. package/dist/components/tds-message.js +19 -5
  80. package/dist/components/tds-modal.js +78 -4
  81. package/dist/components/tds-navigation-tab.js +21 -2
  82. package/dist/components/tds-navigation-tabs.js +9 -5
  83. package/dist/components/tds-popover-canvas.js +1 -1
  84. package/dist/components/tds-popover-core.js +1 -1
  85. package/dist/components/tds-popover-menu.js +1 -1
  86. package/dist/components/tds-side-menu-close-button.js +1 -1
  87. package/dist/components/tds-side-menu-dropdown.js +1 -1
  88. package/dist/components/tds-slider.js +1 -1
  89. package/dist/components/tds-step.js +1 -1
  90. package/dist/components/tds-table-body-input-wrapper.js +1 -1
  91. package/dist/components/tds-table-body-row.js +1 -1
  92. package/dist/components/tds-table-footer.js +4 -4
  93. package/dist/components/tds-table-header-input-wrapper.js +1 -1
  94. package/dist/components/tds-table-header.js +1 -1
  95. package/dist/components/tds-table-toolbar.js +1 -1
  96. package/dist/components/tds-text-field.js +15 -8
  97. package/dist/components/tds-textarea.js +36 -11
  98. package/dist/components/tds-toast.js +14 -5
  99. package/dist/components/tds-toggle.js +2 -2
  100. package/dist/components/tds-tooltip.js +1 -102
  101. package/dist/esm/index-51d04e39.js +4 -4
  102. package/dist/esm/loader.js +1 -1
  103. package/dist/esm/tds-banner.entry.js +1 -1
  104. package/dist/esm/tds-checkbox.entry.js +10 -3
  105. package/dist/esm/tds-chip.entry.js +7 -2
  106. package/dist/esm/tds-dropdown_2.entry.js +71 -42
  107. package/dist/esm/tds-folder-tab.entry.js +22 -3
  108. package/dist/esm/tds-folder-tabs.entry.js +4 -2
  109. package/dist/esm/tds-icon.entry.js +1 -1
  110. package/dist/esm/tds-inline-tab.entry.js +22 -3
  111. package/dist/esm/tds-inline-tabs.entry.js +4 -2
  112. package/dist/esm/tds-link.entry.js +17 -3
  113. package/dist/esm/tds-message.entry.js +15 -3
  114. package/dist/esm/tds-modal.entry.js +74 -2
  115. package/dist/esm/tds-navigation-tab.entry.js +22 -3
  116. package/dist/esm/tds-navigation-tabs.entry.js +6 -4
  117. package/dist/esm/tds-popover-core.entry.js +1 -1
  118. package/dist/esm/tds-text-field.entry.js +13 -7
  119. package/dist/esm/tds-textarea.entry.js +21 -9
  120. package/dist/esm/tds-toast.entry.js +11 -4
  121. package/dist/esm/tds-toggle.entry.js +2 -2
  122. package/dist/esm/tds-tooltip.entry.js +14 -4
  123. package/dist/esm/tegel.js +1 -1
  124. package/dist/tegel/p-0f2c9507.entry.js +1 -0
  125. package/dist/tegel/p-125a6b06.entry.js +1 -0
  126. package/dist/tegel/p-28517288.entry.js +1 -0
  127. package/dist/tegel/p-2af57972.entry.js +1 -0
  128. package/dist/tegel/{p-be1d1345.entry.js → p-4465f687.entry.js} +1 -1
  129. package/dist/tegel/p-668b7662.entry.js +1 -0
  130. package/dist/tegel/p-746e2927.entry.js +1 -0
  131. package/dist/tegel/p-754a4921.entry.js +1 -0
  132. package/dist/tegel/{p-46205cfb.entry.js → p-769d0503.entry.js} +1 -1
  133. package/dist/tegel/p-843413ba.entry.js +1 -0
  134. package/dist/tegel/p-97f10223.entry.js +1 -0
  135. package/dist/tegel/p-a21250b8.entry.js +1 -0
  136. package/dist/tegel/p-aadb2553.entry.js +1 -0
  137. package/dist/tegel/p-ad9a2141.entry.js +1 -0
  138. package/dist/tegel/p-b08886e3.entry.js +1 -0
  139. package/dist/tegel/p-b114ec3d.entry.js +1 -0
  140. package/dist/tegel/p-c3607f10.entry.js +1 -0
  141. package/dist/tegel/p-ddda64eb.entry.js +1 -0
  142. package/dist/tegel/p-eaa279dd.entry.js +1 -0
  143. package/dist/tegel/p-ee960089.entry.js +1 -0
  144. package/dist/tegel/tegel.css +13 -3
  145. package/dist/tegel/tegel.esm.js +1 -1
  146. package/dist/types/components/checkbox/checkbox.d.ts +5 -0
  147. package/dist/types/components/chip/chip.d.ts +3 -0
  148. package/dist/types/components/dropdown/dropdown.d.ts +5 -0
  149. package/dist/types/components/message/message.d.ts +5 -0
  150. package/dist/types/components/modal/modal.d.ts +6 -0
  151. package/dist/types/components/tabs/folder-tabs/folder-tab/folder-tab.d.ts +2 -0
  152. package/dist/types/components/tabs/folder-tabs/folder-tabs.d.ts +4 -0
  153. package/dist/types/components/tabs/inline-tabs/inline-tab/inline-tab.d.ts +2 -0
  154. package/dist/types/components/tabs/inline-tabs/inline-tabs.d.ts +4 -0
  155. package/dist/types/components/tabs/navigation-tabs/navigation-tab/navigation-tab.d.ts +2 -0
  156. package/dist/types/components/tabs/navigation-tabs/navigation-tabs.d.ts +4 -0
  157. package/dist/types/components/text-field/text-field.d.ts +4 -1
  158. package/dist/types/components/textarea/textarea.d.ts +7 -4
  159. package/dist/types/components/toast/toast.d.ts +5 -0
  160. package/dist/types/components/tooltip/tooltip.d.ts +3 -0
  161. package/dist/types/components.d.ts +146 -2
  162. package/dist/types/types/Icons.d.ts +1 -1
  163. package/dist/types/utils/axeHelpers.d.ts +1 -2
  164. package/package.json +1 -1
  165. package/dist/components/p-4764a1d5.js +0 -2052
  166. package/dist/components/p-a2b7bdef.js +0 -65
  167. package/dist/tegel/p-065d6f83.entry.js +0 -1
  168. package/dist/tegel/p-0c1e632d.entry.js +0 -1
  169. package/dist/tegel/p-168122a7.entry.js +0 -1
  170. package/dist/tegel/p-19eb4ae1.entry.js +0 -1
  171. package/dist/tegel/p-4e298888.entry.js +0 -1
  172. package/dist/tegel/p-4e33cbda.entry.js +0 -1
  173. package/dist/tegel/p-4ee344e5.entry.js +0 -1
  174. package/dist/tegel/p-64c80f14.entry.js +0 -1
  175. package/dist/tegel/p-72fd0083.entry.js +0 -1
  176. package/dist/tegel/p-93a4bd11.entry.js +0 -1
  177. package/dist/tegel/p-9e0b31a1.entry.js +0 -1
  178. package/dist/tegel/p-a0fc0cc2.entry.js +0 -1
  179. package/dist/tegel/p-b35e7208.entry.js +0 -1
  180. package/dist/tegel/p-b6526302.entry.js +0 -1
  181. package/dist/tegel/p-b686f1ad.entry.js +0 -1
  182. package/dist/tegel/p-cca85da0.entry.js +0 -1
  183. package/dist/tegel/p-d0abf078.entry.js +0 -1
  184. package/dist/tegel/p-dcbc35af.entry.js +0 -1
@@ -16,11 +16,29 @@ export class TdsFolderTab {
16
16
  async setSelected(selected) {
17
17
  this.selected = selected;
18
18
  }
19
+ connectedCallback() {
20
+ const elements = this.host.querySelectorAll('button, a');
21
+ for (let index = 0; index < elements.length; index++) {
22
+ const element = elements[index];
23
+ if (!element.getAttribute('aria-controls')) {
24
+ console.warn('Tegel folder-tab component: Interactive elements should have aria-controls attribute to link the tab to its corresponding panel');
25
+ }
26
+ if (element.getAttribute('role') !== 'tab') {
27
+ console.warn('Tegel folder-tab component: Interactive elements should have attribute role="tab"');
28
+ }
29
+ if (this.disabled) {
30
+ element.setAttribute('aria-disabled', 'true');
31
+ }
32
+ else {
33
+ element.removeAttribute('aria-disabled');
34
+ }
35
+ }
36
+ }
19
37
  render() {
20
- return (h(Host, { key: '919cd453da1e3649fb5da8783ab8fabc47322d47', role: "listitem" }, h("div", { key: 'f00bf3eea1ee0d670d8989e23e27d6c54fbe7c17', class: {
38
+ return (h(Host, { key: '9290c4ab2f7d051bba9fec4dad9a7d07790ed5b7', "aria-selected": this.selected }, h("div", { key: '36225101c510f2d77282fd600c4ee00085791109', class: {
21
39
  selected: this.selected,
22
40
  disabled: this.disabled,
23
- }, style: { width: `${this.tabWidth}px` } }, h("slot", { key: '3e3bd62fd02c922fa0592dc0f2dae5a8b49d6c4c' }))));
41
+ }, style: { width: `${this.tabWidth}px` } }, h("slot", { key: '05954c498b9fbd6a2a1231d84bf2657a0616db36' }))));
24
42
  }
25
43
  static get is() { return "tds-folder-tab"; }
26
44
  static get encapsulation() { return "shadow"; }
@@ -114,4 +132,5 @@ export class TdsFolderTab {
114
132
  }
115
133
  };
116
134
  }
135
+ static get elementRef() { return "host"; }
117
136
  }
@@ -60,6 +60,8 @@ export class TdsFolderTabs {
60
60
  this.modeVariant = null;
61
61
  this.defaultSelectedIndex = 0;
62
62
  this.selectedIndex = undefined;
63
+ this.tdsScrollLeftAriaLabel = 'Scroll left';
64
+ this.tdsScrollRightAriaLabel = 'Scroll right';
63
65
  this.buttonWidth = 0;
64
66
  this.showLeftScroll = false;
65
67
  this.showRightScroll = false;
@@ -160,9 +162,9 @@ export class TdsFolderTabs {
160
162
  this.removeEventListenerFromTabs();
161
163
  }
162
164
  render() {
163
- return (h(Host, { key: '19b773750f13304194341caf79242c7be95b41be', role: "list", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, h("div", { key: '915b525f1d8fc67f3edf82f0841ea89cfd8424bc', class: "wrapper", ref: (el) => {
165
+ return (h(Host, { key: '54a3cceed49387a8f0dbe74eecb96ae284882ff9', role: "tablist", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, h("div", { key: '170e5256bde8efdce412bbab1a674b23159d02d1', class: "wrapper", ref: (el) => {
164
166
  this.navWrapperElement = el;
165
- } }, h("button", { key: '806f5ce973b4b9bf842ae4c3fdf42c6160255db4', class: `scroll-left-button ${this.showLeftScroll ? 'show' : ''}`, disabled: !this.showLeftScroll, onClick: () => this.scrollLeft() }, h("tds-icon", { key: '4762c8fcfb5f7bb9a67ce2515fc3cab557180ca8', name: "chevron_left", size: "20px" })), h("slot", { key: '498f04374cb1ad240df2a6e02830eba9bc6c3c8d', onSlotchange: () => this.handleSlotChange() }), h("button", { key: '47f114815e98c22f26b021df2b5f53f4498ba24b', class: `scroll-right-button ${this.showRightScroll ? 'show' : ''}`, disabled: !this.showRightScroll, onClick: () => this.scrollRight() }, h("tds-icon", { key: 'b4f3a0e137c84b996bdf7eb7e497e788637ac401', name: "chevron_right", size: "20px" })))));
167
+ } }, h("button", { key: '1c74ef8c81361bfa6ff5d227c145a3371fb2f66f', "aria-label": this.tdsScrollLeftAriaLabel, class: `scroll-left-button ${this.showLeftScroll ? 'show' : ''}`, disabled: !this.showLeftScroll, onClick: () => this.scrollLeft() }, h("tds-icon", { key: '94ddd85d4107c89487db727f13a9c443fd160fc6', name: "chevron_left", size: "20px" })), h("slot", { key: '63978c3c62482bc0a251377756630f555f10dfef', onSlotchange: () => this.handleSlotChange() }), h("button", { key: 'aeb86fbdb365e62df37b72daa0b53f51486834a9', "aria-label": this.tdsScrollRightAriaLabel, class: `scroll-right-button ${this.showRightScroll ? 'show' : ''}`, disabled: !this.showRightScroll, onClick: () => this.scrollRight() }, h("tds-icon", { key: '2cc4d301a4490d6b8d8f2373fc2450c93922a814', name: "chevron_right", size: "20px" })))));
166
168
  }
167
169
  static get is() { return "tds-folder-tabs"; }
168
170
  static get encapsulation() { return "shadow"; }
@@ -230,6 +232,42 @@ export class TdsFolderTabs {
230
232
  },
231
233
  "attribute": "selected-index",
232
234
  "reflect": true
235
+ },
236
+ "tdsScrollLeftAriaLabel": {
237
+ "type": "string",
238
+ "mutable": false,
239
+ "complexType": {
240
+ "original": "string",
241
+ "resolved": "string",
242
+ "references": {}
243
+ },
244
+ "required": false,
245
+ "optional": false,
246
+ "docs": {
247
+ "tags": [],
248
+ "text": "Defines aria-label on left scroll button"
249
+ },
250
+ "attribute": "tds-scroll-left-aria-label",
251
+ "reflect": false,
252
+ "defaultValue": "'Scroll left'"
253
+ },
254
+ "tdsScrollRightAriaLabel": {
255
+ "type": "string",
256
+ "mutable": false,
257
+ "complexType": {
258
+ "original": "string",
259
+ "resolved": "string",
260
+ "references": {}
261
+ },
262
+ "required": false,
263
+ "optional": false,
264
+ "docs": {
265
+ "tags": [],
266
+ "text": "Defines aria-label on right scroll button"
267
+ },
268
+ "attribute": "tds-scroll-right-aria-label",
269
+ "reflect": false,
270
+ "defaultValue": "'Scroll right'"
233
271
  }
234
272
  };
235
273
  }
@@ -11,12 +11,30 @@ export class TdsInlineTab {
11
11
  async setSelected(selected) {
12
12
  this.selected = selected;
13
13
  }
14
+ connectedCallback() {
15
+ const elements = this.host.querySelectorAll('button, a');
16
+ for (let index = 0; index < elements.length; index++) {
17
+ const element = elements[index];
18
+ if (!element.getAttribute('aria-controls')) {
19
+ console.warn('Tegel inline-tab component: Interactive elements should have aria-controls attribute to link the tab to its corresponding panel');
20
+ }
21
+ if (element.getAttribute('role') !== 'tab') {
22
+ console.warn('Tegel inline-tab component: Interactive elements should have attribute role="tab"');
23
+ }
24
+ if (this.disabled) {
25
+ element.setAttribute('aria-disabled', 'true');
26
+ }
27
+ else {
28
+ element.removeAttribute('aria-disabled');
29
+ }
30
+ }
31
+ }
14
32
  render() {
15
- return (h(Host, { key: '4bb1d313b0d2b7e3bc612474201b0a3e06dd6555', role: "listitem" }, h("div", { key: 'c49a2745c5c6de9276807e670c9886130f5e5dbd', class: {
33
+ return (h(Host, { key: '4c9f91014f30c1e7db52778dc4cf8800aa62050d', "aria-selected": this.selected }, h("div", { key: '860cfdd9338915275262875fc79588b58bebf447', class: {
16
34
  'inline-tab-item': true,
17
35
  'selected': this.selected,
18
36
  'disabled': this.disabled,
19
- } }, h("slot", { key: 'caa1851fd0a992f38e04fb4872e52c90a3731e6a' }))));
37
+ } }, h("slot", { key: 'eeccc1bdc172fab4d7ad96143b01f17982266f4d' }))));
20
38
  }
21
39
  static get is() { return "tds-inline-tab"; }
22
40
  static get encapsulation() { return "shadow"; }
@@ -85,4 +103,5 @@ export class TdsInlineTab {
85
103
  }
86
104
  };
87
105
  }
106
+ static get elementRef() { return "host"; }
88
107
  }
@@ -60,6 +60,8 @@ export class TdsInlineTabs {
60
60
  this.modeVariant = 'primary';
61
61
  this.defaultSelectedIndex = 0;
62
62
  this.selectedIndex = undefined;
63
+ this.tdsScrollLeftAriaLabel = 'Scroll left';
64
+ this.tdsScrollRightAriaLabel = 'Scroll right';
63
65
  this.leftPadding = 32;
64
66
  this.showLeftScroll = false;
65
67
  this.showRightScroll = false;
@@ -167,9 +169,9 @@ export class TdsInlineTabs {
167
169
  this.removeEventListenerFromTabs();
168
170
  }
169
171
  render() {
170
- return (h(Host, { key: 'cd482509c07b6074d81a35eb9447ef561ce7c84a', role: "list", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, h("div", { key: '63590b1fec8637f1000897f62962dae2efdcc05d', class: "wrapper", ref: (el) => {
172
+ return (h(Host, { key: '47fd4d494254749aa276d4f046ded68fe472b062', role: "tablist", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, h("div", { key: 'f5c42677bafef38db784c517714ac8a4e0149862', class: "wrapper", ref: (el) => {
171
173
  this.navWrapperElement = el;
172
- }, style: { paddingLeft: `${this.leftPadding}px` } }, h("button", { key: '349a8cc729442d4307f800c69abe36adeb7f7e0c', class: `scroll-left-button ${this.showLeftScroll ? 'show' : ''}`, onClick: () => this.scrollLeft(), disabled: !this.showLeftScroll }, h("tds-icon", { key: 'feacf20411c38c0b9d80b25a1a19ef89e812b81d', name: "chevron_left", size: "20px" })), h("slot", { key: '78727b46e6adc0c516cbbfb4dc072f59330c8635', onSlotchange: () => this.handleSlotChange() }), h("button", { key: '580d1416f7329133c58f5bfaaa7169623e1dd001', class: `scroll-right-button ${this.showRightScroll ? 'show' : ''}`, onClick: () => this.scrollRight(), disabled: !this.showRightScroll }, h("tds-icon", { key: 'f9d1c4f717303f0c1c2eb4b33b361be8fa2f15ab', name: "chevron_right", size: "20px" })))));
174
+ }, style: { paddingLeft: `${this.leftPadding}px` } }, h("button", { key: '5955dc1657efcfec14393987f6ebfaea4c90615d', "aria-label": this.tdsScrollLeftAriaLabel, class: `scroll-left-button ${this.showLeftScroll ? 'show' : ''}`, onClick: () => this.scrollLeft(), disabled: !this.showLeftScroll }, h("tds-icon", { key: '3c3c7d93197f40b0cbb67d20cd5c32b827a29430', name: "chevron_left", size: "20px" })), h("slot", { key: '335ec61f80defb892c229901165809487950dc03', onSlotchange: () => this.handleSlotChange() }), h("button", { key: 'cc22a000e41efa472638da3c480b5cf1094aaec2', "aria-label": this.tdsScrollRightAriaLabel, class: `scroll-right-button ${this.showRightScroll ? 'show' : ''}`, onClick: () => this.scrollRight(), disabled: !this.showRightScroll }, h("tds-icon", { key: '9ca29d2d1cb3df19993723a2eb0716d36c0f20ea', name: "chevron_right", size: "20px" })))));
173
175
  }
174
176
  static get is() { return "tds-inline-tabs"; }
175
177
  static get encapsulation() { return "shadow"; }
@@ -238,6 +240,42 @@ export class TdsInlineTabs {
238
240
  "attribute": "selected-index",
239
241
  "reflect": true
240
242
  },
243
+ "tdsScrollLeftAriaLabel": {
244
+ "type": "string",
245
+ "mutable": false,
246
+ "complexType": {
247
+ "original": "string",
248
+ "resolved": "string",
249
+ "references": {}
250
+ },
251
+ "required": false,
252
+ "optional": false,
253
+ "docs": {
254
+ "tags": [],
255
+ "text": "Defines aria-label on left scroll button"
256
+ },
257
+ "attribute": "tds-scroll-left-aria-label",
258
+ "reflect": false,
259
+ "defaultValue": "'Scroll left'"
260
+ },
261
+ "tdsScrollRightAriaLabel": {
262
+ "type": "string",
263
+ "mutable": false,
264
+ "complexType": {
265
+ "original": "string",
266
+ "resolved": "string",
267
+ "references": {}
268
+ },
269
+ "required": false,
270
+ "optional": false,
271
+ "docs": {
272
+ "tags": [],
273
+ "text": "Defines aria-label on right scroll button"
274
+ },
275
+ "attribute": "tds-scroll-right-aria-label",
276
+ "reflect": false,
277
+ "defaultValue": "'Scroll right'"
278
+ },
241
279
  "leftPadding": {
242
280
  "type": "number",
243
281
  "mutable": false,
@@ -11,9 +11,27 @@ export class TdsNavigationTab {
11
11
  async setSelected(selected) {
12
12
  this.selected = selected;
13
13
  }
14
+ connectedCallback() {
15
+ const elements = this.host.querySelectorAll('button, a');
16
+ for (let index = 0; index < elements.length; index++) {
17
+ const element = elements[index];
18
+ if (!element.getAttribute('aria-controls')) {
19
+ console.warn('Tegel navigation-tab component: Interactive elements should have aria-controls attribute to link the tab to its corresponding panel');
20
+ }
21
+ if (element.getAttribute('role') !== 'tab') {
22
+ console.warn('Tegel navigation-tab component: Interactive elements should have attribute role="tab"');
23
+ }
24
+ if (this.disabled) {
25
+ element.setAttribute('aria-disabled', 'true');
26
+ }
27
+ else {
28
+ element.removeAttribute('aria-disabled');
29
+ }
30
+ }
31
+ }
14
32
  render() {
15
- return (h(Host, { key: '58749f71c75a0026b58645df3ccaa6ebd5e5dc9f', role: "listitem" }, h("div", { key: 'ed4cc04c74a69470c95f9ec3ba034c7ad6b9f2d3', class: `navigation-tab-item ${this.selected ? 'selected' : ''}
16
- ${this.disabled ? 'disabled' : ''}` }, h("slot", { key: 'ee7c740413087d0da51bdfc8da4509d482f1faeb' }))));
33
+ return (h(Host, { key: '51152bf313a84cb937e7f49e87cc8dcd74ab0612' }, h("div", { key: '5d55db68f75e042dafe40da1b9e84d74f1cd8849', class: `navigation-tab-item ${this.selected ? 'selected' : ''}
34
+ ${this.disabled ? 'disabled' : ''}` }, h("slot", { key: '174108daa16d6fa68c04244af1843771a4df91f5' }))));
17
35
  }
18
36
  static get is() { return "tds-navigation-tab"; }
19
37
  static get encapsulation() { return "shadow"; }
@@ -82,4 +100,5 @@ export class TdsNavigationTab {
82
100
  }
83
101
  };
84
102
  }
103
+ static get elementRef() { return "host"; }
85
104
  }
@@ -61,6 +61,8 @@ export class TdsNavigationTabs {
61
61
  this.defaultSelectedIndex = 0;
62
62
  this.selectedIndex = undefined;
63
63
  this.leftPadding = 32;
64
+ this.tdsScrollLeftAriaLabel = 'Scroll left';
65
+ this.tdsScrollRightAriaLabel = 'Scroll right';
64
66
  this.showLeftScroll = false;
65
67
  this.showRightScroll = false;
66
68
  }
@@ -167,15 +169,15 @@ export class TdsNavigationTabs {
167
169
  this.removeEventListenerFromTabs();
168
170
  }
169
171
  render() {
170
- return (h(Host, { key: '0ca3544da4ef897b44bd2f55b0dc03edf7921818', role: "list", class: { [`tds-mode-variant-${this.modeVariant}`]: this.modeVariant !== null } }, h("div", { key: '3eff9e0fc6b416171d0928e3e1933fed626fb3ec', class: "wrapper", ref: (el) => {
172
+ return (h(Host, { key: '809fe9d34b03949edae1708b6dea7f0406afee80', role: "tablist", class: { [`tds-mode-variant-${this.modeVariant}`]: this.modeVariant !== null } }, h("div", { key: '866605f8695441d7817c07895bdffd5e3e7ba5ac', class: "wrapper", ref: (el) => {
171
173
  this.navWrapperElement = el;
172
- }, style: { paddingLeft: `${this.leftPadding}px` } }, h("button", { key: '730023259356eec4ec037e56a495dfea4f8d469c', class: {
174
+ }, style: { paddingLeft: `${this.leftPadding}px` } }, h("button", { key: '2d394ecb940cee024174932676c2a6c22622c853', "aria-label": this.tdsScrollLeftAriaLabel, class: {
173
175
  'scroll-left-button': true,
174
176
  'show': this.showLeftScroll,
175
- }, onClick: () => this.scrollLeft(), disabled: !this.showLeftScroll }, h("tds-icon", { key: '5e601f5e4a3aa308e5a5a636fc08c7b32387dbd9', name: "chevron_left", size: "20px" })), h("slot", { key: '43c9228e6c328b4cc651a9ffbd7dd8dbbfd592fe', onSlotchange: () => this.handleSlotChange() }), h("button", { key: '7eca0796fed3a98043abbbe306c29eed10cd8c5d', class: {
177
+ }, onClick: () => this.scrollLeft(), disabled: !this.showLeftScroll }, h("tds-icon", { key: '09386162127467a545e00f44130352afb9cfed03', name: "chevron_left", size: "20px" })), h("slot", { key: '3b3cd70ed645318d0661a3acbee3d2bc748314cf', onSlotchange: () => this.handleSlotChange() }), h("button", { key: '1afb2dc9b261626db800593548d7e023e14cd39b', "aria-label": this.tdsScrollRightAriaLabel, class: {
176
178
  'scroll-right-button': true,
177
179
  'show': this.showRightScroll,
178
- }, onClick: () => this.scrollRight(), disabled: !this.showRightScroll }, h("tds-icon", { key: '9b84ae33c083f41ce6d8a83da1f1edb37c95de55', name: "chevron_right", size: "20px" })))));
180
+ }, onClick: () => this.scrollRight(), disabled: !this.showRightScroll }, h("tds-icon", { key: '451a8ddc680799fd86e390d8aeab5c22c73f31ee', name: "chevron_right", size: "20px" })))));
179
181
  }
180
182
  static get is() { return "tds-navigation-tabs"; }
181
183
  static get encapsulation() { return "shadow"; }
@@ -261,6 +263,42 @@ export class TdsNavigationTabs {
261
263
  "attribute": "left-padding",
262
264
  "reflect": true,
263
265
  "defaultValue": "32"
266
+ },
267
+ "tdsScrollLeftAriaLabel": {
268
+ "type": "string",
269
+ "mutable": false,
270
+ "complexType": {
271
+ "original": "string",
272
+ "resolved": "string",
273
+ "references": {}
274
+ },
275
+ "required": false,
276
+ "optional": false,
277
+ "docs": {
278
+ "tags": [],
279
+ "text": "Defines aria-label on left scroll button"
280
+ },
281
+ "attribute": "tds-scroll-left-aria-label",
282
+ "reflect": false,
283
+ "defaultValue": "'Scroll left'"
284
+ },
285
+ "tdsScrollRightAriaLabel": {
286
+ "type": "string",
287
+ "mutable": false,
288
+ "complexType": {
289
+ "original": "string",
290
+ "resolved": "string",
291
+ "references": {}
292
+ },
293
+ "required": false,
294
+ "optional": false,
295
+ "docs": {
296
+ "tags": [],
297
+ "text": "Defines aria-label on right scroll button"
298
+ },
299
+ "attribute": "tds-scroll-right-aria-label",
300
+ "reflect": false,
301
+ "defaultValue": "'Scroll right'"
264
302
  }
265
303
  };
266
304
  }
@@ -23,6 +23,7 @@ export class TdsTextField {
23
23
  this.state = 'default';
24
24
  this.maxLength = undefined;
25
25
  this.autofocus = false;
26
+ this.tdsAriaLabel = undefined;
26
27
  this.focusInput = undefined;
27
28
  }
28
29
  handleChange(event) {
@@ -50,11 +51,16 @@ export class TdsTextField {
50
51
  this.textInput.focus();
51
52
  }
52
53
  }
54
+ connectedCallback() {
55
+ if (!this.tdsAriaLabel) {
56
+ console.warn('Tegel Text Field component: prop tdsAriaLabel is missing');
57
+ }
58
+ }
53
59
  render() {
54
60
  var _a;
55
61
  const usesPrefixSlot = hasSlot('prefix', this.host);
56
62
  const usesSuffixSlot = hasSlot('suffix', this.host);
57
- return (h("div", { key: '9a746f9a955c02adbc1154e02dc82fc6062d4eeb', class: {
63
+ return (h("div", { key: '188cc7065d3cb6006adf01a9679a97012d0047df', class: {
58
64
  'form-text-field': true,
59
65
  'form-text-field-nomin': this.noMinWidth,
60
66
  'text-field-focus': this.focusInput && !this.disabled,
@@ -68,12 +74,12 @@ export class TdsTextField {
68
74
  'form-text-field-sm': this.size === 'sm',
69
75
  'form-text-field-error': this.state === 'error',
70
76
  'form-text-field-success': this.state === 'success',
71
- } }, this.labelPosition === 'outside' && (h("div", { key: '4a6a898131f86115c6cbf07f6e67058ac548fdfb', class: "text-field-label-outside" }, h("div", { key: '868b1372153ac1d27e0d407a5199c8cb6659d21a' }, this.label))), h("div", { key: '917a0691663c81418cb8adfc2963e2514f6a228d', onClick: () => this.textInput.focus(), class: "text-field-container" }, usesPrefixSlot && (h("div", { key: 'e11cb3a273a9899972b035b1296deda841145928', class: {
77
+ } }, this.labelPosition === 'outside' && (h("div", { key: 'd99cf396da1740b4c3fa5899ef3167d3638d001b', class: "text-field-label-outside" }, h("label", { key: '90a5ec0a376d2793b5f8b87ed4df0ac86c356009', htmlFor: "text-field-input-element" }, this.label))), h("div", { key: '42046ef3f5a9c38658a9d5176f86f4002657138c', onClick: () => this.textInput.focus(), class: "text-field-container" }, usesPrefixSlot && (h("div", { key: '17ae517366c69e1cad33babcc134c011c4c483e7', class: {
72
78
  'text-field-slot-wrap-prefix': true,
73
79
  'text-field-error': this.state === 'error',
74
80
  'text-field-success': this.state === 'success',
75
81
  'text-field-default': this.state === 'default',
76
- } }, h("slot", { key: 'a6336094ef22454c6d7b782b78690773dfcc444a', name: "prefix" }))), h("div", { key: 'cee83edde0b7189258aa7f1aaa3573d27b4e0d06', class: "text-field-input-container" }, h("input", { key: '27c52fc9ffa89f57578d152a5eaf8bd25c4b48d7', ref: (inputEl) => {
82
+ } }, h("slot", { key: '9aa4690419f3b688eb13c9ca78ed4dec5c513308', name: "prefix" }))), h("div", { key: '2ad1645844bf5b70383e85712a2d98de15cb5166', class: "text-field-input-container" }, h("input", { key: 'f5c1468ce392cf9e4211ce9fc8bc774a5da19afd', ref: (inputEl) => {
77
83
  this.textInput = inputEl;
78
84
  }, class: {
79
85
  'text-field-input': true,
@@ -88,19 +94,19 @@ export class TdsTextField {
88
94
  if (!this.readOnly) {
89
95
  this.handleBlur(event);
90
96
  }
91
- } }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { key: '00fdc9f7231bb1991afb37d3477ac6267594ccb5', class: "text-field-label-inside" }, this.label))), h("div", { key: 'a5c349a2e3695122244feb4daacf9c0a523656d6', class: "text-field-bar" }), usesSuffixSlot && (h("div", { key: 'f4812d2d9162330bb9e9a480a6f1c6fb0f1603b4', class: {
97
+ }, "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label, "aria-describedby": "text-field-helper-element", "aria-readonly": this.readOnly, id: "text-field-input-element" }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { key: 'f1c3225621de7a83bfb123b8f4a3a8d9a3493e21', class: "text-field-label-inside", htmlFor: "text-field-input-element" }, this.label))), h("div", { key: '2bacfcf84ac1f6495cc5185275f39ef1f1e4476e', class: "text-field-bar" }), usesSuffixSlot && (h("div", { key: '2b46f703349e0873f9e777227acf45e0c6c55d8c', class: {
92
98
  'text-field-slot-wrap-suffix': true,
93
99
  'text-field-error': this.state === 'error',
94
100
  'text-field-success': this.state === 'success',
95
101
  'text-field-default': this.state === 'default',
96
102
  'tds-u-display-none': this.readOnly,
97
- } }, h("slot", { key: '2583307a640ff3b1badd3b528db408bb9aeb4ca2', name: "suffix" }))), h("span", { key: '04fe8fb44155eacd3a2e24e84783f2145f244c9c', class: "text-field-icon__readonly" }, h("tds-icon", { key: '68a92868b1c5828c41f36eaddd97532e14a82f68', name: "edit_inactive", size: "20px" })), h("span", { key: 'a7f89ce9d3bab3b89787a9baf59c35dba06f023e', class: "text-field-icon__readonly-label" }, "This field is non-editable")), (this.helper || this.maxLength > 0) && (h("div", { key: 'ba89f1650e5ebbb45f0dbc06548ed86add1d4971', class: "text-field-helper" }, this.state === 'error' && (h("div", { key: 'dc9368caca14d7fdb4e0ad061181352daeae235b', class: "text-field-helper-error-state" }, h("tds-icon", { key: '07d99458b372b6edb1f9268dcc66f88840005a92', name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, this.maxLength > 0 && (h("div", { key: 'c1d143899e66bddb364322537ab3940f7498d63d', class: {
103
+ } }, h("slot", { key: 'ec96e0dd2fbe5ffbd1c0e72f1f2d460d7e3c415f', name: "suffix" }))), h("span", { key: 'cd04304e0d56b0d8fb073cb09d8badfb0058ea5b', class: "text-field-icon__readonly" }, h("tds-icon", { key: '2ab8f0964e53b0a47ccb59aefa80e2ca4a80cd84', name: "edit_inactive", size: "20px" })), h("span", { key: 'f2c3b266b25986fd2d3ad1ff9e300eb846c2a246', class: "text-field-icon__readonly-label" }, "This field is non-editable")), h("div", { key: '4f277fc3ed71efb3ba66068e8322e03d472ed2f5', "aria-live": "assertive" }, (this.helper || this.maxLength > 0) && (h("div", { key: '10eb1e5c33c36a7277e4f1f12f4af1e4cac45718', class: "text-field-helper", id: "text-field-helper-element" }, this.state === 'error' && (h("div", { key: 'fa1460b9ed4bd737319e3a780c54f4440e7fff7e', class: "text-field-helper-error-state" }, h("tds-icon", { key: '639aed75bf25c37d5db04c48b3d854e279cab80d', name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, this.maxLength > 0 && (h("div", { key: '66d348fea3906735bcfe6d63e951af1366a901f0', class: {
98
104
  'text-field-textcounter': true,
99
105
  'text-field-textcounter-disabled': this.disabled,
100
- } }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: '9bd585768330df043bdcba388fbfb13ec087522d', class: {
106
+ } }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: '744acd41ca6d968ee5dab7bd50ca52f5704b21dc', class: {
101
107
  'text-field-textcounter-divider': true,
102
108
  'text-field-textcounter-disabled': this.disabled,
103
- } }, ' ', "/", ' '), this.maxLength))))));
109
+ } }, ' ', "/", ' '), this.maxLength)))))));
104
110
  }
105
111
  static get is() { return "tds-text-field"; }
106
112
  static get encapsulation() { return "scoped"; }
@@ -287,7 +293,7 @@ export class TdsTextField {
287
293
  "optional": false,
288
294
  "docs": {
289
295
  "tags": [],
290
- "text": "Set input in readonly state. Hides the suffix slot if true."
296
+ "text": "Set input in readonly state"
291
297
  },
292
298
  "attribute": "read-only",
293
299
  "reflect": false,
@@ -417,6 +423,23 @@ export class TdsTextField {
417
423
  "attribute": "autofocus",
418
424
  "reflect": false,
419
425
  "defaultValue": "false"
426
+ },
427
+ "tdsAriaLabel": {
428
+ "type": "string",
429
+ "mutable": false,
430
+ "complexType": {
431
+ "original": "string",
432
+ "resolved": "string",
433
+ "references": {}
434
+ },
435
+ "required": false,
436
+ "optional": false,
437
+ "docs": {
438
+ "tags": [],
439
+ "text": "Value to be used for the aria-label attribute. Can be used for announcing that readOnly prop is set to true."
440
+ },
441
+ "attribute": "tds-aria-label",
442
+ "reflect": false
420
443
  }
421
444
  };
422
445
  }
@@ -179,8 +179,13 @@
179
179
  color: var(--tds-textarea-helper-error);
180
180
  }
181
181
 
182
+ .textarea-disabled {
183
+ cursor: not-allowed;
184
+ }
182
185
  .textarea-disabled .textarea-input {
183
186
  border-bottom-color: transparent;
187
+ pointer-events: none;
188
+ user-select: none;
184
189
  }
185
190
  .textarea-disabled .textarea-label {
186
191
  color: var(--tds-textarea-disabled-label);
@@ -219,13 +224,13 @@
219
224
  .textarea-readonly .textarea-icon__readonly {
220
225
  display: block;
221
226
  }
222
- .textarea-readonly .textarea-icon__readonly:hover ~ .textarea-icon__readonly-label {
223
- display: block;
224
- }
225
- .textarea-readonly .textfield-input {
226
- padding-right: 54px;
227
- background-color: transparent;
227
+ .textarea-readonly .textarea-input {
228
+ border: 1px solid var(--tds-textarea-border-bottom-read-only-color);
228
229
  }
229
230
  .textarea-readonly .textfield-container {
230
231
  background-color: transparent;
232
+ }
233
+
234
+ .textarea-readonly:has(.textarea-icon__readonly) .textarea-input {
235
+ padding-right: 54px;
231
236
  }
@@ -11,6 +11,7 @@ export class TdsTextarea {
11
11
  this.value = '';
12
12
  this.disabled = false;
13
13
  this.readOnly = false;
14
+ this.hideReadOnlyIcon = false;
14
15
  this.state = 'default';
15
16
  this.maxLength = undefined;
16
17
  this.modeVariant = null;
@@ -27,8 +28,10 @@ export class TdsTextarea {
27
28
  }
28
29
  // Data input event in value prop
29
30
  handleInput(event) {
30
- this.value = event.target.value;
31
- this.tdsInput.emit(event);
31
+ if (event.target instanceof HTMLInputElement) {
32
+ this.value = event.target.value;
33
+ this.tdsInput.emit(event);
34
+ }
32
35
  }
33
36
  /* Set the input as focus when clicking the whole textarea with suffix/prefix */
34
37
  handleFocus(event) {
@@ -36,21 +39,30 @@ export class TdsTextarea {
36
39
  this.focusInput = true;
37
40
  this.tdsFocus.emit(event);
38
41
  }
42
+ setModeVariant(modeVariant) {
43
+ if (this.readOnly && modeVariant === 'primary') {
44
+ return 'secondary';
45
+ }
46
+ if (this.readOnly && modeVariant === 'secondary') {
47
+ return 'primary';
48
+ }
49
+ return modeVariant;
50
+ }
39
51
  render() {
40
52
  var _a;
41
- return (h("div", { key: '20555ab5f931d14f485a30e1dd817143ae5a5b88', class: {
53
+ return (h("div", { key: 'd302999a8062b0b33a9caf35843f7673c2a7dbe5', class: {
42
54
  'textarea-container': true,
43
55
  'textarea-label-inside': this.labelPosition === 'inside',
44
56
  'textarea-focus': this.focusInput,
45
57
  'textarea-disabled': this.disabled,
46
- 'textarea-readonly': this.readOnly,
47
- [`tds-mode-variant-${this.modeVariant}`]: this.modeVariant !== null,
58
+ 'textarea-readonly': !this.disabled && this.readOnly,
59
+ [`tds-mode-variant-${this.setModeVariant(this.modeVariant)}`]: true,
48
60
  'textarea-data': this.value !== '',
49
61
  [`textarea-${this.state}`]: this.state === 'error' || this.state === 'success',
50
62
  'no-min-width': this.noMinWidth,
51
- } }, this.labelPosition !== 'no-label' && h("span", { key: '5da3048c718ddb65116fdf42d4b11a5f0718c1db', class: 'textarea-label' }, this.label), h("div", { key: '5c7103748771190a3e761cf0f2979c92d68432b4', class: "textarea-wrapper" }, h("textarea", { key: '97a036edf21ec7dad9f52abea52562b6a55ca109', class: 'textarea-input', ref: (inputEl) => {
63
+ } }, this.labelPosition !== 'no-label' && h("span", { key: 'c88679ff2c209f8d9e67f4a6954181acb2cd2c3f', class: 'textarea-label' }, this.label), h("div", { key: '7750aecde5b145d032a1c19d6037bab7de95012d', class: "textarea-wrapper" }, h("textarea", { key: '6477bc17ae9823a17d00489c0f7401df65161552', class: 'textarea-input', ref: (inputEl) => {
52
64
  this.textEl = inputEl;
53
- }, disabled: this.disabled, readonly: 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) => {
65
+ }, 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) => {
54
66
  if (!this.readOnly) {
55
67
  this.handleFocus(event);
56
68
  }
@@ -58,7 +70,7 @@ export class TdsTextarea {
58
70
  if (!this.readOnly) {
59
71
  this.handleBlur(event);
60
72
  }
61
- }, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event) }), h("span", { key: 'bc1422693b7be09e7057e11b76ae781d7b0f4fad', class: "textarea-resizer-icon" }, h("svg", { key: '3836f33d521ec1f35a6dceb3240a61bc750ca875', width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '75f1a8d478002b9b3a1febd3ff433c14b4f6470f', "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" }))), h("span", { key: '43899208bb06e613eff34d4a9d73b7003d4e0df4', class: "textarea-icon__readonly" }, h("tds-icon", { key: 'd8610ee288753d67e20571fce9707d9b9f2e4ccc', name: "edit_inactive" })), h("span", { key: '208ada20b1053f93db759d7cc9c7dc653735135a', class: "textarea-icon__readonly-label" }, "This field is non-editable")), h("span", { key: 'f5aee4903c0bf3e7612af6dc84eab08ce0e09180', class: 'textarea-helper' }, this.state === 'error' && h("tds-icon", { key: '4581239d829a9e07dc91f3352042220ab3d334b0', name: "error", size: "16px" }), this.helper), this.maxLength > 0 && (h("div", { key: 'b06905f370babfe0470e914df045c72ef7e12041', class: 'textarea-textcounter' }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: 'd45f87ccf1ccf4198276b3e2c7fe465aeeb9fe17', class: "textfield-textcounter-divider" }, " / "), " ", this.maxLength))));
73
+ }, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event) }), h("span", { key: 'abe2829484359e0c2ceac243f3fecd8584574091', class: "textarea-resizer-icon" }, h("svg", { key: '03c6b48ee0892108e72234531b619cc3f4795713', width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '5622e03d58b6d1ce550709fc5b874860660938a5', "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: '7b4535432e2f8a83d896893ca63823ac57797bdd', class: "textarea-icon__readonly" }, h("tds-tooltip", { key: 'b7a0fda48597a2e1821a2f1fbf126e8d40bdcc3b', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: 'a8a29025a599d62f34fa443ec046903e86e9aa3b', id: "readonly-tooltip", name: "edit_inactive" })))), h("span", { key: 'af2692509fe625ac0266ed1e93de69b6b42c889c', class: 'textarea-helper' }, this.state === 'error' && !this.readOnly && h("tds-icon", { key: 'a5e26118214f35e650a15a66334369e02a614c3f', name: "error", size: "16px" }), this.helper), this.maxLength > 0 && (h("div", { key: '4a71559023db5c584dbfc39595cdfd07e8a1dafc', class: 'textarea-textcounter' }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: 'f74611ecfb8082ce9d030546e7debdf4c9e98738', class: "textfield-textcounter-divider" }, " / "), " ", this.maxLength))));
62
74
  }
63
75
  static get is() { return "tds-textarea"; }
64
76
  static get encapsulation() { return "scoped"; }
@@ -251,6 +263,24 @@ export class TdsTextarea {
251
263
  "reflect": false,
252
264
  "defaultValue": "false"
253
265
  },
266
+ "hideReadOnlyIcon": {
267
+ "type": "boolean",
268
+ "mutable": false,
269
+ "complexType": {
270
+ "original": "boolean",
271
+ "resolved": "boolean",
272
+ "references": {}
273
+ },
274
+ "required": false,
275
+ "optional": false,
276
+ "docs": {
277
+ "tags": [],
278
+ "text": "Hide the readonly icon"
279
+ },
280
+ "attribute": "hide-read-only-icon",
281
+ "reflect": false,
282
+ "defaultValue": "false"
283
+ },
254
284
  "state": {
255
285
  "type": "string",
256
286
  "mutable": false,
@@ -92,7 +92,7 @@
92
92
  padding-bottom: 0;
93
93
  }
94
94
  :host .content .toast-bottom {
95
- margin-top: 12px;
95
+ padding-top: 12px;
96
96
  }
97
97
  :host slot[name=actions]::slotted(*) {
98
98
  color: var(--tds-toast-link-color);