@skunkworksai/ui-kit 0.1.18

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 (274) hide show
  1. package/AGENTS.md +250 -0
  2. package/README.md +429 -0
  3. package/dist/assets/Service-applets-apps/audience-measurement.png +0 -0
  4. package/dist/assets/Service-applets-apps/coatro-app.png +0 -0
  5. package/dist/assets/Service-applets-apps/content-effectiveness.png +0 -0
  6. package/dist/assets/Service-applets-apps/hop-tracking.png +0 -0
  7. package/dist/assets/Service-applets-apps/index.ts +13 -0
  8. package/dist/assets/Service-applets-apps/journeys-app.png +0 -0
  9. package/dist/assets/Service-applets-apps/people-counting.png +0 -0
  10. package/dist/assets/Service-applets-apps/petra.png +0 -0
  11. package/dist/assets/Service-applets-apps/sam-generic.png +0 -0
  12. package/dist/assets/Service-applets-apps/sami-for-environment.png +0 -0
  13. package/dist/assets/Service-applets-apps/shelf-engagement.png +0 -0
  14. package/dist/assets/Service-applets-apps/traffic-management.png +0 -0
  15. package/dist/assets/Service-applets-apps/viana.png +0 -0
  16. package/dist/assets/Service-applets-apps/zone-engagement.png +0 -0
  17. package/dist/assets/icons/Dashboard-active.svg +29 -0
  18. package/dist/assets/icons/Dashboard.svg +25 -0
  19. package/dist/assets/icons/DashboardActiveIcon.tsx +35 -0
  20. package/dist/assets/icons/DashboardIcon.tsx +31 -0
  21. package/dist/assets/icons/Devices-active.svg +27 -0
  22. package/dist/assets/icons/Devices.svg +20 -0
  23. package/dist/assets/icons/DevicesActiveIcon.tsx +33 -0
  24. package/dist/assets/icons/DevicesIcon.tsx +26 -0
  25. package/dist/assets/icons/Installer-active.svg +29 -0
  26. package/dist/assets/icons/Installer.svg +17 -0
  27. package/dist/assets/icons/InstallerActiveIcon.tsx +35 -0
  28. package/dist/assets/icons/InstallerIcon.tsx +23 -0
  29. package/dist/assets/icons/Manifest-active.svg +49 -0
  30. package/dist/assets/icons/Manifest.svg +49 -0
  31. package/dist/assets/icons/ManifestActiveIcon.tsx +55 -0
  32. package/dist/assets/icons/ManifestIcon.tsx +55 -0
  33. package/dist/assets/icons/Sensor-active.svg +15 -0
  34. package/dist/assets/icons/Sensor.svg +11 -0
  35. package/dist/assets/icons/SensorActiveIcon.tsx +21 -0
  36. package/dist/assets/icons/SensorIcon.tsx +17 -0
  37. package/dist/assets/icons/Site-active.svg +14 -0
  38. package/dist/assets/icons/Site.svg +10 -0
  39. package/dist/assets/icons/SiteActiveIcon.tsx +20 -0
  40. package/dist/assets/icons/SiteIcon.tsx +16 -0
  41. package/dist/assets/icons/X-ray-active.svg +199 -0
  42. package/dist/assets/icons/X-ray.svg +47 -0
  43. package/dist/assets/icons/XrayActiveIcon.tsx +205 -0
  44. package/dist/assets/icons/XrayIcon.tsx +53 -0
  45. package/dist/assets/icons/index.ts +14 -0
  46. package/dist/assets/logos/DarkLogo.tsx +28 -0
  47. package/dist/assets/logos/DarkSymbol.tsx +9 -0
  48. package/dist/assets/logos/PrimaryLogo.tsx +28 -0
  49. package/dist/assets/logos/PrimarySymbol.tsx +9 -0
  50. package/dist/assets/logos/WhiteLogo.tsx +28 -0
  51. package/dist/assets/logos/WhiteSymbol.tsx +9 -0
  52. package/dist/assets/logos/dark_logo.svg +22 -0
  53. package/dist/assets/logos/dark_symbol.svg +3 -0
  54. package/dist/assets/logos/index.ts +6 -0
  55. package/dist/assets/logos/primary-logo.svg +22 -0
  56. package/dist/assets/logos/primary_logo.svg +22 -0
  57. package/dist/assets/logos/primary_symbol.svg +3 -0
  58. package/dist/assets/logos/white_symbol.svg +3 -0
  59. package/dist/index.cjs +160 -0
  60. package/dist/index.cjs.map +1 -0
  61. package/dist/index.js +45276 -0
  62. package/dist/index.js.map +1 -0
  63. package/dist/tokens-source.css +121 -0
  64. package/dist/types/assets/Service-applets-apps/index.d.ts +13 -0
  65. package/dist/types/assets/icons/DashboardActiveIcon.d.ts +2 -0
  66. package/dist/types/assets/icons/DashboardIcon.d.ts +2 -0
  67. package/dist/types/assets/icons/DevicesActiveIcon.d.ts +2 -0
  68. package/dist/types/assets/icons/DevicesIcon.d.ts +2 -0
  69. package/dist/types/assets/icons/InstallerActiveIcon.d.ts +2 -0
  70. package/dist/types/assets/icons/InstallerIcon.d.ts +2 -0
  71. package/dist/types/assets/icons/ManifestActiveIcon.d.ts +2 -0
  72. package/dist/types/assets/icons/ManifestIcon.d.ts +2 -0
  73. package/dist/types/assets/icons/SensorActiveIcon.d.ts +2 -0
  74. package/dist/types/assets/icons/SensorIcon.d.ts +2 -0
  75. package/dist/types/assets/icons/SiteActiveIcon.d.ts +2 -0
  76. package/dist/types/assets/icons/SiteIcon.d.ts +2 -0
  77. package/dist/types/assets/icons/XrayActiveIcon.d.ts +2 -0
  78. package/dist/types/assets/icons/XrayIcon.d.ts +2 -0
  79. package/dist/types/assets/icons/index.d.ts +14 -0
  80. package/dist/types/assets/logos/DarkLogo.d.ts +2 -0
  81. package/dist/types/assets/logos/DarkSymbol.d.ts +2 -0
  82. package/dist/types/assets/logos/PrimaryLogo.d.ts +2 -0
  83. package/dist/types/assets/logos/PrimarySymbol.d.ts +2 -0
  84. package/dist/types/assets/logos/WhiteLogo.d.ts +2 -0
  85. package/dist/types/assets/logos/WhiteSymbol.d.ts +2 -0
  86. package/dist/types/assets/logos/index.d.ts +6 -0
  87. package/dist/types/components/blocks/AppBentoMenu.d.ts +31 -0
  88. package/dist/types/components/blocks/AppDashboard.d.ts +121 -0
  89. package/dist/types/components/blocks/AppHeader.d.ts +198 -0
  90. package/dist/types/components/blocks/AppLocationTreeFilter.d.ts +44 -0
  91. package/dist/types/components/blocks/AppNotificationsMenu.d.ts +50 -0
  92. package/dist/types/components/blocks/AppPageTitle.d.ts +86 -0
  93. package/dist/types/components/blocks/AppProfile.d.ts +53 -0
  94. package/dist/types/components/blocks/TableManager.d.ts +194 -0
  95. package/dist/types/components/blocks/backgrounds/AppDashboardBackgroundDots.d.ts +14 -0
  96. package/dist/types/components/blocks/backgrounds/AppDashboardBackgroundWave.d.ts +14 -0
  97. package/dist/types/components/blocks/backgrounds/index.d.ts +3 -0
  98. package/dist/types/components/blocks/backgrounds/types.d.ts +13 -0
  99. package/dist/types/components/blocks/index.d.ts +9 -0
  100. package/dist/types/components/primitives/AppAccordion.d.ts +22 -0
  101. package/dist/types/components/primitives/AppAlert.d.ts +33 -0
  102. package/dist/types/components/primitives/AppAlertDialog.d.ts +79 -0
  103. package/dist/types/components/primitives/AppAspectRatio.d.ts +7 -0
  104. package/dist/types/components/primitives/AppAvatar.d.ts +17 -0
  105. package/dist/types/components/primitives/AppBadge.d.ts +9 -0
  106. package/dist/types/components/primitives/AppBreadcrumb.d.ts +45 -0
  107. package/dist/types/components/primitives/AppButton.d.ts +24 -0
  108. package/dist/types/components/primitives/AppButtonGroup.d.ts +10 -0
  109. package/dist/types/components/primitives/AppCalendar.d.ts +51 -0
  110. package/dist/types/components/primitives/AppCard.d.ts +41 -0
  111. package/dist/types/components/primitives/AppCarousel.d.ts +26 -0
  112. package/dist/types/components/primitives/AppChart.d.ts +27 -0
  113. package/dist/types/components/primitives/AppCheckbox.d.ts +9 -0
  114. package/dist/types/components/primitives/AppCollapsible.d.ts +20 -0
  115. package/dist/types/components/primitives/AppCombobox.d.ts +37 -0
  116. package/dist/types/components/primitives/AppCommand.d.ts +47 -0
  117. package/dist/types/components/primitives/AppContextMenu.d.ts +82 -0
  118. package/dist/types/components/primitives/AppDataTable.d.ts +23 -0
  119. package/dist/types/components/primitives/AppDatePicker.d.ts +26 -0
  120. package/dist/types/components/primitives/AppDialog.d.ts +40 -0
  121. package/dist/types/components/primitives/AppDrawer.d.ts +58 -0
  122. package/dist/types/components/primitives/AppDropdownMenu.d.ts +85 -0
  123. package/dist/types/components/primitives/AppEmpty.d.ts +35 -0
  124. package/dist/types/components/primitives/AppField.d.ts +65 -0
  125. package/dist/types/components/primitives/AppForm.d.ts +58 -0
  126. package/dist/types/components/primitives/AppHoverCard.d.ts +19 -0
  127. package/dist/types/components/primitives/AppInput.d.ts +21 -0
  128. package/dist/types/components/primitives/AppKbd.d.ts +18 -0
  129. package/dist/types/components/primitives/AppLabel.d.ts +8 -0
  130. package/dist/types/components/primitives/AppMenubar.d.ts +83 -0
  131. package/dist/types/components/primitives/AppNavigationMenu.d.ts +51 -0
  132. package/dist/types/components/primitives/AppPagination.d.ts +46 -0
  133. package/dist/types/components/primitives/AppPopover.d.ts +20 -0
  134. package/dist/types/components/primitives/AppProgress.d.ts +9 -0
  135. package/dist/types/components/primitives/AppRadioGroup.d.ts +15 -0
  136. package/dist/types/components/primitives/AppScrollArea.d.ts +12 -0
  137. package/dist/types/components/primitives/AppScrollText.d.ts +7 -0
  138. package/dist/types/components/primitives/AppSelect.d.ts +46 -0
  139. package/dist/types/components/primitives/AppSeparator.d.ts +8 -0
  140. package/dist/types/components/primitives/AppSheet.d.ts +32 -0
  141. package/dist/types/components/primitives/AppSidebar.d.ts +59 -0
  142. package/dist/types/components/primitives/AppSkeleton.d.ts +6 -0
  143. package/dist/types/components/primitives/AppSpinner.d.ts +13 -0
  144. package/dist/types/components/primitives/AppSwitch.d.ts +8 -0
  145. package/dist/types/components/primitives/AppTable.d.ts +53 -0
  146. package/dist/types/components/primitives/AppTabs.d.ts +10 -0
  147. package/dist/types/components/primitives/AppTextarea.d.ts +9 -0
  148. package/dist/types/components/primitives/AppThemeProvider.d.ts +46 -0
  149. package/dist/types/components/primitives/AppToaster.d.ts +7 -0
  150. package/dist/types/components/primitives/AppToggle.d.ts +9 -0
  151. package/dist/types/components/primitives/AppToggleGroup.d.ts +18 -0
  152. package/dist/types/components/primitives/AppTooltip.d.ts +26 -0
  153. package/dist/types/components/primitives/AppTypography.d.ts +80 -0
  154. package/dist/types/components/primitives/index.d.ts +57 -0
  155. package/dist/types/components/ui/accordion.d.ts +7 -0
  156. package/dist/types/components/ui/alert-dialog.d.ts +20 -0
  157. package/dist/types/components/ui/alert.d.ts +8 -0
  158. package/dist/types/components/ui/aspect-ratio.d.ts +4 -0
  159. package/dist/types/components/ui/avatar.d.ts +6 -0
  160. package/dist/types/components/ui/badge.d.ts +9 -0
  161. package/dist/types/components/ui/breadcrumb.d.ts +19 -0
  162. package/dist/types/components/ui/button.d.ts +13 -0
  163. package/dist/types/components/ui/calendar.d.ts +8 -0
  164. package/dist/types/components/ui/card.d.ts +11 -0
  165. package/dist/types/components/ui/carousel.d.ts +28 -0
  166. package/dist/types/components/ui/chart.d.ts +48 -0
  167. package/dist/types/components/ui/checkbox.d.ts +4 -0
  168. package/dist/types/components/ui/collapsible.d.ts +6 -0
  169. package/dist/types/components/ui/combobox.d.ts +83 -0
  170. package/dist/types/components/ui/command.d.ts +82 -0
  171. package/dist/types/components/ui/context-menu.d.ts +27 -0
  172. package/dist/types/components/ui/dialog.d.ts +19 -0
  173. package/dist/types/components/ui/drawer.d.ts +23 -0
  174. package/dist/types/components/ui/dropdown-menu.d.ts +27 -0
  175. package/dist/types/components/ui/empty.d.ts +14 -0
  176. package/dist/types/components/ui/field.d.ts +40 -0
  177. package/dist/types/components/ui/form.d.ts +22 -0
  178. package/dist/types/components/ui/hover-card.d.ts +6 -0
  179. package/dist/types/components/ui/input.d.ts +3 -0
  180. package/dist/types/components/ui/kbd.d.ts +4 -0
  181. package/dist/types/components/ui/label.d.ts +4 -0
  182. package/dist/types/components/ui/menubar.d.ts +30 -0
  183. package/dist/types/components/ui/navigation-menu.d.ts +12 -0
  184. package/dist/types/components/ui/pagination.d.ts +28 -0
  185. package/dist/types/components/ui/popover.d.ts +6 -0
  186. package/dist/types/components/ui/progress.d.ts +4 -0
  187. package/dist/types/components/ui/radio-group.d.ts +5 -0
  188. package/dist/types/components/ui/scroll-area.d.ts +5 -0
  189. package/dist/types/components/ui/scroll-text.d.ts +6 -0
  190. package/dist/types/components/ui/select.d.ts +13 -0
  191. package/dist/types/components/ui/separator.d.ts +4 -0
  192. package/dist/types/components/ui/sheet.d.ts +25 -0
  193. package/dist/types/components/ui/sidebar.d.ts +69 -0
  194. package/dist/types/components/ui/skeleton.d.ts +2 -0
  195. package/dist/types/components/ui/sonner.d.ts +2 -0
  196. package/dist/types/components/ui/switch.d.ts +4 -0
  197. package/dist/types/components/ui/table.d.ts +10 -0
  198. package/dist/types/components/ui/tabs.d.ts +19 -0
  199. package/dist/types/components/ui/textarea.d.ts +5 -0
  200. package/dist/types/components/ui/toggle-group.d.ts +15 -0
  201. package/dist/types/components/ui/toggle.d.ts +12 -0
  202. package/dist/types/components/ui/tooltip.d.ts +7 -0
  203. package/dist/types/hooks/use-mobile.d.ts +13 -0
  204. package/dist/types/hooks/use-page-title.d.ts +23 -0
  205. package/dist/types/index.d.ts +2 -0
  206. package/dist/types/lib/utils.d.ts +2 -0
  207. package/dist/ui-kit.css +1 -0
  208. package/package.json +117 -0
  209. package/rules/accordion.md +60 -0
  210. package/rules/alert-dialog.md +62 -0
  211. package/rules/alert.md +61 -0
  212. package/rules/aspect-ratio.md +47 -0
  213. package/rules/avatar.md +52 -0
  214. package/rules/badge.md +55 -0
  215. package/rules/bento-menu.md +86 -0
  216. package/rules/breadcrumb.md +80 -0
  217. package/rules/button-group.md +58 -0
  218. package/rules/button.md +66 -0
  219. package/rules/calendar.md +97 -0
  220. package/rules/card.md +84 -0
  221. package/rules/carousel.md +113 -0
  222. package/rules/chart.md +125 -0
  223. package/rules/checkbox.md +49 -0
  224. package/rules/collapsible.md +57 -0
  225. package/rules/combobox.md +133 -0
  226. package/rules/command.md +73 -0
  227. package/rules/context-menu.md +65 -0
  228. package/rules/dashboard.md +368 -0
  229. package/rules/data-table.md +91 -0
  230. package/rules/date-picker.md +65 -0
  231. package/rules/dialog.md +60 -0
  232. package/rules/drawer.md +65 -0
  233. package/rules/dropdown-menu.md +72 -0
  234. package/rules/empty.md +110 -0
  235. package/rules/field.md +149 -0
  236. package/rules/form.md +60 -0
  237. package/rules/header.md +245 -0
  238. package/rules/hover-card.md +53 -0
  239. package/rules/icons.md +141 -0
  240. package/rules/input.md +66 -0
  241. package/rules/kbd.md +58 -0
  242. package/rules/label.md +30 -0
  243. package/rules/location-tree-filter.md +165 -0
  244. package/rules/logo.md +58 -0
  245. package/rules/menubar.md +75 -0
  246. package/rules/navigation-menu.md +68 -0
  247. package/rules/notifications-menu.md +137 -0
  248. package/rules/pagetitle.md +160 -0
  249. package/rules/pagination.md +71 -0
  250. package/rules/popover.md +48 -0
  251. package/rules/profile.md +125 -0
  252. package/rules/progress.md +41 -0
  253. package/rules/radio-group.md +44 -0
  254. package/rules/scroll-area.md +32 -0
  255. package/rules/scroll-text.md +40 -0
  256. package/rules/select.md +86 -0
  257. package/rules/separator.md +43 -0
  258. package/rules/sheet.md +76 -0
  259. package/rules/sidebar.md +442 -0
  260. package/rules/skeleton.md +46 -0
  261. package/rules/spinner.md +43 -0
  262. package/rules/switch.md +46 -0
  263. package/rules/table-manager.md +306 -0
  264. package/rules/table.md +177 -0
  265. package/rules/tabs.md +82 -0
  266. package/rules/text.md +3 -0
  267. package/rules/textarea.md +38 -0
  268. package/rules/toaster.md +58 -0
  269. package/rules/toggle-group.md +50 -0
  270. package/rules/toggle.md +40 -0
  271. package/rules/tokens.md +88 -0
  272. package/rules/tooltip.md +78 -0
  273. package/rules/typography.md +81 -0
  274. package/scripts/scaffold.mjs +28 -0
package/AGENTS.md ADDED
@@ -0,0 +1,250 @@
1
+ # @skunkworksai/ui-kit — AI Agent Guide
2
+
3
+ This file ships with the package (`@skunkworksai/ui-kit`). It tells AI agents how to use `@skunkworksai/ui-kit` correctly in consumer applications.
4
+
5
+ ---
6
+
7
+ ## What this package is
8
+
9
+ `@skunkworksai/ui-kit` is a React component library built on shadcn/ui + Radix UI + Tailwind CSS v4. It exports two layers of components:
10
+
11
+ - **Primitives (`App*`)** — brand-wrapped wrappers around shadcn base components. These are what you use in product code.
12
+ - **Blocks** — pre-composed product sections built from primitives (dashboards, headers, table managers).
13
+
14
+ ---
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ pnpm add @skunkworksai/ui-kit
20
+ ```
21
+
22
+ ---
23
+
24
+ ## Project setup
25
+
26
+ If the user asks you to set up `@skunkworksai/ui-kit` in a new project (scaffold tokens, assets, configure imports), read `node_modules/@skunkworksai/ui-kit/README.md` → "Setup" section and follow it exactly. Do not attempt setup from memory — steps must be exact (file paths, import order, scaffold script).
27
+
28
+ For agent setup specifically, ensure the consumer project has this line in its `CLAUDE.md` or `AGENTS.md`:
29
+
30
+ ```
31
+ @node_modules/@skunkworksai/ui-kit/AGENTS.md
32
+ ```
33
+
34
+ ---
35
+
36
+ ## Import pattern
37
+
38
+ Always import from the package root:
39
+
40
+ ```tsx
41
+ // ✅ Correct
42
+ import { AppButton, AppCard, AppInput } from '@skunkworksai/ui-kit'
43
+
44
+ // ❌ Wrong — internal paths and direct Radix imports are not allowed
45
+ import { Button } from '@skunkworksai/ui-kit/dist/components/ui/button'
46
+ import { Dialog } from '@skunkworksai/ui-kit/src/components/ui/dialog'
47
+ import * as RadixDialog from '@radix-ui/react-dialog'
48
+ ```
49
+
50
+ Assets are NOT exported from the package. Import from your scaffolded copy:
51
+
52
+ ```tsx
53
+ import { PrimaryLogo } from './assets/logos'
54
+ import { DashboardIcon } from './assets/icons'
55
+ ```
56
+
57
+ ---
58
+
59
+ ## Three-layer architecture
60
+
61
+ ```
62
+ ui/ ← Layer 1: shadcn/ui base. DO NOT import directly in product code.
63
+ primitives/ ← Layer 2: App* wrappers. USE THESE in product code.
64
+ blocks/ ← Layer 3: Pre-composed sections. USE THESE for full page sections.
65
+ ```
66
+
67
+ **Always use `App*` primitives** — never raw shadcn base components. The `App*` prefix signals brand-compliant components.
68
+
69
+ ---
70
+
71
+ ## Token & styling rules
72
+
73
+ All colors, spacing, and radii come from CSS custom properties. Never hardcode values.
74
+
75
+ ```tsx
76
+ // ✅ Correct — semantic token classes
77
+ <div className="bg-background text-foreground border-border" />
78
+ <div className="bg-primary text-primary-foreground" />
79
+
80
+ // ❌ Wrong — hardcoded
81
+ <div className="bg-blue-500 text-white" />
82
+ <div style={{ color: '#3B82F6' }} />
83
+ ```
84
+
85
+ - Dark mode handled automatically by CSS variables — no manual `dark:` color overrides
86
+ - Use `cn()` for className merging — never string concatenation
87
+ - Use `gap-*` not `space-x-*` / `space-y-*`
88
+ - Use `size-*` when width and height are equal
89
+ - Never inline `style={{}}` — use Tailwind arbitrary properties instead:
90
+ ```tsx
91
+ // ✅ Correct
92
+ <div className="[--sidebar:transparent]" />
93
+ // ❌ Wrong
94
+ <div style={{ '--sidebar': 'transparent' }} />
95
+ ```
96
+ - No `z-index` on overlay components — Dialog, Sheet, Popover manage their own stacking
97
+
98
+ ---
99
+
100
+ ## Composition rules
101
+
102
+ Build pages from `App*` primitives and blocks — never from raw HTML or shadcn `ui/` components.
103
+
104
+ **Required sub-components:**
105
+ - `AppAvatar` → always include `AvatarFallback`
106
+ - `AppDialog` / `AppSheet` / `AppDrawer` → always include `DialogTitle` / `SheetTitle` / `DrawerTitle` (use `sr-only` if visually hidden)
107
+
108
+ **Slot composition:** Many block components (`AppDashboard`, `AppHeader`, etc.) accept `ReactNode` slots. Always fill slots with `App*` components — never raw HTML elements with className.
109
+
110
+ ```tsx
111
+ // ✅ Correct
112
+ <AppDashboard header={{
113
+ searchbar: <AppInput placeholder="Search..." value={q} onChange={e => setQ(e.target.value)} />
114
+ }} />
115
+
116
+ // ❌ Wrong — raw <input> with inline classes
117
+ <AppDashboard header={{
118
+ searchbar: <input className="flex h-9 rounded-md border ..." />
119
+ }} />
120
+ ```
121
+
122
+ If a slot accepts `ReactNode` and you need a form element, find the matching `App*` primitive:
123
+
124
+ | Raw element | Use instead |
125
+ |-------------|-------------|
126
+ | `<input>` | `AppInput` |
127
+ | `<button>` | `AppButton` |
128
+ | `<select>` | `AppSelect` |
129
+ | `<textarea>` | `AppTextarea` |
130
+ | `<label>` | `AppLabel` |
131
+ | `<table>` | `AppTable` + sub-components |
132
+
133
+ ---
134
+
135
+ ## App layout pattern
136
+
137
+ Every page in the app is rendered inside a single `AppDashboard` shell. The shell owns the sidebar and header — these are configured **once at the app/router level**, never rebuilt per page.
138
+
139
+ ```
140
+ AppDashboard
141
+ ├── sidebar (nav, brand/logo) ← configured once via `nav` + `brand` props
142
+ ├── header (search, actions) ← configured once via `header` prop
143
+ └── children ← per-page content goes HERE
144
+ ```
145
+
146
+ ```tsx
147
+ import { useNavigate } from "react-router-dom"
148
+
149
+ // app.tsx or layout.tsx — configured once
150
+ function Shell() {
151
+ const navigate = useNavigate()
152
+
153
+ return (
154
+ <AppDashboard
155
+ nav={[
156
+ {
157
+ title: "Dashboard",
158
+ icon: LayoutDashboard,
159
+ isActive: location.pathname === "/",
160
+ url: "/",
161
+ onClick: (e) => { e.preventDefault(); navigate("/") },
162
+ },
163
+ {
164
+ title: "Sites",
165
+ icon: MapPin,
166
+ isActive: location.pathname === "/sites",
167
+ url: "/sites",
168
+ onClick: (e) => { e.preventDefault(); navigate("/sites") },
169
+ },
170
+ ]}
171
+ header={{
172
+ searchbar: <AppInput placeholder="Search..." value={q} onChange={e => setQ(e.target.value)} />,
173
+ }}
174
+ >
175
+ <Outlet /> {/* or {children} */}
176
+ </AppDashboard>
177
+ )
178
+ }
179
+
180
+ // per-page — declare title co-located with the page, no shell wiring needed
181
+ import { usePageTitle } from "@skunkworksai/ui-kit"
182
+
183
+ export default function SitesPage() {
184
+ usePageTitle({
185
+ title: "Sites",
186
+ breadcrumbs: [{ label: "Dashboard", href: "/" }, { label: "Sites" }],
187
+ })
188
+ return (
189
+ <div className="flex flex-col gap-6">
190
+ <AppCard>...</AppCard>
191
+ <TableManager ... />
192
+ </div>
193
+ )
194
+ }
195
+ ```
196
+
197
+ **Rules — one shell per app:**
198
+ - Don't wrap individual pages in their own `AppDashboard`
199
+ - Don't re-pass `nav` or `header` props on every page render
200
+ - Don't add sidebar or header markup inside page components
201
+ - Don't build custom layout wrappers — `AppDashboard` handles sidebar, header, scroll, and responsive behaviour
202
+ - Don't use DOM queries to bridge sidebar clicks to a router — use `onClick` + `url` on nav items
203
+ - Don't manage page title in the shell via a growing switch/map — use `usePageTitle()` in each page instead
204
+
205
+ ---
206
+
207
+ ## Gap-fill: using raw shadcn components
208
+
209
+ If no `App*` primitive exists for a UI need, you may use the raw shadcn base as a gap-fill. When you do:
210
+
211
+ 1. Import from `@skunkworksai/ui-kit` (not from `@radix-ui/*` or internal paths)
212
+ 2. Keep usage minimal and isolated
213
+ 3. **Append an entry to `design-gaps.md`** at the project root so the design team can create a proper primitive
214
+
215
+ ### `design-gaps.md` entry format
216
+
217
+ ```markdown
218
+ ## Gap: [ComponentName] — YYYY-MM-DD
219
+
220
+ - **File:** `src/path/to/file.tsx`
221
+ - **Used:** `<ComponentName>` (raw shadcn — no App* equivalent exists)
222
+ - **Needed primitive:** `AppXxx` — [brief description / variants needed]
223
+ - **Context:** [one sentence on why this was needed]
224
+ ```
225
+
226
+ Send `design-gaps.md` to the design team (email design@skunkworks.ai or paste in the design Slack channel) so gaps get prioritized into the ui-kit backlog. The `app/no-raw-shadcn-imports` ESLint rule (warn level) flags these usages as a reminder.
227
+
228
+ ---
229
+
230
+ ## Per-component rules
231
+
232
+ Before using a component, read `node_modules/@skunkworksai/ui-kit/rules/<name>.md` for props reference, examples, and dos/don'ts. Replace `<name>` with the component name (examples: `button.md`, `alert-dialog.md`, `data-table.md`).
233
+
234
+ Available: accordion, alert, alert-dialog, aspect-ratio, avatar, badge, bento-menu, breadcrumb, button, button-group, calendar, card, carousel, chart, checkbox, collapsible, combobox, command, context-menu, dashboard, data-table, date-picker, dialog, drawer, dropdown-menu, empty, field, form, header, hover-card, icons, input, kbd, label, location-tree-filter, logo, menubar, navigation-menu, notifications-menu, pagetitle, pagination, popover, profile, progress, radio-group, scroll-area, scroll-text, select, separator, sheet, sidebar, skeleton, spinner, switch, table, table-manager, tabs, textarea, toaster, toggle, toggle-group, tokens, tooltip, typography.
235
+
236
+ ---
237
+
238
+ ## What NOT to do
239
+
240
+ | ❌ Never | ✅ Instead |
241
+ |----------|-----------|
242
+ | Use inline `style` props for styling | Tailwind classes or `[--var:value]` |
243
+ | Hardcode color values (`oklch(...)`, `hsl(...)`, `#hex`) | CSS variable classes (`bg-primary`, `text-foreground`) |
244
+ | Import from `@radix-ui/*` directly | Import from `@skunkworksai/ui-kit` |
245
+ | Use raw shadcn `Button`, `Dialog`, etc. | Use `AppButton`, `AppDialog`, etc. |
246
+ | Put raw `<input className="...">` in a slot | Use `AppInput` in the slot |
247
+ | Put raw `<button className="...">` in a slot | Use `AppButton` in the slot |
248
+ | Import from internal paths (`/src/`, `/dist/`) | Import from package root |
249
+ | Import logos or icons from `@skunkworksai/ui-kit` | Import from `./assets/logos` or `./assets/icons` |
250
+ | Attempt project setup from memory | Read `README.md` → Setup section, follow exactly |
package/README.md ADDED
@@ -0,0 +1,429 @@
1
+ # @skunkworksai/ui-kit
2
+
3
+ A React component library built on [shadcn/ui](https://ui.shadcn.com), Tailwind CSS v4, and Radix UI. Exports brand-wrapped `App*` primitives and pre-composed blocks for building product UIs.
4
+
5
+ ---
6
+
7
+ ## Installation
8
+
9
+ This package is published to GitHub Packages. Authentication is required.
10
+
11
+ ### 1. Create a GitHub Personal Access Token (PAT)
12
+
13
+ You need a GitHub token with `read:packages` permission to pull from GitHub Packages.
14
+
15
+ 1. Sign in to [github.com](https://github.com)
16
+ 2. Click your **profile photo** (top-right) → **Settings**
17
+ 3. Scroll to the bottom of the left sidebar → **Developer settings**
18
+ 4. Choose **Personal access tokens → Tokens (classic)**
19
+ 5. Click **Generate new token → Generate new token (classic)**
20
+ 6. Give it a name (e.g. `skunkworks-ui-kit`)
21
+ 7. Under **Select scopes**, check **`read:packages`** — nothing else needed
22
+ 8. Click **Generate token**
23
+ 9. **Copy the token immediately** — GitHub only shows it once
24
+
25
+ > **Fine-grained tokens:** GitHub's newer fine-grained PATs do not currently support GitHub Packages. Use **classic** tokens.
26
+
27
+ ### 2. Configure `.npmrc`
28
+
29
+ Add to your project's `.npmrc` (or `~/.npmrc` for global):
30
+
31
+ ```
32
+ @skunkworksai:registry=https://npm.pkg.github.com
33
+ //npm.pkg.github.com/:_authToken=${NPM_TOKEN}
34
+ ```
35
+
36
+ Set the env var to your copied token:
37
+
38
+ ```bash
39
+ # macOS / Linux — add to ~/.zshrc or ~/.bashrc to persist
40
+ export NPM_TOKEN=ghp_yourTokenHere
41
+
42
+ # Windows (PowerShell)
43
+ $env:NPM_TOKEN="ghp_yourTokenHere"
44
+
45
+ # Windows (cmd)
46
+ set NPM_TOKEN=ghp_yourTokenHere
47
+ ```
48
+
49
+ > **CI/CD:** add `NPM_TOKEN` as a secret in your GitHub Actions / CI settings and it will be available automatically — no code changes needed.
50
+
51
+ ### 3. Install
52
+
53
+ ```bash
54
+ pnpm add @skunkworksai/ui-kit
55
+ ```
56
+
57
+ To get the latest release:
58
+
59
+ ```bash
60
+ pnpm add @skunkworksai/ui-kit@latest
61
+ ```
62
+
63
+ Peer dependencies — your project must already have React 18 or 19:
64
+
65
+ ```bash
66
+ pnpm add react@>=18 react-dom@>=18
67
+ ```
68
+
69
+ ---
70
+
71
+ ## Agent setup (Claude, Gemini, etc.)
72
+
73
+ Run once in your project root:
74
+
75
+ ```bash
76
+ echo "@node_modules/@skunkworksai/ui-kit/AGENTS.md" >> CLAUDE.md
77
+ ```
78
+
79
+ This auto-loads component rules, naming conventions, token guidelines, and dos/don'ts at every Claude Code session. Per-component rules live in `node_modules/@skunkworksai/ui-kit/rules/` and are referenced from `AGENTS.md`.
80
+
81
+ Once set up, your agent can guide you through the Setup steps below — including scaffolding tokens and assets, wiring imports, and building your first page.
82
+
83
+ ---
84
+
85
+ ## Setup
86
+
87
+ ### 1. Import the stylesheet
88
+
89
+ In your app entry (e.g. `main.tsx`):
90
+
91
+ ```ts
92
+ import '@skunkworksai/ui-kit/styles'
93
+ ```
94
+
95
+ This imports Tailwind utilities and component CSS. **It does not include color values** — those come from your token file (next step).
96
+
97
+ ### 2. Scaffold your token file
98
+
99
+ Copy the token source into your project using the included scaffold script (works on all platforms):
100
+
101
+ ```bash
102
+ node node_modules/@skunkworksai/ui-kit/scripts/scaffold.mjs
103
+ ```
104
+
105
+ This copies `tokens-source.css` → `src/tokens.css` and `dist/assets/` → `src/assets/` in one step. Skip to step 5 after running it.
106
+
107
+ Alternatively, copy manually:
108
+
109
+ ```bash
110
+ # macOS / Linux
111
+ cp node_modules/@skunkworksai/ui-kit/dist/tokens-source.css src/tokens.css
112
+
113
+ # Windows (PowerShell)
114
+ Copy-Item node_modules\@skunkworksai\ui-kit\dist\tokens-source.css src\tokens.css
115
+ ```
116
+
117
+ This gives you a `src/tokens.css` with all color, radius, font, and shadow tokens. You own this file — edit it freely to match your brand or use [tweakcn.com](https://tweakcn.com) to adjust values visually.
118
+
119
+ ### 3. Import your token file
120
+
121
+ In your app entry, import `tokens.css` **after** the stylesheet:
122
+
123
+ ```ts
124
+ // main.tsx
125
+ import '@skunkworksai/ui-kit/styles' // infrastructure first
126
+ import './tokens.css' // your tokens second — order matters
127
+ ```
128
+
129
+ Without this, all CSS variables are unresolved and the UI renders with no colors.
130
+
131
+ ### 4. Scaffold assets
132
+
133
+ Copy logos, icons, and service applet images into your project:
134
+
135
+ ```bash
136
+ # macOS / Linux
137
+ cp -r node_modules/@skunkworksai/ui-kit/dist/assets src/assets
138
+
139
+ # Windows (PowerShell)
140
+ Copy-Item -Recurse node_modules\@skunkworksai\ui-kit\dist\assets src\assets
141
+ ```
142
+
143
+ Or use the scaffold script from step 2 — it copies both tokens and assets in one command.
144
+
145
+ You own these files. Import from your own copy, not from the package:
146
+
147
+ ```tsx
148
+ import { PrimaryLogo, WhiteLogo } from './assets/logos'
149
+ import { DashboardIcon, DashboardActiveIcon } from './assets/icons'
150
+ import { AudienceMeasurementImg } from './assets/Service-applets-apps'
151
+ ```
152
+
153
+ On package upgrades, re-run the copy and diff `src/assets/` against the new `dist/assets/` to pick up any changed files.
154
+
155
+ ### 5. Use components
156
+
157
+ ```tsx
158
+ import { AppButton, AppCard, AppCardHeader, AppCardTitle, AppCardContent, AppBadge } from '@skunkworksai/ui-kit'
159
+
160
+ export default function Example() {
161
+ return (
162
+ <AppCard>
163
+ <AppCardHeader>
164
+ <AppCardTitle>Hello</AppCardTitle>
165
+ </AppCardHeader>
166
+ <AppCardContent className="flex items-center gap-2">
167
+ <AppButton variant="default">Click me</AppButton>
168
+ <AppBadge variant="secondary">New</AppBadge>
169
+ </AppCardContent>
170
+ </AppCard>
171
+ )
172
+ }
173
+ ```
174
+
175
+ ---
176
+
177
+ ## Component architecture
178
+
179
+ Three layers — always use `App*` primitives in product code, never the raw `ui/` base:
180
+
181
+ ```
182
+ src/components/
183
+ ├── ui/ ← Layer 1: shadcn/ui base. Internal only. Do not import directly.
184
+ ├── primitives/ ← Layer 2: App* brand wrappers. Use these in your app.
185
+ └── blocks/ ← Layer 3: Pre-composed product sections (dashboard, table manager, etc.)
186
+ ```
187
+
188
+ ---
189
+
190
+ ## Available components
191
+
192
+ ### Primitives
193
+
194
+ | Component | Exports |
195
+ |-----------|---------|
196
+ | Accordion | `AppAccordion`, `AppAccordionItem`, `AppAccordionTrigger`, `AppAccordionContent` |
197
+ | Alert | `AppAlert`, `AppAlertTitle`, `AppAlertDescription`, `AppAlertContent` |
198
+ | AlertDialog | `AppAlertDialog`, `AppAlertDialogTrigger`, `AppAlertDialogContent`, `AppAlertDialogHeader`, `AppAlertDialogFooter`, `AppAlertDialogTitle`, `AppAlertDialogDescription`, `AppAlertDialogAction`, `AppAlertDialogCancel` |
199
+ | AspectRatio | `AppAspectRatio` |
200
+ | Avatar | `AppAvatar`, `AppAvatarImage`, `AppAvatarFallback` |
201
+ | Badge | `AppBadge` |
202
+ | Breadcrumb | `AppBreadcrumb`, `AppBreadcrumbList`, `AppBreadcrumbItem`, `AppBreadcrumbLink`, `AppBreadcrumbPage`, `AppBreadcrumbSeparator` |
203
+ | Button | `AppButton` |
204
+ | ButtonGroup | `AppButtonGroup` |
205
+ | Calendar | `AppCalendar` |
206
+ | Card | `AppCard`, `AppCardHeader`, `AppCardTitle`, `AppCardDescription`, `AppCardAction`, `AppCardContent`, `AppCardFooter` |
207
+ | Carousel | `AppCarousel`, `AppCarouselContent`, `AppCarouselItem`, `AppCarouselPrevious`, `AppCarouselNext`, `AppCarouselApi`, `useAppCarousel` |
208
+ | Chart | `AppChartContainer`, `AppChartTooltip`, `AppChartTooltipContent`, `AppChartLegend`, `AppChartLegendContent`, `AppChartStyle`, `useAppChart`, `AppChartConfig` |
209
+ | Checkbox | `AppCheckbox` |
210
+ | Collapsible | `AppCollapsible`, `AppCollapsibleTrigger`, `AppCollapsibleContent` |
211
+ | Combobox | `AppCombobox`, `AppComboboxInput`, `AppComboboxContent`, `AppComboboxList`, `AppComboboxItem`, `AppComboboxEmpty`, `AppComboboxSeparator` |
212
+ | Command | `AppCommand`, `AppCommandDialog`, `AppCommandInput`, `AppCommandList`, `AppCommandEmpty`, `AppCommandGroup`, `AppCommandItem`, `AppCommandShortcut`, `AppCommandSeparator` |
213
+ | ContextMenu | `AppContextMenu`, `AppContextMenuTrigger`, `AppContextMenuContent`, `AppContextMenuItem`, `AppContextMenuLabel`, `AppContextMenuSeparator`, … |
214
+ | DataTable | `AppDataTable` |
215
+ | DatePicker | `AppDatePicker` |
216
+ | Dialog | `AppDialog`, `AppDialogTrigger`, `AppDialogContent`, `AppDialogHeader`, `AppDialogTitle`, `AppDialogDescription` |
217
+ | Drawer | `AppDrawer`, `AppDrawerTrigger`, `AppDrawerContent`, `AppDrawerHeader`, `AppDrawerFooter`, `AppDrawerTitle`, `AppDrawerDescription` |
218
+ | DropdownMenu | `AppDropdownMenu`, `AppDropdownMenuTrigger`, `AppDropdownMenuContent`, `AppDropdownMenuItem`, `AppDropdownMenuLabel`, `AppDropdownMenuSeparator`, … |
219
+ | Empty | `AppEmpty`, `AppEmptyHeader`, `AppEmptyMedia`, `AppEmptyTitle`, `AppEmptyDescription`, `AppEmptyContent` |
220
+ | Field | `AppField`, `AppFieldLabel`, `AppFieldControl`, `AppFieldDescription`, `AppFieldError`, `AppFieldContent`, `AppFieldTitle`, `AppFieldGroup`, `AppFieldSet`, `useAppField` |
221
+ | Form | `AppForm`, `AppFormItem`, `AppFormLabel`, `AppFormControl`, `AppFormDescription`, `AppFormMessage`, `AppFormField` |
222
+ | HoverCard | `AppHoverCard`, `AppHoverCardTrigger`, `AppHoverCardContent` |
223
+ | Input | `AppInput` |
224
+ | Kbd | `AppKbd`, `AppKbdGroup` |
225
+ | Label | `AppLabel` |
226
+ | Menubar | `AppMenubar`, `AppMenubarMenu`, `AppMenubarTrigger`, `AppMenubarContent`, `AppMenubarItem`, `AppMenubarSeparator`, `AppMenubarLabel`, … |
227
+ | NavigationMenu | `AppNavigationMenu`, `AppNavigationMenuList`, `AppNavigationMenuItem`, `AppNavigationMenuTrigger`, `AppNavigationMenuContent`, `AppNavigationMenuLink` |
228
+ | Pagination | `AppPagination`, `AppPaginationContent`, `AppPaginationItem`, `AppPaginationLink`, `AppPaginationPrevious`, `AppPaginationNext`, `AppPaginationEllipsis` |
229
+ | Popover | `AppPopover`, `AppPopoverTrigger`, `AppPopoverContent` |
230
+ | Progress | `AppProgress` |
231
+ | RadioGroup | `AppRadioGroup`, `AppRadioGroupItem` |
232
+ | ScrollArea | `AppScrollArea`, `AppScrollBar` |
233
+ | ScrollText | `AppScrollText` |
234
+ | Select | `AppSelect`, `AppSelectTrigger`, `AppSelectValue`, `AppSelectContent`, `AppSelectItem`, `AppSelectLabel` |
235
+ | Separator | `AppSeparator` |
236
+ | Sheet | `AppSheet`, `AppSheetTrigger`, `AppSheetContent`, `AppSheetHeader`, `AppSheetTitle`, `AppSheetDescription` |
237
+ | Skeleton | `AppSkeleton` |
238
+ | Spinner | `AppSpinner` |
239
+ | Switch | `AppSwitch` |
240
+ | Table | `AppTable`, `AppTableHeader`, `AppTableBody`, `AppTableFooter`, `AppTableHead`, `AppTableRow`, `AppTableCell`, `AppTableCaption` |
241
+ | Tabs | `AppTabs`, `AppTabsList`, `AppTabsTrigger`, `AppTabsContent` |
242
+ | Textarea | `AppTextarea` |
243
+ | Toggle | `AppToggle` |
244
+ | ToggleGroup | `AppToggleGroup`, `AppToggleGroupItem` |
245
+ | Tooltip | `AppTooltip`, `AppTooltipProvider`, `AppTooltipTrigger`, `AppTooltipContent` |
246
+ | Typography | `AppTypography` |
247
+ | Toaster | `AppToaster`, `sonnerToast` |
248
+ | ThemeProvider | `AppThemeProvider`, `useAppTheme`, `AppThemeToggle` |
249
+
250
+ ### Blocks
251
+
252
+ | Block | Exports |
253
+ |-------|---------|
254
+ | Dashboard | `AppDashboard`, `AppDashboardBackground`, `AppDashboardContent`, `AppDashboardMain` |
255
+ | Header | `AppHeader`, `AppHeaderContent`, `AppHeaderTitle`, `AppHeaderSearchbar`, `AppHeaderActions`, `AppHeaderNetworkCombobox` |
256
+ | BentoMenu | `AppBentoMenu`, `AppBentoMenuItem`, `DEFAULT_BENTO_APPS` |
257
+ | NotificationsMenu | `AppNotificationsMenu`, `type AppNotification`, `type AppNotificationVariant` |
258
+ | PageTitle | `AppPageTitle` |
259
+ | Profile | `AppProfile`, `type AppProfileUser`, `type AppProfileItem` |
260
+ | TableManager | `TableManager`, `TableManagerToolbar`, `TableManagerSearch`, `TableManagerToolbarActions`, `TableManagerMultiFilter`, `TableManagerDateRange`, `TableManagerRowsPerPage`, `TableManagerPagination`, `TableManagerColumnToggle`, `TableManagerExport`, `TableManagerContent`, `TableManagerFooter` |
261
+ | LocationTreeFilter | `AppLocationTreeFilter` |
262
+
263
+ ### Assets
264
+
265
+ Assets ship as raw files in `dist/assets/`. After running the scaffold step in Setup (step 4), import from `src/assets/` — not from the package directly.
266
+
267
+ ```tsx
268
+ import { PrimaryLogo, DarkLogo, WhiteLogo } from './assets/logos'
269
+ import { PrimarySymbol, DarkSymbol, WhiteSymbol } from './assets/logos'
270
+ import { DashboardIcon, DashboardActiveIcon } from './assets/icons'
271
+ import { AudienceMeasurementImg } from './assets/Service-applets-apps'
272
+ ```
273
+
274
+ ---
275
+
276
+ ## Styling rules
277
+
278
+ - All colors from CSS variables — never hardcode `#hex`, `hsl()`, or `oklch()` values
279
+ - Use `className` with Tailwind utilities — never inline `style` props
280
+ - Dark mode handled automatically via CSS variables — no manual `dark:` color overrides needed
281
+ - Use `clsx` or your own `cn` helper for className merging
282
+
283
+ ```tsx
284
+ import { clsx } from 'clsx'
285
+
286
+ <AppButton className={clsx('w-full', isLoading && 'opacity-50')} />
287
+ ```
288
+
289
+ ---
290
+
291
+ ## Building pages with AI agents
292
+
293
+ After adding `CLAUDE.md` (see Agent setup above), your agent knows every component, its props, token rules, and composition patterns. Describe what you want to build — the agent picks the right components and wires them together correctly.
294
+
295
+ **Tip:** Be outcome-focused. Don't specify component names unless you know exactly what you need — the agent reads the rules files and picks the right ones.
296
+
297
+ ### Dashboard page
298
+
299
+ ```
300
+ Build a dashboard page using AppDashboard with:
301
+ - Sidebar with sections: Dashboard, Sites, Users, Reports, Settings
302
+ - Header with a search bar and user avatar
303
+ - Three stat cards at the top showing total sites, active sessions, and uptime
304
+ - A data table below with pagination
305
+
306
+ Use the ui-kit rules for each component.
307
+ ```
308
+
309
+ ### Settings page
310
+
311
+ ```
312
+ Build a settings page with:
313
+ - AppHeader with title "Settings"
314
+ - AppTabs for General / Security / Notifications
315
+ - AppCard sections within each tab using AppForm, AppInput, AppLabel, AppSwitch
316
+ - AppButton for save actions
317
+ Follow the rules in node_modules/@skunkworksai/ui-kit/rules/ for each component used.
318
+ ```
319
+
320
+ ### Custom component
321
+
322
+ ```
323
+ Create a user profile card using ui-kit components that shows:
324
+ - AppAvatar with fallback initials
325
+ - User name and role using AppTypography
326
+ - A row of AppBadge for skills/tags
327
+ - AppButton for "Edit Profile" and "Message"
328
+ Do not hardcode any colors. Use token classes only.
329
+ ```
330
+
331
+ Agents read the relevant `rules/*.md` files automatically and produce token-compliant, accessible output without you specifying every prop.
332
+
333
+ ---
334
+
335
+ ## Theming
336
+
337
+ All design tokens are CSS custom properties defined in your `src/tokens.css` (scaffolded in Setup step 2). Edit that file directly to change colors, radius, fonts, or shadows — no Tailwind config or build step required.
338
+
339
+ Use [tweakcn.com](https://tweakcn.com) to adjust values visually: paste your `src/tokens.css` in, tweak, paste back.
340
+
341
+ ```css
342
+ /* src/tokens.css — edit any token */
343
+ :root {
344
+ --primary: oklch(0.6 0.2 250);
345
+ --primary-foreground: oklch(1 0 0);
346
+ --radius: 0.75rem;
347
+ --font-sans: 'Inter', ui-sans-serif, sans-serif;
348
+ }
349
+ ```
350
+
351
+ ### Available tokens
352
+
353
+ | Token | Default role |
354
+ |-------|-------------|
355
+ | `--primary` | Brand color — buttons, links, focus rings |
356
+ | `--primary-foreground` | Text on primary backgrounds |
357
+ | `--secondary` | Secondary surfaces |
358
+ | `--secondary-foreground` | Text on secondary backgrounds |
359
+ | `--background` | Page background |
360
+ | `--foreground` | Default text color |
361
+ | `--muted` | Muted surface (inputs, subtle areas) |
362
+ | `--muted-foreground` | Placeholder / secondary text |
363
+ | `--accent` | Hover states, highlights |
364
+ | `--accent-foreground` | Text on accent backgrounds |
365
+ | `--destructive` | Error / danger color |
366
+ | `--destructive-foreground` | Text on destructive backgrounds |
367
+ | `--success` | Success states |
368
+ | `--warning` | Warning states |
369
+ | `--border` | Default border color |
370
+ | `--input` | Input border color |
371
+ | `--ring` | Focus ring color |
372
+ | `--radius` | Base border radius |
373
+ | `--font-sans` | Sans-serif font stack |
374
+ | `--sidebar` | Sidebar background |
375
+ | `--chart-1` … `--chart-5` | Chart color palette |
376
+
377
+ ### Dark mode
378
+
379
+ Dark mode tokens are set automatically when a `.dark` class is applied to a parent element. Override dark mode tokens with:
380
+
381
+ ```css
382
+ .dark {
383
+ --primary: oklch(0.65 0.2 250);
384
+ --background: oklch(0.1 0.02 265);
385
+ }
386
+ ```
387
+
388
+ ---
389
+
390
+ ## Development (contributing to this repo)
391
+
392
+ ```bash
393
+ # Install dependencies
394
+ pnpm install
395
+
396
+ # Storybook component explorer
397
+ pnpm dev
398
+
399
+ # Library build (outputs to dist/)
400
+ pnpm build:lib
401
+
402
+ # Docs site
403
+ cd docs && pnpm install && pnpm dev
404
+
405
+ # Typecheck
406
+ pnpm typecheck
407
+
408
+ # Lint
409
+ pnpm lint
410
+ ```
411
+
412
+ See `AGENTS.dev.md` for the full contributor workflow (build → review → publish phases, component addition guide, architecture rules).
413
+
414
+ ---
415
+
416
+ ## Tech stack
417
+
418
+ - React ≥ 18
419
+ - Tailwind CSS v4
420
+ - Radix UI primitives
421
+ - shadcn/ui base components
422
+ - Vite (library build + Storybook)
423
+ - TypeScript
424
+
425
+ ---
426
+
427
+ ## License
428
+
429
+ MIT