@skunkworksai/ui-kit 0.1.23 → 0.1.25-a

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 (118) hide show
  1. package/dist/index.cjs +34 -34
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +14469 -14225
  4. package/dist/index.js.map +1 -1
  5. package/dist/types/assets/icons/DashboardActiveIcon.d.ts +1 -1
  6. package/dist/types/assets/icons/DashboardIcon.d.ts +1 -1
  7. package/dist/types/assets/icons/DevicesActiveIcon.d.ts +1 -1
  8. package/dist/types/assets/icons/DevicesIcon.d.ts +1 -1
  9. package/dist/types/assets/icons/InstallerActiveIcon.d.ts +1 -1
  10. package/dist/types/assets/icons/InstallerIcon.d.ts +1 -1
  11. package/dist/types/assets/icons/ManifestActiveIcon.d.ts +1 -1
  12. package/dist/types/assets/icons/ManifestIcon.d.ts +1 -1
  13. package/dist/types/assets/icons/SensorActiveIcon.d.ts +1 -1
  14. package/dist/types/assets/icons/SensorIcon.d.ts +1 -1
  15. package/dist/types/assets/icons/SiteActiveIcon.d.ts +1 -1
  16. package/dist/types/assets/icons/SiteIcon.d.ts +1 -1
  17. package/dist/types/assets/icons/XrayActiveIcon.d.ts +1 -1
  18. package/dist/types/assets/icons/XrayIcon.d.ts +1 -1
  19. package/dist/types/assets/logos/DarkLogo.d.ts +1 -1
  20. package/dist/types/assets/logos/DarkSymbol.d.ts +1 -1
  21. package/dist/types/assets/logos/PrimaryLogo.d.ts +1 -1
  22. package/dist/types/assets/logos/PrimarySymbol.d.ts +1 -1
  23. package/dist/types/assets/logos/WhiteLogo.d.ts +1 -1
  24. package/dist/types/assets/logos/WhiteSymbol.d.ts +1 -1
  25. package/dist/types/components/blocks/AppBentoMenu.d.ts +2 -2
  26. package/dist/types/components/blocks/AppDashboard.d.ts +9 -3
  27. package/dist/types/components/blocks/AppHeader.d.ts +6 -6
  28. package/dist/types/components/blocks/AppLocationTreeFilter.d.ts +1 -1
  29. package/dist/types/components/blocks/AppNotificationsMenu.d.ts +1 -1
  30. package/dist/types/components/blocks/AppPageTitle.d.ts +1 -1
  31. package/dist/types/components/blocks/AppProfile.d.ts +1 -1
  32. package/dist/types/components/blocks/AppWizardStepper.d.ts +61 -0
  33. package/dist/types/components/blocks/TableManager.d.ts +36 -14
  34. package/dist/types/components/blocks/backgrounds/AppDashboardBackgroundDots.d.ts +1 -1
  35. package/dist/types/components/blocks/backgrounds/AppDashboardBackgroundWave.d.ts +1 -1
  36. package/dist/types/components/blocks/backgrounds/types.d.ts +2 -0
  37. package/dist/types/components/blocks/index.d.ts +1 -0
  38. package/dist/types/components/primitives/AppAccordion.d.ts +4 -4
  39. package/dist/types/components/primitives/AppAlert.d.ts +1 -1
  40. package/dist/types/components/primitives/AppAlertDialog.d.ts +2 -2
  41. package/dist/types/components/primitives/AppAspectRatio.d.ts +1 -1
  42. package/dist/types/components/primitives/AppAvatar.d.ts +3 -3
  43. package/dist/types/components/primitives/AppBadge.d.ts +1 -1
  44. package/dist/types/components/primitives/AppBreadcrumb.d.ts +7 -7
  45. package/dist/types/components/primitives/AppButton.d.ts +1 -1
  46. package/dist/types/components/primitives/AppButtonGroup.d.ts +1 -1
  47. package/dist/types/components/primitives/AppCalendar.d.ts +1 -1
  48. package/dist/types/components/primitives/AppCard.d.ts +7 -7
  49. package/dist/types/components/primitives/AppCarousel.d.ts +5 -5
  50. package/dist/types/components/primitives/AppChart.d.ts +3 -3
  51. package/dist/types/components/primitives/AppCheckbox.d.ts +1 -1
  52. package/dist/types/components/primitives/AppCollapsible.d.ts +1 -1
  53. package/dist/types/components/primitives/AppCombobox.d.ts +7 -7
  54. package/dist/types/components/primitives/AppCommand.d.ts +9 -9
  55. package/dist/types/components/primitives/AppContextMenu.d.ts +7 -7
  56. package/dist/types/components/primitives/AppDataTable.d.ts +2 -1
  57. package/dist/types/components/primitives/AppDatePicker.d.ts +2 -1
  58. package/dist/types/components/primitives/AppDialog.d.ts +6 -6
  59. package/dist/types/components/primitives/AppDrawer.d.ts +3 -3
  60. package/dist/types/components/primitives/AppDropdownMenu.d.ts +10 -10
  61. package/dist/types/components/primitives/AppEmpty.d.ts +6 -6
  62. package/dist/types/components/primitives/AppField.d.ts +10 -10
  63. package/dist/types/components/primitives/AppForm.d.ts +2 -2
  64. package/dist/types/components/primitives/AppHoverCard.d.ts +3 -3
  65. package/dist/types/components/primitives/AppInput.d.ts +10 -1
  66. package/dist/types/components/primitives/AppKbd.d.ts +2 -2
  67. package/dist/types/components/primitives/AppLabel.d.ts +1 -1
  68. package/dist/types/components/primitives/AppMenubar.d.ts +6 -6
  69. package/dist/types/components/primitives/AppNavigationMenu.d.ts +8 -8
  70. package/dist/types/components/primitives/AppPagination.d.ts +7 -7
  71. package/dist/types/components/primitives/AppPopover.d.ts +3 -3
  72. package/dist/types/components/primitives/AppProgress.d.ts +1 -1
  73. package/dist/types/components/primitives/AppRadioGroup.d.ts +2 -2
  74. package/dist/types/components/primitives/AppScrollArea.d.ts +2 -2
  75. package/dist/types/components/primitives/AppSelect.d.ts +7 -7
  76. package/dist/types/components/primitives/AppSeparator.d.ts +1 -1
  77. package/dist/types/components/primitives/AppSheet.d.ts +6 -6
  78. package/dist/types/components/primitives/AppSidebar.d.ts +24 -24
  79. package/dist/types/components/primitives/AppSkeleton.d.ts +1 -1
  80. package/dist/types/components/primitives/AppSwitch.d.ts +1 -1
  81. package/dist/types/components/primitives/AppTable.d.ts +8 -8
  82. package/dist/types/components/primitives/AppTabs.d.ts +4 -4
  83. package/dist/types/components/primitives/AppTextarea.d.ts +7 -1
  84. package/dist/types/components/primitives/AppThemeProvider.d.ts +2 -2
  85. package/dist/types/components/primitives/AppToaster.d.ts +1 -1
  86. package/dist/types/components/primitives/AppToggle.d.ts +1 -1
  87. package/dist/types/components/primitives/AppTooltip.d.ts +4 -4
  88. package/dist/types/components/primitives/AppTypography.d.ts +1 -1
  89. package/dist/types/components/ui/alert-dialog.d.ts +2 -2
  90. package/dist/types/components/ui/badge.d.ts +1 -1
  91. package/dist/types/components/ui/breadcrumb.d.ts +2 -2
  92. package/dist/types/components/ui/button.d.ts +5 -2
  93. package/dist/types/components/ui/calendar.d.ts +1 -1
  94. package/dist/types/components/ui/card.d.ts +7 -7
  95. package/dist/types/components/ui/carousel.d.ts +5 -5
  96. package/dist/types/components/ui/chart.d.ts +4 -4
  97. package/dist/types/components/ui/combobox.d.ts +7 -7
  98. package/dist/types/components/ui/command.d.ts +9 -9
  99. package/dist/types/components/ui/context-menu.d.ts +1 -1
  100. package/dist/types/components/ui/dialog.d.ts +2 -2
  101. package/dist/types/components/ui/drawer.d.ts +2 -2
  102. package/dist/types/components/ui/dropdown-menu.d.ts +1 -1
  103. package/dist/types/components/ui/form.d.ts +2 -2
  104. package/dist/types/components/ui/input.d.ts +1 -1
  105. package/dist/types/components/ui/label.d.ts +1 -1
  106. package/dist/types/components/ui/menubar.d.ts +16 -16
  107. package/dist/types/components/ui/pagination.d.ts +5 -5
  108. package/dist/types/components/ui/scroll-text.d.ts +1 -1
  109. package/dist/types/components/ui/sheet.d.ts +2 -2
  110. package/dist/types/components/ui/sidebar.d.ts +23 -23
  111. package/dist/types/components/ui/skeleton.d.ts +1 -1
  112. package/dist/types/components/ui/sonner.d.ts +1 -1
  113. package/dist/types/hooks/use-page-title.d.ts +10 -1
  114. package/dist/ui-kit.css +1 -1
  115. package/package.json +9 -9
  116. package/rules/dashboard.md +40 -0
  117. package/rules/header.md +3 -1
  118. package/rules/sidebar.md +21 -0
@@ -22,6 +22,7 @@ import { AppDashboard } from '@skunkworksai/ui-kit'
22
22
  | `background` | `ReactNode` | `<AppDashboardBackgroundWave />` | Background preset or custom component. Must render gradient. See Background presets section. |
23
23
  | `pageTitle` | `AppPageTitleProps \| false` | omitted | Page title bar below the header. Pass `false` to hide entirely. |
24
24
  | `brand` | `Omit<AppSidebarBrandProps, "className">` | `WhiteLogo` / `WhiteSymbol` | Props forwarded to `AppSidebarBrand`. Use to set a custom logo for expanded and collapsed sidebar states. |
25
+ | `sidebarFooter` | `ReactNode` | `undefined` | Content rendered at the bottom of the sidebar inside `AppSidebarFooter`, before the rail. Omit to render no footer. |
25
26
  | `children` | `ReactNode` | required | Page content. |
26
27
 
27
28
  ## Customising the header
@@ -397,6 +398,45 @@ const nav = [
397
398
  </AppDashboard>
398
399
  ```
399
400
 
401
+ ## Sidebar footer
402
+
403
+ Use the `sidebarFooter` prop to render content at the bottom of the sidebar (inside `AppSidebarFooter`, before the rail). The consumer owns the markup — pass any `ReactNode`.
404
+
405
+ ```tsx
406
+ // Wallet-style footer card
407
+ <AppDashboard
408
+ sidebarFooter={
409
+ <div className="rounded-lg bg-sidebar-accent p-3 group-data-[collapsible=icon]:hidden">
410
+ <p className="text-xs font-medium text-sidebar-foreground">Acme Corp</p>
411
+ <p className="text-xs text-sidebar-foreground/60">Free plan · 3 seats</p>
412
+ </div>
413
+ }
414
+ >
415
+ <PageContent />
416
+ </AppDashboard>
417
+ ```
418
+
419
+ Omitting `sidebarFooter` renders no `AppSidebarFooter` element at all — no extra whitespace.
420
+
421
+ ### Auto-hiding on icon collapse
422
+
423
+ When the sidebar collapses to icon mode, content that doesn't make sense at 40 px wide should be hidden. Use the `group-data-[collapsible=icon]:hidden` Tailwind class on any element inside `sidebarFooter`:
424
+
425
+ ```tsx
426
+ // The entire card hides when collapsed; nothing renders in icon mode
427
+ <div className="... group-data-[collapsible=icon]:hidden">
428
+ ...
429
+ </div>
430
+
431
+ // Hide only the text, keep an avatar visible
432
+ <div className="flex items-center gap-2">
433
+ <Avatar className="size-7 shrink-0" />
434
+ <span className="group-data-[collapsible=icon]:hidden text-sm">Kevin Aton</span>
435
+ </div>
436
+ ```
437
+
438
+ `group-data-[collapsible=icon]` matches the `data-collapsible="icon"` attribute set on the sidebar group element by `AppSidebarProvider` when the sidebar is collapsed to icon mode.
439
+
400
440
  ## Rules
401
441
 
402
442
  - **Do** use `AppDashboard` as the layout for every page — do not compose the scaffold manually.
package/rules/header.md CHANGED
@@ -108,7 +108,7 @@ Use these only when building a layout outside `AppDashboard`:
108
108
  |-----------|---------|
109
109
  | `AppHeaderContent` | Inner flex container with padding and gap. |
110
110
  | `AppHeaderTitle` | Optional page label. `shrink-0`, never compresses. |
111
- | `AppHeaderSearchbar` | `flex-1` slot for search input groups. |
111
+ | `AppHeaderSearchbar` | `flex-1 max-w-sm` slot for search input groups. Hidden on mobile (`hidden md:flex`) by default. |
112
112
  | `AppHeaderActions` | `ml-auto` right-side slot for controls. |
113
113
  | `AppHeaderNetworkCombobox` | Standalone network combobox — use inside a custom `actions` slot. |
114
114
 
@@ -199,6 +199,8 @@ With custom slots:
199
199
 
200
200
  The `searchbar` slot accepts any `ReactNode`. Always fill it with an `App*` component — never a raw `<input>`.
201
201
 
202
+ `AppHeaderSearchbar` defaults to `hidden md:flex min-w-0 flex-1 max-w-sm`. The `max-w-sm` (384px) cap prevents searchbar content from stretching full-width when the consumer does not supply an explicit width. To widen, pass `className="max-w-md"` (or larger). Hidden on mobile — the mobile search icon + Sheet handles that path automatically.
203
+
202
204
  ```tsx
203
205
  // ✅ Correct
204
206
  import { AppInput } from '@skunkworksai/ui-kit'
package/rules/sidebar.md CHANGED
@@ -209,6 +209,27 @@ No background fill by default or on hover. The **primary brand color** backgroun
209
209
  | :--- | :--- | :--- | :--- |
210
210
  | `showIcon` | `boolean` | `false` | Show a skeleton icon placeholder. |
211
211
 
212
+ ## AppSidebarFooter
213
+
214
+ Renders sticky content at the bottom of the sidebar column, below `AppSidebarContent` and above `AppSidebarRail`.
215
+
216
+ **Used internally by `AppDashboard`:** when you pass the `sidebarFooter` prop to `AppDashboard`, the block wraps your content in `AppSidebarFooter` automatically. You do not need to add `AppSidebarFooter` yourself when using `AppDashboard`.
217
+
218
+ **In custom layouts** (e.g. when composing `AppSidebar` directly without `AppDashboard`), place `AppSidebarFooter` as the last child of `AppSidebar` before `AppSidebarRail`:
219
+
220
+ ```tsx
221
+ <AppSidebar collapsible="icon">
222
+ <AppSidebarHeader>...</AppSidebarHeader>
223
+ <AppSidebarContent>...</AppSidebarContent>
224
+ <AppSidebarFooter>
225
+ <span className="text-xs text-sidebar-foreground/50">v1.0.0</span>
226
+ </AppSidebarFooter>
227
+ <AppSidebarRail />
228
+ </AppSidebar>
229
+ ```
230
+
231
+ Use `group-data-[collapsible=icon]:hidden` on any child element to auto-hide it when the sidebar collapses to icon mode (see `rules/dashboard.md` for examples).
232
+
212
233
  ## useSidebar
213
234
 
214
235
  Returns `{ state, open, setOpen, openMobile, setOpenMobile, isMobile, toggleSidebar }`.