@siyahi/ui 0.0.0-stage → 0.1.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +174 -2
- package/THIRD_PARTY_NOTICES.md +51 -0
- package/dist/components/registry/dashboard-01/section-cards.d.ts +17 -0
- package/dist/components/registry/dashboard-01/section-cards.js +39 -0
- package/dist/components/registry/dashboardcn/bar-list.d.ts +24 -0
- package/dist/components/registry/dashboardcn/bar-list.js +71 -0
- package/dist/components/registry/heatmap/calendar-heatmap.d.ts +134 -0
- package/dist/components/registry/heatmap/calendar-heatmap.js +497 -0
- package/dist/components/registry/heatmap/status-heatmap.d.ts +120 -0
- package/dist/components/registry/heatmap/status-heatmap.js +330 -0
- package/dist/components/registry/heatmap/weekday-heatmap.d.ts +145 -0
- package/dist/components/registry/heatmap/weekday-heatmap.js +489 -0
- package/dist/components/registry/niko-table/components/data-table-column-actions.d.ts +26 -0
- package/dist/components/registry/niko-table/components/data-table-column-actions.js +32 -0
- package/dist/components/registry/niko-table/components/data-table-column-filter.d.ts +13 -0
- package/dist/components/registry/niko-table/components/data-table-column-filter.js +17 -0
- package/dist/components/registry/niko-table/components/data-table-column-header.d.ts +30 -0
- package/dist/components/registry/niko-table/components/data-table-column-header.js +35 -0
- package/dist/components/registry/niko-table/components/data-table-column-sort.d.ts +21 -0
- package/dist/components/registry/niko-table/components/data-table-column-sort.js +36 -0
- package/dist/components/registry/niko-table/components/data-table-column-title.d.ts +12 -0
- package/dist/components/registry/niko-table/components/data-table-column-title.js +18 -0
- package/dist/components/registry/niko-table/components/data-table-empty-state.d.ts +108 -0
- package/dist/components/registry/niko-table/components/data-table-empty-state.js +148 -0
- package/dist/components/registry/niko-table/components/data-table-faceted-filter.d.ts +46 -0
- package/dist/components/registry/niko-table/components/data-table-faceted-filter.js +133 -0
- package/dist/components/registry/niko-table/components/data-table-grouped-rows.d.ts +111 -0
- package/dist/components/registry/niko-table/components/data-table-grouped-rows.js +77 -0
- package/dist/components/registry/niko-table/components/data-table-row-context-menu-slot.d.ts +65 -0
- package/dist/components/registry/niko-table/components/data-table-row-context-menu-slot.js +65 -0
- package/dist/components/registry/niko-table/components/data-table-row-context-menu.d.ts +50 -0
- package/dist/components/registry/niko-table/components/data-table-row-context-menu.js +42 -0
- package/dist/components/registry/niko-table/components/data-table-row-menu.d.ts +51 -0
- package/dist/components/registry/niko-table/components/data-table-row-menu.js +65 -0
- package/dist/components/registry/niko-table/components/data-table-toolbar-section.d.ts +7 -0
- package/dist/components/registry/niko-table/components/data-table-toolbar-section.js +63 -0
- package/dist/components/registry/niko-table/config/data-table.d.ts +156 -0
- package/dist/components/registry/niko-table/config/data-table.js +279 -0
- package/dist/components/registry/niko-table/config/feature-detection.d.ts +39 -0
- package/dist/components/registry/niko-table/config/feature-detection.js +174 -0
- package/dist/components/registry/niko-table/core/data-table-context.d.ts +157 -0
- package/dist/components/registry/niko-table/core/data-table-context.js +326 -0
- package/dist/components/registry/niko-table/core/data-table-error-boundary.d.ts +85 -0
- package/dist/components/registry/niko-table/core/data-table-error-boundary.js +116 -0
- package/dist/components/registry/niko-table/core/data-table-grouped-row.d.ts +49 -0
- package/dist/components/registry/niko-table/core/data-table-grouped-row.js +112 -0
- package/dist/components/registry/niko-table/core/data-table-root.d.ts +62 -0
- package/dist/components/registry/niko-table/core/data-table-root.js +406 -0
- package/dist/components/registry/niko-table/core/data-table-structure.d.ts +153 -0
- package/dist/components/registry/niko-table/core/data-table-structure.js +370 -0
- package/dist/components/registry/niko-table/core/data-table.d.ts +30 -0
- package/dist/components/registry/niko-table/core/data-table.js +126 -0
- package/dist/components/registry/niko-table/filters/table-column-actions.d.ts +49 -0
- package/dist/components/registry/niko-table/filters/table-column-actions.js +48 -0
- package/dist/components/registry/niko-table/filters/table-column-sort.d.ts +51 -0
- package/dist/components/registry/niko-table/filters/table-column-sort.js +184 -0
- package/dist/components/registry/niko-table/filters/table-column-title.d.ts +17 -0
- package/dist/components/registry/niko-table/filters/table-column-title.js +20 -0
- package/dist/components/registry/niko-table/filters/table-faceted-filter.d.ts +40 -0
- package/dist/components/registry/niko-table/filters/table-faceted-filter.js +210 -0
- package/dist/components/registry/niko-table/hooks/use-derived-column-title.d.ts +29 -0
- package/dist/components/registry/niko-table/hooks/use-derived-column-title.js +40 -0
- package/dist/components/registry/niko-table/hooks/use-generated-options.d.ts +49 -0
- package/dist/components/registry/niko-table/hooks/use-generated-options.js +144 -0
- package/dist/components/registry/niko-table/lib/build-faceted-options.d.ts +59 -0
- package/dist/components/registry/niko-table/lib/build-faceted-options.js +82 -0
- package/dist/components/registry/niko-table/lib/column-resize-handle.d.ts +33 -0
- package/dist/components/registry/niko-table/lib/column-resize-handle.js +175 -0
- package/dist/components/registry/niko-table/lib/constants.d.ts +128 -0
- package/dist/components/registry/niko-table/lib/constants.js +123 -0
- package/dist/components/registry/niko-table/lib/create-scroll-handler.d.ts +35 -0
- package/dist/components/registry/niko-table/lib/create-scroll-handler.js +63 -0
- package/dist/components/registry/niko-table/lib/data-table-features.d.ts +218 -0
- package/dist/components/registry/niko-table/lib/data-table-features.js +127 -0
- package/dist/components/registry/niko-table/lib/filter-functions.d.ts +47 -0
- package/dist/components/registry/niko-table/lib/filter-functions.js +309 -0
- package/dist/components/registry/niko-table/lib/filter-rows.d.ts +14 -0
- package/dist/components/registry/niko-table/lib/filter-rows.js +28 -0
- package/dist/components/registry/niko-table/lib/flex-columns.d.ts +48 -0
- package/dist/components/registry/niko-table/lib/flex-columns.js +65 -0
- package/dist/components/registry/niko-table/lib/format.d.ts +33 -0
- package/dist/components/registry/niko-table/lib/format.js +99 -0
- package/dist/components/registry/niko-table/lib/render-cell-content.d.ts +17 -0
- package/dist/components/registry/niko-table/lib/render-cell-content.js +65 -0
- package/dist/components/registry/niko-table/lib/row-click.d.ts +67 -0
- package/dist/components/registry/niko-table/lib/row-click.js +28 -0
- package/dist/components/registry/niko-table/lib/styles.d.ts +6 -0
- package/dist/components/registry/niko-table/lib/styles.js +24 -0
- package/dist/components/registry/niko-table/lib/use-header-min-widths.d.ts +17 -0
- package/dist/components/registry/niko-table/lib/use-header-min-widths.js +82 -0
- package/dist/components/registry/niko-table/types/index.d.ts +141 -0
- package/dist/components/registry/niko-table/types/index.js +2 -0
- package/dist/components/registry/niko-table/ui/table.d.ts +13 -0
- package/dist/components/registry/niko-table/ui/table.js +74 -0
- package/dist/components/registry/sidebar-07/app-sidebar.d.ts +18 -0
- package/dist/components/registry/sidebar-07/app-sidebar.js +26 -0
- package/dist/components/registry/sidebar-07/nav-main.d.ts +15 -0
- package/dist/components/registry/sidebar-07/nav-main.js +25 -0
- package/dist/components/registry/sidebar-07/nav-projects.d.ts +9 -0
- package/dist/components/registry/sidebar-07/nav-projects.js +43 -0
- package/dist/components/registry/sidebar-07/nav-user.d.ts +9 -0
- package/dist/components/registry/sidebar-07/nav-user.js +70 -0
- package/dist/components/registry/sidebar-07/team-switcher.d.ts +10 -0
- package/dist/components/registry/sidebar-07/team-switcher.js +70 -0
- package/dist/components/siyahi/delta.d.ts +10 -0
- package/dist/components/siyahi/delta.js +27 -0
- package/dist/components/siyahi/local-time.d.ts +7 -0
- package/dist/components/siyahi/local-time.js +22 -0
- package/dist/components/siyahi/price-chart.d.ts +12 -0
- package/dist/components/siyahi/price-chart.js +80 -0
- package/dist/components/siyahi/siyahi-provider.d.ts +12 -0
- package/dist/components/siyahi/siyahi-provider.js +31 -0
- package/dist/components/siyahi/treemap.d.ts +14 -0
- package/dist/components/siyahi/treemap.js +58 -0
- package/dist/components/ui/alert.d.ts +12 -0
- package/dist/components/ui/alert.js +43 -0
- package/dist/components/ui/avatar.d.ts +13 -0
- package/dist/components/ui/avatar.js +50 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/badge.js +29 -0
- package/dist/components/ui/breadcrumb.d.ts +12 -0
- package/dist/components/ui/breadcrumb.js +72 -0
- package/dist/components/ui/button.d.ts +10 -0
- package/dist/components/ui/button.js +44 -0
- package/dist/components/ui/calendar.d.ts +12 -0
- package/dist/components/ui/calendar.js +107 -0
- package/dist/components/ui/card.d.ts +13 -0
- package/dist/components/ui/card.js +56 -0
- package/dist/components/ui/chart.d.ts +46 -0
- package/dist/components/ui/chart.js +149 -0
- package/dist/components/ui/collapsible.d.ts +7 -0
- package/dist/components/ui/collapsible.js +24 -0
- package/dist/components/ui/command.d.ts +21 -0
- package/dist/components/ui/command.js +88 -0
- package/dist/components/ui/context-menu.d.ts +31 -0
- package/dist/components/ui/context-menu.js +132 -0
- package/dist/components/ui/dialog.d.ts +19 -0
- package/dist/components/ui/dialog.js +91 -0
- package/dist/components/ui/dropdown-menu.d.ts +31 -0
- package/dist/components/ui/dropdown-menu.js +136 -0
- package/dist/components/ui/input-group.d.ts +20 -0
- package/dist/components/ui/input-group.js +79 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/input.js +15 -0
- package/dist/components/ui/popover.d.ts +11 -0
- package/dist/components/ui/popover.js +55 -0
- package/dist/components/ui/progress.d.ts +9 -0
- package/dist/components/ui/progress.js +43 -0
- package/dist/components/ui/scroll-area.d.ts +7 -0
- package/dist/components/ui/scroll-area.js +36 -0
- package/dist/components/ui/select.d.ts +17 -0
- package/dist/components/ui/select.js +97 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.js +15 -0
- package/dist/components/ui/sheet.d.ts +16 -0
- package/dist/components/ui/sheet.js +89 -0
- package/dist/components/ui/sidebar.d.ts +65 -0
- package/dist/components/ui/sidebar.js +385 -0
- package/dist/components/ui/skeleton.d.ts +4 -0
- package/dist/components/ui/skeleton.js +12 -0
- package/dist/components/ui/slider.d.ts +5 -0
- package/dist/components/ui/slider.js +33 -0
- package/dist/components/ui/table.d.ts +12 -0
- package/dist/components/ui/table.js +66 -0
- package/dist/components/ui/tabs.d.ts +12 -0
- package/dist/components/ui/tabs.js +45 -0
- package/dist/components/ui/textarea.d.ts +5 -0
- package/dist/components/ui/textarea.js +13 -0
- package/dist/components/ui/toggle-group.d.ts +13 -0
- package/dist/components/ui/toggle-group.js +52 -0
- package/dist/components/ui/toggle.d.ts +10 -0
- package/dist/components/ui/toggle.js +36 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.js +41 -0
- package/dist/hooks/use-mobile.d.ts +3 -0
- package/dist/hooks/use-mobile.js +18 -0
- package/dist/index.d.ts +73 -0
- package/dist/index.js +71 -0
- package/dist/lib/format.d.ts +24 -0
- package/dist/lib/format.js +58 -0
- package/dist/lib/locale.d.ts +12 -0
- package/dist/lib/locale.js +8 -0
- package/dist/lib/recharts.d.ts +2 -0
- package/dist/lib/recharts.js +1 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +1 -0
- package/package.json +78 -3
- package/registry.lock.json +413 -0
- package/report.css +129 -0
- package/styles/shadcn.css +643 -0
- package/styles/siyahi.css +189 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useColumnHeaderContext } from "./data-table-column-header.js";
|
|
2
|
+
import { useDataTable } from "../core/data-table-context.js";
|
|
3
|
+
import { TableColumnSortMenu, TableColumnSortOptions } from "../filters/table-column-sort.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/registry/niko-table/components/data-table-column-sort.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Sorting options for column header menu using context.
|
|
9
|
+
*/
|
|
10
|
+
function DataTableColumnSortOptions(props) {
|
|
11
|
+
const { column } = useColumnHeaderContext(true);
|
|
12
|
+
const { table } = useDataTable();
|
|
13
|
+
return /* @__PURE__ */ jsx(TableColumnSortOptions, {
|
|
14
|
+
column,
|
|
15
|
+
table,
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
DataTableColumnSortOptions.displayName = "DataTableColumnSortOptions";
|
|
20
|
+
/**
|
|
21
|
+
* Sorting menu for column header using context.
|
|
22
|
+
*
|
|
23
|
+
* Standalone button variant for inline use outside dropdown menus.
|
|
24
|
+
*/
|
|
25
|
+
function DataTableColumnSortMenu(props) {
|
|
26
|
+
const { column } = useColumnHeaderContext(true);
|
|
27
|
+
const { table } = useDataTable();
|
|
28
|
+
return /* @__PURE__ */ jsx(TableColumnSortMenu, {
|
|
29
|
+
column,
|
|
30
|
+
table,
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
DataTableColumnSortMenu.displayName = "DataTableColumnSortMenu";
|
|
35
|
+
//#endregion
|
|
36
|
+
export { DataTableColumnSortMenu, DataTableColumnSortOptions };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TableColumnTitle } from "../filters/table-column-title.js";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { RowData } from "@tanstack/react-table";
|
|
4
|
+
//#region src/components/registry/niko-table/components/data-table-column-title.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Renders the column title using context.
|
|
7
|
+
*/
|
|
8
|
+
export declare function DataTableColumnTitle<TData extends RowData, TValue>(props: Omit<React.ComponentProps<typeof TableColumnTitle>, "column">): React.JSX.Element;
|
|
9
|
+
export declare namespace DataTableColumnTitle {
|
|
10
|
+
var displayName: string;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useColumnHeaderContext } from "./data-table-column-header.js";
|
|
2
|
+
import { TableColumnTitle } from "../filters/table-column-title.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/registry/niko-table/components/data-table-column-title.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Renders the column title using context.
|
|
8
|
+
*/
|
|
9
|
+
function DataTableColumnTitle(props) {
|
|
10
|
+
const { column } = useColumnHeaderContext(true);
|
|
11
|
+
return /* @__PURE__ */ jsx(TableColumnTitle, {
|
|
12
|
+
column,
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
DataTableColumnTitle.displayName = "DataTableColumnTitle";
|
|
17
|
+
//#endregion
|
|
18
|
+
export { DataTableColumnTitle };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
//#region src/components/registry/niko-table/components/data-table-empty-state.d.ts
|
|
3
|
+
export interface DataTableEmptyStateProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
isFiltered: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Root component for empty state composition.
|
|
10
|
+
* Provides context to child components about filter state.
|
|
11
|
+
*
|
|
12
|
+
* @internal - Used by DataTableEmptyBody and DataTableVirtualizedEmptyBody
|
|
13
|
+
*/
|
|
14
|
+
export declare function DataTableEmptyState({ children, isFiltered, className }: DataTableEmptyStateProps): React.JSX.Element;
|
|
15
|
+
export interface DataTableEmptyIconProps {
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Icon component for empty state. Memoized so table-state changes don't re-render it.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* <DataTableEmptyIcon>
|
|
24
|
+
* <PackageOpen />
|
|
25
|
+
* </DataTableEmptyIcon>
|
|
26
|
+
*/
|
|
27
|
+
export declare const DataTableEmptyIcon: React.MemoExoticComponent<({ children, className }: DataTableEmptyIconProps) => React.JSX.Element>;
|
|
28
|
+
export interface DataTableEmptyMessageProps {
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Message component for empty state. Memoized; renders only when not filtered.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* <DataTableEmptyMessage>
|
|
37
|
+
* <p className="font-semibold">No products found</p>
|
|
38
|
+
* <p className="text-sm text-muted-foreground">
|
|
39
|
+
* Get started by adding your first product
|
|
40
|
+
* </p>
|
|
41
|
+
* </DataTableEmptyMessage>
|
|
42
|
+
*/
|
|
43
|
+
export declare const DataTableEmptyMessage: React.MemoExoticComponent<({ children, className }: DataTableEmptyMessageProps) => React.JSX.Element | null>;
|
|
44
|
+
export interface DataTableEmptyFilteredMessageProps {
|
|
45
|
+
children: React.ReactNode;
|
|
46
|
+
className?: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Filtered-state message — renders only when a filter is active. Memoized.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* <DataTableEmptyFilteredMessage>
|
|
53
|
+
* No matches found for your search
|
|
54
|
+
* </DataTableEmptyFilteredMessage>
|
|
55
|
+
*/
|
|
56
|
+
export declare const DataTableEmptyFilteredMessage: React.MemoExoticComponent<({ children, className }: DataTableEmptyFilteredMessageProps) => React.JSX.Element | null>;
|
|
57
|
+
export interface DataTableEmptyActionsProps {
|
|
58
|
+
children: React.ReactNode;
|
|
59
|
+
className?: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Actions component for empty state.
|
|
63
|
+
* Displays action buttons or links (e.g., "Add Item", "Clear Filters").
|
|
64
|
+
* Memoized to prevent unnecessary re-renders.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* <DataTableEmptyActions>
|
|
68
|
+
* <Button onClick={handleAdd}>Add Product</Button>
|
|
69
|
+
* </DataTableEmptyActions>
|
|
70
|
+
*/
|
|
71
|
+
export declare const DataTableEmptyActions: React.MemoExoticComponent<({ children, className }: DataTableEmptyActionsProps) => React.JSX.Element>;
|
|
72
|
+
export interface DataTableEmptyTitleProps {
|
|
73
|
+
children: React.ReactNode;
|
|
74
|
+
className?: string;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Title component for empty state messages.
|
|
78
|
+
* Convenience wrapper for consistent title styling.
|
|
79
|
+
* Memoized to prevent unnecessary re-renders.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* <DataTableEmptyMessage>
|
|
83
|
+
* <DataTableEmptyTitle>No products found</DataTableEmptyTitle>
|
|
84
|
+
* <DataTableEmptyDescription>
|
|
85
|
+
* Get started by adding your first product
|
|
86
|
+
* </DataTableEmptyDescription>
|
|
87
|
+
* </DataTableEmptyMessage>
|
|
88
|
+
*/
|
|
89
|
+
export declare const DataTableEmptyTitle: React.MemoExoticComponent<({ children, className }: DataTableEmptyTitleProps) => React.JSX.Element>;
|
|
90
|
+
export interface DataTableEmptyDescriptionProps {
|
|
91
|
+
children: React.ReactNode;
|
|
92
|
+
className?: string;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Description component for empty state messages.
|
|
96
|
+
* Convenience wrapper for consistent description styling.
|
|
97
|
+
* Memoized to prevent unnecessary re-renders.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* <DataTableEmptyMessage>
|
|
101
|
+
* <DataTableEmptyTitle>No products found</DataTableEmptyTitle>
|
|
102
|
+
* <DataTableEmptyDescription>
|
|
103
|
+
* Get started by adding your first product
|
|
104
|
+
* </DataTableEmptyDescription>
|
|
105
|
+
* </DataTableEmptyMessage>
|
|
106
|
+
*/
|
|
107
|
+
export declare const DataTableEmptyDescription: React.MemoExoticComponent<({ children, className }: DataTableEmptyDescriptionProps) => React.JSX.Element>;
|
|
108
|
+
//#endregion
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../../../lib/utils.js";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/registry/niko-table/components/data-table-empty-state.tsx
|
|
6
|
+
/**
|
|
7
|
+
* niko-table — created by Semir N. (Semkoo, https://github.com/Semkoo) with AI assistance.
|
|
8
|
+
*
|
|
9
|
+
* Before reporting anything: please check the changelog first.
|
|
10
|
+
* - In-repo: ./CHANGELOG.md
|
|
11
|
+
* - Docs site: https://niko-table.com/changelog
|
|
12
|
+
*
|
|
13
|
+
* Found a bug or have a fix? Open an issue or PR on GitHub so other
|
|
14
|
+
* users (and future LLMs reading this code) benefit:
|
|
15
|
+
* https://github.com/Semkoo/niko-table-registry
|
|
16
|
+
*/
|
|
17
|
+
const DataTableEmptyStateContext = React.createContext(null);
|
|
18
|
+
function useDataTableEmptyState() {
|
|
19
|
+
const context = React.useContext(DataTableEmptyStateContext);
|
|
20
|
+
if (!context) throw new Error("Empty state components must be used within DataTableEmptyState");
|
|
21
|
+
return context;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Root component for empty state composition.
|
|
25
|
+
* Provides context to child components about filter state.
|
|
26
|
+
*
|
|
27
|
+
* @internal - Used by DataTableEmptyBody and DataTableVirtualizedEmptyBody
|
|
28
|
+
*/
|
|
29
|
+
function DataTableEmptyState({ children, isFiltered, className }) {
|
|
30
|
+
return /* @__PURE__ */ jsx(DataTableEmptyStateContext.Provider, {
|
|
31
|
+
value: { isFiltered },
|
|
32
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
33
|
+
className: cn("flex flex-col items-center justify-center gap-3 py-4", className),
|
|
34
|
+
children
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Icon component for empty state. Memoized so table-state changes don't re-render it.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* <DataTableEmptyIcon>
|
|
43
|
+
* <PackageOpen />
|
|
44
|
+
* </DataTableEmptyIcon>
|
|
45
|
+
*/
|
|
46
|
+
const DataTableEmptyIcon = React.memo(function DataTableEmptyIcon({ children, className }) {
|
|
47
|
+
return /* @__PURE__ */ jsx("div", {
|
|
48
|
+
className: cn("text-muted-foreground/50", className),
|
|
49
|
+
children
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
DataTableEmptyIcon.displayName = "DataTableEmptyIcon";
|
|
53
|
+
/**
|
|
54
|
+
* Message component for empty state. Memoized; renders only when not filtered.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* <DataTableEmptyMessage>
|
|
58
|
+
* <p className="font-semibold">No products found</p>
|
|
59
|
+
* <p className="text-sm text-muted-foreground">
|
|
60
|
+
* Get started by adding your first product
|
|
61
|
+
* </p>
|
|
62
|
+
* </DataTableEmptyMessage>
|
|
63
|
+
*/
|
|
64
|
+
const DataTableEmptyMessage = React.memo(function DataTableEmptyMessage({ children, className }) {
|
|
65
|
+
const { isFiltered } = useDataTableEmptyState();
|
|
66
|
+
if (isFiltered) return null;
|
|
67
|
+
return /* @__PURE__ */ jsx("div", {
|
|
68
|
+
className: cn("flex flex-col items-center gap-1 text-center text-muted-foreground", className),
|
|
69
|
+
children
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
DataTableEmptyMessage.displayName = "DataTableEmptyMessage";
|
|
73
|
+
/**
|
|
74
|
+
* Filtered-state message — renders only when a filter is active. Memoized.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* <DataTableEmptyFilteredMessage>
|
|
78
|
+
* No matches found for your search
|
|
79
|
+
* </DataTableEmptyFilteredMessage>
|
|
80
|
+
*/
|
|
81
|
+
const DataTableEmptyFilteredMessage = React.memo(function DataTableEmptyFilteredMessage({ children, className }) {
|
|
82
|
+
const { isFiltered } = useDataTableEmptyState();
|
|
83
|
+
if (!isFiltered) return null;
|
|
84
|
+
return /* @__PURE__ */ jsx("div", {
|
|
85
|
+
className: cn("flex flex-col items-center gap-1 text-center text-muted-foreground", className),
|
|
86
|
+
children
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
DataTableEmptyFilteredMessage.displayName = "DataTableEmptyFilteredMessage";
|
|
90
|
+
/**
|
|
91
|
+
* Actions component for empty state.
|
|
92
|
+
* Displays action buttons or links (e.g., "Add Item", "Clear Filters").
|
|
93
|
+
* Memoized to prevent unnecessary re-renders.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* <DataTableEmptyActions>
|
|
97
|
+
* <Button onClick={handleAdd}>Add Product</Button>
|
|
98
|
+
* </DataTableEmptyActions>
|
|
99
|
+
*/
|
|
100
|
+
const DataTableEmptyActions = React.memo(function DataTableEmptyActions({ children, className }) {
|
|
101
|
+
return /* @__PURE__ */ jsx("div", {
|
|
102
|
+
className: cn("mt-2 flex gap-2", className),
|
|
103
|
+
children
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
DataTableEmptyActions.displayName = "DataTableEmptyActions";
|
|
107
|
+
/**
|
|
108
|
+
* Title component for empty state messages.
|
|
109
|
+
* Convenience wrapper for consistent title styling.
|
|
110
|
+
* Memoized to prevent unnecessary re-renders.
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* <DataTableEmptyMessage>
|
|
114
|
+
* <DataTableEmptyTitle>No products found</DataTableEmptyTitle>
|
|
115
|
+
* <DataTableEmptyDescription>
|
|
116
|
+
* Get started by adding your first product
|
|
117
|
+
* </DataTableEmptyDescription>
|
|
118
|
+
* </DataTableEmptyMessage>
|
|
119
|
+
*/
|
|
120
|
+
const DataTableEmptyTitle = React.memo(function DataTableEmptyTitle({ children, className }) {
|
|
121
|
+
return /* @__PURE__ */ jsx("p", {
|
|
122
|
+
className: cn("font-semibold", className),
|
|
123
|
+
children
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
DataTableEmptyTitle.displayName = "DataTableEmptyTitle";
|
|
127
|
+
/**
|
|
128
|
+
* Description component for empty state messages.
|
|
129
|
+
* Convenience wrapper for consistent description styling.
|
|
130
|
+
* Memoized to prevent unnecessary re-renders.
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* <DataTableEmptyMessage>
|
|
134
|
+
* <DataTableEmptyTitle>No products found</DataTableEmptyTitle>
|
|
135
|
+
* <DataTableEmptyDescription>
|
|
136
|
+
* Get started by adding your first product
|
|
137
|
+
* </DataTableEmptyDescription>
|
|
138
|
+
* </DataTableEmptyMessage>
|
|
139
|
+
*/
|
|
140
|
+
const DataTableEmptyDescription = React.memo(function DataTableEmptyDescription({ children, className }) {
|
|
141
|
+
return /* @__PURE__ */ jsx("p", {
|
|
142
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
143
|
+
children
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
DataTableEmptyDescription.displayName = "DataTableEmptyDescription";
|
|
147
|
+
//#endregion
|
|
148
|
+
export { DataTableEmptyActions, DataTableEmptyDescription, DataTableEmptyFilteredMessage, DataTableEmptyIcon, DataTableEmptyMessage, DataTableEmptyState, DataTableEmptyTitle };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Option } from "../types/index.js";
|
|
2
|
+
import { TableFacetedFilterProps } from "../filters/table-faceted-filter.js";
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
import { RowData } from "@tanstack/react-table";
|
|
5
|
+
//#region src/components/registry/niko-table/components/data-table-faceted-filter.d.ts
|
|
6
|
+
type DataTableFacetedFilterProps<TData extends RowData, TValue> = Omit<TableFacetedFilterProps<TData, TValue>, "column" | "options"> & {
|
|
7
|
+
/**
|
|
8
|
+
* The accessor key of the column to filter (matches column definition)
|
|
9
|
+
*/
|
|
10
|
+
accessorKey: keyof TData & string;
|
|
11
|
+
/**
|
|
12
|
+
* Optional title override (if not provided, will use column.meta.label)
|
|
13
|
+
*/
|
|
14
|
+
title?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Static options (if provided, will be used instead of dynamic generation)
|
|
17
|
+
*/
|
|
18
|
+
options?: Option[];
|
|
19
|
+
/**
|
|
20
|
+
* Whether to show counts for each option
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
showCounts?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Whether to update counts based on other active filters
|
|
26
|
+
* @default true
|
|
27
|
+
*/
|
|
28
|
+
dynamicCounts?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* If true, only show options that exist in the currently filtered table rows.
|
|
31
|
+
* If false, show all options from the entire dataset (useful for multi-select filters
|
|
32
|
+
* where you want to see all possible options even if they're not in the current filtered results).
|
|
33
|
+
* @default !multiple (true for single-select, false for multi-select)
|
|
34
|
+
*/
|
|
35
|
+
limitToFilteredRows?: boolean;
|
|
36
|
+
};
|
|
37
|
+
export declare function DataTableFacetedFilter<TData extends RowData, TValue = unknown>({ accessorKey, options, showCounts, dynamicCounts, limitToFilteredRows, title, multiple, trigger, ...props }: DataTableFacetedFilterProps<TData, TValue>): React$1.JSX.Element | null;
|
|
38
|
+
export declare namespace DataTableFacetedFilter {
|
|
39
|
+
var displayName: string;
|
|
40
|
+
}
|
|
41
|
+
export declare function DataTableFacetedFilterContent<TData extends RowData, TValue = unknown>({ accessorKey, options, showCounts, dynamicCounts, limitToFilteredRows, title, multiple, onValueChange }: DataTableFacetedFilterProps<TData, TValue>): React$1.JSX.Element | null;
|
|
42
|
+
export declare namespace DataTableFacetedFilterContent {
|
|
43
|
+
var displayName: string;
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { useGeneratedOptionsForColumn } from "../hooks/use-generated-options.js";
|
|
2
|
+
import { useDataTable } from "../core/data-table-context.js";
|
|
3
|
+
import { useDerivedColumnTitle } from "../hooks/use-derived-column-title.js";
|
|
4
|
+
import { TableFacetedFilter, TableFacetedFilterContent, useTableFacetedFilter } from "../filters/table-faceted-filter.js";
|
|
5
|
+
import { buildFacetedOptions } from "../lib/build-faceted-options.js";
|
|
6
|
+
import * as React$1 from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/registry/niko-table/components/data-table-faceted-filter.tsx
|
|
9
|
+
function useFacetedOptions({ table, accessorKey, options, showCounts, dynamicCounts, limitToFilteredRows, precomputedOptions }) {
|
|
10
|
+
const column = table.getColumn(accessorKey);
|
|
11
|
+
const metaGenerated = precomputedOptions?.[accessorKey] ?? [];
|
|
12
|
+
const needsFallbackGeneration = !precomputedOptions;
|
|
13
|
+
const perColumnGenerated = useGeneratedOptionsForColumn(table, needsFallbackGeneration ? accessorKey : "__noop__", {
|
|
14
|
+
showCounts,
|
|
15
|
+
dynamicCounts,
|
|
16
|
+
limitToFilteredRows
|
|
17
|
+
});
|
|
18
|
+
const resolvedMetaGenerated = needsFallbackGeneration ? perColumnGenerated : metaGenerated;
|
|
19
|
+
const state = table.state;
|
|
20
|
+
const columnFilters = state.columnFilters;
|
|
21
|
+
const globalFilter = state.globalFilter;
|
|
22
|
+
const coreRows = table.getCoreRowModel().rows;
|
|
23
|
+
return React$1.useMemo(() => {
|
|
24
|
+
if (!column) return [];
|
|
25
|
+
const meta = column.columnDef.meta;
|
|
26
|
+
const autoOptionsFormat = meta?.autoOptionsFormat ?? true;
|
|
27
|
+
const formatOptionLabel = meta?.formatOptionLabel;
|
|
28
|
+
if (options && options.length > 0) return buildFacetedOptions(table, coreRows, accessorKey, columnFilters, globalFilter, {
|
|
29
|
+
staticOptions: options,
|
|
30
|
+
limitToFilteredRows,
|
|
31
|
+
dynamicCounts,
|
|
32
|
+
showCounts,
|
|
33
|
+
autoOptionsFormat,
|
|
34
|
+
formatOptionLabel
|
|
35
|
+
});
|
|
36
|
+
if (resolvedMetaGenerated.length > 0) return resolvedMetaGenerated;
|
|
37
|
+
return buildFacetedOptions(table, coreRows, accessorKey, columnFilters, globalFilter, {
|
|
38
|
+
limitToFilteredRows,
|
|
39
|
+
dynamicCounts,
|
|
40
|
+
showCounts,
|
|
41
|
+
autoOptionsFormat,
|
|
42
|
+
formatOptionLabel
|
|
43
|
+
});
|
|
44
|
+
}, [
|
|
45
|
+
column,
|
|
46
|
+
options,
|
|
47
|
+
resolvedMetaGenerated,
|
|
48
|
+
table,
|
|
49
|
+
coreRows,
|
|
50
|
+
accessorKey,
|
|
51
|
+
columnFilters,
|
|
52
|
+
globalFilter,
|
|
53
|
+
limitToFilteredRows,
|
|
54
|
+
dynamicCounts,
|
|
55
|
+
showCounts
|
|
56
|
+
]);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Shared setup for the two exported wrapper components. Keeps column lookup,
|
|
60
|
+
* title derivation, and options resolution in one place so the wrappers stay
|
|
61
|
+
* thin.
|
|
62
|
+
*/
|
|
63
|
+
function useFacetedFilterSetup({ accessorKey, options, showCounts, dynamicCounts, limitToFilteredRows, title }) {
|
|
64
|
+
const { table, generatedOptionsMap } = useDataTable();
|
|
65
|
+
const column = table.getColumn(accessorKey);
|
|
66
|
+
return {
|
|
67
|
+
table,
|
|
68
|
+
column,
|
|
69
|
+
derivedTitle: useDerivedColumnTitle(column, accessorKey, title),
|
|
70
|
+
dynamicOptions: useFacetedOptions({
|
|
71
|
+
table,
|
|
72
|
+
accessorKey,
|
|
73
|
+
options,
|
|
74
|
+
showCounts,
|
|
75
|
+
dynamicCounts,
|
|
76
|
+
limitToFilteredRows,
|
|
77
|
+
precomputedOptions: generatedOptionsMap
|
|
78
|
+
})
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function DataTableFacetedFilter({ accessorKey, options, showCounts = true, dynamicCounts = true, limitToFilteredRows, title, multiple, trigger, ...props }) {
|
|
82
|
+
const { column, derivedTitle, dynamicOptions } = useFacetedFilterSetup({
|
|
83
|
+
accessorKey,
|
|
84
|
+
options,
|
|
85
|
+
showCounts,
|
|
86
|
+
dynamicCounts,
|
|
87
|
+
limitToFilteredRows: limitToFilteredRows ?? !multiple,
|
|
88
|
+
title
|
|
89
|
+
});
|
|
90
|
+
if (!column) {
|
|
91
|
+
console.warn(`Column with accessorKey "${accessorKey}" not found in table columns`);
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
return /* @__PURE__ */ jsx(TableFacetedFilter, {
|
|
95
|
+
column,
|
|
96
|
+
options: dynamicOptions,
|
|
97
|
+
title: derivedTitle,
|
|
98
|
+
multiple,
|
|
99
|
+
trigger,
|
|
100
|
+
...props
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* @required displayName is required for auto feature detection
|
|
105
|
+
* @see "feature-detection.ts"
|
|
106
|
+
*/
|
|
107
|
+
DataTableFacetedFilter.displayName = "DataTableFacetedFilter";
|
|
108
|
+
function DataTableFacetedFilterContent({ accessorKey, options, showCounts = true, dynamicCounts = true, limitToFilteredRows, title, multiple, onValueChange }) {
|
|
109
|
+
const { column, derivedTitle, dynamicOptions } = useFacetedFilterSetup({
|
|
110
|
+
accessorKey,
|
|
111
|
+
options,
|
|
112
|
+
showCounts,
|
|
113
|
+
dynamicCounts,
|
|
114
|
+
limitToFilteredRows: limitToFilteredRows ?? !multiple,
|
|
115
|
+
title
|
|
116
|
+
});
|
|
117
|
+
const { selectedValues, onItemSelect, onReset } = useTableFacetedFilter({
|
|
118
|
+
column,
|
|
119
|
+
onValueChange,
|
|
120
|
+
multiple
|
|
121
|
+
});
|
|
122
|
+
if (!column) return null;
|
|
123
|
+
return /* @__PURE__ */ jsx(TableFacetedFilterContent, {
|
|
124
|
+
title: derivedTitle,
|
|
125
|
+
options: dynamicOptions,
|
|
126
|
+
selectedValues,
|
|
127
|
+
onItemSelect,
|
|
128
|
+
onReset
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
DataTableFacetedFilterContent.displayName = "DataTableFacetedFilterContent";
|
|
132
|
+
//#endregion
|
|
133
|
+
export { DataTableFacetedFilter, DataTableFacetedFilterContent };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { DataTableRow } from "../types/index.js";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { RowData } from "@tanstack/react-table";
|
|
4
|
+
//#region src/components/registry/niko-table/components/data-table-grouped-rows.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* What a custom group-row child reads from context.
|
|
7
|
+
*
|
|
8
|
+
* Everything a group row needs is here, so the child stays a plain component
|
|
9
|
+
* rather than a function of arguments — the same contract `useDataTableRow`
|
|
10
|
+
* gives a row menu.
|
|
11
|
+
*/
|
|
12
|
+
export interface DataTableGroupRowContextValue<TData extends RowData = RowData> {
|
|
13
|
+
/** The grouped row itself (`row.getIsGrouped()` is true). */
|
|
14
|
+
row: DataTableRow<TData>;
|
|
15
|
+
/** Value the rows underneath share, already resolved from the grouped column. */
|
|
16
|
+
groupValue: unknown;
|
|
17
|
+
/** `groupValue` as a display string; empty when the value is null/undefined. */
|
|
18
|
+
groupLabel: string;
|
|
19
|
+
/** How many rows this group holds. */
|
|
20
|
+
count: number;
|
|
21
|
+
/** Whether the group is currently open. */
|
|
22
|
+
isExpanded: boolean;
|
|
23
|
+
/** Open/close the group. */
|
|
24
|
+
toggle: () => void;
|
|
25
|
+
/** Position in the current display model (post sort/filter/group). */
|
|
26
|
+
displayIndex: number;
|
|
27
|
+
/** Shared `columnId -> width`, so a custom row still lines up with its leaves. */
|
|
28
|
+
columnWidths: ReadonlyMap<string, number | string | undefined>;
|
|
29
|
+
}
|
|
30
|
+
/** Provider — used by the body, not by callers. */
|
|
31
|
+
export declare function DataTableGroupRowProvider({ value, children }: {
|
|
32
|
+
value: DataTableGroupRowContextValue;
|
|
33
|
+
children: React.ReactNode;
|
|
34
|
+
}): React.JSX.Element;
|
|
35
|
+
/**
|
|
36
|
+
* Read the group row a custom `<DataTableGroupedRows>` child is rendering for.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* function RegionGroupRow() {
|
|
40
|
+
* const { groupLabel, count, isExpanded, toggle } = useDataTableGroupRow()
|
|
41
|
+
* return (
|
|
42
|
+
* <TableCell colSpan={4} onClick={toggle}>
|
|
43
|
+
* {groupLabel} — {count} in region {isExpanded ? "▾" : "▸"}
|
|
44
|
+
* </TableCell>
|
|
45
|
+
* )
|
|
46
|
+
* }
|
|
47
|
+
*/
|
|
48
|
+
export declare function useDataTableGroupRow<TData extends RowData = RowData>(): DataTableGroupRowContextValue<TData>;
|
|
49
|
+
export interface DataTableGroupedRowsProps<TData extends RowData = RowData> {
|
|
50
|
+
/**
|
|
51
|
+
* Optional replacement for the built-in group row. Composed as a child, not
|
|
52
|
+
* passed as a render prop or a callback:
|
|
53
|
+
*
|
|
54
|
+
* <DataTableGroupedRows>
|
|
55
|
+
* <RegionGroupRow />
|
|
56
|
+
* </DataTableGroupedRows>
|
|
57
|
+
*
|
|
58
|
+
* The child renders the row's cells; the body owns the surrounding
|
|
59
|
+
* `<TableRow>` so column geometry, parity and data attributes stay
|
|
60
|
+
* consistent with the leaf rows. Read the group from `useDataTableGroupRow()`.
|
|
61
|
+
*
|
|
62
|
+
* Omit it and the built-in row renders: a chevron, the group value, and a
|
|
63
|
+
* `· N rows` count, with aggregated cells from each column's
|
|
64
|
+
* `aggregatedCell` / `aggregationFn`.
|
|
65
|
+
*/
|
|
66
|
+
children?: React.ReactNode;
|
|
67
|
+
/**
|
|
68
|
+
* Optional per-group predicate — return `false` to fall back to the built-in
|
|
69
|
+
* row for that group. Table-level gating is better expressed by simply not
|
|
70
|
+
* nesting this component.
|
|
71
|
+
*/
|
|
72
|
+
enabledFor?: (row: DataTableRow<TData>) => boolean;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Declarative, composable group rows for niko-table bodies.
|
|
76
|
+
*
|
|
77
|
+
* Nest it inside a `DataTableBody` so grouping reads as part of the table's
|
|
78
|
+
* JSX tree. It renders nothing itself — its presence is what turns grouping
|
|
79
|
+
* on (feature detection maps it to `enableGrouping` + `enableExpanding`), and
|
|
80
|
+
* the body renders a group row wherever TanStack's grouped row model produces
|
|
81
|
+
* one.
|
|
82
|
+
*
|
|
83
|
+
* This is the whole opt-in. There is no `enableGrouping` config flag to set
|
|
84
|
+
* and no renderer to wire up: compose the component, or don't.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* // Built-in group row
|
|
88
|
+
* <DataTableBody>
|
|
89
|
+
* <DataTableGroupedRows />
|
|
90
|
+
* </DataTableBody>
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* // Your own, reading the group from context
|
|
94
|
+
* <DataTableBody>
|
|
95
|
+
* <DataTableGroupedRows>
|
|
96
|
+
* <RegionGroupRow />
|
|
97
|
+
* </DataTableGroupedRows>
|
|
98
|
+
* </DataTableBody>
|
|
99
|
+
*/
|
|
100
|
+
export declare function DataTableGroupedRows<TData extends RowData = RowData>(_props: DataTableGroupedRowsProps<TData>): null;
|
|
101
|
+
export declare namespace DataTableGroupedRows {
|
|
102
|
+
var displayName: string;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Body-side: find a nested `<DataTableGroupedRows>` among `children`.
|
|
106
|
+
*
|
|
107
|
+
* Matches on `displayName` as well as reference, because re-exports and HMR
|
|
108
|
+
* both break reference equality.
|
|
109
|
+
*/
|
|
110
|
+
export declare function resolveGroupedRowsSlot<TData extends RowData = RowData>(children: React.ReactNode): DataTableGroupedRowsProps<TData> | undefined;
|
|
111
|
+
//#endregion
|