import { type ReactElement, type ReactNode } from "react"; import { Animated } from "react-native"; import { type ColorTokens, type TextStyle } from "../../style/index.js"; import { type Tone } from "./spinner.styles.js"; export interface SpinnerProps { /** * Optional label rendered beside (or below) the indicator in the spinner's * 500 14 foreground type. Supplying it turns the bare indicator into a * component-owned loading pairing, so the caller never hand-composes a * Row/Column + Typography beside a . A bare (no * children) is unchanged. */ children?: ReactNode; /** * Optional muted secondary line rendered under the label (a progress hint, * an ETA). Stacks under the label inside the control. */ description?: ReactNode; /** * Layout axis for the label. Omitted/false: the label sits BESIDE the * indicator in a snug row (the inline pairing). `stacked`: the indicator sits * over a centered label column (the panel / section-loader form). */ stacked?: boolean; small?: boolean; large?: boolean; primary?: boolean; muted?: boolean; foreground?: boolean; /** * Accessible description of what is loading. When absent, a string label * (children) becomes the accessible name; when neither is present it defaults * to "Loading". */ accessibilityLabel?: string; /** E2E hook forwarded to the root element. */ testID?: string; } export declare function toneOf(p: SpinnerProps): Tone; export type Size = "small" | "base" | "large"; export declare function sizeKeyOf(p: SpinnerProps): Size; /** The diameter a spinner draws at, for the web and iOS skins. */ export declare function sizeOf(p: SpinnerProps): number; export interface SpinnerSkin { /** The diameter per size step. */ sizes?: Record; render: (args: { size: number; color: string; rotate: Animated.Value; tokens: ColorTokens; }) => ReactElement; /** The label text beside/below the indicator (500 14, the foreground). */ label: (tokens: ColorTokens) => TextStyle; /** The muted secondary description line rendered under the label when present. */ description: (tokens: ColorTokens) => TextStyle; /** * Whether this skin consumes the shared rotation value. When `false`, the * shell skips starting the perpetual rotation loop (e.g. the web * ActivityIndicator animates itself and never reads `rotate`, so driving an * Animated.Value for it would be a wasted, never-stopping per-instance timer). * Defaults to `true`. */ spins?: boolean; } /** Build a Spinner component from a platform skin. */ export declare function createSpinner(skin: SpinnerSkin): (props: SpinnerProps) => import("react").JSX.Element; //# sourceMappingURL=spinner.shared.d.ts.map