import type { IconName } from '../mud-icon/mud-icon.types'; /** * Lifecycle state of a single step in a stepper. * * - `pending` — step has not yet been reached and is NOT navigable; neutral grey ring + faded number. * - `current` — the step the user is currently on; brand ring + brand number + brand label. * - `completed` — step is finished; filled brand circle + checkmark, neutral label * (navigable back when interactive). * - `available` — a future step the user MAY jump to; brand outline ring + brand number, neutral * label (navigable forward when interactive). * - `error` — step failed validation or was blocked; danger ring + danger cross, neutral label. */ export type StepperStepStatus = 'pending' | 'current' | 'completed' | 'available' | 'error'; /** * Orientation of the tracker — horizontal flows steps left-to-right, vertical top-to-bottom. */ export type StepperOrientation = 'horizontal' | 'vertical'; /** * Declarative shape for a single step in `mud-stepper`. * * The `status` field is the source of truth for visual state and ARIA semantics. * `iconName` overrides the default indicator (number for pending/current, checkmark * for completed, cross for error). */ export type StepperStep = { /** Optional stable identifier (used as the React-style key when re-ordering). */ id?: string; /** Visible label, e.g. `'Pasul 1: Date personale'`. Used for the accessible name. */ label: string; /** Optional secondary line rendered below the label (rich step variant). */ supportingText?: string; /** Lifecycle state — see {@link StepperStepStatus}. */ status: StepperStepStatus; /** * Optional custom indicator icon (e.g. `'checkmark-large'`). When omitted, * the component picks an indicator based on `status`: * - `completed` → `checkmark-large` * - `error` → `exclamation` * - otherwise → the step number (1-based index). */ iconName?: IconName; /** When true, the step is rendered as non-actionable even in interactive mode. */ disabled?: boolean; }; /** * Emitted by `mud-stepper` when a step is activated via click or keyboard. * Only fires when the tracker is `interactive` and the step is not disabled. */ export type StepperStepClickDetail = { /** Zero-based index of the step in the `steps` array. */ index: number; /** The step that was activated. */ step: StepperStep; };