import { RadiantElement } from '@ecopages/radiant'; import type { EventEmitter } from '@ecopages/radiant/tools/event-emitter'; import type { RuiCheckboxChangeDetail } from '../checkbox/checkbox.script'; export type RuiTableSelectionMode = 'none' | 'single' | 'multiple'; export type RuiTableSortDirection = 'ascending' | 'descending'; export type RuiTableProps = { label?: string; ariaBusy?: 'true' | 'false'; selectionMode?: RuiTableSelectionMode; /** Selected row ids. Multiple selections are comma-separated. */ value?: string; sortColumn?: string; sortDirection?: RuiTableSortDirection; }; export type RuiTableChangeDetail = { value: string; }; export type RuiTableSortChangeDetail = { column: string; direction: RuiTableSortDirection; }; export type RuiTableRowActionDetail = { rowId: string; }; type RuiTableBindings = { label: string; ariaBusy: 'true' | 'false'; selectionMode: RuiTableSelectionMode; sortColumn: string; sortDirection: RuiTableSortDirection; }; /** * `` — a keyboard-navigable table with optional row selection and sorting. * * @remarks Use the `RuiTable` view to compose header, body, and rows in JSX. The host * coordinates selection, sorting, and APG keyboard behavior over that authored tree * without re-rendering it through a slot. * * @see https://react-aria.adobe.com/Table * @element rui-table * @attr {string} label - Accessible name for the table. * @attr {('true'|'false')} aria-busy - Whether the collection is currently updating. * @attr {('none'|'single'|'multiple')} selection-mode - Row selection mode. Default: `none`. * @attr {string} value - Selected row ids, comma-separated for multiple selection. * @attr {string} sort-column - Active sortable column id. * @attr {('ascending'|'descending')} sort-direction - Active sorting direction. Default: `ascending`. * @fires rui-change - Emitted after the selected row ids change. * @fires rui-sort-change - Emitted after a sortable header changes direction. * @fires rui-row-action - Emitted when an actionable row is activated. */ export declare class RuiTable extends RadiantElement { label: string; ariaBusy: 'true' | 'false'; selectionMode: RuiTableSelectionMode; value: string; sortColumn: string; sortDirection: RuiTableSortDirection; changeEvent: EventEmitter; sortChangeEvent: EventEmitter; rowActionEvent: EventEmitter; private structureObserver?; private rovingSyncPending; connectedCallback(): void; protected onConnected(): void; disconnectedCallback(): void; onSelectionUpdated(): void; onSortUpdated(): void; private observeStructure; private queueRovingSync; private getRows; private getSelectableRows; private getRowCells; private getFocusableCells; private selectedIds; private setSelectedIds; private getActiveCellPosition; private syncSelectionState; private syncRovingTabindex; private syncSorting; private isInteractiveTarget; private selectRow; private focusCell; private activateRow; onCellClick(event: Event): void; onCellDoubleClick(event: Event): void; onCellKeydown(event: KeyboardEvent): void; onRowSelectionChange(event: CustomEvent): void; onSelectAllChange(event: CustomEvent): void; onSortClick(event: Event): void; } export {};