@rafal.lemieszewski/tide-ui 0.17.0 → 0.18.1
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/components/ui/data-table.d.ts +65 -4
- package/dist/components/ui/table.d.ts +8 -0
- package/dist/index.cjs.js +1695 -1691
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +28395 -24561
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -1
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import { ColumnDef, FilterFn } from '@tanstack/react-table';
|
|
1
|
+
import { ColumnDef, ExpandedState, GroupingState, FilterFn, ColumnResizeMode } from '@tanstack/react-table';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
export type FilterVariant = "text" | "select" | "multiselect" | "number" | "date" | "boolean";
|
|
4
|
+
export interface NestedHeaderConfig {
|
|
5
|
+
id: string;
|
|
6
|
+
header: string | React.ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
columns: ColumnDef<any, any>[];
|
|
10
|
+
}
|
|
4
11
|
export interface ColumnMeta {
|
|
5
12
|
label?: string;
|
|
6
13
|
filterVariant?: FilterVariant;
|
|
@@ -14,13 +21,26 @@ export interface ColumnMeta {
|
|
|
14
21
|
}
|
|
15
22
|
declare const fuzzyFilter: FilterFn<any>;
|
|
16
23
|
declare const multiSelectFilter: FilterFn<any>;
|
|
24
|
+
interface DataTableSkeletonProps {
|
|
25
|
+
columns: number;
|
|
26
|
+
rows: number;
|
|
27
|
+
showRowBorder?: boolean;
|
|
28
|
+
showCellBorder?: boolean;
|
|
29
|
+
}
|
|
30
|
+
declare function DataTableSkeleton({ columns, rows, showRowBorder, showCellBorder }: DataTableSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
17
31
|
interface DataTableToolbarProps<_TData = any> {
|
|
18
32
|
table: any;
|
|
19
33
|
searchKey?: string;
|
|
20
34
|
searchPlaceholder?: string;
|
|
21
35
|
showViewOptions?: boolean;
|
|
36
|
+
enableGlobalSearch?: boolean;
|
|
37
|
+
globalSearchPlaceholder?: string;
|
|
38
|
+
globalFilter?: string;
|
|
39
|
+
onGlobalFilterChange?: (value: string) => void;
|
|
40
|
+
enableGlobalFaceting?: boolean;
|
|
41
|
+
enableGrouping?: boolean;
|
|
22
42
|
}
|
|
23
|
-
declare function DataTableToolbar<TData>({ table, searchKey, searchPlaceholder, showViewOptions }: DataTableToolbarProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
declare function DataTableToolbar<TData>({ table, searchKey, searchPlaceholder, showViewOptions, enableGlobalSearch, globalSearchPlaceholder, globalFilter, onGlobalFilterChange, enableGlobalFaceting, enableGrouping }: DataTableToolbarProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
24
44
|
interface DataTableFilterProps {
|
|
25
45
|
column: any;
|
|
26
46
|
}
|
|
@@ -34,6 +54,7 @@ interface DataTablePaginationProps<_TData = any> {
|
|
|
34
54
|
table: any;
|
|
35
55
|
}
|
|
36
56
|
declare function DataTablePagination<TData>({ table }: DataTablePaginationProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
export type BorderStyle = "vertical" | "horizontal" | "both" | "none";
|
|
37
58
|
export interface DataTableProps<TData, TValue> {
|
|
38
59
|
columns: ColumnDef<TData, TValue>[];
|
|
39
60
|
data: TData[];
|
|
@@ -41,6 +62,46 @@ export interface DataTableProps<TData, TValue> {
|
|
|
41
62
|
searchPlaceholder?: string;
|
|
42
63
|
title?: string;
|
|
43
64
|
className?: string;
|
|
65
|
+
stickyHeader?: boolean;
|
|
66
|
+
stickyFirstColumn?: boolean;
|
|
67
|
+
stickyLeftColumns?: number;
|
|
68
|
+
stickyRightColumns?: number;
|
|
69
|
+
enableResponsiveWrapper?: boolean;
|
|
70
|
+
showScrollIndicators?: boolean;
|
|
71
|
+
isLoading?: boolean;
|
|
72
|
+
loadingRowCount?: number;
|
|
73
|
+
borderStyle?: BorderStyle;
|
|
74
|
+
enableGlobalSearch?: boolean;
|
|
75
|
+
enableGlobalFaceting?: boolean;
|
|
76
|
+
enableColumnResizing?: boolean;
|
|
77
|
+
columnResizeMode?: ColumnResizeMode;
|
|
78
|
+
enableColumnResizePersistence?: boolean;
|
|
79
|
+
storageKey?: string;
|
|
80
|
+
globalSearchPlaceholder?: string;
|
|
81
|
+
enableExpanding?: boolean;
|
|
82
|
+
getSubRows?: (row: TData) => TData[] | undefined;
|
|
83
|
+
enableGrouping?: boolean;
|
|
84
|
+
groupedColumnMode?: 'reorder' | 'remove' | false;
|
|
85
|
+
enableManualGrouping?: boolean;
|
|
86
|
+
enableRowPinning?: boolean;
|
|
87
|
+
keepPinnedRows?: boolean;
|
|
88
|
+
enableVirtualization?: boolean;
|
|
89
|
+
virtualContainerHeight?: number;
|
|
90
|
+
virtualRowHeight?: number;
|
|
91
|
+
virtualOverscan?: number;
|
|
92
|
+
nestedHeaders?: NestedHeaderConfig[];
|
|
93
|
+
enableNestedHeaders?: boolean;
|
|
94
|
+
enableColumnOrdering?: boolean;
|
|
95
|
+
enableRowSelection?: boolean;
|
|
96
|
+
initialState?: {
|
|
97
|
+
grouping?: GroupingState;
|
|
98
|
+
expanded?: ExpandedState;
|
|
99
|
+
columnSizing?: Record<string, number>;
|
|
100
|
+
rowPinning?: {
|
|
101
|
+
top?: string[];
|
|
102
|
+
bottom?: string[];
|
|
103
|
+
};
|
|
104
|
+
};
|
|
44
105
|
}
|
|
45
|
-
export declare function DataTable<TData, TValue>({ columns, data, searchKey, searchPlaceholder, title, className, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
|
|
46
|
-
export { DataTableColumnHeader, DataTableFilter, DataTableToolbar, DataTablePagination, fuzzyFilter, multiSelectFilter };
|
|
106
|
+
export declare function DataTable<TData, TValue>({ columns, data, searchKey, searchPlaceholder, title, className, stickyHeader, stickyFirstColumn, stickyLeftColumns, stickyRightColumns, enableResponsiveWrapper, showScrollIndicators, isLoading, loadingRowCount, borderStyle, enableGlobalSearch, globalSearchPlaceholder, enableGlobalFaceting, enableColumnResizing, columnResizeMode, enableColumnResizePersistence, storageKey, enableExpanding, getSubRows, enableGrouping, groupedColumnMode, enableManualGrouping, enableRowPinning, keepPinnedRows, enableVirtualization, nestedHeaders, enableNestedHeaders, enableColumnOrdering, enableRowSelection, initialState, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
|
|
107
|
+
export { DataTableColumnHeader, DataTableFilter, DataTableToolbar, DataTablePagination, DataTableSkeleton, fuzzyFilter, multiSelectFilter };
|
|
@@ -5,16 +5,20 @@ declare const tableVariants: (props?: ({
|
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
6
|
declare const tableRowVariants: (props?: ({
|
|
7
7
|
variant?: "default" | "selected" | "zebra" | null | undefined;
|
|
8
|
+
showBorder?: boolean | null | undefined;
|
|
8
9
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
10
|
declare const tableCellVariants: (props?: ({
|
|
10
11
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
11
12
|
align?: "left" | "right" | "center" | null | undefined;
|
|
12
13
|
numeric?: boolean | null | undefined;
|
|
14
|
+
showBorder?: boolean | null | undefined;
|
|
15
|
+
showRowBorder?: boolean | null | undefined;
|
|
13
16
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
14
17
|
declare const tableHeaderVariants: (props?: ({
|
|
15
18
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
16
19
|
align?: "left" | "right" | "center" | null | undefined;
|
|
17
20
|
numeric?: boolean | null | undefined;
|
|
21
|
+
showBorder?: boolean | null | undefined;
|
|
18
22
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
19
23
|
interface TableProps extends React.HTMLAttributes<HTMLTableElement>, VariantProps<typeof tableVariants> {
|
|
20
24
|
}
|
|
@@ -25,12 +29,16 @@ declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<
|
|
|
25
29
|
interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement>, VariantProps<typeof tableRowVariants> {
|
|
26
30
|
zebra?: boolean;
|
|
27
31
|
zebraIndex?: number;
|
|
32
|
+
showBorder?: boolean;
|
|
28
33
|
}
|
|
29
34
|
declare const TableRow: React.ForwardRefExoticComponent<TableRowProps & React.RefAttributes<HTMLTableRowElement>>;
|
|
30
35
|
interface TableHeadProps extends Omit<React.ThHTMLAttributes<HTMLTableCellElement>, 'align'>, VariantProps<typeof tableHeaderVariants> {
|
|
36
|
+
showBorder?: boolean;
|
|
31
37
|
}
|
|
32
38
|
declare const TableHead: React.ForwardRefExoticComponent<TableHeadProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
33
39
|
interface TableCellProps extends Omit<React.TdHTMLAttributes<HTMLTableCellElement>, 'align'>, VariantProps<typeof tableCellVariants> {
|
|
40
|
+
showBorder?: boolean;
|
|
41
|
+
showRowBorder?: boolean;
|
|
34
42
|
}
|
|
35
43
|
declare const TableCell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
36
44
|
declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
|