banhaten 0.1.1 → 0.1.3

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 (258) hide show
  1. package/README.md +86 -309
  2. package/banhaten.config.example.json +1 -1
  3. package/docs/design-system/README.md +11 -0
  4. package/docs/design-system/appearance-presets.md +184 -0
  5. package/docs/design-system/appearances/default.md +94 -0
  6. package/docs/design-system/appearances/rounded.md +95 -0
  7. package/docs/design-system/appearances/sharp.md +95 -0
  8. package/docs/design-system/component-showcase-consistency-report.md +217 -0
  9. package/docs/design-system/component-token-consistency-audit.md +163 -0
  10. package/docs/design-system/components/README.md +74 -0
  11. package/docs/design-system/components/accordion.md +51 -0
  12. package/docs/design-system/components/activity-feed.md +92 -0
  13. package/docs/design-system/components/alert-dialog.md +70 -0
  14. package/docs/design-system/components/alert.md +79 -0
  15. package/docs/design-system/components/aspect-ratio.md +44 -0
  16. package/docs/design-system/components/attribute.md +87 -0
  17. package/docs/design-system/components/autocomplete.md +74 -0
  18. package/docs/design-system/components/avatar.md +52 -0
  19. package/docs/design-system/components/badge.md +53 -0
  20. package/docs/design-system/components/banner.md +85 -0
  21. package/docs/design-system/components/breadcrumbs.md +174 -0
  22. package/docs/design-system/components/button-group.md +83 -0
  23. package/docs/design-system/components/button.md +77 -0
  24. package/docs/design-system/components/card.md +78 -0
  25. package/docs/design-system/components/carousel.md +44 -0
  26. package/docs/design-system/components/catalog-components.md +45 -0
  27. package/docs/design-system/components/chart.md +43 -0
  28. package/docs/design-system/components/checkbox.md +52 -0
  29. package/docs/design-system/components/collapsible.md +48 -0
  30. package/docs/design-system/components/command-bar.md +57 -0
  31. package/docs/design-system/components/command.md +60 -0
  32. package/docs/design-system/components/context-menu.md +44 -0
  33. package/docs/design-system/components/date-picker.md +77 -0
  34. package/docs/design-system/components/divider.md +101 -0
  35. package/docs/design-system/components/empty-state.md +55 -0
  36. package/docs/design-system/components/field.md +69 -0
  37. package/docs/design-system/components/file-upload.md +185 -0
  38. package/docs/design-system/components/hover-card.md +46 -0
  39. package/docs/design-system/components/icons.md +48 -0
  40. package/docs/design-system/components/input-group.md +56 -0
  41. package/docs/design-system/components/input-otp.md +55 -0
  42. package/docs/design-system/components/input.md +48 -0
  43. package/docs/design-system/components/kbd.md +44 -0
  44. package/docs/design-system/components/label.md +48 -0
  45. package/docs/design-system/components/menu.md +59 -0
  46. package/docs/design-system/components/menubar.md +45 -0
  47. package/docs/design-system/components/modal.md +98 -0
  48. package/docs/design-system/components/native-select.md +52 -0
  49. package/docs/design-system/components/navigation-menu.md +48 -0
  50. package/docs/design-system/components/onboarding-step-list-item.md +80 -0
  51. package/docs/design-system/components/page-header.md +84 -0
  52. package/docs/design-system/components/pagination.md +49 -0
  53. package/docs/design-system/components/popover.md +58 -0
  54. package/docs/design-system/components/progress-slider.md +48 -0
  55. package/docs/design-system/components/progress.md +75 -0
  56. package/docs/design-system/components/radio-card.md +49 -0
  57. package/docs/design-system/components/radio-group.md +55 -0
  58. package/docs/design-system/components/resizable.md +42 -0
  59. package/docs/design-system/components/scroll-area.md +45 -0
  60. package/docs/design-system/components/select.md +50 -0
  61. package/docs/design-system/components/sheet.md +65 -0
  62. package/docs/design-system/components/sidebar.md +68 -0
  63. package/docs/design-system/components/skeleton.md +73 -0
  64. package/docs/design-system/components/slideout.md +63 -0
  65. package/docs/design-system/components/slider.md +61 -0
  66. package/docs/design-system/components/social-button.md +47 -0
  67. package/docs/design-system/components/spinner.md +61 -0
  68. package/docs/design-system/components/steps.md +63 -0
  69. package/docs/design-system/components/table.md +397 -0
  70. package/docs/design-system/components/tabs.md +52 -0
  71. package/docs/design-system/components/tag.md +78 -0
  72. package/docs/design-system/components/textarea.md +48 -0
  73. package/docs/design-system/components/timeline.md +81 -0
  74. package/docs/design-system/components/toast.md +56 -0
  75. package/docs/design-system/components/toggle.md +79 -0
  76. package/docs/design-system/components/toolbar.md +85 -0
  77. package/docs/design-system/components/tooltip.md +90 -0
  78. package/docs/design-system/components/typography.md +18 -0
  79. package/docs/design-system/design-system-test-missing-items.md +368 -0
  80. package/docs/design-system/icons.md +69 -0
  81. package/docs/design-system/registry-and-cli.md +41 -0
  82. package/docs/design-system/tabs.md +53 -0
  83. package/docs/design-system/token-governance.md +38 -0
  84. package/package.json +83 -59
  85. package/registry/components/alert-dialog.tsx +297 -0
  86. package/registry/components/aspect-ratio.tsx +30 -0
  87. package/registry/components/autocomplete.tsx +637 -0
  88. package/registry/components/avatar.tsx +258 -22
  89. package/registry/components/badge.tsx +97 -35
  90. package/registry/components/carousel.tsx +234 -0
  91. package/registry/components/chart.tsx +170 -0
  92. package/registry/components/collapsible.tsx +69 -0
  93. package/registry/components/command.tsx +174 -0
  94. package/registry/components/context-menu.tsx +236 -0
  95. package/registry/components/date-picker-state.ts +253 -0
  96. package/registry/components/date-picker.tsx +116 -159
  97. package/registry/components/expanded/EmptyState.tsx +155 -0
  98. package/registry/components/expanded/PageHeader.tsx +1 -1
  99. package/registry/components/expanded/breadcrumbs.css +139 -139
  100. package/registry/components/expanded/catalogComponentsShowcase.css +83 -83
  101. package/registry/components/expanded/emptyState.css +111 -0
  102. package/registry/components/expanded/slideout.css +1 -0
  103. package/registry/components/expanded/steps.css +274 -274
  104. package/registry/components/expanded/table.css +1 -0
  105. package/registry/components/expanded/timeline.css +264 -264
  106. package/registry/components/field.tsx +230 -0
  107. package/registry/components/hover-card.tsx +48 -0
  108. package/registry/components/input-group.tsx +130 -0
  109. package/registry/components/input-otp.tsx +574 -0
  110. package/registry/components/input.tsx +22 -12
  111. package/registry/components/kbd.tsx +44 -0
  112. package/registry/components/label.tsx +78 -0
  113. package/registry/components/menu.tsx +373 -8
  114. package/registry/components/menubar.tsx +226 -0
  115. package/registry/components/modal.tsx +109 -76
  116. package/registry/components/native-select.tsx +205 -0
  117. package/registry/components/navigation-menu.tsx +171 -0
  118. package/registry/components/popover.tsx +840 -0
  119. package/registry/components/radio-group.tsx +1 -1
  120. package/registry/components/resizable.tsx +74 -0
  121. package/registry/components/scroll-area.tsx +67 -0
  122. package/registry/components/select.tsx +6 -4
  123. package/registry/components/sheet.tsx +305 -0
  124. package/registry/components/sidebar.tsx +352 -0
  125. package/registry/components/skeleton.css +57 -0
  126. package/registry/components/skeleton.tsx +482 -0
  127. package/registry/components/social-button.tsx +74 -10
  128. package/registry/components/spinner.tsx +79 -11
  129. package/registry/components/{expanded/tabs.css → tabs.css} +127 -106
  130. package/registry/components/tabs.tsx +242 -0
  131. package/registry/components/textarea.tsx +2 -2
  132. package/registry/components/toast.tsx +131 -0
  133. package/registry/components/tooltip.tsx +4 -0
  134. package/registry/examples/alert-dialog-demo.tsx +42 -0
  135. package/registry/examples/aspect-ratio-demo.tsx +11 -0
  136. package/registry/examples/autocomplete-demo.tsx +109 -0
  137. package/registry/examples/avatar-demo.tsx +102 -47
  138. package/registry/examples/badge-demo.tsx +16 -0
  139. package/registry/examples/carousel-demo.tsx +25 -0
  140. package/registry/examples/chart-demo.tsx +33 -0
  141. package/registry/examples/collapsible-demo.tsx +16 -0
  142. package/registry/examples/command-demo.tsx +42 -0
  143. package/registry/examples/context-menu-demo.tsx +29 -0
  144. package/registry/examples/expanded/command-bar-demo.tsx +236 -0
  145. package/registry/examples/expanded/empty-state-demo.tsx +39 -0
  146. package/registry/examples/expanded/tabs-demo.tsx +1 -1
  147. package/registry/examples/field-demo.tsx +51 -0
  148. package/registry/examples/hover-card-demo.tsx +23 -0
  149. package/registry/examples/input-demo.tsx +1 -1
  150. package/registry/examples/input-group-demo.tsx +16 -0
  151. package/registry/examples/input-otp-demo.tsx +72 -0
  152. package/registry/examples/kbd-demo.tsx +11 -0
  153. package/registry/examples/label-demo.tsx +20 -0
  154. package/registry/examples/menu-demo.tsx +101 -88
  155. package/registry/examples/menubar-demo.tsx +34 -0
  156. package/registry/examples/native-select-demo.tsx +16 -0
  157. package/registry/examples/navigation-menu-demo.tsx +29 -0
  158. package/registry/examples/popover-demo.tsx +546 -0
  159. package/registry/examples/resizable-demo.tsx +22 -0
  160. package/registry/examples/scroll-area-demo.tsx +15 -0
  161. package/registry/examples/select-demo.tsx +1 -1
  162. package/registry/examples/sheet-demo.tsx +47 -0
  163. package/registry/examples/sidebar-demo.tsx +55 -0
  164. package/registry/examples/skeleton-demo.tsx +56 -0
  165. package/registry/examples/spinner-demo.tsx +23 -1
  166. package/registry/examples/tabs-demo.tsx +13 -0
  167. package/registry/examples/textarea-demo.tsx +1 -1
  168. package/registry/examples/toast-demo.tsx +35 -0
  169. package/registry/index.json +895 -19
  170. package/registry/styles/globals.css +4733 -4602
  171. package/registry.json +1612 -0
  172. package/schema/config.schema.json +48 -0
  173. package/schema/registry.schema.json +85 -0
  174. package/schema/tokens.schema.json +63 -0
  175. package/src/cli/index.js +1413 -184
  176. package/tokens/banhaten.tokens.json +1 -1
  177. package/registry/assets/avatars/avatar-02.jpg +0 -0
  178. package/registry/assets/avatars/avatar-03.jpg +0 -0
  179. package/registry/assets/avatars/avatar-04.jpg +0 -0
  180. package/registry/assets/avatars/avatar-05.jpg +0 -0
  181. package/registry/assets/avatars/avatar-06.jpg +0 -0
  182. package/registry/assets/avatars/avatar-07.jpg +0 -0
  183. package/registry/assets/avatars/avatar-08.jpg +0 -0
  184. package/registry/assets/avatars/avatar-09.jpg +0 -0
  185. package/registry/assets/avatars/avatar-10.jpg +0 -0
  186. package/registry/assets/avatars/avatar-11.jpg +0 -0
  187. package/registry/assets/avatars/avatar-12.jpg +0 -0
  188. package/registry/assets/avatars/avatar-13.jpg +0 -0
  189. package/registry/assets/avatars/avatar-14.jpg +0 -0
  190. package/registry/assets/avatars/avatar-15.jpg +0 -0
  191. package/registry/assets/avatars/avatar-16.jpg +0 -0
  192. package/registry/assets/avatars/avatar-17.jpg +0 -0
  193. package/registry/assets/avatars/avatar-18.jpg +0 -0
  194. package/registry/assets/avatars/avatar-19.jpg +0 -0
  195. package/registry/assets/avatars/avatar-20.jpg +0 -0
  196. package/registry/assets/avatars/avatar-21.jpg +0 -0
  197. package/registry/assets/avatars/avatar-22.jpg +0 -0
  198. package/registry/assets/avatars/avatar-23.jpg +0 -0
  199. package/registry/assets/avatars/avatar-24.jpg +0 -0
  200. package/registry/assets/avatars/avatar-25.jpg +0 -0
  201. package/registry/assets/avatars/avatar-26.jpg +0 -0
  202. package/registry/assets/avatars/avatar-27.jpg +0 -0
  203. package/registry/assets/avatars/avatar-28.jpg +0 -0
  204. package/registry/assets/avatars/avatar-29.jpg +0 -0
  205. package/registry/assets/avatars/avatar-30.jpg +0 -0
  206. package/registry/assets/avatars/avatar-31.jpg +0 -0
  207. package/registry/assets/avatars/avatar-32.jpg +0 -0
  208. package/registry/assets/avatars/avatar-33.jpg +0 -0
  209. package/registry/assets/avatars/avatar-34.jpg +0 -0
  210. package/registry/assets/avatars/avatar-35.jpg +0 -0
  211. package/registry/assets/image-assets.json +0 -744
  212. package/registry/assets/images/art-02.jpg +0 -0
  213. package/registry/assets/images/art-03.jpg +0 -0
  214. package/registry/assets/images/art-04.jpg +0 -0
  215. package/registry/assets/images/art-05.jpg +0 -0
  216. package/registry/assets/images/art-06.jpg +0 -0
  217. package/registry/assets/images/art-07.jpg +0 -0
  218. package/registry/assets/images/art-08.jpg +0 -0
  219. package/registry/assets/images/art-09.jpg +0 -0
  220. package/registry/assets/images/art-10.jpg +0 -0
  221. package/registry/assets/images/art-11.jpg +0 -0
  222. package/registry/assets/images/art-12.jpg +0 -0
  223. package/registry/assets/images/art-13.jpg +0 -0
  224. package/registry/assets/images/art-14.jpg +0 -0
  225. package/registry/assets/images/art-15.jpg +0 -0
  226. package/registry/assets/images/art-16.jpg +0 -0
  227. package/registry/assets/images/art-17.jpg +0 -0
  228. package/registry/assets/images/art-18.jpg +0 -0
  229. package/registry/assets/images/art-19.jpg +0 -0
  230. package/registry/assets/images/art-20.jpg +0 -0
  231. package/registry/assets/images/art-21.jpg +0 -0
  232. package/registry/assets/images/art-22.jpg +0 -0
  233. package/registry/assets/images/art-23.jpg +0 -0
  234. package/registry/assets/images/art-24.jpg +0 -0
  235. package/registry/assets/images/art-25.jpg +0 -0
  236. package/registry/assets/images/art-26.jpg +0 -0
  237. package/registry/assets/images/art-27.jpg +0 -0
  238. package/registry/assets/images/nature-01.jpg +0 -0
  239. package/registry/assets/images/nature-02.jpg +0 -0
  240. package/registry/assets/images/nature-03.jpg +0 -0
  241. package/registry/assets/images/nature-04.jpg +0 -0
  242. package/registry/assets/images/nature-05.jpg +0 -0
  243. package/registry/assets/images/nature-06.jpg +0 -0
  244. package/registry/assets/images/nature-07.jpg +0 -0
  245. package/registry/assets/images/nature-08.jpg +0 -0
  246. package/registry/assets/images/nature-09.jpg +0 -0
  247. package/registry/assets/images/nature-10.jpg +0 -0
  248. package/registry/assets/images/nature-11.jpg +0 -0
  249. package/registry/assets/images/nature-12.jpg +0 -0
  250. package/registry/assets/images/nature-13.jpg +0 -0
  251. package/registry/assets/images/nature-14.jpg +0 -0
  252. package/registry/assets/images/nature-15.jpg +0 -0
  253. package/registry/assets/images/nature-16.jpg +0 -0
  254. package/registry/assets/images/nature-17.jpg +0 -0
  255. package/registry/assets/images/nature-18.jpg +0 -0
  256. package/registry/assets/images/nature-19.jpg +0 -0
  257. package/registry/assets/images/nature-20.jpg +0 -0
  258. package/registry/components/expanded/Tabs.tsx +0 -86
@@ -0,0 +1,55 @@
1
+ # Radio Group
2
+
3
+ Radio Group is the native-input single-choice primitive. It includes `Radio`, `RadioField`, `RadioGroup`, and `RadioGroupItem` for grouped labels, descriptions, errors, disabled state, controlled or uncontrolled values, and horizontal or vertical layout.
4
+
5
+ ## API
6
+
7
+ ```tsx
8
+ <RadioGroup
9
+ label="Billing interval"
10
+ defaultValue="monthly"
11
+ orientation="vertical"
12
+ >
13
+ <RadioGroupItem value="monthly" label="Monthly" />
14
+ <RadioGroupItem value="annual" label="Annual" />
15
+ </RadioGroup>
16
+ ```
17
+
18
+ | Prop | Values |
19
+ | --- | --- |
20
+ | `value`, `defaultValue` | controlled or uncontrolled value |
21
+ | `orientation` | `vertical`, `horizontal` |
22
+ | `state` | `default`, `error`, `disabled` |
23
+ | `label`, `description`, `errorMessage` | `ReactNode` |
24
+ | `controlPosition` | `start`, `end` on field/item rows |
25
+
26
+ ## Token Contract
27
+
28
+ Radio Group uses Banhaten radio control, field gap, group spacing, text, helper, error, disabled, border, and focus tokens.
29
+
30
+ ## RTL
31
+
32
+ `RadioField` and `RadioGroupItem` use logical start/end control placement. Labels, descriptions, and error text use `dir="auto"` and tokenized typography.
33
+
34
+ ## Accessibility
35
+
36
+ The group uses `fieldset`, shared native radio names, label wrapping, and platform keyboard behavior. Provide visible error text when the group is invalid.
37
+
38
+ ## Install
39
+
40
+ ```bash
41
+ npx banhaten add radio-group
42
+ ```
43
+
44
+ ## Examples
45
+
46
+ Primary registry example: `examples/radio-group-demo.tsx`.
47
+
48
+ Open the live component page or run `npx banhaten docs radio-group` to inspect source files, install command, and examples.
49
+
50
+ ## RTL Rules
51
+
52
+ - `inheritsDirection`: true
53
+ - `controlPlacement`: RadioField and RadioGroupItem use start/end control placement so the radio mirrors correctly in RTL.
54
+ - `textDirection`: Group labels, item labels, descriptions, and error text use dir="auto" with tokenized body typography.
55
+ - `semantics`: Uses native radio inputs with a shared group name, fieldset grouping, and label wrapping for platform keyboard and form behavior.
@@ -0,0 +1,42 @@
1
+ # Resizable
2
+
3
+ Resizable wraps `react-resizable-panels` for split panes and workbench layouts.
4
+
5
+ ## API
6
+
7
+ ```tsx
8
+ <ResizablePanelGroup direction="horizontal">
9
+ <ResizablePanel defaultSize={30}>Sidebar</ResizablePanel>
10
+ <ResizableHandle withHandle />
11
+ <ResizablePanel defaultSize={70}>Content</ResizablePanel>
12
+ </ResizablePanelGroup>
13
+ ```
14
+
15
+ ## Token Contract
16
+
17
+ Resizable uses Banhaten border, focus, raised surface, radius, and icon sizing tokens.
18
+
19
+ ## RTL
20
+
21
+ Panel order follows DOM order. Use logical layout around the panel group for RTL shells.
22
+
23
+ ## Accessibility
24
+
25
+ `react-resizable-panels` provides keyboard-adjustable resize handles.
26
+
27
+ ## Install
28
+
29
+ ```bash
30
+ npx banhaten add resizable
31
+ ```
32
+
33
+ ## Examples
34
+
35
+ Primary registry example: `examples/resizable-demo.tsx`.
36
+
37
+ Open the live component page or run `npx banhaten docs resizable` to inspect source files, install command, and examples.
38
+
39
+ ## RTL Rules
40
+
41
+ - `inheritsDirection`: true
42
+ - `layout`: Panel order follows DOM order; use logical shell layout for RTL workspaces.
@@ -0,0 +1,45 @@
1
+ # Scroll Area
2
+
3
+ Scroll Area wraps Radix ScrollArea with tokenized viewport, scrollbar, thumb, and corner styling.
4
+
5
+ ## API
6
+
7
+ ```tsx
8
+ <ScrollArea className="h-48">
9
+ <div>Scrollable content</div>
10
+ </ScrollArea>
11
+ ```
12
+
13
+ | Part | Purpose |
14
+ | --- | --- |
15
+ | `ScrollArea` | root and viewport |
16
+ | `ScrollBar` | vertical or horizontal scrollbar |
17
+
18
+ ## Token Contract
19
+
20
+ Scroll Area uses Banhaten radius, border, and neutral thumb tokens.
21
+
22
+ ## RTL
23
+
24
+ Scroll Area inherits direction from its parent. Use logical padding inside the viewport content.
25
+
26
+ ## Accessibility
27
+
28
+ Use Scroll Area for visual scrollbars around already accessible content, not for hiding essential controls.
29
+
30
+ ## Install
31
+
32
+ ```bash
33
+ npx banhaten add scroll-area
34
+ ```
35
+
36
+ ## Examples
37
+
38
+ Primary registry example: `examples/scroll-area-demo.tsx`.
39
+
40
+ Open the live component page or run `npx banhaten docs scroll-area` to inspect source files, install command, and examples.
41
+
42
+ ## RTL Rules
43
+
44
+ - `inheritsDirection`: true
45
+ - `spacing`: Viewport content should use logical padding so scrollable regions mirror with document direction.
@@ -0,0 +1,50 @@
1
+ # Select
2
+
3
+ Select is a Radix Select-backed field and menu system. It supports default and soft trigger styles, md/lg sizing, error, filled and disabled states, menu surfaces, checkbox or check selection, and item media for text, icons, avatars, companies, payment methods, and status dots.
4
+
5
+ ## API
6
+
7
+ ```tsx
8
+ <Select label="Country" placeholder="Choose country">
9
+ <SelectMenuItem value="eg">Egypt</SelectMenuItem>
10
+ <SelectMenuItem value="sa">Saudi Arabia</SelectMenuItem>
11
+ </Select>
12
+ ```
13
+
14
+ | Prop | Values |
15
+ | --- | --- |
16
+ | `variant` | `default`, `soft` |
17
+ | `size` | `lg`, `md` |
18
+ | `state` | `default`, `filled`, `error`, `disabled` |
19
+ | `itemType` | `default`, `icon`, `avatar`, `company`, `payment`, `dot` |
20
+ | `selectionType` | `default`, `checkbox` |
21
+
22
+ ## Token Contract
23
+
24
+ Select consumes Banhaten field, trigger, menu, item, checkbox, status, avatar, payment, typography, spacing, border, radius, shadow, and focus tokens.
25
+
26
+ ## RTL
27
+
28
+ Values, labels, helper text, and menu item text use `text-start` and `dir="auto"`. Trigger icons and selected checks use logical placement so they mirror in RTL.
29
+
30
+ ## Accessibility
31
+
32
+ Radix provides listbox semantics, focus management, typeahead, selection state, and keyboard behavior. Use visible helper or error text for validation states.
33
+
34
+ ## Install
35
+
36
+ ```bash
37
+ npx banhaten add select
38
+ ```
39
+
40
+ ## Examples
41
+
42
+ Primary registry example: `examples/select-demo.tsx`.
43
+
44
+ Open the live component page or run `npx banhaten docs select` to inspect source files, install command, and examples.
45
+
46
+ ## RTL Rules
47
+
48
+ - `inheritsDirection`: true
49
+ - `textAlignment`: Uses text-start and dir="auto" for values, labels, helper text, and menu item text.
50
+ - `spacing`: Uses logical padding, start/end positioning, and inherited flex direction so trigger icons and selected checks mirror in RTL.
@@ -0,0 +1,65 @@
1
+ # Sheet
2
+
3
+ Sheet is a Radix Dialog-based side or edge panel for contextual workflows that need more room than a popover but less interruption than a full modal. It supports logical `start` and `end` sides for RTL, plus top and bottom placements.
4
+
5
+ ## API
6
+
7
+ ```tsx
8
+ <Sheet>
9
+ <SheetTrigger asChild>
10
+ <Button>Open settings</Button>
11
+ </SheetTrigger>
12
+ <SheetContent side="end">
13
+ <SheetHeader>
14
+ <SheetTitle>Workspace settings</SheetTitle>
15
+ <SheetDescription>Update billing and access controls.</SheetDescription>
16
+ </SheetHeader>
17
+ <SheetBody>...</SheetBody>
18
+ <SheetFooter>...</SheetFooter>
19
+ </SheetContent>
20
+ </Sheet>
21
+ ```
22
+
23
+ | Part | Purpose |
24
+ | --- | --- |
25
+ | `Sheet`, `SheetTrigger`, `SheetClose`, `SheetPortal` | Radix Dialog shell |
26
+ | `SheetOverlay`, `SheetContent` | overlay and trapped panel |
27
+ | `SheetHeader`, `SheetTitle`, `SheetDescription` | accessible heading area |
28
+ | `SheetBody`, `SheetFooter` | scrollable content and actions |
29
+
30
+ | Prop | Values |
31
+ | --- | --- |
32
+ | `side` | `start`, `end`, `top`, `bottom` |
33
+ | `size` | `sm`, `default`, `lg` |
34
+ | `showCloseButton` | `boolean` |
35
+
36
+ ## Token Contract
37
+
38
+ Sheet uses Banhaten overlay, raised surface, border, radius, shadow, spacing, typography, focus, and content tokens.
39
+
40
+ ## RTL
41
+
42
+ Use `side="start"` and `side="end"` instead of physical left/right placement. CSS logical edges place the panel on the right edge in LTR for `end`, and on the left edge in RTL.
43
+
44
+ ## Accessibility
45
+
46
+ Radix Dialog provides focus trap, Escape dismissal, outside dismissal, title/description wiring, and modal dialog semantics. Use Alert Dialog for destructive confirmations.
47
+
48
+ ## Install
49
+
50
+ ```bash
51
+ npx banhaten add sheet
52
+ ```
53
+
54
+ ## Examples
55
+
56
+ Primary registry example: `examples/sheet-demo.tsx`.
57
+
58
+ Open the live component page or run `npx banhaten docs sheet` to inspect source files, install command, and examples.
59
+
60
+ ## RTL Rules
61
+
62
+ - `inheritsDirection`: true
63
+ - `placement`: Use side="start" and side="end" for logical placement; CSS start/end edges mirror under RTL.
64
+ - `textDirection`: Title and description use dir="auto" for Arabic and English copy.
65
+ - `semantics`: Radix Dialog handles modal semantics, focus trapping, and dismissal.
@@ -0,0 +1,68 @@
1
+ # Sidebar
2
+
3
+ Sidebar is a composable app navigation surface with collapse state, grouped menu items, logical start/end placement, and generated `--bh-sidebar-*` tokens.
4
+
5
+ ## API
6
+
7
+ ```tsx
8
+ <SidebarProvider>
9
+ <Sidebar>
10
+ <SidebarHeader>
11
+ Workspace
12
+ <SidebarToggle />
13
+ </SidebarHeader>
14
+ <SidebarBody>
15
+ <SidebarGroup>
16
+ <SidebarGroupLabel>Main</SidebarGroupLabel>
17
+ <SidebarMenu>
18
+ <SidebarMenuItem>
19
+ <SidebarMenuButton active>Overview</SidebarMenuButton>
20
+ </SidebarMenuItem>
21
+ </SidebarMenu>
22
+ </SidebarGroup>
23
+ </SidebarBody>
24
+ </Sidebar>
25
+ </SidebarProvider>
26
+ ```
27
+
28
+ | Part | Purpose |
29
+ | --- | --- |
30
+ | `SidebarProvider` | controlled or uncontrolled collapsed state |
31
+ | `Sidebar` | navigation surface |
32
+ | `SidebarHeader`, `SidebarBody`, `SidebarFooter` | layout regions |
33
+ | `SidebarGroup`, `SidebarGroupLabel` | grouped navigation |
34
+ | `SidebarMenu`, `SidebarMenuItem`, `SidebarMenuButton` | menu structure |
35
+ | `SidebarToggle`, `SidebarRail` | collapse controls |
36
+ | `SidebarTrigger` | shadcn-compatible alias for `SidebarToggle` |
37
+ | `SidebarInset` | main content wrapper for app-shell layouts |
38
+
39
+ ## Token Contract
40
+
41
+ Sidebar uses generated `--bh-sidebar-width`, `--bh-sidebar-width-collapsed`, `--bh-sidebar-item-height`, `--bh-sidebar-padding`, `--bh-sidebar-bg`, `--bh-sidebar-border`, and `--shadow-sidebar` tokens.
42
+
43
+ ## RTL
44
+
45
+ Use `dir="rtl"` on `SidebarProvider` and `side="start"` or `side="end"` for logical placement.
46
+
47
+ ## Accessibility
48
+
49
+ Use clear labels for collapsed icon-only menu buttons. `SidebarToggle` announces the pressed collapse state.
50
+ Sidebar composition parts must be rendered inside `SidebarProvider`.
51
+
52
+ ## Install
53
+
54
+ ```bash
55
+ npx banhaten add sidebar
56
+ ```
57
+
58
+ ## Examples
59
+
60
+ Primary registry example: `examples/sidebar-demo.tsx`.
61
+
62
+ Open the live component page or run `npx banhaten docs sidebar` to inspect source files, install command, and examples.
63
+
64
+ ## RTL Rules
65
+
66
+ - `inheritsDirection`: true
67
+ - `placement`: Use side="start" or side="end" with dir on SidebarProvider for logical placement.
68
+ - `spacing`: Menu item icon and label spacing uses flex gaps and logical text alignment.
@@ -0,0 +1,73 @@
1
+ # Skeleton
2
+
3
+ Skeleton is the token-built loading placeholder system for pending content. It includes a small primitive plus composed text, avatar, button, input, card, list, table, and form placeholders.
4
+
5
+ ## API
6
+
7
+ ```tsx
8
+ import {
9
+ Skeleton,
10
+ SkeletonCard,
11
+ SkeletonTable,
12
+ SkeletonText,
13
+ } from "@/components/ui/skeleton"
14
+
15
+ export function LoadingPanel() {
16
+ return (
17
+ <section aria-busy="true" aria-label="Loading project details">
18
+ <SkeletonCard />
19
+ <SkeletonTable rows={4} columns={4} />
20
+ </section>
21
+ )
22
+ }
23
+ ```
24
+
25
+ | Export | Purpose |
26
+ | --- | --- |
27
+ | `Skeleton` | Base block, text, or circle placeholder. |
28
+ | `SkeletonText` | Multi-line text placeholder with optional line widths. |
29
+ | `SkeletonAvatar` | Token-sized circular avatar placeholder. |
30
+ | `SkeletonButton` | Button-height placeholder for actions and icon buttons. |
31
+ | `SkeletonInput` | Label, control, and helper-text loading field. |
32
+ | `SkeletonCard` | Media, avatar/text, and action skeleton composition. |
33
+ | `SkeletonList` | Repeated row loading state for feeds, menus, and lists. |
34
+ | `SkeletonTable` | Header and row loading state for table surfaces. |
35
+ | `SkeletonForm` | Repeated input loading state with footer actions. |
36
+
37
+ ## Token Contract
38
+
39
+ Skeleton consumes Banhaten background, border, radius, spacing, button, card, opacity, and shadow tokens. Custom layout sizing should be passed through CSS variables or token classes rather than raw dimensions.
40
+
41
+ - Fill: `--bh-bg-muted`, `--bh-bg-subtle`, `--bh-bg-raised-subtle`, `--bh-bg-brand-subtle`
42
+ - Highlight: `--bh-bg-raised-subtle`, `--bh-bg-default`, `--bh-bg-brand-soft`
43
+ - Shape: `--bh-radius-md-6`, `--bh-radius-full`, `--bh-control-default`
44
+ - Layout: `--bh-space-*`, `--bh-button-*-height`, `--bh-card-desktop-content-padding`
45
+
46
+ ## RTL And Accessibility
47
+
48
+ - Skeleton compositions inherit `dir` from the nearest parent.
49
+ - The shimmer direction mirrors in RTL containers.
50
+ - Skeletons are decorative by default. Put `aria-busy="true"` and an accessible label or status message on the loading region when the loading state needs to be announced.
51
+
52
+ ## Install
53
+
54
+ ```bash
55
+ npx banhaten add skeleton
56
+ ```
57
+
58
+ ## Examples
59
+
60
+ Primary registry example: `examples/skeleton-demo.tsx`.
61
+
62
+ Open the live component page or run `npx banhaten docs skeleton` to inspect source files, install command, and examples.
63
+
64
+ ## RTL Rules
65
+
66
+ - `inheritsDirection`: true
67
+ - `motion`: The shimmer direction mirrors inside RTL containers while preserving logical layout.
68
+ - `composition`: Composed card, list, table, and form placeholders use logical gaps, inherited direction, and token-sized rows.
69
+ - `accessibility`: Skeletons are decorative by default; set aria-busy on the loading region and pair with a status label when loading progress needs to be announced.
70
+
71
+ ## Accessibility
72
+
73
+ Keep native semantics, accessible names, keyboard reachability, focus-visible treatment, and status/error announcements intact when composing this component.
@@ -0,0 +1,63 @@
1
+ # Slideout
2
+
3
+ `Slideout` renders a right- or left-aligned panel for focused secondary workflows. It supports desktop and mobile breakpoints, three desktop widths, optional header action, optional footer actions, and LTR/RTL direction.
4
+
5
+ Figma reference: `Slideout`, node `256:19065`.
6
+
7
+ ## Examples
8
+
9
+ The local implementation includes these Figma slot-content examples:
10
+
11
+ | Example | Figma node |
12
+ | --- | --- |
13
+ | Filters | `256:18779` |
14
+ | User profile activity | `256:18872` |
15
+ | Payment detail | `256:18901` |
16
+ | Payment detail 02 | `256:18964` |
17
+
18
+ ## API
19
+
20
+ ```tsx
21
+ <Slideout size="small" breakpoint="desktop" dir="ltr">
22
+ <SlideoutFiltersExample />
23
+ </Slideout>
24
+ ```
25
+
26
+ | Prop | Values | Default |
27
+ | --- | --- | --- |
28
+ | `size` | `small`, `medium`, `large` | `small` |
29
+ | `breakpoint` | `desktop`, `mobile` | `desktop` |
30
+ | `dir` | `ltr`, `rtl` | `ltr` |
31
+ | `title` | `string` | none |
32
+ | `headerAction` | `boolean` | `true` |
33
+ | `footer` | `boolean` | `true` |
34
+ | `secondaryAction` | `boolean` | `true` |
35
+
36
+ ## Layout
37
+
38
+ - Desktop outer sizes match the Figma matrix: small `356px`, medium `416px`, and large `516px`, each at `900px` height.
39
+ - Mobile uses `375px x 812px` and removes the desktop panel corner radius.
40
+ - Header and footer are fixed-height regions; the body owns vertical scrolling.
41
+ - Slot content is passed as children so product workflows can compose filters, activity, payment details, forms, or custom content without changing the panel API.
42
+
43
+ ## Accessibility
44
+
45
+ - The panel uses `role="dialog"` with the current title as its accessible label.
46
+ - Close and action controls are real buttons.
47
+ - Slot examples keep text content as real text and mirror layout through `dir="rtl"` rather than separate component APIs.
48
+
49
+ ## Install
50
+
51
+ ```bash
52
+ npx banhaten add slideout
53
+ ```
54
+
55
+ ## Token Contract
56
+
57
+ Component styles must resolve through Banhaten semantic tokens, component aliases, or documented exception-ledger values.
58
+ Do not add raw colors, pixel values, opacity utilities, z-index values, durations, or shadow literals directly to component source.
59
+ Covered source files: `components/expanded/slideout.css`, `components/expanded/Slideout.tsx`.
60
+
61
+ ## RTL Rules
62
+
63
+ This component has no special RTL contract beyond inherited document direction and logical spacing.
@@ -0,0 +1,61 @@
1
+ # Slider
2
+
3
+ Slider is an accessible value and range control built on Radix Slider. It matches the Figma single-node and double-node slider sets, including text and tooltip indicators above or below the thumb, RTL, tick marks, disabled state, vertical orientation, and the large pill treatment used by the investment savings background.
4
+
5
+ ## API
6
+
7
+ ```tsx
8
+ <Slider aria-label="Investment amount" defaultValue={[45]} />
9
+
10
+ <Slider
11
+ aria-label="Savings range"
12
+ ariaLabels={["Minimum savings", "Maximum savings"]}
13
+ defaultValue={[25, 72]}
14
+ indicator="lower-text"
15
+ minStepsBetweenThumbs={4}
16
+ />
17
+ ```
18
+
19
+ ## Variants
20
+
21
+ | Prop | Values |
22
+ | --- | --- |
23
+ | `variant` | `default`, `pill` |
24
+ | `size` | `sm`, `default`, `lg` |
25
+ | `tone` | `brand`, `neutral`, `success`, `warning`, `danger` |
26
+ | `indicator` | `none`, `lower-text`, `upper-text`, `lower-tooltip`, `upper-tooltip` |
27
+ | `orientation` | `horizontal`, `vertical` |
28
+
29
+ Use `showTicks` and `tickCount` for dotted track markers. Use `indicator` for Figma text/tooltip markers, `thumbLabel` or `thumbLabels` to customize marker text, `showThumbGrip` for pill controls, and `ariaValueText` for assistive value formatting.
30
+
31
+ ## Tokens
32
+
33
+ Slider consumes component aliases for track size, thumb size, pill height, tick geometry, thumb shadows, and semantic color roles. Tones map to semantic brand/status/accent tokens so color theme changes are inherited automatically.
34
+
35
+ ## Install
36
+
37
+ ```bash
38
+ npx banhaten add slider
39
+ ```
40
+
41
+ ## Examples
42
+
43
+ Primary registry example: `examples/slider-demo.tsx`.
44
+
45
+ Open the live component page or run `npx banhaten docs slider` to inspect source files, install command, and examples.
46
+
47
+ ## Token Contract
48
+
49
+ Component styles must resolve through Banhaten semantic tokens, component aliases, or documented exception-ledger values.
50
+ Do not add raw colors, pixel values, opacity utilities, z-index values, durations, or shadow literals directly to component source.
51
+ Covered source files: `components/slider.tsx`.
52
+
53
+ ## RTL Rules
54
+
55
+ - `inheritsDirection`: true
56
+ - `valueDirection`: Radix Slider handles direction and keyboard behavior through the inherited dir attribute.
57
+ - `spacing`: Uses logical thumb content spacing and tokenized track/thumb geometry.
58
+
59
+ ## Accessibility
60
+
61
+ This component relies on `@radix-ui/react-slider` for its base accessibility behavior. Keep required labels, titles, descriptions, and focusable trigger/content relationships intact when composing it.
@@ -0,0 +1,47 @@
1
+ # Social Button
2
+
3
+ Social Button is the sign-in action primitive for supported identity providers. It includes Figma-matched platform styling, solid and outlined variants, icon-only mode, native focus-visible styling, and RTL labels.
4
+
5
+ ## API
6
+
7
+ ```tsx
8
+ <SocialButton platform="google">Continue with Google</SocialButton>
9
+ <SocialButton platform="apple" variant="outline" size="icon" aria-label="Continue with Apple" />
10
+ ```
11
+
12
+ | Prop | Values |
13
+ | --- | --- |
14
+ | `platform` | `apple`, `facebook`, `google`, `linkedin`, `twitter`, `whatsapp` |
15
+ | `variant` | `solid`, `outline` |
16
+ | `size` | `default`, `icon` |
17
+ | `label` | localized label override |
18
+
19
+ ## Token Contract
20
+
21
+ Social Button uses Banhaten control, typography, radius, focus, spacing, and shadow tokens. Provider colors are the limited brand-color exception and should stay scoped to this component.
22
+
23
+ ## RTL
24
+
25
+ When direction is RTL, platform labels default to Arabic where provided. Icon and label spacing uses logical flex rhythm.
26
+
27
+ ## Accessibility
28
+
29
+ Icon-only social buttons must provide `aria-label`. Button text should name the provider and the action, such as `Continue with Google`.
30
+
31
+ ## Install
32
+
33
+ ```bash
34
+ npx banhaten add social-button
35
+ ```
36
+
37
+ ## Examples
38
+
39
+ Primary registry example: `examples/social-button-demo.tsx`.
40
+
41
+ Open the live component page or run `npx banhaten docs social-button` to inspect source files, install command, and examples.
42
+
43
+ ## RTL Rules
44
+
45
+ - `inheritsDirection`: true
46
+ - `labels`: Defaults to the Arabic platform label when the document direction is RTL, and accepts an explicit label for nested RTL surfaces.
47
+ - `spacing`: Uses logical label padding and flex gap so the icon/label order follows inherited direction.
@@ -0,0 +1,61 @@
1
+ # Spinner
2
+
3
+ Spinner is a compact loading indicator for buttons, inline feedback, status rows, and pending regions. `Spinner` is the simple steady loader, while `DynamicSpinner` uses the smoother variable-arc motion for moments that benefit from a more organic loading state.
4
+
5
+ ## Usage
6
+
7
+ ```tsx
8
+ import { DynamicSpinner, Spinner } from "@/components/ui/spinner"
9
+
10
+ export function LoadingLabel() {
11
+ return (
12
+ <span className="inline-flex items-center gap-2" role="status">
13
+ <Spinner />
14
+ Loading
15
+
16
+ <DynamicSpinner />
17
+ Syncing
18
+ </span>
19
+ )
20
+ }
21
+ ```
22
+
23
+ ## API
24
+
25
+ | Prop | Type | Default | Description |
26
+ | --- | --- | --- | --- |
27
+ | `className` | `string` | - | Sets color, layout, or other SVG classes. |
28
+ | `style` | `React.CSSProperties` | - | Override `--bh-spinner-size` when a local size is needed. |
29
+
30
+ ## Guidance
31
+
32
+ - Pair the decorative spinner with visible status text or a loading button label.
33
+ - Use `Spinner` for ordinary button and inline loading.
34
+ - Use `DynamicSpinner` when the loading state is prominent enough to benefit from variable arc motion.
35
+ - Keep sizing token-based by setting `--bh-spinner-size` rather than hardcoding SVG geometry.
36
+
37
+ ## Install
38
+
39
+ ```bash
40
+ npx banhaten add spinner
41
+ ```
42
+
43
+ ## Examples
44
+
45
+ Primary registry example: `examples/spinner-demo.tsx`.
46
+
47
+ Open the live component page or run `npx banhaten docs spinner` to inspect source files, install command, and examples.
48
+
49
+ ## Token Contract
50
+
51
+ Component styles must resolve through Banhaten semantic tokens, component aliases, or documented exception-ledger values.
52
+ Do not add raw colors, pixel values, opacity utilities, z-index values, durations, or shadow literals directly to component source.
53
+ Covered source files: `components/spinner.tsx`.
54
+
55
+ ## RTL Rules
56
+
57
+ This component has no special RTL contract beyond inherited document direction and logical spacing.
58
+
59
+ ## Accessibility
60
+
61
+ Keep native semantics, accessible names, keyboard reachability, focus-visible treatment, and status/error announcements intact when composing this component.