@classytic/fluid 0.2.4 → 0.3.2

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 (69) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +149 -62
  3. package/dist/api-pagination-CJ0vR_w6.d.mts +34 -0
  4. package/dist/api-pagination-DBTE0yk4.mjs +190 -0
  5. package/dist/chunk-DQk6qfdC.mjs +18 -0
  6. package/dist/client/calendar.d.mts +105 -0
  7. package/dist/client/calendar.mjs +202 -0
  8. package/dist/client/core.d.mts +1614 -0
  9. package/dist/client/core.mjs +2779 -0
  10. package/dist/client/error.d.mts +125 -0
  11. package/dist/client/error.mjs +166 -0
  12. package/dist/client/hooks.d.mts +162 -0
  13. package/dist/client/hooks.mjs +447 -0
  14. package/dist/client/table.d.mts +84 -0
  15. package/dist/client/table.mjs +373 -0
  16. package/dist/client/theme.d.mts +6 -0
  17. package/dist/client/theme.mjs +65 -0
  18. package/dist/command.d.mts +134 -0
  19. package/dist/command.mjs +132 -0
  20. package/dist/compact.d.mts +359 -0
  21. package/dist/compact.mjs +892 -0
  22. package/dist/dashboard.d.mts +778 -0
  23. package/dist/dashboard.mjs +1617 -0
  24. package/dist/filter-utils-DqMmy_v-.mjs +72 -0
  25. package/dist/filter-utils-IZ0GtuPo.d.mts +40 -0
  26. package/dist/forms.d.mts +1549 -0
  27. package/dist/forms.mjs +3740 -0
  28. package/dist/index.d.mts +296 -0
  29. package/dist/index.mjs +432 -0
  30. package/dist/layouts.d.mts +215 -0
  31. package/dist/layouts.mjs +460 -0
  32. package/dist/search-context-DR7DBs7S.mjs +19 -0
  33. package/dist/search.d.mts +254 -0
  34. package/dist/search.mjs +523 -0
  35. package/dist/sheet-wrapper-CWNCvYMD.mjs +211 -0
  36. package/dist/use-base-search-BGgWnWaF.d.mts +35 -0
  37. package/dist/use-debounce-xmZucz5e.mjs +53 -0
  38. package/dist/use-keyboard-shortcut-Bl6YM5Q7.mjs +82 -0
  39. package/dist/use-keyboard-shortcut-_mRCh3QO.d.mts +24 -0
  40. package/dist/use-media-query-BnVNIKT4.mjs +17 -0
  41. package/dist/use-mobile-BX3SQVo2.mjs +20 -0
  42. package/dist/use-scroll-detection-CsgsQYvy.mjs +43 -0
  43. package/dist/utils-CDue7cEt.d.mts +6 -0
  44. package/dist/utils-DQ5SCVoW.mjs +10 -0
  45. package/package.json +85 -45
  46. package/styles.css +2 -2
  47. package/dist/chunk-GUHK2DTW.js +0 -15
  48. package/dist/chunk-GUHK2DTW.js.map +0 -1
  49. package/dist/chunk-H3NFL3GJ.js +0 -57
  50. package/dist/chunk-H3NFL3GJ.js.map +0 -1
  51. package/dist/chunk-J2YRTQE4.js +0 -293
  52. package/dist/chunk-J2YRTQE4.js.map +0 -1
  53. package/dist/compact.d.ts +0 -217
  54. package/dist/compact.js +0 -986
  55. package/dist/compact.js.map +0 -1
  56. package/dist/dashboard.d.ts +0 -387
  57. package/dist/dashboard.js +0 -1032
  58. package/dist/dashboard.js.map +0 -1
  59. package/dist/index.d.ts +0 -2140
  60. package/dist/index.js +0 -6422
  61. package/dist/index.js.map +0 -1
  62. package/dist/layout.d.ts +0 -25
  63. package/dist/layout.js +0 -4
  64. package/dist/layout.js.map +0 -1
  65. package/dist/search.d.ts +0 -172
  66. package/dist/search.js +0 -341
  67. package/dist/search.js.map +0 -1
  68. package/dist/use-base-search-AS5Z3SAy.d.ts +0 -64
  69. package/dist/utils-Cbsgs0XP.d.ts +0 -5
@@ -0,0 +1,778 @@
1
+ import { t as cn } from "./utils-CDue7cEt.mjs";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+ import * as React$1 from "react";
4
+ import React, { ReactNode } from "react";
5
+ import { LucideIcon } from "lucide-react";
6
+
7
+ //#region src/dashboard/nav-utils.d.ts
8
+ /**
9
+ * NavPermissions - Mixin applied to all nav item types.
10
+ * Provides function-based access control for maximum flexibility.
11
+ *
12
+ * @example
13
+ * // Org-level role check
14
+ * canAccess: (ctx: AppCtx) => ctx.org.role === "admin"
15
+ *
16
+ * // Multi-level: global OR org permission
17
+ * canAccess: (ctx: AppCtx) =>
18
+ * ctx.user.globalRoles.includes("superadmin") ||
19
+ * ctx.org.permissions.includes("hr:view")
20
+ *
21
+ * // Feature flag
22
+ * canAccess: (ctx: AppCtx) => ctx.featureFlags.betaAnalytics
23
+ */
24
+ interface NavPermissions {
25
+ /** Explicitly hide regardless of access checks */
26
+ hidden?: boolean;
27
+ /**
28
+ * Dynamic access check. Receives whatever context the consumer passes
29
+ * to resolveNavigation(). Return false to hide this item.
30
+ */
31
+ canAccess?: (ctx: any) => boolean;
32
+ /**
33
+ * Dynamic badge resolver. Returns badge value based on context.
34
+ * Overrides the static `badge` field when it returns non-undefined.
35
+ *
36
+ * @example
37
+ * badgeCount: (ctx: AppCtx) => ctx.counts.unreadMessages || undefined
38
+ */
39
+ badgeCount?: (ctx: any) => string | number | undefined;
40
+ }
41
+ interface NavSubItem extends NavPermissions {
42
+ title: string;
43
+ url: string;
44
+ badge?: string | number;
45
+ isActive?: boolean;
46
+ }
47
+ interface NavItem extends NavPermissions {
48
+ title: string;
49
+ url: string;
50
+ icon?: LucideIcon;
51
+ isActive?: boolean;
52
+ badge?: string | number;
53
+ items?: NavSubItem[];
54
+ }
55
+ interface NavGroup {
56
+ title?: string;
57
+ items: NavItem[];
58
+ }
59
+ interface DualSidebarItem extends NavPermissions {
60
+ title: string;
61
+ url: string;
62
+ icon?: LucideIcon;
63
+ badge?: string | number;
64
+ isActive?: boolean;
65
+ }
66
+ interface DualSidebarCategory extends NavPermissions {
67
+ id: string;
68
+ name: string;
69
+ icon: LucideIcon;
70
+ items: DualSidebarItem[];
71
+ }
72
+ interface TopbarRailItem extends NavPermissions {
73
+ title: string;
74
+ url: string;
75
+ icon?: LucideIcon;
76
+ badge?: string | number;
77
+ isActive?: boolean;
78
+ }
79
+ interface TopbarRailCategory extends NavPermissions {
80
+ id: string;
81
+ name: string;
82
+ icon: LucideIcon;
83
+ items: TopbarRailItem[];
84
+ }
85
+ interface MiniSidebarItem extends NavPermissions {
86
+ title: string;
87
+ url: string;
88
+ icon: LucideIcon;
89
+ badge?: string | number;
90
+ isActive?: boolean;
91
+ }
92
+ interface MiniSidebarGroup {
93
+ title?: string;
94
+ items: MiniSidebarItem[];
95
+ }
96
+ /**
97
+ * resolveNavigation — Filter NavGroup[] by permissions and resolve dynamic badges.
98
+ * For InsetSidebar, FloatingSidebar, and any component using NavGroup[].
99
+ *
100
+ * When `ctx` is omitted, only `hidden` checks apply (backwards-compat).
101
+ */
102
+ declare function resolveNavigation(groups: NavGroup[], ctx?: unknown): NavGroup[];
103
+ /**
104
+ * resolveMiniNavigation — Filter MiniSidebarGroup[] by permissions.
105
+ */
106
+ declare function resolveMiniNavigation(groups: MiniSidebarGroup[], ctx?: unknown): MiniSidebarGroup[];
107
+ /**
108
+ * resolveCategories — Filter category arrays by permissions.
109
+ * Works with DualSidebarCategory[] and TopbarRailCategory[].
110
+ */
111
+ declare function resolveCategories<TItem extends NavPermissions & {
112
+ badge?: string | number;
113
+ badgeCount?: (ctx: any) => string | number | undefined;
114
+ }, TCategory extends NavPermissions & {
115
+ items: TItem[];
116
+ }>(categories: TCategory[], ctx?: unknown): TCategory[];
117
+ //#endregion
118
+ //#region src/dashboard/header-section.d.ts
119
+ interface HeaderAction {
120
+ text: string;
121
+ onClick?: () => void;
122
+ disabled?: boolean;
123
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link";
124
+ size?: "default" | "sm" | "lg" | "icon";
125
+ className?: string;
126
+ icon?: LucideIcon;
127
+ iconPosition?: "left" | "right";
128
+ loadingText?: string;
129
+ loading?: boolean;
130
+ }
131
+ interface HeaderBadge {
132
+ text: string;
133
+ variant?: "default" | "secondary" | "destructive" | "outline";
134
+ className?: string;
135
+ }
136
+ interface HeaderMetadata {
137
+ text: string;
138
+ icon?: LucideIcon;
139
+ }
140
+ interface HeaderSectionProps {
141
+ title?: string;
142
+ description?: string;
143
+ actions?: HeaderAction[] | null;
144
+ icon?: LucideIcon | null;
145
+ iconClassName?: string;
146
+ loading?: boolean;
147
+ variant?: "default" | "compact" | "hero" | "minimal";
148
+ className?: string;
149
+ badge?: HeaderBadge | ReactNode;
150
+ breadcrumbs?: ReactNode;
151
+ metadata?: HeaderMetadata[];
152
+ children?: ReactNode;
153
+ }
154
+ declare function HeaderSection({
155
+ title,
156
+ description,
157
+ actions,
158
+ icon: Icon,
159
+ iconClassName,
160
+ loading,
161
+ variant,
162
+ className,
163
+ badge,
164
+ breadcrumbs,
165
+ metadata,
166
+ children
167
+ }: HeaderSectionProps): react_jsx_runtime0.JSX.Element;
168
+ //#endregion
169
+ //#region src/dashboard/page-header.d.ts
170
+ interface BreadcrumbItemData {
171
+ label: string;
172
+ href?: string;
173
+ current?: boolean;
174
+ }
175
+ interface PageHeaderProps {
176
+ items: BreadcrumbItemData[];
177
+ className?: string;
178
+ actions?: React.ReactNode;
179
+ }
180
+ declare function PageHeader({
181
+ items,
182
+ className,
183
+ actions
184
+ }: PageHeaderProps): react_jsx_runtime0.JSX.Element;
185
+ //#endregion
186
+ //#region src/dashboard/dashboard-content.d.ts
187
+ interface DashboardContentProps {
188
+ /** Content to render inside the dashboard area */
189
+ children: React$1.ReactNode;
190
+ /** Additional className for the outer wrapper */
191
+ className?: string;
192
+ /** Enable @container queries on the content area */
193
+ container?: boolean | string;
194
+ /** Horizontal padding — defaults to "md" */
195
+ padding?: "none" | "sm" | "md" | "lg";
196
+ }
197
+ /**
198
+ * DashboardContent — Safe content wrapper for sidebar layouts.
199
+ *
200
+ * Prevents the classic flexbox overflow bug where children with
201
+ * `max-w-*` or grid layouts extend beyond the available space
202
+ * (behind the sidebar) by propagating `min-w-0` through the
203
+ * flex chain.
204
+ *
205
+ * **Important**: `SidebarInset` also needs `min-w-0` for the
206
+ * width constraint to propagate correctly from the flex parent.
207
+ * Pass `className="min-w-0"` to `SidebarInset`.
208
+ *
209
+ * @example
210
+ * ```tsx
211
+ * <SidebarProvider>
212
+ * <AppSidebar />
213
+ * <SidebarInset className="min-w-0">
214
+ * <DashboardContent>
215
+ * <PageHeader items={breadcrumbs} />
216
+ * <MyPageContent />
217
+ * </DashboardContent>
218
+ * </SidebarInset>
219
+ * </SidebarProvider>
220
+ * ```
221
+ */
222
+ declare function DashboardContent({
223
+ children,
224
+ className,
225
+ container,
226
+ padding
227
+ }: DashboardContentProps): react_jsx_runtime0.JSX.Element;
228
+ //#endregion
229
+ //#region src/dashboard/dashboard-page-layout.d.ts
230
+ interface DashboardPageLayoutProps {
231
+ /** Breadcrumb items for the page header */
232
+ breadcrumbs: BreadcrumbItemData[];
233
+ /** Action buttons rendered in the page header */
234
+ actions?: ReactNode;
235
+ /** Whether to wrap children in Suspense (default: true) */
236
+ suspense?: boolean;
237
+ /** Custom Suspense fallback. Defaults to a spinner. */
238
+ fallback?: ReactNode;
239
+ /** Additional className for the content wrapper */
240
+ className?: string;
241
+ children: ReactNode;
242
+ }
243
+ /**
244
+ * DashboardPageLayout — Standard page shell for dashboard pages.
245
+ * Combines PageHeader (breadcrumbs + actions) with optional Suspense boundary.
246
+ *
247
+ * @example
248
+ * ```tsx
249
+ * <DashboardPageLayout
250
+ * breadcrumbs={[
251
+ * { label: "Dashboard", href: "/dashboard" },
252
+ * { label: "Posts", current: true },
253
+ * ]}
254
+ * actions={<Button>New Post</Button>}
255
+ * fallback={<SkeletonTable rows={5} />}
256
+ * >
257
+ * <PostsList />
258
+ * </DashboardPageLayout>
259
+ * ```
260
+ */
261
+ declare function DashboardPageLayout({
262
+ breadcrumbs,
263
+ actions,
264
+ suspense,
265
+ fallback,
266
+ className,
267
+ children
268
+ }: DashboardPageLayoutProps): react_jsx_runtime0.JSX.Element;
269
+ //#endregion
270
+ //#region src/dashboard/sidebar-brand.d.ts
271
+ interface SidebarBrandProps {
272
+ /** Brand title text */
273
+ title: string;
274
+ /** Brand icon/logo element */
275
+ icon: React$1.ReactNode;
276
+ /** Link href (defaults to "/") */
277
+ href?: string;
278
+ /** Additional className */
279
+ className?: string;
280
+ /** Tooltip text when collapsed (defaults to title) */
281
+ tooltip?: string;
282
+ }
283
+ /**
284
+ * SidebarBrand - Logo and title section for dashboard sidebar.
285
+ * Automatically handles collapsed state styling.
286
+ */
287
+ declare function SidebarBrand({
288
+ title,
289
+ icon,
290
+ href,
291
+ className,
292
+ tooltip
293
+ }: SidebarBrandProps): react_jsx_runtime0.JSX.Element;
294
+ //#endregion
295
+ //#region src/dashboard/sidebar-nav.d.ts
296
+ interface SidebarNavProps {
297
+ /** Navigation groups to render */
298
+ groups: NavGroup[];
299
+ /** Additional className */
300
+ className?: string;
301
+ /** Callback when a nav item is clicked */
302
+ onItemClick?: (item: NavItem) => void;
303
+ }
304
+ interface SidebarNavGroupProps {
305
+ /** Group title (optional) */
306
+ title?: string;
307
+ /** Navigation items in this group */
308
+ items: NavItem[];
309
+ /** Additional className */
310
+ className?: string;
311
+ /** Callback when an item is clicked */
312
+ onItemClick?: (item: NavItem) => void;
313
+ }
314
+ interface SidebarNavItemProps {
315
+ /** The navigation item data */
316
+ item: NavItem;
317
+ /** Callback when clicked */
318
+ onClick?: () => void;
319
+ }
320
+ /**
321
+ * SidebarNavItem - Single navigation item with optional sub-items.
322
+ */
323
+ declare function SidebarNavItem({
324
+ item,
325
+ onClick
326
+ }: SidebarNavItemProps): react_jsx_runtime0.JSX.Element;
327
+ /**
328
+ * SidebarNavGroup - A group of navigation items with optional title.
329
+ */
330
+ declare function SidebarNavGroup({
331
+ title,
332
+ items,
333
+ className,
334
+ onItemClick
335
+ }: SidebarNavGroupProps): react_jsx_runtime0.JSX.Element;
336
+ /**
337
+ * SidebarNav - Complete navigation section with multiple groups.
338
+ */
339
+ declare function SidebarNav({
340
+ groups,
341
+ className,
342
+ onItemClick
343
+ }: SidebarNavProps): react_jsx_runtime0.JSX.Element;
344
+ //#endregion
345
+ //#region src/dashboard/sidebar-user-menu.d.ts
346
+ interface UserData {
347
+ name: string;
348
+ email: string;
349
+ avatar?: string;
350
+ }
351
+ interface UserMenuItem {
352
+ label: string;
353
+ icon?: LucideIcon;
354
+ href?: string;
355
+ onClick?: () => void;
356
+ separator?: boolean;
357
+ }
358
+ interface SidebarUserMenuProps {
359
+ /** User data to display */
360
+ user: UserData;
361
+ /** Menu items (account, settings, etc.) */
362
+ menuItems?: UserMenuItem[];
363
+ /** Logout handler */
364
+ onLogout?: () => void;
365
+ /** Additional className */
366
+ className?: string;
367
+ }
368
+ /**
369
+ * SidebarUserMenu - User avatar and dropdown menu for sidebar footer.
370
+ * Accepts handlers for logout and custom menu items.
371
+ */
372
+ declare function SidebarUserMenu({
373
+ user,
374
+ menuItems,
375
+ onLogout,
376
+ className
377
+ }: SidebarUserMenuProps): react_jsx_runtime0.JSX.Element;
378
+ //#endregion
379
+ //#region src/dashboard/project-switcher.d.ts
380
+ interface ProjectItem {
381
+ /** Unique identifier */
382
+ id: string;
383
+ /** Display name */
384
+ name: string;
385
+ /** Short code or identifier */
386
+ code?: string;
387
+ /** Optional type badge */
388
+ type?: string;
389
+ /** Is this the default project */
390
+ isDefault?: boolean;
391
+ /** Is this project active */
392
+ isActive?: boolean;
393
+ /** Optional subtitle/description */
394
+ subtitle?: string;
395
+ }
396
+ interface ProjectSwitcherProps {
397
+ /** List of available projects */
398
+ items: ProjectItem[];
399
+ /** Currently selected project */
400
+ selected?: ProjectItem;
401
+ /** Callback when a project is selected */
402
+ onSelect: (project: ProjectItem) => void;
403
+ /** Whether the data is loading */
404
+ isLoading?: boolean;
405
+ /** Label shown in dropdown header */
406
+ label?: string;
407
+ /** Icon to display (defaults to Building2) */
408
+ icon?: LucideIcon;
409
+ /** Additional className */
410
+ className?: string;
411
+ /** Whether to show as disabled (single item) */
412
+ disabled?: boolean;
413
+ /**
414
+ * Render variant:
415
+ * - "sidebar": Uses SidebarMenu components, requires SidebarProvider context
416
+ * - "standalone": Uses Button, works anywhere (headers, toolbars, etc.)
417
+ */
418
+ variant?: "sidebar" | "standalone";
419
+ /** Size for standalone variant (ignored in sidebar variant) */
420
+ size?: "sm" | "default";
421
+ /** Render custom item content */
422
+ renderItem?: (item: ProjectItem, isSelected: boolean) => React$1.ReactNode;
423
+ }
424
+ /**
425
+ * ProjectSwitcher - Generic project/workspace/branch switcher.
426
+ * Works for any entity that needs switching functionality.
427
+ *
428
+ * @example Sidebar usage (inside SidebarProvider)
429
+ * ```tsx
430
+ * <ProjectSwitcher
431
+ * items={projects}
432
+ * selected={selectedProject}
433
+ * onSelect={setSelectedProject}
434
+ * />
435
+ * ```
436
+ *
437
+ * @example Header/Standalone usage (no SidebarProvider needed)
438
+ * ```tsx
439
+ * <ProjectSwitcher
440
+ * variant="standalone"
441
+ * items={projects}
442
+ * selected={selectedProject}
443
+ * onSelect={setSelectedProject}
444
+ * size="sm"
445
+ * />
446
+ * ```
447
+ */
448
+ declare function ProjectSwitcher({
449
+ items,
450
+ selected,
451
+ onSelect,
452
+ isLoading,
453
+ label,
454
+ icon: Icon,
455
+ className,
456
+ disabled,
457
+ variant,
458
+ size,
459
+ renderItem
460
+ }: ProjectSwitcherProps): react_jsx_runtime0.JSX.Element | null;
461
+ //#endregion
462
+ //#region src/dashboard/dashboard-header.d.ts
463
+ interface BreadcrumbItem {
464
+ label: string;
465
+ href?: string;
466
+ current?: boolean;
467
+ }
468
+ interface DashboardHeaderProps {
469
+ /** Breadcrumb items */
470
+ breadcrumbs?: BreadcrumbItem[];
471
+ /** Content to show on the left (after breadcrumbs) */
472
+ leftContent?: React$1.ReactNode;
473
+ /** Content to show on the right (actions, mode toggle, etc.) */
474
+ rightContent?: React$1.ReactNode;
475
+ /** Whether to show sidebar trigger */
476
+ showSidebarTrigger?: boolean;
477
+ /** Custom trigger element (rendered before breadcrumbs, replaces SidebarTrigger) */
478
+ customTrigger?: React$1.ReactNode;
479
+ /** Additional className */
480
+ className?: string;
481
+ /** Custom content (replaces default breadcrumb) */
482
+ children?: React$1.ReactNode;
483
+ }
484
+ /**
485
+ * DashboardHeader - Top header bar for dashboard pages.
486
+ * Includes sidebar trigger, breadcrumbs, and action slots.
487
+ */
488
+ declare function DashboardHeader({
489
+ breadcrumbs,
490
+ leftContent,
491
+ rightContent,
492
+ showSidebarTrigger,
493
+ customTrigger,
494
+ className,
495
+ children
496
+ }: DashboardHeaderProps): react_jsx_runtime0.JSX.Element;
497
+ //#endregion
498
+ //#region src/dashboard/presets/inset-sidebar.d.ts
499
+ interface InsetSidebarBrand {
500
+ title: string;
501
+ icon: React$1.ReactNode;
502
+ href?: string;
503
+ }
504
+ interface InsetSidebarProject {
505
+ items: ProjectItem[];
506
+ selected?: ProjectItem;
507
+ onSelect: (project: ProjectItem) => void;
508
+ isLoading?: boolean;
509
+ label?: string;
510
+ icon?: LucideIcon;
511
+ }
512
+ interface InsetSidebarUser {
513
+ data: UserData;
514
+ menuItems?: UserMenuItem[];
515
+ onLogout?: () => void;
516
+ }
517
+ interface InsetSidebarProps {
518
+ /** Brand configuration */
519
+ brand: InsetSidebarBrand;
520
+ /** Navigation groups */
521
+ navigation: NavGroup[];
522
+ /** Secondary navigation (shown at bottom above user) */
523
+ secondaryNavigation?: NavGroup[];
524
+ /** Project/workspace switcher configuration */
525
+ project?: InsetSidebarProject;
526
+ /** User menu configuration */
527
+ user?: InsetSidebarUser;
528
+ /** Custom content to render in header (after brand/project switcher) */
529
+ headerContent?: React$1.ReactNode;
530
+ /** Accessibility label for the sidebar */
531
+ ariaLabel?: string;
532
+ /** Additional className */
533
+ className?: string;
534
+ /** Children to render in content area */
535
+ children?: React$1.ReactNode;
536
+ }
537
+ /**
538
+ * InsetSidebar - Complete sidebar preset with inset variant.
539
+ * The standard dashboard sidebar with collapsible to icons.
540
+ */
541
+ declare function InsetSidebar({
542
+ brand,
543
+ navigation,
544
+ secondaryNavigation,
545
+ project,
546
+ user,
547
+ headerContent,
548
+ ariaLabel,
549
+ className,
550
+ children
551
+ }: InsetSidebarProps): react_jsx_runtime0.JSX.Element;
552
+ //#endregion
553
+ //#region src/dashboard/presets/dual-sidebar.d.ts
554
+ interface DualSidebarBrand {
555
+ title: string;
556
+ icon: React$1.ReactNode;
557
+ href?: string;
558
+ }
559
+ interface DualSidebarUser {
560
+ data: UserData;
561
+ menuItems?: UserMenuItem[];
562
+ onLogout?: () => void;
563
+ }
564
+ interface DualSidebarProps {
565
+ /** Brand configuration */
566
+ brand: DualSidebarBrand;
567
+ /** Main categories with their items */
568
+ categories: DualSidebarCategory[];
569
+ /** User menu configuration */
570
+ user?: DualSidebarUser;
571
+ /** Initially active category ID */
572
+ defaultCategoryId?: string;
573
+ /** Callback when category changes */
574
+ onCategoryChange?: (categoryId: string) => void;
575
+ /** Whether the expanded panel starts collapsed */
576
+ defaultCollapsed?: boolean;
577
+ /** Controlled mobile sheet open state */
578
+ mobileOpen?: boolean;
579
+ /** Callback when mobile sheet state changes */
580
+ onMobileOpenChange?: (open: boolean) => void;
581
+ /** Rail color variant */
582
+ railVariant?: "default" | "dark" | "primary" | "muted";
583
+ /** Accessibility label */
584
+ ariaLabel?: string;
585
+ /** Additional className for outer container */
586
+ className?: string;
587
+ }
588
+ /**
589
+ * DualSidebar - A sidebar with icon rail and collapsible expanded panel.
590
+ * Mimics the inset sidebar variant structure for consistent styling.
591
+ */
592
+ declare function DualSidebar({
593
+ brand,
594
+ categories,
595
+ user,
596
+ defaultCategoryId,
597
+ onCategoryChange,
598
+ defaultCollapsed,
599
+ mobileOpen: controlledMobileOpen,
600
+ onMobileOpenChange,
601
+ railVariant,
602
+ ariaLabel,
603
+ className
604
+ }: DualSidebarProps): react_jsx_runtime0.JSX.Element;
605
+ //#endregion
606
+ //#region src/dashboard/presets/floating-sidebar.d.ts
607
+ interface FloatingSidebarBrand {
608
+ title: string;
609
+ icon: React$1.ReactNode;
610
+ href?: string;
611
+ }
612
+ interface FloatingSidebarProject {
613
+ items: ProjectItem[];
614
+ selected?: ProjectItem;
615
+ onSelect: (project: ProjectItem) => void;
616
+ isLoading?: boolean;
617
+ label?: string;
618
+ icon?: LucideIcon;
619
+ }
620
+ interface FloatingSidebarUser {
621
+ data: UserData;
622
+ menuItems?: UserMenuItem[];
623
+ onLogout?: () => void;
624
+ }
625
+ interface FloatingSidebarProps {
626
+ /** Brand configuration */
627
+ brand: FloatingSidebarBrand;
628
+ /** Navigation groups */
629
+ navigation: NavGroup[];
630
+ /** Secondary navigation (shown at bottom above user) */
631
+ secondaryNavigation?: NavGroup[];
632
+ /** Project/workspace switcher configuration */
633
+ project?: FloatingSidebarProject;
634
+ /** User menu configuration */
635
+ user?: FloatingSidebarUser;
636
+ /** Custom content to render in header (after brand/project switcher) */
637
+ headerContent?: React$1.ReactNode;
638
+ /** Side of the screen */
639
+ side?: "left" | "right";
640
+ /** Accessibility label for the sidebar */
641
+ ariaLabel?: string;
642
+ /** Additional className */
643
+ className?: string;
644
+ /** Children to render in content area */
645
+ children?: React$1.ReactNode;
646
+ }
647
+ /**
648
+ * FloatingSidebar - Floating variant sidebar with rounded corners and shadow.
649
+ * Hovers above the content area like Linear / Notion style.
650
+ * Collapses to icon-only rail on desktop.
651
+ */
652
+ declare function FloatingSidebar({
653
+ brand,
654
+ navigation,
655
+ secondaryNavigation,
656
+ project,
657
+ user,
658
+ headerContent,
659
+ side,
660
+ ariaLabel,
661
+ className,
662
+ children
663
+ }: FloatingSidebarProps): react_jsx_runtime0.JSX.Element;
664
+ //#endregion
665
+ //#region src/dashboard/presets/mini-sidebar.d.ts
666
+ interface MiniSidebarBrand {
667
+ title: string;
668
+ icon: React$1.ReactNode;
669
+ href?: string;
670
+ }
671
+ interface MiniSidebarUser {
672
+ data: UserData;
673
+ menuItems?: UserMenuItem[];
674
+ onLogout?: () => void;
675
+ }
676
+ interface MiniSidebarProps {
677
+ /** Brand configuration */
678
+ brand: MiniSidebarBrand;
679
+ /** Navigation groups (icon + label, collapses to icon-only) */
680
+ navigation: MiniSidebarGroup[];
681
+ /** Secondary navigation at bottom */
682
+ secondaryNavigation?: MiniSidebarGroup[];
683
+ /** User menu configuration */
684
+ user?: MiniSidebarUser;
685
+ /** Custom header content */
686
+ headerContent?: React$1.ReactNode;
687
+ /** Side of the screen */
688
+ side?: "left" | "right";
689
+ /** Show the rail click-strip for quick collapse/expand */
690
+ showRail?: boolean;
691
+ /** Accessibility label */
692
+ ariaLabel?: string;
693
+ /** Additional className */
694
+ className?: string;
695
+ /** Children override for content area */
696
+ children?: React$1.ReactNode;
697
+ }
698
+ /**
699
+ * MiniSidebar - Collapsible sidebar that shrinks to icon-only rail.
700
+ * Think VS Code, GitHub, or Figma-style navigation.
701
+ * Uses the standard shadcn sidebar with `collapsible="icon"`.
702
+ */
703
+ declare function MiniSidebar({
704
+ brand,
705
+ navigation,
706
+ secondaryNavigation,
707
+ user,
708
+ headerContent,
709
+ side,
710
+ showRail,
711
+ ariaLabel,
712
+ className,
713
+ children
714
+ }: MiniSidebarProps): react_jsx_runtime0.JSX.Element;
715
+ //#endregion
716
+ //#region src/dashboard/presets/topbar-rail.d.ts
717
+ interface TopbarRailBrand {
718
+ title: string;
719
+ icon: React$1.ReactNode;
720
+ href?: string;
721
+ }
722
+ interface TopbarRailUser {
723
+ data: UserData;
724
+ menuItems?: UserMenuItem[];
725
+ onLogout?: () => void;
726
+ }
727
+ interface TopbarRailBreadcrumb {
728
+ label: string;
729
+ href?: string;
730
+ current?: boolean;
731
+ }
732
+ interface TopbarRailProps {
733
+ /** Brand configuration */
734
+ brand: TopbarRailBrand;
735
+ /** Main categories with their items */
736
+ categories: TopbarRailCategory[];
737
+ /** User menu configuration */
738
+ user?: TopbarRailUser;
739
+ /** Breadcrumb items for the topbar */
740
+ breadcrumbs?: TopbarRailBreadcrumb[];
741
+ /** Action slot on the right side of topbar (before user avatar) */
742
+ actions?: React$1.ReactNode;
743
+ /** Initially active category ID */
744
+ defaultCategoryId?: string;
745
+ /** Callback when category changes */
746
+ onCategoryChange?: (categoryId: string) => void;
747
+ /** Whether the drawer starts open */
748
+ defaultDrawerOpen?: boolean;
749
+ /** Rail color variant */
750
+ railVariant?: "default" | "dark" | "primary" | "muted";
751
+ /** Accessibility label */
752
+ ariaLabel?: string;
753
+ /** Additional className for outer container */
754
+ className?: string;
755
+ /** Main content area */
756
+ children: React$1.ReactNode;
757
+ }
758
+ /**
759
+ * TopbarRail - Fixed topbar + icon rail + secondary drawer layout.
760
+ * Common in Linear, Figma, Jira-style SaaS applications.
761
+ * Does NOT use SidebarProvider — fully custom layout.
762
+ */
763
+ declare function TopbarRail({
764
+ brand,
765
+ categories,
766
+ user,
767
+ breadcrumbs,
768
+ actions,
769
+ defaultCategoryId,
770
+ onCategoryChange,
771
+ defaultDrawerOpen,
772
+ railVariant,
773
+ ariaLabel,
774
+ className,
775
+ children
776
+ }: TopbarRailProps): react_jsx_runtime0.JSX.Element;
777
+ //#endregion
778
+ export { type BreadcrumbItem, type BreadcrumbItemData, DashboardContent, type DashboardContentProps, DashboardHeader, type DashboardHeaderProps, DashboardPageLayout, type DashboardPageLayoutProps, DualSidebar, type DualSidebarBrand, type DualSidebarCategory, type DualSidebarItem, type DualSidebarProps, type DualSidebarUser, FloatingSidebar, type FloatingSidebarBrand, type FloatingSidebarProject, type FloatingSidebarProps, type FloatingSidebarUser, type HeaderAction, type HeaderBadge, type HeaderMetadata, HeaderSection, type HeaderSectionProps, InsetSidebar, type InsetSidebarBrand, type InsetSidebarProject, type InsetSidebarProps, type InsetSidebarUser, MiniSidebar, type MiniSidebarBrand, type MiniSidebarGroup, type MiniSidebarItem, type MiniSidebarProps, type MiniSidebarUser, type NavGroup, type NavItem, type NavPermissions, type NavSubItem, PageHeader, type PageHeaderProps, type ProjectItem, ProjectSwitcher, type ProjectSwitcherProps, SidebarBrand, type SidebarBrandProps, SidebarNav, SidebarNavGroup, type SidebarNavGroupProps, SidebarNavItem, type SidebarNavItemProps, type SidebarNavProps, SidebarUserMenu, type SidebarUserMenuProps, TopbarRail, type TopbarRailBrand, type TopbarRailBreadcrumb, type TopbarRailCategory, type TopbarRailItem, type TopbarRailProps, type TopbarRailUser, type UserData, type UserMenuItem, cn, resolveCategories, resolveMiniNavigation, resolveNavigation };