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,126 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "datatable",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Framed dataset with search, filters, column settings, and a caption title.",
|
|
5
|
+
"useWhen": [
|
|
6
|
+
"Searchable datasets with filters or column settings",
|
|
7
|
+
"Selectable rows of structured data"
|
|
8
|
+
],
|
|
9
|
+
"doNotUseWhen": [
|
|
10
|
+
"A short static list \u2014 use Table",
|
|
11
|
+
"Dashboard or list-detail activity lists \u2014 use Table"
|
|
12
|
+
],
|
|
13
|
+
"props": {
|
|
14
|
+
"caption": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"required": false
|
|
17
|
+
},
|
|
18
|
+
"selectable": {
|
|
19
|
+
"type": "boolean",
|
|
20
|
+
"default": false
|
|
21
|
+
},
|
|
22
|
+
"toolbar": {
|
|
23
|
+
"type": "boolean",
|
|
24
|
+
"default": false,
|
|
25
|
+
"note": "When true, show search + filters + optional Columns"
|
|
26
|
+
},
|
|
27
|
+
"searchPlaceholder": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"default": "Search..."
|
|
30
|
+
},
|
|
31
|
+
"filters": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"required": false,
|
|
34
|
+
"itemShape": {
|
|
35
|
+
"key": "string",
|
|
36
|
+
"label": "string"
|
|
37
|
+
},
|
|
38
|
+
"note": "Each is a kit DropdownMenu of unique values from that column on the full rows, plus All {label}. Not a native select."
|
|
39
|
+
},
|
|
40
|
+
"columnSettings": {
|
|
41
|
+
"type": "boolean",
|
|
42
|
+
"required": false,
|
|
43
|
+
"note": "Columns button; kit Checkboxes to show/hide columns. Name (or first data column) cannot be hidden. Local state only."
|
|
44
|
+
},
|
|
45
|
+
"cellSize": {
|
|
46
|
+
"type": "enum",
|
|
47
|
+
"values": [
|
|
48
|
+
"sm",
|
|
49
|
+
"md"
|
|
50
|
+
],
|
|
51
|
+
"default": "md",
|
|
52
|
+
"note": "Passed to every Cell and HeaderCell"
|
|
53
|
+
},
|
|
54
|
+
"columns": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"required": true,
|
|
57
|
+
"itemShape": {
|
|
58
|
+
"key": "string",
|
|
59
|
+
"header": "string",
|
|
60
|
+
"type": "text | number?",
|
|
61
|
+
"sortable": "boolean?"
|
|
62
|
+
},
|
|
63
|
+
"note": "type number right-aligns cell and header. sortable adds HeaderCell sort (asc, desc, then off). Local state only."
|
|
64
|
+
},
|
|
65
|
+
"rows": {
|
|
66
|
+
"type": "array",
|
|
67
|
+
"required": true,
|
|
68
|
+
"itemShape": "Record<string, string | number | CellValue>",
|
|
69
|
+
"note": "Values may be Cell objects (type + fields) or plain string/number (rendered as Cell type=text). Optional row.id if primitive; skip object ids."
|
|
70
|
+
},
|
|
71
|
+
"emptyMessage": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"default": "No results."
|
|
74
|
+
},
|
|
75
|
+
"onSelectionChange": {
|
|
76
|
+
"type": "function",
|
|
77
|
+
"required": false,
|
|
78
|
+
"note": "(ids: string[]) => void"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"tokens": [
|
|
82
|
+
"surface.card",
|
|
83
|
+
"surface.elevated",
|
|
84
|
+
"surface.muted",
|
|
85
|
+
"border.faint",
|
|
86
|
+
"border.focus",
|
|
87
|
+
"radius.surfaceMd",
|
|
88
|
+
"radius.controlMd",
|
|
89
|
+
"shadow.sm",
|
|
90
|
+
"text.primary",
|
|
91
|
+
"text.secondary",
|
|
92
|
+
"text.muted",
|
|
93
|
+
"icon.muted"
|
|
94
|
+
],
|
|
95
|
+
"a11y": {
|
|
96
|
+
"element": "table",
|
|
97
|
+
"requirements": [
|
|
98
|
+
"table + thead th scope=col",
|
|
99
|
+
"caption element when set",
|
|
100
|
+
"search input aria-label from searchPlaceholder",
|
|
101
|
+
"filter DropdownMenu ariaLabel = filter label",
|
|
102
|
+
"Columns button aria-expanded / aria-haspopup",
|
|
103
|
+
"Row checkboxes ariaLabel like Select Maya Chen; header Select all rows",
|
|
104
|
+
"sortable th aria-sort none | ascending | descending"
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
"doNot": [
|
|
108
|
+
"Do not use a native select for filters \u2014 use kit DropdownMenu",
|
|
109
|
+
"Do not wrap search in Field \u2014 DataTable owns its input",
|
|
110
|
+
"Do not invent FilterBar, ColumnPicker, DataGrid, Pagination, or a second Table",
|
|
111
|
+
"Do not invent a local Cell, DataTableCell, HeaderCell, Tag, Trend, FileIcon, or PaymentMethod \u2014 use Cell and HeaderCell",
|
|
112
|
+
"Do not use TanStack Table, cmdk, Storybook, Figma, or extra dependencies",
|
|
113
|
+
"Do not use raw hex",
|
|
114
|
+
"Do not put a checkbox on every Cell \u2014 row selection stays on DataTable",
|
|
115
|
+
"Do not add pagination, loading, row actions, expandable rows, sticky header, density, infinite scroll, or a bulk-action bar",
|
|
116
|
+
"Do not invent a SortButton or use TanStack Table for sort"
|
|
117
|
+
],
|
|
118
|
+
"snippet": "<DataTable\n caption=\"Team members\"\n selectable\n toolbar\n searchPlaceholder=\"Search members...\"\n filters={[\n { key: \"status\", label: \"Status\" },\n { key: \"role\", label: \"Role\" },\n ]}\n columnSettings\n columns={[\n { key: \"name\", header: \"Name\", sortable: true },\n { key: \"role\", header: \"Role\", sortable: true },\n { key: \"status\", header: \"Status\", sortable: true },\n { key: \"projects\", header: \"Projects\", type: \"number\", sortable: true },\n ]}\n rows={rows}\n/>",
|
|
119
|
+
"contains": [
|
|
120
|
+
"cell",
|
|
121
|
+
"headercell",
|
|
122
|
+
"checkbox",
|
|
123
|
+
"button",
|
|
124
|
+
"dropdownmenu"
|
|
125
|
+
]
|
|
126
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "datepicker",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Form field that opens kit Calendar to pick one date.",
|
|
5
|
+
"useWhen": [
|
|
6
|
+
"A date in a form or filter",
|
|
7
|
+
"Need a typed-looking field whose overlay is Calendar"
|
|
8
|
+
],
|
|
9
|
+
"doNotUseWhen": [
|
|
10
|
+
"The month grid is already on the page \u2014 use Calendar",
|
|
11
|
+
"Time-only \u2014 ask first",
|
|
12
|
+
"A range of dates \u2014 not in this contract, ask first"
|
|
13
|
+
],
|
|
14
|
+
"contains": [
|
|
15
|
+
"calendar"
|
|
16
|
+
],
|
|
17
|
+
"props": {
|
|
18
|
+
"id": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"required": true,
|
|
21
|
+
"note": "For Field htmlFor"
|
|
22
|
+
},
|
|
23
|
+
"value": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"required": false,
|
|
26
|
+
"note": "controlled YYYY-MM-DD"
|
|
27
|
+
},
|
|
28
|
+
"defaultValue": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"required": false,
|
|
31
|
+
"note": "uncontrolled YYYY-MM-DD"
|
|
32
|
+
},
|
|
33
|
+
"onValueChange": {
|
|
34
|
+
"type": "function",
|
|
35
|
+
"required": false,
|
|
36
|
+
"note": "(date: string) => void // ISO date"
|
|
37
|
+
},
|
|
38
|
+
"size": {
|
|
39
|
+
"type": "enum",
|
|
40
|
+
"values": [
|
|
41
|
+
"md",
|
|
42
|
+
"sm"
|
|
43
|
+
],
|
|
44
|
+
"default": "md",
|
|
45
|
+
"note": "Trigger size; Calendar in the overlay is sm when size is sm, else md"
|
|
46
|
+
},
|
|
47
|
+
"placeholder": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"default": "Pick a date"
|
|
50
|
+
},
|
|
51
|
+
"disabled": {
|
|
52
|
+
"type": "boolean",
|
|
53
|
+
"default": false
|
|
54
|
+
},
|
|
55
|
+
"error": {
|
|
56
|
+
"type": "boolean",
|
|
57
|
+
"default": false
|
|
58
|
+
},
|
|
59
|
+
"minDate": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"required": false,
|
|
62
|
+
"note": "Passed to kit Calendar"
|
|
63
|
+
},
|
|
64
|
+
"maxDate": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"required": false,
|
|
67
|
+
"note": "Passed to kit Calendar"
|
|
68
|
+
},
|
|
69
|
+
"name": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"required": false,
|
|
72
|
+
"note": "Hidden input for forms"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"tokens": [
|
|
76
|
+
"text.primary",
|
|
77
|
+
"text.muted",
|
|
78
|
+
"icon.muted",
|
|
79
|
+
"surface.card",
|
|
80
|
+
"border.faint",
|
|
81
|
+
"border.focus",
|
|
82
|
+
"status.danger",
|
|
83
|
+
"space.1",
|
|
84
|
+
"space.2"
|
|
85
|
+
],
|
|
86
|
+
"a11y": {
|
|
87
|
+
"element": "button",
|
|
88
|
+
"requirements": [
|
|
89
|
+
"Trigger is a button with aria-haspopup=dialog, aria-expanded, aria-controls",
|
|
90
|
+
"Overlay is role=dialog labelled Choose date and contains kit Calendar",
|
|
91
|
+
"Escape and pointer down outside close and return focus to the trigger",
|
|
92
|
+
"Must have associated label via Field or a visible label pointing at id"
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
"doNot": [
|
|
96
|
+
"Do not invent a local calendar, Popover, DatePickerDialog, or native input type=date",
|
|
97
|
+
"Do not use raw hex",
|
|
98
|
+
"Do not skip kit Calendar in the overlay",
|
|
99
|
+
"Do not add range selection in this contract"
|
|
100
|
+
],
|
|
101
|
+
"snippet": "<Field label=\"Start date\" htmlFor=\"start-date\"><DatePicker id=\"start-date\" value={date} onValueChange={setDate} /></Field>"
|
|
102
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "drawer",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Edge panel for secondary tasks. Floating sheet inset from the opening edge.",
|
|
5
|
+
"useWhen": [
|
|
6
|
+
"Settings",
|
|
7
|
+
"Filters",
|
|
8
|
+
"Detail alongside the page",
|
|
9
|
+
"Mobile-style sheet from the bottom"
|
|
10
|
+
],
|
|
11
|
+
"doNotUseWhen": [
|
|
12
|
+
"Centered short task \u2014 use Modal",
|
|
13
|
+
"Must-choose confirm \u2014 use AlertDialog",
|
|
14
|
+
"Persistent nav list \u2014 use AppNav",
|
|
15
|
+
"Closeable app chrome \u2014 use SideNav",
|
|
16
|
+
"Full page \u2014 use a route"
|
|
17
|
+
],
|
|
18
|
+
"props": {
|
|
19
|
+
"open": {
|
|
20
|
+
"type": "boolean",
|
|
21
|
+
"required": true
|
|
22
|
+
},
|
|
23
|
+
"title": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"required": true
|
|
26
|
+
},
|
|
27
|
+
"description": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"required": false
|
|
30
|
+
},
|
|
31
|
+
"side": {
|
|
32
|
+
"type": "enum",
|
|
33
|
+
"values": [
|
|
34
|
+
"right",
|
|
35
|
+
"left",
|
|
36
|
+
"bottom",
|
|
37
|
+
"top"
|
|
38
|
+
],
|
|
39
|
+
"default": "right",
|
|
40
|
+
"note": "Floating sheet with radius-surface-lg. Right/left inset from top, bottom, and the opening edge. Bottom is centered. Top insets from top, left, and right. Not a flush full-bleed bar."
|
|
41
|
+
},
|
|
42
|
+
"showClose": {
|
|
43
|
+
"type": "boolean",
|
|
44
|
+
"default": true
|
|
45
|
+
},
|
|
46
|
+
"onClose": {
|
|
47
|
+
"type": "function",
|
|
48
|
+
"required": true
|
|
49
|
+
},
|
|
50
|
+
"children": {
|
|
51
|
+
"type": "slot",
|
|
52
|
+
"required": true,
|
|
53
|
+
"note": "Body"
|
|
54
|
+
},
|
|
55
|
+
"footer": {
|
|
56
|
+
"type": "slot",
|
|
57
|
+
"required": false,
|
|
58
|
+
"note": "kit Buttons. Bottom stacks them full width. Use shape=pill and block."
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"tokens": [
|
|
62
|
+
"text.primary",
|
|
63
|
+
"text.muted",
|
|
64
|
+
"surface.overlay",
|
|
65
|
+
"surface.elevated",
|
|
66
|
+
"border.faint",
|
|
67
|
+
"border.focus",
|
|
68
|
+
"shadow.md",
|
|
69
|
+
"motion.overlay",
|
|
70
|
+
"motion.modal",
|
|
71
|
+
"icon.muted",
|
|
72
|
+
"radius.surfaceLg",
|
|
73
|
+
"surface.card"
|
|
74
|
+
],
|
|
75
|
+
"a11y": {
|
|
76
|
+
"element": "dialog",
|
|
77
|
+
"requirements": [
|
|
78
|
+
"role=dialog and aria-modal",
|
|
79
|
+
"Title is the accessible name, description is aria-describedby when present",
|
|
80
|
+
"Focus is trapped while open",
|
|
81
|
+
"Escape closes",
|
|
82
|
+
"Overlay click closes",
|
|
83
|
+
"Unique ids via useId"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
"doNot": [
|
|
87
|
+
"Do not invent Sheet, SidePanel, or local Drawer",
|
|
88
|
+
"Do not use raw hex",
|
|
89
|
+
"Do not add snap points or swipe",
|
|
90
|
+
"Do not skip the close control unless showClose is false AND footer/body still provide a way out. Overlay click and Escape still close."
|
|
91
|
+
],
|
|
92
|
+
"snippet": "<Drawer open={open} title=\"Pick a delivery time\" description=\"We'll prepare your order as soon as possible.\" side=\"bottom\" showClose={false} onClose={close} footer={<><Button variant=\"primary\" size=\"lg\" shape=\"pill\" block>Confirm Delivery Time</Button><Button variant=\"secondary\" size=\"lg\" shape=\"pill\" block onClick={close}>Cancel</Button></>}><RadioGroup name=\"delivery-time\" legend=\"Delivery time\" hideLegend layout=\"card\" defaultValue=\"standard\" options={slots} /></Drawer>"
|
|
93
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "dropdownmenu",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Actions or value menu from a button, field, or nav trigger.",
|
|
5
|
+
"useWhen": [
|
|
6
|
+
"A button that opens a short list of actions",
|
|
7
|
+
"Row actions in a DataTable via Cell type=actionMenu",
|
|
8
|
+
"Select composes this with triggerStyle=field"
|
|
9
|
+
],
|
|
10
|
+
"doNotUseWhen": [
|
|
11
|
+
"Choosing one value in a form \u2014 use Select (it composes this with triggerStyle=field)",
|
|
12
|
+
"Searchable commands \u2014 use Command in a Modal",
|
|
13
|
+
"Must-choose confirm \u2014 use AlertDialog",
|
|
14
|
+
"Top-of-page site nav with dropdowns \u2014 use NavigationMenu (it composes this with triggerStyle=nav)"
|
|
15
|
+
],
|
|
16
|
+
"props": {
|
|
17
|
+
"trigger": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"required": false,
|
|
20
|
+
"note": "Kit Button label. Omit for icon-only; then ariaLabel is required."
|
|
21
|
+
},
|
|
22
|
+
"iconStart": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"required": false,
|
|
25
|
+
"note": "Lucide name on the kit Button"
|
|
26
|
+
},
|
|
27
|
+
"ariaLabel": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"required": false,
|
|
30
|
+
"note": "required when trigger is omitted"
|
|
31
|
+
},
|
|
32
|
+
"variant": {
|
|
33
|
+
"type": "enum",
|
|
34
|
+
"values": [
|
|
35
|
+
"primary",
|
|
36
|
+
"secondary",
|
|
37
|
+
"tertiary",
|
|
38
|
+
"danger"
|
|
39
|
+
],
|
|
40
|
+
"default": "secondary"
|
|
41
|
+
},
|
|
42
|
+
"size": {
|
|
43
|
+
"type": "enum",
|
|
44
|
+
"values": [
|
|
45
|
+
"lg",
|
|
46
|
+
"md",
|
|
47
|
+
"sm"
|
|
48
|
+
],
|
|
49
|
+
"default": "md"
|
|
50
|
+
},
|
|
51
|
+
"align": {
|
|
52
|
+
"type": "enum",
|
|
53
|
+
"values": [
|
|
54
|
+
"start",
|
|
55
|
+
"end"
|
|
56
|
+
],
|
|
57
|
+
"default": "start"
|
|
58
|
+
},
|
|
59
|
+
"groups": {
|
|
60
|
+
"type": "array",
|
|
61
|
+
"required": true,
|
|
62
|
+
"itemShape": {
|
|
63
|
+
"heading": "string?",
|
|
64
|
+
"items": [
|
|
65
|
+
{
|
|
66
|
+
"id": "string",
|
|
67
|
+
"label": "string",
|
|
68
|
+
"icon": "string?",
|
|
69
|
+
"shortcut": "string?",
|
|
70
|
+
"disabled": "boolean?",
|
|
71
|
+
"danger": "boolean?",
|
|
72
|
+
"submenu": "DropdownMenuGroup[]? one level",
|
|
73
|
+
"description": "string?",
|
|
74
|
+
"href": "string? renders a when set and not disabled",
|
|
75
|
+
"selected": "boolean? Check when true unless checkbox is set.",
|
|
76
|
+
"checkbox": "boolean? Compose kit Checkbox (visual, inert). Not DropdownMenuCheckboxItem."
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"open": {
|
|
82
|
+
"type": "boolean",
|
|
83
|
+
"required": false,
|
|
84
|
+
"note": "controlled"
|
|
85
|
+
},
|
|
86
|
+
"onOpenChange": {
|
|
87
|
+
"type": "function",
|
|
88
|
+
"required": false,
|
|
89
|
+
"note": "(open: boolean) => void"
|
|
90
|
+
},
|
|
91
|
+
"onSelect": {
|
|
92
|
+
"type": "function",
|
|
93
|
+
"required": false,
|
|
94
|
+
"note": "(id: string) => void"
|
|
95
|
+
},
|
|
96
|
+
"triggerStyle": {
|
|
97
|
+
"type": "enum",
|
|
98
|
+
"values": [
|
|
99
|
+
"button",
|
|
100
|
+
"field",
|
|
101
|
+
"nav"
|
|
102
|
+
],
|
|
103
|
+
"default": "button",
|
|
104
|
+
"note": "button is kit Button. field is a full-width control with ChevronsUpDown. Select uses field. nav is a ghost text control with ChevronDown; NavigationMenu uses nav."
|
|
105
|
+
},
|
|
106
|
+
"iconEnd": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"required": false,
|
|
109
|
+
"note": "Lucide name on a field trigger (default ChevronsUpDown) or kit Button trigger."
|
|
110
|
+
},
|
|
111
|
+
"columns": {
|
|
112
|
+
"type": "enum",
|
|
113
|
+
"values": [
|
|
114
|
+
1,
|
|
115
|
+
2
|
|
116
|
+
],
|
|
117
|
+
"default": 1,
|
|
118
|
+
"note": "2 uses a CSS grid panel, min-width 28rem. 1 stays a list."
|
|
119
|
+
},
|
|
120
|
+
"closeOnSelect": {
|
|
121
|
+
"type": "boolean",
|
|
122
|
+
"default": true,
|
|
123
|
+
"note": "false keeps the menu open. Select multiple uses false."
|
|
124
|
+
},
|
|
125
|
+
"triggerMuted": {
|
|
126
|
+
"type": "boolean",
|
|
127
|
+
"default": false,
|
|
128
|
+
"note": "Muted field trigger text for a placeholder."
|
|
129
|
+
},
|
|
130
|
+
"triggerBadge": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"required": false,
|
|
133
|
+
"note": "Kit Badge on a field trigger next to the label, e.g. +2. Select overflow uses this."
|
|
134
|
+
},
|
|
135
|
+
"searchable": {
|
|
136
|
+
"type": "boolean",
|
|
137
|
+
"default": false,
|
|
138
|
+
"note": "Kit Input at the top of the panel. Filters item labels. Select searchable uses this."
|
|
139
|
+
},
|
|
140
|
+
"searchPlaceholder": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"required": false,
|
|
143
|
+
"default": "Search"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"tokens": [
|
|
147
|
+
"surface.card",
|
|
148
|
+
"surface.muted",
|
|
149
|
+
"border.faint",
|
|
150
|
+
"border.focus",
|
|
151
|
+
"radius.surface.sm",
|
|
152
|
+
"shadow.sm",
|
|
153
|
+
"text.primary",
|
|
154
|
+
"text.secondary",
|
|
155
|
+
"text.muted",
|
|
156
|
+
"text.danger",
|
|
157
|
+
"icon.muted",
|
|
158
|
+
"type.size.caption",
|
|
159
|
+
"type.weight.label",
|
|
160
|
+
"radius.control.md",
|
|
161
|
+
"focus.ring"
|
|
162
|
+
],
|
|
163
|
+
"a11y": {
|
|
164
|
+
"element": "div",
|
|
165
|
+
"requirements": [
|
|
166
|
+
"Trigger has aria-haspopup=menu, aria-expanded, aria-controls. button is kit Button; field is a field control; nav is a ghost text control",
|
|
167
|
+
"Panel is role=menu",
|
|
168
|
+
"Items are role=menuitem, or menuitemcheckbox when checkbox is set. aria-disabled when disabled. With href and not disabled, the item is an a",
|
|
169
|
+
"Escape and outside click close; arrows move; Tab closes. Search Input is focused first when searchable",
|
|
170
|
+
"Icon-only trigger needs ariaLabel",
|
|
171
|
+
"Item with submenu has aria-haspopup=menu and ChevronRight; ArrowRight opens, ArrowLeft closes"
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
"doNot": [
|
|
175
|
+
"Do not invent DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuSub, or DropdownMenuPortal",
|
|
176
|
+
"Do not use Select for actions from a button",
|
|
177
|
+
"Do not use Command or Modal for a small action menu",
|
|
178
|
+
"Do not invent DropdownMenuSub \u2014 nest groups on the item, one level",
|
|
179
|
+
"Do not invent CheckboxItem or RadioItem cousins \u2014 compose kit Checkbox on the item",
|
|
180
|
+
"Do not use radix, cmdk, or @base-ui/react",
|
|
181
|
+
"Do not use raw hex"
|
|
182
|
+
],
|
|
183
|
+
"contains": [
|
|
184
|
+
"button",
|
|
185
|
+
"checkbox",
|
|
186
|
+
"input",
|
|
187
|
+
"badge"
|
|
188
|
+
],
|
|
189
|
+
"snippet": "<DropdownMenu\n trigger=\"Open\"\n groups={[{\n heading: \"My Account\",\n items: [\n { id: \"profile\", label: \"Profile\", shortcut: \"\u21e7\u2318P\" },\n { id: \"invite\", label: \"Invite users\", submenu: [{ items: [{ id: \"email\", label: \"Email\" }] }] },\n ],\n }]}\n onSelect={(id) => {}}\n/>"
|
|
190
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "empty",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Placeholder when a list, page, or region has nothing to show. One piece.",
|
|
5
|
+
"useWhen": [
|
|
6
|
+
"A list or table has no rows",
|
|
7
|
+
"A page section has no content yet",
|
|
8
|
+
"A panel needs a centered placeholder with optional actions"
|
|
9
|
+
],
|
|
10
|
+
"doNotUseWhen": [
|
|
11
|
+
"Inline page status — use Alert",
|
|
12
|
+
"Chart with no data — charts use their own emptyLabel",
|
|
13
|
+
"Loading with no content — use Spinner or LoadingAnimation"
|
|
14
|
+
],
|
|
15
|
+
"props": {
|
|
16
|
+
"title": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"required": true,
|
|
19
|
+
"note": "Primary heading for the empty state."
|
|
20
|
+
},
|
|
21
|
+
"description": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"required": false,
|
|
24
|
+
"note": "Supporting copy under the title."
|
|
25
|
+
},
|
|
26
|
+
"icon": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"required": false,
|
|
29
|
+
"note": "Lucide export name. Shown in a circular media well. Not EmptyMedia."
|
|
30
|
+
},
|
|
31
|
+
"media": {
|
|
32
|
+
"type": "slot",
|
|
33
|
+
"required": false,
|
|
34
|
+
"note": "Custom media slot. Compose kit Avatar or AvatarGroup. Not EmptyMedia."
|
|
35
|
+
},
|
|
36
|
+
"actions": {
|
|
37
|
+
"type": "slot",
|
|
38
|
+
"required": false,
|
|
39
|
+
"note": "Action row. Compose kit Buttons only. Not EmptyContent."
|
|
40
|
+
},
|
|
41
|
+
"outlined": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"default": false,
|
|
44
|
+
"note": "Bordered empty state with surface-card background."
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"tokens": [
|
|
48
|
+
"surface.card",
|
|
49
|
+
"surface.muted",
|
|
50
|
+
"text.primary",
|
|
51
|
+
"text.secondary",
|
|
52
|
+
"icon.secondary",
|
|
53
|
+
"border.faint",
|
|
54
|
+
"radius.surfaceSm",
|
|
55
|
+
"radius.full",
|
|
56
|
+
"space.2",
|
|
57
|
+
"space.3",
|
|
58
|
+
"space.4",
|
|
59
|
+
"space.6",
|
|
60
|
+
"type.size.heading",
|
|
61
|
+
"type.size.bodySm",
|
|
62
|
+
"type.weight.heading",
|
|
63
|
+
"type.weight.body"
|
|
64
|
+
],
|
|
65
|
+
"a11y": {
|
|
66
|
+
"element": "div",
|
|
67
|
+
"requirements": [
|
|
68
|
+
"Title uses a heading element",
|
|
69
|
+
"Icon media is aria-hidden",
|
|
70
|
+
"Actions are regular interactive controls"
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
"doNot": [
|
|
74
|
+
"Do not invent EmptyHeader, EmptyMedia, EmptyTitle, EmptyDescription, or EmptyContent",
|
|
75
|
+
"Do not use raw hex",
|
|
76
|
+
"Do not use glass, color-mix, or backdrop-blur"
|
|
77
|
+
],
|
|
78
|
+
"snippet": "<Empty title=\"No projects yet\" description=\"You haven't created any projects yet.\" icon=\"Folder\" actions={<><Button>Create</Button><Button variant=\"secondary\">Import</Button></>} />"
|
|
79
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "field",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "One labeled control with optional hint and error. Label on top or start (left).",
|
|
5
|
+
"useWhen": [
|
|
6
|
+
"Any labeled Input, Textarea, Select, DatePicker, or Switch",
|
|
7
|
+
"When helper text or a validation error sits with the control"
|
|
8
|
+
],
|
|
9
|
+
"doNotUseWhen": [
|
|
10
|
+
"Checkbox with its own label and no extra hint/error — use Checkbox",
|
|
11
|
+
"RadioGroup — it provides its own legend",
|
|
12
|
+
"A group of fields with a legend — use FieldSet",
|
|
13
|
+
"Display-only content — use Section"
|
|
14
|
+
],
|
|
15
|
+
"props": {
|
|
16
|
+
"label": { "type": "string", "required": true },
|
|
17
|
+
"htmlFor": { "type": "string", "required": true },
|
|
18
|
+
"hint": { "type": "string", "required": false, "note": "helper text. Hidden when error is set." },
|
|
19
|
+
"error": { "type": "string", "required": false },
|
|
20
|
+
"labelPosition": {
|
|
21
|
+
"type": "enum",
|
|
22
|
+
"values": ["top", "start"],
|
|
23
|
+
"default": "top",
|
|
24
|
+
"note": "top stacks. start is horizontal (label left). Hint and error stay under the control."
|
|
25
|
+
},
|
|
26
|
+
"children": {
|
|
27
|
+
"type": "slot",
|
|
28
|
+
"allowedContracts": ["input", "textarea", "select", "datepicker", "switch", "checkbox"],
|
|
29
|
+
"required": true
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"tokens": ["text.primary", "text.muted", "text.danger"],
|
|
33
|
+
"a11y": {
|
|
34
|
+
"element": "div",
|
|
35
|
+
"requirements": [
|
|
36
|
+
"role=group",
|
|
37
|
+
"Label htmlFor matches child control id",
|
|
38
|
+
"Hint or error id is passed to the child as describedBy",
|
|
39
|
+
"data-invalid when error is set"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"doNot": [
|
|
43
|
+
"Do not invent FieldLabel, FieldContent, FieldDescription, FieldError, FieldTitle, FieldGroup, FieldLegend, FieldSeparator, Form, FormField, FormItem, FormControl, or FormMessage",
|
|
44
|
+
"Do not wrap Button or layout components",
|
|
45
|
+
"Do not use start on Field for prefix text — that is Input start",
|
|
46
|
+
"Do not use raw hex"
|
|
47
|
+
],
|
|
48
|
+
"snippet": "<Field label=\"Email\" htmlFor=\"email\" hint=\"We never share your email.\"><Input id=\"email\" type=\"email\" /></Field>"
|
|
49
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "fieldset",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Semantic group of fields with a legend and optional description.",
|
|
5
|
+
"useWhen": [
|
|
6
|
+
"Related fields that need a shared heading, like billing or profile",
|
|
7
|
+
"A checkbox or switch sitting under a group legend"
|
|
8
|
+
],
|
|
9
|
+
"doNotUseWhen": [
|
|
10
|
+
"A single labeled control — use Field",
|
|
11
|
+
"Page title — use PageHeader or Card title"
|
|
12
|
+
],
|
|
13
|
+
"props": {
|
|
14
|
+
"legend": { "type": "string", "required": true },
|
|
15
|
+
"description": { "type": "string", "required": false },
|
|
16
|
+
"children": { "type": "slot", "required": true, "note": "kit Field, Checkbox, Switch, or RadioGroup" }
|
|
17
|
+
},
|
|
18
|
+
"tokens": ["text.primary", "text.muted"],
|
|
19
|
+
"a11y": {
|
|
20
|
+
"element": "fieldset",
|
|
21
|
+
"requirements": ["legend is the accessible name of the group"]
|
|
22
|
+
},
|
|
23
|
+
"doNot": [
|
|
24
|
+
"Do not invent FieldLegend, FieldGroup, or FieldSeparator",
|
|
25
|
+
"Do not nest FieldSet unless the inner group is truly nested",
|
|
26
|
+
"Do not use raw hex"
|
|
27
|
+
],
|
|
28
|
+
"snippet": "<FieldSet legend=\"Billing Address\" description=\"The billing address associated with your payment method\"><Checkbox id=\"same\" label=\"Same as shipping address\" /></FieldSet>"
|
|
29
|
+
}
|