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,184 @@
1
+ # Appearance Presets
2
+
3
+ Appearance presets change the feel of the design system without changing component APIs.
4
+
5
+ Components keep semantic variants such as `primary`, `secondary`, `subtle`, `danger`, and `ghost`. Presets decide how those meanings look through design tokens: color, radius, density, border, and elevation.
6
+
7
+ ## Presets
8
+
9
+ - `default`: The baseline product UI. Gray application background, white cards, modest radius, conservative spacing.
10
+ - `rounded`: A softer UI. White application background, stronger radius, relaxed spacing, gentler separation.
11
+ - `sharp`: A precise UI. Square edges, tighter spacing, clearer borders, minimal elevation.
12
+
13
+ Each preset has its own markdown file:
14
+
15
+ - [Default](./appearances/default.md)
16
+ - [Rounded](./appearances/rounded.md)
17
+ - [Sharp](./appearances/sharp.md)
18
+
19
+ Component specs:
20
+
21
+ - [Icons](./icons.md)
22
+ - [Tabs](./tabs.md)
23
+ - [Tag](./components/tag.md)
24
+ - [Timeline](./components/timeline.md)
25
+
26
+ Component guidance lives in:
27
+
28
+ - [Components](./components/README.md)
29
+ - [Banner](./components/banner.md)
30
+ - [Breadcrumbs](./components/breadcrumbs.md)
31
+ - [Divider](./components/divider.md)
32
+ - [File Upload](./components/file-upload.md)
33
+ - [Tag](./components/tag.md)
34
+ - [Timeline](./components/timeline.md)
35
+
36
+ ## Token Contract
37
+
38
+ The design system should use semantic tokens instead of importing naming patterns from a framework. Tokens describe where they are used, not how they happen to look in one theme.
39
+
40
+ ### Content
41
+
42
+ `content` tokens apply to text and icons.
43
+
44
+ - `content.default`
45
+ - `content.primary`
46
+ - `content.subtle`
47
+ - `content.muted`
48
+ - `content.disabled`
49
+ - `content.inverse`
50
+ - `content.link`
51
+ - `content.linkHover`
52
+ - `content.onColor`
53
+ - `content.onLight`
54
+ - `content.onBrand`
55
+ - `content.success`
56
+ - `content.warning`
57
+ - `content.danger`
58
+
59
+ ### Background
60
+
61
+ `background` tokens apply to page, layout, component, and interactive fills.
62
+
63
+ - `background.app`
64
+ - `background.default`
65
+ - `background.card`
66
+ - `background.subtle`
67
+ - `background.muted`
68
+ - `background.disabled`
69
+ - `background.inverse`
70
+ - `background.overlay`
71
+ - `background.brand`
72
+ - `background.brandHover`
73
+ - `background.brandPressed`
74
+ - `background.selected`
75
+ - `background.hover`
76
+ - `background.pressed`
77
+ - `background.success`
78
+ - `background.warning`
79
+ - `background.danger`
80
+
81
+ ### Border
82
+
83
+ `border` tokens apply to component outlines, dividers, focus states, and validation states.
84
+
85
+ - `border.default`
86
+ - `border.subtle`
87
+ - `border.strong`
88
+ - `border.disabled`
89
+ - `border.focus`
90
+ - `border.brand`
91
+ - `border.success`
92
+ - `border.warning`
93
+ - `border.danger`
94
+
95
+ ### Shape
96
+
97
+ `shape` tokens control radius by usage, not component name.
98
+
99
+ - `shape.action`
100
+ - `shape.control`
101
+ - `shape.card`
102
+ - `shape.panel`
103
+ - `shape.modal`
104
+ - `shape.popover`
105
+ - `shape.badge`
106
+ - `shape.avatar`
107
+
108
+ ### Density
109
+
110
+ `density` tokens control repeated spacing and sizing decisions.
111
+
112
+ - `density.controlHeight`
113
+ - `density.controlPaddingX`
114
+ - `density.cardPadding`
115
+ - `density.panelPadding`
116
+ - `density.sectionGap`
117
+ - `density.listRowHeight`
118
+ - `density.tableRowHeight`
119
+
120
+ ### Elevation
121
+
122
+ `elevation` tokens control shadows and stacking treatment.
123
+
124
+ - `elevation.card`
125
+ - `elevation.panel`
126
+ - `elevation.popover`
127
+ - `elevation.modal`
128
+ - `elevation.none`
129
+
130
+ ## Component Rule
131
+
132
+ Components consume semantic tokens and component-scoped aliases. They must not hard-code preset-specific values or Figma fallback literals in component source.
133
+
134
+ If a Figma reference exposes a literal color, size, radius, shadow, or opacity, promote it into the generated token contract or a component-level `--bh-*` alias in `registry/styles/globals.css`, then consume that token from the component. Component docs may record Figma references for audit and QA, but those literals are not implementation fallbacks.
135
+
136
+ Good:
137
+
138
+ ```tsx
139
+ <Button variant="primary" />
140
+ <Card />
141
+ ```
142
+
143
+ Avoid:
144
+
145
+ ```tsx
146
+ <Button rounded />
147
+ <Card sharp />
148
+ <Card className="rounded-[16px]" />
149
+ ```
150
+
151
+ The preset is selected at the design-system root:
152
+
153
+ ```tsx
154
+ <DesignSystemProvider appearance="default">
155
+ <App />
156
+ </DesignSystemProvider>
157
+ ```
158
+
159
+ or through a root attribute:
160
+
161
+ ```html
162
+ <body data-appearance="default">
163
+ ```
164
+
165
+ ## Preset Responsibilities
166
+
167
+ An appearance preset may change:
168
+
169
+ - Page and layout background treatment
170
+ - Card and panel background treatment
171
+ - Radius for actions, controls, cards, modals, popovers, badges, and tabs
172
+ - Component density and padding
173
+ - Border prominence
174
+ - Elevation and shadow strength
175
+ - Hover, pressed, selected, and disabled treatment
176
+
177
+ An appearance preset should not change:
178
+
179
+ - Component behavior
180
+ - Component variant names
181
+ - Accessibility requirements
182
+ - Interaction contracts
183
+ - Information hierarchy
184
+ - Meaning of semantic color roles
@@ -0,0 +1,94 @@
1
+ # Default Appearance
2
+
3
+ `default` is the baseline product appearance.
4
+
5
+ It should feel practical, calm, and balanced: a gray application background, white cards, modest radius, restrained elevation, and conservative spacing.
6
+
7
+ ## Visual Character
8
+
9
+ - Application background is gray or off-white.
10
+ - Cards and primary content areas are white.
11
+ - Actions and controls have a modest radius.
12
+ - Spacing is comfortable but compact enough for daily product use.
13
+ - Shadows are subtle and used only to separate floating or raised elements.
14
+
15
+ ## Token Direction
16
+
17
+ ```ts
18
+ export const defaultAppearance = {
19
+ content: {
20
+ default: "#171717",
21
+ primary: "#000000",
22
+ subtle: "#404040",
23
+ muted: "#737373",
24
+ disabled: "#a3a3a3",
25
+ inverse: "#ffffff",
26
+ link: "#1d4ed8",
27
+ linkHover: "#1e40af",
28
+ onColor: "#ffffff",
29
+ onLight: "#171717",
30
+ onBrand: "#ffffff",
31
+ },
32
+ background: {
33
+ app: "#f4f4f5",
34
+ default: "#ffffff",
35
+ card: "#ffffff",
36
+ subtle: "#fafafa",
37
+ muted: "#f5f5f5",
38
+ disabled: "#e5e5e5",
39
+ inverse: "#171717",
40
+ overlay: "rgba(23, 23, 23, 0.48)",
41
+ brand: "#171717",
42
+ brandHover: "#262626",
43
+ brandPressed: "#0a0a0a",
44
+ selected: "#e5e7eb",
45
+ hover: "#f5f5f5",
46
+ pressed: "#e5e5e5",
47
+ },
48
+ border: {
49
+ default: "#d4d4d4",
50
+ subtle: "#e5e5e5",
51
+ strong: "#a3a3a3",
52
+ disabled: "#e5e5e5",
53
+ focus: "#2563eb",
54
+ brand: "#171717",
55
+ },
56
+ shape: {
57
+ action: "10px",
58
+ control: "10px",
59
+ card: "12px",
60
+ panel: "12px",
61
+ modal: "16px",
62
+ popover: "12px",
63
+ badge: "999px",
64
+ avatar: "999px",
65
+ },
66
+ density: {
67
+ controlHeight: "40px",
68
+ controlPaddingX: "14px",
69
+ cardPadding: "20px",
70
+ panelPadding: "20px",
71
+ sectionGap: "24px",
72
+ listRowHeight: "44px",
73
+ tableRowHeight: "44px",
74
+ },
75
+ elevation: {
76
+ card: "0 1px 2px rgba(0, 0, 0, 0.04)",
77
+ panel: "0 1px 3px rgba(0, 0, 0, 0.06)",
78
+ popover: "0 12px 28px rgba(0, 0, 0, 0.14)",
79
+ modal: "0 24px 64px rgba(0, 0, 0, 0.20)",
80
+ none: "none",
81
+ },
82
+ };
83
+ ```
84
+
85
+ ## Component Impact
86
+
87
+ - Buttons: modest radius, dark primary action, balanced padding.
88
+ - Breadcrumbs: inline trails stay quiet; raised trails use `background.card`, `border.subtle`, and the modest control radius.
89
+ - Inputs: modest radius, visible but quiet border.
90
+ - Cards: white on gray app background, subtle border or shadow.
91
+ - Dividers: quiet 1px separators using `border.subtle`, with compact spacing around labels or inline actions.
92
+ - File uploads: subtle dashed drop zones with white queued rows, modest radius, and quiet row elevation.
93
+ - Modals and popovers: slightly more radius than inline components.
94
+ - Tables and lists: normal row height for readable operational screens.
@@ -0,0 +1,95 @@
1
+ # Rounded Appearance
2
+
3
+ `rounded` is the softer appearance.
4
+
5
+ It should feel open, approachable, and more polished: a white application background, larger radii, softer borders, relaxed spacing, and less visual heaviness.
6
+
7
+ ## Visual Character
8
+
9
+ - Application background is white.
10
+ - Cards use white or near-white backgrounds with light borders.
11
+ - Primary actions can be pill-shaped.
12
+ - Panels and cards have visibly larger radius.
13
+ - Spacing is a little more relaxed than `default`.
14
+ - Shadows are soft and optional.
15
+
16
+ ## Token Direction
17
+
18
+ ```ts
19
+ export const roundedAppearance = {
20
+ content: {
21
+ default: "#18181b",
22
+ primary: "#09090b",
23
+ subtle: "#52525b",
24
+ muted: "#71717a",
25
+ disabled: "#a1a1aa",
26
+ inverse: "#ffffff",
27
+ link: "#0f766e",
28
+ linkHover: "#115e59",
29
+ onColor: "#ffffff",
30
+ onLight: "#18181b",
31
+ onBrand: "#ffffff",
32
+ },
33
+ background: {
34
+ app: "#ffffff",
35
+ default: "#ffffff",
36
+ card: "#ffffff",
37
+ subtle: "#fafafa",
38
+ muted: "#f6f7f7",
39
+ disabled: "#e4e4e7",
40
+ inverse: "#18181b",
41
+ overlay: "rgba(24, 24, 27, 0.42)",
42
+ brand: "#0f766e",
43
+ brandHover: "#115e59",
44
+ brandPressed: "#134e4a",
45
+ selected: "#ccfbf1",
46
+ hover: "#f4f7f6",
47
+ pressed: "#e7f3f0",
48
+ },
49
+ border: {
50
+ default: "#dedede",
51
+ subtle: "#eeeeee",
52
+ strong: "#b8b8b8",
53
+ disabled: "#e4e4e7",
54
+ focus: "#0f766e",
55
+ brand: "#0f766e",
56
+ },
57
+ shape: {
58
+ action: "999px",
59
+ control: "16px",
60
+ card: "22px",
61
+ panel: "24px",
62
+ modal: "28px",
63
+ popover: "20px",
64
+ badge: "999px",
65
+ avatar: "999px",
66
+ },
67
+ density: {
68
+ controlHeight: "44px",
69
+ controlPaddingX: "18px",
70
+ cardPadding: "24px",
71
+ panelPadding: "24px",
72
+ sectionGap: "32px",
73
+ listRowHeight: "48px",
74
+ tableRowHeight: "48px",
75
+ },
76
+ elevation: {
77
+ card: "0 8px 24px rgba(15, 23, 42, 0.06)",
78
+ panel: "0 10px 32px rgba(15, 23, 42, 0.08)",
79
+ popover: "0 18px 40px rgba(15, 23, 42, 0.16)",
80
+ modal: "0 28px 72px rgba(15, 23, 42, 0.22)",
81
+ none: "none",
82
+ },
83
+ };
84
+ ```
85
+
86
+ ## Component Impact
87
+
88
+ - Buttons: pill-like primary and action buttons.
89
+ - Breadcrumbs: raised trails inherit the softer control radius and can use slightly more relaxed spacing.
90
+ - Inputs: rounded controls with slightly taller height.
91
+ - Cards: larger radius with light borders and soft separation.
92
+ - Dividers: quiet 1px separators using `border.subtle`, with softer action backgrounds and the preset control radius.
93
+ - File uploads: softer drop zones and queued rows, relaxed padding, and gentle borders.
94
+ - Modals and popovers: rounded, friendly containers.
95
+ - Tables and lists: slightly more vertical breathing room.
@@ -0,0 +1,95 @@
1
+ # Sharp Appearance
2
+
3
+ `sharp` is the precise appearance.
4
+
5
+ It should feel structured, architectural, and efficient: square edges, tighter spacing, stronger borders, flatter surfaces, and minimal elevation.
6
+
7
+ ## Visual Character
8
+
9
+ - Application background can be white or a very light gray.
10
+ - Cards are flat panels with clear borders.
11
+ - Radius is zero or nearly zero across most UI.
12
+ - Spacing is tighter than `default`.
13
+ - Borders carry most of the separation work.
14
+ - Shadows are reserved for overlays only.
15
+
16
+ ## Token Direction
17
+
18
+ ```ts
19
+ export const sharpAppearance = {
20
+ content: {
21
+ default: "#111111",
22
+ primary: "#000000",
23
+ subtle: "#3f3f46",
24
+ muted: "#6b7280",
25
+ disabled: "#9ca3af",
26
+ inverse: "#ffffff",
27
+ link: "#7c2d12",
28
+ linkHover: "#431407",
29
+ onColor: "#ffffff",
30
+ onLight: "#111111",
31
+ onBrand: "#ffffff",
32
+ },
33
+ background: {
34
+ app: "#f7f7f7",
35
+ default: "#ffffff",
36
+ card: "#ffffff",
37
+ subtle: "#f9fafb",
38
+ muted: "#f3f4f6",
39
+ disabled: "#e5e7eb",
40
+ inverse: "#111111",
41
+ overlay: "rgba(17, 17, 17, 0.52)",
42
+ brand: "#111111",
43
+ brandHover: "#262626",
44
+ brandPressed: "#000000",
45
+ selected: "#e5e7eb",
46
+ hover: "#f3f4f6",
47
+ pressed: "#e5e7eb",
48
+ },
49
+ border: {
50
+ default: "#c7c7c7",
51
+ subtle: "#dedede",
52
+ strong: "#737373",
53
+ disabled: "#dedede",
54
+ focus: "#111111",
55
+ brand: "#111111",
56
+ },
57
+ shape: {
58
+ action: "0px",
59
+ control: "0px",
60
+ card: "0px",
61
+ panel: "0px",
62
+ modal: "0px",
63
+ popover: "0px",
64
+ badge: "2px",
65
+ avatar: "0px",
66
+ },
67
+ density: {
68
+ controlHeight: "38px",
69
+ controlPaddingX: "12px",
70
+ cardPadding: "16px",
71
+ panelPadding: "16px",
72
+ sectionGap: "20px",
73
+ listRowHeight: "40px",
74
+ tableRowHeight: "38px",
75
+ },
76
+ elevation: {
77
+ card: "none",
78
+ panel: "none",
79
+ popover: "0 12px 24px rgba(0, 0, 0, 0.18)",
80
+ modal: "0 20px 56px rgba(0, 0, 0, 0.24)",
81
+ none: "none",
82
+ },
83
+ };
84
+ ```
85
+
86
+ ## Component Impact
87
+
88
+ - Buttons: square edges, compact padding, strong hover and pressed states.
89
+ - Breadcrumbs: raised trails use square or near-square corners with tight separator rhythm.
90
+ - Inputs: square controls with clear border states.
91
+ - Cards: flat panels with borders instead of visible rounding.
92
+ - Dividers: clear 1px separators using `border.subtle`, with square action treatment and tight spacing.
93
+ - File uploads: precise dashed drop zones, square queued rows, tighter spacing, and border-led error states.
94
+ - Modals and popovers: square containers with overlay separation.
95
+ - Tables and lists: denser rows for scanning and comparison.
@@ -0,0 +1,217 @@
1
+ # Component Showcase Consistency Report
2
+
3
+ Date: 2026-06-16
4
+
5
+ ## Purpose
6
+
7
+ This report audits how registry-backed Banhaten components are presented across the playground and docs. The immediate question was whether `Button` is the most complete example and whether the rest of the components should be made consistent with it.
8
+
9
+ ## Short Answer
10
+
11
+ `Button` is the strongest content baseline, but it is not ready to be copied as the implementation template.
12
+
13
+ Use `Button` as the reference for what a complete component page should explain: install, usage, examples, composition, API, RTL, states, variants, sizes, and token/effect readouts. Use the shared `RegistryComponentDocs` renderer as the scalable page skeleton, then attach optional deep reference sections when the component needs visual matrices, state grids, size scales, or token readouts.
14
+
15
+ ## Checks Run
16
+
17
+ - `npm exec -- tsc -p tsconfig.json --noEmit` from `playground` passed.
18
+ - `npm --prefix playground run test:docs` passed.
19
+ - Component docs coverage audit passed for 41 registry-backed pages.
20
+ - `catalog-components` is intentionally covered as a registry bundle alias.
21
+ - `npm run registry:check` passed.
22
+ - Registry mirrors and expanded ownership match across 149 files.
23
+
24
+ ## Current Inventory
25
+
26
+ - Registry items: 42 total.
27
+ - Core items: 28.
28
+ - Expanded items: 14.
29
+ - Playground pages: 41 registry-backed pages plus 1 bundle-only registry item.
30
+ - Pages using shared `RegistryComponentDocs`: 32.
31
+ - Interactive inspector sections rendered on component pages: 0. The previous custom inspector panels and shared inspector helper were removed from the playground.
32
+ - Bespoke pages with hand-authored docs navigation: 9.
33
+ - Components with markdown docs in `docs/design-system/components` or known top-level docs: 27 of 42.
34
+ - Components with registry RTL metadata: 27 of 42.
35
+
36
+ ## Recommended Standard
37
+
38
+ Every public component page should use this consistent pattern:
39
+
40
+ 1. Page header with short component purpose.
41
+ 2. Above-the-fold live preview:
42
+ - Small title and concise subtitle.
43
+ - The real component visible immediately without scrolling past long prose.
44
+ - A vertical stack of example cards so wide components, such as tables, do not get squeezed into a two-column preview.
45
+ - English/LTR example first, then Arabic/RTL directly below it for every component where direction, copy, icon placement, or layout can change.
46
+ 3. Shared registry docs:
47
+ - Preview
48
+ - Installation
49
+ - Usage
50
+ - Examples
51
+ - Composition
52
+ - API Reference
53
+ - RTL Behavior
54
+ - Live Variants
55
+ 4. Visual reference, state matrix, size scale, placement matrix, or token reference rendered from live components when deeper inspection is useful.
56
+ 5. No interactive inspector section in the component page body.
57
+ 6. Registry metadata that matches the real source, example, and playground spec.
58
+ 7. Markdown docs linked from the component docs index when the component is public.
59
+ 8. Tests that catch missing docs routes, registry mirror drift, and obvious source/metadata drift.
60
+
61
+ ## Button Baseline Audit
62
+
63
+ ### What Button Does Well
64
+
65
+ `Button` is currently the most complete component page by depth. It has:
66
+
67
+ - Installation, usage, example, composition, API, RTL, visual reference, size scale, state matrix, and shadow reference sections.
68
+ - Rich examples for variants, sizes, icons, loading, `asChild`, and RTL.
69
+ - Token readouts for fill, text, stroke, effects, geometry, and typography.
70
+ - Registry demo coverage for variants, text sizes, icon sizes, icon placement, loading, and RTL.
71
+
72
+ ### What Button Is Missing Or Inconsistent
73
+
74
+ - Registry size metadata now matches the implementation and examples, including `xl` and `icon-xl`.
75
+ - Source supports compatibility variants that are not part of the visible registry contract: `destructive`, `soft-destructive`, `success`, `warning`, and `link`. Decide whether these are public aliases, deprecated aliases, or should be removed.
76
+ - Button now has a component markdown page and is listed in the component docs index.
77
+ - The interactive inspector has been removed from the Button page, matching the new page direction.
78
+ - The page is a high-quality bespoke file rather than a scalable shared template. Copying it component by component would increase drift.
79
+ - Test coverage only smoke-renders a basic Button. It does not assert the variant/size contract, `asChild`, loading composition, icon sizing, or source/metadata parity.
80
+
81
+ ### Verdict
82
+
83
+ Button should be the content-quality model, not the code-shape model. Its opening preview, registry size metadata, and component markdown docs now match the proposed standard. The remaining work is the source-supported alias policy and a metadata parity check.
84
+
85
+ ## Presentation Families
86
+
87
+ | Family | Components | Current read |
88
+ | --- | --- | --- |
89
+ | Bespoke rich docs plus deep reference | Button, Attribute, Card, Toggle, Modal, Toolbar, Slider, Progress, Alert | Most complete editorially, but highest drift risk because docs are hand-authored per page. Inspector sections should stay removed. |
90
+ | Shared registry docs plus live reference examples | Accordion, Avatar, Badge, Button Group, Checkbox, Date Picker, Divider, Input, Menu, Pagination, Progress Slider, Radio Card, Radio Group, Select, Social Button, Tag, Textarea | Best scalable direction. These already get consistent docs structure from the shared renderer and should add early examples where missing. |
91
+ | Shared registry docs plus expanded custom page | Activity Feed, Banner, Breadcrumbs, Command Bar, File Upload, Onboarding Step, Page Header, Slideout, Steps, Table, Tabs, Timeline | Consistent shell, but registry metadata is under-specified for capabilities and RTL. Expanded/core contract needs a decision. |
92
+ | Shared docs only or custom examples | Tooltip, Spinner, Icons | Acceptable for Spinner and maybe Icons. Tooltip should keep a placement/pointer matrix rather than an inspector. |
93
+ | Bundle-only registry item | Catalog Components | No direct playground page. This is fine if it remains an internal bundle alias; otherwise it needs a public docs page or should be marked as non-public. |
94
+
95
+ ## Component-by-Component Status
96
+
97
+ | Component | Status | Current presentation | Recommendation |
98
+ | --- | --- | --- | --- |
99
+ | Accordion | Core | Shared docs plus live reference | Keep template. Add markdown docs if public. |
100
+ | Activity Feed | Expanded | Shared docs plus expanded custom page | Add registry capability and RTL metadata. Decide whether it is production or showcase. |
101
+ | Alert | Core | Bespoke rich docs plus deep reference | Strong page. Migrate structure into shared standard or extract page data. |
102
+ | Attribute | Core | Bespoke rich docs plus deep reference | Strong page. Migrate to shared standard; keep detailed slot/composition examples. |
103
+ | Avatar | Core | Shared docs plus live reference | Keep template. Add markdown docs if public. |
104
+ | Badge | Core | Shared docs plus live reference | Keep template. Add markdown docs if public. |
105
+ | Banner | Expanded | Shared docs plus expanded custom page | Add capability and RTL metadata. Promotion candidate for feedback components. |
106
+ | Breadcrumbs | Expanded | Shared docs plus expanded custom page | Add capability and RTL metadata. Promotion candidate with Page Header. |
107
+ | Button | Core | Bespoke baseline | Treat as content baseline. Keep the new above-the-fold examples; resolve variant alias policy and parity tests. |
108
+ | Button Group | Core | Shared docs plus live reference | Good scalable page. Already has markdown docs. |
109
+ | Card | Core | Bespoke rich docs plus deep reference | Strong page. Migrate to shared standard; preserve image/layout coverage. |
110
+ | Checkbox | Core | Shared docs plus live reference | Keep template. Add markdown docs if public. |
111
+ | Command Bar | Expanded | Shared docs plus expanded custom page | Add capability and RTL metadata. Clarify keyboard/search contract before promotion. |
112
+ | Date Picker | Core | Shared docs plus live reference | Good scalable page. Keep as shared-docs example for complex form components. |
113
+ | Divider | Core | Shared docs plus live reference | Good. Simple component can keep a lighter visual reference. |
114
+ | File Upload | Expanded | Shared docs plus expanded custom page | Add accessibility/error/queue contract before core promotion. |
115
+ | Icons | Expanded/foundation | Shared docs/explorer only | Treat as foundation tooling, not a normal component. Keep top-level docs or move into components index intentionally. |
116
+ | Input | Core | Shared docs plus live reference | Keep template. Add markdown docs if public. |
117
+ | Menu | Core | Shared docs plus live reference | Keep template. Add markdown docs if public. Confirm trigger/anchoring expectations. |
118
+ | Modal | Core | Bespoke rich docs plus deep reference | Strong page. Migrate to shared standard; preserve ConfirmModal guardrail docs. |
119
+ | Onboarding Step | Expanded | Shared docs plus expanded custom page | Add capability and RTL metadata. Rename docs/page consistently around `onboarding-step` vs `onboarding-step-list-item`. |
120
+ | Page Header | Expanded | Shared docs plus expanded custom page | Add capability and RTL metadata. Likely app composition pattern, not primitive. |
121
+ | Pagination | Core | Shared docs plus live reference | Keep template. Add markdown docs if public. |
122
+ | Progress | Core | Bespoke rich docs plus deep reference | Strong page. Migrate to shared standard; preserve label/RTL fill coverage. |
123
+ | Progress Slider | Core | Shared docs plus live reference | Keep template. Add markdown docs if public. |
124
+ | Radio Card | Core | Shared docs plus live reference | Keep template. Add markdown docs if public. Clarify explicit RTL behavior in docs. |
125
+ | Radio Group | Core | Shared docs plus live reference | Keep template. Add markdown docs if public. |
126
+ | Select | Core | Shared docs plus live reference | Keep template. Add markdown docs if public. Good candidate for metadata parity tests because it has many item types. |
127
+ | Slideout | Expanded | Shared docs plus expanded custom page | Add focus/portal/mobile contract before core promotion. |
128
+ | Slider | Core | Bespoke rich docs plus deep reference | Strong page. Migrate to shared standard; preserve value mode and indicator examples. |
129
+ | Social Button | Core | Shared docs plus live reference | Keep template. Add markdown docs if public and document provider-color exceptions. |
130
+ | Spinner | Core | Shared docs only | Probably acceptable as a simple primitive. Add markdown docs or explicitly mark as helper primitive. |
131
+ | Steps | Expanded | Shared docs plus expanded custom page | Add capability and RTL metadata. Promotion candidate. |
132
+ | Table | Expanded | Shared docs plus expanded custom page | Add capability and RTL metadata. Clarify Table vs DataTable public contract. |
133
+ | Tabs | Expanded | Shared docs plus expanded custom page | Move or link top-level `docs/design-system/tabs.md` from the component index. Promotion candidate. |
134
+ | Tag | Core | Shared docs plus live reference | Good scalable page. Already has markdown docs. |
135
+ | Textarea | Core | Shared docs plus live reference | Keep template. Add markdown docs if public. |
136
+ | Timeline | Expanded | Shared docs plus expanded custom page | Add capability and RTL metadata. Clarify event/progress variants before promotion. |
137
+ | Toggle | Core | Bespoke rich docs plus deep reference | Strong page. Migrate to shared standard; preserve labeled field composition. |
138
+ | Toolbar | Core | Bespoke rich docs plus deep reference | Strong page. Migrate to shared standard; preserve responsive/filter examples. |
139
+ | Tooltip | Core | Shared docs plus custom pointer examples | Keep the placement matrix as the equivalent deep reference. Already has markdown docs. |
140
+ | Catalog Components | Expanded bundle | No playground page | Mark private/bundle-only, keep alias coverage, or create a real public docs page. |
141
+
142
+ ## Cross-Cutting Gaps
143
+
144
+ ### P0: Fix Contract Drift
145
+
146
+ - Decide the public/deprecated status of Button compatibility variants: `destructive`, `soft-destructive`, `success`, `warning`, and `link`.
147
+ - Add a parity check that compares registry metadata values against obvious exported spec/example usage for variants and sizes.
148
+
149
+ ### P0: Pick One Page Standard
150
+
151
+ Adopt this as the canonical implementation pattern:
152
+
153
+ - Above-the-fold hero preview that shows the component immediately after the title/subtitle.
154
+ - Early stacked examples: English/LTR first, Arabic/RTL directly below when the component can reasonably render Arabic copy or direction-aware layout.
155
+ - Shared `RegistryComponentDocs` for the common docs surface.
156
+ - Optional "Deep Reference" section for state matrices, size scales, pointer matrices, token readouts, and layout grids.
157
+
158
+ This keeps the consistency of the shared renderer while preserving the richness of Button/Slider/Modal-style pages.
159
+
160
+ ### P1: Normalize Markdown Docs
161
+
162
+ The component docs index currently covers only part of the registry surface. Public components missing component markdown docs are:
163
+
164
+ - Accordion
165
+ - Avatar
166
+ - Badge
167
+ - Checkbox
168
+ - Input
169
+ - Menu
170
+ - Pagination
171
+ - Progress Slider
172
+ - Radio Card
173
+ - Radio Group
174
+ - Select
175
+ - Social Button
176
+ - Spinner
177
+ - Textarea
178
+ - Catalog Components, if public
179
+
180
+ Tabs and Icons have top-level docs, but not under `docs/design-system/components`. Either link them explicitly from the component index or move them under the components directory.
181
+
182
+ ### P1: Fill Expanded Metadata
183
+
184
+ Expanded components often show RTL and multiple states in demos, but their registry metadata does not expose RTL or capability keys. Add metadata for:
185
+
186
+ - Activity Feed
187
+ - Banner
188
+ - Breadcrumbs
189
+ - Command Bar
190
+ - File Upload
191
+ - Onboarding Step
192
+ - Page Header
193
+ - Slideout
194
+ - Steps
195
+ - Table
196
+ - Tabs
197
+ - Timeline
198
+
199
+ This makes the shared API/RTL sections truthful instead of generic.
200
+
201
+ ### P1: Define Simple-Component Exceptions
202
+
203
+ Spinner probably does not need a deep reference section. Icons is closer to foundation tooling than a reusable component primitive. These exceptions should be explicit so they do not look accidentally incomplete.
204
+
205
+ ### P2: Migrate Bespoke Pages Gradually
206
+
207
+ Do not rewrite the best pages all at once. Start with one or two:
208
+
209
+ 1. Button: fix metadata and use it to define the standard.
210
+ 2. Alert or Progress: migrate a smaller bespoke rich page to validate the shared-plus-reference pattern.
211
+ 3. Modal or Slider: migrate a complex page once the pattern feels stable.
212
+
213
+ ## Suggested Decision
214
+
215
+ Make Button the quality bar, but make `above-the-fold examples + RegistryComponentDocs + optional Deep Reference` the page architecture. Then measure every component against that architecture.
216
+
217
+ That gives us a consistent system without losing the parts that make the Button page valuable.