import { default as React } from 'react'; import { LabelPlacement } from './Input'; import { StatusLevel } from '../../utils'; import { StatusThresholds } from '../data/propertyConfig'; export type NumberInputSize = "small" | "medium" | "large"; /** * Re-export SliderStatus as an alias for StatusLevel for convenience. * Includes: 'normal' | 'standby' | 'caution' | 'serious' | 'critical' | 'off' */ export type SliderStatus = StatusLevel; export interface NumberInputProps { /** Current value */ value: number; /** Change handler */ onChange: (value: number) => void; /** Minimum value */ min?: number; /** Maximum value */ max?: number; /** Step increment */ step?: number; /** Number of decimal places to show and round to. Omit or 0 = integer. Use 2 (or any positive number) to show decimals; 2 is typical when decimals are needed. */ precision?: number; /** Unit label displayed after the input (e.g., "MHz", "W", "°C") */ unit?: string; /** Label text or ReactNode (supports rich content like tooltip icons) */ label?: React.ReactNode; /** Helper text below the input */ helperText?: string; /** Error state / message */ error?: boolean | string; /** Show slider below the input */ slider?: boolean; /** Size variant */ size?: NumberInputSize; /** Disabled state */ disabled?: boolean; /** Full width */ fullWidth?: boolean; /** Custom width */ width?: string | number; /** ID for accessibility */ id?: string; /** Custom className */ className?: string; /** Custom style */ style?: React.CSSProperties; /** Text alignment inside the input field */ textAlign?: "left" | "center" | "right"; /** * Label placement style. * - `'outlined'` — label sits on the input border (notched/Material-style). **Default.** * - `'above'` — label sits above the input with a gap (classic stack). */ labelPlacement?: LabelPlacement; /** Required indicator */ required?: boolean; /** * Enable status-based coloring on the slider track, thumb, and glow. * When enabled, the slider color reflects the current status instead of * the default accent color. */ statusMode?: boolean; /** * Manual status override. When provided, this status is used directly * instead of computing from thresholds. */ status?: SliderStatus; /** * Threshold map for automatic status resolution based on current value. * Supports both high thresholds (critical, serious, caution) and low * thresholds (criticalLow, seriousLow, cautionLow) from the shared * Astro UX StatusThresholds type. * Requires `statusMode` to be enabled. */ statusThresholds?: StatusThresholds; /** * Callback fired whenever the computed/resolved status changes. * Useful for parent components to react to status transitions. */ onStatusChange?: (status: SliderStatus) => void; } export declare const NumberInput: React.MemoExoticComponent>>; export default NumberInput;