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,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "navigationmenu",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Horizontal site nav. Dropdowns are kit DropdownMenu. Not SideNav. Not AppNav.",
|
|
5
|
+
"useWhen": [
|
|
6
|
+
"Top-of-page site navigation with links and dropdowns",
|
|
7
|
+
"A horizontal bar of destinations, some of which open a menu"
|
|
8
|
+
],
|
|
9
|
+
"doNotUseWhen": [
|
|
10
|
+
"Vertical product chrome — use SideNav",
|
|
11
|
+
"Playground catalog list — use AppNav",
|
|
12
|
+
"Path to the current page — use Breadcrumb",
|
|
13
|
+
"In-page panels — use Tabs",
|
|
14
|
+
"Actions from a button — use DropdownMenu",
|
|
15
|
+
"Product top bar with logo and search — use AppHeader"
|
|
16
|
+
],
|
|
17
|
+
"props": {
|
|
18
|
+
"items": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"required": true,
|
|
21
|
+
"itemShape": {
|
|
22
|
+
"id": "string",
|
|
23
|
+
"label": "string",
|
|
24
|
+
"href": "string? link items",
|
|
25
|
+
"active": "boolean? link items",
|
|
26
|
+
"groups": "DropdownMenuGroup[]? dropdown items — presence of groups means dropdown",
|
|
27
|
+
"columns": "1 | 2? dropdown items, default 1"
|
|
28
|
+
},
|
|
29
|
+
"note": "A dropdown item is detected by groups. A link item has href and no groups."
|
|
30
|
+
},
|
|
31
|
+
"onSelect": {
|
|
32
|
+
"type": "function",
|
|
33
|
+
"required": false,
|
|
34
|
+
"note": "(id: string) => void"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"tokens": [
|
|
38
|
+
"text.primary",
|
|
39
|
+
"surface.muted",
|
|
40
|
+
"radius.control.md",
|
|
41
|
+
"focus.ring",
|
|
42
|
+
"type.size.body-sm",
|
|
43
|
+
"type.weight.label"
|
|
44
|
+
],
|
|
45
|
+
"a11y": {
|
|
46
|
+
"element": "nav",
|
|
47
|
+
"requirements": [
|
|
48
|
+
"nav with aria-label",
|
|
49
|
+
"Link items are a with aria-current=page when active",
|
|
50
|
+
"Dropdowns are kit DropdownMenu with triggerStyle=nav",
|
|
51
|
+
"Only one dropdown open at a time"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"doNot": [
|
|
55
|
+
"Do not invent NavigationMenuList, NavigationMenuItem, NavigationMenuTrigger, NavigationMenuContent, NavigationMenuLink, NavigationMenuViewport, or NavigationMenuIndicator",
|
|
56
|
+
"Do not use radix or @base-ui/react navigation-menu",
|
|
57
|
+
"Do not use native select or details for dropdowns — use kit DropdownMenu",
|
|
58
|
+
"Do not use SideNav or AppNav for horizontal site nav",
|
|
59
|
+
"Do not use raw hex"
|
|
60
|
+
],
|
|
61
|
+
"contains": [
|
|
62
|
+
"dropdownmenu"
|
|
63
|
+
],
|
|
64
|
+
"snippet": "<NavigationMenu items={[{ id: \"home\", label: \"Home\", href: \"/\", active: true }, { id: \"docs\", label: \"Docs\", groups: [{ items: [{ id: \"intro\", label: \"Introduction\", href: \"/docs\" }] }] }]} />"
|
|
65
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "numbertransition",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Rolling number treatment for live metrics and counters.",
|
|
5
|
+
"useWhen": [
|
|
6
|
+
"Dashboard metrics that update in place",
|
|
7
|
+
"Animated count-ups with tabular numerals"
|
|
8
|
+
],
|
|
9
|
+
"doNotUseWhen": [
|
|
10
|
+
"Static labels without changing values",
|
|
11
|
+
"Non-numeric copy"
|
|
12
|
+
],
|
|
13
|
+
"props": {
|
|
14
|
+
"value": { "type": "number|string", "required": true },
|
|
15
|
+
"format": { "type": "function", "required": false },
|
|
16
|
+
"size": {
|
|
17
|
+
"type": "enum",
|
|
18
|
+
"values": ["sm", "md", "lg"],
|
|
19
|
+
"default": "md"
|
|
20
|
+
},
|
|
21
|
+
"label": { "type": "string", "required": false }
|
|
22
|
+
},
|
|
23
|
+
"tokens": ["text.primary"],
|
|
24
|
+
"a11y": {
|
|
25
|
+
"element": "span",
|
|
26
|
+
"requirements": [
|
|
27
|
+
"aria-live=polite",
|
|
28
|
+
"aria-label mirrors formatted value when label omitted"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"doNot": ["Do not use raw hex"],
|
|
32
|
+
"snippet": "<NumberTransition value={12840} format={(n) => n.toLocaleString()} />"
|
|
33
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "pageheader",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Top-of-page title with optional Breadcrumb trail, subtitle, and actions.",
|
|
5
|
+
"useWhen": [
|
|
6
|
+
"Product page title with optional Breadcrumb trail and actions",
|
|
7
|
+
"Placing primary/secondary Buttons aligned to the page title"
|
|
8
|
+
],
|
|
9
|
+
"doNotUseWhen": [
|
|
10
|
+
"In-card titles — use Section",
|
|
11
|
+
"Sidebar — use AppNav or SideNav",
|
|
12
|
+
"Product top chrome with logo and search — use AppHeader",
|
|
13
|
+
"Modal titles — use ModalCard",
|
|
14
|
+
"Path-only without a page title — use Breadcrumb"
|
|
15
|
+
],
|
|
16
|
+
"contains": [
|
|
17
|
+
"breadcrumb",
|
|
18
|
+
"button"
|
|
19
|
+
],
|
|
20
|
+
"props": {
|
|
21
|
+
"title": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"required": true
|
|
24
|
+
},
|
|
25
|
+
"subtitle": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"required": false
|
|
28
|
+
},
|
|
29
|
+
"eyebrow": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"required": false,
|
|
32
|
+
"note": "Kept for existing call sites. Breadcrumbs replace eyebrow as the default where-am-I."
|
|
33
|
+
},
|
|
34
|
+
"actions": {
|
|
35
|
+
"type": "slot",
|
|
36
|
+
"allowedContracts": [
|
|
37
|
+
"button"
|
|
38
|
+
],
|
|
39
|
+
"required": false,
|
|
40
|
+
"note": "kit Buttons. At most one primary."
|
|
41
|
+
},
|
|
42
|
+
"breadcrumbs": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"required": false,
|
|
45
|
+
"itemShape": {
|
|
46
|
+
"label": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"required": true
|
|
49
|
+
},
|
|
50
|
+
"href": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"required": false
|
|
53
|
+
},
|
|
54
|
+
"onClick": {
|
|
55
|
+
"type": "function",
|
|
56
|
+
"required": false,
|
|
57
|
+
"note": "Passed through to kit Breadcrumb."
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"note": "Same shape as Breadcrumb items. Rendered only when length >= 2. Passed through to kit Breadcrumb."
|
|
61
|
+
},
|
|
62
|
+
"breadcrumbSeparator": {
|
|
63
|
+
"type": "enum",
|
|
64
|
+
"values": [
|
|
65
|
+
"chevron",
|
|
66
|
+
"slash"
|
|
67
|
+
],
|
|
68
|
+
"default": "chevron",
|
|
69
|
+
"note": "Passed through to kit Breadcrumb separator."
|
|
70
|
+
},
|
|
71
|
+
"breadcrumbMaxItems": {
|
|
72
|
+
"type": "number",
|
|
73
|
+
"required": false,
|
|
74
|
+
"note": "Passed through to kit Breadcrumb maxItems."
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"tokens": [
|
|
78
|
+
"text.primary",
|
|
79
|
+
"text.secondary",
|
|
80
|
+
"type.size.title",
|
|
81
|
+
"type.size.body",
|
|
82
|
+
"space.3",
|
|
83
|
+
"space.4"
|
|
84
|
+
],
|
|
85
|
+
"a11y": {
|
|
86
|
+
"element": "header",
|
|
87
|
+
"requirements": [
|
|
88
|
+
"Page title is h1",
|
|
89
|
+
"Composed Breadcrumb keeps nav aria-label=Breadcrumb",
|
|
90
|
+
"Actions remain keyboard accessible"
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
"doNot": [
|
|
94
|
+
"Do not invent local PageHeader",
|
|
95
|
+
"Do not invent BreadcrumbItem or BreadcrumbLink cousins — compose kit Breadcrumb",
|
|
96
|
+
"Do not restyle Breadcrumb internals from PageHeader",
|
|
97
|
+
"Do not use raw hex",
|
|
98
|
+
"Do not put more than one primary Button in actions"
|
|
99
|
+
],
|
|
100
|
+
"snippet": "<PageHeader title=\"Aurora\" subtitle=\"Campaign settings and collaborators.\" breadcrumbs={[{ label: \"Home\", href: \"#\" }, { label: \"Projects\", href: \"#\" }, { label: \"Aurora\" }]} actions={<><Button variant=\"secondary\">Edit</Button><Button>Save</Button></>} />"
|
|
101
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "pagination",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Page navigation with previous, next, page numbers, and ellipsis. Not ButtonGroup. Not Tabs.",
|
|
5
|
+
"useWhen": [
|
|
6
|
+
"tables",
|
|
7
|
+
"long lists",
|
|
8
|
+
"search results"
|
|
9
|
+
],
|
|
10
|
+
"doNotUseWhen": [
|
|
11
|
+
"in-page panels — Tabs",
|
|
12
|
+
"a pair of sibling actions — ButtonGroup"
|
|
13
|
+
],
|
|
14
|
+
"contains": [
|
|
15
|
+
"button"
|
|
16
|
+
],
|
|
17
|
+
"props": {
|
|
18
|
+
"page": {
|
|
19
|
+
"type": "number",
|
|
20
|
+
"required": false,
|
|
21
|
+
"note": "controlled 1-based. Controlled when page is a number."
|
|
22
|
+
},
|
|
23
|
+
"defaultPage": {
|
|
24
|
+
"type": "number",
|
|
25
|
+
"default": 1,
|
|
26
|
+
"note": "uncontrolled initial page"
|
|
27
|
+
},
|
|
28
|
+
"pageCount": {
|
|
29
|
+
"type": "number",
|
|
30
|
+
"required": true,
|
|
31
|
+
"note": ">= 1"
|
|
32
|
+
},
|
|
33
|
+
"onPageChange": {
|
|
34
|
+
"type": "function",
|
|
35
|
+
"required": false,
|
|
36
|
+
"note": "(page: number) => void"
|
|
37
|
+
},
|
|
38
|
+
"showPages": {
|
|
39
|
+
"type": "boolean",
|
|
40
|
+
"default": true,
|
|
41
|
+
"note": "false shows Previous/Next only (icons-only when showLabels is also false)"
|
|
42
|
+
},
|
|
43
|
+
"showLabels": {
|
|
44
|
+
"type": "boolean",
|
|
45
|
+
"default": true,
|
|
46
|
+
"note": "Previous / Next text next to chevrons. Icon-only uses ariaLabel."
|
|
47
|
+
},
|
|
48
|
+
"showPreviousNext": {
|
|
49
|
+
"type": "boolean",
|
|
50
|
+
"default": true,
|
|
51
|
+
"note": "false hides Previous/Next (Simple: page numbers only)"
|
|
52
|
+
},
|
|
53
|
+
"size": {
|
|
54
|
+
"type": "enum",
|
|
55
|
+
"values": [
|
|
56
|
+
"sm",
|
|
57
|
+
"md"
|
|
58
|
+
],
|
|
59
|
+
"default": "md",
|
|
60
|
+
"note": "passed to kit Button"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"tokens": [
|
|
64
|
+
"space.1",
|
|
65
|
+
"icon.muted"
|
|
66
|
+
],
|
|
67
|
+
"a11y": {
|
|
68
|
+
"element": "nav",
|
|
69
|
+
"requirements": [
|
|
70
|
+
"nav with aria-label=\"Pagination\"",
|
|
71
|
+
"Previous disabled on page 1",
|
|
72
|
+
"Next disabled on last page",
|
|
73
|
+
"current page uses kit Button variant=secondary and aria-current=page",
|
|
74
|
+
"ellipsis is a span with Lucide Ellipsis, aria-hidden, not a Button",
|
|
75
|
+
"icon-only Previous/Next set ariaLabel"
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"doNot": [
|
|
79
|
+
"no PaginationContent/Item/Link/Previous/Next/Ellipsis cousins",
|
|
80
|
+
"do not use raw hex",
|
|
81
|
+
"do not use ButtonGroup for paging",
|
|
82
|
+
"page numbers are kit Button"
|
|
83
|
+
],
|
|
84
|
+
"snippet": "<Pagination page={2} pageCount={10} onPageChange={() => {}} />"
|
|
85
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "activity",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Activity blueprint: PageHeader, Scoreboard, task cards or list, and a tabbed DataTable feed.",
|
|
5
|
+
"contains": [
|
|
6
|
+
"pageheader",
|
|
7
|
+
"scoreboard",
|
|
8
|
+
"section",
|
|
9
|
+
"carousel",
|
|
10
|
+
"insightcard",
|
|
11
|
+
"table",
|
|
12
|
+
"badge",
|
|
13
|
+
"buttongroup",
|
|
14
|
+
"button",
|
|
15
|
+
"empty",
|
|
16
|
+
"tabs",
|
|
17
|
+
"datatable",
|
|
18
|
+
"drawer",
|
|
19
|
+
"avatar",
|
|
20
|
+
"progress"
|
|
21
|
+
],
|
|
22
|
+
"doNot": [
|
|
23
|
+
"Do not invent a local activity feed, task carousel, or schedule grid",
|
|
24
|
+
"Do not skip Scoreboard for the metrics strip",
|
|
25
|
+
"Do not put a month calendar on this page",
|
|
26
|
+
"Do not add more than one primary Button",
|
|
27
|
+
"Do not restyle kit components inside the pattern"
|
|
28
|
+
],
|
|
29
|
+
"snippet": "<ActivityPattern />"
|
|
30
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "assistant-workspace",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Workspace with two-column InsightCards and an inline Chat rail.",
|
|
5
|
+
"contains": ["pageheader", "section", "insightcard", "chat", "button"],
|
|
6
|
+
"doNot": [
|
|
7
|
+
"Do not put Chat in a Modal",
|
|
8
|
+
"Do not invent a local assistant rail or insight stack",
|
|
9
|
+
"Do not skip layout-workspace for the rail",
|
|
10
|
+
"Do not skip layout-split for the InsightCards",
|
|
11
|
+
"Do not skip Chat radius none for the rail",
|
|
12
|
+
"Do not give InsightCards primaryAction while Chat is open — Chat Send is the one primary",
|
|
13
|
+
"Do not restyle Chat or InsightCard"
|
|
14
|
+
],
|
|
15
|
+
"snippet": "<AssistantWorkspacePattern />"
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "dashboard",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Overview dashboard: page title, KPI strip, and chart plus task table in Sections.",
|
|
5
|
+
"contains": ["pageheader", "scoreboard", "linechart", "section", "datatable"],
|
|
6
|
+
"doNot": [
|
|
7
|
+
"Do not restyle kit components inside the pattern",
|
|
8
|
+
"Do not define a local dashboard layout component",
|
|
9
|
+
"Do not invent a local table, filter bar, or chart wrapper"
|
|
10
|
+
],
|
|
11
|
+
"snippet": "<DashboardPattern />"
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "empty-first-run",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "First-run page: PageHeader, outlined Empty, and one primary that opens a create Modal.",
|
|
5
|
+
"contains": ["pageheader", "empty", "modal", "field", "input", "button", "buttongroup", "toast"],
|
|
6
|
+
"doNot": [
|
|
7
|
+
"Do not invent a local empty stack, illustration, or create dialog",
|
|
8
|
+
"Do not use AlertDialog for a dismissible first create",
|
|
9
|
+
"Do not skip Field wrappers on labeled inputs",
|
|
10
|
+
"Do not wrap a single Field in FieldSet",
|
|
11
|
+
"Do not add more than one primary Button",
|
|
12
|
+
"Do not put a primary on PageHeader while Empty already has one"
|
|
13
|
+
],
|
|
14
|
+
"snippet": "<EmptyFirstRunPattern />"
|
|
15
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "inbox",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Inbox blueprint: PageHeader, Scoreboard, tabbed Table, detail Section, and a reply Drawer.",
|
|
5
|
+
"contains": [
|
|
6
|
+
"pageheader",
|
|
7
|
+
"scoreboard",
|
|
8
|
+
"section",
|
|
9
|
+
"tabs",
|
|
10
|
+
"table",
|
|
11
|
+
"cell",
|
|
12
|
+
"badge",
|
|
13
|
+
"button",
|
|
14
|
+
"empty",
|
|
15
|
+
"drawer",
|
|
16
|
+
"fieldset",
|
|
17
|
+
"field",
|
|
18
|
+
"input",
|
|
19
|
+
"textarea",
|
|
20
|
+
"toast",
|
|
21
|
+
"avatar"
|
|
22
|
+
],
|
|
23
|
+
"doNot": [
|
|
24
|
+
"Do not invent a local inbox row, from stack, or reply dialog",
|
|
25
|
+
"Do not skip Cell type=avatar for the From column",
|
|
26
|
+
"Do not use AlertDialog for a dismissible reply",
|
|
27
|
+
"Do not skip Field wrappers on labeled inputs",
|
|
28
|
+
"Do not add more than one primary Button",
|
|
29
|
+
"Do not restyle kit components inside the pattern"
|
|
30
|
+
],
|
|
31
|
+
"snippet": "<InboxPattern />"
|
|
32
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "invite-members",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Invite overlay: empty team state, AvatarGroup, and a dismissible Modal with FieldSet.",
|
|
5
|
+
"contains": ["pageheader", "empty", "avatargroup", "modal", "fieldset", "field", "input", "radiogroup", "button", "buttongroup", "toast"],
|
|
6
|
+
"doNot": [
|
|
7
|
+
"Do not invent a local dialog, invite form, or member stack",
|
|
8
|
+
"Do not use AlertDialog for a dismissible invite",
|
|
9
|
+
"Do not skip Field wrappers on labeled inputs",
|
|
10
|
+
"Do not wrap RadioGroup in Field — it has its own legend",
|
|
11
|
+
"Do not add more than one primary Button"
|
|
12
|
+
],
|
|
13
|
+
"snippet": "<InviteMembersPattern />"
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "list-detail",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "List-detail shell: sidebar nav, table list, and detail section.",
|
|
5
|
+
"contains": ["pageheader", "appnav", "table", "section", "badge"],
|
|
6
|
+
"doNot": [
|
|
7
|
+
"Do not restyle AppNav or Table",
|
|
8
|
+
"Do not replace Table with custom list markup",
|
|
9
|
+
"Do not add a local sidebar component",
|
|
10
|
+
"Do not use Tabs instead of AppNav for route-level sections"
|
|
11
|
+
],
|
|
12
|
+
"snippet": "<ListDetailPattern />"
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "settings-form",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Settings page blueprint: header, grouped fields, and save/cancel actions.",
|
|
5
|
+
"contains": ["pageheader", "section", "field", "input", "select", "checkbox", "button", "toast"],
|
|
6
|
+
"doNot": [
|
|
7
|
+
"Do not restyle Field or Input inside the pattern",
|
|
8
|
+
"Do not invent local form layouts",
|
|
9
|
+
"Do not skip Field wrappers on labeled inputs",
|
|
10
|
+
"Do not add more than one primary Button"
|
|
11
|
+
],
|
|
12
|
+
"snippet": "<SettingsFormPattern />"
|
|
13
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "piechart",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Part-to-whole share for a handful of segments, as a donut or solid pie.",
|
|
5
|
+
"useWhen": [
|
|
6
|
+
"Rough share at a glance for up to six segments",
|
|
7
|
+
"Dashboard tiles where proportion matters more than precise ranking"
|
|
8
|
+
],
|
|
9
|
+
"doNotUseWhen": [
|
|
10
|
+
"Comparing close values — use BarChart",
|
|
11
|
+
"Change over time — use LineChart",
|
|
12
|
+
"More than six segments without folding into Other"
|
|
13
|
+
],
|
|
14
|
+
"props": {
|
|
15
|
+
"data": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"required": false,
|
|
18
|
+
"note": "{ label: string, value: number, color?: string }[]"
|
|
19
|
+
},
|
|
20
|
+
"title": { "type": "string", "required": false },
|
|
21
|
+
"description": { "type": "string", "required": false },
|
|
22
|
+
"variant": {
|
|
23
|
+
"type": "enum",
|
|
24
|
+
"values": ["donut", "pie"],
|
|
25
|
+
"default": "donut"
|
|
26
|
+
},
|
|
27
|
+
"layout": {
|
|
28
|
+
"type": "enum",
|
|
29
|
+
"values": ["split", "stack"],
|
|
30
|
+
"default": "split"
|
|
31
|
+
},
|
|
32
|
+
"showCenterTotal": { "type": "boolean", "default": true },
|
|
33
|
+
"showTable": { "type": "boolean", "default": true },
|
|
34
|
+
"sort": { "type": "boolean", "default": true },
|
|
35
|
+
"maxSegments": { "type": "number", "default": 6 },
|
|
36
|
+
"emptyLabel": { "type": "string", "default": "No data for this range" }
|
|
37
|
+
},
|
|
38
|
+
"tokens": [
|
|
39
|
+
"surface.card",
|
|
40
|
+
"text.primary",
|
|
41
|
+
"text.secondary",
|
|
42
|
+
"text.muted",
|
|
43
|
+
"fill.brand",
|
|
44
|
+
"fill.success",
|
|
45
|
+
"fill.warning",
|
|
46
|
+
"fill.danger",
|
|
47
|
+
"fill.info",
|
|
48
|
+
"border.faint",
|
|
49
|
+
"radius.surface",
|
|
50
|
+
"shadow.md",
|
|
51
|
+
"focus-ring"
|
|
52
|
+
],
|
|
53
|
+
"a11y": {
|
|
54
|
+
"element": "figure",
|
|
55
|
+
"requirements": [
|
|
56
|
+
"Title exposed on the figure when provided",
|
|
57
|
+
"Slices expose name, value, and percent on the hit target",
|
|
58
|
+
"Legend highlight matches slice hover; tooltip is supplementary",
|
|
59
|
+
"Table toggle keeps values readable in table view"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"doNot": [
|
|
63
|
+
"Do not invent local chart wrappers",
|
|
64
|
+
"Do not use raw hex",
|
|
65
|
+
"Do not add chart-library compound APIs"
|
|
66
|
+
],
|
|
67
|
+
"snippet": "<PieChart title=\"Properties by status\" variant=\"donut\" data={[{ label: 'Listed', value: 256 }]} />"
|
|
68
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "progress",
|
|
3
|
+
"status": "stable",
|
|
4
|
+
"intent": "Task completion as a bar or circle from 0 to 100. One piece. Optional name label. Percent overlay, end, or in the ring hole. Tones brand, danger, muted. Sizes sm, md, lg. Fill grows once on load.",
|
|
5
|
+
"useWhen": [
|
|
6
|
+
"Upload, import, or task completion",
|
|
7
|
+
"A determinate percent in a form, card, or page",
|
|
8
|
+
"A determinate percent as a ring or semicircle",
|
|
9
|
+
"DataTable Cell type=progress (Cell composes this)"
|
|
10
|
+
],
|
|
11
|
+
"doNotUseWhen": [
|
|
12
|
+
"A spinner with no known percent \u2014 not this component",
|
|
13
|
+
"A rating out of 5 \u2014 that stays a Cell type",
|
|
14
|
+
"A KPI number \u2014 use Scorecard",
|
|
15
|
+
"Part-to-whole share across segments \u2014 use PieChart",
|
|
16
|
+
"Numbered wizard or checkout steps \u2014 use ProgressSteps"
|
|
17
|
+
],
|
|
18
|
+
"props": {
|
|
19
|
+
"value": {
|
|
20
|
+
"type": "number",
|
|
21
|
+
"default": 0,
|
|
22
|
+
"note": "0 to 100. Clamped."
|
|
23
|
+
},
|
|
24
|
+
"size": {
|
|
25
|
+
"type": "enum",
|
|
26
|
+
"values": [
|
|
27
|
+
"sm",
|
|
28
|
+
"md",
|
|
29
|
+
"lg"
|
|
30
|
+
],
|
|
31
|
+
"default": "md",
|
|
32
|
+
"note": "Bar track height: sm is space-1, md is space-2, lg is space-3. Overlay uses space-5. Circle and semicircle: sm 56, md 96, lg 196."
|
|
33
|
+
},
|
|
34
|
+
"shape": {
|
|
35
|
+
"type": "enum",
|
|
36
|
+
"values": [
|
|
37
|
+
"bar",
|
|
38
|
+
"circle",
|
|
39
|
+
"semicircle"
|
|
40
|
+
],
|
|
41
|
+
"default": "bar",
|
|
42
|
+
"note": "bar is the track. circle is a donut ring. semicircle is a bottom U gauge: 0 to 100 maps onto 180 degrees, not a cropped 360 degree ring. Same piece. Size sets the ring, not bar height."
|
|
43
|
+
},
|
|
44
|
+
"label": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"required": false,
|
|
47
|
+
"note": "Visible name above the track. Prefer this over ProgressLabel."
|
|
48
|
+
},
|
|
49
|
+
"showValue": {
|
|
50
|
+
"type": "boolean",
|
|
51
|
+
"default": false,
|
|
52
|
+
"note": "Shows the rounded percent. Overlay sits on the bar. End sits after the bar, or in meta when a name label is set. Circle puts it in the hole. Semicircle puts it in the bowl."
|
|
53
|
+
},
|
|
54
|
+
"valuePosition": {
|
|
55
|
+
"type": "enum",
|
|
56
|
+
"values": [
|
|
57
|
+
"overlay",
|
|
58
|
+
"end"
|
|
59
|
+
],
|
|
60
|
+
"default": "end",
|
|
61
|
+
"note": "Bar only. overlay centers the percent on the track. end puts it after the bar, or opposite a name label in the meta row. Circle uses the hole. Semicircle uses the bowl."
|
|
62
|
+
},
|
|
63
|
+
"tone": {
|
|
64
|
+
"type": "enum",
|
|
65
|
+
"values": [
|
|
66
|
+
"brand",
|
|
67
|
+
"danger",
|
|
68
|
+
"muted"
|
|
69
|
+
],
|
|
70
|
+
"default": "brand"
|
|
71
|
+
},
|
|
72
|
+
"ariaLabel": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"required": false,
|
|
75
|
+
"note": "Required when label is omitted. Cell passes the percent or its label."
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"tokens": [
|
|
79
|
+
"fill.brand",
|
|
80
|
+
"fill.brandSubtle",
|
|
81
|
+
"fill.danger",
|
|
82
|
+
"fill.dangerSubtle",
|
|
83
|
+
"fill.subtle",
|
|
84
|
+
"fill.strong",
|
|
85
|
+
"text.primary",
|
|
86
|
+
"surface.card",
|
|
87
|
+
"radius.full",
|
|
88
|
+
"radius.controlSm",
|
|
89
|
+
"space.1",
|
|
90
|
+
"space.2",
|
|
91
|
+
"space.3",
|
|
92
|
+
"space.5",
|
|
93
|
+
"type.size.bodySm",
|
|
94
|
+
"type.size.caption",
|
|
95
|
+
"type.weight.label",
|
|
96
|
+
"motion.interactionDuration",
|
|
97
|
+
"motion.duration400",
|
|
98
|
+
"motion.easeOut"
|
|
99
|
+
],
|
|
100
|
+
"a11y": {
|
|
101
|
+
"element": "div[role=progressbar]",
|
|
102
|
+
"requirements": [
|
|
103
|
+
"role=progressbar on the track or ring",
|
|
104
|
+
"aria-valuemin 0, aria-valuemax 100, aria-valuenow rounded percent",
|
|
105
|
+
"aria-valuetext is '{n}%'",
|
|
106
|
+
"Visible label uses aria-labelledby; unlabeled needs ariaLabel"
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"doNot": [
|
|
110
|
+
"Do not invent ProgressLabel, ProgressValue, ProgressTrack, ProgressIndicator, or ProgressRoot",
|
|
111
|
+
"Do not invent MeterCircle or ProgressCircle",
|
|
112
|
+
"Do not use PieChart for a determinate percent ring",
|
|
113
|
+
"Do not use img assets for the ring",
|
|
114
|
+
"Do not add threshold-zone rings, datatip, or reference lines",
|
|
115
|
+
"Do not use radix or @base-ui/react",
|
|
116
|
+
"Do not use a native progress element",
|
|
117
|
+
"Do not use raw hex",
|
|
118
|
+
"Do not add indeterminate",
|
|
119
|
+
"Do not add a multi-segment status bar",
|
|
120
|
+
"Do not use Progress for ordered wizard steps — use ProgressSteps",
|
|
121
|
+
"Do not skip prefers-reduced-motion on the load animation"
|
|
122
|
+
],
|
|
123
|
+
"snippet": "<Progress value={33} />\n<Progress value={56} label=\"Upload progress\" showValue />\n<Progress value={50} showValue valuePosition=\"overlay\" />\n<Progress value={50} showValue tone=\"danger\" />\n<Progress value={50} shape=\"circle\" showValue />"
|
|
124
|
+
}
|