import * as react from 'react'; import { HTMLAttributes, ReactNode, TdHTMLAttributes, ThHTMLAttributes } from 'react'; interface TableProps extends HTMLAttributes { children: ReactNode; className?: string; } interface TableHeadProps extends HTMLAttributes { children: ReactNode; className?: string; } interface TableBodyProps extends HTMLAttributes { children: ReactNode; className?: string; } interface TableRowProps extends Omit, "onClick"> { children: ReactNode; className?: string; onClick?: () => void; tray?: ReactNode; trayTriggerPosition?: "start" | "end" | "hidden"; expanded?: boolean; defaultExpanded?: boolean; onExpandedChange?: (expanded: boolean) => void; } interface TableRowTrayProps { children: ReactNode; className?: string; } /** * Extends the native cell attributes so `colSpan`/`rowSpan` (full-span * empty-state rows, trays) plus `onClick`, `style`, `scope`, `data-*`, etc. are * forwarded onto the underlying ``/`` instead of silently dropped. */ interface TableCellProps extends TdHTMLAttributes { /** Render a `` header cell instead of a ``. */ header?: boolean; } /** * Extends the native `` attributes so `scope`, `colSpan`, `data-*` and * `aria-*` reach the header cell instead of being dropped. * * `aria-sort` is the one worth calling out: it is emitted automatically from * the column's own sort state, and passing it explicitly overrides that — which * is what a server-sorted table needs, since it knows its state and the * component does not. */ interface TableColumnProps extends ThHTMLAttributes { label: string; sortKey?: string; className?: string; } interface TablePaginationProps { className?: string; total: number; pageSize?: number; } interface TableSearchProps { className?: string; placeholder?: string; } interface TableTrayProps { children: ReactNode; className?: string; } declare function TableHead({ children, className, ...rest }: TableHeadProps): react.JSX.Element; declare function TableBody({ children, className, ...rest }: TableBodyProps): react.JSX.Element; declare function TableRow({ children, className, onClick, tray, trayTriggerPosition, expanded: controlledExpanded, defaultExpanded, onExpandedChange, ...rest }: TableRowProps): react.JSX.Element; declare function TableCell({ children, className, header, ...rest }: TableCellProps): react.JSX.Element; declare function TableColumn({ label, sortKey, className, "aria-sort": ariaSortProp, onClick, ...rest }: TableColumnProps): react.JSX.Element; declare function TablePagination({ className, total, pageSize, }: TablePaginationProps): react.JSX.Element | null; declare function TableSearch({ className, placeholder, }: TableSearchProps): react.JSX.Element; declare function TableTray({ children, className }: TableTrayProps): react.JSX.Element; declare function TableRowTray({ children, className }: TableRowTrayProps): react.JSX.Element; declare function TableRoot({ children, className, ...rest }: TableProps): react.JSX.Element; declare const Table: typeof TableRoot & { Head: typeof TableHead; Body: typeof TableBody; Row: typeof TableRow; Cell: typeof TableCell; Column: typeof TableColumn; Pagination: typeof TablePagination; Search: typeof TableSearch; Tray: typeof TableTray; RowTray: typeof TableRowTray; }; export { Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableColumn, type TableColumnProps, TableHead, type TableHeadProps, TablePagination, type TablePaginationProps, type TableProps, TableRow, type TableRowProps, TableRowTray, type TableRowTrayProps, TableSearch, type TableSearchProps, TableTray, type TableTrayProps };