UNPKG

@harvest-profit/npk

Version:
39 lines 1.29 kB
export declare const rule: RuleFunction; declare const _default: (props: UseMaskProps) => { onKeyDown: (event: React.KeyboardEvent<HTMLInputElement>, isSpecialKey: boolean) => any; formatter: (value: string) => string; aria: any; }; export default _default; type RuleType = [string | RegExp, ((params: { key: string; previousValue: string; nextValue: string; cursorIndex: number; target: EventTarget; }) => boolean)?]; interface RuleFunction { (match: string | RegExp, ruleCB?: (params: { key: string; previousValue: string; nextValue: string; cursorIndex: number; target: EventTarget; }) => boolean): RuleType; } interface MaskReturnType { mask: RuleType[]; formatter?: (value: string) => string; autoComplete?: (value: string, key: string) => string; shiftFocusIf?: (nextValue: string, key: string) => boolean; aria?: any; } type MaskType = (props?: any) => MaskReturnType; interface UseMaskProps { onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>, isSpecialKey: boolean) => any; mask?: MaskReturnType; valueRef?: React.RefObject<string>; navigateWithArrows?: boolean; } export type { MaskType, MaskReturnType, RuleType }; //# sourceMappingURL=useMask.d.ts.map