/** Reactive inputs are passed as getters so the core tracks live prop changes. */ export type NumberInputConfig = { value: () => number | null; onChange?: (value: number | null) => void; min?: () => number; max?: () => number; step?: () => number; precision?: () => number | undefined; /** Group thousands (1,234) on display. */ grouping?: () => boolean; prefix?: () => string; suffix?: () => string; placeholder?: () => string | undefined; disabled?: () => boolean; readonly?: () => boolean; id?: () => string | undefined; invalid?: () => boolean; required?: () => boolean; error?: () => string | undefined; hint?: () => string | undefined; ariaLabel?: () => string | undefined; }; export declare function createNumberInput(config: NumberInputConfig): { /** The current display text (bind this to your input's value). */ readonly text: string; /** Whether the field is being edited. */ readonly focused: boolean; /** Whether interaction is allowed (not disabled and not readonly). */ readonly isInteractive: boolean; commit: () => void; bump: (dir: 1 | -1) => void; increment: () => void; decrement: () => void; /** Spread onto the text input element. */ inputProps: () => { oninput: (e: Event) => void; onfocus: () => void; onblur: () => void; onkeydown: (e: KeyboardEvent) => void; 'aria-invalid': "true" | undefined; 'aria-required': "true" | undefined; 'aria-describedby': string | undefined; 'aria-label': string | undefined; id: string | undefined; value: string; type: "text"; inputmode: "decimal"; role: "spinbutton"; placeholder: string | undefined; disabled: boolean; readonly: boolean; 'aria-valuenow': number | undefined; 'aria-valuemin': number | undefined; 'aria-valuemax': number | undefined; }; /** Spread onto a native increment button. */ incrementProps: () => { type: "button"; 'aria-label': string; disabled: boolean; tabindex: number; onclick: () => void; }; /** Spread onto a native decrement button. */ decrementProps: () => { type: "button"; 'aria-label': string; disabled: boolean; tabindex: number; onclick: () => void; }; }; export type NumberInputCore = ReturnType;