@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
@@ -0,0 +1,60 @@
1
+ # AppDialog
2
+
3
+ > Docs: https://ui-kit.vercel.app/docs/components/dialog
4
+
5
+ ```tsx
6
+ import {
7
+ AppDialog,
8
+ AppDialogTrigger,
9
+ AppDialogContent,
10
+ AppDialogHeader,
11
+ AppDialogTitle,
12
+ AppDialogDescription,
13
+ } from "@/components/primitives/AppDialog"
14
+ ```
15
+
16
+ ## AppDialog
17
+
18
+ | Prop | Type | Default | Description |
19
+ | :--- | :--- | :--- | :--- |
20
+ | `open` | `boolean` | - | The controlled open state of the dialog. |
21
+ | `onOpenChange` | `(open: boolean) => void` | - | Event handler called when the open state of the dialog changes. |
22
+
23
+ ## AppDialogTrigger
24
+
25
+ | Prop | Type | Default | Description |
26
+ | :--- | :--- | :--- | :--- |
27
+ | `asChild` | `boolean` | `false` | Change the default rendered element for the one passed as a child. |
28
+
29
+ ## Usage
30
+
31
+ ### Default Dialog
32
+ ```tsx
33
+ <AppDialog>
34
+ <AppDialogTrigger asChild>
35
+ <AppButton>Open Dialog</AppButton>
36
+ </AppDialogTrigger>
37
+ <AppDialogContent>
38
+ <AppDialogHeader>
39
+ <AppDialogTitle>Are you absolutely sure?</AppDialogTitle>
40
+ <AppDialogDescription>
41
+ This action cannot be undone. This will permanently delete your account
42
+ and remove your data from our servers.
43
+ </AppDialogDescription>
44
+ </AppDialogHeader>
45
+ </AppDialogContent>
46
+ </AppDialog>
47
+ ```
48
+
49
+ ## Rules
50
+
51
+ - **Do** always provide an `AppDialogTitle` for accessibility.
52
+ - **Do** use `asChild` on the trigger to use an `AppButton`.
53
+ - **Don't** use `AppDialog` for small tooltips; use `AppTooltip` or `AppPopover` instead.
54
+ - If a prop you need is missing, stop and inform the design team.
55
+
56
+ ## Responsive
57
+
58
+ On mobile (<768px) `AppDialog` renders as a bottom `Drawer` (Vaul); all sub-components (`AppDialogContent`, `AppDialogHeader`, `AppDialogTitle`, `AppDialogDescription`, `AppDialogTrigger`) switch automatically via internal context. The consumer API is identical at all sizes. Note: Radix-Dialog-specific props (e.g. `onEscapeKeyDown`) passed to `AppDialogContent` are not forwarded on mobile.
59
+
60
+ > **Implementation note:** `AppDialogContent` must explicitly pass `{children}` on both the mobile (DrawerContent) and desktop (DialogContent) paths. Omitting children on the desktop path renders a blank panel.
@@ -0,0 +1,65 @@
1
+ # AppDrawer
2
+
3
+ > Docs: https://ui-kit.vercel.app/docs/components/drawer
4
+
5
+ ```tsx
6
+ import {
7
+ AppDrawer,
8
+ AppDrawerTrigger,
9
+ AppDrawerContent,
10
+ AppDrawerHeader,
11
+ AppDrawerFooter,
12
+ AppDrawerTitle,
13
+ AppDrawerDescription,
14
+ AppDrawerClose,
15
+ } from "@/components/primitives/AppDrawer"
16
+ ```
17
+
18
+ ## AppDrawer
19
+
20
+ | Prop | Type | Default | Description |
21
+ | :--- | :--- | :--- | :--- |
22
+ | `open` | `boolean` | - | The controlled open state of the drawer. |
23
+ | `onOpenChange` | `(open: boolean) => void` | - | Event handler called when the open state of the drawer changes. |
24
+ | `shouldScaleBackground` | `boolean` | `false` | Whether to scale the background when the drawer is open. |
25
+
26
+ ## AppDrawerTrigger
27
+
28
+ | Prop | Type | Default | Description |
29
+ | :--- | :--- | :--- | :--- |
30
+ | `asChild` | `boolean` | `false` | Change the default rendered element for the one passed as a child. |
31
+
32
+ ## Usage
33
+
34
+ ### Default Drawer
35
+ ```tsx
36
+ <AppDrawer>
37
+ <AppDrawerTrigger asChild>
38
+ <AppButton>Open Drawer</AppButton>
39
+ </AppDrawerTrigger>
40
+ <AppDrawerContent>
41
+ <AppDrawerHeader>
42
+ <AppDrawerTitle>Edit Profile</AppDrawerTitle>
43
+ <AppDrawerDescription>
44
+ Make changes to your profile here. Click save when you are done.
45
+ </AppDrawerDescription>
46
+ </AppDrawerHeader>
47
+ <div className="p-4">
48
+ {/* Drawer Content */}
49
+ </div>
50
+ <AppDrawerFooter>
51
+ <AppButton>Save Changes</AppButton>
52
+ <AppDrawerClose asChild>
53
+ <AppButton variant="outline">Cancel</AppButton>
54
+ </AppDrawerClose>
55
+ </AppDrawerFooter>
56
+ </AppDrawerContent>
57
+ </AppDrawer>
58
+ ```
59
+
60
+ ## Rules
61
+
62
+ - **Do** use `AppDrawer` for mobile-friendly overlays or supplemental content.
63
+ - **Do** ensure `AppDrawerTitle` is provided for accessibility.
64
+ - **Don't** use `AppDrawer` if the content is too small; use `AppDialog` or `AppPopover` instead.
65
+ - If a prop you need is missing, stop and inform the design team.
@@ -0,0 +1,72 @@
1
+ # AppDropdownMenu
2
+
3
+ > Docs: https://ui-kit.vercel.app/docs/components/dropdown-menu
4
+
5
+ ```tsx
6
+ import {
7
+ AppDropdownMenu,
8
+ AppDropdownMenuTrigger,
9
+ AppDropdownMenuContent,
10
+ AppDropdownMenuItem,
11
+ AppDropdownMenuCheckboxItem,
12
+ AppDropdownMenuRadioItem,
13
+ AppDropdownMenuLabel,
14
+ AppDropdownMenuSeparator,
15
+ AppDropdownMenuShortcut,
16
+ AppDropdownMenuGroup,
17
+ AppDropdownMenuSub,
18
+ AppDropdownMenuSubContent,
19
+ AppDropdownMenuSubTrigger,
20
+ AppDropdownMenuRadioGroup,
21
+ } from "@/components/primitives/AppDropdownMenu"
22
+ ```
23
+
24
+ ## AppDropdownMenuContent
25
+
26
+ | Prop | Type | Default | Description |
27
+ | :--- | :--- | :--- | :--- |
28
+ | `side` | `"top" \| "right" \| "bottom" \| "left"` | `"bottom"` | The preferred side of the trigger to render against when open. |
29
+ | `align` | `"start" \| "center" \| "end"` | `"center"` | The preferred alignment against the trigger. |
30
+
31
+ ## AppDropdownMenuItem
32
+
33
+ | Prop | Type | Default | Description |
34
+ | :--- | :--- | :--- | :--- |
35
+ | `onSelect` | `(event: Event) => void` | - | Event handler called when the item is selected. |
36
+ | `disabled` | `boolean` | - | Whether the item is disabled. |
37
+
38
+ ## Usage
39
+
40
+ ### Basic Dropdown Menu
41
+ ```tsx
42
+ <AppDropdownMenu>
43
+ <AppDropdownMenuTrigger asChild>
44
+ <AppButton>Open Menu</AppButton>
45
+ </AppDropdownMenuTrigger>
46
+ <AppDropdownMenuContent className="w-56">
47
+ <AppDropdownMenuLabel>My Account</AppDropdownMenuLabel>
48
+ <AppDropdownMenuSeparator />
49
+ <AppDropdownMenuItem>
50
+ <UserIcon className="mr-2 h-4 w-4" />
51
+ <span>Profile</span>
52
+ </AppDropdownMenuItem>
53
+ <AppDropdownMenuItem>
54
+ <SettingsIcon className="mr-2 h-4 w-4" />
55
+ <span>Settings</span>
56
+ </AppDropdownMenuItem>
57
+ <AppDropdownMenuSeparator />
58
+ <AppDropdownMenuItem>Logout</AppDropdownMenuItem>
59
+ </AppDropdownMenuContent>
60
+ </AppDropdownMenu>
61
+ ```
62
+
63
+ ## Rules
64
+
65
+ - **Do** use `AppDropdownMenu` for a list of actions or functions.
66
+ - **Do** use `AppDropdownMenuSeparator` to group related items.
67
+ - **Don't** use `AppDropdownMenu` for navigation; use `AppNavigationMenu` if appropriate.
68
+ - If a prop you need is missing, stop and inform the design team.
69
+
70
+ ## Responsive
71
+
72
+ On mobile (<768px) `AppDropdownMenu` renders as a bottom `Drawer`; `AppDropdownMenuTrigger` becomes a `DrawerTrigger`, `AppDropdownMenuContent` becomes `DrawerContent` with items stacked as styled `<button>` elements, and `AppDropdownMenuShortcut` is hidden. Sub-menus (`AppDropdownMenuSub`) remain desktop-only — do not rely on them at mobile widths.
package/rules/empty.md ADDED
@@ -0,0 +1,110 @@
1
+ # AppEmpty
2
+
3
+ > Docs: https://ui-kit.vercel.app/docs/components/empty
4
+
5
+ ```tsx
6
+ import {
7
+ AppEmpty,
8
+ AppEmptyHeader,
9
+ AppEmptyMedia,
10
+ AppEmptyTitle,
11
+ AppEmptyDescription,
12
+ AppEmptyContent,
13
+ } from "@skunkworksai/ui-kit"
14
+ ```
15
+
16
+ ## AppEmpty
17
+
18
+ Root container. Centered column with `gap-4` and `p-8`.
19
+
20
+ Accepts all `<div>` HTML attributes.
21
+
22
+ ## AppEmptyHeader
23
+
24
+ Centered column grouping media + title + description. Use as the first child of `AppEmpty`.
25
+
26
+ Accepts all `<div>` HTML attributes.
27
+
28
+ ## AppEmptyMedia
29
+
30
+ Container for an illustration, icon, or image.
31
+
32
+ | Prop | Type | Default | Description |
33
+ |------|------|---------|-------------|
34
+ | `variant` | `"default"` \| `"icon"` | `"default"` | `"icon"` renders a `size-12` rounded muted circle — use with a Lucide icon. `"default"` is a bare container for custom illustrations. |
35
+
36
+ ## AppEmptyTitle
37
+
38
+ Primary heading. Renders `<h3>` with `text-base font-semibold`.
39
+
40
+ Accepts all `<h3>` HTML attributes.
41
+
42
+ ## AppEmptyDescription
43
+
44
+ Supporting text below the title. Renders `<p>` with `text-sm text-muted-foreground`.
45
+
46
+ Accepts all `<p>` HTML attributes.
47
+
48
+ ## AppEmptyContent
49
+
50
+ Action area below the header. Use for buttons or links.
51
+
52
+ Accepts all `<div>` HTML attributes.
53
+
54
+ ## Usage
55
+
56
+ ### Zero-data state with icon
57
+ ```tsx
58
+ import { InboxIcon } from "lucide-react"
59
+
60
+ <AppEmpty>
61
+ <AppEmptyHeader>
62
+ <AppEmptyMedia variant="icon">
63
+ <InboxIcon className="size-6" aria-hidden />
64
+ </AppEmptyMedia>
65
+ <AppEmptyTitle>No items</AppEmptyTitle>
66
+ <AppEmptyDescription>Get started by creating a new item.</AppEmptyDescription>
67
+ </AppEmptyHeader>
68
+ <AppEmptyContent>
69
+ <AppButton size="sm">Create item</AppButton>
70
+ </AppEmptyContent>
71
+ </AppEmpty>
72
+ ```
73
+
74
+ ### No search results
75
+ ```tsx
76
+ import { Search } from "lucide-react"
77
+
78
+ <AppEmpty>
79
+ <AppEmptyHeader>
80
+ <AppEmptyMedia variant="icon">
81
+ <Search className="size-6" aria-hidden />
82
+ </AppEmptyMedia>
83
+ <AppEmptyTitle>No results</AppEmptyTitle>
84
+ <AppEmptyDescription>Try adjusting your search or filters.</AppEmptyDescription>
85
+ </AppEmptyHeader>
86
+ </AppEmpty>
87
+ ```
88
+
89
+ ### With illustration
90
+ ```tsx
91
+ <AppEmpty>
92
+ <AppEmptyHeader>
93
+ <AppEmptyMedia>
94
+ <img src="/empty-illustration.svg" alt="" className="size-24" />
95
+ </AppEmptyMedia>
96
+ <AppEmptyTitle>Nothing here yet</AppEmptyTitle>
97
+ <AppEmptyDescription>Add your first item to get started.</AppEmptyDescription>
98
+ </AppEmptyHeader>
99
+ <AppEmptyContent>
100
+ <AppButton>Get started</AppButton>
101
+ </AppEmptyContent>
102
+ </AppEmpty>
103
+ ```
104
+
105
+ ## Rules
106
+ - ✅ Use `AppEmpty` for all zero-data states — no results, first-time views, filtered-empty lists
107
+ - ✅ Use `variant="icon"` on `AppEmptyMedia` when showing a Lucide icon
108
+ - ✅ Always include `AppEmptyTitle` — it is the primary accessible label for the state
109
+ - ❌ Do not nest `AppEmptyHeader` inside `AppEmptyContent` — they are siblings
110
+ - ❌ If a prop you need is missing, stop and inform the design team
package/rules/field.md ADDED
@@ -0,0 +1,149 @@
1
+ # AppField
2
+
3
+ > Docs: https://ui-kit.vercel.app/docs/components/field
4
+
5
+ ```tsx
6
+ import {
7
+ AppField,
8
+ AppFieldLabel,
9
+ AppFieldControl,
10
+ AppFieldDescription,
11
+ AppFieldError,
12
+ AppFieldContent,
13
+ AppFieldTitle,
14
+ AppFieldGroup,
15
+ AppFieldSet,
16
+ AppFieldLegend,
17
+ useAppField,
18
+ } from "@skunkworksai/ui-kit"
19
+ ```
20
+
21
+ ## AppField
22
+
23
+ Root provider. Generates a stable `id` and propagates `invalid` state to all child field components via context.
24
+
25
+ | Prop | Type | Default | Description |
26
+ |------|------|---------|-------------|
27
+ | `orientation` | `"vertical"` \| `"horizontal"` \| `"responsive"` | `"vertical"` | Layout of label + input. `"responsive"` is vertical on mobile, horizontal on `md+`. |
28
+ | `invalid` | `boolean` | `false` | Marks field invalid. Turns label red and wires `aria-invalid` on the control. |
29
+ | `className` | `string` | — | Additional Tailwind classes. |
30
+
31
+ ## AppFieldLabel
32
+
33
+ Label bound to the control via FieldContext id. Do not set `htmlFor` manually.
34
+
35
+ | Prop | Type | Default | Description |
36
+ |------|------|---------|-------------|
37
+ | `required` | `boolean` | `false` | Appends a red asterisk after the label text. |
38
+
39
+ ## AppFieldControl
40
+
41
+ Slot wrapper. Injects `id`, `aria-describedby`, and `aria-invalid` from FieldContext onto the wrapped input. Wrap every input with this.
42
+
43
+ Accepts all Radix `Slot` props.
44
+
45
+ ## AppFieldDescription
46
+
47
+ Helper text below the input. Always rendered (not conditional) so `aria-describedby` stays stable.
48
+
49
+ Accepts all `<p>` HTML attributes.
50
+
51
+ ## AppFieldError
52
+
53
+ Validation error text. Renders nothing when `children` is empty or falsy.
54
+
55
+ Accepts all `<p>` HTML attributes.
56
+
57
+ ## AppFieldContent
58
+
59
+ Vertical stack (`gap-1`) wrapper for `AppFieldDescription` and `AppFieldError`.
60
+
61
+ Accepts all `<div>` HTML attributes.
62
+
63
+ ## AppFieldTitle
64
+
65
+ Small semibold label above a group of fields. Not bound to any control — use `AppFieldLabel` for per-input labels.
66
+
67
+ Accepts all `<p>` HTML attributes.
68
+
69
+ ## AppFieldGroup
70
+
71
+ Vertical stack (`gap-4`) of multiple `AppField` rows.
72
+
73
+ Accepts all `<div>` HTML attributes.
74
+
75
+ ## AppFieldSet
76
+
77
+ Semantic `<fieldset>` with browser defaults stripped (`m-0 border-0 p-0`).
78
+
79
+ Accepts all `<fieldset>` HTML attributes.
80
+
81
+ ## AppFieldLegend
82
+
83
+ Legend for `AppFieldSet`.
84
+
85
+ | Prop | Type | Default | Description |
86
+ |------|------|---------|-------------|
87
+ | `variant` | `"legend"` \| `"label"` | `"legend"` | `"legend"` is visually hidden (`sr-only`). `"label"` renders visible like `AppFieldLabel`. |
88
+
89
+ ## Usage
90
+
91
+ ### Default field
92
+ ```tsx
93
+ <AppField>
94
+ <AppFieldLabel required>Email address</AppFieldLabel>
95
+ <AppFieldControl>
96
+ <AppInput type="email" placeholder="you@example.com" />
97
+ </AppFieldControl>
98
+ <AppFieldDescription>We will never share your email.</AppFieldDescription>
99
+ </AppField>
100
+ ```
101
+
102
+ ### Field with validation error
103
+ ```tsx
104
+ <AppField invalid>
105
+ <AppFieldLabel>Username</AppFieldLabel>
106
+ <AppFieldControl>
107
+ <AppInput placeholder="johndoe" defaultValue="jo" />
108
+ </AppFieldControl>
109
+ <AppFieldContent>
110
+ <AppFieldDescription>Must be at least 3 characters.</AppFieldDescription>
111
+ <AppFieldError>Username is too short.</AppFieldError>
112
+ </AppFieldContent>
113
+ </AppField>
114
+ ```
115
+
116
+ ### Horizontal layout
117
+ ```tsx
118
+ <AppField orientation="horizontal">
119
+ <AppFieldLabel>Notifications</AppFieldLabel>
120
+ <AppFieldControl>
121
+ <AppSwitch />
122
+ </AppFieldControl>
123
+ </AppField>
124
+ ```
125
+
126
+ ### Grouped fields inside a fieldset
127
+ ```tsx
128
+ <AppFieldSet>
129
+ <AppFieldLegend variant="label">Billing address</AppFieldLegend>
130
+ <AppFieldGroup>
131
+ <AppField>
132
+ <AppFieldLabel required>Street</AppFieldLabel>
133
+ <AppFieldControl><AppInput placeholder="123 Main St" /></AppFieldControl>
134
+ </AppField>
135
+ <AppField>
136
+ <AppFieldLabel required>City</AppFieldLabel>
137
+ <AppFieldControl><AppInput placeholder="San Francisco" /></AppFieldControl>
138
+ </AppField>
139
+ </AppFieldGroup>
140
+ </AppFieldSet>
141
+ ```
142
+
143
+ ## Rules
144
+ - ✅ Always wrap inputs with `AppFieldControl` — it injects id and aria attributes automatically
145
+ - ✅ Use `invalid` prop on `AppField` for validation state — do not set `aria-invalid` manually
146
+ - ✅ Use `AppFieldContent` to stack description + error below the input
147
+ - ❌ Never set `htmlFor` on `AppFieldLabel` manually — FieldContext handles it
148
+ - ❌ Never set `id` on the input manually — `AppFieldControl` injects it
149
+ - ❌ If a prop you need is missing, stop and inform the design team
package/rules/form.md ADDED
@@ -0,0 +1,60 @@
1
+ # AppForm
2
+
3
+ > Docs: https://ui-kit.vercel.app/docs/components/form
4
+
5
+ ```tsx
6
+ import {
7
+ AppForm,
8
+ AppFormItem,
9
+ AppFormLabel,
10
+ AppFormControl,
11
+ AppFormDescription,
12
+ AppFormMessage,
13
+ AppFormField,
14
+ useAppFormField,
15
+ } from "@/components/primitives/AppForm"
16
+ ```
17
+
18
+ ## AppFormField
19
+
20
+ | Prop | Type | Default | Description |
21
+ | :--- | :--- | :--- | :--- |
22
+ | `control` | `Control<any>` | - | The control object from `useForm`. |
23
+ | `name` | `string` | - | The name of the field in the form data. |
24
+ | `render` | `(props: { field: any }) => React.ReactNode` | - | A function that returns the component to render. |
25
+
26
+ ## Usage
27
+
28
+ ### Basic Form with Validation
29
+ ```tsx
30
+ const form = useForm<FormValues>({
31
+ defaultValues: { username: "" },
32
+ })
33
+
34
+ <AppForm {...form}>
35
+ <form onSubmit={form.handleSubmit(onSubmit)} className="space-y-6">
36
+ <AppFormField
37
+ control={form.control}
38
+ name="username"
39
+ render={({ field }) => (
40
+ <AppFormItem>
41
+ <AppFormLabel>Username</AppFormLabel>
42
+ <AppFormControl>
43
+ <AppInput placeholder="Enter your username" {...field} />
44
+ </AppFormControl>
45
+ <AppFormDescription>Your public name.</AppFormDescription>
46
+ <AppFormMessage />
47
+ </AppFormItem>
48
+ )}
49
+ />
50
+ <AppButton type="submit">Submit</AppButton>
51
+ </form>
52
+ </AppForm>
53
+ ```
54
+
55
+ ## Rules
56
+
57
+ - **Do** use `AppForm` and `AppFormField` for all complex forms requiring validation.
58
+ - **Do** leverage `react-hook-form` for form management.
59
+ - **Don't** use raw `<form>` without `AppForm` if validation is needed.
60
+ - If a prop you need is missing, stop and inform the design team.