@slipstream-ui/core 0.3.0 → 0.5.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 (181) hide show
  1. package/dist/index.d.mts +957 -56
  2. package/dist/index.d.ts +957 -56
  3. package/dist/index.js +2554 -777
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +2524 -777
  6. package/dist/index.mjs.map +1 -1
  7. package/dist/manifests/app-shell.manifest.json +206 -0
  8. package/dist/manifests/auth-layout.manifest.json +99 -0
  9. package/dist/manifests/autocomplete.manifest.json +53 -5
  10. package/dist/manifests/badge.manifest.json +20 -3
  11. package/dist/manifests/breadcrumb.manifest.json +6 -0
  12. package/dist/manifests/button.manifest.json +20 -2
  13. package/dist/manifests/card.manifest.json +53 -6
  14. package/dist/manifests/confirm-dialog.manifest.json +132 -0
  15. package/dist/manifests/data-table.manifest.json +50 -0
  16. package/dist/manifests/date-picker.manifest.json +87 -0
  17. package/dist/manifests/dialog.manifest.json +56 -4
  18. package/dist/manifests/drawer.manifest.json +25 -4
  19. package/dist/manifests/empty-state.manifest.json +108 -0
  20. package/dist/manifests/file-upload.manifest.json +103 -0
  21. package/dist/manifests/filter-bar.manifest.json +100 -0
  22. package/dist/manifests/link.manifest.json +106 -0
  23. package/dist/manifests/menu.manifest.json +13 -1
  24. package/dist/manifests/metric-card.manifest.json +105 -0
  25. package/dist/manifests/page-header.manifest.json +124 -0
  26. package/dist/manifests/pagination.manifest.json +68 -34
  27. package/dist/manifests/password-input.manifest.json +75 -0
  28. package/dist/manifests/prose.manifest.json +75 -0
  29. package/dist/manifests/search.manifest.json +41 -9
  30. package/dist/manifests/section-heading.manifest.json +108 -0
  31. package/dist/manifests/select-menu.manifest.json +142 -0
  32. package/dist/manifests/select.manifest.json +55 -12
  33. package/dist/manifests/site-footer.manifest.json +94 -0
  34. package/dist/manifests/site-header.manifest.json +130 -0
  35. package/dist/manifests/stepper.manifest.json +95 -0
  36. package/dist/manifests/table-card.manifest.json +123 -0
  37. package/dist/manifests/table-of-contents.manifest.json +87 -0
  38. package/dist/manifests/time-picker.manifest.json +86 -0
  39. package/dist/manifests/timeline.manifest.json +69 -0
  40. package/dist/manifests/toast.manifest.json +101 -25
  41. package/package.json +2 -2
  42. package/src/components/alert/Alert.tsx +2 -2
  43. package/src/components/app-shell/AppShell.test.tsx +148 -0
  44. package/src/components/app-shell/AppShell.tsx +266 -0
  45. package/src/components/app-shell/index.ts +1 -0
  46. package/src/components/auth-layout/AuthLayout.test.tsx +34 -0
  47. package/src/components/auth-layout/AuthLayout.tsx +47 -0
  48. package/src/components/auth-layout/index.ts +1 -0
  49. package/src/components/autocomplete/Autocomplete.test.tsx +53 -0
  50. package/src/components/autocomplete/Autocomplete.tsx +160 -41
  51. package/src/components/badge/Badge.test.tsx +35 -0
  52. package/src/components/badge/Badge.tsx +16 -4
  53. package/src/components/breadcrumb/Breadcrumb.test.tsx +16 -0
  54. package/src/components/breadcrumb/Breadcrumb.tsx +10 -5
  55. package/src/components/button/Button.test.tsx +67 -0
  56. package/src/components/button/Button.tsx +37 -3
  57. package/src/components/button-group/ButtonGroup.test.tsx +6 -8
  58. package/src/components/button-group/ButtonGroup.tsx +17 -9
  59. package/src/components/card/Card.test.tsx +14 -0
  60. package/src/components/card/Card.tsx +15 -8
  61. package/src/components/confirm-dialog/ConfirmDialog.test.tsx +46 -0
  62. package/src/components/confirm-dialog/ConfirmDialog.tsx +86 -0
  63. package/src/components/confirm-dialog/index.ts +1 -0
  64. package/src/components/data-table/DataTable.test.tsx +92 -0
  65. package/src/components/data-table/DataTable.tsx +98 -7
  66. package/src/components/date-picker/DatePicker.test.tsx +30 -0
  67. package/src/components/date-picker/DatePicker.tsx +57 -0
  68. package/src/components/date-picker/index.ts +1 -0
  69. package/src/components/dialog/Dialog.test.tsx +71 -1
  70. package/src/components/dialog/Dialog.tsx +116 -23
  71. package/src/components/dialog/index.ts +1 -2
  72. package/src/components/drawer/Drawer.test.tsx +59 -0
  73. package/src/components/drawer/Drawer.tsx +49 -8
  74. package/src/components/empty-state/EmptyState.test.tsx +30 -0
  75. package/src/components/empty-state/EmptyState.tsx +48 -0
  76. package/src/components/empty-state/index.ts +1 -0
  77. package/src/components/file-upload/FileUpload.test.tsx +43 -0
  78. package/src/components/file-upload/FileUpload.tsx +143 -0
  79. package/src/components/file-upload/index.ts +1 -0
  80. package/src/components/filter-bar/FilterBar.test.tsx +32 -0
  81. package/src/components/filter-bar/FilterBar.tsx +71 -0
  82. package/src/components/filter-bar/index.ts +1 -0
  83. package/src/components/input/Input.tsx +1 -0
  84. package/src/components/input-group/InputGroup.test.tsx +6 -3
  85. package/src/components/input-group/InputGroup.tsx +9 -6
  86. package/src/components/link/Link.test.tsx +60 -0
  87. package/src/components/link/Link.tsx +85 -0
  88. package/src/components/link/index.ts +1 -0
  89. package/src/components/menu/Menu.test.tsx +21 -0
  90. package/src/components/menu/Menu.tsx +8 -3
  91. package/src/components/metric-card/MetricCard.test.tsx +28 -0
  92. package/src/components/metric-card/MetricCard.tsx +54 -0
  93. package/src/components/metric-card/index.ts +1 -0
  94. package/src/components/page-header/PageHeader.test.tsx +48 -0
  95. package/src/components/page-header/PageHeader.tsx +53 -0
  96. package/src/components/page-header/index.ts +1 -0
  97. package/src/components/pagination/Pagination.test.tsx +33 -0
  98. package/src/components/pagination/Pagination.tsx +69 -18
  99. package/src/components/password-input/PasswordInput.test.tsx +29 -0
  100. package/src/components/password-input/PasswordInput.tsx +41 -0
  101. package/src/components/password-input/index.ts +1 -0
  102. package/src/components/prose/Prose.test.tsx +35 -0
  103. package/src/components/prose/Prose.tsx +61 -0
  104. package/src/components/prose/index.ts +1 -0
  105. package/src/components/search/Search.test.tsx +16 -0
  106. package/src/components/search/Search.tsx +11 -2
  107. package/src/components/section-heading/SectionHeading.test.tsx +32 -0
  108. package/src/components/section-heading/SectionHeading.tsx +54 -0
  109. package/src/components/section-heading/index.ts +1 -0
  110. package/src/components/select/Select.test.tsx +40 -1
  111. package/src/components/select/Select.tsx +54 -14
  112. package/src/components/select/index.ts +1 -1
  113. package/src/components/select-menu/SelectMenu.test.tsx +105 -0
  114. package/src/components/select-menu/SelectMenu.tsx +368 -0
  115. package/src/components/select-menu/index.ts +1 -0
  116. package/src/components/site-footer/SiteFooter.test.tsx +30 -0
  117. package/src/components/site-footer/SiteFooter.tsx +79 -0
  118. package/src/components/site-footer/index.ts +1 -0
  119. package/src/components/site-header/SiteHeader.test.tsx +53 -0
  120. package/src/components/site-header/SiteHeader.tsx +124 -0
  121. package/src/components/site-header/index.ts +1 -0
  122. package/src/components/stepper/Stepper.test.tsx +35 -0
  123. package/src/components/stepper/Stepper.tsx +91 -0
  124. package/src/components/stepper/index.ts +1 -0
  125. package/src/components/switch/Switch.test.tsx +10 -0
  126. package/src/components/switch/Switch.tsx +8 -3
  127. package/src/components/table-card/TableCard.test.tsx +59 -0
  128. package/src/components/table-card/TableCard.tsx +48 -0
  129. package/src/components/table-card/index.ts +1 -0
  130. package/src/components/table-of-contents/TableOfContents.test.tsx +31 -0
  131. package/src/components/table-of-contents/TableOfContents.tsx +100 -0
  132. package/src/components/table-of-contents/index.ts +1 -0
  133. package/src/components/textarea/Textarea.tsx +1 -0
  134. package/src/components/time-picker/TimePicker.test.tsx +30 -0
  135. package/src/components/time-picker/TimePicker.tsx +56 -0
  136. package/src/components/time-picker/index.ts +1 -0
  137. package/src/components/timeline/Timeline.test.tsx +26 -0
  138. package/src/components/timeline/Timeline.tsx +53 -0
  139. package/src/components/timeline/index.ts +1 -0
  140. package/src/components/toast/Toast.test.tsx +5 -0
  141. package/src/components/toast/Toast.tsx +2 -16
  142. package/src/components/toast/Toaster.test.tsx +84 -0
  143. package/src/components/toast/Toaster.tsx +116 -0
  144. package/src/components/toast/index.ts +4 -0
  145. package/src/components/toast/toast-store.ts +117 -0
  146. package/src/index.ts +21 -0
  147. package/src/manifests/app-shell.manifest.json +206 -0
  148. package/src/manifests/auth-layout.manifest.json +99 -0
  149. package/src/manifests/autocomplete.manifest.json +53 -5
  150. package/src/manifests/badge.manifest.json +20 -3
  151. package/src/manifests/breadcrumb.manifest.json +6 -0
  152. package/src/manifests/button.manifest.json +20 -2
  153. package/src/manifests/card.manifest.json +53 -6
  154. package/src/manifests/confirm-dialog.manifest.json +132 -0
  155. package/src/manifests/data-table.manifest.json +50 -0
  156. package/src/manifests/date-picker.manifest.json +87 -0
  157. package/src/manifests/dialog.manifest.json +56 -4
  158. package/src/manifests/drawer.manifest.json +25 -4
  159. package/src/manifests/empty-state.manifest.json +108 -0
  160. package/src/manifests/file-upload.manifest.json +103 -0
  161. package/src/manifests/filter-bar.manifest.json +100 -0
  162. package/src/manifests/link.manifest.json +106 -0
  163. package/src/manifests/menu.manifest.json +13 -1
  164. package/src/manifests/metric-card.manifest.json +105 -0
  165. package/src/manifests/page-header.manifest.json +124 -0
  166. package/src/manifests/pagination.manifest.json +68 -34
  167. package/src/manifests/password-input.manifest.json +75 -0
  168. package/src/manifests/prose.manifest.json +75 -0
  169. package/src/manifests/search.manifest.json +41 -9
  170. package/src/manifests/section-heading.manifest.json +108 -0
  171. package/src/manifests/select-menu.manifest.json +142 -0
  172. package/src/manifests/select.manifest.json +55 -12
  173. package/src/manifests/site-footer.manifest.json +94 -0
  174. package/src/manifests/site-header.manifest.json +130 -0
  175. package/src/manifests/stepper.manifest.json +95 -0
  176. package/src/manifests/table-card.manifest.json +123 -0
  177. package/src/manifests/table-of-contents.manifest.json +87 -0
  178. package/src/manifests/time-picker.manifest.json +86 -0
  179. package/src/manifests/timeline.manifest.json +69 -0
  180. package/src/manifests/toast.manifest.json +101 -25
  181. package/src/test/tailwind-v4.test.ts +103 -0
@@ -0,0 +1,132 @@
1
+ {
2
+ "id": "confirm-dialog",
3
+ "name": "ConfirmDialog",
4
+ "tier": "molecule",
5
+ "package": "@slipstream-ui/core",
6
+ "importPath": "@slipstream-ui/core",
7
+ "version": "0.1.0",
8
+ "sourceDir": "confirm-dialog",
9
+ "exportName": "ConfirmDialog",
10
+ "description": "Accessible confirmation dialog with async pending state, destructive variant and cancellable actions, built on Dialog.",
11
+ "designIntent": "Confirmations are copy-pasted per project (79 hand-rolled modals in the audited apps), usually without focus trapping or Escape. ConfirmDialog provides the accessible default plus a pending state for async actions.",
12
+ "props": [
13
+ {
14
+ "name": "open",
15
+ "type": "boolean",
16
+ "required": true,
17
+ "description": "Controlled visibility."
18
+ },
19
+ {
20
+ "name": "onOpenChange",
21
+ "type": "(open: boolean) => void",
22
+ "required": true,
23
+ "description": "Open/close requests."
24
+ },
25
+ {
26
+ "name": "title",
27
+ "type": "string",
28
+ "required": true,
29
+ "description": "Dialog title (accessible name)."
30
+ },
31
+ {
32
+ "name": "description",
33
+ "type": "string",
34
+ "required": false,
35
+ "description": "Supporting line under the title."
36
+ },
37
+ {
38
+ "name": "confirmLabel",
39
+ "type": "string",
40
+ "required": false,
41
+ "defaultValue": "Confirm",
42
+ "description": "Confirm button label."
43
+ },
44
+ {
45
+ "name": "cancelLabel",
46
+ "type": "string",
47
+ "required": false,
48
+ "defaultValue": "Cancel",
49
+ "description": "Cancel button label."
50
+ },
51
+ {
52
+ "name": "destructive",
53
+ "type": "boolean",
54
+ "required": false,
55
+ "defaultValue": "false",
56
+ "description": "Red confirm button for destructive actions."
57
+ },
58
+ {
59
+ "name": "onConfirm",
60
+ "type": "() => void | Promise<void>",
61
+ "required": true,
62
+ "description": "Confirm handler; a promise shows a pending state."
63
+ },
64
+ {
65
+ "name": "closeOnConfirm",
66
+ "type": "boolean",
67
+ "required": false,
68
+ "defaultValue": "true",
69
+ "description": "Close when the confirm handler resolves."
70
+ },
71
+ {
72
+ "name": "children",
73
+ "type": "ReactNode",
74
+ "required": false,
75
+ "description": "Extra body content above the actions."
76
+ }
77
+ ],
78
+ "examples": [
79
+ {
80
+ "title": "Delete confirmation",
81
+ "code": "<ConfirmDialog\n open={open}\n onOpenChange={setOpen}\n title=\"Delete project\"\n description=\"This cannot be undone.\"\n destructive\n confirmLabel=\"Delete\"\n onConfirm={deleteProject}\n/>",
82
+ "description": "Async-safe destructive confirmation."
83
+ }
84
+ ],
85
+ "antiPatterns": [
86
+ {
87
+ "title": "Don't use it for multi-field forms",
88
+ "explanation": "ConfirmDialog is a yes/no gate; richer flows belong in Dialog.",
89
+ "example": "// Avoid\n<ConfirmDialog>…form…</ConfirmDialog>"
90
+ }
91
+ ],
92
+ "accessibility": [
93
+ {
94
+ "feature": "Modal semantics",
95
+ "implementation": "Inherits Dialog's focus trap, Escape, backdrop and focus restoration",
96
+ "userRequirements": "Always provide a clear title"
97
+ },
98
+ {
99
+ "feature": "Pending state",
100
+ "implementation": "Confirm shows aria-busy while the promise runs; dismissal is blocked",
101
+ "userRequirements": "Return a promise for async actions"
102
+ }
103
+ ],
104
+ "contentGuidelines": [
105
+ {
106
+ "contentType": "Titles",
107
+ "guidelines": [
108
+ "State the action",
109
+ "Confirm label repeats the verb"
110
+ ],
111
+ "goodExamples": [
112
+ "Delete project",
113
+ "Publish release"
114
+ ],
115
+ "badExamples": [
116
+ "Are you sure?"
117
+ ]
118
+ }
119
+ ],
120
+ "compositionRules": [
121
+ {
122
+ "component": "Dialog",
123
+ "relationship": "Built on Dialog; use Dialog directly for custom layouts",
124
+ "example": "<ConfirmDialog … />"
125
+ }
126
+ ],
127
+ "relatedComponents": [
128
+ "Dialog",
129
+ "Button",
130
+ "Alert"
131
+ ]
132
+ }
@@ -165,11 +165,61 @@
165
165
  "'No conversations yet'"
166
166
  ]
167
167
  },
168
+ {
169
+ "name": "selectAllLabel",
170
+ "type": "string",
171
+ "required": false,
172
+ "defaultValue": "'Select all rows'",
173
+ "description": "Accessible label for the select-all checkbox."
174
+ },
168
175
  {
169
176
  "name": "className",
170
177
  "type": "string",
171
178
  "required": false,
172
179
  "description": "Additional classes for the table wrapper."
180
+ },
181
+ {
182
+ "name": "selectedRowIds",
183
+ "type": "string[]",
184
+ "required": false,
185
+ "description": "Selected row ids (controlled) — enables the leading selection column."
186
+ },
187
+ {
188
+ "name": "onSelectedRowIdsChange",
189
+ "type": "(ids: string[]) => void",
190
+ "required": false,
191
+ "description": "Fires after a row or select-all toggle."
192
+ },
193
+ {
194
+ "name": "isRowSelectable",
195
+ "type": "(row: T) => boolean",
196
+ "required": false,
197
+ "description": "Disable selection for individual rows."
198
+ },
199
+ {
200
+ "name": "bulkActions",
201
+ "type": "ReactNode",
202
+ "required": false,
203
+ "description": "Rendered above the table while rows are selected."
204
+ },
205
+ {
206
+ "name": "manualPagination",
207
+ "type": "boolean",
208
+ "required": false,
209
+ "defaultValue": "false",
210
+ "description": "Server pagination: render data as-is, do not slice or sort."
211
+ },
212
+ {
213
+ "name": "total",
214
+ "type": "number",
215
+ "required": false,
216
+ "description": "Total row count across pages (summary + derived page count)."
217
+ },
218
+ {
219
+ "name": "pageCount",
220
+ "type": "number",
221
+ "required": false,
222
+ "description": "Total page count (manual pagination)."
173
223
  }
174
224
  ],
175
225
  "examples": [
@@ -0,0 +1,87 @@
1
+ {
2
+ "id": "date-picker",
3
+ "name": "DatePicker",
4
+ "tier": "molecule",
5
+ "description": "Native date field with an ISO-string contract, min/max passthrough and an optional clear button.",
6
+ "designIntent": "A custom calendar is a large accessibility surface. The platform date picker already handles locale formatting, keyboard editing and mobile wheels, so DatePicker standardizes the ISO contract and a clear affordance instead of reimplementing a calendar.",
7
+ "props": [
8
+ {
9
+ "name": "value",
10
+ "type": "string",
11
+ "required": false,
12
+ "description": "ISO date (YYYY-MM-DD), controlled."
13
+ },
14
+ {
15
+ "name": "defaultValue",
16
+ "type": "string",
17
+ "required": false,
18
+ "description": "ISO date, initial value."
19
+ },
20
+ {
21
+ "name": "onValueChange",
22
+ "type": "(value: string) => void",
23
+ "required": false,
24
+ "description": "Fired with the ISO string; '' when cleared."
25
+ },
26
+ {
27
+ "name": "clearable",
28
+ "type": "boolean",
29
+ "required": false,
30
+ "defaultValue": "false",
31
+ "description": "Shows a clear button once a value exists."
32
+ }
33
+ ],
34
+ "examples": [
35
+ {
36
+ "title": "ISO date field",
37
+ "code": "<DatePicker\n aria-label=\"Start date\"\n value={start}\n onValueChange={setStart}\n clearable\n/>",
38
+ "description": "Controlled ISO value with a clear button."
39
+ }
40
+ ],
41
+ "antiPatterns": [
42
+ {
43
+ "title": "Don't store locale-formatted strings",
44
+ "explanation": "The contract is YYYY-MM-DD; format for display at the edge.",
45
+ "example": "// Avoid: '03/11/2026' in state\n// Prefer: '2026-11-03'"
46
+ }
47
+ ],
48
+ "accessibility": [
49
+ {
50
+ "feature": "Platform input",
51
+ "implementation": "Renders input[type=date] so OS pickers and keyboard editing apply",
52
+ "userRequirements": "Always provide a label (FormField or aria-label)"
53
+ }
54
+ ],
55
+ "contentGuidelines": [
56
+ {
57
+ "contentType": "Labels",
58
+ "guidelines": [
59
+ "Name the date's meaning, not 'Date'"
60
+ ],
61
+ "goodExamples": [
62
+ "Start date",
63
+ "Due on"
64
+ ],
65
+ "badExamples": [
66
+ "Date"
67
+ ]
68
+ }
69
+ ],
70
+ "compositionRules": [
71
+ {
72
+ "component": "FormField",
73
+ "relationship": "Wrap for label/hint/error wiring",
74
+ "example": "<FormField id=\"start\" label=\"Start date\"><DatePicker /></FormField>"
75
+ }
76
+ ],
77
+ "relatedComponents": [
78
+ "TimePicker",
79
+ "FormField",
80
+ "Input"
81
+ ],
82
+ "package": "@slipstream-ui/core",
83
+ "importPath": "@slipstream-ui/core",
84
+ "version": "0.1.0",
85
+ "sourceDir": "date-picker",
86
+ "exportName": "DatePicker"
87
+ }
@@ -2,7 +2,7 @@
2
2
  "id": "dialog",
3
3
  "name": "Dialog",
4
4
  "tier": "molecule",
5
- "description": "Accessible modal dialog with focus trapping, escape-to-close and focus restoration",
5
+ "description": "Accessible modal dialog with focus trap/restore, backdrop and Escape dismissal, size presets, optional header/footer slots, a scrollable body, and opt-in fade motion.",
6
6
  "designIntent": "Modals interrupt the task flow on purpose: confirmations, small forms, and destructive-action guards. The Dialog implements the full modal contract — aria-modal labelling, initial focus, a Tab focus trap, Escape and backdrop dismissal, and focus restoration to the opener — so consumers never hand-roll focus management.",
7
7
  "props": [
8
8
  {
@@ -20,8 +20,8 @@
20
20
  {
21
21
  "name": "title",
22
22
  "type": "string",
23
- "required": true,
24
- "description": "Accessible dialog name, wired via aria-labelledby"
23
+ "required": false,
24
+ "description": "Accessible name + default header title. Optional when composing a custom header with ariaLabel."
25
25
  },
26
26
  {
27
27
  "name": "description",
@@ -59,6 +59,13 @@
59
59
  "false"
60
60
  ]
61
61
  },
62
+ {
63
+ "name": "closeLabel",
64
+ "type": "string",
65
+ "required": false,
66
+ "defaultValue": "'Close dialog'",
67
+ "description": "Accessible label for the close button."
68
+ },
62
69
  {
63
70
  "name": "animate",
64
71
  "type": "boolean",
@@ -69,6 +76,49 @@
69
76
  "true",
70
77
  "false"
71
78
  ]
79
+ },
80
+ {
81
+ "name": "size",
82
+ "type": "'sm' | 'md' | 'lg' | 'xl' | '2xl'",
83
+ "required": false,
84
+ "defaultValue": "md",
85
+ "description": "Panel max-width preset.",
86
+ "enum": [
87
+ "sm",
88
+ "md",
89
+ "lg",
90
+ "xl",
91
+ "2xl"
92
+ ],
93
+ "examples": [
94
+ "lg",
95
+ "2xl"
96
+ ]
97
+ },
98
+ {
99
+ "name": "header",
100
+ "type": "ReactNode",
101
+ "required": false,
102
+ "description": "Replaces the default header row — compose with DialogHeader/DialogTitle/DialogDescription (ids wire automatically)."
103
+ },
104
+ {
105
+ "name": "footer",
106
+ "type": "ReactNode",
107
+ "required": false,
108
+ "description": "Action row pinned under the body."
109
+ },
110
+ {
111
+ "name": "scrollable",
112
+ "type": "boolean",
113
+ "required": false,
114
+ "defaultValue": "false",
115
+ "description": "Caps the body height and scrolls inside the panel."
116
+ },
117
+ {
118
+ "name": "bodyClassName",
119
+ "type": "string",
120
+ "required": false,
121
+ "description": "Extra classes for the body wrapper."
72
122
  }
73
123
  ],
74
124
  "examples": [
@@ -107,7 +157,9 @@
107
157
  ],
108
158
  "relatedComponents": [
109
159
  "Button",
110
- "Toast"
160
+ "Toast",
161
+ "Drawer",
162
+ "Confirmation"
111
163
  ],
112
164
  "package": "@slipstream-ui/core",
113
165
  "importPath": "@slipstream-ui/core",
@@ -41,12 +41,26 @@
41
41
  },
42
42
  {
43
43
  "name": "size",
44
- "type": "'sm' | 'md' | 'lg'",
44
+ "type": "'sm' | 'md' | 'lg' | 'xl' | '2xl'",
45
45
  "defaultValue": "md",
46
46
  "required": false,
47
- "description": "Extent along the side axis (width for left/right, height for top/bottom).",
48
- "enum": ["sm", "md", "lg"],
49
- "examples": ["lg"]
47
+ "description": "Preset extent along the side axis (width for left/right, height for top/bottom).",
48
+ "enum": ["sm", "md", "lg", "xl", "2xl"],
49
+ "examples": ["lg", "xl"]
50
+ },
51
+ {
52
+ "name": "width",
53
+ "type": "number | string",
54
+ "required": false,
55
+ "description": "Custom extent for left/right drawers: pixels (480) or any CSS length (\"70vw\"). Overrides size.",
56
+ "examples": [480, "70vw"]
57
+ },
58
+ {
59
+ "name": "height",
60
+ "type": "number | string",
61
+ "required": false,
62
+ "description": "Custom extent for top/bottom drawers: pixels (320) or any CSS length (\"60vh\"). Overrides size.",
63
+ "examples": [320, "60vh"]
50
64
  },
51
65
  {
52
66
  "name": "closeOnBackdrop",
@@ -64,6 +78,13 @@
64
78
  "description": "Hide the header ✕ button (Escape and backdrop still close).",
65
79
  "examples": ["false"]
66
80
  },
81
+ {
82
+ "name": "closeLabel",
83
+ "type": "string",
84
+ "required": false,
85
+ "defaultValue": "'Close drawer'",
86
+ "description": "Accessible label for the close button."
87
+ },
67
88
  {
68
89
  "name": "initialFocusRef",
69
90
  "type": "RefObject<HTMLElement | null>",
@@ -0,0 +1,108 @@
1
+ {
2
+ "id": "empty-state",
3
+ "name": "EmptyState",
4
+ "tier": "molecule",
5
+ "description": "Placeholder for empty collections, zero-result searches and unconfigured features, with title, description and action slots.",
6
+ "designIntent": "Empty states are where users decide what to do next. A consistent icon/title/description/action hierarchy beats ad-hoc 'No data' strings, and a stable structure is easier for screen readers and tests.",
7
+ "props": [
8
+ {
9
+ "name": "title",
10
+ "type": "string",
11
+ "required": true,
12
+ "description": "Primary message.",
13
+ "examples": [
14
+ "No classes yet"
15
+ ]
16
+ },
17
+ {
18
+ "name": "description",
19
+ "type": "string",
20
+ "required": false,
21
+ "description": "Supporting line explaining the next step."
22
+ },
23
+ {
24
+ "name": "icon",
25
+ "type": "ReactNode",
26
+ "required": false,
27
+ "description": "Decorative icon/illustration above the title."
28
+ },
29
+ {
30
+ "name": "action",
31
+ "type": "ReactNode",
32
+ "required": false,
33
+ "description": "Primary action (Button or link)."
34
+ },
35
+ {
36
+ "name": "secondaryAction",
37
+ "type": "ReactNode",
38
+ "required": false,
39
+ "description": "Secondary action beside the primary one."
40
+ },
41
+ {
42
+ "name": "size",
43
+ "type": "'sm' | 'md'",
44
+ "required": false,
45
+ "defaultValue": "md",
46
+ "description": "Compact padding for panels/table bodies.",
47
+ "enum": [
48
+ "sm",
49
+ "md"
50
+ ]
51
+ }
52
+ ],
53
+ "examples": [
54
+ {
55
+ "title": "Empty collection",
56
+ "code": "<EmptyState\n title=\"No classes yet\"\n description=\"Create your first class to get started.\"\n action={<Button>New class</Button>}\n/>",
57
+ "description": "Title, explanation and one primary action."
58
+ }
59
+ ],
60
+ "antiPatterns": [
61
+ {
62
+ "title": "Don't use it for errors",
63
+ "explanation": "Empty is a normal state; failures need Alert/ErrorAlert with retry affordances.",
64
+ "example": "// Avoid\n<EmptyState title=\"Failed to load\" />\n\n// Prefer\n<Alert variant=\"destructive\">Failed to load. <Button>Retry</Button></Alert>"
65
+ }
66
+ ],
67
+ "accessibility": [
68
+ {
69
+ "feature": "Action targets",
70
+ "implementation": "Actions are whatever you pass — use Button/link components so they stay focusable and announced",
71
+ "userRequirements": "Always provide a real control, not a bare sentence"
72
+ }
73
+ ],
74
+ "contentGuidelines": [
75
+ {
76
+ "contentType": "Copy",
77
+ "guidelines": [
78
+ "Say what is missing",
79
+ "Say what to do next",
80
+ "Avoid blaming the user"
81
+ ],
82
+ "goodExamples": [
83
+ "No classes yet — create your first class"
84
+ ],
85
+ "badExamples": [
86
+ "Empty",
87
+ "Nothing here"
88
+ ]
89
+ }
90
+ ],
91
+ "compositionRules": [
92
+ {
93
+ "component": "Card",
94
+ "relationship": "Often rendered inside a Card body or a DataTable empty slot",
95
+ "example": "<Card><CardContent><EmptyState … /></CardContent></Card>"
96
+ }
97
+ ],
98
+ "relatedComponents": [
99
+ "Alert",
100
+ "Card",
101
+ "DataTable"
102
+ ],
103
+ "package": "@slipstream-ui/core",
104
+ "importPath": "@slipstream-ui/core",
105
+ "version": "0.1.0",
106
+ "sourceDir": "empty-state",
107
+ "exportName": "EmptyState"
108
+ }
@@ -0,0 +1,103 @@
1
+ {
2
+ "id": "file-upload",
3
+ "name": "FileUpload",
4
+ "tier": "organism",
5
+ "description": "Drag-and-drop file picker with a removable file list and per-file progress bars.",
6
+ "designIntent": "File inputs are hard to style and easy to make inaccessible. FileUpload keeps the native input as the real control, adds a drop zone as an enhancement, and exposes plain File objects so the transport and progress stay yours.",
7
+ "props": [
8
+ {
9
+ "name": "files",
10
+ "type": "File[]",
11
+ "required": false,
12
+ "description": "Controlled selection."
13
+ },
14
+ {
15
+ "name": "defaultFiles",
16
+ "type": "File[]",
17
+ "required": false,
18
+ "description": "Initial selection when uncontrolled."
19
+ },
20
+ {
21
+ "name": "onFilesChange",
22
+ "type": "(files: File[]) => void",
23
+ "required": false,
24
+ "description": "Fired on add, drop, remove."
25
+ },
26
+ {
27
+ "name": "label",
28
+ "type": "string",
29
+ "required": false,
30
+ "defaultValue": "Drop files here or click to browse",
31
+ "description": "Drop-zone copy."
32
+ },
33
+ {
34
+ "name": "hint",
35
+ "type": "string",
36
+ "required": false,
37
+ "description": "Helper line under the drop zone."
38
+ },
39
+ {
40
+ "name": "progress",
41
+ "type": "Record<string, number>",
42
+ "required": false,
43
+ "description": "Per-file progress 0-100 keyed by file name; renders progress bars."
44
+ }
45
+ ],
46
+ "examples": [
47
+ {
48
+ "title": "Attachments with progress",
49
+ "code": "<FileUpload\n aria-label=\"Attachments\"\n accept=\".pdf,.csv\"\n progress={{ 'report.pdf': 42 }}\n onFilesChange={setFiles}\n/>",
50
+ "description": "Native input + drop zone + progress."
51
+ }
52
+ ],
53
+ "antiPatterns": [
54
+ {
55
+ "title": "Don't hide the input from the a11y tree",
56
+ "explanation": "The label targets the real input, keeping keyboard and mobile file dialogs working.",
57
+ "example": "// Avoid: tabIndex={-1} display:none input\n// Prefer: <FileUpload /> (input is sr-only but focusable)"
58
+ }
59
+ ],
60
+ "accessibility": [
61
+ {
62
+ "feature": "Native control",
63
+ "implementation": "Visible label targets a real (sr-only) file input",
64
+ "userRequirements": "Provide aria-label or wrap in FormField"
65
+ },
66
+ {
67
+ "feature": "Progress",
68
+ "implementation": "Each uploading file exposes role=progressbar with a name",
69
+ "userRequirements": "Keep progress keyed by file name"
70
+ }
71
+ ],
72
+ "contentGuidelines": [
73
+ {
74
+ "contentType": "Hints",
75
+ "guidelines": [
76
+ "State accepted types and size limits"
77
+ ],
78
+ "goodExamples": [
79
+ "PDF or CSV, up to 10 MB"
80
+ ],
81
+ "badExamples": [
82
+ "Upload"
83
+ ]
84
+ }
85
+ ],
86
+ "compositionRules": [
87
+ {
88
+ "component": "FormField",
89
+ "relationship": "Wrap for label/error wiring",
90
+ "example": "<FormField id=\"files\" label=\"Attachments\"><FileUpload /></FormField>"
91
+ }
92
+ ],
93
+ "relatedComponents": [
94
+ "Attachment",
95
+ "FormField",
96
+ "Progress"
97
+ ],
98
+ "package": "@slipstream-ui/core",
99
+ "importPath": "@slipstream-ui/core",
100
+ "version": "0.1.0",
101
+ "sourceDir": "file-upload",
102
+ "exportName": "FileUpload"
103
+ }