import type { HTMLAttributes, TdHTMLAttributes, ThHTMLAttributes } from "react"; /** * Table — semantic data table primitive with sub-components. * * Composition: * * * * Date * Amount * * * * * 2026-05-23 * $ 42.00 * * *
* * density propagates via Context so Cells pick up vertical padding without * prop drilling. Sub-components are attached as static properties on the * root (`Table.Header`, etc.) — single import surface. * * Sortable header: pass `onSort` + `sortDirection`. The HeaderCell renders * the sort affordance (ChevronUp/ChevronDown) and triggers the consumer * callback. `sortDirection` without `onSort` is a no-op (header stays * static); `sortDirection="none"` with `onSort` shows a dimmed affordance. */ type TableDensity = "default" | "compact"; type AlignKind = "left" | "center" | "right"; type SortDirection = "asc" | "desc" | "none"; export interface TableProps extends HTMLAttributes { density?: TableDensity; } declare const Root: import("react").ForwardRefExoticComponent>; declare const Header: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; declare const Body: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; declare const Row: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; export interface TableCellProps extends TdHTMLAttributes { align?: AlignKind; numeric?: boolean; } declare const Cell: import("react").ForwardRefExoticComponent>; export interface TableHeaderCellProps extends ThHTMLAttributes { align?: AlignKind; /** When provided, header becomes a sort trigger. */ onSort?: () => void; /** Current sort state for this column. */ sortDirection?: SortDirection; } declare const HeaderCell: import("react").ForwardRefExoticComponent>; type TableRoot = typeof Root & { Header: typeof Header; Body: typeof Body; Row: typeof Row; Cell: typeof Cell; HeaderCell: typeof HeaderCell; }; declare const Table: TableRoot; export { Table };