agentic-ds-kit 0.1.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/AGENTS.md +10 -0
- package/CLAUDE.md +1 -0
- package/LICENSE +21 -0
- package/README.md +38 -0
- package/contracts/accordion.json +38 -0
- package/contracts/alert.json +57 -0
- package/contracts/alertdialog.json +89 -0
- package/contracts/appheader.json +140 -0
- package/contracts/appnav.json +72 -0
- package/contracts/avatar.json +63 -0
- package/contracts/avatargroup.json +83 -0
- package/contracts/badge.json +92 -0
- package/contracts/barchart.json +55 -0
- package/contracts/breadcrumb.json +76 -0
- package/contracts/button.json +120 -0
- package/contracts/buttongroup.json +48 -0
- package/contracts/calendar.json +93 -0
- package/contracts/card.json +123 -0
- package/contracts/carousel.json +98 -0
- package/contracts/cell.json +203 -0
- package/contracts/chat.json +131 -0
- package/contracts/checkbox.json +101 -0
- package/contracts/collapsible.json +66 -0
- package/contracts/command.json +84 -0
- package/contracts/datatable.json +126 -0
- package/contracts/datepicker.json +102 -0
- package/contracts/drawer.json +93 -0
- package/contracts/dropdownmenu.json +190 -0
- package/contracts/empty.json +79 -0
- package/contracts/field.json +49 -0
- package/contracts/fieldset.json +29 -0
- package/contracts/headercell.json +107 -0
- package/contracts/index.json +478 -0
- package/contracts/input.json +119 -0
- package/contracts/inputotp.json +119 -0
- package/contracts/insightcard.json +130 -0
- package/contracts/linechart.json +51 -0
- package/contracts/loadinganimation.json +33 -0
- package/contracts/modal.json +100 -0
- package/contracts/modalcard.json +88 -0
- package/contracts/navigationmenu.json +65 -0
- package/contracts/numbertransition.json +33 -0
- package/contracts/pageheader.json +101 -0
- package/contracts/pagination.json +85 -0
- package/contracts/patterns/activity.json +30 -0
- package/contracts/patterns/assistant-workspace.json +16 -0
- package/contracts/patterns/dashboard.json +12 -0
- package/contracts/patterns/empty-first-run.json +15 -0
- package/contracts/patterns/inbox.json +32 -0
- package/contracts/patterns/invite-members.json +14 -0
- package/contracts/patterns/list-detail.json +13 -0
- package/contracts/patterns/settings-form.json +13 -0
- package/contracts/piechart.json +68 -0
- package/contracts/progress.json +124 -0
- package/contracts/progresssteps.json +91 -0
- package/contracts/radiogroup.json +132 -0
- package/contracts/scoreboard.json +46 -0
- package/contracts/scorecard.json +124 -0
- package/contracts/section.json +97 -0
- package/contracts/select.json +130 -0
- package/contracts/shimmertext.json +33 -0
- package/contracts/sidenav.json +133 -0
- package/contracts/slider.json +81 -0
- package/contracts/spinner.json +52 -0
- package/contracts/switch.json +94 -0
- package/contracts/table.json +92 -0
- package/contracts/tabs.json +90 -0
- package/contracts/textarea.json +54 -0
- package/contracts/thinkinganimation.json +32 -0
- package/contracts/timeline.json +49 -0
- package/contracts/toast.json +104 -0
- package/contracts/tooltip.json +66 -0
- package/lib/tokens.css +637 -0
- package/package.json +60 -0
- package/skills/prototype-from-kit/SKILL.md +29 -0
- package/src/index.ts +71 -0
- package/tokens/tokens.json +725 -0
- package/ui/Accordion/Accordion.module.css +68 -0
- package/ui/Accordion/Accordion.tsx +51 -0
- package/ui/Accordion/Accordion.types.ts +10 -0
- package/ui/Accordion/index.ts +2 -0
- package/ui/Alert/Alert.module.css +62 -0
- package/ui/Alert/Alert.tsx +27 -0
- package/ui/Alert/Alert.types.ts +7 -0
- package/ui/Alert/index.ts +2 -0
- package/ui/AlertDialog/AlertDialog.module.css +71 -0
- package/ui/AlertDialog/AlertDialog.tsx +109 -0
- package/ui/AlertDialog/AlertDialog.types.ts +14 -0
- package/ui/AlertDialog/index.ts +6 -0
- package/ui/AppHeader/AppHeader.module.css +120 -0
- package/ui/AppHeader/AppHeader.tsx +70 -0
- package/ui/AppHeader/AppHeader.types.ts +28 -0
- package/ui/AppHeader/index.ts +2 -0
- package/ui/AppNav/AppNav.module.css +168 -0
- package/ui/AppNav/AppNav.tsx +137 -0
- package/ui/AppNav/AppNav.types.ts +24 -0
- package/ui/AppNav/index.ts +2 -0
- package/ui/Avatar/Avatar.module.css +52 -0
- package/ui/Avatar/Avatar.tsx +62 -0
- package/ui/Avatar/Avatar.types.ts +8 -0
- package/ui/Avatar/index.ts +2 -0
- package/ui/AvatarGroup/AvatarGroup.module.css +49 -0
- package/ui/AvatarGroup/AvatarGroup.tsx +29 -0
- package/ui/AvatarGroup/AvatarGroup.types.ts +16 -0
- package/ui/AvatarGroup/index.ts +2 -0
- package/ui/Badge/Badge.module.css +92 -0
- package/ui/Badge/Badge.tsx +43 -0
- package/ui/Badge/Badge.types.ts +11 -0
- package/ui/Badge/index.ts +2 -0
- package/ui/BarChart/BarChart.module.css +56 -0
- package/ui/BarChart/BarChart.tsx +380 -0
- package/ui/BarChart/BarChart.types.ts +18 -0
- package/ui/BarChart/index.ts +2 -0
- package/ui/Breadcrumb/Breadcrumb.module.css +64 -0
- package/ui/Breadcrumb/Breadcrumb.tsx +89 -0
- package/ui/Breadcrumb/Breadcrumb.types.ts +14 -0
- package/ui/Breadcrumb/index.ts +2 -0
- package/ui/Button/Button.module.css +101 -0
- package/ui/Button/Button.tsx +49 -0
- package/ui/Button/Button.types.ts +18 -0
- package/ui/Button/index.ts +2 -0
- package/ui/Button/lucideName.tsx +188 -0
- package/ui/ButtonGroup/ButtonGroup.module.css +31 -0
- package/ui/ButtonGroup/ButtonGroup.tsx +12 -0
- package/ui/ButtonGroup/ButtonGroup.types.ts +6 -0
- package/ui/ButtonGroup/index.ts +2 -0
- package/ui/Calendar/Calendar.module.css +146 -0
- package/ui/Calendar/Calendar.tsx +296 -0
- package/ui/Calendar/Calendar.types.ts +11 -0
- package/ui/Calendar/index.ts +2 -0
- package/ui/Card/Card.module.css +95 -0
- package/ui/Card/Card.tsx +69 -0
- package/ui/Card/Card.types.ts +23 -0
- package/ui/Card/index.ts +2 -0
- package/ui/Carousel/Carousel.module.css +114 -0
- package/ui/Carousel/Carousel.tsx +152 -0
- package/ui/Carousel/Carousel.types.ts +17 -0
- package/ui/Carousel/index.ts +7 -0
- package/ui/Cell/Cell.module.css +133 -0
- package/ui/Cell/Cell.tsx +300 -0
- package/ui/Cell/Cell.types.ts +69 -0
- package/ui/Cell/index.ts +11 -0
- package/ui/Chat/Chat.module.css +149 -0
- package/ui/Chat/Chat.tsx +175 -0
- package/ui/Chat/Chat.types.ts +39 -0
- package/ui/Chat/index.ts +2 -0
- package/ui/Checkbox/Checkbox.module.css +135 -0
- package/ui/Checkbox/Checkbox.tsx +70 -0
- package/ui/Checkbox/Checkbox.types.ts +15 -0
- package/ui/Checkbox/index.ts +2 -0
- package/ui/Collapsible/Collapsible.module.css +68 -0
- package/ui/Collapsible/Collapsible.tsx +59 -0
- package/ui/Collapsible/Collapsible.types.ts +9 -0
- package/ui/Collapsible/index.ts +2 -0
- package/ui/Command/Command.module.css +138 -0
- package/ui/Command/Command.tsx +152 -0
- package/ui/Command/Command.types.ts +20 -0
- package/ui/Command/index.ts +2 -0
- package/ui/DataTable/DataTable.module.css +211 -0
- package/ui/DataTable/DataTable.tsx +429 -0
- package/ui/DataTable/DataTable.types.ts +35 -0
- package/ui/DataTable/index.ts +8 -0
- package/ui/DatePicker/DatePicker.module.css +44 -0
- package/ui/DatePicker/DatePicker.tsx +123 -0
- package/ui/DatePicker/DatePicker.types.ts +15 -0
- package/ui/DatePicker/index.ts +2 -0
- package/ui/Drawer/Drawer.module.css +204 -0
- package/ui/Drawer/Drawer.tsx +112 -0
- package/ui/Drawer/Drawer.types.ts +14 -0
- package/ui/Drawer/index.ts +2 -0
- package/ui/DropdownMenu/DropdownMenu.module.css +319 -0
- package/ui/DropdownMenu/DropdownMenu.tsx +580 -0
- package/ui/DropdownMenu/DropdownMenu.types.ts +48 -0
- package/ui/DropdownMenu/index.ts +8 -0
- package/ui/Empty/Empty.module.css +68 -0
- package/ui/Empty/Empty.tsx +35 -0
- package/ui/Empty/Empty.types.ts +10 -0
- package/ui/Empty/index.ts +2 -0
- package/ui/Field/Field.module.css +66 -0
- package/ui/Field/Field.tsx +46 -0
- package/ui/Field/Field.types.ts +12 -0
- package/ui/Field/index.ts +2 -0
- package/ui/FieldSet/FieldSet.module.css +30 -0
- package/ui/FieldSet/FieldSet.tsx +14 -0
- package/ui/FieldSet/FieldSet.types.ts +7 -0
- package/ui/FieldSet/index.ts +2 -0
- package/ui/HeaderCell/HeaderCell.module.css +85 -0
- package/ui/HeaderCell/HeaderCell.tsx +71 -0
- package/ui/HeaderCell/HeaderCell.types.ts +18 -0
- package/ui/HeaderCell/index.ts +2 -0
- package/ui/Input/Input.module.css +59 -0
- package/ui/Input/Input.tsx +65 -0
- package/ui/Input/Input.types.ts +22 -0
- package/ui/Input/index.ts +2 -0
- package/ui/InputOTP/InputOTP.module.css +139 -0
- package/ui/InputOTP/InputOTP.tsx +136 -0
- package/ui/InputOTP/InputOTP.types.ts +19 -0
- package/ui/InputOTP/index.ts +2 -0
- package/ui/InsightCard/InsightCard.module.css +166 -0
- package/ui/InsightCard/InsightCard.tsx +90 -0
- package/ui/InsightCard/InsightCard.types.ts +20 -0
- package/ui/InsightCard/index.ts +7 -0
- package/ui/LineChart/LineChart.module.css +93 -0
- package/ui/LineChart/LineChart.tsx +424 -0
- package/ui/LineChart/LineChart.types.ts +19 -0
- package/ui/LineChart/index.ts +2 -0
- package/ui/LoadingAnimation/LoadingAnimation.module.css +66 -0
- package/ui/LoadingAnimation/LoadingAnimation.tsx +41 -0
- package/ui/LoadingAnimation/LoadingAnimation.types.ts +9 -0
- package/ui/LoadingAnimation/index.ts +6 -0
- package/ui/Modal/Modal.module.css +48 -0
- package/ui/Modal/Modal.tsx +114 -0
- package/ui/Modal/Modal.types.ts +15 -0
- package/ui/Modal/index.ts +2 -0
- package/ui/ModalCard/ModalCard.module.css +137 -0
- package/ui/ModalCard/ModalCard.tsx +58 -0
- package/ui/ModalCard/ModalCard.types.ts +15 -0
- package/ui/ModalCard/index.ts +2 -0
- package/ui/NavigationMenu/NavigationMenu.module.css +31 -0
- package/ui/NavigationMenu/NavigationMenu.tsx +57 -0
- package/ui/NavigationMenu/NavigationMenu.types.ts +22 -0
- package/ui/NavigationMenu/index.ts +7 -0
- package/ui/NumberTransition/NumberTransition.module.css +110 -0
- package/ui/NumberTransition/NumberTransition.tsx +78 -0
- package/ui/NumberTransition/NumberTransition.types.ts +9 -0
- package/ui/NumberTransition/index.ts +2 -0
- package/ui/PageHeader/PageHeader.module.css +57 -0
- package/ui/PageHeader/PageHeader.tsx +39 -0
- package/ui/PageHeader/PageHeader.types.ts +12 -0
- package/ui/PageHeader/index.ts +2 -0
- package/ui/Pagination/Pagination.module.css +19 -0
- package/ui/Pagination/Pagination.tsx +147 -0
- package/ui/Pagination/Pagination.types.ts +12 -0
- package/ui/Pagination/index.ts +2 -0
- package/ui/PieChart/PieChart.module.css +116 -0
- package/ui/PieChart/PieChart.tsx +293 -0
- package/ui/PieChart/PieChart.types.ts +22 -0
- package/ui/PieChart/index.ts +2 -0
- package/ui/Progress/Progress.module.css +226 -0
- package/ui/Progress/Progress.tsx +167 -0
- package/ui/Progress/Progress.types.ts +15 -0
- package/ui/Progress/index.ts +8 -0
- package/ui/ProgressSteps/ProgressSteps.module.css +210 -0
- package/ui/ProgressSteps/ProgressSteps.tsx +105 -0
- package/ui/ProgressSteps/ProgressSteps.types.ts +19 -0
- package/ui/ProgressSteps/index.ts +8 -0
- package/ui/RadioGroup/RadioGroup.module.css +284 -0
- package/ui/RadioGroup/RadioGroup.tsx +116 -0
- package/ui/RadioGroup/RadioGroup.types.ts +30 -0
- package/ui/RadioGroup/index.ts +8 -0
- package/ui/Scoreboard/Scoreboard.module.css +53 -0
- package/ui/Scoreboard/Scoreboard.tsx +41 -0
- package/ui/Scoreboard/Scoreboard.types.ts +7 -0
- package/ui/Scoreboard/index.ts +2 -0
- package/ui/Scorecard/Scorecard.module.css +150 -0
- package/ui/Scorecard/Scorecard.tsx +92 -0
- package/ui/Scorecard/Scorecard.types.ts +18 -0
- package/ui/Scorecard/index.ts +2 -0
- package/ui/Section/Section.module.css +104 -0
- package/ui/Section/Section.tsx +75 -0
- package/ui/Section/Section.types.ts +15 -0
- package/ui/Section/index.ts +2 -0
- package/ui/Select/Select.module.css +7 -0
- package/ui/Select/Select.tsx +113 -0
- package/ui/Select/Select.types.ts +26 -0
- package/ui/Select/index.ts +2 -0
- package/ui/ShimmerText/ShimmerText.module.css +46 -0
- package/ui/ShimmerText/ShimmerText.tsx +48 -0
- package/ui/ShimmerText/ShimmerText.types.ts +12 -0
- package/ui/ShimmerText/index.ts +2 -0
- package/ui/SideNav/SideNav.module.css +347 -0
- package/ui/SideNav/SideNav.tsx +222 -0
- package/ui/SideNav/SideNav.types.ts +42 -0
- package/ui/SideNav/index.ts +8 -0
- package/ui/Slider/Slider.module.css +105 -0
- package/ui/Slider/Slider.tsx +187 -0
- package/ui/Slider/Slider.types.ts +11 -0
- package/ui/Slider/index.ts +2 -0
- package/ui/Spinner/Spinner.module.css +58 -0
- package/ui/Spinner/Spinner.tsx +19 -0
- package/ui/Spinner/Spinner.types.ts +6 -0
- package/ui/Spinner/index.ts +2 -0
- package/ui/Switch/Switch.module.css +189 -0
- package/ui/Switch/Switch.tsx +65 -0
- package/ui/Switch/Switch.types.ts +12 -0
- package/ui/Switch/index.ts +2 -0
- package/ui/Table/Table.module.css +132 -0
- package/ui/Table/Table.tsx +108 -0
- package/ui/Table/Table.types.ts +26 -0
- package/ui/Table/index.ts +8 -0
- package/ui/Tabs/Tabs.module.css +162 -0
- package/ui/Tabs/Tabs.tsx +150 -0
- package/ui/Tabs/Tabs.types.ts +21 -0
- package/ui/Tabs/index.ts +2 -0
- package/ui/Textarea/Textarea.module.css +74 -0
- package/ui/Textarea/Textarea.tsx +38 -0
- package/ui/Textarea/Textarea.types.ts +14 -0
- package/ui/Textarea/index.ts +2 -0
- package/ui/ThinkingAnimation/ThinkingAnimation.module.css +75 -0
- package/ui/ThinkingAnimation/ThinkingAnimation.tsx +31 -0
- package/ui/ThinkingAnimation/ThinkingAnimation.types.ts +8 -0
- package/ui/ThinkingAnimation/index.ts +2 -0
- package/ui/Timeline/Timeline.module.css +99 -0
- package/ui/Timeline/Timeline.tsx +47 -0
- package/ui/Timeline/Timeline.types.ts +16 -0
- package/ui/Timeline/index.ts +2 -0
- package/ui/Toast/Toast.module.css +133 -0
- package/ui/Toast/Toast.tsx +89 -0
- package/ui/Toast/Toast.types.ts +17 -0
- package/ui/Toast/index.ts +2 -0
- package/ui/Tooltip/Tooltip.module.css +111 -0
- package/ui/Tooltip/Tooltip.tsx +101 -0
- package/ui/Tooltip/index.ts +2 -0
- package/ui/patterns/ActivityPattern/ActivityFeed.tsx +77 -0
- package/ui/patterns/ActivityPattern/ActivityPattern.tsx +120 -0
- package/ui/patterns/ActivityPattern/ActivityTasks.tsx +86 -0
- package/ui/patterns/ActivityPattern/TaskDrawer.module.css +39 -0
- package/ui/patterns/ActivityPattern/TaskDrawer.tsx +186 -0
- package/ui/patterns/ActivityPattern/index.ts +2 -0
- package/ui/patterns/AssistantWorkspacePattern/AssistantWorkspacePattern.module.css +16 -0
- package/ui/patterns/AssistantWorkspacePattern/AssistantWorkspacePattern.tsx +159 -0
- package/ui/patterns/AssistantWorkspacePattern/index.ts +2 -0
- package/ui/patterns/DashboardPattern/DashboardPattern.tsx +102 -0
- package/ui/patterns/DashboardPattern/index.ts +1 -0
- package/ui/patterns/DashboardPattern/patterns.module.css +6 -0
- package/ui/patterns/EmptyFirstRunPattern/EmptyFirstRunPattern.tsx +125 -0
- package/ui/patterns/EmptyFirstRunPattern/index.ts +2 -0
- package/ui/patterns/InboxPattern/InboxPattern.module.css +40 -0
- package/ui/patterns/InboxPattern/InboxPattern.tsx +192 -0
- package/ui/patterns/InboxPattern/InboxReplyDrawer.tsx +97 -0
- package/ui/patterns/InboxPattern/inbox-data.ts +101 -0
- package/ui/patterns/InboxPattern/index.ts +2 -0
- package/ui/patterns/InviteMembersPattern/InviteMembersPattern.tsx +148 -0
- package/ui/patterns/InviteMembersPattern/index.ts +2 -0
- package/ui/patterns/ListDetailPattern/ListDetailPattern.module.css +34 -0
- package/ui/patterns/ListDetailPattern/ListDetailPattern.tsx +145 -0
- package/ui/patterns/ListDetailPattern/index.ts +2 -0
- package/ui/patterns/SettingsFormPattern/SettingsFormPattern.module.css +12 -0
- package/ui/patterns/SettingsFormPattern/SettingsFormPattern.tsx +89 -0
- package/ui/patterns/SettingsFormPattern/index.ts +3 -0
- package/ui/shared/ChartFrame.module.css +295 -0
- package/ui/shared/ChartFrame.tsx +87 -0
- package/ui/shared/chartMath.ts +228 -0
- package/ui/shared/controls.module.css +48 -0
- package/ui/shared/useChartSize.ts +22 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "carousel",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Paged track of slides with prev/next kit Buttons. One piece.",
|
|
5
|
+
"useWhen": [
|
|
6
|
+
"galleries",
|
|
7
|
+
"featured cards",
|
|
8
|
+
"paged media"
|
|
9
|
+
],
|
|
10
|
+
"doNotUseWhen": [
|
|
11
|
+
"Tabs for views",
|
|
12
|
+
"Pagination for lists",
|
|
13
|
+
"don't use for primary nav"
|
|
14
|
+
],
|
|
15
|
+
"contains": [
|
|
16
|
+
"button"
|
|
17
|
+
],
|
|
18
|
+
"props": {
|
|
19
|
+
"items": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"required": true,
|
|
22
|
+
"minItems": 1,
|
|
23
|
+
"note": "ReactNode slides. No CarouselCard or Slide cousins."
|
|
24
|
+
},
|
|
25
|
+
"orientation": {
|
|
26
|
+
"type": "enum",
|
|
27
|
+
"values": [
|
|
28
|
+
"horizontal",
|
|
29
|
+
"vertical"
|
|
30
|
+
],
|
|
31
|
+
"default": "horizontal"
|
|
32
|
+
},
|
|
33
|
+
"loop": {
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"default": false
|
|
36
|
+
},
|
|
37
|
+
"align": {
|
|
38
|
+
"type": "enum",
|
|
39
|
+
"values": [
|
|
40
|
+
"start",
|
|
41
|
+
"center"
|
|
42
|
+
],
|
|
43
|
+
"default": "start"
|
|
44
|
+
},
|
|
45
|
+
"slidesPerView": {
|
|
46
|
+
"type": "enum",
|
|
47
|
+
"values": [
|
|
48
|
+
1,
|
|
49
|
+
2,
|
|
50
|
+
3,
|
|
51
|
+
4
|
|
52
|
+
],
|
|
53
|
+
"default": 1,
|
|
54
|
+
"note": "1 = full slide; 3 = one-third; 4 = quarter. Scoreboard uses 4 when items > 4."
|
|
55
|
+
},
|
|
56
|
+
"showControls": {
|
|
57
|
+
"type": "boolean",
|
|
58
|
+
"default": true
|
|
59
|
+
},
|
|
60
|
+
"showIndex": {
|
|
61
|
+
"type": "boolean",
|
|
62
|
+
"default": false,
|
|
63
|
+
"note": "Caption under the track: Slide N of M, aria-live polite"
|
|
64
|
+
},
|
|
65
|
+
"onIndexChange": {
|
|
66
|
+
"type": "function",
|
|
67
|
+
"required": false,
|
|
68
|
+
"note": "(index: number) => void // 0-based"
|
|
69
|
+
},
|
|
70
|
+
"ariaLabel": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"required": false,
|
|
73
|
+
"default": "Carousel"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"tokens": [
|
|
77
|
+
"text.muted",
|
|
78
|
+
"focus.ring",
|
|
79
|
+
"space.4",
|
|
80
|
+
"space.12"
|
|
81
|
+
],
|
|
82
|
+
"a11y": {
|
|
83
|
+
"element": "div[role=region]",
|
|
84
|
+
"requirements": [
|
|
85
|
+
"region with aria-roledescription=carousel",
|
|
86
|
+
"slides are role=group with aria-roledescription=slide",
|
|
87
|
+
"button names Previous slide / Next slide",
|
|
88
|
+
"index live region if shown"
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
"doNot": [
|
|
92
|
+
"no CarouselContent/Item/Previous/Next",
|
|
93
|
+
"do not use raw hex",
|
|
94
|
+
"compose kit Button for controls",
|
|
95
|
+
"no autoplay in v1"
|
|
96
|
+
],
|
|
97
|
+
"snippet": "<Carousel items={[<span>1</span>, <span>2</span>, <span>3</span>]} />"
|
|
98
|
+
}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "cell",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Inline cell content for datasets: text, avatar, file, payment, badge, trend, avatar group, select, progress, rating, or row actions, with optional checkbox.",
|
|
5
|
+
"useWhen": [
|
|
6
|
+
"DataTable body cells",
|
|
7
|
+
"Mixed visual and label content in a row"
|
|
8
|
+
],
|
|
9
|
+
"doNotUseWhen": [
|
|
10
|
+
"A full searchable dataset \u2014 use DataTable, which composes Cell",
|
|
11
|
+
"A short static text table \u2014 use Table"
|
|
12
|
+
],
|
|
13
|
+
"contains": [
|
|
14
|
+
"avatar",
|
|
15
|
+
"avatargroup",
|
|
16
|
+
"badge",
|
|
17
|
+
"buttongroup",
|
|
18
|
+
"button",
|
|
19
|
+
"checkbox",
|
|
20
|
+
"select",
|
|
21
|
+
"progress"
|
|
22
|
+
],
|
|
23
|
+
"props": {
|
|
24
|
+
"type": {
|
|
25
|
+
"type": "enum",
|
|
26
|
+
"values": [
|
|
27
|
+
"text",
|
|
28
|
+
"avatar",
|
|
29
|
+
"file",
|
|
30
|
+
"payment",
|
|
31
|
+
"badge",
|
|
32
|
+
"badges",
|
|
33
|
+
"trendPositive",
|
|
34
|
+
"trendNegative",
|
|
35
|
+
"avatarGroup",
|
|
36
|
+
"select",
|
|
37
|
+
"progress",
|
|
38
|
+
"rating",
|
|
39
|
+
"actions",
|
|
40
|
+
"actionIcons",
|
|
41
|
+
"actionMenu"
|
|
42
|
+
],
|
|
43
|
+
"default": "text"
|
|
44
|
+
},
|
|
45
|
+
"size": {
|
|
46
|
+
"type": "enum",
|
|
47
|
+
"values": [
|
|
48
|
+
"sm",
|
|
49
|
+
"md"
|
|
50
|
+
],
|
|
51
|
+
"default": "md",
|
|
52
|
+
"note": "Avatar, AvatarGroup, and Badge map sm/md. Checkbox is always sm."
|
|
53
|
+
},
|
|
54
|
+
"text": {
|
|
55
|
+
"type": "boolean",
|
|
56
|
+
"default": true,
|
|
57
|
+
"note": "When false, hide the label (visual-only). type=text with text=false and no checkbox is an empty slot."
|
|
58
|
+
},
|
|
59
|
+
"checkbox": {
|
|
60
|
+
"type": "boolean",
|
|
61
|
+
"default": false,
|
|
62
|
+
"note": "Leading unlabeled kit Checkbox. ariaLabel is Select ${label || name || \"row\"}."
|
|
63
|
+
},
|
|
64
|
+
"label": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"required": false,
|
|
67
|
+
"note": "Text shown when text is true. For type=text this is the content."
|
|
68
|
+
},
|
|
69
|
+
"name": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"required": false,
|
|
72
|
+
"note": "Avatar / AvatarGroup person name; required for those types; falls back to label."
|
|
73
|
+
},
|
|
74
|
+
"src": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"required": false
|
|
77
|
+
},
|
|
78
|
+
"initials": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"required": false
|
|
81
|
+
},
|
|
82
|
+
"people": {
|
|
83
|
+
"type": "array",
|
|
84
|
+
"required": false,
|
|
85
|
+
"itemShape": {
|
|
86
|
+
"name": "string",
|
|
87
|
+
"src": "string?",
|
|
88
|
+
"initials": "string?"
|
|
89
|
+
},
|
|
90
|
+
"note": "Required for avatarGroup. Passed to kit AvatarGroup, max default 3."
|
|
91
|
+
},
|
|
92
|
+
"icon": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"required": false,
|
|
95
|
+
"note": "Lucide catalog name. file default File, payment default CreditCard."
|
|
96
|
+
},
|
|
97
|
+
"tone": {
|
|
98
|
+
"type": "enum",
|
|
99
|
+
"values": [
|
|
100
|
+
"neutral",
|
|
101
|
+
"brand",
|
|
102
|
+
"success",
|
|
103
|
+
"warning",
|
|
104
|
+
"danger",
|
|
105
|
+
"info"
|
|
106
|
+
],
|
|
107
|
+
"default": "neutral",
|
|
108
|
+
"note": "Single Badge. Demos use success for Active-like, else neutral."
|
|
109
|
+
},
|
|
110
|
+
"badges": {
|
|
111
|
+
"type": "array",
|
|
112
|
+
"required": false,
|
|
113
|
+
"itemShape": {
|
|
114
|
+
"label": "string",
|
|
115
|
+
"tone": "BadgeTone?"
|
|
116
|
+
},
|
|
117
|
+
"note": "type=badges. Cap at 3 kit Badges."
|
|
118
|
+
},
|
|
119
|
+
"value": {
|
|
120
|
+
"type": "string | number",
|
|
121
|
+
"required": false,
|
|
122
|
+
"note": "Trend number, progress 0-100, rating 0-5, or select value."
|
|
123
|
+
},
|
|
124
|
+
"checked": {
|
|
125
|
+
"type": "boolean",
|
|
126
|
+
"required": false,
|
|
127
|
+
"note": "only when checkbox"
|
|
128
|
+
},
|
|
129
|
+
"defaultChecked": {
|
|
130
|
+
"type": "boolean",
|
|
131
|
+
"required": false,
|
|
132
|
+
"note": "only when checkbox"
|
|
133
|
+
},
|
|
134
|
+
"onCheckedChange": {
|
|
135
|
+
"type": "function",
|
|
136
|
+
"required": false,
|
|
137
|
+
"note": "(checked: boolean) => void \u2014 only when checkbox"
|
|
138
|
+
},
|
|
139
|
+
"id": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"required": false,
|
|
142
|
+
"note": "checkbox id; useId if omitted"
|
|
143
|
+
},
|
|
144
|
+
"options": {
|
|
145
|
+
"type": "array",
|
|
146
|
+
"required": false,
|
|
147
|
+
"itemShape": {
|
|
148
|
+
"value": "string",
|
|
149
|
+
"label": "string"
|
|
150
|
+
},
|
|
151
|
+
"note": "Required for type=select. Passed to kit Select."
|
|
152
|
+
},
|
|
153
|
+
"actions": {
|
|
154
|
+
"type": "array",
|
|
155
|
+
"required": false,
|
|
156
|
+
"itemShape": {
|
|
157
|
+
"label": "string?",
|
|
158
|
+
"icon": "string?",
|
|
159
|
+
"ariaLabel": "string?",
|
|
160
|
+
"variant": "ButtonVariant?"
|
|
161
|
+
},
|
|
162
|
+
"note": "type=actions (labeled Buttons in ButtonGroup, cap 3), actionIcons (icon-only Buttons, each ariaLabel), actionMenu composes kit DropdownMenu from actions."
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"tokens": [
|
|
166
|
+
"text.primary",
|
|
167
|
+
"text.secondary",
|
|
168
|
+
"icon.muted",
|
|
169
|
+
"icon.warning",
|
|
170
|
+
"status.success",
|
|
171
|
+
"status.danger",
|
|
172
|
+
"fill.brand",
|
|
173
|
+
"surface.muted",
|
|
174
|
+
"space.2",
|
|
175
|
+
"radius.full"
|
|
176
|
+
],
|
|
177
|
+
"a11y": {
|
|
178
|
+
"element": "span",
|
|
179
|
+
"requirements": [
|
|
180
|
+
"type=text is text (or text plus checkbox)",
|
|
181
|
+
"Avatar and AvatarGroup keep their own a11y",
|
|
182
|
+
"File and payment icons are aria-hidden; if text=false set aria-label on the cell from label or name",
|
|
183
|
+
"Trend aria-label is Up {value} or Down {value} when text is false",
|
|
184
|
+
"When checkbox, unlabeled kit Checkbox with ariaLabel Select ${label || name || \"row\"}",
|
|
185
|
+
"type=select uses kit Select with ariaLabel from label",
|
|
186
|
+
"type=progress composes kit Progress",
|
|
187
|
+
"type=rating is role=img, '{n} of 5'",
|
|
188
|
+
"type=actionIcons each icon-only Button needs ariaLabel",
|
|
189
|
+
"type=actionMenu ariaLabel is Row actions unless label is set"
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
"doNot": [
|
|
193
|
+
"Do not invent DataTableCell, Tag, Trend, FileIcon, PaymentMethod, or a second Badge",
|
|
194
|
+
"Do not use raw hex",
|
|
195
|
+
"Do not use Badge for trends",
|
|
196
|
+
"Do not invent local Avatar, AvatarGroup, Badge, or Checkbox \u2014 compose the kit pieces",
|
|
197
|
+
"Do not use Lucide except via LucideByName from @/ui/Button/lucideName",
|
|
198
|
+
"Do not invent a local progress bar \u2014 type=progress composes kit Progress. Do not invent Rating, StarRating, ActionCell",
|
|
199
|
+
"Do not invent a local DropdownMenu \u2014 type=actionMenu composes kit DropdownMenu",
|
|
200
|
+
"Do not invent local Select, Button, or ButtonGroup \u2014 compose the kit pieces"
|
|
201
|
+
],
|
|
202
|
+
"snippet": "<Cell type=\"progress\" size=\"md\" value={64} />"
|
|
203
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "chat",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Assistant panel with a header, a thread, and a composer. One piece.",
|
|
5
|
+
"useWhen": [
|
|
6
|
+
"An inline assistant beside a workspace",
|
|
7
|
+
"A help thread with send and a thinking state",
|
|
8
|
+
"Suggested prompts above a composer"
|
|
9
|
+
],
|
|
10
|
+
"doNotUseWhen": [
|
|
11
|
+
"A blocking overlay — use Modal",
|
|
12
|
+
"A must-choose confirm — use AlertDialog",
|
|
13
|
+
"A short notice after an action — use Toast"
|
|
14
|
+
],
|
|
15
|
+
"contains": ["button", "input", "thinkinganimation", "dropdownmenu"],
|
|
16
|
+
"props": {
|
|
17
|
+
"title": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"default": "Assistant"
|
|
20
|
+
},
|
|
21
|
+
"status": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"required": false
|
|
24
|
+
},
|
|
25
|
+
"messages": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"required": false,
|
|
28
|
+
"note": "ChatMessage[] with role user | assistant, content, optional id and timestamp. Type only — not a ChatMessage component."
|
|
29
|
+
},
|
|
30
|
+
"suggestions": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"required": false,
|
|
33
|
+
"note": "Prompt chips above the composer. kit Button sm tertiary."
|
|
34
|
+
},
|
|
35
|
+
"placeholder": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"default": "How can we help you?"
|
|
38
|
+
},
|
|
39
|
+
"emptyState": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"required": false,
|
|
42
|
+
"default": "Start a conversation."
|
|
43
|
+
},
|
|
44
|
+
"isThinking": {
|
|
45
|
+
"type": "boolean",
|
|
46
|
+
"default": false,
|
|
47
|
+
"note": "Shows kit ThinkingAnimation in the thread."
|
|
48
|
+
},
|
|
49
|
+
"disabled": {
|
|
50
|
+
"type": "boolean",
|
|
51
|
+
"default": false
|
|
52
|
+
},
|
|
53
|
+
"value": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"required": false
|
|
56
|
+
},
|
|
57
|
+
"defaultValue": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"required": false
|
|
60
|
+
},
|
|
61
|
+
"onValueChange": {
|
|
62
|
+
"type": "function",
|
|
63
|
+
"required": false
|
|
64
|
+
},
|
|
65
|
+
"onSend": {
|
|
66
|
+
"type": "function",
|
|
67
|
+
"required": false,
|
|
68
|
+
"note": "(message: string) => void"
|
|
69
|
+
},
|
|
70
|
+
"onClose": {
|
|
71
|
+
"type": "function",
|
|
72
|
+
"required": false
|
|
73
|
+
},
|
|
74
|
+
"closeLabel": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"default": "Close"
|
|
77
|
+
},
|
|
78
|
+
"menuItems": {
|
|
79
|
+
"type": "array",
|
|
80
|
+
"required": false,
|
|
81
|
+
"note": "Optional overflow actions. kit DropdownMenu."
|
|
82
|
+
},
|
|
83
|
+
"menuLabel": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"default": "More"
|
|
86
|
+
},
|
|
87
|
+
"radius": {
|
|
88
|
+
"type": "enum",
|
|
89
|
+
"values": ["lg", "none"],
|
|
90
|
+
"default": "lg",
|
|
91
|
+
"note": "lg is the standalone card. none squares the panel and drops the outer block/end borders so Chat can sit flush in a workspace rail."
|
|
92
|
+
},
|
|
93
|
+
"className": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"required": false
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"tokens": [
|
|
99
|
+
"surface.card",
|
|
100
|
+
"fill.brandSubtle",
|
|
101
|
+
"fill.brand",
|
|
102
|
+
"text.primary",
|
|
103
|
+
"text.secondary",
|
|
104
|
+
"text.muted",
|
|
105
|
+
"radius.surfaceLg",
|
|
106
|
+
"radius.0",
|
|
107
|
+
"radius.full",
|
|
108
|
+
"space.5",
|
|
109
|
+
"type.size.label",
|
|
110
|
+
"type.weight.heading",
|
|
111
|
+
"type.size.bodySm"
|
|
112
|
+
],
|
|
113
|
+
"a11y": {
|
|
114
|
+
"element": "section",
|
|
115
|
+
"requirements": [
|
|
116
|
+
"section named by title",
|
|
117
|
+
"thread is role=log with aria-live=polite",
|
|
118
|
+
"aria-busy while thinking",
|
|
119
|
+
"composer input has an accessible name",
|
|
120
|
+
"Send and Close are named icon-only kit Buttons"
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
"doNot": [
|
|
124
|
+
"Do not invent ChatMessage, ChatInput, ChatHeader, ChatBubble, or ChatAvatar cousins",
|
|
125
|
+
"Do not use Modal for an inline assistant panel",
|
|
126
|
+
"Do not override Chat radius from the host — use radius none for a full-height workspace rail",
|
|
127
|
+
"Do not use raw hex",
|
|
128
|
+
"Do not use Florence, BillingPlatform, or copilot wording in copy"
|
|
129
|
+
],
|
|
130
|
+
"snippet": "<Chat title=\"Assistant\" messages={messages} onSend={handleSend} isThinking={busy} onClose={close} />"
|
|
131
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "checkbox",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Multi-select or confirmation control. Optional visible label.",
|
|
5
|
+
"useWhen": [
|
|
6
|
+
"Independent booleans such as agree to terms or enable notifications",
|
|
7
|
+
"Confirmations that are not a submit action",
|
|
8
|
+
"Table row or icon-only select without visible text — set ariaLabel"
|
|
9
|
+
],
|
|
10
|
+
"doNotUseWhen": [
|
|
11
|
+
"Choosing one of several options — use RadioGroup",
|
|
12
|
+
"Primary form submit actions — use Button",
|
|
13
|
+
"Immediate on/off setting — use Switch"
|
|
14
|
+
],
|
|
15
|
+
"props": {
|
|
16
|
+
"id": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"required": true
|
|
19
|
+
},
|
|
20
|
+
"label": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"required": false,
|
|
23
|
+
"note": "visible text; required unless ariaLabel is set"
|
|
24
|
+
},
|
|
25
|
+
"ariaLabel": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"required": false,
|
|
28
|
+
"note": "required when label is omitted (table row, icon-only slot)"
|
|
29
|
+
},
|
|
30
|
+
"size": {
|
|
31
|
+
"type": "enum",
|
|
32
|
+
"values": [
|
|
33
|
+
"lg",
|
|
34
|
+
"md",
|
|
35
|
+
"sm"
|
|
36
|
+
],
|
|
37
|
+
"default": "md"
|
|
38
|
+
},
|
|
39
|
+
"disabled": {
|
|
40
|
+
"type": "boolean",
|
|
41
|
+
"default": false
|
|
42
|
+
},
|
|
43
|
+
"error": {
|
|
44
|
+
"type": "boolean",
|
|
45
|
+
"default": false
|
|
46
|
+
},
|
|
47
|
+
"checked": {
|
|
48
|
+
"type": "boolean",
|
|
49
|
+
"required": false,
|
|
50
|
+
"note": "controlled"
|
|
51
|
+
},
|
|
52
|
+
"defaultChecked": {
|
|
53
|
+
"type": "boolean",
|
|
54
|
+
"default": false,
|
|
55
|
+
"note": "uncontrolled"
|
|
56
|
+
},
|
|
57
|
+
"indeterminate": {
|
|
58
|
+
"type": "boolean",
|
|
59
|
+
"default": false,
|
|
60
|
+
"note": "visual + aria-checked mixed; set via input.indeterminate"
|
|
61
|
+
},
|
|
62
|
+
"onChange": {
|
|
63
|
+
"type": "function",
|
|
64
|
+
"required": false,
|
|
65
|
+
"note": "(checked: boolean) => void"
|
|
66
|
+
},
|
|
67
|
+
"name": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"required": false
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"tokens": [
|
|
73
|
+
"text.primary",
|
|
74
|
+
"action.primary",
|
|
75
|
+
"action.onPrimary",
|
|
76
|
+
"surface.card",
|
|
77
|
+
"border.strong",
|
|
78
|
+
"border.faint",
|
|
79
|
+
"border.focus",
|
|
80
|
+
"status.danger",
|
|
81
|
+
"radius.controlSm"
|
|
82
|
+
],
|
|
83
|
+
"a11y": {
|
|
84
|
+
"element": "input[type=checkbox]",
|
|
85
|
+
"requirements": [
|
|
86
|
+
"Visible label via label/htmlFor OR aria-label when no text",
|
|
87
|
+
"Disabled state is exposed",
|
|
88
|
+
"Error described if used with Field",
|
|
89
|
+
"Indeterminate is aria-checked=mixed",
|
|
90
|
+
"Do not ship unlabeled without ariaLabel"
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
"doNot": [
|
|
94
|
+
"Do not invent local Checkbox",
|
|
95
|
+
"Do not use raw hex",
|
|
96
|
+
"Do not use RadioGroup for booleans",
|
|
97
|
+
"Do not ship unlabeled without ariaLabel",
|
|
98
|
+
"Do not use Switch as a checkbox"
|
|
99
|
+
],
|
|
100
|
+
"snippet": "<Checkbox id=\"updates\" label=\"Send me product updates\" />\n<Checkbox id=\"row-1\" ariaLabel=\"Select row\" />"
|
|
101
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "collapsible",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Single show/hide panel with a title and a toggle.",
|
|
5
|
+
"useWhen": [
|
|
6
|
+
"One disclosure whose body composes kit pieces",
|
|
7
|
+
"Order, product, or extra spec the user can hide"
|
|
8
|
+
],
|
|
9
|
+
"doNotUseWhen": [
|
|
10
|
+
"Two or more related sections, one open at a time — use Accordion",
|
|
11
|
+
"In-page peer views — use Tabs"
|
|
12
|
+
],
|
|
13
|
+
"props": {
|
|
14
|
+
"trigger": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"required": true,
|
|
17
|
+
"note": "Title on the left. Toggle is a ChevronsUpDown button, not the whole row"
|
|
18
|
+
},
|
|
19
|
+
"children": {
|
|
20
|
+
"type": "slot",
|
|
21
|
+
"required": true,
|
|
22
|
+
"note": "Revealed body. Compose kit pieces, never a local cousin"
|
|
23
|
+
},
|
|
24
|
+
"defaultOpen": {
|
|
25
|
+
"type": "boolean",
|
|
26
|
+
"default": false
|
|
27
|
+
},
|
|
28
|
+
"open": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"required": false,
|
|
31
|
+
"note": "controlled"
|
|
32
|
+
},
|
|
33
|
+
"onOpenChange": {
|
|
34
|
+
"type": "function",
|
|
35
|
+
"required": false,
|
|
36
|
+
"note": "(open: boolean) => void"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"tokens": [
|
|
40
|
+
"text.primary",
|
|
41
|
+
"icon.muted",
|
|
42
|
+
"surface.muted",
|
|
43
|
+
"surface.card",
|
|
44
|
+
"border.faint",
|
|
45
|
+
"border.focus",
|
|
46
|
+
"radius.surface.md",
|
|
47
|
+
"radius.control.sm"
|
|
48
|
+
],
|
|
49
|
+
"a11y": {
|
|
50
|
+
"element": "div",
|
|
51
|
+
"requirements": [
|
|
52
|
+
"Title is not the toggle",
|
|
53
|
+
"Toggle is a button with aria-expanded and aria-label Toggle {trigger}",
|
|
54
|
+
"Button aria-controls the panel",
|
|
55
|
+
"Panel is role=region, aria-labelledby the title",
|
|
56
|
+
"Closed panel is hidden from AT"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"doNot": [
|
|
60
|
+
"Do not invent CollapsibleTrigger or CollapsibleContent cousins",
|
|
61
|
+
"Do not use Accordion for a single block",
|
|
62
|
+
"Do not make the whole header row the button",
|
|
63
|
+
"Do not use raw hex"
|
|
64
|
+
],
|
|
65
|
+
"snippet": "<Collapsible trigger=\"Order #4189\" defaultOpen>\n {children}\n</Collapsible>"
|
|
66
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "command",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Searchable command menu for quick actions.",
|
|
5
|
+
"useWhen": [
|
|
6
|
+
"Searchable actions and quick jumps",
|
|
7
|
+
"Command palette — kit Button opens kit Modal with Command inside"
|
|
8
|
+
],
|
|
9
|
+
"doNotUseWhen": [
|
|
10
|
+
"Short Field dropdown — use Select",
|
|
11
|
+
"Actions from a button — use DropdownMenu",
|
|
12
|
+
"Sidebar navigation — use AppNav",
|
|
13
|
+
"Overlay chrome — compose Modal; do not add CommandDialog"
|
|
14
|
+
],
|
|
15
|
+
"props": {
|
|
16
|
+
"placeholder": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"default": "Type a command or search..."
|
|
19
|
+
},
|
|
20
|
+
"empty": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"default": "No results found."
|
|
23
|
+
},
|
|
24
|
+
"groups": {
|
|
25
|
+
"type": "array",
|
|
26
|
+
"required": true,
|
|
27
|
+
"itemShape": {
|
|
28
|
+
"heading": "string?",
|
|
29
|
+
"items": [
|
|
30
|
+
{
|
|
31
|
+
"id": "string",
|
|
32
|
+
"label": "string",
|
|
33
|
+
"icon": "string?",
|
|
34
|
+
"shortcut": "string?",
|
|
35
|
+
"disabled": "boolean?"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"note": "Each group has optional heading and a required items array. Item icon is a Lucide PascalCase name from the catalog."
|
|
40
|
+
},
|
|
41
|
+
"onSelect": {
|
|
42
|
+
"type": "function",
|
|
43
|
+
"required": false,
|
|
44
|
+
"note": "(id: string) => void"
|
|
45
|
+
},
|
|
46
|
+
"label": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"default": "Command menu",
|
|
49
|
+
"note": "Accessible name on the combobox input"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"tokens": [
|
|
53
|
+
"surface.card",
|
|
54
|
+
"surface.muted",
|
|
55
|
+
"border.faint",
|
|
56
|
+
"border.focus",
|
|
57
|
+
"radius.surfaceMd",
|
|
58
|
+
"shadow.sm",
|
|
59
|
+
"text.primary",
|
|
60
|
+
"text.secondary",
|
|
61
|
+
"text.muted",
|
|
62
|
+
"icon.muted",
|
|
63
|
+
"space.1"
|
|
64
|
+
],
|
|
65
|
+
"a11y": {
|
|
66
|
+
"element": "div",
|
|
67
|
+
"requirements": [
|
|
68
|
+
"Input is role=combobox with aria-expanded=true, aria-controls the listbox, aria-autocomplete=list, aria-activedescendant, and aria-label from label",
|
|
69
|
+
"List is role=listbox",
|
|
70
|
+
"Items are role=option with aria-selected when highlighted and aria-disabled when disabled",
|
|
71
|
+
"useId for ids",
|
|
72
|
+
"Search icon is aria-hidden"
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
"doNot": [
|
|
76
|
+
"Do not invent CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandSeparator, CommandShortcut, or CommandDialog",
|
|
77
|
+
"Do not wrap the search field in Field — Command owns its input",
|
|
78
|
+
"Do not use kit Input (uncontrolled) for the query",
|
|
79
|
+
"Do not use cmdk or extra dependencies",
|
|
80
|
+
"Do not use raw hex",
|
|
81
|
+
"Do not close itself — compose Modal for an overlay"
|
|
82
|
+
],
|
|
83
|
+
"snippet": "<Button variant=\"secondary\" iconStart=\"Search\" onClick={open} />\n<Modal open={open} title=\"Command menu\" onClose={close}>\n <Command groups={groups} onSelect={close} />\n</Modal>"
|
|
84
|
+
}
|