import { default as React } from 'react'; import { BreakpointSupport } from '../../../helpers'; import { FeedbackTextProps } from '../feedback-text/feedback-text'; import { FormLabelProps } from '../form-label/form-label'; type NumberFieldBreakpointProps = { /** * Text displayed after the input value, typically a unit. */ suffix?: string; /** * Whether the number field occupies the full width of its container. * @default false */ fullWidth?: boolean; /** * Helper text displayed below the input. */ helper?: FeedbackTextProps; /** * Step size for incrementing or decrementing the value. * @default 1 */ step?: number; /** * Additional attributes for the underlying input element. */ input?: React.InputHTMLAttributes; }; export interface NumberFieldProps extends BreakpointSupport, FormLabelProps { /** * Initial value of the input field. */ defaultValue?: number; /** * Controlled value of the input field. Overrides defaultValue. */ value?: number; /** * Callback fired when the input value changes. Emits `undefined` when the * field is cleared so consumers can distinguish *"user explicitly entered * zero"* from *"field is empty"* — important for required-field validation * and for fields where `0` is a meaningful selection. */ onChange?: (value: number | undefined) => void; /** * Specifies the input mode for the field (e.g., numeric or decimal). * Defaults to `'decimal'` when `decimalPlaces > 0` or `decimalSeparator === ','`, * otherwise numeric. */ inputMode?: 'numeric' | 'decimal'; /** * Number of decimal places for rounding calculations. */ decimalPlaces?: number; /** * Character used as the decimal separator when displaying the value. * Both `.` and `,` are always accepted as input regardless of this setting. * * Defaults are derived from ``: `en` → `.`, `et` / `ru` * → `,`. Pass the prop explicitly to override the locale-derived default for * a single field. */ decimalSeparator?: '.' | ','; /** * Minimum allowed value. Disables decrementing below this value and restricts manual input. */ min?: number; /** * Maximum allowed value. Disables incrementing above this value and restricts manual input. */ max?: number; /** * Disables the input field. */ disabled?: boolean; /** * Marks the field as invalid for validation purposes. */ invalid?: boolean; } export declare const NumberField: { (props: NumberFieldProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; export default NumberField;