@caffeinebounce/ui 0.62.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.
- package/LICENSE +21 -0
- package/README.md +39 -0
- package/dist/FinancialStatementTable-BNUrdTU4.d.cts +249 -0
- package/dist/FinancialStatementTable-BNUrdTU4.d.ts +249 -0
- package/dist/NewsletterSignup-BPreFi5W.d.cts +37 -0
- package/dist/NewsletterSignup-BPreFi5W.d.ts +37 -0
- package/dist/TestimonialsSection-DtPu2OeR.d.ts +736 -0
- package/dist/TestimonialsSection-z-yotRfv.d.cts +736 -0
- package/dist/UnifiedTableControls-CG299y9h.d.ts +1233 -0
- package/dist/UnifiedTableControls-CIjRpNhy.d.cts +1233 -0
- package/dist/blog.d.cts +99 -0
- package/dist/blog.d.ts +99 -0
- package/dist/blog.js +292 -0
- package/dist/blog.mjs +279 -0
- package/dist/button-BHnoRUkF.d.cts +34 -0
- package/dist/button-BHnoRUkF.d.ts +34 -0
- package/dist/charts.d.cts +80 -0
- package/dist/charts.d.ts +80 -0
- package/dist/charts.js +19 -0
- package/dist/charts.mjs +2 -0
- package/dist/chunk-33JR5SYE.js +44 -0
- package/dist/chunk-3NDB4YPC.js +247 -0
- package/dist/chunk-5RW4PYZ6.js +1504 -0
- package/dist/chunk-5THF4YP6.mjs +155 -0
- package/dist/chunk-6BUBNZPG.mjs +164 -0
- package/dist/chunk-6DVWMJ3H.mjs +7029 -0
- package/dist/chunk-6TGV2DNP.js +120 -0
- package/dist/chunk-72JGQ7IJ.mjs +1498 -0
- package/dist/chunk-7DHKQODW.mjs +2932 -0
- package/dist/chunk-7IKHZKAC.js +160 -0
- package/dist/chunk-ADIDI7AJ.js +11 -0
- package/dist/chunk-BFWX5GJZ.mjs +940 -0
- package/dist/chunk-BMFQG6RA.mjs +5537 -0
- package/dist/chunk-C4UT5V3P.js +65 -0
- package/dist/chunk-CC4KUIKC.js +2004 -0
- package/dist/chunk-D3QXPL47.mjs +1814 -0
- package/dist/chunk-DQWHYBV2.js +36 -0
- package/dist/chunk-E42B4GSB.js +993 -0
- package/dist/chunk-ESZ7CBA2.js +1007 -0
- package/dist/chunk-EYJJQVV4.js +111 -0
- package/dist/chunk-FRRS2YZH.mjs +129 -0
- package/dist/chunk-G5TQWWQA.mjs +37 -0
- package/dist/chunk-GAIQJCAZ.js +5612 -0
- package/dist/chunk-GMBGWOCR.mjs +48 -0
- package/dist/chunk-GUSTCU2W.mjs +105 -0
- package/dist/chunk-HBLKVQIQ.mjs +23 -0
- package/dist/chunk-HMAMMC72.js +26 -0
- package/dist/chunk-IMKLN273.mjs +9 -0
- package/dist/chunk-J6OLBSZR.js +250 -0
- package/dist/chunk-JAE45W2T.js +28 -0
- package/dist/chunk-JORVSG52.js +606 -0
- package/dist/chunk-KB7UXIQZ.mjs +984 -0
- package/dist/chunk-KGGQ5NZV.js +186 -0
- package/dist/chunk-KHCC5UKW.mjs +22 -0
- package/dist/chunk-KRRIRS6A.mjs +1945 -0
- package/dist/chunk-LQCVRWVF.js +48 -0
- package/dist/chunk-MHZXUOGN.mjs +168 -0
- package/dist/chunk-MPZFPU4X.js +349 -0
- package/dist/chunk-MVYRNJA6.js +74 -0
- package/dist/chunk-N6AFNFZR.mjs +565 -0
- package/dist/chunk-OFQLWSUR.mjs +214 -0
- package/dist/chunk-OLAAXLXY.mjs +219 -0
- package/dist/chunk-OZZWDIOY.js +1859 -0
- package/dist/chunk-PZRI43EZ.js +111 -0
- package/dist/chunk-Q256HRYD.js +176 -0
- package/dist/chunk-Q52ZEL62.mjs +223 -0
- package/dist/chunk-R26Y7LGJ.js +142 -0
- package/dist/chunk-RBUYW6QQ.js +39 -0
- package/dist/chunk-RVEFPVZF.mjs +43 -0
- package/dist/chunk-SORWLKOK.js +96 -0
- package/dist/chunk-STEP6C4C.mjs +33 -0
- package/dist/chunk-T5R6HUDG.mjs +22 -0
- package/dist/chunk-T6ZBA6VJ.js +7109 -0
- package/dist/chunk-UM7WMXIU.js +2995 -0
- package/dist/chunk-VBD4Q5LL.mjs +117 -0
- package/dist/chunk-WOITB4JL.js +195 -0
- package/dist/chunk-YKZEKJMZ.mjs +71 -0
- package/dist/chunk-YL7RZRHM.mjs +103 -0
- package/dist/chunk-YSLD2HLP.mjs +346 -0
- package/dist/chunk-ZFLZA7UP.mjs +140 -0
- package/dist/chunk-ZKUIUE7W.mjs +26 -0
- package/dist/chunk-ZOA7B32D.js +248 -0
- package/dist/data-table.d.cts +46 -0
- package/dist/data-table.d.ts +46 -0
- package/dist/data-table.js +270 -0
- package/dist/data-table.mjs +13 -0
- package/dist/editor.d.cts +89 -0
- package/dist/editor.d.ts +89 -0
- package/dist/editor.js +10 -0
- package/dist/editor.mjs +1 -0
- package/dist/forms.d.cts +142 -0
- package/dist/forms.d.ts +142 -0
- package/dist/forms.js +24 -0
- package/dist/forms.mjs +11 -0
- package/dist/hooks-8ORd7T1A.d.cts +751 -0
- package/dist/hooks-B2jU1GVT.d.ts +751 -0
- package/dist/hooks.d.cts +6 -0
- package/dist/hooks.d.ts +6 -0
- package/dist/hooks.js +99 -0
- package/dist/hooks.mjs +10 -0
- package/dist/index.d.cts +3141 -0
- package/dist/index.d.ts +3141 -0
- package/dist/index.js +7332 -0
- package/dist/index.mjs +5876 -0
- package/dist/layouts-DPfDDF53.d.cts +1001 -0
- package/dist/layouts-DPfDDF53.d.ts +1001 -0
- package/dist/layouts.d.cts +4 -0
- package/dist/layouts.d.ts +4 -0
- package/dist/layouts.js +100 -0
- package/dist/layouts.mjs +11 -0
- package/dist/marketing-3d.d.cts +51 -0
- package/dist/marketing-3d.d.ts +51 -0
- package/dist/marketing-3d.js +553 -0
- package/dist/marketing-3d.mjs +526 -0
- package/dist/marketing.d.cts +583 -0
- package/dist/marketing.d.ts +583 -0
- package/dist/marketing.js +299 -0
- package/dist/marketing.mjs +10 -0
- package/dist/media.d.cts +29 -0
- package/dist/media.d.ts +29 -0
- package/dist/media.js +189 -0
- package/dist/media.mjs +182 -0
- package/dist/navigation.d.cts +591 -0
- package/dist/navigation.d.ts +591 -0
- package/dist/navigation.js +108 -0
- package/dist/navigation.mjs +15 -0
- package/dist/portal.d.cts +58 -0
- package/dist/portal.d.ts +58 -0
- package/dist/portal.js +403 -0
- package/dist/portal.mjs +395 -0
- package/dist/primitives.d.cts +508 -0
- package/dist/primitives.d.ts +508 -0
- package/dist/primitives.js +295 -0
- package/dist/primitives.mjs +14 -0
- package/dist/settings.d.cts +216 -0
- package/dist/settings.d.ts +216 -0
- package/dist/settings.js +34 -0
- package/dist/settings.mjs +9 -0
- package/dist/shared-Dqn36QHZ.d.cts +4 -0
- package/dist/shared-Dqn36QHZ.d.ts +4 -0
- package/dist/styles.css +1213 -0
- package/package.json +189 -0
- package/styles.css +1 -0
|
@@ -0,0 +1,1001 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React$1 from 'react';
|
|
3
|
+
import { ReactNode, ComponentType } from 'react';
|
|
4
|
+
import { LucideIcon } from 'lucide-react';
|
|
5
|
+
|
|
6
|
+
interface AdminPageLayoutBackLink {
|
|
7
|
+
/** URL to navigate back to */
|
|
8
|
+
href: string;
|
|
9
|
+
/** Label for the back link */
|
|
10
|
+
label: string;
|
|
11
|
+
}
|
|
12
|
+
interface AdminPageLayoutProps {
|
|
13
|
+
/** Page title displayed in header (ignored when backLink is provided) */
|
|
14
|
+
title?: string;
|
|
15
|
+
/** Page description/subtitle displayed below title (ignored when backLink is provided) */
|
|
16
|
+
description?: string;
|
|
17
|
+
/** Actions to display in the header (buttons, etc.) */
|
|
18
|
+
actions?: ReactNode;
|
|
19
|
+
/** Main content */
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
/** Additional class names for the container */
|
|
22
|
+
className?: string;
|
|
23
|
+
/** Additional class names for the content area */
|
|
24
|
+
contentClassName?: string;
|
|
25
|
+
/** Optional footer content */
|
|
26
|
+
footer?: ReactNode;
|
|
27
|
+
/** Optional back link - when provided, title and description are not shown */
|
|
28
|
+
backLink?: AdminPageLayoutBackLink;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Shared layout component for admin pages.
|
|
32
|
+
* Provides consistent padding, spacing, and optional header with title/description.
|
|
33
|
+
* When backLink is provided, the title/description header is replaced with a back link.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* // With header
|
|
37
|
+
* <AdminPageLayout title="Users" description="Manage user accounts">
|
|
38
|
+
* <AdminUsersManagement />
|
|
39
|
+
* </AdminPageLayout>
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* // With back link (detail pages)
|
|
43
|
+
* <AdminPageLayout backLink={{ href: "/admin/cohorts", label: "Back to Cohorts" }}>
|
|
44
|
+
* <CohortProfile />
|
|
45
|
+
* </AdminPageLayout>
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* // Without header (dashboard style)
|
|
49
|
+
* <AdminPageLayout>
|
|
50
|
+
* <DashboardContent />
|
|
51
|
+
* </AdminPageLayout>
|
|
52
|
+
*/
|
|
53
|
+
declare function AdminPageLayout({ title, description, actions, children, className, contentClassName, footer, backLink, }: AdminPageLayoutProps): react_jsx_runtime.JSX.Element;
|
|
54
|
+
|
|
55
|
+
interface AppFooterProps {
|
|
56
|
+
children: ReactNode;
|
|
57
|
+
className?: string;
|
|
58
|
+
}
|
|
59
|
+
declare function AppFooter({ children, className }: AppFooterProps): react_jsx_runtime.JSX.Element;
|
|
60
|
+
|
|
61
|
+
interface HeaderLink {
|
|
62
|
+
/** Link href */
|
|
63
|
+
href: string;
|
|
64
|
+
/** Link label for accessibility */
|
|
65
|
+
label: string;
|
|
66
|
+
/** Icon component (defaults to CircleHelp for help, Info for about) */
|
|
67
|
+
icon?: ComponentType<{
|
|
68
|
+
className?: string;
|
|
69
|
+
}>;
|
|
70
|
+
/** Keyboard shortcut display (e.g., "⌃⇧H") */
|
|
71
|
+
shortcutDisplay?: string;
|
|
72
|
+
/** Tooltip text */
|
|
73
|
+
tooltip?: string;
|
|
74
|
+
}
|
|
75
|
+
interface AppHeaderProps {
|
|
76
|
+
/** Show the sidebar trigger button */
|
|
77
|
+
showSidebarTrigger?: boolean;
|
|
78
|
+
/** Show the theme toggle */
|
|
79
|
+
showThemeToggle?: boolean;
|
|
80
|
+
/** Theme toggle shortcut display */
|
|
81
|
+
themeToggleShortcut?: string;
|
|
82
|
+
/** Whether shortcuts are visible based on user preference */
|
|
83
|
+
shortcutsVisible?: boolean;
|
|
84
|
+
/** Help link configuration */
|
|
85
|
+
helpLink?: HeaderLink | string;
|
|
86
|
+
/** About link configuration */
|
|
87
|
+
aboutLink?: HeaderLink | string;
|
|
88
|
+
/** Custom actions to show between the spacer and nav links */
|
|
89
|
+
actions?: ReactNode;
|
|
90
|
+
/** Content to show after the sidebar trigger */
|
|
91
|
+
leadingContent?: ReactNode;
|
|
92
|
+
/** Additional className */
|
|
93
|
+
className?: string;
|
|
94
|
+
/** Link component to use (for Next.js Link, etc.) */
|
|
95
|
+
LinkComponent?: ComponentType<{
|
|
96
|
+
href: string;
|
|
97
|
+
className?: string;
|
|
98
|
+
children: ReactNode;
|
|
99
|
+
}>;
|
|
100
|
+
/** Keyboard shortcut display component */
|
|
101
|
+
ShortcutComponent?: ComponentType<{
|
|
102
|
+
className?: string;
|
|
103
|
+
children: ReactNode;
|
|
104
|
+
}>;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* AppHeader - Standard header bar for app layouts
|
|
108
|
+
*
|
|
109
|
+
* Includes SidebarTrigger, help/about links, theme toggle, and custom action slots.
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```tsx
|
|
113
|
+
* <AppHeader
|
|
114
|
+
* helpLink={{ href: "/help", label: "Help", icon: CircleHelp, shortcutDisplay: "⌃⇧H" }}
|
|
115
|
+
* aboutLink="/about"
|
|
116
|
+
* actions={<FeedbackButton />}
|
|
117
|
+
* />
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
declare function AppHeader({ showSidebarTrigger, showThemeToggle, themeToggleShortcut, shortcutsVisible, helpLink, aboutLink, actions, leadingContent, className, LinkComponent, ShortcutComponent, }: AppHeaderProps): react_jsx_runtime.JSX.Element;
|
|
121
|
+
|
|
122
|
+
interface UserAvatarMenuUser {
|
|
123
|
+
/** User ID for gradient generation */
|
|
124
|
+
id: string;
|
|
125
|
+
/** User email */
|
|
126
|
+
email?: string;
|
|
127
|
+
/** Avatar image URL */
|
|
128
|
+
avatarUrl?: string;
|
|
129
|
+
/** Display name */
|
|
130
|
+
name?: string;
|
|
131
|
+
/** Initials for fallback */
|
|
132
|
+
initials?: string;
|
|
133
|
+
}
|
|
134
|
+
interface UserAvatarMenuItem {
|
|
135
|
+
/** Menu item label */
|
|
136
|
+
label: string;
|
|
137
|
+
/** Icon component */
|
|
138
|
+
icon?: ComponentType<{
|
|
139
|
+
className?: string;
|
|
140
|
+
}>;
|
|
141
|
+
/** Link href (renders as link) */
|
|
142
|
+
href?: string;
|
|
143
|
+
/** Click handler (renders as button) */
|
|
144
|
+
onClick?: () => void;
|
|
145
|
+
/** Whether link opens in new tab */
|
|
146
|
+
external?: boolean;
|
|
147
|
+
/** Keyboard shortcut display string */
|
|
148
|
+
shortcut?: string;
|
|
149
|
+
/** Whether to show keyboard shortcut */
|
|
150
|
+
showShortcut?: boolean;
|
|
151
|
+
/** Destructive styling (for sign out, delete, etc.) */
|
|
152
|
+
destructive?: boolean;
|
|
153
|
+
/** Add separator before this item */
|
|
154
|
+
separatorBefore?: boolean;
|
|
155
|
+
}
|
|
156
|
+
interface UserAvatarMenuProps {
|
|
157
|
+
/** User data */
|
|
158
|
+
user: UserAvatarMenuUser;
|
|
159
|
+
/** Whether data is loading */
|
|
160
|
+
loading?: boolean;
|
|
161
|
+
/** Menu items */
|
|
162
|
+
items: UserAvatarMenuItem[];
|
|
163
|
+
/** Avatar size */
|
|
164
|
+
size?: "sm" | "md" | "lg";
|
|
165
|
+
/** Position of dropdown */
|
|
166
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
167
|
+
/** Dropdown alignment */
|
|
168
|
+
align?: "start" | "center" | "end";
|
|
169
|
+
/** Whether menu is controlled */
|
|
170
|
+
open?: boolean;
|
|
171
|
+
/** Callback when menu open state changes */
|
|
172
|
+
onOpenChange?: (open: boolean) => void;
|
|
173
|
+
/** Whether to show chevron indicator */
|
|
174
|
+
showChevron?: boolean;
|
|
175
|
+
/** Whether this menu is currently active/highlighted */
|
|
176
|
+
isActive?: boolean;
|
|
177
|
+
/** Custom trigger content (replaces default avatar button) */
|
|
178
|
+
trigger?: ReactNode;
|
|
179
|
+
/** Header content shown above menu items */
|
|
180
|
+
header?: ReactNode;
|
|
181
|
+
/** Show user name and email in header */
|
|
182
|
+
showUserInfo?: boolean;
|
|
183
|
+
/** Menu trigger shortcut display */
|
|
184
|
+
menuShortcut?: string;
|
|
185
|
+
/** Custom menu content width */
|
|
186
|
+
menuWidth?: string;
|
|
187
|
+
/** Class name for trigger button */
|
|
188
|
+
className?: string;
|
|
189
|
+
/** Class name for avatar */
|
|
190
|
+
avatarClassName?: string;
|
|
191
|
+
/** Link component for routing */
|
|
192
|
+
LinkComponent?: ComponentType<{
|
|
193
|
+
href: string;
|
|
194
|
+
className?: string;
|
|
195
|
+
children: ReactNode;
|
|
196
|
+
}>;
|
|
197
|
+
/** Custom keyboard shortcut component (for user preference integration) */
|
|
198
|
+
ShortcutComponent?: ComponentType<{
|
|
199
|
+
className?: string;
|
|
200
|
+
children: ReactNode;
|
|
201
|
+
}>;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* User avatar with dropdown menu for profile actions.
|
|
205
|
+
* Fully configurable menu items, supports loading state and keyboard shortcuts.
|
|
206
|
+
*/
|
|
207
|
+
declare function UserAvatarMenu({ user, loading, items, size, side, align, open, onOpenChange, showChevron, isActive, trigger, header, showUserInfo, menuShortcut, menuWidth, className, avatarClassName, LinkComponent, ShortcutComponent, }: UserAvatarMenuProps): react_jsx_runtime.JSX.Element;
|
|
208
|
+
|
|
209
|
+
interface NavItem {
|
|
210
|
+
/** Display label */
|
|
211
|
+
label: string;
|
|
212
|
+
/** Navigation URL */
|
|
213
|
+
href: string;
|
|
214
|
+
/** Icon component */
|
|
215
|
+
icon: ComponentType<{
|
|
216
|
+
className?: string;
|
|
217
|
+
}>;
|
|
218
|
+
/** Whether this item is currently active */
|
|
219
|
+
isActive?: boolean;
|
|
220
|
+
/** Keyboard shortcut display (e.g., "⌃1") */
|
|
221
|
+
shortcutDisplay?: string;
|
|
222
|
+
/** Keyboard shortcut key (e.g., "1") - used with Ctrl modifier */
|
|
223
|
+
shortcutKey?: string;
|
|
224
|
+
/** Whether the item is disabled (e.g., coming soon) */
|
|
225
|
+
disabled?: boolean;
|
|
226
|
+
/** Tooltip text when disabled */
|
|
227
|
+
disabledTooltip?: string;
|
|
228
|
+
/** Icon animation on hover */
|
|
229
|
+
iconAnimation?: "scale" | "rotate" | "bounce" | "none";
|
|
230
|
+
}
|
|
231
|
+
/** Section header with grouped nav items */
|
|
232
|
+
interface NavSection {
|
|
233
|
+
type: "section";
|
|
234
|
+
/** Section label (displayed as uppercase header) */
|
|
235
|
+
label: string;
|
|
236
|
+
/** Optional icon used when sidebar is collapsed */
|
|
237
|
+
icon?: ComponentType<{
|
|
238
|
+
className?: string;
|
|
239
|
+
}>;
|
|
240
|
+
/** Items within this section */
|
|
241
|
+
items: NavItem[];
|
|
242
|
+
/** Whether section is visible (for conditional rendering) */
|
|
243
|
+
visible?: boolean;
|
|
244
|
+
/** Whether section is collapsible (click header to expand/collapse) */
|
|
245
|
+
collapsible?: boolean;
|
|
246
|
+
/** Whether section starts open (default: true) */
|
|
247
|
+
defaultOpen?: boolean;
|
|
248
|
+
}
|
|
249
|
+
/** Simple visual divider */
|
|
250
|
+
interface NavDivider {
|
|
251
|
+
type: "divider";
|
|
252
|
+
}
|
|
253
|
+
/** Union type for all navigation elements */
|
|
254
|
+
type NavElement = NavItem | NavSection | NavDivider;
|
|
255
|
+
/** Type guard for NavItem - checks for required NavItem properties */
|
|
256
|
+
declare function isNavItem(element: NavElement): element is NavItem;
|
|
257
|
+
/** Type guard for NavSection */
|
|
258
|
+
declare function isNavSection(element: NavElement): element is NavSection;
|
|
259
|
+
/** Type guard for NavDivider */
|
|
260
|
+
declare function isNavDivider(element: NavElement): element is NavDivider;
|
|
261
|
+
interface AppSidebarUser {
|
|
262
|
+
/** User ID */
|
|
263
|
+
id: string;
|
|
264
|
+
/** User email */
|
|
265
|
+
email?: string | null;
|
|
266
|
+
/** Display name */
|
|
267
|
+
name?: string;
|
|
268
|
+
/** User initials for avatar fallback */
|
|
269
|
+
initials?: string;
|
|
270
|
+
/** Avatar URL */
|
|
271
|
+
avatarUrl?: string | null;
|
|
272
|
+
}
|
|
273
|
+
interface AppSidebarProps {
|
|
274
|
+
/** Navigation elements (items, sections, dividers) */
|
|
275
|
+
navItems: NavElement[];
|
|
276
|
+
/** Current pathname for active state detection */
|
|
277
|
+
pathname?: string;
|
|
278
|
+
/** User information (null if not logged in) */
|
|
279
|
+
user?: AppSidebarUser | null;
|
|
280
|
+
/** User menu items */
|
|
281
|
+
userMenuItems?: UserAvatarMenuItem[];
|
|
282
|
+
/** Loading state for user */
|
|
283
|
+
userLoading?: boolean;
|
|
284
|
+
/** Header content (e.g., team switcher) */
|
|
285
|
+
header?: ReactNode;
|
|
286
|
+
/** Sign out handler */
|
|
287
|
+
onSignOut?: () => void | Promise<void>;
|
|
288
|
+
/** Sign in URL (shown when no user) */
|
|
289
|
+
signInHref?: string;
|
|
290
|
+
/** Profile page path for active state detection */
|
|
291
|
+
profilePath?: string;
|
|
292
|
+
/** Sidebar collapsible mode */
|
|
293
|
+
collapsible?: "icon" | "offcanvas" | "none";
|
|
294
|
+
/** Link component (for Next.js) */
|
|
295
|
+
LinkComponent?: ComponentType<{
|
|
296
|
+
href: string;
|
|
297
|
+
className?: string;
|
|
298
|
+
children: ReactNode;
|
|
299
|
+
}>;
|
|
300
|
+
/** Keyboard shortcut component */
|
|
301
|
+
ShortcutComponent?: ComponentType<{
|
|
302
|
+
className?: string;
|
|
303
|
+
children: ReactNode;
|
|
304
|
+
}>;
|
|
305
|
+
/** User menu keyboard shortcut display */
|
|
306
|
+
userMenuShortcut?: string;
|
|
307
|
+
/** Callback for navigation (for keyboard shortcuts) */
|
|
308
|
+
onNavigate?: (href: string) => void;
|
|
309
|
+
/** Whether keyboard shortcuts are enabled */
|
|
310
|
+
enableKeyboardShortcuts?: boolean;
|
|
311
|
+
/** Whether shortcuts are visible based on user preference */
|
|
312
|
+
shortcutsVisible?: boolean;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* AppSidebar - A complete sidebar with navigation and user menu
|
|
316
|
+
*
|
|
317
|
+
* @example
|
|
318
|
+
* ```tsx
|
|
319
|
+
* <AppSidebar
|
|
320
|
+
* navItems={[
|
|
321
|
+
* { label: "Dashboard", href: "/dashboard", icon: Home },
|
|
322
|
+
* { label: "Settings", href: "/settings", icon: Settings },
|
|
323
|
+
* ]}
|
|
324
|
+
* pathname={pathname}
|
|
325
|
+
* user={{ id: "1", email: "user@example.com", name: "John Doe" }}
|
|
326
|
+
* userMenuItems={[
|
|
327
|
+
* { label: "Profile", href: "/profile", icon: User },
|
|
328
|
+
* { label: "Sign Out", onClick: signOut, icon: LogOut, destructive: true },
|
|
329
|
+
* ]}
|
|
330
|
+
* header={<TeamSwitcher />}
|
|
331
|
+
* />
|
|
332
|
+
* ```
|
|
333
|
+
*/
|
|
334
|
+
declare function AppSidebar({ navItems, pathname, user, userMenuItems, userLoading, header, onSignOut, signInHref, profilePath, collapsible, LinkComponent, ShortcutComponent, userMenuShortcut, onNavigate, enableKeyboardShortcuts, shortcutsVisible, }: AppSidebarProps): react_jsx_runtime.JSX.Element;
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Props for the AppLayout component
|
|
338
|
+
*/
|
|
339
|
+
interface AppLayoutProps {
|
|
340
|
+
/** Main page content */
|
|
341
|
+
children: ReactNode;
|
|
342
|
+
/** Navigation items for the sidebar (supports NavItem, NavSection, NavDivider) */
|
|
343
|
+
navItems?: NavElement[];
|
|
344
|
+
/** Header content for sidebar (e.g., team switcher) */
|
|
345
|
+
sidebarHeader?: ReactNode;
|
|
346
|
+
/** Custom sidebar element (overrides navItems, user, etc.) */
|
|
347
|
+
sidebar?: ReactNode;
|
|
348
|
+
/** Sidebar collapsible mode */
|
|
349
|
+
sidebarCollapsible?: "icon" | "offcanvas" | "none";
|
|
350
|
+
/** User information */
|
|
351
|
+
user?: AppSidebarUser | null;
|
|
352
|
+
/** User loading state */
|
|
353
|
+
userLoading?: boolean;
|
|
354
|
+
/** User menu items */
|
|
355
|
+
userMenuItems?: UserAvatarMenuItem[];
|
|
356
|
+
/** Sign out handler */
|
|
357
|
+
onSignOut?: () => void | Promise<void>;
|
|
358
|
+
/** Sign in URL */
|
|
359
|
+
signInHref?: string;
|
|
360
|
+
/** Current pathname (for active states) */
|
|
361
|
+
pathname?: string;
|
|
362
|
+
/** Show the header */
|
|
363
|
+
showHeader?: boolean;
|
|
364
|
+
/** Show sidebar trigger in header */
|
|
365
|
+
showSidebarTrigger?: boolean;
|
|
366
|
+
/** Show theme toggle in header */
|
|
367
|
+
showThemeToggle?: boolean;
|
|
368
|
+
/** Theme toggle shortcut display */
|
|
369
|
+
themeToggleShortcut?: string;
|
|
370
|
+
/** Whether shortcuts are visible based on user preference */
|
|
371
|
+
shortcutsVisible?: boolean;
|
|
372
|
+
/** Help link configuration */
|
|
373
|
+
helpLink?: HeaderLink | string;
|
|
374
|
+
/** About link configuration */
|
|
375
|
+
aboutLink?: HeaderLink | string;
|
|
376
|
+
/** Custom header actions */
|
|
377
|
+
headerActions?: ReactNode;
|
|
378
|
+
/** Custom header leading content */
|
|
379
|
+
headerLeading?: ReactNode;
|
|
380
|
+
/** Custom header element (overrides all header props) */
|
|
381
|
+
header?: ReactNode;
|
|
382
|
+
/** Additional className for the header */
|
|
383
|
+
headerClassName?: string;
|
|
384
|
+
/** Show floating user menu when sidebar collapsed */
|
|
385
|
+
showFloatingUserMenu?: boolean;
|
|
386
|
+
/** Additional className for the root container */
|
|
387
|
+
className?: string;
|
|
388
|
+
/** Default sidebar open state */
|
|
389
|
+
defaultOpen?: boolean;
|
|
390
|
+
/** Controlled sidebar open state */
|
|
391
|
+
open?: boolean;
|
|
392
|
+
/** Callback when sidebar state changes */
|
|
393
|
+
onOpenChange?: (open: boolean) => void;
|
|
394
|
+
/** Link component (for Next.js) */
|
|
395
|
+
LinkComponent?: ComponentType<{
|
|
396
|
+
href: string;
|
|
397
|
+
className?: string;
|
|
398
|
+
children: ReactNode;
|
|
399
|
+
}>;
|
|
400
|
+
/** Keyboard shortcut component */
|
|
401
|
+
ShortcutComponent?: ComponentType<{
|
|
402
|
+
className?: string;
|
|
403
|
+
children: ReactNode;
|
|
404
|
+
}>;
|
|
405
|
+
/** User menu keyboard shortcut display */
|
|
406
|
+
userMenuShortcut?: string;
|
|
407
|
+
/** Callback for navigation (for keyboard shortcuts) */
|
|
408
|
+
onNavigate?: (href: string) => void;
|
|
409
|
+
/** Whether keyboard shortcuts are enabled for nav items */
|
|
410
|
+
enableNavShortcuts?: boolean;
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* A layout component for authenticated app pages with sidebar and header.
|
|
414
|
+
*
|
|
415
|
+
* Includes sensible defaults for common patterns:
|
|
416
|
+
* - Sidebar with navigation and user menu
|
|
417
|
+
* - Header with SidebarTrigger, help/about links, theme toggle
|
|
418
|
+
* - Floating user menu when sidebar is collapsed
|
|
419
|
+
*
|
|
420
|
+
* All elements can be customized via props or disabled entirely.
|
|
421
|
+
*
|
|
422
|
+
* @example
|
|
423
|
+
* ```tsx
|
|
424
|
+
* // Minimal usage with defaults
|
|
425
|
+
* <AppLayout
|
|
426
|
+
* navItems={[
|
|
427
|
+
* { label: "Dashboard", href: "/dashboard", icon: Home },
|
|
428
|
+
* { label: "Settings", href: "/settings", icon: Settings },
|
|
429
|
+
* ]}
|
|
430
|
+
* user={user}
|
|
431
|
+
* userMenuItems={[{ label: "Profile", href: "/profile", icon: User }]}
|
|
432
|
+
* onSignOut={handleSignOut}
|
|
433
|
+
* helpLink="/help"
|
|
434
|
+
* aboutLink="/about"
|
|
435
|
+
* >
|
|
436
|
+
* <DashboardContent />
|
|
437
|
+
* </AppLayout>
|
|
438
|
+
*
|
|
439
|
+
* // Full customization
|
|
440
|
+
* <AppLayout
|
|
441
|
+
* sidebar={<CustomSidebar />}
|
|
442
|
+
* header={<CustomHeader />}
|
|
443
|
+
* showFloatingUserMenu={false}
|
|
444
|
+
* >
|
|
445
|
+
* <DashboardContent />
|
|
446
|
+
* </AppLayout>
|
|
447
|
+
* ```
|
|
448
|
+
*/
|
|
449
|
+
declare function AppLayout({ children, navItems, sidebarHeader, sidebar: customSidebar, sidebarCollapsible, user, userLoading, userMenuItems, onSignOut, signInHref, pathname, showHeader, showSidebarTrigger, showThemeToggle, themeToggleShortcut, shortcutsVisible, helpLink, aboutLink, headerActions, headerLeading, header: customHeader, headerClassName, showFloatingUserMenu, className, defaultOpen, open, onOpenChange, LinkComponent, ShortcutComponent, userMenuShortcut, onNavigate, enableNavShortcuts, }: AppLayoutProps): react_jsx_runtime.JSX.Element;
|
|
450
|
+
|
|
451
|
+
interface BasePageLayoutProps {
|
|
452
|
+
/** Page title displayed in header */
|
|
453
|
+
title?: string;
|
|
454
|
+
/** Page description/subtitle displayed below title */
|
|
455
|
+
description?: string;
|
|
456
|
+
/** Actions to display in the header (buttons, etc.) */
|
|
457
|
+
actions?: ReactNode;
|
|
458
|
+
/** Main content */
|
|
459
|
+
children?: ReactNode;
|
|
460
|
+
/** Additional class names for the container */
|
|
461
|
+
className?: string;
|
|
462
|
+
/** Additional class names for the content area */
|
|
463
|
+
contentClassName?: string;
|
|
464
|
+
/** Optional footer content */
|
|
465
|
+
footer?: ReactNode;
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* Base layout component for application pages.
|
|
469
|
+
* Provides consistent padding, spacing, and optional header with title/description.
|
|
470
|
+
* Used by AdminPageLayout and UserPageLayout.
|
|
471
|
+
*/
|
|
472
|
+
declare function BasePageLayout({ title, description, actions, children, className, contentClassName, footer, }: BasePageLayoutProps): react_jsx_runtime.JSX.Element;
|
|
473
|
+
|
|
474
|
+
interface DashboardGridProps {
|
|
475
|
+
/** Content to render inside the dashboard grid layout. */
|
|
476
|
+
children: React.ReactNode;
|
|
477
|
+
/** Additional CSS class names to apply to the root container. */
|
|
478
|
+
className?: string;
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Dashboard layout container for stacking page sections with consistent spacing.
|
|
482
|
+
*
|
|
483
|
+
* Use \`DashboardGrid\` to wrap the main content areas of a dashboard page, such as
|
|
484
|
+
* summary cards, data tables, and activity feeds. It arranges children in a
|
|
485
|
+
* vertical column with a standard gap, while allowing additional layout control
|
|
486
|
+
* via the \`className\` prop.
|
|
487
|
+
*
|
|
488
|
+
* @remarks
|
|
489
|
+
* This component is intentionally minimal and only manages vertical spacing.
|
|
490
|
+
* Combine it with other layout primitives (such as card, grid, or section
|
|
491
|
+
* components) to build rich dashboard views.
|
|
492
|
+
*
|
|
493
|
+
* @example Basic usage
|
|
494
|
+
* \`\`\`tsx
|
|
495
|
+
* import { DashboardGrid } from "@caffeinebounce/ui";
|
|
496
|
+
*
|
|
497
|
+
* function DashboardPage() {
|
|
498
|
+
* return (
|
|
499
|
+
* <DashboardGrid>
|
|
500
|
+
* <StatsOverview />
|
|
501
|
+
* <RecentActivity />
|
|
502
|
+
* <TeamTable />
|
|
503
|
+
* </DashboardGrid>
|
|
504
|
+
* );
|
|
505
|
+
* }
|
|
506
|
+
* \`\`\`
|
|
507
|
+
*
|
|
508
|
+
* @example With custom spacing and max width
|
|
509
|
+
* \`\`\`tsx
|
|
510
|
+
* <DashboardGrid className="max-w-6xl mx-auto gap-6">
|
|
511
|
+
* <StatsOverview />
|
|
512
|
+
* <RecentActivity />
|
|
513
|
+
* </DashboardGrid>
|
|
514
|
+
* \`\`\`
|
|
515
|
+
*
|
|
516
|
+
* @param props - Dashboard layout props.
|
|
517
|
+
*/
|
|
518
|
+
declare function DashboardGrid({ children, className }: DashboardGridProps): react_jsx_runtime.JSX.Element;
|
|
519
|
+
|
|
520
|
+
interface FloatingUserMenuUser {
|
|
521
|
+
/** User ID */
|
|
522
|
+
id: string;
|
|
523
|
+
/** User email */
|
|
524
|
+
email?: string | null;
|
|
525
|
+
/** Display name */
|
|
526
|
+
name?: string;
|
|
527
|
+
/** User initials for avatar fallback */
|
|
528
|
+
initials?: string;
|
|
529
|
+
/** Avatar URL */
|
|
530
|
+
avatarUrl?: string | null;
|
|
531
|
+
}
|
|
532
|
+
interface FloatingUserMenuProps {
|
|
533
|
+
/** User information (null if not logged in or loading) */
|
|
534
|
+
user?: FloatingUserMenuUser | null;
|
|
535
|
+
/** User menu items */
|
|
536
|
+
menuItems?: UserAvatarMenuItem[];
|
|
537
|
+
/** Loading state */
|
|
538
|
+
loading?: boolean;
|
|
539
|
+
/** Sign out handler */
|
|
540
|
+
onSignOut?: () => void | Promise<void>;
|
|
541
|
+
/** Current pathname for active state detection */
|
|
542
|
+
pathname?: string;
|
|
543
|
+
/** Profile page path pattern */
|
|
544
|
+
profilePath?: string;
|
|
545
|
+
/** Link component (for Next.js) */
|
|
546
|
+
LinkComponent?: ComponentType<{
|
|
547
|
+
href: string;
|
|
548
|
+
className?: string;
|
|
549
|
+
children: ReactNode;
|
|
550
|
+
}>;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* FloatingUserMenu - A floating user avatar menu that appears when sidebar is collapsed
|
|
554
|
+
*
|
|
555
|
+
* Only renders when sidebar is in mobile/collapsed mode.
|
|
556
|
+
*
|
|
557
|
+
* @example
|
|
558
|
+
* ```tsx
|
|
559
|
+
* <FloatingUserMenu
|
|
560
|
+
* user={{ id: "1", email: "user@example.com", name: "John Doe" }}
|
|
561
|
+
* menuItems={[
|
|
562
|
+
* { label: "Profile", href: "/profile", icon: User },
|
|
563
|
+
* ]}
|
|
564
|
+
* onSignOut={handleSignOut}
|
|
565
|
+
* />
|
|
566
|
+
* ```
|
|
567
|
+
*/
|
|
568
|
+
declare function FloatingUserMenu({ user, menuItems, loading, onSignOut, pathname, profilePath, LinkComponent, }: FloatingUserMenuProps): react_jsx_runtime.JSX.Element | null;
|
|
569
|
+
|
|
570
|
+
interface HelpLayoutProps {
|
|
571
|
+
children: ReactNode;
|
|
572
|
+
panel: ReactNode;
|
|
573
|
+
isOpen: boolean;
|
|
574
|
+
className?: string;
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* HelpLayout wraps content and shifts it when the help panel is open.
|
|
578
|
+
* This allows users to continue working while viewing help.
|
|
579
|
+
*
|
|
580
|
+
* The layout maintains bounded height (h-full) to ensure child components
|
|
581
|
+
* like AppLayout can use sticky headers with overflow-y-auto content areas.
|
|
582
|
+
*/
|
|
583
|
+
declare function HelpLayout({ children, panel, isOpen, className, }: HelpLayoutProps): react_jsx_runtime.JSX.Element;
|
|
584
|
+
|
|
585
|
+
interface HelpBreadcrumb {
|
|
586
|
+
label: string;
|
|
587
|
+
href: string;
|
|
588
|
+
}
|
|
589
|
+
interface HelpPageLayoutProps {
|
|
590
|
+
/** Breadcrumbs to display at the top */
|
|
591
|
+
breadcrumbs?: HelpBreadcrumb[];
|
|
592
|
+
/** Page title */
|
|
593
|
+
title: string;
|
|
594
|
+
/** Page description */
|
|
595
|
+
description?: string;
|
|
596
|
+
/** Main content */
|
|
597
|
+
children: ReactNode;
|
|
598
|
+
/** Sidebar content */
|
|
599
|
+
sidebar?: ReactNode;
|
|
600
|
+
/** Additional content (e.g. related articles) displayed below main content or in a sidebar */
|
|
601
|
+
relatedContent?: ReactNode;
|
|
602
|
+
/** Additional class names for the container */
|
|
603
|
+
className?: string;
|
|
604
|
+
/** Additional class names for the content area */
|
|
605
|
+
contentClassName?: string;
|
|
606
|
+
/** Home link href (defaults to /admin/help) */
|
|
607
|
+
homeHref?: string;
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* Layout component for help pages.
|
|
611
|
+
* Includes breadcrumbs, header, and consistent spacing for content and related articles.
|
|
612
|
+
*/
|
|
613
|
+
declare function HelpPageLayout({ breadcrumbs, title, description, children, sidebar, relatedContent, className, contentClassName, homeHref, }: HelpPageLayoutProps): react_jsx_runtime.JSX.Element;
|
|
614
|
+
|
|
615
|
+
interface HelpPanelLayoutProps {
|
|
616
|
+
isOpen: boolean;
|
|
617
|
+
onClose: () => void;
|
|
618
|
+
onBack?: () => void;
|
|
619
|
+
canGoBack?: boolean;
|
|
620
|
+
searchQuery: string;
|
|
621
|
+
onSearchChange: (query: string) => void;
|
|
622
|
+
children: ReactNode;
|
|
623
|
+
footer?: ReactNode;
|
|
624
|
+
className?: string;
|
|
625
|
+
}
|
|
626
|
+
declare function HelpPanelLayout({ isOpen, onClose, onBack, canGoBack, searchQuery, onSearchChange, children, footer, className, }: HelpPanelLayoutProps): react_jsx_runtime.JSX.Element | null;
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* Props for the LegalLayout component
|
|
630
|
+
*/
|
|
631
|
+
interface LegalLayoutProps {
|
|
632
|
+
/** Page title */
|
|
633
|
+
title: string;
|
|
634
|
+
/** Last updated date */
|
|
635
|
+
lastUpdated?: string;
|
|
636
|
+
/** URL to the archive/version history page */
|
|
637
|
+
archiveUrl?: string;
|
|
638
|
+
/** Optional URL for the header back link */
|
|
639
|
+
backHref?: string;
|
|
640
|
+
/** Accessible label for the header back link */
|
|
641
|
+
backLabel?: string;
|
|
642
|
+
/** Table of contents items */
|
|
643
|
+
tableOfContents?: {
|
|
644
|
+
id: string;
|
|
645
|
+
title: string;
|
|
646
|
+
}[];
|
|
647
|
+
/** Main content */
|
|
648
|
+
children: ReactNode;
|
|
649
|
+
/** Additional className for the root container */
|
|
650
|
+
className?: string;
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* A layout component for legal pages with clean typography, table of contents, and print-friendly styling.
|
|
654
|
+
*
|
|
655
|
+
* @example
|
|
656
|
+
* ```tsx
|
|
657
|
+
* <LegalLayout
|
|
658
|
+
* title="Terms of Service"
|
|
659
|
+
* lastUpdated="2024-01-15"
|
|
660
|
+
* tableOfContents={[
|
|
661
|
+
* { id: "acceptance", title: "Acceptance of Terms" },
|
|
662
|
+
* { id: "accounts", title: "Account Responsibilities" }
|
|
663
|
+
* ]}
|
|
664
|
+
* >
|
|
665
|
+
* <LegalSection id="acceptance" title="Acceptance of Terms">
|
|
666
|
+
* Content here...
|
|
667
|
+
* </LegalSection>
|
|
668
|
+
* </LegalLayout>
|
|
669
|
+
* ```
|
|
670
|
+
*/
|
|
671
|
+
declare function LegalLayout({ title, lastUpdated, archiveUrl, backHref, backLabel, tableOfContents, children, className, }: LegalLayoutProps): react_jsx_runtime.JSX.Element;
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* Props for the LegalSection component
|
|
675
|
+
*/
|
|
676
|
+
interface LegalSectionProps {
|
|
677
|
+
/** Section ID for anchor links */
|
|
678
|
+
id: string;
|
|
679
|
+
/** Section title */
|
|
680
|
+
title: string;
|
|
681
|
+
/** Section content */
|
|
682
|
+
children: ReactNode;
|
|
683
|
+
/** Additional className */
|
|
684
|
+
className?: string;
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* A styled section component for legal documents with anchor support.
|
|
688
|
+
*
|
|
689
|
+
* @example
|
|
690
|
+
* ```tsx
|
|
691
|
+
* <LegalSection id="privacy-policy" title="Privacy Policy">
|
|
692
|
+
* <p>Your privacy is important to us...</p>
|
|
693
|
+
* </LegalSection>
|
|
694
|
+
* ```
|
|
695
|
+
*/
|
|
696
|
+
declare function LegalSection({ id, title, children, className, }: LegalSectionProps): react_jsx_runtime.JSX.Element;
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* Props for the MarketingLayout component
|
|
700
|
+
*/
|
|
701
|
+
interface MarketingLayoutProps {
|
|
702
|
+
/** Navigation bar element */
|
|
703
|
+
navbar: ReactNode;
|
|
704
|
+
/** Main page content */
|
|
705
|
+
children: ReactNode;
|
|
706
|
+
/** Footer element */
|
|
707
|
+
footer?: ReactNode;
|
|
708
|
+
/** Additional className for the main content area */
|
|
709
|
+
mainClassName?: string;
|
|
710
|
+
/** Additional className for the root container */
|
|
711
|
+
className?: string;
|
|
712
|
+
}
|
|
713
|
+
/**
|
|
714
|
+
* A layout component for marketing/public pages with navbar, main content, and footer.
|
|
715
|
+
*
|
|
716
|
+
* @example
|
|
717
|
+
* ```tsx
|
|
718
|
+
* <MarketingLayout
|
|
719
|
+
* navbar={<Navbar />}
|
|
720
|
+
* footer={<Footer />}
|
|
721
|
+
* >
|
|
722
|
+
* <HeroSection />
|
|
723
|
+
* <FeaturesSection />
|
|
724
|
+
* </MarketingLayout>
|
|
725
|
+
* ```
|
|
726
|
+
*/
|
|
727
|
+
declare function MarketingLayout({ navbar, children, footer, mainClassName, className, }: MarketingLayoutProps): react_jsx_runtime.JSX.Element;
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* Script to prevent flash of unstyled content (FOUC) when using dark mode.
|
|
731
|
+
* Runs immediately before React hydration.
|
|
732
|
+
*/
|
|
733
|
+
declare const themeScript = "\n (function() {\n try {\n var theme = localStorage.getItem('theme');\n var isDark =\n theme === 'dark' ||\n ((theme === 'system' || !theme) &&\n window.matchMedia('(prefers-color-scheme: dark)').matches);\n document.documentElement.classList.toggle('dark', isDark);\n } catch (e) {}\n })();\n";
|
|
734
|
+
/**
|
|
735
|
+
* Font configuration for RootLayout.
|
|
736
|
+
*
|
|
737
|
+
* Next.js fonts provide two things:
|
|
738
|
+
* - `.variable` - A CSS class that defines a CSS variable (e.g., `--font-geist-sans`)
|
|
739
|
+
* - `.className` - A CSS class that applies the font directly
|
|
740
|
+
*
|
|
741
|
+
* This interface accepts CSS variable class names to define font variables,
|
|
742
|
+
* and CSS variable references to apply specific fonts to elements.
|
|
743
|
+
*/
|
|
744
|
+
interface RootLayoutFont {
|
|
745
|
+
/**
|
|
746
|
+
* Font variable classes to apply to the root element.
|
|
747
|
+
* These classes define CSS variables that can be used throughout the app.
|
|
748
|
+
* Pass Next.js font `.variable` properties here.
|
|
749
|
+
* @example `${GeistSans.variable} ${GeistMono.variable}`
|
|
750
|
+
*/
|
|
751
|
+
variables?: string;
|
|
752
|
+
/**
|
|
753
|
+
* CSS variable for body text font-family.
|
|
754
|
+
* @example "var(--font-geist-sans)"
|
|
755
|
+
* @default Uses Tailwind's font-sans
|
|
756
|
+
*/
|
|
757
|
+
body?: string;
|
|
758
|
+
/**
|
|
759
|
+
* CSS variable for header text (h1-h6) font-family.
|
|
760
|
+
* @example "var(--font-geist-mono)"
|
|
761
|
+
* @default Inherits from body font
|
|
762
|
+
*/
|
|
763
|
+
headers?: string;
|
|
764
|
+
/**
|
|
765
|
+
* CSS variable for monospace elements (code, pre, kbd, samp).
|
|
766
|
+
* @example "var(--font-geist-mono)"
|
|
767
|
+
* @default Uses Tailwind's font-mono
|
|
768
|
+
*/
|
|
769
|
+
mono?: string;
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* Analytics configuration for RootLayout.
|
|
773
|
+
*/
|
|
774
|
+
interface RootLayoutAnalytics {
|
|
775
|
+
/**
|
|
776
|
+
* Microsoft Clarity project ID.
|
|
777
|
+
* Get your project ID from https://clarity.microsoft.com/
|
|
778
|
+
*/
|
|
779
|
+
clarityProjectId?: string;
|
|
780
|
+
/**
|
|
781
|
+
* Google Analytics (GA4) measurement ID.
|
|
782
|
+
* Get your measurement ID from https://analytics.google.com/
|
|
783
|
+
*/
|
|
784
|
+
googleAnalyticsId?: string;
|
|
785
|
+
}
|
|
786
|
+
/**
|
|
787
|
+
* Toast configuration for RootLayout.
|
|
788
|
+
*/
|
|
789
|
+
interface RootLayoutToast {
|
|
790
|
+
/**
|
|
791
|
+
* Show the Toaster component for notifications.
|
|
792
|
+
* @default true
|
|
793
|
+
*/
|
|
794
|
+
enabled?: boolean;
|
|
795
|
+
/**
|
|
796
|
+
* Position of the toaster.
|
|
797
|
+
* @default "bottom-right"
|
|
798
|
+
*/
|
|
799
|
+
position?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top-center" | "bottom-center";
|
|
800
|
+
}
|
|
801
|
+
interface RootLayoutProps {
|
|
802
|
+
/** Main page content */
|
|
803
|
+
children: ReactNode;
|
|
804
|
+
/**
|
|
805
|
+
* Structured font configuration for different text types.
|
|
806
|
+
* @example { body: GeistSans.variable, headers: GeistMono.variable, mono: GeistMono.variable }
|
|
807
|
+
*/
|
|
808
|
+
font?: RootLayoutFont;
|
|
809
|
+
/**
|
|
810
|
+
* Font CSS variable classes to apply to body.
|
|
811
|
+
* @deprecated Use font.body instead for better structure and flexibility
|
|
812
|
+
* @example "font-sans" or "${GeistSans.variable} ${GeistMono.variable}"
|
|
813
|
+
*/
|
|
814
|
+
fontClassName?: string;
|
|
815
|
+
/**
|
|
816
|
+
* Analytics configuration.
|
|
817
|
+
* @example { clarityProjectId: process.env.NEXT_PUBLIC_CLARITY_PROJECT_ID, googleAnalyticsId: process.env.NEXT_PUBLIC_GA_MEASUREMENT_ID }
|
|
818
|
+
*/
|
|
819
|
+
analytics?: RootLayoutAnalytics;
|
|
820
|
+
/**
|
|
821
|
+
* Toast notification configuration.
|
|
822
|
+
* @default { enabled: true, position: "bottom-right" }
|
|
823
|
+
*/
|
|
824
|
+
toast?: RootLayoutToast;
|
|
825
|
+
/**
|
|
826
|
+
* Additional className for the root container.
|
|
827
|
+
*/
|
|
828
|
+
className?: string;
|
|
829
|
+
}
|
|
830
|
+
/**
|
|
831
|
+
* Root layout body component providing consistent styling, theming, and common elements.
|
|
832
|
+
*
|
|
833
|
+
* This component handles:
|
|
834
|
+
* - Base body styles (min-height, background, text, antialiasing)
|
|
835
|
+
* - Font variable classes (body, headers, mono)
|
|
836
|
+
* - Analytics integrations (Clarity, etc.)
|
|
837
|
+
* - Toast notifications
|
|
838
|
+
*
|
|
839
|
+
* Note: This wraps the `<body>` content. The `<html>` tag, `<head>`, and metadata
|
|
840
|
+
* should be handled by your Next.js app's layout.tsx file.
|
|
841
|
+
*
|
|
842
|
+
* @example
|
|
843
|
+
* ```tsx
|
|
844
|
+
* // In your app's layout.tsx - New API
|
|
845
|
+
* import { RootLayout, themeScript } from "@caffeinebounce/ui";
|
|
846
|
+
* import { GeistSans, GeistMono } from "geist/font";
|
|
847
|
+
*
|
|
848
|
+
* export default function Layout({ children }) {
|
|
849
|
+
* return (
|
|
850
|
+
* <html lang="en" suppressHydrationWarning>
|
|
851
|
+
* <head>
|
|
852
|
+
* <script dangerouslySetInnerHTML={{ __html: themeScript }} />
|
|
853
|
+
* </head>
|
|
854
|
+
* <body>
|
|
855
|
+
* <RootLayout
|
|
856
|
+
* font={{
|
|
857
|
+
* variables: `${GeistSans.variable} ${GeistMono.variable}`,
|
|
858
|
+
* headers: "var(--font-geist-sans)",
|
|
859
|
+
* mono: "var(--font-geist-mono)",
|
|
860
|
+
* }}
|
|
861
|
+
* analytics={{
|
|
862
|
+
* clarityProjectId: process.env.NEXT_PUBLIC_CLARITY_PROJECT_ID,
|
|
863
|
+
* googleAnalyticsId: process.env.NEXT_PUBLIC_GA_MEASUREMENT_ID,
|
|
864
|
+
* }}
|
|
865
|
+
* >
|
|
866
|
+
* {children}
|
|
867
|
+
* </RootLayout>
|
|
868
|
+
* </body>
|
|
869
|
+
* </html>
|
|
870
|
+
* );
|
|
871
|
+
* }
|
|
872
|
+
*
|
|
873
|
+
* // Legacy API (still supported, but headers/mono won't be customizable)
|
|
874
|
+
* <RootLayout
|
|
875
|
+
* fontClassName={`${GeistSans.variable} ${GeistMono.variable}`}
|
|
876
|
+
* analytics={{ clarityProjectId: process.env.NEXT_PUBLIC_CLARITY_PROJECT_ID }}
|
|
877
|
+
* >
|
|
878
|
+
* {children}
|
|
879
|
+
* </RootLayout>
|
|
880
|
+
* ```
|
|
881
|
+
*/
|
|
882
|
+
declare function RootLayout({ children, font, fontClassName, analytics, toast, className, }: RootLayoutProps): react_jsx_runtime.JSX.Element;
|
|
883
|
+
|
|
884
|
+
interface PageTab {
|
|
885
|
+
/** Unique value identifier for the tab */
|
|
886
|
+
value: string;
|
|
887
|
+
/** Display label for the tab */
|
|
888
|
+
label: string;
|
|
889
|
+
/** Optional icon component */
|
|
890
|
+
icon?: LucideIcon;
|
|
891
|
+
/** Tab content */
|
|
892
|
+
content: React$1.ReactNode;
|
|
893
|
+
}
|
|
894
|
+
interface UserPageLayoutBackLink {
|
|
895
|
+
/** URL to navigate back to */
|
|
896
|
+
href: string;
|
|
897
|
+
/** Label for the back link */
|
|
898
|
+
label: string;
|
|
899
|
+
}
|
|
900
|
+
interface UserPageLayoutProps {
|
|
901
|
+
/** Page title displayed in header (ignored when backLink is provided) */
|
|
902
|
+
title?: string;
|
|
903
|
+
/** Page description/subtitle displayed below title (ignored when backLink is provided) */
|
|
904
|
+
description?: string;
|
|
905
|
+
/** Actions to display in the header (buttons, etc.) */
|
|
906
|
+
actions?: React$1.ReactNode;
|
|
907
|
+
/** Additional class names for the container */
|
|
908
|
+
className?: string;
|
|
909
|
+
/** Additional class names for the content area */
|
|
910
|
+
contentClassName?: string;
|
|
911
|
+
/** Whether to show a bottom border on the header (not used in BasePageLayout currently, but kept for compatibility if needed) */
|
|
912
|
+
headerBordered?: boolean;
|
|
913
|
+
/** Optional back link - when provided, title and description are not shown */
|
|
914
|
+
backLink?: UserPageLayoutBackLink;
|
|
915
|
+
/** Loading state - shows skeleton if true */
|
|
916
|
+
loading?: boolean;
|
|
917
|
+
/** Custom loading skeleton */
|
|
918
|
+
loadingSkeleton?: React$1.ReactNode;
|
|
919
|
+
/** Optional tabs configuration - when provided, renders tabbed layout */
|
|
920
|
+
tabs?: PageTab[];
|
|
921
|
+
/** Default selected tab value (first tab if not specified) */
|
|
922
|
+
defaultTab?: string;
|
|
923
|
+
/** Callback when tab changes */
|
|
924
|
+
onTabChange?: (value: string) => void;
|
|
925
|
+
/** Main content (optional if tabs are provided) */
|
|
926
|
+
children?: React$1.ReactNode;
|
|
927
|
+
/** Optional footer content */
|
|
928
|
+
footer?: React$1.ReactNode;
|
|
929
|
+
}
|
|
930
|
+
/**
|
|
931
|
+
* UserPageLayout - Standard layout for user app pages.
|
|
932
|
+
* Provides consistent padding, spacing, and optional header with title/description.
|
|
933
|
+
* When backLink is provided, the title/description header is replaced with a back link.
|
|
934
|
+
*/
|
|
935
|
+
declare function UserPageLayout({ title, description, actions, className, contentClassName, loading, loadingSkeleton, children, tabs, defaultTab, onTabChange, footer, backLink, }: UserPageLayoutProps): react_jsx_runtime.JSX.Element;
|
|
936
|
+
|
|
937
|
+
type SaveStatus = "idle" | "saving" | "saved" | "error";
|
|
938
|
+
interface AutoSaveIndicatorProps extends React$1.ComponentProps<"span"> {
|
|
939
|
+
status: SaveStatus;
|
|
940
|
+
}
|
|
941
|
+
/**
|
|
942
|
+
* AutoSaveIndicator - Visual indicator for auto-save status
|
|
943
|
+
*
|
|
944
|
+
* @example
|
|
945
|
+
* <AutoSaveIndicator status="saving" />
|
|
946
|
+
* <AutoSaveIndicator status="saved" />
|
|
947
|
+
* <AutoSaveIndicator status="error" />
|
|
948
|
+
*/
|
|
949
|
+
declare function AutoSaveIndicator({ status, className, ...props }: AutoSaveIndicatorProps): react_jsx_runtime.JSX.Element | null;
|
|
950
|
+
|
|
951
|
+
interface StepperStep {
|
|
952
|
+
id: string;
|
|
953
|
+
label: string;
|
|
954
|
+
description?: string;
|
|
955
|
+
}
|
|
956
|
+
type StepperMobileVariant = "summary" | "steps";
|
|
957
|
+
type StepperSize = "default" | "compact";
|
|
958
|
+
interface StepperProps extends React$1.ComponentProps<"nav"> {
|
|
959
|
+
steps: StepperStep[];
|
|
960
|
+
currentStep: string;
|
|
961
|
+
completedSteps: string[];
|
|
962
|
+
onStepClick?: (stepId: string) => void;
|
|
963
|
+
mobileVariant?: StepperMobileVariant;
|
|
964
|
+
size?: StepperSize;
|
|
965
|
+
}
|
|
966
|
+
declare function Stepper({ steps, currentStep, completedSteps, onStepClick, mobileVariant, size, className, ...props }: StepperProps): react_jsx_runtime.JSX.Element;
|
|
967
|
+
|
|
968
|
+
interface WizardLayoutProps {
|
|
969
|
+
children: ReactNode;
|
|
970
|
+
steps: StepperStep[];
|
|
971
|
+
currentStep: string;
|
|
972
|
+
completedSteps: string[];
|
|
973
|
+
onStepClick?: (stepId: string) => void;
|
|
974
|
+
/** Progress percentage (0-100) */
|
|
975
|
+
progress: number;
|
|
976
|
+
/** Time remaining estimate */
|
|
977
|
+
timeRemaining?: number;
|
|
978
|
+
/** Save status for auto-save indicator */
|
|
979
|
+
saveStatus?: SaveStatus;
|
|
980
|
+
/** Optional deadline info */
|
|
981
|
+
deadline?: {
|
|
982
|
+
label: string;
|
|
983
|
+
daysRemaining: number | null;
|
|
984
|
+
};
|
|
985
|
+
/** Whether the wizard has been submitted/completed */
|
|
986
|
+
isSubmitted?: boolean;
|
|
987
|
+
/** Custom submitted banner title */
|
|
988
|
+
submittedTitle?: string;
|
|
989
|
+
/** Custom submitted banner subtitle */
|
|
990
|
+
submittedSubtitle?: string;
|
|
991
|
+
/** Loading state */
|
|
992
|
+
loading?: boolean;
|
|
993
|
+
/** Custom loading message */
|
|
994
|
+
loadingMessage?: string;
|
|
995
|
+
/** Error state */
|
|
996
|
+
error?: string;
|
|
997
|
+
className?: string;
|
|
998
|
+
}
|
|
999
|
+
declare function WizardLayout({ children, steps, currentStep, completedSteps, onStepClick, progress, timeRemaining, saveStatus, deadline, isSubmitted, submittedTitle, submittedSubtitle, loading, loadingMessage, error, className, }: WizardLayoutProps): react_jsx_runtime.JSX.Element;
|
|
1000
|
+
|
|
1001
|
+
export { type UserPageLayoutProps as $, AdminPageLayout as A, BasePageLayout as B, type MarketingLayoutProps as C, DashboardGrid as D, type NavElement as E, FloatingUserMenu as F, type NavItem as G, type HeaderLink as H, type NavSection as I, type RootLayoutAnalytics as J, type RootLayoutFont as K, LegalLayout as L, MarketingLayout as M, type NavDivider as N, type RootLayoutProps as O, type RootLayoutToast as P, Stepper as Q, RootLayout as R, type SaveStatus as S, type StepperProps as T, type StepperStep as U, UserAvatarMenu as V, type UserAvatarMenuItem as W, type UserAvatarMenuProps as X, type UserAvatarMenuUser as Y, UserPageLayout as Z, type UserPageLayoutBackLink as _, type AdminPageLayoutBackLink as a, WizardLayout as a0, type WizardLayoutProps as a1, isNavDivider as a2, isNavItem as a3, isNavSection as a4, themeScript as a5, type AdminPageLayoutProps as b, AppFooter as c, type AppFooterProps as d, AppHeader as e, type AppHeaderProps as f, AppLayout as g, type AppLayoutProps as h, AppSidebar as i, type AppSidebarProps as j, type AppSidebarUser as k, AutoSaveIndicator as l, type BasePageLayoutProps as m, type DashboardGridProps as n, type FloatingUserMenuProps as o, type FloatingUserMenuUser as p, type HelpBreadcrumb as q, HelpLayout as r, type HelpLayoutProps as s, HelpPageLayout as t, type HelpPageLayoutProps as u, HelpPanelLayout as v, type HelpPanelLayoutProps as w, type LegalLayoutProps as x, LegalSection as y, type LegalSectionProps as z };
|