@politiet/sheriff-web-components 2.6.1 → 2.7.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 (105) hide show
  1. package/custom-elements.json +425 -262
  2. package/dist/frameworks/preact.d.ts +4 -1
  3. package/dist/frameworks/preact.d.ts.map +1 -1
  4. package/dist/frameworks/react.d.ts +13 -10
  5. package/dist/frameworks/react.d.ts.map +1 -1
  6. package/dist/frameworks/solidjs.d.ts +1 -0
  7. package/dist/frameworks/solidjs.d.ts.map +1 -1
  8. package/dist/frameworks/svelte.d.ts +1 -0
  9. package/dist/frameworks/svelte.d.ts.map +1 -1
  10. package/dist/frameworks/vue.d.ts +1 -0
  11. package/dist/frameworks/vue.d.ts.map +1 -1
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +1 -0
  15. package/dist/index.js.map +1 -1
  16. package/dist/mixins/sds-form-control-mixin.d.ts +5 -0
  17. package/dist/mixins/sds-form-control-mixin.d.ts.map +1 -1
  18. package/dist/mixins/sds-form-control-mixin.js +1 -1
  19. package/dist/mixins/sds-form-control-mixin.js.map +1 -1
  20. package/dist/react-wrappers/SDSDetailsGroupWrapper.d.ts +3 -0
  21. package/dist/react-wrappers/SDSDetailsGroupWrapper.d.ts.map +1 -0
  22. package/dist/react-wrappers/SDSDetailsGroupWrapper.js +9 -0
  23. package/dist/react-wrappers/SDSDetailsGroupWrapper.js.map +1 -0
  24. package/dist/react-wrappers/SDSDetailsWrapper.d.ts.map +1 -1
  25. package/dist/react-wrappers/SDSDetailsWrapper.js +1 -1
  26. package/dist/react-wrappers/SDSDetailsWrapper.js.map +1 -1
  27. package/dist/react-wrappers/index.d.ts +1 -0
  28. package/dist/react-wrappers/index.d.ts.map +1 -1
  29. package/dist/react-wrappers/index.js +1 -0
  30. package/dist/react-wrappers/index.js.map +1 -1
  31. package/dist/sds-alert/sds-alert.component.js +1 -1
  32. package/dist/sds-alert/sds-alert.component.js.map +1 -1
  33. package/dist/sds-button/sds-button.component.d.ts +1 -0
  34. package/dist/sds-button/sds-button.component.d.ts.map +1 -1
  35. package/dist/sds-button/sds-button.component.js +5 -0
  36. package/dist/sds-button/sds-button.component.js.map +1 -1
  37. package/dist/sds-button/sds-button.spec.js +1 -1
  38. package/dist/sds-button/sds-button.spec.js.map +1 -1
  39. package/dist/sds-card/sds-card.js +1 -1
  40. package/dist/sds-card/sds-card.js.map +1 -1
  41. package/dist/sds-card/sds-card.styles.d.ts.map +1 -1
  42. package/dist/sds-card/sds-card.styles.js +24 -21
  43. package/dist/sds-card/sds-card.styles.js.map +1 -1
  44. package/dist/sds-checkbox/sds-checkbox.d.ts +2 -2
  45. package/dist/sds-checkbox/sds-checkbox.d.ts.map +1 -1
  46. package/dist/sds-checkbox/sds-checkbox.js +6 -3
  47. package/dist/sds-checkbox/sds-checkbox.js.map +1 -1
  48. package/dist/sds-checkbox-group/sds-checkbox-group.d.ts.map +1 -1
  49. package/dist/sds-checkbox-group/sds-checkbox-group.js +5 -3
  50. package/dist/sds-checkbox-group/sds-checkbox-group.js.map +1 -1
  51. package/dist/sds-chip/sds-chip.d.ts +7 -5
  52. package/dist/sds-chip/sds-chip.d.ts.map +1 -1
  53. package/dist/sds-chip/sds-chip.js +29 -16
  54. package/dist/sds-chip/sds-chip.js.map +1 -1
  55. package/dist/sds-details/sds-details.d.ts +3 -2
  56. package/dist/sds-details/sds-details.d.ts.map +1 -1
  57. package/dist/sds-details/sds-details.js +11 -2
  58. package/dist/sds-details/sds-details.js.map +1 -1
  59. package/dist/sds-details/sds-details.styles.d.ts.map +1 -1
  60. package/dist/sds-details/sds-details.styles.js +10 -5
  61. package/dist/sds-details/sds-details.styles.js.map +1 -1
  62. package/dist/sds-details-group/sds-details-group.d.ts +24 -0
  63. package/dist/sds-details-group/sds-details-group.d.ts.map +1 -0
  64. package/dist/sds-details-group/sds-details-group.js +73 -0
  65. package/dist/sds-details-group/sds-details-group.js.map +1 -0
  66. package/dist/sds-details-group/sds-details-group.styles.d.ts +2 -0
  67. package/dist/sds-details-group/sds-details-group.styles.d.ts.map +1 -0
  68. package/dist/sds-details-group/sds-details-group.styles.js +30 -0
  69. package/dist/sds-details-group/sds-details-group.styles.js.map +1 -0
  70. package/dist/sds-dialog/sds-dialog.component.js +1 -1
  71. package/dist/sds-dialog/sds-dialog.component.js.map +1 -1
  72. package/dist/sds-heading/sds-heading.styles.d.ts.map +1 -1
  73. package/dist/sds-heading/sds-heading.styles.js +8 -2
  74. package/dist/sds-heading/sds-heading.styles.js.map +1 -1
  75. package/dist/sds-process-step/sds-process-step.styles.d.ts.map +1 -1
  76. package/dist/sds-process-step/sds-process-step.styles.js +6 -2
  77. package/dist/sds-process-step/sds-process-step.styles.js.map +1 -1
  78. package/dist/sds-radio/sds-radio.d.ts +2 -2
  79. package/dist/sds-radio/sds-radio.d.ts.map +1 -1
  80. package/dist/sds-radio/sds-radio.js +5 -2
  81. package/dist/sds-radio/sds-radio.js.map +1 -1
  82. package/dist/sds-radio-group/sds-radio-group.d.ts.map +1 -1
  83. package/dist/sds-radio-group/sds-radio-group.js +5 -3
  84. package/dist/sds-radio-group/sds-radio-group.js.map +1 -1
  85. package/dist/sds-select/sds-select.component.d.ts +2 -2
  86. package/dist/sds-select/sds-select.component.d.ts.map +1 -1
  87. package/dist/sds-select/sds-select.component.js +5 -3
  88. package/dist/sds-select/sds-select.component.js.map +1 -1
  89. package/dist/sds-switch/sds-switch.d.ts +2 -2
  90. package/dist/sds-switch/sds-switch.d.ts.map +1 -1
  91. package/dist/sds-switch/sds-switch.js.map +1 -1
  92. package/dist/sds-text/sds-text.styles.d.ts.map +1 -1
  93. package/dist/sds-text/sds-text.styles.js +193 -54
  94. package/dist/sds-text/sds-text.styles.js.map +1 -1
  95. package/dist/sds-textarea/sds-textarea.d.ts +2 -2
  96. package/dist/sds-textarea/sds-textarea.d.ts.map +1 -1
  97. package/dist/sds-textarea/sds-textarea.js +7 -3
  98. package/dist/sds-textarea/sds-textarea.js.map +1 -1
  99. package/dist/sds-textfield/sds-textfield.d.ts +2 -2
  100. package/dist/sds-textfield/sds-textfield.d.ts.map +1 -1
  101. package/dist/sds-textfield/sds-textfield.js +5 -2
  102. package/dist/sds-textfield/sds-textfield.js.map +1 -1
  103. package/dist/sheriff-web-components.js +412 -216
  104. package/package.json +6 -2
  105. package/web-types.json +203 -7
@@ -6,6 +6,9 @@ export const styles = css `
6
6
  --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-mobile-font-weight));
7
7
  --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-mobile-line-height));
8
8
  --_sds-text-color: var(--sds-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
9
+ --_sds-text-text-decoration: var(--sds-text-text-decoration, inherit);
10
+ --_sds-text-text-decoration-thickness: var(--sds-text-text-decoration-thickness, var(--sds-typography-link-text-decoration-thickness));
11
+ --_sds-text-text-underline-offset: var(--sds-text-text-underline-offset, var(--sds-typography-link-text-underline-offset));
9
12
 
10
13
  display: block;
11
14
  box-sizing: border-box;
@@ -17,6 +20,10 @@ export const styles = css `
17
20
  font-weight: var(--_sds-text-font-weight);
18
21
  line-height: var(--_sds-text-line-height);
19
22
  color: var(--_sds-text-color);
23
+ display: inherit;
24
+ text-decoration: var(--_sds-text-text-decoration);
25
+ text-decoration-thickness: var(--_sds-text-text-decoration-thickness);
26
+ text-underline-offset: var(--_sds-text-text-underline-offset);
20
27
  margin: 0;
21
28
  padding: 0;
22
29
  max-width: var(--sds-typography-max-line-width);
@@ -45,36 +52,60 @@ export const styles = css `
45
52
  --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-tall-mobile-line-height));
46
53
  }
47
54
 
55
+ :host([strong][tall]) {
56
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-strong-tall-mobile-font-size));
57
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-strong-tall-mobile-font-weight));
58
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-strong-tall-mobile-line-height));
59
+ }
60
+
48
61
  /* Extra small variants */
49
62
  :host([size='xs']) {
50
- --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-mobile-font-size));
51
- --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-mobile-font-weight));
52
- --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-mobile-line-height));
63
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-mobile-font-size));
64
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-mobile-font-weight));
65
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-mobile-line-height));
53
66
  }
54
67
 
55
68
  :host([size='xs'][strong]) {
56
- --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-strong-mobile-font-weight));
57
- --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-strong-mobile-font-size));
58
- --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-strong-mobile-line-height));
69
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-strong-mobile-font-weight));
70
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-strong-mobile-font-size));
71
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-strong-mobile-line-height));
72
+ }
73
+
74
+ :host([size='xs'][tall]) {
75
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-tall-mobile-font-size));
76
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-tall-mobile-font-weight));
77
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-tall-mobile-line-height));
78
+ }
79
+
80
+ :host([size='xs'][strong][tall]) {
81
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-strong-tall-mobile-font-size));
82
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-strong-tall-mobile-font-weight));
83
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-strong-tall-mobile-line-height));
59
84
  }
60
85
 
61
86
  /* Small variants */
62
87
  :host([size='sm']) {
63
- --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-mobile-font-size));
64
- --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-mobile-font-weight));
65
- --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-mobile-line-height));
88
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-mobile-font-size));
89
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-mobile-font-weight));
90
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-mobile-line-height));
66
91
  }
67
92
 
68
93
  :host([size='sm'][strong]) {
69
- --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-strong-mobile-font-size));
70
- --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-strong-mobile-font-weight));
71
- --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-strong-mobile-line-height));
94
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-strong-mobile-font-size));
95
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-strong-mobile-font-weight));
96
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-strong-mobile-line-height));
72
97
  }
73
98
 
74
99
  :host([size='sm'][tall]) {
75
- --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-tall-mobile-font-size));
76
- --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-tall-mobile-font-weight));
77
- --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-tall-mobile-line-height));
100
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-tall-mobile-font-size));
101
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-tall-mobile-font-weight));
102
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-tall-mobile-line-height));
103
+ }
104
+
105
+ :host([size='sm'][strong][tall]) {
106
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-strong-tall-mobile-font-size));
107
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-strong-tall-mobile-font-weight));
108
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-strong-tall-mobile-line-height));
78
109
  }
79
110
 
80
111
  /* Large variants */
@@ -104,9 +135,27 @@ export const styles = css `
104
135
 
105
136
  /* Extra large variant */
106
137
  :host([size='xl']) {
107
- --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xl-mobile-font-size));
108
- --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xl-mobile-font-weight));
109
- --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xl-mobile-line-height));
138
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-mobile-font-size));
139
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-mobile-font-weight));
140
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-mobile-line-height));
141
+ }
142
+
143
+ :host([size='xl'][strong]) {
144
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-strong-mobile-font-size));
145
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-strong-mobile-font-weight));
146
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-strong-mobile-line-height));
147
+ }
148
+
149
+ :host([size='xl'][tall]) {
150
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-tall-mobile-font-size));
151
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-tall-mobile-font-weight));
152
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-tall-mobile-line-height));
153
+ }
154
+
155
+ :host([size='xl'][strong][tall]) {
156
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-strong-tall-mobile-font-size));
157
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-strong-tall-mobile-font-weight));
158
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-strong-tall-mobile-line-height));
110
159
  }
111
160
 
112
161
  /* Tablet */
@@ -130,36 +179,60 @@ export const styles = css `
130
179
  --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-tall-tablet-line-height));
131
180
  }
132
181
 
182
+ :host([strong][tall]) {
183
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-strong-tall-tablet-font-size));
184
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-strong-tall-tablet-font-weight));
185
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-strong-tall-tablet-line-height));
186
+ }
187
+
133
188
  /* Extra small variants */
134
189
  :host([size='xs']) {
135
- --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-tablet-font-size));
136
- --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-tablet-font-weight));
137
- --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-tablet-line-height));
190
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-tablet-font-size));
191
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-tablet-font-weight));
192
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-tablet-line-height));
138
193
  }
139
194
 
140
195
  :host([size='xs'][strong]) {
141
- --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-strong-tablet-font-weight));
142
- --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-strong-tablet-font-size));
143
- --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-strong-tablet-line-height));
196
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-strong-tablet-font-weight));
197
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-strong-tablet-font-size));
198
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-strong-tablet-line-height));
199
+ }
200
+
201
+ :host([size='xs'][tall]) {
202
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-tall-tablet-font-size));
203
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-tall-tablet-font-weight));
204
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-tall-tablet-line-height));
205
+ }
206
+
207
+ :host([size='xs'][strong][tall]) {
208
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-strong-tall-tablet-font-size));
209
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-strong-tall-tablet-font-weight));
210
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-strong-tall-tablet-line-height));
144
211
  }
145
212
 
146
213
  /* Small variants */
147
214
  :host([size='sm']) {
148
- --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-tablet-font-size));
149
- --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-tablet-font-weight));
150
- --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-tablet-line-height));
215
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-tablet-font-size));
216
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-tablet-font-weight));
217
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-tablet-line-height));
151
218
  }
152
219
 
153
220
  :host([size='sm'][strong]) {
154
- --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-strong-tablet-font-size));
155
- --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-strong-tablet-font-weight));
156
- --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-strong-tablet-line-height));
221
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-strong-tablet-font-size));
222
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-strong-tablet-font-weight));
223
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-strong-tablet-line-height));
157
224
  }
158
225
 
159
226
  :host([size='sm'][tall]) {
160
- --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-tall-tablet-font-size));
161
- --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-tall-tablet-font-weight));
162
- --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-tall-tablet-line-height));
227
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-tall-tablet-font-size));
228
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-tall-tablet-font-weight));
229
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-tall-tablet-line-height));
230
+ }
231
+
232
+ :host([size='sm'][strong][tall]) {
233
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-strong-tall-tablet-font-size));
234
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-strong-tall-tablet-font-weight));
235
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-strong-tall-tablet-line-height));
163
236
  }
164
237
 
165
238
  /* Large variants */
@@ -189,15 +262,39 @@ export const styles = css `
189
262
 
190
263
  /* Extra large variant */
191
264
  :host([size='xl']) {
192
- --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xl-tablet-font-size));
193
- --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xl-tablet-font-weight));
194
- --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xl-tablet-line-height));
265
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-tablet-font-size));
266
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-tablet-font-weight));
267
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-tablet-line-height));
268
+ }
269
+
270
+ :host([size='xl'][strong]) {
271
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-strong-tablet-font-size));
272
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-strong-tablet-font-weight));
273
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-strong-tablet-line-height));
274
+ }
275
+
276
+ :host([size='xl'][tall]) {
277
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-tall-tablet-font-size));
278
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-tall-tablet-font-weight));
279
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-tall-tablet-line-height));
280
+ }
281
+
282
+ :host([size='xl'][strong][tall]) {
283
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-strong-tall-tablet-font-size));
284
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-strong-tall-tablet-font-weight));
285
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-strong-tall-tablet-line-height));
195
286
  }
196
287
  }
197
288
 
198
289
  /* Desktop */
199
290
  @media (min-width: 1024px) {
200
291
  /* Medium variants */
292
+ :host {
293
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-desktop-font-size));
294
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-desktop-font-weight));
295
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-desktop-line-height));
296
+ }
297
+
201
298
  :host([strong]) {
202
299
  --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-strong-desktop-font-size));
203
300
  --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-strong-desktop-font-weight));
@@ -210,36 +307,60 @@ export const styles = css `
210
307
  --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-tall-desktop-line-height));
211
308
  }
212
309
 
310
+ :host([strong][tall]) {
311
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-strong-tall-desktop-font-size));
312
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-strong-tall-desktop-font-weight));
313
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-strong-tall-desktop-line-height));
314
+ }
315
+
213
316
  /* Extra small variants */
214
317
  :host([size='xs']) {
215
- --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-desktop-font-size));
216
- --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-desktop-font-weight));
217
- --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-desktop-line-height));
318
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-desktop-font-size));
319
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-desktop-font-weight));
320
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-desktop-line-height));
218
321
  }
219
322
 
220
323
  :host([size='xs'][strong]) {
221
- --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-strong-desktop-font-weight));
222
- --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-strong-desktop-font-size));
223
- --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-strong-desktop-line-height));
324
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-strong-desktop-font-weight));
325
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-strong-desktop-font-size));
326
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-strong-desktop-line-height));
327
+ }
328
+
329
+ :host([size='xs'][tall]) {
330
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-tall-desktop-font-size));
331
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-tall-desktop-font-weight));
332
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-tall-desktop-line-height));
333
+ }
334
+
335
+ :host([size='xs'][strong][tall]) {
336
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-strong-tall-desktop-font-size));
337
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-strong-tall-desktop-font-weight));
338
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-strong-tall-desktop-line-height));
224
339
  }
225
340
 
226
341
  /* Small variants */
227
342
  :host([size='sm']) {
228
- --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-desktop-font-size));
229
- --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-desktop-font-weight));
230
- --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-desktop-line-height));
343
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-desktop-font-size));
344
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-desktop-font-weight));
345
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-desktop-line-height));
231
346
  }
232
347
 
233
348
  :host([size='sm'][strong]) {
234
- --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-strong-desktop-font-size));
235
- --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-strong-desktop-font-weight));
236
- --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-strong-desktop-line-height));
349
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-strong-desktop-font-size));
350
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-strong-desktop-font-weight));
351
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-strong-desktop-line-height));
237
352
  }
238
353
 
239
354
  :host([size='sm'][tall]) {
240
- --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-tall-desktop-font-size));
241
- --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-tall-desktop-font-weight));
242
- --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-tall-desktop-line-height));
355
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-tall-desktop-font-size));
356
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-tall-desktop-font-weight));
357
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-tall-desktop-line-height));
358
+ }
359
+
360
+ :host([size='sm'][strong][tall]) {
361
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-strong-tall-desktop-font-size));
362
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-strong-tall-desktop-font-weight));
363
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-strong-tall-desktop-line-height));
243
364
  }
244
365
 
245
366
  /* Large variants */
@@ -269,9 +390,27 @@ export const styles = css `
269
390
 
270
391
  /* Extra large variant */
271
392
  :host([size='xl']) {
272
- --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xl-desktop-font-size));
273
- --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xl-desktop-font-weight));
274
- --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xl-desktop-line-height));
393
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-desktop-font-size));
394
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-desktop-font-weight));
395
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-desktop-line-height));
396
+ }
397
+
398
+ :host([size='xl'][strong]) {
399
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-strong-desktop-font-size));
400
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-strong-desktop-font-weight));
401
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-strong-desktop-line-height));
402
+ }
403
+
404
+ :host([size='xl'][tall]) {
405
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-tall-desktop-font-size));
406
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-tall-desktop-font-weight));
407
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-tall-desktop-line-height));
408
+ }
409
+
410
+ :host([size='xl'][strong][tall]) {
411
+ --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-strong-tall-desktop-font-size));
412
+ --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-strong-tall-desktop-font-weight));
413
+ --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-strong-tall-desktop-line-height));
275
414
  }
276
415
  }
277
416
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"sds-text.styles.js","sourceRoot":"","sources":["../../src/sds-text/sds-text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmRxB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`\n\t:host {\n\t\t--_sds-text-font-family: var(--sds-text-font-family, var(--sds-typography-font-family-roboto));\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-mobile-line-height));\n\t\t--_sds-text-color: var(--sds-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));\n\n\t\tdisplay: block;\n\t\tbox-sizing: border-box;\n\t}\n\n\tp {\n\t\tfont-family: var(--_sds-text-font-family);\n\t\tfont-size: var(--_sds-text-font-size);\n\t\tfont-weight: var(--_sds-text-font-weight);\n\t\tline-height: var(--_sds-text-line-height);\n\t\tcolor: var(--_sds-text-color);\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tmax-width: var(--sds-typography-max-line-width);\n\t}\n\n\t:host([data-palette]) {\n\t\t--_sds-text-color: var(--sds-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));\n\t}\n\n\t/* Mobile */\n\t:host {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-mobile-line-height));\n\t}\n\n\t:host([strong]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-strong-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-strong-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-strong-mobile-line-height));\n\t}\n\n\t:host([tall]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-tall-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-tall-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-tall-mobile-line-height));\n\t}\n\n\t/* Extra small variants */\n\t:host([size='xs']) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-mobile-line-height));\n\t}\n\n\t:host([size='xs'][strong]) {\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-strong-mobile-font-weight));\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-strong-mobile-font-size));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-strong-mobile-line-height));\n\t}\n\n\t/* Small variants */\n\t:host([size='sm']) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-mobile-line-height));\n\t}\n\n\t:host([size='sm'][strong]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-strong-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-strong-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-strong-mobile-line-height));\n\t}\n\n\t:host([size='sm'][tall]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-tall-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-tall-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-tall-mobile-line-height));\n\t}\n\n\t/* Large variants */\n\t:host([size='lg']) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-mobile-line-height));\n\t}\n\n\t:host([size='lg'][strong]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-mobile-line-height));\n\t}\n\n\t:host([size='lg'][tall]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-tall-mobile-font-size));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-tall-mobile-line-height));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-tall-mobile-font-weight));\n\t}\n\n\t:host([size='lg'][strong][tall]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-tall-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-tall-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-tall-mobile-line-height));\n\t}\n\n\t/* Extra large variant */\n\t:host([size='xl']) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xl-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xl-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xl-mobile-line-height));\n\t}\n\n\t/* Tablet */\n\t@media (min-width: 640px) {\n\t\t/* Medium variants */\n\t\t:host {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-tablet-line-height));\n\t\t}\n\n\t\t:host([strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-strong-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-strong-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-strong-tablet-line-height));\n\t\t}\n\n\t\t:host([tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-tall-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-tall-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-tall-tablet-line-height));\n\t\t}\n\n\t\t/* Extra small variants */\n\t\t:host([size='xs']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-tablet-line-height));\n\t\t}\n\n\t\t:host([size='xs'][strong]) {\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-strong-tablet-font-weight));\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-strong-tablet-font-size));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-strong-tablet-line-height));\n\t\t}\n\n\t\t/* Small variants */\n\t\t:host([size='sm']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-tablet-line-height));\n\t\t}\n\n\t\t:host([size='sm'][strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-strong-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-strong-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-strong-tablet-line-height));\n\t\t}\n\n\t\t:host([size='sm'][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-tall-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-tall-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-tall-tablet-line-height));\n\t\t}\n\n\t\t/* Large variants */\n\t\t:host([size='lg']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-tablet-line-height));\n\t\t}\n\n\t\t:host([size='lg'][strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-tablet-line-height));\n\t\t}\n\n\t\t:host([size='lg'][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-tall-tablet-font-size));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-tall-tablet-line-height));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-tall-tablet-font-weight));\n\t\t}\n\n\t\t:host([size='lg'][strong][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-tall-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-tall-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-tall-tablet-line-height));\n\t\t}\n\n\t\t/* Extra large variant */\n\t\t:host([size='xl']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xl-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xl-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xl-tablet-line-height));\n\t\t}\n\t}\n\n\t/* Desktop */\n\t@media (min-width: 1024px) {\n\t\t/* Medium variants */\n\t\t:host([strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-strong-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-strong-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-strong-desktop-line-height));\n\t\t}\n\n\t\t:host([tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-tall-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-tall-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-tall-desktop-line-height));\n\t\t}\n\n\t\t/* Extra small variants */\n\t\t:host([size='xs']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-desktop-line-height));\n\t\t}\n\n\t\t:host([size='xs'][strong]) {\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-strong-desktop-font-weight));\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-strong-desktop-font-size));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-strong-desktop-line-height));\n\t\t}\n\n\t\t/* Small variants */\n\t\t:host([size='sm']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-desktop-line-height));\n\t\t}\n\n\t\t:host([size='sm'][strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-strong-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-strong-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-strong-desktop-line-height));\n\t\t}\n\n\t\t:host([size='sm'][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-tall-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-tall-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-tall-desktop-line-height));\n\t\t}\n\n\t\t/* Large variants */\n\t\t:host([size='lg']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-desktop-line-height));\n\t\t}\n\n\t\t:host([size='lg'][strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-desktop-line-height));\n\t\t}\n\n\t\t:host([size='lg'][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-tall-desktop-font-size));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-tall-desktop-line-height));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-tall-desktop-font-weight));\n\t\t}\n\n\t\t:host([size='lg'][strong][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-tall-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-tall-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-tall-desktop-line-height));\n\t\t}\n\n\t\t/* Extra large variant */\n\t\t:host([size='xl']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xl-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xl-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xl-desktop-line-height));\n\t\t}\n\t}\n`;\n"]}
1
+ {"version":3,"file":"sds-text.styles.js","sourceRoot":"","sources":["../../src/sds-text/sds-text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8ZxB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`\n\t:host {\n\t\t--_sds-text-font-family: var(--sds-text-font-family, var(--sds-typography-font-family-roboto));\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-mobile-line-height));\n\t\t--_sds-text-color: var(--sds-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));\n\t\t--_sds-text-text-decoration: var(--sds-text-text-decoration, inherit);\n\t\t--_sds-text-text-decoration-thickness: var(--sds-text-text-decoration-thickness, var(--sds-typography-link-text-decoration-thickness));\n\t\t--_sds-text-text-underline-offset: var(--sds-text-text-underline-offset, var(--sds-typography-link-text-underline-offset));\n\n\t\tdisplay: block;\n\t\tbox-sizing: border-box;\n\t}\n\n\tp {\n\t\tfont-family: var(--_sds-text-font-family);\n\t\tfont-size: var(--_sds-text-font-size);\n\t\tfont-weight: var(--_sds-text-font-weight);\n\t\tline-height: var(--_sds-text-line-height);\n\t\tcolor: var(--_sds-text-color);\n\t\tdisplay: inherit;\n\t\ttext-decoration: var(--_sds-text-text-decoration);\n\t\ttext-decoration-thickness: var(--_sds-text-text-decoration-thickness);\n\t\ttext-underline-offset: var(--_sds-text-text-underline-offset);\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tmax-width: var(--sds-typography-max-line-width);\n\t}\n\n\t:host([data-palette]) {\n\t\t--_sds-text-color: var(--sds-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));\n\t}\n\n\t/* Mobile */\n\t:host {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-mobile-line-height));\n\t}\n\n\t:host([strong]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-strong-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-strong-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-strong-mobile-line-height));\n\t}\n\n\t:host([tall]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-tall-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-tall-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-tall-mobile-line-height));\n\t}\n\n\t:host([strong][tall]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-strong-tall-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-strong-tall-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-strong-tall-mobile-line-height));\n\t}\n\n\t/* Extra small variants */\n\t:host([size='xs']) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-mobile-line-height));\n\t}\n\n\t:host([size='xs'][strong]) {\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-strong-mobile-font-weight));\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-strong-mobile-font-size));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-strong-mobile-line-height));\n\t}\n\n\t:host([size='xs'][tall]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-tall-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-tall-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-tall-mobile-line-height));\n\t}\n\n\t:host([size='xs'][strong][tall]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-strong-tall-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-strong-tall-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-strong-tall-mobile-line-height));\n\t}\n\n\t/* Small variants */\n\t:host([size='sm']) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-mobile-line-height));\n\t}\n\n\t:host([size='sm'][strong]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-strong-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-strong-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-strong-mobile-line-height));\n\t}\n\n\t:host([size='sm'][tall]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-tall-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-tall-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-tall-mobile-line-height));\n\t}\n\n\t:host([size='sm'][strong][tall]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-strong-tall-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-strong-tall-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-strong-tall-mobile-line-height));\n\t}\n\n\t/* Large variants */\n\t:host([size='lg']) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-mobile-line-height));\n\t}\n\n\t:host([size='lg'][strong]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-mobile-line-height));\n\t}\n\n\t:host([size='lg'][tall]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-tall-mobile-font-size));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-tall-mobile-line-height));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-tall-mobile-font-weight));\n\t}\n\n\t:host([size='lg'][strong][tall]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-tall-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-tall-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-tall-mobile-line-height));\n\t}\n\n\t/* Extra large variant */\n\t:host([size='xl']) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-mobile-line-height));\n\t}\n\n\t:host([size='xl'][strong]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-strong-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-strong-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-strong-mobile-line-height));\n\t}\n\n\t:host([size='xl'][tall]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-tall-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-tall-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-tall-mobile-line-height));\n\t}\n\n\t:host([size='xl'][strong][tall]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-strong-tall-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-strong-tall-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-strong-tall-mobile-line-height));\n\t}\n\n\t/* Tablet */\n\t@media (min-width: 640px) {\n\t\t/* Medium variants */\n\t\t:host {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-tablet-line-height));\n\t\t}\n\n\t\t:host([strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-strong-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-strong-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-strong-tablet-line-height));\n\t\t}\n\n\t\t:host([tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-tall-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-tall-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-tall-tablet-line-height));\n\t\t}\n\n\t\t:host([strong][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-strong-tall-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-strong-tall-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-strong-tall-tablet-line-height));\n\t\t}\n\n\t\t/* Extra small variants */\n\t\t:host([size='xs']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-tablet-line-height));\n\t\t}\n\n\t\t:host([size='xs'][strong]) {\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-strong-tablet-font-weight));\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-strong-tablet-font-size));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-strong-tablet-line-height));\n\t\t}\n\n\t\t:host([size='xs'][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-tall-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-tall-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-tall-tablet-line-height));\n\t\t}\n\n\t\t:host([size='xs'][strong][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-strong-tall-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-strong-tall-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-strong-tall-tablet-line-height));\n\t\t}\n\n\t\t/* Small variants */\n\t\t:host([size='sm']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-tablet-line-height));\n\t\t}\n\n\t\t:host([size='sm'][strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-strong-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-strong-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-strong-tablet-line-height));\n\t\t}\n\n\t\t:host([size='sm'][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-tall-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-tall-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-tall-tablet-line-height));\n\t\t}\n\n\t\t:host([size='sm'][strong][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-strong-tall-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-strong-tall-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-strong-tall-tablet-line-height));\n\t\t}\n\n\t\t/* Large variants */\n\t\t:host([size='lg']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-tablet-line-height));\n\t\t}\n\n\t\t:host([size='lg'][strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-tablet-line-height));\n\t\t}\n\n\t\t:host([size='lg'][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-tall-tablet-font-size));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-tall-tablet-line-height));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-tall-tablet-font-weight));\n\t\t}\n\n\t\t:host([size='lg'][strong][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-tall-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-tall-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-tall-tablet-line-height));\n\t\t}\n\n\t\t/* Extra large variant */\n\t\t:host([size='xl']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-tablet-line-height));\n\t\t}\n\n\t\t:host([size='xl'][strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-strong-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-strong-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-strong-tablet-line-height));\n\t\t}\n\n\t\t:host([size='xl'][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-tall-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-tall-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-tall-tablet-line-height));\n\t\t}\n\n\t\t:host([size='xl'][strong][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-strong-tall-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-strong-tall-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-strong-tall-tablet-line-height));\n\t\t}\n\t}\n\n\t/* Desktop */\n\t@media (min-width: 1024px) {\n\t\t/* Medium variants */\n\t\t:host {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-desktop-line-height));\n\t\t}\n\n\t\t:host([strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-strong-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-strong-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-strong-desktop-line-height));\n\t\t}\n\n\t\t:host([tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-tall-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-tall-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-tall-desktop-line-height));\n\t\t}\n\n\t\t:host([strong][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-strong-tall-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-strong-tall-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-strong-tall-desktop-line-height));\n\t\t}\n\n\t\t/* Extra small variants */\n\t\t:host([size='xs']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-desktop-line-height));\n\t\t}\n\n\t\t:host([size='xs'][strong]) {\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-strong-desktop-font-weight));\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-strong-desktop-font-size));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-strong-desktop-line-height));\n\t\t}\n\n\t\t:host([size='xs'][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-tall-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-tall-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-tall-desktop-line-height));\n\t\t}\n\n\t\t:host([size='xs'][strong][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-xs-strong-tall-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-xs-strong-tall-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-xs-strong-tall-desktop-line-height));\n\t\t}\n\n\t\t/* Small variants */\n\t\t:host([size='sm']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-desktop-line-height));\n\t\t}\n\n\t\t:host([size='sm'][strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-strong-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-strong-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-strong-desktop-line-height));\n\t\t}\n\n\t\t:host([size='sm'][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-tall-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-tall-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-tall-desktop-line-height));\n\t\t}\n\n\t\t:host([size='sm'][strong][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-detail-sm-strong-tall-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-detail-sm-strong-tall-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-detail-sm-strong-tall-desktop-line-height));\n\t\t}\n\n\t\t/* Large variants */\n\t\t:host([size='lg']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-desktop-line-height));\n\t\t}\n\n\t\t:host([size='lg'][strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-desktop-line-height));\n\t\t}\n\n\t\t:host([size='lg'][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-tall-desktop-font-size));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-tall-desktop-line-height));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-tall-desktop-font-weight));\n\t\t}\n\n\t\t:host([size='lg'][strong][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-tall-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-tall-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-tall-desktop-line-height));\n\t\t}\n\n\t\t/* Extra large variant */\n\t\t:host([size='xl']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-desktop-line-height));\n\t\t}\n\n\t\t:host([size='xl'][strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-strong-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-strong-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-strong-desktop-line-height));\n\t\t}\n\n\t\t:host([size='xl'][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-tall-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-tall-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-tall-desktop-line-height));\n\t\t}\n\n\t\t:host([size='xl'][strong][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-leadtext-xl-strong-tall-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-leadtext-xl-strong-tall-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-leadtext-xl-strong-tall-desktop-line-height));\n\t\t}\n\t}\n`;\n"]}
@@ -1,10 +1,10 @@
1
1
  import { LitElement } from 'lit';
2
- import type { SDSFormControlProps } from '../mixins/sds-form-control-mixin';
2
+ import type { SDSFormControlAttributes } from '../mixins/sds-form-control-mixin';
3
3
  import '../sds-alert/sds-alert';
4
4
  import '../sds-icon/sds-icon';
5
5
  import { SDS_SIZES } from '../types';
6
6
  type InputSize = Extract<SDS_SIZES, 'lg' | 'md' | 'sm'>;
7
- export interface SDSTextAreaProps extends SDSFormControlProps {
7
+ export interface SDSTextAreaProps extends SDSFormControlAttributes {
8
8
  autocomplete?: HTMLTextAreaElement['autocomplete'];
9
9
  cols?: number;
10
10
  counter?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"sds-textarea.d.ts","sourceRoot":"","sources":["../../src/sds-textarea/sds-textarea.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,KAAK,CAAC;AAOhD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAE5E,OAAO,w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AAI,IAAI,MAAM;IAId,IAAI,cAAc,IAAI,MAAM,GAAG,IAAI,CAElC;IAED,IAAI,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAItC;IAED,IAAI,YAAY,IAAI,MAAM,GAAG,IAAI,CAEhC;IACD,IAAI,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAIpC;IAED,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,MAAM,GAAG,IAAI;IAMhG,aAAa,IAAI,OAAO;IAIxB,cAAc,IAAI,OAAO;IAIzB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAK/B,MAAM;CA8Cf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,cAAc,EAAE,WAAW,CAAC;KAC5B;CACD"}
@@ -131,16 +131,18 @@ let SDSTextArea = class SDSTextArea extends SDSDelegateInteractionMixin(SDSEvent
131
131
  this.updateValidity();
132
132
  }
133
133
  render() {
134
+ const isInvalid = Boolean(this.errorMessage || this.hasTypedTooManyCharacters());
134
135
  const textareaClasses = {
135
136
  'sds-textarea': true,
136
- 'sds-textarea--error': Boolean(this.errorMessage || this.hasTypedTooManyCharacters()),
137
+ 'sds-textarea--error': isInvalid,
137
138
  };
139
+ const describedBy = [this.errorMessage ? 'error-message' : null, this.helpText ? 'help-text' : null].filter(Boolean).join(' ') || undefined;
138
140
  return html `
139
141
  <div class="${classMap(textareaClasses)}">
140
142
  ${this.label || this.helpText
141
143
  ? html `<div>
142
144
  ${this.label ? html `<label for="sds-textarea" class="sds-textarea__label">${this.label}</label>` : nothing}
143
- ${this.helpText ? html `<p class="sds-textarea__help-text">${this.helpText}</p>` : nothing}
145
+ ${this.helpText ? html `<p id="help-text" class="sds-textarea__help-text">${this.helpText}</p>` : nothing}
144
146
  </div>`
145
147
  : nothing}
146
148
  <div class="sds-textarea__input-container">
@@ -159,6 +161,8 @@ let SDSTextArea = class SDSTextArea extends SDSDelegateInteractionMixin(SDSEvent
159
161
  wrap="${ifDefined(this.wrap)}"
160
162
  minlength="${ifDefined(this.minlength)}"
161
163
  maxlength="${ifDefined(this.maxlength)}"
164
+ aria-describedby="${ifDefined(describedBy)}"
165
+ aria-invalid="${isInvalid ? 'true' : 'false'}"
162
166
  @input="${this._handleInputChange}"
163
167
  @change="${this._handleInputChange}"
164
168
  @select="${this._handleSelect}"
@@ -166,7 +170,7 @@ let SDSTextArea = class SDSTextArea extends SDSDelegateInteractionMixin(SDSEvent
166
170
  @blur="${this._handleBlur}"
167
171
  ></textarea>
168
172
  </div>
169
- ${this.errorMessage ? html `<sds-alert variant="secondary" data-palette="danger"><p slot="message">${this.errorMessage}</p></sds-alert>` : nothing} ${this.renderCharacterCounter()}
173
+ ${this.errorMessage ? html `<sds-alert id="error-message" variant="secondary" data-palette="danger"><p slot="message">${this.errorMessage}</p></sds-alert>` : nothing} ${this.renderCharacterCounter()}
170
174
  </div>
171
175
  `;
172
176
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sds-textarea.js","sourceRoot":"","sources":["../../src/sds-textarea/sds-textarea.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGtG,OAAO,wBAAwB,CAAC;AAChC,OAAO,s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CAA0C;AACrC;IAAtE,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAAkD;AAC7E;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAAiD;AAC/C;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CAAgD;AAChD;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAiC;AAChC;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAiC;AAChC;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAiC;AAChC;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAA2C;AAC1C;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAA2C;AAC1C;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAAuC;AACtC;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAuC;AAEzD;IAAvB,KAAK,CAAC,eAAe,CAAC;4CAA+B;AAnB1C,WAAW;IADvB,oBAAoB,CAAC,cAAc,CAAC;GACxB,WAAW,CAoMvB","sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { guardedCustomElement } from '../utils/guarded-custom-element';\nimport { styles } from './sds-textarea.styles';\nimport { SDSDelegateInteractionMixin, SDSEventDispatcherMixin, SDSFormControlMixin } from '../mixins';\nimport type { SDSFormControlProps } from '../mixins/sds-form-control-mixin';\n\nimport '../sds-alert/sds-alert';\nimport '../sds-icon/sds-icon';\nimport { SDS_SIZES } from '../types';\n\ntype InputSize = Extract<SDS_SIZES, 'lg' | 'md' | 'sm'>;\n\nexport interface SDSTextAreaProps extends SDSFormControlProps {\n\tautocomplete?: HTMLTextAreaElement['autocomplete'];\n\tcols?: number;\n\tcounter?: number;\n\t'error-message'?: string;\n\t'help-text'?: string;\n\tlabel?: string;\n\tmaxlength?: number;\n\tminlength?: number;\n\tplaceholder?: string;\n\trequired?: boolean;\n\trows?: number;\n\tsize?: InputSize;\n\tvalue?: string;\n\twrap?: 'hard' | 'soft';\n}\n\n@guardedCustomElement('sds-textarea')\nexport class SDSTextArea extends SDSDelegateInteractionMixin(SDSEventDispatcherMixin(SDSFormControlMixin(LitElement))) {\n\t// Styling\n\tstatic override styles = [styles];\n\n\t@property({ type: String }) value?: string;\n\t@property({ type: String, reflect: true }) label?: SDSTextAreaProps['label'];\n\t@property({ type: String, reflect: true }) placeholder?: SDSTextAreaProps['placeholder'];\n\t@property({ type: String, attribute: 'help-text', reflect: true }) helpText?: SDSTextAreaProps['help-text'];\n\t@property({ type: String, attribute: 'error-message', reflect: true }) errorMessage?: SDSTextAreaProps['error-message'];\n\t@property({ type: String, reflect: true }) autocomplete?: SDSTextAreaProps['autocomplete'];\n\t@property({ type: Boolean, reflect: true }) required: SDSTextAreaProps['required'] = false;\n\t@property({ type: Number, reflect: true }) rows?: SDSTextAreaProps['rows'];\n\t@property({ type: Number, reflect: true }) cols?: SDSTextAreaProps['cols'];\n\t@property({ type: String, reflect: true }) wrap?: SDSTextAreaProps['wrap'];\n\t@property({ type: Number, reflect: true }) minlength?: SDSTextAreaProps['minlength'];\n\t@property({ type: Number, reflect: true }) maxlength?: SDSTextAreaProps['maxlength'];\n\t@property({ type: Number, reflect: true }) counter?: SDSTextAreaProps['counter'];\n\t@property({ type: String, reflect: true }) size: SDSTextAreaProps['size'] = 'md';\n\n\t@query('#sds-textarea') control!: HTMLTextAreaElement;\n\n\tprivate _defaultValue: string | null = null;\n\n\toverride connectedCallback() {\n\t\tsuper.connectedCallback();\n\t\tthis._defaultValue = this.value ?? null;\n\t\tthis.internals.setFormValue(this._defaultValue);\n\t}\n\n\toverride updated(changedProperties: Map<string | number | symbol, unknown>) {\n\t\tsuper.updated(changedProperties);\n\n\t\tif (changedProperties.has('value')) {\n\t\t\tthis.internals.setFormValue(this.value ?? '');\n\n\t\t\tif (this.control) {\n\t\t\t\tthis.control.value = this.value ?? '';\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate updateValidity() {\n\t\tif (this.control.checkValidity()) {\n\t\t\tthis.internals.setValidity({});\n\t\t} else {\n\t\t\tthis.internals.setValidity({ customError: true }, this.control.validationMessage, this.control);\n\t\t}\n\t}\n\n\tprivate hasTypedTooManyCharacters() {\n\t\tif (!this.counter) {\n\t\t\treturn false;\n\t\t}\n\t\tconst currentLength = this.value?.length || 0;\n\t\treturn currentLength > this.counter;\n\t}\n\n\tprivate renderCharacterCounter() {\n\t\tif (this.counter === undefined) return nothing;\n\n\t\tconst currentLength = this.value?.length || 0;\n\t\tif (this.hasTypedTooManyCharacters()) {\n\t\t\treturn html`<sds-alert variant=\"secondary\" data-palette=\"danger\"\n\t\t\t\t><p class=\"sds-textarea__character-counter\" slot=\"message\">Du har ${currentLength - this.counter} tegn for mye</p></sds-alert\n\t\t\t>`;\n\t\t}\n\n\t\treturn html`<p class=\"sds-textarea__character-counter\">Du har ${this.counter - currentLength} tegn igjen</p>`;\n\t}\n\n\tprivate readonly _handleInputChange = (event: InputEvent) => {\n\t\tevent.stopImmediatePropagation();\n\t\tif (this.disabled || !(event.target instanceof HTMLTextAreaElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.value = event.target.value;\n\t\tthis.internals.setFormValue(this.value === '' ? null : this.value);\n\t\tthis.updateValidity();\n\t\tthis.dispatchSheriffEvent(event.type);\n\t};\n\n\tprivate readonly _handleSelect = (event: Event) => {\n\t\tevent.stopImmediatePropagation();\n\t\tif (!this.disabled) {\n\t\t\tthis.dispatchSheriffEvent('select');\n\t\t}\n\t};\n\n\tprivate readonly _handleFocus = (event: FocusEvent) => {\n\t\tevent.stopImmediatePropagation();\n\t\tthis.dispatchSheriffEvent('focus');\n\t};\n\n\tprivate readonly _handleBlur = (event: FocusEvent) => {\n\t\tevent.stopImmediatePropagation();\n\t\tthis.updateValidity();\n\t\tthis.dispatchSheriffEvent('blur');\n\t};\n\n\tformResetCallback() {\n\t\tthis.internals.setFormValue(this._defaultValue);\n\n\t\tconst newValue = this._defaultValue ?? '';\n\t\tthis.control.value = newValue;\n\t\tthis.value = newValue;\n\t\tthis.updateValidity();\n\t}\n\n\tselect(): void {\n\t\tif (!this.disabled) this.control.select();\n\t}\n\n\ttype(): string {\n\t\treturn 'textarea';\n\t}\n\n\tget selectionStart(): number | null {\n\t\treturn this.control ? this.control.selectionStart : null;\n\t}\n\n\tset selectionStart(value: number | null) {\n\t\tif (this.control && value !== null) {\n\t\t\tthis.control.selectionStart = value;\n\t\t}\n\t}\n\n\tget selectionEnd(): number | null {\n\t\treturn this.control ? this.control.selectionEnd : null;\n\t}\n\tset selectionEnd(value: number | null) {\n\t\tif (this.control && value !== null) {\n\t\t\tthis.control.selectionEnd = value;\n\t\t}\n\t}\n\n\tsetSelectionRange(start: number, end: number, direction?: 'forward' | 'backward' | 'none'): void {\n\t\tif (this.control) {\n\t\t\tthis.control.setSelectionRange(start, end, direction);\n\t\t}\n\t}\n\n\tcheckValidity(): boolean {\n\t\treturn this.control.checkValidity();\n\t}\n\n\treportValidity(): boolean {\n\t\treturn this.control.reportValidity();\n\t}\n\n\tsetCustomValidity(message: string): void {\n\t\tthis.control.setCustomValidity(message);\n\t\tthis.updateValidity();\n\t}\n\n\toverride render() {\n\t\tconst textareaClasses = {\n\t\t\t'sds-textarea': true,\n\t\t\t'sds-textarea--error': Boolean(this.errorMessage || this.hasTypedTooManyCharacters()),\n\t\t};\n\n\t\treturn html`\n\t\t\t<div class=\"${classMap(textareaClasses)}\">\n\t\t\t\t${this.label || this.helpText\n\t\t\t\t\t? html`<div>\n\t\t\t\t\t\t\t${this.label ? html`<label for=\"sds-textarea\" class=\"sds-textarea__label\">${this.label}</label>` : nothing}\n\t\t\t\t\t\t\t${this.helpText ? html`<p class=\"sds-textarea__help-text\">${this.helpText}</p>` : nothing}\n\t\t\t\t\t\t</div>`\n\t\t\t\t\t: nothing}\n\t\t\t\t<div class=\"sds-textarea__input-container\">\n\t\t\t\t\t<textarea\n\t\t\t\t\t\tclass=\"sds-textarea__input\"\n\t\t\t\t\t\tid=\"sds-textarea\"\n\t\t\t\t\t\t?disabled=\"${this.disabled}\"\n\t\t\t\t\t\t?readonly=\"${this.readOnly}\"\n\t\t\t\t\t\tplaceholder=\"${ifDefined(this.placeholder)}\"\n\t\t\t\t\t\t.value=\"${this.value ?? ''}\"\n\t\t\t\t\t\t.autocomplete=\"${this.autocomplete}\"\n\t\t\t\t\t\tname=\"${ifDefined(this.name)}\"\n\t\t\t\t\t\t?required=\"${this.required}\"\n\t\t\t\t\t\trows=\"${ifDefined(this.rows)}\"\n\t\t\t\t\t\tcols=\"${ifDefined(this.cols)}\"\n\t\t\t\t\t\twrap=\"${ifDefined(this.wrap)}\"\n\t\t\t\t\t\tminlength=\"${ifDefined(this.minlength)}\"\n\t\t\t\t\t\tmaxlength=\"${ifDefined(this.maxlength)}\"\n\t\t\t\t\t\t@input=\"${this._handleInputChange}\"\n\t\t\t\t\t\t@change=\"${this._handleInputChange}\"\n\t\t\t\t\t\t@select=\"${this._handleSelect}\"\n\t\t\t\t\t\t@focus=\"${this._handleFocus}\"\n\t\t\t\t\t\t@blur=\"${this._handleBlur}\"\n\t\t\t\t\t></textarea>\n\t\t\t\t</div>\n\t\t\t\t${this.errorMessage ? html`<sds-alert variant=\"secondary\" data-palette=\"danger\"><p slot=\"message\">${this.errorMessage}</p></sds-alert>` : nothing} ${this.renderCharacterCounter()}\n\t\t\t</div>\n\t\t`;\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-textarea': SDSTextArea;\n\t}\n}\n"]}
1
+ {"version":3,"file":"sds-textarea.js","sourceRoot":"","sources":["../../src/sds-textarea/sds-textarea.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGtG,OAAO,wBAAwB,CAAC;AAChC,OAAO,sBAAsB,CAAC;AAuBvB,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,2BAA2B,CAAC,uBAAuB,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC,CAAC;IAA/G;;QAUsC,aAAQ,GAAiC,KAAK,CAAC;QAOhD,SAAI,GAA6B,IAAI,CAAC;QAIzE,kBAAa,GAAkB,IAAI,CAAC;QAiD3B,uBAAkB,GAAG,CAAC,KAAiB,EAAE,EAAE;YAC3D,KAAK,CAAC,wBAAwB,EAAE,CAAC;YACjC,IAAI,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,YAAY,mBAAmB,CAAC,EAAE,CAAC;gBACrE,OAAO;YACR,CAAC;YAED,IAA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AE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAAkD;AAC7E;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAAiD;AAC/C;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CAAgD;AAChD;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAiC;AAChC;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAiC;AAChC;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAiC;AAChC;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAA2C;AAC1C;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAA2C;AAC1C;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAAuC;AACtC;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAuC;AAEzD;IAAvB,KAAK,CAAC,eAAe,CAAC;4CAA+B;AAnB1C,WAAW;IADvB,oBAAoB,CAAC,cAAc,CAAC;GACxB,WAAW,CAyMvB","sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { guardedCustomElement } from '../utils/guarded-custom-element';\nimport { styles } from './sds-textarea.styles';\nimport { SDSDelegateInteractionMixin, SDSEventDispatcherMixin, SDSFormControlMixin } from '../mixins';\nimport type { SDSFormControlAttributes } from '../mixins/sds-form-control-mixin';\n\nimport '../sds-alert/sds-alert';\nimport '../sds-icon/sds-icon';\nimport { SDS_SIZES } from '../types';\n\ntype InputSize = Extract<SDS_SIZES, 'lg' | 'md' | 'sm'>;\n\nexport interface SDSTextAreaProps extends SDSFormControlAttributes {\n\tautocomplete?: HTMLTextAreaElement['autocomplete'];\n\tcols?: number;\n\tcounter?: number;\n\t'error-message'?: string;\n\t'help-text'?: string;\n\tlabel?: string;\n\tmaxlength?: number;\n\tminlength?: number;\n\tplaceholder?: string;\n\trequired?: boolean;\n\trows?: number;\n\tsize?: InputSize;\n\tvalue?: string;\n\twrap?: 'hard' | 'soft';\n}\n\n@guardedCustomElement('sds-textarea')\nexport class SDSTextArea extends SDSDelegateInteractionMixin(SDSEventDispatcherMixin(SDSFormControlMixin(LitElement))) {\n\t// Styling\n\tstatic override styles = [styles];\n\n\t@property({ type: String }) value?: string;\n\t@property({ type: String, reflect: true }) label?: SDSTextAreaProps['label'];\n\t@property({ type: String, reflect: true }) placeholder?: SDSTextAreaProps['placeholder'];\n\t@property({ type: String, attribute: 'help-text', reflect: true }) helpText?: SDSTextAreaProps['help-text'];\n\t@property({ type: String, attribute: 'error-message', reflect: true }) errorMessage?: SDSTextAreaProps['error-message'];\n\t@property({ type: String, reflect: true }) autocomplete?: SDSTextAreaProps['autocomplete'];\n\t@property({ type: Boolean, reflect: true }) required: SDSTextAreaProps['required'] = false;\n\t@property({ type: Number, reflect: true }) rows?: SDSTextAreaProps['rows'];\n\t@property({ type: Number, reflect: true }) cols?: SDSTextAreaProps['cols'];\n\t@property({ type: String, reflect: true }) wrap?: SDSTextAreaProps['wrap'];\n\t@property({ type: Number, reflect: true }) minlength?: SDSTextAreaProps['minlength'];\n\t@property({ type: Number, reflect: true }) maxlength?: SDSTextAreaProps['maxlength'];\n\t@property({ type: Number, reflect: true }) counter?: SDSTextAreaProps['counter'];\n\t@property({ type: String, reflect: true }) size: SDSTextAreaProps['size'] = 'md';\n\n\t@query('#sds-textarea') control!: HTMLTextAreaElement;\n\n\tprivate _defaultValue: string | null = null;\n\n\toverride connectedCallback() {\n\t\tsuper.connectedCallback();\n\t\tthis._defaultValue = this.value ?? null;\n\t\tthis.internals.setFormValue(this._defaultValue);\n\t}\n\n\toverride updated(changedProperties: Map<string | number | symbol, unknown>) {\n\t\tsuper.updated(changedProperties);\n\n\t\tif (changedProperties.has('value')) {\n\t\t\tthis.internals.setFormValue(this.value ?? '');\n\n\t\t\tif (this.control) {\n\t\t\t\tthis.control.value = this.value ?? '';\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate updateValidity() {\n\t\tif (this.control.checkValidity()) {\n\t\t\tthis.internals.setValidity({});\n\t\t} else {\n\t\t\tthis.internals.setValidity({ customError: true }, this.control.validationMessage, this.control);\n\t\t}\n\t}\n\n\tprivate hasTypedTooManyCharacters() {\n\t\tif (!this.counter) {\n\t\t\treturn false;\n\t\t}\n\t\tconst currentLength = this.value?.length || 0;\n\t\treturn currentLength > this.counter;\n\t}\n\n\tprivate renderCharacterCounter() {\n\t\tif (this.counter === undefined) return nothing;\n\n\t\tconst currentLength = this.value?.length || 0;\n\t\tif (this.hasTypedTooManyCharacters()) {\n\t\t\treturn html`<sds-alert variant=\"secondary\" data-palette=\"danger\"\n\t\t\t\t><p class=\"sds-textarea__character-counter\" slot=\"message\">Du har ${currentLength - this.counter} tegn for mye</p></sds-alert\n\t\t\t>`;\n\t\t}\n\n\t\treturn html`<p class=\"sds-textarea__character-counter\">Du har ${this.counter - currentLength} tegn igjen</p>`;\n\t}\n\n\tprivate readonly _handleInputChange = (event: InputEvent) => {\n\t\tevent.stopImmediatePropagation();\n\t\tif (this.disabled || !(event.target instanceof HTMLTextAreaElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.value = event.target.value;\n\t\tthis.internals.setFormValue(this.value === '' ? null : this.value);\n\t\tthis.updateValidity();\n\t\tthis.dispatchSheriffEvent(event.type);\n\t};\n\n\tprivate readonly _handleSelect = (event: Event) => {\n\t\tevent.stopImmediatePropagation();\n\t\tif (!this.disabled) {\n\t\t\tthis.dispatchSheriffEvent('select');\n\t\t}\n\t};\n\n\tprivate readonly _handleFocus = (event: FocusEvent) => {\n\t\tevent.stopImmediatePropagation();\n\t\tthis.dispatchSheriffEvent('focus');\n\t};\n\n\tprivate readonly _handleBlur = (event: FocusEvent) => {\n\t\tevent.stopImmediatePropagation();\n\t\tthis.updateValidity();\n\t\tthis.dispatchSheriffEvent('blur');\n\t};\n\n\tformResetCallback() {\n\t\tthis.internals.setFormValue(this._defaultValue);\n\n\t\tconst newValue = this._defaultValue ?? '';\n\t\tthis.control.value = newValue;\n\t\tthis.value = newValue;\n\t\tthis.updateValidity();\n\t}\n\n\tselect(): void {\n\t\tif (!this.disabled) this.control.select();\n\t}\n\n\ttype(): string {\n\t\treturn 'textarea';\n\t}\n\n\tget selectionStart(): number | null {\n\t\treturn this.control ? this.control.selectionStart : null;\n\t}\n\n\tset selectionStart(value: number | null) {\n\t\tif (this.control && value !== null) {\n\t\t\tthis.control.selectionStart = value;\n\t\t}\n\t}\n\n\tget selectionEnd(): number | null {\n\t\treturn this.control ? this.control.selectionEnd : null;\n\t}\n\tset selectionEnd(value: number | null) {\n\t\tif (this.control && value !== null) {\n\t\t\tthis.control.selectionEnd = value;\n\t\t}\n\t}\n\n\tsetSelectionRange(start: number, end: number, direction?: 'forward' | 'backward' | 'none'): void {\n\t\tif (this.control) {\n\t\t\tthis.control.setSelectionRange(start, end, direction);\n\t\t}\n\t}\n\n\tcheckValidity(): boolean {\n\t\treturn this.control.checkValidity();\n\t}\n\n\treportValidity(): boolean {\n\t\treturn this.control.reportValidity();\n\t}\n\n\tsetCustomValidity(message: string): void {\n\t\tthis.control.setCustomValidity(message);\n\t\tthis.updateValidity();\n\t}\n\n\toverride render() {\n\t\tconst isInvalid = Boolean(this.errorMessage || this.hasTypedTooManyCharacters());\n\t\tconst textareaClasses = {\n\t\t\t'sds-textarea': true,\n\t\t\t'sds-textarea--error': isInvalid,\n\t\t};\n\n\t\tconst describedBy = [this.errorMessage ? 'error-message' : null, this.helpText ? 'help-text' : null].filter(Boolean).join(' ') || undefined;\n\n\t\treturn html`\n\t\t\t<div class=\"${classMap(textareaClasses)}\">\n\t\t\t\t${this.label || this.helpText\n\t\t\t\t\t? html`<div>\n\t\t\t\t\t\t\t${this.label ? html`<label for=\"sds-textarea\" class=\"sds-textarea__label\">${this.label}</label>` : nothing}\n\t\t\t\t\t\t\t${this.helpText ? html`<p id=\"help-text\" class=\"sds-textarea__help-text\">${this.helpText}</p>` : nothing}\n\t\t\t\t\t\t</div>`\n\t\t\t\t\t: nothing}\n\t\t\t\t<div class=\"sds-textarea__input-container\">\n\t\t\t\t\t<textarea\n\t\t\t\t\t\tclass=\"sds-textarea__input\"\n\t\t\t\t\t\tid=\"sds-textarea\"\n\t\t\t\t\t\t?disabled=\"${this.disabled}\"\n\t\t\t\t\t\t?readonly=\"${this.readOnly}\"\n\t\t\t\t\t\tplaceholder=\"${ifDefined(this.placeholder)}\"\n\t\t\t\t\t\t.value=\"${this.value ?? ''}\"\n\t\t\t\t\t\t.autocomplete=\"${this.autocomplete}\"\n\t\t\t\t\t\tname=\"${ifDefined(this.name)}\"\n\t\t\t\t\t\t?required=\"${this.required}\"\n\t\t\t\t\t\trows=\"${ifDefined(this.rows)}\"\n\t\t\t\t\t\tcols=\"${ifDefined(this.cols)}\"\n\t\t\t\t\t\twrap=\"${ifDefined(this.wrap)}\"\n\t\t\t\t\t\tminlength=\"${ifDefined(this.minlength)}\"\n\t\t\t\t\t\tmaxlength=\"${ifDefined(this.maxlength)}\"\n\t\t\t\t\t\taria-describedby=\"${ifDefined(describedBy)}\"\n\t\t\t\t\t\taria-invalid=\"${isInvalid ? 'true' : 'false'}\"\n\t\t\t\t\t\t@input=\"${this._handleInputChange}\"\n\t\t\t\t\t\t@change=\"${this._handleInputChange}\"\n\t\t\t\t\t\t@select=\"${this._handleSelect}\"\n\t\t\t\t\t\t@focus=\"${this._handleFocus}\"\n\t\t\t\t\t\t@blur=\"${this._handleBlur}\"\n\t\t\t\t\t></textarea>\n\t\t\t\t</div>\n\t\t\t\t${this.errorMessage ? html`<sds-alert id=\"error-message\" variant=\"secondary\" data-palette=\"danger\"><p slot=\"message\">${this.errorMessage}</p></sds-alert>` : nothing} ${this.renderCharacterCounter()}\n\t\t\t</div>\n\t\t`;\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-textarea': SDSTextArea;\n\t}\n}\n"]}