/** * Sanitizes a number input string to ensure it's a valid number format * Similar to Chakra UI's number input sanitization behavior * * @param inputValue - The raw input string value * @param allowNegative - Whether negative numbers are allowed * @returns Sanitized string value */ export declare const sanitizeNumberInput: (inputValue: string, allowNegative?: boolean) => string; /** * Clamps a numeric value to the nearest valid boundary (min or max) * If value is less than min, returns min * If value is greater than max, returns max * Otherwise returns the value unchanged * * @param value - The numeric value to clamp * @param min - Minimum allowed value * @param max - Maximum allowed value * @returns Clamped numeric value */ export declare const clampToBoundary: (value: number, min?: number, max?: number) => number; /** * Increments a value by step, respecting min/max constraints * * @param currentValue - Current numeric value (can be null) * @param step - Step size * @param min - Minimum allowed value * @param max - Maximum allowed value * @param preventNegative - Whether to prevent negative values * @returns New incremented value, clamped to boundaries */ export declare const incrementValue: (currentValue: number | null, step?: number, min?: number, max?: number, preventNegative?: boolean) => number; /** * Decrements a value by step, respecting min/max constraints * * @param currentValue - Current numeric value (can be null) * @param step - Step size * @param min - Minimum allowed value * @param max - Maximum allowed value * @param preventNegative - Whether to prevent negative values * @returns New decremented value, clamped to boundaries */ export declare const decrementValue: (currentValue: number | null, step?: number, min?: number, max?: number, preventNegative?: boolean) => number; /** * Clamps and sanitizes the value on blur * Similar to Chakra UI's clampValueOnBlur behavior * * @param inputValue - The input string value * @param allowNegative - Whether negative numbers are allowed * @param min - Minimum allowed value * @param max - Maximum allowed value * @returns Clamped and sanitized value string */ export declare const clampValueOnBlur: (inputValue: string, allowNegative?: boolean, min?: number, max?: number) => string; /** * Checks if a numeric value is outside the valid range * * @param value - The numeric value to check * @param min - Minimum allowed value * @param max - Maximum allowed value * @returns True if value is outside the valid range */ export declare const isValueOutsideRange: (value: number, min?: number, max?: number) => boolean; /** * Checks if incrementing would exceed max * * @param currentValue - Current numeric value (can be null) * @param step - Step size * @param min - Minimum allowed value * @param max - Maximum allowed value * @returns True if incrementing would exceed max */ export declare const wouldExceedMax: (currentValue: number | null, step: number, min?: number, max?: number) => boolean; /** * Checks if decrementing would go below min * * @param currentValue - Current numeric value (can be null) * @param step - Step size * @param min - Minimum allowed value * @param preventNegative - Whether to prevent negative values * @returns True if decrementing would go below min */ export declare const wouldGoBelowMin: (currentValue: number | null, step: number, min?: number, preventNegative?: boolean) => boolean; /** * Generates an error message for a value outside the valid range * * @param min - Minimum allowed value * @param max - Maximum allowed value * @returns Error message string */ export declare const getRangeErrorMessage: (min?: number, max?: number) => string; /** * Validates if a number value is within min/max bounds * * @param value - The number value to validate * @param min - Minimum allowed value * @param max - Maximum allowed value * @returns True if value is within bounds, false otherwise */ export declare const isValueInRange: (value: number | null | undefined, min?: number, max?: number) => boolean; /** * Validates if a string represents a valid number * * @param value - The string value to validate * @returns True if valid number, false otherwise */ export declare const isValidNumber: (value: string) => boolean;