banhaten 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/README.md +93 -328
  2. package/banhaten.config.example.json +1 -1
  3. package/docs/design-system/README.md +11 -0
  4. package/docs/design-system/appearance-presets.md +184 -0
  5. package/docs/design-system/appearances/default.md +94 -0
  6. package/docs/design-system/appearances/rounded.md +95 -0
  7. package/docs/design-system/appearances/sharp.md +95 -0
  8. package/docs/design-system/component-showcase-consistency-report.md +217 -0
  9. package/docs/design-system/component-token-consistency-audit.md +163 -0
  10. package/docs/design-system/components/README.md +74 -0
  11. package/docs/design-system/components/accordion.md +51 -0
  12. package/docs/design-system/components/activity-feed.md +92 -0
  13. package/docs/design-system/components/alert-dialog.md +70 -0
  14. package/docs/design-system/components/alert.md +79 -0
  15. package/docs/design-system/components/aspect-ratio.md +44 -0
  16. package/docs/design-system/components/attribute.md +87 -0
  17. package/docs/design-system/components/autocomplete.md +74 -0
  18. package/docs/design-system/components/avatar.md +52 -0
  19. package/docs/design-system/components/badge.md +53 -0
  20. package/docs/design-system/components/banner.md +85 -0
  21. package/docs/design-system/components/breadcrumbs.md +174 -0
  22. package/docs/design-system/components/button-group.md +83 -0
  23. package/docs/design-system/components/button.md +77 -0
  24. package/docs/design-system/components/card.md +78 -0
  25. package/docs/design-system/components/carousel.md +44 -0
  26. package/docs/design-system/components/catalog-components.md +45 -0
  27. package/docs/design-system/components/chart.md +43 -0
  28. package/docs/design-system/components/checkbox.md +52 -0
  29. package/docs/design-system/components/collapsible.md +48 -0
  30. package/docs/design-system/components/command-bar.md +57 -0
  31. package/docs/design-system/components/command.md +60 -0
  32. package/docs/design-system/components/context-menu.md +44 -0
  33. package/docs/design-system/components/date-picker.md +77 -0
  34. package/docs/design-system/components/divider.md +101 -0
  35. package/docs/design-system/components/empty-state.md +55 -0
  36. package/docs/design-system/components/field.md +69 -0
  37. package/docs/design-system/components/file-upload.md +185 -0
  38. package/docs/design-system/components/hover-card.md +46 -0
  39. package/docs/design-system/components/icons.md +48 -0
  40. package/docs/design-system/components/input-group.md +56 -0
  41. package/docs/design-system/components/input-otp.md +55 -0
  42. package/docs/design-system/components/input.md +48 -0
  43. package/docs/design-system/components/kbd.md +44 -0
  44. package/docs/design-system/components/label.md +48 -0
  45. package/docs/design-system/components/menu.md +59 -0
  46. package/docs/design-system/components/menubar.md +45 -0
  47. package/docs/design-system/components/modal.md +98 -0
  48. package/docs/design-system/components/native-select.md +52 -0
  49. package/docs/design-system/components/navigation-menu.md +48 -0
  50. package/docs/design-system/components/onboarding-step-list-item.md +80 -0
  51. package/docs/design-system/components/page-header.md +84 -0
  52. package/docs/design-system/components/pagination.md +49 -0
  53. package/docs/design-system/components/popover.md +58 -0
  54. package/docs/design-system/components/progress-slider.md +48 -0
  55. package/docs/design-system/components/progress.md +75 -0
  56. package/docs/design-system/components/radio-card.md +49 -0
  57. package/docs/design-system/components/radio-group.md +55 -0
  58. package/docs/design-system/components/resizable.md +42 -0
  59. package/docs/design-system/components/scroll-area.md +45 -0
  60. package/docs/design-system/components/select.md +50 -0
  61. package/docs/design-system/components/sheet.md +65 -0
  62. package/docs/design-system/components/sidebar.md +68 -0
  63. package/docs/design-system/components/skeleton.md +73 -0
  64. package/docs/design-system/components/slideout.md +63 -0
  65. package/docs/design-system/components/slider.md +61 -0
  66. package/docs/design-system/components/social-button.md +47 -0
  67. package/docs/design-system/components/spinner.md +61 -0
  68. package/docs/design-system/components/steps.md +63 -0
  69. package/docs/design-system/components/table.md +397 -0
  70. package/docs/design-system/components/tabs.md +52 -0
  71. package/docs/design-system/components/tag.md +78 -0
  72. package/docs/design-system/components/textarea.md +48 -0
  73. package/docs/design-system/components/timeline.md +81 -0
  74. package/docs/design-system/components/toast.md +56 -0
  75. package/docs/design-system/components/toggle.md +79 -0
  76. package/docs/design-system/components/toolbar.md +85 -0
  77. package/docs/design-system/components/tooltip.md +90 -0
  78. package/docs/design-system/components/typography.md +18 -0
  79. package/docs/design-system/design-system-test-missing-items.md +368 -0
  80. package/docs/design-system/icons.md +69 -0
  81. package/docs/design-system/registry-and-cli.md +41 -0
  82. package/docs/design-system/tabs.md +53 -0
  83. package/docs/design-system/token-governance.md +38 -0
  84. package/package.json +83 -65
  85. package/registry/components/alert-dialog.tsx +297 -0
  86. package/registry/components/aspect-ratio.tsx +30 -0
  87. package/registry/components/carousel.tsx +234 -0
  88. package/registry/components/chart.tsx +170 -0
  89. package/registry/components/collapsible.tsx +69 -0
  90. package/registry/components/command.tsx +174 -0
  91. package/registry/components/context-menu.tsx +236 -0
  92. package/registry/components/date-picker.tsx +1 -1
  93. package/registry/components/expanded/PageHeader.tsx +1 -1
  94. package/registry/components/expanded/breadcrumbs.css +139 -139
  95. package/registry/components/expanded/catalogComponentsShowcase.css +83 -83
  96. package/registry/components/expanded/steps.css +274 -274
  97. package/registry/components/expanded/timeline.css +264 -264
  98. package/registry/components/field.tsx +230 -0
  99. package/registry/components/hover-card.tsx +48 -0
  100. package/registry/components/input-group.tsx +130 -0
  101. package/registry/components/input.tsx +2 -2
  102. package/registry/components/kbd.tsx +44 -0
  103. package/registry/components/label.tsx +78 -0
  104. package/registry/components/menu.tsx +3 -1
  105. package/registry/components/menubar.tsx +226 -0
  106. package/registry/components/modal.tsx +109 -76
  107. package/registry/components/native-select.tsx +205 -0
  108. package/registry/components/navigation-menu.tsx +171 -0
  109. package/registry/components/radio-group.tsx +1 -1
  110. package/registry/components/resizable.tsx +74 -0
  111. package/registry/components/scroll-area.tsx +67 -0
  112. package/registry/components/select.tsx +2 -4
  113. package/registry/components/sheet.tsx +305 -0
  114. package/registry/components/sidebar.tsx +352 -0
  115. package/registry/components/social-button.tsx +74 -10
  116. package/registry/components/{expanded/tabs.css → tabs.css} +127 -106
  117. package/registry/components/tabs.tsx +242 -0
  118. package/registry/components/textarea.tsx +1 -1
  119. package/registry/components/toast.tsx +131 -0
  120. package/registry/examples/alert-dialog-demo.tsx +42 -0
  121. package/registry/examples/aspect-ratio-demo.tsx +11 -0
  122. package/registry/examples/carousel-demo.tsx +25 -0
  123. package/registry/examples/chart-demo.tsx +33 -0
  124. package/registry/examples/collapsible-demo.tsx +16 -0
  125. package/registry/examples/command-demo.tsx +42 -0
  126. package/registry/examples/context-menu-demo.tsx +29 -0
  127. package/registry/examples/expanded/tabs-demo.tsx +1 -1
  128. package/registry/examples/field-demo.tsx +51 -0
  129. package/registry/examples/hover-card-demo.tsx +23 -0
  130. package/registry/examples/input-group-demo.tsx +16 -0
  131. package/registry/examples/kbd-demo.tsx +11 -0
  132. package/registry/examples/label-demo.tsx +20 -0
  133. package/registry/examples/menubar-demo.tsx +34 -0
  134. package/registry/examples/native-select-demo.tsx +16 -0
  135. package/registry/examples/navigation-menu-demo.tsx +29 -0
  136. package/registry/examples/resizable-demo.tsx +22 -0
  137. package/registry/examples/scroll-area-demo.tsx +15 -0
  138. package/registry/examples/sheet-demo.tsx +47 -0
  139. package/registry/examples/sidebar-demo.tsx +55 -0
  140. package/registry/examples/tabs-demo.tsx +13 -0
  141. package/registry/examples/toast-demo.tsx +35 -0
  142. package/registry/index.json +655 -11
  143. package/registry/styles/globals.css +4733 -4690
  144. package/registry.json +1612 -0
  145. package/schema/config.schema.json +48 -0
  146. package/schema/registry.schema.json +85 -0
  147. package/schema/tokens.schema.json +63 -0
  148. package/src/cli/index.js +312 -18
  149. package/tokens/banhaten.tokens.json +1 -1
  150. package/registry/assets/avatars/avatar-02.jpg +0 -0
  151. package/registry/assets/avatars/avatar-03.jpg +0 -0
  152. package/registry/assets/avatars/avatar-04.jpg +0 -0
  153. package/registry/assets/avatars/avatar-05.jpg +0 -0
  154. package/registry/assets/avatars/avatar-06.jpg +0 -0
  155. package/registry/assets/avatars/avatar-07.jpg +0 -0
  156. package/registry/assets/avatars/avatar-08.jpg +0 -0
  157. package/registry/assets/avatars/avatar-09.jpg +0 -0
  158. package/registry/assets/avatars/avatar-10.jpg +0 -0
  159. package/registry/assets/avatars/avatar-11.jpg +0 -0
  160. package/registry/assets/avatars/avatar-12.jpg +0 -0
  161. package/registry/assets/avatars/avatar-13.jpg +0 -0
  162. package/registry/assets/avatars/avatar-14.jpg +0 -0
  163. package/registry/assets/avatars/avatar-15.jpg +0 -0
  164. package/registry/assets/avatars/avatar-16.jpg +0 -0
  165. package/registry/assets/avatars/avatar-17.jpg +0 -0
  166. package/registry/assets/avatars/avatar-18.jpg +0 -0
  167. package/registry/assets/avatars/avatar-19.jpg +0 -0
  168. package/registry/assets/avatars/avatar-20.jpg +0 -0
  169. package/registry/assets/avatars/avatar-21.jpg +0 -0
  170. package/registry/assets/avatars/avatar-22.jpg +0 -0
  171. package/registry/assets/avatars/avatar-23.jpg +0 -0
  172. package/registry/assets/avatars/avatar-24.jpg +0 -0
  173. package/registry/assets/avatars/avatar-25.jpg +0 -0
  174. package/registry/assets/avatars/avatar-26.jpg +0 -0
  175. package/registry/assets/avatars/avatar-27.jpg +0 -0
  176. package/registry/assets/avatars/avatar-28.jpg +0 -0
  177. package/registry/assets/avatars/avatar-29.jpg +0 -0
  178. package/registry/assets/avatars/avatar-30.jpg +0 -0
  179. package/registry/assets/avatars/avatar-31.jpg +0 -0
  180. package/registry/assets/avatars/avatar-32.jpg +0 -0
  181. package/registry/assets/avatars/avatar-33.jpg +0 -0
  182. package/registry/assets/avatars/avatar-34.jpg +0 -0
  183. package/registry/assets/avatars/avatar-35.jpg +0 -0
  184. package/registry/assets/image-assets.json +0 -744
  185. package/registry/assets/images/art-02.jpg +0 -0
  186. package/registry/assets/images/art-03.jpg +0 -0
  187. package/registry/assets/images/art-04.jpg +0 -0
  188. package/registry/assets/images/art-05.jpg +0 -0
  189. package/registry/assets/images/art-06.jpg +0 -0
  190. package/registry/assets/images/art-07.jpg +0 -0
  191. package/registry/assets/images/art-08.jpg +0 -0
  192. package/registry/assets/images/art-09.jpg +0 -0
  193. package/registry/assets/images/art-10.jpg +0 -0
  194. package/registry/assets/images/art-11.jpg +0 -0
  195. package/registry/assets/images/art-12.jpg +0 -0
  196. package/registry/assets/images/art-13.jpg +0 -0
  197. package/registry/assets/images/art-14.jpg +0 -0
  198. package/registry/assets/images/art-15.jpg +0 -0
  199. package/registry/assets/images/art-16.jpg +0 -0
  200. package/registry/assets/images/art-17.jpg +0 -0
  201. package/registry/assets/images/art-18.jpg +0 -0
  202. package/registry/assets/images/art-19.jpg +0 -0
  203. package/registry/assets/images/art-20.jpg +0 -0
  204. package/registry/assets/images/art-21.jpg +0 -0
  205. package/registry/assets/images/art-22.jpg +0 -0
  206. package/registry/assets/images/art-23.jpg +0 -0
  207. package/registry/assets/images/art-24.jpg +0 -0
  208. package/registry/assets/images/art-25.jpg +0 -0
  209. package/registry/assets/images/art-26.jpg +0 -0
  210. package/registry/assets/images/art-27.jpg +0 -0
  211. package/registry/assets/images/nature-01.jpg +0 -0
  212. package/registry/assets/images/nature-02.jpg +0 -0
  213. package/registry/assets/images/nature-03.jpg +0 -0
  214. package/registry/assets/images/nature-04.jpg +0 -0
  215. package/registry/assets/images/nature-05.jpg +0 -0
  216. package/registry/assets/images/nature-06.jpg +0 -0
  217. package/registry/assets/images/nature-07.jpg +0 -0
  218. package/registry/assets/images/nature-08.jpg +0 -0
  219. package/registry/assets/images/nature-09.jpg +0 -0
  220. package/registry/assets/images/nature-10.jpg +0 -0
  221. package/registry/assets/images/nature-11.jpg +0 -0
  222. package/registry/assets/images/nature-12.jpg +0 -0
  223. package/registry/assets/images/nature-13.jpg +0 -0
  224. package/registry/assets/images/nature-14.jpg +0 -0
  225. package/registry/assets/images/nature-15.jpg +0 -0
  226. package/registry/assets/images/nature-16.jpg +0 -0
  227. package/registry/assets/images/nature-17.jpg +0 -0
  228. package/registry/assets/images/nature-18.jpg +0 -0
  229. package/registry/assets/images/nature-19.jpg +0 -0
  230. package/registry/assets/images/nature-20.jpg +0 -0
  231. package/registry/components/expanded/Tabs.tsx +0 -86
@@ -0,0 +1,81 @@
1
+ # Timeline
2
+
3
+ Timelines show ordered progress or dated events. Use `Timeline` for a complete sequence and `TimelineItem` when a consumer needs to compose a custom layout.
4
+
5
+ Figma references:
6
+
7
+ - `TimelineVetical`, node `572:6768`
8
+ - `TimeLineHorizontal`, node `584:4501`
9
+ - `TimelineVerticalItem`, node `572:6444`
10
+ - `TimelineHorizontalItem`, node `582:4214`
11
+
12
+ ## Variants
13
+
14
+ | Prop | Values |
15
+ | --- | --- |
16
+ | `orientation` | `vertical`, `horizontal` |
17
+ | `variant` | `default`, `icon` |
18
+ | `state` | `finished`, `active`, `inactive` |
19
+ | `dir` | `ltr`, `rtl` |
20
+
21
+ The Figma source includes vertical timelines with seven steps and horizontal timelines with six steps. Code accepts any `steps` array.
22
+
23
+ ## API
24
+
25
+ ```tsx
26
+ <Timeline
27
+ orientation="vertical"
28
+ variant="default"
29
+ dir="ltr"
30
+ steps={[
31
+ { label: "Label", caption: "Caption", date: "Mar 15. 2050", state: "finished" },
32
+ { label: "Label", caption: "Caption", date: "Mar 15. 2050", state: "active" },
33
+ { label: "Label", caption: "Caption", date: "Mar 15. 2050", state: "inactive" },
34
+ ]}
35
+ />
36
+ ```
37
+
38
+ `TimelineStep` supports `label`, `caption`, `date`, `topDate`, `bottomDate`, `state`, `icon`, and visibility flags for leading/top/bottom dates, caption, connector line, and bottom padding.
39
+
40
+ ## Token Contract
41
+
42
+ - `--bg-brand-default`: filled icon marker
43
+ - `--bg-default`: default marker center
44
+ - `--bg-muted`: inactive icon marker
45
+ - `--border-brand-strong`: finished connector line
46
+ - `--border-default`: active and inactive connector line
47
+ - `--content-default`: labels and inactive check
48
+ - `--content-subtle`: dates and captions
49
+ - `--radius-full`: marker and line radius
50
+
51
+ ## Pixel Rules
52
+
53
+ - Dates are `12px / 16px`, regular.
54
+ - Labels are `15px / 24px`, semibold.
55
+ - Captions are `14px / 20px`, regular.
56
+ - Default markers reserve a `20px` box with a small circular ring.
57
+ - Icon markers are `28px` circles with an 18px check glyph.
58
+ - Vertical item gaps use `12px`; horizontal item body spacing uses `10px`.
59
+ - Finished connector lines use the brand border color.
60
+ - Active and inactive connector lines use the default border color.
61
+ - RTL mirrors the date/content placement while preserving source step order.
62
+
63
+ ## Install
64
+
65
+ ```bash
66
+ npx banhaten add timeline
67
+ ```
68
+
69
+ ## Examples
70
+
71
+ Primary registry example: `examples/expanded/timeline-demo.tsx`.
72
+
73
+ Open the live component page or run `npx banhaten docs timeline` to inspect source files, install command, and examples.
74
+
75
+ ## RTL Rules
76
+
77
+ This component has no special RTL contract beyond inherited document direction and logical spacing.
78
+
79
+ ## Accessibility
80
+
81
+ Keep native semantics, accessible names, keyboard reachability, focus-visible treatment, and status/error announcements intact when composing this component.
@@ -0,0 +1,56 @@
1
+ # Toast
2
+
3
+ Toast provides transient feedback for saves, errors, warnings, background work, and undoable actions. It uses a Sonner-style API with Banhaten token styling, semantic intents, action support, and logical LTR/RTL placement.
4
+
5
+ ## API
6
+
7
+ ```tsx
8
+ <Toaster />
9
+
10
+ toast.success("Project saved")
11
+ toast.danger("Unable to publish", {
12
+ action: { label: "Retry", onClick: retry },
13
+ })
14
+ ```
15
+
16
+ | Export | Purpose |
17
+ | --- | --- |
18
+ | `Toaster` | app-level toast viewport |
19
+ | `toast` | imperative toast API |
20
+ | `toast.success`, `toast.info`, `toast.warning`, `toast.danger` | semantic shortcuts |
21
+
22
+ | Prop | Values |
23
+ | --- | --- |
24
+ | `dir` | `ltr`, `rtl` |
25
+ | `side` | `start`, `end` |
26
+ | `position` | Sonner position override |
27
+
28
+ ## Token Contract
29
+
30
+ Toast uses Banhaten raised surface, border, shadow, radius, body typography, action, danger, warning, success, info, and content tokens.
31
+
32
+ ## RTL
33
+
34
+ `side="end"` resolves to top-right in LTR and top-left in RTL. Use `side="start"` for the opposite logical edge.
35
+
36
+ ## Accessibility
37
+
38
+ Keep toast copy short and pair destructive failures with a visible retry or recovery path when possible. Do not use toasts as the only place for critical validation errors.
39
+
40
+ ## Install
41
+
42
+ ```bash
43
+ npx banhaten add toast
44
+ ```
45
+
46
+ ## Examples
47
+
48
+ Primary registry example: `examples/toast-demo.tsx`.
49
+
50
+ Open the live component page or run `npx banhaten docs toast` to inspect source files, install command, and examples.
51
+
52
+ ## RTL Rules
53
+
54
+ - `inheritsDirection`: true
55
+ - `placement`: side="end" resolves to top-right in LTR and top-left in RTL; side="start" resolves to the opposite edge.
56
+ - `textDirection`: Toast content inherits the Toaster direction and uses tokenized typography classes.
@@ -0,0 +1,79 @@
1
+ # Toggle
2
+
3
+ Toggle is a Radix Switch-backed boolean control. It supports sm and md switch geometry, active and disabled states, optional handle icons, labeled leading or trailing compositions, supporting text, and inherited RTL direction.
4
+
5
+ The implementation follows the Figma components at `Design system 3.0 Copy / Toogle` (`175:23379`) and `Toggle label` (`175:23443`).
6
+
7
+ ## API
8
+
9
+ Use `Toggle` for standalone controls with an accessible label.
10
+
11
+ ```tsx
12
+ <Toggle aria-label="Enable notifications" defaultChecked />
13
+ ```
14
+
15
+ Use `ToggleField` when the visible label and supporting text should name the switch.
16
+
17
+ ```tsx
18
+ <ToggleField
19
+ defaultChecked
20
+ controlPosition="end"
21
+ label="Email notifications"
22
+ description="Send product updates and billing activity."
23
+ />
24
+ ```
25
+
26
+ ## Variants
27
+
28
+ | Prop | Values |
29
+ | --- | --- |
30
+ | `size` | `sm`, `md` |
31
+ | `showIcon` | `boolean` |
32
+ | `ToggleField controlPosition` | `start`, `end` |
33
+ | `disabled` | `boolean` |
34
+
35
+ ## Tokens
36
+
37
+ Toggle uses the existing Banhaten switch aliases:
38
+
39
+ | Purpose | Token |
40
+ | --- | --- |
41
+ | Default track | `--bh-interactive-switch-default` |
42
+ | Hover track | `--bh-interactive-switch-hover` |
43
+ | Active track | `--bh-interactive-switch-active` |
44
+ | Active hover track | `--bh-interactive-switch-active-hover` |
45
+ | Disabled track | `--bh-interactive-switch-disabled` |
46
+ | Handle | `--bh-interactive-switch-handle` |
47
+ | Disabled handle | `--bh-interactive-switch-handle-disabled` |
48
+ | Focus ring | `--shadow-social-button-focus-ring` |
49
+
50
+ Text uses body-md for labels and body-xs for supporting text. ToggleField uses logical start/end placement so label order and thumb motion mirror in RTL.
51
+
52
+ ## Install
53
+
54
+ ```bash
55
+ npx banhaten add toggle
56
+ ```
57
+
58
+ ## Examples
59
+
60
+ Primary registry example: `examples/toggle-demo.tsx`.
61
+
62
+ Open the live component page or run `npx banhaten docs toggle` 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/toggle.tsx`.
69
+
70
+ ## RTL Rules
71
+
72
+ - `inheritsDirection`: true
73
+ - `controlPlacement`: ToggleField uses start/end control placement so the switch and text order mirror in RTL.
74
+ - `handleMotion`: The thumb translates with logical direction, so checked state moves to the visual end edge in LTR and RTL.
75
+ - `textDirection`: Labels and descriptions use dir="auto" with tokenized body-md/body-xs typography.
76
+
77
+ ## Accessibility
78
+
79
+ This component relies on `@radix-ui/react-switch` for its base accessibility behavior. Keep required labels, titles, descriptions, and focusable trigger/content relationships intact when composing it.
@@ -0,0 +1,85 @@
1
+ # Toolbar
2
+
3
+ Toolbar is the token-built implementation of the Figma `Filter Toolbar` component set. It supports eight filter/action layouts, desktop and mobile wrapping, and inherited LTR/RTL direction.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npx banhaten add toolbar
9
+ ```
10
+
11
+ ## Anatomy
12
+
13
+ - `Toolbar`: root layout surface with `inline`, `split`, `stack`, and `wrap` modes.
14
+ - `ToolbarSection`: grouped start, end, wrapped, or stacked control regions.
15
+ - `ToolbarSearch`: tokenized search input using Banhaten input height, radius, typography, and focus ring.
16
+ - `ToolbarSelect`: button-backed filter trigger using select/input tokens.
17
+ - `ToolbarButton`: toolbar action button built with the same Slot and text-label construction as Button.
18
+ - `ToolbarIconButton`, `ToolbarFilterButton`, `ToolbarMoreButton`: icon action helpers.
19
+ - `ToolbarBadge`: selected-count or applied-filter metadata.
20
+ - `ToolbarText` and `ToolbarSpacer`: supporting label and layout slots.
21
+
22
+ ## Example
23
+
24
+ ```tsx
25
+ import {
26
+ Toolbar,
27
+ ToolbarButton,
28
+ ToolbarFilterButton,
29
+ ToolbarMoreButton,
30
+ ToolbarSearch,
31
+ ToolbarSection,
32
+ ToolbarSelect,
33
+ } from "@/components/ui/toolbar"
34
+
35
+ export function Example() {
36
+ return (
37
+ <Toolbar layout="split" wrap>
38
+ <ToolbarSection grow wrap>
39
+ <ToolbarSearch aria-label="Search objects" />
40
+ <ToolbarSelect value="Status" />
41
+ <ToolbarSelect value="Owner" />
42
+ <ToolbarFilterButton />
43
+ </ToolbarSection>
44
+ <ToolbarSection align="end" wrap>
45
+ <ToolbarMoreButton />
46
+ <ToolbarButton variant="soft">Export</ToolbarButton>
47
+ <ToolbarButton>Create Object</ToolbarButton>
48
+ </ToolbarSection>
49
+ </Toolbar>
50
+ )
51
+ }
52
+ ```
53
+
54
+ ## Token Contract
55
+
56
+ Toolbar styling is derived from the existing control tokens: `--bh-input-lg-height`, `--bh-input-radius`, `--bh-input-width`, `--bh-select-width`, `--bh-space-xl-12`, `--bh-space-3xl-16`, `--bh-control-default`, input/select/button shadows, and semantic content/interactive tokens.
57
+
58
+ ## RTL
59
+
60
+ Set `dir="rtl"` on `Toolbar` or inherit it from the document. Sections, fields, button labels, badges, and search text use logical spacing and `dir="auto"` for mixed-language labels.
61
+
62
+ ## API
63
+
64
+ Public exports: `Toolbar`, `ToolbarSection`, `ToolbarSearch`, `ToolbarSelect`, `ToolbarButton`, `ToolbarIconButton`, `ToolbarFilterButton`, `ToolbarMoreButton`, `ToolbarBadge`, `ToolbarText`, `ToolbarSpacer`.
65
+
66
+ | Contract | Values |
67
+ | --- | --- |
68
+ | `styles` | `filter-fields`, `filter-actions`, `selection-actions`, `grouped-fields`, `field-grid`, `inline-search`, `filter-chips`, `saved-segment` |
69
+ | `layouts` | `inline`, `split`, `stack`, `wrap` |
70
+
71
+ ## Examples
72
+
73
+ Primary registry example: `examples/toolbar-demo.tsx`.
74
+
75
+ Open the live component page or run `npx banhaten docs toolbar` to inspect source files, install command, and examples.
76
+
77
+ ## RTL Rules
78
+
79
+ - `inheritsDirection`: true
80
+ - `textAlignment`: Uses logical section layout and dir="auto" labels so mixed English and Arabic filter text aligns naturally.
81
+ - `spacing`: Uses tokenized flex gaps and logical icon attributes so search, fields, chips, summaries, and actions mirror without alternate APIs.
82
+
83
+ ## Accessibility
84
+
85
+ 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.
@@ -0,0 +1,90 @@
1
+ # Tooltip
2
+
3
+ Tooltip is a Radix Tooltip-backed help surface matched to the Figma tooltip matrix. It supports dark and default surfaces, small and large sizes, shortcut and close slots, logical pointer positions, tokenized shadows, and RTL-safe layout.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npx banhaten add tooltip
9
+ ```
10
+
11
+ ## Anatomy
12
+
13
+ - `TooltipProvider`: shared Radix provider for delay timing.
14
+ - `Tooltip`: root tooltip wrapper.
15
+ - `TooltipTrigger`: trigger element.
16
+ - `TooltipContent`: positioned surface with pointer, title, support text, shortcut, and close affordance.
17
+ - `TooltipShortcut`: shortcut slot.
18
+ - `TooltipCloseButton`: optional close affordance.
19
+
20
+ ## Example
21
+
22
+ ```tsx
23
+ import {
24
+ Tooltip,
25
+ TooltipContent,
26
+ TooltipProvider,
27
+ TooltipTrigger,
28
+ } from "@/components/ui/tooltip"
29
+ import { Button } from "@/components/ui/button"
30
+
31
+ export function Example() {
32
+ return (
33
+ <TooltipProvider>
34
+ <Tooltip>
35
+ <TooltipTrigger asChild>
36
+ <Button variant="secondary">Details</Button>
37
+ </TooltipTrigger>
38
+ <TooltipContent pointerPosition="top-center" size="lg">
39
+ More information
40
+ </TooltipContent>
41
+ </Tooltip>
42
+ </TooltipProvider>
43
+ )
44
+ }
45
+ ```
46
+
47
+ ## Variants
48
+
49
+ | Prop | Values |
50
+ | --- | --- |
51
+ | `variant` | `dark`, `default` |
52
+ | `size` | `sm`, `lg` |
53
+ | `pointerPosition` | `top-left`, `top-center`, `top-right`, `bottom-left`, `bottom-center`, `bottom-right`, `center-left`, `center-right`, `none` |
54
+ | `showPointer` | `boolean` |
55
+
56
+ ## RTL
57
+
58
+ Tooltip content uses inherited direction and `dir="auto"` text. Top and bottom left/right positions map to logical start/end in RTL, while center-left and center-right remain physical sides to match the Figma matrix.
59
+
60
+ ## API
61
+
62
+ Public exports: `Tooltip`, `TooltipRoot`, `TooltipTrigger`, `TooltipContent`, `TooltipProvider`, `TooltipPortal`, `TooltipShortcut`, `TooltipCloseButton`.
63
+
64
+ | Contract | Values |
65
+ | --- | --- |
66
+ | `variants` | `dark`, `default` |
67
+ | `sizes` | `sm`, `lg` |
68
+
69
+ ## Examples
70
+
71
+ Primary registry example: `examples/tooltip-demo.tsx`.
72
+
73
+ Open the live component page or run `npx banhaten docs tooltip` to inspect source files, install command, and examples.
74
+
75
+ ## Token Contract
76
+
77
+ Component styles must resolve through Banhaten semantic tokens, component aliases, or documented exception-ledger values.
78
+ Do not add raw colors, pixel values, opacity utilities, z-index values, durations, or shadow literals directly to component source.
79
+ Covered source files: `components/tooltip.tsx`.
80
+
81
+ ## RTL Rules
82
+
83
+ - `inheritsDirection`: true
84
+ - `spacing`: Uses inherited direction with flex layout so label/shortcut and text/close order mirror naturally.
85
+ - `pointerPlacement`: Top and bottom left/right positions map to logical start/end in RTL. Center-left and center-right remain physical sides to match the Figma matrix.
86
+ - `textDirection`: Labels and support text use dir="auto" for Arabic and English copy.
87
+
88
+ ## Accessibility
89
+
90
+ This component relies on `@radix-ui/react-tooltip` for its base accessibility behavior. Keep required labels, titles, descriptions, and focusable trigger/content relationships intact when composing it.
@@ -0,0 +1,18 @@
1
+ # Typography
2
+
3
+ Banhaten exposes text utility classes generated from the design token contract. Use `.bh-text-*` classes when you need token-exact typography without pulling in a React component.
4
+
5
+ ## Usage
6
+
7
+ ```html
8
+ <h1 class="bh-text-heading-lg-semibold">Workspace overview</h1>
9
+ <p class="bh-text-body-md-regular">Review project status and owners.</p>
10
+ ```
11
+
12
+ ## Families
13
+
14
+ The classes mirror token names across Display, Heading, and Body styles. Each class applies font size, line height, font weight, and letter spacing from `registry/styles/globals.css`.
15
+
16
+ ## RTL
17
+
18
+ Typography classes do not set direction. Use `dir`, `lang`, and logical text alignment on the surrounding element.