@tangible/ui 0.0.3 → 0.0.4
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 +1 -1
- package/components/Accordion/Accordion.js +3 -3
- package/components/Accordion/types.d.ts +8 -1
- 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 +310 -57
- package/styles/all.expanded.unlayered.css +310 -57
- package/styles/all.unlayered.css +1 -1
- package/styles/system/_tokens.scss +3 -0
- package/tui-manifest.json +278 -64
- package/utils/focus-trap.js +8 -1
package/tui-manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.0.
|
|
3
|
-
"generated": "2026-
|
|
2
|
+
"version": "0.0.4",
|
|
3
|
+
"generated": "2026-03-05T21:09:18.762Z",
|
|
4
4
|
"components": {
|
|
5
5
|
"Accordion": {
|
|
6
6
|
"props": {
|
|
@@ -80,7 +80,9 @@
|
|
|
80
80
|
],
|
|
81
81
|
"related": [
|
|
82
82
|
"Tabs"
|
|
83
|
-
]
|
|
83
|
+
],
|
|
84
|
+
"use": null,
|
|
85
|
+
"notFor": null
|
|
84
86
|
},
|
|
85
87
|
"Avatar": {
|
|
86
88
|
"props": {
|
|
@@ -122,6 +124,11 @@
|
|
|
122
124
|
"defaultValue": "bottom-right",
|
|
123
125
|
"description": "Position of the indicator"
|
|
124
126
|
},
|
|
127
|
+
"tooltip": {
|
|
128
|
+
"type": "boolean",
|
|
129
|
+
"required": false,
|
|
130
|
+
"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."
|
|
131
|
+
},
|
|
125
132
|
"className": {
|
|
126
133
|
"type": "string",
|
|
127
134
|
"required": false,
|
|
@@ -154,7 +161,9 @@
|
|
|
154
161
|
"description": null,
|
|
155
162
|
"gotchas": null,
|
|
156
163
|
"examples": null,
|
|
157
|
-
"related": null
|
|
164
|
+
"related": null,
|
|
165
|
+
"use": null,
|
|
166
|
+
"notFor": null
|
|
158
167
|
},
|
|
159
168
|
"Button": {
|
|
160
169
|
"props": {
|
|
@@ -204,6 +213,12 @@
|
|
|
204
213
|
"defaultValue": "false",
|
|
205
214
|
"description": "Loading state. Shows spinner and prevents interaction."
|
|
206
215
|
},
|
|
216
|
+
"loadingLabel": {
|
|
217
|
+
"type": "string",
|
|
218
|
+
"required": false,
|
|
219
|
+
"defaultValue": "`${label}, loading` (English)",
|
|
220
|
+
"description": "Accessible label override during loading state. For i18n support.\nWhen loading, this replaces the auto-composed label."
|
|
221
|
+
},
|
|
207
222
|
"target": {
|
|
208
223
|
"type": "HTMLAttributeAnchorTarget",
|
|
209
224
|
"required": false,
|
|
@@ -242,7 +257,7 @@
|
|
|
242
257
|
"iconSize": {
|
|
243
258
|
"type": "\"xs\" | \"sm\" | \"md\" | \"lg\"",
|
|
244
259
|
"required": false,
|
|
245
|
-
"defaultValue": "sm",
|
|
260
|
+
"defaultValue": "'sm'",
|
|
246
261
|
"description": "Size of icons."
|
|
247
262
|
},
|
|
248
263
|
"className": {
|
|
@@ -285,6 +300,7 @@
|
|
|
285
300
|
"--tui-button-bg-interact",
|
|
286
301
|
"--tui-button-fg-interact",
|
|
287
302
|
"--tui-button-border-interact",
|
|
303
|
+
"--tui-button-fg-active",
|
|
288
304
|
"--tui-control-height-sm",
|
|
289
305
|
"--tui-control-height-md",
|
|
290
306
|
"--tui-control-height-lg"
|
|
@@ -336,8 +352,11 @@
|
|
|
336
352
|
}
|
|
337
353
|
],
|
|
338
354
|
"related": [
|
|
339
|
-
"IconButton"
|
|
340
|
-
|
|
355
|
+
"IconButton",
|
|
356
|
+
"Chip"
|
|
357
|
+
],
|
|
358
|
+
"use": "for actions the user performs — save, delete, submit, navigate, open a dialog",
|
|
359
|
+
"notFor": "labels, tags, or filter toggles that represent a value or category — use Chip or ChipGroup instead"
|
|
341
360
|
},
|
|
342
361
|
"Card": {
|
|
343
362
|
"props": {
|
|
@@ -450,7 +469,9 @@
|
|
|
450
469
|
],
|
|
451
470
|
"related": [
|
|
452
471
|
"Notice"
|
|
453
|
-
]
|
|
472
|
+
],
|
|
473
|
+
"use": null,
|
|
474
|
+
"notFor": null
|
|
454
475
|
},
|
|
455
476
|
"Checkbox": {
|
|
456
477
|
"props": {
|
|
@@ -505,14 +526,17 @@
|
|
|
505
526
|
"description": null,
|
|
506
527
|
"gotchas": null,
|
|
507
528
|
"examples": null,
|
|
508
|
-
"related": null
|
|
529
|
+
"related": null,
|
|
530
|
+
"use": null,
|
|
531
|
+
"notFor": null
|
|
509
532
|
},
|
|
510
533
|
"Chip": {
|
|
511
534
|
"props": {
|
|
512
535
|
"as": {
|
|
513
536
|
"type": "\"span\" | \"div\" | \"a\"",
|
|
514
537
|
"required": false,
|
|
515
|
-
"defaultValue": "span"
|
|
538
|
+
"defaultValue": "span",
|
|
539
|
+
"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
540
|
},
|
|
517
541
|
"href": {
|
|
518
542
|
"type": "string",
|
|
@@ -600,7 +624,8 @@
|
|
|
600
624
|
"--tui-chip-fg",
|
|
601
625
|
"--tui-chip-border",
|
|
602
626
|
"--tui-chip-icon",
|
|
603
|
-
"--tui-chip-radius"
|
|
627
|
+
"--tui-chip-radius",
|
|
628
|
+
"--tui-chip-selected-ring"
|
|
604
629
|
],
|
|
605
630
|
"story": {
|
|
606
631
|
"title": "Primitives/Chip",
|
|
@@ -609,11 +634,49 @@
|
|
|
609
634
|
"stable"
|
|
610
635
|
]
|
|
611
636
|
},
|
|
612
|
-
"subcomponents":
|
|
613
|
-
"description":
|
|
614
|
-
"gotchas":
|
|
615
|
-
|
|
616
|
-
|
|
637
|
+
"subcomponents": [],
|
|
638
|
+
"description": "Compact label, tag, or interactive toggle. Use standalone for badges/status indicators, or inside ChipGroup for filter token sets.",
|
|
639
|
+
"gotchas": [
|
|
640
|
+
{
|
|
641
|
+
"note": "Add value prop when inside ChipGroup — without it the chip won't be managed by the group"
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
"note": "Interactive chips (onClick or inside ChipGroup) get role=button and aria-pressed automatically"
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
"note": "Anchor chips (as='a') inside a ChipGroup get role=button — toggle semantics override link semantics"
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"note": "Non-interactive chips are pure display — no role, no tabIndex, no keyboard handling"
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
"note": "Size scale is xs/sm/md (compact), not sm/md/lg — Chip does not participate in control sizing"
|
|
654
|
+
}
|
|
655
|
+
],
|
|
656
|
+
"examples": [
|
|
657
|
+
{
|
|
658
|
+
"name": "Label / badge",
|
|
659
|
+
"code": "<Chip theme=\"success\">Published</Chip>"
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
"name": "Filter toggle",
|
|
663
|
+
"code": "<Chip interactive onClick={toggle} selected={active}>Design</Chip>"
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
"name": "Filter group",
|
|
667
|
+
"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>"
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
"name": "With icon",
|
|
671
|
+
"code": "<Chip leftIcon={<Icon name=\"system/check\" />} theme=\"success\">Verified</Chip>"
|
|
672
|
+
}
|
|
673
|
+
],
|
|
674
|
+
"related": [
|
|
675
|
+
"ChipGroup",
|
|
676
|
+
"Button"
|
|
677
|
+
],
|
|
678
|
+
"use": "for labels, tags, status badges, or filter toggles that represent a value or category",
|
|
679
|
+
"notFor": "actions like save, delete, submit, or navigation — use Button instead (action intent vs value state)"
|
|
617
680
|
},
|
|
618
681
|
"ChipGroup": {
|
|
619
682
|
"props": {
|
|
@@ -636,6 +699,12 @@
|
|
|
636
699
|
"required": false,
|
|
637
700
|
"description": "Alignment along main axis."
|
|
638
701
|
},
|
|
702
|
+
"multipleLabel": {
|
|
703
|
+
"type": "string",
|
|
704
|
+
"required": false,
|
|
705
|
+
"defaultValue": "'Multiple selections allowed'",
|
|
706
|
+
"description": "Visually hidden label describing multi-select behaviour. For i18n support."
|
|
707
|
+
},
|
|
639
708
|
"className": {
|
|
640
709
|
"type": "string",
|
|
641
710
|
"required": false
|
|
@@ -659,7 +728,9 @@
|
|
|
659
728
|
"description": null,
|
|
660
729
|
"gotchas": null,
|
|
661
730
|
"examples": null,
|
|
662
|
-
"related": null
|
|
731
|
+
"related": null,
|
|
732
|
+
"use": null,
|
|
733
|
+
"notFor": null
|
|
663
734
|
},
|
|
664
735
|
"Chips": {
|
|
665
736
|
"props": {
|
|
@@ -691,7 +762,9 @@
|
|
|
691
762
|
"description": null,
|
|
692
763
|
"gotchas": null,
|
|
693
764
|
"examples": null,
|
|
694
|
-
"related": null
|
|
765
|
+
"related": null,
|
|
766
|
+
"use": null,
|
|
767
|
+
"notFor": null
|
|
695
768
|
},
|
|
696
769
|
"Combobox": {
|
|
697
770
|
"props": {
|
|
@@ -774,7 +847,9 @@
|
|
|
774
847
|
"description": null,
|
|
775
848
|
"gotchas": null,
|
|
776
849
|
"examples": null,
|
|
777
|
-
"related": null
|
|
850
|
+
"related": null,
|
|
851
|
+
"use": null,
|
|
852
|
+
"notFor": null
|
|
778
853
|
},
|
|
779
854
|
"ContentIndicator": {
|
|
780
855
|
"props": {
|
|
@@ -829,7 +904,9 @@
|
|
|
829
904
|
"description": null,
|
|
830
905
|
"gotchas": null,
|
|
831
906
|
"examples": null,
|
|
832
|
-
"related": null
|
|
907
|
+
"related": null,
|
|
908
|
+
"use": null,
|
|
909
|
+
"notFor": null
|
|
833
910
|
},
|
|
834
911
|
"Dropdown": {
|
|
835
912
|
"props": {
|
|
@@ -867,7 +944,9 @@
|
|
|
867
944
|
"description": null,
|
|
868
945
|
"gotchas": null,
|
|
869
946
|
"examples": null,
|
|
870
|
-
"related": null
|
|
947
|
+
"related": null,
|
|
948
|
+
"use": null,
|
|
949
|
+
"notFor": null
|
|
871
950
|
},
|
|
872
951
|
"Field": {
|
|
873
952
|
"props": {
|
|
@@ -914,7 +993,9 @@
|
|
|
914
993
|
"description": null,
|
|
915
994
|
"gotchas": null,
|
|
916
995
|
"examples": null,
|
|
917
|
-
"related": null
|
|
996
|
+
"related": null,
|
|
997
|
+
"use": null,
|
|
998
|
+
"notFor": null
|
|
918
999
|
},
|
|
919
1000
|
"Icon": {
|
|
920
1001
|
"props": {
|
|
@@ -962,7 +1043,9 @@
|
|
|
962
1043
|
"description": null,
|
|
963
1044
|
"gotchas": null,
|
|
964
1045
|
"examples": null,
|
|
965
|
-
"related": null
|
|
1046
|
+
"related": null,
|
|
1047
|
+
"use": null,
|
|
1048
|
+
"notFor": null
|
|
966
1049
|
},
|
|
967
1050
|
"IconButton": {
|
|
968
1051
|
"props": {
|
|
@@ -980,7 +1063,7 @@
|
|
|
980
1063
|
"type": "\"xs\" | \"sm\" | \"md\" | \"lg\"",
|
|
981
1064
|
"required": false,
|
|
982
1065
|
"defaultValue": "'sm'",
|
|
983
|
-
"description": "Size of the button.\n- `'xs'`: 24px\n- `'sm'`: 32px (default)\n- `'md'`: 40px\n- `'lg'`: 48px"
|
|
1066
|
+
"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
1067
|
},
|
|
985
1068
|
"theme": {
|
|
986
1069
|
"type": "\"primary\" | \"secondary\" | \"danger\"",
|
|
@@ -992,7 +1075,7 @@
|
|
|
992
1075
|
"type": "\"solid\" | \"outline\" | \"ghost\"",
|
|
993
1076
|
"required": false,
|
|
994
1077
|
"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"
|
|
1078
|
+
"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
1079
|
},
|
|
997
1080
|
"disabled": {
|
|
998
1081
|
"type": "boolean",
|
|
@@ -1004,6 +1087,12 @@
|
|
|
1004
1087
|
"required": false,
|
|
1005
1088
|
"description": "Loading state — shows spinner, disables interaction."
|
|
1006
1089
|
},
|
|
1090
|
+
"loadingLabel": {
|
|
1091
|
+
"type": "string",
|
|
1092
|
+
"required": false,
|
|
1093
|
+
"defaultValue": "`${label}, loading` (English)",
|
|
1094
|
+
"description": "Accessible label override during loading state. For i18n support."
|
|
1095
|
+
},
|
|
1007
1096
|
"pressed": {
|
|
1008
1097
|
"type": "boolean",
|
|
1009
1098
|
"required": false,
|
|
@@ -1013,7 +1102,7 @@
|
|
|
1013
1102
|
"type": "boolean",
|
|
1014
1103
|
"required": false,
|
|
1015
1104
|
"defaultValue": "false",
|
|
1016
|
-
"description": "Show the label as a tooltip on hover.\nSince icon-only buttons have no visible text, this helps
|
|
1105
|
+
"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
1106
|
},
|
|
1018
1107
|
"tooltipSide": {
|
|
1019
1108
|
"type": "\"top\" | \"right\" | \"bottom\" | \"left\"",
|
|
@@ -1021,6 +1110,12 @@
|
|
|
1021
1110
|
"defaultValue": "'top'",
|
|
1022
1111
|
"description": "Tooltip placement side."
|
|
1023
1112
|
},
|
|
1113
|
+
"shape": {
|
|
1114
|
+
"type": "\"square\" | \"circle\"",
|
|
1115
|
+
"required": false,
|
|
1116
|
+
"defaultValue": "'square'",
|
|
1117
|
+
"description": "Button shape. Use `'circle'` for avatar-adjacent actions, FABs,\nor anywhere a round affordance is expected."
|
|
1118
|
+
},
|
|
1024
1119
|
"className": {
|
|
1025
1120
|
"type": "string",
|
|
1026
1121
|
"required": false,
|
|
@@ -1082,7 +1177,9 @@
|
|
|
1082
1177
|
"description": null,
|
|
1083
1178
|
"gotchas": null,
|
|
1084
1179
|
"examples": null,
|
|
1085
|
-
"related": null
|
|
1180
|
+
"related": null,
|
|
1181
|
+
"use": null,
|
|
1182
|
+
"notFor": null
|
|
1086
1183
|
},
|
|
1087
1184
|
"Modal": {
|
|
1088
1185
|
"props": {
|
|
@@ -1148,7 +1245,9 @@
|
|
|
1148
1245
|
],
|
|
1149
1246
|
"related": [
|
|
1150
1247
|
"Notice"
|
|
1151
|
-
]
|
|
1248
|
+
],
|
|
1249
|
+
"use": null,
|
|
1250
|
+
"notFor": null
|
|
1152
1251
|
},
|
|
1153
1252
|
"MoveHandle": {
|
|
1154
1253
|
"props": {
|
|
@@ -1217,7 +1316,9 @@
|
|
|
1217
1316
|
"description": null,
|
|
1218
1317
|
"gotchas": null,
|
|
1219
1318
|
"examples": null,
|
|
1220
|
-
"related": null
|
|
1319
|
+
"related": null,
|
|
1320
|
+
"use": null,
|
|
1321
|
+
"notFor": null
|
|
1221
1322
|
},
|
|
1222
1323
|
"MultiSelect": {
|
|
1223
1324
|
"props": {
|
|
@@ -1303,7 +1404,9 @@
|
|
|
1303
1404
|
"description": null,
|
|
1304
1405
|
"gotchas": null,
|
|
1305
1406
|
"examples": null,
|
|
1306
|
-
"related": null
|
|
1407
|
+
"related": null,
|
|
1408
|
+
"use": null,
|
|
1409
|
+
"notFor": null
|
|
1307
1410
|
},
|
|
1308
1411
|
"Notice": {
|
|
1309
1412
|
"props": {
|
|
@@ -1402,6 +1505,7 @@
|
|
|
1402
1505
|
"--tui-notice-bg",
|
|
1403
1506
|
"--tui-notice-border",
|
|
1404
1507
|
"--tui-notice-stripe",
|
|
1508
|
+
"--tui-notice-stripe-width",
|
|
1405
1509
|
"--tui-notice-fg",
|
|
1406
1510
|
"--tui-notice-radius",
|
|
1407
1511
|
"--tui-notice-padding",
|
|
@@ -1454,7 +1558,9 @@
|
|
|
1454
1558
|
"related": [
|
|
1455
1559
|
"Card",
|
|
1456
1560
|
"Modal"
|
|
1457
|
-
]
|
|
1561
|
+
],
|
|
1562
|
+
"use": null,
|
|
1563
|
+
"notFor": null
|
|
1458
1564
|
},
|
|
1459
1565
|
"OverlapStack": {
|
|
1460
1566
|
"props": {
|
|
@@ -1519,7 +1625,9 @@
|
|
|
1519
1625
|
"description": null,
|
|
1520
1626
|
"gotchas": null,
|
|
1521
1627
|
"examples": null,
|
|
1522
|
-
"related": null
|
|
1628
|
+
"related": null,
|
|
1629
|
+
"use": null,
|
|
1630
|
+
"notFor": null
|
|
1523
1631
|
},
|
|
1524
1632
|
"Pager": {
|
|
1525
1633
|
"props": {
|
|
@@ -1581,7 +1689,9 @@
|
|
|
1581
1689
|
"description": null,
|
|
1582
1690
|
"gotchas": null,
|
|
1583
1691
|
"examples": null,
|
|
1584
|
-
"related": null
|
|
1692
|
+
"related": null,
|
|
1693
|
+
"use": null,
|
|
1694
|
+
"notFor": null
|
|
1585
1695
|
},
|
|
1586
1696
|
"Progress": {
|
|
1587
1697
|
"props": {
|
|
@@ -1686,7 +1796,9 @@
|
|
|
1686
1796
|
"description": null,
|
|
1687
1797
|
"gotchas": null,
|
|
1688
1798
|
"examples": null,
|
|
1689
|
-
"related": null
|
|
1799
|
+
"related": null,
|
|
1800
|
+
"use": null,
|
|
1801
|
+
"notFor": null
|
|
1690
1802
|
},
|
|
1691
1803
|
"Radio": {
|
|
1692
1804
|
"props": {
|
|
@@ -1718,7 +1830,9 @@
|
|
|
1718
1830
|
"description": null,
|
|
1719
1831
|
"gotchas": null,
|
|
1720
1832
|
"examples": null,
|
|
1721
|
-
"related": null
|
|
1833
|
+
"related": null,
|
|
1834
|
+
"use": null,
|
|
1835
|
+
"notFor": null
|
|
1722
1836
|
},
|
|
1723
1837
|
"Rating": {
|
|
1724
1838
|
"props": {
|
|
@@ -1796,7 +1910,9 @@
|
|
|
1796
1910
|
"description": null,
|
|
1797
1911
|
"gotchas": null,
|
|
1798
1912
|
"examples": null,
|
|
1799
|
-
"related": null
|
|
1913
|
+
"related": null,
|
|
1914
|
+
"use": null,
|
|
1915
|
+
"notFor": null
|
|
1800
1916
|
},
|
|
1801
1917
|
"SegmentedControl": {
|
|
1802
1918
|
"props": {
|
|
@@ -1860,11 +1976,42 @@
|
|
|
1860
1976
|
"stable"
|
|
1861
1977
|
]
|
|
1862
1978
|
},
|
|
1863
|
-
"subcomponents":
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
"
|
|
1867
|
-
"
|
|
1979
|
+
"subcomponents": [
|
|
1980
|
+
"Item"
|
|
1981
|
+
],
|
|
1982
|
+
"description": "Accessible radiogroup for standalone choices — filters, view modes, sort orders. No owned content panels.",
|
|
1983
|
+
"gotchas": [
|
|
1984
|
+
{
|
|
1985
|
+
"note": "Always provide aria-label or aria-labelledby on the root — it is a radiogroup landmark"
|
|
1986
|
+
},
|
|
1987
|
+
{
|
|
1988
|
+
"note": "Arrow keys move focus AND select simultaneously — there is no manual activation mode"
|
|
1989
|
+
},
|
|
1990
|
+
{
|
|
1991
|
+
"note": "Uses aria-disabled (not native disabled) to keep items visible and focusable"
|
|
1992
|
+
},
|
|
1993
|
+
{
|
|
1994
|
+
"note": "Supports controlled (value) and uncontrolled (defaultValue) modes"
|
|
1995
|
+
},
|
|
1996
|
+
{
|
|
1997
|
+
"note": "Keyboard: Arrow keys navigate and select, Tab moves out of the group"
|
|
1998
|
+
}
|
|
1999
|
+
],
|
|
2000
|
+
"examples": [
|
|
2001
|
+
{
|
|
2002
|
+
"name": "Basic",
|
|
2003
|
+
"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>"
|
|
2004
|
+
},
|
|
2005
|
+
{
|
|
2006
|
+
"name": "Controlled",
|
|
2007
|
+
"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>"
|
|
2008
|
+
}
|
|
2009
|
+
],
|
|
2010
|
+
"related": [
|
|
2011
|
+
"Tabs"
|
|
2012
|
+
],
|
|
2013
|
+
"use": "when selection is a standalone choice that drives external state (filter, view mode, sort order, time period)",
|
|
2014
|
+
"notFor": "switching between content sections on the same page — use Tabs instead (owns the content panels)"
|
|
1868
2015
|
},
|
|
1869
2016
|
"Select": {
|
|
1870
2017
|
"props": {
|
|
@@ -1955,7 +2102,9 @@
|
|
|
1955
2102
|
"description": null,
|
|
1956
2103
|
"gotchas": null,
|
|
1957
2104
|
"examples": null,
|
|
1958
|
-
"related": null
|
|
2105
|
+
"related": null,
|
|
2106
|
+
"use": null,
|
|
2107
|
+
"notFor": null
|
|
1959
2108
|
},
|
|
1960
2109
|
"Sidebar": {
|
|
1961
2110
|
"props": {
|
|
@@ -1965,31 +2114,31 @@
|
|
|
1965
2114
|
"defaultValue": "'left'",
|
|
1966
2115
|
"description": "Sidebar position. Affects border placement and drawer slide direction."
|
|
1967
2116
|
},
|
|
2117
|
+
"children": {
|
|
2118
|
+
"type": "ReactNode",
|
|
2119
|
+
"required": true,
|
|
2120
|
+
"description": "Sidebar content (Header, Nav, etc.)."
|
|
2121
|
+
},
|
|
2122
|
+
"className": {
|
|
2123
|
+
"type": "string",
|
|
2124
|
+
"required": false,
|
|
2125
|
+
"description": "Additional CSS class names."
|
|
2126
|
+
},
|
|
1968
2127
|
"drawer": {
|
|
1969
2128
|
"type": "boolean",
|
|
1970
2129
|
"required": false,
|
|
1971
2130
|
"defaultValue": "false",
|
|
1972
|
-
"description": "Enable drawer mode (mobile overlay).\nWhen true, sidebar renders
|
|
2131
|
+
"description": "Enable drawer mode (mobile overlay).\nEnable drawer mode (mobile overlay).\nWhen true, sidebar renders with backdrop, focus trap, and dialog semantics."
|
|
1973
2132
|
},
|
|
1974
2133
|
"open": {
|
|
1975
2134
|
"type": "boolean",
|
|
1976
2135
|
"required": false,
|
|
1977
|
-
"description": "Drawer open state.
|
|
2136
|
+
"description": "Drawer open state."
|
|
1978
2137
|
},
|
|
1979
2138
|
"onClose": {
|
|
1980
2139
|
"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
2140
|
"required": true,
|
|
1987
|
-
"description": "
|
|
1988
|
-
},
|
|
1989
|
-
"className": {
|
|
1990
|
-
"type": "string",
|
|
1991
|
-
"required": false,
|
|
1992
|
-
"description": "Additional CSS class names."
|
|
2141
|
+
"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
2142
|
}
|
|
1994
2143
|
},
|
|
1995
2144
|
"cssTokens": [
|
|
@@ -2011,7 +2160,9 @@
|
|
|
2011
2160
|
"description": null,
|
|
2012
2161
|
"gotchas": null,
|
|
2013
2162
|
"examples": null,
|
|
2014
|
-
"related": null
|
|
2163
|
+
"related": null,
|
|
2164
|
+
"use": null,
|
|
2165
|
+
"notFor": null
|
|
2015
2166
|
},
|
|
2016
2167
|
"StepIndicator": {
|
|
2017
2168
|
"props": {
|
|
@@ -2067,7 +2218,9 @@
|
|
|
2067
2218
|
"description": null,
|
|
2068
2219
|
"gotchas": null,
|
|
2069
2220
|
"examples": null,
|
|
2070
|
-
"related": null
|
|
2221
|
+
"related": null,
|
|
2222
|
+
"use": null,
|
|
2223
|
+
"notFor": null
|
|
2071
2224
|
},
|
|
2072
2225
|
"StepList": {
|
|
2073
2226
|
"props": {
|
|
@@ -2113,7 +2266,9 @@
|
|
|
2113
2266
|
"description": null,
|
|
2114
2267
|
"gotchas": null,
|
|
2115
2268
|
"examples": null,
|
|
2116
|
-
"related": null
|
|
2269
|
+
"related": null,
|
|
2270
|
+
"use": null,
|
|
2271
|
+
"notFor": null
|
|
2117
2272
|
},
|
|
2118
2273
|
"Switch": {
|
|
2119
2274
|
"props": {
|
|
@@ -2170,7 +2325,9 @@
|
|
|
2170
2325
|
"description": null,
|
|
2171
2326
|
"gotchas": null,
|
|
2172
2327
|
"examples": null,
|
|
2173
|
-
"related": null
|
|
2328
|
+
"related": null,
|
|
2329
|
+
"use": null,
|
|
2330
|
+
"notFor": null
|
|
2174
2331
|
},
|
|
2175
2332
|
"Tabs": {
|
|
2176
2333
|
"props": {
|
|
@@ -2267,7 +2424,9 @@
|
|
|
2267
2424
|
],
|
|
2268
2425
|
"related": [
|
|
2269
2426
|
"SegmentedControl"
|
|
2270
|
-
]
|
|
2427
|
+
],
|
|
2428
|
+
"use": "when selecting reveals a content panel owned by this component (Tabs.Panel below the tab list)",
|
|
2429
|
+
"notFor": "filters, view-mode switches, or sort-order pickers — use SegmentedControl instead (no owned panels)"
|
|
2271
2430
|
},
|
|
2272
2431
|
"Textarea": {
|
|
2273
2432
|
"props": {
|
|
@@ -2340,7 +2499,9 @@
|
|
|
2340
2499
|
"description": null,
|
|
2341
2500
|
"gotchas": null,
|
|
2342
2501
|
"examples": null,
|
|
2343
|
-
"related": null
|
|
2502
|
+
"related": null,
|
|
2503
|
+
"use": null,
|
|
2504
|
+
"notFor": null
|
|
2344
2505
|
},
|
|
2345
2506
|
"TextInput": {
|
|
2346
2507
|
"props": {
|
|
@@ -2419,7 +2580,9 @@
|
|
|
2419
2580
|
"description": null,
|
|
2420
2581
|
"gotchas": null,
|
|
2421
2582
|
"examples": null,
|
|
2422
|
-
"related": null
|
|
2583
|
+
"related": null,
|
|
2584
|
+
"use": null,
|
|
2585
|
+
"notFor": null
|
|
2423
2586
|
},
|
|
2424
2587
|
"Toolbar": {
|
|
2425
2588
|
"props": {
|
|
@@ -2458,7 +2621,9 @@
|
|
|
2458
2621
|
"description": null,
|
|
2459
2622
|
"gotchas": null,
|
|
2460
2623
|
"examples": null,
|
|
2461
|
-
"related": null
|
|
2624
|
+
"related": null,
|
|
2625
|
+
"use": null,
|
|
2626
|
+
"notFor": null
|
|
2462
2627
|
},
|
|
2463
2628
|
"Tooltip": {
|
|
2464
2629
|
"props": {
|
|
@@ -2496,7 +2661,9 @@
|
|
|
2496
2661
|
"description": null,
|
|
2497
2662
|
"gotchas": null,
|
|
2498
2663
|
"examples": null,
|
|
2499
|
-
"related": null
|
|
2664
|
+
"related": null,
|
|
2665
|
+
"use": null,
|
|
2666
|
+
"notFor": null
|
|
2500
2667
|
}
|
|
2501
2668
|
},
|
|
2502
2669
|
"utilities": {
|
|
@@ -2639,6 +2806,53 @@
|
|
|
2639
2806
|
"is-layer-top"
|
|
2640
2807
|
]
|
|
2641
2808
|
},
|
|
2809
|
+
"guides": {
|
|
2810
|
+
"tabsVsSegmentedControl": {
|
|
2811
|
+
"title": "Tabs vs SegmentedControl",
|
|
2812
|
+
"question": "Does selecting an option reveal a content panel owned by this component?",
|
|
2813
|
+
"rules": [
|
|
2814
|
+
{
|
|
2815
|
+
"answer": "Yes — selecting shows a Tabs.Panel below the tab list",
|
|
2816
|
+
"use": "Tabs"
|
|
2817
|
+
},
|
|
2818
|
+
{
|
|
2819
|
+
"answer": "No — selection drives external state (filter, view mode, sort order)",
|
|
2820
|
+
"use": "SegmentedControl"
|
|
2821
|
+
}
|
|
2822
|
+
],
|
|
2823
|
+
"components": [
|
|
2824
|
+
"Tabs",
|
|
2825
|
+
"SegmentedControl"
|
|
2826
|
+
],
|
|
2827
|
+
"storybookPath": "Guides/Tabs vs SegmentedControl",
|
|
2828
|
+
"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."
|
|
2829
|
+
},
|
|
2830
|
+
"chipVsButton": {
|
|
2831
|
+
"title": "Chip vs Button",
|
|
2832
|
+
"question": "Is this an action the user performs, or a label/tag/toggle representing a value?",
|
|
2833
|
+
"rules": [
|
|
2834
|
+
{
|
|
2835
|
+
"answer": "Action — save, delete, submit, navigate, open a modal",
|
|
2836
|
+
"use": "Button"
|
|
2837
|
+
},
|
|
2838
|
+
{
|
|
2839
|
+
"answer": "Label or tag — a category, status badge, or read-only value indicator",
|
|
2840
|
+
"use": "Chip (non-interactive, no onClick)"
|
|
2841
|
+
},
|
|
2842
|
+
{
|
|
2843
|
+
"answer": "Filter toggle or multi-select token — represents 'is this category active?'",
|
|
2844
|
+
"use": "Chip (interactive or inside ChipGroup)"
|
|
2845
|
+
}
|
|
2846
|
+
],
|
|
2847
|
+
"components": [
|
|
2848
|
+
"Chip",
|
|
2849
|
+
"ChipGroup",
|
|
2850
|
+
"Button"
|
|
2851
|
+
],
|
|
2852
|
+
"storybookPath": "Guides/Chip vs Button",
|
|
2853
|
+
"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."
|
|
2854
|
+
}
|
|
2855
|
+
},
|
|
2642
2856
|
"icons": {
|
|
2643
2857
|
"sets": {
|
|
2644
2858
|
"cred": 12,
|