doom-design-system 0.5.0 → 0.6.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.
Files changed (211) hide show
  1. package/dist/components/Accordion/Accordion.module.css +121 -124
  2. package/dist/components/ActionRow/ActionRow.module.css +25 -24
  3. package/dist/components/Alert/Alert.module.css +74 -76
  4. package/dist/components/Avatar/Avatar.module.css +66 -66
  5. package/dist/components/Badge/Badge.module.css +50 -48
  6. package/dist/components/Breadcrumbs/Breadcrumbs.module.css +32 -33
  7. package/dist/components/Button/Button.d.ts +2 -2
  8. package/dist/components/Button/Button.js +1 -1
  9. package/dist/components/Button/Button.module.css +150 -152
  10. package/dist/components/Card/Card.module.css +37 -39
  11. package/dist/components/Chart/Chart.module.css +213 -245
  12. package/dist/components/Chart/behaviors/DraggablePuck.d.ts +36 -0
  13. package/dist/components/Chart/behaviors/DraggablePuck.js +94 -0
  14. package/dist/components/Chart/behaviors/Markers.js +6 -4
  15. package/dist/components/Chart/behaviors/SelectionUpdate.js +2 -4
  16. package/dist/components/Chart/behaviors/index.d.ts +1 -1
  17. package/dist/components/Chart/behaviors/index.js +1 -1
  18. package/dist/components/Chart/engine/CoordinateSystem.d.ts +59 -0
  19. package/dist/components/Chart/engine/CoordinateSystem.js +126 -0
  20. package/dist/components/Chart/engine/Engine.d.ts +102 -0
  21. package/dist/components/Chart/engine/Engine.js +226 -0
  22. package/dist/components/Chart/engine/Scheduler.d.ts +59 -0
  23. package/dist/components/Chart/engine/Scheduler.js +139 -0
  24. package/dist/components/Chart/engine/SpatialMap.d.ts +114 -0
  25. package/dist/components/Chart/engine/SpatialMap.js +270 -0
  26. package/dist/components/Chart/engine/index.d.ts +13 -0
  27. package/dist/components/Chart/engine/index.js +9 -0
  28. package/dist/components/Chart/engine/types.d.ts +137 -0
  29. package/dist/components/Chart/engine/types.js +47 -0
  30. package/dist/components/Chart/hooks/useEngine.d.ts +43 -0
  31. package/dist/components/Chart/hooks/useEngine.js +128 -0
  32. package/dist/components/Chart/sensors/DataHoverSensor/DataHoverSensor.d.ts +17 -19
  33. package/dist/components/Chart/sensors/DataHoverSensor/DataHoverSensor.js +38 -51
  34. package/dist/components/Chart/sensors/DragSensor/DragSensor.d.ts +38 -0
  35. package/dist/components/Chart/sensors/DragSensor/DragSensor.js +105 -0
  36. package/dist/components/Chart/sensors/DragSensor/index.d.ts +2 -0
  37. package/dist/components/Chart/sensors/DragSensor/index.js +1 -0
  38. package/dist/components/Chart/sensors/{KeyboardSensor.d.ts → KeyboardSensor/KeyboardSensor.d.ts} +1 -1
  39. package/dist/components/Chart/sensors/KeyboardSensor/KeyboardSensor.js +86 -0
  40. package/dist/components/Chart/sensors/KeyboardSensor/index.d.ts +1 -0
  41. package/dist/components/Chart/sensors/KeyboardSensor/index.js +1 -0
  42. package/dist/components/Chart/sensors/{SelectionSensor.d.ts → SelectionSensor/SelectionSensor.d.ts} +2 -2
  43. package/dist/components/Chart/sensors/SelectionSensor/SelectionSensor.js +39 -0
  44. package/dist/components/Chart/sensors/SelectionSensor/index.d.ts +1 -0
  45. package/dist/components/Chart/sensors/SelectionSensor/index.js +1 -0
  46. package/dist/components/Chart/sensors/SensorManager/SensorManager.js +36 -41
  47. package/dist/components/Chart/sensors/index.d.ts +1 -0
  48. package/dist/components/Chart/sensors/index.js +3 -2
  49. package/dist/components/Chart/sensors/utils/search.d.ts +1 -1
  50. package/dist/components/Chart/sensors/utils/search.js +25 -4
  51. package/dist/components/Chart/state/store/chart.store.js +18 -0
  52. package/dist/components/Chart/state/store/slices/series.slice.d.ts +1 -0
  53. package/dist/components/Chart/state/store/slices/series.slice.js +3 -2
  54. package/dist/components/Chart/subcomponents/Axis/Axis.module.css +32 -33
  55. package/dist/components/Chart/subcomponents/BarSeries/BarSeries.js +6 -1
  56. package/dist/components/Chart/subcomponents/BarSeries/BarSeries.module.css +11 -9
  57. package/dist/components/Chart/subcomponents/Cursor/Cursor.js +8 -1
  58. package/dist/components/Chart/subcomponents/Cursor/Cursor.module.css +14 -13
  59. package/dist/components/Chart/subcomponents/CustomSeries/CustomSeries.js +4 -0
  60. package/dist/components/Chart/subcomponents/CustomSeries/CustomSeries.module.css +5 -3
  61. package/dist/components/Chart/subcomponents/Footer/Footer.module.css +5 -3
  62. package/dist/components/Chart/subcomponents/Grid/Grid.module.css +12 -11
  63. package/dist/components/Chart/subcomponents/Header/Header.module.css +8 -7
  64. package/dist/components/Chart/subcomponents/InteractionLayer/InteractionLayer.d.ts +4 -4
  65. package/dist/components/Chart/subcomponents/InteractionLayer/InteractionLayer.js +39 -76
  66. package/dist/components/Chart/subcomponents/Legend/Legend.module.css +30 -32
  67. package/dist/components/Chart/subcomponents/LineSeries/LineSeries.js +9 -3
  68. package/dist/components/Chart/subcomponents/LineSeries/LineSeries.module.css +21 -21
  69. package/dist/components/Chart/subcomponents/Root/Root.js +113 -7
  70. package/dist/components/Chart/subcomponents/Root/Root.module.css +70 -82
  71. package/dist/components/Chart/subcomponents/ScatterSeries/ScatterSeries.js +6 -1
  72. package/dist/components/Chart/subcomponents/ScatterSeries/ScatterSeries.module.css +7 -5
  73. package/dist/components/Chart/subcomponents/Series/Series.module.css +118 -128
  74. package/dist/components/Chart/subcomponents/SeriesPoint/SeriesPoint.module.css +10 -8
  75. package/dist/components/Chart/subcomponents/Tooltip/Tooltip.js +2 -3
  76. package/dist/components/Chart/subcomponents/Tooltip/Tooltip.module.css +52 -67
  77. package/dist/components/Chart/types/context.d.ts +9 -0
  78. package/dist/components/Chart/types/events.d.ts +5 -7
  79. package/dist/components/Chart/types/interaction.d.ts +24 -2
  80. package/dist/components/Chart/types/interaction.js +1 -0
  81. package/dist/components/Checkbox/Checkbox.module.css +57 -59
  82. package/dist/components/Chip/Chip.module.css +105 -115
  83. package/dist/components/Combobox/Combobox.d.ts +2 -1
  84. package/dist/components/Combobox/Combobox.js +2 -2
  85. package/dist/components/Combobox/Combobox.module.css +233 -210
  86. package/dist/components/CopyButton/CopyButton.module.css +84 -90
  87. package/dist/components/Drawer/Drawer.module.css +126 -145
  88. package/dist/components/Dropdown/Dropdown.d.ts +3 -1
  89. package/dist/components/Dropdown/Dropdown.js +3 -3
  90. package/dist/components/Dropdown/Dropdown.module.css +52 -32
  91. package/dist/components/FileUpload/FileUpload.js +24 -0
  92. package/dist/components/FileUpload/FileUpload.module.css +295 -313
  93. package/dist/components/Form/Form.module.css +35 -39
  94. package/dist/components/Image/Image.module.css +53 -54
  95. package/dist/components/Input/Input.d.ts +4 -2
  96. package/dist/components/Input/Input.js +2 -2
  97. package/dist/components/Input/Input.module.css +135 -119
  98. package/dist/components/Label/Label.module.css +17 -15
  99. package/dist/components/Layout/Layout.module.css +95 -111
  100. package/dist/components/Link/Link.module.css +67 -65
  101. package/dist/components/Modal/Modal.module.css +112 -132
  102. package/dist/components/Page/Page.module.css +21 -21
  103. package/dist/components/Pagination/Pagination.module.css +56 -56
  104. package/dist/components/Popover/Popover.module.css +17 -16
  105. package/dist/components/ProgressBar/ProgressBar.module.css +36 -37
  106. package/dist/components/RadioGroup/RadioGroup.module.css +74 -77
  107. package/dist/components/Select/Select.d.ts +2 -1
  108. package/dist/components/Select/Select.js +2 -2
  109. package/dist/components/Select/Select.module.css +133 -98
  110. package/dist/components/Sheet/Sheet.module.css +134 -154
  111. package/dist/components/Sidebar/Sidebar.module.css +72 -74
  112. package/dist/components/Sidebar/subcomponents/Footer/Footer.module.css +7 -5
  113. package/dist/components/Sidebar/subcomponents/Group/Group.module.css +80 -85
  114. package/dist/components/Sidebar/subcomponents/Header/Header.module.css +12 -10
  115. package/dist/components/Sidebar/subcomponents/Item/Item.module.css +54 -55
  116. package/dist/components/Sidebar/subcomponents/MobileOverlay/MobileOverlay.module.css +38 -38
  117. package/dist/components/Sidebar/subcomponents/MobileTrigger/MobileTrigger.module.css +5 -3
  118. package/dist/components/Sidebar/subcomponents/Nav/Nav.module.css +13 -11
  119. package/dist/components/Sidebar/subcomponents/Rail/Rail.module.css +62 -63
  120. package/dist/components/Sidebar/subcomponents/Section/Section.module.css +86 -91
  121. package/dist/components/Skeleton/Skeleton.module.css +28 -26
  122. package/dist/components/Slat/Slat.module.css +93 -94
  123. package/dist/components/Slider/Slider.module.css +116 -121
  124. package/dist/components/Spinner/Spinner.module.css +28 -27
  125. package/dist/components/SplitButton/SplitButton.d.ts +3 -1
  126. package/dist/components/SplitButton/SplitButton.js +2 -2
  127. package/dist/components/SplitButton/SplitButton.module.css +104 -87
  128. package/dist/components/Switch/Switch.module.css +64 -63
  129. package/dist/components/Table/FilterBuilder/FilterBuilder.module.css +36 -36
  130. package/dist/components/Table/FilterBuilder/FilterConditionRow.js +1 -1
  131. package/dist/components/Table/FilterBuilder/FilterConditionRow.module.css +21 -22
  132. package/dist/components/Table/FilterBuilder/FilterGroup.js +4 -4
  133. package/dist/components/Table/FilterBuilder/FilterGroup.module.css +355 -389
  134. package/dist/components/Table/FilterBuilder/FilterSheet.module.css +68 -71
  135. package/dist/components/Table/Table.d.ts +4 -2
  136. package/dist/components/Table/Table.js +50 -13
  137. package/dist/components/Table/Table.module.css +210 -188
  138. package/dist/components/Table/TableHeaderFilter.js +1 -1
  139. package/dist/components/Table/TableHeaderFilter.module.css +51 -57
  140. package/dist/components/Tabs/Tabs.module.css +79 -80
  141. package/dist/components/Text/Text.module.css +108 -131
  142. package/dist/components/Textarea/Textarea.d.ts +3 -1
  143. package/dist/components/Textarea/Textarea.js +2 -2
  144. package/dist/components/Textarea/Textarea.module.css +114 -94
  145. package/dist/components/Toast/Toast.module.css +82 -82
  146. package/dist/components/Tooltip/Tooltip.module.css +17 -16
  147. package/dist/styles/globals.css +1677 -1691
  148. package/dist/styles/palettes.d.ts +0 -5
  149. package/dist/styles/palettes.js +0 -8
  150. package/dist/styles/themes/definitions.d.ts +0 -8
  151. package/dist/styles/themes/definitions.js +117 -5
  152. package/dist/styles/types.d.ts +2 -0
  153. package/dist/styles/types.js +1 -0
  154. package/dist/tsconfig.build.tsbuildinfo +1 -1
  155. package/package.json +4 -4
  156. package/.agent/skills/doom/a2ui/a2ui-examples.md +0 -289
  157. package/.agent/skills/doom/a2ui/a2ui-principles.md +0 -49
  158. package/.agent/skills/doom/a2ui/a2ui-protocol.md +0 -191
  159. package/.agent/skills/doom/components/a2ui.md +0 -46
  160. package/.agent/skills/doom/components/accordion.md +0 -44
  161. package/.agent/skills/doom/components/actionrow.md +0 -33
  162. package/.agent/skills/doom/components/alert.md +0 -35
  163. package/.agent/skills/doom/components/avatar.md +0 -36
  164. package/.agent/skills/doom/components/badge.md +0 -29
  165. package/.agent/skills/doom/components/breadcrumbs.md +0 -33
  166. package/.agent/skills/doom/components/button.md +0 -43
  167. package/.agent/skills/doom/components/card.md +0 -41
  168. package/.agent/skills/doom/components/chart.md +0 -106
  169. package/.agent/skills/doom/components/checkbox.md +0 -38
  170. package/.agent/skills/doom/components/chip.md +0 -35
  171. package/.agent/skills/doom/components/combobox.md +0 -50
  172. package/.agent/skills/doom/components/copybutton.md +0 -41
  173. package/.agent/skills/doom/components/drawer.md +0 -69
  174. package/.agent/skills/doom/components/dropdown.md +0 -33
  175. package/.agent/skills/doom/components/fileupload.md +0 -49
  176. package/.agent/skills/doom/components/form.md +0 -55
  177. package/.agent/skills/doom/components/icon.md +0 -47
  178. package/.agent/skills/doom/components/image.md +0 -48
  179. package/.agent/skills/doom/components/input.md +0 -54
  180. package/.agent/skills/doom/components/label.md +0 -32
  181. package/.agent/skills/doom/components/layout.md +0 -92
  182. package/.agent/skills/doom/components/link.md +0 -39
  183. package/.agent/skills/doom/components/modal.md +0 -71
  184. package/.agent/skills/doom/components/page.md +0 -41
  185. package/.agent/skills/doom/components/pagination.md +0 -32
  186. package/.agent/skills/doom/components/popover.md +0 -45
  187. package/.agent/skills/doom/components/progressbar.md +0 -37
  188. package/.agent/skills/doom/components/radiogroup.md +0 -45
  189. package/.agent/skills/doom/components/select.md +0 -43
  190. package/.agent/skills/doom/components/sheet.md +0 -71
  191. package/.agent/skills/doom/components/sidebar.md +0 -92
  192. package/.agent/skills/doom/components/skeleton.md +0 -35
  193. package/.agent/skills/doom/components/slat.md +0 -46
  194. package/.agent/skills/doom/components/slider.md +0 -51
  195. package/.agent/skills/doom/components/spinner.md +0 -34
  196. package/.agent/skills/doom/components/splitbutton.md +0 -35
  197. package/.agent/skills/doom/components/switch.md +0 -40
  198. package/.agent/skills/doom/components/table.md +0 -82
  199. package/.agent/skills/doom/components/tabs.md +0 -65
  200. package/.agent/skills/doom/components/text.md +0 -42
  201. package/.agent/skills/doom/components/textarea.md +0 -46
  202. package/.agent/skills/doom/components/toast.md +0 -59
  203. package/.agent/skills/doom/components/tooltip.md +0 -35
  204. package/.agent/skills/doom/index.md +0 -167
  205. package/.agent/skills/doom/styles/aesthetic.md +0 -151
  206. package/.agent/skills/doom/styles/css-variables.md +0 -80
  207. package/.agent/skills/doom/styles/mixins.md +0 -97
  208. package/.agent/skills/doom/styles/tokens.md +0 -129
  209. package/.agent/skills/doom/styles/utilities.md +0 -84
  210. package/dist/components/Chart/sensors/KeyboardSensor.js +0 -82
  211. package/dist/components/Chart/sensors/SelectionSensor.js +0 -41
@@ -1,55 +0,0 @@
1
- # Form Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { Form, Field, FormMessage } from "doom-design-system";
7
- ```
8
-
9
- ## Components
10
-
11
- ### Form
12
-
13
- Basic form wrapper with consistent styling.
14
-
15
- ### Field
16
-
17
- Form field wrapper with label, error, and description support.
18
-
19
- | Prop | Type | Description |
20
- | ------------- | ------------------- | ----------------------- |
21
- | `label` | `string` | Field label |
22
- | `error` | `string \| boolean` | Error message |
23
- | `description` | `string` | Helper description |
24
- | `htmlFor` | `string` | Label target ID |
25
- | `required` | `boolean` | Show required indicator |
26
-
27
- ### FormMessage
28
-
29
- Standalone message component.
30
-
31
- | Prop | Type | Default | Description |
32
- | --------- | -------------------------- | --------------- | ------------- |
33
- | `variant` | `"error" \| "description"` | `"description"` | Message style |
34
-
35
- ## Usage
36
-
37
- ```tsx
38
- <Form onSubmit={handleSubmit}>
39
- <Field label="Email" required error={errors.email}>
40
- <Input id="email" type="email" />
41
- </Field>
42
-
43
- <Field label="Password" description="Min 8 characters">
44
- <Input id="password" type="password" />
45
- </Field>
46
-
47
- <Button type="submit">Submit</Button>
48
- </Form>
49
- ```
50
-
51
- ## Guidelines
52
-
53
- - Use `Field` to wrap form inputs for consistent label/error handling.
54
- - Prefer using `Input`'s built-in `label` and `error` props for simple cases.
55
- - Use `Field` when you need external error handling or custom inputs.
@@ -1,47 +0,0 @@
1
- # Icon Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { Home, User, Settings, ... } from "doom-design-system";
7
- // or directly from lucide-react
8
- import { Home, User, Settings } from "lucide-react";
9
- ```
10
-
11
- ## Usage
12
-
13
- ```tsx
14
- <Home />
15
- <User size={24} strokeWidth={2.5} />
16
- <Settings className="text-primary" />
17
- ```
18
-
19
- ## Neubrutalism Style
20
-
21
- For bold neubrutalist icons, use:
22
-
23
- - `strokeWidth={2.5}` or `strokeWidth={3}`
24
-
25
- ## Available Icons
26
-
27
- Re-exported from Lucide React for convenience:
28
-
29
- **Finance**: `DollarSign`, `TrendingUp`, `TrendingDown`, `PiggyBank`, `Wallet`, `CreditCard`, `Banknote`
30
-
31
- **Charts**: `BarChart3`, `LineChart`, `PieChart`
32
-
33
- **Status**: `AlertTriangle`, `AlertCircle`, `Info`, `CheckCircle2`, `XCircle`
34
-
35
- **Actions**: `Plus`, `Minus`, `X`, `Check`, `Edit`, `Trash2`, `Save`, `Search`, `Filter`, `Upload`, `Download`, `Eye`, `EyeOff`
36
-
37
- **Navigation**: `Home`, `ChevronDown`, `ChevronUp`, `ChevronLeft`, `ChevronRight`, `ArrowUpRight`, `ArrowDownRight`, `MoreHorizontal`, `MoreVertical`
38
-
39
- **Time**: `Calendar`, `Clock`
40
-
41
- **User**: `User`, `Settings`, `LogOut`
42
-
43
- ## Guidelines
44
-
45
- - Import from `doom-design-system` for commonly used icons.
46
- - Import directly from `lucide-react` for less common icons.
47
- - All Lucide props are supported (size, color, className, etc.).
@@ -1,48 +0,0 @@
1
- # Image Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { Image } from "doom-design-system";
7
- ```
8
-
9
- ## Props
10
-
11
- | Prop | Type | Default | Description |
12
- | ------------- | ---------------------------------------------------------- | ------- | --------------------------- |
13
- | `src` | `string` | — | Image source URL |
14
- | `alt` | `string` | — | Alt text |
15
- | `fit` | `"cover" \| "contain" \| "fill" \| "none" \| "scale-down"` | — | Object-fit |
16
- | `fallbackSrc` | `string` | — | Fallback image URL on error |
17
- | `aspectRatio` | `string \| number` | — | CSS aspect-ratio |
18
- | `rounded` | `boolean` | `true` | Apply border-radius |
19
- | `width` | `string \| number` | — | Image width |
20
- | `height` | `string \| number` | — | Image height |
21
-
22
- Plus all standard `<img>` attributes.
23
-
24
- ## Usage
25
-
26
- ```tsx
27
- <Image
28
- src="/product.jpg"
29
- alt="Product photo"
30
- aspectRatio="16/9"
31
- fit="cover"
32
- />
33
-
34
- <Image
35
- src={user.avatar}
36
- fallbackSrc="/default-avatar.png"
37
- width={200}
38
- height={200}
39
- rounded
40
- />
41
- ```
42
-
43
- ## Guidelines
44
-
45
- - Automatically shows skeleton loader while image loads.
46
- - Smooth crossfade transition when image loads.
47
- - Use `fallbackSrc` for graceful degradation.
48
- - `aspectRatio` auto-computed from width/height if not specified.
@@ -1,54 +0,0 @@
1
- # Input Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { Input } from "doom-design-system";
7
- ```
8
-
9
- ## Props
10
-
11
- | Prop | Type | Default | Description |
12
- | ---------------- | -------------------------------- | ------- | ----------------------------------- |
13
- | `label` | `string` | — | Label text above input |
14
- | `error` | `string` | — | Error message (shows in red) |
15
- | `helperText` | `string` | — | Helper text below input |
16
- | `startAdornment` | `ReactNode` | — | Icon/element at start of input |
17
- | `endAdornment` | `ReactNode` | — | Icon/element at end of input |
18
- | `showCount` | `boolean` | — | Show character count |
19
- | `maxLength` | `number` | — | Max characters (auto-enables count) |
20
- | `format` | `(value) => string` | — | Display format when unfocused |
21
- | `validate` | `(value) => string \| undefined` | — | Custom validation on blur |
22
- | `required` | `boolean` | — | Mark as required |
23
-
24
- Plus all standard `<input>` HTML attributes.
25
-
26
- ## Usage
27
-
28
- ```tsx
29
- <Input
30
- label="Email"
31
- placeholder="you@example.com"
32
- type="email"
33
- required
34
- />
35
-
36
- <Input
37
- label="Search"
38
- startAdornment={<Search size={16} />}
39
- endAdornment={<Button size="sm" variant="ghost">Clear</Button>}
40
- />
41
-
42
- <Input
43
- label="Bio"
44
- maxLength={200}
45
- helperText="Brief description"
46
- />
47
- ```
48
-
49
- ## Guidelines
50
-
51
- - Use `label` prop instead of external `<Label>` component for proper a11y binding.
52
- - Use `error` prop for validation errors (shows as red text below).
53
- - Use `startAdornment` for icons, `endAdornment` for action buttons.
54
- - Character count auto-shows when `maxLength` is set.
@@ -1,32 +0,0 @@
1
- # Label Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { Label } from "doom-design-system";
7
- ```
8
-
9
- ## Props
10
-
11
- | Prop | Type | Default | Description |
12
- | ---------- | ----------- | -------- | ---------------------------- |
13
- | `children` | `ReactNode` | required | Label content |
14
- | `required` | `boolean` | — | Show required indicator (\*) |
15
- | `htmlFor` | `string` | — | Associated input ID |
16
-
17
- Plus all standard `<label>` attributes.
18
-
19
- ## Usage
20
-
21
- ```tsx
22
- <Label htmlFor="email" required>
23
- Email Address
24
- </Label>
25
- <Input id="email" type="email" />
26
- ```
27
-
28
- ## Guidelines
29
-
30
- - Prefer using `Input`'s built-in `label` prop for standard cases.
31
- - Use `Label` directly when you need custom label layouts.
32
- - Works with all form components (Input, Select, Textarea, etc.).
@@ -1,92 +0,0 @@
1
- # Layout Components
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { Flex, Stack, Grid, Container, Switcher } from "doom-design-system";
7
- ```
8
-
9
- ## Components
10
-
11
- ### Flex
12
-
13
- One-dimensional flexbox container.
14
-
15
- | Prop | Type | Default | Description |
16
- | ----------- | ----------------------------------------------------------------------------- | -------------- | -------------------- |
17
- | `direction` | `"row" \| "column" \| "row-reverse" \| "column-reverse"` | `"row"` | Flex direction |
18
- | `justify` | `"flex-start" \| "flex-end" \| "center" \| "space-between" \| "space-around"` | `"flex-start"` | Main axis alignment |
19
- | `align` | `"flex-start" \| "flex-end" \| "center" \| "stretch" \| "baseline"` | `"stretch"` | Cross axis alignment |
20
- | `gap` | `0-16` | `0` | Spacing token |
21
- | `wrap` | `boolean \| "wrap" \| "nowrap"` | `false` | Wrap behavior |
22
-
23
- ### Stack
24
-
25
- Vertical (or horizontal) stacking. Shorthand for Flex with `direction="column"`.
26
-
27
- | Prop | Default | Description |
28
- | ----------- | ---------- | ----------------------- |
29
- | `gap` | `4` | Default vertical gap |
30
- | `direction` | `"column"` | Can override to `"row"` |
31
-
32
- ### Grid
33
-
34
- Two-dimensional grid container.
35
-
36
- | Prop | Type | Default | Description |
37
- | --------- | ------------------ | ------- | --------------------------------------- |
38
- | `columns` | `string \| number` | `"1fr"` | Grid columns (e.g., `3` or `"1fr 2fr"`) |
39
- | `gap` | `0-16` | `4` | Spacing token |
40
-
41
- ### Container
42
-
43
- Centered max-width container.
44
-
45
- | Prop | Type | Default | Description |
46
- | ---------- | ----------------------------------------- | ------- | -------------------- |
47
- | `maxWidth` | `"sm" \| "md" \| "lg" \| "xl" \| "fluid"` | `"xl"` | Max width constraint |
48
-
49
- ### Switcher
50
-
51
- Responsive flexbox that switches from row to column at breakpoint.
52
-
53
- | Prop | Type | Default | Description |
54
- | ----------- | ------------------------------- | ------- | -------------------- |
55
- | `threshold` | `"xxs" \| "xs" \| "sm" \| "md"` | `"xs"` | Breakpoint to switch |
56
-
57
- ## Usage
58
-
59
- ```tsx
60
- <Stack gap={4}>
61
- <Text variant="h2">Title</Text>
62
- <Text>Description</Text>
63
- </Stack>
64
-
65
- <Flex justify="space-between" align="center">
66
- <Logo />
67
- <Nav />
68
- </Flex>
69
-
70
- <Grid columns={3} gap={4}>
71
- <Card>1</Card>
72
- <Card>2</Card>
73
- <Card>3</Card>
74
- </Grid>
75
-
76
- <Container maxWidth="lg">
77
- <PageContent />
78
- </Container>
79
-
80
- <Switcher threshold="sm">
81
- <Sidebar />
82
- <Main />
83
- </Switcher>
84
- ```
85
-
86
- ## Guidelines
87
-
88
- - Use `Stack` as your default vertical layout component.
89
- - Use `Flex` for horizontal layouts or when you need fine control.
90
- - Use `Grid` for two-dimensional layouts (cards, galleries).
91
- - Use `Container` to constrain page content width.
92
- - Use `Switcher` for responsive sidebar layouts.
@@ -1,39 +0,0 @@
1
- # Link Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { Link } from "doom-design-system";
7
- ```
8
-
9
- ## Props
10
-
11
- | Prop | Type | Default | Description |
12
- | ------------ | ----------------------------------- | ----------- | ----------------------------------- |
13
- | `variant` | `"default" \| "button" \| "subtle"` | `"default"` | Visual style |
14
- | `isExternal` | `boolean` | — | Open in new tab, show external icon |
15
- | `disabled` | `boolean` | — | Disabled state |
16
- | `prefetch` | `boolean` | — | Prefetch on hover |
17
-
18
- Plus all standard `<a>` attributes.
19
-
20
- ## Usage
21
-
22
- ```tsx
23
- <Link href="/about">About Us</Link>
24
-
25
- <Link href="https://github.com" isExternal>
26
- GitHub
27
- </Link>
28
-
29
- <Link href="/docs" variant="button">
30
- View Documentation
31
- </Link>
32
- ```
33
-
34
- ## Guidelines
35
-
36
- - Use `variant="default"` for inline text links.
37
- - Use `variant="button"` for links that look like buttons.
38
- - Use `variant="subtle"` for low-emphasis links.
39
- - `isExternal` adds `target="_blank"` and rel attributes automatically.
@@ -1,71 +0,0 @@
1
- # Modal Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { Modal } from "doom-design-system";
7
- ```
8
-
9
- ## Props
10
-
11
- | Prop | Type | Default | Description |
12
- | --------- | ---------------------- | ----------- | ----------------------------------------------------- |
13
- | `isOpen` | `boolean` | required | Controls visibility |
14
- | `onClose` | `() => void` | required | Called on close (Escape, overlay click, close button) |
15
- | `title` | `ReactNode` | — | Title content (uses shorthand API if provided) |
16
- | `footer` | `ReactNode` | — | Footer content (uses shorthand API if provided) |
17
- | `variant` | `"default" \| "solid"` | `"default"` | Visual style |
18
-
19
- ## Usage Patterns
20
-
21
- ### Shorthand API (simple modals)
22
-
23
- ```tsx
24
- <Modal
25
- isOpen={isOpen}
26
- title={<Text variant="h4">Confirm Action</Text>}
27
- footer={
28
- <>
29
- <Button variant="ghost" onClick={onClose}>
30
- Cancel
31
- </Button>
32
- <Button onClick={handleConfirm}>Confirm</Button>
33
- </>
34
- }
35
- onClose={onClose}
36
- >
37
- <Text>Are you sure you want to proceed?</Text>
38
- </Modal>
39
- ```
40
-
41
- ### Composition API (custom layouts)
42
-
43
- ```tsx
44
- <Modal isOpen={isOpen} onClose={onClose}>
45
- <Modal.Header>
46
- <Text variant="h3">Custom Title</Text>
47
- </Modal.Header>
48
- <Modal.Body>
49
- <Stack gap={4}>
50
- <Text>Custom body content...</Text>
51
- </Stack>
52
- </Modal.Body>
53
- <Modal.Footer>
54
- <Button onClick={onClose}>Close</Button>
55
- </Modal.Footer>
56
- </Modal>
57
- ```
58
-
59
- ## Sub-components
60
-
61
- | Component | Description |
62
- | -------------- | ------------------------ |
63
- | `Modal.Header` | Header with close button |
64
- | `Modal.Body` | Scrollable content area |
65
- | `Modal.Footer` | Action buttons area |
66
-
67
- ## Guidelines
68
-
69
- - Use `variant="solid"` for high-impact announcements or critical alerts.
70
- - Modal closes on Escape key and overlay click automatically.
71
- - Always provide meaningful `title` or `aria-label` for accessibility.
@@ -1,41 +0,0 @@
1
- # Page Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { Page } from "doom-design-system";
7
- ```
8
-
9
- ## Props
10
-
11
- | Prop | Type | Default | Description |
12
- | ---------- | -------------------------- | ----------- | -------------- |
13
- | `variant` | `"default" \| "fullWidth"` | `"default"` | Layout variant |
14
- | `children` | `ReactNode` | required | Page content |
15
-
16
- ## Usage
17
-
18
- ```tsx
19
- // Standard constrained page
20
- <Page>
21
- <Text variant="h1">Dashboard</Text>
22
- <Stack gap={4}>
23
- {/* Page content */}
24
- </Stack>
25
- </Page>
26
-
27
- // Full-width page
28
- <Page variant="fullWidth">
29
- <FullWidthHero />
30
- <Container>
31
- <MainContent />
32
- </Container>
33
- </Page>
34
- ```
35
-
36
- ## Guidelines
37
-
38
- - `variant="default"`: 65vw max-width with standard padding.
39
- - `variant="fullWidth"`: 100% width, no default padding.
40
- - Renders as `<main>` element for semantic HTML.
41
- - Use with `Container` for more control over content width.
@@ -1,32 +0,0 @@
1
- # Pagination Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { Pagination } from "doom-design-system";
7
- ```
8
-
9
- ## Props
10
-
11
- | Prop | Type | Description |
12
- | -------------- | ------------------------ | ------------------------------- |
13
- | `currentPage` | `number` | Current active page (1-indexed) |
14
- | `totalPages` | `number` | Total number of pages |
15
- | `onPageChange` | `(page: number) => void` | Page change callback |
16
-
17
- ## Usage
18
-
19
- ```tsx
20
- <Pagination
21
- currentPage={page}
22
- totalPages={Math.ceil(total / pageSize)}
23
- onPageChange={setPage}
24
- />
25
- ```
26
-
27
- ## Guidelines
28
-
29
- - Pages are 1-indexed.
30
- - Automatically truncates with ellipsis for large page counts.
31
- - Prev/Next buttons are disabled at boundaries.
32
- - Used internally by Table component when `enablePagination` is true.
@@ -1,45 +0,0 @@
1
- # Popover Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { Popover } from "doom-design-system";
7
- ```
8
-
9
- ## Props
10
-
11
- | Prop | Type | Default | Description |
12
- | ----------- | ----------------------------------------------------------------------------------------------- | ---------------- | ----------------------------- |
13
- | `trigger` | `ReactNode` | required | Element that triggers popover |
14
- | `content` | `ReactNode` | required | Popover content |
15
- | `isOpen` | `boolean` | required | Controlled open state |
16
- | `onClose` | `() => void` | required | Close callback |
17
- | `placement` | `"bottom-start" \| "bottom-end" \| "bottom-center" \| "top-start" \| "top-end" \| "top-center"` | `"bottom-start"` | Position |
18
- | `offset` | `number` | `8` | Distance from trigger |
19
-
20
- ## Usage
21
-
22
- ```tsx
23
- const [isOpen, setIsOpen] = useState(false);
24
-
25
- <Popover
26
- trigger={<Button onClick={() => setIsOpen(true)}>Open Menu</Button>}
27
- content={
28
- <Card>
29
- <Stack gap={2}>
30
- <Button variant="ghost">Option 1</Button>
31
- <Button variant="ghost">Option 2</Button>
32
- </Stack>
33
- </Card>
34
- }
35
- isOpen={isOpen}
36
- onClose={() => setIsOpen(false)}
37
- />;
38
- ```
39
-
40
- ## Guidelines
41
-
42
- - Used as the foundation for Dropdown, Select, Tooltip, etc.
43
- - Automatically repositions to stay in viewport.
44
- - Closes on click outside.
45
- - You manage open state externally (controlled component).
@@ -1,37 +0,0 @@
1
- # ProgressBar Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { ProgressBar } from "doom-design-system";
7
- ```
8
-
9
- ## Props
10
-
11
- | Prop | Type | Default | Description |
12
- | ------------- | ------------------ | ------------------ | ------------------------------ |
13
- | `value` | `number` | required | Current value (0-100 or 0-max) |
14
- | `max` | `number` | `100` | Maximum value |
15
- | `height` | `string \| number` | `"24px"` | Bar height |
16
- | `color` | `string` | `"var(--primary)"` | Fill color |
17
- | `showStripes` | `boolean` | `true` | Show animated stripes |
18
- | `label` | `ReactNode` | — | Label above the bar |
19
-
20
- ## Usage
21
-
22
- ```tsx
23
- <ProgressBar value={75} />
24
-
25
- <ProgressBar
26
- value={uploadProgress}
27
- max={100}
28
- label="Uploading..."
29
- color="var(--success)"
30
- />
31
- ```
32
-
33
- ## Guidelines
34
-
35
- - Value is automatically clamped to 0-max range.
36
- - Stripes provide visual feedback for in-progress states.
37
- - Set `showStripes={false}` for static/completed states.
@@ -1,45 +0,0 @@
1
- # RadioGroup Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { RadioGroup, RadioGroupItem } from "doom-design-system";
7
- ```
8
-
9
- ## Props
10
-
11
- ### RadioGroup
12
-
13
- | Prop | Type | Default | Description |
14
- | --------------- | ------------------------- | ------- | -------------------------- |
15
- | `name` | `string` | — | Form field name |
16
- | `value` | `string` | — | Controlled value |
17
- | `defaultValue` | `string` | — | Uncontrolled initial value |
18
- | `onValueChange` | `(value: string) => void` | — | Change callback |
19
- | `disabled` | `boolean` | — | Disable all items |
20
-
21
- ### RadioGroupItem
22
-
23
- | Prop | Type | Description |
24
- | ---------- | ----------- | ----------------- |
25
- | `value` | `string` | Item value |
26
- | `disabled` | `boolean` | Disable this item |
27
- | `children` | `ReactNode` | Label content |
28
-
29
- ## Usage
30
-
31
- ```tsx
32
- <RadioGroup name="plan" value={selectedPlan} onValueChange={setSelectedPlan}>
33
- <RadioGroupItem value="free">Free</RadioGroupItem>
34
- <RadioGroupItem value="pro">Pro</RadioGroupItem>
35
- <RadioGroupItem value="enterprise" disabled>
36
- Enterprise (Coming Soon)
37
- </RadioGroupItem>
38
- </RadioGroup>
39
- ```
40
-
41
- ## Guidelines
42
-
43
- - Use for single-select from a small set of options (2-5).
44
- - For larger option sets, use `Select` or `Combobox`.
45
- - Items must be used within a RadioGroup context.