import { WidthProp } from "@marigold/system"; import { JSX, ReactNode } from "react"; import { AriaTableProps } from "@react-aria/table"; import { Cell, ColumnProps as ColumnProps$1, RowProps as RowProps$1, TableBody, TableHeader, TableStateProps } from "@react-stately/table"; export interface TableProps extends Pick, Omit, 'showSelectionCheckboxes' | 'showDragButtons' | 'allowDuplicateSelectionEvents'> { variant?: 'grid' | 'default' | 'muted' | (string & {}); size?: string; /** * Stretch the table to fill the container. * @default false */ stretch?: boolean; /** * Make the column sticky to the top of the table. * @default true */ stickyHeader?: boolean; /** * Disable keyboard navigation. Use if you have input fields in your table. Be aware that this is bad for accessibility. * @default false */ disableKeyboardNavigation?: boolean; /** * Content to display when there are no rows in the table. */ emptyState?: () => ReactNode; /** * Control the vertical alignment of table content. * @default middle */ alignY?: Exclude; } declare const Table: Table; export interface RowProps extends RowProps$1 { variant?: 'default' | 'grid' | 'admin' | 'master' | (string & {}); size?: string; } export interface ColumnProps extends Omit, 'width'>, WidthProp { /** * Control the alignment of Column. * @default left */ align?: Exclude; } /** * Necessary since TypeScript can not infer the * types of the @react-stately components. */ interface Table { (props: TableProps): JSX.Element; Body: typeof TableBody; Cell: typeof Cell; Header: typeof TableHeader; Column: (props: ColumnProps) => JSX.Element; Row: (props: RowProps) => JSX.Element; } export { Table };