import { ComponentPropsWithoutRef, ReactNode } from 'react'; /** * Presentational step status with a component-owned assistive label. It implies * no interactive or form semantics. */ export type ActionLogStatus = "not-started" | "in-progress" | "success" | "error"; /** * Heading-level anchor: the steps toggle is one level above, details one below, * clamped to `h2`–`h6`. Step titles remain body text. */ export type ActionLogTitleLevel = 3 | 4 | 5 | 6; export type ActionLogStep = { /** * Stable identity and React key, preserving disclosure state across appends. */ id: string; /** Visible step heading; remains body text, not an outline heading. */ title: string; /** Supporting copy below the label; omit when the label is sufficient. */ description?: string; /** * Drives the connector icon and assistive label. Defaults to `"not-started"`. */ status?: ActionLogStatus; /** * Content in a collapsed per-step disclosure. Omit for no details action. */ details?: ReactNode; }; export type ActionLogProps = Omit, "children" | "style"> & { /** Timeline entries in display order. */ steps: ActionLogStep[]; /** Defaults to `4`. See {@link ActionLogTitleLevel}. */ titleLevel?: ActionLogTitleLevel; /** Initial uncontrolled expansion state for the step list. Defaults to `true`. */ defaultExpanded?: boolean; className?: string; };