@scania/tegel 1.27.0 → 1.28.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 (205) 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-dropdown_2.cjs.entry.js +8 -8
  4. package/dist/cjs/tds-footer-group.cjs.entry.js +27 -5
  5. package/dist/cjs/tds-footer-item.cjs.entry.js +2 -2
  6. package/dist/cjs/tds-footer.cjs.entry.js +1 -1
  7. package/dist/cjs/tds-header-brand-symbol.cjs.entry.js +6 -2
  8. package/dist/cjs/tds-header-dropdown.cjs.entry.js +26 -3
  9. package/dist/cjs/tds-header-hamburger.cjs.entry.js +7 -1
  10. package/dist/cjs/tds-header-launcher-button.cjs.entry.js +2 -1
  11. package/dist/cjs/tds-header-launcher.cjs.entry.js +23 -2
  12. package/dist/cjs/tds-icon.cjs.entry.js +3 -2
  13. package/dist/cjs/tds-inline-tabs.cjs.entry.js +1 -1
  14. package/dist/cjs/tds-modal.cjs.entry.js +75 -3
  15. package/dist/cjs/tds-navigation-tabs.cjs.entry.js +1 -1
  16. package/dist/cjs/tds-popover-canvas.cjs.entry.js +3 -2
  17. package/dist/cjs/tds-popover-core.cjs.entry.js +55 -11
  18. package/dist/cjs/tds-popover-menu-item.cjs.entry.js +2 -2
  19. package/dist/cjs/tds-popover-menu.cjs.entry.js +1 -1
  20. package/dist/cjs/tds-radio-button.cjs.entry.js +3 -1
  21. package/dist/cjs/tds-spinner.cjs.entry.js +1 -1
  22. package/dist/cjs/tds-step.cjs.entry.js +2 -1
  23. package/dist/cjs/tds-stepper.cjs.entry.js +2 -1
  24. package/dist/cjs/tds-text-field.cjs.entry.js +31 -16
  25. package/dist/cjs/tds-textarea.cjs.entry.js +27 -9
  26. package/dist/cjs/tds-toast.cjs.entry.js +10 -3
  27. package/dist/cjs/tds-toggle.cjs.entry.js +2 -2
  28. package/dist/cjs/tds-tooltip.cjs.entry.js +2 -2
  29. package/dist/cjs/tegel.cjs.js +1 -1
  30. package/dist/collection/components/dropdown/dropdown.js +8 -8
  31. package/dist/collection/components/footer/footer-group/footer-group.css +23 -21
  32. package/dist/collection/components/footer/footer-group/footer-group.js +55 -5
  33. package/dist/collection/components/footer/footer-item/footer-item.css +17 -17
  34. package/dist/collection/components/footer/footer-item/footer-item.js +2 -2
  35. package/dist/collection/components/footer/footer.css +1 -1
  36. package/dist/collection/components/header/header-brand-symbol/header-brand-symbol.css +1 -1
  37. package/dist/collection/components/header/header-brand-symbol/header-brand-symbol.js +6 -2
  38. package/dist/collection/components/header/header-dropdown/header-dropdown.js +49 -3
  39. package/dist/collection/components/header/header-hamburger/header-hamburger.js +30 -1
  40. package/dist/collection/components/header/header-launcher/header-launcher.js +50 -2
  41. package/dist/collection/components/header/header-launcher-button/header-launcher-button.js +19 -1
  42. package/dist/collection/components/icon/icon.js +21 -2
  43. package/dist/collection/components/modal/modal.css +48 -43
  44. package/dist/collection/components/modal/modal.js +103 -3
  45. package/dist/collection/components/popover-canvas/popover-canvas.js +21 -2
  46. package/dist/collection/components/popover-core/popover-core.js +63 -10
  47. package/dist/collection/components/popover-core/tds-popover-core.css +123 -66
  48. package/dist/collection/components/popover-menu/popover-menu-item/popover-menu-item.js +2 -2
  49. package/dist/collection/components/popover-menu/popover-menu.js +1 -1
  50. package/dist/collection/components/radio-button/radio-button.js +37 -1
  51. package/dist/collection/components/spinner/spinner.css +62 -39
  52. package/dist/collection/components/stepper/step/step.js +19 -1
  53. package/dist/collection/components/stepper/stepper.js +20 -1
  54. package/dist/collection/components/tabs/inline-tabs/inline-tabs.css +0 -1
  55. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.css +2 -3
  56. package/dist/collection/components/text-field/text-field.css +21 -9
  57. package/dist/collection/components/text-field/text-field.js +48 -15
  58. package/dist/collection/components/textarea/textarea.css +11 -6
  59. package/dist/collection/components/textarea/textarea.js +61 -8
  60. package/dist/collection/components/toast/toast.js +45 -3
  61. package/dist/collection/components/toggle/toggle.js +2 -2
  62. package/dist/collection/components/tooltip/tooltip.js +2 -2
  63. package/dist/components/{p-2d93a742.js → p-1c606f82.js} +1 -1
  64. package/dist/components/p-252f3d4d.js +2098 -0
  65. package/dist/components/p-3dcfe1f4.js +115 -0
  66. package/dist/components/{p-53e4cdcf.js → p-789bb453.js} +5 -3
  67. package/dist/components/{p-4487c541.js → p-92fb75a7.js} +4 -2
  68. package/dist/components/{p-663b8e51.js → p-c0b84c59.js} +9 -9
  69. package/dist/components/{p-83db8b35.js → p-f8a36676.js} +5 -3
  70. package/dist/components/tds-accordion-item.js +1 -1
  71. package/dist/components/tds-banner.js +1 -1
  72. package/dist/components/tds-datetime.js +1 -1
  73. package/dist/components/tds-dropdown-option.js +1 -1
  74. package/dist/components/tds-dropdown.js +1 -1
  75. package/dist/components/tds-folder-tabs.js +1 -1
  76. package/dist/components/tds-footer-group.js +32 -8
  77. package/dist/components/tds-footer-item.js +3 -3
  78. package/dist/components/tds-footer.js +1 -1
  79. package/dist/components/tds-header-brand-symbol.js +6 -2
  80. package/dist/components/tds-header-cell.js +1 -1
  81. package/dist/components/tds-header-dropdown.js +31 -7
  82. package/dist/components/tds-header-hamburger.js +11 -3
  83. package/dist/components/tds-header-launcher-button.js +1 -1
  84. package/dist/components/tds-header-launcher.js +29 -7
  85. package/dist/components/tds-icon.js +1 -1
  86. package/dist/components/tds-inline-tabs.js +2 -2
  87. package/dist/components/tds-message.js +1 -1
  88. package/dist/components/tds-modal.js +79 -5
  89. package/dist/components/tds-navigation-tabs.js +2 -2
  90. package/dist/components/tds-popover-canvas.js +1 -1
  91. package/dist/components/tds-popover-core.js +1 -1
  92. package/dist/components/tds-popover-menu-item.js +2 -2
  93. package/dist/components/tds-popover-menu.js +2 -2
  94. package/dist/components/tds-radio-button.js +6 -2
  95. package/dist/components/tds-side-menu-close-button.js +1 -1
  96. package/dist/components/tds-side-menu-dropdown.js +1 -1
  97. package/dist/components/tds-slider.js +1 -1
  98. package/dist/components/tds-spinner.js +1 -1
  99. package/dist/components/tds-step.js +4 -2
  100. package/dist/components/tds-stepper.js +4 -2
  101. package/dist/components/tds-table-body-input-wrapper.js +1 -1
  102. package/dist/components/tds-table-footer.js +3 -3
  103. package/dist/components/tds-table-header-input-wrapper.js +1 -1
  104. package/dist/components/tds-table-toolbar.js +1 -1
  105. package/dist/components/tds-text-field.js +33 -17
  106. package/dist/components/tds-textarea.js +43 -11
  107. package/dist/components/tds-toast.js +13 -4
  108. package/dist/components/tds-toggle.js +2 -2
  109. package/dist/components/tds-tooltip.js +1 -113
  110. package/dist/esm/index-51d04e39.js +4 -4
  111. package/dist/esm/loader.js +1 -1
  112. package/dist/esm/tds-dropdown_2.entry.js +8 -8
  113. package/dist/esm/tds-footer-group.entry.js +27 -5
  114. package/dist/esm/tds-footer-item.entry.js +3 -3
  115. package/dist/esm/tds-footer.entry.js +1 -1
  116. package/dist/esm/tds-header-brand-symbol.entry.js +6 -2
  117. package/dist/esm/tds-header-dropdown.entry.js +26 -3
  118. package/dist/esm/tds-header-hamburger.entry.js +7 -1
  119. package/dist/esm/tds-header-launcher-button.entry.js +2 -1
  120. package/dist/esm/tds-header-launcher.entry.js +23 -2
  121. package/dist/esm/tds-icon.entry.js +3 -2
  122. package/dist/esm/tds-inline-tabs.entry.js +1 -1
  123. package/dist/esm/tds-modal.entry.js +75 -3
  124. package/dist/esm/tds-navigation-tabs.entry.js +1 -1
  125. package/dist/esm/tds-popover-canvas.entry.js +3 -2
  126. package/dist/esm/tds-popover-core.entry.js +55 -11
  127. package/dist/esm/tds-popover-menu-item.entry.js +2 -2
  128. package/dist/esm/tds-popover-menu.entry.js +1 -1
  129. package/dist/esm/tds-radio-button.entry.js +3 -1
  130. package/dist/esm/tds-spinner.entry.js +1 -1
  131. package/dist/esm/tds-step.entry.js +2 -1
  132. package/dist/esm/tds-stepper.entry.js +2 -1
  133. package/dist/esm/tds-text-field.entry.js +31 -16
  134. package/dist/esm/tds-textarea.entry.js +27 -9
  135. package/dist/esm/tds-toast.entry.js +10 -3
  136. package/dist/esm/tds-toggle.entry.js +2 -2
  137. package/dist/esm/tds-tooltip.entry.js +2 -2
  138. package/dist/esm/tegel.js +1 -1
  139. package/dist/tegel/p-033d991e.entry.js +1 -0
  140. package/dist/tegel/p-24db6b5b.entry.js +1 -0
  141. package/dist/tegel/p-27a4a7d0.entry.js +1 -0
  142. package/dist/tegel/p-28cf7204.entry.js +1 -0
  143. package/dist/tegel/p-302fea99.entry.js +1 -0
  144. package/dist/tegel/p-31bc440c.entry.js +1 -0
  145. package/dist/tegel/p-3e9ca19a.entry.js +1 -0
  146. package/dist/tegel/p-44ac6a20.entry.js +1 -0
  147. package/dist/tegel/{p-769d0503.entry.js → p-46205cfb.entry.js} +1 -1
  148. package/dist/tegel/p-54a20280.entry.js +1 -0
  149. package/dist/tegel/p-5a3ff0d3.entry.js +1 -0
  150. package/dist/tegel/p-660176d6.entry.js +1 -0
  151. package/dist/tegel/{p-eaa279dd.entry.js → p-81111221.entry.js} +1 -1
  152. package/dist/tegel/{p-668b7662.entry.js → p-8d7bf652.entry.js} +1 -1
  153. package/dist/tegel/p-b58f68f0.entry.js +1 -0
  154. package/dist/tegel/{p-5ba254ee.entry.js → p-c10be10e.entry.js} +1 -1
  155. package/dist/tegel/p-c71acb02.entry.js +1 -0
  156. package/dist/tegel/p-ceab8f75.entry.js +1 -0
  157. package/dist/tegel/p-e1abd593.entry.js +1 -0
  158. package/dist/tegel/p-e3c3bdac.entry.js +1 -0
  159. package/dist/tegel/p-e46744bc.entry.js +1 -0
  160. package/dist/tegel/p-ea9e7345.entry.js +1 -0
  161. package/dist/tegel/{p-97f10223.entry.js → p-eec22b6b.entry.js} +1 -1
  162. package/dist/tegel/p-f034fc0c.entry.js +1 -0
  163. package/dist/tegel/p-fa342278.entry.js +1 -0
  164. package/dist/tegel/{p-b9f81e53.entry.js → p-fc6196c4.entry.js} +1 -1
  165. package/dist/tegel/tegel.css +4 -4
  166. package/dist/tegel/tegel.esm.js +1 -1
  167. package/dist/types/components/footer/footer-group/footer-group.d.ts +7 -0
  168. package/dist/types/components/header/header-brand-symbol/header-brand-symbol.d.ts +1 -1
  169. package/dist/types/components/header/header-dropdown/header-dropdown.d.ts +4 -0
  170. package/dist/types/components/header/header-hamburger/header-hamburger.d.ts +3 -0
  171. package/dist/types/components/header/header-launcher/header-launcher.d.ts +4 -0
  172. package/dist/types/components/header/header-launcher-button/header-launcher-button.d.ts +2 -0
  173. package/dist/types/components/icon/icon.d.ts +2 -0
  174. package/dist/types/components/modal/modal.d.ts +6 -0
  175. package/dist/types/components/popover-canvas/popover-canvas.d.ts +2 -0
  176. package/dist/types/components/popover-core/popover-core.d.ts +4 -0
  177. package/dist/types/components/radio-button/radio-button.d.ts +4 -0
  178. package/dist/types/components/stepper/step/step.d.ts +1 -0
  179. package/dist/types/components/stepper/stepper.d.ts +2 -0
  180. package/dist/types/components/text-field/text-field.d.ts +6 -4
  181. package/dist/types/components/textarea/textarea.d.ts +10 -4
  182. package/dist/types/components/toast/toast.d.ts +5 -0
  183. package/dist/types/components.d.ts +130 -0
  184. package/package.json +1 -1
  185. package/dist/components/p-90dbeab3.js +0 -2052
  186. package/dist/tegel/p-035e58e6.entry.js +0 -1
  187. package/dist/tegel/p-22c592eb.entry.js +0 -1
  188. package/dist/tegel/p-288a09ef.entry.js +0 -1
  189. package/dist/tegel/p-4f5f152a.entry.js +0 -1
  190. package/dist/tegel/p-542d7b3e.entry.js +0 -1
  191. package/dist/tegel/p-5a7110b8.entry.js +0 -1
  192. package/dist/tegel/p-5db5c8f4.entry.js +0 -1
  193. package/dist/tegel/p-654785d2.entry.js +0 -1
  194. package/dist/tegel/p-66f394a2.entry.js +0 -1
  195. package/dist/tegel/p-727f873f.entry.js +0 -1
  196. package/dist/tegel/p-746e2927.entry.js +0 -1
  197. package/dist/tegel/p-754a4921.entry.js +0 -1
  198. package/dist/tegel/p-aef6b130.entry.js +0 -1
  199. package/dist/tegel/p-b114ec3d.entry.js +0 -1
  200. package/dist/tegel/p-b39ffad4.entry.js +0 -1
  201. package/dist/tegel/p-b686f1ad.entry.js +0 -1
  202. package/dist/tegel/p-c56be8d1.entry.js +0 -1
  203. package/dist/tegel/p-dfbbaefd.entry.js +0 -1
  204. package/dist/tegel/p-ea3e071f.entry.js +0 -1
  205. package/dist/tegel/p-ee7f07ae.entry.js +0 -1
@@ -11,11 +11,13 @@ 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;
17
18
  this.autofocus = false;
18
19
  this.noMinWidth = false;
20
+ this.tdsAriaLabel = undefined;
19
21
  this.focusInput = undefined;
20
22
  }
21
23
  handleChange(event) {
@@ -27,8 +29,10 @@ export class TdsTextarea {
27
29
  }
28
30
  // Data input event in value prop
29
31
  handleInput(event) {
30
- this.value = event.target.value;
31
- this.tdsInput.emit(event);
32
+ if (event.target instanceof HTMLInputElement) {
33
+ this.value = event.target.value;
34
+ this.tdsInput.emit(event);
35
+ }
32
36
  }
33
37
  /* Set the input as focus when clicking the whole textarea with suffix/prefix */
34
38
  handleFocus(event) {
@@ -36,21 +40,35 @@ export class TdsTextarea {
36
40
  this.focusInput = true;
37
41
  this.tdsFocus.emit(event);
38
42
  }
43
+ setModeVariant(modeVariant) {
44
+ if (this.readOnly && modeVariant === 'primary') {
45
+ return 'secondary';
46
+ }
47
+ if (this.readOnly && modeVariant === 'secondary') {
48
+ return 'primary';
49
+ }
50
+ return modeVariant;
51
+ }
52
+ connectedCallback() {
53
+ if (!this.tdsAriaLabel && !this.label) {
54
+ console.warn('Tegel Textarea component: specify label or tdsAriaLabel prop for accessibility');
55
+ }
56
+ }
39
57
  render() {
40
58
  var _a;
41
- return (h("div", { key: 'ad924c149590d14fe1f35a57b430186c743d715c', class: {
59
+ return (h("div", { key: 'b50538b818f0e82cca94db22f91a8ee73e009ca7', class: {
42
60
  'textarea-container': true,
43
61
  'textarea-label-inside': this.labelPosition === 'inside',
44
62
  'textarea-focus': this.focusInput,
45
63
  'textarea-disabled': this.disabled,
46
- 'textarea-readonly': this.readOnly,
47
- [`tds-mode-variant-${this.modeVariant}`]: this.modeVariant !== null,
64
+ 'textarea-readonly': !this.disabled && this.readOnly,
65
+ [`tds-mode-variant-${this.setModeVariant(this.modeVariant)}`]: true,
48
66
  'textarea-data': this.value !== '',
49
67
  [`textarea-${this.state}`]: this.state === 'error' || this.state === 'success',
50
68
  'no-min-width': this.noMinWidth,
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) => {
69
+ } }, this.labelPosition !== 'no-label' && (h("label", { key: 'f96e68827795a3402d4261ffab997e5c9292fd20', htmlFor: "textarea-element", class: 'textarea-label' }, this.label)), h("div", { key: '0ed06e68cc15d78d4afead9404e89040229edb6e', class: "textarea-wrapper" }, h("textarea", { key: 'a15b5762cc8288e0b0e9631707055091062d0e95', id: "textarea-element", class: 'textarea-input', ref: (inputEl) => {
52
70
  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) => {
71
+ }, 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
72
  if (!this.readOnly) {
55
73
  this.handleFocus(event);
56
74
  }
@@ -58,7 +76,7 @@ export class TdsTextarea {
58
76
  if (!this.readOnly) {
59
77
  this.handleBlur(event);
60
78
  }
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))));
79
+ }, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), "aria-invalid": this.state === 'error' ? 'true' : 'false', "aria-readonly": this.readOnly ? 'true' : 'false', "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label, "aria-describedby": "textarea-helper-element" }), h("span", { key: '904e38bce9b98c8ea06428c26083bc3d7476b845', class: "textarea-resizer-icon" }, h("svg", { key: '59e3404d79da1dfad42788e5f6e90e47752d603e', width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '8e91b396a4337c0c56b0e8131d96aae5595506d9', "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: '4c4629c89b4b2545a8482a0cd6c59b7c57888aa8', class: "textarea-icon__readonly" }, h("tds-tooltip", { key: 'cae2de2a71c2891067303188f54d7c1b186886ff', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: 'a09a265f4684d2356886a23cdef4a570d8323c04', id: "readonly-tooltip", name: "edit_inactive" })))), h("span", { key: '5862f0cb512faf37724629642c6560bdde90e47e', class: 'textarea-helper', "aria-live": "assertive", id: "textarea-helper-element" }, this.state === 'error' && !this.readOnly && h("tds-icon", { key: 'cc0202e6e28daf0664fb3446fd4118e453e89cff', name: "error", size: "16px" }), this.helper), this.maxLength > 0 && (h("div", { key: '6e1c683c4036b8aa9924ca69d4dda6b2b3a5fd8a', class: 'textarea-textcounter' }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: '2eb15f11eb7b8abe3741bc9d4dde13ba2fa02d8a', class: "textfield-textcounter-divider" }, " / "), " ", this.maxLength))));
62
80
  }
63
81
  static get is() { return "tds-textarea"; }
64
82
  static get encapsulation() { return "scoped"; }
@@ -251,6 +269,24 @@ export class TdsTextarea {
251
269
  "reflect": false,
252
270
  "defaultValue": "false"
253
271
  },
272
+ "hideReadOnlyIcon": {
273
+ "type": "boolean",
274
+ "mutable": false,
275
+ "complexType": {
276
+ "original": "boolean",
277
+ "resolved": "boolean",
278
+ "references": {}
279
+ },
280
+ "required": false,
281
+ "optional": false,
282
+ "docs": {
283
+ "tags": [],
284
+ "text": "Hide the readonly icon"
285
+ },
286
+ "attribute": "hide-read-only-icon",
287
+ "reflect": false,
288
+ "defaultValue": "false"
289
+ },
254
290
  "state": {
255
291
  "type": "string",
256
292
  "mutable": false,
@@ -339,6 +375,23 @@ export class TdsTextarea {
339
375
  "attribute": "no-min-width",
340
376
  "reflect": false,
341
377
  "defaultValue": "false"
378
+ },
379
+ "tdsAriaLabel": {
380
+ "type": "string",
381
+ "mutable": false,
382
+ "complexType": {
383
+ "original": "string",
384
+ "resolved": "string",
385
+ "references": {}
386
+ },
387
+ "required": false,
388
+ "optional": false,
389
+ "docs": {
390
+ "tags": [],
391
+ "text": "Value to be used for the aria-label attribute. Can be used for announcing that readOnly prop is set to true."
392
+ },
393
+ "attribute": "tds-aria-label",
394
+ "reflect": false
342
395
  }
343
396
  };
344
397
  }
@@ -45,6 +45,8 @@ export class TdsToast {
45
45
  this.hidden = false;
46
46
  this.closable = true;
47
47
  this.toastRole = 'alert';
48
+ this.tdsCloseAriaLabel = undefined;
49
+ this.tdsAriaLive = 'polite';
48
50
  }
49
51
  /** Hides the Toast. */
50
52
  async hideToast() {
@@ -54,16 +56,21 @@ export class TdsToast {
54
56
  async showToast() {
55
57
  this.hidden = false;
56
58
  }
59
+ connectedCallback() {
60
+ if (!this.tdsCloseAriaLabel) {
61
+ console.warn('tds-toast: tdsCloseAriaLabel is required');
62
+ }
63
+ }
57
64
  render() {
58
65
  const usesHeaderSlot = hasSlot('header', this.host);
59
66
  const usesSubheaderSlot = hasSlot('subheader', this.host);
60
67
  const usesActionsSlot = hasSlot('actions', this.host);
61
- return (h(Host, { key: '0fbdb9e7e9495399272925957c3930bfa7c6d8aa', toastRole: this.toastRole, "aria-describedby": this.host.getAttribute('aria-describedby'), class: {
68
+ return (h(Host, { key: '57126c13e4498e7862026978aab347dbe7e24d63', "aria-live": this.tdsAriaLive, toastRole: this.toastRole, "aria-describedby": this.host.getAttribute('aria-describedby'), class: {
62
69
  hide: this.hidden,
63
70
  show: !this.hidden,
64
- } }, h("div", { key: '91d24fc7670e387748e995d649c11e627d119289', class: `
71
+ } }, h("div", { key: '099c769d8f2e54b76eada969978e641b3f5c18ea', class: `
65
72
  wrapper
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" }))))));
73
+ ${this.variant}` }, h("tds-icon", { key: '60fe4a91c42741be76f882fd82daa4ae3f5de545', name: this.getIconName(), size: "20px" }), h("div", { key: '5c5f4221726b14a38a6fb440a7f15570bb17b3cf', class: `content` }, h("div", { key: '2b53199e99ab3417160af38d81301a61e66eaef0', class: "header-subheader" }, this.header && h("div", { key: 'c98f680755ba45a8661ca46f6064c696ee61b6bb', class: "header" }, this.header), usesHeaderSlot && h("slot", { key: '5420edf38e156a811187eb6f5838bd8611818673', name: "header" }), this.subheader && h("div", { key: '9dc6d054f0f2ee3d179f25a8e75134d73ab426e2', class: "subheader" }, this.subheader), usesSubheaderSlot && h("slot", { key: '726eec99d5f05bea48b5a30bf7e91a71099960f8', name: "subheader" })), usesActionsSlot && (h("div", { key: '1cb83584cdb4cc8e3d383ebdf5d470135f7573ab', class: `toast-bottom ${usesSubheaderSlot || this.subheader ? 'subheader' : 'no-subheader'}` }, h("slot", { key: '0950f174a2e62ffbec229ef24e4a999a318798cd', name: "actions" })))), this.closable && (h("button", { key: 'ee90c96c48a11e38f17acd8cb66a1619bd770e83', id: "my-button", "aria-label": this.tdsCloseAriaLabel, onClick: this.handleClose, class: "close" }, h("tds-icon", { key: '632aefc906f17bd0993c832f9c4c5a1ec8db1ccc', name: "cross", size: "20px" }))))));
67
74
  }
68
75
  static get is() { return "tds-toast"; }
69
76
  static get encapsulation() { return "shadow"; }
@@ -202,6 +209,41 @@ export class TdsToast {
202
209
  "attribute": "toast-role",
203
210
  "reflect": false,
204
211
  "defaultValue": "'alert'"
212
+ },
213
+ "tdsCloseAriaLabel": {
214
+ "type": "string",
215
+ "mutable": false,
216
+ "complexType": {
217
+ "original": "string",
218
+ "resolved": "string",
219
+ "references": {}
220
+ },
221
+ "required": false,
222
+ "optional": false,
223
+ "docs": {
224
+ "tags": [],
225
+ "text": "Provides an accessible name for the components close button"
226
+ },
227
+ "attribute": "tds-close-aria-label",
228
+ "reflect": false
229
+ },
230
+ "tdsAriaLive": {
231
+ "type": "string",
232
+ "mutable": false,
233
+ "complexType": {
234
+ "original": "'polite' | 'assertive'",
235
+ "resolved": "\"assertive\" | \"polite\"",
236
+ "references": {}
237
+ },
238
+ "required": false,
239
+ "optional": false,
240
+ "docs": {
241
+ "tags": [],
242
+ "text": "ARIA live for the Toast."
243
+ },
244
+ "attribute": "tds-aria-live",
245
+ "reflect": false,
246
+ "defaultValue": "'polite'"
205
247
  }
206
248
  };
207
249
  }
@@ -38,10 +38,10 @@ export class TdsToggle {
38
38
  }
39
39
  }
40
40
  render() {
41
- return (h("div", { key: '99809ab8c95f98930769fde49bb128c866fb4288', class: "tds-toggle" }, this.headline && (h("div", { key: '679f7488d0d0ec41e8c1c31234ffcc02fb7c811f', class: {
41
+ return (h("div", { key: '8f8a77827f524c049aa004d15372a78e7fad41e2', class: "tds-toggle" }, this.headline && (h("div", { key: '8e254412e80362807046a893fc3f7c42a0c376ba', class: {
42
42
  'toggle-headline': true,
43
43
  'disabled': this.disabled,
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" })))));
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" })))));
45
45
  }
46
46
  static get is() { return "tds-toggle"; }
47
47
  static get encapsulation() { return "scoped"; }
@@ -58,7 +58,7 @@ export class TdsTooltip {
58
58
  }
59
59
  render() {
60
60
  var _a;
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: {
61
+ return (h(Host, { key: '59eff46fa8b6f26ac7b43fff50f8f388d45d16a7', role: "tooltip", "aria-describedby": this.tdsAriaDescribedby, "aria-label": this.text }, h("tds-popover-core", Object.assign({ key: 'b6fb24abddaa4d7a804876891993b463a36e8610' }, this.inheritedAttributes, { class: {
62
62
  'tds-tooltip': true,
63
63
  [`tds-tooltip-${this.border}`]: true,
64
64
  [(_a = this.inheritedAttributes.class) !== null && _a !== void 0 ? _a : '']: true,
@@ -71,7 +71,7 @@ export class TdsTooltip {
71
71
  // @ts-ignore
72
72
  onInternalTdsClose: () => {
73
73
  this.show = false;
74
- }, defaultShow: this.defaultShow }), this.text, h("slot", { key: '33b71eda3f8d5e3c5f711edac7ed7974b09843a8' }))));
74
+ }, defaultShow: this.defaultShow }), this.text, h("slot", { key: 'a1b4e5f08a1239a6a0d522b4057f6d529c9e79d9' }))));
75
75
  }
76
76
  static get is() { return "tds-tooltip"; }
77
77
  static get encapsulation() { return "scoped"; }
@@ -1,7 +1,7 @@
1
1
  import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-28ef5186.js';
2
2
  import { c as convertToString } from './p-a1181b1f.js';
3
3
  import { d as defineCustomElement$2 } from './p-14ab9663.js';
4
- import { d as defineCustomElement$1 } from './p-4487c541.js';
4
+ import { d as defineCustomElement$1 } from './p-92fb75a7.js';
5
5
 
6
6
  const dropdownOptionCss = ":host{box-sizing:border-box;display:block;background-color:var(--tds-dropdown-option-background)}:host *{box-sizing:border-box}:host .dropdown-option{color:var(--tds-dropdown-option-color);border-bottom:1px solid var(--tds-dropdown-option-border);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);overflow-wrap:anywhere;transition:background-color var(--tds-motion-duration-fast-02) var(--tds-motion-easing-scania)}:host .dropdown-option.selected{background-color:var(--tds-dropdown-option-background-selected)}:host .dropdown-option.disabled{color:var(--tds-dropdown-option-color-disabled)}:host .dropdown-option button:focus{outline:2px solid var(--tds-blue-400);outline-offset:-2px}:host .dropdown-option button{all:unset;width:100%}:host .dropdown-option button.lg{padding:19px 0 20px}:host .dropdown-option button.md{padding:15px 0 16px}:host .dropdown-option button.sm{padding:11px 0 12px}:host .dropdown-option button.xs{padding:7px 0 8px}:host .dropdown-option button .single-select{display:flex;align-items:center;justify-content:space-between;padding:0 16px}:host .dropdown-option .multiselect{width:100%;height:100%}:host .dropdown-option .multiselect tds-checkbox{display:flex;height:100%;width:100%}:host .dropdown-option .multiselect tds-checkbox.lg{padding:15px 16px 16px}:host .dropdown-option .multiselect tds-checkbox.md{padding:11px 16px 12px}:host .dropdown-option .multiselect tds-checkbox.sm{padding:7px 16px 8px}:host .dropdown-option .multiselect tds-checkbox.xs{padding:7px 16px 8px}:host .dropdown-option:hover{background-color:var(--tds-dropdown-option-background-hover);cursor:pointer}:host .dropdown-option:hover.disabled{background-color:var(--tds-dropdown-option-background);cursor:not-allowed}:host([hidden]){display:none}";
7
7
  const TdsDropdownOptionStyle0 = dropdownOptionCss;