division-ds 0.2.0 → 0.2.1

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.
Files changed (89) hide show
  1. package/AGENTS.md +9 -3
  2. package/division-ds-0.2.1.tgz +0 -0
  3. package/package.json +1 -1
  4. package/public/docs/components/accordion.md +2 -0
  5. package/public/docs/components/ai-label.md +2 -0
  6. package/public/docs/components/alert-dialog.md +2 -0
  7. package/public/docs/components/alert.md +2 -0
  8. package/public/docs/components/approval-request.md +2 -0
  9. package/public/docs/components/auth-form.md +2 -0
  10. package/public/docs/components/avatar-group.md +2 -0
  11. package/public/docs/components/avatar.md +2 -0
  12. package/public/docs/components/badge.md +2 -0
  13. package/public/docs/components/breadcrumbs.md +2 -0
  14. package/public/docs/components/button.md +2 -0
  15. package/public/docs/components/card.md +2 -0
  16. package/public/docs/components/carousel.md +2 -0
  17. package/public/docs/components/cart.md +2 -0
  18. package/public/docs/components/chart-panel.md +2 -0
  19. package/public/docs/components/chat-message.md +3 -0
  20. package/public/docs/components/chat-thread.md +2 -0
  21. package/public/docs/components/checkbox.md +2 -0
  22. package/public/docs/components/checkout-form.md +2 -0
  23. package/public/docs/components/command-palette.md +2 -0
  24. package/public/docs/components/data-table.md +2 -0
  25. package/public/docs/components/description-list.md +2 -0
  26. package/public/docs/components/dialog.md +2 -0
  27. package/public/docs/components/divider.md +2 -0
  28. package/public/docs/components/dropdown-menu.md +2 -0
  29. package/public/docs/components/empty-state.md +2 -0
  30. package/public/docs/components/footer.md +2 -0
  31. package/public/docs/components/form-field.md +4 -1
  32. package/public/docs/components/icon-button.md +2 -0
  33. package/public/docs/components/input.md +2 -0
  34. package/public/docs/components/kanban-board.md +2 -0
  35. package/public/docs/components/kbd.md +2 -0
  36. package/public/docs/components/link.md +2 -0
  37. package/public/docs/components/list-item.md +3 -0
  38. package/public/docs/components/loading-animation.md +2 -0
  39. package/public/docs/components/multi-select.md +2 -0
  40. package/public/docs/components/navbar.md +2 -0
  41. package/public/docs/components/newsletter-form.md +2 -0
  42. package/public/docs/components/page-header.md +2 -0
  43. package/public/docs/components/pagination.md +2 -0
  44. package/public/docs/components/product-card.md +3 -0
  45. package/public/docs/components/progress.md +3 -1
  46. package/public/docs/components/prompt-input.md +2 -0
  47. package/public/docs/components/quantity-stepper.md +2 -0
  48. package/public/docs/components/radio.md +38 -1
  49. package/public/docs/components/rating.md +2 -0
  50. package/public/docs/components/score-ring.md +2 -0
  51. package/public/docs/components/search.md +2 -0
  52. package/public/docs/components/section-heading.md +2 -0
  53. package/public/docs/components/segmented-control.md +2 -0
  54. package/public/docs/components/select.md +3 -1
  55. package/public/docs/components/sheet.md +2 -0
  56. package/public/docs/components/sidebar.md +2 -0
  57. package/public/docs/components/skeleton.md +2 -0
  58. package/public/docs/components/slider.md +3 -1
  59. package/public/docs/components/sparkline.md +2 -0
  60. package/public/docs/components/spinner.md +4 -2
  61. package/public/docs/components/stat.md +2 -0
  62. package/public/docs/components/status-tracker.md +2 -0
  63. package/public/docs/components/stepper.md +2 -0
  64. package/public/docs/components/switch.md +4 -2
  65. package/public/docs/components/tabs.md +2 -0
  66. package/public/docs/components/tag.md +2 -0
  67. package/public/docs/components/textarea.md +2 -0
  68. package/public/docs/components/timeline.md +2 -0
  69. package/public/docs/components/toast.md +2 -0
  70. package/public/docs/components/tool-call.md +2 -0
  71. package/public/docs/components/tooltip.md +2 -0
  72. package/public/manifest/components.json +16 -9
  73. package/public/manifest/tokens.json +36 -5
  74. package/scripts/division-ds.mjs +5 -5
  75. package/scripts/lib/agent-docs.mjs +28 -6
  76. package/scripts/lib/ai-copy.mjs +15 -1
  77. package/scripts/lib/check-text.mjs +13 -0
  78. package/scripts/lib/mcp-server.mjs +2 -1
  79. package/scripts/lib/mcp-tools.mjs +33 -8
  80. package/scripts/lib/props-validator.mjs +2 -1
  81. package/scripts/lib/token-discipline.mjs +10 -3
  82. package/skills/division-ds/commands/add.md +1 -1
  83. package/skills/division-ds/commands/build.md +1 -1
  84. package/skills/division-ds/commands/fix.md +1 -1
  85. package/skills/division-ds/commands/review.md +2 -2
  86. package/skills/division-ds/topics/ai.md +2 -1
  87. package/skills/division-ds/topics/forms.md +3 -0
  88. package/skills/division-ds/topics/layout.md +3 -1
  89. package/division-ds-0.2.0.tgz +0 -0
package/AGENTS.md CHANGED
@@ -51,7 +51,7 @@ installs these rules into that project's `AGENTS.md`, `GEMINI.md` and Cursor rul
51
51
  `.claude/skills/` (Claude Code).
52
52
 
53
53
  An agent that supports MCP can have the docs and the same checks as tools instead:
54
- `claude mcp add division-ds -- npx -y division-ds mcp` (`list_components`, `get_component`,
54
+ `claude mcp add division-ds -- npx -y division-ds@0.2.1 mcp` (`list_components`, `get_component`,
55
55
  `search`, `get_tokens`, `validate_code`, `check_contrast`, `get_add_command`,
56
56
  `get_review_checklist`).
57
57
 
@@ -116,7 +116,9 @@ The shell paints the page background (`surface.base`) and supplies the gutter; a
116
116
  own `max-w-*` and vertical spacing, and no page background. A form or an overlay is the
117
117
  exception: it paints `surface.base` on itself, so its field colours never depend on what is
118
118
  behind it. In a project that uses the components, your own root does this
119
- (step 4 of `install.md`).
119
+ (step 4 of `install.md`). Toggle it with `setTheme()` from `src/lib/theme.ts`.
120
+
121
+ **App navigation.** A few views: `Navbar` (`current: true` on the open one). Many: `Sidebar`.
120
122
 
121
123
  **Type.** Three families, as utilities: `font-display` (headings, figures), `font-body` (the
122
124
  default, set by the shell), `font-mono` (labels, code, tabular numbers). A page title is
@@ -151,6 +153,9 @@ bare and name it through its own `label` prop ("Role for Ilse Varga"). `Switch`,
151
153
  renders `ErrorSummary` at the top and focuses it; `useFieldErrors` holds the state (signature in
152
154
  `public/docs/helpers.md`).
153
155
 
156
+ A `RadioGroup` in a form sits in a `<fieldset>` whose `<legend>` names it (code on the Radio
157
+ page). A date is `<Input type="date">` in a `FormField`.
158
+
154
159
  **Buttons.** Two or more buttons side by side need a parent with a gap
155
160
  (`flex flex-wrap gap-3`); `DialogFooter` and `CardFooter` already are one. A `Button` is
156
161
  `type="button"` unless you say `type="submit"`. A busy button takes `loading`, not `disabled`.
@@ -188,7 +193,8 @@ Tailwind), and nothing moves on its own: no autoplay.
188
193
 
189
194
  **Assistant copy.** A button names the action ("Summarize"), never "AI". Say "response", not
190
195
  "answer". No "please" or "!" in assistant labels. The interface says "Assistant"; only its own
191
- messages say "I".
196
+ messages say "I". Response feedback: `ResponseFeedback` in `actions`.
197
+ A value the assistant filled is `aiValue` on that `Input` or `Textarea` only; leaving it accepts it.
192
198
  <!-- rules:end -->
193
199
 
194
200
  ## Changing the system itself
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "division-ds",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Checks a project that uses Division DS components (raw colours, invented tokens, touching buttons, unknown props), and serves the docs and the same checks to agents over MCP.",
5
5
  "license": "MIT",
6
6
  "author": "Victor Ilioiu",
@@ -13,6 +13,8 @@
13
13
  import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from 'src/components/molecules/accordion/Accordion'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { AiLabel } from 'src/components/atoms/ai-label/AiLabel'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogFooter, AlertDialogTrigger } from 'src/components/organisms/alert-dialog/AlertDialog'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { Alert } from 'src/components/molecules/alert/Alert'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { ApprovalRequest } from 'src/components/molecules/approval-request/ApprovalRequest'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Requires
17
19
 
18
20
  - A parent that holds the state and sets it to approved or rejected in onApprove and onReject.
@@ -13,6 +13,8 @@
13
13
  import { AuthForm } from 'src/components/organisms/auth-form/AuthForm'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { AvatarGroup } from 'src/components/molecules/avatar-group/AvatarGroup'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Requires
17
19
 
18
20
  - With overflowTooltip, the root <TooltipProvider>. AppShell and the demo layout each include one.
@@ -13,6 +13,8 @@
13
13
  import { Avatar, avatarVariants, initialsFrom } from 'src/components/atoms/avatar/Avatar'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { Badge, badgeVariants } from 'src/components/atoms/badge/Badge'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { Breadcrumbs, collapseCrumbs } from 'src/components/molecules/breadcrumbs/Breadcrumbs'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { Button, buttonVariants } from 'src/components/atoms/button/Button'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { Card, CardActions, CardBody, CardDescription, CardFooter, CardHeader, CardMedia, CardTitle, cardLinkClass } from 'src/components/molecules/card/Card'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { Carousel } from 'src/components/organisms/carousel/Carousel'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { Cart } from 'src/components/organisms/cart/Cart'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { ChartPanel } from 'src/components/organisms/chart-panel/ChartPanel'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -4,6 +4,7 @@
4
4
 
5
5
  - **Best for:** Each turn inside a ChatThread.
6
6
  - **Not for:** Comments or an activity history between people: use Timeline.
7
+ - **Also on this page:** `ResponseFeedback`
7
8
  - Molecule. Source: `src/components/molecules/chat-message/ChatMessage.tsx`
8
9
  - Rendered docs page: `/components/chat-message`
9
10
 
@@ -14,6 +15,8 @@ import { ChatMessage } from 'src/components/molecules/chat-message/ChatMessage'
14
15
  import { ResponseFeedback } from 'src/components/molecules/chat-message/ResponseFeedback'
15
16
  ```
16
17
 
18
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
19
+
17
20
  ## Requires
18
21
 
19
22
  - A ChatThread around it. Outside one, a message still shows, but nothing announces it when it finishes.
@@ -13,6 +13,8 @@
13
13
  import { ChatThread } from 'src/components/organisms/chat-thread/ChatThread'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Requires
17
19
 
18
20
  - A height, because the thread scrolls and the page doesn't. Use h-[28rem], or flex-1 min-h-0 inside a column.
@@ -13,6 +13,8 @@
13
13
  import { Checkbox } from 'src/components/atoms/checkbox/Checkbox'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { CheckoutForm, DELIVERY_OPTIONS } from 'src/components/organisms/checkout-form/CheckoutForm'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { CommandPalette, filterCommands, groupCommands } from 'src/components/organisms/command-palette/CommandPalette'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { DataTable, sortRows } from 'src/components/organisms/data-table/DataTable'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { DescriptionList } from 'src/components/molecules/description-list/DescriptionList'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { Dialog, DialogClose, DialogContent, DialogFooter, DialogTrigger } from 'src/components/organisms/dialog/Dialog'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { Divider } from 'src/components/atoms/divider/Divider'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from 'src/components/molecules/dropdown-menu/DropdownMenu'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { EmptyState } from 'src/components/molecules/empty-state/EmptyState'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { Footer } from 'src/components/organisms/footer/Footer'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -4,6 +4,7 @@
4
4
 
5
5
  - **Best for:** The label, help and error for an Input, Textarea, Select, MultiSelect or QuantityStepper.
6
6
  - **Not for:** Search or RatingInput, which name themselves. Switch, Checkbox and Radio take an id and a label with htmlFor instead.
7
+ - **Also on this page:** `ErrorSummary`
7
8
  - Molecule. Source: `src/components/molecules/form-field/FormField.tsx`
8
9
  - Rendered docs page: `/components/form-field`
9
10
 
@@ -14,6 +15,8 @@ import { FormField } from 'src/components/molecules/form-field/FormField'
14
15
  import { ErrorSummary } from 'src/components/molecules/form-field/ErrorSummary'
15
16
  ```
16
17
 
18
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
19
+
17
20
  ## Props
18
21
 
19
22
  | Prop | Type | Default | Description |
@@ -22,7 +25,7 @@ import { ErrorSummary } from 'src/components/molecules/form-field/ErrorSummary'
22
25
  | `help` | `string` | | Instruction text, read out before any error. |
23
26
  | `error` | `string` | | Sets invalid on the control and adds the error line. |
24
27
  | `required` | `boolean` | `false` | Adds the asterisk (hidden from screen readers) and the built-in required attribute on the control. That attribute is what assistive technology actually announces. |
25
- | `children` | `ReactElement` | | Exactly one control: Input, Textarea, Select or QuantityStepper. A label set on a Select or QuantityStepper child is replaced by the FormField label. |
28
+ | `children` | `ReactElement` | | Exactly one control: Input, Textarea, Select or QuantityStepper. A label set on a Select or QuantityStepper child is replaced by the FormField label. An id you give the control is kept (point an ErrorSummary entry at it); without one, FormField makes one up. |
26
29
  | `className` | `string` | | Extra CSS classes, merged with the outer element's own. When two Tailwind classes clash, the later one wins. |
27
30
  | `ref` | `Ref<HTMLDivElement>` | | Passed through to the outer element. |
28
31
  | `errors (ErrorSummary)` | `{ fieldId: string; message: string }[]` | | What stopped the form from submitting, in the order of the fields. Each entry links to its field and moves focus there. An empty list shows nothing. |
@@ -13,6 +13,8 @@
13
13
  import { IconButton } from 'src/components/atoms/icon-button/IconButton'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { Input, inputVariants } from 'src/components/atoms/input/Input'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Requires
17
19
 
18
20
  - A <FormField> around it. On its own the control has no label. FormField adds the label, the help text and the error, and connects their ids.
@@ -13,6 +13,8 @@
13
13
  import { KanbanBoard, applyKanbanMove, groupKanbanItems, kanbanDragOver, kanbanDrop, kanbanMessages, kanbanPosition } from 'src/components/organisms/kanban-board/KanbanBoard'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Requires
17
19
 
18
20
  - A parent that holds items in state and applies each onMove (applyKanbanMove does the update).
@@ -13,6 +13,8 @@
13
13
  import { Kbd } from 'src/components/atoms/kbd/Kbd'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { Link, linkVariants } from 'src/components/atoms/link/Link'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -4,6 +4,7 @@
4
4
 
5
5
  - **Best for:** A row people scan in a List: media, a title, meta and one or two actions.
6
6
  - **Not for:** Data in a table that people compare across columns: use DataTable.
7
+ - **Also on this page:** `List`
7
8
  - Molecule. Source: `src/components/molecules/list-item/ListItem.tsx`
8
9
  - Rendered docs page: `/components/list-item`
9
10
 
@@ -13,6 +14,8 @@
13
14
  import { List, ListItem } from 'src/components/molecules/list-item/ListItem'
14
15
  ```
15
16
 
17
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
18
+
16
19
  ## Requires
17
20
 
18
21
  - A <List> around the rows (a ul with role="list"), or as="div" on a row that stands alone.
@@ -13,6 +13,8 @@
13
13
  import { LoadingAnimation } from 'src/components/atoms/loading-animation/LoadingAnimation'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { MultiSelect } from 'src/components/molecules/multi-select/MultiSelect'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Requires
17
19
 
18
20
  - A <FormField> around it. FormField supplies the visible label, the help and the error, and replaces the label prop with its own.
@@ -13,6 +13,8 @@
13
13
  import { Navbar } from 'src/components/organisms/navbar/Navbar'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { NewsletterForm } from 'src/components/organisms/newsletter-form/NewsletterForm'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { PageHeader } from 'src/components/molecules/page-header/PageHeader'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { Pagination, paginationRange } from 'src/components/molecules/pagination/Pagination'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -4,6 +4,7 @@
4
4
 
5
5
  - **Best for:** One product in a shop grid, where the whole card opens it and Add to cart sits on it.
6
6
  - **Not for:** A general content panel: use Card.
7
+ - **Also on this page:** `ProductGrid`
7
8
  - Organism. Source: `src/components/organisms/product-card/ProductCard.tsx`
8
9
  - Rendered docs page: `/components/product-card`
9
10
 
@@ -13,6 +14,8 @@
13
14
  import { ProductCard, ProductGrid } from 'src/components/organisms/product-card/ProductCard'
14
15
  ```
15
16
 
17
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
18
+
16
19
  ## Props
17
20
 
18
21
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { Progress } from 'src/components/atoms/progress/Progress'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -21,7 +23,7 @@ import { Progress } from 'src/components/atoms/progress/Progress'
21
23
  | `value` | `number \| null` | | null means indeterminate. The value is clamped to [0, max], so an out-of-range value shows as complete instead of overflowing the track. |
22
24
  | `max` | `number` | `100` | The value at which the bar is complete. |
23
25
  | `showValue` | `boolean` | `false` | Shows the percentage (or "In progress") as a readout. |
24
- | `tone` | `'signal' \| 'ok' \| 'warning' \| 'hostile'` | `'signal'` | The fill colour. signal paints accent.signal.fill to match Slider. On the track in light theme that’s a 2.15:1 contrast ratio, below the 3:1 a bar needs when it’s the only sign of progress. So set showValue there. |
26
+ | `tone` | `'signal' \| 'ok' \| 'warning' \| 'hostile'` | `'signal'` | The fill colour. signal paints accent.signal.indicator to match Slider. On the track in light theme that’s a 2.15:1 contrast ratio, below the 3:1 a bar needs when it’s the only sign of progress. So set showValue there. |
25
27
  | `className` | `string` | | Merged with the outer wrapper’s classes. Later Tailwind utilities (Tailwind is the CSS framework the system is styled with) win. |
26
28
  | `ref` | `Ref<HTMLDivElement>` | | Passed through to the Radix Progress root, which is the bar itself. Radix is the library of accessible building blocks this component sits on. |
27
29
  | `...rest` | `Omit<HTMLAttributes<HTMLDivElement>, 'children'>` | | Every native div prop except children, spread onto the outer wrapper, so a molecule can attach a data-testid there. children is typed away because this component draws its own label row and track, and a children prop would be thrown away without any warning. |
@@ -13,6 +13,8 @@
13
13
  import { PromptInput } from 'src/components/molecules/prompt-input/PromptInput'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Requires
17
19
 
18
20
  - A parent that keeps the draft in state and clears it in onSubmit.
@@ -13,6 +13,8 @@
13
13
  import { QuantityStepper, clampQuantity, gridMax } from 'src/components/molecules/quantity-stepper/QuantityStepper'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { Radio, RadioGroup } from 'src/components/atoms/radio/Radio'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -123,7 +125,7 @@ const SPEEDS = ['standard', 'priority', 'overnight'] as const
123
125
 
124
126
  ## Do
125
127
 
126
- - Name the group with aria-label or a FormField legend.
128
+ - Name the group: in a form, a fieldset legend that the RadioGroup points at with aria-labelledby; elsewhere, aria-label.
127
129
  - Offer a default when one option really is the norm.
128
130
  - Keep the set short. Past about seven options, use a Select.
129
131
 
@@ -133,6 +135,41 @@ const SPEEDS = ['standard', 'priority', 'overnight'] as const
133
135
  - Don't put a radio outside a RadioGroup. Both the roving focus and the value come from the group.
134
136
  - Don't make choosing an option perform the action. Put a button after the group.
135
137
 
138
+ ## Common mistakes
139
+
140
+ Wrong:
141
+
142
+ ```tsx
143
+ <FormField label="Difficulty" error={error}>
144
+ <RadioGroup>
145
+ <Radio value="easy" />
146
+ </RadioGroup>
147
+ </FormField>
148
+ ```
149
+
150
+ Right:
151
+
152
+ ```tsx
153
+ <fieldset aria-describedby={error ? 'difficulty-error' : undefined}>
154
+ <legend id="difficulty-label" className="font-mono text-[11px] font-semibold uppercase tracking-[0.12em] text-[var(--color-text-primary)]">
155
+ Difficulty
156
+ </legend>
157
+ <RadioGroup aria-labelledby="difficulty-label" aria-required="true" value={value} onValueChange={setValue} className="mt-2">
158
+ {['easy', 'moderate', 'hard'].map(option => (
159
+ <div key={option} className="flex items-center gap-2">
160
+ <Radio id={`difficulty-${option}`} value={option} invalid={Boolean(error)} />
161
+ <label htmlFor={`difficulty-${option}`} className="font-body text-sm">{option}</label>
162
+ </div>
163
+ ))}
164
+ </RadioGroup>
165
+ {error ? (
166
+ <p id="difficulty-error" className="mt-1.5 font-body text-sm text-[var(--color-accent-hostile-text)]">{error}</p>
167
+ ) : null}
168
+ </fieldset>
169
+ ```
170
+
171
+ FormField clones one control and gives it an id and a label; a group of radios has neither. The fieldset and legend name the group, the label styles match FormField, and the error is linked through aria-describedby. Give ErrorSummary the id of the first Radio so its link lands in the group.
172
+
136
173
  ## Anatomy
137
174
 
138
175
  - **RadioGroup**: Has role=radiogroup, which tells assistive tech (screen readers and similar tools) this is a set of radios. It handles roving focus, where only one option is reachable by Tab and the arrows move between the rest, and it owns the value.
@@ -13,6 +13,8 @@
13
13
  import { Rating, RatingInput } from 'src/components/molecules/rating/Rating'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |
@@ -13,6 +13,8 @@
13
13
  import { ScoreRing, scoreBand } from 'src/components/atoms/score-ring/ScoreRing'
14
14
  ```
15
15
 
16
+ Paths are from the Division DS repository root. Installed with shadcn they start `src/division-ds/` instead of `src/` (`src/division-ds/components/...`); import them relative to your file.
17
+
16
18
  ## Props
17
19
 
18
20
  | Prop | Type | Default | Description |