@fldr/ui 0.3.8 → 0.3.9
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/README.md +66 -448
- package/ai/component-registry.json +25 -13
- package/ai/component-registry.md +2 -2
- package/dist/.build-complete +1 -1
- package/dist/blocks-source/auth-card/auth-card.test.tsx +20 -14
- package/dist/blocks-source/auth-card/auth-card.tsx +73 -55
- package/dist/blocks-source/file-table/file-table.tsx +197 -150
- package/dist/blocks-source/share-dialog/share-dialog.test.tsx +9 -3
- package/dist/blocks-source/share-dialog/share-dialog.tsx +50 -35
- package/dist/blocks.d.ts +21 -4
- package/dist/blocks.js +246 -195
- package/dist/{button-DzavLWXm.d.ts → button-CS82eT0x.d.ts} +1 -1
- package/dist/chunks/{checkbox-eifiwbw34xwsikvf.js → checkbox-d5epe4dl78bzy4f8.js} +8 -8
- package/dist/chunks/highlighter-kb7huz24pcziin6d.js +57 -0
- package/dist/chunks/{layer-dialog-m8qb0wzfg3k7406a.js → layer-dialog-mnaw06pxom8q771w.js} +3 -2
- package/dist/chunks/{table-ngl1b5yc8mcur662.js → table-bdye068ekayq3u1n.js} +1 -1
- package/dist/chunks/table-f8vl74hdx3bzqqbf.js +448 -0
- package/dist/code/server.js +1 -1
- package/dist/code.js +4 -131
- package/dist/components/banner.d.ts +1 -1
- package/dist/components/button.d.ts +2 -2
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/input-group.d.ts +2 -1
- package/dist/components/input.d.ts +2 -2
- package/dist/components/layer-dialog.js +1 -1
- package/dist/components/link.d.ts +2 -67
- package/dist/components/sidebar.d.ts +2 -1
- package/dist/components/table.d.ts +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/toast.d.ts +1 -1
- package/dist/components/toolbar.d.ts +1 -1
- package/dist/form.d.ts +207 -0
- package/dist/form.js +317 -0
- package/dist/hotkeys.d.ts +135 -0
- package/dist/hotkeys.js +206 -0
- package/dist/index-9LwQy84o.d.ts +1 -0
- package/dist/index-B7iG0qDU.d.ts +1 -0
- package/dist/{index-B6JNUfG9.d.ts → index-BMXHK-3k.d.ts} +2 -2
- package/dist/{index-B6Wo_iiN.d.ts → index-B_ug9XY7.d.ts} +1 -1
- package/dist/{index-RP_rt8vB.d.ts → index-Bh9kuAvN.d.ts} +1 -1
- package/dist/{index-DjSGDESy.d.ts → index-CAUjUp2G.d.ts} +1 -1
- package/dist/{index-NnHba-T1.d.ts → index-DK28YxxP.d.ts} +2 -2
- package/dist/{index-aahL-0Zw.d.ts → index-DOVlARA6.d.ts} +2 -2
- package/dist/index-DTj6M6kA.d.ts +1 -0
- package/dist/index.d.ts +14 -12
- package/dist/index.js +3 -4
- package/dist/{input-group-8gEtPiKw.d.ts → input-group-Swzit45o.d.ts} +1 -1
- package/dist/link-CoVXE5W2.d.ts +68 -0
- package/dist/query.d.ts +156 -0
- package/dist/query.js +204 -0
- package/dist/router.d.ts +95 -0
- package/dist/router.js +146 -0
- package/dist/skeleton.d.ts +3 -0
- package/dist/skeleton.js +4 -0
- package/dist/styles/kumo-binding.css +10 -0
- package/dist/styles/kumo-standalone.css +1 -1
- package/dist/styles/theme-fldr.css +18 -18
- package/dist/table.d.ts +245 -0
- package/dist/table.js +3 -0
- package/dist/theming.d.ts +4 -4
- package/dist/theming.js +2 -2
- package/package.json +41 -1
- package/dist/chunks/highlighter-mouttug0tu8xg1i8.js +0 -1364
- package/dist/index-DL1-uSuH.d.ts +0 -1
- /package/dist/{index-BkTAB4wj.d.ts → sidebar-BkTAB4wj.d.ts} +0 -0
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
--color-kumo-base: light-dark(#ffffff, #1c1c1b);
|
|
21
21
|
--color-kumo-tint: light-dark(#f6f5f2, #2b2a28);
|
|
22
22
|
--color-kumo-control: light-dark(#ffffff, #191918);
|
|
23
|
-
--color-kumo-line: light-dark(rgb(25 25 24 / 0.
|
|
23
|
+
--color-kumo-line: light-dark(rgb(25 25 24 / 0.1), #353432);
|
|
24
24
|
--color-kumo-hairline: light-dark(#ecebe7, #2b2a28);
|
|
25
25
|
--color-kumo-focus: light-dark(
|
|
26
26
|
oklch(0.5772 0.2324 260),
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
--color-kumo-base: #ffffff;
|
|
44
44
|
--color-kumo-tint: #f6f5f2;
|
|
45
45
|
--color-kumo-control: #ffffff;
|
|
46
|
-
--color-kumo-line: rgb(25 25 24 / 0.
|
|
46
|
+
--color-kumo-line: rgb(25 25 24 / 0.1);
|
|
47
47
|
--color-kumo-hairline: #ecebe7;
|
|
48
48
|
--color-kumo-focus: oklch(0.5772 0.2324 260);
|
|
49
49
|
}
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
--color-kumo-base: #1c1c1b;
|
|
64
64
|
--color-kumo-tint: #2b2a28;
|
|
65
65
|
--color-kumo-control: #191918;
|
|
66
|
-
--color-kumo-line: #
|
|
66
|
+
--color-kumo-line: #353432;
|
|
67
67
|
--color-kumo-hairline: #2b2a28;
|
|
68
68
|
--color-kumo-focus: oklch(70.7% 0.165 254.624);
|
|
69
69
|
}
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
oklch(49.1% 0.27 292.581),
|
|
100
100
|
oklch(60.6% 0.25 292.717)
|
|
101
101
|
);
|
|
102
|
-
--color-kumo-line: light-dark(rgb(25 25 24 / 0.
|
|
102
|
+
--color-kumo-line: light-dark(rgb(25 25 24 / 0.1), #353432);
|
|
103
103
|
--color-kumo-hairline: light-dark(#ecebe7, #2b2a28);
|
|
104
104
|
--color-kumo-focus: light-dark(
|
|
105
105
|
oklch(54.1% 0.281 293.009),
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
--color-kumo-control: #ffffff;
|
|
125
125
|
--color-kumo-brand: oklch(54.1% 0.281 293.009);
|
|
126
126
|
--color-kumo-brand-hover: oklch(49.1% 0.27 292.581);
|
|
127
|
-
--color-kumo-line: rgb(25 25 24 / 0.
|
|
127
|
+
--color-kumo-line: rgb(25 25 24 / 0.1);
|
|
128
128
|
--color-kumo-hairline: #ecebe7;
|
|
129
129
|
--color-kumo-focus: oklch(54.1% 0.281 293.009);
|
|
130
130
|
}
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
--color-kumo-control: #191918;
|
|
147
147
|
--color-kumo-brand: oklch(54.1% 0.281 293.009);
|
|
148
148
|
--color-kumo-brand-hover: oklch(60.6% 0.25 292.717);
|
|
149
|
-
--color-kumo-line: #
|
|
149
|
+
--color-kumo-line: #353432;
|
|
150
150
|
--color-kumo-hairline: #2b2a28;
|
|
151
151
|
--color-kumo-focus: oklch(54.1% 0.281 293.009);
|
|
152
152
|
}
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
oklch(43.2% 0.095 166.913),
|
|
183
183
|
oklch(59.6% 0.145 163.225)
|
|
184
184
|
);
|
|
185
|
-
--color-kumo-line: light-dark(rgb(25 25 24 / 0.
|
|
185
|
+
--color-kumo-line: light-dark(rgb(25 25 24 / 0.1), #353432);
|
|
186
186
|
--color-kumo-hairline: light-dark(#ecebe7, #2b2a28);
|
|
187
187
|
--color-kumo-focus: light-dark(
|
|
188
188
|
oklch(50.8% 0.118 165.612),
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
--color-kumo-control: #ffffff;
|
|
208
208
|
--color-kumo-brand: oklch(50.8% 0.118 165.612);
|
|
209
209
|
--color-kumo-brand-hover: oklch(43.2% 0.095 166.913);
|
|
210
|
-
--color-kumo-line: rgb(25 25 24 / 0.
|
|
210
|
+
--color-kumo-line: rgb(25 25 24 / 0.1);
|
|
211
211
|
--color-kumo-hairline: #ecebe7;
|
|
212
212
|
--color-kumo-focus: oklch(50.8% 0.118 165.612);
|
|
213
213
|
}
|
|
@@ -229,7 +229,7 @@
|
|
|
229
229
|
--color-kumo-control: #191918;
|
|
230
230
|
--color-kumo-brand: oklch(50.8% 0.118 165.612);
|
|
231
231
|
--color-kumo-brand-hover: oklch(59.6% 0.145 163.225);
|
|
232
|
-
--color-kumo-line: #
|
|
232
|
+
--color-kumo-line: #353432;
|
|
233
233
|
--color-kumo-hairline: #2b2a28;
|
|
234
234
|
--color-kumo-focus: oklch(50.8% 0.118 165.612);
|
|
235
235
|
}
|
|
@@ -265,7 +265,7 @@
|
|
|
265
265
|
oklch(47% 0.157 37.304),
|
|
266
266
|
oklch(64.6% 0.222 41.116)
|
|
267
267
|
);
|
|
268
|
-
--color-kumo-line: light-dark(rgb(25 25 24 / 0.
|
|
268
|
+
--color-kumo-line: light-dark(rgb(25 25 24 / 0.1), #353432);
|
|
269
269
|
--color-kumo-hairline: light-dark(#ecebe7, #2b2a28);
|
|
270
270
|
--color-kumo-focus: light-dark(
|
|
271
271
|
oklch(55.3% 0.195 38.402),
|
|
@@ -290,7 +290,7 @@
|
|
|
290
290
|
--color-kumo-control: #ffffff;
|
|
291
291
|
--color-kumo-brand: oklch(55.3% 0.195 38.402);
|
|
292
292
|
--color-kumo-brand-hover: oklch(47% 0.157 37.304);
|
|
293
|
-
--color-kumo-line: rgb(25 25 24 / 0.
|
|
293
|
+
--color-kumo-line: rgb(25 25 24 / 0.1);
|
|
294
294
|
--color-kumo-hairline: #ecebe7;
|
|
295
295
|
--color-kumo-focus: oklch(55.3% 0.195 38.402);
|
|
296
296
|
}
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
--color-kumo-control: #191918;
|
|
313
313
|
--color-kumo-brand: oklch(55.3% 0.195 38.402);
|
|
314
314
|
--color-kumo-brand-hover: oklch(64.6% 0.222 41.116);
|
|
315
|
-
--color-kumo-line: #
|
|
315
|
+
--color-kumo-line: #353432;
|
|
316
316
|
--color-kumo-hairline: #2b2a28;
|
|
317
317
|
--color-kumo-focus: oklch(55.3% 0.195 38.402);
|
|
318
318
|
}
|
|
@@ -348,7 +348,7 @@
|
|
|
348
348
|
oklch(51.4% 0.222 16.935),
|
|
349
349
|
oklch(64.5% 0.246 16.439)
|
|
350
350
|
);
|
|
351
|
-
--color-kumo-line: light-dark(rgb(25 25 24 / 0.
|
|
351
|
+
--color-kumo-line: light-dark(rgb(25 25 24 / 0.1), #353432);
|
|
352
352
|
--color-kumo-hairline: light-dark(#ecebe7, #2b2a28);
|
|
353
353
|
--color-kumo-focus: light-dark(
|
|
354
354
|
oklch(58.6% 0.253 17.585),
|
|
@@ -373,7 +373,7 @@
|
|
|
373
373
|
--color-kumo-control: #ffffff;
|
|
374
374
|
--color-kumo-brand: oklch(58.6% 0.253 17.585);
|
|
375
375
|
--color-kumo-brand-hover: oklch(51.4% 0.222 16.935);
|
|
376
|
-
--color-kumo-line: rgb(25 25 24 / 0.
|
|
376
|
+
--color-kumo-line: rgb(25 25 24 / 0.1);
|
|
377
377
|
--color-kumo-hairline: #ecebe7;
|
|
378
378
|
--color-kumo-focus: oklch(58.6% 0.253 17.585);
|
|
379
379
|
}
|
|
@@ -395,7 +395,7 @@
|
|
|
395
395
|
--color-kumo-control: #191918;
|
|
396
396
|
--color-kumo-brand: oklch(58.6% 0.253 17.585);
|
|
397
397
|
--color-kumo-brand-hover: oklch(64.5% 0.246 16.439);
|
|
398
|
-
--color-kumo-line: #
|
|
398
|
+
--color-kumo-line: #353432;
|
|
399
399
|
--color-kumo-hairline: #2b2a28;
|
|
400
400
|
--color-kumo-focus: oklch(58.6% 0.253 17.585);
|
|
401
401
|
}
|
|
@@ -419,7 +419,7 @@
|
|
|
419
419
|
--color-kumo-control: light-dark(#ffffff, #191918);
|
|
420
420
|
--color-kumo-brand: light-dark(#191918, #41403d);
|
|
421
421
|
--color-kumo-brand-hover: light-dark(#2b2a28, #5a5955);
|
|
422
|
-
--color-kumo-line: light-dark(rgb(25 25 24 / 0.
|
|
422
|
+
--color-kumo-line: light-dark(rgb(25 25 24 / 0.1), #353432);
|
|
423
423
|
--color-kumo-hairline: light-dark(#ecebe7, #2b2a28);
|
|
424
424
|
--color-kumo-focus: light-dark(#191918, #41403d);
|
|
425
425
|
}
|
|
@@ -441,7 +441,7 @@
|
|
|
441
441
|
--color-kumo-control: #ffffff;
|
|
442
442
|
--color-kumo-brand: #191918;
|
|
443
443
|
--color-kumo-brand-hover: #2b2a28;
|
|
444
|
-
--color-kumo-line: rgb(25 25 24 / 0.
|
|
444
|
+
--color-kumo-line: rgb(25 25 24 / 0.1);
|
|
445
445
|
--color-kumo-hairline: #ecebe7;
|
|
446
446
|
--color-kumo-focus: #191918;
|
|
447
447
|
}
|
|
@@ -463,7 +463,7 @@
|
|
|
463
463
|
--color-kumo-control: #191918;
|
|
464
464
|
--color-kumo-brand: #41403d;
|
|
465
465
|
--color-kumo-brand-hover: #5a5955;
|
|
466
|
-
--color-kumo-line: #
|
|
466
|
+
--color-kumo-line: #353432;
|
|
467
467
|
--color-kumo-hairline: #2b2a28;
|
|
468
468
|
--color-kumo-focus: #41403d;
|
|
469
469
|
}
|
package/dist/table.d.ts
ADDED
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { r as KumoInputSize } from "./input-BeWEb-jD.js";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import { CellContext, ColumnDef, ColumnFiltersState, ColumnVisibilityState, HeaderContext, PaginationState, ReactTable, Row, RowData, RowSelectionState, SortingState, TableOptions, TableState, Updater, functionalUpdate } from "@tanstack/react-table";
|
|
4
|
+
//#region src/table/data-table.d.ts
|
|
5
|
+
/** Per-column presentation options, set via `meta` on a column def. */
|
|
6
|
+
interface DataTableColumnMeta {
|
|
7
|
+
/** Classes for both the header and body cells of this column. */
|
|
8
|
+
className?: string;
|
|
9
|
+
headerClassName?: string;
|
|
10
|
+
cellClassName?: string;
|
|
11
|
+
/** Name shown in the column visibility menu when `header` isn't a string. */
|
|
12
|
+
label?: string;
|
|
13
|
+
}
|
|
14
|
+
/** The TanStack features every DataTable registers. */
|
|
15
|
+
export declare const dataTableFeatures: {
|
|
16
|
+
rowSortingFeature: import("@tanstack/react-table").TableFeature;
|
|
17
|
+
sortedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
18
|
+
sortFns: {
|
|
19
|
+
alphanumeric: import("@tanstack/react-table").CreatedSortFn<any, any>;
|
|
20
|
+
basic: import("@tanstack/react-table").CreatedSortFn<any, any>;
|
|
21
|
+
datetime: import("@tanstack/react-table").CreatedSortFn<any, any>;
|
|
22
|
+
text: import("@tanstack/react-table").CreatedSortFn<any, any>;
|
|
23
|
+
};
|
|
24
|
+
rowSelectionFeature: import("@tanstack/react-table").TableFeature;
|
|
25
|
+
columnVisibilityFeature: import("@tanstack/react-table").TableFeature;
|
|
26
|
+
columnFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
27
|
+
globalFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
28
|
+
filteredRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
29
|
+
filterFns: {
|
|
30
|
+
includesString: import("@tanstack/react-table").CreatedFilterFn<any, any>;
|
|
31
|
+
};
|
|
32
|
+
rowPaginationFeature: import("@tanstack/react-table").TableFeature;
|
|
33
|
+
paginatedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
34
|
+
columnMeta: DataTableColumnMeta;
|
|
35
|
+
};
|
|
36
|
+
type DataTableFeatures = typeof dataTableFeatures;
|
|
37
|
+
type DataTableInstance<TData extends RowData> = ReactTable<DataTableFeatures, TData, TableState<DataTableFeatures>>;
|
|
38
|
+
type DataTableColumnDef<TData extends RowData> = ColumnDef<DataTableFeatures, TData, unknown>;
|
|
39
|
+
type DataTableRow<TData extends RowData> = Row<DataTableFeatures, TData>;
|
|
40
|
+
/**
|
|
41
|
+
* Column helper bound to DataTable's features, so apps only pass the row type.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const col = createColumnHelper<Receipt>();
|
|
46
|
+
* const columns = col.columns([
|
|
47
|
+
* selectColumn<Receipt>(),
|
|
48
|
+
* col.accessor("vendor", { header: "Vendor" }),
|
|
49
|
+
* ]);
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export declare function createColumnHelper<TData extends RowData>(): import("@tanstack/react-table").ColumnHelper<{
|
|
53
|
+
rowSortingFeature: import("@tanstack/react-table").TableFeature;
|
|
54
|
+
sortedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
55
|
+
sortFns: {
|
|
56
|
+
alphanumeric: import("@tanstack/react-table").CreatedSortFn<any, any>;
|
|
57
|
+
basic: import("@tanstack/react-table").CreatedSortFn<any, any>;
|
|
58
|
+
datetime: import("@tanstack/react-table").CreatedSortFn<any, any>;
|
|
59
|
+
text: import("@tanstack/react-table").CreatedSortFn<any, any>;
|
|
60
|
+
};
|
|
61
|
+
rowSelectionFeature: import("@tanstack/react-table").TableFeature;
|
|
62
|
+
columnVisibilityFeature: import("@tanstack/react-table").TableFeature;
|
|
63
|
+
columnFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
64
|
+
globalFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
65
|
+
filteredRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
66
|
+
filterFns: {
|
|
67
|
+
includesString: import("@tanstack/react-table").CreatedFilterFn<any, any>;
|
|
68
|
+
};
|
|
69
|
+
rowPaginationFeature: import("@tanstack/react-table").TableFeature;
|
|
70
|
+
paginatedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
71
|
+
columnMeta: DataTableColumnMeta;
|
|
72
|
+
}, TData>;
|
|
73
|
+
type DataTableOptions<TData extends RowData> = Omit<TableOptions<DataTableFeatures, TData>, "features"> & {
|
|
74
|
+
/** Turns on client-side pagination with this page size. Omit to show every row. */
|
|
75
|
+
pageSize?: number;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Creates a table instance with DataTable's features. Use it when you need the
|
|
79
|
+
* instance yourself (toolbar, controlled state, server data); otherwise pass
|
|
80
|
+
* `columns` and `data` straight to `DataTable`.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```tsx
|
|
84
|
+
* const table = useDataTable({ columns, data, getRowId: (r) => r.id, pageSize: 50 });
|
|
85
|
+
* return <DataTable table={table} />;
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
export declare function useDataTable<TData extends RowData>({ pageSize, ...options }: DataTableOptions<TData>): DataTableInstance<TData>;
|
|
89
|
+
interface SelectColumnOptions<TData extends RowData> {
|
|
90
|
+
/** Accessible name for a row's checkbox. @default "Select row" */
|
|
91
|
+
rowLabel?: (row: TData) => string;
|
|
92
|
+
/** Accessible name for the select-all checkbox. @default "Select all rows" */
|
|
93
|
+
allLabel?: string;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Checkbox column for row selection: a select-all box in the header and one
|
|
97
|
+
* per row. Clicks on it never reach `onRowClick`.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```ts
|
|
101
|
+
* const columns = col.columns([selectColumn<Receipt>({ rowLabel: (r) => `Select ${r.vendor}` }), ...]);
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
export declare function selectColumn<TData extends RowData>({ rowLabel, allLabel }?: SelectColumnOptions<TData>): DataTableColumnDef<TData>;
|
|
105
|
+
interface DataTableLabels {
|
|
106
|
+
selected: (count: number) => string;
|
|
107
|
+
clearSelection: string;
|
|
108
|
+
noResults: string;
|
|
109
|
+
loading: string;
|
|
110
|
+
}
|
|
111
|
+
interface DataTableViewProps<TData extends RowData> {
|
|
112
|
+
/** Rendered above the table; receives the instance (e.g. `DataTableToolbar`). */
|
|
113
|
+
toolbar?: (table: DataTableInstance<TData>) => ReactNode;
|
|
114
|
+
/** Shown in the selection bar while rows are selected. */
|
|
115
|
+
bulkActions?: ReactNode | ((rows: DataTableRow<TData>[], table: DataTableInstance<TData>) => ReactNode);
|
|
116
|
+
onRowClick?: (row: DataTableRow<TData>) => void;
|
|
117
|
+
/** Shows skeleton rows instead of data. */
|
|
118
|
+
loading?: boolean;
|
|
119
|
+
/** @default 5 */
|
|
120
|
+
loadingRows?: number;
|
|
121
|
+
/** Shown in the body when there are no rows. @default labels.noResults */
|
|
122
|
+
empty?: ReactNode;
|
|
123
|
+
/** Keeps the header visible while the body scrolls. Implied by `virtualize`. */
|
|
124
|
+
stickyHeader?: boolean;
|
|
125
|
+
/** Scroll container height; needed for `stickyHeader` and `virtualize`. @default 480 when virtualized */
|
|
126
|
+
height?: number | string;
|
|
127
|
+
/** Renders only the visible rows. Use for long lists instead of pagination. */
|
|
128
|
+
virtualize?: boolean | {
|
|
129
|
+
estimateSize?: number;
|
|
130
|
+
overscan?: number;
|
|
131
|
+
};
|
|
132
|
+
/** Show pagination controls. Defaults to on when the table paginates. */
|
|
133
|
+
pagination?: boolean;
|
|
134
|
+
labels?: Partial<DataTableLabels>;
|
|
135
|
+
className?: string;
|
|
136
|
+
}
|
|
137
|
+
type DataTableProps<TData extends RowData> = DataTableViewProps<TData> & ({
|
|
138
|
+
table: DataTableInstance<TData>;
|
|
139
|
+
columns?: never;
|
|
140
|
+
data?: never;
|
|
141
|
+
} | ({
|
|
142
|
+
table?: never;
|
|
143
|
+
} & DataTableOptions<TData>));
|
|
144
|
+
/**
|
|
145
|
+
* DataTable — a TanStack Table rendered with Kumo table styles: sortable
|
|
146
|
+
* headers, row selection with a bulk-action bar, global filter, pagination or
|
|
147
|
+
* virtualization, loading and empty states.
|
|
148
|
+
*
|
|
149
|
+
* Pass `columns` + `data` (plus any table options), or a `table` from
|
|
150
|
+
* `useDataTable` for full control.
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```tsx
|
|
154
|
+
* <DataTable
|
|
155
|
+
* columns={columns}
|
|
156
|
+
* data={receipts}
|
|
157
|
+
* getRowId={(r) => r.id}
|
|
158
|
+
* toolbar={(table) => <DataTableToolbar table={table} />}
|
|
159
|
+
* bulkActions={(rows) => <Button size="sm">Export {rows.length}</Button>}
|
|
160
|
+
* onRowClick={(row) => open(row.original)}
|
|
161
|
+
* />
|
|
162
|
+
* ```
|
|
163
|
+
*/
|
|
164
|
+
export declare function DataTable<TData extends RowData>(props: DataTableProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
165
|
+
//#endregion
|
|
166
|
+
//#region src/table/toolbar.d.ts
|
|
167
|
+
interface DataTableToolbarLabels {
|
|
168
|
+
search: string;
|
|
169
|
+
columns: string;
|
|
170
|
+
}
|
|
171
|
+
interface DataTableToolbarProps<TData extends RowData> {
|
|
172
|
+
table: DataTableInstance<TData>;
|
|
173
|
+
/** Show the global search field. @default true */
|
|
174
|
+
search?: boolean;
|
|
175
|
+
/** Show the column visibility menu. @default true */
|
|
176
|
+
columnVisibility?: boolean;
|
|
177
|
+
/** Extra actions, rendered at the end. */
|
|
178
|
+
children?: ReactNode;
|
|
179
|
+
labels?: Partial<DataTableToolbarLabels>;
|
|
180
|
+
className?: string;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* DataTableToolbar — global search, column visibility menu and a slot for
|
|
184
|
+
* actions, wired to a DataTable instance.
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* ```tsx
|
|
188
|
+
* <DataTable
|
|
189
|
+
* columns={columns}
|
|
190
|
+
* data={data}
|
|
191
|
+
* toolbar={(table) => (
|
|
192
|
+
* <DataTableToolbar table={table}>
|
|
193
|
+
* <Button size="sm">New folder</Button>
|
|
194
|
+
* </DataTableToolbar>
|
|
195
|
+
* )}
|
|
196
|
+
* />
|
|
197
|
+
* ```
|
|
198
|
+
*/
|
|
199
|
+
export declare function DataTableToolbar<TData extends RowData>({ table, search, columnVisibility, children, labels: labelsProp, className }: DataTableToolbarProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
200
|
+
interface ColumnVisibilityMenuProps<TData extends RowData> {
|
|
201
|
+
table: DataTableInstance<TData>;
|
|
202
|
+
/** @default "Columns" */
|
|
203
|
+
label?: string;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Dropdown of checkbox items that show and hide a table's hideable columns.
|
|
207
|
+
*
|
|
208
|
+
* @example
|
|
209
|
+
* ```tsx
|
|
210
|
+
* <ColumnVisibilityMenu table={table} label="Columns" />
|
|
211
|
+
* ```
|
|
212
|
+
*/
|
|
213
|
+
export declare function ColumnVisibilityMenu<TData extends RowData>({ table, label }: ColumnVisibilityMenuProps<TData>): import("react/jsx-runtime").JSX.Element | null;
|
|
214
|
+
//#endregion
|
|
215
|
+
//#region src/table/search-input.d.ts
|
|
216
|
+
interface SearchInputProps {
|
|
217
|
+
/** Committed value. When it changes from outside, the field follows it. */
|
|
218
|
+
value?: string;
|
|
219
|
+
defaultValue?: string;
|
|
220
|
+
/** Called with the text once typing pauses for `wait` ms, and immediately on clear. */
|
|
221
|
+
onValueChange?: (value: string) => void;
|
|
222
|
+
/** Debounce delay in ms. @default 250 */
|
|
223
|
+
wait?: number;
|
|
224
|
+
placeholder?: string;
|
|
225
|
+
/** Accessible name. Defaults to `placeholder`, then "Search". */
|
|
226
|
+
"aria-label"?: string;
|
|
227
|
+
/** Accessible name of the clear button. @default "Clear search" */
|
|
228
|
+
clearLabel?: string;
|
|
229
|
+
size?: KumoInputSize;
|
|
230
|
+
autoFocus?: boolean;
|
|
231
|
+
className?: string;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* SearchInput — text field with a search icon and clear button that reports
|
|
235
|
+
* its value debounced (via TanStack Pacer). Escape clears it. Works anywhere,
|
|
236
|
+
* not just in tables.
|
|
237
|
+
*
|
|
238
|
+
* @example
|
|
239
|
+
* ```tsx
|
|
240
|
+
* <SearchInput placeholder="Search receipts" onValueChange={setQuery} />
|
|
241
|
+
* ```
|
|
242
|
+
*/
|
|
243
|
+
export declare function SearchInput({ value, defaultValue, onValueChange, wait, placeholder, "aria-label": ariaLabel, clearLabel, size, autoFocus, className }: SearchInputProps): import("react/jsx-runtime").JSX.Element;
|
|
244
|
+
//#endregion
|
|
245
|
+
export { type CellContext, type ColumnFiltersState, type ColumnVisibilityMenuProps, type ColumnVisibilityState, type DataTableColumnDef, type DataTableColumnMeta, type DataTableFeatures, type DataTableInstance, type DataTableLabels, type DataTableOptions, type DataTableProps, type DataTableRow, type DataTableToolbarLabels, type DataTableToolbarProps, type DataTableViewProps, type HeaderContext, type PaginationState, type RowSelectionState, type SearchInputProps, type SelectColumnOptions, type SortingState, type Updater, functionalUpdate };
|
package/dist/table.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { a as DataTable, c as selectColumn, i as SearchInput, l as useDataTable, n as ColumnVisibilityMenu, o as createColumnHelper, r as DataTableToolbar, s as dataTableFeatures, t as functionalUpdate } from "./chunks/table-f8vl74hdx3bzqqbf.js";
|
|
3
|
+
export { ColumnVisibilityMenu, DataTable, DataTableToolbar, SearchInput, createColumnHelper, dataTableFeatures, functionalUpdate, selectColumn, useDataTable };
|
package/dist/theming.d.ts
CHANGED
|
@@ -105,8 +105,8 @@ export declare const fldrTheme: {
|
|
|
105
105
|
readonly dark: "#191918";
|
|
106
106
|
};
|
|
107
107
|
readonly "kumo-line": {
|
|
108
|
-
readonly light: "rgb(25 25 24 / 0.
|
|
109
|
-
readonly dark: "#
|
|
108
|
+
readonly light: "rgb(25 25 24 / 0.1)";
|
|
109
|
+
readonly dark: "#353432";
|
|
110
110
|
};
|
|
111
111
|
readonly "kumo-hairline": {
|
|
112
112
|
readonly light: "#ecebe7";
|
|
@@ -202,8 +202,8 @@ export declare const BUILT_IN_THEMES: (KumoTheme | {
|
|
|
202
202
|
readonly dark: "#191918";
|
|
203
203
|
};
|
|
204
204
|
readonly "kumo-line": {
|
|
205
|
-
readonly light: "rgb(25 25 24 / 0.
|
|
206
|
-
readonly dark: "#
|
|
205
|
+
readonly light: "rgb(25 25 24 / 0.1)";
|
|
206
|
+
readonly dark: "#353432";
|
|
207
207
|
};
|
|
208
208
|
readonly "kumo-hairline": {
|
|
209
209
|
readonly light: "#ecebe7";
|
package/dist/theming.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fldr/ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "fldr's design system: Cloudflare Kumo with a theme authoring API and PandaCSS preset",
|
|
6
6
|
"keywords": [
|
|
@@ -259,6 +259,14 @@
|
|
|
259
259
|
"types": "./dist/components/tooltip.d.ts",
|
|
260
260
|
"import": "./dist/components/tooltip.js"
|
|
261
261
|
},
|
|
262
|
+
"./form": {
|
|
263
|
+
"types": "./dist/form.d.ts",
|
|
264
|
+
"import": "./dist/form.js"
|
|
265
|
+
},
|
|
266
|
+
"./hotkeys": {
|
|
267
|
+
"types": "./dist/hotkeys.d.ts",
|
|
268
|
+
"import": "./dist/hotkeys.js"
|
|
269
|
+
},
|
|
262
270
|
"./panda": {
|
|
263
271
|
"types": "./dist/panda.d.ts",
|
|
264
272
|
"import": "./dist/panda.js"
|
|
@@ -427,10 +435,18 @@
|
|
|
427
435
|
"types": "./dist/primitives/tooltip.d.ts",
|
|
428
436
|
"import": "./dist/primitives/tooltip.js"
|
|
429
437
|
},
|
|
438
|
+
"./query": {
|
|
439
|
+
"types": "./dist/query.d.ts",
|
|
440
|
+
"import": "./dist/query.js"
|
|
441
|
+
},
|
|
430
442
|
"./registry": {
|
|
431
443
|
"types": "./dist/registry.d.ts",
|
|
432
444
|
"import": "./dist/registry.js"
|
|
433
445
|
},
|
|
446
|
+
"./router": {
|
|
447
|
+
"types": "./dist/router.d.ts",
|
|
448
|
+
"import": "./dist/router.js"
|
|
449
|
+
},
|
|
434
450
|
"./scripts/theme-generator/config": {
|
|
435
451
|
"types": "./dist/scripts/theme-generator/config.d.ts",
|
|
436
452
|
"import": "./dist/scripts/theme-generator/config.js"
|
|
@@ -439,6 +455,14 @@
|
|
|
439
455
|
"types": "./dist/scripts/theme-generator/types.d.ts",
|
|
440
456
|
"import": "./dist/scripts/theme-generator/types.js"
|
|
441
457
|
},
|
|
458
|
+
"./skeleton": {
|
|
459
|
+
"types": "./dist/skeleton.d.ts",
|
|
460
|
+
"import": "./dist/skeleton.js"
|
|
461
|
+
},
|
|
462
|
+
"./table": {
|
|
463
|
+
"types": "./dist/table.d.ts",
|
|
464
|
+
"import": "./dist/table.js"
|
|
465
|
+
},
|
|
442
466
|
"./theming": {
|
|
443
467
|
"types": "./dist/theming.d.ts",
|
|
444
468
|
"import": "./dist/theming.js"
|
|
@@ -465,10 +489,16 @@
|
|
|
465
489
|
"dependencies": {
|
|
466
490
|
"@base-ui/react": "^1.9.0",
|
|
467
491
|
"@tanstack/highlight": "1.2.12",
|
|
492
|
+
"@tanstack/react-form": "^1.33.5",
|
|
493
|
+
"@tanstack/react-hotkeys": "^0.27.1",
|
|
494
|
+
"@tanstack/react-pacer": "^0.24.1",
|
|
495
|
+
"@tanstack/react-table": "^9.3.1",
|
|
496
|
+
"@tanstack/react-virtual": "^3.14.26",
|
|
468
497
|
"cn": "0.4.0",
|
|
469
498
|
"d3-geo": "^3.1.1",
|
|
470
499
|
"motion": "^12.34.1",
|
|
471
500
|
"react-day-picker": "^9.13.2",
|
|
501
|
+
"skullet": "^0.0.3",
|
|
472
502
|
"use-sync-external-store": "^1.6.0"
|
|
473
503
|
},
|
|
474
504
|
"devDependencies": {
|
|
@@ -476,6 +506,8 @@
|
|
|
476
506
|
"@oxlint/plugins": "=1.73.0",
|
|
477
507
|
"@tailwindcss/cli": "^4.1.17",
|
|
478
508
|
"@tailwindcss/vite": "^4.1.17",
|
|
509
|
+
"@tanstack/react-query": "^5.108.2",
|
|
510
|
+
"@tanstack/react-router": "^1.170.46",
|
|
479
511
|
"@testing-library/react": "16.3.1",
|
|
480
512
|
"@testing-library/user-event": "14.6.1",
|
|
481
513
|
"@types/d3-geo": "^3.1.0",
|
|
@@ -507,6 +539,8 @@
|
|
|
507
539
|
},
|
|
508
540
|
"peerDependencies": {
|
|
509
541
|
"@phosphor-icons/react": "^2.1.10",
|
|
542
|
+
"@tanstack/react-query": "^5.0.0",
|
|
543
|
+
"@tanstack/react-router": "^1.0.0",
|
|
510
544
|
"echarts": "^6.0.0",
|
|
511
545
|
"react": "^18.0.0 || ^19.0.0",
|
|
512
546
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
@@ -518,6 +552,12 @@
|
|
|
518
552
|
},
|
|
519
553
|
"echarts": {
|
|
520
554
|
"optional": true
|
|
555
|
+
},
|
|
556
|
+
"@tanstack/react-query": {
|
|
557
|
+
"optional": true
|
|
558
|
+
},
|
|
559
|
+
"@tanstack/react-router": {
|
|
560
|
+
"optional": true
|
|
521
561
|
}
|
|
522
562
|
},
|
|
523
563
|
"scripts": {
|