import type { StyleProp, ViewStyle } from 'react-native'; import type { IconName } from '../Icon/icon-types'; import { Intent, Size } from '@idealyst/theme'; import { FormInputStyleProps } from '../utils/viewStyleProps'; import { RangeAccessibilityProps } from '../utils/accessibility'; // Component-specific type aliases for future extensibility export type SliderIntentVariant = Intent; export type SliderSizeVariant = Size; /** * Range input component for selecting numeric values within a defined range. * Supports step intervals, marks, and real-time value display. */ export interface SliderProps extends FormInputStyleProps, RangeAccessibilityProps { /** * Current slider value */ value?: number; defaultValue?: number; min?: number; max?: number; step?: number; disabled?: boolean; /** * Error message to display below the slider. When set, shows error styling. */ error?: string; /** * Helper text to display below the slider. Hidden when error is set. */ helperText?: string; /** * Label text to display above the slider */ label?: string; showValue?: boolean; showMinMax?: boolean; marks?: SliderMark[]; intent?: SliderIntentVariant; size?: SliderSizeVariant; icon?: IconName | React.ReactNode; /** * Called when the slider value changes during interaction */ onChange?: (value: number) => void; /** * Called when the user finishes interacting with the slider */ onChangeCommit?: (value: number) => void; style?: StyleProp; testID?: string; } export interface SliderMark { value: number; label?: string; }