banhaten 0.1.2 → 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 (231) hide show
  1. package/README.md +93 -328
  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 -65
  85. package/registry/components/alert-dialog.tsx +297 -0
  86. package/registry/components/aspect-ratio.tsx +30 -0
  87. package/registry/components/carousel.tsx +234 -0
  88. package/registry/components/chart.tsx +170 -0
  89. package/registry/components/collapsible.tsx +69 -0
  90. package/registry/components/command.tsx +174 -0
  91. package/registry/components/context-menu.tsx +236 -0
  92. package/registry/components/date-picker.tsx +1 -1
  93. package/registry/components/expanded/PageHeader.tsx +1 -1
  94. package/registry/components/expanded/breadcrumbs.css +139 -139
  95. package/registry/components/expanded/catalogComponentsShowcase.css +83 -83
  96. package/registry/components/expanded/steps.css +274 -274
  97. package/registry/components/expanded/timeline.css +264 -264
  98. package/registry/components/field.tsx +230 -0
  99. package/registry/components/hover-card.tsx +48 -0
  100. package/registry/components/input-group.tsx +130 -0
  101. package/registry/components/input.tsx +2 -2
  102. package/registry/components/kbd.tsx +44 -0
  103. package/registry/components/label.tsx +78 -0
  104. package/registry/components/menu.tsx +3 -1
  105. package/registry/components/menubar.tsx +226 -0
  106. package/registry/components/modal.tsx +109 -76
  107. package/registry/components/native-select.tsx +205 -0
  108. package/registry/components/navigation-menu.tsx +171 -0
  109. package/registry/components/radio-group.tsx +1 -1
  110. package/registry/components/resizable.tsx +74 -0
  111. package/registry/components/scroll-area.tsx +67 -0
  112. package/registry/components/select.tsx +2 -4
  113. package/registry/components/sheet.tsx +305 -0
  114. package/registry/components/sidebar.tsx +352 -0
  115. package/registry/components/social-button.tsx +74 -10
  116. package/registry/components/{expanded/tabs.css → tabs.css} +127 -106
  117. package/registry/components/tabs.tsx +242 -0
  118. package/registry/components/textarea.tsx +1 -1
  119. package/registry/components/toast.tsx +131 -0
  120. package/registry/examples/alert-dialog-demo.tsx +42 -0
  121. package/registry/examples/aspect-ratio-demo.tsx +11 -0
  122. package/registry/examples/carousel-demo.tsx +25 -0
  123. package/registry/examples/chart-demo.tsx +33 -0
  124. package/registry/examples/collapsible-demo.tsx +16 -0
  125. package/registry/examples/command-demo.tsx +42 -0
  126. package/registry/examples/context-menu-demo.tsx +29 -0
  127. package/registry/examples/expanded/tabs-demo.tsx +1 -1
  128. package/registry/examples/field-demo.tsx +51 -0
  129. package/registry/examples/hover-card-demo.tsx +23 -0
  130. package/registry/examples/input-group-demo.tsx +16 -0
  131. package/registry/examples/kbd-demo.tsx +11 -0
  132. package/registry/examples/label-demo.tsx +20 -0
  133. package/registry/examples/menubar-demo.tsx +34 -0
  134. package/registry/examples/native-select-demo.tsx +16 -0
  135. package/registry/examples/navigation-menu-demo.tsx +29 -0
  136. package/registry/examples/resizable-demo.tsx +22 -0
  137. package/registry/examples/scroll-area-demo.tsx +15 -0
  138. package/registry/examples/sheet-demo.tsx +47 -0
  139. package/registry/examples/sidebar-demo.tsx +55 -0
  140. package/registry/examples/tabs-demo.tsx +13 -0
  141. package/registry/examples/toast-demo.tsx +35 -0
  142. package/registry/index.json +655 -11
  143. package/registry/styles/globals.css +4733 -4690
  144. package/registry.json +1612 -0
  145. package/schema/config.schema.json +48 -0
  146. package/schema/registry.schema.json +85 -0
  147. package/schema/tokens.schema.json +63 -0
  148. package/src/cli/index.js +312 -18
  149. package/tokens/banhaten.tokens.json +1 -1
  150. package/registry/assets/avatars/avatar-02.jpg +0 -0
  151. package/registry/assets/avatars/avatar-03.jpg +0 -0
  152. package/registry/assets/avatars/avatar-04.jpg +0 -0
  153. package/registry/assets/avatars/avatar-05.jpg +0 -0
  154. package/registry/assets/avatars/avatar-06.jpg +0 -0
  155. package/registry/assets/avatars/avatar-07.jpg +0 -0
  156. package/registry/assets/avatars/avatar-08.jpg +0 -0
  157. package/registry/assets/avatars/avatar-09.jpg +0 -0
  158. package/registry/assets/avatars/avatar-10.jpg +0 -0
  159. package/registry/assets/avatars/avatar-11.jpg +0 -0
  160. package/registry/assets/avatars/avatar-12.jpg +0 -0
  161. package/registry/assets/avatars/avatar-13.jpg +0 -0
  162. package/registry/assets/avatars/avatar-14.jpg +0 -0
  163. package/registry/assets/avatars/avatar-15.jpg +0 -0
  164. package/registry/assets/avatars/avatar-16.jpg +0 -0
  165. package/registry/assets/avatars/avatar-17.jpg +0 -0
  166. package/registry/assets/avatars/avatar-18.jpg +0 -0
  167. package/registry/assets/avatars/avatar-19.jpg +0 -0
  168. package/registry/assets/avatars/avatar-20.jpg +0 -0
  169. package/registry/assets/avatars/avatar-21.jpg +0 -0
  170. package/registry/assets/avatars/avatar-22.jpg +0 -0
  171. package/registry/assets/avatars/avatar-23.jpg +0 -0
  172. package/registry/assets/avatars/avatar-24.jpg +0 -0
  173. package/registry/assets/avatars/avatar-25.jpg +0 -0
  174. package/registry/assets/avatars/avatar-26.jpg +0 -0
  175. package/registry/assets/avatars/avatar-27.jpg +0 -0
  176. package/registry/assets/avatars/avatar-28.jpg +0 -0
  177. package/registry/assets/avatars/avatar-29.jpg +0 -0
  178. package/registry/assets/avatars/avatar-30.jpg +0 -0
  179. package/registry/assets/avatars/avatar-31.jpg +0 -0
  180. package/registry/assets/avatars/avatar-32.jpg +0 -0
  181. package/registry/assets/avatars/avatar-33.jpg +0 -0
  182. package/registry/assets/avatars/avatar-34.jpg +0 -0
  183. package/registry/assets/avatars/avatar-35.jpg +0 -0
  184. package/registry/assets/image-assets.json +0 -744
  185. package/registry/assets/images/art-02.jpg +0 -0
  186. package/registry/assets/images/art-03.jpg +0 -0
  187. package/registry/assets/images/art-04.jpg +0 -0
  188. package/registry/assets/images/art-05.jpg +0 -0
  189. package/registry/assets/images/art-06.jpg +0 -0
  190. package/registry/assets/images/art-07.jpg +0 -0
  191. package/registry/assets/images/art-08.jpg +0 -0
  192. package/registry/assets/images/art-09.jpg +0 -0
  193. package/registry/assets/images/art-10.jpg +0 -0
  194. package/registry/assets/images/art-11.jpg +0 -0
  195. package/registry/assets/images/art-12.jpg +0 -0
  196. package/registry/assets/images/art-13.jpg +0 -0
  197. package/registry/assets/images/art-14.jpg +0 -0
  198. package/registry/assets/images/art-15.jpg +0 -0
  199. package/registry/assets/images/art-16.jpg +0 -0
  200. package/registry/assets/images/art-17.jpg +0 -0
  201. package/registry/assets/images/art-18.jpg +0 -0
  202. package/registry/assets/images/art-19.jpg +0 -0
  203. package/registry/assets/images/art-20.jpg +0 -0
  204. package/registry/assets/images/art-21.jpg +0 -0
  205. package/registry/assets/images/art-22.jpg +0 -0
  206. package/registry/assets/images/art-23.jpg +0 -0
  207. package/registry/assets/images/art-24.jpg +0 -0
  208. package/registry/assets/images/art-25.jpg +0 -0
  209. package/registry/assets/images/art-26.jpg +0 -0
  210. package/registry/assets/images/art-27.jpg +0 -0
  211. package/registry/assets/images/nature-01.jpg +0 -0
  212. package/registry/assets/images/nature-02.jpg +0 -0
  213. package/registry/assets/images/nature-03.jpg +0 -0
  214. package/registry/assets/images/nature-04.jpg +0 -0
  215. package/registry/assets/images/nature-05.jpg +0 -0
  216. package/registry/assets/images/nature-06.jpg +0 -0
  217. package/registry/assets/images/nature-07.jpg +0 -0
  218. package/registry/assets/images/nature-08.jpg +0 -0
  219. package/registry/assets/images/nature-09.jpg +0 -0
  220. package/registry/assets/images/nature-10.jpg +0 -0
  221. package/registry/assets/images/nature-11.jpg +0 -0
  222. package/registry/assets/images/nature-12.jpg +0 -0
  223. package/registry/assets/images/nature-13.jpg +0 -0
  224. package/registry/assets/images/nature-14.jpg +0 -0
  225. package/registry/assets/images/nature-15.jpg +0 -0
  226. package/registry/assets/images/nature-16.jpg +0 -0
  227. package/registry/assets/images/nature-17.jpg +0 -0
  228. package/registry/assets/images/nature-18.jpg +0 -0
  229. package/registry/assets/images/nature-19.jpg +0 -0
  230. package/registry/assets/images/nature-20.jpg +0 -0
  231. package/registry/components/expanded/Tabs.tsx +0 -86
@@ -0,0 +1,45 @@
1
+ # Menubar
2
+
3
+ Menubar wraps Radix Menubar for application-style top menus.
4
+
5
+ ## API
6
+
7
+ ```tsx
8
+ <Menubar>
9
+ <MenubarMenu>
10
+ <MenubarTrigger>File</MenubarTrigger>
11
+ <MenubarContent>
12
+ <MenubarItem>New</MenubarItem>
13
+ </MenubarContent>
14
+ </MenubarMenu>
15
+ </Menubar>
16
+ ```
17
+
18
+ ## Token Contract
19
+
20
+ Menubar uses Banhaten menu, surface, border, shadow, hover, spacing, and body typography tokens.
21
+
22
+ ## RTL
23
+
24
+ Triggers, menu items, and shortcuts use logical spacing and inherited direction.
25
+
26
+ ## Accessibility
27
+
28
+ Radix provides menubar roles, keyboard navigation, open state, and submenu behavior.
29
+
30
+ ## Install
31
+
32
+ ```bash
33
+ npx banhaten add menubar
34
+ ```
35
+
36
+ ## Examples
37
+
38
+ Primary registry example: `examples/menubar-demo.tsx`.
39
+
40
+ Open the live component page or run `npx banhaten docs menubar` to inspect source files, install command, and examples.
41
+
42
+ ## RTL Rules
43
+
44
+ - `inheritsDirection`: true
45
+ - `spacing`: Triggers, items, and shortcuts use logical spacing.
@@ -0,0 +1,98 @@
1
+ # Modal
2
+
3
+ `Modal` presents a focused dialog surface for decisions and blocking workflows. `ConfirmModal` adds the constrained alert-dialog/confirm pattern for consequential actions.
4
+
5
+ Figma reference: `Design system 3.0 Copy / Modal`, node `227:5480`.
6
+
7
+ ## Variants
8
+
9
+ The implementation covers the six-node Modal matrix from Figma:
10
+
11
+ | Prop | Values |
12
+ | --- | --- |
13
+ | `size` | `sm`, `default`, `lg` |
14
+ | `dir` | `ltr`, `rtl` |
15
+
16
+ ## API
17
+
18
+ ```tsx
19
+ <Modal size="default" />
20
+ <Modal dir="rtl" size="lg" />
21
+ <ConfirmModal intent="danger" confirmLabel="Delete project" />
22
+ ```
23
+
24
+ | Prop | Default |
25
+ | --- | --- |
26
+ | `size` | `sm` |
27
+ | `dir` | inherited |
28
+ | `title` | localized demo title |
29
+ | `description` | localized demo description |
30
+ | `showIcon` | `true` |
31
+ | `showCloseButton` | `true` |
32
+ | `showDivider` | `true` |
33
+ | `showFooter` | `true` |
34
+ | `showCheckbox` | `true` |
35
+ | `footer` | none |
36
+
37
+ `ConfirmModal` also accepts:
38
+
39
+ | Prop | Default |
40
+ | --- | --- |
41
+ | `intent` | `danger` |
42
+ | `confirmLabel` / `cancelLabel` | localized |
43
+ | `confirmLoading` | `false` |
44
+ | `confirmDisabled` | `false` |
45
+ | `preventOutsideDismiss` | `true` |
46
+ | `closeOnConfirm` / `closeOnCancel` | `true` |
47
+ | `onConfirm` / `onCancel` | none |
48
+
49
+ ## Pixel Rules
50
+
51
+ - Small, Default, and Large modal widths are `440px`, `560px`, and `700px`.
52
+ - The shell uses `--bh-radius-2xl-12`.
53
+ - Header padding is `20px 20px 8px`, with logical end padding reserved for the close button.
54
+ - Body padding is `10px 20px 20px`.
55
+ - Footer padding is `16px 20px`, with a `10px` gap.
56
+ - Actions reuse `Button` with `size="sm"`, `variant="soft"` for the secondary action, and the default variant for the primary action.
57
+ - Confirm actions reuse `Button` with `variant="danger"`, `variant="warning"`, or `variant="default"` from the selected intent.
58
+ - The opt-out control reuses `Checkbox`.
59
+ - Loading confirm actions reuse the Banhaten `Spinner` component.
60
+
61
+ ## Token Contract
62
+
63
+ The component consumes existing Banhaten variables:
64
+
65
+ - Surface: `--bh-bg-raised`, `--bh-bg-backdrop`, `--bh-bg-danger-subtle`, `--bh-bg-warning-subtle`
66
+ - Border: `--bh-border-subtle`
67
+ - Content: `--bh-content-default`, `--bh-content-subtle`, `--bh-content-danger-default`, `--bh-content-warning-default`
68
+ - Shape: `--bh-radius-2xl-12`, `--bh-radius-full`
69
+ - Space: `--bh-space-xs-4`, `--bh-space-sm-6`, `--bh-space-md-8`, `--bh-space-lg-10`, `--bh-space-3xl-16`, `--bh-space-4xl-20`, `--bh-space-5xl-24`, `--bh-space-6xl-32`, `--bh-space-8xl-48`, `--bh-space-9xl-64`
70
+ - Type: `--bh-text-heading-sm-semibold-*`, `--bh-text-body-md-regular-*`
71
+ - Elevation: `--shadow-component-default`, `--shadow-button-focus`, `--shadow-button-danger-focus`
72
+
73
+ ## Accessibility
74
+
75
+ - `ModalContent` is backed by Radix Dialog for focus trap, Escape, outside-click dismissal, and ARIA dialog semantics.
76
+ - `ModalTitle` and `ModalDescription` map to Radix dialog title and description primitives.
77
+ - The close affordance is a real button through `ModalCloseButton`.
78
+ - `ConfirmModal` sets `role="alertdialog"`, focuses the cancel action first when present, disables outside-pointer dismissal by default, and can optionally prevent Escape dismissal.
79
+ - `ModalSurface` is presentational and intended for static documentation or visual comparison, not live modal behavior.
80
+
81
+ ## Install
82
+
83
+ ```bash
84
+ npx banhaten add modal
85
+ ```
86
+
87
+ ## Examples
88
+
89
+ Primary registry example: `examples/modal-demo.tsx`.
90
+
91
+ Open the live component page or run `npx banhaten docs modal` to inspect source files, install command, and examples.
92
+
93
+ ## RTL Rules
94
+
95
+ - `inheritsDirection`: true
96
+ - `closePlacement`: Close uses logical inline-end placement so it moves to the left side in RTL.
97
+ - `footerOrder`: The checkbox and action cluster use inherited direction and logical gaps so their order mirrors naturally.
98
+ - `textDirection`: Title, description, checkbox label, confirm labels, and actions use dir="auto" for Arabic and English copy.
@@ -0,0 +1,52 @@
1
+ # Native Select
2
+
3
+ Native Select is a tokenized native `<select>` field for platform forms, mobile fallback, and lightweight option sets.
4
+
5
+ ## API
6
+
7
+ ```tsx
8
+ <NativeSelect
9
+ label="Workspace"
10
+ options={[
11
+ { label: "Design", value: "design" },
12
+ { label: "Engineering", value: "engineering" },
13
+ ]}
14
+ />
15
+ ```
16
+
17
+ | Prop | Values |
18
+ | --- | --- |
19
+ | `size` | `md`, `lg` |
20
+ | `variant` | `default`, `soft` |
21
+ | `state` | `default`, `filled`, `error`, `disabled` |
22
+ | `options` | array of `{ label, value, disabled }` |
23
+
24
+ ## Token Contract
25
+
26
+ Native Select reuses Banhaten select width, label, helper, trigger, border, focus, icon, and validation tokens.
27
+
28
+ ## RTL
29
+
30
+ Native Select accepts `dir` and uses logical padding plus an inline-end chevron.
31
+
32
+ ## Accessibility
33
+
34
+ Prefer `label` or an external `<Label htmlFor>` and use helper or error copy for validation context.
35
+
36
+ ## Install
37
+
38
+ ```bash
39
+ npx banhaten add native-select
40
+ ```
41
+
42
+ ## Examples
43
+
44
+ Primary registry example: `examples/native-select-demo.tsx`.
45
+
46
+ Open the live component page or run `npx banhaten docs native-select` to inspect source files, install command, and examples.
47
+
48
+ ## RTL Rules
49
+
50
+ - `inheritsDirection`: true
51
+ - `spacing`: Uses logical padding and inline-end chevron placement.
52
+ - `textDirection`: Label and helper copy use dir="auto" through Label and helper text.
@@ -0,0 +1,48 @@
1
+ # Navigation Menu
2
+
3
+ Navigation Menu wraps Radix NavigationMenu for top navigation with trigger, content, link, viewport, and indicator parts.
4
+
5
+ ## API
6
+
7
+ ```tsx
8
+ <NavigationMenu>
9
+ <NavigationMenuList>
10
+ <NavigationMenuItem>
11
+ <NavigationMenuTrigger>Product</NavigationMenuTrigger>
12
+ <NavigationMenuContent>
13
+ <NavigationMenuLink href="#">Components</NavigationMenuLink>
14
+ </NavigationMenuContent>
15
+ </NavigationMenuItem>
16
+ </NavigationMenuList>
17
+ <NavigationMenuViewport />
18
+ </NavigationMenu>
19
+ ```
20
+
21
+ ## Token Contract
22
+
23
+ Navigation Menu uses Banhaten ghost hover, soft active state, raised content, popover shadow, radius, and body typography tokens.
24
+
25
+ ## RTL
26
+
27
+ The list and content inherit direction. Links use logical text alignment.
28
+
29
+ ## Accessibility
30
+
31
+ Radix handles trigger relationships, viewport sizing, keyboard navigation, and focus.
32
+
33
+ ## Install
34
+
35
+ ```bash
36
+ npx banhaten add navigation-menu
37
+ ```
38
+
39
+ ## Examples
40
+
41
+ Primary registry example: `examples/navigation-menu-demo.tsx`.
42
+
43
+ Open the live component page or run `npx banhaten docs navigation-menu` to inspect source files, install command, and examples.
44
+
45
+ ## RTL Rules
46
+
47
+ - `inheritsDirection`: true
48
+ - `spacing`: Triggers, links, and content use logical layout and inherited direction.
@@ -0,0 +1,80 @@
1
+ # Onboarding Step List Item
2
+
3
+ `OnboardingStepListItem` renders one vertical progress-list row for onboarding, setup, or guided task flows. It should be composed into a list by the parent flow, which controls line visibility for first and last items.
4
+
5
+ Figma reference: `OnboardingStepListItem`, node `587:27227`.
6
+
7
+ ## Variants
8
+
9
+ The Figma component defines these variants:
10
+
11
+ | State | Direction |
12
+ | --- | --- |
13
+ | `Finished` | LTR and RTL |
14
+ | `Active` | LTR and RTL |
15
+ | `inactive` | LTR and RTL |
16
+
17
+ Code uses lowercase semantic state values: `finished`, `active`, and `inactive`.
18
+
19
+ ## API
20
+
21
+ ```tsx
22
+ <OnboardingStepListItem
23
+ state="finished"
24
+ label="Label"
25
+ dir="ltr"
26
+ showLeadingLine
27
+ showTrailingLine
28
+ />
29
+ ```
30
+
31
+ | Prop | Values | Default |
32
+ | --- | --- | --- |
33
+ | `state` | `finished`, `active`, `inactive` | `finished` |
34
+ | `label` | `string` | `Label` |
35
+ | `dir` | `ltr`, `rtl` | `ltr` |
36
+ | `showLeadingLine` | `boolean` | `true` |
37
+ | `showTrailingLine` | `boolean` | `true` |
38
+
39
+ ## Token Contract
40
+
41
+ The component consumes Banhaten semantic tokens and component aliases. Do not hard-code Figma fallback literals in component source; promote any Figma value into `registry/styles/globals.css` as a `--bh-*` token or alias first.
42
+
43
+ - Backgrounds: `--bh-bg-raised`
44
+ - Borders: `--bh-border-brand-strong`, `--bh-border-default`
45
+ - Content: `--bh-content-brand-default`, `--bh-content-default`, `--bh-content-subtle`, `--bh-content-success-default`
46
+ - Shape: `--bh-control-default`
47
+ - Space: `--bh-space-lg-10`, `--bh-space-xl-12`
48
+
49
+ ## Pixel Rules
50
+
51
+ - The row is `280px` wide and `40px` tall.
52
+ - Padding is `8px 12px` with a `10px` gap between the line wrap and label.
53
+ - Text uses Inter Medium `15px / 24px` with zero letter spacing.
54
+ - The line wrap is `24px` square.
55
+ - Finished uses a `20px` success check-circle icon with `2px` default connector lines.
56
+ - Active uses a `2px x 20px` brand line, a default border, white raised fill, `8px` radius, and component shadow.
57
+ - Inactive uses a `2px x 40px` default connector line and subtle content color.
58
+ - RTL mirrors visual order through `dir="rtl"` and right-aligns the label.
59
+
60
+ ## Accessibility
61
+
62
+ - Connector lines and the finished icon are decorative in this primitive and are hidden from assistive technology.
63
+ - Parent onboarding lists should expose the overall progress semantics, current step, and completion status.
64
+ - Keep labels as real text and avoid using this row as the only status announcement.
65
+
66
+ ## Install
67
+
68
+ ```bash
69
+ npx banhaten add onboarding-step
70
+ ```
71
+
72
+ ## Examples
73
+
74
+ Primary registry example: `examples/expanded/onboarding-step-demo.tsx`.
75
+
76
+ Open the live component page or run `npx banhaten docs onboarding-step` to inspect source files, install command, and examples.
77
+
78
+ ## RTL Rules
79
+
80
+ This component has no special RTL contract beyond inherited document direction and logical spacing.
@@ -0,0 +1,84 @@
1
+ # Page Header
2
+
3
+ Page headers introduce a page or section with optional hierarchy, title metadata, actions, description, and local tabs.
4
+
5
+ Figma reference: `Page Header`, node `1154:2816` in `Design system 3.0 Copy`.
6
+
7
+ ## API
8
+
9
+ ```tsx
10
+ <PageHeader
11
+ title="Section Tile"
12
+ metaInfo="Meta info"
13
+ description="Section description"
14
+ breadcrumbs={[{ label: "Home" }, { label: "Home" }]}
15
+ actions={[{ label: "Button" }, { label: "Button" }]}
16
+ tabs={{ items: ["Tab item", "Tab item", "Tab item"] }}
17
+ />
18
+ ```
19
+
20
+ | Prop | Type | Default |
21
+ | --- | --- | --- |
22
+ | `title` | `string` | `Section Tile` |
23
+ | `metaInfo` | `string` | `Meta info` |
24
+ | `description` | `string` | `Section description` |
25
+ | `icon` | `ReactNode` or `false` | home icon |
26
+ | `breadcrumbs` | `PageHeaderBreadcrumb[]` or `false` | four `Home` items |
27
+ | `actions` | `PageHeaderAction[]` or `false` | four `Button` actions |
28
+ | `tabs` | `PageHeaderTabs` or `false` | underline `Tabs` |
29
+ | `dir` | `ltr` or `rtl` | `ltr` |
30
+
31
+ ## Structure
32
+
33
+ The implementation follows the Figma hierarchy:
34
+
35
+ - Breadcrumb navigation above the section body.
36
+ - Title row with optional icon, title, and meta text.
37
+ - Action group aligned to the end of the title row.
38
+ - Optional body description below the title row.
39
+ - Underline `Tabs` spanning the full header width.
40
+
41
+ `PageHeader` reuses the existing `Tabs` component instead of duplicating tab behavior.
42
+
43
+ ## Token Contract
44
+
45
+ The component consumes Banhaten semantic tokens and component aliases. Do not hard-code Figma fallback literals in component source; promote any Figma value into `registry/styles/globals.css` as a `--bh-*` token or alias first.
46
+
47
+ - Borders: `--bh-border-default`
48
+ - Content: `--bh-content-brand-default`, `--bh-content-default`, `--bh-content-heading`, `--bh-content-muted`, `--bh-content-subtle`
49
+ - Interactive: `--bh-interactive-secondary-default`
50
+ - Shape: `--bh-control-default`
51
+
52
+ ## Pixel Rules
53
+
54
+ - Header root is vertically padded by `20px`.
55
+ - Breadcrumb and body text use `15px / 24px`.
56
+ - Title uses `24px / 28px` at weight `600`.
57
+ - Meta text uses `12px / 16px`.
58
+ - Title row and action group are separated by `40px`.
59
+ - Action buttons are `36px` high with an `8px` radius, subtle border, drop shadow, and inner bottom shadow.
60
+ - Tabs use the existing `underline`, `md`, `fullWidth` tab treatment.
61
+
62
+ ## Accessibility
63
+
64
+ - Breadcrumbs render as `<nav aria-label="Breadcrumb">` with an ordered list.
65
+ - Mark the current breadcrumb with `current: true` so it receives `aria-current="page"`.
66
+ - Separators are decorative and hidden from assistive technology.
67
+ - Action items render as real buttons or anchors.
68
+ - Focus states use the brand token and remain visible for keyboard users.
69
+
70
+ ## Install
71
+
72
+ ```bash
73
+ npx banhaten add page-header
74
+ ```
75
+
76
+ ## Examples
77
+
78
+ Primary registry example: `examples/expanded/page-header-demo.tsx`.
79
+
80
+ Open the live component page or run `npx banhaten docs page-header` to inspect source files, install command, and examples.
81
+
82
+ ## RTL Rules
83
+
84
+ This component has no special RTL contract beyond inherited document direction and logical spacing.
@@ -0,0 +1,49 @@
1
+ # Pagination
2
+
3
+ Pagination navigates paged result sets, tables, and long lists. It supports numeric, simple, and summary layouts, soft and ghost styles, exact control geometry, captions, and RTL labels.
4
+
5
+ ## API
6
+
7
+ ```tsx
8
+ <Pagination page={3} totalPages={12} type="numeric" />
9
+ <Pagination dir="rtl" page={2} totalPages={8} type="summary" />
10
+ ```
11
+
12
+ | Prop | Values | Default |
13
+ | --- | --- | --- |
14
+ | `type` | `numeric`, `simple`, `summary` | `numeric` |
15
+ | `variant` | `soft`, `ghost` | `soft` |
16
+ | `page` | number | `1` |
17
+ | `totalPages` | number | required |
18
+ | `labels` | localized label overrides | direction-aware defaults |
19
+
20
+ ## Token Contract
21
+
22
+ Pagination uses Banhaten control height, radius, border, background, content, focus, icon, caption, and shadow tokens.
23
+
24
+ ## RTL
25
+
26
+ Passing `dir="rtl"` switches default labels to Arabic and mirrors previous/next directional icons with `data-rtl-flip="true"`.
27
+
28
+ ## Accessibility
29
+
30
+ Wrap pagination in a navigation landmark with a descriptive label. Current page controls should expose current state, and previous/next buttons should have readable labels.
31
+
32
+ ## Install
33
+
34
+ ```bash
35
+ npx banhaten add pagination
36
+ ```
37
+
38
+ ## Examples
39
+
40
+ Primary registry example: `examples/pagination-demo.tsx`.
41
+
42
+ Open the live component page or run `npx banhaten docs pagination` to inspect source files, install command, and examples.
43
+
44
+ ## RTL Rules
45
+
46
+ - `inheritsDirection`: true
47
+ - `labels`: Defaults to Arabic labels when dir="rtl" is provided or the document direction is RTL.
48
+ - `directionalIconFlip`: Inline Figma arrow vectors use data-rtl-flip="true" so previous and next controls mirror in RTL.
49
+ - `spacing`: Uses logical flex direction, gap, and text direction so English and Arabic captions align naturally.
@@ -0,0 +1,58 @@
1
+ # Popover
2
+
3
+ Popover presents contextual controls, filters, actions, settings, and short help content near a trigger. It supports controlled and uncontrolled state, click, focus, and hover-capable triggers, positioned content, optional arrow, alignment, offsets, sizes, close affordance, and RTL-safe composition.
4
+
5
+ ## API
6
+
7
+ ```tsx
8
+ <Popover>
9
+ <PopoverTrigger>Filters</PopoverTrigger>
10
+ <PopoverContent side="bottom" align="start">
11
+ <PopoverHeader>
12
+ <PopoverTitle>Filters</PopoverTitle>
13
+ <PopoverClose />
14
+ </PopoverHeader>
15
+ <PopoverBody>Filter controls go here.</PopoverBody>
16
+ </PopoverContent>
17
+ </Popover>
18
+ ```
19
+
20
+ | Prop | Values |
21
+ | --- | --- |
22
+ | `open`, `defaultOpen`, `onOpenChange` | controlled or uncontrolled state |
23
+ | `side` | `top`, `right`, `bottom`, `left` |
24
+ | `align` | `start`, `center`, `end` |
25
+ | `size` | `sm`, `md`, `lg`, `auto` |
26
+ | `offset` | `tight`, `default`, `loose` |
27
+ | `showArrow` | `boolean` |
28
+
29
+ ## Token Contract
30
+
31
+ Popover uses Banhaten popover width, padding, arrow, offset, surface, border, radius, shadow, trigger, typography, and z-index tokens.
32
+
33
+ ## RTL
34
+
35
+ Top and bottom alignment use logical start/end behavior. Title and description slots use `dir="auto"` and product content can inherit the nearest direction.
36
+
37
+ ## Accessibility
38
+
39
+ Use popovers for non-modal contextual content. Use Dialog or Sheet for workflows that require focus trapping or stronger dismissal semantics.
40
+
41
+ ## Install
42
+
43
+ ```bash
44
+ npx banhaten add popover
45
+ ```
46
+
47
+ ## Examples
48
+
49
+ Primary registry example: `examples/popover-demo.tsx`.
50
+
51
+ Open the live component page or run `npx banhaten docs popover` to inspect source files, install command, and examples.
52
+
53
+ ## RTL Rules
54
+
55
+ - `inheritsDirection`: true
56
+ - `alignment`: Top and bottom alignments use logical start/end so the panel edge and arrow align correctly in LTR and RTL.
57
+ - `spacing`: Uses logical layout and Banhaten spacing tokens for headers, bodies, footers, arrows, and trigger gaps.
58
+ - `textDirection`: Title and description slots use dir="auto" while product content can inherit the nearest direction.
@@ -0,0 +1,48 @@
1
+ # Progress Slider
2
+
3
+ Progress Slider is an adjustable, start-anchored progress control. It is built on Radix Slider and keeps the filled surface growing from the logical start edge while the grip handle remains at the active value edge.
4
+
5
+ ## API
6
+
7
+ ```tsx
8
+ <ProgressSlider value={[45]} aria-label="Upload progress" />
9
+ <ProgressSlider defaultValue={[70]} tone="success" showTicks />
10
+ ```
11
+
12
+ | Prop | Values |
13
+ | --- | --- |
14
+ | `value`, `defaultValue` | Radix slider value array |
15
+ | `size` | `default`, `lg` |
16
+ | `tone` | `brand`, `neutral`, `success`, `warning`, `danger` |
17
+ | `disabled` | `boolean` |
18
+ | `showTicks` | `boolean` |
19
+
20
+ ## Token Contract
21
+
22
+ Progress Slider uses Banhaten slider, progress, semantic tone, track, handle, pill radius, focus, and disabled tokens. Keep tone styling semantic so alert and status palettes can theme consistently.
23
+
24
+ ## RTL
25
+
26
+ Radix receives the inherited `dir` attribute for keyboard and value direction. The fill stays anchored to the logical start edge in both LTR and RTL.
27
+
28
+ ## Accessibility
29
+
30
+ Provide an accessible name through `aria-label` or `aria-labelledby`. Use `aria-valuetext` when the numeric value needs domain-specific phrasing.
31
+
32
+ ## Install
33
+
34
+ ```bash
35
+ npx banhaten add progress-slider
36
+ ```
37
+
38
+ ## Examples
39
+
40
+ Primary registry example: `examples/progress-slider-demo.tsx`.
41
+
42
+ Open the live component page or run `npx banhaten docs progress-slider` to inspect source files, install command, and examples.
43
+
44
+ ## RTL Rules
45
+
46
+ - `inheritsDirection`: true
47
+ - `valueDirection`: Radix Slider handles direction and keyboard behavior through the inherited dir attribute; the fill stays anchored to the logical start edge.
48
+ - `spacing`: Uses tokenized pill geometry and logical direction through Radix.
@@ -0,0 +1,75 @@
1
+ # Progress
2
+
3
+ Progress is a read-only progress meter for upload, setup, usage, and completion states. It supports top label, bottom label, helper-only, and inline indicator layouts, two track sizes, helper text, optional label text, an information icon, a spinner indicator, and inherited LTR/RTL direction.
4
+
5
+ The implementation follows the Figma progress components at `Design system 3.0 Copy / Progress` (`177:7992`) and `Progress Label` (`177:8141`).
6
+
7
+ ## API
8
+
9
+ ```tsx
10
+ <Progress
11
+ aria-label="Upload progress"
12
+ helperText="Preparing the final file"
13
+ label="Upload"
14
+ optional="(Optional)"
15
+ showInfo
16
+ showSpinner
17
+ value={40}
18
+ />
19
+ ```
20
+
21
+ ## Variants
22
+
23
+ | Prop | Values |
24
+ | --- | --- |
25
+ | `size` | `lg`, `sm` |
26
+ | `labelPosition` | `top`, `bottom`, `none`, `inline` |
27
+ | `value` | number clamped between `min` and `max` |
28
+ | `showIndicator` | `boolean` |
29
+ | `showInfo` | `boolean` |
30
+ | `showSpinner` | `boolean` |
31
+
32
+ ## Tokens
33
+
34
+ Progress uses existing Banhaten tokens only:
35
+
36
+ | Part | Token |
37
+ | --- | --- |
38
+ | Fill | `--bh-interactive-indicator-default` |
39
+ | Track | `--bh-bg-neutral-soft` |
40
+ | Radius | `--bh-radius-full` |
41
+ | Label | `--bh-text-body-xs-medium-*`, `--bh-content-default` |
42
+ | Optional and indicator | `--bh-text-body-xs-regular-*`, `--bh-text-body-2xs-regular-*`, `--bh-content-subtle` |
43
+ | Track height | `--bh-space-md-8`, `--bh-space-xs-4` |
44
+
45
+ ## RTL
46
+
47
+ Progress inherits `dir` from its parent. The fill is anchored to the logical start edge, so LTR fills from the left and RTL fills from the right. Text nodes use `dir="auto"` and tokenized body styles.
48
+
49
+ ## Install
50
+
51
+ ```bash
52
+ npx banhaten add progress
53
+ ```
54
+
55
+ ## Examples
56
+
57
+ Primary registry example: `examples/progress-demo.tsx`.
58
+
59
+ Open the live component page or run `npx banhaten docs progress` to inspect source files, install command, and examples.
60
+
61
+ ## Token Contract
62
+
63
+ Component styles must resolve through Banhaten semantic tokens, component aliases, or documented exception-ledger values.
64
+ Do not add raw colors, pixel values, opacity utilities, z-index values, durations, or shadow literals directly to component source.
65
+ Covered source files: `components/progress.tsx`.
66
+
67
+ ## RTL Rules
68
+
69
+ - `inheritsDirection`: true
70
+ - `valueDirection`: The fill is anchored with logical start positioning, so LTR fills from left and RTL fills from right.
71
+ - `spacing`: Label, optional text, indicator, and helper copy use inherited direction, logical text alignment, and tokenized gaps.
72
+
73
+ ## Accessibility
74
+
75
+ Keep native semantics, accessible names, keyboard reachability, focus-visible treatment, and status/error announcements intact when composing this component.
@@ -0,0 +1,49 @@
1
+ # Radio Card
2
+
3
+ Radio Card is a Figma-matched option card for richer single-choice selections. It supports icon, payment, avatar, company, support-label, icon-radio-left, icon-radio-right, and label-only layouts across default, active, disabled, LTR, and RTL states.
4
+
5
+ ## API
6
+
7
+ ```tsx
8
+ <RadioCard
9
+ title="Business"
10
+ description="For teams and advanced permissions."
11
+ type="with-icon"
12
+ />
13
+ ```
14
+
15
+ | Prop | Values |
16
+ | --- | --- |
17
+ | `type` | `with-icon`, `icon-radio-right`, `payment`, `with-avatar`, `company-icon`, `icon-radio-left`, `radio-label` |
18
+ | `state` | `default`, `active`, `disabled` |
19
+ | `dir` | `ltr`, `rtl` |
20
+
21
+ ## Token Contract
22
+
23
+ Radio Card consumes Banhaten card spacing, border, radius, shadow, typography, radio-control, hover, active, disabled, and semantic content tokens.
24
+
25
+ ## RTL
26
+
27
+ Radio Card follows the explicit Figma RTL ordering for each card type. Text nodes render in RTL and right alignment where the variant requires physical RTL composition.
28
+
29
+ ## Accessibility
30
+
31
+ Use Radio Card inside a semantic radio group or connect it to a native radio input in product code. Do not rely on the visual active state alone for form submission.
32
+
33
+ ## Install
34
+
35
+ ```bash
36
+ npx banhaten add radio-card
37
+ ```
38
+
39
+ ## Examples
40
+
41
+ Primary registry example: `examples/radio-card-demo.tsx`.
42
+
43
+ Open the live component page or run `npx banhaten docs radio-card` to inspect source files, install command, and examples.
44
+
45
+ ## RTL Rules
46
+
47
+ - `inheritsDirection`: false
48
+ - `layout`: Uses the explicit Figma RTL physical order while text nodes use RTL direction and right alignment.
49
+ - `spacing`: Company icon and icon-radio-left RTL variants use the Figma 12px card gap; other variants use the 10px card gap.