use-mask-input 3.3.3 → 3.3.5
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/README.md +7 -5
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +575 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +19 -20
- package/src/inputmask.types.ts +607 -0
- package/src/types.ts +3 -2
- package/src/useHookFormMask.ts +1 -1
- package/scripts.sh +0 -73
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [3.3.5](https://github.com/eduardoborges/use-mask-input/compare/3.3.4...3.3.5) (2023-08-30)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **types:** fix mask options with any type ([7b643b1](https://github.com/eduardoborges/use-mask-input/commit/7b643b1e6afc27ad4e49d5b528e31d1ff6427a8b))
|
|
7
|
+
|
|
8
|
+
## [3.3.4](https://github.com/eduardoborges/use-mask-input/compare/3.3.3...3.3.4) (2023-08-29)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* types and options ([#50](https://github.com/eduardoborges/use-mask-input/issues/50)) ([3bc502e](https://github.com/eduardoborges/use-mask-input/commit/3bc502e770c3aa12c9b248904da57c016c35f6a2))
|
|
14
|
+
|
|
1
15
|
## [3.3.3](https://github.com/eduardoborges/use-mask-input/compare/3.3.2...3.3.3) (2023-08-14)
|
|
2
16
|
|
|
3
17
|
|
package/README.md
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h1>🥸 use-mask-input</h1>
|
|
3
|
+
<h4>A React Hook for build elegant and simple input masks.</h4>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
  
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
</div>
|
|
6
8
|
|
|
7
|
-
---
|
|
8
9
|
|
|
9
10
|
## Table of Contents
|
|
10
11
|
|
|
@@ -18,6 +19,7 @@ A React Hook for build elegant and simple input masks.
|
|
|
18
19
|
- [Alternator Masking Type](#alias-masking-type)
|
|
19
20
|
- [Preprocessing Masking Type](#preprocessing-masking-type)
|
|
20
21
|
|
|
22
|
+
|
|
21
23
|
## Features
|
|
22
24
|
- 🎯 Simple API
|
|
23
25
|
- 💎 Works like a charm with *Next.js*
|
|
@@ -47,7 +49,7 @@ const App = () => {
|
|
|
47
49
|
```jsx
|
|
48
50
|
import React from 'react';
|
|
49
51
|
import { useForm } from 'react-hook-form';
|
|
50
|
-
import {
|
|
52
|
+
import { useHookFormMask } from 'use-mask-input';
|
|
51
53
|
|
|
52
54
|
function App() {
|
|
53
55
|
const { register, handleSubmit } = useForm();
|
package/dist/index.cjs
CHANGED
|
@@ -3819,7 +3819,7 @@ function useHookFormMask(registerFn) {
|
|
|
3819
3819
|
return (fieldName, mask, options) => {
|
|
3820
3820
|
if (!registerFn)
|
|
3821
3821
|
throw new Error("registerFn is required");
|
|
3822
|
-
const _a = registerFn(fieldName), { ref } = _a, restRegister = __objRest(_a, ["ref"]);
|
|
3822
|
+
const _a = registerFn(fieldName, options), { ref } = _a, restRegister = __objRest(_a, ["ref"]);
|
|
3823
3823
|
const maskInput = inputmask(getMaskOptions(mask, options));
|
|
3824
3824
|
const newRef = flow((_ref) => {
|
|
3825
3825
|
if (_ref)
|