@input-kit/phone 0.2.0 → 0.2.2

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.
Files changed (2) hide show
  1. package/README.md +4 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,7 +4,9 @@ Headless React phone input with a complete world country-code dataset, searchabl
4
4
 
5
5
  ## Latest update
6
6
 
7
- Version **0.2.0** adds structured validation, `parsePhoneValue`, `getCountryOptions`, Bun maintainer tooling, CI, integration docs, and `PhoneInput` UX improvements. See [CHANGELOG.md](./CHANGELOG.md).
7
+ **0.2.2** npm README cleanup: release notes stay inline; removed pointers to repo-only markdown files.
8
+
9
+ **0.2.0** — structured validation (`ValidationReason`, `validatePhoneNumber`, `onValidationChange`), `parsePhoneValue`, `getCountryOptions()`, improved `PhoneInput` a11y (click-outside, listbox ARIA) and RTL tests.
8
10
 
9
11
  ## Features
10
12
 
@@ -98,7 +100,7 @@ Formatting, length checks, and validity follow **[libphonenumber-js](https://www
98
100
 
99
101
  ## Form integrations
100
102
 
101
- See **[docs/integrations.md](./docs/integrations.md)** for React Hook Form, Formik, Zod, and controlled-input patterns.
103
+ Controlled `value` / `onChange` with `usePhoneInput` or `PhoneInput`. React Hook Form: wrap with `Controller` and pass `field.value`, `field.onChange`, and `field.onBlur`. Use `onValidationChange` to sync `isValid` / `message` with form errors. Submit-time checks: `parsePhoneValue(phone, country)` or `validatePhoneNumber`.
102
104
 
103
105
  ## Styled example
104
106
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@input-kit/phone",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "packageManager": "bun@1.3.3",
5
5
  "description": "Headless phone input with full world country codes, libphonenumber formatting, and TypeScript",
6
6
  "type": "module",