{"_id":"@crystalneth0/react-native-phone-number-input","_rev":"4-a77fc8de2bd80586a2617f424d0ed7ac","name":"@crystalneth0/react-native-phone-number-input","dist-tags":{"latest":"2.1.4"},"versions":{"2.1.1":{"name":"@crystalneth0/react-native-phone-number-input","version":"2.1.1","keywords":["react-native","phone","telephone","phone input","input","tel","input text","international","react-native-component","ios","android"],"author":{"name":"anuraggarg, crystalneth"},"license":"MIT","_id":"@crystalneth0/react-native-phone-number-input@2.1.1","maintainers":[{"name":"crystalneth0","email":"alex@stacktrace.com"}],"homepage":"https://github.com/crystalneth/react-native-phone-number-input#readme","bugs":{"url":"https://github.com/crystalneth/react-native-phone-number-input/issues"},"dist":{"shasum":"8f9248f0de5f9b628b07b040532b5059a3175d0d","tarball":"https://registry.npmjs.org/@crystalneth0/react-native-phone-number-input/-/react-native-phone-number-input-2.1.1.tgz","fileCount":10,"integrity":"sha512-lT19274e1DIXi8Z6w740lhj4hYYgUgSEeYOJuGdLGOs/5hpxwwAWOPr++XCEu9LBxzridmFvNuJJmurTbcxj/Q==","signatures":[{"sig":"MEYCIQDR7Vp0wtFtNNpjOm+Na/ydrgcVDo/55KZgDeC7te4rmAIhANjJiXb/6/Uv8exw85dQLFFENTBaPu96edR2Gtvz4WdR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":24900},"main":"lib/index.js","gitHead":"13f67e5b7b9a590309f76f9b2ce1b28068e2b44b","scripts":{"test":"echo \"Error: no test specified\""},"typings":"lib/index.d.ts","_npmUser":{"name":"crystalneth0","email":"alex@stacktrace.com"},"repository":{"url":"git+https://github.com/crystalneth/react-native-phone-number-input.git","type":"git"},"_npmVersion":"9.5.1","description":"Phone Number Input Component with defaultProps fix","directories":{},"_nodeVersion":"18.16.1","dependencies":{"google-libphonenumber":"^3.2.10","@crystalneth0/react-native-country-picker-modal":"^2.0.1"},"_hasShrinkwrap":false,"devDependencies":{"metro-react-native-babel-preset":"^0.61.0"},"peerDependencies":{"react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-phone-number-input_2.1.1_1741922238100_0.30604151340188235","host":"s3://npm-registry-packages-npm-production"}},"2.1.2":{"name":"@crystalneth0/react-native-phone-number-input","version":"2.1.2","keywords":["react-native","phone","telephone","phone input","input","tel","input text","international","react-native-component","ios","android"],"author":{"name":"anuraggarg, crystalneth"},"license":"MIT","_id":"@crystalneth0/react-native-phone-number-input@2.1.2","maintainers":[{"name":"crystalneth0","email":"alex@stacktrace.com"}],"homepage":"https://github.com/crystalneth/react-native-phone-number-input#readme","bugs":{"url":"https://github.com/crystalneth/react-native-phone-number-input/issues"},"dist":{"shasum":"548026529183db5a19b37490be5225de44bff236","tarball":"https://registry.npmjs.org/@crystalneth0/react-native-phone-number-input/-/react-native-phone-number-input-2.1.2.tgz","fileCount":11,"integrity":"sha512-FgKcxvZs0E9hDSSQacrKGPG9cCmtm45oH1zOszpBQFYN40bzpE2sIBpLH7K+vBzzTGRnga2ZjiUGNEb0eWZfog==","signatures":[{"sig":"MEUCIGb0zsZVqihLzLPZpZr7kZQcWu+RdDNOw2x44G43a4FWAiEA8iHIDSkAoAlJqF45Z+A5q7P+VI/8WYEF8GhQoUZOhqM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32808},"main":"lib/index.js","gitHead":"d3795bcba6f2d81e3fd405b29d091d3909c000ad","scripts":{"test":"echo \"Error: no test specified\""},"typings":"lib/index.d.ts","_npmUser":{"name":"crystalneth0","email":"alex@stacktrace.com"},"repository":{"url":"git+https://github.com/crystalneth/react-native-phone-number-input.git","type":"git"},"_npmVersion":"9.5.1","description":"Phone Number Input Component with defaultProps fix","directories":{},"_nodeVersion":"18.16.1","dependencies":{"google-libphonenumber":"^3.2.10","@crystalneth0/react-native-country-picker-modal":"^2.0.1"},"_hasShrinkwrap":false,"devDependencies":{"metro-react-native-babel-preset":"^0.61.0"},"peerDependencies":{"react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-phone-number-input_2.1.2_1741927137127_0.36515533528828215","host":"s3://npm-registry-packages-npm-production"}},"2.1.3":{"name":"@crystalneth0/react-native-phone-number-input","version":"2.1.3","keywords":["react-native","phone","telephone","phone input","input","tel","input text","international","react-native-component","ios","android"],"author":{"name":"anuraggarg, crystalneth"},"license":"MIT","_id":"@crystalneth0/react-native-phone-number-input@2.1.3","maintainers":[{"name":"crystalneth0","email":"alex@stacktrace.com"}],"homepage":"https://github.com/crystalneth/react-native-phone-number-input#readme","bugs":{"url":"https://github.com/crystalneth/react-native-phone-number-input/issues"},"dist":{"shasum":"5835b32c662330d3b82acaf5669599fbdb60d299","tarball":"https://registry.npmjs.org/@crystalneth0/react-native-phone-number-input/-/react-native-phone-number-input-2.1.3.tgz","fileCount":11,"integrity":"sha512-mkelNIJ9578j+TH8j52pqPEEpPZvRgkdLMrBmj5yBK+1GorGfnDk432dcVrP5OE7N4AoN23ebNTU58x4WPFdDA==","signatures":[{"sig":"MEUCICeddIAGjKhEISXzDy24NIVlZvKgG2Pyj+PuW3M8ArKHAiEAt3yEy4xrgeFA3BIAYJrKAIyIQmK4WGMBd3qaPYhqdas=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32808},"main":"lib/index.js","gitHead":"a1ff1db428e6009eb717c73f0d328e49f3d984ca","scripts":{"test":"echo \"Error: no test specified\""},"typings":"lib/index.d.ts","_npmUser":{"name":"crystalneth0","email":"alex@stacktrace.com"},"repository":{"url":"git+https://github.com/crystalneth/react-native-phone-number-input.git","type":"git"},"_npmVersion":"9.5.1","description":"Phone Number Input Component with defaultProps fix","directories":{},"_nodeVersion":"18.16.1","dependencies":{"google-libphonenumber":"^3.2.10","@crystalneth0/react-native-country-picker-modal":"^2.0.2"},"_hasShrinkwrap":false,"devDependencies":{"metro-react-native-babel-preset":"^0.61.0"},"peerDependencies":{"react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-phone-number-input_2.1.3_1741927836438_0.30560432611168764","host":"s3://npm-registry-packages-npm-production"}},"2.1.4":{"name":"@crystalneth0/react-native-phone-number-input","version":"2.1.4","description":"Phone Number Input Component with defaultProps fix","main":"lib/index.js","typings":"lib/index.d.ts","scripts":{"test":"echo \"Error: no test specified\"","build":"tsc"},"repository":{"type":"git","url":"git+https://github.com/crystalneth/react-native-phone-number-input.git"},"author":{"name":"anuraggarg, crystalneth"},"license":"MIT","peerDependencies":{"react":"*","react-native":"*"},"keywords":["react-native","phone","telephone","phone input","input","tel","input text","international","react-native-component","ios","android"],"dependencies":{"@crystalneth0/react-native-country-picker-modal":"^2.0.3","google-libphonenumber":"^3.2.10"},"devDependencies":{"metro-react-native-babel-preset":"^0.61.0","typescript":"^4.0.0"},"gitHead":"a1ff1db428e6009eb717c73f0d328e49f3d984ca","bugs":{"url":"https://github.com/crystalneth/react-native-phone-number-input/issues"},"homepage":"https://github.com/crystalneth/react-native-phone-number-input#readme","_id":"@crystalneth0/react-native-phone-number-input@2.1.4","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-/8Nw4qm+6WJOISYTSy7KH/sad85zgn5KXsyf6BgpAZda5Kwp5FuqcBmlyg6uWA00bG1SKIzjrA8tpKT8wp6iFQ==","shasum":"1b4ace833e7369f31c8dbfa6ff2b3ccf4b6e475b","tarball":"https://registry.npmjs.org/@crystalneth0/react-native-phone-number-input/-/react-native-phone-number-input-2.1.4.tgz","fileCount":11,"unpackedSize":32856,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBGDkk6sksVbkg3uV5RV/7AcYRBjlEvR8jqjy4w3HOg2AiB4hfUhMlcvdJdg4eACrBEtt5zTDRrSdpFTcrfggGum7w=="}]},"_npmUser":{"name":"crystalneth0","email":"alex@stacktrace.com"},"directories":{},"maintainers":[{"name":"crystalneth0","email":"alex@stacktrace.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-native-phone-number-input_2.1.4_1741931359522_0.9618291696523056"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-14T03:17:18.043Z","modified":"2025-03-14T05:49:19.892Z","2.1.1":"2025-03-14T03:17:18.334Z","2.1.2":"2025-03-14T04:38:57.360Z","2.1.3":"2025-03-14T04:50:36.627Z","2.1.4":"2025-03-14T05:49:19.722Z"},"bugs":{"url":"https://github.com/crystalneth/react-native-phone-number-input/issues"},"author":{"name":"anuraggarg, crystalneth"},"license":"MIT","homepage":"https://github.com/crystalneth/react-native-phone-number-input#readme","keywords":["react-native","phone","telephone","phone input","input","tel","input text","international","react-native-component","ios","android"],"repository":{"type":"git","url":"git+https://github.com/crystalneth/react-native-phone-number-input.git"},"description":"Phone Number Input Component with defaultProps fix","maintainers":[{"name":"crystalneth0","email":"alex@stacktrace.com"}],"readme":"<div align=\"center\">\n  <img src=\"./gif/Phone_Number_Input_Layout_1.gif\" height=\"400\" title=\"Anurag Garg\"   alt=\"Anurag Garg\" style=\"box-shadow: 0 20px 30px 3px rgba(9, 9, 16, 0.2);\">\n  <img src=\"./gif/Phone_Number_Input_Layout_2.gif\" height=\"400\" title=\"Anurag Garg\"   alt=\"Anurag Garg\" style=\"box-shadow: 0 20px 30px 3px rgba(9, 9, 16, 0.2);\">\n</div>\n\n<br>\n\n<h1 align=\"center\">React Native Phone Number Input\n</h1>\n\n<p align=\"center\">Performance oriented React Native Phone Number Input with typings and proper validation for any country.\n</p>\n\n<h6 align=\"center\">Made with ❤️ by developer for developers</h6>\n\n<br>\n<p align=\"center\">\n<img src=\"http://img.shields.io/travis/badges/badgerbadgerbadger.svg?style=flat-square\" alt=\"build\"/>\n<img src=\"https://img.shields.io/github/issues/garganurag893/react-native-phone-number-input\" alt=\"build\"/>\n<img src=\"https://img.shields.io/github/issues-pr/garganurag893/react-native-phone-number-input\" alt=\"build\"/>\n<img src=\"http://img.shields.io/:license-mit-blue.svg?style=flat-square\" alt=\"build\"/>\n</p>\n\n## Want to show your love?\n\n> **Fixed Warning**: This PR updates the dependency on `react-native-country-picker-modal` to eliminate the React warning: \"Warning: defaultProps is deprecated and will be removed in a future major release. Use JavaScript default parameters instead.\" All functionality remains the same with no API changes.\n\n<p>Click on 🌟 button.</p>\n\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Installation](#installation)\n- [Features](#features)\n- [Usage](#usage)\n- [Props](#props)\n- [Methods](#methods)\n- [FAQ](#faq)\n  - [Is it supported and tested both on android and iOS?](#is-it-supported-and-tested-both-on-android-and-ios)\n  - [NSURLResponse allHeaderFields: unrecognized selector sent to instance XX crash?](#nsurlresponse-allheaderfields-unrecognized-selector-sent-to-instance-xx-crash)\n- [Contributing](#contributing)\n  - [Step 1](#step-1)\n  - [Step 2](#step-2)\n  - [Step 3](#step-3)\n- [Support](#support)\n- [License](#license)\n- [Hire](#hire)\n\n## Installation\n\n```bash\nnpm install @crystalneth0/react-native-phone-number-input\n```\n\nOr using yarn:\n\n```bash\nyarn add @crystalneth0/react-native-phone-number-input\n```\n\n### Original Installation\n\n```bash\n$ yarn add react-native-phone-number-input\n```\n\nOR\n\n```bash\n$ npm i react-native-phone-number-input --save\n```\n\n## Features\n\n- :iphone: Works with iOS and Android, Cross-platform :100:\n- :crossed_flags: Built-in country picker (uses [react-native-country-picker-modal][react-native-country-picker-modal])\n- :wrench: Completely customizable UI!\n- :heavy_check_mark: Proper validation (uses [google-libphonenumber](https://github.com/google/libphonenumber))\n\n## Usage\n\nFor more complete example open [App.tsx](https://github.com/garganurag893/react-native-phone-number-input/blob/master/example/App.tsx)\n\n```tsx\nimport React, { useState, useRef } from \"react\";\nimport {\n  SafeAreaView,\n  StyleSheet,\n  View,\n  StatusBar,\n  TouchableOpacity,\n  Text,\n} from \"react-native\";\nimport PhoneInput from \"react-native-phone-number-input\";\nimport { Colors } from \"react-native/Libraries/NewAppScreen\";\n\nconst App: React.FC = () => {\n  const [value, setValue] = useState(\"\");\n  const [formattedValue, setFormattedValue] = useState(\"\");\n  const [valid, setValid] = useState(false);\n  const [showMessage, setShowMessage] = useState(false);\n  const phoneInput = useRef<PhoneInput>(null);\n  return (\n    <>\n      <StatusBar barStyle=\"dark-content\" />\n      <View style={styles.container}>\n        <SafeAreaView style={styles.wrapper}>\n          {showMessage && (\n            <View style={styles.message}>\n              <Text>Value : {value}</Text>\n              <Text>Formatted Value : {formattedValue}</Text>\n              <Text>Valid : {valid ? \"true\" : \"false\"}</Text>\n            </View>\n          )}\n          <PhoneInput\n            ref={phoneInput}\n            defaultValue={value}\n            defaultCode=\"DM\"\n            layout=\"first\"\n            onChangeText={(text) => {\n              setValue(text);\n            }}\n            onChangeFormattedText={(text) => {\n              setFormattedValue(text);\n            }}\n            withDarkTheme\n            withShadow\n            autoFocus\n          />\n          <TouchableOpacity\n            style={styles.button}\n            onPress={() => {\n              const checkValid = phoneInput.current?.isValidNumber(value);\n              setShowMessage(true);\n              setValid(checkValid ? checkValid : false);\n            }}\n          >\n            <Text>Check</Text>\n          </TouchableOpacity>\n        </SafeAreaView>\n      </View>\n    </>\n  );\n};\n\nexport default App;\n```\n\n## Props\n\n- `defaultCode?`: [CountryCode](https://github.com/xcarpentier/react-native-country-picker-modal/blob/master/src/types.ts#L252)\n- `withDarkTheme?`: boolean\n- `withShadow?`: boolean\n- `autoFocus?`: boolean\n- `defaultValue?`: string\n- `value?`: string\n- `disabled?`: boolean\n- `disableArrowIcon?`: boolean\n- `placeholder?`: string;\n- `onChangeCountry?`: (country: Country) => void;\n- `onChangeText?`: (text: string) => void;\n- `onChangeFormattedText?`: (text: string) => void;\n- `containerStyle?`: `StyleProp<ViewStyle>`;\n- `textContainerStyle?`: `StyleProp<ViewStyle>`;\n- `renderDropdownImage?`: `JSX.Element`;\n- `textInputProps?`: [TextInputProps](https://reactnative.dev/docs/textinput);\n- `textInputStyle?`: `StyleProp<TextStyle>`;\n- `codeTextStyle?`: `StyleProp<TextStyle>`;\n- `flagButtonStyle?`: `StyleProp<ViewStyle>`;\n- `countryPickerButtonStyle` : `StyleProp<ViewStyle>`;\n- `layout?`: \"first\" | \"second\";\n- `filterProps?`: CountryFilterProps;\n- `countryPickerProps?`: any;\n\n## Methods\n\n- `getCountryCode`: () => [CountryCode](https://github.com/xcarpentier/react-native-country-picker-modal/blob/master/src/types.ts#L252)\n- `getCallingCode`: () => string | undefined\n- `getNumberAfterPossiblyEliminatingZero`: () => {number: string , formattedNumber: string };\n- `isValidNumber`: (number: string) => boolean\n\n## FAQ\n\n### Is it supported and tested both on android and iOS?\n\nYES\n\n### NSURLResponse allHeaderFields: unrecognized selector sent to instance XX crash?\n\nUpgrade `versions['Flipper'] ||= '~> 0.37.0'` in podfile.\n\n## Contributing\n\n> To get started...\n\n### Step 1\n\n- **Option 1**\n\n  - 🍴 Fork this repo!\n\n- **Option 2**\n  - 👯 Clone this repo to your local machine using `https://github.com/garganurag893/react-native-phone-number-input`\n\n### Step 2\n\n- **HACK AWAY!** 🔨🔨🔨\n\n### Step 3\n\n- 🔃 Create a new pull request using <a href=\"https://github.com/garganurag893/react-native-phone-number-input\" target=\"_blank\">`https://github.com/garganurag893/react-native-phone-number-input`</a>.\n\n## Support\n\nReach out to me at one of the following places!\n\n- Twitter at <a href=\"https://twitter.com/AnuragG94634191\" target=\"_blank\">https://twitter.com/AnuragG94634191</a>\n- Medium at <a href=\"https://medium.com/@garganurag893\" target=\"_blank\">https://medium.com/@garganurag893</a>\n- Instagram at <a href=\"https://www.instagram.com/the_only_anurag/\" target=\"_blank\">https://www.instagram.com/the_only_anurag/</a>\n- Email at garganurag893@gmail.com\n\n## License\n\n[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://badges.mit-license.org)\n\n- **[MIT license](http://opensource.org/licenses/mit-license.php)**\n\n## Hire\n\nLooking for a React/React-Native Freelance Expert? Email at garganurag893@gmail.com\n\n[react-native-country-picker-modal]: https://github.com/xcarpentier/react-native-country-picker-modal\n","readmeFilename":"README.md"}