/**
* Semantic table primitives — thin wrappers over the native table elements.
* They keep the real `table`/`row`/`columnheader`/`cell` roles so assistive
* tech and tests read a proper table. Only the root carries a class: the header
* and cell rules in the stylesheet are descendants of `.tai-table`, so a cell
* cannot drift out of the system by forgetting one.
*
* A numeric column opts in with `numeric`, which stamps `data-numeric="true"` —
* the hook the stylesheet right-aligns on tabular figures so digits line up.
*
* Each wrapper FORWARDS a consumer `ref` to the native element it renders — the
* attribute spread carries it, the same way it carries every other native prop —
* so a caller that has to measure or scroll a cell is not forced back to a raw
* `
` and out of the system.
*/
import type { HTMLAttributes, ReactNode, Ref, TdHTMLAttributes, ThHTMLAttributes } from 'react';
export interface TableProps extends HTMLAttributes {
readonly children?: ReactNode;
/** A consumer ref for the `` itself. */
readonly ref?: Ref;
}
export declare function Table({ children, className, ...props }: TableProps): import("react").JSX.Element;
/** `` and `` take the same surface: the native one. */
export interface TableSectionProps extends HTMLAttributes {
readonly children?: ReactNode;
/** A consumer ref for the section element itself. */
readonly ref?: Ref;
}
export declare function THead({ children, ...props }: TableSectionProps): import("react").JSX.Element;
export declare function TBody({ children, ...props }: TableSectionProps): import("react").JSX.Element;
export interface TableRowProps extends HTMLAttributes {
readonly children?: ReactNode;
/** A consumer ref for the `` itself. */
readonly ref?: Ref;
}
export declare function TR({ children, ...props }: TableRowProps): import("react").JSX.Element;
/** Right-align a column of digits on tabular figures. */
export interface NumericColumnProps {
readonly numeric?: boolean;
}
/**
* A header cell. `scope` defaults to `col` because that is what a `` in the
* header row IS, and without it nothing associates the cell with the column
* below it: a screen reader announcing a data cell has no header to name it.
* A row header — the leading cell of a body row — passes `scope="row"`.
*/
export interface THProps extends ThHTMLAttributes, NumericColumnProps {
readonly children?: ReactNode;
/** A consumer ref for the `` itself. */
readonly ref?: Ref;
}
export declare function TH({ children, numeric, scope, ...props }: THProps): import("react").JSX.Element;
export interface TDProps extends TdHTMLAttributes, NumericColumnProps {
readonly children?: ReactNode;
/** A consumer ref for the `| ` itself. */
readonly ref?: Ref;
}
export declare function TD({ children, numeric, ...props }: TDProps): import("react").JSX.Element;
//# sourceMappingURL=table.d.ts.map | | | |