import { UiElement } from '../shared/element.js'; import type { TableCellEditDetail, TableCellEditor, TableEditOption } from './defs.js'; /** * Carbon `cds-table-cell`: one cell of a `` (`role=cell`). Its padding follows the table's * `size`; its rules and text colour follow the row (zebra stripe, hover). * * Sorting reads the cell's `sort-value` attribute when it has one, else its text: give a date or an * amount shown as "12,000 ฿" its plain value (`sort-value="12000"`). CSV reads `csv-value`, else the text. * * The table sets `column-hidden`, `pinned` and `editable` from the cell's column header, and `editing` while * the cell's editor is open (an editable column: a pencil after the value on hover and focus). * * @slot - The cell's content * @csspart content - The box inside the cell that holds its padding * @csspart edit-icon - The pencil of an editable cell * @csspart editor - The input or select while editing * @csspart error - The `validate` message under the editor * @cssprop --ui-table-cell-ink - Text colour of a row at rest (default `--ui-ink-muted`; Kanok: `--ui-ink`) */ export declare class UiTableCell extends UiElement { static readonly styles: import("lit").CSSResult[]; /** Its column is hidden (the table follows the header's `column-hidden`). */ columnHidden: boolean; /** Its column is pinned (the table follows the header's `pinned`). */ pinned?: 'start' | 'end'; /** Its column's editor (the table follows the header's `editable`). */ editable?: TableCellEditor; /** The editor is open (the table sets it). */ editing: boolean; /** The editor's text while editing (the table sets where it starts). */ draft: string; /** The editor's name for screen readers: the column and the row (the table sets it). */ editorLabel: string; /** A select editor's choices (the header's `options`). */ editorOptions: TableEditOption[]; /** The header's `validate` message for the value in the editor. */ editorError: string; connectedCallback(): void; /** What the editor holds now. */ get editorValue(): string; /** Focuses the open editor; `select` selects a text editor's text (else the caret goes to the end). */ focusEditor(select: boolean): void; private readonly onDraft; private renderError; private renderEditor; private renderContent; render(): import("lit-html").TemplateResult<1>; } export interface UiTableCellEventMap extends HTMLElementEventMap { /** The table's grid fires it from the cell before writing an edited value (cancelable). */ 'ui-table-cell-edit': CustomEvent; } declare global { interface HTMLElementTagNameMap { 'ui-table-cell': UiTableCell; } }