srcdev-nuxt-forms 6.1.1 → 6.1.2
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.
- package/app/assets/styles/extends-layer/srcdev-forms/components/_input-description.css +13 -0
- package/app/assets/styles/extends-layer/srcdev-forms/components/index.css +10 -9
- package/app/assets/styles/setup/theming/themes/_default.css +3 -0
- package/app/assets/styles/setup/theming/themes/_error.css +4 -1
- package/app/assets/styles/setup/theming/themes/_secondary.css +4 -1
- package/app/assets/styles/setup/theming/themes/_success.css +4 -1
- package/app/assets/styles/setup/theming/themes/_warning.css +4 -1
- package/app/assets/styles/setup/utility-classes/_margin.css +334 -0
- package/app/assets/styles/setup/utility-classes/_padding.css +308 -0
- package/app/assets/styles/setup/utility-classes/index.css +4 -2
- package/app/components/forms/input-checkbox/MultipleCheckboxes.vue +21 -32
- package/app/components/forms/input-description/InputDescription.vue +71 -0
- package/app/components/forms/input-label/InputLabel.vue +4 -0
- package/app/components/forms/input-select/variants/InputSelectWithLabel.vue +36 -12
- package/app/components/forms/input-text/variants/InputTextWithLabel.vue +35 -11
- package/app/components/forms/input-textarea/InputTextareaCore.vue +5 -1
- package/app/components/forms/input-textarea/variants/InputTextareaWithLabel.vue +75 -35
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.srcdev-forms-extended {
|
|
2
|
+
.input-description {
|
|
3
|
+
.input-description-html {
|
|
4
|
+
margin-block: 0.4rem 0.8rem;
|
|
5
|
+
}
|
|
6
|
+
.input-description-text {
|
|
7
|
+
color: var(--form-description-color);
|
|
8
|
+
font-size: var(--step-4);
|
|
9
|
+
margin-block: 0.4rem 0.8rem;
|
|
10
|
+
line-height: var(--step-4);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
@import
|
|
2
|
-
@import
|
|
3
|
-
@import
|
|
4
|
-
@import
|
|
5
|
-
@import
|
|
6
|
-
@import
|
|
7
|
-
@import
|
|
8
|
-
@import
|
|
9
|
-
@import
|
|
1
|
+
@import "./_input-error";
|
|
2
|
+
@import "./_input-select";
|
|
3
|
+
@import "./_input-label";
|
|
4
|
+
@import "./_input-description";
|
|
5
|
+
@import "./_input-textarea";
|
|
6
|
+
@import "./_input-text";
|
|
7
|
+
@import "./_input-checkbox-radio-core";
|
|
8
|
+
@import "./_input-button";
|
|
9
|
+
@import "./_input-checkbox-radio-options-button";
|
|
10
|
+
@import "./_form-fieldset";
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
--form-fieldset-legend-color: light-dark(var(--gray-12), var(--gray-1));
|
|
22
22
|
--form-label-color: light-dark(var(--gray-12), var(--gray-1));
|
|
23
23
|
|
|
24
|
+
/* Description */
|
|
25
|
+
--form-description-color: light-dark(var(--gray-12), var(--gray-1));
|
|
26
|
+
|
|
24
27
|
/* Input Elements */
|
|
25
28
|
--theme-input-surface: light-dark(var(--gray-1), var(--gray-8));
|
|
26
29
|
--theme-input-surface-hover: light-dark(var(--gray-1), var(--gray-5));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[data-theme=
|
|
1
|
+
[data-theme="error"] {
|
|
2
2
|
--colour-theme-0: var(--red-0);
|
|
3
3
|
--colour-theme-1: var(--red-1);
|
|
4
4
|
--colour-theme-2: var(--red-2);
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
--form-fieldset-legend-color: light-dark(var(--gray-12), var(--gray-1));
|
|
21
21
|
--form-label-color: light-dark(var(--gray-12), var(--gray-1));
|
|
22
22
|
|
|
23
|
+
/* Description */
|
|
24
|
+
--form-description-color: light-dark(var(--gray-12), var(--gray-1));
|
|
25
|
+
|
|
23
26
|
/* Input Elements */
|
|
24
27
|
--theme-input-surface: light-dark(var(--gray-1), var(--gray-8));
|
|
25
28
|
--theme-input-surface-hover: light-dark(var(--gray-1), var(--gray-10));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[data-theme=
|
|
1
|
+
[data-theme="secondary"] {
|
|
2
2
|
--colour-theme-0: var(--gray-0);
|
|
3
3
|
--colour-theme-1: var(--gray-1);
|
|
4
4
|
--colour-theme-2: var(--gray-2);
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
--form-fieldset-legend-color: light-dark(var(--gray-12), var(--gray-1));
|
|
21
21
|
--form-label-color: light-dark(var(--gray-12), var(--gray-1));
|
|
22
22
|
|
|
23
|
+
/* Description */
|
|
24
|
+
--form-description-color: light-dark(var(--gray-12), var(--gray-1));
|
|
25
|
+
|
|
23
26
|
/* Input Elements */
|
|
24
27
|
--theme-input-surface: light-dark(var(--gray-1), var(--gray-8));
|
|
25
28
|
--theme-input-surface-hover: light-dark(var(--gray-1), var(--gray-10));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[data-theme=
|
|
1
|
+
[data-theme="success"] {
|
|
2
2
|
--colour-theme-0: var(--green-0);
|
|
3
3
|
--colour-theme-1: var(--green-1);
|
|
4
4
|
--colour-theme-2: var(--green-2);
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
--form-fieldset-legend-color: light-dark(var(--gray-12), var(--gray-1));
|
|
21
21
|
--form-label-color: light-dark(var(--gray-12), var(--gray-1));
|
|
22
22
|
|
|
23
|
+
/* Description */
|
|
24
|
+
--form-description-color: light-dark(var(--gray-12), var(--gray-1));
|
|
25
|
+
|
|
23
26
|
/* Input Elements */
|
|
24
27
|
--theme-input-surface: light-dark(var(--gray-1), var(--gray-8));
|
|
25
28
|
--theme-input-surface-hover: light-dark(var(--gray-1), var(--gray-10));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
[data-theme=
|
|
2
|
+
[data-theme="warning"] {
|
|
3
3
|
--colour-theme-0: var(--orange-0);
|
|
4
4
|
--colour-theme-1: var(--orange-1);
|
|
5
5
|
--colour-theme-2: var(--orange-2);
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
--form-fieldset-legend-color: light-dark(var(--gray-12), var(--gray-1));
|
|
22
22
|
--form-label-color: light-dark(var(--gray-12), var(--gray-1));
|
|
23
23
|
|
|
24
|
+
/* Description */
|
|
25
|
+
--form-description-color: light-dark(var(--gray-12), var(--gray-1));
|
|
26
|
+
|
|
24
27
|
/* Input Elements */
|
|
25
28
|
--theme-input-surface: light-dark(var(--gray-1), var(--gray-8));
|
|
26
29
|
--theme-input-surface-hover: light-dark(var(--gray-1), var(--gray-10));
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
/* Margin */
|
|
2
|
+
.mi-auto {
|
|
3
|
+
margin-inline: auto;
|
|
4
|
+
}
|
|
5
|
+
.mis-auto {
|
|
6
|
+
margin-inline-start: auto;
|
|
7
|
+
}
|
|
8
|
+
.mie-auto {
|
|
9
|
+
margin-inline-end: auto;
|
|
10
|
+
}
|
|
11
|
+
.mb-auto {
|
|
12
|
+
margin-block: auto;
|
|
13
|
+
}
|
|
14
|
+
.mbs-auto {
|
|
15
|
+
margin-block-start: auto;
|
|
16
|
+
}
|
|
17
|
+
.mbe-auto {
|
|
18
|
+
margin-block-end: auto;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.mb-0 {
|
|
22
|
+
margin-block: 0;
|
|
23
|
+
}
|
|
24
|
+
.mi-0 {
|
|
25
|
+
margin-inline: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.m-0 {
|
|
29
|
+
margin: 0;
|
|
30
|
+
}
|
|
31
|
+
.mbs-0 {
|
|
32
|
+
margin-block-start: 0;
|
|
33
|
+
}
|
|
34
|
+
.mbe-0 {
|
|
35
|
+
margin-block-end: 0;
|
|
36
|
+
}
|
|
37
|
+
.mis-0 {
|
|
38
|
+
margin-inline-start: 0;
|
|
39
|
+
}
|
|
40
|
+
.mie-0 {
|
|
41
|
+
margin-inline-end: 0;
|
|
42
|
+
}
|
|
43
|
+
.mi-0 {
|
|
44
|
+
margin-inline: 0;
|
|
45
|
+
}
|
|
46
|
+
.mb-0 {
|
|
47
|
+
margin-block: 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.m-1 {
|
|
51
|
+
margin: 0.1rem;
|
|
52
|
+
}
|
|
53
|
+
.mbs-1 {
|
|
54
|
+
margin-block-start: 0.1rem;
|
|
55
|
+
}
|
|
56
|
+
.mbe-1 {
|
|
57
|
+
margin-block-end: 0.1rem;
|
|
58
|
+
}
|
|
59
|
+
.mis-1 {
|
|
60
|
+
margin-inline-start: 0.1rem;
|
|
61
|
+
}
|
|
62
|
+
.mie-1 {
|
|
63
|
+
margin-inline-end: 0.1rem;
|
|
64
|
+
}
|
|
65
|
+
.mi-1 {
|
|
66
|
+
margin-inline: 0.1rem;
|
|
67
|
+
}
|
|
68
|
+
.mb-1 {
|
|
69
|
+
margin-block: 0.1rem;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.m-2 {
|
|
73
|
+
margin: 0.2rem;
|
|
74
|
+
}
|
|
75
|
+
.mbs-2 {
|
|
76
|
+
margin-block-start: 0.2rem;
|
|
77
|
+
}
|
|
78
|
+
.mbe-2 {
|
|
79
|
+
margin-block-end: 0.2rem;
|
|
80
|
+
}
|
|
81
|
+
.mis-2 {
|
|
82
|
+
margin-inline-start: 0.2rem;
|
|
83
|
+
}
|
|
84
|
+
.mie-2 {
|
|
85
|
+
margin-inline-end: 0.2rem;
|
|
86
|
+
}
|
|
87
|
+
.mi-2 {
|
|
88
|
+
margin-inline: 0.2rem;
|
|
89
|
+
}
|
|
90
|
+
.mb-2 {
|
|
91
|
+
margin-block: 0.2rem;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.m-4 {
|
|
95
|
+
margin: 0.4rem;
|
|
96
|
+
}
|
|
97
|
+
.mbs-4 {
|
|
98
|
+
margin-block-start: 0.4rem;
|
|
99
|
+
}
|
|
100
|
+
.mbe-4 {
|
|
101
|
+
margin-block-end: 0.4rem;
|
|
102
|
+
}
|
|
103
|
+
.mis-4 {
|
|
104
|
+
margin-inline-start: 0.4rem;
|
|
105
|
+
}
|
|
106
|
+
.mie-4 {
|
|
107
|
+
margin-inline-end: 0.4rem;
|
|
108
|
+
}
|
|
109
|
+
.mi-4 {
|
|
110
|
+
margin-inline: 0.4rem;
|
|
111
|
+
}
|
|
112
|
+
.mb-4 {
|
|
113
|
+
margin-block: 0.4rem;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.m-6 {
|
|
117
|
+
margin: 0.6rem;
|
|
118
|
+
}
|
|
119
|
+
.mbs-6 {
|
|
120
|
+
margin-block-start: 0.6rem;
|
|
121
|
+
}
|
|
122
|
+
.mbe-6 {
|
|
123
|
+
margin-block-end: 0.6rem;
|
|
124
|
+
}
|
|
125
|
+
.mis-6 {
|
|
126
|
+
margin-inline-start: 0.6rem;
|
|
127
|
+
}
|
|
128
|
+
.mie-6 {
|
|
129
|
+
margin-inline-end: 0.6rem;
|
|
130
|
+
}
|
|
131
|
+
.mi-6 {
|
|
132
|
+
margin-inline: 0.6rem;
|
|
133
|
+
}
|
|
134
|
+
.mb-6 {
|
|
135
|
+
margin-block: 0.6rem;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.m-8 {
|
|
139
|
+
margin: 0.8rem;
|
|
140
|
+
}
|
|
141
|
+
.mbs-8 {
|
|
142
|
+
margin-block-start: 0.8rem;
|
|
143
|
+
}
|
|
144
|
+
.mbe-8 {
|
|
145
|
+
margin-block-end: 0.8rem;
|
|
146
|
+
}
|
|
147
|
+
.mis-8 {
|
|
148
|
+
margin-inline-start: 0.8rem;
|
|
149
|
+
}
|
|
150
|
+
.mie-8 {
|
|
151
|
+
margin-inline-end: 0.8rem;
|
|
152
|
+
}
|
|
153
|
+
.mi-8 {
|
|
154
|
+
margin-inline: 0.8rem;
|
|
155
|
+
}
|
|
156
|
+
.mb-8 {
|
|
157
|
+
margin-block: 0.8rem;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.m-10 {
|
|
161
|
+
margin: 1rem;
|
|
162
|
+
}
|
|
163
|
+
.mbs-10 {
|
|
164
|
+
margin-block-start: 1rem;
|
|
165
|
+
}
|
|
166
|
+
.mbe-10 {
|
|
167
|
+
margin-block-end: 1rem;
|
|
168
|
+
}
|
|
169
|
+
.mis-10 {
|
|
170
|
+
margin-inline-start: 1rem;
|
|
171
|
+
}
|
|
172
|
+
.mie-10 {
|
|
173
|
+
margin-inline-end: 1rem;
|
|
174
|
+
}
|
|
175
|
+
.mi-10 {
|
|
176
|
+
margin-inline: 1rem;
|
|
177
|
+
}
|
|
178
|
+
.mb-10 {
|
|
179
|
+
margin-block: 1rem;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.m-12 {
|
|
183
|
+
margin: 1.2rem;
|
|
184
|
+
}
|
|
185
|
+
.mbs-12 {
|
|
186
|
+
margin-block-start: 1.2rem;
|
|
187
|
+
}
|
|
188
|
+
.mbe-12 {
|
|
189
|
+
margin-block-end: 1.2rem;
|
|
190
|
+
}
|
|
191
|
+
.mis-12 {
|
|
192
|
+
margin-inline-start: 1.2rem;
|
|
193
|
+
}
|
|
194
|
+
.mie-12 {
|
|
195
|
+
margin-inline-end: 1.2rem;
|
|
196
|
+
}
|
|
197
|
+
.mi-12 {
|
|
198
|
+
margin-inline: 1.2rem;
|
|
199
|
+
}
|
|
200
|
+
.mb-12 {
|
|
201
|
+
margin-block: 1.2rem;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.m-18 {
|
|
205
|
+
margin: 1.8rem;
|
|
206
|
+
}
|
|
207
|
+
.mbs-18 {
|
|
208
|
+
margin-block-start: 1.8rem;
|
|
209
|
+
}
|
|
210
|
+
.mbe-18 {
|
|
211
|
+
margin-block-end: 1.8rem;
|
|
212
|
+
}
|
|
213
|
+
.mis-18 {
|
|
214
|
+
margin-inline-start: 1.8rem;
|
|
215
|
+
}
|
|
216
|
+
.mie-18 {
|
|
217
|
+
margin-inline-end: 1.8rem;
|
|
218
|
+
}
|
|
219
|
+
.mi-18 {
|
|
220
|
+
margin-inline: 1.8rem;
|
|
221
|
+
}
|
|
222
|
+
.mb-18 {
|
|
223
|
+
margin-block: 1.8rem;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.m-20 {
|
|
227
|
+
margin: 2rem;
|
|
228
|
+
}
|
|
229
|
+
.mbs-20 {
|
|
230
|
+
margin-block-start: 2rem;
|
|
231
|
+
}
|
|
232
|
+
.mbe-20 {
|
|
233
|
+
margin-block-end: 2rem;
|
|
234
|
+
}
|
|
235
|
+
.mis-20 {
|
|
236
|
+
margin-inline-start: 2rem;
|
|
237
|
+
}
|
|
238
|
+
.mie-20 {
|
|
239
|
+
margin-inline-end: 2rem;
|
|
240
|
+
}
|
|
241
|
+
.mi-20 {
|
|
242
|
+
margin-inline: 2rem;
|
|
243
|
+
}
|
|
244
|
+
.mb-20 {
|
|
245
|
+
margin-block: 2rem;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.m-24 {
|
|
249
|
+
margin: 2.4rem;
|
|
250
|
+
}
|
|
251
|
+
.mbs-24 {
|
|
252
|
+
margin-block-start: 2.4rem;
|
|
253
|
+
}
|
|
254
|
+
.mbe-24 {
|
|
255
|
+
margin-block-end: 2.4rem;
|
|
256
|
+
}
|
|
257
|
+
.mis-24 {
|
|
258
|
+
margin-inline-start: 2.4rem;
|
|
259
|
+
}
|
|
260
|
+
.mie-24 {
|
|
261
|
+
margin-inline-end: 2.4rem;
|
|
262
|
+
}
|
|
263
|
+
.mi-24 {
|
|
264
|
+
margin-inline: 2.4rem;
|
|
265
|
+
}
|
|
266
|
+
.mb-24 {
|
|
267
|
+
margin-block: 2.4rem;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.m-32 {
|
|
271
|
+
margin: 3.2rem;
|
|
272
|
+
}
|
|
273
|
+
.mbs-32 {
|
|
274
|
+
margin-block-start: 3.2rem;
|
|
275
|
+
}
|
|
276
|
+
.mbe-32 {
|
|
277
|
+
margin-block-end: 3.2rem;
|
|
278
|
+
}
|
|
279
|
+
.mis-32 {
|
|
280
|
+
margin-inline-start: 3.2rem;
|
|
281
|
+
}
|
|
282
|
+
.mie-32 {
|
|
283
|
+
margin-inline-end: 3.2rem;
|
|
284
|
+
}
|
|
285
|
+
.mi-32 {
|
|
286
|
+
margin-inline: 3.2rem;
|
|
287
|
+
}
|
|
288
|
+
.mb-32 {
|
|
289
|
+
margin-block: 3.2rem;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.m-40 {
|
|
293
|
+
margin: 4rem;
|
|
294
|
+
}
|
|
295
|
+
.mbs-40 {
|
|
296
|
+
margin-block-start: 4rem;
|
|
297
|
+
}
|
|
298
|
+
.mbe-40 {
|
|
299
|
+
margin-block-end: 4rem;
|
|
300
|
+
}
|
|
301
|
+
.mis-40 {
|
|
302
|
+
margin-inline-start: 4rem;
|
|
303
|
+
}
|
|
304
|
+
.mie-40 {
|
|
305
|
+
margin-inline-end: 4rem;
|
|
306
|
+
}
|
|
307
|
+
.mi-40 {
|
|
308
|
+
margin-inline: 4rem;
|
|
309
|
+
}
|
|
310
|
+
.mb-40 {
|
|
311
|
+
margin-block: 4rem;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.m-60 {
|
|
315
|
+
margin: 6rem;
|
|
316
|
+
}
|
|
317
|
+
.mbs-60 {
|
|
318
|
+
margin-block-start: 6rem;
|
|
319
|
+
}
|
|
320
|
+
.mbe-60 {
|
|
321
|
+
margin-block-end: 6rem;
|
|
322
|
+
}
|
|
323
|
+
.mis-60 {
|
|
324
|
+
margin-inline-start: 6rem;
|
|
325
|
+
}
|
|
326
|
+
.mie-60 {
|
|
327
|
+
margin-inline-end: 6rem;
|
|
328
|
+
}
|
|
329
|
+
.mi-60 {
|
|
330
|
+
margin-inline: 6rem;
|
|
331
|
+
}
|
|
332
|
+
.mb-60 {
|
|
333
|
+
margin-block: 6rem;
|
|
334
|
+
}
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
/* Padding */
|
|
2
|
+
.p-0 {
|
|
3
|
+
padding: 0;
|
|
4
|
+
}
|
|
5
|
+
.pbs-0 {
|
|
6
|
+
padding-block-start: 0;
|
|
7
|
+
}
|
|
8
|
+
.pbe-0 {
|
|
9
|
+
padding-block-end: 0;
|
|
10
|
+
}
|
|
11
|
+
.pis-0 {
|
|
12
|
+
padding-inline-start: 0;
|
|
13
|
+
}
|
|
14
|
+
.pie-0 {
|
|
15
|
+
padding-inline-end: 0;
|
|
16
|
+
}
|
|
17
|
+
.pi-0 {
|
|
18
|
+
padding-inline: 0;
|
|
19
|
+
}
|
|
20
|
+
.pb-0 {
|
|
21
|
+
padding-block: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.p-1 {
|
|
25
|
+
padding: 0.1rem;
|
|
26
|
+
}
|
|
27
|
+
.pbs-1 {
|
|
28
|
+
padding-block-start: 0.1rem;
|
|
29
|
+
}
|
|
30
|
+
.pbe-1 {
|
|
31
|
+
padding-block-end: 0.1rem;
|
|
32
|
+
}
|
|
33
|
+
.pis-1 {
|
|
34
|
+
padding-inline-start: 0.1rem;
|
|
35
|
+
}
|
|
36
|
+
.pie-1 {
|
|
37
|
+
padding-inline-end: 0.1rem;
|
|
38
|
+
}
|
|
39
|
+
.pi-1 {
|
|
40
|
+
padding-inline: 0.1rem;
|
|
41
|
+
}
|
|
42
|
+
.pb-1 {
|
|
43
|
+
padding-block: 0.1rem;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.p-2 {
|
|
47
|
+
padding: 0.2rem;
|
|
48
|
+
}
|
|
49
|
+
.pbs-2 {
|
|
50
|
+
padding-block-start: 0.2rem;
|
|
51
|
+
}
|
|
52
|
+
.pbe-2 {
|
|
53
|
+
padding-block-end: 0.2rem;
|
|
54
|
+
}
|
|
55
|
+
.pis-2 {
|
|
56
|
+
padding-inline-start: 0.2rem;
|
|
57
|
+
}
|
|
58
|
+
.pie-2 {
|
|
59
|
+
padding-inline-end: 0.2rem;
|
|
60
|
+
}
|
|
61
|
+
.pi-2 {
|
|
62
|
+
padding-inline: 0.2rem;
|
|
63
|
+
}
|
|
64
|
+
.pb-2 {
|
|
65
|
+
padding-block: 0.2rem;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.p-4 {
|
|
69
|
+
padding: 0.4rem;
|
|
70
|
+
}
|
|
71
|
+
.pbs-4 {
|
|
72
|
+
padding-block-start: 0.4rem;
|
|
73
|
+
}
|
|
74
|
+
.pbe-4 {
|
|
75
|
+
padding-block-end: 0.4rem;
|
|
76
|
+
}
|
|
77
|
+
.pis-4 {
|
|
78
|
+
padding-inline-start: 0.4rem;
|
|
79
|
+
}
|
|
80
|
+
.pie-4 {
|
|
81
|
+
padding-inline-end: 0.4rem;
|
|
82
|
+
}
|
|
83
|
+
.pi-4 {
|
|
84
|
+
padding-inline: 0.4rem;
|
|
85
|
+
}
|
|
86
|
+
.pb-4 {
|
|
87
|
+
padding-block: 0.4rem;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.p-6 {
|
|
91
|
+
padding: 0.6rem;
|
|
92
|
+
}
|
|
93
|
+
.pbs-6 {
|
|
94
|
+
padding-block-start: 0.6rem;
|
|
95
|
+
}
|
|
96
|
+
.pbe-6 {
|
|
97
|
+
padding-block-end: 0.6rem;
|
|
98
|
+
}
|
|
99
|
+
.pis-6 {
|
|
100
|
+
padding-inline-start: 0.6rem;
|
|
101
|
+
}
|
|
102
|
+
.pie-6 {
|
|
103
|
+
padding-inline-end: 0.6rem;
|
|
104
|
+
}
|
|
105
|
+
.pi-6 {
|
|
106
|
+
padding-inline: 0.6rem;
|
|
107
|
+
}
|
|
108
|
+
.pb-6 {
|
|
109
|
+
padding-block: 0.6rem;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.p-8 {
|
|
113
|
+
padding: 0.8rem;
|
|
114
|
+
}
|
|
115
|
+
.pbs-8 {
|
|
116
|
+
padding-block-start: 0.8rem;
|
|
117
|
+
}
|
|
118
|
+
.pbe-8 {
|
|
119
|
+
padding-block-end: 0.8rem;
|
|
120
|
+
}
|
|
121
|
+
.pis-8 {
|
|
122
|
+
padding-inline-start: 0.8rem;
|
|
123
|
+
}
|
|
124
|
+
.pie-8 {
|
|
125
|
+
padding-inline-end: 0.8rem;
|
|
126
|
+
}
|
|
127
|
+
.pi-8 {
|
|
128
|
+
padding-inline: 0.8rem;
|
|
129
|
+
}
|
|
130
|
+
.pb-8 {
|
|
131
|
+
padding-block: 0.8rem;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.p-10 {
|
|
135
|
+
padding: 1rem;
|
|
136
|
+
}
|
|
137
|
+
.pbs-10 {
|
|
138
|
+
padding-block-start: 1rem;
|
|
139
|
+
}
|
|
140
|
+
.pbe-10 {
|
|
141
|
+
padding-block-end: 1rem;
|
|
142
|
+
}
|
|
143
|
+
.pis-10 {
|
|
144
|
+
padding-inline-start: 1rem;
|
|
145
|
+
}
|
|
146
|
+
.pie-10 {
|
|
147
|
+
padding-inline-end: 1rem;
|
|
148
|
+
}
|
|
149
|
+
.pi-10 {
|
|
150
|
+
padding-inline: 1rem;
|
|
151
|
+
}
|
|
152
|
+
.pb-10 {
|
|
153
|
+
padding-block: 1rem;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.p-12 {
|
|
157
|
+
padding: 1.2rem;
|
|
158
|
+
}
|
|
159
|
+
.pbs-12 {
|
|
160
|
+
padding-block-start: 1.2rem;
|
|
161
|
+
}
|
|
162
|
+
.pbe-12 {
|
|
163
|
+
padding-block-end: 1.2rem;
|
|
164
|
+
}
|
|
165
|
+
.pis-12 {
|
|
166
|
+
padding-inline-start: 1.2rem;
|
|
167
|
+
}
|
|
168
|
+
.pie-12 {
|
|
169
|
+
padding-inline-end: 1.2rem;
|
|
170
|
+
}
|
|
171
|
+
.pi-12 {
|
|
172
|
+
padding-inline: 1.2rem;
|
|
173
|
+
}
|
|
174
|
+
.pb-12 {
|
|
175
|
+
padding-block: 1.2rem;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.p-18 {
|
|
179
|
+
padding: 1.8rem;
|
|
180
|
+
}
|
|
181
|
+
.pbs-18 {
|
|
182
|
+
padding-block-start: 1.8rem;
|
|
183
|
+
}
|
|
184
|
+
.pbe-18 {
|
|
185
|
+
padding-block-end: 1.8rem;
|
|
186
|
+
}
|
|
187
|
+
.pis-18 {
|
|
188
|
+
padding-inline-start: 1.8rem;
|
|
189
|
+
}
|
|
190
|
+
.pie-18 {
|
|
191
|
+
padding-inline-end: 1.8rem;
|
|
192
|
+
}
|
|
193
|
+
.pi-18 {
|
|
194
|
+
padding-inline: 1.8rem;
|
|
195
|
+
}
|
|
196
|
+
.pb-18 {
|
|
197
|
+
padding-block: 1.8rem;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.p-20 {
|
|
201
|
+
padding: 2rem;
|
|
202
|
+
}
|
|
203
|
+
.pbs-20 {
|
|
204
|
+
padding-block-start: 2rem;
|
|
205
|
+
}
|
|
206
|
+
.pbe-20 {
|
|
207
|
+
padding-block-end: 2rem;
|
|
208
|
+
}
|
|
209
|
+
.pis-20 {
|
|
210
|
+
padding-inline-start: 2rem;
|
|
211
|
+
}
|
|
212
|
+
.pie-20 {
|
|
213
|
+
padding-inline-end: 2rem;
|
|
214
|
+
}
|
|
215
|
+
.pi-20 {
|
|
216
|
+
padding-inline: 2rem;
|
|
217
|
+
}
|
|
218
|
+
.pb-20 {
|
|
219
|
+
padding-block: 2rem;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.p-24 {
|
|
223
|
+
padding: 2.4rem;
|
|
224
|
+
}
|
|
225
|
+
.pbs-24 {
|
|
226
|
+
padding-block-start: 2.4rem;
|
|
227
|
+
}
|
|
228
|
+
.pbe-24 {
|
|
229
|
+
padding-block-end: 2.4rem;
|
|
230
|
+
}
|
|
231
|
+
.pis-24 {
|
|
232
|
+
padding-inline-start: 2.4rem;
|
|
233
|
+
}
|
|
234
|
+
.pie-24 {
|
|
235
|
+
padding-inline-end: 2.4rem;
|
|
236
|
+
}
|
|
237
|
+
.pi-24 {
|
|
238
|
+
padding-inline: 2.4rem;
|
|
239
|
+
}
|
|
240
|
+
.pb-24 {
|
|
241
|
+
padding-block: 2.4rem;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.p-32 {
|
|
245
|
+
padding: 3.2rem;
|
|
246
|
+
}
|
|
247
|
+
.pbs-32 {
|
|
248
|
+
padding-block-start: 3.2rem;
|
|
249
|
+
}
|
|
250
|
+
.pbe-32 {
|
|
251
|
+
padding-block-end: 3.2rem;
|
|
252
|
+
}
|
|
253
|
+
.pis-32 {
|
|
254
|
+
padding-inline-start: 3.2rem;
|
|
255
|
+
}
|
|
256
|
+
.pie-32 {
|
|
257
|
+
padding-inline-end: 3.2rem;
|
|
258
|
+
}
|
|
259
|
+
.pi-32 {
|
|
260
|
+
padding-inline: 3.2rem;
|
|
261
|
+
}
|
|
262
|
+
.pb-32 {
|
|
263
|
+
padding-block: 3.2rem;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.p-40 {
|
|
267
|
+
padding: 4rem;
|
|
268
|
+
}
|
|
269
|
+
.pbs-40 {
|
|
270
|
+
padding-block-start: 4rem;
|
|
271
|
+
}
|
|
272
|
+
.pbe-40 {
|
|
273
|
+
padding-block-end: 4rem;
|
|
274
|
+
}
|
|
275
|
+
.pis-40 {
|
|
276
|
+
padding-inline-start: 4rem;
|
|
277
|
+
}
|
|
278
|
+
.pie-40 {
|
|
279
|
+
padding-inline-end: 4rem;
|
|
280
|
+
}
|
|
281
|
+
.pi-40 {
|
|
282
|
+
padding-inline: 4rem;
|
|
283
|
+
}
|
|
284
|
+
.pb-40 {
|
|
285
|
+
padding-block: 4rem;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.p-60 {
|
|
289
|
+
padding: 6rem;
|
|
290
|
+
}
|
|
291
|
+
.pbs-60 {
|
|
292
|
+
padding-block-start: 6rem;
|
|
293
|
+
}
|
|
294
|
+
.pbe-60 {
|
|
295
|
+
padding-block-end: 6rem;
|
|
296
|
+
}
|
|
297
|
+
.pis-60 {
|
|
298
|
+
padding-inline-start: 6rem;
|
|
299
|
+
}
|
|
300
|
+
.pie-60 {
|
|
301
|
+
padding-inline-end: 6rem;
|
|
302
|
+
}
|
|
303
|
+
.pi-60 {
|
|
304
|
+
padding-inline: 6rem;
|
|
305
|
+
}
|
|
306
|
+
.pb-60 {
|
|
307
|
+
padding-block: 6rem;
|
|
308
|
+
}
|
|
@@ -8,9 +8,14 @@
|
|
|
8
8
|
:data-testid
|
|
9
9
|
:styleClassPassthrough="['multiple-checkboxes-fieldset']"
|
|
10
10
|
>
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
|
|
11
|
+
<InputDescription :id :name :field-has-error="fieldHasError" :style-class-passthrough="['input-text-description']">
|
|
12
|
+
<template v-if="slots.descriptionHtml" #descriptionHtml>
|
|
13
|
+
<slot name="descriptionHtml"></slot>
|
|
14
|
+
</template>
|
|
15
|
+
<template v-if="slots.descriptionText" #descriptionText>
|
|
16
|
+
<slot name="descriptionText"></slot>
|
|
17
|
+
</template>
|
|
18
|
+
</InputDescription>
|
|
14
19
|
|
|
15
20
|
<template #content>
|
|
16
21
|
<div class="multiple-checkboxes-items" :class="[optionsLayout]">
|
|
@@ -22,15 +27,15 @@
|
|
|
22
27
|
:name
|
|
23
28
|
:required
|
|
24
29
|
:label="item.label"
|
|
25
|
-
:
|
|
30
|
+
:field-has-error
|
|
26
31
|
v-model="modelValue"
|
|
27
32
|
:true-value="item.value"
|
|
28
33
|
:size
|
|
29
|
-
:
|
|
34
|
+
:options-layout
|
|
30
35
|
:theme
|
|
31
36
|
:direction
|
|
32
|
-
:
|
|
33
|
-
:
|
|
37
|
+
:aria-describedby
|
|
38
|
+
:display-as-disc
|
|
34
39
|
>
|
|
35
40
|
<template #checkedIcon>
|
|
36
41
|
<slot name="checkedIcon"></slot>
|
|
@@ -48,14 +53,14 @@
|
|
|
48
53
|
:name
|
|
49
54
|
:required
|
|
50
55
|
:label="item.label"
|
|
51
|
-
:
|
|
56
|
+
:field-has-error
|
|
52
57
|
v-model="modelValue"
|
|
53
58
|
:true-value="item.value"
|
|
54
59
|
:size
|
|
55
|
-
:
|
|
60
|
+
:options-layout
|
|
56
61
|
:theme
|
|
57
|
-
:
|
|
58
|
-
:
|
|
62
|
+
:aria-describedby
|
|
63
|
+
:display-as-disc
|
|
59
64
|
>
|
|
60
65
|
<template #checkedIcon>
|
|
61
66
|
<slot name="checkedIcon"></slot>
|
|
@@ -72,23 +77,7 @@
|
|
|
72
77
|
import propValidators from "../c12/prop-validators"
|
|
73
78
|
import type { IOptionsConfig, IFormMultipleOptions } from "../../../../shared/types/types.forms"
|
|
74
79
|
|
|
75
|
-
const {
|
|
76
|
-
dataTestid,
|
|
77
|
-
name,
|
|
78
|
-
legend,
|
|
79
|
-
label,
|
|
80
|
-
required,
|
|
81
|
-
fieldHasError,
|
|
82
|
-
placeholder,
|
|
83
|
-
isButton,
|
|
84
|
-
errorMessage,
|
|
85
|
-
size,
|
|
86
|
-
optionsLayout,
|
|
87
|
-
equalCols,
|
|
88
|
-
styleClassPassthrough,
|
|
89
|
-
theme,
|
|
90
|
-
direction,
|
|
91
|
-
} = defineProps({
|
|
80
|
+
const props = defineProps({
|
|
92
81
|
dataTestid: {
|
|
93
82
|
type: String,
|
|
94
83
|
default: "multiple-checkboxes",
|
|
@@ -176,11 +165,11 @@ const slots = useSlots()
|
|
|
176
165
|
const modelValue = defineModel()
|
|
177
166
|
const fieldData = defineModel("fieldData") as Ref<IFormMultipleOptions>
|
|
178
167
|
|
|
179
|
-
const id = `${name}
|
|
180
|
-
const errorId = `${
|
|
168
|
+
const id = `${props.name}-${useId()}`
|
|
169
|
+
const errorId = `${id}-error-message`
|
|
181
170
|
const ariaDescribedby = computed(() => {
|
|
182
|
-
const ariaDescribedbyId = slots.
|
|
183
|
-
return fieldHasError ? errorId : ariaDescribedbyId
|
|
171
|
+
const ariaDescribedbyId = slots.descriptionText || slots.descriptionHtml ? `${id}-description` : undefined
|
|
172
|
+
return props.fieldHasError ? errorId : ariaDescribedbyId
|
|
184
173
|
})
|
|
185
174
|
</script>
|
|
186
175
|
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="slots.descriptionText || slots.descriptionHtml"
|
|
4
|
+
class="input-description"
|
|
5
|
+
:class="[elementClasses]"
|
|
6
|
+
:id="descriptionId"
|
|
7
|
+
>
|
|
8
|
+
<div v-if="slots.descriptionHtml" class="input-description-html">
|
|
9
|
+
<slot name="descriptionHtml"></slot>
|
|
10
|
+
</div>
|
|
11
|
+
<p v-if="slots.descriptionText" class="input-description-text">
|
|
12
|
+
<slot name="descriptionText"></slot>
|
|
13
|
+
</p>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script setup lang="ts">
|
|
18
|
+
import propValidators from "../c12/prop-validators"
|
|
19
|
+
|
|
20
|
+
const props = defineProps({
|
|
21
|
+
id: {
|
|
22
|
+
type: String,
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
25
|
+
name: {
|
|
26
|
+
type: String,
|
|
27
|
+
required: true,
|
|
28
|
+
},
|
|
29
|
+
fieldHasError: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false,
|
|
32
|
+
},
|
|
33
|
+
styleClassPassthrough: {
|
|
34
|
+
type: Array as PropType<string[]>,
|
|
35
|
+
default: () => [],
|
|
36
|
+
},
|
|
37
|
+
theme: {
|
|
38
|
+
type: String as PropType<string>,
|
|
39
|
+
default: "primary",
|
|
40
|
+
validator(value: string) {
|
|
41
|
+
return propValidators.theme.includes(value)
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
inputVariant: {
|
|
45
|
+
type: String as PropType<string>,
|
|
46
|
+
default: "default",
|
|
47
|
+
validator(value: string) {
|
|
48
|
+
return propValidators.inputVariant.includes(value)
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
const slots = useSlots()
|
|
54
|
+
|
|
55
|
+
const descriptionId = `${props.id}-description`
|
|
56
|
+
|
|
57
|
+
const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
58
|
+
</script>
|
|
59
|
+
<style lang="css">
|
|
60
|
+
.input-description {
|
|
61
|
+
.input-description-html {
|
|
62
|
+
margin-block: 0.4rem 0.8rem;
|
|
63
|
+
}
|
|
64
|
+
.input-description-text {
|
|
65
|
+
color: var(--form-description-color);
|
|
66
|
+
font-size: var(--step-4);
|
|
67
|
+
margin-block: 0.4rem 0.8rem;
|
|
68
|
+
line-height: var(--step-4);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
</style>
|
|
@@ -19,9 +19,21 @@
|
|
|
19
19
|
<template #textLabel>{{ label }}</template>
|
|
20
20
|
</InputLabel>
|
|
21
21
|
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
<InputDescription
|
|
23
|
+
v-if="inputVariant !== 'outlined'"
|
|
24
|
+
:id
|
|
25
|
+
:name
|
|
26
|
+
:input-variant
|
|
27
|
+
:field-has-error="fieldHasError"
|
|
28
|
+
:style-class-passthrough="['input-text-description']"
|
|
29
|
+
>
|
|
30
|
+
<template v-if="slots.descriptionHtml" #descriptionHtml>
|
|
31
|
+
<slot name="descriptionHtml"></slot>
|
|
32
|
+
</template>
|
|
33
|
+
<template v-if="slots.descriptionText" #descriptionText>
|
|
34
|
+
<slot name="descriptionText"></slot>
|
|
35
|
+
</template>
|
|
36
|
+
</InputDescription>
|
|
25
37
|
|
|
26
38
|
<InputSelectCore
|
|
27
39
|
v-model="modelValue"
|
|
@@ -31,13 +43,13 @@
|
|
|
31
43
|
:id
|
|
32
44
|
:name
|
|
33
45
|
:placeholder
|
|
34
|
-
:
|
|
46
|
+
:field-has-error
|
|
35
47
|
:required
|
|
36
|
-
:
|
|
48
|
+
:style-class-passthrough
|
|
37
49
|
:theme="formTheme"
|
|
38
|
-
:
|
|
50
|
+
:aria-describedby
|
|
39
51
|
:size
|
|
40
|
-
:
|
|
52
|
+
:input-variant
|
|
41
53
|
/>
|
|
42
54
|
|
|
43
55
|
<InputError
|
|
@@ -48,9 +60,21 @@
|
|
|
48
60
|
:inputVariant
|
|
49
61
|
/>
|
|
50
62
|
</div>
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
63
|
+
<InputDescription
|
|
64
|
+
v-if="inputVariant === 'outlined'"
|
|
65
|
+
:id
|
|
66
|
+
:name
|
|
67
|
+
:input-variant
|
|
68
|
+
:field-has-error="fieldHasError"
|
|
69
|
+
:style-class-passthrough="['input-text-description']"
|
|
70
|
+
>
|
|
71
|
+
<template v-if="slots.descriptionHtml" #descriptionHtml>
|
|
72
|
+
<slot name="descriptionHtml"></slot>
|
|
73
|
+
</template>
|
|
74
|
+
<template v-if="slots.descriptionText" #descriptionText>
|
|
75
|
+
<slot name="descriptionText"></slot>
|
|
76
|
+
</template>
|
|
77
|
+
</InputDescription>
|
|
54
78
|
</div>
|
|
55
79
|
</template>
|
|
56
80
|
|
|
@@ -121,9 +145,9 @@ const formTheme = computed(() => {
|
|
|
121
145
|
})
|
|
122
146
|
|
|
123
147
|
const id = `${props.name}-${useId()}`
|
|
124
|
-
const errorId = `${
|
|
148
|
+
const errorId = `${id}-error-message`
|
|
125
149
|
const ariaDescribedby = computed(() => {
|
|
126
|
-
const ariaDescribedbyId = slots.
|
|
150
|
+
const ariaDescribedbyId = slots.descriptionText || slots.descriptionHtml ? `${id}-description` : undefined
|
|
127
151
|
return props.fieldHasError ? errorId : ariaDescribedbyId
|
|
128
152
|
})
|
|
129
153
|
|
|
@@ -17,9 +17,21 @@
|
|
|
17
17
|
<template #textLabel>{{ label }}</template>
|
|
18
18
|
</InputLabel>
|
|
19
19
|
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
<InputDescription
|
|
21
|
+
v-if="inputVariant !== 'outlined'"
|
|
22
|
+
:id
|
|
23
|
+
:name
|
|
24
|
+
:input-variant
|
|
25
|
+
:field-has-error="fieldHasError"
|
|
26
|
+
:style-class-passthrough="['input-text-description']"
|
|
27
|
+
>
|
|
28
|
+
<template v-if="slots.descriptionHtml" #descriptionHtml>
|
|
29
|
+
<slot name="descriptionHtml"></slot>
|
|
30
|
+
</template>
|
|
31
|
+
<template v-if="slots.descriptionText" #descriptionText>
|
|
32
|
+
<slot name="descriptionText"></slot>
|
|
33
|
+
</template>
|
|
34
|
+
</InputDescription>
|
|
23
35
|
|
|
24
36
|
<InputTextCore
|
|
25
37
|
v-model="modelValue"
|
|
@@ -33,13 +45,13 @@
|
|
|
33
45
|
:placeholder
|
|
34
46
|
:label
|
|
35
47
|
:errorMessage
|
|
36
|
-
:
|
|
48
|
+
:field-has-error
|
|
37
49
|
:required
|
|
38
|
-
:
|
|
50
|
+
:style-class-passthrough
|
|
39
51
|
:theme
|
|
40
|
-
:
|
|
52
|
+
:aria-describedby
|
|
41
53
|
:size
|
|
42
|
-
:
|
|
54
|
+
:input-variant
|
|
43
55
|
>
|
|
44
56
|
<template v-if="slots.left" #left>
|
|
45
57
|
<slot name="left"></slot>
|
|
@@ -52,9 +64,21 @@
|
|
|
52
64
|
<InputError :errorMessage :showError="fieldHasError" :id="errorId" :isDetached="false" :inputVariant />
|
|
53
65
|
</div>
|
|
54
66
|
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
67
|
+
<InputDescription
|
|
68
|
+
v-if="inputVariant === 'outlined'"
|
|
69
|
+
:id
|
|
70
|
+
:name
|
|
71
|
+
:input-variant
|
|
72
|
+
:field-has-error="fieldHasError"
|
|
73
|
+
:style-class-passthrough="['input-text-description']"
|
|
74
|
+
>
|
|
75
|
+
<template v-if="slots.descriptionHtml" #descriptionHtml>
|
|
76
|
+
<slot name="descriptionHtml"></slot>
|
|
77
|
+
</template>
|
|
78
|
+
<template v-if="slots.descriptionText" #descriptionText>
|
|
79
|
+
<slot name="descriptionText"></slot>
|
|
80
|
+
</template>
|
|
81
|
+
</InputDescription>
|
|
58
82
|
</div>
|
|
59
83
|
</template>
|
|
60
84
|
|
|
@@ -136,7 +160,7 @@ const formTheme = computed(() => {
|
|
|
136
160
|
const id = `${props.name}-${useId()}`
|
|
137
161
|
const errorId = `${id}-error-message`
|
|
138
162
|
const ariaDescribedby = computed(() => {
|
|
139
|
-
const ariaDescribedbyId = slots.
|
|
163
|
+
const ariaDescribedbyId = slots.descriptionText || slots.descriptionHtml ? `${id}-description` : undefined
|
|
140
164
|
return props.fieldHasError ? errorId : ariaDescribedbyId
|
|
141
165
|
})
|
|
142
166
|
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
v-model="modelValue"
|
|
27
27
|
ref="inputField"
|
|
28
28
|
:aria-invalid="fieldHasError"
|
|
29
|
-
:aria-describedby
|
|
29
|
+
:aria-describedby
|
|
30
30
|
@focusin="updateFocus(true)"
|
|
31
31
|
@focusout="updateFocus(false)"
|
|
32
32
|
></textarea>
|
|
@@ -56,6 +56,10 @@ const props = defineProps({
|
|
|
56
56
|
type: String,
|
|
57
57
|
default: "",
|
|
58
58
|
},
|
|
59
|
+
ariaDescribedby: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: "",
|
|
62
|
+
},
|
|
59
63
|
fieldHasError: {
|
|
60
64
|
type: Boolean,
|
|
61
65
|
default: false,
|
|
@@ -1,45 +1,79 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<InputLabel
|
|
8
|
-
:for="id"
|
|
9
|
-
:id
|
|
10
|
-
:theme
|
|
11
|
-
:name
|
|
12
|
-
:input-variant
|
|
13
|
-
:field-has-error
|
|
14
|
-
:style-class-passthrough="['input-textarea-label']"
|
|
2
|
+
<div>
|
|
3
|
+
<div
|
|
4
|
+
class="input-textarea-with-label"
|
|
5
|
+
:data-theme="formTheme"
|
|
6
|
+
:class="[elementClasses, inputVariant, { dirty: isDirty }, { active: isActive }]"
|
|
15
7
|
>
|
|
16
|
-
<
|
|
17
|
-
|
|
8
|
+
<InputLabel
|
|
9
|
+
:for="id"
|
|
10
|
+
:id
|
|
11
|
+
:theme
|
|
12
|
+
:name
|
|
13
|
+
:input-variant
|
|
14
|
+
:field-has-error
|
|
15
|
+
:style-class-passthrough="['input-textarea-label']"
|
|
16
|
+
>
|
|
17
|
+
<template #textLabel>{{ label }}</template>
|
|
18
|
+
</InputLabel>
|
|
19
|
+
|
|
20
|
+
<InputDescription
|
|
21
|
+
v-if="inputVariant !== 'outlined'"
|
|
22
|
+
:id
|
|
23
|
+
:name
|
|
24
|
+
:input-variant
|
|
25
|
+
:field-has-error="fieldHasError"
|
|
26
|
+
:style-class-passthrough="['input-text-description']"
|
|
27
|
+
>
|
|
28
|
+
<template v-if="slots.descriptionHtml" #descriptionHtml>
|
|
29
|
+
<slot name="descriptionHtml"></slot>
|
|
30
|
+
</template>
|
|
31
|
+
<template v-if="slots.descriptionText" #descriptionText>
|
|
32
|
+
<slot name="descriptionText"></slot>
|
|
33
|
+
</template>
|
|
34
|
+
</InputDescription>
|
|
18
35
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
36
|
+
<InputTextareaCore
|
|
37
|
+
v-model="modelValue"
|
|
38
|
+
v-model:isDirty="isDirty"
|
|
39
|
+
v-model:isActive="isActive"
|
|
40
|
+
:maxlength
|
|
41
|
+
:id
|
|
42
|
+
:name
|
|
43
|
+
:placeholder
|
|
44
|
+
:label
|
|
45
|
+
:field-has-error
|
|
46
|
+
:required
|
|
47
|
+
:style-class-passthrough
|
|
48
|
+
:theme
|
|
49
|
+
:size
|
|
50
|
+
:input-variant
|
|
51
|
+
>
|
|
52
|
+
<template v-if="slots.left" #left>
|
|
53
|
+
<slot name="left"></slot>
|
|
54
|
+
</template>
|
|
55
|
+
<template v-if="slots.right" #right>
|
|
56
|
+
<slot name="right"></slot>
|
|
57
|
+
</template>
|
|
58
|
+
</InputTextareaCore>
|
|
59
|
+
<InputError :errorMessage :showError="fieldHasError" :id :isDetached="false" :inputVariant />
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<InputDescription
|
|
63
|
+
v-if="inputVariant === 'outlined'"
|
|
24
64
|
:id
|
|
25
65
|
:name
|
|
26
|
-
:
|
|
27
|
-
:
|
|
28
|
-
:
|
|
29
|
-
:required
|
|
30
|
-
:styleClassPassthrough
|
|
31
|
-
:theme
|
|
32
|
-
:size
|
|
33
|
-
:inputVariant
|
|
66
|
+
:input-variant
|
|
67
|
+
:field-has-error="fieldHasError"
|
|
68
|
+
:style-class-passthrough="['input-text-description']"
|
|
34
69
|
>
|
|
35
|
-
<template v-if="slots.
|
|
36
|
-
<slot name="
|
|
70
|
+
<template v-if="slots.descriptionHtml" #descriptionHtml>
|
|
71
|
+
<slot name="descriptionHtml"></slot>
|
|
37
72
|
</template>
|
|
38
|
-
<template v-if="slots.
|
|
39
|
-
<slot name="
|
|
73
|
+
<template v-if="slots.descriptionText" #descriptionText>
|
|
74
|
+
<slot name="descriptionText"></slot>
|
|
40
75
|
</template>
|
|
41
|
-
</
|
|
42
|
-
<InputError :errorMessage :showError="fieldHasError" :id :isDetached="false" :inputVariant />
|
|
76
|
+
</InputDescription>
|
|
43
77
|
</div>
|
|
44
78
|
</template>
|
|
45
79
|
|
|
@@ -103,11 +137,17 @@ const props = defineProps({
|
|
|
103
137
|
|
|
104
138
|
const slots = useSlots()
|
|
105
139
|
|
|
106
|
-
const id = useId()
|
|
107
140
|
const formTheme = computed(() => {
|
|
108
141
|
return props.fieldHasError ? "error" : props.theme
|
|
109
142
|
})
|
|
110
143
|
|
|
144
|
+
const id = `${props.name}-${useId()}`
|
|
145
|
+
const errorId = `${id}-error-message`
|
|
146
|
+
const ariaDescribedby = computed(() => {
|
|
147
|
+
const ariaDescribedbyId = slots.descriptionText || slots.descriptionHtml ? `${id}-description` : undefined
|
|
148
|
+
return props.fieldHasError ? errorId : ariaDescribedbyId
|
|
149
|
+
})
|
|
150
|
+
|
|
111
151
|
const modelValue = defineModel<string | number | readonly string[] | null | undefined>()
|
|
112
152
|
const isActive = ref<boolean>(false)
|
|
113
153
|
const isDirty = ref<boolean>(false)
|
package/package.json
CHANGED