import { ReactNode } from 'react'; import type { TableState } from '@react-stately/table'; import { TableColumnResizeState } from '@react-stately/table'; import type { GridNode } from '@react-types/grid'; import type { Node } from '@react-types/shared'; import type { TableProps } from '@react-types/table'; import { TestingAttributes } from './shared/test'; import { BoxProps } from './box'; import { DOMAttributes } from './shared'; export interface BaseProp extends BoxProps, TestingAttributes, DOMAttributes { } export interface TableBaseProps extends TableProps, Omit { 'aria-label'?: string; selectionMode?: 'none' | 'single' | 'multiple'; selectionBehavior?: 'replace' | 'toggle'; hasSelectionCheckboxes?: boolean; 'data-testid'?: string; caption?: ReactNode | string; isStickyHeader?: boolean; isLastColumnSticky?: boolean; } export interface TableRowGroupProps extends BaseProp { type: 'thead' | 'tbody'; children: ReactNode; isSticky?: boolean; } export interface TableHeaderRowProps extends BaseProp { item: Node; state: TableState; children: ReactNode; className?: string; } export interface TableColumnHeaderProps extends BaseProp { column: GridNode; state: TableState; className?: string; layoutState: TableColumnResizeState; } export interface TableRowProps extends BaseProp { item: Node; state: TableState; children: ReactNode; className?: string; } export interface TableCellProps extends BaseProp { cell: GridNode; state: TableState; className?: string; layoutState: TableColumnResizeState; } export interface TableCheckboxCellProps extends BaseProp { cell: GridNode; state: TableState; layoutState: TableColumnResizeState; } export interface TableSelectAllCellProps extends BaseProp { column: GridNode; state: TableState; layoutState: TableColumnResizeState; } export interface TableCaptionProps { caption: string | React.ReactNode; }