import { PolymorphicProps } from "../utils/modern-polymorphic.js"; import { UniqueRow } from "./row.js"; import { CellAlignment, Column } from "./column.js"; import React, { JSX } from "react"; //#region src/DataTable/Table.d.ts type TableProps = React.ComponentPropsWithoutRef<'table'> & { /** * Provide an id to an element which uniquely describes this table */ 'aria-describedby'?: string; /** * Provide an id to an element which uniquely labels this table */ 'aria-labelledby'?: string; /** * Column width definitions */ gridTemplateColumns?: React.CSSProperties['gridTemplateColumns']; /** * Specify the amount of space that should be available around the contents of * a cell */ cellPadding?: 'condensed' | 'normal' | 'spacious'; }; declare const Table: React.ForwardRefExoticComponent, HTMLTableElement>, "ref"> & { /** * Provide an id to an element which uniquely describes this table */ 'aria-describedby'?: string; /** * Provide an id to an element which uniquely labels this table */ 'aria-labelledby'?: string; /** * Column width definitions */ gridTemplateColumns?: React.CSSProperties["gridTemplateColumns"]; /** * Specify the amount of space that should be available around the contents of * a cell */ cellPadding?: "condensed" | "normal" | "spacious"; } & React.RefAttributes>; type TableHeadProps = React.ComponentPropsWithoutRef<'thead'>; declare function TableHead({ children }: TableHeadProps): JSX.Element; type TableBodyProps = React.ComponentPropsWithoutRef<'tbody'>; declare function TableBody({ children }: TableBodyProps): JSX.Element; type TableHeaderProps = Omit, 'align'> & { /** * The horizontal alignment of the cell's content */ align?: CellAlignment; }; declare function TableHeader({ align, children, ...rest }: TableHeaderProps): JSX.Element; type TableRowProps = React.ComponentPropsWithoutRef<'tr'>; declare function TableRow({ children, ...rest }: TableRowProps): JSX.Element; type TableCellProps = Omit, 'align'> & { /** * The horizontal alignment of the cell's content */ align?: CellAlignment; /** * Provide the scope for a table cell, useful for defining a row header using * `scope="row"` */ scope?: 'row'; }; declare function TableCell({ align, className, children, scope, ...rest }: TableCellProps): JSX.Element; type TableCellPlaceholderProps = React.PropsWithChildren; declare function TableCellPlaceholder({ children }: TableCellPlaceholderProps): JSX.Element; type TableContainerProps = PolymorphicProps & React.PropsWithChildren; declare function TableContainer({ children, className, as, ...rest }: TableContainerProps): JSX.Element; type TableTitleProps = React.PropsWithChildren<{ /** * Provide an alternate element or component to use as the container for * `TableSubtitle`. This is useful when specifying markup that is more * semantic for your use-case, such as a heading tag. */ as?: keyof JSX.IntrinsicElements | React.ComponentType; /** * Provide a unique id for the table subtitle. This should be used along with * `aria-labelledby` on `DataTable` */ id: string; } & React.HTMLAttributes & React.RefAttributes>; declare const TableTitle: React.ForwardRefExoticComponent & React.RefAttributes>; type TableSubtitleProps = React.PropsWithChildren<{ /** * Provide an alternate element or component to use as the container for * `TableSubtitle`. This is useful when specifying markup that is more * semantic for your use-case */ as?: keyof JSX.IntrinsicElements | React.ComponentType; /** * Provide a unique id for the table subtitle. This should be used along with * `aria-describedby` on `DataTable` */ id: string; } & React.HTMLAttributes>; declare function TableSubtitle({ as: BaseComponent, children, id }: TableSubtitleProps): JSX.Element; declare function TableDivider(): JSX.Element; type TableActionsProps = React.PropsWithChildren; declare function TableActions({ children }: TableActionsProps): JSX.Element; type TableSkeletonProps = React.ComponentPropsWithoutRef<'table'> & { /** * Specify the amount of space that should be available around the contents of * a cell */ cellPadding?: 'condensed' | 'normal' | 'spacious'; /** * Provide an array of columns for the table. Columns will render as the headers * of the table. */ columns: Array>; /** * Optionally specify the number of rows which should be included in the * skeleton state of the component */ rows?: number; }; declare function TableSkeleton({ cellPadding, columns, rows, ...rest }: TableSkeletonProps): JSX.Element; //#endregion export { Table, TableActions, TableActionsProps, TableBody, TableBodyProps, TableCell, TableCellPlaceholder, TableCellProps, TableContainer, TableContainerProps, TableDivider, TableHead, TableHeadProps, TableHeader, TableHeaderProps, TableProps, TableRow, TableRowProps, TableSkeleton, TableSkeletonProps, TableSubtitle, TableSubtitleProps, TableTitle, TableTitleProps };