import * as React from "react"; export type DataGridSelectionMode = "none" | "single" | "multiple"; export type DataGridDirection = "up" | "down" | "left" | "right"; export interface DataGridActiveCell { rowId: string; columnId: string; editing: boolean; } export interface DataGridColumn { id: string; label?: React.ReactNode; width?: number; minWidth?: number; maxWidth?: number; resizable?: boolean; editable?: boolean | ((row: Row) => boolean); getValue?: (row: Row) => Value; renderCell?: (context: DataGridCellContext) => React.ReactNode; renderEditor?: (context: DataGridEditorContext) => React.ReactNode; } export interface DataGridCellContext { row: Row; rowIndex: number; column: DataGridColumn; value: Value | undefined; active: boolean; editing: boolean; editable: boolean; startEditing: () => void; commit: (value: Value) => void; cancel: () => void; move: (direction: DataGridDirection) => void; } export interface DataGridEditorContext extends DataGridCellContext { onCommit: (value: Value) => void; onCancel: () => void; onMove: (direction: DataGridDirection) => void; } export interface DataGridCommitContext { row: Row; rowIndex: number; column: DataGridColumn; previousValue: unknown; value: unknown; } export interface DataGridSlotContext { rows: readonly Row[]; columns: readonly DataGridColumn[]; columnWidths: Readonly>; gridTemplateColumns: string; selection: DataGridSelectionMode; selectedRowIds: ReadonlySet; getRowId: (row: Row, rowIndex: number) => string; setActiveCell: (cell: DataGridActiveCell | null) => void; toggleRowSelection: (rowId: string) => void; resizeColumn: (columnId: string, width: number) => void; } export interface DataGridRowContext extends DataGridSlotContext { row: Row; rowIndex: number; rowId: string; selected: boolean; } type DataGridScrollContainerProps = Omit, "children"> & Record<`data-${string}`, string | undefined>; export interface DataGridProps extends Omit, "children"> { rows: readonly Row[]; columns: readonly DataGridColumn[]; getRowId: (row: Row, rowIndex: number) => string; columnWidths?: Readonly>; onColumnWidthsChange?: (columnWidths: Record) => void; selection?: DataGridSelectionMode; selectedRowIds?: ReadonlySet; onSelectedRowIdsChange?: (rowIds: ReadonlySet) => void; activeCell?: DataGridActiveCell | null; onActiveCellChange?: (cell: DataGridActiveCell | null) => void; onCellCommit?: (context: DataGridCommitContext) => void; renderHeader?: (context: DataGridSlotContext) => React.ReactNode; renderBody?: (context: DataGridSlotContext) => React.ReactNode; renderRow?: (context: DataGridRowContext) => React.ReactNode; renderFooter?: (context: DataGridSlotContext) => React.ReactNode; emptyState?: React.ReactNode; loading?: boolean; loadingRowCount?: number; contentClassName?: string; rowClassName?: string | ((row: Row, rowIndex: number) => string); scrollContainerProps?: DataGridScrollContainerProps; } export declare function clampDataGridColumnWidth(width: number, column: DataGridColumn): number; export declare function dataGridColumnTemplate(columns: readonly DataGridColumn[], columnWidths?: Readonly>, selection?: DataGridSelectionMode): string; export declare function DataGrid({ rows, columns, getRowId, columnWidths, onColumnWidthsChange, selection, selectedRowIds, onSelectedRowIdsChange, activeCell, onActiveCellChange, onCellCommit, renderHeader, renderBody, renderRow, renderFooter, emptyState, loading, loadingRowCount, contentClassName, rowClassName, scrollContainerProps, className, ...gridProps }: DataGridProps): React.JSX.Element; export {}; //# sourceMappingURL=DataGrid.d.ts.map