@input-kit/phone 0.2.1 → 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 +3 -11
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,17 +4,9 @@ Headless React phone input with a complete world country-code dataset, searchabl
4
4
 
5
5
  ## Latest update
6
6
 
7
- **0.2.0** highlights:
7
+ **0.2.2** — npm README cleanup: release notes stay inline; removed pointers to repo-only markdown files.
8
8
 
9
- - Structured validation: `ValidationReason`, unified `validatePhoneNumber` (`reason`, `message`, `error`), and `onValidationChange` on the hook
10
- - `parsePhoneValue(phone, country?)` for `{ country, nationalNumber, e164, isValid }`
11
- - `getCountryOptions()` for sorted, filterable country lists (locale and allow/exclude lists)
12
- - `PhoneInput` click-outside close, improved listbox ARIA (`aria-activedescendant`), and RTL coverage in tests
13
- - Integration guide ([docs/integrations.md](./docs/integrations.md)), CI on Bun, and refreshed 0.1.x migration notes in this README
14
-
15
- Full release history: [CHANGELOG.md on GitHub](https://github.com/input-kit/input-kit-phone/blob/main/CHANGELOG.md) (not included in the npm package).
16
-
17
- **0.2.1** — documentation only: README changelog link fix for npm readers.
9
+ **0.2.0** structured validation (`ValidationReason`, `validatePhoneNumber`, `onValidationChange`), `parsePhoneValue`, `getCountryOptions()`, improved `PhoneInput` a11y (click-outside, listbox ARIA) and RTL tests.
18
10
 
19
11
  ## Features
20
12
 
@@ -108,7 +100,7 @@ Formatting, length checks, and validity follow **[libphonenumber-js](https://www
108
100
 
109
101
  ## Form integrations
110
102
 
111
- 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`.
112
104
 
113
105
  ## Styled example
114
106
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@input-kit/phone",
3
- "version": "0.2.1",
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",