import { type ReactNode } from "react"; import { type ColorTokens, type FieldWidthProps, type ViewStyle, type TextStyle, type StyleProp } from "../../style/index.js"; export interface SliderProps extends FieldWidthProps { /** Controlled value; omit for uncontrolled use. The thumb sits at this value (clamped to [min, max]). */ value?: number; /** Initial value for uncontrolled use (a bare drags out of the box). Default `min`. */ defaultValue?: number; /** Lower bound of the range. Default 0. */ min?: number; /** Upper bound of the range. Default 100. */ max?: number; /** Snap increment. Default 1. Set to a fraction for finer control. */ step?: number; /** Fired with the next (clamped, snapped) value as the thumb is dragged or the track tapped (both modes). */ onChange?: (value: number) => void; /** E2E hook forwarded to the slider container. */ testID?: string; /** * The title line, rendered ABOVE the track (a slider's label sits above the rail, * not beside it). Supplying it builds the component-owned header so the caller * never hand-composes a Column + Typography above a bare slider, and the visible * title also names the control for assistive tech (see `accessibilityLabel`). */ children?: ReactNode; /** Optional muted secondary line rendered under the title, for a hint or unit note. */ description?: ReactNode; /** * Render the live current value (the same value the thumb sits at) as a trailing * readout on the title line, right-aligned. With no title it still renders the * value as a standalone trailing readout above the track. The number tracks the * drag in real time and uses tabular figures so it does not jitter. */ showValue?: boolean; small?: boolean; large?: boolean; disabled?: boolean; /** Accessible name for the slider (e.g. "Volume"). */ accessibilityLabel?: string; /** Extra style on the slider container, applied last. */ style?: StyleProp; } export type Size = "small" | "base" | "large"; export interface SliderSkin { /** Track height for a size, used by the shell for hit geometry and to center the segments. */ trackHeight: (size: Size) => number; /** Thumb width along the travel axis (the diameter for round thumbs, the bar/capsule width otherwise). */ thumbWidth: (size: Size) => number; /** Thumb height (the diameter for round thumbs), used by the shell to center the thumb. */ thumbHeight: (size: Size) => number; /** * Gap between the handle and BOTH track segments (M3 Expressive anatomy). When * set (> 0) the shell renders the track as two absolutely-positioned segments * (active | gap | handle | gap | inactive) and `track`/`fill` supply only the * segment colors + per-corner radii; when 0/omitted the shell nests `fill` * inside the full-width `track` rail (the continuous-rail anatomy). */ trackGap?: number; /** Floor for the interactive row height (iOS HIG 44pt / Android M3 48dp minimum touch target). */ minRowHeight?: number; /** Render the M3 stop indicator dot in the inactive track end (requires `tick`). */ endStop?: boolean; /** Stop/tick indicator dot diameter (default 4). */ tickSize?: number; /** The inactive track: the full-width rounded rail (continuous anatomy) or the inactive segment (gap anatomy). */ track: (tokens: ColorTokens, size: Size, disabled: boolean) => ViewStyle; /** The active range: the filled overlay from min to the value (continuous) or the active segment (gap anatomy). */ fill: (tokens: ColorTokens, size: Size, disabled: boolean) => ViewStyle; /** The draggable thumb (its left/top offset is set by the shell). */ thumb: (tokens: ColorTokens, size: Size, disabled: boolean, pressed: boolean) => ViewStyle; /** * Render the thumb as a real Liquid Glass control (the iOS 26 slider handle * "transforms into liquid glass during interaction", WWDC25). When set, the shell * routes the thumb through the shared `GlassSurface` primitive: on iOS 26+ (theme * `surface === "glass"`, the platform default there) it becomes an Apple Liquid * Glass knob that refracts the track, and it springs up on press (Apple's * scale/bounce); under solid surface, Reduce Transparency, or Increase Contrast it * degrades to the opaque `thumb` fill above, unchanged. Omitted skins render the * plain `thumb` View exactly as before. */ glassThumb?: boolean; /** * The bright translucent under-fill for the glass knob (passed to `GlassSurface`'s * `tint`), so the handle reads as a light glass puck on both schemes instead of a * popover-tinted blob. Only consulted when `glassThumb` is set. */ glassTint?: (tokens: ColorTokens) => string; /** * Stop/tick dot fill for stepped sliders (and the M3 end stop). The shell sizes * and positions the dot; `onActive` says the dot sits on the active (filled) * side, for the M3 on-primary vs on-secondary-container roles. Omit to render * no ticks (the web look). */ tick?: (tokens: ColorTokens, size: Size, disabled: boolean, onActive: boolean) => ViewStyle; /** The title line above the track (component-owned label type; brand, not a platform face). */ label: (tokens: ColorTokens, size: Size) => TextStyle; /** The muted secondary description line under the title. */ description: (tokens: ColorTokens, size: Size) => TextStyle; /** The live value readout trailing the title line (muted, tabular figures). */ value: (tokens: ColorTokens, size: Size) => TextStyle; } /** Build a Slider component from a platform skin. */ export declare function createSlider(skin: SliderSkin): (props: SliderProps) => import("react").JSX.Element; //# sourceMappingURL=slider.shared.d.ts.map