UNPKG

@awsui/components-react

Version:

On July 19th, 2022, we launched [Cloudscape Design System](https://cloudscape.design). Cloudscape is an evolution of AWS-UI. It consists of user interface guidelines, front-end components, design resources, and development tools for building intuitive, en

25 lines 1.05 kB
import { RefObject } from 'react'; import { InputProps } from '../../../input/interfaces'; import { CancelableEventHandler, NonCancelableEventHandler } from '../../events'; import MaskFormat from './utils/mask-format'; interface UseMaskHook { value: string; onChange: NonCancelableEventHandler<InputProps.ChangeDetail>; onKeyDown: CancelableEventHandler<InputProps.KeyDetail>; onBlur: NonCancelableEventHandler<null>; onPaste: (event: React.ClipboardEvent) => void; } interface UseMaskProps { value: string; onChange: (value: string) => void; onKeyDown?: (event: CustomEvent) => void; onBlur?: () => void; format: MaskFormat; autofix?: boolean; inputRef: RefObject<HTMLInputElement>; disableAutocompleteOnBlur?: boolean; setPosition: (position: number | null) => void; } declare const useMask: ({ value, onBlur, onChange, onKeyDown, format, inputRef, autofix, disableAutocompleteOnBlur, setPosition, }: UseMaskProps) => UseMaskHook; export default useMask; //# sourceMappingURL=use-mask.d.ts.map