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,43 +0,0 @@
1
- # Select Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { Select } from "doom-design-system";
7
- ```
8
-
9
- ## Props
10
-
11
- | Prop | Type | Default | Description |
12
- | -------------- | ---------------------------------------------- | -------- | -------------------------------- |
13
- | `options` | `{ value: string \| number, label: string }[]` | required | Available options |
14
- | `label` | `string` | — | Label text |
15
- | `value` | `string \| number` | — | Controlled value |
16
- | `defaultValue` | `string \| number` | — | Uncontrolled initial value |
17
- | `onChange` | `(e) => void` | — | Change handler (synthetic event) |
18
- | `placeholder` | `string` | — | Placeholder text |
19
- | `name` | `string` | — | Form field name |
20
- | `required` | `boolean` | — | Required field |
21
- | `disabled` | `boolean` | — | Disabled state |
22
- | `size` | `"sm" \| "md"` | `"md"` | Trigger size |
23
-
24
- ## Usage
25
-
26
- ```tsx
27
- <Select
28
- label="Country"
29
- options={[
30
- { value: "us", label: "United States" },
31
- { value: "uk", label: "United Kingdom" },
32
- ]}
33
- value={country}
34
- onChange={(e) => setCountry(e.target.value)}
35
- />
36
- ```
37
-
38
- ## Guidelines
39
-
40
- - Use for single-select with moderate option count.
41
- - For searchable/multi-select, use `Combobox` instead.
42
- - Includes hidden input for form submission.
43
- - Full keyboard navigation (Arrow keys, Enter, Escape).
@@ -1,71 +0,0 @@
1
- # Sheet Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { Sheet } 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 | Close callback |
15
- | `title` | `ReactNode` | — | Header title |
16
- | `children` | `ReactNode` | required | Sheet content |
17
- | `footer` | `ReactNode` | — | Footer content |
18
- | `variant` | `"default" \| "solid"` | `"default"` | Visual style |
19
-
20
- ## Usage Patterns
21
-
22
- ### Shorthand API (simple sheets)
23
-
24
- ```tsx
25
- <Sheet
26
- isOpen={isOpen}
27
- onClose={() => setIsOpen(false)}
28
- title="Options"
29
- footer={<Button onClick={handleConfirm}>Confirm</Button>}
30
- >
31
- <RadioGroup options={options} />
32
- </Sheet>
33
- ```
34
-
35
- ### Composition API (custom layouts)
36
-
37
- ```tsx
38
- <Sheet isOpen={isOpen} onClose={onClose}>
39
- <Sheet.Header>
40
- <Flex align="center" gap={2}>
41
- <Icon name="settings" />
42
- <Text variant="h4">Advanced Options</Text>
43
- </Flex>
44
- </Sheet.Header>
45
- <Sheet.Body>
46
- <Stack gap={4}>{/* Custom content */}</Stack>
47
- </Sheet.Body>
48
- <Sheet.Footer>
49
- <Button variant="ghost" onClick={onClose}>
50
- Cancel
51
- </Button>
52
- <Button onClick={handleSave}>Apply</Button>
53
- </Sheet.Footer>
54
- </Sheet>
55
- ```
56
-
57
- ## Sub-components
58
-
59
- | Component | Description |
60
- | -------------- | ----------------------- |
61
- | `Sheet.Header` | Header with drag handle |
62
- | `Sheet.Body` | Scrollable content area |
63
- | `Sheet.Footer` | Action buttons area |
64
-
65
- ## Guidelines
66
-
67
- - Use for bottom sheets on mobile or compact overlays.
68
- - Supports drag-to-dismiss gesture (drag down 150px+ to close).
69
- - Closes on Escape key and overlay click.
70
- - Use `variant="solid"` for high-emphasis content.
71
- - Use composition API when you need custom header content.
@@ -1,92 +0,0 @@
1
- # Sidebar Component
2
-
3
- The Sidebar is a complex navigation component supporting dual-mode (Standard and Rail), collapsible sections, groups, and hover-peek functionality.
4
-
5
- ## Import
6
-
7
- ```tsx
8
- import { Sidebar } from "doom-design-system";
9
- ```
10
-
11
- ## Props
12
-
13
- ### Sidebar
14
-
15
- | Prop | Type | Default | Description |
16
- | ----------------- | ---------------------------------------------- | ------- | ---------------------------------------------------------------- |
17
- | `withRail` | `boolean` | `false` | Enables the two-column rail navigation. |
18
- | `collapsed` | `boolean` | `false` | Collapses the main panel (standard) or whole sidebar (rail). |
19
- | `activeSection` | `string` | — | The ID of the currently active Section. |
20
- | `activeItem` | `string` | — | The `href` of the currently active Item. |
21
- | `onNavigate` | `(href: string, e?: React.MouseEvent) => void` | — | Navigation callback. |
22
- | `onSectionChange` | `(id: string) => void` | — | Callback when the active section changes (useful for Rail mode). |
23
- | `brandIcon` | `React.ReactNode` | — | Icon displayed at the top of the Sidebar/Rail. |
24
-
25
- ### Sidebar.Section
26
-
27
- | Prop | Type | Default | Description |
28
- | ---------- | ----------------- | ------- | ---------------------------------------------- |
29
- | `id` | `string` | — | Unique identifier for section switching. |
30
- | `label` | `string` | — | Descriptive label for the section. |
31
- | `icon` | `React.ReactNode` | — | Icon for the section (required for Rail mode). |
32
- | `expanded` | `boolean` | — | Controlled expansion state. |
33
-
34
- ### Sidebar.Group
35
-
36
- | Prop | Type | Default | Description |
37
- | ---------- | ----------------- | ------- | -------------------------------- |
38
- | `id` | `string` | — | Unique identifier for the group. |
39
- | `label` | `string` | — | Descriptive label for the group. |
40
- | `icon` | `React.ReactNode` | — | Optional icon for the group. |
41
- | `expanded` | `boolean` | — | Controlled expansion state. |
42
-
43
- ### Sidebar.Item
44
-
45
- | Prop | Type | Default | Description |
46
- | --------------- | ----------------- | ------- | ----------------------------------------------- |
47
- | `href` | `string` | — | Link destination. |
48
- | `icon` | `React.ReactNode` | — | Optional icon. |
49
- | `appendContent` | `React.ReactNode` | — | Content (badges, chips) at the end of the item. |
50
-
51
- ## Usage
52
-
53
- ### Standard Sidebar
54
-
55
- ```tsx
56
- <Sidebar activeItem="/home">
57
- <Sidebar.Header>App Logo</Sidebar.Header>
58
- <Sidebar.Nav>
59
- <Sidebar.Section id="main" label="Main" icon={<Home />}>
60
- <Sidebar.Item href="/home" icon={<Home />}>
61
- Dashboard
62
- </Sidebar.Item>
63
- <Sidebar.Item href="/inbox">Inbox</Sidebar.Item>
64
- </Sidebar.Section>
65
- </Sidebar.Nav>
66
- </Sidebar>
67
- ```
68
-
69
- ### Rail Mode with Groups
70
-
71
- ```tsx
72
- <Sidebar withRail activeSection="admin">
73
- <Sidebar.Nav>
74
- <Sidebar.Section id="main" label="Main" icon={<Home />}>
75
- <Sidebar.Item href="/home">Home</Sidebar.Item>
76
- </Sidebar.Section>
77
- <Sidebar.Section id="admin" label="Admin" icon={<Settings />}>
78
- <Sidebar.Group id="users" label="User Management">
79
- <Sidebar.Item href="/users/list">User List</Sidebar.Item>
80
- <Sidebar.Item href="/users/permissions">Permissions</Sidebar.Item>
81
- </Sidebar.Group>
82
- </Sidebar.Section>
83
- </Sidebar.Nav>
84
- </Sidebar>
85
- ```
86
-
87
- ## Guidelines
88
-
89
- - **Rail Icons**: Ensure every `Sidebar.Section` has an `icon` if `withRail` is enabled.
90
- - **Snappy UI**: The component uses instant transitions for a high-performance feel.
91
- - **Auto-collapse**: In rail mode, clicking an item auto-collapses to save space.
92
- - **Accessibility**: Collapsed content is hidden via `display: none` to remove it from keyboard tab order.
@@ -1,35 +0,0 @@
1
- # Skeleton Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { Skeleton } from "doom-design-system";
7
- ```
8
-
9
- ## Props
10
-
11
- | Prop | Type | Default | Description |
12
- | --------- | --------------------------------------- | --------------- | ----------- |
13
- | `width` | `string` | — | CSS width |
14
- | `height` | `string` | — | CSS height |
15
- | `variant` | `"text" \| "circular" \| "rectangular"` | `"rectangular"` | Shape |
16
-
17
- ## Usage
18
-
19
- ```tsx
20
- // Text placeholder
21
- <Skeleton variant="text" width="200px" height="1em" />
22
-
23
- // Avatar placeholder
24
- <Skeleton variant="circular" width="48px" height="48px" />
25
-
26
- // Card placeholder
27
- <Skeleton width="100%" height="150px" />
28
- ```
29
-
30
- ## Guidelines
31
-
32
- - Use while loading content to prevent layout shift.
33
- - Match skeleton dimensions to expected content size.
34
- - Use `variant="text"` for text lines, `variant="circular"` for avatars.
35
- - Used internally by `Image` component during load.
@@ -1,46 +0,0 @@
1
- # Slat Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { Slat } from "doom-design-system";
7
- ```
8
-
9
- ## Props
10
-
11
- | Prop | Type | Default | Description |
12
- | ---------------- | ------------------------------------ | ----------- | ------------------------------ |
13
- | `label` | `ReactNode` | required | Primary label |
14
- | `secondaryLabel` | `ReactNode` | — | Secondary text |
15
- | `prependContent` | `ReactNode` | — | Left content (icon, thumbnail) |
16
- | `appendContent` | `ReactNode` | — | Right content (actions) |
17
- | `variant` | `"default" \| "danger" \| "success"` | `"default"` | Visual style |
18
- | `onClick` | `() => void` | — | Makes slat clickable |
19
-
20
- ## Usage
21
-
22
- ```tsx
23
- <Slat
24
- label="document.pdf"
25
- secondaryLabel="2.4 MB"
26
- prependContent={<FileIcon />}
27
- appendContent={
28
- <Button size="sm" variant="danger">
29
- <X size={16} />
30
- </Button>
31
- }
32
- />
33
-
34
- // Clickable slat
35
- <Slat
36
- label="Settings"
37
- prependContent={<Settings size={20} />}
38
- onClick={() => navigate("/settings")}
39
- />
40
- ```
41
-
42
- ## Guidelines
43
-
44
- - Use for list items like file lists, settings, or navigation.
45
- - Used internally by `FileUpload` for file list display.
46
- - When `onClick` is provided, slat becomes focusable and keyboard accessible.
@@ -1,51 +0,0 @@
1
- # Slider Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { Slider } from "doom-design-system";
7
- ```
8
-
9
- ## Props
10
-
11
- | Prop | Type | Default | Description |
12
- | -------------- | ---------------------------- | ------- | ---------------------------------- |
13
- | `label` | `string` | — | Label text |
14
- | `showValue` | `boolean` | — | Display current value |
15
- | `value` | `number \| [number, number]` | — | Controlled value (single or range) |
16
- | `defaultValue` | `number \| [number, number]` | — | Uncontrolled initial value |
17
- | `onChange` | `(value) => void` | — | Change handler |
18
- | `min` | `number` | `0` | Minimum value |
19
- | `max` | `number` | `100` | Maximum value |
20
- | `step` | `number` | `1` | Step increment |
21
-
22
- ## Usage
23
-
24
- ```tsx
25
- // Single value slider
26
- <Slider
27
- label="Volume"
28
- showValue
29
- value={volume}
30
- onChange={setVolume}
31
- />
32
-
33
- // Range slider
34
- <Slider
35
- label="Price Range"
36
- showValue
37
- value={[minPrice, maxPrice]}
38
- onChange={([min, max]) => {
39
- setMinPrice(min);
40
- setMaxPrice(max);
41
- }}
42
- min={0}
43
- max={1000}
44
- />
45
- ```
46
-
47
- ## Guidelines
48
-
49
- - Pass `[number, number]` tuple for range slider (two thumbs).
50
- - Range slider prevents thumbs from crossing each other.
51
- - Use `showValue` to display the current value.
@@ -1,34 +0,0 @@
1
- # Spinner Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { Spinner } from "doom-design-system";
7
- ```
8
-
9
- ## Props
10
-
11
- | Prop | Type | Default | Description |
12
- | ------------- | ------------------------------ | ------- | -------------- |
13
- | `size` | `"sm" \| "md" \| "lg" \| "xl"` | `"md"` | Spinner size |
14
- | `strokeWidth` | `number` | `2` | Line thickness |
15
-
16
- Plus all Lucide icon props.
17
-
18
- ## Usage
19
-
20
- ```tsx
21
- <Spinner />
22
-
23
- <Spinner size="lg" />
24
-
25
- <Button loading>
26
- {/* Button uses Spinner internally when loading */}
27
- </Button>
28
- ```
29
-
30
- ## Guidelines
31
-
32
- - Use for loading states.
33
- - Prefer `Button`'s `loading` prop instead of manually adding Spinner.
34
- - Has `role="status"` and `aria-label="Loading"` for accessibility.
@@ -1,35 +0,0 @@
1
- # SplitButton Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { SplitButton } from "doom-design-system";
7
- ```
8
-
9
- ## Props
10
-
11
- | Prop | Type | Default | Description |
12
- | ---------------- | ------------------------------------------ | ----------- | ------------------------- |
13
- | `primaryLabel` | `string` | required | Main button text |
14
- | `onPrimaryClick` | `() => void` | required | Main button click handler |
15
- | `items` | `{ label: string, onClick: () => void }[]` | required | Dropdown items |
16
- | `variant` | `"primary" \| "secondary"` | `"primary"` | Button style |
17
-
18
- ## Usage
19
-
20
- ```tsx
21
- <SplitButton
22
- primaryLabel="Save"
23
- onPrimaryClick={handleSave}
24
- items={[
25
- { label: "Save as Draft", onClick: handleSaveDraft },
26
- { label: "Save and Publish", onClick: handleSavePublish },
27
- ]}
28
- />
29
- ```
30
-
31
- ## Guidelines
32
-
33
- - Use when there's a primary action with related secondary actions.
34
- - Primary button on left, dropdown trigger on right.
35
- - For simple menus without primary action, use `Dropdown` instead.
@@ -1,40 +0,0 @@
1
- # Switch Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { Switch } from "doom-design-system";
7
- ```
8
-
9
- ## Props
10
-
11
- | Prop | Type | Default | Description |
12
- | ---------- | ---------------------------- | ------- | ------------------------ |
13
- | `checked` | `boolean` | `false` | Controlled checked state |
14
- | `onChange` | `(checked: boolean) => void` | — | Change handler |
15
- | `disabled` | `boolean` | — | Disabled state |
16
- | `label` | `string` | — | Label text |
17
- | `readOnly` | `boolean` | — | Read-only state |
18
-
19
- ## Usage
20
-
21
- ```tsx
22
- <Switch
23
- label="Dark Mode"
24
- checked={darkMode}
25
- onChange={setDarkMode}
26
- />
27
-
28
- <Switch
29
- label="Notifications"
30
- checked={notifications}
31
- onChange={setNotifications}
32
- disabled={!hasPermission}
33
- />
34
- ```
35
-
36
- ## Guidelines
37
-
38
- - Use for binary on/off toggles.
39
- - Prefer `Switch` over `Checkbox` for instant-apply settings.
40
- - Use `Checkbox` for forms that require explicit submission.
@@ -1,82 +0,0 @@
1
- # Table Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { Table } from "doom-design-system";
7
- import { ColumnDef } from "@tanstack/react-table";
8
- ```
9
-
10
- ## Props
11
-
12
- | Prop | Type | Default | Description |
13
- | ------------------------- | -------------------------------------- | ------------ | ---------------------------------------------- |
14
- | `data` | `T[]` | required | Array of row data |
15
- | `columns` | `ColumnDef<T>[]` | required | TanStack column definitions |
16
- | `enablePagination` | `boolean` | `true` | Enable pagination controls |
17
- | `enableFiltering` | `boolean` | `true` | Enable global search |
18
- | `enableColumnFilters` | `boolean` | `true` | Enable per-column filters |
19
- | `enableSorting` | `boolean` | `true` | Enable column sorting |
20
- | `enableVirtualization` | `boolean` | `false` | Virtualize rows for large datasets |
21
- | `enableAdvancedFiltering` | `boolean` | `false` | Enable FilterBuilder UI |
22
- | `pageSize` | `number` | `10` | Default rows per page |
23
- | `height` | `string \| number` | — | Fixed height (scrolls body with sticky header) |
24
- | `maxHeight` | `string \| number` | — | Max height (scrolls body with sticky header) |
25
- | `variant` | `"default" \| "flat"` | `"default"` | Visual style |
26
- | `density` | `"compact" \| "standard" \| "relaxed"` | `"standard"` | Row padding |
27
- | `striped` | `boolean` | `false` | Alternating row colors |
28
- | `filters` | `FilterConfig[]` | — | Filter definitions for advanced filtering |
29
- | `toolbarContent` | `ReactNode` | — | Custom toolbar content |
30
-
31
- ## Column Definition
32
-
33
- ```tsx
34
- const columns: ColumnDef<User>[] = [
35
- {
36
- accessorKey: "name",
37
- header: "Name",
38
- size: 200,
39
- },
40
- {
41
- accessorKey: "email",
42
- header: "Email",
43
- },
44
- {
45
- accessorKey: "status",
46
- header: "Status",
47
- cell: ({ getValue }) => <Badge>{getValue()}</Badge>,
48
- },
49
- ];
50
- ```
51
-
52
- ## Usage
53
-
54
- ```tsx
55
- <Table
56
- data={users}
57
- columns={columns}
58
- enablePagination
59
- enableSorting
60
- density="compact"
61
- />
62
- ```
63
-
64
- ## Advanced Filtering
65
-
66
- ```tsx
67
- <Table
68
- data={orders}
69
- columns={columns}
70
- enableAdvancedFiltering
71
- filters={[
72
- { columnId: "status", label: "Status", type: "select", options: [...] },
73
- { columnId: "amount", label: "Amount", type: "number", operators: ["eq", "gt", "lt"] },
74
- ]}
75
- />
76
- ```
77
-
78
- ## Guidelines
79
-
80
- - Use `enableVirtualization` for 500+ rows (set `height` when using).
81
- - Use `enableAdvancedFiltering` to replace simple column filters with FilterBuilder.
82
- - Provide `filters` array to define filterable columns with their types/operators.
@@ -1,65 +0,0 @@
1
- # Tabs Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import {
7
- Tabs,
8
- TabsList,
9
- TabsTrigger,
10
- TabsBody,
11
- TabsContent,
12
- } from "doom-design-system";
13
- ```
14
-
15
- ## Props
16
-
17
- ### Tabs
18
-
19
- | Prop | Type | Default | Description |
20
- | --------------- | ------------------------- | ------- | --------------------- |
21
- | `defaultValue` | `string` | — | Initial active tab |
22
- | `value` | `string` | — | Controlled active tab |
23
- | `onValueChange` | `(value: string) => void` | — | Change callback |
24
-
25
- ### TabsList
26
-
27
- | Prop | Type | Default | Description |
28
- | ------- | ------------------- | -------- | ------------- |
29
- | `align` | `"left" \| "right"` | `"left"` | Tab alignment |
30
-
31
- ### TabsTrigger
32
-
33
- | Prop | Type | Description |
34
- | ------- | -------- | ---------------------------------- |
35
- | `value` | `string` | Tab value (must match TabsContent) |
36
-
37
- ### TabsContent
38
-
39
- | Prop | Type | Description |
40
- | ------- | -------- | ---------------------------------- |
41
- | `value` | `string` | Tab value (must match TabsTrigger) |
42
-
43
- ## Usage
44
-
45
- ```tsx
46
- <Tabs defaultValue="overview">
47
- <TabsList>
48
- <TabsTrigger value="overview">Overview</TabsTrigger>
49
- <TabsTrigger value="settings">Settings</TabsTrigger>
50
- <TabsTrigger value="team">Team</TabsTrigger>
51
- </TabsList>
52
-
53
- <TabsBody>
54
- <TabsContent value="overview">Overview content...</TabsContent>
55
- <TabsContent value="settings">Settings content...</TabsContent>
56
- <TabsContent value="team">Team content...</TabsContent>
57
- </TabsBody>
58
- </Tabs>
59
- ```
60
-
61
- ## Guidelines
62
-
63
- - Match `value` props between `TabsTrigger` and `TabsContent`.
64
- - Only active `TabsContent` renders (not hidden with CSS).
65
- - Full keyboard navigation and ARIA support.
@@ -1,42 +0,0 @@
1
- # Text Component
2
-
3
- ## Import
4
-
5
- ```tsx
6
- import { Text } from "doom-design-system";
7
- ```
8
-
9
- ## Props
10
-
11
- | Prop | Type | Default | Description |
12
- | --------- | -------------------------------------------------------------------------------- | -------- | ---------------------- |
13
- | `variant` | `"h1" \| "h2" \| "h3" \| "h4" \| "h5" \| "h6" \| "body" \| "small" \| "caption"` | `"body"` | Typography style |
14
- | `weight` | `"normal" \| "medium" \| "semibold" \| "bold" \| "black"` | — | Font weight override |
15
- | `color` | `"primary" \| "secondary" \| "muted" \| "error" \| "success" \| "warning"` | — | Text color |
16
- | `align` | `"left" \| "center" \| "right"` | — | Text alignment |
17
- | `as` | `ElementType` | auto | HTML element to render |
18
-
19
- ## Usage
20
-
21
- ```tsx
22
- <Text variant="h1">Page Title</Text>
23
-
24
- <Text variant="body">
25
- Regular paragraph text.
26
- </Text>
27
-
28
- <Text variant="small" color="muted">
29
- Helper text or captions.
30
- </Text>
31
-
32
- <Text as="label" htmlFor="input" weight="semibold">
33
- Form Label
34
- </Text>
35
- ```
36
-
37
- ## Guidelines
38
-
39
- - Use semantic variants (`h1`-`h6` auto-render as heading elements).
40
- - Use `as` prop to override the HTML element when needed.
41
- - Heading variants use the design system's heading font.
42
- - Body/small/caption use the body font.