/** One label/value row. */ export interface SpecItem { /** Term text; also part of the row key, so keep labels distinct. */ label: string; /** Plain-text definition shown beside the label. */ value: string; } /** Every string the table renders; override all of them for another language. */ export interface SpecTableLabels { /** Text of the toggle that expands the folded rows. */ showAll: string; /** Text of the toggle that folds back to `collapsedCount` rows. */ showLess: string; } /** Definition list of specifications on striped tonal rows, with an optional "Show all" fold. */ export interface SpecTableProps { /** Rows in display order; an empty array renders nothing at all. */ items: SpecItem[]; /** 2 sits label and value side by side per row on wide screens and falls back to 1 on narrow ones. */ columns?: 1 | 2; /** Rows shown before "Show all"; omit to show every row with no toggle. */ collapsedCount?: number; /** Controlled expanded state; pair with `onExpandedChange`. */ expanded?: boolean; /** Initial expanded state when uncontrolled; defaults to false. Ignored once `expanded` is set. */ defaultExpanded?: boolean; /** Fires with the next expanded state when the toggle is clicked, in both controlled and uncontrolled modes. */ onExpandedChange?: (expanded: boolean) => void; /** Per-key overrides of the toggle text; defaults to "Show all" / "Show less". */ labels?: Partial; /** Accessible name applied to the definition list. */ "aria-label"?: string; "data-testid"?: string; }