import "./checklist.css"; import type * as React from "react"; import { type ReactNode } from "react"; import { useRender } from "@base-ui/react/use-render"; import { type StepPositional } from "./stepper"; import { type StyleProps } from "./style_props"; import { type InkColor } from "./text_ink"; /** * THE CHECKLIST — an ordered run of rows a reader ticks off, optionally grouped * into phases, optionally strung on a connecting spine. The ORDERING lives in * the caller's model, not here; this renders rows. * * Groups and items are SIBLINGS, not nested: one run, one spine, one ring * column, one text edge. */ export interface ChecklistProps extends StyleProps { children?: ReactNode; /** String the rings on a connecting line — for a run whose rows are POSITIONS. * Off for independent items, where a line would claim an order the work does * not have. */ connected?: boolean; /** What the mark MEANS: `check` (default) for rows someone COMPLETES — a ring * — and `select` for rows someone PICKS, which wear the square box selection * wears everywhere else. Same anatomy, same gutter. */ mark?: "check" | "select"; /** The ink ROLE for reached rings and the line. Defaults to neutral. */ color?: InkColor; accessibilityLabel?: string; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } export declare function Checklist({ children, connected, mark, color, accessibilityLabel, testID, render, ref, ...props }: ChecklistProps): React.JSX.Element; export interface ChecklistGroupProps extends StepPositional, StyleProps { /** The phase's name. */ title: string; /** CONTROLLED: who may be open at once is the CALLER's rule. The group does not * hide its own rows either — they are its SIBLINGS in the run, so the caller * simply does not render them. */ open?: boolean; /** Show the disclosure — a small pressable text beside the name. Omit for a * phase that is always open. */ onToggleOpen?: () => void; /** Override the disclosure's wording; otherwise the locale's. */ labels?: { expand?: string; collapse?: string; }; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** * A PHASE — a name over the rows that follow it, and nothing else. It carries no * control, because a phase owns no completion of its own, and no BODY either: a * condition hung off a heading leaves the reader working out which of the rows * beneath it it was about. * * TYPE: `sm`, medium, full ink — the treatment a BAND heading already wears * elsewhere on a record. What separates it from a CURRENT row at the same rung * is the structure: a group carries no ring and sits on the ring column's own * left edge. */ export declare function ChecklistGroup(props: ChecklistGroupProps): React.JSX.Element; export declare namespace ChecklistGroup { var markerless: true; } export interface ChecklistItemProps extends StepPositional, StyleProps { /** The row's name. Doubles as the ring's accessible name — the ring carries no * visible label of its own, so the text rides beside it. */ title: string; /** Override that accessible name (default `title`), for when the SAME titles * repeat down a surface: a reader moving control to control gets the names * without the headings between them. The distinguishing noun goes HERE, not * in `title`, which the heading above already says. */ accessibilityLabel?: string; /** Ticked. */ done?: boolean; /** A DECIDED outcome, not a completion tick. It takes over the row's mark from * `done`/`current` — a verdict is reached by definition — and renders `fail` * in red with an X. */ verdict?: "pass" | "fail"; /** The row the reader is waiting on — medium weight, so a run full of ticks * still says which one is owed. */ current?: boolean; /** Tick / un-tick. Omit for a run that only reports. */ onToggle?: (done: boolean) => void; /** ONE value on the title's row — in practice the row's own STAMP, which is how * a milestone gets BACKDATED; the tick writes today. The row's OWN value * only: a field with a home elsewhere is reported by a `ChecklistNote`. */ trailing?: ReactNode; /** SHORT muted text after `trailing`. Two words; prose that grows is a * `ChecklistNote`, which owns its own line. */ meta?: string; /** The row's overflow — an `ActionMenu`, at the end of its title row. */ menu?: ReactNode; /** The row's own notes, acts and detail. */ children?: ReactNode; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** ONE ROW — the level that carries the ticks. */ export declare function ChecklistItem(props: ChecklistItemProps): React.JSX.Element; export interface ChecklistNoteProps extends StyleProps { children: ReactNode; /** `warning` for something outstanding, `danger` for a refusal, `muted` for a * plain remark. */ tone?: "muted" | "warning" | "danger"; /** Where the reader goes to resolve it — the section that OWNS the missing * value. A checklist REPORTS: it does not collect, and it does not PREVIEW. */ action?: { label: string; onPress: () => void; }; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** A CONDITION on one row, in words. Its own line, never inline: two words that * ride the title belong in `ChecklistItem.meta`, and prose that grows would wrap * into the title. */ export declare function ChecklistNote({ children, tone, action, testID, render, ref, ...props }: ChecklistNoteProps): React.ReactElement>; export interface ChecklistActionsProps extends StyleProps { children: ReactNode; ref?: React.Ref; render?: useRender.RenderProp; } /** The act(s) that complete or leave this row. Wraps on a narrow column so a row * with two verbs never pushes the run sideways. */ export declare function ChecklistActions({ children, render, ref, ...props }: ChecklistActionsProps): React.ReactElement>;