@fldr/ui 0.3.6 → 0.3.7

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 (38) hide show
  1. package/ai/component-registry.json +962 -43
  2. package/ai/component-registry.md +1 -1
  3. package/dist/.build-complete +1 -1
  4. package/dist/ai/schemas.d.ts +18 -18
  5. package/dist/blocks-source/activity-feed/activity-feed.test.tsx +75 -0
  6. package/dist/blocks-source/activity-feed/activity-feed.tsx +256 -0
  7. package/dist/blocks-source/app-shell/app-shell.test.tsx +74 -0
  8. package/dist/blocks-source/app-shell/app-shell.tsx +123 -0
  9. package/dist/blocks-source/auth-card/auth-card.test.tsx +64 -0
  10. package/dist/blocks-source/auth-card/auth-card.tsx +234 -0
  11. package/dist/blocks-source/dashboard-page/dashboard-page.tsx +167 -0
  12. package/dist/blocks-source/error-page/error-page.test.tsx +60 -0
  13. package/dist/blocks-source/error-page/error-page.tsx +97 -0
  14. package/dist/blocks-source/file-table/file-item.tsx +164 -0
  15. package/dist/blocks-source/file-table/file-table.test.tsx +82 -0
  16. package/dist/blocks-source/file-table/file-table.tsx +292 -0
  17. package/dist/blocks-source/folder-grid/folder-grid.test.tsx +54 -0
  18. package/dist/blocks-source/folder-grid/folder-grid.tsx +170 -0
  19. package/dist/blocks-source/login-page/login-page.tsx +47 -0
  20. package/dist/blocks-source/onboarding-checklist/onboarding-checklist.test.tsx +50 -0
  21. package/dist/blocks-source/onboarding-checklist/onboarding-checklist.tsx +180 -0
  22. package/dist/blocks-source/settings-section/settings-section.test.tsx +43 -0
  23. package/dist/blocks-source/settings-section/settings-section.tsx +165 -0
  24. package/dist/blocks-source/share-dialog/share-dialog.test.tsx +69 -0
  25. package/dist/blocks-source/share-dialog/share-dialog.tsx +307 -0
  26. package/dist/blocks-source/stat-grid/stat-grid.test.tsx +52 -0
  27. package/dist/blocks-source/stat-grid/stat-grid.tsx +153 -0
  28. package/dist/blocks-source/upload-dropzone/upload-dropzone.test.tsx +82 -0
  29. package/dist/blocks-source/upload-dropzone/upload-dropzone.tsx +264 -0
  30. package/dist/blocks.d.ts +780 -0
  31. package/dist/blocks.js +1664 -0
  32. package/dist/chunks/delete-resource-cmlptb61ih8s84r3.js +151 -0
  33. package/dist/delete-resource-DY-GFy2s.d.ts +48 -0
  34. package/dist/index.d.ts +4 -50
  35. package/dist/index.js +1 -146
  36. package/dist/primitives.d.ts +1 -1
  37. package/dist/styles/kumo-standalone.css +1 -1
  38. package/package.json +5 -1
@@ -0,0 +1,780 @@
1
+ import { a as SidebarCollapsible } from "./index-BkTAB4wj.js";
2
+ import { a as KumoDeleteResourceSize, i as KUMO_DELETE_RESOURCE_VARIANTS, n as DeleteResourceProps, o as KumoDeleteResourceVariantsProps, r as KUMO_DELETE_RESOURCE_DEFAULT_VARIANTS, t as DeleteResource } from "./delete-resource-DY-GFy2s.js";
3
+ import { n as TabsItem } from "./index-gYC6cQVO.js";
4
+ import { ReactElement, ReactNode } from "react";
5
+ import { Icon } from "@phosphor-icons/react";
6
+ //#region src/blocks/activity-feed/activity-feed.d.ts
7
+ export type ActivityKind = "upload" | "share" | "comment" | "delete" | "rename" | "move";
8
+ export interface ActivityTarget {
9
+ label: string;
10
+ href?: string;
11
+ onClick?: () => void;
12
+ }
13
+ export interface ActivityEvent {
14
+ id: string;
15
+ actor: {
16
+ name: string;
17
+ avatarUrl?: string;
18
+ };
19
+ /** Verb phrase, e.g. "uploaded" or "shared". */
20
+ action: string;
21
+ target?: ActivityTarget;
22
+ timestamp: Date | string | number;
23
+ kind?: ActivityKind;
24
+ }
25
+ export interface ActivityFeedLabels {
26
+ today: string;
27
+ yesterday: string;
28
+ loadMore: string;
29
+ }
30
+ export interface ActivityFeedProps {
31
+ events: ActivityEvent[];
32
+ /** Group rows under "Today", "Yesterday" and date headings. */
33
+ groupByDay?: boolean;
34
+ /** Shows a "Load more" button when provided. */
35
+ onLoadMore?: () => void;
36
+ loadingMore?: boolean;
37
+ /** Replaces the default "Load more" button. */
38
+ footer?: ReactNode;
39
+ /** Reference time for relative formatting. Defaults to the current time. */
40
+ now?: Date;
41
+ locale?: string;
42
+ labels?: Partial<ActivityFeedLabels>;
43
+ className?: string;
44
+ }
45
+ /** Formats `date` relative to `now`, e.g. "5 minutes ago". */
46
+ export declare function formatActivityTime(date: Date, now: Date, locale?: string): string;
47
+ /**
48
+ * Compact vertical timeline of file and folder activity.
49
+ *
50
+ * @example
51
+ * ```tsx
52
+ * <ActivityFeed
53
+ * groupByDay
54
+ * events={[{ id: "1", actor: { name: "Ada Lovelace" }, action: "uploaded",
55
+ * target: { label: "receipt-0412.pdf", href: "/f/1" }, kind: "upload",
56
+ * timestamp: new Date() }]}
57
+ * onLoadMore={fetchOlder}
58
+ * />
59
+ * ```
60
+ */
61
+ export declare function ActivityFeed({ events, groupByDay, onLoadMore, loadingMore, footer, now, locale, labels, className }: ActivityFeedProps): import("react/jsx-runtime").JSX.Element;
62
+ //#endregion
63
+ //#region src/blocks/app-shell/app-shell.d.ts
64
+ export interface AppShellProps {
65
+ /** Brand or logo, rendered in the sidebar header. */
66
+ brand?: ReactNode;
67
+ /** Sidebar navigation, typically `Sidebar.Group` / `Sidebar.Menu` elements. */
68
+ nav?: ReactNode;
69
+ /** Sidebar footer content, e.g. the signed-in account. */
70
+ sidebarFooter?: ReactNode;
71
+ /** Left side of the top bar, e.g. breadcrumbs or a page title. */
72
+ header?: ReactNode;
73
+ /** Right side of the top bar, e.g. search, upload or account actions. */
74
+ actions?: ReactNode;
75
+ /** Main page content. Scrolls independently of the sidebar and top bar. */
76
+ children?: ReactNode;
77
+ /** Initial desktop sidebar state when uncontrolled. @default true */
78
+ defaultOpen?: boolean;
79
+ /** Controlled desktop sidebar state. */
80
+ open?: boolean;
81
+ /** Called when the sidebar is opened or collapsed. */
82
+ onOpenChange?: (open: boolean) => void;
83
+ /** How the desktop sidebar collapses. @default "icon" */
84
+ collapsible?: SidebarCollapsible;
85
+ /** Viewport width (px) below which the sidebar becomes a drawer. @default 768 */
86
+ mobileBreakpoint?: number;
87
+ /** Keep the shell inside its parent instead of filling the viewport. @default false */
88
+ contained?: boolean;
89
+ /** Accessible label for the sidebar toggle button. */
90
+ toggleLabel?: string;
91
+ /** Classes for the outer shell. */
92
+ className?: string;
93
+ /** Classes for the scrollable content area. */
94
+ contentClassName?: string;
95
+ }
96
+ /**
97
+ * Application frame: sidebar navigation, top bar and a scrollable content area.
98
+ * The sidebar collapses to icons on desktop and becomes a drawer on narrow screens.
99
+ *
100
+ * @example
101
+ * ```tsx
102
+ * <AppShell
103
+ * brand={<span className="font-semibold">fldr</span>}
104
+ * nav={
105
+ * <Sidebar.Group>
106
+ * <Sidebar.Menu>
107
+ * <Sidebar.MenuButton icon={FolderIcon} active>All files</Sidebar.MenuButton>
108
+ * <Sidebar.MenuButton icon={ReceiptIcon}>Receipts</Sidebar.MenuButton>
109
+ * </Sidebar.Menu>
110
+ * </Sidebar.Group>
111
+ * }
112
+ * sidebarFooter={<span>ada@fldr.app</span>}
113
+ * header="All files"
114
+ * actions={<Button variant="primary">Upload</Button>}
115
+ * >
116
+ * <FileList />
117
+ * </AppShell>
118
+ * ```
119
+ */
120
+ export declare function AppShell({ brand, nav, sidebarFooter, header, actions, children, defaultOpen, open, onOpenChange, collapsible, mobileBreakpoint, contained, toggleLabel, className, contentClassName }: AppShellProps): import("react/jsx-runtime").JSX.Element;
121
+ //#endregion
122
+ //#region src/blocks/auth-card/auth-card.d.ts
123
+ export type AuthCardMode = "sign-in" | "sign-up";
124
+ export type AuthCardMethod = "password" | "magic-link";
125
+ export interface AuthCardProvider {
126
+ id: string;
127
+ label: string;
128
+ icon?: ReactNode;
129
+ }
130
+ export interface AuthCardValues {
131
+ email: string;
132
+ password?: string;
133
+ name?: string;
134
+ }
135
+ export interface AuthCardLabels {
136
+ signInTitle: string;
137
+ signUpTitle: string;
138
+ name: string;
139
+ email: string;
140
+ password: string;
141
+ signInSubmit: string;
142
+ signUpSubmit: string;
143
+ magicLinkSubmit: string;
144
+ divider: string;
145
+ }
146
+ export interface AuthCardProps {
147
+ /** @default "sign-in" */
148
+ mode?: AuthCardMode;
149
+ /** `"magic-link"` hides the password field. @default "password" */
150
+ method?: AuthCardMethod;
151
+ /** Called with form values on native form submission. */
152
+ onSubmit: (values: AuthCardValues) => void;
153
+ /** Provider buttons rendered above the "or" divider. */
154
+ providers?: AuthCardProvider[];
155
+ /** Called when a provider button is clicked. */
156
+ onProvider?: (id: string) => void;
157
+ /** Custom provider slot; replaces `providers` when set. */
158
+ providerSlot?: ReactNode;
159
+ /** Logo rendered above the title. */
160
+ logo?: ReactNode;
161
+ /** Overrides the mode's default title. */
162
+ title?: ReactNode;
163
+ /** Secondary text below the title. */
164
+ description?: ReactNode;
165
+ /** Error message shown in a banner above the form. */
166
+ error?: ReactNode;
167
+ /** Disables inputs and shows a spinner on submit. */
168
+ loading?: boolean;
169
+ /** Footer slot, e.g. "Don't have an account? Sign up". */
170
+ footer?: ReactNode;
171
+ /** Overridable strings for i18n. */
172
+ labels?: Partial<AuthCardLabels>;
173
+ className?: string;
174
+ }
175
+ /**
176
+ * Centered sign-in / sign-up card with optional providers and magic-link mode.
177
+ *
178
+ * @example
179
+ * ```tsx
180
+ * <AuthCard
181
+ * mode="sign-in"
182
+ * providers={[{ id: "google", label: "Continue with Google" }]}
183
+ * onProvider={(id) => startOAuth(id)}
184
+ * onSubmit={({ email, password }) => signIn(email, password)}
185
+ * footer={<>Don't have an account? <a href="/sign-up">Sign up</a></>}
186
+ * />
187
+ * ```
188
+ */
189
+ export declare function AuthCard({ mode, method, onSubmit, providers, onProvider, providerSlot, logo, title, description, error, loading, footer, labels: labelOverrides, className }: AuthCardProps): import("react/jsx-runtime").JSX.Element;
190
+ export declare namespace AuthCard {
191
+ var displayName: string;
192
+ }
193
+ //#endregion
194
+ //#region src/blocks/file-table/file-item.d.ts
195
+ /** Kind of item, used to pick the type icon. */
196
+ type FileKind = "folder" | "pdf" | "image" | "sheet" | "file";
197
+ /** Minimal shape shared by `FileTable` and `FolderGrid`. Extend it with your own fields. */
198
+ interface FileItem {
199
+ id: string;
200
+ name: string;
201
+ kind: FileKind;
202
+ /** Size in bytes. */
203
+ size?: number;
204
+ modifiedAt?: Date | string | number;
205
+ owner?: string;
206
+ /** Number of children, for folders. */
207
+ itemCount?: number;
208
+ /** Image shown instead of the type icon in `FolderGrid`. */
209
+ thumbnailUrl?: string;
210
+ }
211
+ /** One entry in an item's actions menu. */
212
+ interface FileAction<T extends FileItem = FileItem> {
213
+ label: ReactNode;
214
+ icon?: Icon | ReactNode;
215
+ variant?: "default" | "danger";
216
+ onSelect: (item: T) => void;
217
+ }
218
+ /** Actions menu content: an items array, or a render prop returning `DropdownMenu.Item`s. */
219
+ type FileActions<T extends FileItem = FileItem> = FileAction<T>[] | ((item: T) => ReactNode);
220
+ /** Phosphor icon for a file kind. */
221
+ export declare function FileKindIcon({ kind, size, className }: {
222
+ kind: FileKind;
223
+ size?: number;
224
+ className?: string;
225
+ }): import("react/jsx-runtime").JSX.Element;
226
+ export declare function formatFileSize(bytes: number, locale?: string): string;
227
+ export declare function formatFileDate(value: Date | string | number, locale?: string): string;
228
+ //#endregion
229
+ //#region src/blocks/file-table/file-table.d.ts
230
+ export type FileTableSortKey = "name" | "size" | "modifiedAt" | "owner";
231
+ export interface FileTableSort {
232
+ key: FileTableSortKey;
233
+ direction: "asc" | "desc";
234
+ }
235
+ export interface FileTableLabels {
236
+ name: string;
237
+ size: string;
238
+ modified: string;
239
+ owner: string;
240
+ selectAll: string;
241
+ selectRow: (name: string) => string;
242
+ selected: (count: number) => string;
243
+ clearSelection: string;
244
+ actions: (name: string) => string;
245
+ }
246
+ export interface FileTableProps<T extends FileItem = FileItem> {
247
+ items: T[];
248
+ /** Controlled sort. Folders always stay above files. */
249
+ sort?: FileTableSort;
250
+ /** @default { key: "name", direction: "asc" } */
251
+ defaultSort?: FileTableSort;
252
+ onSortChange?: (sort: FileTableSort) => void;
253
+ /** Show row checkboxes and the bulk-action bar. @default true */
254
+ selectable?: boolean;
255
+ selectedIds?: string[];
256
+ defaultSelectedIds?: string[];
257
+ onSelectionChange?: (ids: string[]) => void;
258
+ /** Shown in the bulk-action bar while rows are selected. */
259
+ bulkActions?: ReactNode | ((selectedIds: string[]) => ReactNode);
260
+ /** Per-row actions menu: an items array or a render prop returning `DropdownMenu.Item`s. */
261
+ actions?: FileActions<T>;
262
+ /** Called when a row is clicked or its name activated. */
263
+ onOpen?: (item: T) => void;
264
+ /** Rendered instead of the table when `items` is empty. */
265
+ empty?: ReactNode;
266
+ labels?: Partial<FileTableLabels>;
267
+ /** Locale for size and date formatting. Defaults to the runtime locale. */
268
+ locale?: string;
269
+ className?: string;
270
+ }
271
+ /**
272
+ * FileTable — sortable, selectable list of files and folders.
273
+ *
274
+ * @example
275
+ * ```tsx
276
+ * <FileTable
277
+ * items={[{ id: "1", name: "Receipts", kind: "folder", itemCount: 48 }]}
278
+ * onOpen={(item) => navigate(item.id)}
279
+ * actions={[{ label: "Delete", variant: "danger", onSelect: remove }]}
280
+ * bulkActions={(ids) => <Button size="sm" onClick={() => share(ids)}>Share</Button>}
281
+ * />
282
+ * ```
283
+ */
284
+ export declare function FileTable<T extends FileItem = FileItem>({ items, sort: sortProp, defaultSort, onSortChange, selectable, selectedIds, defaultSelectedIds, onSelectionChange, bulkActions, actions, onOpen, empty, labels: labelsProp, locale, className }: FileTableProps<T>): import("react/jsx-runtime").JSX.Element;
285
+ //#endregion
286
+ //#region src/blocks/onboarding-checklist/onboarding-checklist.d.ts
287
+ export interface OnboardingStep {
288
+ id: string;
289
+ title: string;
290
+ description?: ReactNode;
291
+ done?: boolean;
292
+ /** Label for the step's action button; omit for no button. */
293
+ actionLabel?: string;
294
+ }
295
+ export interface OnboardingChecklistLabels {
296
+ title: string;
297
+ /** Formats the progress text, e.g. "2 of 5 done". */
298
+ progress: (done: number, total: number) => string;
299
+ progressLabel: string;
300
+ dismiss: string;
301
+ done: string;
302
+ }
303
+ export interface OnboardingChecklistProps {
304
+ steps: OnboardingStep[];
305
+ /** Called when a step's action button is clicked. */
306
+ onStepAction?: (id: string) => void;
307
+ /** Shows a dismiss button when provided. */
308
+ onDismiss?: () => void;
309
+ /** Overrides `labels.title`. */
310
+ title?: ReactNode;
311
+ description?: ReactNode;
312
+ /** Overridable strings for i18n. */
313
+ labels?: Partial<OnboardingChecklistLabels>;
314
+ className?: string;
315
+ }
316
+ /**
317
+ * Getting-started card with progress and a list of steps. The first
318
+ * incomplete step is expanded; others show only their title.
319
+ *
320
+ * @example
321
+ * ```tsx
322
+ * <OnboardingChecklist
323
+ * steps={[
324
+ * { id: "folder", title: "Create your first folder", done: true },
325
+ * { id: "forward", title: "Forward an email to inbox@fldr.zip", actionLabel: "Copy address" },
326
+ * ]}
327
+ * onStepAction={(id) => run(id)}
328
+ * onDismiss={() => hide()}
329
+ * />
330
+ * ```
331
+ */
332
+ export declare function OnboardingChecklist({ steps, onStepAction, onDismiss, title, description, labels: labelOverrides, className }: OnboardingChecklistProps): import("react/jsx-runtime").JSX.Element;
333
+ export declare namespace OnboardingChecklist {
334
+ var displayName: string;
335
+ }
336
+ //#endregion
337
+ //#region src/blocks/stat-grid/stat-grid.d.ts
338
+ export type StatTrend = "up" | "down" | "neutral";
339
+ export interface StatDelta {
340
+ /** Display text, e.g. "+12%" or "-3". */
341
+ value: string;
342
+ /** Direction of change. @default "neutral" */
343
+ trend?: StatTrend;
344
+ /**
345
+ * Whether an increase is good. Set to `false` for metrics like
346
+ * "Failed uploads" where going up should read as danger. @default true
347
+ */
348
+ positiveIsGood?: boolean;
349
+ }
350
+ export interface StatProps {
351
+ /** Metric name, e.g. "Files". */
352
+ label: ReactNode;
353
+ /** Formatted metric value, e.g. "1,284". */
354
+ value: ReactNode;
355
+ /** Optional change indicator shown next to the value. */
356
+ delta?: StatDelta;
357
+ /** Optional footnote under the value, e.g. "vs. last 30 days". */
358
+ hint?: ReactNode;
359
+ /** Optional icon shown beside the label. */
360
+ icon?: ReactNode;
361
+ /** Optional usage meter (0–100), e.g. storage used of quota. */
362
+ meter?: {
363
+ value: number;
364
+ label: string;
365
+ };
366
+ className?: string;
367
+ }
368
+ /** A single metric card. Usable on its own or inside `StatGrid`. */
369
+ export declare function Stat({ label, value, delta, hint, icon, meter, className }: StatProps): import("react/jsx-runtime").JSX.Element;
370
+ export interface StatGridProps {
371
+ /** Stats to render. Alternatively pass `Stat` elements as children. */
372
+ items?: StatProps[];
373
+ children?: ReactNode;
374
+ /** Maximum columns on wide screens. @default 4 */
375
+ columns?: 2 | 3 | 4;
376
+ className?: string;
377
+ }
378
+ /**
379
+ * Responsive grid of metric cards with optional delta, footnote, icon and meter.
380
+ *
381
+ * @example
382
+ * ```tsx
383
+ * <StatGrid
384
+ * items={[
385
+ * { label: "Files", value: "1,284", delta: { value: "+36", trend: "up" } },
386
+ * { label: "Storage", value: "12.4 GB", hint: "of 50 GB", meter: { value: 25, label: "Storage used" } },
387
+ * { label: "Shared links", value: "18", icon: <LinkIcon /> },
388
+ * ]}
389
+ * />
390
+ * ```
391
+ */
392
+ export declare function StatGrid({ items, children, columns, className }: StatGridProps): import("react/jsx-runtime").JSX.Element;
393
+ //#endregion
394
+ //#region src/blocks/dashboard-page/dashboard-page.d.ts
395
+ export interface DashboardPageLabels {
396
+ recent: string;
397
+ activity: string;
398
+ viewAll: string;
399
+ }
400
+ export interface DashboardPageProps {
401
+ /** e.g. "Good morning, Ada". */
402
+ title: ReactNode;
403
+ description?: ReactNode;
404
+ /** Header buttons, e.g. Upload and New folder. */
405
+ actions?: ReactNode;
406
+ stats?: StatProps[];
407
+ /** Shown above the activity feed until the user dismisses it. */
408
+ onboarding?: OnboardingChecklistProps;
409
+ recentFiles?: FileItem[];
410
+ onOpenFile?: (item: FileItem) => void;
411
+ /** "View all" link next to Recent files. */
412
+ allFilesHref?: string;
413
+ activity?: Omit<ActivityFeedProps, "className">;
414
+ /** Extra content under Recent files. */
415
+ children?: ReactNode;
416
+ labels?: Partial<DashboardPageLabels>;
417
+ className?: string;
418
+ }
419
+ /**
420
+ * DashboardPage: the first screen after sign-in. A header, stats, recent
421
+ * files, and a side column with onboarding and activity. Render it inside
422
+ * `AppShell`; every section is optional.
423
+ *
424
+ * @example
425
+ * ```tsx
426
+ * <AppShell nav={nav} header="Home">
427
+ * <DashboardPage
428
+ * title="Good morning, Ada"
429
+ * actions={<Button variant="primary">Upload</Button>}
430
+ * stats={[{ label: "Files", value: "1,284" }]}
431
+ * recentFiles={files}
432
+ * activity={{ events }}
433
+ * />
434
+ * </AppShell>
435
+ * ```
436
+ */
437
+ export declare function DashboardPage({ title, description, actions, stats, onboarding, recentFiles, onOpenFile, allFilesHref, activity, children, labels: labelsProp, className }: DashboardPageProps): import("react/jsx-runtime").JSX.Element;
438
+ //#endregion
439
+ //#region src/blocks/error-page/error-page.d.ts
440
+ export interface ErrorPageProps {
441
+ /** HTTP-style status. 403, 404 and 500 come with default copy. @default 404 */
442
+ status?: number;
443
+ title?: string;
444
+ description?: ReactNode;
445
+ /** Where the primary button goes. Pass `null` to hide it. @default "/" */
446
+ homeHref?: string | null;
447
+ /** @default "Go home" */
448
+ homeLabel?: string;
449
+ /** Extra actions after the home button, e.g. "Contact support". */
450
+ actions?: ReactNode;
451
+ /** Shown above the status, e.g. the product mark. */
452
+ logo?: ReactNode;
453
+ /** Small print under the actions, e.g. a request ID. */
454
+ details?: ReactNode;
455
+ /** Fill the viewport. Set false to render inside a layout. @default true */
456
+ fullScreen?: boolean;
457
+ className?: string;
458
+ }
459
+ /**
460
+ * ErrorPage: a quiet 404 / 403 / 500 page with a way back.
461
+ *
462
+ * @example
463
+ * ```tsx
464
+ * <ErrorPage status={404} homeHref="/files" homeLabel="Back to files" />
465
+ * <ErrorPage status={500} details="Request ID 7f3a…" actions={<Button onClick={retry}>Retry</Button>} />
466
+ * ```
467
+ */
468
+ export declare function ErrorPage({ status, title, description, homeHref, homeLabel, actions, logo, details, fullScreen, className }: ErrorPageProps): import("react/jsx-runtime").JSX.Element;
469
+ //#endregion
470
+ //#region src/blocks/folder-grid/folder-grid.d.ts
471
+ export interface FolderGridLabels {
472
+ itemCount: (count: number) => string;
473
+ selectItem: (name: string) => string;
474
+ actions: (name: string) => string;
475
+ }
476
+ export interface FolderGridProps<T extends FileItem = FileItem> {
477
+ items: T[];
478
+ /** Show a checkbox on each card. @default false */
479
+ selectable?: boolean;
480
+ selectedIds?: string[];
481
+ defaultSelectedIds?: string[];
482
+ onSelectionChange?: (ids: string[]) => void;
483
+ /** Called when a card is clicked or its name activated. */
484
+ onOpen?: (item: T) => void;
485
+ /** Per-card actions menu: an items array or a render prop returning `DropdownMenu.Item`s. */
486
+ actions?: FileActions<T>;
487
+ /** Override the meta line. Defaults to "48 files · 12 MB" for folders, "12 MB · Nov 3, 2026" for files. */
488
+ meta?: (item: T) => ReactNode;
489
+ /** Rendered instead of the grid when `items` is empty. */
490
+ empty?: ReactNode;
491
+ labels?: Partial<FolderGridLabels>;
492
+ /** Locale for size and date formatting. Defaults to the runtime locale. */
493
+ locale?: string;
494
+ className?: string;
495
+ }
496
+ /**
497
+ * FolderGrid — responsive grid of folder and file cards.
498
+ *
499
+ * @example
500
+ * ```tsx
501
+ * <FolderGrid
502
+ * items={[{ id: "1", name: "Receipts", kind: "folder", itemCount: 48, size: 12_400_000 }]}
503
+ * onOpen={(folder) => navigate(folder.id)}
504
+ * actions={[{ label: "Share", onSelect: share }]}
505
+ * />
506
+ * ```
507
+ */
508
+ export declare function FolderGrid<T extends FileItem = FileItem>({ items, selectable, selectedIds, defaultSelectedIds, onSelectionChange, onOpen, actions, meta, empty, labels: labelsProp, locale, className }: FolderGridProps<T>): import("react/jsx-runtime").JSX.Element;
509
+ //#endregion
510
+ //#region src/blocks/login-page/login-page.d.ts
511
+ export interface LoginPageProps extends Omit<AuthCardProps, "className" | "logo"> {
512
+ /** Product mark, shown above the card. */
513
+ logo?: ReactNode;
514
+ /** Small print under the card, e.g. terms and privacy links. */
515
+ legal?: ReactNode;
516
+ className?: string;
517
+ }
518
+ /**
519
+ * LoginPage: a full-screen sign-in or sign-up page around `AuthCard`.
520
+ *
521
+ * @example
522
+ * ```tsx
523
+ * <LoginPage
524
+ * logo={<FldrMark />}
525
+ * providers={[{ id: "google", label: "Continue with Google", icon: <GoogleLogoIcon /> }]}
526
+ * onProvider={startOAuth}
527
+ * onSubmit={({ email, password }) => signIn(email, password)}
528
+ * legal={<>By continuing you agree to the <a href="/terms">Terms</a>.</>}
529
+ * />
530
+ * ```
531
+ */
532
+ export declare function LoginPage({ logo, legal, className, ...card }: LoginPageProps): import("react/jsx-runtime").JSX.Element;
533
+ //#endregion
534
+ //#region src/blocks/page-header/page-header.d.ts
535
+ export declare const KUMO_PAGE_HEADER_VARIANTS: {
536
+ readonly spacing: {
537
+ readonly compact: {
538
+ readonly classes: "gap-1";
539
+ readonly description: "Compact spacing between header elements";
540
+ };
541
+ readonly base: {
542
+ readonly classes: "gap-2";
543
+ readonly description: "Default spacing between header elements";
544
+ };
545
+ readonly relaxed: {
546
+ readonly classes: "gap-4";
547
+ readonly description: "Relaxed spacing for more prominent headers";
548
+ };
549
+ };
550
+ };
551
+ export declare const KUMO_PAGE_HEADER_DEFAULT_VARIANTS: {
552
+ readonly spacing: "base";
553
+ };
554
+ type KumoPageHeaderSpacing = keyof typeof KUMO_PAGE_HEADER_VARIANTS.spacing;
555
+ interface KumoPageHeaderVariantsProps {
556
+ spacing?: KumoPageHeaderSpacing;
557
+ }
558
+ export declare function pageHeaderVariants({ spacing }?: KumoPageHeaderVariantsProps): string;
559
+ interface PageHeaderProps extends KumoPageHeaderVariantsProps {
560
+ breadcrumbs: ReactNode;
561
+ title?: string;
562
+ description?: string;
563
+ tabs?: TabsItem[];
564
+ defaultTab?: string;
565
+ onValueChange?: (value: string) => void;
566
+ className?: string;
567
+ children?: React.ReactNode;
568
+ }
569
+ export declare function PageHeader({ breadcrumbs, title, description, tabs, defaultTab, onValueChange, spacing, className, children }: PageHeaderProps): import("react/jsx-runtime").JSX.Element;
570
+ //#endregion
571
+ //#region src/blocks/resource-list/resource-list.d.ts
572
+ interface ResourceListPageProps {
573
+ title?: string;
574
+ description?: string;
575
+ icon?: ReactNode;
576
+ usage?: ReactNode;
577
+ additionalContent?: ReactNode;
578
+ children: ReactNode;
579
+ className?: string;
580
+ }
581
+ /**
582
+ * ResourceListPage - A layout component for resource list pages
583
+ *
584
+ * Layouts are page-level components that provide consistent structure
585
+ * for common page patterns like resource lists, dashboards, and settings.
586
+ */
587
+ export declare function ResourceListPage({ title, description, icon, usage, additionalContent, children, className }: ResourceListPageProps): import("react/jsx-runtime").JSX.Element;
588
+ //#endregion
589
+ //#region src/blocks/settings-section/settings-section.d.ts
590
+ export type SettingsSectionVariant = "default" | "danger";
591
+ export interface SettingsSectionProps {
592
+ title: ReactNode;
593
+ description?: ReactNode;
594
+ /** `danger` tints the heading and border for destructive settings. */
595
+ variant?: SettingsSectionVariant;
596
+ /** `SettingsRow` elements. */
597
+ children: ReactNode;
598
+ className?: string;
599
+ }
600
+ /**
601
+ * A titled group of settings rows.
602
+ *
603
+ * @example
604
+ * ```tsx
605
+ * <SettingsSection title="Folder" description="How this folder behaves.">
606
+ * <SettingsRow label="Auto-file receipts" control={<Switch />} />
607
+ * </SettingsSection>
608
+ * <SettingsSection title="Danger zone" variant="danger">
609
+ * <SettingsRow label="Delete folder" control={<Button variant="destructive">Delete</Button>} />
610
+ * </SettingsSection>
611
+ * ```
612
+ */
613
+ export declare function SettingsSection({ title, description, variant, children, className }: SettingsSectionProps): import("react/jsx-runtime").JSX.Element;
614
+ export interface SettingsRowProps {
615
+ label: ReactNode;
616
+ description?: ReactNode;
617
+ /** Control rendered on the right (below on mobile). */
618
+ control?: ReactNode;
619
+ /** Associates the label with a control's `id`. */
620
+ htmlFor?: string;
621
+ className?: string;
622
+ }
623
+ /** A single setting: label and description on the left, control on the right. */
624
+ export declare function SettingsRow({ label, description, control, htmlFor, className }: SettingsRowProps): import("react/jsx-runtime").JSX.Element;
625
+ export interface SettingsSaveBarLabels {
626
+ message?: string;
627
+ discard?: string;
628
+ save?: string;
629
+ }
630
+ export interface SettingsSaveBarProps {
631
+ /** The bar renders only when `true`. */
632
+ dirty: boolean;
633
+ onSave: () => void;
634
+ onDiscard: () => void;
635
+ saving?: boolean;
636
+ labels?: SettingsSaveBarLabels;
637
+ className?: string;
638
+ }
639
+ /** Sticky bottom bar shown while a settings form has unsaved changes. */
640
+ export declare function SettingsSaveBar({ dirty, onSave, onDiscard, saving, labels, className }: SettingsSaveBarProps): import("react/jsx-runtime").JSX.Element | null;
641
+ //#endregion
642
+ //#region src/blocks/share-dialog/share-dialog.d.ts
643
+ /** Role key, e.g. `"viewer"`. Keys come from the `roles` prop. */
644
+ export type ShareRole = string;
645
+ export interface ShareMember {
646
+ id: string;
647
+ name: string;
648
+ email: string;
649
+ role: ShareRole;
650
+ avatarUrl?: string;
651
+ /** Owners show a fixed label and cannot be removed. */
652
+ owner?: boolean;
653
+ }
654
+ export type ShareLinkScope = "restricted" | "anyone";
655
+ export interface ShareLinkAccess {
656
+ scope: ShareLinkScope;
657
+ role: ShareRole;
658
+ }
659
+ export interface ShareDialogLabels {
660
+ title?: (resourceName: string) => string;
661
+ emailPlaceholder?: string;
662
+ invite?: string;
663
+ people?: string;
664
+ owner?: string;
665
+ remove?: (name: string) => string;
666
+ roleFor?: (name: string) => string;
667
+ generalAccess?: string;
668
+ restricted?: string;
669
+ restrictedHint?: string;
670
+ anyone?: string;
671
+ anyoneHint?: string;
672
+ linkRole?: string;
673
+ copyLink?: string;
674
+ }
675
+ export interface ShareDialogProps {
676
+ /** Name of the shared file or folder, used in the title. */
677
+ resourceName: string;
678
+ members: ShareMember[];
679
+ linkAccess: ShareLinkAccess;
680
+ link: string;
681
+ onInvite: (email: string, role: ShareRole) => void;
682
+ onRoleChange: (id: string, role: ShareRole) => void;
683
+ onRemove: (id: string) => void;
684
+ onLinkAccessChange: (access: ShareLinkAccess) => void;
685
+ /** Role key → label. First key is the default invite role. */
686
+ roles?: Record<ShareRole, string>;
687
+ open?: boolean;
688
+ onOpenChange?: (open: boolean) => void;
689
+ /** Element that opens the dialog, e.g. `<Button>Share</Button>`. */
690
+ trigger?: ReactElement;
691
+ labels?: ShareDialogLabels;
692
+ className?: string;
693
+ }
694
+ /**
695
+ * Share dialog for a file or folder: invite people, manage their roles,
696
+ * set general link access and copy the link.
697
+ *
698
+ * @example
699
+ * ```tsx
700
+ * <ShareDialog
701
+ * resourceName="Q4 receipts"
702
+ * trigger={<Button>Share</Button>}
703
+ * members={members}
704
+ * linkAccess={access}
705
+ * link="https://fldr.app/f/q4-receipts"
706
+ * onInvite={(email, role) => invite(email, role)}
707
+ * onRoleChange={setRole}
708
+ * onRemove={remove}
709
+ * onLinkAccessChange={setAccess}
710
+ * />
711
+ * ```
712
+ */
713
+ export declare function ShareDialog({ resourceName, members, linkAccess, link, onInvite, onRoleChange, onRemove, onLinkAccessChange, roles, open, onOpenChange, trigger, labels, className }: ShareDialogProps): import("react/jsx-runtime").JSX.Element;
714
+ //#endregion
715
+ //#region src/blocks/upload-dropzone/upload-dropzone.d.ts
716
+ export type UploadStatus = "uploading" | "done" | "error";
717
+ export interface UploadItem {
718
+ id: string;
719
+ name: string;
720
+ /** Size in bytes. */
721
+ size: number;
722
+ /** Progress from 0 to 100. */
723
+ progress: number;
724
+ status: UploadStatus;
725
+ /** Error message shown when `status` is `"error"`. */
726
+ error?: string;
727
+ }
728
+ export type UploadRejectReason = "size" | "type";
729
+ export interface UploadRejection {
730
+ file: File;
731
+ reason: UploadRejectReason;
732
+ }
733
+ export interface UploadDropzoneLabels {
734
+ title: string;
735
+ hint: string;
736
+ browse: string;
737
+ done: string;
738
+ failed: string;
739
+ retry: string;
740
+ remove: string;
741
+ }
742
+ export interface UploadDropzoneProps {
743
+ /** Current uploads, owned by the consumer. */
744
+ uploads?: UploadItem[];
745
+ /** Called with accepted files from a drop or the file picker. */
746
+ onFiles: (files: File[]) => void;
747
+ /** Called with files rejected for size or type. */
748
+ onReject?: (rejections: UploadRejection[]) => void;
749
+ onRetry?: (id: string) => void;
750
+ onRemove?: (id: string) => void;
751
+ /** Same format as the input `accept` attribute, e.g. `".pdf,image/*"`. */
752
+ accept?: string;
753
+ /** @default true */
754
+ multiple?: boolean;
755
+ /** Maximum file size in bytes. */
756
+ maxSize?: number;
757
+ disabled?: boolean;
758
+ labels?: Partial<UploadDropzoneLabels>;
759
+ className?: string;
760
+ }
761
+ /**
762
+ * Drag-and-drop upload area with a file list. Performs no network requests:
763
+ * the consumer owns upload state and reacts to the callbacks.
764
+ *
765
+ * @example
766
+ * ```tsx
767
+ * <UploadDropzone
768
+ * accept=".pdf,image/*"
769
+ * maxSize={10 * 1024 * 1024}
770
+ * uploads={uploads}
771
+ * onFiles={startUploads}
772
+ * onReject={(r) => toast(`${r.length} file(s) skipped`)}
773
+ * onRetry={retryUpload}
774
+ * onRemove={removeUpload}
775
+ * />
776
+ * ```
777
+ */
778
+ export declare function UploadDropzone({ uploads, onFiles, onReject, onRetry, onRemove, accept, multiple, maxSize, disabled, labels, className }: UploadDropzoneProps): import("react/jsx-runtime").JSX.Element;
779
+ //#endregion
780
+ export { DeleteResource, type DeleteResourceProps, type FileAction, type FileActions, type FileItem, type FileKind, KUMO_DELETE_RESOURCE_DEFAULT_VARIANTS, KUMO_DELETE_RESOURCE_VARIANTS, type KumoDeleteResourceSize, type KumoDeleteResourceVariantsProps, type KumoPageHeaderSpacing, type KumoPageHeaderVariantsProps, type PageHeaderProps, type ResourceListPageProps };