react-native-international-phone-number 0.7.5 → 0.8.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 +24 -3
- package/lib/constants/countries.js +517 -6
- package/lib/index.js +132 -86
- package/lib/interfaces/countryName.ts +1 -0
- package/lib/interfaces/language.ts +3 -1
- package/lib/interfaces/phoneInputProps.ts +3 -0
- package/lib/styles.js +4 -1
- package/lib/utils/getPlaceholders.js +12 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
- [Show Only Some Countries Inside Modal](#show-only-some-countries)
|
|
72
72
|
- [Exclude some countries Inside Modal](#exclude-some-countries)
|
|
73
73
|
- [Show Popular Countries at the Top of the Countries List Inside Modal](#show-popular-countries-at-the-top-of-the-countries-list-inside-modal)
|
|
74
|
+
- [Right to Left Input](#right-to-left-input)
|
|
74
75
|
- [Lib Props](#component-props-phoneinputprops)
|
|
75
76
|
- [Lib Functions](#functions)
|
|
76
77
|
- [Supported languages](#🎌-supported-languages-🎌)
|
|
@@ -150,7 +151,7 @@ npx react-native-asset
|
|
|
150
151
|
- 🎨 Lib with UI customizable;
|
|
151
152
|
- 🌎 Phone Input Mask according with the selected country;
|
|
152
153
|
- 👨💻 Functional and class component support;
|
|
153
|
-
- 🈶
|
|
154
|
+
- 🈶 21 languages supported.
|
|
154
155
|
|
|
155
156
|
<br>
|
|
156
157
|
|
|
@@ -673,6 +674,21 @@ export default function App() {
|
|
|
673
674
|
<PhoneInput
|
|
674
675
|
...
|
|
675
676
|
popularCountriess={['BR', 'PT', 'CA', 'US']}
|
|
677
|
+
popularCountriesSectionTitle='Suggested'
|
|
678
|
+
restOfCountriesSectionTitle='All'
|
|
679
|
+
/>
|
|
680
|
+
...
|
|
681
|
+
```
|
|
682
|
+
|
|
683
|
+
- ### Right to Left Input:
|
|
684
|
+
|
|
685
|
+
```jsx
|
|
686
|
+
import { I18nManager } from "react-native";
|
|
687
|
+
|
|
688
|
+
...
|
|
689
|
+
<PhoneInput
|
|
690
|
+
...
|
|
691
|
+
rtl={I18nManager.isRTL}
|
|
676
692
|
/>
|
|
677
693
|
...
|
|
678
694
|
```
|
|
@@ -692,6 +708,9 @@ export default function App() {
|
|
|
692
708
|
- `showOnly?:` [ICountryCca2[]](lib/interfaces/countryCca2.ts);
|
|
693
709
|
- `excludedCountries?:` [ICountryCca2[]](lib/interfaces/countryCca2.ts);
|
|
694
710
|
- `popularCountries?:` [ICountryCca2[]](lib/interfaces/countryCca2.ts);
|
|
711
|
+
- `popularCountriesSectionTitle?:` string;
|
|
712
|
+
- `restOfCountriesSectionTitle?:` string;
|
|
713
|
+
- `rtl?:` boolean;
|
|
695
714
|
- `disabled?:` boolean;
|
|
696
715
|
- `modalDisabled?:` boolean;
|
|
697
716
|
- `modalHeight?:` number | string;
|
|
@@ -703,7 +722,7 @@ export default function App() {
|
|
|
703
722
|
- `modalSearchInputSelectionColor?:` string;
|
|
704
723
|
- `modalNotFoundCountryMessage?:` string;
|
|
705
724
|
- `customCaret?:` [ReactNode](https://reactnative.dev/docs/react-node);
|
|
706
|
-
- `ref?:` [Ref](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/663f439d11d78b65f1dfd38d120f3728ea2cc207/types/react/index.d.ts#L100)<[IPhoneInputRef](lib/interfaces/phoneInputRef.ts)
|
|
725
|
+
- `ref?:` [Ref](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/663f439d11d78b65f1dfd38d120f3728ea2cc207/types/react/index.d.ts#L100)<[IPhoneInputRef](lib/interfaces/phoneInputRef.ts)>;
|
|
707
726
|
|
|
708
727
|
<br>
|
|
709
728
|
|
|
@@ -740,7 +759,9 @@ export default function App() {
|
|
|
740
759
|
"ro": "Romanian",
|
|
741
760
|
"ru": "Russian",
|
|
742
761
|
"ua": "Ukrainian",
|
|
743
|
-
"zh": "Chinese (Simplified)"
|
|
762
|
+
"zh": "Chinese (Simplified)",
|
|
763
|
+
"ar": "Arabic",
|
|
764
|
+
"tr": "Turkish"
|
|
744
765
|
},
|
|
745
766
|
```
|
|
746
767
|
|