import { type ComponentType, type ReactNode } from "react"; import { type ColorTokens, type FieldWidthProps, type ViewStyle, type TextStyle, type StyleProp } from "../../style/index.js"; export interface ProgressProps extends FieldWidthProps { /** Completion as a 0..1 fraction (clamped). Ignored when `indeterminate`. Defaults to 0. */ value?: number; /** Indeterminate mode: ignore `value` and animate a sliding bar (a spinner on iOS). */ 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; 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; /** Outer flex composition within a parent only, never a restyle hook; width comes from the width axis (block/narrow/wide). */ style?: StyleProp; } export type Size = "small" | "base" | "large"; export type Tone = "default" | "warning" | "danger"; export declare function toneOf(p: ProgressProps): Tone; export declare function toneFill(tone: Exclude, dark: boolean): string; export interface ProgressSkin { /** Track thickness (px) per size. */ height: Record; /** Corner radius (px) per size for both the track and the fill. */ radius: Record; /** Inactive track fill. */ trackColor: (tokens: ColorTokens) => string; /** Active (filled) bar color. */ fillColor: (tokens: ColorTokens) => string; /** 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; 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