import * as React from 'react'; import type { ValueType } from '@rc-component/mini-decimal'; import type { SemanticClassName } from "../_util/classNameUtils"; import type { InputStatus } from "../_util/statusUtils"; import type { Variant } from '../config-provider'; import type { SizeType } from '../config-provider/SizeContext'; export type { ValueType }; export interface InputNumberRef extends HTMLInputElement { nativeElement: HTMLElement; } export interface InputNumberProps extends Omit, 'value' | 'defaultValue' | 'onInput' | 'onChange' | 'prefix' | 'suffix' | 'className' | 'size'> { /** value will show as string */ stringMode?: boolean; defaultValue?: T; value?: T | null; prefixCls?: string; className?: SemanticClassName<{ input?: string; prefix?: string; suffix?: string; handler?: string; addonBefore?: string; addonAfter?: string; }>; style?: React.CSSProperties; min?: T; max?: T; step?: ValueType; tabIndex?: number; controls?: boolean | { upIcon?: React.ReactNode; downIcon?: React.ReactNode; }; prefix?: React.ReactNode; suffix?: React.ReactNode; addonBefore?: React.ReactNode; addonAfter?: React.ReactNode; size?: SizeType; status?: InputStatus; variant?: Variant; keyboard?: boolean; changeOnWheel?: boolean; /** Parse display value to validate number */ parser?: (displayValue: string | undefined) => T; /** Transform `value` to display value show in input */ formatter?: (value: T | undefined, info: { userTyping: boolean; input: string; }) => string; /** Syntactic sugar of `formatter`. Config precision of display. */ precision?: number; /** Syntactic sugar of `formatter`. Config decimal separator of display. */ decimalSeparator?: string; onInput?: (text: string) => void; onChange?: (value: T | null) => void; onPressEnter?: React.KeyboardEventHandler; onStep?: (value: T, info: { offset: ValueType; type: 'up' | 'down'; }) => void; /** * Trigger change onBlur event. * If disabled, user must press enter or click handler to confirm the value update */ changeOnBlur?: boolean; } declare const InputNumber: ((props: InputNumberProps & { children?: React.ReactNode; } & { ref?: React.Ref | undefined; }) => React.ReactElement) & { displayName?: string | undefined; }; export default InputNumber;