@tangible/ui 0.0.3 → 0.0.5
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 +21 -13
- package/components/Accordion/Accordion.d.ts +2 -2
- package/components/Accordion/Accordion.js +94 -23
- package/components/Accordion/index.d.ts +1 -1
- package/components/Accordion/types.d.ts +28 -4
- package/components/Avatar/Avatar.js +16 -7
- package/components/Avatar/AvatarGroup.js +7 -5
- package/components/Avatar/types.d.ts +11 -0
- package/components/Button/Button.js +10 -3
- package/components/Button/types.d.ts +9 -1
- package/components/Card/Card.js +26 -13
- package/components/Checkbox/Checkbox.d.ts +1 -1
- package/components/Chip/Chip.d.ts +37 -1
- package/components/Chip/Chip.js +10 -8
- package/components/ChipGroup/ChipGroup.js +5 -4
- package/components/ChipGroup/types.d.ts +3 -0
- package/components/Dropdown/Dropdown.d.ts +19 -1
- package/components/Dropdown/Dropdown.js +84 -28
- package/components/Dropdown/index.d.ts +2 -2
- package/components/Dropdown/index.js +1 -1
- package/components/Dropdown/types.d.ts +15 -0
- package/components/IconButton/IconButton.js +5 -4
- package/components/IconButton/index.d.ts +1 -1
- package/components/IconButton/types.d.ts +24 -4
- package/components/Modal/Modal.d.ts +16 -2
- package/components/Modal/Modal.js +45 -20
- package/components/MoveHandle/MoveHandle.js +3 -3
- package/components/MoveHandle/types.d.ts +12 -2
- package/components/Notice/Notice.js +32 -19
- package/components/Select/Select.js +6 -2
- package/components/Sidebar/Sidebar.d.ts +6 -1
- package/components/Sidebar/Sidebar.js +65 -11
- package/components/Sidebar/index.d.ts +1 -1
- package/components/Sidebar/types.d.ts +39 -14
- package/components/Tabs/Tabs.d.ts +1 -1
- package/components/Tabs/Tabs.js +12 -3
- package/components/Tabs/types.d.ts +20 -5
- package/components/TextInput/TextInput.js +10 -2
- package/components/Tooltip/Tooltip.d.ts +2 -2
- package/components/Tooltip/Tooltip.js +61 -40
- package/components/Tooltip/index.d.ts +1 -1
- package/components/Tooltip/types.d.ts +28 -1
- package/components/index.d.ts +2 -2
- package/components/index.js +1 -1
- package/package.json +1 -1
- package/styles/all.css +1 -1
- package/styles/all.expanded.css +354 -64
- package/styles/all.expanded.unlayered.css +354 -64
- package/styles/all.unlayered.css +1 -1
- package/styles/system/_tokens.scss +3 -0
- package/tui-manifest.json +291 -66
- package/utils/focus-trap.js +8 -1
package/tui-manifest.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.0.
|
|
3
|
-
"generated": "2026-
|
|
2
|
+
"version": "0.0.5",
|
|
3
|
+
"generated": "2026-03-10T01:28:11.655Z",
|
|
4
4
|
"components": {
|
|
5
5
|
"Accordion": {
|
|
6
6
|
"props": {
|
|
7
|
+
"variant": {
|
|
8
|
+
"type": "\"card\" | \"flush\"",
|
|
9
|
+
"required": false,
|
|
10
|
+
"description": "Visual treatment.\n- `card` (default): Bordered cards with gap between items.\n- `flush`: Items share borders, no gap, no radius — denser layout."
|
|
11
|
+
},
|
|
7
12
|
"className": {
|
|
8
13
|
"type": "string",
|
|
9
14
|
"required": false
|
|
@@ -28,11 +33,17 @@
|
|
|
28
33
|
"--tui-accordion-bg",
|
|
29
34
|
"--tui-accordion-bg-open",
|
|
30
35
|
"--tui-accordion-border",
|
|
36
|
+
"--tui-accordion-divider",
|
|
31
37
|
"--tui-accordion-radius",
|
|
32
38
|
"--tui-accordion-padding",
|
|
39
|
+
"--tui-accordion-trigger-padding",
|
|
40
|
+
"--tui-accordion-trigger-bg",
|
|
41
|
+
"--tui-accordion-trigger-hover",
|
|
42
|
+
"--tui-accordion-panel-padding",
|
|
43
|
+
"--tui-accordion-panel-bg",
|
|
44
|
+
"--tui-accordion-panel-spacing",
|
|
33
45
|
"--tui-accordion-gap",
|
|
34
|
-
"--tui-accordion-indicator"
|
|
35
|
-
"--tui-accordion-trigger-hover"
|
|
46
|
+
"--tui-accordion-indicator"
|
|
36
47
|
],
|
|
37
48
|
"story": {
|
|
38
49
|
"title": "Components/Accordion",
|
|
@@ -80,7 +91,9 @@
|
|
|
80
91
|
],
|
|
81
92
|
"related": [
|
|
82
93
|
"Tabs"
|
|
83
|
-
]
|
|
94
|
+
],
|
|
95
|
+
"use": null,
|
|
96
|
+
"notFor": null
|
|
84
97
|
},
|
|
85
98
|
"Avatar": {
|
|
86
99
|
"props": {
|
|
@@ -122,6 +135,11 @@
|
|
|
122
135
|
"defaultValue": "bottom-right",
|
|
123
136
|
"description": "Position of the indicator"
|
|
124
137
|
},
|
|
138
|
+
"tooltip": {
|
|
139
|
+
"type": "boolean",
|
|
140
|
+
"required": false,
|
|
141
|
+
"description": "When true, wraps the avatar with a Tooltip showing the `name`.\nHelps sighted users discover the user's name on hover/focus.\nHas no effect when `name` is not provided."
|
|
142
|
+
},
|
|
125
143
|
"className": {
|
|
126
144
|
"type": "string",
|
|
127
145
|
"required": false,
|
|
@@ -154,7 +172,9 @@
|
|
|
154
172
|
"description": null,
|
|
155
173
|
"gotchas": null,
|
|
156
174
|
"examples": null,
|
|
157
|
-
"related": null
|
|
175
|
+
"related": null,
|
|
176
|
+
"use": null,
|
|
177
|
+
"notFor": null
|
|
158
178
|
},
|
|
159
179
|
"Button": {
|
|
160
180
|
"props": {
|
|
@@ -204,6 +224,12 @@
|
|
|
204
224
|
"defaultValue": "false",
|
|
205
225
|
"description": "Loading state. Shows spinner and prevents interaction."
|
|
206
226
|
},
|
|
227
|
+
"loadingLabel": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"required": false,
|
|
230
|
+
"defaultValue": "`${label}, loading` (English)",
|
|
231
|
+
"description": "Accessible label override during loading state. For i18n support.\nWhen loading, this replaces the auto-composed label."
|
|
232
|
+
},
|
|
207
233
|
"target": {
|
|
208
234
|
"type": "HTMLAttributeAnchorTarget",
|
|
209
235
|
"required": false,
|
|
@@ -242,7 +268,7 @@
|
|
|
242
268
|
"iconSize": {
|
|
243
269
|
"type": "\"xs\" | \"sm\" | \"md\" | \"lg\"",
|
|
244
270
|
"required": false,
|
|
245
|
-
"defaultValue": "sm",
|
|
271
|
+
"defaultValue": "'sm'",
|
|
246
272
|
"description": "Size of icons."
|
|
247
273
|
},
|
|
248
274
|
"className": {
|
|
@@ -285,6 +311,7 @@
|
|
|
285
311
|
"--tui-button-bg-interact",
|
|
286
312
|
"--tui-button-fg-interact",
|
|
287
313
|
"--tui-button-border-interact",
|
|
314
|
+
"--tui-button-fg-active",
|
|
288
315
|
"--tui-control-height-sm",
|
|
289
316
|
"--tui-control-height-md",
|
|
290
317
|
"--tui-control-height-lg"
|
|
@@ -336,8 +363,11 @@
|
|
|
336
363
|
}
|
|
337
364
|
],
|
|
338
365
|
"related": [
|
|
339
|
-
"IconButton"
|
|
340
|
-
|
|
366
|
+
"IconButton",
|
|
367
|
+
"Chip"
|
|
368
|
+
],
|
|
369
|
+
"use": "for actions the user performs — save, delete, submit, navigate, open a dialog",
|
|
370
|
+
"notFor": "labels, tags, or filter toggles that represent a value or category — use Chip or ChipGroup instead"
|
|
341
371
|
},
|
|
342
372
|
"Card": {
|
|
343
373
|
"props": {
|
|
@@ -450,7 +480,9 @@
|
|
|
450
480
|
],
|
|
451
481
|
"related": [
|
|
452
482
|
"Notice"
|
|
453
|
-
]
|
|
483
|
+
],
|
|
484
|
+
"use": null,
|
|
485
|
+
"notFor": null
|
|
454
486
|
},
|
|
455
487
|
"Checkbox": {
|
|
456
488
|
"props": {
|
|
@@ -505,14 +537,17 @@
|
|
|
505
537
|
"description": null,
|
|
506
538
|
"gotchas": null,
|
|
507
539
|
"examples": null,
|
|
508
|
-
"related": null
|
|
540
|
+
"related": null,
|
|
541
|
+
"use": null,
|
|
542
|
+
"notFor": null
|
|
509
543
|
},
|
|
510
544
|
"Chip": {
|
|
511
545
|
"props": {
|
|
512
546
|
"as": {
|
|
513
547
|
"type": "\"span\" | \"div\" | \"a\"",
|
|
514
548
|
"required": false,
|
|
515
|
-
"defaultValue": "span"
|
|
549
|
+
"defaultValue": "span",
|
|
550
|
+
"description": "HTML element to render.\n- `'span'` (default): Inline element. Use for chips within text flow,\n inline lists, or inside `<p>`/`<li>` elements.\n- `'div'`: Block element. Use when the chip contains block-level content\n or needs to be a flex/grid child without inline constraints.\n- `'a'`: Anchor element. Use for navigational chips with an `href`."
|
|
516
551
|
},
|
|
517
552
|
"href": {
|
|
518
553
|
"type": "string",
|
|
@@ -600,7 +635,8 @@
|
|
|
600
635
|
"--tui-chip-fg",
|
|
601
636
|
"--tui-chip-border",
|
|
602
637
|
"--tui-chip-icon",
|
|
603
|
-
"--tui-chip-radius"
|
|
638
|
+
"--tui-chip-radius",
|
|
639
|
+
"--tui-chip-selected-ring"
|
|
604
640
|
],
|
|
605
641
|
"story": {
|
|
606
642
|
"title": "Primitives/Chip",
|
|
@@ -609,11 +645,49 @@
|
|
|
609
645
|
"stable"
|
|
610
646
|
]
|
|
611
647
|
},
|
|
612
|
-
"subcomponents":
|
|
613
|
-
"description":
|
|
614
|
-
"gotchas":
|
|
615
|
-
|
|
616
|
-
|
|
648
|
+
"subcomponents": [],
|
|
649
|
+
"description": "Compact label, tag, or interactive toggle. Use standalone for badges/status indicators, or inside ChipGroup for filter token sets.",
|
|
650
|
+
"gotchas": [
|
|
651
|
+
{
|
|
652
|
+
"note": "Add value prop when inside ChipGroup — without it the chip won't be managed by the group"
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
"note": "Interactive chips (onClick or inside ChipGroup) get role=button and aria-pressed automatically"
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
"note": "Anchor chips (as='a') inside a ChipGroup get role=button — toggle semantics override link semantics"
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
"note": "Non-interactive chips are pure display — no role, no tabIndex, no keyboard handling"
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
"note": "Size scale is xs/sm/md (compact), not sm/md/lg — Chip does not participate in control sizing"
|
|
665
|
+
}
|
|
666
|
+
],
|
|
667
|
+
"examples": [
|
|
668
|
+
{
|
|
669
|
+
"name": "Label / badge",
|
|
670
|
+
"code": "<Chip theme=\"success\">Published</Chip>"
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
"name": "Filter toggle",
|
|
674
|
+
"code": "<Chip interactive onClick={toggle} selected={active}>Design</Chip>"
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
"name": "Filter group",
|
|
678
|
+
"code": "<ChipGroup value={filter} onValueChange={setFilter}>\n <Chip value=\"all\">All</Chip>\n <Chip value=\"active\">Active</Chip>\n <Chip value=\"done\">Done</Chip>\n</ChipGroup>"
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
"name": "With icon",
|
|
682
|
+
"code": "<Chip leftIcon={<Icon name=\"system/check\" />} theme=\"success\">Verified</Chip>"
|
|
683
|
+
}
|
|
684
|
+
],
|
|
685
|
+
"related": [
|
|
686
|
+
"ChipGroup",
|
|
687
|
+
"Button"
|
|
688
|
+
],
|
|
689
|
+
"use": "for labels, tags, status badges, or filter toggles that represent a value or category",
|
|
690
|
+
"notFor": "actions like save, delete, submit, or navigation — use Button instead (action intent vs value state)"
|
|
617
691
|
},
|
|
618
692
|
"ChipGroup": {
|
|
619
693
|
"props": {
|
|
@@ -636,6 +710,12 @@
|
|
|
636
710
|
"required": false,
|
|
637
711
|
"description": "Alignment along main axis."
|
|
638
712
|
},
|
|
713
|
+
"multipleLabel": {
|
|
714
|
+
"type": "string",
|
|
715
|
+
"required": false,
|
|
716
|
+
"defaultValue": "'Multiple selections allowed'",
|
|
717
|
+
"description": "Visually hidden label describing multi-select behaviour. For i18n support."
|
|
718
|
+
},
|
|
639
719
|
"className": {
|
|
640
720
|
"type": "string",
|
|
641
721
|
"required": false
|
|
@@ -659,7 +739,9 @@
|
|
|
659
739
|
"description": null,
|
|
660
740
|
"gotchas": null,
|
|
661
741
|
"examples": null,
|
|
662
|
-
"related": null
|
|
742
|
+
"related": null,
|
|
743
|
+
"use": null,
|
|
744
|
+
"notFor": null
|
|
663
745
|
},
|
|
664
746
|
"Chips": {
|
|
665
747
|
"props": {
|
|
@@ -691,7 +773,9 @@
|
|
|
691
773
|
"description": null,
|
|
692
774
|
"gotchas": null,
|
|
693
775
|
"examples": null,
|
|
694
|
-
"related": null
|
|
776
|
+
"related": null,
|
|
777
|
+
"use": null,
|
|
778
|
+
"notFor": null
|
|
695
779
|
},
|
|
696
780
|
"Combobox": {
|
|
697
781
|
"props": {
|
|
@@ -774,7 +858,9 @@
|
|
|
774
858
|
"description": null,
|
|
775
859
|
"gotchas": null,
|
|
776
860
|
"examples": null,
|
|
777
|
-
"related": null
|
|
861
|
+
"related": null,
|
|
862
|
+
"use": null,
|
|
863
|
+
"notFor": null
|
|
778
864
|
},
|
|
779
865
|
"ContentIndicator": {
|
|
780
866
|
"props": {
|
|
@@ -829,7 +915,9 @@
|
|
|
829
915
|
"description": null,
|
|
830
916
|
"gotchas": null,
|
|
831
917
|
"examples": null,
|
|
832
|
-
"related": null
|
|
918
|
+
"related": null,
|
|
919
|
+
"use": null,
|
|
920
|
+
"notFor": null
|
|
833
921
|
},
|
|
834
922
|
"Dropdown": {
|
|
835
923
|
"props": {
|
|
@@ -867,7 +955,9 @@
|
|
|
867
955
|
"description": null,
|
|
868
956
|
"gotchas": null,
|
|
869
957
|
"examples": null,
|
|
870
|
-
"related": null
|
|
958
|
+
"related": null,
|
|
959
|
+
"use": null,
|
|
960
|
+
"notFor": null
|
|
871
961
|
},
|
|
872
962
|
"Field": {
|
|
873
963
|
"props": {
|
|
@@ -914,7 +1004,9 @@
|
|
|
914
1004
|
"description": null,
|
|
915
1005
|
"gotchas": null,
|
|
916
1006
|
"examples": null,
|
|
917
|
-
"related": null
|
|
1007
|
+
"related": null,
|
|
1008
|
+
"use": null,
|
|
1009
|
+
"notFor": null
|
|
918
1010
|
},
|
|
919
1011
|
"Icon": {
|
|
920
1012
|
"props": {
|
|
@@ -962,7 +1054,9 @@
|
|
|
962
1054
|
"description": null,
|
|
963
1055
|
"gotchas": null,
|
|
964
1056
|
"examples": null,
|
|
965
|
-
"related": null
|
|
1057
|
+
"related": null,
|
|
1058
|
+
"use": null,
|
|
1059
|
+
"notFor": null
|
|
966
1060
|
},
|
|
967
1061
|
"IconButton": {
|
|
968
1062
|
"props": {
|
|
@@ -980,7 +1074,7 @@
|
|
|
980
1074
|
"type": "\"xs\" | \"sm\" | \"md\" | \"lg\"",
|
|
981
1075
|
"required": false,
|
|
982
1076
|
"defaultValue": "'sm'",
|
|
983
|
-
"description": "Size of the button.\n- `'xs'`: 24px\n- `'sm'`: 32px (default)\n- `'md'`: 40px\n- `'lg'`: 48px"
|
|
1077
|
+
"description": "Size of the button.\n- `'xs'`: 24px — below WCAG 2.5.8 minimum target size (24×24 CSS px).\n Use only in dense, mouse-first UIs (toolbars, table rows) where touch\n is not expected. Consider pairing with adequate spacing or a larger\n touch target via padding/margin.\n- `'sm'`: 32px (default)\n- `'md'`: 40px\n- `'lg'`: 48px"
|
|
984
1078
|
},
|
|
985
1079
|
"theme": {
|
|
986
1080
|
"type": "\"primary\" | \"secondary\" | \"danger\"",
|
|
@@ -992,7 +1086,7 @@
|
|
|
992
1086
|
"type": "\"solid\" | \"outline\" | \"ghost\"",
|
|
993
1087
|
"required": false,
|
|
994
1088
|
"defaultValue": "'ghost'",
|
|
995
|
-
"description": "Visual style variant.\n- `'solid'`: Filled background\n- `'outline'`: Border only, transparent background\n- `'ghost'`: No border or background, icon only"
|
|
1089
|
+
"description": "Visual style variant.\n- `'solid'`: Filled background\n- `'outline'`: Border only, transparent background\n- `'ghost'`: No border or background, icon only — has no at-rest visual\n affordance. Best suited for toolbar groups, icon bars, or other contexts\n where surrounding UI makes the interactive nature obvious."
|
|
996
1090
|
},
|
|
997
1091
|
"disabled": {
|
|
998
1092
|
"type": "boolean",
|
|
@@ -1004,6 +1098,12 @@
|
|
|
1004
1098
|
"required": false,
|
|
1005
1099
|
"description": "Loading state — shows spinner, disables interaction."
|
|
1006
1100
|
},
|
|
1101
|
+
"loadingLabel": {
|
|
1102
|
+
"type": "string",
|
|
1103
|
+
"required": false,
|
|
1104
|
+
"defaultValue": "`${label}, loading` (English)",
|
|
1105
|
+
"description": "Accessible label override during loading state. For i18n support."
|
|
1106
|
+
},
|
|
1007
1107
|
"pressed": {
|
|
1008
1108
|
"type": "boolean",
|
|
1009
1109
|
"required": false,
|
|
@@ -1013,7 +1113,7 @@
|
|
|
1013
1113
|
"type": "boolean",
|
|
1014
1114
|
"required": false,
|
|
1015
1115
|
"defaultValue": "false",
|
|
1016
|
-
"description": "Show the label as a tooltip on hover.\nSince icon-only buttons have no visible text, this helps
|
|
1116
|
+
"description": "Show the label as a tooltip on hover.\nSince icon-only buttons have no visible text, enabling this helps\nsighted users discover what the button does. Recommended for most\nstandalone icon buttons. Can be omitted in toolbars where a shared\nTooltip provider handles it, or where adjacent visible text already\ncommunicates the action."
|
|
1017
1117
|
},
|
|
1018
1118
|
"tooltipSide": {
|
|
1019
1119
|
"type": "\"top\" | \"right\" | \"bottom\" | \"left\"",
|
|
@@ -1021,6 +1121,12 @@
|
|
|
1021
1121
|
"defaultValue": "'top'",
|
|
1022
1122
|
"description": "Tooltip placement side."
|
|
1023
1123
|
},
|
|
1124
|
+
"shape": {
|
|
1125
|
+
"type": "\"square\" | \"circle\"",
|
|
1126
|
+
"required": false,
|
|
1127
|
+
"defaultValue": "'square'",
|
|
1128
|
+
"description": "Button shape. Use `'circle'` for avatar-adjacent actions, FABs,\nor anywhere a round affordance is expected."
|
|
1129
|
+
},
|
|
1024
1130
|
"className": {
|
|
1025
1131
|
"type": "string",
|
|
1026
1132
|
"required": false,
|
|
@@ -1082,7 +1188,9 @@
|
|
|
1082
1188
|
"description": null,
|
|
1083
1189
|
"gotchas": null,
|
|
1084
1190
|
"examples": null,
|
|
1085
|
-
"related": null
|
|
1191
|
+
"related": null,
|
|
1192
|
+
"use": null,
|
|
1193
|
+
"notFor": null
|
|
1086
1194
|
},
|
|
1087
1195
|
"Modal": {
|
|
1088
1196
|
"props": {
|
|
@@ -1148,7 +1256,9 @@
|
|
|
1148
1256
|
],
|
|
1149
1257
|
"related": [
|
|
1150
1258
|
"Notice"
|
|
1151
|
-
]
|
|
1259
|
+
],
|
|
1260
|
+
"use": null,
|
|
1261
|
+
"notFor": null
|
|
1152
1262
|
},
|
|
1153
1263
|
"MoveHandle": {
|
|
1154
1264
|
"props": {
|
|
@@ -1217,7 +1327,9 @@
|
|
|
1217
1327
|
"description": null,
|
|
1218
1328
|
"gotchas": null,
|
|
1219
1329
|
"examples": null,
|
|
1220
|
-
"related": null
|
|
1330
|
+
"related": null,
|
|
1331
|
+
"use": null,
|
|
1332
|
+
"notFor": null
|
|
1221
1333
|
},
|
|
1222
1334
|
"MultiSelect": {
|
|
1223
1335
|
"props": {
|
|
@@ -1303,7 +1415,9 @@
|
|
|
1303
1415
|
"description": null,
|
|
1304
1416
|
"gotchas": null,
|
|
1305
1417
|
"examples": null,
|
|
1306
|
-
"related": null
|
|
1418
|
+
"related": null,
|
|
1419
|
+
"use": null,
|
|
1420
|
+
"notFor": null
|
|
1307
1421
|
},
|
|
1308
1422
|
"Notice": {
|
|
1309
1423
|
"props": {
|
|
@@ -1402,6 +1516,7 @@
|
|
|
1402
1516
|
"--tui-notice-bg",
|
|
1403
1517
|
"--tui-notice-border",
|
|
1404
1518
|
"--tui-notice-stripe",
|
|
1519
|
+
"--tui-notice-stripe-width",
|
|
1405
1520
|
"--tui-notice-fg",
|
|
1406
1521
|
"--tui-notice-radius",
|
|
1407
1522
|
"--tui-notice-padding",
|
|
@@ -1454,7 +1569,9 @@
|
|
|
1454
1569
|
"related": [
|
|
1455
1570
|
"Card",
|
|
1456
1571
|
"Modal"
|
|
1457
|
-
]
|
|
1572
|
+
],
|
|
1573
|
+
"use": null,
|
|
1574
|
+
"notFor": null
|
|
1458
1575
|
},
|
|
1459
1576
|
"OverlapStack": {
|
|
1460
1577
|
"props": {
|
|
@@ -1519,7 +1636,9 @@
|
|
|
1519
1636
|
"description": null,
|
|
1520
1637
|
"gotchas": null,
|
|
1521
1638
|
"examples": null,
|
|
1522
|
-
"related": null
|
|
1639
|
+
"related": null,
|
|
1640
|
+
"use": null,
|
|
1641
|
+
"notFor": null
|
|
1523
1642
|
},
|
|
1524
1643
|
"Pager": {
|
|
1525
1644
|
"props": {
|
|
@@ -1581,7 +1700,9 @@
|
|
|
1581
1700
|
"description": null,
|
|
1582
1701
|
"gotchas": null,
|
|
1583
1702
|
"examples": null,
|
|
1584
|
-
"related": null
|
|
1703
|
+
"related": null,
|
|
1704
|
+
"use": null,
|
|
1705
|
+
"notFor": null
|
|
1585
1706
|
},
|
|
1586
1707
|
"Progress": {
|
|
1587
1708
|
"props": {
|
|
@@ -1686,7 +1807,9 @@
|
|
|
1686
1807
|
"description": null,
|
|
1687
1808
|
"gotchas": null,
|
|
1688
1809
|
"examples": null,
|
|
1689
|
-
"related": null
|
|
1810
|
+
"related": null,
|
|
1811
|
+
"use": null,
|
|
1812
|
+
"notFor": null
|
|
1690
1813
|
},
|
|
1691
1814
|
"Radio": {
|
|
1692
1815
|
"props": {
|
|
@@ -1718,7 +1841,9 @@
|
|
|
1718
1841
|
"description": null,
|
|
1719
1842
|
"gotchas": null,
|
|
1720
1843
|
"examples": null,
|
|
1721
|
-
"related": null
|
|
1844
|
+
"related": null,
|
|
1845
|
+
"use": null,
|
|
1846
|
+
"notFor": null
|
|
1722
1847
|
},
|
|
1723
1848
|
"Rating": {
|
|
1724
1849
|
"props": {
|
|
@@ -1796,7 +1921,9 @@
|
|
|
1796
1921
|
"description": null,
|
|
1797
1922
|
"gotchas": null,
|
|
1798
1923
|
"examples": null,
|
|
1799
|
-
"related": null
|
|
1924
|
+
"related": null,
|
|
1925
|
+
"use": null,
|
|
1926
|
+
"notFor": null
|
|
1800
1927
|
},
|
|
1801
1928
|
"SegmentedControl": {
|
|
1802
1929
|
"props": {
|
|
@@ -1860,11 +1987,42 @@
|
|
|
1860
1987
|
"stable"
|
|
1861
1988
|
]
|
|
1862
1989
|
},
|
|
1863
|
-
"subcomponents":
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
"
|
|
1867
|
-
"
|
|
1990
|
+
"subcomponents": [
|
|
1991
|
+
"Item"
|
|
1992
|
+
],
|
|
1993
|
+
"description": "Accessible radiogroup for standalone choices — filters, view modes, sort orders. No owned content panels.",
|
|
1994
|
+
"gotchas": [
|
|
1995
|
+
{
|
|
1996
|
+
"note": "Always provide aria-label or aria-labelledby on the root — it is a radiogroup landmark"
|
|
1997
|
+
},
|
|
1998
|
+
{
|
|
1999
|
+
"note": "Arrow keys move focus AND select simultaneously — there is no manual activation mode"
|
|
2000
|
+
},
|
|
2001
|
+
{
|
|
2002
|
+
"note": "Uses aria-disabled (not native disabled) to keep items visible and focusable"
|
|
2003
|
+
},
|
|
2004
|
+
{
|
|
2005
|
+
"note": "Supports controlled (value) and uncontrolled (defaultValue) modes"
|
|
2006
|
+
},
|
|
2007
|
+
{
|
|
2008
|
+
"note": "Keyboard: Arrow keys navigate and select, Tab moves out of the group"
|
|
2009
|
+
}
|
|
2010
|
+
],
|
|
2011
|
+
"examples": [
|
|
2012
|
+
{
|
|
2013
|
+
"name": "Basic",
|
|
2014
|
+
"code": "<SegmentedControl defaultValue=\"week\" aria-label=\"Time period\">\n <SegmentedControl.Item value=\"day\">Day</SegmentedControl.Item>\n <SegmentedControl.Item value=\"week\">Week</SegmentedControl.Item>\n <SegmentedControl.Item value=\"month\">Month</SegmentedControl.Item>\n</SegmentedControl>"
|
|
2015
|
+
},
|
|
2016
|
+
{
|
|
2017
|
+
"name": "Controlled",
|
|
2018
|
+
"code": "<SegmentedControl value={view} onValueChange={setView} aria-label=\"View mode\">\n <SegmentedControl.Item value=\"list\">List</SegmentedControl.Item>\n <SegmentedControl.Item value=\"grid\">Grid</SegmentedControl.Item>\n</SegmentedControl>"
|
|
2019
|
+
}
|
|
2020
|
+
],
|
|
2021
|
+
"related": [
|
|
2022
|
+
"Tabs"
|
|
2023
|
+
],
|
|
2024
|
+
"use": "when selection is a standalone choice that drives external state (filter, view mode, sort order, time period)",
|
|
2025
|
+
"notFor": "switching between content sections on the same page — use Tabs instead (owns the content panels)"
|
|
1868
2026
|
},
|
|
1869
2027
|
"Select": {
|
|
1870
2028
|
"props": {
|
|
@@ -1955,7 +2113,9 @@
|
|
|
1955
2113
|
"description": null,
|
|
1956
2114
|
"gotchas": null,
|
|
1957
2115
|
"examples": null,
|
|
1958
|
-
"related": null
|
|
2116
|
+
"related": null,
|
|
2117
|
+
"use": null,
|
|
2118
|
+
"notFor": null
|
|
1959
2119
|
},
|
|
1960
2120
|
"Sidebar": {
|
|
1961
2121
|
"props": {
|
|
@@ -1965,31 +2125,31 @@
|
|
|
1965
2125
|
"defaultValue": "'left'",
|
|
1966
2126
|
"description": "Sidebar position. Affects border placement and drawer slide direction."
|
|
1967
2127
|
},
|
|
2128
|
+
"children": {
|
|
2129
|
+
"type": "ReactNode",
|
|
2130
|
+
"required": true,
|
|
2131
|
+
"description": "Sidebar content (Header, Nav, etc.)."
|
|
2132
|
+
},
|
|
2133
|
+
"className": {
|
|
2134
|
+
"type": "string",
|
|
2135
|
+
"required": false,
|
|
2136
|
+
"description": "Additional CSS class names."
|
|
2137
|
+
},
|
|
1968
2138
|
"drawer": {
|
|
1969
2139
|
"type": "boolean",
|
|
1970
2140
|
"required": false,
|
|
1971
2141
|
"defaultValue": "false",
|
|
1972
|
-
"description": "Enable drawer mode (mobile overlay).\nWhen true, sidebar renders
|
|
2142
|
+
"description": "Enable drawer mode (mobile overlay).\nEnable drawer mode (mobile overlay).\nWhen true, sidebar renders with backdrop, focus trap, and dialog semantics."
|
|
1973
2143
|
},
|
|
1974
2144
|
"open": {
|
|
1975
2145
|
"type": "boolean",
|
|
1976
2146
|
"required": false,
|
|
1977
|
-
"description": "Drawer open state.
|
|
2147
|
+
"description": "Drawer open state."
|
|
1978
2148
|
},
|
|
1979
2149
|
"onClose": {
|
|
1980
2150
|
"type": "() => void",
|
|
1981
|
-
"required": false,
|
|
1982
|
-
"description": "Callback to close the drawer.\nCalled when ESC is pressed or backdrop is clicked."
|
|
1983
|
-
},
|
|
1984
|
-
"children": {
|
|
1985
|
-
"type": "ReactNode",
|
|
1986
2151
|
"required": true,
|
|
1987
|
-
"description": "
|
|
1988
|
-
},
|
|
1989
|
-
"className": {
|
|
1990
|
-
"type": "string",
|
|
1991
|
-
"required": false,
|
|
1992
|
-
"description": "Additional CSS class names."
|
|
2152
|
+
"description": "Callback to close the drawer. Required when `drawer={true}`.\nCalled when ESC is pressed or backdrop is clicked.\nOmitting this in drawer mode means the user cannot dismiss the overlay,\nwhich is a WCAG 2.1.1 (Keyboard) failure."
|
|
1993
2153
|
}
|
|
1994
2154
|
},
|
|
1995
2155
|
"cssTokens": [
|
|
@@ -2011,7 +2171,9 @@
|
|
|
2011
2171
|
"description": null,
|
|
2012
2172
|
"gotchas": null,
|
|
2013
2173
|
"examples": null,
|
|
2014
|
-
"related": null
|
|
2174
|
+
"related": null,
|
|
2175
|
+
"use": null,
|
|
2176
|
+
"notFor": null
|
|
2015
2177
|
},
|
|
2016
2178
|
"StepIndicator": {
|
|
2017
2179
|
"props": {
|
|
@@ -2067,7 +2229,9 @@
|
|
|
2067
2229
|
"description": null,
|
|
2068
2230
|
"gotchas": null,
|
|
2069
2231
|
"examples": null,
|
|
2070
|
-
"related": null
|
|
2232
|
+
"related": null,
|
|
2233
|
+
"use": null,
|
|
2234
|
+
"notFor": null
|
|
2071
2235
|
},
|
|
2072
2236
|
"StepList": {
|
|
2073
2237
|
"props": {
|
|
@@ -2113,7 +2277,9 @@
|
|
|
2113
2277
|
"description": null,
|
|
2114
2278
|
"gotchas": null,
|
|
2115
2279
|
"examples": null,
|
|
2116
|
-
"related": null
|
|
2280
|
+
"related": null,
|
|
2281
|
+
"use": null,
|
|
2282
|
+
"notFor": null
|
|
2117
2283
|
},
|
|
2118
2284
|
"Switch": {
|
|
2119
2285
|
"props": {
|
|
@@ -2170,7 +2336,9 @@
|
|
|
2170
2336
|
"description": null,
|
|
2171
2337
|
"gotchas": null,
|
|
2172
2338
|
"examples": null,
|
|
2173
|
-
"related": null
|
|
2339
|
+
"related": null,
|
|
2340
|
+
"use": null,
|
|
2341
|
+
"notFor": null
|
|
2174
2342
|
},
|
|
2175
2343
|
"Tabs": {
|
|
2176
2344
|
"props": {
|
|
@@ -2267,7 +2435,9 @@
|
|
|
2267
2435
|
],
|
|
2268
2436
|
"related": [
|
|
2269
2437
|
"SegmentedControl"
|
|
2270
|
-
]
|
|
2438
|
+
],
|
|
2439
|
+
"use": "when selecting reveals a content panel owned by this component (Tabs.Panel below the tab list)",
|
|
2440
|
+
"notFor": "filters, view-mode switches, or sort-order pickers — use SegmentedControl instead (no owned panels)"
|
|
2271
2441
|
},
|
|
2272
2442
|
"Textarea": {
|
|
2273
2443
|
"props": {
|
|
@@ -2340,7 +2510,9 @@
|
|
|
2340
2510
|
"description": null,
|
|
2341
2511
|
"gotchas": null,
|
|
2342
2512
|
"examples": null,
|
|
2343
|
-
"related": null
|
|
2513
|
+
"related": null,
|
|
2514
|
+
"use": null,
|
|
2515
|
+
"notFor": null
|
|
2344
2516
|
},
|
|
2345
2517
|
"TextInput": {
|
|
2346
2518
|
"props": {
|
|
@@ -2419,7 +2591,9 @@
|
|
|
2419
2591
|
"description": null,
|
|
2420
2592
|
"gotchas": null,
|
|
2421
2593
|
"examples": null,
|
|
2422
|
-
"related": null
|
|
2594
|
+
"related": null,
|
|
2595
|
+
"use": null,
|
|
2596
|
+
"notFor": null
|
|
2423
2597
|
},
|
|
2424
2598
|
"Toolbar": {
|
|
2425
2599
|
"props": {
|
|
@@ -2458,7 +2632,9 @@
|
|
|
2458
2632
|
"description": null,
|
|
2459
2633
|
"gotchas": null,
|
|
2460
2634
|
"examples": null,
|
|
2461
|
-
"related": null
|
|
2635
|
+
"related": null,
|
|
2636
|
+
"use": null,
|
|
2637
|
+
"notFor": null
|
|
2462
2638
|
},
|
|
2463
2639
|
"Tooltip": {
|
|
2464
2640
|
"props": {
|
|
@@ -2496,7 +2672,9 @@
|
|
|
2496
2672
|
"description": null,
|
|
2497
2673
|
"gotchas": null,
|
|
2498
2674
|
"examples": null,
|
|
2499
|
-
"related": null
|
|
2675
|
+
"related": null,
|
|
2676
|
+
"use": null,
|
|
2677
|
+
"notFor": null
|
|
2500
2678
|
}
|
|
2501
2679
|
},
|
|
2502
2680
|
"utilities": {
|
|
@@ -2639,6 +2817,53 @@
|
|
|
2639
2817
|
"is-layer-top"
|
|
2640
2818
|
]
|
|
2641
2819
|
},
|
|
2820
|
+
"guides": {
|
|
2821
|
+
"tabsVsSegmentedControl": {
|
|
2822
|
+
"title": "Tabs vs SegmentedControl",
|
|
2823
|
+
"question": "Does selecting an option reveal a content panel owned by this component?",
|
|
2824
|
+
"rules": [
|
|
2825
|
+
{
|
|
2826
|
+
"answer": "Yes — selecting shows a Tabs.Panel below the tab list",
|
|
2827
|
+
"use": "Tabs"
|
|
2828
|
+
},
|
|
2829
|
+
{
|
|
2830
|
+
"answer": "No — selection drives external state (filter, view mode, sort order)",
|
|
2831
|
+
"use": "SegmentedControl"
|
|
2832
|
+
}
|
|
2833
|
+
],
|
|
2834
|
+
"components": [
|
|
2835
|
+
"Tabs",
|
|
2836
|
+
"SegmentedControl"
|
|
2837
|
+
],
|
|
2838
|
+
"storybookPath": "Guides/Tabs vs SegmentedControl",
|
|
2839
|
+
"detail": "Both components look identical across all visual variants (pill, underline, outline). The difference is semantic, not visual. Tabs uses role=tablist/tab/tabpanel with aria-selected and aria-controls. SegmentedControl uses role=radiogroup/radio with aria-checked. Using the wrong one produces incorrect screen reader announcements."
|
|
2840
|
+
},
|
|
2841
|
+
"chipVsButton": {
|
|
2842
|
+
"title": "Chip vs Button",
|
|
2843
|
+
"question": "Is this an action the user performs, or a label/tag/toggle representing a value?",
|
|
2844
|
+
"rules": [
|
|
2845
|
+
{
|
|
2846
|
+
"answer": "Action — save, delete, submit, navigate, open a modal",
|
|
2847
|
+
"use": "Button"
|
|
2848
|
+
},
|
|
2849
|
+
{
|
|
2850
|
+
"answer": "Label or tag — a category, status badge, or read-only value indicator",
|
|
2851
|
+
"use": "Chip (non-interactive, no onClick)"
|
|
2852
|
+
},
|
|
2853
|
+
{
|
|
2854
|
+
"answer": "Filter toggle or multi-select token — represents 'is this category active?'",
|
|
2855
|
+
"use": "Chip (interactive or inside ChipGroup)"
|
|
2856
|
+
}
|
|
2857
|
+
],
|
|
2858
|
+
"components": [
|
|
2859
|
+
"Chip",
|
|
2860
|
+
"ChipGroup",
|
|
2861
|
+
"Button"
|
|
2862
|
+
],
|
|
2863
|
+
"storybookPath": "Guides/Chip vs Button",
|
|
2864
|
+
"detail": "The visual overlap comes from shared size tokens and variants. The semantic difference is the ARIA contract. Button always means 'do something' — it carries action intent. Chip means 'this value is present or selected' — it carries state. An interactive Chip uses aria-pressed (toggle), not action semantics. Use ChipGroup when you have multiple selectable filter tokens — it manages selection state, keyboard navigation, and aria-pressed across the group. A ghost or outline Button that looks like a Chip is still a Button if the intent is to trigger an action, not represent a value."
|
|
2865
|
+
}
|
|
2866
|
+
},
|
|
2642
2867
|
"icons": {
|
|
2643
2868
|
"sets": {
|
|
2644
2869
|
"cred": 12,
|