/** biome-ignore-all lint/correctness/useHookAtTopLevel: False positive because of the way forwardRef() is added */ import React from "react"; import { type SelectionProps } from "../hooks/useTableSelection.js"; import type { ColumnDefinitions } from "./DataTable.types.js"; interface DataTableProps extends React.HTMLAttributes, SelectionProps { children?: never; /** * Controls vertical cell padding. * @default "normal" */ rowDensity?: "condensed" | "normal" | "spacious"; /** * Zebra striped table * @default false */ zebraStripes?: boolean; /** * Truncate content in cells and show ellipsis for overflowed text. * * **NB:** When using `layout="auto"`, you have to manually set a `maxWidth` on columns that should be truncated. * @default true */ truncateContent?: boolean; /** * Enables keyboard navigation for table rows and cells. * @default false */ withKeyboardNav?: boolean; /** * Custom callback to determine if navigation should be blocked. * Called before default blocking logic. * Requires `withKeyboardNav` to be `true`. */ shouldBlockNavigation?: (event: KeyboardEvent) => boolean; /** * Controls table layout. * * ### fixed * Gives you full control of column widths. This is required for resizable columns. * * ### auto * Makes the columns resize automatically based on the content. * The table will take up at least 100% of available width. * * **NB:** When using this with `truncateContent`, you have to manually * set a `contentMaxWidth` on cells that should be truncated. * @default "fixed" */ layout?: "fixed" | "auto"; /** * */ columnDefinitions: ColumnDefinitions; data: T[]; getRowId?: (rowData: T, index: number) => string | number; } declare const DataTableAuto: (props: DataTableProps & React.RefAttributes) => React.ReactElement | null; export { DataTableAuto }; export type { DataTableProps }; export default DataTableAuto;