@input-kit/phone 0.2.2 → 0.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/README.md CHANGED
@@ -1,9 +1,19 @@
1
1
  # @input-kit/phone
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/%40input-kit%2Fphone)](https://www.npmjs.com/package/@input-kit/phone)
4
+ [![npm downloads](https://img.shields.io/npm/dm/%40input-kit%2Fphone)](https://www.npmjs.com/package/@input-kit/phone)
5
+ [![CI](https://github.com/harshit-d3v/input-kit-phone/actions/workflows/ci.yml/badge.svg)](https://github.com/harshit-d3v/input-kit-phone/actions/workflows/ci.yml)
6
+ [![license](https://img.shields.io/npm/l/%40input-kit%2Fphone)](https://github.com/harshit-d3v/input-kit-phone/blob/main/LICENSE)
7
+ [![GitHub stars](https://img.shields.io/github/stars/harshit-d3v/input-kit-phone?style=social)](https://github.com/harshit-d3v/input-kit-phone)
8
+
3
9
  Headless React phone input with a complete world country-code dataset, searchable country selection, and `libphonenumber-js` powered formatting and validation.
4
10
 
11
+ Source, issues, and contributions: **[github.com/harshit-d3v/input-kit-phone](https://github.com/harshit-d3v/input-kit-phone)** — if this package saves you time, a ⭐ there helps others find it.
12
+
5
13
  ## Latest update
6
14
 
15
+ **0.3.0** — auto-detect respects manual country selection, metadata-based length validation (no more false `too_long` in variable-length countries), input capped at the country's maximum length, `isPhoneTooLong()`, SSR-safe caret handling, dropdown `Home`/`End` + search→list keyboard navigation, unminified published output.
16
+
7
17
  **0.2.2** — npm README cleanup: release notes stay inline; removed pointers to repo-only markdown files.
8
18
 
9
19
  **0.2.0** — structured validation (`ValidationReason`, `validatePhoneNumber`, `onValidationChange`), `parsePhoneValue`, `getCountryOptions()`, improved `PhoneInput` a11y (click-outside, listbox ARIA) and RTL tests.
@@ -29,7 +39,7 @@ npm install @input-kit/phone
29
39
 
30
40
  ```tsx
31
41
  import { PhoneInput } from '@input-kit/phone';
32
- import '@your-app/phone-input.css'; // style .phone-input-* classes
42
+ import './phone-input.css'; // your own stylesheet — the package ships no CSS
33
43
 
34
44
  function Example() {
35
45
  return (
@@ -137,6 +147,10 @@ bun run lint
137
147
 
138
148
  Manual browser check: `test-demo/` (static HTML).
139
149
 
150
+ ## Contributing
151
+
152
+ Bug reports, feature requests, and pull requests are welcome — see [CONTRIBUTING.md](https://github.com/harshit-d3v/input-kit-phone/blob/main/CONTRIBUTING.md). In short: open an issue with a minimal reproduction (include the exact phone number and country for formatting/validation bugs), and for PRs run `bun run test`, `bun run typecheck`, and `bun run lint` before submitting.
153
+
140
154
  ## Exports
141
155
 
142
156
  ### Components and hooks