import { CustomThemeProps } from "../../Theme/themeProps"; /** Size preset keying each renderer's own pixel/spacing lookup table. */ export type StageSize = "sm" | "md" | "lg"; /** Palette key: brand colors resolve direct, others (success/error/warning/info) via theme.colors.semantic. */ export type StageColorScheme = "primary" | "secondary" | "tertiary" | "success" | "error" | "warning" | "info"; /** Per-stage render state; StageProgress derives it from index vs. the active stage. */ export type StageState = "completed" | "active" | "upcoming"; /** Visual style of the tracker. */ export type StageVariant = "chevron" | "bar" | "pills" | "stepper"; /** One entry in StageProgressProps.stages — the ordered pipeline this tracker renders. */ export interface Stage { /** Compared to `value` via strict `===`; a numeric id vs a string `value` never matches. */ id: string | number; /** Truncates with an ellipsis (or a tooltip) under chevron/bar/pills; wraps to 2 lines under stepper. */ label: string; /** Disable selecting this stage individually; wins over `disabled` when both are set. */ isDisabled?: boolean; /** @deprecated Use `isDisabled` — renamed to match every other field. */ disabled?: boolean; } /** Top-level props for StageProgress; per-item rendering is delegated to StageItemProps/StepperStageProps. */ export interface StageProgressProps { /** Ordered list of pipeline stages. */ stages: Stage[]; /** Visual style. Default "chevron". */ variant?: StageVariant; /** Must exactly match a stage.id — no match silently renders every stage as "upcoming" (nothing active). */ value?: string | number; /** Skipped when isReadOnly, or when that specific stage's own `disabled` is true. */ onChange?: (id: string | number, stage: Stage, index: number) => void; /** Default "md"; also sets the loading skeleton's row height. */ size?: StageSize; /** Default "primary"; resolved per stage via resolveStagePalette, not applied directly. */ colorScheme?: StageColorScheme; /** Render stages before the active one in a distinct "done" style. Default true. */ markCompleted?: boolean; /** Show a check icon on completed stages. Default false. */ showCheck?: boolean; /** Render as a non-interactive indicator. */ isReadOnly?: boolean; /** Show the loading skeleton row instead of stages. */ isLoading?: boolean; /** Ignored for variant="stepper" (fixed per-size circle width there) — applies to chevron/bar/pills only. */ minStageWidth?: string; /** Centre the active stage in the stage strip; the page itself never scrolls. Default true. */ scrollActiveIntoView?: boolean; /** Also only applies to chevron/bar/pills — variant="stepper" never shows a tooltip, however long the label. */ tooltipThreshold?: number; /** Names the strip while it overflows with no interactive stage and so takes keyboard focus; a stepper keeps its list role. */ "aria-label"?: string; } /** Props for one chevron/bar/pills stage; variant="stepper" renders StepperStage/StepperStageProps instead. */ export interface StageItemProps { /** Ellipsis-truncates in the fixed-width box; see tooltipThreshold for when a tooltip also appears. */ label: string; /** 0-based position; with total, picks the chevron's first/last point shape. */ index: number; /** Stage count; with index, drives first/last chevron-point and bar-corner rounding. */ total: number; /** Drives fill and weight: completed is filled, active is emphasised and `aria-current="step"`, upcoming is muted. */ state: StageState; /** "chevron" | "bar" | "pills" (stepper has its own renderer). */ variant?: Exclude; /** Default "md"; keys this stage's own pixel/spacing lookup table. */ size?: StageSize; /** Default "primary"; passed straight into resolveStagePalette for this stage. */ colorScheme?: StageColorScheme; /** Called with no args — StageProgress wraps id/stage/index into this closure itself. */ onClick?: () => void; /** Disables all interactivity without dimming opacity (unlike disabled). */ isReadOnly?: boolean; /** Disables just this stage and dims it to 0.55 opacity; wins over `disabled` when both are set. */ isDisabled?: boolean; /** @deprecated Use `isDisabled` — renamed to match every other field. */ disabled?: boolean; /** Adds a check icon before the label only when this stage is completed. */ showCheck?: boolean; /** Falls back to this size's own fixed minW when unset, not to content width. */ minWidth?: string; /** Only scrolls when this item's own state is "active" — a no-op otherwise. */ scrollIntoViewWhenActive?: boolean; /** Character count (not pixels) above which the label swaps to a hover tooltip. */ tooltipThreshold?: number; } /** Props for one stepper-variant node; leftDone/rightDone fill the connector line per side. */ export interface StepperStageProps { /** Wraps up to 2 lines (noOfLines=2) instead of truncating; ignores tooltipThreshold entirely. */ label: string; /** 1-based step number shown inside the circle. */ number: number; /** Drives circle and connector styling: completed is filled, active is emphasised, upcoming is muted. */ state: StageState; /** Default "md"; keys this node's own circle/font/minWidth lookup table. */ size?: StageSize; /** Default "primary"; passed straight into resolveStagePalette for this node. */ colorScheme?: StageColorScheme; /** Called with no args — StageProgress's own onChange(id, stage, index) is wrapped upstream. */ onClick?: () => void; /** Disables interactivity without dimming opacity (unlike disabled). */ isReadOnly?: boolean; /** Disables this node and dims it to 0.55 opacity; wins over `disabled` when both are set. */ isDisabled?: boolean; /** @deprecated Use `isDisabled` — renamed to match every other field. */ disabled?: boolean; /** Defaults true here (unlike StageItem's false); StageProgress always overrides it explicitly. */ showCheck?: boolean; /** Hides (not shortens) the left connector line entirely, regardless of leftDone. */ isFirst: boolean; /** Hides (not shortens) the right connector line entirely, regardless of rightDone. */ isLast: boolean; /** Connector entering this node is part of a completed segment. */ leftDone: boolean; /** Connector leaving this node is part of a completed segment. */ rightDone: boolean; /** Only scrolls when this node's own state is "active" — a no-op otherwise. */ scrollIntoViewWhenActive?: boolean; /** Wraps the node in an `li` so a parent `ol` is a valid list; StageProgress sets it for variant="stepper". */ asListItem?: boolean; } /** Color set for one scheme's states, returned by resolveStagePalette (soft/strong/muted + text). */ export interface StagePalette { /** Background for "completed" stages, and the active stepper circle's outer glow ring. */ soft: string; /** Text/icon color for "completed" stages, contrast-walked against soft, not a fixed rung. */ softText: string; /** Background for "active" stages, and the hover fill for completed/upcoming stages. */ strong: string; /** Text/icon color on strong; picked between white/black per scheme to clear AA. */ onStrong: string; /** Hover-only background for an already-"active" stage; other states hover to strong instead. */ hover: string; /** Background for "upcoming" stages; also the unfilled stepper circle's border and idle connector line. */ muted: string; /** Text color for "upcoming" stages, chevron/bar/pills and stepper alike. */ mutedText: string; } /** Resolve a chevron palette for a given color scheme from the theme. */ export declare const resolveStagePalette: (theme: CustomThemeProps, colorScheme?: StageColorScheme) => StagePalette;