@harvest-profit/npk
Version:
NPK UI Design System
31 lines • 930 B
TypeScript
export declare const rule: RuleFunction;
declare const _default: (props: any) => {
onKeyDown: any;
formatter: 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;
}
type MaskType = (props?: any) => MaskReturnType;
export type { MaskType, MaskReturnType, RuleType };
//# sourceMappingURL=useMask.d.ts.map