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,99 @@
1
+ # Banner
2
+
3
+ `Banner` presents short product announcements, notices, or lightweight calls to action.
4
+
5
+ Figma reference: `Design system 3.0 Copy / Banner`, node `237:39513`.
6
+
7
+ ## Variants
8
+
9
+ The implementation covers the Banner matrix from Figma:
10
+
11
+ | Prop | Values |
12
+ | --- | --- |
13
+ | `type` | `slim`, `single-action-inline`, `single-action`, `input` |
14
+ | `size` | `floating`, `full-width` |
15
+ | `content` | `title`, `title-description` |
16
+ | `color` | `brand`, `grey`, `brand-light` |
17
+ | `dir` | `ltr`, `rtl` |
18
+
19
+ ## API
20
+
21
+ ```tsx
22
+ <Banner
23
+ type="single-action"
24
+ size="floating"
25
+ content="title"
26
+ color="brand"
27
+ dir="ltr"
28
+ />
29
+ ```
30
+
31
+ | Prop | Default |
32
+ | --- | --- |
33
+ | `title` | localized demo title |
34
+ | `description` | localized demo description |
35
+ | `linkLabel` | `Link button` |
36
+ | `actionLabel` | `Button` |
37
+ | `inputPlaceholder` | `Placeholder` |
38
+ | `showIcon` | `true` |
39
+ | `showInlineAction` | `true` |
40
+ | `onAction` | none |
41
+ | `onClose` | none |
42
+
43
+ ## Pixel Rules
44
+
45
+ - Root padding is `12px 16px`.
46
+ - Slim title rows are `48px`; slim title-description rows are `52px`.
47
+ - Single-action, inline-action, and input rows are `60px`.
48
+ - Floating rows use `10px` radius; full-width rows have square edges.
49
+ - Leading icon is `20px`; close icon is `16px`.
50
+ - Action controls and text inputs are `36px` tall with `8px` radius.
51
+ - LTR body text uses `15px / 24px`. RTL title-only body text uses `12px / 16px`.
52
+ - Title-description content uses a semibold title, a `17px / 28px` separator dot, and regular description text.
53
+
54
+ ## Token Contract
55
+
56
+ The component consumes Banhaten semantic tokens and component aliases. Do not hard-code Figma fallback literals in component source; promote any Figma value into its owned `tokens/source/` fragment as a `--bh-*` token or alias first.
57
+
58
+ - Backgrounds: `--bh-bg-brand-default`, `--bh-bg-brand-soft`, `--bh-bg-muted`, `--bh-bg-always-white`
59
+ - Content: `--bh-content-default`, `--bh-content-inverse`, `--bh-content-link`, `--bh-content-muted`, `--bh-content-subtle`
60
+ - Borders: `--bh-border-subtle`, `--bh-border-input`
61
+ - Shape: `--bh-control-default`, `--bh-radius-lg-8`, `--bh-radius-xl-10`
62
+ - Space: `--bh-space-xs-4`, `--bh-space-md-8`, `--bh-space-lg-10`, `--bh-space-xl-12`, `--bh-space-3xl-16`
63
+
64
+ ## Accessibility
65
+
66
+ - The banner root exposes an `aria-label`.
67
+ - Link, action, and close affordances are real buttons.
68
+ - The input variant uses a real text input with an `aria-label`.
69
+ - RTL is controlled through `dir="rtl"` so icon, text, action, input, and close placement mirror logically.
70
+
71
+ ## Install
72
+
73
+ ```bash
74
+ npx banhaten add banner
75
+ ```
76
+
77
+ ## Examples
78
+
79
+ Primary registry example: `examples/expanded/banner-demo.tsx`.
80
+
81
+ Open the live component page or run `npx banhaten docs banner` to inspect source files, install command, and examples.
82
+
83
+ ## RTL Rules
84
+
85
+ This component has no special RTL contract beyond inherited document direction and logical spacing.
86
+
87
+ <!-- registry-contract:start -->
88
+ ## Registry Contract
89
+
90
+ This table is generated from `registry/index.json`; edit the component-owned source under `registry/catalog/components/`, not this table or the compiled index.
91
+ `supportedExports` is the exhaustive runtime import contract grouped by source module. `parts` is an ordered, non-exhaustive anatomy list.
92
+
93
+ | Field | Values |
94
+ | --- | --- |
95
+ | `supportedExports` | `components/expanded/Banner.tsx: Banner` |
96
+ | `parts` | `Banner` |
97
+ | `registryDependencies` | `button`, `input` |
98
+ | `tokens` | `--bh-bg-brand-default`, `--bh-bg-brand-soft`, `--bh-bg-muted`, `--bh-border-subtle`, `--bh-content-default`, `--bh-content-inverse`, `--bh-content-link`, `--bh-content-subtle`, `--bh-font-family`, `--bh-font-weight-regular`, `--bh-font-weight-semibold`, `--bh-icon-stroke-210`, `--bh-icon-stroke-225`, `--bh-input-width`, `--bh-radius-xl-10`, `--bh-space-3xl-16`, `--bh-space-4xl-20`, `--bh-space-8xl-48`, `--bh-space-lg-10`, `--bh-space-md-8`, `--bh-space-xl-12`, `--bh-space-xs-4`, `--bh-space-xxs-2`, `--bh-space-xxxs-1`, `--bh-text-body-2xs-medium-font-size`, `--bh-text-body-2xs-medium-font-weight`, `--bh-text-body-2xs-medium-line-height`, `--bh-text-body-lg-medium-font-size`, `--bh-text-body-lg-medium-font-weight`, `--bh-text-body-lg-medium-line-height`, `--bh-text-body-md-medium-font-size`, `--bh-text-body-md-medium-font-weight`, `--bh-text-body-md-medium-letter-spacing`, `--bh-text-body-md-medium-line-height`, `--shadow-component-default` |
99
+ <!-- registry-contract:end -->
@@ -0,0 +1,188 @@
1
+ # Breadcrumbs
2
+
3
+ Breadcrumbs show a user's location in a hierarchy and provide a quick path back to parent pages. Use `Breadcrumbs` for page-level navigation, not for step progress, tabs, or filters.
4
+
5
+ Figma reference: `Breadcrumbs`, node `238:7987`.
6
+
7
+ ## Variants
8
+
9
+ The Figma component defines these variants:
10
+
11
+ | Type | Style | Separator type | Direction |
12
+ | --- | --- | --- | --- |
13
+ | `Default` | `Default` | `Slash` | LTR and RTL |
14
+ | `Default` | `Default` | `Chevron` | LTR and RTL |
15
+ | `Default` | `Raised` | `Slash` | LTR and RTL |
16
+ | `Default` | `Raised` | `Chevron` | LTR and RTL |
17
+ | `Only Icon` | `Default` | `Slash` | LTR and RTL |
18
+ | `Only Icon` | `Default` | `Chevron` | LTR and RTL |
19
+ | `Only Icon` | `Raised` | `Slash` | LTR and RTL |
20
+ | `Only Icon` | `Raised` | `Chevron` | LTR and RTL |
21
+
22
+ The Figma source supports up to six visible breadcrumb items. Code should model this as an `items` collection instead of positional booleans such as `showBreadcrumb01`.
23
+
24
+ ## API
25
+
26
+ Use semantic names in code even if the Figma variant labels are title-cased.
27
+
28
+ ```ts
29
+ type BreadcrumbSeparator = "slash" | "chevron";
30
+ type BreadcrumbStyle = "default" | "raised";
31
+
32
+ type BreadcrumbItem = {
33
+ label: string;
34
+ href?: string;
35
+ icon?: React.ReactNode;
36
+ current?: boolean;
37
+ };
38
+
39
+ type BreadcrumbsProps = {
40
+ items: BreadcrumbItem[];
41
+ separator?: BreadcrumbSeparator;
42
+ style?: BreadcrumbStyle;
43
+ iconOnly?: boolean;
44
+ dir?: "ltr" | "rtl" | "auto";
45
+ maxItems?: number;
46
+ "aria-label"?: string;
47
+ };
48
+ ```
49
+
50
+ `items` should be ordered from root to current page in logical reading order. RTL rendering should mirror the visual order through layout direction, not by reversing the source data.
51
+
52
+ ## Layout
53
+
54
+ - The root is a horizontal flex row with centered alignment.
55
+ - The default style has no container background and uses a compact inline gap.
56
+ - The raised style adds a surface fill, a 1px border, 12px padding, and an 8px radius in the Figma source.
57
+ - Text items use `Body/body-md (base)/medium` with a 15px size and 24px line height.
58
+ - Item icons are 20px square.
59
+ - Slash and chevron separators are 16px square and should be decorative.
60
+ - LTR chevrons point right; RTL chevrons point left.
61
+ - The icon-only type keeps the same item and separator rhythm but hides visible labels.
62
+ - Do not allow wrapping inside individual breadcrumb labels unless the component has a deliberate collapsed or overflow mode.
63
+
64
+ ## Tokens
65
+
66
+ Breadcrumbs should consume existing semantic tokens:
67
+
68
+ ```ts
69
+ export const breadcrumbsTokens = {
70
+ itemColor: "content.subtle",
71
+ currentItemColor: "content.default",
72
+ iconColor: "content.subtle",
73
+ separatorColor: "content.subtle",
74
+ raisedBackground: "background.card",
75
+ raisedBorder: "border.subtle",
76
+ raisedRadius: "shape.control",
77
+ inlineGap: "space.xs-4",
78
+ raisedGap: "space.md-8",
79
+ raisedPadding: "space.xl-12",
80
+ };
81
+ ```
82
+
83
+ Do not hard-code Figma fallback values in component code. The current Figma fallbacks include `content/subtle` as `#4e596e`, `bg/raised` as white, `border/subtle` as `rgba(55, 83, 122, 0.13)`, and `radius/lg-8` as 8px. Implementations should resolve those through semantic tokens.
84
+
85
+ If the design system later adds a dedicated `background.raised` token, the raised style can map to it. Until then, use the closest raised surface token such as `background.card`.
86
+
87
+ ## Accessibility
88
+
89
+ - Render the component as navigation, usually `<nav aria-label="Breadcrumb">`.
90
+ - Use an ordered list so the hierarchy is exposed to assistive technology.
91
+ - Render linked ancestors as anchors.
92
+ - Mark the current page with `aria-current="page"` and do not require it to be a link.
93
+ - Hide separators from assistive technology with `aria-hidden="true"`.
94
+ - Icon-only breadcrumbs must provide an accessible label for every item, even when visible text is hidden.
95
+ - Preserve logical item order for screen readers in RTL contexts.
96
+ - Provide keyboard focus treatment through the link or action primitive, not on decorative separators.
97
+
98
+ ## Usage
99
+
100
+ ```tsx
101
+ <Breadcrumbs
102
+ items={[
103
+ { label: "Home", href: "/", icon: <HomeIcon /> },
104
+ { label: "Products", href: "/products" },
105
+ { label: "Analytics", current: true },
106
+ ]}
107
+ />
108
+
109
+ <Breadcrumbs
110
+ separator="chevron"
111
+ style="raised"
112
+ items={[
113
+ { label: "Home", href: "/", icon: <HomeIcon /> },
114
+ { label: "Reports", href: "/reports" },
115
+ { label: "Monthly", current: true },
116
+ ]}
117
+ />
118
+
119
+ <Breadcrumbs
120
+ iconOnly
121
+ aria-label="Breadcrumb"
122
+ items={[
123
+ { label: "Home", href: "/", icon: <HomeIcon /> },
124
+ { label: "Settings", href: "/settings", icon: <SettingsIcon /> },
125
+ { label: "Profile", current: true, icon: <UserIcon /> },
126
+ ]}
127
+ />
128
+
129
+ <Breadcrumbs
130
+ dir="rtl"
131
+ separator="chevron"
132
+ items={[
133
+ { label: "Home", href: "/", icon: <HomeIcon /> },
134
+ { label: "Account", href: "/account" },
135
+ { label: "Security", current: true },
136
+ ]}
137
+ />
138
+ ```
139
+
140
+ ## Preset Impact
141
+
142
+ - `default`: inline breadcrumbs remain quiet, and raised breadcrumbs use a modest surface radius with subtle border separation.
143
+ - `rounded`: raised breadcrumbs can use the softer control radius and slightly more relaxed spacing.
144
+ - `sharp`: raised breadcrumbs should use square or near-square corners and tighter horizontal rhythm.
145
+
146
+ ## Implementation Notes
147
+
148
+ - Use the design system's icon primitive for home and chevron icons. The Figma source uses Remix Icon `home-5-line`, `arrow-right-s-line`, and `arrow-left-s-line`.
149
+ - Generate separators between items instead of requiring callers to include separator items.
150
+ - Keep overflow behavior explicit. If the trail is too long, collapse middle items behind an overflow control instead of silently hiding the current page.
151
+ - Prefer `dir` or logical CSS properties for RTL behavior rather than maintaining separate RTL item arrays.
152
+ - The raised style is a navigation surface, not a card. Keep elevation at `elevation.none` unless a consuming product places it inside an overlay.
153
+
154
+ ## Install
155
+
156
+ ```bash
157
+ npx banhaten add breadcrumbs
158
+ ```
159
+
160
+ ## Examples
161
+
162
+ Primary registry example: `examples/expanded/breadcrumbs-demo.tsx`.
163
+
164
+ Open the live component page or run `npx banhaten docs breadcrumbs` to inspect source files, install command, and examples.
165
+
166
+ ## Token Contract
167
+
168
+ Component styles must resolve through Banhaten semantic tokens, component aliases, or documented exception-ledger values.
169
+ Do not add raw colors, pixel values, opacity utilities, z-index values, durations, or shadow literals directly to component source.
170
+ Covered source files: `components/expanded/breadcrumbs.css`, `components/expanded/Breadcrumbs.tsx`.
171
+
172
+ ## RTL Rules
173
+
174
+ This component has no special RTL contract beyond inherited document direction and logical spacing.
175
+
176
+ <!-- registry-contract:start -->
177
+ ## Registry Contract
178
+
179
+ This table is generated from `registry/index.json`; edit the component-owned source under `registry/catalog/components/`, not this table or the compiled index.
180
+ `supportedExports` is the exhaustive runtime import contract grouped by source module. `parts` is an ordered, non-exhaustive anatomy list.
181
+
182
+ | Field | Values |
183
+ | --- | --- |
184
+ | `supportedExports` | `components/expanded/Breadcrumbs.tsx: BreadcrumbFolderIcon, BreadcrumbHomeIcon, Breadcrumbs` |
185
+ | `parts` | `Breadcrumbs` |
186
+ | `registryDependencies` | None |
187
+ | `tokens` | `--bh-bg-raised`, `--bh-border-focus`, `--bh-border-subtle`, `--bh-content-default`, `--bh-content-subtle`, `--bh-focus-ring-width`, `--bh-font-family`, `--bh-font-weight-medium`, `--bh-icon-stroke-190`, `--bh-icon-stroke-200`, `--bh-icon-stroke-225`, `--bh-interactive-ghost-hover`, `--bh-radius-lg-8`, `--bh-radius-sm-4`, `--bh-space-3xl-16`, `--bh-space-4xl-20`, `--bh-space-6xl-32`, `--bh-space-md-8`, `--bh-space-xl-12`, `--bh-space-xs-4`, `--bh-space-xxs-2`, `--bh-space-xxxs-1`, `--bh-text-base-letter-spacing`, `--bh-text-body-2xs-regular-line-height`, `--bh-text-body-md-font-size`, `--bh-text-body-md-line-height` |
188
+ <!-- registry-contract:end -->
@@ -0,0 +1,117 @@
1
+ # Button Group
2
+
3
+ Button Group is a connected set of related button actions. It supports text buttons and icon-only buttons, three sizes, inherited LTR/RTL direction, logical dividers, and tokenized interaction states.
4
+
5
+ The implementation follows the Figma component at `Design system 3.0 Copy / Button Group Item 1.2` (`390:12399`).
6
+
7
+ ## API
8
+
9
+ Use `ButtonGroup` as the connected container and `ButtonGroupItem` for each action.
10
+
11
+ ```tsx
12
+ <ButtonGroup aria-label="View options" size="md">
13
+ <ButtonGroupItem>
14
+ <PlusIcon data-icon="inline-start" />
15
+ Button
16
+ <PlusIcon data-icon="inline-end" />
17
+ </ButtonGroupItem>
18
+ <ButtonGroupItem aria-pressed>
19
+ <PlusIcon data-icon="inline-start" />
20
+ Active
21
+ <PlusIcon data-icon="inline-end" />
22
+ </ButtonGroupItem>
23
+ </ButtonGroup>
24
+ ```
25
+
26
+ Use `ToggleGroup` when the connected controls own a single or multiple pressed-value model. It includes controlled and uncontrolled state plus Home, End, and direction-aware arrow-key focus movement.
27
+
28
+ ```tsx
29
+ <ToggleGroup aria-label="Text alignment" defaultValue="start">
30
+ <ToggleGroupItem value="start">Start</ToggleGroupItem>
31
+ <ToggleGroupItem value="center">Center</ToggleGroupItem>
32
+ <ToggleGroupItem value="end">End</ToggleGroupItem>
33
+ </ToggleGroup>
34
+ ```
35
+
36
+ ## Variants
37
+
38
+ | Prop | Values |
39
+ | --- | --- |
40
+ | `size` | `md`, `sm`, `xs` |
41
+ | `mode` | `default`, `iconOnly` |
42
+ | `ButtonGroupItem aria-pressed` | `true`, `false` |
43
+ | `ButtonGroupItem disabled` | `boolean` |
44
+ | `ToggleGroup type` | `single`, `multiple` |
45
+ | `ToggleGroup value`, `defaultValue` | `string`, `string[]` |
46
+ | `ToggleGroupItem value` | `string` |
47
+
48
+ Interaction styling is applied through native CSS pseudo states: `:hover`, `:active`, `:focus-visible`, `:disabled`, and `aria-pressed="true"`.
49
+
50
+ ## States
51
+
52
+ | State | Background | Content |
53
+ | --- | --- | --- |
54
+ | Default | `--bh-button-group-item-bg` | `--bh-button-group-content-default` |
55
+ | Hover | `--bh-button-group-item-hover-bg` | `--bh-button-group-content-default` |
56
+ | Pressed | `--bh-button-group-item-pressed-bg` | `--bh-button-group-content-default` |
57
+ | Active | `--bh-button-group-item-active-bg` | `--bh-button-group-content-active` |
58
+ | Disabled | `--bh-button-group-item-disabled-bg` | `--bh-button-group-content-disabled` |
59
+
60
+ ## Dimensions
61
+
62
+ | Size | Height | LTR text item | RTL text item | Icon-only item |
63
+ | --- | ---: | ---: | ---: | ---: |
64
+ | `md` | 40px | 128px | 124px | 40px |
65
+ | `sm` | 36px | 120px | 116px | 36px |
66
+ | `xs` | 32px | 112px | 108px | 32px |
67
+
68
+ Text buttons use the design-system button typography tokens. Icon-only buttons require an accessible label.
69
+
70
+ ## Install
71
+
72
+ ```bash
73
+ npx banhaten add button-group
74
+ ```
75
+
76
+ ## Examples
77
+
78
+ Primary registry example: `examples/button-group-demo.tsx`.
79
+
80
+ Open the live component page or run `npx banhaten docs button-group` to inspect source files, install command, and examples.
81
+
82
+ ## Token Contract
83
+
84
+ Component styles must resolve through Banhaten semantic tokens, component aliases, or documented exception-ledger values.
85
+ Do not add raw colors, pixel values, opacity utilities, z-index values, durations, or shadow literals directly to component source.
86
+ Covered source files: `components/button-group.tsx`.
87
+
88
+ ## RTL Rules
89
+
90
+ - `inheritsDirection`: true
91
+ - `itemSizing`: LTR and RTL default items keep their fixed Figma matrix widths. Icon-only groups keep the same square dimensions.
92
+ - `spacing`: Uses logical dividers and inherited flex direction so item order, icon order, padding, and separators follow LTR or RTL.
93
+
94
+ ## Accessibility
95
+
96
+ This component relies on `@radix-ui/react-slot` for its base accessibility behavior. Keep required labels, titles, descriptions, and focusable trigger/content relationships intact when composing it.
97
+
98
+ <!-- registry-contract:start -->
99
+ ## Registry Contract
100
+
101
+ This table is generated from `registry/index.json`; edit the component-owned source under `registry/catalog/components/`, not this table or the compiled index.
102
+ `supportedExports` is the exhaustive runtime import contract grouped by source module. `parts` is an ordered, non-exhaustive anatomy list.
103
+
104
+ | Field | Values |
105
+ | --- | --- |
106
+ | `supportedExports` | `components/button-group.tsx: ButtonGroup, ButtonGroupItem, ButtonGroupLabel, ToggleGroup, ToggleGroupItem, buttonGroupItemVariants, buttonGroupLabelVariants, buttonGroupVariants` |
107
+ | `parts` | `ButtonGroup`, `ButtonGroupItem`, `ButtonGroupLabel`, `ToggleGroup`, `ToggleGroupItem` |
108
+ | `registryDependencies` | None |
109
+ | `props.density` | `"compact" \| "default" \| "comfortable"; default "comfortable"; Preferred cross-component sizing contract. Maps to legacy xs, sm, or md group sizes.` |
110
+ | `props.itemWidth` | `"fixed" \| "content"; default "fixed"; Uses the reviewed fixed matrix widths or lets each text item hug its content.` |
111
+ | `densities` | `compact`, `default`, `comfortable` |
112
+ | `modes` | `default`, `iconOnly` |
113
+ | `selectionTypes` | `single`, `multiple` |
114
+ | `sizes` | `md`, `sm`, `xs` |
115
+ | `tokens` | `--bh-border-width-default`, `--bh-button-group-bg`, `--bh-button-group-border`, `--bh-button-group-content`, `--bh-button-group-content-active`, `--bh-button-group-content-disabled`, `--bh-button-group-divider`, `--bh-button-group-icon-size`, `--bh-button-group-item-active-bg`, `--bh-button-group-item-bg`, `--bh-button-group-item-disabled-bg`, `--bh-button-group-item-hover-bg`, `--bh-button-group-item-pressed-bg`, `--bh-button-group-label-padding-x`, `--bh-button-group-md-gap`, `--bh-button-group-md-height`, `--bh-button-group-md-icon-padding-x`, `--bh-button-group-md-item-rtl-width`, `--bh-button-group-md-item-width`, `--bh-button-group-md-padding-x`, `--bh-button-group-radius`, `--bh-button-group-sm-gap`, `--bh-button-group-sm-height`, `--bh-button-group-sm-icon-padding-x`, `--bh-button-group-sm-item-rtl-width`, `--bh-button-group-sm-item-width`, `--bh-button-group-sm-padding-x`, `--bh-button-group-xs-gap`, `--bh-button-group-xs-height`, `--bh-button-group-xs-icon-padding-x`, `--bh-button-group-xs-item-rtl-width`, `--bh-button-group-xs-item-width`, `--bh-button-group-xs-padding-x`, `--bh-text-button-font-size`, `--bh-text-button-font-weight`, `--bh-text-button-letter-spacing`, `--bh-text-button-line-height`, `--bh-z-raised`, `--shadow-button-group`, `--shadow-button-group-focus`, `--shadow-component-default` |
116
+ | `widths` | `fixed`, `content` |
117
+ <!-- registry-contract:end -->
@@ -0,0 +1,95 @@
1
+ # Button
2
+
3
+ Button is the primary action primitive for forms, workflows, navigation actions, and destructive confirmations. It supports semantic variants, text and icon sizes, loading composition, link composition through `asChild`, and RTL-safe icon behavior.
4
+
5
+ ## API
6
+
7
+ ```tsx
8
+ <Button variant="default" size="default">
9
+ Save changes
10
+ </Button>
11
+ ```
12
+
13
+ | Prop | Values | Default |
14
+ | --- | --- | --- |
15
+ | `variant` | `default`, `secondary`, `soft`, `outline`, `ghost`, `ghost-primary`, `danger`, `soft-danger`, `white` | `default` |
16
+ | `size` | `xs`, `sm`, `default`, `lg`, `xl`, `icon-xs`, `icon-sm`, `icon`, `icon-lg`, `icon-xl` | `default` |
17
+ | `asChild` | `boolean` | `false` |
18
+ | `disabled` | `boolean` | `false` |
19
+ | `aria-busy` | `boolean` | none |
20
+
21
+ ## Examples
22
+
23
+ ```tsx
24
+ <Button>
25
+ <PlusIcon data-icon="inline-start" />
26
+ New item
27
+ </Button>
28
+
29
+ <Button variant="outline">
30
+ Continue
31
+ <ArrowRightIcon data-icon="inline-end" data-rtl-flip="true" />
32
+ </Button>
33
+
34
+ <Button disabled aria-busy="true">
35
+ <Spinner data-icon="inline-start" />
36
+ Loading
37
+ </Button>
38
+ ```
39
+
40
+ ```tsx
41
+ <div dir="rtl">
42
+ <Button>إرسال</Button>
43
+ <Button variant="outline">
44
+ متابعة
45
+ <ArrowRightIcon data-icon="inline-end" data-rtl-flip="true" />
46
+ </Button>
47
+ </div>
48
+ ```
49
+
50
+ ## Token Contract
51
+
52
+ Button consumes semantic interaction, content, border, radius, typography, spacing, opacity, and shadow tokens. Component source should not hard-code Figma color, spacing, radius, or shadow literals.
53
+
54
+ - Typography: `--bh-text-button-font-size`, `--bh-text-button-line-height`, `--bh-text-button-font-weight`, `--bh-text-button-letter-spacing`
55
+ - Shape: `--bh-control-default`
56
+ - Heights and padding: `--bh-button-*-height`, `--bh-button-*-padding-x`, `--bh-button-*-padding-y`
57
+ - Icon rhythm: `--bh-button-icon-size`, `--bh-button-icon-offset`, `--bh-button-label-padding-x`
58
+ - Effects: `--shadow-button-raised`, `--shadow-button-secondary`, `--shadow-button-soft`, `--shadow-button-focus`, `--shadow-button-danger-focus`
59
+
60
+ ## RTL Rules
61
+
62
+ - Button inherits `dir` from the nearest parent.
63
+ - Text labels render with `dir="auto"` so Arabic and English labels resolve naturally.
64
+ - Use `data-icon="inline-start"` and `data-icon="inline-end"` for optical icon offsets.
65
+ - Use `data-rtl-flip="true"` only for directional icons that should mirror, such as arrows and chevrons.
66
+
67
+ ## Accessibility
68
+
69
+ - Use native `type`, `disabled`, and `aria-busy` attributes for behavior.
70
+ - Icon-only buttons must have an accessible name through `aria-label`.
71
+ - Use `asChild` for anchors or router links instead of nesting interactive elements.
72
+
73
+ ## Install
74
+
75
+ ```bash
76
+ npx banhaten add button
77
+ ```
78
+
79
+ <!-- registry-contract:start -->
80
+ ## Registry Contract
81
+
82
+ This table is generated from `registry/index.json`; edit the component-owned source under `registry/catalog/components/`, not this table or the compiled index.
83
+ `supportedExports` is the exhaustive runtime import contract grouped by source module. `parts` is an ordered, non-exhaustive anatomy list.
84
+
85
+ | Field | Values |
86
+ | --- | --- |
87
+ | `supportedExports` | `components/button.tsx: Button, buttonVariants` |
88
+ | `parts` | `Button` |
89
+ | `registryDependencies` | `spinner` |
90
+ | `props.density` | `"compact" \| "default" \| "comfortable"; default "comfortable"; Preferred cross-component sizing contract. Maps to legacy xs, sm, or default sizes while preserving icon-only sizing.` |
91
+ | `densities` | `compact`, `default`, `comfortable` |
92
+ | `sizes` | `xs`, `sm`, `default`, `lg`, `xl`, `icon-xs`, `icon-sm`, `icon`, `icon-lg`, `icon-xl` |
93
+ | `tokens` | `--bh-bg-always-white`, `--bh-bg-success-bold`, `--bh-bg-success-default`, `--bh-bg-success-strong`, `--bh-bg-warning-bold`, `--bh-bg-warning-default`, `--bh-bg-warning-strong`, `--bh-border-brand-strong`, `--bh-border-danger-strong`, `--bh-border-default`, `--bh-border-disabled`, `--bh-border-focus`, `--bh-border-width-default`, `--bh-button-gap`, `--bh-button-gap-xs`, `--bh-button-icon-offset`, `--bh-button-icon-size`, `--bh-button-label-padding-x`, `--bh-button-lg-height`, `--bh-button-lg-padding-x`, `--bh-button-lg-padding-y`, `--bh-button-md-height`, `--bh-button-md-padding-x`, `--bh-button-secondary-border`, `--bh-button-secondary-focus-border`, `--bh-button-sm-height`, `--bh-button-sm-padding-x`, `--bh-button-sm-padding-y`, `--bh-button-xl-height`, `--bh-button-xl-padding-y`, `--bh-button-xs-height`, `--bh-button-xs-padding-x`, `--bh-content-brand-default`, `--bh-content-danger-default`, `--bh-content-default`, `--bh-content-disabled`, `--bh-content-on-brand`, `--bh-content-on-color`, `--bh-content-on-light`, `--bh-control-default`, `--bh-interactive-brand-default`, `--bh-interactive-brand-disabled`, `--bh-interactive-brand-hover`, `--bh-interactive-brand-pressed`, `--bh-interactive-danger-default`, `--bh-interactive-danger-disabled`, `--bh-interactive-danger-hover`, `--bh-interactive-danger-pressed`, `--bh-interactive-danger-soft-default`, `--bh-interactive-danger-soft-disabled`, `--bh-interactive-danger-soft-hover`, `--bh-interactive-danger-soft-pressed`, `--bh-interactive-ghost-default`, `--bh-interactive-ghost-disabled`, `--bh-interactive-ghost-hover`, `--bh-interactive-ghost-pressed`, `--bh-interactive-outlined-default`, `--bh-interactive-outlined-disabled`, `--bh-interactive-outlined-hover`, `--bh-interactive-outlined-pressed`, `--bh-interactive-secondary-default`, `--bh-interactive-secondary-disabled`, `--bh-interactive-secondary-hover`, `--bh-interactive-secondary-pressed`, `--bh-interactive-soft-default`, `--bh-interactive-soft-disabled`, `--bh-interactive-soft-hover`, `--bh-interactive-soft-pressed`, `--bh-opacity-30`, `--bh-space-none`, `--bh-text-button-font-size`, `--bh-text-button-font-weight`, `--bh-text-button-letter-spacing`, `--bh-text-button-line-height`, `--shadow-button-danger-focus`, `--shadow-button-focus`, `--shadow-button-raised`, `--shadow-button-secondary`, `--shadow-button-secondary-focus`, `--shadow-button-soft` |
94
+ | `variants` | `default`, `secondary`, `soft`, `outline`, `ghost`, `ghost-primary`, `danger`, `soft-danger`, `white` |
95
+ <!-- registry-contract:end -->
@@ -0,0 +1,95 @@
1
+ # Card
2
+
3
+ Card is a token-built surface primitive for product summaries, media tiles, and action panels. It supports vertical and horizontal layouts, leading and trailing image treatments, full-image cards, desktop/mobile spacing, footer actions, and RTL-safe text.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npx banhaten add card
9
+ ```
10
+
11
+ ## Anatomy
12
+
13
+ - `Card`: root surface with title, subtitle, description, media, and optional footer composition.
14
+ - `CardMedia`: image/media slot with leading, trailing, or full-image treatment.
15
+ - `CardFooter`: supporting metadata or action area.
16
+ - `CardActions`: Button-composed primary and secondary actions.
17
+
18
+ ## Example
19
+
20
+ ```tsx
21
+ import { Card } from "@/components/ui/card"
22
+
23
+ export function Example() {
24
+ return (
25
+ <Card
26
+ title="Project activity"
27
+ subtitle="Updated 2 minutes ago"
28
+ description="A compact summary of the latest workspace changes."
29
+ orientation="horizontal"
30
+ type="leading-image"
31
+ />
32
+ )
33
+ }
34
+ ```
35
+
36
+ ## Variants
37
+
38
+ | Prop | Values |
39
+ | --- | --- |
40
+ | `orientation` | `vertical`, `horizontal` |
41
+ | `type` | `leading-image`, `trailing-image`, `full-image` |
42
+ | `breakpoint` | `desktop`, `mobile` |
43
+ | `dir` | inherited, `ltr`, `rtl` |
44
+
45
+ ## RTL
46
+
47
+ Card uses logical spacing, inherited direction, and `dir="auto"` copy wrappers so title, subtitle, description, footer actions, and menu affordances mirror naturally.
48
+
49
+ ## API
50
+
51
+ Supported runtime exports: `Card`, `CardActions`, `CardFooter`, `CardMedia`, `cardVariants`.
52
+
53
+ | Contract | Values |
54
+ | --- | --- |
55
+ | `types` | `leading-image`, `trailing-image`, `full-image` |
56
+ | `orientations` | `vertical`, `horizontal` |
57
+
58
+ ## Examples
59
+
60
+ Primary registry example: `examples/card-demo.tsx`.
61
+
62
+ Open the live component page or run `npx banhaten docs card` to inspect source files, install command, and examples.
63
+
64
+ ## Token Contract
65
+
66
+ Component styles must resolve through Banhaten semantic tokens, component aliases, or documented exception-ledger values.
67
+ Do not add raw colors, pixel values, opacity utilities, z-index values, durations, or shadow literals directly to component source.
68
+ Covered source files: `components/card.tsx`, `assets/images/art-01.jpg`.
69
+
70
+ ## RTL Rules
71
+
72
+ - `inheritsDirection`: true
73
+ - `spacing`: Uses logical direction, text-start behavior, and dir="auto" copy so title, subtitle, description, footer actions, and menu affordance mirror naturally.
74
+ - `actions`: The default footer composes the existing Button primitive and keeps action order logical in LTR and RTL.
75
+
76
+ ## Accessibility
77
+
78
+ Keep native semantics, accessible names, keyboard reachability, focus-visible treatment, and status/error announcements intact when composing this component.
79
+
80
+ <!-- registry-contract:start -->
81
+ ## Registry Contract
82
+
83
+ This table is generated from `registry/index.json`; edit the component-owned source under `registry/catalog/components/`, not this table or the compiled index.
84
+ `supportedExports` is the exhaustive runtime import contract grouped by source module. `parts` is an ordered, non-exhaustive anatomy list.
85
+
86
+ | Field | Values |
87
+ | --- | --- |
88
+ | `supportedExports` | `components/card.tsx: Card, CardActions, CardFooter, CardMedia, cardVariants` |
89
+ | `parts` | `Card`, `CardMedia`, `CardFooter`, `CardActions` |
90
+ | `registryDependencies` | `button` |
91
+ | `breakpoints` | `desktop`, `mobile` |
92
+ | `orientations` | `vertical`, `horizontal` |
93
+ | `tokens` | `--bh-bg-accent-green-subtle`, `--bh-bg-accent-sky-subtle`, `--bh-bg-neutral-subtle`, `--bh-bg-raised`, `--bh-border-subtle`, `--bh-border-width-default`, `--bh-card-actions-max-width`, `--bh-card-bg`, `--bh-card-border`, `--bh-card-content-padding`, `--bh-card-desktop-content-padding`, `--bh-card-desktop-full-height`, `--bh-card-desktop-horizontal-padding`, `--bh-card-desktop-media-height`, `--bh-card-full-height`, `--bh-card-horizontal-media-width`, `--bh-card-horizontal-min-height`, `--bh-card-horizontal-padding`, `--bh-card-horizontal-width`, `--bh-card-media-height`, `--bh-card-media-overlay`, `--bh-card-mobile-content-padding`, `--bh-card-mobile-full-height`, `--bh-card-mobile-horizontal-padding`, `--bh-card-mobile-media-height`, `--bh-card-more-icon-size`, `--bh-card-more-size`, `--bh-card-radius`, `--bh-card-vertical-width`, `--bh-content-default`, `--bh-content-on-color`, `--bh-content-subtle`, `--bh-control-default`, `--bh-interactive-ghost-hover`, `--bh-radius-3xl-16`, `--bh-space-3xl-16`, `--bh-space-5xl-24`, `--bh-space-6xl-32`, `--bh-space-md-8`, `--bh-space-xl-12`, `--bh-space-xxs-2`, `--bh-text-body-lg-regular-font-size`, `--bh-text-body-lg-regular-font-weight`, `--bh-text-body-lg-regular-letter-spacing`, `--bh-text-body-lg-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-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`, `--shadow-button-focus` |
94
+ | `types` | `leading-image`, `trailing-image`, `full-image` |
95
+ <!-- registry-contract:end -->
@@ -0,0 +1,61 @@
1
+ # Carousel
2
+
3
+ Carousel is an Embla-backed carousel with content, item, previous, and next controls.
4
+
5
+ ## API
6
+
7
+ ```tsx
8
+ <Carousel messages={{ previousSlide: "Previous item", nextSlide: "Next item" }}>
9
+ <CarouselContent>
10
+ <CarouselItem>Slide</CarouselItem>
11
+ </CarouselContent>
12
+ <CarouselPrevious />
13
+ <CarouselNext />
14
+ </Carousel>
15
+ ```
16
+
17
+ ## Token Contract
18
+
19
+ Carousel controls use Banhaten Button tokens, spacing, radius, and directional icon behavior.
20
+
21
+ ## RTL
22
+
23
+ Directional icons flip in RTL. Direction does not select a language; pass `messages` on `Carousel` or `aria-label` on an individual control. Set Embla options through `opts` when you need a custom direction strategy.
24
+
25
+ ## Accessibility
26
+
27
+ Carousel exposes a region and English button-label defaults for previous and next controls. `messages` accepts partial localized overrides, while a control's direct `aria-label` has highest precedence.
28
+
29
+ ## Install
30
+
31
+ ```bash
32
+ npx banhaten add carousel
33
+ ```
34
+
35
+ ## Examples
36
+
37
+ Primary registry example: `examples/carousel-demo.tsx`.
38
+
39
+ Open the live component page or run `npx banhaten docs carousel` to inspect source files, install command, and examples.
40
+
41
+ ## RTL Rules
42
+
43
+ - `inheritsDirection`: true
44
+ - `directionalIconFlip`: Previous and next arrow icons flip in RTL.
45
+ - `messages`: Direction does not select language. Pass messages or direct aria-label overrides for localized control names.
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/carousel.tsx: Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, arabicCarouselMessages` |
56
+ | `parts` | `Carousel`, `CarouselContent`, `CarouselItem`, `CarouselPrevious`, `CarouselNext` |
57
+ | `registryDependencies` | `button` |
58
+ | `features` | `Embla API`, `previous and next controls`, `plugin support` |
59
+ | `orientations` | `horizontal`, `vertical` |
60
+ | `tokens` | `--bh-radius-full`, `--bh-space-3xl-16`, `--bh-space-7xl-40`, `--bh-space-8xl-48` |
61
+ <!-- registry-contract:end -->