///
import * as t from '../../common/types';
export declare type ITextModifierKeys = {
alt: boolean;
control: boolean;
shift: boolean;
meta: boolean;
};
export declare type TextInputFocusAction = {
selectOnFocus?: boolean;
focusOnLoad?: boolean;
focusAction?: 'SELECT' | 'END';
};
export declare type TextInputMask = {
text: string;
char: string;
};
export declare type TextInputMaskHandler = (e: TextInputMask) => boolean;
export declare type TextInputStyle = t.TextStyle & {
disabledColor?: number | string;
};
export declare type TextInputChangeEvent = {
from: string;
to: string;
char: string;
isMax: boolean | null;
modifierKeys: ITextModifierKeys;
};
export declare type TextInputChangeEventHandler = (e: TextInputChangeEvent) => void;
export declare type TextInputTabEvent = {
isCancelled: boolean;
cancel(): void;
modifierKeys: ITextModifierKeys;
};
export declare type TextInputTabEventHandler = (e: TextInputTabEvent) => void;
export declare type TextInputKeyEvent = React.KeyboardEvent & {
modifierKeys: ITextModifierKeys;
};
export declare type TextInputKeyEventHandler = (e: TextInputKeyEvent) => void;
export declare type ITextInputEvents = {
onChange?: TextInputChangeEventHandler;
onKeyPress?: TextInputKeyEventHandler;
onKeyDown?: TextInputKeyEventHandler;
onKeyUp?: TextInputKeyEventHandler;
onEnter?: TextInputKeyEventHandler;
onEscape?: TextInputKeyEventHandler;
onTab?: TextInputTabEventHandler;
onFocus?: React.EventHandler>;
onBlur?: React.EventHandler>;
};
export declare type TextInputEvent = ITextInputChangingEvent | ITextInputChangedEvent | ITextInputKeypressEvent | ITextInputFocusEvent | ITextInputLabelDblClickEvent;
export declare type ITextInputChangingEvent = {
type: 'TEXT_INPUT/changing';
payload: ITextInputChanging;
};
export declare type ITextInputChanging = TextInputChangeEvent & {
isCancelled: boolean;
cancel(): void;
};
export declare type ITextInputChangedEvent = {
type: 'TEXT_INPUT/changed';
payload: ITextInputChanged;
};
export declare type ITextInputChanged = TextInputChangeEvent;
export declare type ITextInputKeypressEvent = {
type: 'TEXT_INPUT/keypress';
payload: ITextInputKeypress;
};
export declare type ITextInputKeypress = {
isPressed: boolean;
key: TextInputKeyEvent['key'];
event: TextInputKeyEvent;
};
export declare type ITextInputFocusEvent = {
type: 'TEXT_INPUT/focus';
payload: ITextInputFocus;
};
export declare type ITextInputFocus = {
isFocused: boolean;
};
export declare type ITextInputLabelDblClickEvent = {
type: 'TEXT_INPUT/label/dblClick';
payload: ITextInputLabelDblClick;
};
export declare type ITextInputLabelDblClick = t.MouseEvent & {
target: 'READ_ONLY' | 'PLACEHOLDER';
};