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 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 build elegant and simple input masks.</h4>
3
+ <h4>A React Hook for building elegant and simple input masks.</h4>
4
4
 
5
5
  ![npm](https://img.shields.io/npm/v/use-mask-input) ![npm package minimized gzipped size (select exports)](https://img.shields.io/bundlejs/size/use-mask-input?color=green-light) ![npm](https://img.shields.io/npm/dw/use-mask-input)
6
6
 
@@ -103,7 +103,7 @@ function App() {
103
103
 
104
104
  ## Masking types
105
105
 
106
- The `mask` params cabe be
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 "alises" presets, you can use like that:
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`, `sufix`, etc. Checkout [API docs](#api)
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' | '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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "use-mask-input",
3
- "version": "3.3.8",
3
+ "version": "3.4.0",
4
4
  "description": "A react Hook for build elegant input masks. Compatible with React Hook Form",
5
5
  "author": "Eduardo Borges<euduardoborges@gmail.com>",
6
6
  "type": "module",
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' | 'cpf' | 'datetime' | 'numeric' | 'currency' | 'decimal' | 'integer' | (string & {}) | (string[] & {}) | null;
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;