@scania/tegel 1.26.0 → 1.27.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 (170) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/tds-banner.cjs.entry.js +1 -1
  3. package/dist/cjs/tds-checkbox.cjs.entry.js +10 -3
  4. package/dist/cjs/tds-chip.cjs.entry.js +7 -2
  5. package/dist/cjs/tds-dropdown_2.cjs.entry.js +71 -42
  6. package/dist/cjs/tds-folder-tab.cjs.entry.js +21 -2
  7. package/dist/cjs/tds-folder-tabs.cjs.entry.js +4 -2
  8. package/dist/cjs/tds-icon.cjs.entry.js +1 -1
  9. package/dist/cjs/tds-inline-tab.cjs.entry.js +21 -2
  10. package/dist/cjs/tds-inline-tabs.cjs.entry.js +4 -2
  11. package/dist/cjs/tds-link.cjs.entry.js +17 -3
  12. package/dist/cjs/tds-message.cjs.entry.js +15 -3
  13. package/dist/cjs/tds-navigation-tab.cjs.entry.js +21 -2
  14. package/dist/cjs/tds-navigation-tabs.cjs.entry.js +6 -4
  15. package/dist/cjs/tds-popover-core.cjs.entry.js +1 -1
  16. package/dist/cjs/tds-text-field.cjs.entry.js +13 -7
  17. package/dist/cjs/tds-textarea.cjs.entry.js +3 -3
  18. package/dist/cjs/tds-toast.cjs.entry.js +4 -4
  19. package/dist/cjs/tds-toggle.cjs.entry.js +2 -2
  20. package/dist/cjs/tds-tooltip.cjs.entry.js +14 -4
  21. package/dist/cjs/tegel.cjs.js +1 -1
  22. package/dist/collection/components/banner/banner.css +1 -1
  23. package/dist/collection/components/banner/banner.js +1 -1
  24. package/dist/collection/components/checkbox/checkbox.js +44 -3
  25. package/dist/collection/components/chip/chip.js +24 -2
  26. package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +2 -2
  27. package/dist/collection/components/dropdown/dropdown.js +86 -40
  28. package/dist/collection/components/icon/icon.js +1 -1
  29. package/dist/collection/components/icon/iconsArray.js +96 -1
  30. package/dist/collection/components/link/link.js +17 -3
  31. package/dist/collection/components/message/message.css +44 -26
  32. package/dist/collection/components/message/message.js +49 -2
  33. package/dist/collection/components/popover-core/tds-popover-core.css +530 -53
  34. package/dist/collection/components/tabs/folder-tabs/folder-tab/folder-tab.js +21 -2
  35. package/dist/collection/components/tabs/folder-tabs/folder-tabs.js +40 -2
  36. package/dist/collection/components/tabs/inline-tabs/inline-tab/inline-tab.js +21 -2
  37. package/dist/collection/components/tabs/inline-tabs/inline-tabs.js +40 -2
  38. package/dist/collection/components/tabs/navigation-tabs/navigation-tab/navigation-tab.js +21 -2
  39. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +42 -4
  40. package/dist/collection/components/text-field/text-field.js +31 -8
  41. package/dist/collection/components/textarea/textarea.js +3 -3
  42. package/dist/collection/components/toast/toast.css +1 -1
  43. package/dist/collection/components/toast/toast.js +3 -3
  44. package/dist/collection/components/toggle/toggle.js +2 -2
  45. package/dist/collection/components/tooltip/tooltip.js +40 -4
  46. package/dist/collection/utils/axeHelpers.js +1 -1
  47. package/dist/components/{p-c65351ab.js → p-14ab9663.js} +12 -3
  48. package/dist/components/{p-2a43e410.js → p-2d93a742.js} +5 -5
  49. package/dist/components/p-4487c541.js +65 -0
  50. package/dist/components/{p-29d19dc8.js → p-53e4cdcf.js} +1 -1
  51. package/dist/components/{p-a64dc22e.js → p-663b8e51.js} +72 -42
  52. package/dist/components/{p-4c1e3344.js → p-83db8b35.js} +1 -1
  53. package/dist/components/p-90dbeab3.js +2052 -0
  54. package/dist/components/{p-b1d21573.js → p-a1181b1f.js} +1 -1
  55. package/dist/components/tds-accordion-item.js +1 -1
  56. package/dist/components/tds-banner.js +2 -2
  57. package/dist/components/tds-checkbox.js +1 -1
  58. package/dist/components/tds-chip.js +9 -3
  59. package/dist/components/tds-datetime.js +1 -1
  60. package/dist/components/tds-dropdown-option.js +1 -1
  61. package/dist/components/tds-dropdown.js +1 -1
  62. package/dist/components/tds-folder-tab.js +21 -2
  63. package/dist/components/tds-folder-tabs.js +7 -3
  64. package/dist/components/tds-footer-group.js +1 -1
  65. package/dist/components/tds-header-cell.js +1 -1
  66. package/dist/components/tds-header-dropdown.js +3 -3
  67. package/dist/components/tds-header-hamburger.js +1 -1
  68. package/dist/components/tds-header-launcher-button.js +1 -1
  69. package/dist/components/tds-header-launcher.js +4 -4
  70. package/dist/components/tds-icon.js +1 -1
  71. package/dist/components/tds-inline-tab.js +21 -2
  72. package/dist/components/tds-inline-tabs.js +7 -3
  73. package/dist/components/tds-link.js +17 -3
  74. package/dist/components/tds-message.js +19 -5
  75. package/dist/components/tds-modal.js +1 -1
  76. package/dist/components/tds-navigation-tab.js +21 -2
  77. package/dist/components/tds-navigation-tabs.js +9 -5
  78. package/dist/components/tds-popover-canvas.js +1 -1
  79. package/dist/components/tds-popover-core.js +1 -1
  80. package/dist/components/tds-popover-menu.js +1 -1
  81. package/dist/components/tds-side-menu-close-button.js +1 -1
  82. package/dist/components/tds-side-menu-dropdown.js +1 -1
  83. package/dist/components/tds-slider.js +1 -1
  84. package/dist/components/tds-step.js +1 -1
  85. package/dist/components/tds-table-body-input-wrapper.js +1 -1
  86. package/dist/components/tds-table-body-row.js +1 -1
  87. package/dist/components/tds-table-footer.js +4 -4
  88. package/dist/components/tds-table-header-input-wrapper.js +1 -1
  89. package/dist/components/tds-table-header.js +1 -1
  90. package/dist/components/tds-table-toolbar.js +1 -1
  91. package/dist/components/tds-text-field.js +15 -8
  92. package/dist/components/tds-textarea.js +4 -4
  93. package/dist/components/tds-toast.js +5 -5
  94. package/dist/components/tds-toggle.js +2 -2
  95. package/dist/components/tds-tooltip.js +18 -7
  96. package/dist/esm/loader.js +1 -1
  97. package/dist/esm/tds-banner.entry.js +1 -1
  98. package/dist/esm/tds-checkbox.entry.js +10 -3
  99. package/dist/esm/tds-chip.entry.js +7 -2
  100. package/dist/esm/tds-dropdown_2.entry.js +71 -42
  101. package/dist/esm/tds-folder-tab.entry.js +22 -3
  102. package/dist/esm/tds-folder-tabs.entry.js +4 -2
  103. package/dist/esm/tds-icon.entry.js +1 -1
  104. package/dist/esm/tds-inline-tab.entry.js +22 -3
  105. package/dist/esm/tds-inline-tabs.entry.js +4 -2
  106. package/dist/esm/tds-link.entry.js +17 -3
  107. package/dist/esm/tds-message.entry.js +15 -3
  108. package/dist/esm/tds-navigation-tab.entry.js +22 -3
  109. package/dist/esm/tds-navigation-tabs.entry.js +6 -4
  110. package/dist/esm/tds-popover-core.entry.js +1 -1
  111. package/dist/esm/tds-text-field.entry.js +13 -7
  112. package/dist/esm/tds-textarea.entry.js +3 -3
  113. package/dist/esm/tds-toast.entry.js +4 -4
  114. package/dist/esm/tds-toggle.entry.js +2 -2
  115. package/dist/esm/tds-tooltip.entry.js +14 -4
  116. package/dist/esm/tegel.js +1 -1
  117. package/dist/tegel/p-0f2c9507.entry.js +1 -0
  118. package/dist/tegel/p-22c592eb.entry.js +1 -0
  119. package/dist/tegel/p-2af57972.entry.js +1 -0
  120. package/dist/tegel/{p-be1d1345.entry.js → p-4465f687.entry.js} +1 -1
  121. package/dist/tegel/p-668b7662.entry.js +1 -0
  122. package/dist/tegel/{p-4e298888.entry.js → p-66f394a2.entry.js} +1 -1
  123. package/dist/tegel/{p-b35e7208.entry.js → p-727f873f.entry.js} +1 -1
  124. package/dist/tegel/p-746e2927.entry.js +1 -0
  125. package/dist/tegel/p-754a4921.entry.js +1 -0
  126. package/dist/tegel/{p-46205cfb.entry.js → p-769d0503.entry.js} +1 -1
  127. package/dist/tegel/p-97f10223.entry.js +1 -0
  128. package/dist/tegel/p-a21250b8.entry.js +1 -0
  129. package/dist/tegel/p-aadb2553.entry.js +1 -0
  130. package/dist/tegel/p-b08886e3.entry.js +1 -0
  131. package/dist/tegel/p-b114ec3d.entry.js +1 -0
  132. package/dist/tegel/p-c3607f10.entry.js +1 -0
  133. package/dist/tegel/p-ddda64eb.entry.js +1 -0
  134. package/dist/tegel/p-eaa279dd.entry.js +1 -0
  135. package/dist/tegel/p-ee960089.entry.js +1 -0
  136. package/dist/tegel/tegel.css +13 -3
  137. package/dist/tegel/tegel.esm.js +1 -1
  138. package/dist/types/components/checkbox/checkbox.d.ts +5 -0
  139. package/dist/types/components/chip/chip.d.ts +3 -0
  140. package/dist/types/components/dropdown/dropdown.d.ts +5 -0
  141. package/dist/types/components/message/message.d.ts +5 -0
  142. package/dist/types/components/tabs/folder-tabs/folder-tab/folder-tab.d.ts +2 -0
  143. package/dist/types/components/tabs/folder-tabs/folder-tabs.d.ts +4 -0
  144. package/dist/types/components/tabs/inline-tabs/inline-tab/inline-tab.d.ts +2 -0
  145. package/dist/types/components/tabs/inline-tabs/inline-tabs.d.ts +4 -0
  146. package/dist/types/components/tabs/navigation-tabs/navigation-tab/navigation-tab.d.ts +2 -0
  147. package/dist/types/components/tabs/navigation-tabs/navigation-tabs.d.ts +4 -0
  148. package/dist/types/components/text-field/text-field.d.ts +4 -1
  149. package/dist/types/components/tooltip/tooltip.d.ts +3 -0
  150. package/dist/types/components.d.ts +114 -2
  151. package/dist/types/types/Icons.d.ts +1 -1
  152. package/dist/types/utils/axeHelpers.d.ts +1 -2
  153. package/package.json +1 -1
  154. package/dist/components/p-4764a1d5.js +0 -2052
  155. package/dist/components/p-a2b7bdef.js +0 -65
  156. package/dist/tegel/p-065d6f83.entry.js +0 -1
  157. package/dist/tegel/p-0c1e632d.entry.js +0 -1
  158. package/dist/tegel/p-168122a7.entry.js +0 -1
  159. package/dist/tegel/p-19eb4ae1.entry.js +0 -1
  160. package/dist/tegel/p-4e33cbda.entry.js +0 -1
  161. package/dist/tegel/p-4ee344e5.entry.js +0 -1
  162. package/dist/tegel/p-64c80f14.entry.js +0 -1
  163. package/dist/tegel/p-72fd0083.entry.js +0 -1
  164. package/dist/tegel/p-93a4bd11.entry.js +0 -1
  165. package/dist/tegel/p-9e0b31a1.entry.js +0 -1
  166. package/dist/tegel/p-a0fc0cc2.entry.js +0 -1
  167. package/dist/tegel/p-b6526302.entry.js +0 -1
  168. package/dist/tegel/p-cca85da0.entry.js +0 -1
  169. package/dist/tegel/p-d0abf078.entry.js +0 -1
  170. 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
  }
@@ -38,7 +38,7 @@ export class TdsTextarea {
38
38
  }
39
39
  render() {
40
40
  var _a;
41
- return (h("div", { key: '20555ab5f931d14f485a30e1dd817143ae5a5b88', class: {
41
+ return (h("div", { key: 'ad924c149590d14fe1f35a57b430186c743d715c', class: {
42
42
  'textarea-container': true,
43
43
  'textarea-label-inside': this.labelPosition === 'inside',
44
44
  'textarea-focus': this.focusInput,
@@ -48,7 +48,7 @@ export class TdsTextarea {
48
48
  'textarea-data': this.value !== '',
49
49
  [`textarea-${this.state}`]: this.state === 'error' || this.state === 'success',
50
50
  '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) => {
51
+ } }, this.labelPosition !== 'no-label' && h("span", { key: '4c2759ed5e3ba6bae9f1175628d0e5b21110f2f6', class: 'textarea-label' }, this.label), h("div", { key: '7b9987a019997bf13af684cb6fd822af2a4e327f', class: "textarea-wrapper" }, h("textarea", { key: '8589c0e3e0faf00f48c1ec35926b354b0734bb2a', class: 'textarea-input', ref: (inputEl) => {
52
52
  this.textEl = inputEl;
53
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) => {
54
54
  if (!this.readOnly) {
@@ -58,7 +58,7 @@ export class TdsTextarea {
58
58
  if (!this.readOnly) {
59
59
  this.handleBlur(event);
60
60
  }
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))));
61
+ }, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event) }), h("span", { key: '26e66224d7a3981de049870774d62f8f09cc1b4a', class: "textarea-resizer-icon" }, h("svg", { key: '7922eb0ec64601f7e97279badca76ca40e2ab2f4', width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '486d91034b0c17328eee9677054b94b5b795b4d0', "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: '68beff246389edc7970aab014dd84747eecf91fa', class: "textarea-icon__readonly" }, h("tds-icon", { key: '50f46d667cef9b5c6bcf54af14a8b5acc690932c', name: "edit_inactive" })), h("span", { key: '7e02c5f24fccfedbcbcb3863593ea6400828dcb7', class: "textarea-icon__readonly-label" }, "This field is non-editable")), h("span", { key: '426207b0db106f44fc9075b9a0de765b43cae519', class: 'textarea-helper' }, this.state === 'error' && h("tds-icon", { key: '3cb35ce4804432f5cc46eb90c779cbd2076f07c5', name: "error", size: "16px" }), this.helper), this.maxLength > 0 && (h("div", { key: '78130caa7cdc0c419b47539cd455adb2a5a33f10', class: 'textarea-textcounter' }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: 'a52c798f87eb16c79bbd2605956aff48336e4169', class: "textfield-textcounter-divider" }, " / "), " ", this.maxLength))));
62
62
  }
63
63
  static get is() { return "tds-textarea"; }
64
64
  static get encapsulation() { return "scoped"; }
@@ -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);
@@ -58,12 +58,12 @@ export class TdsToast {
58
58
  const usesHeaderSlot = hasSlot('header', this.host);
59
59
  const usesSubheaderSlot = hasSlot('subheader', this.host);
60
60
  const usesActionsSlot = hasSlot('actions', this.host);
61
- return (h(Host, { key: '47e0159502e048c0359a5a17677f0456aa69a4da', toastRole: this.toastRole, "aria-describedby": this.host.getAttribute('aria-describedby'), class: {
61
+ return (h(Host, { key: '0fbdb9e7e9495399272925957c3930bfa7c6d8aa', toastRole: this.toastRole, "aria-describedby": this.host.getAttribute('aria-describedby'), class: {
62
62
  hide: this.hidden,
63
63
  show: !this.hidden,
64
- } }, h("div", { key: '6ae5a9da5c89de7a2336f48f495d61cc11286495', class: `
64
+ } }, h("div", { key: '91d24fc7670e387748e995d649c11e627d119289', class: `
65
65
  wrapper
66
- ${this.variant}` }, h("tds-icon", { key: 'c6ce5ea135bddef0ad0f7172ac8d7be6725a3597', name: this.getIconName(), size: "20px" }), h("div", { key: 'b3db26a1314c8a2d55c7d028cdc2f4951a738eaf', class: `content` }, h("div", { key: '3418ea02c85852fe548130c6c653a8dacdd9437a', class: "header-subheader" }, this.header && h("div", { key: '0a50b5e2a487be36a00ad89ad4f14cf1af83477d', class: "header" }, this.header), usesHeaderSlot && h("slot", { key: 'df199798748ed7ade9cbda7f7ce798bb6f8fa995', name: "header" }), this.subheader && h("div", { key: '4978346a3726aea3af0aa7bb98487c36873045d3', class: "subheader" }, this.subheader), usesSubheaderSlot && h("slot", { key: '49651b229907504dfca5aec35589595b421f6e1b', name: "subheader" })), usesActionsSlot && (h("div", { key: '6dbfa25c49118e92c2a254fb01156a95004f0738', class: `toast-bottom ${usesSubheaderSlot || this.subheader ? 'subheader' : 'no-subheader'}` }, h("slot", { key: '85235296f757e0a6306d76ef83c855c3e9bb6cb4', name: "actions" })))), this.closable && (h("button", { key: 'd6946c5ff592b494be06dcb7b46dfc56b5eb5efc', onClick: this.handleClose, class: "close" }, h("tds-icon", { key: '51a93ef789343f24686183ba1747fc853e6d9e04', name: "cross", size: "20px" }))))));
66
+ ${this.variant}` }, h("tds-icon", { key: '9e671027166b02eb4297c512a7c9d8e981edad83', name: this.getIconName(), size: "20px" }), h("div", { key: '5700c75533f321a86feb06e7354fadc8f79b04ee', class: `content` }, h("div", { key: 'af17cd657ea83a7c4c82da3818405cd02da73b32', class: "header-subheader" }, this.header && h("div", { key: '0c300bd28b2ea677a673b6904a49d0cf7f4dd08c', class: "header" }, this.header), usesHeaderSlot && h("slot", { key: 'c3389bd852aafc9bcc71e2c0742b5b8e13d55e19', name: "header" }), this.subheader && h("div", { key: '8fd6596be6134ad42569bd1081391093e1d3288a', class: "subheader" }, this.subheader), usesSubheaderSlot && h("slot", { key: 'ddd4b0cfbd2500a0dcd87a9ceda819297e699341', name: "subheader" })), usesActionsSlot && (h("div", { key: '9417c00cf6e9ee091ee09a82543d290de9641347', class: `toast-bottom ${usesSubheaderSlot || this.subheader ? 'subheader' : 'no-subheader'}` }, h("slot", { key: 'a773f53a0f481c0a925e744d259e8b2704c00768', name: "actions" })))), this.closable && (h("button", { key: '3ae5d113a9eefec9127cf2000bc50ab6c4788be7', onClick: this.handleClose, class: "close" }, h("tds-icon", { key: '747c8c570819b2af5041ca7f1b369ec587e121d6', name: "cross", size: "20px" }))))));
67
67
  }
68
68
  static get is() { return "tds-toast"; }
69
69
  static get encapsulation() { return "shadow"; }
@@ -38,10 +38,10 @@ export class TdsToggle {
38
38
  }
39
39
  }
40
40
  render() {
41
- return (h("div", { key: '8f8a77827f524c049aa004d15372a78e7fad41e2', class: "tds-toggle" }, this.headline && (h("div", { key: '8e254412e80362807046a893fc3f7c42a0c376ba', class: {
41
+ return (h("div", { key: '99809ab8c95f98930769fde49bb128c866fb4288', class: "tds-toggle" }, this.headline && (h("div", { key: '679f7488d0d0ec41e8c1c31234ffcc02fb7c811f', class: {
42
42
  'toggle-headline': true,
43
43
  'disabled': this.disabled,
44
- } }, this.headline)), h("input", { key: '47ed1307b67b61b1594006449fb1b4ccf6d031b8', "aria-label": this.tdsAriaLabel, "aria-describedby": this.host.getAttribute('aria-describedby'), "aria-labelledby": this.host.getAttribute('aria-labelledby'), "aria-checked": this.checked, "aria-required": this.required, onChange: () => this.handleToggle(), class: `${this.size}`, checked: this.checked, disabled: this.disabled, required: this.required, type: "checkbox", name: this.name, id: this.toggleId, role: "switch" }), this.labelSlot && (h("label", { key: '75964d686710d6b4f8bbe365cc51c8aab3234d26', class: { disabled: this.disabled }, htmlFor: this.toggleId }, h("slot", { key: 'aeeaed1f37a160ce792df3f5115c75eaa0fd2c0a', name: "label" })))));
44
+ } }, this.headline)), h("input", { key: 'f08284dc8c171da0694a3b86c6ffb206861080cd', "aria-label": this.tdsAriaLabel, "aria-describedby": this.host.getAttribute('aria-describedby'), "aria-labelledby": this.host.getAttribute('aria-labelledby'), "aria-checked": this.checked, "aria-required": this.required, onChange: () => this.handleToggle(), class: `${this.size}`, checked: this.checked, disabled: this.disabled, required: this.required, type: "checkbox", name: this.name, id: this.toggleId, role: "switch" }), this.labelSlot && (h("label", { key: 'f5d7e6e3ac11cbc7b2eac4fcb2cebcd6f015c2bc', class: { disabled: this.disabled }, htmlFor: this.toggleId }, h("slot", { key: '686d693e4ec91573fe9c40eba7a67e7933f37dde', name: "label" })))));
45
45
  }
46
46
  static get is() { return "tds-toggle"; }
47
47
  static get encapsulation() { return "scoped"; }
@@ -40,6 +40,12 @@ export class TdsTooltip {
40
40
  this.placement = 'bottom';
41
41
  this.offsetSkidding = 0;
42
42
  this.offsetDistance = 8;
43
+ this.tdsAriaDescribedby = undefined;
44
+ }
45
+ handleKeyDown(event) {
46
+ if (event.key === 'Escape' && this.show) {
47
+ this.show = false;
48
+ }
43
49
  }
44
50
  componentWillLoad() {
45
51
  this.inheritedAttributes = inheritAttributes(this.host, ['style', 'class']);
@@ -52,16 +58,20 @@ export class TdsTooltip {
52
58
  }
53
59
  render() {
54
60
  var _a;
55
- return (h(Host, { key: '963a6dc4a3816d01ca9a1efc76ba06b98faba9f0' }, h("tds-popover-core", Object.assign({ key: '6bc8ffb25e5d31c2c3d9dda9867104990ae8ff18' }, this.inheritedAttributes, { class: {
61
+ return (h(Host, { key: '366a9ef9c61be66f0bd4559df61959e66df7ccde', role: "tooltip", "aria-describedby": this.tdsAriaDescribedby, "aria-label": this.text }, h("tds-popover-core", Object.assign({ key: 'a3e941deb73b41565f82bfcd972e88f3b3a9a4cc' }, this.inheritedAttributes, { class: {
56
62
  'tds-tooltip': true,
57
63
  [`tds-tooltip-${this.border}`]: true,
58
64
  [(_a = this.inheritedAttributes.class) !== null && _a !== void 0 ? _a : '']: true,
59
65
  'tds-tooltip-show': this.show,
60
- }, selector: this.selector, referenceEl: this.referenceEl, trigger: this.determineTrigger(), modifiers: this.popperjsExtraModifiers, offsetSkidding: this.offsetSkidding, offsetDistance: this.offsetDistance, show: this.show, placement: this.placement, autoHide: false, onInternalTdsShow: () => {
66
+ }, selector: this.selector, referenceEl: this.referenceEl, trigger: this.determineTrigger(), modifiers: this.popperjsExtraModifiers, offsetSkidding: this.offsetSkidding, offsetDistance: this.offsetDistance, show: this.show, placement: this.placement, autoHide: false,
67
+ // @ts-ignore
68
+ onInternalTdsShow: () => {
61
69
  this.show = true;
62
- }, onInternalTdsClose: () => {
70
+ },
71
+ // @ts-ignore
72
+ onInternalTdsClose: () => {
63
73
  this.show = false;
64
- }, defaultShow: this.defaultShow }), this.text, h("slot", { key: '5df9224787bb470653278d121ceed41ea48b957a' }))));
74
+ }, defaultShow: this.defaultShow }), this.text, h("slot", { key: '33b71eda3f8d5e3c5f711edac7ed7974b09843a8' }))));
65
75
  }
66
76
  static get is() { return "tds-tooltip"; }
67
77
  static get encapsulation() { return "scoped"; }
@@ -263,8 +273,34 @@ export class TdsTooltip {
263
273
  "attribute": "offset-distance",
264
274
  "reflect": false,
265
275
  "defaultValue": "8"
276
+ },
277
+ "tdsAriaDescribedby": {
278
+ "type": "string",
279
+ "mutable": false,
280
+ "complexType": {
281
+ "original": "string",
282
+ "resolved": "string",
283
+ "references": {}
284
+ },
285
+ "required": false,
286
+ "optional": false,
287
+ "docs": {
288
+ "tags": [],
289
+ "text": "Sets the aria-describedby attribute"
290
+ },
291
+ "attribute": "tds-aria-describedby",
292
+ "reflect": false
266
293
  }
267
294
  };
268
295
  }
269
296
  static get elementRef() { return "host"; }
297
+ static get listeners() {
298
+ return [{
299
+ "name": "keydown",
300
+ "method": "handleKeyDown",
301
+ "target": "window",
302
+ "capture": false,
303
+ "passive": false
304
+ }];
305
+ }
270
306
  }
@@ -1,3 +1,3 @@
1
1
  import AxeBuilder from "@axe-core/playwright";
2
- const disabledRules = ['page-has-heading-one', 'landmark-one-main', 'region'];
2
+ const disabledRules = ['page-has-heading-one', 'landmark-one-main', 'region', 'color-contrast'];
3
3
  export const tegelAnalyze = async (page) => new AxeBuilder({ page }).disableRules(disabledRules).analyze();