import { type ComponentType, type ReactNode } from "react"; import { type ColorTokens, type LayoutStyle, type MeasureProps, type ViewStyle, type TextStyle } from "../../style/index.js"; export interface ProgressProps extends MeasureProps { /** Completion as a 0..1 fraction (clamped). Ignored when `indeterminate`. Defaults to 0. */ value?: number; /** A fixed number of discrete dashes, filled by the same fractional value. */ segments?: number; /** * Indeterminate mode: ignore `value` and animate * * a sliding bar (a spinner on iOS). * * * a spinner. * * * a sliding bar. * */ indeterminate?: boolean; /** * Optional title line rendered ABOVE the bar. Supplying it (with or without a * `description`/`showValue`) builds the stacked header inside the control, so the * caller never hand-composes a Row/Column + Typography around the bar. This is the * "components own their label anatomy" contract, mirroring Checkbox/Radio/Switch's * `description` slot. */ children?: ReactNode; /** Optional muted secondary line rendered under the title. */ description?: ReactNode; /** * Render the percent (derived from `value`) as a right-aligned readout on the title * line. Indeterminate has no measurable value, so this renders nothing then. */ showValue?: boolean; /** * A short status word on the title line, in the percent readout's place and type * ("indeterminate", "strong", "paused"): what the bar means right now, where * `description` is a sentence under the title. It shows while indeterminate too, and * when both are passed the status wins the readout slot over `showValue`. */ status?: ReactNode; warning?: boolean; danger?: boolean; small?: boolean; large?: boolean; /** Accessible description of what is progressing. */ accessibilityLabel?: string; /** E2E hook forwarded to the root element. */ testID?: string; /** Composition within a parent only, never a restyle hook and never a width: the parent layout container provides the bounds. */ style?: LayoutStyle; } export type Size = "small" | "base" | "large"; export type Tone = "default" | "warning" | "danger"; export declare function sizeOf(p: ProgressProps): Size; export declare function toneOf(p: ProgressProps): Tone; export declare function toneFill(tone: Exclude, tokens: ColorTokens): string; export interface ProgressSkin { /** Track thickness (px) per size. */ height: Record; /** Inactive track fill. */ trackColor: (tokens: ColorTokens) => string; /** Active (filled) bar color. */ fillColor: (tokens: ColorTokens) => string; /** An optional glow under the active fill, in the fill's color (the web's halo). */ fillGlow?: (color: string) => ViewStyle; /** The title line rendered above the track (canonical 14/20 medium, foreground). */ label: (tokens: ColorTokens) => TextStyle; /** The muted secondary line under the title (canonical 12/16, muted-foreground). */ description: (tokens: ColorTokens) => TextStyle; /** The trailing percent readout on the title line (14/20 muted-foreground, tabular). */ valueReadout: (tokens: ColorTokens) => TextStyle; /** Width of the sliding indeterminate bar as a fraction (0..1) of the track. */ indeterminateWidth: number; /** * M3 anatomy (Android): the gap (dp) between the active indicator's trailing edge * and the inactive track, so the two read as separate segments. Omit (or 0) for the * continuous single-track structure (iOS/web). Determinate only: the indeterminate * sweep keeps the continuous rail. */ trackGap?: number; /** * M3 anatomy (Android): render the stop indicator, a 4x4dp dot in the active color * pinned at the track's trailing edge (vertically centered, so it sits 2dp in from * the edge of the 8dp-thick large track). Determinate only, per M3. */ stopIndicator?: boolean; } export interface ProgressParts { IndeterminateSpinner?: ComponentType<{ small?: boolean; large?: boolean; muted?: boolean; accessibilityLabel?: string; testID?: string; }>; } /** Build a Progress component from a platform skin (plus optional per-OS parts). */ export declare function createProgress(skin: ProgressSkin, parts?: ProgressParts): (props: ProgressProps) => import("react").JSX.Element; //# sourceMappingURL=progress.shared.d.ts.map