banhaten 0.1.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 (201) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +361 -0
  3. package/banhaten.config.example.json +13 -0
  4. package/package.json +59 -0
  5. package/registry/assets/activity-feed-avatar.png +0 -0
  6. package/registry/assets/avatars/avatar-01.jpg +0 -0
  7. package/registry/assets/avatars/avatar-02.jpg +0 -0
  8. package/registry/assets/avatars/avatar-03.jpg +0 -0
  9. package/registry/assets/avatars/avatar-04.jpg +0 -0
  10. package/registry/assets/avatars/avatar-05.jpg +0 -0
  11. package/registry/assets/avatars/avatar-06.jpg +0 -0
  12. package/registry/assets/avatars/avatar-07.jpg +0 -0
  13. package/registry/assets/avatars/avatar-08.jpg +0 -0
  14. package/registry/assets/avatars/avatar-09.jpg +0 -0
  15. package/registry/assets/avatars/avatar-10.jpg +0 -0
  16. package/registry/assets/avatars/avatar-11.jpg +0 -0
  17. package/registry/assets/avatars/avatar-12.jpg +0 -0
  18. package/registry/assets/avatars/avatar-13.jpg +0 -0
  19. package/registry/assets/avatars/avatar-14.jpg +0 -0
  20. package/registry/assets/avatars/avatar-15.jpg +0 -0
  21. package/registry/assets/avatars/avatar-16.jpg +0 -0
  22. package/registry/assets/avatars/avatar-17.jpg +0 -0
  23. package/registry/assets/avatars/avatar-18.jpg +0 -0
  24. package/registry/assets/avatars/avatar-19.jpg +0 -0
  25. package/registry/assets/avatars/avatar-20.jpg +0 -0
  26. package/registry/assets/avatars/avatar-21.jpg +0 -0
  27. package/registry/assets/avatars/avatar-22.jpg +0 -0
  28. package/registry/assets/avatars/avatar-23.jpg +0 -0
  29. package/registry/assets/avatars/avatar-24.jpg +0 -0
  30. package/registry/assets/avatars/avatar-25.jpg +0 -0
  31. package/registry/assets/avatars/avatar-26.jpg +0 -0
  32. package/registry/assets/avatars/avatar-27.jpg +0 -0
  33. package/registry/assets/avatars/avatar-28.jpg +0 -0
  34. package/registry/assets/avatars/avatar-29.jpg +0 -0
  35. package/registry/assets/avatars/avatar-30.jpg +0 -0
  36. package/registry/assets/avatars/avatar-31.jpg +0 -0
  37. package/registry/assets/avatars/avatar-32.jpg +0 -0
  38. package/registry/assets/avatars/avatar-33.jpg +0 -0
  39. package/registry/assets/avatars/avatar-34.jpg +0 -0
  40. package/registry/assets/avatars/avatar-35.jpg +0 -0
  41. package/registry/assets/image-assets.json +744 -0
  42. package/registry/assets/images/art-01.jpg +0 -0
  43. package/registry/assets/images/art-02.jpg +0 -0
  44. package/registry/assets/images/art-03.jpg +0 -0
  45. package/registry/assets/images/art-04.jpg +0 -0
  46. package/registry/assets/images/art-05.jpg +0 -0
  47. package/registry/assets/images/art-06.jpg +0 -0
  48. package/registry/assets/images/art-07.jpg +0 -0
  49. package/registry/assets/images/art-08.jpg +0 -0
  50. package/registry/assets/images/art-09.jpg +0 -0
  51. package/registry/assets/images/art-10.jpg +0 -0
  52. package/registry/assets/images/art-11.jpg +0 -0
  53. package/registry/assets/images/art-12.jpg +0 -0
  54. package/registry/assets/images/art-13.jpg +0 -0
  55. package/registry/assets/images/art-14.jpg +0 -0
  56. package/registry/assets/images/art-15.jpg +0 -0
  57. package/registry/assets/images/art-16.jpg +0 -0
  58. package/registry/assets/images/art-17.jpg +0 -0
  59. package/registry/assets/images/art-18.jpg +0 -0
  60. package/registry/assets/images/art-19.jpg +0 -0
  61. package/registry/assets/images/art-20.jpg +0 -0
  62. package/registry/assets/images/art-21.jpg +0 -0
  63. package/registry/assets/images/art-22.jpg +0 -0
  64. package/registry/assets/images/art-23.jpg +0 -0
  65. package/registry/assets/images/art-24.jpg +0 -0
  66. package/registry/assets/images/art-25.jpg +0 -0
  67. package/registry/assets/images/art-26.jpg +0 -0
  68. package/registry/assets/images/art-27.jpg +0 -0
  69. package/registry/assets/images/nature-01.jpg +0 -0
  70. package/registry/assets/images/nature-02.jpg +0 -0
  71. package/registry/assets/images/nature-03.jpg +0 -0
  72. package/registry/assets/images/nature-04.jpg +0 -0
  73. package/registry/assets/images/nature-05.jpg +0 -0
  74. package/registry/assets/images/nature-06.jpg +0 -0
  75. package/registry/assets/images/nature-07.jpg +0 -0
  76. package/registry/assets/images/nature-08.jpg +0 -0
  77. package/registry/assets/images/nature-09.jpg +0 -0
  78. package/registry/assets/images/nature-10.jpg +0 -0
  79. package/registry/assets/images/nature-11.jpg +0 -0
  80. package/registry/assets/images/nature-12.jpg +0 -0
  81. package/registry/assets/images/nature-13.jpg +0 -0
  82. package/registry/assets/images/nature-14.jpg +0 -0
  83. package/registry/assets/images/nature-15.jpg +0 -0
  84. package/registry/assets/images/nature-16.jpg +0 -0
  85. package/registry/assets/images/nature-17.jpg +0 -0
  86. package/registry/assets/images/nature-18.jpg +0 -0
  87. package/registry/assets/images/nature-19.jpg +0 -0
  88. package/registry/assets/images/nature-20.jpg +0 -0
  89. package/registry/components/accordion.tsx +119 -0
  90. package/registry/components/alert.tsx +282 -0
  91. package/registry/components/attribute.tsx +452 -0
  92. package/registry/components/avatar.tsx +142 -0
  93. package/registry/components/badge.tsx +567 -0
  94. package/registry/components/button-group.tsx +246 -0
  95. package/registry/components/button.tsx +102 -0
  96. package/registry/components/card.tsx +613 -0
  97. package/registry/components/checkbox.tsx +244 -0
  98. package/registry/components/date-picker.tsx +1143 -0
  99. package/registry/components/divider.tsx +82 -0
  100. package/registry/components/expanded/ActivityFeed.tsx +226 -0
  101. package/registry/components/expanded/Banner.tsx +145 -0
  102. package/registry/components/expanded/BannerBoard.tsx +225 -0
  103. package/registry/components/expanded/Breadcrumbs.tsx +156 -0
  104. package/registry/components/expanded/CatalogComponentsShowcase.tsx +211 -0
  105. package/registry/components/expanded/CatalogDivider.tsx +48 -0
  106. package/registry/components/expanded/CatalogTag.tsx +92 -0
  107. package/registry/components/expanded/CommandBar.tsx +406 -0
  108. package/registry/components/expanded/FileUpload.tsx +231 -0
  109. package/registry/components/expanded/IconExplorer.tsx +612 -0
  110. package/registry/components/expanded/OnboardingStepListItem.tsx +67 -0
  111. package/registry/components/expanded/PageHeader.tsx +184 -0
  112. package/registry/components/expanded/Slideout.tsx +514 -0
  113. package/registry/components/expanded/Steps.tsx +266 -0
  114. package/registry/components/expanded/Table.tsx +1014 -0
  115. package/registry/components/expanded/Tabs.tsx +86 -0
  116. package/registry/components/expanded/Timeline.tsx +235 -0
  117. package/registry/components/expanded/TimelineShowcase.tsx +158 -0
  118. package/registry/components/expanded/activityFeed.css +292 -0
  119. package/registry/components/expanded/banner.css +312 -0
  120. package/registry/components/expanded/breadcrumbs.css +140 -0
  121. package/registry/components/expanded/catalogComponentsShowcase.css +87 -0
  122. package/registry/components/expanded/commandBar.css +473 -0
  123. package/registry/components/expanded/divider.css +75 -0
  124. package/registry/components/expanded/fileUpload.css +228 -0
  125. package/registry/components/expanded/iconExplorer.css +764 -0
  126. package/registry/components/expanded/iconPacks.ts +866 -0
  127. package/registry/components/expanded/onboardingStepListItem.css +126 -0
  128. package/registry/components/expanded/pageHeader.css +287 -0
  129. package/registry/components/expanded/slideout.css +955 -0
  130. package/registry/components/expanded/steps.css +329 -0
  131. package/registry/components/expanded/table.css +607 -0
  132. package/registry/components/expanded/tabs.css +197 -0
  133. package/registry/components/expanded/tag.css +148 -0
  134. package/registry/components/expanded/timeline.css +282 -0
  135. package/registry/components/input-content.ts +106 -0
  136. package/registry/components/input.tsx +866 -0
  137. package/registry/components/menu.tsx +758 -0
  138. package/registry/components/modal.tsx +799 -0
  139. package/registry/components/pagination.tsx +543 -0
  140. package/registry/components/progress-slider.tsx +216 -0
  141. package/registry/components/progress.tsx +367 -0
  142. package/registry/components/radio-card.tsx +654 -0
  143. package/registry/components/radio-group.tsx +570 -0
  144. package/registry/components/select-content.tsx +313 -0
  145. package/registry/components/select.tsx +871 -0
  146. package/registry/components/slider.tsx +380 -0
  147. package/registry/components/social-button.tsx +360 -0
  148. package/registry/components/spinner.tsx +31 -0
  149. package/registry/components/tag.tsx +423 -0
  150. package/registry/components/textarea.tsx +625 -0
  151. package/registry/components/toggle.tsx +272 -0
  152. package/registry/components/toolbar.tsx +467 -0
  153. package/registry/components/tooltip.tsx +427 -0
  154. package/registry/examples/accordion-demo.tsx +34 -0
  155. package/registry/examples/alert-demo.tsx +14 -0
  156. package/registry/examples/attribute-demo.tsx +65 -0
  157. package/registry/examples/avatar-demo.tsx +74 -0
  158. package/registry/examples/badge-demo.tsx +53 -0
  159. package/registry/examples/button-demo.tsx +83 -0
  160. package/registry/examples/button-group-demo.tsx +42 -0
  161. package/registry/examples/card-demo.tsx +48 -0
  162. package/registry/examples/checkbox-demo.tsx +67 -0
  163. package/registry/examples/date-picker-demo.tsx +74 -0
  164. package/registry/examples/divider-demo.tsx +17 -0
  165. package/registry/examples/expanded/activity-feed-demo.tsx +22 -0
  166. package/registry/examples/expanded/banner-demo.tsx +23 -0
  167. package/registry/examples/expanded/catalog-components-demo.tsx +5 -0
  168. package/registry/examples/expanded/command-bar-demo.tsx +10 -0
  169. package/registry/examples/expanded/icons-demo.tsx +5 -0
  170. package/registry/examples/expanded/onboarding-step-demo.tsx +11 -0
  171. package/registry/examples/expanded/page-header-demo.tsx +19 -0
  172. package/registry/examples/expanded/slideout-demo.tsx +15 -0
  173. package/registry/examples/expanded/steps-demo.tsx +18 -0
  174. package/registry/examples/expanded/tabs-demo.tsx +13 -0
  175. package/registry/examples/expanded/timeline-demo.tsx +18 -0
  176. package/registry/examples/input-demo.tsx +87 -0
  177. package/registry/examples/menu-demo.tsx +109 -0
  178. package/registry/examples/modal-demo.tsx +16 -0
  179. package/registry/examples/pagination-demo.tsx +17 -0
  180. package/registry/examples/progress-demo.tsx +37 -0
  181. package/registry/examples/progress-slider-demo.tsx +29 -0
  182. package/registry/examples/radio-card-demo.tsx +51 -0
  183. package/registry/examples/radio-group-demo.tsx +62 -0
  184. package/registry/examples/select-demo.tsx +73 -0
  185. package/registry/examples/slider-demo.tsx +31 -0
  186. package/registry/examples/social-button-demo.tsx +51 -0
  187. package/registry/examples/tag-demo.tsx +29 -0
  188. package/registry/examples/textarea-demo.tsx +79 -0
  189. package/registry/examples/toggle-demo.tsx +59 -0
  190. package/registry/examples/toolbar-demo.tsx +80 -0
  191. package/registry/examples/tooltip-demo.tsx +115 -0
  192. package/registry/hooks/use-direction.ts +27 -0
  193. package/registry/index.json +1213 -0
  194. package/registry/styles/globals.css +4600 -0
  195. package/registry/utils/cn.ts +6 -0
  196. package/src/cli/index.js +826 -0
  197. package/tokens/Color mode.zip +0 -0
  198. package/tokens/Numbers.zip +0 -0
  199. package/tokens/Radius.zip +0 -0
  200. package/tokens/Theme.zip +0 -0
  201. package/tokens/banhaten.tokens.json +5525 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Banhaten contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,361 @@
1
+ # Banhaten design system
2
+
3
+ Banhaten design system is an Arabic and English-first React design system. It installs source components into a project, shadcn-style:
4
+
5
+ ```bash
6
+ npx banhaten init
7
+ npx banhaten add button
8
+ npx banhaten add button-group
9
+ npx banhaten add menu
10
+ npx banhaten add modal
11
+ npx banhaten add checkbox
12
+ npx banhaten add radio-card
13
+ npx banhaten add divider
14
+ npx banhaten add pagination
15
+ npx banhaten add toolbar
16
+ npx banhaten add social-button
17
+ npx banhaten add input
18
+ npx banhaten add select
19
+ npx banhaten add date-picker
20
+ npx banhaten add slider
21
+ npx banhaten add progress
22
+ npx banhaten add progress-slider
23
+ npx banhaten add textarea
24
+ npx banhaten add toggle
25
+ npx banhaten add attribute
26
+ npx banhaten add card
27
+ npx banhaten add accordion
28
+ npx banhaten add avatar
29
+ npx banhaten add badge
30
+ npx banhaten add tag
31
+ npx banhaten add tooltip
32
+ ```
33
+
34
+ The current scaffold includes:
35
+
36
+ - A publishable `banhaten` CLI.
37
+ - Design-token CSS with light, dark, LTR, and RTL foundations.
38
+ - A complete Figma-matched `button` registry item using React, Radix Slot, CVA variants, reusable shadow tokens, icon placement attributes, and RTL directional-icon flipping.
39
+ - A Figma-matched `button-group` registry item with connected md/sm/xs rows, default and icon-only modes, dividers, reusable group shadow, RTL widths, native hover/focus/pressed styling, and active/disabled states.
40
+ - A Radix DropdownMenu-backed, Figma-matched `menu` registry item with the raised menu surface, default, multiline, call-to-action, progress, button, label, caption, and divider item compositions, plus badges, switches, avatars, actions, meta text, and RTL-safe slots.
41
+ - A Radix Dialog-backed, Figma-matched `modal` registry item with Small, Default, and Large sizes, tokenized raised surface, header/body/footer slots, ConfirmModal guardrails, Button actions, Checkbox opt-out, and RTL layout.
42
+ - A Figma-matched `checkbox` registry item with Radix checkbox behavior, a 20px root, 16px visual control, selected and disabled states, checkbox cards, component shadow, and RTL layout.
43
+ - A Figma-matched `radio-card` registry item with icon, payment, avatar, company, support-label, and label-only layouts across LTR/RTL with native hover styling plus active and disabled states.
44
+ - A Figma-matched `divider` registry item with horizontal and vertical directions, solid and dotted types, 1px stroke, 2px dash rhythm, and Color mode divider tokens.
45
+ - A Figma-matched `pagination` registry item with numeric, simple, and summary layouts, soft and ghost styles, exact 32px controls, captions, and RTL labels.
46
+ - A Figma-matched `toolbar` registry item with search, select triggers, filter actions, chips, selected-count badges, desktop/mobile wrapping, and RTL-safe composition.
47
+ - A Figma-matched `social-button` registry item for Apple, Facebook, Google, LinkedIn, Twitter (new), and WhatsApp sign-in buttons with solid, outlined, icon-only, native focus-visible, and RTL states.
48
+ - A token-built `attribute` registry item for semantic key-value rows, detail cards, alignment variants, copyable values, loading rows, and RTL layouts.
49
+ - A token-built `card` registry item with vertical, horizontal, full-image, mobile, footer action, and RTL surface use cases.
50
+ - An `avatar` registry item with image, fallback, badge, group, group count, size scale, and RTL-safe overlap.
51
+ - An `accordion` registry item with Radix disclosure behavior, variants, sizes, animation, and RTL-safe text alignment.
52
+ - A Figma-matched `badge` registry item with light, outline, and solid styles, semantic accent colors, dot, flag, icon, numeric, and RTL-safe composition.
53
+ - A Figma-matched `tag` registry item with simple, dot, flag, avatar, and icon types, default/active/disabled states, native hover/focus-visible styling, xs/md/lg sizes, optional close button, and RTL-safe composition.
54
+ - A Radix Switch-backed `toggle` registry item with sm/md geometry, active/disabled states, optional handle icons, labeled fields, supporting text, and RTL-safe label placement.
55
+ - A Figma-matched `textarea` registry item with label, helper text, error, default and tags modes, placeholder, filled, disabled, and RTL states.
56
+ - A Radix Select-backed, Figma-matched `select` registry item with default and soft triggers, error/filled/disabled states, menu surface, checkbox and check selection, and item media for text, users, flags, companies, payment methods, and status dots.
57
+ - A Figma-matched `date-picker` registry item with Calendar, Range Calendar, Date Picker, Date Range Picker, presets, time rows, open states, month/year view, and RTL.
58
+ - A Radix Slider-backed `slider` registry item with single, range, multi-thumb, text/tooltip indicators, ticks, vertical layout, pill treatment, tones, and RTL behavior.
59
+ - A read-only `progress` registry item with value meters, label placements, helper text, indicators, spinner, and RTL fill direction.
60
+ - A Radix-based `progress-slider` registry item with semantic tones, ticks, focus treatment, and RTL-aware keyboard behavior.
61
+ - A Radix Tooltip-backed `tooltip` registry item with dark/default variants, small/large sizes, pointer positions, shortcut and close slots, and RTL-safe layout.
62
+ - Token CSS generated from the local token exports in `tokens`, with the Banhaten alias layer kept in the same generated stylesheet.
63
+ - Inter as the single font family, loaded through `@fontsource/inter` weights 400, 500, 600, and 700.
64
+ - Figma-sourced typography tokens for all 43 local text styles across Display, Heading, and Body.
65
+
66
+ ## Local Usage
67
+
68
+ From this repository:
69
+
70
+ ```bash
71
+ node src/cli/index.js init --cwd ./playground
72
+ node src/cli/index.js add button --cwd ./playground
73
+ node src/cli/index.js add button-group --cwd ./playground
74
+ node src/cli/index.js add menu --cwd ./playground
75
+ node src/cli/index.js add modal --cwd ./playground
76
+ node src/cli/index.js add checkbox --cwd ./playground
77
+ node src/cli/index.js add radio-card --cwd ./playground
78
+ node src/cli/index.js add divider --cwd ./playground
79
+ node src/cli/index.js add pagination --cwd ./playground
80
+ node src/cli/index.js add toolbar --cwd ./playground
81
+ node src/cli/index.js add social-button --cwd ./playground
82
+ node src/cli/index.js add input --cwd ./playground
83
+ node src/cli/index.js add select --cwd ./playground
84
+ node src/cli/index.js add date-picker --cwd ./playground
85
+ node src/cli/index.js add slider --cwd ./playground
86
+ node src/cli/index.js add progress --cwd ./playground
87
+ node src/cli/index.js add progress-slider --cwd ./playground
88
+ node src/cli/index.js add textarea --cwd ./playground
89
+ node src/cli/index.js add toggle --cwd ./playground
90
+ node src/cli/index.js add attribute --cwd ./playground
91
+ node src/cli/index.js add card --cwd ./playground
92
+ node src/cli/index.js add accordion --cwd ./playground
93
+ node src/cli/index.js add avatar --cwd ./playground
94
+ node src/cli/index.js add badge --cwd ./playground
95
+ node src/cli/index.js add tag --cwd ./playground
96
+ node src/cli/index.js add tooltip --cwd ./playground
97
+ ```
98
+
99
+ Run the local component playground:
100
+
101
+ ```bash
102
+ npm --prefix playground install
103
+ npm run playground:dev
104
+ ```
105
+
106
+ In a published package:
107
+
108
+ ```bash
109
+ npx banhaten init
110
+ npx banhaten add button
111
+ npx banhaten add button-group
112
+ npx banhaten add menu
113
+ npx banhaten add modal
114
+ npx banhaten add checkbox
115
+ npx banhaten add radio-card
116
+ npx banhaten add divider
117
+ npx banhaten add pagination
118
+ npx banhaten add toolbar
119
+ npx banhaten add social-button
120
+ npx banhaten add input
121
+ npx banhaten add select
122
+ npx banhaten add date-picker
123
+ npx banhaten add slider
124
+ npx banhaten add progress
125
+ npx banhaten add progress-slider
126
+ npx banhaten add textarea
127
+ npx banhaten add toggle
128
+ npx banhaten add attribute
129
+ npx banhaten add card
130
+ npx banhaten add accordion
131
+ npx banhaten add avatar
132
+ npx banhaten add badge
133
+ npx banhaten add tag
134
+ npx banhaten add tooltip
135
+ ```
136
+
137
+ After `init` or `add`, run your package manager install command when the CLI reports new dependencies:
138
+
139
+ ```bash
140
+ npm install
141
+ ```
142
+
143
+ ## Getting Started
144
+
145
+ Use the CLI from the root of a React app:
146
+
147
+ ```bash
148
+ npx banhaten init
149
+ npx banhaten add button input select
150
+ npm install
151
+ ```
152
+
153
+ The CLI writes source files into your project, updates `package.json`, injects the Banhaten token block into your configured CSS file, and keeps existing generated files current when the registry version changes.
154
+
155
+ ## Tailwind And Aliases
156
+
157
+ Banhaten targets Tailwind CSS v4. `banhaten init` makes sure your configured CSS file includes Tailwind, then appends the Banhaten token block:
158
+
159
+ ```css
160
+ @import "tailwindcss";
161
+ ```
162
+
163
+ For Vite projects, the CLI also adds the `@tailwindcss/vite` plugin and configures `@/*` to resolve to your source folder.
164
+
165
+ If your app does not use the default `@/components`, `@/lib/utils`, or `@/hooks` aliases, create `banhaten.config.json` before running `add`:
166
+
167
+ ```json
168
+ {
169
+ "tailwind": {
170
+ "css": "src/app/globals.css"
171
+ },
172
+ "aliases": {
173
+ "ui": "@/components/ui",
174
+ "utils": "@/lib/utils",
175
+ "hooks": "@/hooks"
176
+ }
177
+ }
178
+ ```
179
+
180
+ For non-Vite bundlers, make sure your TypeScript and bundler config resolve `@/*` to your source folder.
181
+
182
+ ## Typography Utilities
183
+
184
+ The token CSS ships `.bh-text-*` classes for every Banhaten typography token:
185
+
186
+ ```tsx
187
+ <h1 className="bh-text-heading-xl-bold">...</h1>
188
+ <p className="bh-text-body-md-regular">...</p>
189
+ <button className="bh-text-button">...</button>
190
+ ```
191
+
192
+ These classes map directly to the matching font family, font size, weight, letter spacing, and line height CSS variables.
193
+
194
+ ## Theming
195
+
196
+ Banhaten themes are controlled by attributes on the document element:
197
+
198
+ ```tsx
199
+ <html className="dark" data-theme="brown" data-radius="rounded" dir="rtl" lang="ar">
200
+ ```
201
+
202
+ - Color mode: add or remove the `dark` class.
203
+ - Brand theme: set `data-theme` to `blue`, `gray`, `brown`, `orange`, `green`, `purple`, or `teal`.
204
+ - Radius mode: set `data-radius` to `default`, `rounded`, or `sharp`.
205
+ - Direction: set `dir` to `ltr` or `rtl`; components prefer explicit `dir` props for nested direction changes.
206
+
207
+ ## Component API Quick Reference
208
+
209
+ | Component | Primary props |
210
+ | --- | --- |
211
+ | `Button` | `variant`, `size`, `asChild`, `loading`, `data-icon`, `data-rtl-flip` |
212
+ | `ButtonGroup` | `size`, `mode`, `dir`; `ButtonGroupItem` supports `active`, `disabled`, `aria-label` |
213
+ | `Attribute` | `layout`, `density`, `dividers`, `bordered`, `labelWidth`, rich value slots |
214
+ | `Card` | `orientation`, `type`, `breakpoint`, `dir`, `title`, `description`, footer/media slots |
215
+ | `Input` | `kind`, `size`, `variant`, `state`, `dir`, `label`, `message`, `hasHelperText` |
216
+ | `Select` | `size`, `variant`, `state`, `open`, `dir`, `value`, `label`, `SelectMenuItem` |
217
+ | `DatePicker` | `Calendar`, `RangeCalendar`, `DatePicker`, `DateRangePicker`, `view`, `type`, `dir` |
218
+ | `Menu` | `width`; `MenuItem` supports `kind`, `disabled`, slotted icons, badges, actions, and progress |
219
+ | `Modal` | `size`, `dir`, `title`, `description`, `showIcon`, `showCloseButton`, `showDivider`, `showFooter`, `showCheckbox`, `footer`; `ConfirmModal` adds `intent`, `confirmLabel`, `confirmLoading`, `preventOutsideDismiss` |
220
+ | `Pagination` | `type`, `variant`, `dir`, `page`, `totalPages`, `labels` |
221
+ | `Progress` | `value`, `min`, `max`, `size`, `labelPosition`, `helperText`, `showIndicator`, `showSpinner` |
222
+ | `Slider` | `value`, `defaultValue`, `tone`, `size`, `variant`, `orientation`, `showTicks` |
223
+ | `ProgressSlider` | `value`, `defaultValue`, `tone`, `size`, `showTicks`, `ariaValueText` |
224
+ | `Toggle` | `size`, `showIcon`, `disabled`; `ToggleField` supports `controlPosition`, `label`, `description` |
225
+ | `Toolbar` | `layout`, `wrap`; slots include `ToolbarSearch`, `ToolbarSelect`, `ToolbarButton`, `ToolbarBadge` |
226
+ | `Tooltip` | `variant`, `size`, `pointerPosition`, `showPointer`, `supportText`, shortcut/close slots |
227
+ | `Checkbox` | Radix checkbox props, plus `CheckboxCard` for labeled card layouts |
228
+ | `Badge` / `Tag` | `color`, `type`, `size`, `dir`; `Tag` also supports `showCloseButton` |
229
+
230
+ ## Updating Installed Components
231
+
232
+ Check for local drift without writing files:
233
+
234
+ ```bash
235
+ npx banhaten diff
236
+ npx banhaten diff button
237
+ ```
238
+
239
+ Refresh all detected installed components, or target a specific component:
240
+
241
+ ```bash
242
+ npx banhaten update
243
+ npx banhaten update button
244
+ ```
245
+
246
+ `diff` is a dry-run update check and reports which files would be written, updated, or kept. `update` shares the same refresh path as `add`, so re-running `add button` still works for one-off updates. Use `--force` when you intentionally want to replace every generated file, including unchanged config files.
247
+
248
+ ## Component Phases
249
+
250
+ Phase 1 focuses on the foundation and Button:
251
+
252
+ - Button variants: `default`, `secondary`, `soft`, `outline`, `ghost`, `ghost-primary`, `danger`, `soft-danger`, `white`.
253
+ - Backward-compatible aliases: `destructive`, `soft-destructive`, and `link`.
254
+ - Button sizes: `xs` 32px, `sm` 36px, `default` 40px, `lg` 48px, plus icon-only equivalents.
255
+ - Button typography: Figma text style `Body/body-md (base)/medium` using Inter Medium, 15px font size, 24px line height, and 0px letter spacing.
256
+ - Base typography: Figma text style `Body/body-md (base)/regular` using Inter Regular, 15px font size, 24px line height, and 0px letter spacing.
257
+ - Button shadows: `--shadow-button-raised`, `--shadow-button-surface`, `--shadow-button-secondary`, `--shadow-button-secondary-focus`, `--shadow-button-soft`, `--shadow-button-focus`, and `--shadow-button-danger-focus`.
258
+ - Icon placement: add `data-icon="inline-start"` or `data-icon="inline-end"` to icons.
259
+ - RTL directional icons: add `data-rtl-flip="true"` to arrows and chevrons that should mirror.
260
+ - Loading composition: use the generated `Spinner` inside `Button` instead of an `isLoading` prop.
261
+
262
+ Current social primitives:
263
+
264
+ - Button Group modes: `default` and `iconOnly`.
265
+ - Button Group sizes: `md` 40px, `sm` 36px, and `xs` 32px.
266
+ - Button Group default item widths: `md` 128px, `sm` 120px, and `xs` 112px in LTR; `md` 124px, `sm` 116px, and `xs` 108px in RTL. Icon-only groups stay square at `40px`, `36px`, and `32px`.
267
+ - Button Group states: default and disabled are transparent; hover uses `--bh-interactive-ghost-hover`; pressed and active use the stronger ghost fill; active upgrades content to `--bh-content-default`.
268
+ - Button Group typography: Figma text style `Body/body-md (base)/medium` using Inter Medium, 15px font size, 24px line height, and 0px letter spacing.
269
+ - Button Group shadows: `--shadow-button-group`, `--shadow-button-group-focus-ring`, and `--shadow-button-group-focus`.
270
+ - Button Group dividers: 1px logical separators using `--bh-button-group-divider`, with the outer 1px border using `--bh-button-group-border`.
271
+
272
+ - Menu width: 228px for the raised surface, with 355px default-item, 402px multiline-item, and 240px call-to-action item variants matching the Figma component set.
273
+ - Menu item types: `default`, `multiline`, `action`, `progress`, `button`, plus `MenuLabel`, `MenuCaption`, and `MenuSeparator` for non-interactive rows.
274
+ - Menu behavior: `MenuRoot`, `MenuTrigger`, `MenuContent`, `MenuItem`, `MenuLabel`, and `MenuSeparator` are backed by Radix DropdownMenu primitives for roving focus, Escape, click-outside dismissal, and screen-reader roles.
275
+ - Menu slots: leading and trailing icons, avatar, text, description, meta text, badge, switch, outline action, progress bar, and RTL-flipping directional icons.
276
+ - Menu tokens: all colors, typography, radius, spacing, border, and elevation resolve through the Banhaten CSS variables, including `--shadow-menu`.
277
+
278
+ - Social Button platforms: `apple`, `facebook`, `google`, `linkedin`, `twitter`, `whatsapp`.
279
+ - Social Button variants: `solid` and `outline`.
280
+ - Social Button sizes: `default` 36px height and `icon` 36px square.
281
+ - Social Button typography: Figma text style `Body/body-md (base)/medium` using Inter Medium, 15px font size, 24px line height, and 0px letter spacing.
282
+ - Social Button shadows: `--shadow-social-button`, `--shadow-social-button-focus-ring`, and `--shadow-social-button-focus`.
283
+ - Social Button focus: Figma 4px outside blue ring at 30% opacity, combined with the social button surface shadow.
284
+ - Social Button RTL: Arabic platform labels are included and can be passed through the `label` prop for nested RTL surfaces.
285
+
286
+ - Pagination types: `numeric`, `simple`, and `summary`.
287
+ - Pagination styles: `soft` and `ghost`.
288
+ - Pagination dimensions: numeric rows use 560px, simple and summary rows use 458px, controls are 32px, and icons are 20px.
289
+ - Pagination typography: Figma text style `Body/body-md (base)` using Inter 15px, 24px line height, and 0px letter spacing.
290
+ - Pagination shadows: `--shadow-pagination-control`, `--shadow-pagination-active`, and `--shadow-pagination-focus`.
291
+ - Pagination RTL: pass `dir="rtl"` or set the document direction to render Arabic labels and mirrored directional arrows.
292
+
293
+ Phase 2 expands the registry into the rest of the system: form controls, overlays, navigation, feedback, data display, layout primitives, and typography.
294
+
295
+ Current layout primitives:
296
+
297
+ - Accordion variants: `default`, `bordered`, `cards`, `soft`.
298
+ - Accordion sizes: `sm`, `default`, `lg`.
299
+ - Accordion modes: Radix `type="single"` and `type="multiple"` are supported.
300
+ - Divider directions: `horizontal` and `vertical`.
301
+ - Divider types: `solid` and `dotted`.
302
+ - Divider color: `--bh-border-subtle`, resolving from the Figma `Color mode / border/subtle` variable.
303
+ - Divider geometry: 1px stroke via `--bh-space-xxxs-1`, 2px dash/gap via `--bh-space-xxs-2`, and 224px Figma component length via `--bh-space-15xl-224`.
304
+
305
+ Current data-display primitives:
306
+
307
+ - Badge styles: `light`, `outline`, `solid`.
308
+ - Badge colors: `neutral`, `blue`, `green`, `amber`, `danger`, `purple`, `fuchsia`, `rose`, `sky`, `golden`.
309
+ - Badge types: `default`, `leading-icon`, `trailing-icon`, `dot`, `flag`, plus `showNumber` for numeric badges.
310
+ - Badge sizes: `sm` 24px and `lg` 28px. `xs` and `default` remain accepted as compatibility aliases.
311
+ - Badge icons: set `type="leading-icon"` or `type="trailing-icon"` and add `data-icon="inline-start"` or `data-icon="inline-end"` to icons and spinners.
312
+ - Badge compatibility: the previous `variant` values are still accepted and mapped onto the new Figma axes.
313
+ - Tag types: `simple`, `dot`, `flag`, `avatar`, and `icon`, with optional `showCloseButton`.
314
+ - Tag states: `default`, `active`, and `disabled`, with native hover and focus-visible styling resolving through Banhaten tokens.
315
+ - Tag sizes: `xs` 24px, `md` 28px, and `lg` 36px using `Body/body-xs`, `Body/body-sm`, and `Body/body-md (base)` medium text styles.
316
+ - Tag RTL: pass `dir="rtl"` or inherit document direction; logical padding mirrors leading media, label, and close-button placement.
317
+ - Attribute layouts: `inline`, `end`, `stacked`, and `two-column` with compact/default/comfortable densities.
318
+ - Card layouts: vertical, horizontal, full-image, and mobile spacing variants with Button-composed actions.
319
+
320
+ Current form primitives:
321
+
322
+ - Checkbox primitive: 20px interactive root, 16px centered control, 12px `check-fill` icon, 4px radius, `Shadow/component/default`, and Color mode checkbox tokens.
323
+ - Checkbox Card: 338px Figma width, 16px padding, 16px card gap, 12px content gap, selected 2px brand border, hover raised background, disabled background/border/content tokens, and RTL-safe start/end control placement.
324
+ - Radio Card: 338px Figma width, 16px padding, 10px card gap, 10px radius, 20px radio wrapper, 16px radio control, selected 6px dot, raised/card and control shadows, and design-system color and typography tokens.
325
+ - Toggle sizes: `sm` and `md`, with optional handle icons and `ToggleField` leading/trailing label compositions.
326
+ - Date Picker modes: single calendar, month/year view, double range calendar, preset list, date picker, and date range picker.
327
+ - Slider modes: single value, range, multi-thumb, ticked, vertical, pill, text indicator, tooltip indicator, and RTL.
328
+ - Textarea modes: `default` and `tags`.
329
+ - Textarea states: `placeholder`, `filled`, and `disabled`; `hasError` switches the border and helper text to the danger tokens.
330
+ - Textarea typography: labels use `Body/body-sm/medium`, body text uses `Body/body-md (base)/regular`, and helper/tag text uses `Body/body-xs`.
331
+ - Textarea dimensions: 320px default width, 80px minimum input surface, 10px surface padding, 8px field gap, and 8px radius from the Figma component set.
332
+ - Textarea RTL: pass `dir="rtl"` or inherit document direction so label, helper, and tag-chip ordering mirrors without physical left/right styling.
333
+
334
+ ## Token Source
335
+
336
+ The current source of truth is the local token exports:
337
+
338
+ - `tokens/Color mode.zip`
339
+ - `tokens/Theme.zip`
340
+ - `tokens/Numbers.zip`
341
+ - `tokens/Radius.zip`
342
+
343
+ `registry/styles/globals.css` maps those exports into Banhaten semantic CSS variables, including light/dark color mode, Blue/Gray/Brown/Orange/Green/Purple/Teal brand themes, and Default/Rounded/Sharp radius modes.
344
+
345
+ Run `npm run tokens:build` after updating `tokens/banhaten.tokens.json`; it regenerates the JSON-backed token declarations while preserving local component aliases and utilities. Run `npm run tokens:check` before committing token changes. The check verifies generated CSS drift, token source files, theme/radius selectors, shadcn aliases, generated `--bh-*` variables, and retired typo tokens.
346
+
347
+ ## Direction
348
+
349
+ Banhaten assumes UI can run in either direction:
350
+
351
+ ```tsx
352
+ <html lang="ar" dir="rtl">
353
+ ```
354
+
355
+ or:
356
+
357
+ ```tsx
358
+ <html lang="en" dir="ltr">
359
+ ```
360
+
361
+ Components should avoid physical left/right styling unless there is a deliberate visual reason.
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://banhaten.dev/schema.json",
3
+ "style": "default",
4
+ "tsx": true,
5
+ "tailwind": {
6
+ "css": "app/globals.css"
7
+ },
8
+ "aliases": {
9
+ "ui": "@/components/ui",
10
+ "utils": "@/lib/utils",
11
+ "hooks": "@/hooks"
12
+ }
13
+ }
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "banhaten",
3
+ "version": "0.1.0",
4
+ "description": "Banhaten design system: an Arabic and English-first React design system with shadcn-style component installation.",
5
+ "type": "module",
6
+ "bin": {
7
+ "banhaten": "src/cli/index.js"
8
+ },
9
+ "files": [
10
+ "src",
11
+ "registry",
12
+ "tokens",
13
+ "banhaten.config.example.json",
14
+ "README.md",
15
+ "LICENSE"
16
+ ],
17
+ "scripts": {
18
+ "build": "npm --prefix playground ci --include=dev --include=optional && npm --prefix playground run build",
19
+ "build:railway": "npm --prefix playground ci --include=dev --include=optional && npm --prefix playground run build:railway",
20
+ "start": "node playground/scripts/serve-static.mjs playground/dist",
21
+ "check": "node --check src/cli/index.js && npm run cli:test && npm run tokens:check && npm run registry:check && npm run playground:test",
22
+ "cli:test": "node scripts/cli-integration-test.mjs",
23
+ "playground:build": "npm --prefix playground run build",
24
+ "playground:dev": "npm --prefix playground run dev",
25
+ "playground:test": "npm --prefix playground run test",
26
+ "registry:check": "node scripts/check-registry-mirrors.mjs",
27
+ "registry:sync": "node scripts/check-registry-mirrors.mjs --write",
28
+ "components:tokens:check": "node scripts/check-component-token-usage.mjs",
29
+ "smoke": "node src/cli/index.js list",
30
+ "tokens:build": "node scripts/generate-token-css.mjs --write",
31
+ "tokens:check": "node scripts/generate-token-css.mjs --check && node scripts/check-token-contract.mjs && npm run components:tokens:check"
32
+ },
33
+ "engines": {
34
+ "node": ">=18.18"
35
+ },
36
+ "peerDependencies": {
37
+ "react": ">=18.2.0 || >=19.0.0",
38
+ "react-dom": ">=18.2.0 || >=19.0.0",
39
+ "tailwindcss": "^4.0.0"
40
+ },
41
+ "keywords": [
42
+ "banhaten",
43
+ "design-system",
44
+ "react",
45
+ "shadcn",
46
+ "rtl",
47
+ "arabic",
48
+ "components"
49
+ ],
50
+ "license": "MIT",
51
+ "repository": {
52
+ "type": "git",
53
+ "url": "git+https://github.com/AhmadGalal85/Banhaten-design-system.git"
54
+ },
55
+ "bugs": {
56
+ "url": "https://github.com/AhmadGalal85/Banhaten-design-system/issues"
57
+ },
58
+ "homepage": "https://github.com/AhmadGalal85/Banhaten-design-system#readme"
59
+ }