@datum-cloud/datum-ui 0.3.0-alpha.f23341e → 0.3.2-dev.5bd364b
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/dist/app-navigation/index.mjs +12 -0
- package/dist/app-navigation-CCvjPijd.mjs +416 -0
- package/dist/autocomplete/index.mjs +1 -1
- package/dist/{autocomplete-B9bCkXtz.mjs → autocomplete-DcKO7pj5.mjs} +1 -1
- package/dist/avatar-stack/index.mjs +2 -2
- package/dist/{avatar-stack-Bh-tLz0X.mjs → avatar-stack-B21McFeb.mjs} +1 -1
- package/dist/{calendar-date-picker-mlbzp3xR.mjs → calendar-date-picker-Bw6Mrr-P.mjs} +2 -1
- package/dist/components/base/index.d.ts +1 -0
- package/dist/components/base/index.d.ts.map +1 -1
- package/dist/components/base/sidebar/index.d.ts +2 -0
- package/dist/components/base/sidebar/index.d.ts.map +1 -0
- package/dist/components/{features → base}/sidebar/sidebar.d.ts +1 -1
- package/dist/components/base/sidebar/sidebar.d.ts.map +1 -0
- package/dist/components/base/skeleton/index.d.ts +1 -1
- package/dist/components/base/skeleton/index.d.ts.map +1 -1
- package/dist/components/base/skeleton/skeleton.d.ts +22 -0
- package/dist/components/base/skeleton/skeleton.d.ts.map +1 -0
- package/dist/components/base/typography/typography.d.ts +2 -2
- package/dist/components/features/app-navigation/app-navigation.d.ts +14 -0
- package/dist/components/features/app-navigation/app-navigation.d.ts.map +1 -0
- package/dist/components/features/app-navigation/index.d.ts +4 -0
- package/dist/components/features/app-navigation/index.d.ts.map +1 -0
- package/dist/components/features/{sidebar/nav-main.d.ts → app-navigation/nav-menu.d.ts} +3 -3
- package/dist/components/features/app-navigation/nav-menu.d.ts.map +1 -0
- package/dist/components/features/calendar-date-picker/calendar-date-picker.d.ts +2 -1
- package/dist/components/features/calendar-date-picker/calendar-date-picker.d.ts.map +1 -1
- package/dist/components/features/data-table/components/active-filters.d.ts +1 -1
- package/dist/components/features/data-table/components/active-filters.d.ts.map +1 -1
- package/dist/components/features/data-table/components/content.d.ts.map +1 -1
- package/dist/components/features/data-table/components/loading.d.ts.map +1 -1
- package/dist/components/features/data-table/components/search.d.ts +1 -1
- package/dist/components/features/data-table/components/search.d.ts.map +1 -1
- package/dist/components/features/data-table/core/client-provider.d.ts +2 -3
- package/dist/components/features/data-table/core/client-provider.d.ts.map +1 -1
- package/dist/components/features/data-table/core/data-table-context.d.ts +9 -0
- package/dist/components/features/data-table/core/data-table-context.d.ts.map +1 -1
- package/dist/components/features/data-table/core/filter-engine.d.ts +5 -0
- package/dist/components/features/data-table/core/filter-engine.d.ts.map +1 -1
- package/dist/components/features/data-table/core/server-provider.d.ts +1 -3
- package/dist/components/features/data-table/core/server-provider.d.ts.map +1 -1
- package/dist/components/features/data-table/core/store.d.ts.map +1 -1
- package/dist/components/features/data-table/data-table.d.ts +1 -1
- package/dist/components/features/data-table/filters/checkbox-filter.d.ts +1 -1
- package/dist/components/features/data-table/filters/checkbox-filter.d.ts.map +1 -1
- package/dist/components/features/data-table/filters/date-picker-filter.d.ts +1 -1
- package/dist/components/features/data-table/filters/date-picker-filter.d.ts.map +1 -1
- package/dist/components/features/data-table/filters/select-filter.d.ts +1 -1
- package/dist/components/features/data-table/filters/select-filter.d.ts.map +1 -1
- package/dist/components/features/data-table/hooks/use-data-table-client.d.ts +15 -1
- package/dist/components/features/data-table/hooks/use-data-table-client.d.ts.map +1 -1
- package/dist/components/features/data-table/hooks/use-data-table-server.d.ts +19 -1
- package/dist/components/features/data-table/hooks/use-data-table-server.d.ts.map +1 -1
- package/dist/components/features/data-table/hooks/use-selectors.d.ts +4 -2
- package/dist/components/features/data-table/hooks/use-selectors.d.ts.map +1 -1
- package/dist/components/features/data-table/index.d.ts +1 -1
- package/dist/components/features/data-table/index.d.ts.map +1 -1
- package/dist/components/features/data-table/types.d.ts +25 -33
- package/dist/components/features/data-table/types.d.ts.map +1 -1
- package/dist/components/features/index.d.ts +1 -1
- package/dist/components/features/index.d.ts.map +1 -1
- package/dist/data-table/index.mjs +201 -130
- package/dist/date-picker/index.mjs +2 -2
- package/dist/dropdown/index.mjs +1 -1
- package/dist/dropzone/index.mjs +1 -1
- package/dist/empty-content/index.mjs +1 -1
- package/dist/form/index.mjs +3 -3
- package/dist/grid/index.mjs +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/index.mjs +34 -32
- package/dist/input-number/index.mjs +1 -1
- package/dist/input-with-addons/index.mjs +1 -1
- package/dist/loader-overlay/index.mjs +1 -1
- package/dist/map/index.mjs +1 -1
- package/dist/{map-ClJD-qxm.mjs → map-2RG9pYZR.mjs} +1 -1
- package/dist/more-actions/index.mjs +2 -2
- package/dist/{more-actions-DbC8dyed.mjs → more-actions-BODYgG1C.mjs} +2 -2
- package/dist/page-title/index.mjs +1 -1
- package/dist/sidebar/index.mjs +4 -5
- package/dist/{sidebar-C4NqSr4r.mjs → sidebar-BW76ss_f.mjs} +6 -415
- package/dist/skeleton/index.mjs +2 -1
- package/dist/skeleton-DZ31pU4B.mjs +28 -0
- package/dist/stepper/index.mjs +1 -1
- package/dist/styles/root.css +3 -0
- package/dist/switch/index.mjs +1 -1
- package/dist/table/index.mjs +1 -1
- package/dist/tabs/index.mjs +1 -1
- package/dist/tag-input/index.mjs +1 -1
- package/dist/task-queue/index.mjs +3 -3
- package/dist/{task-queue-dropdown-fo3TX58Q.mjs → task-queue-dropdown-DtS0IKci.mjs} +3 -3
- package/dist/textarea/index.mjs +1 -1
- package/dist/theme/index.mjs +1 -1
- package/dist/toast/index.mjs +1 -1
- package/dist/tooltip/index.mjs +1 -1
- package/dist/typography/index.mjs +1 -1
- package/dist/{use-copy-to-clipboard-C7xqNxBX.mjs → use-copy-to-clipboard-C9cT2Qb-.mjs} +1 -1
- package/dist/{use-stepper-CB1injte.mjs → use-stepper-DJd8o9dV.mjs} +8 -8
- package/dist/visually-hidden/index.mjs +1 -1
- package/package.json +32 -80
- package/dist/components/features/data-table/hooks/use-is-client.d.ts +0 -8
- package/dist/components/features/data-table/hooks/use-is-client.d.ts.map +0 -1
- package/dist/components/features/sidebar/app-sidebar.d.ts +0 -14
- package/dist/components/features/sidebar/app-sidebar.d.ts.map +0 -1
- package/dist/components/features/sidebar/index.d.ts +0 -4
- package/dist/components/features/sidebar/index.d.ts.map +0 -1
- package/dist/components/features/sidebar/nav-main.d.ts.map +0 -1
- package/dist/components/features/sidebar/sidebar.d.ts.map +0 -1
- /package/dist/{col-RfO7d6AR.mjs → col-DCneNxQj.mjs} +0 -0
- /package/dist/{dropdown-Cs7Xr8w7.mjs → dropdown-Dgm_b6Mm.mjs} +0 -0
- /package/dist/{dropzone-BT5fEDEF.mjs → dropzone-DR6O9OdU.mjs} +0 -0
- /package/dist/{empty-content-iDu3NUqG.mjs → empty-content-Dm7_5jO9.mjs} +0 -0
- /package/dist/{input-number-D9ydFith.mjs → input-number-D1HCcTXO.mjs} +0 -0
- /package/dist/{input-with-addons-CdgiUQce.mjs → input-with-addons-DN9LGwUU.mjs} +0 -0
- /package/dist/{loader-overlay-D83QeQNj.mjs → loader-overlay-CpA0zV8D.mjs} +0 -0
- /package/dist/{map-leaflet-imports-CdzvEnzY.mjs → map-leaflet-imports-CgEyVRnp.mjs} +0 -0
- /package/dist/{page-title-SGchAF6Y.mjs → page-title-D62FV6vD.mjs} +0 -0
- /package/dist/{skeleton-Cs6Q5GQc.mjs → skeleton-CkE23wsL.mjs} +0 -0
- /package/dist/{stepper-BG9DIzN5.mjs → stepper-CZeks9Ex.mjs} +0 -0
- /package/dist/{switch-B2VVauH6.mjs → switch-Cn9IM2gC.mjs} +0 -0
- /package/dist/{table-Dc3HfbM4.mjs → table-Dpzh0VPK.mjs} +0 -0
- /package/dist/{tabs-Ccb4uqbe.mjs → tabs-OYVCDOif.mjs} +0 -0
- /package/dist/{tag-input-BfHaKoMF.mjs → tag-input-DorFQ9bA.mjs} +0 -0
- /package/dist/{textarea-X4OjkqLJ.mjs → textarea-KZUKGHlO.mjs} +0 -0
- /package/dist/{theme.provider-Nun_O9-O.mjs → theme.provider-BG3cS9xe.mjs} +0 -0
- /package/dist/{to-api-format-zI26rEBI.mjs → to-api-format-CzPt5UAX.mjs} +0 -0
- /package/dist/{tooltip-DZFG1iMs.mjs → tooltip-U3XxlW4l.mjs} +0 -0
- /package/dist/{typography-T7WgvO77.mjs → typography-DdrxIJMd.mjs} +0 -0
- /package/dist/{use-debounce-Ctljs3MB.mjs → use-debounce-Dc95PFRX.mjs} +0 -0
- /package/dist/{use-toast-DN-fZBzJ.mjs → use-toast-DBmysDS6.mjs} +0 -0
- /package/dist/{visuallyhidden-CgkVhApW.mjs → visuallyhidden-CfBnXfvh.mjs} +0 -0
|
@@ -12,9 +12,10 @@ import { t as Label } from "../label-_ste_Re3.mjs";
|
|
|
12
12
|
import { i as DropdownMenuItem, l as DropdownMenuTrigger, r as DropdownMenuContent, t as DropdownMenu } from "../dropdown-menu-DAFyO-qD.mjs";
|
|
13
13
|
import { i as PopoverTrigger, r as PopoverContent, t as Popover } from "../popover-Ds9624qY.mjs";
|
|
14
14
|
import { i as SelectItem, l as SelectTrigger, n as SelectContent, t as Select, u as SelectValue } from "../select-CwVIFWFO.mjs";
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import { t as
|
|
15
|
+
import "../skeleton-CkE23wsL.mjs";
|
|
16
|
+
import { t as Skeleton } from "../skeleton-DZ31pU4B.mjs";
|
|
17
|
+
import { c as TableRow, i as TableCell, n as TableBody, o as TableHead, s as TableHeader, t as Table } from "../table-Dpzh0VPK.mjs";
|
|
18
|
+
import { t as CalendarDatePicker } from "../calendar-date-picker-Bw6Mrr-P.mjs";
|
|
18
19
|
import { ArrowDown, ArrowUp, ArrowUpDown, Check, ChevronDown, ChevronLeft, ChevronRight, MoreHorizontal, X } from "lucide-react";
|
|
19
20
|
import { createContext, memo, use, useCallback, useContext, useEffect, useId, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
20
21
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -157,6 +158,16 @@ function withSelectionColumn(columns, options = {}) {
|
|
|
157
158
|
|
|
158
159
|
//#endregion
|
|
159
160
|
//#region src/components/features/data-table/core/filter-engine.ts
|
|
161
|
+
/**
|
|
162
|
+
* Resolve a dot-path on an object (e.g. "status.registrationApproval").
|
|
163
|
+
* Falls back to a flat key lookup when the path has no dots.
|
|
164
|
+
*/
|
|
165
|
+
function resolvePath(obj, path) {
|
|
166
|
+
if (obj == null) return void 0;
|
|
167
|
+
const record = obj;
|
|
168
|
+
if (!path.includes(".")) return record[path];
|
|
169
|
+
return path.split(".").reduce((acc, key) => acc != null ? acc[key] : void 0, record);
|
|
170
|
+
}
|
|
160
171
|
const FILTER_STRATEGIES = {
|
|
161
172
|
"checkbox": (cellValue, filterValue) => {
|
|
162
173
|
if (filterValue == null) return true;
|
|
@@ -200,14 +211,13 @@ function applyFilters(data, filters, search, registeredFilters, customFilterFns,
|
|
|
200
211
|
console.warn(`[DataTable] No filter strategy registered for column "${column}". Filter ignored.`);
|
|
201
212
|
continue;
|
|
202
213
|
}
|
|
203
|
-
|
|
204
|
-
if (!fn(cellValue, value)) return false;
|
|
214
|
+
if (!fn(resolvePath(row, column), value)) return false;
|
|
205
215
|
}
|
|
206
216
|
if (hasSearch) {
|
|
207
217
|
const query = search.toLowerCase();
|
|
208
218
|
if (searchConfig.searchFn) return searchConfig.searchFn(row, search);
|
|
209
219
|
if (searchConfig.searchableColumns && searchConfig.searchableColumns.length > 0) return searchConfig.searchableColumns.some((col) => {
|
|
210
|
-
const cellValue = row
|
|
220
|
+
const cellValue = resolvePath(row, col);
|
|
211
221
|
return cellValue != null && String(cellValue).toLowerCase().includes(query);
|
|
212
222
|
});
|
|
213
223
|
return Object.values(row).some((val) => {
|
|
@@ -240,8 +250,9 @@ function createDataTableStore(options) {
|
|
|
240
250
|
rowSelection: {},
|
|
241
251
|
pageIndex: 0,
|
|
242
252
|
pageSize: options.pageSize ?? DEFAULT_PAGE_SIZE,
|
|
253
|
+
columnCount: options.columnCount ?? 0,
|
|
243
254
|
mode: options.mode,
|
|
244
|
-
isLoading: false,
|
|
255
|
+
isLoading: options.isLoading ?? false,
|
|
245
256
|
error: null,
|
|
246
257
|
inlineContents: [],
|
|
247
258
|
_version: 0
|
|
@@ -285,7 +296,6 @@ function createDataTableStore(options) {
|
|
|
285
296
|
filteredData: data
|
|
286
297
|
});
|
|
287
298
|
},
|
|
288
|
-
setTable: (_t) => {},
|
|
289
299
|
setSorting: (sorting) => {
|
|
290
300
|
setState({
|
|
291
301
|
...state,
|
|
@@ -468,10 +478,12 @@ function useDataTableStore() {
|
|
|
468
478
|
if (!store) throw new Error("useDataTableStore must be used within a <DataTable.Client> or <DataTable.Server> provider");
|
|
469
479
|
return store;
|
|
470
480
|
}
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
481
|
+
/**
|
|
482
|
+
* Returns the table instance or null if not yet available.
|
|
483
|
+
* Used by hooks that need to handle the null-table window during SSR.
|
|
484
|
+
*/
|
|
485
|
+
function useTableInstanceOrNull() {
|
|
486
|
+
return use(TableInstanceContext);
|
|
475
487
|
}
|
|
476
488
|
|
|
477
489
|
//#endregion
|
|
@@ -533,25 +545,35 @@ function useDataTableSorting() {
|
|
|
533
545
|
function useDataTableSelection() {
|
|
534
546
|
useRenderKey();
|
|
535
547
|
const store = useDataTableStore();
|
|
536
|
-
const table =
|
|
548
|
+
const table = useTableInstanceOrNull();
|
|
537
549
|
return {
|
|
538
550
|
rowSelection: store.getSnapshot().rowSelection,
|
|
539
551
|
setRowSelection: store.setRowSelection,
|
|
540
|
-
selectedRows: table.getFilteredSelectedRowModel().rows.map((r) => r.original)
|
|
552
|
+
selectedRows: table ? table.getFilteredSelectedRowModel().rows.map((r) => r.original) : []
|
|
541
553
|
};
|
|
542
554
|
}
|
|
543
555
|
function useDataTablePagination() {
|
|
544
556
|
useRenderKey();
|
|
545
557
|
const store = useDataTableStore();
|
|
546
|
-
const table =
|
|
558
|
+
const table = useTableInstanceOrNull();
|
|
547
559
|
const state = store.getSnapshot();
|
|
548
|
-
|
|
549
|
-
|
|
560
|
+
if (!table) return {
|
|
561
|
+
canNextPage: false,
|
|
562
|
+
canPrevPage: false,
|
|
563
|
+
nextPage: () => {},
|
|
564
|
+
prevPage: () => {},
|
|
565
|
+
pageIndex: state.pageIndex,
|
|
566
|
+
pageCount: 0,
|
|
567
|
+
setPageIndex: store.setPageIndex,
|
|
568
|
+
pageSize: state.pageSize,
|
|
569
|
+
setPageSize: store.setPageSize,
|
|
570
|
+
totalRows: 0
|
|
571
|
+
};
|
|
550
572
|
return {
|
|
551
573
|
canNextPage: table.getCanNextPage(),
|
|
552
574
|
canPrevPage: table.getCanPreviousPage(),
|
|
553
|
-
nextPage,
|
|
554
|
-
prevPage,
|
|
575
|
+
nextPage: () => table.nextPage(),
|
|
576
|
+
prevPage: () => table.previousPage(),
|
|
555
577
|
pageIndex: state.pageIndex,
|
|
556
578
|
pageCount: table.getPageCount(),
|
|
557
579
|
setPageIndex: store.setPageIndex,
|
|
@@ -562,7 +584,12 @@ function useDataTablePagination() {
|
|
|
562
584
|
}
|
|
563
585
|
function useDataTableRows() {
|
|
564
586
|
useRenderKey();
|
|
565
|
-
const table =
|
|
587
|
+
const table = useTableInstanceOrNull();
|
|
588
|
+
if (!table) return {
|
|
589
|
+
rows: [],
|
|
590
|
+
headerGroups: [],
|
|
591
|
+
totalColumns: 0
|
|
592
|
+
};
|
|
566
593
|
return {
|
|
567
594
|
rows: table.getRowModel().rows,
|
|
568
595
|
headerGroups: table.getHeaderGroups(),
|
|
@@ -572,7 +599,8 @@ function useDataTableRows() {
|
|
|
572
599
|
function useDataTableLoading() {
|
|
573
600
|
return useSliceSelector(useCallback((state) => ({
|
|
574
601
|
isLoading: state.isLoading,
|
|
575
|
-
error: state.error
|
|
602
|
+
error: state.error,
|
|
603
|
+
columnCount: state.columnCount
|
|
576
604
|
}), []));
|
|
577
605
|
}
|
|
578
606
|
function useDataTableInlineContents() {
|
|
@@ -586,11 +614,9 @@ function useDataTableInlineContents() {
|
|
|
586
614
|
|
|
587
615
|
//#endregion
|
|
588
616
|
//#region src/components/features/data-table/components/active-filters.tsx
|
|
589
|
-
function formatValue(column, value,
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
if (result !== void 0) return result;
|
|
593
|
-
}
|
|
617
|
+
function formatValue(column, value, formatters) {
|
|
618
|
+
const fn = formatters?.[column];
|
|
619
|
+
if (fn) return fn(value);
|
|
594
620
|
return String(value);
|
|
595
621
|
}
|
|
596
622
|
function FilterGroup({ label, children, className }) {
|
|
@@ -605,14 +631,15 @@ function FilterGroup({ label, children, className }) {
|
|
|
605
631
|
});
|
|
606
632
|
}
|
|
607
633
|
const EMPTY_LABELS = {};
|
|
608
|
-
function ActiveFiltersInner({ label = "Selected Filters", filterLabels = EMPTY_LABELS, formatFilterValue:
|
|
634
|
+
function ActiveFiltersInner({ label = "Selected Filters", excludeFilters, filterLabels = EMPTY_LABELS, formatFilterValue: formatters, clearAll = "icon", clearAllLabel = "Clear all", className, groupClassName, badgeClassName }) {
|
|
609
635
|
const { filters, setFilter, clearFilter, clearAllFilters } = useDataTableFilters();
|
|
610
636
|
const { search, clearSearch } = useDataTableSearch();
|
|
611
|
-
const
|
|
612
|
-
const
|
|
637
|
+
const excludeSet = useMemo(() => new Set(excludeFilters ?? []), [excludeFilters]);
|
|
638
|
+
const activeFilterEntries = Object.entries(filters).filter(([key, value]) => !excludeSet.has(key) && value != null && value !== "" && !(Array.isArray(value) && value.length === 0));
|
|
639
|
+
const showSearch = search.length > 0 && !excludeSet.has("search");
|
|
613
640
|
const hasFilters = activeFilterEntries.length > 0;
|
|
614
|
-
if (!
|
|
615
|
-
const totalGroups = activeFilterEntries.length + (
|
|
641
|
+
if (!showSearch && !hasFilters) return null;
|
|
642
|
+
const totalGroups = activeFilterEntries.length + (showSearch ? 1 : 0);
|
|
616
643
|
const removeArrayItem = (column, items, item) => {
|
|
617
644
|
const remaining = items.filter((v) => v !== item);
|
|
618
645
|
if (remaining.length > 0) setFilter(column, remaining);
|
|
@@ -620,7 +647,7 @@ function ActiveFiltersInner({ label = "Selected Filters", filterLabels = EMPTY_L
|
|
|
620
647
|
};
|
|
621
648
|
const handleClearAll = () => {
|
|
622
649
|
clearAllFilters();
|
|
623
|
-
if (
|
|
650
|
+
if (search.length > 0) clearSearch();
|
|
624
651
|
};
|
|
625
652
|
const badgeCn = cn("flex items-center gap-1.5 px-2 py-0.5 text-xs", badgeClassName);
|
|
626
653
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -633,7 +660,7 @@ function ActiveFiltersInner({ label = "Selected Filters", filterLabels = EMPTY_L
|
|
|
633
660
|
"data-slot": "dt-active-filters-label",
|
|
634
661
|
children: label
|
|
635
662
|
}),
|
|
636
|
-
|
|
663
|
+
showSearch && /* @__PURE__ */ jsx(FilterGroup, {
|
|
637
664
|
label: "Search",
|
|
638
665
|
className: groupClassName,
|
|
639
666
|
children: /* @__PURE__ */ jsxs(Badge, {
|
|
@@ -662,10 +689,10 @@ function ActiveFiltersInner({ label = "Selected Filters", filterLabels = EMPTY_L
|
|
|
662
689
|
type: "muted",
|
|
663
690
|
theme: "solid",
|
|
664
691
|
className: badgeCn,
|
|
665
|
-
children: [/* @__PURE__ */ jsx("span", { children: formatValue(column, item,
|
|
692
|
+
children: [/* @__PURE__ */ jsx("span", { children: formatValue(column, item, formatters) }), /* @__PURE__ */ jsx(Button, {
|
|
666
693
|
theme: "borderless",
|
|
667
694
|
size: "small",
|
|
668
|
-
"aria-label": `Remove ${formatValue(column, item,
|
|
695
|
+
"aria-label": `Remove ${formatValue(column, item, formatters)} from ${groupLabel}`,
|
|
669
696
|
className: "h-auto p-0 text-muted-foreground hover:text-foreground",
|
|
670
697
|
onClick: () => removeArrayItem(column, value, item),
|
|
671
698
|
children: /* @__PURE__ */ jsx(X, {
|
|
@@ -682,7 +709,7 @@ function ActiveFiltersInner({ label = "Selected Filters", filterLabels = EMPTY_L
|
|
|
682
709
|
type: "muted",
|
|
683
710
|
theme: "solid",
|
|
684
711
|
className: badgeCn,
|
|
685
|
-
children: [/* @__PURE__ */ jsx("span", { children: formatValue(column, value,
|
|
712
|
+
children: [/* @__PURE__ */ jsx("span", { children: formatValue(column, value, formatters) }), /* @__PURE__ */ jsx(Button, {
|
|
686
713
|
theme: "borderless",
|
|
687
714
|
size: "small",
|
|
688
715
|
"aria-label": `Clear ${groupLabel} filter`,
|
|
@@ -788,9 +815,12 @@ function renderInlineContentRow(entry, colSpan, rows) {
|
|
|
788
815
|
}
|
|
789
816
|
function DataTableContent({ emptyMessage, className, tableClassName, headerClassName, headerRowClassName, headerCellClassName, bodyClassName, rowClassName, cellClassName }) {
|
|
790
817
|
const { rows, headerGroups, totalColumns } = useDataTableRows();
|
|
818
|
+
const { isLoading, columnCount } = useDataTableLoading();
|
|
819
|
+
const { pageSize } = useDataTablePagination();
|
|
791
820
|
const { inlineContents } = useDataTableInlineContents();
|
|
792
821
|
const openInlineContents = useMemo(() => inlineContents.filter((e) => e.open), [inlineContents]);
|
|
793
822
|
const colSpan = totalColumns;
|
|
823
|
+
const skeletonColumns = totalColumns || columnCount || DEFAULT_LOADING_ROWS;
|
|
794
824
|
return /* @__PURE__ */ jsx("div", {
|
|
795
825
|
className: cn("datum-ui-data-table", className),
|
|
796
826
|
"data-slot": "dt",
|
|
@@ -827,7 +857,13 @@ function DataTableContent({ emptyMessage, className, tableClassName, headerClass
|
|
|
827
857
|
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
828
858
|
}, cell.id))
|
|
829
859
|
}, row.id);
|
|
830
|
-
}) : /* @__PURE__ */ jsx(TableRow, {
|
|
860
|
+
}) : isLoading ? Array.from({ length: pageSize }, (_, i) => /* @__PURE__ */ jsx(TableRow, {
|
|
861
|
+
"data-slot": "dt-skeleton-row",
|
|
862
|
+
children: Array.from({ length: skeletonColumns }, (_, j) => /* @__PURE__ */ jsx(TableCell, {
|
|
863
|
+
"data-slot": "dt-skeleton-cell",
|
|
864
|
+
children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-full" })
|
|
865
|
+
}, j))
|
|
866
|
+
}, i)) : /* @__PURE__ */ jsx(TableRow, {
|
|
831
867
|
"data-slot": "dt-row",
|
|
832
868
|
children: /* @__PURE__ */ jsx(TableCell, {
|
|
833
869
|
colSpan,
|
|
@@ -898,19 +934,8 @@ function DataTableLoading({ rows = DEFAULT_LOADING_ROWS, columns = 4, className
|
|
|
898
934
|
return /* @__PURE__ */ jsx("div", {
|
|
899
935
|
className,
|
|
900
936
|
"data-slot": "dt-loading",
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
904
|
-
className: "border-b",
|
|
905
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
906
|
-
className: "flex gap-4 p-4",
|
|
907
|
-
children: Array.from({ length: columns }, (_, i) => /* @__PURE__ */ jsx(Skeleton, { className: "h-4 flex-1" }, i))
|
|
908
|
-
})
|
|
909
|
-
}), Array.from({ length: rows }, (_, rowIndex) => /* @__PURE__ */ jsx("div", {
|
|
910
|
-
className: "flex gap-4 border-b p-4 last:border-b-0",
|
|
911
|
-
children: Array.from({ length: columns }, (_, colIndex) => /* @__PURE__ */ jsx(Skeleton, { className: "h-4 flex-1" }, colIndex))
|
|
912
|
-
}, rowIndex))]
|
|
913
|
-
})
|
|
937
|
+
style: { overflowX: "auto" },
|
|
938
|
+
children: /* @__PURE__ */ jsxs(Table, { children: [/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsx(TableRow, { children: Array.from({ length: columns }, (_, i) => /* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-24" }) }, i)) }) }), /* @__PURE__ */ jsx(TableBody, { children: Array.from({ length: rows }, (_, rowIndex) => /* @__PURE__ */ jsx(TableRow, { children: Array.from({ length: columns }, (_, colIndex) => /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-full" }) }, colIndex)) }, rowIndex)) })] })
|
|
914
939
|
});
|
|
915
940
|
}
|
|
916
941
|
|
|
@@ -1075,7 +1100,7 @@ function DataTableRowActions({ row, actions, isLoading = false, className }) {
|
|
|
1075
1100
|
|
|
1076
1101
|
//#endregion
|
|
1077
1102
|
//#region src/components/features/data-table/components/search.tsx
|
|
1078
|
-
function DataTableSearch({ placeholder = "Search...", debounceMs = DEFAULT_DEBOUNCE_MS, className }) {
|
|
1103
|
+
function DataTableSearch({ placeholder = "Search...", debounceMs = DEFAULT_DEBOUNCE_MS, className, disabled }) {
|
|
1079
1104
|
const { search, setSearch } = useDataTableSearch();
|
|
1080
1105
|
const [inputValue, setInputValue] = useState(search);
|
|
1081
1106
|
useEffect(() => {
|
|
@@ -1097,6 +1122,7 @@ function DataTableSearch({ placeholder = "Search...", debounceMs = DEFAULT_DEBOU
|
|
|
1097
1122
|
value: inputValue,
|
|
1098
1123
|
onChange: (e) => setInputValue(e.target.value),
|
|
1099
1124
|
className,
|
|
1125
|
+
disabled,
|
|
1100
1126
|
"aria-label": placeholder,
|
|
1101
1127
|
"data-slot": "dt-search"
|
|
1102
1128
|
});
|
|
@@ -1104,26 +1130,12 @@ function DataTableSearch({ placeholder = "Search...", debounceMs = DEFAULT_DEBOU
|
|
|
1104
1130
|
|
|
1105
1131
|
//#endregion
|
|
1106
1132
|
//#region src/components/features/data-table/hooks/use-data-table-client.ts
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
defaultFilters,
|
|
1114
|
-
pageSize,
|
|
1115
|
-
searchableColumns,
|
|
1116
|
-
searchFn,
|
|
1117
|
-
filterFns
|
|
1118
|
-
}), []);
|
|
1119
|
-
const isInitialRender = useRef(true);
|
|
1120
|
-
useEffect(() => {
|
|
1121
|
-
if (isInitialRender.current) {
|
|
1122
|
-
isInitialRender.current = false;
|
|
1123
|
-
return;
|
|
1124
|
-
}
|
|
1125
|
-
store.setData(data);
|
|
1126
|
-
}, [data, store]);
|
|
1133
|
+
/**
|
|
1134
|
+
* Creates a TanStack Table instance from an existing store.
|
|
1135
|
+
* Does NOT create the store or sync data — the caller is responsible for that.
|
|
1136
|
+
*/
|
|
1137
|
+
function useClientTable(store, options) {
|
|
1138
|
+
const { columns, getRowId, enableRowSelection = false, stateAdapter } = options;
|
|
1127
1139
|
const resolvedColumns = useMemo(() => enableRowSelection ? withSelectionColumn(columns, typeof enableRowSelection === "object" ? enableRowSelection : {}) : columns, [columns, enableRowSelection]);
|
|
1128
1140
|
const { filteredData, sorting, rowSelection, pageIndex, pageSize: storePageSize, filters, search } = useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);
|
|
1129
1141
|
const table = useReactTable({
|
|
@@ -1194,40 +1206,74 @@ function useDataTableClient(options) {
|
|
|
1194
1206
|
storePageSize,
|
|
1195
1207
|
stateAdapter
|
|
1196
1208
|
]);
|
|
1197
|
-
return {
|
|
1198
|
-
store,
|
|
1199
|
-
table
|
|
1200
|
-
};
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
|
-
//#endregion
|
|
1204
|
-
//#region src/components/features/data-table/hooks/use-is-client.ts
|
|
1205
|
-
/**
|
|
1206
|
-
* Returns `false` during SSR and `true` after hydration.
|
|
1207
|
-
* Used to gate components that depend on client-only APIs
|
|
1208
|
-
* (e.g. TanStack Table's internal useSyncExternalStore call
|
|
1209
|
-
* which omits the getServerSnapshot argument).
|
|
1210
|
-
*/
|
|
1211
|
-
function useIsClient() {
|
|
1212
|
-
const [isClient, setIsClient] = useState(false);
|
|
1213
|
-
useEffect(() => setIsClient(true), []);
|
|
1214
|
-
return isClient;
|
|
1209
|
+
return { table };
|
|
1215
1210
|
}
|
|
1216
1211
|
|
|
1217
1212
|
//#endregion
|
|
1218
1213
|
//#region src/components/features/data-table/core/client-provider.tsx
|
|
1219
1214
|
/**
|
|
1220
|
-
* Inner component that calls
|
|
1221
|
-
* Only rendered
|
|
1215
|
+
* Inner component that calls useClientTable.
|
|
1216
|
+
* Only rendered after hydration (gated by tableReady).
|
|
1222
1217
|
*/
|
|
1223
|
-
function ClientProviderInner({ className, children,
|
|
1224
|
-
const {
|
|
1218
|
+
function ClientProviderInner({ store, className, children, ...options }) {
|
|
1219
|
+
const { table } = useClientTable(store, options);
|
|
1220
|
+
return /* @__PURE__ */ jsx(TableInstanceContext, {
|
|
1221
|
+
value: table,
|
|
1222
|
+
children: /* @__PURE__ */ jsx(DataTableRenderKeyContext, {
|
|
1223
|
+
value: store.getSnapshot()._version,
|
|
1224
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1225
|
+
className,
|
|
1226
|
+
children
|
|
1227
|
+
})
|
|
1228
|
+
})
|
|
1229
|
+
});
|
|
1230
|
+
}
|
|
1231
|
+
function ClientProvider(props) {
|
|
1232
|
+
const { data, columns, loading, pageSize, getRowId, enableRowSelection, defaultSort, defaultFilters, searchableColumns, searchFn, filterFns, stateAdapter, className, children } = props;
|
|
1233
|
+
const store = useMemo(() => createDataTableStore({
|
|
1234
|
+
data,
|
|
1235
|
+
mode: "client",
|
|
1236
|
+
isLoading: true,
|
|
1237
|
+
defaultSort,
|
|
1238
|
+
defaultFilters,
|
|
1239
|
+
pageSize,
|
|
1240
|
+
columnCount: columns.length,
|
|
1241
|
+
searchableColumns,
|
|
1242
|
+
searchFn,
|
|
1243
|
+
filterFns
|
|
1244
|
+
}), []);
|
|
1245
|
+
const isInitialRender = useRef(true);
|
|
1246
|
+
useEffect(() => {
|
|
1247
|
+
if (isInitialRender.current) {
|
|
1248
|
+
isInitialRender.current = false;
|
|
1249
|
+
return;
|
|
1250
|
+
}
|
|
1251
|
+
store.setData(data);
|
|
1252
|
+
}, [data, store]);
|
|
1253
|
+
const [tableReady, setTableReady] = useState(false);
|
|
1254
|
+
useEffect(() => setTableReady(true), []);
|
|
1255
|
+
useEffect(() => {
|
|
1256
|
+
if (!tableReady) return;
|
|
1257
|
+
store.setLoading(loading ?? false);
|
|
1258
|
+
}, [
|
|
1259
|
+
loading,
|
|
1260
|
+
tableReady,
|
|
1261
|
+
store
|
|
1262
|
+
]);
|
|
1225
1263
|
return /* @__PURE__ */ jsx(DataTableStoreContext, {
|
|
1226
1264
|
value: store,
|
|
1227
|
-
children: /* @__PURE__ */ jsx(
|
|
1228
|
-
|
|
1265
|
+
children: tableReady ? /* @__PURE__ */ jsx(ClientProviderInner, {
|
|
1266
|
+
store,
|
|
1267
|
+
columns,
|
|
1268
|
+
getRowId,
|
|
1269
|
+
enableRowSelection,
|
|
1270
|
+
stateAdapter,
|
|
1271
|
+
className,
|
|
1272
|
+
children
|
|
1273
|
+
}) : /* @__PURE__ */ jsx(TableInstanceContext, {
|
|
1274
|
+
value: null,
|
|
1229
1275
|
children: /* @__PURE__ */ jsx(DataTableRenderKeyContext, {
|
|
1230
|
-
value:
|
|
1276
|
+
value: 0,
|
|
1231
1277
|
children: /* @__PURE__ */ jsx("div", {
|
|
1232
1278
|
className,
|
|
1233
1279
|
children
|
|
@@ -1236,15 +1282,16 @@ function ClientProviderInner({ className, children, ssrFallback: _ssrFallback, .
|
|
|
1236
1282
|
})
|
|
1237
1283
|
});
|
|
1238
1284
|
}
|
|
1239
|
-
function ClientProvider(props) {
|
|
1240
|
-
if (!useIsClient()) return /* @__PURE__ */ jsx(Fragment$1, { children: props.ssrFallback ?? null });
|
|
1241
|
-
return /* @__PURE__ */ jsx(ClientProviderInner, { ...props });
|
|
1242
|
-
}
|
|
1243
1285
|
|
|
1244
1286
|
//#endregion
|
|
1245
1287
|
//#region src/components/features/data-table/hooks/use-data-table-server.ts
|
|
1246
|
-
|
|
1247
|
-
|
|
1288
|
+
/**
|
|
1289
|
+
* Creates a TanStack Table instance from an existing store.
|
|
1290
|
+
* Handles fetch-on-query-change, cursor pagination, and state adapter sync.
|
|
1291
|
+
* Does NOT create the store — the caller is responsible for that.
|
|
1292
|
+
*/
|
|
1293
|
+
function useServerTable(store, options) {
|
|
1294
|
+
const { columns, fetchFn, transform, getRowId, enableRowSelection = false, stateAdapter } = options;
|
|
1248
1295
|
const fetchRef = useRef(fetchFn);
|
|
1249
1296
|
const transformRef = useRef(transform);
|
|
1250
1297
|
useEffect(() => {
|
|
@@ -1255,13 +1302,6 @@ function useDataTableServer(options) {
|
|
|
1255
1302
|
}, [transform]);
|
|
1256
1303
|
const cursorMapRef = useRef(/* @__PURE__ */ new Map());
|
|
1257
1304
|
const hasNextPageRef = useRef(false);
|
|
1258
|
-
const store = useMemo(() => createDataTableStore({
|
|
1259
|
-
data: [],
|
|
1260
|
-
mode: "server",
|
|
1261
|
-
defaultSort,
|
|
1262
|
-
defaultFilters,
|
|
1263
|
-
pageSize: limit
|
|
1264
|
-
}), []);
|
|
1265
1305
|
const { sorting, filters, search, rowSelection, pageSize, pageIndex } = useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);
|
|
1266
1306
|
const prevQueryRef = useRef({
|
|
1267
1307
|
sorting,
|
|
@@ -1375,26 +1415,58 @@ function useDataTableServer(options) {
|
|
|
1375
1415
|
pageSize,
|
|
1376
1416
|
stateAdapter
|
|
1377
1417
|
]);
|
|
1378
|
-
return {
|
|
1379
|
-
store,
|
|
1380
|
-
table
|
|
1381
|
-
};
|
|
1418
|
+
return { table };
|
|
1382
1419
|
}
|
|
1383
1420
|
|
|
1384
1421
|
//#endregion
|
|
1385
1422
|
//#region src/components/features/data-table/core/server-provider.tsx
|
|
1386
1423
|
/**
|
|
1387
|
-
* Inner component that calls
|
|
1388
|
-
* Only rendered
|
|
1424
|
+
* Inner component that calls useServerTable.
|
|
1425
|
+
* Only rendered after hydration (gated by tableReady).
|
|
1389
1426
|
*/
|
|
1390
|
-
function ServerProviderInner({ className, children,
|
|
1391
|
-
const {
|
|
1427
|
+
function ServerProviderInner({ store, className, children, ...options }) {
|
|
1428
|
+
const { table } = useServerTable(store, options);
|
|
1429
|
+
return /* @__PURE__ */ jsx(TableInstanceContext, {
|
|
1430
|
+
value: table,
|
|
1431
|
+
children: /* @__PURE__ */ jsx(DataTableRenderKeyContext, {
|
|
1432
|
+
value: store.getSnapshot()._version,
|
|
1433
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1434
|
+
className,
|
|
1435
|
+
children
|
|
1436
|
+
})
|
|
1437
|
+
})
|
|
1438
|
+
});
|
|
1439
|
+
}
|
|
1440
|
+
function ServerProvider(props) {
|
|
1441
|
+
const { columns, fetchFn, transform, limit = 20, getRowId, enableRowSelection, defaultSort, defaultFilters, stateAdapter, className, children } = props;
|
|
1442
|
+
const store = useMemo(() => createDataTableStore({
|
|
1443
|
+
data: [],
|
|
1444
|
+
mode: "server",
|
|
1445
|
+
isLoading: true,
|
|
1446
|
+
defaultSort,
|
|
1447
|
+
defaultFilters,
|
|
1448
|
+
pageSize: limit,
|
|
1449
|
+
columnCount: columns.length
|
|
1450
|
+
}), []);
|
|
1451
|
+
const [tableReady, setTableReady] = useState(false);
|
|
1452
|
+
useEffect(() => setTableReady(true), []);
|
|
1392
1453
|
return /* @__PURE__ */ jsx(DataTableStoreContext, {
|
|
1393
1454
|
value: store,
|
|
1394
|
-
children: /* @__PURE__ */ jsx(
|
|
1395
|
-
|
|
1455
|
+
children: tableReady ? /* @__PURE__ */ jsx(ServerProviderInner, {
|
|
1456
|
+
store,
|
|
1457
|
+
columns,
|
|
1458
|
+
fetchFn,
|
|
1459
|
+
transform,
|
|
1460
|
+
limit,
|
|
1461
|
+
getRowId,
|
|
1462
|
+
enableRowSelection,
|
|
1463
|
+
stateAdapter,
|
|
1464
|
+
className,
|
|
1465
|
+
children
|
|
1466
|
+
}) : /* @__PURE__ */ jsx(TableInstanceContext, {
|
|
1467
|
+
value: null,
|
|
1396
1468
|
children: /* @__PURE__ */ jsx(DataTableRenderKeyContext, {
|
|
1397
|
-
value:
|
|
1469
|
+
value: 0,
|
|
1398
1470
|
children: /* @__PURE__ */ jsx("div", {
|
|
1399
1471
|
className,
|
|
1400
1472
|
children
|
|
@@ -1403,15 +1475,11 @@ function ServerProviderInner({ className, children, ssrFallback: _ssrFallback, .
|
|
|
1403
1475
|
})
|
|
1404
1476
|
});
|
|
1405
1477
|
}
|
|
1406
|
-
function ServerProvider(props) {
|
|
1407
|
-
if (!useIsClient()) return /* @__PURE__ */ jsx(Fragment$1, { children: props.ssrFallback ?? null });
|
|
1408
|
-
return /* @__PURE__ */ jsx(ServerProviderInner, { ...props });
|
|
1409
|
-
}
|
|
1410
1478
|
|
|
1411
1479
|
//#endregion
|
|
1412
1480
|
//#region src/components/features/data-table/filters/checkbox-filter.tsx
|
|
1413
1481
|
const MAX_VISIBLE_BADGES = 2;
|
|
1414
|
-
function CheckboxFilter({ column, label, options, className, checkboxPopoverClassName }) {
|
|
1482
|
+
function CheckboxFilter({ column, label, options, className, checkboxPopoverClassName, disabled }) {
|
|
1415
1483
|
const { filters, setFilter, clearFilter, registerFilter, unregisterFilter } = useDataTableFilters();
|
|
1416
1484
|
const [open, setOpen] = useState(false);
|
|
1417
1485
|
useEffect(() => {
|
|
@@ -1442,7 +1510,8 @@ function CheckboxFilter({ column, label, options, className, checkboxPopoverClas
|
|
|
1442
1510
|
asChild: true,
|
|
1443
1511
|
children: /* @__PURE__ */ jsxs(Button, {
|
|
1444
1512
|
theme: "outline",
|
|
1445
|
-
|
|
1513
|
+
disabled,
|
|
1514
|
+
className: cn("h-10 justify-between gap-1", className),
|
|
1446
1515
|
"data-slot": "dt-filter",
|
|
1447
1516
|
"data-testid": "dt-filter-trigger",
|
|
1448
1517
|
children: [selectedValues.length > 0 ? /* @__PURE__ */ jsxs("div", {
|
|
@@ -1521,7 +1590,7 @@ function CheckboxFilter({ column, label, options, className, checkboxPopoverClas
|
|
|
1521
1590
|
|
|
1522
1591
|
//#endregion
|
|
1523
1592
|
//#region src/components/features/data-table/filters/date-picker-filter.tsx
|
|
1524
|
-
function DatePickerFilter({ column, label, className, datePickerPopoverClassName, disableFuture, disablePast, minDate, maxDate }) {
|
|
1593
|
+
function DatePickerFilter({ column, label, className, datePickerPopoverClassName, disableFuture, disablePast, minDate, maxDate, disabled }) {
|
|
1525
1594
|
const { filters, setFilter, clearFilter, registerFilter, unregisterFilter } = useDataTableFilters();
|
|
1526
1595
|
const rawValue = filters[column];
|
|
1527
1596
|
useEffect(() => {
|
|
@@ -1546,8 +1615,9 @@ function DatePickerFilter({ column, label, className, datePickerPopoverClassName
|
|
|
1546
1615
|
numberOfMonths: 1,
|
|
1547
1616
|
closeOnSelect: true,
|
|
1548
1617
|
placeholder: label,
|
|
1549
|
-
triggerClassName: className,
|
|
1618
|
+
triggerClassName: cn("h-10", className),
|
|
1550
1619
|
variant: "outline",
|
|
1620
|
+
disabled,
|
|
1551
1621
|
disableFuture,
|
|
1552
1622
|
disablePast,
|
|
1553
1623
|
minDate,
|
|
@@ -1563,7 +1633,7 @@ function DatePickerFilter({ column, label, className, datePickerPopoverClassName
|
|
|
1563
1633
|
|
|
1564
1634
|
//#endregion
|
|
1565
1635
|
//#region src/components/features/data-table/filters/select-filter.tsx
|
|
1566
|
-
function SelectFilter({ column, label, options, placeholder, searchable = true, className, selectPopoverClassName }) {
|
|
1636
|
+
function SelectFilter({ column, label, options, placeholder, searchable = true, className, selectPopoverClassName, disabled }) {
|
|
1567
1637
|
const { filters, setFilter, clearFilter, registerFilter, unregisterFilter } = useDataTableFilters();
|
|
1568
1638
|
const [open, setOpen] = useState(false);
|
|
1569
1639
|
const value = filters[column];
|
|
@@ -1585,7 +1655,8 @@ function SelectFilter({ column, label, options, placeholder, searchable = true,
|
|
|
1585
1655
|
theme: "outline",
|
|
1586
1656
|
role: "combobox",
|
|
1587
1657
|
"aria-expanded": open,
|
|
1588
|
-
|
|
1658
|
+
disabled,
|
|
1659
|
+
className: cn("h-10 justify-between", className),
|
|
1589
1660
|
"data-slot": "dt-filter",
|
|
1590
1661
|
"data-testid": "dt-filter-trigger",
|
|
1591
1662
|
children: [/* @__PURE__ */ jsx("span", {
|
|
@@ -4,7 +4,7 @@ import "../button-AzpnV-WB.mjs";
|
|
|
4
4
|
import "../input-DuyjEKEW.mjs";
|
|
5
5
|
import "../popover-Ds9624qY.mjs";
|
|
6
6
|
import "../select-CwVIFWFO.mjs";
|
|
7
|
-
import { t as CalendarDatePicker } from "../calendar-date-picker-
|
|
8
|
-
import { C as utcToLocalInputString, S as utcStringToZonedDate, _ as getBrowserTimezone, a as formatTimeRangeDisplay, b as getTimezoneOffset, c as getPresetByKey, d as TimezoneSelector, f as QuickRangesPanel, g as formatUtcForDisplay, h as formatTimezoneLabel, i as formatSingleTimeDisplay, l as getPresetByShortcut, m as createTimezoneOption, n as TimeRangePicker, o as DEFAULT_PRESETS, p as CustomRangePanel, r as formatDateForInput, s as getDefaultPreset, t as toApiTimeRange, u as getPresetRange, v as getDefaultTimezoneOptions, w as zonedDateToUtcString, x as localInputStringToUtc, y as getShortTimezoneDisplay } from "../to-api-format-
|
|
7
|
+
import { t as CalendarDatePicker } from "../calendar-date-picker-Bw6Mrr-P.mjs";
|
|
8
|
+
import { C as utcToLocalInputString, S as utcStringToZonedDate, _ as getBrowserTimezone, a as formatTimeRangeDisplay, b as getTimezoneOffset, c as getPresetByKey, d as TimezoneSelector, f as QuickRangesPanel, g as formatUtcForDisplay, h as formatTimezoneLabel, i as formatSingleTimeDisplay, l as getPresetByShortcut, m as createTimezoneOption, n as TimeRangePicker, o as DEFAULT_PRESETS, p as CustomRangePanel, r as formatDateForInput, s as getDefaultPreset, t as toApiTimeRange, u as getPresetRange, v as getDefaultTimezoneOptions, w as zonedDateToUtcString, x as localInputStringToUtc, y as getShortTimezoneDisplay } from "../to-api-format-CzPt5UAX.mjs";
|
|
9
9
|
|
|
10
10
|
export { CustomRangePanel as AbsoluteRangePanel, CustomRangePanel, CalendarDatePicker, DEFAULT_PRESETS, QuickRangesPanel, TimeRangePicker, TimezoneSelector, createTimezoneOption, formatDateForInput, formatSingleTimeDisplay, formatTimeRangeDisplay, formatTimezoneLabel, formatUtcForDisplay, getBrowserTimezone, getDefaultPreset, getDefaultTimezoneOptions, getPresetByKey, getPresetByShortcut, getPresetRange, getShortTimezoneDisplay, getTimezoneOffset, localInputStringToUtc, toApiTimeRange, utcStringToZonedDate, utcToLocalInputString, zonedDateToUtcString };
|
package/dist/dropdown/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as DropdownMenuItem, c as DropdownMenuRadioGroup, d as DropdownMenuShortcut, f as DropdownMenuSub, h as DropdownMenuTrigger, i as DropdownMenuGroup, l as DropdownMenuRadioItem, m as DropdownMenuSubTrigger, n as DropdownMenuCheckboxItem, o as DropdownMenuLabel, p as DropdownMenuSubContent, r as DropdownMenuContent, s as DropdownMenuPortal, t as DropdownMenu, u as DropdownMenuSeparator } from "../dropdown-
|
|
1
|
+
import { a as DropdownMenuItem, c as DropdownMenuRadioGroup, d as DropdownMenuShortcut, f as DropdownMenuSub, h as DropdownMenuTrigger, i as DropdownMenuGroup, l as DropdownMenuRadioItem, m as DropdownMenuSubTrigger, n as DropdownMenuCheckboxItem, o as DropdownMenuLabel, p as DropdownMenuSubContent, r as DropdownMenuContent, s as DropdownMenuPortal, t as DropdownMenu, u as DropdownMenuSeparator } from "../dropdown-Dgm_b6Mm.mjs";
|
|
2
2
|
|
|
3
3
|
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
package/dist/dropzone/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../utils-Bfgoe-Gm.mjs";
|
|
2
2
|
import "../button-AzpnV-WB.mjs";
|
|
3
|
-
import { i as FileInputButton, n as DropzoneContent, r as DropzoneEmptyState, t as Dropzone } from "../dropzone-
|
|
3
|
+
import { i as FileInputButton, n as DropzoneContent, r as DropzoneEmptyState, t as Dropzone } from "../dropzone-DR6O9OdU.mjs";
|
|
4
4
|
|
|
5
5
|
export { Dropzone, DropzoneContent, DropzoneEmptyState, FileInputButton };
|
package/dist/form/index.mjs
CHANGED
|
@@ -9,9 +9,9 @@ import "../label-_ste_Re3.mjs";
|
|
|
9
9
|
import "../popover-Ds9624qY.mjs";
|
|
10
10
|
import "../radio-group-B9Hm77LQ.mjs";
|
|
11
11
|
import "../select-CwVIFWFO.mjs";
|
|
12
|
-
import "../
|
|
13
|
-
import "../
|
|
14
|
-
import { A as FormButton, C as FormField, D as FormCustom, E as FormDescription, O as FormCopyBox, S as FormFieldArray, T as FormDialog, _ as FormSelectItem, a as FormInputGroup, b as FormRadioItem, c as FormStep, d as useWatch, f as useWatchAll, g as FormSelect, h as FormSubmit, i as useField, j as FormAutocomplete, k as FormCheckbox, l as FormStepper, m as FormSwitch, n as useFormContext, o as StepperNavigation, p as FormTextarea, r as useFieldContext, s as StepperControls, t as useStepper, u as FormWhen, v as FormRoot, w as FormError, x as FormInput, y as FormRadioGroup } from "../use-stepper-
|
|
12
|
+
import "../tooltip-U3XxlW4l.mjs";
|
|
13
|
+
import "../switch-Cn9IM2gC.mjs";
|
|
14
|
+
import { A as FormButton, C as FormField, D as FormCustom, E as FormDescription, O as FormCopyBox, S as FormFieldArray, T as FormDialog, _ as FormSelectItem, a as FormInputGroup, b as FormRadioItem, c as FormStep, d as useWatch, f as useWatchAll, g as FormSelect, h as FormSubmit, i as useField, j as FormAutocomplete, k as FormCheckbox, l as FormStepper, m as FormSwitch, n as useFormContext, o as StepperNavigation, p as FormTextarea, r as useFieldContext, s as StepperControls, t as useStepper, u as FormWhen, v as FormRoot, w as FormError, x as FormInput, y as FormRadioGroup } from "../use-stepper-DJd8o9dV.mjs";
|
|
15
15
|
|
|
16
16
|
//#region src/components/features/form/index.ts
|
|
17
17
|
/**
|
package/dist/grid/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as getResponsiveValue, c as GRID_COLUMNS, d as RESPONSIVE_MAP, i as getGutter, l as GRID_PREFIX, n as Row, o as registerMediaQuery, r as RowContext, s as GRID_BREAKPOINTS, t as Col, u as RESPONSIVE_ARRAY } from "../col-
|
|
1
|
+
import { a as getResponsiveValue, c as GRID_COLUMNS, d as RESPONSIVE_MAP, i as getGutter, l as GRID_PREFIX, n as Row, o as registerMediaQuery, r as RowContext, s as GRID_BREAKPOINTS, t as Col, u as RESPONSIVE_ARRAY } from "../col-DCneNxQj.mjs";
|
|
2
2
|
|
|
3
3
|
export { Col, GRID_BREAKPOINTS, GRID_COLUMNS, GRID_PREFIX, RESPONSIVE_ARRAY, RESPONSIVE_MAP, Row, RowContext, getGutter, getResponsiveValue, registerMediaQuery };
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as useCopyToClipboard } from "../use-copy-to-clipboard-
|
|
2
|
-
import { t as useDebounce } from "../use-debounce-
|
|
1
|
+
import { t as useCopyToClipboard } from "../use-copy-to-clipboard-C9cT2Qb-.mjs";
|
|
2
|
+
import { t as useDebounce } from "../use-debounce-Dc95PFRX.mjs";
|
|
3
3
|
|
|
4
4
|
export { useCopyToClipboard, useDebounce };
|