use-mask-input 3.5.1 → 3.6.0
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 +14 -0
- package/dist/index.cjs +913 -1069
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +913 -1069
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/types.ts +17 -17
- package/src/utils/getMaskOptions.ts +1 -1
- package/src/withMask.ts +3 -9
package/dist/index.d.cts
CHANGED
|
@@ -575,11 +575,11 @@ interface CommandObject {
|
|
|
575
575
|
|
|
576
576
|
type Mask = 'datetime' | 'email' | 'numeric' | 'currency' | 'decimal' | 'integer' | 'percentage' | 'url' | 'ip' | 'mac' | 'ssn' | 'brl-currency' | 'cpf' | 'cnpj' | (string & {}) | (string[] & {}) | null;
|
|
577
577
|
type Options = Options$1;
|
|
578
|
-
type Input = HTMLInputElement | HTMLTextAreaElement | HTMLElement
|
|
578
|
+
type Input = HTMLInputElement | HTMLTextAreaElement | HTMLElement;
|
|
579
579
|
|
|
580
580
|
declare function withHookFormMask(register: UseFormRegisterReturn, mask: Mask, options?: Options): UseFormRegisterReturn;
|
|
581
581
|
|
|
582
|
-
declare function withMask(mask: Mask, options?: Options): (input: Input) =>
|
|
582
|
+
declare function withMask(mask: Mask, options?: Options): (input: Input | null) => void;
|
|
583
583
|
|
|
584
584
|
declare function useHookFormMask<T extends FieldValues, D extends RegisterOptions>(registerFn: UseFormRegister<T>): (fieldName: Path<T>, mask: Mask, options?: (D & Options) | Options | D) => UseFormRegisterReturn<Path<T>>;
|
|
585
585
|
|
package/dist/index.d.ts
CHANGED
|
@@ -575,11 +575,11 @@ interface CommandObject {
|
|
|
575
575
|
|
|
576
576
|
type Mask = 'datetime' | 'email' | 'numeric' | 'currency' | 'decimal' | 'integer' | 'percentage' | 'url' | 'ip' | 'mac' | 'ssn' | 'brl-currency' | 'cpf' | 'cnpj' | (string & {}) | (string[] & {}) | null;
|
|
577
577
|
type Options = Options$1;
|
|
578
|
-
type Input = HTMLInputElement | HTMLTextAreaElement | HTMLElement
|
|
578
|
+
type Input = HTMLInputElement | HTMLTextAreaElement | HTMLElement;
|
|
579
579
|
|
|
580
580
|
declare function withHookFormMask(register: UseFormRegisterReturn, mask: Mask, options?: Options): UseFormRegisterReturn;
|
|
581
581
|
|
|
582
|
-
declare function withMask(mask: Mask, options?: Options): (input: Input) =>
|
|
582
|
+
declare function withMask(mask: Mask, options?: Options): (input: Input | null) => void;
|
|
583
583
|
|
|
584
584
|
declare function useHookFormMask<T extends FieldValues, D extends RegisterOptions>(registerFn: UseFormRegister<T>): (fieldName: Path<T>, mask: Mask, options?: (D & Options) | Options | D) => UseFormRegisterReturn<Path<T>>;
|
|
585
585
|
|