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/dist/index.d.ts CHANGED
@@ -577,7 +577,7 @@ interface CommandObject {
577
577
  rewritePosition?: number | undefined;
578
578
  }
579
579
 
580
- type Mask = 'email' | 'cpf' | 'datetime' | 'numeric' | 'currency' | 'decimal' | 'integer' | (string & {}) | (string[] & {}) | null;
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?: Options & D) => {
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;