use-mask-input 3.3.8 → 3.4.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 +7 -0
- package/README.md +4 -4
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/types.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [3.4.0](https://github.com/eduardoborges/use-mask-input/compare/3.3.8...3.4.0) (2024-07-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* update mask type to match the avaliable types. ([#88](https://github.com/eduardoborges/use-mask-input/issues/88)) ([2e17b79](https://github.com/eduardoborges/use-mask-input/commit/2e17b794ec2290dde1a911e632ee0090663602a7))
|
|
7
|
+
|
|
1
8
|
## [3.3.8](https://github.com/eduardoborges/use-mask-input/compare/3.3.7...3.3.8) (2024-06-18)
|
|
2
9
|
|
|
3
10
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
<h1>🥸 use-mask-input</h1>
|
|
3
|
-
<h4>A React Hook for
|
|
3
|
+
<h4>A React Hook for building elegant and simple input masks.</h4>
|
|
4
4
|
|
|
5
5
|
  
|
|
6
6
|
|
|
@@ -103,7 +103,7 @@ function App() {
|
|
|
103
103
|
|
|
104
104
|
## Masking types
|
|
105
105
|
|
|
106
|
-
The `mask` params
|
|
106
|
+
The `mask` params can be
|
|
107
107
|
|
|
108
108
|
### Static Masking Type
|
|
109
109
|
|
|
@@ -160,7 +160,7 @@ By example:
|
|
|
160
160
|
```
|
|
161
161
|
### Alias Masking Type
|
|
162
162
|
|
|
163
|
-
A Lot of common default "
|
|
163
|
+
A Lot of common default "aliases" presets, you can use like that:
|
|
164
164
|
```tsx
|
|
165
165
|
<input // the alias
|
|
166
166
|
{...registerWithMask("date", "datetime", {
|
|
@@ -170,7 +170,7 @@ A Lot of common default "alises" presets, you can use like that:
|
|
|
170
170
|
/>
|
|
171
171
|
```
|
|
172
172
|
|
|
173
|
-
You can use together with options like `inputFormat`, `prefix`, `
|
|
173
|
+
You can use together with options like `inputFormat`, `prefix`, `suffix`, etc. Checkout [API docs](#api)
|
|
174
174
|
|
|
175
175
|
The avaliable ones is:
|
|
176
176
|
|
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
|
|
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -2,6 +2,6 @@ import { Options as MaskOptions } from './inputmask.types';
|
|
|
2
2
|
|
|
3
3
|
export type { UseFormRegister, UseFormRegisterReturn } from 'react-hook-form';
|
|
4
4
|
|
|
5
|
-
export type Mask = 'email' | '
|
|
5
|
+
export type Mask = 'datetime' | 'email' | 'numeric' | 'currency' | 'decimal' | 'integer' | 'percentage' | 'url' | 'ip' | 'mac' | 'ssn' | 'brl-currency' | 'cpf' | 'cnpj' | (string & {}) | (string[] & {}) | null;
|
|
6
6
|
export type Options = MaskOptions;
|
|
7
7
|
export type Input = HTMLInputElement | HTMLTextAreaElement | HTMLElement | HTMLInputElement | null;
|