{"_id":"@adhammahmoud98/react-native-phone-number-input","_rev":"3-e1eff04f962184362763a1b1565e69b0","name":"@adhammahmoud98/react-native-phone-number-input","dist-tags":{"latest":"2.4.0"},"versions":{"2.2.0":{"name":"@adhammahmoud98/react-native-phone-number-input","version":"2.2.0","description":"Phone Number Input Component","main":"lib/index.js","typings":"lib/index.d.ts","scripts":{"test":"echo \"Error: no test specified\""},"repository":{"type":"git","url":"git+https://github.com/AdhamMahmoud98/react-native-phone-number-input.git"},"author":{"name":"adham"},"license":"MIT","peerDependencies":{"react":"*","react-native":"*"},"keywords":["react-native","phone","telephone","phone input","input","tel","input text","international","react-native-component","ios","android"],"dependencies":{"google-libphonenumber":"^3.2.10","react-native-country-picker-modal":"^2.0.0"},"devDependencies":{"metro-react-native-babel-preset":"^0.61.0"},"bugs":{"url":"https://github.com/AdhamMahmoud98/react-native-phone-number-input/issues"},"homepage":"https://github.com/AdhamMahmoud98/react-native-phone-number-input#readme","directories":{"example":"example","lib":"lib"},"_id":"@adhammahmoud98/react-native-phone-number-input@2.2.0","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-jf1v+SsKtGxsTpBAvgV6V2QPNq5GLG4zBpxGUF67Yr/iC7sPOoFPjh54TykPqkt0/29J+jCz3VuXg0k8DByL9g==","shasum":"330c2669598d59c42b6ec274197dcca684e5905a","tarball":"https://registry.npmjs.org/@adhammahmoud98/react-native-phone-number-input/-/react-native-phone-number-input-2.2.0.tgz","fileCount":9,"unpackedSize":26332,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiNx0VACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmps2A/+LeIdxIaw3RVjnFlsXbWKQU9rQg9c2BRrlhCX21C4RNkxblbz\r\nigiKavrjsINFYy/otBc6BBG9T+Fe9L2YxpFKFY9yrCFnzi22t0HocdpEiiLM\r\nS5exDgzJesxyZ45O+q87k0gnEraYNcYdt1M6IlTWdNVurw1qQBx0OofV2ZVT\r\nIGLiNPqCXVZzi+qe+2TOAey7BQhW03JytnGZi0kuzz/FZyjm3JDKM0Ip5kaB\r\nVgx0V5RNvnVN/E4/uqojd8OgQ3di72VVh4S4N5bO179DNgEX/PBBPt3TQ1UD\r\nWv7WvS1uJQbkHjoP7E+X5CA9HombsUIzVW1lmx+4uMdkqLacZV3rDFSmpN4Q\r\njuRzQnStw0H+IU07wp7+b98B9clN0Pyt+HTxb5N0wm8IALTMOgMaYQvKlyHl\r\nm2aDxhBYITvQpnXK6beuqY+LJJUADv25/nVURlE0ByXBBR7UI1jWJ0THiZW6\r\nwZ9hqraeKJpzyau2BQ2gY8xzT9vNIEIWtXn9lKKea6gvoKiRknbO0oKtDynq\r\n1Q2Lrh5cqHwo/5XevzHaDcFLd9Im03w32rzNCtSCqnwCb2kD2L5iSsSVQVHz\r\n6r5Fn1OlzHUc7cZTZdGqVLPNTEVb0MlY65y/DTdzGeqWiKIG7He6FSzzeNSZ\r\n6zoHVyfWuIXinYnQRx/JyuKR8GzPo9Yz94M=\r\n=+Px6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIANUno90Q2g1KUnkl5y7wVVh1chABTbta0VQk/rRBJ7mAiAmkMy6/m4trhpLZwEp1NP+aH9gA+6AyjSvCBUhM5P9PA=="}]},"_npmUser":{"name":"adhammahmoud98","email":"adhammahmoud6@gmail.com"},"maintainers":[{"name":"adhammahmoud98","email":"adhammahmoud6@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-phone-number-input_2.2.0_1647779093752_0.6395818406940394"},"_hasShrinkwrap":false},"2.3.0":{"name":"@adhammahmoud98/react-native-phone-number-input","version":"2.3.0","description":"Phone Number Input Component","main":"lib/index.js","typings":"lib/index.d.ts","scripts":{"test":"echo \"Error: no test specified\""},"repository":{"type":"git","url":"git+https://github.com/AdhamMahmoud98/react-native-phone-number-input.git"},"author":{"name":"adham"},"license":"MIT","peerDependencies":{"react":"*","react-native":"*"},"keywords":["react-native","phone","telephone","phone input","input","tel","input text","international","react-native-component","ios","android"],"dependencies":{"google-libphonenumber":"^3.2.10","@adhammahmoud98/react-native-country-picker-modal":"2.2.0"},"devDependencies":{"metro-react-native-babel-preset":"^0.61.0"},"bugs":{"url":"https://github.com/AdhamMahmoud98/react-native-phone-number-input/issues"},"homepage":"https://github.com/AdhamMahmoud98/react-native-phone-number-input#readme","_id":"@adhammahmoud98/react-native-phone-number-input@2.3.0","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-nEXQFMjqGqQNqe2ngMRbc8dMbbwSeU86WQWoD2t8n+G2DuR1h9tzqEyE70QZlfn91p8CT0dFx6b9xrW9B6CF7A==","shasum":"24837349196408431de8ebda5ce56229cf7699c6","tarball":"https://registry.npmjs.org/@adhammahmoud98/react-native-phone-number-input/-/react-native-phone-number-input-2.3.0.tgz","fileCount":9,"unpackedSize":26103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiNzF6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrTTBAAnF6cFQwg+3sTDlzVNXMEZgPtLOwUzCi3TnHyyQk/76dnHc1R\r\nVhcxMVULnk49+cgquShjIMfDeViSf+I6ivCF0HxVaB5wW4JBpDqMzEqyQi2r\r\nliOO62U9BcDA54T0ntJB9XnQDYbhoqWNcgUfbM67VSRecmUWx4jPXol4wecN\r\nqmeRHoyEiPd0keEwzLoNmbopLaWZsCJP8bVJdzf7djnx+k4uPjZjAht12mxy\r\n5rdAlCUOxSpCjgM34uT2BWrlrptXOGJaxNc0NHNvVdRLksHm49bIQDccWkjT\r\nGgi482T9s1y3a4SLyfeSMyiKFxgbqKfAOnc5dKvNq07G84he5unzUCLhyKTk\r\n7RtVZg4QwmOH86uI5Xl/yWMaYSrSe/XIHHCEyGQXOW3AvkXkRsf6mNsS94ih\r\npNiIZk28G9qCsRu2oczDMc2cPHtKLUdTnEsiP53ch60bXCA4x0Nov4rvfQvG\r\n78TT74GJkw2qsDl7dLjdX+WIysWgISPALDp2CUOP6Qa4UKjYR+dXnpR+cku+\r\ns1Qbu4gXMXkpq4g0vXN2L1VPEJAQ6yOK/9+TGpCekCyrLWdJagYZJmsBPtvG\r\nAzajTgfBdGZld3HE1GJvl5Z3ESq3X9qWDH+hlfVK+uRnrNOyAxcKweiKBZbe\r\ny5XVpSk5is1nsP7JlOqVHxBbYFaPMXkz0ng=\r\n=0H6j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEv9r1oIbG1GLaiHCFV+iNfQjuxqiUyUVMfn+GUm94zWAiBRNY9z51RLgEw/8DwLwCbXFHNTVASBdpfXG+n+4PvjWQ=="}]},"_npmUser":{"name":"adhammahmoud98","email":"adhammahmoud6@gmail.com"},"directories":{},"maintainers":[{"name":"adhammahmoud98","email":"adhammahmoud6@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-phone-number-input_2.3.0_1647784314628_0.5184780751312434"},"_hasShrinkwrap":false},"2.4.0":{"name":"@adhammahmoud98/react-native-phone-number-input","version":"2.4.0","description":"Phone Number Input Component","main":"lib/index.js","typings":"lib/index.d.ts","scripts":{"test":"echo \"Error: no test specified\""},"repository":{"type":"git","url":"git+https://github.com/AdhamMahmoud98/react-native-phone-number-input.git"},"author":{"name":"adham"},"license":"MIT","peerDependencies":{"react":"*","react-native":"*"},"keywords":["react-native","phone","telephone","phone input","input","tel","input text","international","react-native-component","ios","android"],"dependencies":{"google-libphonenumber":"^3.2.10","@adhammahmoud98/react-native-country-picker-modal":"2.2.0"},"devDependencies":{"metro-react-native-babel-preset":"^0.61.0"},"bugs":{"url":"https://github.com/AdhamMahmoud98/react-native-phone-number-input/issues"},"homepage":"https://github.com/AdhamMahmoud98/react-native-phone-number-input#readme","_id":"@adhammahmoud98/react-native-phone-number-input@2.4.0","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-3mT83KAKSltIdPIg1cr1SdWecdVvPGJ0suxSUsGn/BRsIcwAqEDu95wzUJs1H3NJiHY3Bf6DUpd5GuY5vSF8+w==","shasum":"b4db382fa4c6b352a1c46d246570d2ed69017fd5","tarball":"https://registry.npmjs.org/@adhammahmoud98/react-native-phone-number-input/-/react-native-phone-number-input-2.4.0.tgz","fileCount":9,"unpackedSize":26154,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiNzjQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoPRg/+IE9HVUTJF1+a5jDGE/Uoi2f9inqNwTAs+YxN92uRNP6RGU6R\r\n9cOmzRhtgG/Lk+qGsbpbk1BN2kz7b9mmBIifXv1y22Ao2fEiHv2z0w9JM8y9\r\nTyZT2fbTAX3HuVbuIHKrOgarDH8h82MCdvPcJy8Tm5IvSMmWgqnlXJfN5DgW\r\nxD6OrK1h4n4p3w0nF3+K/xPjqtkgsNeVgirqvU7aUGU2j/9fqL72lUO4OUs1\r\n+6vaBmgXF+KTAaRLzmotcuGnlvC9cIFfzC1sxKcz7oBSp3FjGATa4f5Z3Moj\r\nHiHl82jSUoQw7jOpzkh5NV0JsgnxgjTyLsqeXCbfsbDRb0IZGtzmeW9o8L2d\r\nOWlsMhzIj+OsMHQmEoRO5HcI4ckmv86VQjip7Qtd9EKMG0y0tpKS4r37S7e8\r\n6i0ZRmnTaqd+eajG9VovE8bsZ7eWA1+VuMae4GQf8ngl5YCZkF3IvQfbHXW5\r\ncuuOmvO4z1HNVwrrh2E5m8T4n5WtEys/cP9XFciv8/ZajRthD2d5pz/9UwyQ\r\nR3NwpJKwDqspmwWqXU+vWH+OaJpU10SYFtsrGg4PkzCQ2m+jNIrrI6znQvCw\r\nPGHKKUp7WutTRWgwkosxRnLCuskMl0BAo1n6ALlYZQUnlrXF4WV6WF2zFPvJ\r\nBqxV7qqUJEVITEz1mPc5mH4fVls1mOHuyy8=\r\n=b7Ja\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxAd7eH6Nd1C337l3MVGUZpLwQjufM1hBsOBYW63mtkQIhALuoizmfXcstDczKS+ZNmPgcvYqK4DxSSKekS5qGD5HW"}]},"_npmUser":{"name":"adhammahmoud98","email":"adhammahmoud6@gmail.com"},"directories":{},"maintainers":[{"name":"adhammahmoud98","email":"adhammahmoud6@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-phone-number-input_2.4.0_1647786192557_0.6448721094352443"},"_hasShrinkwrap":false}},"time":{"created":"2022-03-20T12:24:53.699Z","2.2.0":"2022-03-20T12:24:53.894Z","modified":"2022-04-04T11:29:32.556Z","2.3.0":"2022-03-20T13:51:54.991Z","2.4.0":"2022-03-20T14:23:12.783Z"},"maintainers":[{"name":"adhammahmoud98","email":"adhammahmoud6@gmail.com"}],"description":"Phone Number Input Component","homepage":"https://github.com/AdhamMahmoud98/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/AdhamMahmoud98/react-native-phone-number-input.git"},"author":{"name":"adham"},"bugs":{"url":"https://github.com/AdhamMahmoud98/react-native-phone-number-input/issues"},"license":"MIT","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<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\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"}