import { TableHeaderProps } from "./TableHeader.mjs"; import { TableColumnProps } from "./TableColumn.mjs"; import { TableBodyProps } from "./TableBody.mjs"; import { TableRowProps } from "./TableRow.mjs"; import { TableExpandableRowsProps } from "./TableExpandableRows.mjs"; import { TableCellProps } from "./TableCell.mjs"; import { TableEditableCellProps } from "./TableEditableCell.mjs"; import { TableFooterProps } from "./TableFooter.mjs"; import { Selection } from "../types.mjs"; import { TableDropIndicatorProps } from "./TableDropIndicator.mjs"; import { TableDragPreviewProps } from "./TableDragPreview.mjs"; import { ReactNode } from "react"; import RAC from "react-aria-components"; type RemovedProps = 'className' | 'style' | 'selectionBehavior' | 'render'; export interface TableProps extends Omit { /** * Visual variant of the component. Which values exist is defined by the theme * and listed in the "Appearance" section of the component's documentation. */ variant?: 'grid' | 'default' | 'muted' | (string & {}); /** * Size of the component. Which values exist is defined by the theme and listed * in the "Appearance" section of the component's documentation. */ size?: 'compact' | 'default' | 'spacious' | (string & {}); /** * Controls how cell content overflows. Works best when columns have defined width props. * @default 'wrap' */ overflow?: 'truncate' | 'wrap'; /** * Controls whether text selection is allowed in cells. * @default false */ allowTextSelection?: boolean; /** * Controls vertical alignment of cell content. * @default 'middle' */ alignY?: 'top' | 'middle' | 'bottom' | 'baseline'; /** * Whether the table's data is loading. Marks the table as busy and announces * the loading state to screen readers. * @default false */ loading?: boolean; /** * Render function that receives the current selection and returns an ActionBar. * When provided, the Table manages selection wiring and ActionBar positioning automatically. */ actionBar?: (selectedKeys: Selection) => ReactNode; /** * The `id` of the column that carries the hierarchy and shows the expand * control. Setting it enables expandable rows, which also changes the table's * role from `grid` to `treegrid`. */ treeColumn?: RAC.TableProps['treeColumn']; /** * Which level of rows can be selected. Rows outside it show no checkbox and * are left out of select-all and range selection. Use `disabledKeys` for * rows that are selectable in principle but not right now. After select-all, * `onSelectionChange` receives `'all'`, which then means every row on the * selectable level, not every key. Once a row is deselected after that, the * selection lists only rendered rows, so the children of a collapsed group * drop out of it. * @default 'all' */ selectableRows?: 'all' | 'top-level' | 'nested'; /** * How far nested rows indent in the `treeColumn`. `aligned` lines the first * nested level up with its group's label, and deeper levels indent from * there. Use it when every top-level row is a group, otherwise a top-level * row without children reads as the previous group's last child. * @default 'default' */ treeIndent?: 'default' | 'aligned'; /** * The keys of the expanded rows (controlled). */ expandedKeys?: RAC.TableProps['expandedKeys']; /** * The keys of the initially expanded rows (uncontrolled). */ defaultExpandedKeys?: RAC.TableProps['defaultExpandedKeys']; /** * Handler that is called when rows are expanded or collapsed. */ onExpandedChange?: RAC.TableProps['onExpandedChange']; } declare const Table: (({ variant, size, overflow, allowTextSelection, alignY, loading, actionBar, treeColumn, selectableRows, treeIndent, selectedKeys: selectedKeysProp, defaultSelectedKeys: defaultSelectedKeysProp, onSelectionChange: onSelectionChangeProp, ...props }: TableProps) => import("react").JSX.Element) & { Header: ({ sticky, columns, children, ...props }: TableHeaderProps) => import("react").JSX.Element; Column: ({ alignX, width, minWidth, rowHeader, ...props }: TableColumnProps) => import("react").JSX.Element; Body: ({ emptyState, ...props }: TableBodyProps) => import("react").JSX.Element; Row: ({ id, columns, children, variant: variantProp, size: sizeProp, expandable, render, ...otherProps }: TableRowProps) => import("react").JSX.Element; ExpandableRows: ({ items, dependencies, children }: TableExpandableRowsProps) => import("react").JSX.Element | null; Cell: ({ children, alignX, overflow: cellOverflow, textValue, ...props }: TableCellProps) => import("react").JSX.Element; EditableCell: (props: TableEditableCellProps) => import("react").JSX.Element; Footer: ({ sticky, ...props }: TableFooterProps) => import("react").JSX.Element; renderDropIndicator: ((target: RAC.DropTarget) => import("react").JSX.Element) | undefined; renderDragPreview: ((items: import("@react-types/shared").DragItem[]) => import("react").JSX.Element | { element: import("react").JSX.Element; x: number; y: number; }) | undefined; }; export { Table, type TableBodyProps, type TableCellProps, type TableColumnProps, type TableDragPreviewProps, type TableDropIndicatorProps, type TableEditableCellProps, type TableFooterProps, type TableHeaderProps, type TableRowProps };