use-mask-input 3.3.8 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +4 -4
- package/dist/index.cjs +3735 -3600
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3735 -3600
- package/dist/index.js.map +1 -1
- package/package.json +20 -20
- package/src/types.ts +1 -1
- package/src/useHookFormMask.ts +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -577,7 +577,7 @@ interface CommandObject {
|
|
|
577
577
|
rewritePosition?: number | undefined;
|
|
578
578
|
}
|
|
579
579
|
|
|
580
|
-
type Mask = 'email' | '
|
|
580
|
+
type Mask = 'datetime' | 'email' | 'numeric' | 'currency' | 'decimal' | 'integer' | 'percentage' | 'url' | 'ip' | 'mac' | 'ssn' | 'brl-currency' | 'cpf' | 'cnpj' | (string & {}) | (string[] & {}) | null;
|
|
581
581
|
type Options = Options$1;
|
|
582
582
|
type Input = HTMLInputElement | HTMLTextAreaElement | HTMLElement | HTMLInputElement | null;
|
|
583
583
|
|
|
@@ -585,7 +585,7 @@ declare const withHookFormMask: (register: UseFormRegisterReturn, mask: Mask, op
|
|
|
585
585
|
|
|
586
586
|
declare const withMask: (mask: Mask, options?: Options) => (input: Input) => void;
|
|
587
587
|
|
|
588
|
-
declare function useHookFormMask<T extends FieldValues, D extends RegisterOptions>(registerFn: UseFormRegister<T>): (fieldName: Path<T>, mask: Mask, options?:
|
|
588
|
+
declare function useHookFormMask<T extends FieldValues, D extends RegisterOptions>(registerFn: UseFormRegister<T>): (fieldName: Path<T>, mask: Mask, options?: (D & Options) | Options | D) => {
|
|
589
589
|
ref: RefCallback<HTMLElement>;
|
|
590
590
|
onChange: react_hook_form.ChangeHandler;
|
|
591
591
|
onBlur: react_hook_form.ChangeHandler;
|