import "./list_rows.css"; import type * as React from "react"; import type { ReactNode } from "react"; import { useRender } from "@base-ui/react/use-render"; import { type IdentityMark } from "./shape_frame"; import { type StyleProps } from "./style_props"; /** One run of the list — the subhead's words, and the rows under it. */ export interface ListRowsRun { key: string; label: string; rows: readonly T[]; } export interface ListRowsProps extends StyleProps { rows: readonly T[]; rowKey: (row: T) => string; /** THE RUNS THE ROWS FALL INTO — a subhead each, in the order they are given. * Absent or `null`, the list is flat. */ runs?: readonly ListRowsRun[] | null; /** The row's subject — the item's own line. */ title: (row: T) => string; /** The ONE line that qualifies it. */ caption?: (row: T) => string | null; /** The subject's mark at the item's leading edge. */ mark?: (row: T) => IdentityMark | null; /** WHAT THE ROW IS WORTH, ON THE RIGHT EDGE — drawn by the caller, because what * a figure IS (money in the row's own code, a level against its limit, a share) * is the data's answer and never the list's. */ figure?: (row: T) => ReactNode; /** One mark between the lines and the figure — where the row STANDS. */ badge?: (row: T) => ReactNode; /** Opens the row. */ open?: (row: T) => void; /** The row's accessible name, where the title does not read as one. Defaults to * `title`. */ identity?: (row: T) => string; /** The row's own verb and its ⋯, on the trailing edge, outside the press target. */ acts?: (row: T) => ReactNode; /** The row's tick, where the list is over a set the reader picks from. */ tick?: (row: T) => { checked: boolean; onChange: (on: boolean) => void; }; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** * THE SAME ROWS AS A LIST — one item per row: a mark, the subject over the one * line that qualifies it, where it stands, and what it is worth on the right edge. * * Reach for it where the rows have ONE figure worth comparing and a name worth * reading, and where a table's columns would be mostly blank. Where the reader * compares three or more measures ACROSS rows, that is `Table`: the whole value of * a column is that the eye runs down it, and a list gives that up. * * It is the itinerary's stop anatomy with the day taken out: `Itinerary` owns the * rail, the slot and the running total, because a trip's stops are ordered in TIME. * * THE ROW IS NOT THE BUTTON. It carries its own controls — a tick, a verb, a ⋯ — * so the surface takes no role and the door is a `RowFocusEntry` beside them. */ export declare function ListRows(props: ListRowsProps): React.ReactElement>;