@grasp-labs/ds-react-components 1.4.2 → 1.6.0
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/dropdown/index.d.ts +1 -0
- package/dist/components/table/Table.d.ts +1 -1
- package/dist/components/table/TableCell.d.ts +6 -1
- package/dist/components/table/TableHeaderCell.d.ts +2 -1
- package/dist/components/table/components/Pagination.d.ts +2 -1
- package/dist/components/table/types.d.ts +2 -0
- package/dist/{index-uPNpCmV9.js → index--vpOybS-.js} +8929 -8329
- package/dist/index.css +1 -1
- package/dist/{index.esm-1NwUBeZD.js → index.esm-nnN6KjKn.js} +3 -3
- package/dist/index.js +1 -1
- package/package.json +32 -32
|
@@ -2,5 +2,5 @@ import { JSX } from 'react';
|
|
|
2
2
|
import { TableProps } from './types';
|
|
3
3
|
declare function Table<T extends {
|
|
4
4
|
id?: string | number;
|
|
5
|
-
}>({ data, columns, rootClassName, className, scrollWrapperClassName, getCoreRowModel, enableRowSelection, enableMultiRowSelection, enablePagination, paginationProps, ...options }: TableProps<T>): JSX.Element;
|
|
5
|
+
}>({ data, columns, rootClassName, className, scrollWrapperClassName, isLoading, loadingText, getCoreRowModel, enableRowSelection, enableMultiRowSelection, enablePagination, paginationProps, ...options }: TableProps<T>): JSX.Element;
|
|
6
6
|
export default Table;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { Cell } from '@tanstack/react-table';
|
|
1
|
+
import { Cell, RowData } from '@tanstack/react-table';
|
|
2
2
|
import { JSX } from 'react';
|
|
3
|
+
declare module "@tanstack/react-table" {
|
|
4
|
+
interface ColumnMeta<TData extends RowData, TValue> {
|
|
5
|
+
cellClassName?: string;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
3
8
|
/**
|
|
4
9
|
* Props for the Table Cell component.
|
|
5
10
|
*/
|
|
@@ -5,6 +5,7 @@ import { JSX } from 'react';
|
|
|
5
5
|
*/
|
|
6
6
|
type TableHeaderCellProps<T> = {
|
|
7
7
|
header: Header<T, unknown>;
|
|
8
|
+
disabled?: boolean;
|
|
8
9
|
};
|
|
9
10
|
/**
|
|
10
11
|
* A table header cell component that renders sortable headers using TanStack Table's logic.
|
|
@@ -13,5 +14,5 @@ type TableHeaderCellProps<T> = {
|
|
|
13
14
|
* @param {TableHeaderCellProps<T>} props - The component props.
|
|
14
15
|
* @returns {JSX.Element} The rendered header cell.
|
|
15
16
|
*/
|
|
16
|
-
export declare const TableHeaderCell: <T>({ header, }: TableHeaderCellProps<T>) => JSX.Element;
|
|
17
|
+
export declare const TableHeaderCell: <T>({ header, disabled, }: TableHeaderCellProps<T>) => JSX.Element;
|
|
17
18
|
export {};
|
|
@@ -10,6 +10,7 @@ export type PaginationProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
10
10
|
className?: string;
|
|
11
11
|
selectClassName?: string;
|
|
12
12
|
fromText?: string;
|
|
13
|
+
disabled?: boolean;
|
|
13
14
|
};
|
|
14
15
|
/**
|
|
15
16
|
* A pagination component providing navigation controls and items-per-page selection.
|
|
@@ -18,4 +19,4 @@ export type PaginationProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
18
19
|
* @param props - The props for the Pagination component.
|
|
19
20
|
* @returns The rendered pagination controls with navigation buttons and page info.
|
|
20
21
|
*/
|
|
21
|
-
export declare const Pagination: ({ currentPage, totalPages, totalItems, itemsPerPage, itemsPerPageOptions, onPageChange, onItemsPerPageChange, className, fromText, ...rest }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const Pagination: ({ currentPage, totalPages, totalItems, itemsPerPage, itemsPerPageOptions, onPageChange, onItemsPerPageChange, className, fromText, disabled, ...rest }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -34,6 +34,8 @@ export type TableProps<T> = Omit<TableOptions<T>, "getCoreRowModel" | "getSorted
|
|
|
34
34
|
rootClassName?: string;
|
|
35
35
|
className?: string;
|
|
36
36
|
scrollWrapperClassName?: string;
|
|
37
|
+
isLoading?: boolean;
|
|
38
|
+
loadingText?: string;
|
|
37
39
|
getCoreRowModel?: TableOptions<T>["getCoreRowModel"];
|
|
38
40
|
enablePagination?: boolean;
|
|
39
41
|
paginationProps?: {
|