@desource/phone-mask-react 1.0.0 → 1.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,46 @@
1
1
  # @desource/phone-mask-react
2
2
 
3
+ ## 1.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Core Upgrades:
8
+ - Optimized bundle size of core package
9
+
10
+ - Updated dependencies []:
11
+ - @desource/phone-mask@1.1.1
12
+
13
+ ## 1.1.0
14
+
15
+ ### Minor Changes
16
+
17
+ - Svelte Upgrades:
18
+ - Added attachment `phoneMaskAttachment` for usage in native input (for Svelte 5.29+ versions)
19
+ - Added action `phoneMaskAction` for usage in native input (for Svelte 5.0+ versions)
20
+ - Improved keyboard country selection flow and active-descendant accessibility behavior
21
+ - Refined dropdown/key navigation handling and related focus behavior
22
+ - `usePhoneMask` now exposes `formatter` in the return object
23
+
24
+ - Vue Upgrades:
25
+ - Directive was refactored to align with Svelte action
26
+ - Improved keyboard country selection flow and active-descendant accessibility behavior
27
+ - Refined dropdown/key navigation handling and related focus behavior
28
+ - `usePhoneMask` now exposes `formatter` in the return object
29
+
30
+ - React Upgrades:
31
+ - Improved keyboard country selection flow and active-descendant accessibility behavior
32
+ - Refined dropdown/key navigation handling and related focus behavior
33
+ - `usePhoneMask` now exposes `formatter` in the return object
34
+
35
+ - Core Upgrades:
36
+ - Fixed edge cases in mask variant selection and improved input handler robustness
37
+ - Applied reliability-focused refactors in formatter/handlers and build script generation logic
38
+
39
+ ### Patch Changes
40
+
41
+ - Updated dependencies []:
42
+ - @desource/phone-mask@1.1.0
43
+
3
44
  ## 1.0.0
4
45
 
5
46
  ### Major Changes
package/README.md CHANGED
@@ -250,15 +250,37 @@ interface UsePhoneMaskOptions {
250
250
 
251
251
  ```ts
252
252
  interface UsePhoneMaskReturn {
253
- ref: RefObject<HTMLInputElement>;
253
+ // Ref to attach to your input element
254
+ ref: RefObject<HTMLInputElement | null>;
255
+
256
+ // Raw digits without formatting (e.g., "1234567890")
254
257
  digits: string;
258
+
259
+ // Phone formatter instance
260
+ formatter: FormatterHelpers;
261
+
262
+ // Full phone number with country code (e.g., "+11234567890")
255
263
  full: string;
264
+
265
+ // Full phone number formatted (e.g., "+1 123-456-7890")
256
266
  fullFormatted: string;
267
+
268
+ // Whether the phone number is complete
257
269
  isComplete: boolean;
270
+
271
+ // Whether the input is empty
258
272
  isEmpty: boolean;
273
+
274
+ // Whether to show validation warning
259
275
  shouldShowWarn: boolean;
276
+
277
+ // Current country data
260
278
  country: MaskFull;
279
+
280
+ // Change country programmatically
261
281
  setCountry: (countryCode: string) => void;
282
+
283
+ // Clear the input
262
284
  clear: () => void;
263
285
  }
264
286
  ```
@@ -1 +1 @@
1
- {"version":3,"file":"PhoneInput.d.ts","sourceRoot":"","sources":["../../../src/components/PhoneInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAUf,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AA4W/D,eAAO,MAAM,UAAU,uFAA8D,CAAC"}
1
+ {"version":3,"file":"PhoneInput.d.ts","sourceRoot":"","sources":["../../../src/components/PhoneInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAUf,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAmX/D,eAAO,MAAM,UAAU,uFAA8D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../../src/hooks/internal/useTheme.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,UAAU,eAAe;IACvB,KAAK,EAAE,KAAK,CAAC;CACd;AAED,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,eAAe;;EA0BlD"}
1
+ {"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../../src/hooks/internal/useTheme.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,UAAU,eAAe;IACvB,KAAK,EAAE,KAAK,CAAC;CACd;AAED,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,eAAe;;EA6BlD"}
@@ -1 +1 @@
1
- {"version":3,"file":"usePhoneMask.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePhoneMask.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAExE;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,kBAAkB,CA2F7E"}
1
+ {"version":3,"file":"usePhoneMask.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePhoneMask.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAExE;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,kBAAkB,CA4F7E"}