@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.
- package/README.md +4 -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
|
-
|
|
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
|
-
|
|
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