banhaten 0.1.2 → 0.2.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 (365) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/CONTRIBUTING.md +44 -0
  3. package/README.md +145 -328
  4. package/SECURITY.md +15 -0
  5. package/banhaten.config.example.json +1 -3
  6. package/docs/design-system/README.md +20 -0
  7. package/docs/design-system/adoption-quality-remediation.md +87 -0
  8. package/docs/design-system/agent-usage.md +13 -0
  9. package/docs/design-system/appearance-presets.md +189 -0
  10. package/docs/design-system/appearances/default.md +94 -0
  11. package/docs/design-system/appearances/rounded.md +95 -0
  12. package/docs/design-system/appearances/sharp.md +95 -0
  13. package/docs/design-system/component-docs-pattern.md +81 -0
  14. package/docs/design-system/component-showcase-consistency-report.md +217 -0
  15. package/docs/design-system/component-token-consistency-audit.md +173 -0
  16. package/docs/design-system/components/README.md +75 -0
  17. package/docs/design-system/components/accordion.md +67 -0
  18. package/docs/design-system/components/activity-feed.md +106 -0
  19. package/docs/design-system/components/alert-dialog.md +87 -0
  20. package/docs/design-system/components/alert.md +111 -0
  21. package/docs/design-system/components/aspect-ratio.md +59 -0
  22. package/docs/design-system/components/attribute.md +103 -0
  23. package/docs/design-system/components/autocomplete.md +93 -0
  24. package/docs/design-system/components/avatar.md +70 -0
  25. package/docs/design-system/components/badge.md +72 -0
  26. package/docs/design-system/components/banner.md +99 -0
  27. package/docs/design-system/components/breadcrumbs.md +188 -0
  28. package/docs/design-system/components/button-group.md +117 -0
  29. package/docs/design-system/components/button.md +95 -0
  30. package/docs/design-system/components/card.md +95 -0
  31. package/docs/design-system/components/carousel.md +61 -0
  32. package/docs/design-system/components/catalog-components.md +59 -0
  33. package/docs/design-system/components/chart.md +58 -0
  34. package/docs/design-system/components/checkbox.md +68 -0
  35. package/docs/design-system/components/collapsible.md +63 -0
  36. package/docs/design-system/components/command.md +75 -0
  37. package/docs/design-system/components/context-menu.md +59 -0
  38. package/docs/design-system/components/date-picker.md +97 -0
  39. package/docs/design-system/components/divider.md +117 -0
  40. package/docs/design-system/components/empty-state.md +72 -0
  41. package/docs/design-system/components/field.md +86 -0
  42. package/docs/design-system/components/file-upload.md +199 -0
  43. package/docs/design-system/components/hover-card.md +61 -0
  44. package/docs/design-system/components/icons.md +48 -0
  45. package/docs/design-system/components/input-group.md +73 -0
  46. package/docs/design-system/components/input-otp.md +73 -0
  47. package/docs/design-system/components/input.md +84 -0
  48. package/docs/design-system/components/item.md +72 -0
  49. package/docs/design-system/components/kbd.md +62 -0
  50. package/docs/design-system/components/label.md +64 -0
  51. package/docs/design-system/components/menu.md +76 -0
  52. package/docs/design-system/components/menubar.md +60 -0
  53. package/docs/design-system/components/modal.md +119 -0
  54. package/docs/design-system/components/native-select.md +70 -0
  55. package/docs/design-system/components/navigation-menu.md +63 -0
  56. package/docs/design-system/components/onboarding-step-list-item.md +94 -0
  57. package/docs/design-system/components/page-header.md +98 -0
  58. package/docs/design-system/components/pagination.md +71 -0
  59. package/docs/design-system/components/popover.md +77 -0
  60. package/docs/design-system/components/progress-slider.md +66 -0
  61. package/docs/design-system/components/progress.md +92 -0
  62. package/docs/design-system/components/radio-card.md +65 -0
  63. package/docs/design-system/components/radio-group.md +72 -0
  64. package/docs/design-system/components/resizable.md +57 -0
  65. package/docs/design-system/components/scroll-area.md +60 -0
  66. package/docs/design-system/components/segmented-control.md +71 -0
  67. package/docs/design-system/components/select.md +87 -0
  68. package/docs/design-system/components/sheet.md +82 -0
  69. package/docs/design-system/components/sidebar.md +83 -0
  70. package/docs/design-system/components/skeleton.md +91 -0
  71. package/docs/design-system/components/slideout.md +77 -0
  72. package/docs/design-system/components/slider.md +81 -0
  73. package/docs/design-system/components/social-button.md +65 -0
  74. package/docs/design-system/components/spinner.md +77 -0
  75. package/docs/design-system/components/steps.md +77 -0
  76. package/docs/design-system/components/table.md +411 -0
  77. package/docs/design-system/components/tabs.md +69 -0
  78. package/docs/design-system/components/tag.md +95 -0
  79. package/docs/design-system/components/textarea.md +64 -0
  80. package/docs/design-system/components/timeline.md +95 -0
  81. package/docs/design-system/components/toast.md +73 -0
  82. package/docs/design-system/components/toggle.md +96 -0
  83. package/docs/design-system/components/toolbar.md +105 -0
  84. package/docs/design-system/components/tooltip.md +107 -0
  85. package/docs/design-system/components/typography.md +18 -0
  86. package/docs/design-system/density-and-elevation.md +44 -0
  87. package/docs/design-system/design-system-test-missing-items.md +368 -0
  88. package/docs/design-system/direction-and-localization.md +23 -0
  89. package/docs/design-system/form-recipes.md +73 -0
  90. package/docs/design-system/gap-promotion-policy.md +21 -0
  91. package/docs/design-system/gap-promotion-report.md +166 -0
  92. package/docs/design-system/icons.md +69 -0
  93. package/docs/design-system/installation.md +68 -0
  94. package/docs/design-system/launch-comparison-shadcn.md +98 -0
  95. package/docs/design-system/registry-and-cli.md +64 -0
  96. package/docs/design-system/release-policy.md +30 -0
  97. package/docs/design-system/roadmap.md +14 -0
  98. package/docs/design-system/support-matrix.md +23 -0
  99. package/docs/design-system/tabs.md +53 -0
  100. package/docs/design-system/token-governance.md +60 -0
  101. package/package.json +97 -65
  102. package/registry/component-contract.json +40 -0
  103. package/registry/components/alert-dialog.tsx +297 -0
  104. package/registry/components/alert.tsx +86 -65
  105. package/registry/components/aspect-ratio.tsx +30 -0
  106. package/registry/components/autocomplete.tsx +23 -9
  107. package/registry/components/avatar.tsx +7 -7
  108. package/registry/components/badge.tsx +1 -1
  109. package/registry/components/button-group.tsx +321 -4
  110. package/registry/components/button.tsx +38 -17
  111. package/registry/components/card.tsx +68 -59
  112. package/registry/components/carousel.tsx +282 -0
  113. package/registry/components/chart.tsx +203 -0
  114. package/registry/components/checkbox.tsx +3 -3
  115. package/registry/components/collapsible.tsx +69 -0
  116. package/registry/components/command.tsx +174 -0
  117. package/registry/components/context-menu.tsx +236 -0
  118. package/registry/components/date-picker.tsx +246 -105
  119. package/registry/components/expanded/ActivityFeed.tsx +6 -15
  120. package/registry/components/expanded/Banner.tsx +3 -3
  121. package/registry/components/expanded/Breadcrumbs.tsx +5 -5
  122. package/registry/components/expanded/CatalogComponentsShowcase.tsx +13 -13
  123. package/registry/components/expanded/CatalogDivider.tsx +1 -1
  124. package/registry/components/expanded/EmptyState.tsx +1 -1
  125. package/registry/components/expanded/FileUpload.tsx +9 -2
  126. package/registry/components/expanded/OnboardingStepListItem.tsx +2 -4
  127. package/registry/components/expanded/PageHeader.tsx +14 -14
  128. package/registry/components/expanded/Slideout.tsx +15 -415
  129. package/registry/components/expanded/Steps.tsx +4 -4
  130. package/registry/components/expanded/Table.tsx +116 -69
  131. package/registry/components/expanded/Timeline.tsx +3 -3
  132. package/registry/components/expanded/activityFeed.css +1 -1
  133. package/registry/components/expanded/breadcrumbs.css +139 -139
  134. package/registry/components/expanded/catalogComponentsShowcase.css +83 -83
  135. package/registry/components/expanded/divider.css +1 -1
  136. package/registry/components/expanded/emptyState.css +1 -1
  137. package/registry/components/expanded/fileUpload.css +6 -6
  138. package/registry/components/expanded/slideout.css +9 -685
  139. package/registry/components/expanded/steps.css +274 -274
  140. package/registry/components/expanded/table.css +2 -2
  141. package/registry/components/expanded/timeline.css +264 -264
  142. package/registry/components/field.tsx +230 -0
  143. package/registry/components/hover-card.tsx +48 -0
  144. package/registry/components/input-content.ts +1 -0
  145. package/registry/components/input-group.tsx +130 -0
  146. package/registry/components/input-otp.tsx +13 -3
  147. package/registry/components/input.tsx +70 -45
  148. package/registry/components/item.tsx +189 -0
  149. package/registry/components/kbd.tsx +151 -0
  150. package/registry/components/label.tsx +78 -0
  151. package/registry/components/menu.tsx +34 -246
  152. package/registry/components/menubar.tsx +226 -0
  153. package/registry/components/modal.tsx +216 -143
  154. package/registry/components/native-select.tsx +205 -0
  155. package/registry/components/navigation-menu.tsx +171 -0
  156. package/registry/components/pagination.tsx +80 -58
  157. package/registry/components/popover.tsx +162 -664
  158. package/registry/components/radio-card.tsx +116 -87
  159. package/registry/components/radio-group.tsx +1 -1
  160. package/registry/components/resizable.tsx +74 -0
  161. package/registry/components/scroll-area.tsx +67 -0
  162. package/registry/components/segmented-control.tsx +87 -0
  163. package/registry/components/select-content.tsx +2 -2
  164. package/registry/components/select.tsx +54 -20
  165. package/registry/components/sheet.tsx +305 -0
  166. package/registry/components/sidebar.tsx +352 -0
  167. package/registry/components/skeleton.css +0 -3
  168. package/registry/components/social-button.tsx +116 -30
  169. package/registry/components/spinner.tsx +18 -55
  170. package/registry/components/{expanded/tabs.css → tabs.css} +127 -106
  171. package/registry/components/tabs.tsx +246 -0
  172. package/registry/components/tag.tsx +2 -2
  173. package/registry/components/textarea.tsx +4 -4
  174. package/registry/components/toast.tsx +136 -0
  175. package/registry/components/toggle.tsx +2 -2
  176. package/registry/components/toolbar.tsx +89 -17
  177. package/registry/components/tooltip.tsx +1 -1
  178. package/registry/examples/alert-demo.tsx +25 -5
  179. package/registry/examples/alert-dialog-demo.tsx +42 -0
  180. package/registry/examples/aspect-ratio-demo.tsx +11 -0
  181. package/registry/examples/attribute-demo.tsx +1 -1
  182. package/registry/examples/autocomplete-demo.tsx +3 -3
  183. package/registry/examples/avatar-demo.tsx +7 -7
  184. package/registry/examples/badge-demo.tsx +1 -1
  185. package/registry/examples/button-demo.tsx +6 -6
  186. package/registry/examples/button-group-demo.tsx +23 -2
  187. package/registry/examples/card-demo.tsx +46 -8
  188. package/registry/examples/carousel-demo.tsx +43 -0
  189. package/registry/examples/chart-demo.tsx +33 -0
  190. package/registry/examples/checkbox-demo.tsx +5 -5
  191. package/registry/examples/collapsible-demo.tsx +16 -0
  192. package/registry/examples/collection-filter-bar-demo.tsx +135 -0
  193. package/registry/examples/command-demo.tsx +42 -0
  194. package/registry/examples/{expanded/command-bar-demo.tsx → command-palette-demo.tsx} +5 -15
  195. package/registry/examples/context-menu-demo.tsx +29 -0
  196. package/registry/examples/control-density-contract-demo.tsx +61 -0
  197. package/registry/examples/date-picker-demo.tsx +12 -12
  198. package/registry/examples/divider-demo.tsx +3 -3
  199. package/registry/examples/expanded/banner-demo.tsx +1 -1
  200. package/registry/examples/expanded/breadcrumbs-demo.tsx +1 -1
  201. package/registry/examples/expanded/empty-state-demo.tsx +1 -1
  202. package/registry/examples/expanded/file-upload-demo.tsx +1 -1
  203. package/registry/examples/expanded/onboarding-step-demo.tsx +1 -1
  204. package/registry/examples/expanded/slideout-demo.tsx +2 -2
  205. package/registry/examples/expanded/steps-demo.tsx +1 -1
  206. package/registry/examples/expanded/tabs-demo.tsx +2 -2
  207. package/registry/examples/expanded/timeline-demo.tsx +1 -1
  208. package/registry/examples/field-demo.tsx +51 -0
  209. package/registry/examples/hover-card-demo.tsx +23 -0
  210. package/registry/examples/input-demo.tsx +6 -6
  211. package/registry/examples/input-group-demo.tsx +16 -0
  212. package/registry/examples/input-otp-demo.tsx +4 -4
  213. package/registry/examples/item-demo.tsx +46 -0
  214. package/registry/examples/kbd-demo.tsx +11 -0
  215. package/registry/examples/label-demo.tsx +20 -0
  216. package/registry/examples/menu-demo.tsx +1 -1
  217. package/registry/examples/menubar-demo.tsx +34 -0
  218. package/registry/examples/modal-demo.tsx +67 -9
  219. package/registry/examples/native-select-demo.tsx +16 -0
  220. package/registry/examples/navigation-menu-demo.tsx +29 -0
  221. package/registry/examples/pagination-demo.tsx +6 -3
  222. package/registry/examples/popover-demo.tsx +19 -19
  223. package/registry/examples/progress-demo.tsx +1 -1
  224. package/registry/examples/progress-slider-demo.tsx +1 -1
  225. package/registry/examples/radio-card-demo.tsx +4 -4
  226. package/registry/examples/radio-group-demo.tsx +2 -2
  227. package/registry/examples/resizable-demo.tsx +22 -0
  228. package/registry/examples/results-toolbar-demo.tsx +44 -0
  229. package/registry/examples/scroll-area-demo.tsx +15 -0
  230. package/registry/examples/segmented-control-demo.tsx +39 -0
  231. package/registry/examples/select-demo.tsx +1 -1
  232. package/registry/examples/sheet-demo.tsx +47 -0
  233. package/registry/examples/sidebar-demo.tsx +55 -0
  234. package/registry/examples/slider-demo.tsx +3 -3
  235. package/registry/examples/social-button-demo.tsx +18 -8
  236. package/registry/examples/spinner-demo.tsx +13 -13
  237. package/registry/examples/tabs-demo.tsx +13 -0
  238. package/registry/examples/tag-demo.tsx +1 -1
  239. package/registry/examples/textarea-demo.tsx +4 -4
  240. package/registry/examples/toast-demo.tsx +35 -0
  241. package/registry/examples/toggle-demo.tsx +6 -6
  242. package/registry/examples/tooltip-demo.tsx +4 -4
  243. package/registry/guidance/USAGE.md +27 -0
  244. package/registry/hooks/use-direction.ts +193 -13
  245. package/registry/index.json +6010 -432
  246. package/registry/styles/globals.css +3112 -4690
  247. package/registry.json +1582 -0
  248. package/schema/config.schema.json +51 -0
  249. package/schema/registry.schema.json +190 -0
  250. package/schema/tokens.schema.json +163 -0
  251. package/src/cli/command-line.js +194 -0
  252. package/src/cli/config-editors.js +9 -0
  253. package/src/cli/doctor.js +399 -0
  254. package/src/cli/file-transaction.js +295 -0
  255. package/src/cli/global-css.js +153 -0
  256. package/src/cli/index.js +639 -1391
  257. package/src/cli/install-plan.js +592 -0
  258. package/src/cli/install-receipt.js +171 -0
  259. package/src/cli/jsonc.js +203 -0
  260. package/src/cli/package-install-state.js +254 -0
  261. package/src/cli/package-manager.js +238 -0
  262. package/src/cli/package-plan.js +185 -0
  263. package/src/cli/package-version.js +97 -0
  264. package/src/cli/registry-query.js +207 -0
  265. package/src/cli/reporting.js +55 -0
  266. package/src/cli/schema-validation.js +19 -0
  267. package/src/cli/source-scanner.js +686 -0
  268. package/src/cli/vite-config.js +478 -0
  269. package/tokens/banhaten.tokens.json +4313 -310
  270. package/registry/assets/avatars/avatar-02.jpg +0 -0
  271. package/registry/assets/avatars/avatar-03.jpg +0 -0
  272. package/registry/assets/avatars/avatar-04.jpg +0 -0
  273. package/registry/assets/avatars/avatar-05.jpg +0 -0
  274. package/registry/assets/avatars/avatar-06.jpg +0 -0
  275. package/registry/assets/avatars/avatar-07.jpg +0 -0
  276. package/registry/assets/avatars/avatar-08.jpg +0 -0
  277. package/registry/assets/avatars/avatar-09.jpg +0 -0
  278. package/registry/assets/avatars/avatar-10.jpg +0 -0
  279. package/registry/assets/avatars/avatar-11.jpg +0 -0
  280. package/registry/assets/avatars/avatar-12.jpg +0 -0
  281. package/registry/assets/avatars/avatar-13.jpg +0 -0
  282. package/registry/assets/avatars/avatar-14.jpg +0 -0
  283. package/registry/assets/avatars/avatar-15.jpg +0 -0
  284. package/registry/assets/avatars/avatar-16.jpg +0 -0
  285. package/registry/assets/avatars/avatar-17.jpg +0 -0
  286. package/registry/assets/avatars/avatar-18.jpg +0 -0
  287. package/registry/assets/avatars/avatar-19.jpg +0 -0
  288. package/registry/assets/avatars/avatar-20.jpg +0 -0
  289. package/registry/assets/avatars/avatar-21.jpg +0 -0
  290. package/registry/assets/avatars/avatar-22.jpg +0 -0
  291. package/registry/assets/avatars/avatar-23.jpg +0 -0
  292. package/registry/assets/avatars/avatar-24.jpg +0 -0
  293. package/registry/assets/avatars/avatar-25.jpg +0 -0
  294. package/registry/assets/avatars/avatar-26.jpg +0 -0
  295. package/registry/assets/avatars/avatar-27.jpg +0 -0
  296. package/registry/assets/avatars/avatar-28.jpg +0 -0
  297. package/registry/assets/avatars/avatar-29.jpg +0 -0
  298. package/registry/assets/avatars/avatar-30.jpg +0 -0
  299. package/registry/assets/avatars/avatar-31.jpg +0 -0
  300. package/registry/assets/avatars/avatar-32.jpg +0 -0
  301. package/registry/assets/avatars/avatar-33.jpg +0 -0
  302. package/registry/assets/avatars/avatar-34.jpg +0 -0
  303. package/registry/assets/avatars/avatar-35.jpg +0 -0
  304. package/registry/assets/image-assets.json +0 -744
  305. package/registry/assets/images/art-02.jpg +0 -0
  306. package/registry/assets/images/art-03.jpg +0 -0
  307. package/registry/assets/images/art-04.jpg +0 -0
  308. package/registry/assets/images/art-05.jpg +0 -0
  309. package/registry/assets/images/art-06.jpg +0 -0
  310. package/registry/assets/images/art-07.jpg +0 -0
  311. package/registry/assets/images/art-08.jpg +0 -0
  312. package/registry/assets/images/art-09.jpg +0 -0
  313. package/registry/assets/images/art-10.jpg +0 -0
  314. package/registry/assets/images/art-11.jpg +0 -0
  315. package/registry/assets/images/art-12.jpg +0 -0
  316. package/registry/assets/images/art-13.jpg +0 -0
  317. package/registry/assets/images/art-14.jpg +0 -0
  318. package/registry/assets/images/art-15.jpg +0 -0
  319. package/registry/assets/images/art-16.jpg +0 -0
  320. package/registry/assets/images/art-17.jpg +0 -0
  321. package/registry/assets/images/art-18.jpg +0 -0
  322. package/registry/assets/images/art-19.jpg +0 -0
  323. package/registry/assets/images/art-20.jpg +0 -0
  324. package/registry/assets/images/art-21.jpg +0 -0
  325. package/registry/assets/images/art-22.jpg +0 -0
  326. package/registry/assets/images/art-23.jpg +0 -0
  327. package/registry/assets/images/art-24.jpg +0 -0
  328. package/registry/assets/images/art-25.jpg +0 -0
  329. package/registry/assets/images/art-26.jpg +0 -0
  330. package/registry/assets/images/art-27.jpg +0 -0
  331. package/registry/assets/images/nature-01.jpg +0 -0
  332. package/registry/assets/images/nature-02.jpg +0 -0
  333. package/registry/assets/images/nature-03.jpg +0 -0
  334. package/registry/assets/images/nature-04.jpg +0 -0
  335. package/registry/assets/images/nature-05.jpg +0 -0
  336. package/registry/assets/images/nature-06.jpg +0 -0
  337. package/registry/assets/images/nature-07.jpg +0 -0
  338. package/registry/assets/images/nature-08.jpg +0 -0
  339. package/registry/assets/images/nature-09.jpg +0 -0
  340. package/registry/assets/images/nature-10.jpg +0 -0
  341. package/registry/assets/images/nature-11.jpg +0 -0
  342. package/registry/assets/images/nature-12.jpg +0 -0
  343. package/registry/assets/images/nature-13.jpg +0 -0
  344. package/registry/assets/images/nature-14.jpg +0 -0
  345. package/registry/assets/images/nature-15.jpg +0 -0
  346. package/registry/assets/images/nature-16.jpg +0 -0
  347. package/registry/assets/images/nature-17.jpg +0 -0
  348. package/registry/assets/images/nature-18.jpg +0 -0
  349. package/registry/assets/images/nature-19.jpg +0 -0
  350. package/registry/assets/images/nature-20.jpg +0 -0
  351. package/registry/components/expanded/BannerBoard.tsx +0 -225
  352. package/registry/components/expanded/CatalogTag.tsx +0 -85
  353. package/registry/components/expanded/CommandBar.tsx +0 -386
  354. package/registry/components/expanded/IconExplorer.tsx +0 -612
  355. package/registry/components/expanded/Tabs.tsx +0 -86
  356. package/registry/components/expanded/TimelineShowcase.tsx +0 -158
  357. package/registry/components/expanded/commandBar.css +0 -470
  358. package/registry/components/expanded/iconExplorer.css +0 -764
  359. package/registry/components/expanded/iconPacks.ts +0 -866
  360. package/registry/components/expanded/tag.css +0 -148
  361. package/registry/examples/expanded/icons-demo.tsx +0 -5
  362. package/tokens/Color mode.zip +0 -0
  363. package/tokens/Numbers.zip +0 -0
  364. package/tokens/Radius.zip +0 -0
  365. package/tokens/Theme.zip +0 -0
@@ -0,0 +1,72 @@
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.
56
+
57
+ <!-- registry-contract:start -->
58
+ ## Registry Contract
59
+
60
+ This table is generated from `registry/index.json`; edit the component-owned source under `registry/catalog/components/`, not this table or the compiled index.
61
+ `supportedExports` is the exhaustive runtime import contract grouped by source module. `parts` is an ordered, non-exhaustive anatomy list.
62
+
63
+ | Field | Values |
64
+ | --- | --- |
65
+ | `supportedExports` | `components/radio-group.tsx: Radio, RadioField, RadioGroup, RadioGroupItem, radioControl, radioField, radioGroupItems, radioGroupRoot, radioRoot` |
66
+ | `parts` | `Radio`, `RadioField`, `RadioGroup`, `RadioGroupItem` |
67
+ | `registryDependencies` | None |
68
+ | `controlPositions` | `start`, `end` |
69
+ | `orientations` | `vertical`, `horizontal` |
70
+ | `states` | `default`, `error`, `disabled` |
71
+ | `tokens` | `--bh-bg-always-white`, `--bh-bg-default`, `--bh-bg-disabled`, `--bh-border-brand-strong`, `--bh-border-danger-strong`, `--bh-border-disabled`, `--bh-border-input`, `--bh-border-width-default`, `--bh-content-danger-default`, `--bh-content-default`, `--bh-content-disabled`, `--bh-content-subtle`, `--bh-interactive-radiobutton-default`, `--bh-opacity-0`, `--bh-opacity-100`, `--bh-radio-control-border`, `--bh-radio-group-message-max-width`, `--bh-radius-full`, `--bh-space-3xl-16`, `--bh-space-4xl-20`, `--bh-space-lg-10`, `--bh-space-md-8`, `--bh-space-sm-6`, `--bh-space-xl-12`, `--bh-space-xs-4`, `--bh-space-xxs-2`, `--bh-text-body-md-medium-font-weight`, `--bh-text-body-md-regular-font-size`, `--bh-text-body-md-regular-font-weight`, `--bh-text-body-md-regular-letter-spacing`, `--bh-text-body-md-regular-line-height`, `--bh-text-body-sm-medium-font-size`, `--bh-text-body-sm-medium-font-weight`, `--bh-text-body-sm-medium-letter-spacing`, `--bh-text-body-sm-medium-line-height`, `--bh-text-body-sm-regular-font-size`, `--bh-text-body-sm-regular-font-weight`, `--bh-text-body-sm-regular-letter-spacing`, `--bh-text-body-sm-regular-line-height`, `--bh-text-body-xs-regular-font-size`, `--bh-text-body-xs-regular-font-weight`, `--bh-text-body-xs-regular-letter-spacing`, `--bh-text-body-xs-regular-line-height`, `--bh-z-raised`, `--shadow-button-focus`, `--shadow-radio-control` |
72
+ <!-- registry-contract:end -->
@@ -0,0 +1,57 @@
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.
43
+
44
+ <!-- registry-contract:start -->
45
+ ## Registry Contract
46
+
47
+ This table is generated from `registry/index.json`; edit the component-owned source under `registry/catalog/components/`, not this table or the compiled index.
48
+ `supportedExports` is the exhaustive runtime import contract grouped by source module. `parts` is an ordered, non-exhaustive anatomy list.
49
+
50
+ | Field | Values |
51
+ | --- | --- |
52
+ | `supportedExports` | `components/resizable.tsx: ResizableHandle, ResizablePanel, ResizablePanelGroup` |
53
+ | `parts` | `ResizablePanelGroup`, `ResizablePanel`, `ResizableHandle` |
54
+ | `registryDependencies` | None |
55
+ | `features` | `horizontal panels`, `vertical panels`, `keyboard resize handle` |
56
+ | `tokens` | `--bh-bg-raised`, `--bh-border-subtle`, `--bh-border-width-default`, `--bh-content-muted`, `--bh-radius-full`, `--bh-space-3xl-16`, `--bh-space-4xl-20`, `--bh-space-5xl-24`, `--bh-space-6xl-32`, `--bh-z-raised`, `--shadow-button-focus` |
57
+ <!-- registry-contract:end -->
@@ -0,0 +1,60 @@
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.
46
+
47
+ <!-- registry-contract:start -->
48
+ ## Registry Contract
49
+
50
+ This table is generated from `registry/index.json`; edit the component-owned source under `registry/catalog/components/`, not this table or the compiled index.
51
+ `supportedExports` is the exhaustive runtime import contract grouped by source module. `parts` is an ordered, non-exhaustive anatomy list.
52
+
53
+ | Field | Values |
54
+ | --- | --- |
55
+ | `supportedExports` | `components/scroll-area.tsx: ScrollArea, ScrollBar` |
56
+ | `parts` | `ScrollArea`, `ScrollBar` |
57
+ | `registryDependencies` | None |
58
+ | `features` | `vertical scrollbar`, `horizontal scrollbar`, `viewport clipping` |
59
+ | `tokens` | `--bh-border-default`, `--bh-radius-full`, `--bh-space-lg-10`, `--bh-space-xxs-2` |
60
+ <!-- registry-contract:end -->
@@ -0,0 +1,71 @@
1
+ # Segmented Control
2
+
3
+ Segmented Control presents a small set of related choices on one connected, content-width surface. It is the preferred primitive for view, density, period, and numeric display choices such as “Cards per row”.
4
+
5
+ Use Select or Radio Group when labels are long or the option set is large. Use Button Group when the items are actions rather than values.
6
+
7
+ ## API
8
+
9
+ Give the group an accessible name, give every item a stable value, and use `SegmentedControlLabel` only for non-interactive context.
10
+
11
+ ```tsx
12
+ <SegmentedControl
13
+ aria-label="Cards per row"
14
+ density="default"
15
+ defaultValue="4"
16
+ >
17
+ <SegmentedControlLabel>Cards / row</SegmentedControlLabel>
18
+ <SegmentedControlItem value="3">3</SegmentedControlItem>
19
+ <SegmentedControlItem value="4">4</SegmentedControlItem>
20
+ <SegmentedControlItem value="5">5</SegmentedControlItem>
21
+ <SegmentedControlItem value="6">6</SegmentedControlItem>
22
+ </SegmentedControl>
23
+ ```
24
+
25
+ The default density is `default` (36px). Use `compact` for 32px control rows and `comfortable` for 40px controls. Keep adjacent controls on the same density contract.
26
+
27
+ ## Install
28
+
29
+ ```bash
30
+ npx banhaten add segmented-control
31
+ ```
32
+
33
+ ## Examples
34
+
35
+ Primary registry example: `examples/segmented-control-demo.tsx`.
36
+
37
+ The results-toolbar recipe demonstrates the labeled cards-per-row composition alongside a Select action.
38
+
39
+ ## Token Contract
40
+
41
+ Segmented Control reuses Button Group surface, divider, interaction, typography, and density tokens. Do not replace its height, padding, radius, color, or shadow with local literal values.
42
+
43
+ Covered source files: `components/segmented-control.tsx` and its `button-group` registry dependency.
44
+
45
+ ## RTL Rules
46
+
47
+ - The group inherits document direction.
48
+ - Content-width items and logical dividers follow inherited direction without alternate markup.
49
+ - Horizontal arrow-key navigation resolves the computed direction through the underlying Toggle Group.
50
+
51
+ ## Accessibility
52
+
53
+ Provide `aria-label` on every Segmented Control. Items expose pressed state through the underlying Toggle Group, support single or multiple selection, and retain Home, End, and direction-aware arrow-key navigation. The label segment is descriptive and never focusable.
54
+
55
+ <!-- registry-contract:start -->
56
+ ## Registry Contract
57
+
58
+ This table is generated from `registry/index.json`; edit the component-owned source under `registry/catalog/components/`, not this table or the compiled index.
59
+ `supportedExports` is the exhaustive runtime import contract grouped by source module. `parts` is an ordered, non-exhaustive anatomy list.
60
+
61
+ | Field | Values |
62
+ | --- | --- |
63
+ | `supportedExports` | `components/segmented-control.tsx: SegmentedControl, SegmentedControlItem, SegmentedControlLabel` |
64
+ | `parts` | `SegmentedControl`, `SegmentedControlItem`, `SegmentedControlLabel` |
65
+ | `registryDependencies` | `button-group` |
66
+ | `props.density` | `"compact" \| "default" \| "comfortable"; default "default"; Uses the shared 32px, 36px, or 40px control height contract.` |
67
+ | `props.type` | `"single" \| "multiple"; default "single"; Controls whether one or multiple item values may be active.` |
68
+ | `props.aria-label` | `string; default null; Required accessible name for the complete selection group.` |
69
+ | `densities` | `compact`, `default`, `comfortable` |
70
+ | `selectionTypes` | `single`, `multiple` |
71
+ <!-- registry-contract:end -->
@@ -0,0 +1,87 @@
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 | Type / values | Default | Notes |
15
+ | --- | --- | --- | --- |
16
+ | `variant` | `default`, `soft` | `default` | Selects the trigger surface. |
17
+ | `size` | `lg`, `md` | `lg` | Selects the trigger height. |
18
+ | `state` | `default`, `filled`, `error`, `disabled` | `default` | Selects the visual state. |
19
+ | `itemType` | `default`, `icon`, `avatar`, `company`, `payment`, `dot` | `default` | Selects menu-item media. |
20
+ | `selectionType` | `default`, `checkbox` | `default` | Selects the menu-item selection indicator. |
21
+ | `hasInformationIcon` | `boolean` | `false` | Shows an information icon beside the field label. |
22
+ | `hasLeadingIcon` | `boolean` | `false` | Set true to show the default user icon. |
23
+ | `leadingIcon` | `ReactNode \| false` | `null` | A node enables the leading slot; false always removes it. |
24
+ | `hasTrailingIcon` | `boolean` | `false` | Set true to show the default information icon inside the trigger. |
25
+ | `trailingIcon` | `ReactNode \| false` | `null` | A node enables the trailing slot; false always removes it. |
26
+ | `expandIcon` | `ReactNode \| false` | `chevron-down` | Replaces the expand icon, or removes it when false. |
27
+
28
+ ## Migration
29
+
30
+ Select now renders only its expand chevron when optional trigger-icon props are omitted. Add `hasLeadingIcon` or `hasTrailingIcon` to retain the previous default user or information icon. A supplied icon enables its slot, while explicit `false` always removes it.
31
+
32
+ ## Token Contract
33
+
34
+ Select consumes Banhaten field, trigger, menu, item, checkbox, status, avatar, payment, typography, spacing, border, radius, shadow, and focus tokens.
35
+
36
+ ## RTL
37
+
38
+ 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.
39
+
40
+ ## Accessibility
41
+
42
+ Radix provides listbox semantics, focus management, typeahead, selection state, and keyboard behavior. Use visible helper or error text for validation states.
43
+
44
+ ## Install
45
+
46
+ ```bash
47
+ npx banhaten add select
48
+ ```
49
+
50
+ ## Examples
51
+
52
+ Primary registry example: `examples/select-demo.tsx`.
53
+
54
+ Open the live component page or run `npx banhaten docs select` to inspect source files, install command, and examples.
55
+
56
+ ## RTL Rules
57
+
58
+ - `inheritsDirection`: true
59
+ - `textAlignment`: Uses text-start and dir="auto" for values, labels, helper text, and menu item text.
60
+ - `spacing`: Uses logical padding, start/end positioning, and inherited flex direction so trigger icons and selected checks mirror in RTL.
61
+
62
+ <!-- registry-contract:start -->
63
+ ## Registry Contract
64
+
65
+ This table is generated from `registry/index.json`; edit the component-owned source under `registry/catalog/components/`, not this table or the compiled index.
66
+ `supportedExports` is the exhaustive runtime import contract grouped by source module. `parts` is an ordered, non-exhaustive anatomy list.
67
+
68
+ | Field | Values |
69
+ | --- | --- |
70
+ | `supportedExports` | `components/select-content.tsx: SelectIcon, SelectItemAvatar, SelectItemCompanyLogo, SelectItemPaymentIcon, SelectItemStatusDot, getDefaultSelectItemMedia`, `components/select.tsx: Select, SelectCheckboxIndicator, SelectHelperText, SelectItemAvatar, SelectItemCompanyLogo, SelectItemPaymentIcon, SelectItemStatusDot, SelectLabel, SelectMenu, SelectMenuItem, SelectRoot, SelectTrigger, selectMenu, selectMenuItem, selectRoot, selectTrigger` |
71
+ | `parts` | `Select`, `SelectRoot`, `SelectLabel`, `SelectTrigger`, `SelectHelperText`, `SelectMenu`, `SelectMenuItem`, `SelectCheckboxIndicator`, `SelectItemAvatar`, `SelectItemCompanyLogo`, `SelectItemPaymentIcon`, `SelectItemStatusDot` |
72
+ | `registryDependencies` | None |
73
+ | `props.density` | `"compact" \| "default" \| "comfortable"; default "default"; Preferred cross-component sizing contract. Overrides the legacy size prop with 32px, 36px, or 40px control heights.` |
74
+ | `props.hasInformationIcon` | `boolean; default false; Shows an information icon beside the field label.` |
75
+ | `props.hasLeadingIcon` | `boolean; default false; Shows the default user leading icon when no leadingIcon is supplied.` |
76
+ | `props.leadingIcon` | `React.ReactNode \| false; default null; Supplies and enables a custom leading icon; false always removes the leading slot.` |
77
+ | `props.hasTrailingIcon` | `boolean; default false; Shows the default information trailing icon when no trailingIcon is supplied.` |
78
+ | `props.trailingIcon` | `React.ReactNode \| false; default null; Supplies and enables a custom trailing icon; false always removes the trailing slot.` |
79
+ | `props.expandIcon` | `React.ReactNode \| false; default "chevron-down"; Uses the default expand chevron when omitted, accepts a replacement node, and hides the slot when false.` |
80
+ | `densities` | `compact`, `default`, `comfortable` |
81
+ | `itemTypes` | `default`, `icon`, `avatar`, `company`, `payment`, `dot` |
82
+ | `selectionTypes` | `default`, `checkbox` |
83
+ | `sizes` | `lg`, `md`, `comfortable` |
84
+ | `states` | `default`, `filled`, `error`, `disabled` |
85
+ | `tokens` | `--bh-bg-accent-blue-default`, `--bh-bg-accent-blue-soft`, `--bh-bg-accent-purple-soft`, `--bh-bg-accent-red-default`, `--bh-bg-always-white`, `--bh-bg-brand-default`, `--bh-bg-danger-default`, `--bh-bg-default`, `--bh-bg-disabled`, `--bh-bg-info-default`, `--bh-bg-neutral-default`, `--bh-bg-success-default`, `--bh-bg-warning-default`, `--bh-border-disabled`, `--bh-border-input`, `--bh-border-subtle`, `--bh-border-width-default`, `--bh-content-accent-blue-strong`, `--bh-content-accent-purple-default`, `--bh-content-danger-default`, `--bh-content-default`, `--bh-content-disabled`, `--bh-content-muted`, `--bh-content-on-color`, `--bh-content-subtle`, `--bh-font-weight-semibold`, `--bh-icon-stroke-200`, `--bh-icon-stroke-220`, `--bh-interactive-checkbox-default`, `--bh-opacity-60`, `--bh-radius-full`, `--bh-select-avatar-font-size`, `--bh-select-check-color`, `--bh-select-checkbox-border`, `--bh-select-checkbox-icon-size`, `--bh-select-checkbox-radius`, `--bh-select-checkbox-size`, `--bh-select-company-icon-size`, `--bh-select-content-gap`, `--bh-select-field-gap`, `--bh-select-icon-size`, `--bh-select-icon-slot-size`, `--bh-select-item-check-offset`, `--bh-select-item-content-padding`, `--bh-select-item-gap`, `--bh-select-item-hover-bg`, `--bh-select-item-min-height`, `--bh-select-item-padding-x`, `--bh-select-item-radius`, `--bh-select-item-selected-padding-end`, `--bh-select-item-value-padding-x`, `--bh-select-label-gap`, `--bh-select-media-inset`, `--bh-select-menu-bg`, `--bh-select-menu-list-gap`, `--bh-select-menu-offset`, `--bh-select-menu-padding-y`, `--bh-select-menu-radius`, `--bh-select-menu-width`, `--bh-select-payment-height`, `--bh-select-payment-mark-offset`, `--bh-select-payment-mark-size`, `--bh-select-payment-radius`, `--bh-select-payment-width`, `--bh-select-status-dot-size`, `--bh-select-trigger-bg`, `--bh-select-trigger-bg-disabled`, `--bh-select-trigger-bg-soft`, `--bh-select-trigger-border`, `--bh-select-trigger-border-current`, `--bh-select-trigger-border-disabled`, `--bh-select-trigger-border-error`, `--bh-select-trigger-border-focus`, `--bh-select-trigger-gap`, `--bh-select-trigger-icon-color`, `--bh-select-trigger-padding-x`, `--bh-select-trigger-padding-y-comfortable`, `--bh-select-trigger-padding-y-lg`, `--bh-select-trigger-padding-y-md`, `--bh-select-trigger-radius`, `--bh-select-value-padding-inline`, `--bh-select-width`, `--bh-space-md-8`, `--bh-space-xxxs-1`, `--bh-text-body-2xs-regular-font-size`, `--bh-text-body-2xs-regular-font-weight`, `--bh-text-body-2xs-regular-letter-spacing`, `--bh-text-body-2xs-regular-line-height`, `--bh-text-body-md-regular-font-size`, `--bh-text-body-md-regular-font-weight`, `--bh-text-body-md-regular-letter-spacing`, `--bh-text-body-md-regular-line-height`, `--bh-text-body-sm-medium-font-size`, `--bh-text-body-sm-medium-font-weight`, `--bh-text-body-sm-medium-letter-spacing`, `--bh-text-body-sm-medium-line-height`, `--bh-text-body-xs-medium-font-size`, `--bh-text-body-xs-medium-font-weight`, `--bh-text-body-xs-medium-letter-spacing`, `--bh-text-body-xs-medium-line-height`, `--bh-text-body-xs-regular-font-size`, `--bh-text-body-xs-regular-font-weight`, `--bh-text-body-xs-regular-letter-spacing`, `--bh-text-body-xs-regular-line-height`, `--bh-z-popover`, `--shadow-component-default`, `--shadow-select-checkbox`, `--shadow-select-danger-focus-ring`, `--shadow-select-focus-ring`, `--shadow-select-menu`, `--shadow-select-trigger` |
86
+ | `variants` | `default`, `soft` |
87
+ <!-- registry-contract:end -->
@@ -0,0 +1,82 @@
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.
66
+
67
+ <!-- registry-contract:start -->
68
+ ## Registry Contract
69
+
70
+ This table is generated from `registry/index.json`; edit the component-owned source under `registry/catalog/components/`, not this table or the compiled index.
71
+ `supportedExports` is the exhaustive runtime import contract grouped by source module. `parts` is an ordered, non-exhaustive anatomy list.
72
+
73
+ | Field | Values |
74
+ | --- | --- |
75
+ | `supportedExports` | `components/sheet.tsx: Sheet, SheetBody, SheetClose, SheetCloseButton, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, sheetContentVariants` |
76
+ | `parts` | `Sheet`, `SheetTrigger`, `SheetContent`, `SheetHeader`, `SheetTitle`, `SheetDescription`, `SheetBody`, `SheetFooter`, `SheetClose`, `SheetCloseButton`, `SheetOverlay`, `SheetPortal` |
77
+ | `registryDependencies` | None |
78
+ | `features` | `focus trap`, `outside dismissal`, `Escape dismissal`, `logical sides`, `scrollable body`, `footer actions` |
79
+ | `sides` | `start`, `end`, `top`, `bottom` |
80
+ | `sizes` | `sm`, `default`, `lg` |
81
+ | `tokens` | `--bh-bg-backdrop`, `--bh-bg-raised`, `--bh-border-subtle`, `--bh-content-default`, `--bh-content-subtle`, `--bh-icon-stroke-200`, `--bh-interactive-ghost-hover`, `--bh-radius-2xl-12`, `--bh-radius-full`, `--bh-space-12xl-128`, `--bh-space-16xl-256`, `--bh-space-17xl-288`, `--bh-space-19xl-384`, `--bh-space-3xl-16`, `--bh-space-4xl-20`, `--bh-space-5xl-24`, `--bh-space-6xl-32`, `--bh-space-8xl-48`, `--bh-space-9xl-64`, `--bh-space-lg-10`, `--bh-space-md-8`, `--bh-space-xs-4`, `--bh-text-body-sm-regular-font-size`, `--bh-text-body-sm-regular-font-weight`, `--bh-text-body-sm-regular-letter-spacing`, `--bh-text-body-sm-regular-line-height`, `--bh-text-heading-sm-semibold-font-size`, `--bh-text-heading-sm-semibold-font-weight`, `--bh-text-heading-sm-semibold-letter-spacing`, `--bh-text-heading-sm-semibold-line-height`, `--bh-z-overlay`, `--shadow-button-focus`, `--shadow-component-default` |
82
+ <!-- registry-contract:end -->
@@ -0,0 +1,83 @@
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.
69
+
70
+ <!-- registry-contract:start -->
71
+ ## Registry Contract
72
+
73
+ This table is generated from `registry/index.json`; edit the component-owned source under `registry/catalog/components/`, not this table or the compiled index.
74
+ `supportedExports` is the exhaustive runtime import contract grouped by source module. `parts` is an ordered, non-exhaustive anatomy list.
75
+
76
+ | Field | Values |
77
+ | --- | --- |
78
+ | `supportedExports` | `components/sidebar.tsx: Sidebar, SidebarBody, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarProvider, SidebarRail, SidebarToggle, SidebarTrigger` |
79
+ | `parts` | `SidebarProvider`, `Sidebar`, `SidebarHeader`, `SidebarBody`, `SidebarFooter`, `SidebarGroup`, `SidebarGroupLabel`, `SidebarMenu`, `SidebarMenuItem`, `SidebarMenuButton`, `SidebarToggle`, `SidebarTrigger`, `SidebarInset`, `SidebarRail` |
80
+ | `registryDependencies` | None |
81
+ | `features` | `controlled collapse`, `uncontrolled collapse`, `group labels`, `icon-only collapsed state`, `logical side placement` |
82
+ | `tokens` | `--bh-content-default`, `--bh-content-muted`, `--bh-content-subtle`, `--bh-icon-stroke-200`, `--bh-interactive-ghost-hover`, `--bh-radius-lg-8`, `--bh-sidebar-bg`, `--bh-sidebar-bg-collapsed`, `--bh-sidebar-border`, `--bh-sidebar-icon-size`, `--bh-sidebar-item-bg-active`, `--bh-sidebar-item-bg-hover`, `--bh-sidebar-item-content`, `--bh-sidebar-item-content-active`, `--bh-sidebar-item-gap`, `--bh-sidebar-item-height`, `--bh-sidebar-item-padding-x`, `--bh-sidebar-padding`, `--bh-sidebar-rail-width`, `--bh-sidebar-width`, `--bh-sidebar-width-collapsed`, `--bh-space-19xl-384`, `--bh-space-5xl-24`, `--bh-space-md-8`, `--bh-space-xl-12`, `--bh-space-xs-4`, `--bh-text-body-sm-medium-font-size`, `--bh-text-body-sm-medium-font-weight`, `--bh-text-body-sm-medium-letter-spacing`, `--bh-text-body-sm-medium-line-height`, `--bh-text-body-xs-medium-font-size`, `--bh-text-body-xs-medium-font-weight`, `--bh-text-body-xs-medium-letter-spacing`, `--bh-text-body-xs-medium-line-height`, `--shadow-button-focus`, `--shadow-sidebar` |
83
+ <!-- registry-contract:end -->
@@ -0,0 +1,91 @@
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.
74
+
75
+ <!-- registry-contract:start -->
76
+ ## Registry Contract
77
+
78
+ This table is generated from `registry/index.json`; edit the component-owned source under `registry/catalog/components/`, not this table or the compiled index.
79
+ `supportedExports` is the exhaustive runtime import contract grouped by source module. `parts` is an ordered, non-exhaustive anatomy list.
80
+
81
+ | Field | Values |
82
+ | --- | --- |
83
+ | `supportedExports` | `components/skeleton.tsx: Skeleton, SkeletonAvatar, SkeletonButton, SkeletonCard, SkeletonForm, SkeletonInput, SkeletonList, SkeletonTable, SkeletonText, skeletonVariants` |
84
+ | `parts` | `Skeleton`, `SkeletonText`, `SkeletonAvatar`, `SkeletonButton`, `SkeletonInput`, `SkeletonCard`, `SkeletonList`, `SkeletonTable`, `SkeletonForm` |
85
+ | `registryDependencies` | None |
86
+ | `features` | `shimmer animation`, `reduced motion`, `text lines`, `avatar placeholders`, `button placeholders`, `input placeholders`, `card placeholders`, `list placeholders`, `table placeholders`, `form placeholders` |
87
+ | `shapes` | `block`, `text`, `circle` |
88
+ | `sizes` | `xs`, `sm`, `md`, `lg`, `xl` |
89
+ | `tokens` | `--bh-alpha-alpha-transparent`, `--bh-bg-brand-soft`, `--bh-bg-brand-subtle`, `--bh-bg-default`, `--bh-bg-default-hover`, `--bh-bg-muted`, `--bh-bg-raised`, `--bh-bg-raised-subtle`, `--bh-bg-subtle`, `--bh-border-default`, `--bh-border-subtle`, `--bh-button-lg-height`, `--bh-button-md-height`, `--bh-button-sm-height`, `--bh-button-xl-height`, `--bh-card-desktop-content-padding`, `--bh-control-default`, `--bh-radius-full`, `--bh-radius-lg-8`, `--bh-radius-md-6`, `--bh-radius-xl-10`, `--bh-skeleton-bg`, `--bh-skeleton-duration`, `--bh-skeleton-height`, `--bh-skeleton-highlight`, `--bh-skeleton-radius`, `--bh-skeleton-shimmer-width`, `--bh-skeleton-table-columns`, `--bh-skeleton-width`, `--bh-space-11xl-96`, `--bh-space-12xl-128`, `--bh-space-13xl-160`, `--bh-space-14xl-192`, `--bh-space-3xl-16`, `--bh-space-4xl-20`, `--bh-space-5xl-24`, `--bh-space-6xl-32`, `--bh-space-7xl-40`, `--bh-space-8xl-48`, `--bh-space-9xl-64`, `--bh-space-md-8`, `--bh-space-sm-6`, `--bh-space-xl-12`, `--bh-space-xs-4`, `--bh-text-body-md-regular-line-height`, `--shadow-component-default` |
90
+ | `tones` | `default`, `subtle`, `surface`, `brand` |
91
+ <!-- registry-contract:end -->