/** * NumberField - a numeric text input with clamping and keyboard stepping. * * A single `` that keeps its value within * `[min, max]`, rounds to `step`, and steps with ArrowUp/ArrowDown. Controlled * via `value`/`onValueChange` or uncontrolled via `defaultValue`. Skinned with * the veryfront theme tokens; no adapter or engine required. * * @example Uncontrolled, clamped 0-10 * ```tsx * import { NumberField } from "veryfront/ui"; * * ; * ``` * * @example Controlled * ```tsx * const [qty, setQty] = React.useState(1); * ; * ``` * * @module react/components/ui/number-field */ import * as React from "react"; /** Props accepted by ``. */ export interface NumberFieldProps extends Omit, "value" | "defaultValue" | "onChange"> { /** Controlled value (pair with `onValueChange`). `null` means empty. */ value?: number | null; /** Initial value when uncontrolled. */ defaultValue?: number; /** Fires with the next value (`null` when the field is cleared). */ onValueChange?: (value: number | null) => void; /** Smallest allowed value; also the floor for ArrowDown stepping. */ min?: number; /** Largest allowed value; also the ceiling for ArrowUp stepping. */ max?: number; /** Increment applied on ArrowUp/ArrowDown and used to round input. @default 1 */ step?: number; /** React 19: ref is a regular prop. */ ref?: React.Ref; } /** Quantize a value to the nearest positive step, using `min` as the step base. */ export declare function quantizeNumberFieldValue(value: number, step: number, min?: number): number; /** Render a numeric input that clamps to `[min, max]` and steps by `step`. */ export declare function NumberField({ value, defaultValue, onValueChange, min, max, step, className, disabled, inputMode, onKeyDown, onBlur, ref, ...props }: NumberFieldProps): React.ReactElement; //# sourceMappingURL=number-field.d.ts.map