@paubox/ui
Advanced tools
Comparing version 0.3.2 to 0.3.3
@@ -5,3 +5,3 @@ { | ||
"description": "Paubox Component Library", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"type": "module", | ||
@@ -8,0 +8,0 @@ "peerDependencies": { |
import { ColumnDef, OnChangeFn, Row } from '@tanstack/react-table'; | ||
import { PageInfo } from '../Pagination/Pagination'; | ||
export declare const TableContainer: import("@emotion/styled").StyledComponent<{ | ||
theme?: import("@emotion/react").Theme; | ||
as?: React.ElementType; | ||
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>; | ||
export declare const TableWrapper: import("@emotion/styled").StyledComponent<{ | ||
theme?: import("@emotion/react").Theme; | ||
as?: React.ElementType; | ||
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>; | ||
export interface ColumnWidth { | ||
id: string; | ||
width: number; | ||
} | ||
export type TableColumn<T> = ColumnDef<T> & { | ||
@@ -8,7 +20,4 @@ key: string; | ||
sortable?: boolean; | ||
getter?: () => unknown; | ||
}; | ||
export interface TableSort { | ||
id: string; | ||
desc: boolean; | ||
} | ||
export interface RowSelectState { | ||
@@ -24,13 +33,7 @@ [x: string]: boolean; | ||
} | ||
export interface TableProps<T extends object> { | ||
interface TableStyleProps { | ||
dense?: boolean; | ||
height?: number; | ||
data: T[]; | ||
columns: TableColumn<T>[]; | ||
pageInfo: PageInfo; | ||
getRowId: (originalRow: T, index: number, parent?: Row<T> | undefined) => string; | ||
isLoading?: boolean; | ||
onPageSizeChange: (size: number) => void; | ||
onPageChange: (page: number) => void; | ||
sorting?: TableSort; | ||
onSortChange?: (sorting: TableSort) => void; | ||
} | ||
interface TableRowProps<T> { | ||
enableRowSelection?: boolean; | ||
@@ -41,4 +44,18 @@ selectedRows?: RowSelectState; | ||
rowActions?: RowAction<T>[]; | ||
dense?: boolean; | ||
} | ||
export declare const Table: <T extends object>({ height, data, pageInfo, columns, getRowId, isLoading, sorting, onPageSizeChange, onPageChange, onSortChange, enableRowSelection, selectedRows, onRowSelectionChange, onRowClick, rowActions, dense, }: TableProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element; | ||
interface TableDataProps<T> { | ||
columns: TableColumn<T>[]; | ||
data?: T[]; | ||
getRowId: (originalRow: T, index: number, parent?: Row<T> | undefined) => string; | ||
isLoading?: boolean; | ||
pageInfo?: PageInfo; | ||
onPageSizeChange: (size: number) => void; | ||
onPageChange: (page: number) => void; | ||
sortBy?: string; | ||
sortOrder?: string; | ||
onSortChange?: (sortBy: string, sortOrder: string) => void; | ||
} | ||
export interface TableProps<T extends object> extends TableStyleProps, TableRowProps<T>, TableDataProps<T> { | ||
} | ||
export declare const Table: <T extends object>({ columns, data, getRowId, isLoading, pageInfo, onPageSizeChange, onPageChange, sortBy, sortOrder, onSortChange, enableRowSelection, selectedRows, onRowSelectionChange, onRowClick, rowActions, dense, height, }: TableProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element; | ||
export {}; |
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
56
28533
0
1193936