/** * Consumer-supplied override for a step. * * - `completed` — the step holds a value; render the tick and let the user * back in to change it. * - `error` — the step's own validation failed; always wins. * - `unlocked` (1.11.0) — the step has been *reached* but holds no value of * its own. It renders exactly like an upcoming step, but the user may open * it. Added for flows whose final step can never report itself "completed" * because its validity belongs to a form inside it: without this, moving * the cursor backwards left that step HTML-`disabled` and unreachable. * * `'completed'` and `'error'` behave exactly as before, so consumers passing * either (or nothing) are unaffected. A consumer that reads this union back * in an exhaustive `switch` needs a case for `'unlocked'`; `StepState` — the * union such a switch usually runs on — is deliberately untouched. */ export type StepStatus = 'completed' | 'error' | 'unlocked'; export type StepState = 'upcoming' | 'current' | 'completed' | 'error'; export interface StepSpec { /** Visible step label — comes from the consumer, already translated. */ label: string; /** Optional secondary line (kept short; shown in accordion + progress captions). */ description?: string; /** * Consumer-explicit status override. `error` always wins; `completed` is * honoured only for steps at or beyond the active index so the active step * always keeps `current` (otherwise a consumer pre-setting `completed` on * every step would silently mask the current position). `unlocked` changes * reachability only — see `stepIsReachable` — and never the rendered state. */ status?: StepStatus; } export declare function stateForStep(index: number, activeStep: number, status?: StepStatus): StepState; /** * May the user open this step? * * Everything at or before the cursor is reachable, as is any step the * consumer has explicitly marked `completed`, `error` or `unlocked`. * Steps ahead of the cursor with no status stay locked, exactly as before. */ export declare function stepIsReachable(index: number, activeStep: number, status?: StepStatus): boolean; //# sourceMappingURL=stepper.d.ts.map