Skip to content

Commit

Permalink
add main failes
Browse files Browse the repository at this point in the history
  • Loading branch information
sohantalukder committed Jan 7, 2025
1 parent 86d306c commit e349344
Show file tree
Hide file tree
Showing 11 changed files with 1,839 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
TextStyle,
ViewStyle,
} from 'react-native';
import type { CountryCode, EachCountry } from './lib/constants/constants.d';
import type { CountryCode, EachCountry } from './main/constants/constants.d';

/**
* Props for the RNPhoneInput component.
Expand Down
10 changes: 5 additions & 5 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import {
useColorScheme,
} from 'react-native';
import { forwardRef, useImperativeHandle, useState } from 'react';
import constants from './lib/constants/constants';
import Picker from './lib/country-picker/Picker';
import assets from './lib/assets/assets';
import constants from './main/constants/constants';
import Picker from './main/country-picker/Picker';
import assets from './main/assets/assets';
import styles from './styles';
import type { RNPhoneInputProps, RNPhoneInputRef } from './index.d';
import type { CountryCode, EachCountry } from './lib/constants/constants.d';
import CountryPickerModal from './lib/country-picker/CountryPickerModal';
import type { CountryCode, EachCountry } from './main/constants/constants.d';
import CountryPickerModal from './main/country-picker/CountryPickerModal';

declare global {
namespace NodeJS {
Expand Down
9 changes: 9 additions & 0 deletions src/main/assets/assets.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
type Assets = {
[key in
| 'closeDefaultIcon'
| 'closeDarkIcon'
| 'downArrowDefaultIcon'
| 'downArrowDarkIcon']: string;
};

export type { Assets };
14 changes: 14 additions & 0 deletions src/main/assets/assets.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type {Assets} from './assets';

Check failure on line 1 in src/main/assets/assets.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `Assets` with `·Assets·`

const assets: Assets = {
closeDefaultIcon:
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH0AAAB9CAYAAACPgGw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WaJ4h4iXa8FniOIgIvbiS+oNEX0JLalfQJTUtIiSmhZRUtMiSmpaRElNiyipaRElNS2ipKZFlNS0iJKaFlFS0yJKalpESU2LKKlpESU1LaKkpsX/hfqGz4X6exDWFF2xmvKbw4Jd6CN7b27MxDfGwF8wtOJN5J9tUvMPtogJrzZ/lygAAAAASUVORK5CYII=',
};

export default assets;
203 changes: 203 additions & 0 deletions src/main/constants/constants.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
type CountryCode =
| 'AF'
| 'AL'
| 'DZ'
| 'AD'
| 'AO'
| 'AR'
| 'AM'
| 'AU'
| 'AT'
| 'AZ'
| 'BH'
| 'BD'
| 'BY'
| 'BE'
| 'BJ'
| 'BT'
| 'BO'
| 'BA'
| 'BW'
| 'BR'
| 'BN'
| 'BG'
| 'BF'
| 'BI'
| 'KH'
| 'CM'
| 'CA'
| 'CV'
| 'KY'
| 'CF'
| 'TD'
| 'CL'
| 'CN'
| 'CO'
| 'KM'
| 'CG'
| 'CD'
| 'CR'
| 'CI'
| 'HR'
| 'CU'
| 'CY'
| 'CZ'
| 'DK'
| 'DJ'
| 'DM'
| 'DO'
| 'EC'
| 'EG'
| 'SV'
| 'GQ'
| 'ER'
| 'EE'
| 'ET'
| 'FJ'
| 'FI'
| 'FR'
| 'GA'
| 'GM'
| 'GE'
| 'DE'
| 'GH'
| 'GR'
| 'GD'
| 'GU'
| 'GT'
| 'GN'
| 'GW'
| 'GY'
| 'HT'
| 'HN'
| 'HU'
| 'IS'
| 'IN'
| 'ID'
| 'IR'
| 'IQ'
| 'IE'
| 'IL'
| 'IT'
| 'JM'
| 'JP'
| 'JO'
| 'KZ'
| 'KE'
| 'KI'
| 'KW'
| 'KG'
| 'LA'
| 'LV'
| 'LB'
| 'LS'
| 'LR'
| 'LY'
| 'LI'
| 'LT'
| 'LU'
| 'MO'
| 'MK'
| 'MG'
| 'MW'
| 'MY'
| 'MV'
| 'ML'
| 'MT'
| 'MH'
| 'MR'
| 'MU'
| 'YT'
| 'MX'
| 'FM'
| 'MD'
| 'MC'
| 'MN'
| 'ME'
| 'MS'
| 'MA'
| 'MZ'
| 'MM'
| 'NA'
| 'NR'
| 'NP'
| 'NL'
| 'NZ'
| 'NI'
| 'NE'
| 'NG'
| 'KP'
| 'NO'
| 'OM'
| 'PK'
| 'PA'
| 'PG'
| 'PY'
| 'PE'
| 'PH'
| 'PL'
| 'PT'
| 'PR'
| 'QA'
| 'RO'
| 'RU'
| 'RW'
| 'KN'
| 'SC'
| 'LC'
| 'SM'
| 'ST'
| 'SA'
| 'SN'
| 'RS'
| 'SG'
| 'SX'
| 'SK'
| 'SI'
| 'SO'
| 'ZA'
| 'KR'
| 'SS'
| 'ES'
| 'LK'
| 'SD'
| 'SR'
| 'SZ'
| 'SE'
| 'CH'
| 'SY'
| 'TJ'
| 'TZ'
| 'TH'
| 'TG'
| 'TO'
| 'TT'
| 'TN'
| 'TR'
| 'TM'
| 'TV'
| 'UG'
| 'UA'
| 'AE'
| 'GB'
| 'US'
| 'UY'
| 'UZ'
| 'VU'
| 'VE'
| 'VN'
| 'WF'
| 'YE'
| 'ZM'
| 'ZW';
type EachCountry = {
icon: string;
countryCode: string;
countryName: string;
callingCode: string;
regex: string;
};
type Constant = {
[key in CountryCode]: EachCountry;
};
export type { CountryCode, Constant, EachCountry };
Loading

0 comments on commit e349344

Please sign in to comment.