{"_id":"@2londres/phone-country-select","_rev":"4-37d98a4982363e8847e0103ac396dfb3","name":"@2londres/phone-country-select","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@2londres/phone-country-select","version":"1.0.0","keywords":["react","phone","country","select","combobox","calling-code","international","searchable","validation"],"author":{"name":"YVES MARTIAL BOAH"},"license":"MIT","_id":"@2londres/phone-country-select@1.0.0","maintainers":[{"name":"martio007","email":"managerboah@gmail.com"}],"homepage":"https://github.com/klemi-tech/phone-country-select#readme","bugs":{"url":"https://github.com/klemi-tech/phone-country-select/issues"},"dist":{"shasum":"359c4983994682fe9247f35d7037f1f08716d24c","tarball":"https://registry.npmjs.org/@2londres/phone-country-select/-/phone-country-select-1.0.0.tgz","fileCount":9,"integrity":"sha512-csc2dw1VoL5WBsr98HGne9XwySsubJYamCwfWTH4nYBE7LFY3ReW/qP7q4ZnibIpgi7HXLznoNQhfPDWSlr8lA==","signatures":[{"sig":"MEYCIQDOYJJK5EFqa5RR0B9YA7RTldoKDxxhXgm0FZClE6YfZQIhAMcDKAMeWoSkBGg3AvUfuvXZwAVwhZbbkIxvk4Bf1ghs","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":352616},"main":"./dist/index.cjs","type":"module","_from":"file:2londres-phone-country-select-1.0.0.tgz","email":"managerboah@gmail.com","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./styles.css":"./dist/styles.css"},"scripts":{"dev":"tsup --watch","lint":"tsc --noEmit","build":"tsup"},"_npmUser":{"name":"martio007","email":"managerboah@gmail.com"},"_resolved":"/private/var/folders/35/hyb4ps8n75j9b_m55_nrmdv40000gp/T/4c59346fa87834c2c86bfda26a975bb5/2londres-phone-country-select-1.0.0.tgz","_integrity":"sha512-csc2dw1VoL5WBsr98HGne9XwySsubJYamCwfWTH4nYBE7LFY3ReW/qP7q4ZnibIpgi7HXLznoNQhfPDWSlr8lA==","repository":{"url":"git+https://github.com/klemi-tech/phone-country-select.git","type":"git"},"_npmVersion":"11.12.0","description":"Searchable phone country code selector with per-country digit validation for React","directories":{},"sideEffects":["*.css"],"_nodeVersion":"25.8.0","dependencies":{"cmdk":"^1.1.1","lucide-react":">=0.300.0","@radix-ui/react-popover":"^1.1.14"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","typescript":"~5.7.2","@types/react":"^19.1.9","@types/react-dom":"^19.1.7"},"peerDependencies":{"react":">=18.0.0","react-dom":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/phone-country-select_1.0.0_1776110948399_0.6060748300309677","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@2londres/phone-country-select","version":"1.0.1","keywords":["react","phone","country","select","combobox","calling-code","international","searchable","validation"],"author":{"name":"YVES MARTIAL BOAH"},"license":"MIT","_id":"@2londres/phone-country-select@1.0.1","maintainers":[{"name":"martio007","email":"managerboah@gmail.com"}],"homepage":"https://github.com/2londres/phone-country-select#readme","bugs":{"url":"https://github.com/2londres/phone-country-select/issues"},"dist":{"shasum":"c6cc0e2eb6b443d5b78c0a2cfbb13edb28816632","tarball":"https://registry.npmjs.org/@2londres/phone-country-select/-/phone-country-select-1.0.1.tgz","fileCount":9,"integrity":"sha512-fs4OGXn0ALS5lWBsh8AatCqb+fRSL8PrDCOoS/yyYVcpiKDqQaCg3erLEXeZRIULzm4dyk6JsAd5Kp4vY1y5cA==","signatures":[{"sig":"MEUCIASXaBW5yx/maEkrxjgg6p4Wvh00q7lv6wxpJhqhmISqAiEAtzd7i9pGV5wKUIutxEnSXnWgOtxPxb53JWJRNmscGw8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":353097},"main":"./dist/index.cjs","type":"module","_from":"file:2londres-phone-country-select-1.0.1.tgz","email":"managerboah@gmail.com","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./styles.css":"./dist/styles.css"},"scripts":{"dev":"tsup --watch","lint":"tsc --noEmit","build":"tsup"},"_npmUser":{"name":"martio007","email":"managerboah@gmail.com"},"_resolved":"/private/var/folders/35/hyb4ps8n75j9b_m55_nrmdv40000gp/T/d2cb9938a3106cc382972bd9e50db241/2londres-phone-country-select-1.0.1.tgz","_integrity":"sha512-fs4OGXn0ALS5lWBsh8AatCqb+fRSL8PrDCOoS/yyYVcpiKDqQaCg3erLEXeZRIULzm4dyk6JsAd5Kp4vY1y5cA==","repository":{"url":"git+https://github.com/2londres/phone-country-select.git","type":"git"},"_npmVersion":"11.12.0","description":"Searchable phone country code selector with per-country digit validation for React","directories":{},"sideEffects":["*.css"],"_nodeVersion":"25.8.0","dependencies":{"cmdk":"^1.1.1","lucide-react":">=0.300.0","@radix-ui/react-popover":"^1.1.14"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","typescript":"~5.7.2","@types/react":"^19.1.9","@types/react-dom":"^19.1.7"},"peerDependencies":{"react":">=18.0.0","react-dom":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/phone-country-select_1.0.1_1776111787784_0.6365071586156095","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@2londres/phone-country-select","version":"1.0.2","keywords":["react","phone","country","select","combobox","calling-code","international","searchable","validation"],"author":{"name":"YVES MARTIAL BOAH"},"license":"MIT","_id":"@2londres/phone-country-select@1.0.2","maintainers":[{"name":"martio007","email":"managerboah@gmail.com"}],"homepage":"https://github.com/Martio-Martio/2londres-phone-country-select#readme","bugs":{"url":"https://github.com/Martio-Martio/2londres-phone-country-select/issues"},"dist":{"shasum":"738ed49c36dd0e92a4be62c66ab8abcc3133b7fa","tarball":"https://registry.npmjs.org/@2londres/phone-country-select/-/phone-country-select-1.0.2.tgz","fileCount":9,"integrity":"sha512-TyAy652tV/E28DieyC3eLfw8BYDDxeG3x643hqwM8zIE4y6pznMnDdOaJqE0NiR2A0sS6NIzBflRLbh0HV+xow==","signatures":[{"sig":"MEUCIQDMvwjjUctiRL2U6CcRDQB3sdkD5OA1enGSFPI2wuzdUgIgBUTXUJBeEfS98W4JfIHdEKRzDJsaqhQWsHvv3okYeFw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":353111},"main":"./dist/index.cjs","type":"module","_from":"file:2londres-phone-country-select-1.0.2.tgz","email":"managerboah@gmail.com","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./styles.css":"./dist/styles.css"},"scripts":{"dev":"tsup --watch","lint":"tsc --noEmit","build":"tsup"},"_npmUser":{"name":"martio007","email":"managerboah@gmail.com"},"_resolved":"/private/var/folders/35/hyb4ps8n75j9b_m55_nrmdv40000gp/T/f2dccacfd7609f168bca130bc3022d77/2londres-phone-country-select-1.0.2.tgz","_integrity":"sha512-TyAy652tV/E28DieyC3eLfw8BYDDxeG3x643hqwM8zIE4y6pznMnDdOaJqE0NiR2A0sS6NIzBflRLbh0HV+xow==","repository":{"url":"git+https://github.com/Martio-Martio/2londres-phone-country-select.git","type":"git"},"_npmVersion":"11.12.0","description":"Searchable phone country code selector with per-country digit validation for React","directories":{},"sideEffects":["*.css"],"_nodeVersion":"25.8.0","dependencies":{"cmdk":"^1.1.1","lucide-react":">=0.300.0","@radix-ui/react-popover":"^1.1.14"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","typescript":"~5.7.2","@types/react":"^19.1.9","@types/react-dom":"^19.1.7"},"peerDependencies":{"react":">=18.0.0","react-dom":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/phone-country-select_1.0.2_1776111936944_0.26080945383611587","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@2londres/phone-country-select","version":"1.0.3","author":{"name":"YVES MARTIAL BOAH"},"email":"managerboah@gmail.com","description":"Searchable phone country code selector with per-country digit validation for React","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./styles.css":"./dist/styles.css"},"peerDependencies":{"react":">=18.0.0","react-dom":">=18.0.0"},"dependencies":{"@radix-ui/react-popover":"^1.1.14","cmdk":"^1.1.1","lucide-react":">=0.300.0"},"devDependencies":{"@types/react":"^19.1.9","@types/react-dom":"^19.1.7","tsup":"^8.4.0","typescript":"~5.7.2"},"keywords":["react","phone","country","select","combobox","calling-code","international","searchable","validation"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Martio-Martio/2londres-phone-country-select.git"},"sideEffects":["*.css"],"scripts":{"build":"tsup","dev":"tsup --watch","lint":"tsc --noEmit"},"_id":"@2londres/phone-country-select@1.0.3","bugs":{"url":"https://github.com/Martio-Martio/2londres-phone-country-select/issues"},"homepage":"https://github.com/Martio-Martio/2londres-phone-country-select#readme","_integrity":"sha512-7hYjjKcayRtOWGxvgRsgvFGOLkoKVsvB1/CEvOxKzzOtQa0JkuqlU3TuHrQFhK63ycoxgM4PmB50M0scbbkXIQ==","_resolved":"/private/var/folders/35/hyb4ps8n75j9b_m55_nrmdv40000gp/T/5508fd815f4aac4598e7dad36e49debf/2londres-phone-country-select-1.0.3.tgz","_from":"file:2londres-phone-country-select-1.0.3.tgz","_nodeVersion":"25.8.0","_npmVersion":"11.12.0","dist":{"integrity":"sha512-7hYjjKcayRtOWGxvgRsgvFGOLkoKVsvB1/CEvOxKzzOtQa0JkuqlU3TuHrQFhK63ycoxgM4PmB50M0scbbkXIQ==","shasum":"e5b8dae3096bde1275c031a069aa53e65628f9c7","tarball":"https://registry.npmjs.org/@2londres/phone-country-select/-/phone-country-select-1.0.3.tgz","fileCount":9,"unpackedSize":353362,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCITpxPw+uWDZ93BALFu4kqeMmXVx0gPXArhvmT01TtCQIgULH64RrMxeUjuIu6InIZm2JHqtjhYvcSiksMPjFUorM="}]},"_npmUser":{"name":"martio007","email":"managerboah@gmail.com"},"directories":{},"maintainers":[{"name":"martio007","email":"managerboah@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/phone-country-select_1.0.3_1776114816587_0.23291491778219475"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-13T20:09:08.301Z","modified":"2026-04-13T21:13:36.871Z","1.0.0":"2026-04-13T20:09:08.554Z","1.0.1":"2026-04-13T20:23:07.938Z","1.0.2":"2026-04-13T20:25:37.086Z","1.0.3":"2026-04-13T21:13:36.740Z"},"bugs":{"url":"https://github.com/Martio-Martio/2londres-phone-country-select/issues"},"author":{"name":"YVES MARTIAL BOAH"},"license":"MIT","homepage":"https://github.com/Martio-Martio/2londres-phone-country-select#readme","keywords":["react","phone","country","select","combobox","calling-code","international","searchable","validation"],"repository":{"type":"git","url":"git+https://github.com/Martio-Martio/2londres-phone-country-select.git"},"description":"Searchable phone country code selector with per-country digit validation for React","maintainers":[{"name":"martio007","email":"managerboah@gmail.com"}],"readme":"# @2londres/phone-country-select\n\nSearchable phone country code selector with per-country digit validation for React.\n\n![Phone Country Select demo](./assets/demo.png)\n\n- Searchable combobox (by country name, ISO code, or calling code)\n- Built-in phone number length validation per country (ITU-T E.164)\n- 200+ countries with flags, calling codes, and local names\n- Headless-friendly: BYO styles or use the included CSS\n- Tree-shakeable ESM + CJS builds\n- Zero i18n dependency — pass your own labels\n\n## Install\n\n```bash\npnpm add @2londres/phone-country-select\n# or\nnpm install @2londres/phone-country-select\n```\n\n## Quick start\n\n### PhoneCountrySelect (standalone selector)\n\n```tsx\nimport { PhoneCountrySelect } from \"@2londres/phone-country-select\";\nimport \"@2londres/phone-country-select/styles.css\";\nimport { useState } from \"react\";\n\nexport function MyForm() {\n  const [code, setCode] = useState(\"+229\");\n\n  return (\n    <PhoneCountrySelect\n      value={code}\n      onValueChange={setCode}\n      searchPlaceholder=\"Search country...\"\n      emptyText=\"No country found\"\n    />\n  );\n}\n```\n\n### PhoneInput (selector + input with validation)\n\n```tsx\nimport {\n  PhoneInput,\n  validatePhoneNumber,\n  buildFullPhoneNumber,\n  findCountryByCallingCode,\n} from \"@2londres/phone-country-select\";\nimport \"@2londres/phone-country-select/styles.css\";\nimport { useState } from \"react\";\n\nexport function MyPhoneField() {\n  const [callingCode, setCallingCode] = useState(\"+33\");\n  const [phone, setPhone] = useState(\"\");\n\n  const country = findCountryByCallingCode(callingCode);\n  const { valid, error } = validatePhoneNumber(phone, country?.code);\n\n  const handleSubmit = () => {\n    const fullNumber = buildFullPhoneNumber(callingCode, phone);\n    console.log(fullNumber); // \"+33612345678\"\n  };\n\n  return (\n    <div>\n      <PhoneInput\n        callingCode={callingCode}\n        onCallingCodeChange={setCallingCode}\n        phoneNumber={phone}\n        onPhoneNumberChange={setPhone}\n        error={\n          !valid\n            ? error === \"too_short\"\n              ? \"Too short\"\n              : \"Too long\"\n            : undefined\n        }\n      />\n      <button onClick={handleSubmit} disabled={!valid || !phone}>\n        Save\n      </button>\n    </div>\n  );\n}\n```\n\n## Utilities\n\n| Function                               | Description                               |\n| -------------------------------------- | ----------------------------------------- |\n| `getCountryList()`                     | Returns filtered list of countries        |\n| `findCountryByCallingCode(code)`       | Find country by calling code              |\n| `findCountryByCode(iso)`               | Find country by ISO code                  |\n| `parseFullPhoneNumber(\"+22912345678\")` | Parse into `{ callingCode, localNumber }` |\n| `buildFullPhoneNumber(code, local)`    | Combine calling code + local digits       |\n| `validatePhoneNumber(local, iso?)`     | Validate digit count for country          |\n| `getPhoneMaxDigits(iso?)`              | Get max local digits for country          |\n| `getPhoneMinDigits()`                  | Get min digits (6)                        |\n| `clampPhoneDigits(input, iso?)`        | Strip non-digits & clamp to max           |\n\n## Styling\n\nImport `@2londres/phone-country-select/styles.css` for default styles, or target the `pcs-*` CSS classes for custom styling.\n\n## Publishing\n\n```bash\n# 1. Bump version\npnpm version patch  # or minor / major\n\n# 2. Build & publish\npnpm publish --access public --no-git-checks\n```\n\n> npm will prompt for OTP if 2FA is enabled on your account.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}