@whatsaaaa/design-system 0.8.2 → 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.
@@ -0,0 +1,903 @@
1
+ {
2
+ "$schema": "./spec.schema.json",
3
+ "component": "button",
4
+ "title": "Button",
5
+ "status": "draft",
6
+ "changed": "0.9.0",
7
+ "summary": "An action: a mono label in semibold, in a box of the control height, filled with the interactive color for the one action a view leads to and outlined for the rest.",
8
+ "use": [
9
+ "An action on the page: submit a form, save, open a dialog, delete.",
10
+ "One primary button in a view, for the action it leads to. Every other action is secondary, ghost or quiet."
11
+ ],
12
+ "notFor": [
13
+ "Going to another page: that is a link.",
14
+ "Choosing one of a few options: that is a segmented control or radio buttons.",
15
+ "A status: that is a tag."
16
+ ],
17
+ "parts": {
18
+ "root": "The box that takes the pointer and the focus: the native button element.",
19
+ "label": "The text, which says what the button does.",
20
+ "leading-icon": "An icon before the label, and the turning loading icon of a loading button.",
21
+ "trailing-icon": "An icon after the label, such as an arrow to the next step."
22
+ },
23
+ "variants": {
24
+ "primary": "The one action a view leads to, such as Register or Save: a fill of the interactive color. At most one in a view.",
25
+ "secondary": "Every other action, such as Cancel or Back: an edge in the field border, raised under the pointer.",
26
+ "ghost": "A minor action next to another, such as Later in a card's footer: no edge until the pointer is on it.",
27
+ "quiet": "An action that reads as a link, inside text or a dense row, such as Edit: the interactive color, underlined, with no box.",
28
+ "danger": "An action that deletes something or cannot be undone, such as Delete registration: an outline in the danger color, in both themes."
29
+ },
30
+ "sizes": {
31
+ "xs": "A dense row, such as a table's actions.",
32
+ "sm": "A bar or a toolbar, such as a modal's close button.",
33
+ "md": "Every other button: a form, a dialog, a card.",
34
+ "lg": "A page that leads to one action, such as a sign-up's Register.",
35
+ "xl": "A landing page's one call to action."
36
+ },
37
+ "defaultSize": "md",
38
+ "states": {
39
+ "rest": "Nothing is on it.",
40
+ "hover": "The pointer is on it.",
41
+ "active": "It is pressed, by the pointer or by Enter or Space.",
42
+ "focus": "It has the keyboard's focus, as `:focus-visible` says.",
43
+ "disabled": "It cannot be used now.",
44
+ "loading": "Its action is running: it is disabled, keeps its look, and its leading icon turns."
45
+ },
46
+ "icons": {
47
+ "loading": "loader-circle"
48
+ },
49
+ "stateTable": [
50
+ {
51
+ "variant": "*",
52
+ "state": "rest",
53
+ "part": "root",
54
+ "property": "border-radius",
55
+ "token": "control.radius"
56
+ },
57
+ {
58
+ "variant": "*",
59
+ "state": "rest",
60
+ "part": "root",
61
+ "property": "font-family",
62
+ "token": "font.family.mono"
63
+ },
64
+ {
65
+ "variant": ["primary", "secondary", "ghost", "danger"],
66
+ "state": "rest",
67
+ "part": "root",
68
+ "property": "font-weight",
69
+ "token": "font.weight.semibold"
70
+ },
71
+ {
72
+ "variant": ["primary", "secondary", "ghost", "danger"],
73
+ "state": "rest",
74
+ "part": "root",
75
+ "property": "border-style",
76
+ "value": "solid"
77
+ },
78
+ {
79
+ "variant": ["primary", "secondary", "ghost", "danger"],
80
+ "state": "rest",
81
+ "part": "root",
82
+ "property": "border-width",
83
+ "token": "control.border-width.rest"
84
+ },
85
+ {
86
+ "variant": "primary",
87
+ "state": "rest",
88
+ "part": "root",
89
+ "property": "background-color",
90
+ "token": "button.primary.bg.rest"
91
+ },
92
+ {
93
+ "variant": "primary",
94
+ "state": "rest",
95
+ "part": "root",
96
+ "property": "border-color",
97
+ "token": "button.primary.bg.rest"
98
+ },
99
+ {
100
+ "variant": "primary",
101
+ "state": "rest",
102
+ "part": "root",
103
+ "property": "color",
104
+ "token": "button.primary.text.rest"
105
+ },
106
+ {
107
+ "variant": "primary",
108
+ "state": "hover",
109
+ "part": "root",
110
+ "property": "background-color",
111
+ "token": "button.primary.bg.hover"
112
+ },
113
+ {
114
+ "variant": "primary",
115
+ "state": "hover",
116
+ "part": "root",
117
+ "property": "border-color",
118
+ "token": "button.primary.bg.hover"
119
+ },
120
+ {
121
+ "variant": "primary",
122
+ "state": "active",
123
+ "part": "root",
124
+ "property": "background-color",
125
+ "token": "button.primary.bg.active"
126
+ },
127
+ {
128
+ "variant": "primary",
129
+ "state": "active",
130
+ "part": "root",
131
+ "property": "border-color",
132
+ "token": "button.primary.bg.active"
133
+ },
134
+ {
135
+ "variant": "primary",
136
+ "state": "disabled",
137
+ "part": "root",
138
+ "property": "background-color",
139
+ "value": "transparent"
140
+ },
141
+ {
142
+ "variant": "primary",
143
+ "state": "disabled",
144
+ "part": "root",
145
+ "property": "border-color",
146
+ "token": "button.border.disabled"
147
+ },
148
+ {
149
+ "variant": "primary",
150
+ "state": "disabled",
151
+ "part": "root",
152
+ "property": "color",
153
+ "token": "button.text.disabled"
154
+ },
155
+ {
156
+ "variant": "secondary",
157
+ "state": "rest",
158
+ "part": "root",
159
+ "property": "background-color",
160
+ "value": "transparent"
161
+ },
162
+ {
163
+ "variant": "secondary",
164
+ "state": "rest",
165
+ "part": "root",
166
+ "property": "border-color",
167
+ "token": "button.secondary.border.rest"
168
+ },
169
+ {
170
+ "variant": "secondary",
171
+ "state": "rest",
172
+ "part": "root",
173
+ "property": "color",
174
+ "token": "button.secondary.text.rest"
175
+ },
176
+ {
177
+ "variant": "secondary",
178
+ "state": "hover",
179
+ "part": "root",
180
+ "property": "background-color",
181
+ "token": "button.secondary.bg.hover"
182
+ },
183
+ {
184
+ "variant": "secondary",
185
+ "state": "hover",
186
+ "part": "root",
187
+ "property": "border-color",
188
+ "token": "button.secondary.border.hover"
189
+ },
190
+ {
191
+ "variant": "secondary",
192
+ "state": "active",
193
+ "part": "root",
194
+ "property": "background-color",
195
+ "token": "button.secondary.bg.active"
196
+ },
197
+ {
198
+ "variant": "secondary",
199
+ "state": "active",
200
+ "part": "root",
201
+ "property": "border-color",
202
+ "token": "button.secondary.border.active"
203
+ },
204
+ {
205
+ "variant": "secondary",
206
+ "state": "disabled",
207
+ "part": "root",
208
+ "property": "border-color",
209
+ "token": "button.border.disabled"
210
+ },
211
+ {
212
+ "variant": "secondary",
213
+ "state": "disabled",
214
+ "part": "root",
215
+ "property": "color",
216
+ "token": "button.text.disabled"
217
+ },
218
+ {
219
+ "variant": "ghost",
220
+ "state": "rest",
221
+ "part": "root",
222
+ "property": "background-color",
223
+ "value": "transparent"
224
+ },
225
+ {
226
+ "variant": "ghost",
227
+ "state": "rest",
228
+ "part": "root",
229
+ "property": "border-color",
230
+ "value": "transparent"
231
+ },
232
+ {
233
+ "variant": "ghost",
234
+ "state": "rest",
235
+ "part": "root",
236
+ "property": "color",
237
+ "token": "button.ghost.text.rest"
238
+ },
239
+ {
240
+ "variant": "ghost",
241
+ "state": "hover",
242
+ "part": "root",
243
+ "property": "background-color",
244
+ "token": "button.ghost.bg.hover"
245
+ },
246
+ {
247
+ "variant": "ghost",
248
+ "state": "active",
249
+ "part": "root",
250
+ "property": "background-color",
251
+ "token": "button.ghost.bg.active"
252
+ },
253
+ {
254
+ "variant": "ghost",
255
+ "state": "disabled",
256
+ "part": "root",
257
+ "property": "color",
258
+ "token": "button.text.disabled"
259
+ },
260
+ {
261
+ "variant": "quiet",
262
+ "state": "rest",
263
+ "part": "root",
264
+ "property": "background-color",
265
+ "value": "transparent"
266
+ },
267
+ {
268
+ "variant": "quiet",
269
+ "state": "rest",
270
+ "part": "root",
271
+ "property": "border-width",
272
+ "value": "0"
273
+ },
274
+ {
275
+ "variant": "quiet",
276
+ "state": "rest",
277
+ "part": "root",
278
+ "property": "color",
279
+ "token": "button.quiet.text.rest"
280
+ },
281
+ {
282
+ "variant": "quiet",
283
+ "state": "rest",
284
+ "part": "root",
285
+ "property": "font-weight",
286
+ "token": "font.weight.regular"
287
+ },
288
+ {
289
+ "variant": "quiet",
290
+ "state": "rest",
291
+ "part": "root",
292
+ "property": "padding-inline",
293
+ "value": "0"
294
+ },
295
+ {
296
+ "variant": "quiet",
297
+ "state": "rest",
298
+ "part": "root",
299
+ "property": "text-decoration-line",
300
+ "value": "underline"
301
+ },
302
+ {
303
+ "variant": "quiet",
304
+ "state": "rest",
305
+ "part": "root",
306
+ "property": "text-decoration-thickness",
307
+ "token": "border-width.thin"
308
+ },
309
+ {
310
+ "variant": "quiet",
311
+ "state": "rest",
312
+ "part": "root",
313
+ "property": "text-underline-offset",
314
+ "value": "0.2em"
315
+ },
316
+ {
317
+ "variant": "quiet",
318
+ "state": "hover",
319
+ "part": "root",
320
+ "property": "text-decoration-thickness",
321
+ "token": "border-width.medium"
322
+ },
323
+ {
324
+ "variant": "quiet",
325
+ "state": "active",
326
+ "part": "root",
327
+ "property": "text-decoration-thickness",
328
+ "token": "border-width.medium"
329
+ },
330
+ {
331
+ "variant": "quiet",
332
+ "state": "disabled",
333
+ "part": "root",
334
+ "property": "color",
335
+ "token": "button.text.disabled"
336
+ },
337
+ {
338
+ "variant": "quiet",
339
+ "state": "disabled",
340
+ "part": "root",
341
+ "property": "text-decoration-line",
342
+ "value": "none"
343
+ },
344
+ {
345
+ "variant": "danger",
346
+ "state": "rest",
347
+ "part": "root",
348
+ "property": "background-color",
349
+ "value": "transparent"
350
+ },
351
+ {
352
+ "variant": "danger",
353
+ "state": "rest",
354
+ "part": "root",
355
+ "property": "border-color",
356
+ "token": "button.danger.border.rest"
357
+ },
358
+ {
359
+ "variant": "danger",
360
+ "state": "rest",
361
+ "part": "root",
362
+ "property": "color",
363
+ "token": "button.danger.text.rest"
364
+ },
365
+ {
366
+ "variant": "danger",
367
+ "state": "hover",
368
+ "part": "root",
369
+ "property": "background-color",
370
+ "token": "button.danger.bg.hover"
371
+ },
372
+ {
373
+ "variant": "danger",
374
+ "state": "active",
375
+ "part": "root",
376
+ "property": "background-color",
377
+ "token": "button.danger.bg.active"
378
+ },
379
+ {
380
+ "variant": "danger",
381
+ "state": "disabled",
382
+ "part": "root",
383
+ "property": "border-color",
384
+ "token": "button.border.disabled"
385
+ },
386
+ {
387
+ "variant": "danger",
388
+ "state": "disabled",
389
+ "part": "root",
390
+ "property": "color",
391
+ "token": "button.text.disabled"
392
+ },
393
+ {
394
+ "variant": "*",
395
+ "state": "focus",
396
+ "part": "root",
397
+ "property": "outline-color",
398
+ "token": "color.interactive"
399
+ },
400
+ {
401
+ "variant": "*",
402
+ "state": "focus",
403
+ "part": "root",
404
+ "property": "outline-style",
405
+ "value": "solid"
406
+ },
407
+ {
408
+ "variant": "*",
409
+ "state": "focus",
410
+ "part": "root",
411
+ "property": "outline-width",
412
+ "token": "border-width.medium"
413
+ },
414
+ {
415
+ "variant": "*",
416
+ "state": "focus",
417
+ "part": "root",
418
+ "property": "outline-offset",
419
+ "value": "3px"
420
+ },
421
+ {
422
+ "variant": ["primary", "secondary", "ghost", "danger"],
423
+ "state": "rest",
424
+ "part": "root",
425
+ "property": "height",
426
+ "size": "xs",
427
+ "token": "control.height.xs"
428
+ },
429
+ {
430
+ "variant": ["primary", "secondary", "ghost", "danger"],
431
+ "state": "rest",
432
+ "part": "root",
433
+ "property": "padding-inline",
434
+ "size": "xs",
435
+ "token": "space.10"
436
+ },
437
+ {
438
+ "variant": "*",
439
+ "state": "rest",
440
+ "part": "root",
441
+ "property": "column-gap",
442
+ "size": "xs",
443
+ "token": "control.gap.xs"
444
+ },
445
+ {
446
+ "variant": "*",
447
+ "state": "rest",
448
+ "part": "root",
449
+ "property": "font-size",
450
+ "size": "xs",
451
+ "token": "text.label-sm"
452
+ },
453
+ {
454
+ "variant": "*",
455
+ "state": "rest",
456
+ "part": "leading-icon",
457
+ "property": "width",
458
+ "size": "xs",
459
+ "token": "control.icon-size.xs"
460
+ },
461
+ {
462
+ "variant": "*",
463
+ "state": "rest",
464
+ "part": "leading-icon",
465
+ "property": "height",
466
+ "size": "xs",
467
+ "token": "control.icon-size.xs"
468
+ },
469
+ {
470
+ "variant": "*",
471
+ "state": "rest",
472
+ "part": "trailing-icon",
473
+ "property": "width",
474
+ "size": "xs",
475
+ "token": "control.icon-size.xs"
476
+ },
477
+ {
478
+ "variant": "*",
479
+ "state": "rest",
480
+ "part": "trailing-icon",
481
+ "property": "height",
482
+ "size": "xs",
483
+ "token": "control.icon-size.xs"
484
+ },
485
+ {
486
+ "variant": ["primary", "secondary", "ghost", "danger"],
487
+ "state": "rest",
488
+ "part": "root",
489
+ "property": "height",
490
+ "size": "sm",
491
+ "token": "control.height.sm"
492
+ },
493
+ {
494
+ "variant": ["primary", "secondary", "ghost", "danger"],
495
+ "state": "rest",
496
+ "part": "root",
497
+ "property": "padding-inline",
498
+ "size": "sm",
499
+ "token": "space.12"
500
+ },
501
+ {
502
+ "variant": "*",
503
+ "state": "rest",
504
+ "part": "root",
505
+ "property": "column-gap",
506
+ "size": "sm",
507
+ "token": "control.gap.sm"
508
+ },
509
+ {
510
+ "variant": "*",
511
+ "state": "rest",
512
+ "part": "root",
513
+ "property": "font-size",
514
+ "size": "sm",
515
+ "token": "text.label-sm"
516
+ },
517
+ {
518
+ "variant": "*",
519
+ "state": "rest",
520
+ "part": "leading-icon",
521
+ "property": "width",
522
+ "size": "sm",
523
+ "token": "control.icon-size.sm"
524
+ },
525
+ {
526
+ "variant": "*",
527
+ "state": "rest",
528
+ "part": "leading-icon",
529
+ "property": "height",
530
+ "size": "sm",
531
+ "token": "control.icon-size.sm"
532
+ },
533
+ {
534
+ "variant": "*",
535
+ "state": "rest",
536
+ "part": "trailing-icon",
537
+ "property": "width",
538
+ "size": "sm",
539
+ "token": "control.icon-size.sm"
540
+ },
541
+ {
542
+ "variant": "*",
543
+ "state": "rest",
544
+ "part": "trailing-icon",
545
+ "property": "height",
546
+ "size": "sm",
547
+ "token": "control.icon-size.sm"
548
+ },
549
+ {
550
+ "variant": ["primary", "secondary", "ghost", "danger"],
551
+ "state": "rest",
552
+ "part": "root",
553
+ "property": "height",
554
+ "size": "md",
555
+ "token": "control.height.md"
556
+ },
557
+ {
558
+ "variant": ["primary", "secondary", "ghost", "danger"],
559
+ "state": "rest",
560
+ "part": "root",
561
+ "property": "padding-inline",
562
+ "size": "md",
563
+ "token": "space.20"
564
+ },
565
+ {
566
+ "variant": "*",
567
+ "state": "rest",
568
+ "part": "root",
569
+ "property": "column-gap",
570
+ "size": "md",
571
+ "token": "control.gap.md"
572
+ },
573
+ {
574
+ "variant": "*",
575
+ "state": "rest",
576
+ "part": "root",
577
+ "property": "font-size",
578
+ "size": "md",
579
+ "token": "text.label"
580
+ },
581
+ {
582
+ "variant": "*",
583
+ "state": "rest",
584
+ "part": "leading-icon",
585
+ "property": "width",
586
+ "size": "md",
587
+ "token": "control.icon-size.md"
588
+ },
589
+ {
590
+ "variant": "*",
591
+ "state": "rest",
592
+ "part": "leading-icon",
593
+ "property": "height",
594
+ "size": "md",
595
+ "token": "control.icon-size.md"
596
+ },
597
+ {
598
+ "variant": "*",
599
+ "state": "rest",
600
+ "part": "trailing-icon",
601
+ "property": "width",
602
+ "size": "md",
603
+ "token": "control.icon-size.md"
604
+ },
605
+ {
606
+ "variant": "*",
607
+ "state": "rest",
608
+ "part": "trailing-icon",
609
+ "property": "height",
610
+ "size": "md",
611
+ "token": "control.icon-size.md"
612
+ },
613
+ {
614
+ "variant": ["primary", "secondary", "ghost", "danger"],
615
+ "state": "rest",
616
+ "part": "root",
617
+ "property": "height",
618
+ "size": "lg",
619
+ "token": "control.height.lg"
620
+ },
621
+ {
622
+ "variant": ["primary", "secondary", "ghost", "danger"],
623
+ "state": "rest",
624
+ "part": "root",
625
+ "property": "padding-inline",
626
+ "size": "lg",
627
+ "token": "space.20"
628
+ },
629
+ {
630
+ "variant": "*",
631
+ "state": "rest",
632
+ "part": "root",
633
+ "property": "column-gap",
634
+ "size": "lg",
635
+ "token": "control.gap.lg"
636
+ },
637
+ {
638
+ "variant": "*",
639
+ "state": "rest",
640
+ "part": "root",
641
+ "property": "font-size",
642
+ "size": "lg",
643
+ "token": "text.label"
644
+ },
645
+ {
646
+ "variant": "*",
647
+ "state": "rest",
648
+ "part": "leading-icon",
649
+ "property": "width",
650
+ "size": "lg",
651
+ "token": "control.icon-size.lg"
652
+ },
653
+ {
654
+ "variant": "*",
655
+ "state": "rest",
656
+ "part": "leading-icon",
657
+ "property": "height",
658
+ "size": "lg",
659
+ "token": "control.icon-size.lg"
660
+ },
661
+ {
662
+ "variant": "*",
663
+ "state": "rest",
664
+ "part": "trailing-icon",
665
+ "property": "width",
666
+ "size": "lg",
667
+ "token": "control.icon-size.lg"
668
+ },
669
+ {
670
+ "variant": "*",
671
+ "state": "rest",
672
+ "part": "trailing-icon",
673
+ "property": "height",
674
+ "size": "lg",
675
+ "token": "control.icon-size.lg"
676
+ },
677
+ {
678
+ "variant": ["primary", "secondary", "ghost", "danger"],
679
+ "state": "rest",
680
+ "part": "root",
681
+ "property": "height",
682
+ "size": "xl",
683
+ "token": "control.height.xl"
684
+ },
685
+ {
686
+ "variant": ["primary", "secondary", "ghost", "danger"],
687
+ "state": "rest",
688
+ "part": "root",
689
+ "property": "padding-inline",
690
+ "size": "xl",
691
+ "token": "space.24"
692
+ },
693
+ {
694
+ "variant": "*",
695
+ "state": "rest",
696
+ "part": "root",
697
+ "property": "column-gap",
698
+ "size": "xl",
699
+ "token": "control.gap.xl"
700
+ },
701
+ {
702
+ "variant": "*",
703
+ "state": "rest",
704
+ "part": "root",
705
+ "property": "font-size",
706
+ "size": "xl",
707
+ "token": "font.size.16"
708
+ },
709
+ {
710
+ "variant": "*",
711
+ "state": "rest",
712
+ "part": "leading-icon",
713
+ "property": "width",
714
+ "size": "xl",
715
+ "token": "control.icon-size.xl"
716
+ },
717
+ {
718
+ "variant": "*",
719
+ "state": "rest",
720
+ "part": "leading-icon",
721
+ "property": "height",
722
+ "size": "xl",
723
+ "token": "control.icon-size.xl"
724
+ },
725
+ {
726
+ "variant": "*",
727
+ "state": "rest",
728
+ "part": "trailing-icon",
729
+ "property": "width",
730
+ "size": "xl",
731
+ "token": "control.icon-size.xl"
732
+ },
733
+ {
734
+ "variant": "*",
735
+ "state": "rest",
736
+ "part": "trailing-icon",
737
+ "property": "height",
738
+ "size": "xl",
739
+ "token": "control.icon-size.xl"
740
+ }
741
+ ],
742
+ "keyboard": [
743
+ {
744
+ "keys": ["Enter"],
745
+ "effect": "Activates the button."
746
+ },
747
+ {
748
+ "keys": ["Space"],
749
+ "effect": "Activates the button when the key is released, and shows it pressed while it is held."
750
+ },
751
+ {
752
+ "keys": ["Tab", "Shift+Tab"],
753
+ "effect": "Moves the focus to the next or the previous control. A disabled button is skipped."
754
+ }
755
+ ],
756
+ "aria": {
757
+ "pattern": "https://www.w3.org/WAI/ARIA/apg/patterns/button/",
758
+ "rules": [
759
+ "It is a native button element, so it needs no role and takes Enter and Space as it is. A button inside a form says its type: submit for the one that sends the form, button for every other.",
760
+ "Its label is its accessible name. A button with only an icon has an `aria-label` that says the action, such as Delete, and its icon is hidden from assistive technology.",
761
+ "A disabled button is the native disabled attribute. A loading button is disabled too, and keeps its label.",
762
+ "A quiet button is still a button: it looks like a link, but it does not go anywhere."
763
+ ]
764
+ },
765
+ "forcedColors": [
766
+ "The edge of every kind but quiet is a real border, which forced colors keep: in `ButtonBorder`, and in `GrayText` when the button is disabled. A ghost button's border is transparent until then, so it is there to take the system's color.",
767
+ "Fills are replaced by the system's colors, so the primary button keeps its box by its border, and no kind says what it is by its fill alone.",
768
+ "An icon takes the system's text color, and `GrayText` in a disabled button. An icon drawn as an SVG in `currentcolor` does so by itself; an icon drawn as a mask needs its background set in forced colors, where every background is the page's.",
769
+ "The focus ring is an outline, which forced colors keep."
770
+ ],
771
+ "motion": [
772
+ "The fill, the edge and the label change color in `motion.duration.fast`, with `motion.easing.standard`. With `prefers-reduced-motion: reduce` they change at once.",
773
+ "The loading icon turns only with `prefers-reduced-motion: no-preference`. With less motion it stands still, and the disabled state and the label still say that the action is running."
774
+ ],
775
+ "content": [
776
+ "A verb, or a verb and its object: Register, Save changes, Delete registration. Not OK, Yes or Submit.",
777
+ "Sentence case, no period, no exclamation mark.",
778
+ "A danger button names what it deletes: Delete registration, not Delete. The dialog that confirms it says what cannot be undone.",
779
+ "The label of a loading button stays as it is: the turning icon says that it is running."
780
+ ],
781
+ "notes": [
782
+ "A square icon button, as wide as it is tall, is a button of any kind and size with only an icon and an `aria-label`. Its width is not checked yet.",
783
+ "Danger has no fill in either theme: in the light theme no red of Rosé Pine Dawn carries small light text at 4.5:1, and a fill of the text color would look like a neutral button."
784
+ ],
785
+ "implementations": {
786
+ "ui-vue": {
787
+ "library": "Nuxt UI 4.12, themed by ui-vue's app config",
788
+ "status": "shipped",
789
+ "parity": "none",
790
+ "components": ["UButton"],
791
+ "today": "Nuxt UI's six variants in six colors and five sizes. The five kinds of the spec are the ones its gallery uses in context; their colors, the focus ring, the disabled and loading looks, the heights, the paddings and the gaps already match the spec. It reads the system's roles through Tailwind utilities, not the component tokens yet.",
792
+ "parts": {
793
+ "root": "base",
794
+ "label": "label",
795
+ "leading-icon": "leadingIcon",
796
+ "trailing-icon": "trailingIcon"
797
+ },
798
+ "variants": {
799
+ "primary": {
800
+ "color": "primary",
801
+ "variant": "solid"
802
+ },
803
+ "secondary": {
804
+ "color": "neutral",
805
+ "variant": "outline"
806
+ },
807
+ "ghost": {
808
+ "color": "neutral",
809
+ "variant": "ghost"
810
+ },
811
+ "quiet": {
812
+ "color": "primary",
813
+ "variant": "link"
814
+ },
815
+ "danger": {
816
+ "color": "error",
817
+ "variant": "outline"
818
+ }
819
+ },
820
+ "sizes": {
821
+ "xs": {
822
+ "size": "xs"
823
+ },
824
+ "sm": {
825
+ "size": "sm"
826
+ },
827
+ "md": {
828
+ "size": "md"
829
+ },
830
+ "lg": {
831
+ "size": "lg"
832
+ },
833
+ "xl": {
834
+ "size": "xl"
835
+ }
836
+ },
837
+ "deviations": [
838
+ {
839
+ "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, and a primary button has no border at all."
840
+ },
841
+ {
842
+ "summary": "Icons are 14 px at xs and 18 px at lg, off the system's scale. The spec takes `control.icon-size`: 16 px up to md, then 20 px."
843
+ },
844
+ {
845
+ "summary": "The danger button's hover and pressed fill is the danger color at 10%, where the spec has `color.danger-tint`, the same color at 9%."
846
+ },
847
+ {
848
+ "summary": "A secondary button pressed without the pointer on it, as Space presses it, draws its edge in the field border on the raised fill: 2.93:1 in the dark theme, under the 3:1 of an edge. The spec keeps the hover edge, `color.text-secondary`, while it is pressed."
849
+ },
850
+ {
851
+ "summary": "It reads the roles by their Tailwind utilities, such as `bg-interactive`, not the component tokens, such as `bg-(--ws-button-primary-bg-rest)`, so a change of the tier does not reach it."
852
+ },
853
+ {
854
+ "summary": "Its gallery shows every example of the contract, but marks none of them with `data-spec`, so no test can find them by id yet."
855
+ }
856
+ ],
857
+ "beyond": [
858
+ "The variants soft and subtle, and the colors success, info and warning in every variant, as well as error solid, which the gallery's matrix shows.",
859
+ "The block prop, which makes a button as wide as its container."
860
+ ]
861
+ },
862
+ "ui-react": {
863
+ "library": "shadcn/ui on Radix",
864
+ "status": "planned",
865
+ "parity": "none"
866
+ }
867
+ },
868
+ "gallery": [
869
+ "button.primary.rest",
870
+ "button.primary.hover",
871
+ "button.primary.active",
872
+ "button.primary.focus",
873
+ "button.primary.disabled",
874
+ "button.primary.loading",
875
+ "button.secondary.rest",
876
+ "button.secondary.hover",
877
+ "button.secondary.active",
878
+ "button.secondary.focus",
879
+ "button.secondary.disabled",
880
+ "button.secondary.loading",
881
+ "button.ghost.rest",
882
+ "button.ghost.hover",
883
+ "button.ghost.active",
884
+ "button.ghost.focus",
885
+ "button.ghost.disabled",
886
+ "button.ghost.loading",
887
+ "button.quiet.rest",
888
+ "button.quiet.hover",
889
+ "button.quiet.active",
890
+ "button.quiet.focus",
891
+ "button.quiet.disabled",
892
+ "button.danger.rest",
893
+ "button.danger.hover",
894
+ "button.danger.active",
895
+ "button.danger.focus",
896
+ "button.danger.disabled",
897
+ "button.danger.loading",
898
+ "button.primary.rest.xs",
899
+ "button.primary.rest.sm",
900
+ "button.primary.rest.lg",
901
+ "button.primary.rest.xl"
902
+ ]
903
+ }