| 1 |
/// <reference types="react" /> |
| 2 |
import { ButtonProps } from '../Button'; |
| 3 |
import { ValidatedOptions } from '../../helpers'; |
| 4 |
export interface NumberInputProps extends React.HTMLProps<HTMLDivElement> { |
| 5 |
/** Value of the number input */ |
| 6 |
value?: number | ''; |
| 7 |
/** Additional classes added to the number input */ |
| 8 |
className?: string; |
| 9 |
/** Sets the width of the number input to a number of characters */ |
| 10 |
widthChars?: number; |
| 11 |
/** Indicates the whole number input should be disabled */ |
| 12 |
isDisabled?: boolean; |
| 13 |
/** Value to indicate if the input is modified to show that validation state */ |
| 14 |
validated?: 'default' | 'error' | 'warning' | 'success' | ValidatedOptions; |
| 15 |
/** Callback for the minus button */ |
| 16 |
onMinus?: (event: React.MouseEvent, name?: string) => void; |
| 17 |
/** Callback for the text input changing */ |
| 18 |
onChange?: (event: React.FormEvent<HTMLInputElement>) => void; |
| 19 |
/** Callback function when text input is blurred (focus leaves) */ |
| 20 |
onBlur?: (event?: any) => void; |
| 21 |
/** Callback for the plus button */ |
| 22 |
onPlus?: (event: React.MouseEvent, name?: string) => void; |
| 23 |
/** Adds the given unit to the number input */ |
| 24 |
unit?: React.ReactNode; |
| 25 |
/** Position of the number input unit in relation to the number input */ |
| 26 |
unitPosition?: 'before' | 'after'; |
| 27 |
/** Minimum value of the number input, disabling the minus button when reached */ |
| 28 |
min?: number; |
| 29 |
/** Maximum value of the number input, disabling the plus button when reached */ |
| 30 |
max?: number; |
| 31 |
/** Name of the input */ |
| 32 |
inputName?: string; |
| 33 |
/** Aria label of the input */ |
| 34 |
inputAriaLabel?: string; |
| 35 |
/** Aria label of the minus button */ |
| 36 |
minusBtnAriaLabel?: string; |
| 37 |
/** Aria label of the plus button */ |
| 38 |
plusBtnAriaLabel?: string; |
| 39 |
/** Additional properties added to the text input */ |
| 40 |
inputProps?: any; |
| 41 |
/** Additional properties added to the minus button */ |
| 42 |
minusBtnProps?: ButtonProps; |
| 43 |
/** Additional properties added to the plus button */ |
| 44 |
plusBtnProps?: ButtonProps; |
| 45 |
} |
| 46 |
export declare const NumberInput: React.FunctionComponent<NumberInputProps>; |
| 47 |
//# sourceMappingURL=NumberInput.d.ts.map |