@whatsaaaa/design-system 0.8.3 → 0.9.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.
- package/README.md +13 -11
- package/dist/index.css +63 -0
- package/dist/tailwind/theme.css +9 -0
- package/dist/tokens.css +77 -1
- package/dist/tokens.d.ts +60 -2
- package/dist/tokens.js +118 -2
- package/docs/usage.md +52 -23
- package/package.json +4 -1
- package/specs/button.spec.json +903 -0
- package/specs/input.spec.json +800 -0
- package/specs/spec.schema.json +347 -0
- package/tokens/components/button.tokens.json +75 -0
- package/tokens/components/control.tokens.json +43 -0
- package/tokens/components/field.tokens.json +40 -0
- package/tokens/contrast.json +12 -0
- package/tokens/core.tokens.json +36 -1
- package/tokens/theme-dark.tokens.json +4 -0
- package/tokens/theme-light.tokens.json +8 -0
- package/tokens/whatsaaaa.resolver.json +17 -1
- package/dist/css/nuxt-ui.css +0 -125
|
@@ -0,0 +1,800 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./spec.schema.json",
|
|
3
|
+
"component": "input",
|
|
4
|
+
"title": "Input",
|
|
5
|
+
"status": "draft",
|
|
6
|
+
"changed": "0.9.0",
|
|
7
|
+
"summary": "One line of text, in a field with its label above it and its help or its error under it: the value in Inter, an edge in the field border, the control height.",
|
|
8
|
+
"use": [
|
|
9
|
+
"One line of text: a name, an email address, a number, a date typed out.",
|
|
10
|
+
"Always inside its form field: an input is never shown without its label."
|
|
11
|
+
],
|
|
12
|
+
"notFor": [
|
|
13
|
+
"Text of more than one line: that is a text area.",
|
|
14
|
+
"One choice from a list: that is a select, or radio buttons for a few options.",
|
|
15
|
+
"A value that cannot be changed, such as on a review step: that is a list of terms and values, `ws-pairs`."
|
|
16
|
+
],
|
|
17
|
+
"parts": {
|
|
18
|
+
"root": "The box, and the value typed in it: the native input element.",
|
|
19
|
+
"placeholder": "Text in an empty box. The system uses none: a hint goes under the field.",
|
|
20
|
+
"leading-icon": "An icon before the value, such as a mail icon, and the turning loading icon of a loading field.",
|
|
21
|
+
"trailing-icon": "An icon after the value.",
|
|
22
|
+
"label": "The field's name, above the box.",
|
|
23
|
+
"required": "The asterisk after the label of a field that must be filled in.",
|
|
24
|
+
"help": "The help under the box: what to enter, or why.",
|
|
25
|
+
"error": "The error under the box, in place of the help: what is wrong and how to fix it.",
|
|
26
|
+
"error-icon": "The danger icon before the error."
|
|
27
|
+
},
|
|
28
|
+
"variants": {
|
|
29
|
+
"outline": "The one look of a field: an edge in the field border, on the page color."
|
|
30
|
+
},
|
|
31
|
+
"sizes": {
|
|
32
|
+
"xs": "A dense row, such as a filter in a table's head.",
|
|
33
|
+
"sm": "A bar or a toolbar.",
|
|
34
|
+
"md": "Every other field: a form, a dialog.",
|
|
35
|
+
"lg": "A form of one or two fields that a page leads to, such as a sign-up.",
|
|
36
|
+
"xl": "A landing page's one field, such as a search."
|
|
37
|
+
},
|
|
38
|
+
"defaultSize": "md",
|
|
39
|
+
"states": {
|
|
40
|
+
"rest": "Nothing is on it.",
|
|
41
|
+
"hover": "The pointer is on it.",
|
|
42
|
+
"focus": "It has the focus, as `:focus-visible` says, which a text field has from a click too.",
|
|
43
|
+
"invalid": "Its value is wrong: `aria-invalid` is true, and the error is under it.",
|
|
44
|
+
"disabled": "It cannot be changed now.",
|
|
45
|
+
"loading": "Its value is being checked: the leading icon turns, and the field can still be typed in."
|
|
46
|
+
},
|
|
47
|
+
"icons": {
|
|
48
|
+
"loading": "loader-circle",
|
|
49
|
+
"error": "octagon-alert"
|
|
50
|
+
},
|
|
51
|
+
"stateTable": [
|
|
52
|
+
{
|
|
53
|
+
"variant": "*",
|
|
54
|
+
"state": "rest",
|
|
55
|
+
"part": "root",
|
|
56
|
+
"property": "background-color",
|
|
57
|
+
"token": "field.bg"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"variant": "*",
|
|
61
|
+
"state": "rest",
|
|
62
|
+
"part": "root",
|
|
63
|
+
"property": "color",
|
|
64
|
+
"token": "field.text.rest"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"variant": "*",
|
|
68
|
+
"state": "rest",
|
|
69
|
+
"part": "root",
|
|
70
|
+
"property": "font-family",
|
|
71
|
+
"token": "font.family.sans"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"variant": "*",
|
|
75
|
+
"state": "rest",
|
|
76
|
+
"part": "root",
|
|
77
|
+
"property": "border-style",
|
|
78
|
+
"value": "solid"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"variant": "*",
|
|
82
|
+
"state": "rest",
|
|
83
|
+
"part": "root",
|
|
84
|
+
"property": "border-width",
|
|
85
|
+
"token": "control.border-width.rest"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"variant": "*",
|
|
89
|
+
"state": "rest",
|
|
90
|
+
"part": "root",
|
|
91
|
+
"property": "border-color",
|
|
92
|
+
"token": "field.border.rest"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"variant": "*",
|
|
96
|
+
"state": "rest",
|
|
97
|
+
"part": "root",
|
|
98
|
+
"property": "border-radius",
|
|
99
|
+
"token": "control.radius"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"variant": "*",
|
|
103
|
+
"state": "hover",
|
|
104
|
+
"part": "root",
|
|
105
|
+
"property": "border-color",
|
|
106
|
+
"token": "field.border.hover"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"variant": "*",
|
|
110
|
+
"state": "focus",
|
|
111
|
+
"part": "root",
|
|
112
|
+
"property": "border-color",
|
|
113
|
+
"token": "field.border.rest"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"variant": "*",
|
|
117
|
+
"state": "focus",
|
|
118
|
+
"part": "root",
|
|
119
|
+
"property": "outline-color",
|
|
120
|
+
"token": "color.interactive"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"variant": "*",
|
|
124
|
+
"state": "focus",
|
|
125
|
+
"part": "root",
|
|
126
|
+
"property": "outline-style",
|
|
127
|
+
"value": "solid"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"variant": "*",
|
|
131
|
+
"state": "focus",
|
|
132
|
+
"part": "root",
|
|
133
|
+
"property": "outline-width",
|
|
134
|
+
"token": "border-width.medium"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"variant": "*",
|
|
138
|
+
"state": "focus",
|
|
139
|
+
"part": "root",
|
|
140
|
+
"property": "outline-offset",
|
|
141
|
+
"value": "3px"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"variant": "*",
|
|
145
|
+
"state": "invalid",
|
|
146
|
+
"part": "root",
|
|
147
|
+
"property": "border-color",
|
|
148
|
+
"token": "field.border.invalid"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"variant": "*",
|
|
152
|
+
"state": "invalid",
|
|
153
|
+
"part": "root",
|
|
154
|
+
"property": "border-width",
|
|
155
|
+
"token": "control.border-width.invalid"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"variant": "*",
|
|
159
|
+
"state": "disabled",
|
|
160
|
+
"part": "root",
|
|
161
|
+
"property": "border-color",
|
|
162
|
+
"token": "field.border.disabled"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"variant": "*",
|
|
166
|
+
"state": "disabled",
|
|
167
|
+
"part": "root",
|
|
168
|
+
"property": "color",
|
|
169
|
+
"token": "field.text.disabled"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"variant": "*",
|
|
173
|
+
"state": "rest",
|
|
174
|
+
"part": "placeholder",
|
|
175
|
+
"property": "color",
|
|
176
|
+
"token": "color.text-secondary"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"variant": "*",
|
|
180
|
+
"state": "rest",
|
|
181
|
+
"part": "leading-icon",
|
|
182
|
+
"property": "color",
|
|
183
|
+
"token": "field.icon"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"variant": "*",
|
|
187
|
+
"state": "rest",
|
|
188
|
+
"part": "trailing-icon",
|
|
189
|
+
"property": "color",
|
|
190
|
+
"token": "field.icon"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"variant": "*",
|
|
194
|
+
"state": "rest",
|
|
195
|
+
"part": "label",
|
|
196
|
+
"property": "color",
|
|
197
|
+
"token": "field.label.text"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"variant": "*",
|
|
201
|
+
"state": "rest",
|
|
202
|
+
"part": "label",
|
|
203
|
+
"property": "font-family",
|
|
204
|
+
"token": "font.family.mono"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"variant": "*",
|
|
208
|
+
"state": "rest",
|
|
209
|
+
"part": "label",
|
|
210
|
+
"property": "font-weight",
|
|
211
|
+
"token": "font.weight.regular"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"variant": "*",
|
|
215
|
+
"state": "rest",
|
|
216
|
+
"part": "required",
|
|
217
|
+
"property": "color",
|
|
218
|
+
"token": "field.required.text"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"variant": "*",
|
|
222
|
+
"state": "rest",
|
|
223
|
+
"part": "help",
|
|
224
|
+
"property": "color",
|
|
225
|
+
"token": "field.help.text"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"variant": "*",
|
|
229
|
+
"state": "rest",
|
|
230
|
+
"part": "help",
|
|
231
|
+
"property": "font-family",
|
|
232
|
+
"token": "font.family.sans"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"variant": "*",
|
|
236
|
+
"state": "invalid",
|
|
237
|
+
"part": "error",
|
|
238
|
+
"property": "color",
|
|
239
|
+
"token": "field.error.text"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"variant": "*",
|
|
243
|
+
"state": "invalid",
|
|
244
|
+
"part": "error",
|
|
245
|
+
"property": "font-family",
|
|
246
|
+
"token": "font.family.sans"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"variant": "*",
|
|
250
|
+
"state": "invalid",
|
|
251
|
+
"part": "error",
|
|
252
|
+
"property": "font-weight",
|
|
253
|
+
"token": "field.error.font-weight"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"variant": "*",
|
|
257
|
+
"state": "invalid",
|
|
258
|
+
"part": "error-icon",
|
|
259
|
+
"property": "color",
|
|
260
|
+
"token": "field.error.icon"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"variant": "*",
|
|
264
|
+
"state": "invalid",
|
|
265
|
+
"part": "error-icon",
|
|
266
|
+
"property": "width",
|
|
267
|
+
"token": "size.icon"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"variant": "*",
|
|
271
|
+
"state": "invalid",
|
|
272
|
+
"part": "error-icon",
|
|
273
|
+
"property": "height",
|
|
274
|
+
"token": "size.icon"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"variant": "*",
|
|
278
|
+
"state": "rest",
|
|
279
|
+
"part": "root",
|
|
280
|
+
"property": "height",
|
|
281
|
+
"size": "xs",
|
|
282
|
+
"token": "control.height.xs"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"variant": "*",
|
|
286
|
+
"state": "rest",
|
|
287
|
+
"part": "root",
|
|
288
|
+
"property": "padding-inline",
|
|
289
|
+
"size": "xs",
|
|
290
|
+
"token": "space.8"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"variant": "*",
|
|
294
|
+
"state": "rest",
|
|
295
|
+
"part": "root",
|
|
296
|
+
"property": "font-size",
|
|
297
|
+
"size": "xs",
|
|
298
|
+
"token": "text.body-sm"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"variant": "*",
|
|
302
|
+
"state": "rest",
|
|
303
|
+
"part": "leading-icon",
|
|
304
|
+
"property": "width",
|
|
305
|
+
"size": "xs",
|
|
306
|
+
"token": "control.icon-size.xs"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"variant": "*",
|
|
310
|
+
"state": "rest",
|
|
311
|
+
"part": "leading-icon",
|
|
312
|
+
"property": "height",
|
|
313
|
+
"size": "xs",
|
|
314
|
+
"token": "control.icon-size.xs"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"variant": "*",
|
|
318
|
+
"state": "rest",
|
|
319
|
+
"part": "trailing-icon",
|
|
320
|
+
"property": "width",
|
|
321
|
+
"size": "xs",
|
|
322
|
+
"token": "control.icon-size.xs"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"variant": "*",
|
|
326
|
+
"state": "rest",
|
|
327
|
+
"part": "trailing-icon",
|
|
328
|
+
"property": "height",
|
|
329
|
+
"size": "xs",
|
|
330
|
+
"token": "control.icon-size.xs"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"variant": "*",
|
|
334
|
+
"state": "rest",
|
|
335
|
+
"part": "label",
|
|
336
|
+
"property": "font-size",
|
|
337
|
+
"size": "xs",
|
|
338
|
+
"token": "text.label-sm"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"variant": "*",
|
|
342
|
+
"state": "rest",
|
|
343
|
+
"part": "help",
|
|
344
|
+
"property": "font-size",
|
|
345
|
+
"size": "xs",
|
|
346
|
+
"token": "text.body-sm"
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"variant": "*",
|
|
350
|
+
"state": "invalid",
|
|
351
|
+
"part": "error",
|
|
352
|
+
"property": "font-size",
|
|
353
|
+
"size": "xs",
|
|
354
|
+
"token": "text.body-sm"
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"variant": "*",
|
|
358
|
+
"state": "rest",
|
|
359
|
+
"part": "root",
|
|
360
|
+
"property": "height",
|
|
361
|
+
"size": "sm",
|
|
362
|
+
"token": "control.height.sm"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"variant": "*",
|
|
366
|
+
"state": "rest",
|
|
367
|
+
"part": "root",
|
|
368
|
+
"property": "padding-inline",
|
|
369
|
+
"size": "sm",
|
|
370
|
+
"token": "space.10"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"variant": "*",
|
|
374
|
+
"state": "rest",
|
|
375
|
+
"part": "root",
|
|
376
|
+
"property": "font-size",
|
|
377
|
+
"size": "sm",
|
|
378
|
+
"token": "text.body-sm"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"variant": "*",
|
|
382
|
+
"state": "rest",
|
|
383
|
+
"part": "leading-icon",
|
|
384
|
+
"property": "width",
|
|
385
|
+
"size": "sm",
|
|
386
|
+
"token": "control.icon-size.sm"
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"variant": "*",
|
|
390
|
+
"state": "rest",
|
|
391
|
+
"part": "leading-icon",
|
|
392
|
+
"property": "height",
|
|
393
|
+
"size": "sm",
|
|
394
|
+
"token": "control.icon-size.sm"
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"variant": "*",
|
|
398
|
+
"state": "rest",
|
|
399
|
+
"part": "trailing-icon",
|
|
400
|
+
"property": "width",
|
|
401
|
+
"size": "sm",
|
|
402
|
+
"token": "control.icon-size.sm"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"variant": "*",
|
|
406
|
+
"state": "rest",
|
|
407
|
+
"part": "trailing-icon",
|
|
408
|
+
"property": "height",
|
|
409
|
+
"size": "sm",
|
|
410
|
+
"token": "control.icon-size.sm"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"variant": "*",
|
|
414
|
+
"state": "rest",
|
|
415
|
+
"part": "label",
|
|
416
|
+
"property": "font-size",
|
|
417
|
+
"size": "sm",
|
|
418
|
+
"token": "text.label-sm"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"variant": "*",
|
|
422
|
+
"state": "rest",
|
|
423
|
+
"part": "help",
|
|
424
|
+
"property": "font-size",
|
|
425
|
+
"size": "sm",
|
|
426
|
+
"token": "text.body-sm"
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"variant": "*",
|
|
430
|
+
"state": "invalid",
|
|
431
|
+
"part": "error",
|
|
432
|
+
"property": "font-size",
|
|
433
|
+
"size": "sm",
|
|
434
|
+
"token": "text.body-sm"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"variant": "*",
|
|
438
|
+
"state": "rest",
|
|
439
|
+
"part": "root",
|
|
440
|
+
"property": "height",
|
|
441
|
+
"size": "md",
|
|
442
|
+
"token": "control.height.md"
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"variant": "*",
|
|
446
|
+
"state": "rest",
|
|
447
|
+
"part": "root",
|
|
448
|
+
"property": "padding-inline",
|
|
449
|
+
"size": "md",
|
|
450
|
+
"token": "space.12"
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"variant": "*",
|
|
454
|
+
"state": "rest",
|
|
455
|
+
"part": "root",
|
|
456
|
+
"property": "font-size",
|
|
457
|
+
"size": "md",
|
|
458
|
+
"token": "text.body"
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"variant": "*",
|
|
462
|
+
"state": "rest",
|
|
463
|
+
"part": "leading-icon",
|
|
464
|
+
"property": "width",
|
|
465
|
+
"size": "md",
|
|
466
|
+
"token": "control.icon-size.md"
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"variant": "*",
|
|
470
|
+
"state": "rest",
|
|
471
|
+
"part": "leading-icon",
|
|
472
|
+
"property": "height",
|
|
473
|
+
"size": "md",
|
|
474
|
+
"token": "control.icon-size.md"
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"variant": "*",
|
|
478
|
+
"state": "rest",
|
|
479
|
+
"part": "trailing-icon",
|
|
480
|
+
"property": "width",
|
|
481
|
+
"size": "md",
|
|
482
|
+
"token": "control.icon-size.md"
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
"variant": "*",
|
|
486
|
+
"state": "rest",
|
|
487
|
+
"part": "trailing-icon",
|
|
488
|
+
"property": "height",
|
|
489
|
+
"size": "md",
|
|
490
|
+
"token": "control.icon-size.md"
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"variant": "*",
|
|
494
|
+
"state": "rest",
|
|
495
|
+
"part": "label",
|
|
496
|
+
"property": "font-size",
|
|
497
|
+
"size": "md",
|
|
498
|
+
"token": "text.label"
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
"variant": "*",
|
|
502
|
+
"state": "rest",
|
|
503
|
+
"part": "help",
|
|
504
|
+
"property": "font-size",
|
|
505
|
+
"size": "md",
|
|
506
|
+
"token": "text.body-sm"
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"variant": "*",
|
|
510
|
+
"state": "invalid",
|
|
511
|
+
"part": "error",
|
|
512
|
+
"property": "font-size",
|
|
513
|
+
"size": "md",
|
|
514
|
+
"token": "text.body-sm"
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
"variant": "*",
|
|
518
|
+
"state": "rest",
|
|
519
|
+
"part": "root",
|
|
520
|
+
"property": "height",
|
|
521
|
+
"size": "lg",
|
|
522
|
+
"token": "control.height.lg"
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"variant": "*",
|
|
526
|
+
"state": "rest",
|
|
527
|
+
"part": "root",
|
|
528
|
+
"property": "padding-inline",
|
|
529
|
+
"size": "lg",
|
|
530
|
+
"token": "space.14"
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
"variant": "*",
|
|
534
|
+
"state": "rest",
|
|
535
|
+
"part": "root",
|
|
536
|
+
"property": "font-size",
|
|
537
|
+
"size": "lg",
|
|
538
|
+
"token": "text.body"
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"variant": "*",
|
|
542
|
+
"state": "rest",
|
|
543
|
+
"part": "leading-icon",
|
|
544
|
+
"property": "width",
|
|
545
|
+
"size": "lg",
|
|
546
|
+
"token": "control.icon-size.lg"
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"variant": "*",
|
|
550
|
+
"state": "rest",
|
|
551
|
+
"part": "leading-icon",
|
|
552
|
+
"property": "height",
|
|
553
|
+
"size": "lg",
|
|
554
|
+
"token": "control.icon-size.lg"
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
"variant": "*",
|
|
558
|
+
"state": "rest",
|
|
559
|
+
"part": "trailing-icon",
|
|
560
|
+
"property": "width",
|
|
561
|
+
"size": "lg",
|
|
562
|
+
"token": "control.icon-size.lg"
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
"variant": "*",
|
|
566
|
+
"state": "rest",
|
|
567
|
+
"part": "trailing-icon",
|
|
568
|
+
"property": "height",
|
|
569
|
+
"size": "lg",
|
|
570
|
+
"token": "control.icon-size.lg"
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
"variant": "*",
|
|
574
|
+
"state": "rest",
|
|
575
|
+
"part": "label",
|
|
576
|
+
"property": "font-size",
|
|
577
|
+
"size": "lg",
|
|
578
|
+
"token": "text.label"
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"variant": "*",
|
|
582
|
+
"state": "rest",
|
|
583
|
+
"part": "help",
|
|
584
|
+
"property": "font-size",
|
|
585
|
+
"size": "lg",
|
|
586
|
+
"token": "text.body-sm"
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
"variant": "*",
|
|
590
|
+
"state": "invalid",
|
|
591
|
+
"part": "error",
|
|
592
|
+
"property": "font-size",
|
|
593
|
+
"size": "lg",
|
|
594
|
+
"token": "text.body-sm"
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"variant": "*",
|
|
598
|
+
"state": "rest",
|
|
599
|
+
"part": "root",
|
|
600
|
+
"property": "height",
|
|
601
|
+
"size": "xl",
|
|
602
|
+
"token": "control.height.xl"
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
"variant": "*",
|
|
606
|
+
"state": "rest",
|
|
607
|
+
"part": "root",
|
|
608
|
+
"property": "padding-inline",
|
|
609
|
+
"size": "xl",
|
|
610
|
+
"token": "space.16"
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
"variant": "*",
|
|
614
|
+
"state": "rest",
|
|
615
|
+
"part": "root",
|
|
616
|
+
"property": "font-size",
|
|
617
|
+
"size": "xl",
|
|
618
|
+
"token": "text.body"
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
"variant": "*",
|
|
622
|
+
"state": "rest",
|
|
623
|
+
"part": "leading-icon",
|
|
624
|
+
"property": "width",
|
|
625
|
+
"size": "xl",
|
|
626
|
+
"token": "control.icon-size.xl"
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
"variant": "*",
|
|
630
|
+
"state": "rest",
|
|
631
|
+
"part": "leading-icon",
|
|
632
|
+
"property": "height",
|
|
633
|
+
"size": "xl",
|
|
634
|
+
"token": "control.icon-size.xl"
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
"variant": "*",
|
|
638
|
+
"state": "rest",
|
|
639
|
+
"part": "trailing-icon",
|
|
640
|
+
"property": "width",
|
|
641
|
+
"size": "xl",
|
|
642
|
+
"token": "control.icon-size.xl"
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
"variant": "*",
|
|
646
|
+
"state": "rest",
|
|
647
|
+
"part": "trailing-icon",
|
|
648
|
+
"property": "height",
|
|
649
|
+
"size": "xl",
|
|
650
|
+
"token": "control.icon-size.xl"
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
"variant": "*",
|
|
654
|
+
"state": "rest",
|
|
655
|
+
"part": "label",
|
|
656
|
+
"property": "font-size",
|
|
657
|
+
"size": "xl",
|
|
658
|
+
"token": "text.label"
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
"variant": "*",
|
|
662
|
+
"state": "rest",
|
|
663
|
+
"part": "help",
|
|
664
|
+
"property": "font-size",
|
|
665
|
+
"size": "xl",
|
|
666
|
+
"token": "text.body"
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
"variant": "*",
|
|
670
|
+
"state": "invalid",
|
|
671
|
+
"part": "error",
|
|
672
|
+
"property": "font-size",
|
|
673
|
+
"size": "xl",
|
|
674
|
+
"token": "text.body"
|
|
675
|
+
}
|
|
676
|
+
],
|
|
677
|
+
"keyboard": [
|
|
678
|
+
{
|
|
679
|
+
"keys": ["Tab", "Shift+Tab"],
|
|
680
|
+
"effect": "Moves the focus into the field and on to the next or the previous control. A disabled field is skipped."
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
"keys": ["Enter"],
|
|
684
|
+
"effect": "Sends the form the field is in, where the form has a submit button, as the browser does."
|
|
685
|
+
}
|
|
686
|
+
],
|
|
687
|
+
"aria": {
|
|
688
|
+
"pattern": "https://html.spec.whatwg.org/multipage/input.html",
|
|
689
|
+
"rules": [
|
|
690
|
+
"It is a native input element with the type of its value, such as email or tel, and an autocomplete where the browser can fill it in.",
|
|
691
|
+
"The label is a label element for the input: its accessible name.",
|
|
692
|
+
"The help and the error are its description, by `aria-describedby`. While the error shows it takes the help's place.",
|
|
693
|
+
"A field in error has `aria-invalid` true. Its error says how to fix it, and is never a color alone: it has its word and its icon.",
|
|
694
|
+
"A required field has the required attribute, which assistive technology reads; the asterisk shows it.",
|
|
695
|
+
"A disabled field is the native disabled attribute."
|
|
696
|
+
]
|
|
697
|
+
},
|
|
698
|
+
"forcedColors": [
|
|
699
|
+
"The edge is a real border, which forced colors keep in the system's colors, and in `GrayText` when the field is disabled.",
|
|
700
|
+
"The focus ring is an outline, which forced colors keep.",
|
|
701
|
+
"The error icon takes the system's text color, as the error's word does, so both still say it is an error."
|
|
702
|
+
],
|
|
703
|
+
"motion": [
|
|
704
|
+
"The edge changes color in `motion.duration.fast`, with `motion.easing.standard`. With `prefers-reduced-motion: reduce` it changes at once.",
|
|
705
|
+
"The loading icon turns only with `prefers-reduced-motion: no-preference`."
|
|
706
|
+
],
|
|
707
|
+
"content": [
|
|
708
|
+
"The label names the value, in sentence case and with no colon: Full name, Email address.",
|
|
709
|
+
"No placeholders. What to enter goes in the help under the field: As on your ID.",
|
|
710
|
+
"An error says how to fix it, not only what is wrong: Enter an email address with a domain, such as maya@example.com."
|
|
711
|
+
],
|
|
712
|
+
"notes": [
|
|
713
|
+
"Read-only is not specced: a value that cannot be changed, as on a review step, is shown as a term and its value, with `ws-pairs`.",
|
|
714
|
+
"Nuxt UI's hint, beside the label, is not part of the spec: hints go under the field, as its help.",
|
|
715
|
+
"The value starts past an icon by the field's padding, the icon and the control's gap."
|
|
716
|
+
],
|
|
717
|
+
"implementations": {
|
|
718
|
+
"ui-vue": {
|
|
719
|
+
"library": "Nuxt UI 4.12, themed by ui-vue's app config",
|
|
720
|
+
"status": "shipped",
|
|
721
|
+
"parity": "none",
|
|
722
|
+
"components": ["UInput", "UFormField"],
|
|
723
|
+
"today": "The outline variant, inside a form field, in Nuxt UI's five sizes. Its heights, paddings, value sizes, edge colors, focus ring, label, help and error already match the spec, and its icons are 16 px up to md and 20 px above. It reads the system's roles through Tailwind utilities, not the component tokens yet.",
|
|
724
|
+
"parts": {
|
|
725
|
+
"root": "base",
|
|
726
|
+
"placeholder": "base::placeholder",
|
|
727
|
+
"leading-icon": "leadingIcon",
|
|
728
|
+
"trailing-icon": "trailingIcon",
|
|
729
|
+
"label": "label",
|
|
730
|
+
"required": "label::after",
|
|
731
|
+
"help": "help",
|
|
732
|
+
"error": "error",
|
|
733
|
+
"error-icon": "error::before"
|
|
734
|
+
},
|
|
735
|
+
"variants": {
|
|
736
|
+
"outline": {
|
|
737
|
+
"variant": "outline"
|
|
738
|
+
}
|
|
739
|
+
},
|
|
740
|
+
"sizes": {
|
|
741
|
+
"xs": {
|
|
742
|
+
"size": "xs"
|
|
743
|
+
},
|
|
744
|
+
"sm": {
|
|
745
|
+
"size": "sm"
|
|
746
|
+
},
|
|
747
|
+
"md": {
|
|
748
|
+
"size": "md"
|
|
749
|
+
},
|
|
750
|
+
"lg": {
|
|
751
|
+
"size": "lg"
|
|
752
|
+
},
|
|
753
|
+
"xl": {
|
|
754
|
+
"size": "xl"
|
|
755
|
+
}
|
|
756
|
+
},
|
|
757
|
+
"deviations": [
|
|
758
|
+
{
|
|
759
|
+
"summary": "The edge is an inset ring, a box shadow, and a border only in forced colors. So the rows for `border-color`, `border-style` and `border-width` do not hold."
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
"summary": "The required mark is `color.brand`, 3.84:1 on the light page, under the 4.5:1 of small text. The spec takes `field.required.text`, the darker red of the light theme, 4.73:1."
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
"summary": "A placeholder is `color.text-faint`, 3.42:1 in the dark theme and 4.02:1 in the light. The spec uses no placeholders, and gives one that an app passes anyway `color.text-secondary`."
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
"summary": "The error icon is the system's own danger glyph, drawn as a mask that fills its background with `field.error.icon` while its color is the error's. The spec names Lucide's `octagon-alert` in `currentcolor`."
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
"summary": "It reads the roles by their Tailwind utilities, such as `ring-field-border`, not the component tokens, such as `ring-(--ws-field-border-rest)`, so a change of the tier does not reach it."
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
"summary": "Its gallery shows the states and the sizes of the contract, but marks none of them with `data-spec`, so no test can find them by id yet."
|
|
775
|
+
}
|
|
776
|
+
],
|
|
777
|
+
"beyond": [
|
|
778
|
+
"The variants soft, subtle and ghost, and none, the bare field inside another control such as a select menu's search.",
|
|
779
|
+
"The highlight prop, which outlines a field in a color."
|
|
780
|
+
]
|
|
781
|
+
},
|
|
782
|
+
"ui-react": {
|
|
783
|
+
"library": "shadcn/ui on Radix",
|
|
784
|
+
"status": "planned",
|
|
785
|
+
"parity": "none"
|
|
786
|
+
}
|
|
787
|
+
},
|
|
788
|
+
"gallery": [
|
|
789
|
+
"input.outline.rest",
|
|
790
|
+
"input.outline.hover",
|
|
791
|
+
"input.outline.focus",
|
|
792
|
+
"input.outline.invalid",
|
|
793
|
+
"input.outline.disabled",
|
|
794
|
+
"input.outline.loading",
|
|
795
|
+
"input.outline.rest.xs",
|
|
796
|
+
"input.outline.rest.sm",
|
|
797
|
+
"input.outline.rest.lg",
|
|
798
|
+
"input.outline.rest.xl"
|
|
799
|
+
]
|
|
800
|
+
}
|