1 | import { ValueType } from '@rc-component/mini-decimal';
|
2 | import * as React from 'react';
|
3 | export type { ValueType };
|
4 | export interface InputNumberProps<T extends ValueType = ValueType> extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'onInput' | 'onChange' | 'prefix' | 'suffix'> {
|
5 |
|
6 | stringMode?: boolean;
|
7 | defaultValue?: T;
|
8 | value?: T | null;
|
9 | prefixCls?: string;
|
10 | className?: string;
|
11 | style?: React.CSSProperties;
|
12 | min?: T;
|
13 | max?: T;
|
14 | step?: ValueType;
|
15 | tabIndex?: number;
|
16 | controls?: boolean;
|
17 | prefix?: React.ReactNode;
|
18 | suffix?: React.ReactNode;
|
19 | addonBefore?: React.ReactNode;
|
20 | addonAfter?: React.ReactNode;
|
21 | classes?: {
|
22 | affixWrapper?: string;
|
23 | group?: string;
|
24 | wrapper?: string;
|
25 | };
|
26 | classNames?: {
|
27 | affixWrapper?: string;
|
28 | group?: string;
|
29 | wrapper?: string;
|
30 | input?: string;
|
31 | };
|
32 | upHandler?: React.ReactNode;
|
33 | downHandler?: React.ReactNode;
|
34 | keyboard?: boolean;
|
35 |
|
36 | parser?: (displayValue: string | undefined) => T;
|
37 |
|
38 | formatter?: (value: T | undefined, info: {
|
39 | userTyping: boolean;
|
40 | input: string;
|
41 | }) => string;
|
42 |
|
43 | precision?: number;
|
44 |
|
45 | decimalSeparator?: string;
|
46 | onInput?: (text: string) => void;
|
47 | onChange?: (value: T | null) => void;
|
48 | onPressEnter?: React.KeyboardEventHandler<HTMLInputElement>;
|
49 | onStep?: (value: T, info: {
|
50 | offset: ValueType;
|
51 | type: 'up' | 'down';
|
52 | }) => void;
|
53 | }
|
54 | declare const InputNumber: (<T extends ValueType = ValueType>(props: InputNumberProps<T> & {
|
55 | children?: React.ReactNode;
|
56 | } & {
|
57 | ref?: React.Ref<HTMLInputElement>;
|
58 | }) => React.ReactElement) & {
|
59 | displayName?: string;
|
60 | };
|
61 | export default InputNumber;
|