react-native-international-phone-number 0.6.3 → 0.6.5

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
@@ -109,11 +109,16 @@ create a `react-native.config.js` file at the root of your react-native project
109
109
  android: {},
110
110
  },
111
111
  assets: [
112
- './node_modules/react-native-international-phone-number/assets/fonts',
112
+ './node_modules/react-native-international-phone-number/lib/assets/fonts',
113
113
  ],
114
114
  };
115
115
  ```
116
116
 
117
+ Then link the font to your native projects with:
118
+ ```bash
119
+ npx react-native-asset
120
+ ```
121
+
117
122
  - Using Expo:
118
123
 
119
124
  1. Install [expo-fonts](https://docs.expo.dev/versions/latest/sdk/font/): `npx expo install expo-font`;
@@ -125,7 +130,7 @@ create a `react-native.config.js` file at the root of your react-native project
125
130
  ...
126
131
 
127
132
  useFonts({
128
- 'TwemojiMozilla': require('./node_modules/react-native-international-phone-number/assets/fonts/TwemojiMozilla.ttf'),
133
+ 'TwemojiMozilla': require('./node_modules/react-native-international-phone-number/lib/assets/fonts/TwemojiMozilla.ttf'),
129
134
  });
130
135
 
131
136
  ...
@@ -657,7 +662,7 @@ export default function App() {
657
662
  - `modalDisabled?:` boolean;
658
663
  - `modalHeight?:` number | string;
659
664
  - `theme?:` [ITheme](lib/interfaces/theme.ts);
660
- - `phoneInputStyle?:` [IPhoneInputStyles](lib/interfaces/phoneInputStyles.ts);
665
+ - `phoneInputStyles?:` [IPhoneInputStyles](lib/interfaces/phoneInputStyles.ts);
661
666
  - `modalStyles?:` [IModalStyles](lib/interfaces/modalStyles.ts);
662
667
  - `modalSearchInputPlaceholder?:` string;
663
668
  - `modalNotFoundCountryMessage?:` string;
@@ -1263,7 +1263,7 @@ export const countries = [
1263
1263
  ua: "Кот-д'Івуар",
1264
1264
  zh: '科特迪瓦',
1265
1265
  },
1266
- phoneMasks: ['## ### ###'],
1266
+ phoneMasks: ['## ### ###', '## ## ## ####'],
1267
1267
  },
1268
1268
  {
1269
1269
  callingCode: '+682',
@@ -1347,7 +1347,7 @@ export const countries = [
1347
1347
  ua: 'Камерун',
1348
1348
  zh: '喀麥隆',
1349
1349
  },
1350
- phoneMasks: ['#### ####'],
1350
+ phoneMasks: ['#### ####', '### ### ###'],
1351
1351
  },
1352
1352
  {
1353
1353
  callingCode: '+86',
@@ -2082,7 +2082,7 @@ export const countries = [
2082
2082
  ua: 'Франція',
2083
2083
  zh: '法國',
2084
2084
  },
2085
- phoneMasks: ['### ### ###'],
2085
+ phoneMasks: ['# ## ## ## ##', '## ## ## ## ##'],
2086
2086
  },
2087
2087
  {
2088
2088
  callingCode: '+241',
package/lib/index.js CHANGED
@@ -40,8 +40,8 @@ const PhoneInput = forwardRef(
40
40
  placeholder,
41
41
  placeholderTextColor,
42
42
  selectionColor,
43
- phoneInputStyle,
44
- modalStyle,
43
+ phoneInputStyles,
44
+ modalStyles,
45
45
  disabled,
46
46
  modalDisabled,
47
47
  modalHeight,
@@ -83,8 +83,8 @@ const PhoneInput = forwardRef(
83
83
  placeholder,
84
84
  placeholderTextColor,
85
85
  selectionColor,
86
- phoneInputStyle,
87
- modalStyle,
86
+ phoneInputStyles,
87
+ modalStyles,
88
88
  disabled,
89
89
  modalDisabled,
90
90
  modalHeight,
@@ -289,7 +289,7 @@ const PhoneInput = forwardRef(
289
289
  <View
290
290
  style={getContainerStyle(
291
291
  theme,
292
- phoneInputStyle?.container,
292
+ phoneInputStyles?.container,
293
293
  disabled
294
294
  )}
295
295
  >
@@ -300,23 +300,23 @@ const PhoneInput = forwardRef(
300
300
  }
301
301
  style={getFlagContainerStyle(
302
302
  theme,
303
- phoneInputStyle?.flagContainer
303
+ phoneInputStyles?.flagContainer
304
304
  )}
305
305
  >
306
- <Text style={getFlagStyle(phoneInputStyle?.flag)}>
306
+ <Text style={getFlagStyle(phoneInputStyles?.flag)}>
307
307
  {countryValue?.flag}
308
308
  </Text>
309
309
  <Text
310
310
  style={getFlagTextStyle(
311
311
  theme,
312
- phoneInputStyle?.callingCode
312
+ phoneInputStyles?.callingCode
313
313
  )}
314
314
  >
315
315
  {countryValue?.callingCode}
316
316
  </Text>
317
317
  </TouchableOpacity>
318
318
  <TextInput
319
- style={getInputStyle(theme, phoneInputStyle?.input)}
319
+ style={getInputStyle(theme, phoneInputStyles?.input)}
320
320
  placeholder={
321
321
  placeholder ||
322
322
  getPhoneNumberInputPlaceholder(language || 'en')
@@ -355,7 +355,7 @@ const PhoneInput = forwardRef(
355
355
  style={getCountryPickerStyle(
356
356
  theme,
357
357
  modalHeight,
358
- modalStyle
358
+ modalStyles
359
359
  )}
360
360
  pickerButtonOnPress={onSelect}
361
361
  onBackdropPress={() => setShow(false)}
@@ -14,8 +14,8 @@ interface BasePhoneInput extends TextInputProps {
14
14
  placeholder?: string;
15
15
  placeholderTextColor?: string;
16
16
  selectionColor?: string;
17
- phoneInputStyle?: IPhoneInputStyles;
18
- modalStyle?: IModalStyles;
17
+ phoneInputStyles?: IPhoneInputStyles;
18
+ modalStyles?: IModalStyles;
19
19
  theme?: ITheme;
20
20
  disabled?: boolean;
21
21
  modalDisabled?: boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-international-phone-number",
3
3
  "author": "AstrOOnauta (https://github.com/AstrOOnauta)",
4
- "version": "0.6.3",
4
+ "version": "0.6.5",
5
5
  "description": "International mobile phone input component with mask for React Native",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",