import "./number_input.css"; import type * as React from "react"; import { NumberField } from "@base-ui/react/number-field"; import type { CommitActing } from "./commit_mode"; import type { UnitScale } from "./format_money"; import { type StyleProps } from "./style_props"; export interface NumberInputBase extends StyleProps { /** ± discs for a small quantity that is nudged; off (default) for a typed figure. */ stepper?: boolean; min?: number; max?: number; /** What ↑/↓ and the discs move by. Default 1. */ step?: number; /** A money column takes "right", so a typed figure shares the derived one's edge. */ align?: "left" | "right"; onFocus?: () => void; onBlur?: () => void; onKeyDown?: (e: React.KeyboardEvent) => void; autoFocus?: boolean; disabled?: boolean; testID?: string; /** The name, which the pack wraps to name each disc. */ accessibilityLabel?: string; /** Hint while empty; unstated, a format with a mark (currency, percent, unit) shows it, so an empty * money field says it takes money. */ placeholder?: string; /** The widest figure it is typed with, in characters: the field stands that wide, so small fields side by side keep * to what they hold; unset, it takes the room its row gives it. */ digits?: number; /** How the figure renders at rest and what the field accepts back — the parser derives its symbols from * these options. Default {@link FIGURE_FORMAT}. One statement, or a field prints what it cannot read; a * unit `Intl` cannot express goes beside the field. */ format?: Intl.NumberFormatOptions; /** What the figure counts or measures, standing inside the field after it (`12.500 kg`) as money's code does; an * entry naming another of its `entries` is read in that unit and converted — "12,5 t" into a kg field is 12 500 — * and one naming none is refused in place, the words kept. Never beside `format` or `stepper`. */ unit?: Pick; ref?: React.Ref; render?: React.ComponentProps["render"]; } /** The locale's figure with every digit: `maximumFractionDigits` at Intl's ceiling, so nothing typed is * rounded on blur. Exported so an adjacent figure prints alike. */ export declare const FIGURE_FORMAT: Intl.NumberFormatOptions; /** Two commit modes: a form holds the value (`onValueChange`), or the field writes itself (`onSave`); a * wide continuous quantity is a `Slider`. A Base UI `NumberField` (↑/↓ step): a textbox with * `aria-roledescription`, not a `spinbutton`, placing the caret at the end on first focus, so tests * select before typing. The discs are pointer-only, outside the tab order, worded by the pack. */ export type NumberInputProps = NumberInputBase & CommitActing; export declare function NumberInput(props: NumberInputProps): React.JSX.Element;