import * as React from 'react'; import { CustomEventHandler, AdjustCursor } from '../../commonTypes'; import { InputProps } from './types'; /** * Function creates change event handler * @param {InputProps} props - properties of component * @param {SetState} setValue - Set state action * @param {AdjustCursor} adjustCursor - Function sets cursor to specified or previous position * * @returns {CustomEventHandler>} Change event handler */ export declare const createChangeHandler: (props: InputProps, setValue: React.Dispatch>, adjustCursor: AdjustCursor) => CustomEventHandler>; /** * Function creates clear event handler * @param {InputProps} props - Properties of component * @param {SetState} setValue - Set state action * @param {React.MutableRefObject} inputRef - Input ref * * @returns {CustomEventHandler>} Clear event handler */ export declare const createClearHandler: (props: InputProps, setValue: React.Dispatch>, inputRef: React.MutableRefObject) => CustomEventHandler>; /** * Function creates blur event handler * @param {InputProps} props - Properties of component * @param {SetState} setFocused - Set state action * @param {function} validate - Validation function * * @returns {React.FocusEventHandler} Blur event handler */ export declare const createBlurHandler: (props: InputProps, setFocused: React.Dispatch>, validate: () => boolean) => (event: React.FocusEvent) => void; /** * Function creates focus event handler * @param {InputProps} props - Properties of component * @param {boolean} isValid - Flag defines if input value is valid * @param {SetState} setFocused - Set state action * * @returns {React.FocusEventHandler} Focus event handler */ export declare const createFocusHandler: (props: InputProps, isValid: boolean, setFocused: React.Dispatch>) => (event: React.FocusEvent) => void; /** * Function creates key down event handler * @param {InputProps} props - Properties of component * * @returns {React.KeyboardEventHandler} Key down event handler */ export declare const createKeyDownHandler: (props: InputProps) => (event: React.KeyboardEvent) => void; /** * Function creates reset handler * @param {InputProps} props - Properties of component * @param {SetState} setValue - Set state action * * @returns {void} Reset handler */ export declare const createResetHandler: (props: InputProps, setValue: React.Dispatch>) => () => void; /** * Function creates paste event handler which takes control if new value exceeds maxLength * * @param {InputProps} props - Properties of component * @param {string} value - Current value of input * @param {SetState} setValue - Set state function for input value * @param {AdjustCursor} adjustCursor - Function sets cursor to specified or previous position if maxLength is exceeded * * @returns {CustomEventHandler>} Paste event handler */ export declare const createPasteHandler: (props: InputProps, value: string, setValue: React.Dispatch>, adjustCursor: AdjustCursor) => CustomEventHandler>;