react-glide-table 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -15
- package/dist/compound.cjs +2085 -0
- package/dist/compound.d.cts +63 -0
- package/dist/compound.d.ts +63 -0
- package/dist/compound.js +2067 -0
- package/dist/core.cjs +1198 -0
- package/dist/core.d.cts +255 -0
- package/dist/core.d.ts +255 -0
- package/dist/core.js +1154 -0
- package/dist/index.cjs +948 -3
- package/dist/index.d.cts +5 -414
- package/dist/index.d.ts +5 -414
- package/dist/index.js +942 -0
- package/dist/types-ByOoRY8x.d.cts +177 -0
- package/dist/types-ByOoRY8x.d.ts +177 -0
- package/package.json +12 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode, ReactElement } from 'react';
|
|
3
|
+
import { b as DataTableProps, T as TableColumnProps, d as TableProps } from './types-ByOoRY8x.cjs';
|
|
4
|
+
export { a as DataTableLabels, c as DataTableSlots, R as RowSelectionMode } from './types-ByOoRY8x.cjs';
|
|
5
|
+
export { ColumnDef, RowSelectionState } from '@tanstack/react-table';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Unstyled DataTable shell: semantic HTML + interaction behavior.
|
|
9
|
+
* Class hooks (`DataTableJSX`, `data-table`, …) are opt-in — no CSS is shipped.
|
|
10
|
+
* Customize via `className`, column `className` / `headerClassName`, `labels`,
|
|
11
|
+
* `summary` / `toolbar`, `Column.render`, and `slots`.
|
|
12
|
+
*/
|
|
13
|
+
declare function DataTable<T extends Record<string, unknown>>({ isPending, summary, toolbar, filteredCount, totalCount, className, slots, ...glideOptions }: DataTableProps<T>): react.JSX.Element;
|
|
14
|
+
|
|
15
|
+
/** Body slot marker. DataTable renders the actual tbody. */
|
|
16
|
+
declare function TableBody(): null;
|
|
17
|
+
declare namespace TableBody {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** Used only inside Table.Header. Registers a column definition; does not render DOM. */
|
|
22
|
+
declare function TableColumn<T extends Record<string, unknown>, K extends string = keyof T & string>(props: TableColumnProps<T, K>): null;
|
|
23
|
+
declare namespace TableColumn {
|
|
24
|
+
var displayName: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
type TableHeaderProps = {
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
};
|
|
30
|
+
/** Column declaration slot. Does not render DOM. */
|
|
31
|
+
declare function TableHeader(props: TableHeaderProps): null;
|
|
32
|
+
declare namespace TableHeader {
|
|
33
|
+
var displayName: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
type TablePaginationProps = {
|
|
37
|
+
page: number;
|
|
38
|
+
pageSize?: number;
|
|
39
|
+
totalCount?: number;
|
|
40
|
+
onChange: (page: number) => void;
|
|
41
|
+
className?: string;
|
|
42
|
+
};
|
|
43
|
+
declare function TablePagination({ page, pageSize, totalCount, onChange, className, }: TablePaginationProps): react.JSX.Element;
|
|
44
|
+
declare namespace TablePagination {
|
|
45
|
+
var displayName: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
type TableCompoundComponent<T extends Record<string, unknown>> = ((props: TableProps<T>) => ReactElement) & {
|
|
49
|
+
Header: typeof TableHeader;
|
|
50
|
+
Column: <K extends string>(props: TableColumnProps<T, K>) => null;
|
|
51
|
+
Body: typeof TableBody;
|
|
52
|
+
Pagination: typeof TablePagination;
|
|
53
|
+
};
|
|
54
|
+
declare function TableRoot<T extends Record<string, unknown>>({ data, children, className, totalCount, filteredCount, ...dataTableProps }: TableProps<T>): react.JSX.Element;
|
|
55
|
+
declare function createTable<T extends Record<string, unknown>>(): TableCompoundComponent<T>;
|
|
56
|
+
declare const Table: typeof TableRoot & {
|
|
57
|
+
Header: typeof TableHeader;
|
|
58
|
+
Column: typeof TableColumn;
|
|
59
|
+
Body: typeof TableBody;
|
|
60
|
+
Pagination: typeof TablePagination;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export { DataTable, DataTableProps, Table, TableColumnProps, type TableCompoundComponent, TableProps, createTable };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode, ReactElement } from 'react';
|
|
3
|
+
import { b as DataTableProps, T as TableColumnProps, d as TableProps } from './types-ByOoRY8x.js';
|
|
4
|
+
export { a as DataTableLabels, c as DataTableSlots, R as RowSelectionMode } from './types-ByOoRY8x.js';
|
|
5
|
+
export { ColumnDef, RowSelectionState } from '@tanstack/react-table';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Unstyled DataTable shell: semantic HTML + interaction behavior.
|
|
9
|
+
* Class hooks (`DataTableJSX`, `data-table`, …) are opt-in — no CSS is shipped.
|
|
10
|
+
* Customize via `className`, column `className` / `headerClassName`, `labels`,
|
|
11
|
+
* `summary` / `toolbar`, `Column.render`, and `slots`.
|
|
12
|
+
*/
|
|
13
|
+
declare function DataTable<T extends Record<string, unknown>>({ isPending, summary, toolbar, filteredCount, totalCount, className, slots, ...glideOptions }: DataTableProps<T>): react.JSX.Element;
|
|
14
|
+
|
|
15
|
+
/** Body slot marker. DataTable renders the actual tbody. */
|
|
16
|
+
declare function TableBody(): null;
|
|
17
|
+
declare namespace TableBody {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** Used only inside Table.Header. Registers a column definition; does not render DOM. */
|
|
22
|
+
declare function TableColumn<T extends Record<string, unknown>, K extends string = keyof T & string>(props: TableColumnProps<T, K>): null;
|
|
23
|
+
declare namespace TableColumn {
|
|
24
|
+
var displayName: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
type TableHeaderProps = {
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
};
|
|
30
|
+
/** Column declaration slot. Does not render DOM. */
|
|
31
|
+
declare function TableHeader(props: TableHeaderProps): null;
|
|
32
|
+
declare namespace TableHeader {
|
|
33
|
+
var displayName: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
type TablePaginationProps = {
|
|
37
|
+
page: number;
|
|
38
|
+
pageSize?: number;
|
|
39
|
+
totalCount?: number;
|
|
40
|
+
onChange: (page: number) => void;
|
|
41
|
+
className?: string;
|
|
42
|
+
};
|
|
43
|
+
declare function TablePagination({ page, pageSize, totalCount, onChange, className, }: TablePaginationProps): react.JSX.Element;
|
|
44
|
+
declare namespace TablePagination {
|
|
45
|
+
var displayName: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
type TableCompoundComponent<T extends Record<string, unknown>> = ((props: TableProps<T>) => ReactElement) & {
|
|
49
|
+
Header: typeof TableHeader;
|
|
50
|
+
Column: <K extends string>(props: TableColumnProps<T, K>) => null;
|
|
51
|
+
Body: typeof TableBody;
|
|
52
|
+
Pagination: typeof TablePagination;
|
|
53
|
+
};
|
|
54
|
+
declare function TableRoot<T extends Record<string, unknown>>({ data, children, className, totalCount, filteredCount, ...dataTableProps }: TableProps<T>): react.JSX.Element;
|
|
55
|
+
declare function createTable<T extends Record<string, unknown>>(): TableCompoundComponent<T>;
|
|
56
|
+
declare const Table: typeof TableRoot & {
|
|
57
|
+
Header: typeof TableHeader;
|
|
58
|
+
Column: typeof TableColumn;
|
|
59
|
+
Body: typeof TableBody;
|
|
60
|
+
Pagination: typeof TablePagination;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export { DataTable, DataTableProps, Table, TableColumnProps, type TableCompoundComponent, TableProps, createTable };
|