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 { ColorName } from "./color_tokens"; 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 and * strung on a spine. The caller's model owns the order. Groups and items are siblings: one run, one * spine, one ring column, one text edge. */ export interface ChecklistProps extends StyleProps { children?: ReactNode; /** * For rows that are positions; off for independent items, where a line claims a false order. * Published as `data-connected`, which mutes what lies ahead. */ connected?: boolean; /** * `check` (default) is a ring for rows someone completes, a ticked one muted as done; `select` the * square for rows someone picks, a ticked one chosen at full ink. Same gutter. */ mark?: "check" | "select"; /** 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 { title: string; /** * Controlled: who may be open is the caller's rule, and the caller omits the rows, since they are * siblings. */ open?: boolean; /** * A reading of the rows a closed phase names, in the rows' `trailing` column. Nothing here while * open: the rows state it. */ trailing?: ReactNode; /** Omit for a phase that is always open. */ onToggleOpen?: () => void; labels?: { expand?: string; collapse?: string; }; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** * A phase: a name over the rows that follow, with no control (it owns no completion) and no body (a * condition on a heading is ambiguous). No ring and the ring column's edge separate it from a * current row at the same rung. */ export declare function ChecklistGroup(props: ChecklistGroupProps): React.JSX.Element; export declare namespace ChecklistGroup { var markerless: true; } export interface ChecklistItemProps extends StepPositional, StyleProps { /** Doubles as the ring's accessible name. */ title: string; /** For repeated titles: the distinguishing noun goes here, not in `title`. */ accessibilityLabel?: string; done?: boolean; /** Takes over the mark from `done`/`current`; `fail` renders red with an X. */ verdict?: "pass" | "fail"; /** * Medium weight and the screen reader's position. On tasks the row still owed; on states the last * ticked, so possibly `done` too. */ current?: boolean; /** For the row a record is in, in the family the register's dot wears. */ tone?: ColorName; /** Omit for a run that only reports. */ onToggle?: (done: boolean) => void; /** * The row's own stamp, which is how a milestone is backdated; the tick writes today. A field with * a home elsewhere is a `ChecklistNote`. */ trailing?: ReactNode; /** Two words; growing prose is a `ChecklistNote`. */ meta?: string; menu?: ReactNode; children?: ReactNode; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } export declare function ChecklistItem(props: ChecklistItemProps): React.JSX.Element; export interface ChecklistNoteProps extends StyleProps { children: ReactNode; /** `warning` outstanding, `danger` a refusal, `muted` a remark. */ tone?: "muted" | "warning" | "danger"; /** The section that owns the missing value: a checklist reports, it does not collect. */ action?: { label: string; onPress: () => void; }; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** A condition on one row, on its own line; two words belong in `ChecklistItem.meta`. */ 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; } /** Wraps on a narrow column so two verbs never push the run sideways. */ export declare function ChecklistActions({ children, render, ref, ...props }: ChecklistActionsProps): React.ReactElement>;