UNPKG

1.76 kBTypeScriptView Raw
1/// <reference types="react" />
2export declare const NumberInputActionTypes: {
3 readonly clamp: "numberInput:clamp";
4 readonly inputChange: "numberInput:inputChange";
5 readonly increment: "numberInput:increment";
6 readonly decrement: "numberInput:decrement";
7 readonly decrementToMin: "numberInput:decrementToMin";
8 readonly incrementToMax: "numberInput:incrementToMax";
9 readonly resetInputValue: "numberInput:resetInputValue";
10};
11interface NumberInputClampAction {
12 type: typeof NumberInputActionTypes.clamp;
13 event: React.FocusEvent<HTMLInputElement>;
14 inputValue: string;
15}
16interface NumberInputInputChangeAction {
17 type: typeof NumberInputActionTypes.inputChange;
18 event: React.ChangeEvent<HTMLInputElement>;
19 inputValue: string;
20}
21interface NumberInputIncrementAction {
22 type: typeof NumberInputActionTypes.increment;
23 event: React.PointerEvent | React.KeyboardEvent;
24 applyMultiplier: boolean;
25}
26interface NumberInputDecrementAction {
27 type: typeof NumberInputActionTypes.decrement;
28 event: React.PointerEvent | React.KeyboardEvent;
29 applyMultiplier: boolean;
30}
31interface NumberInputIncrementToMaxAction {
32 type: typeof NumberInputActionTypes.incrementToMax;
33 event: React.KeyboardEvent;
34}
35interface NumberInputDecrementToMinAction {
36 type: typeof NumberInputActionTypes.decrementToMin;
37 event: React.KeyboardEvent;
38}
39interface NumberInputResetInputValueAction {
40 type: typeof NumberInputActionTypes.resetInputValue;
41}
42export type NumberInputAction = NumberInputClampAction | NumberInputInputChangeAction | NumberInputIncrementAction | NumberInputDecrementAction | NumberInputIncrementToMaxAction | NumberInputDecrementToMinAction | NumberInputResetInputValueAction;
43export {};