@superdispatch/phones 0.13.0 → 0.16.0-alpha.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/dist-node/index.js +710 -37
- package/dist-node/index.js.map +1 -1
- package/dist-src/index.js +3 -1
- package/dist-src/v5/apn/APN.js +27 -0
- package/dist-src/v5/country-code-metadata/CountryCodeMetadata.js +27 -0
- package/dist-src/v5/formatted-phone-number/FormattedPhoneNumber.js +21 -0
- package/dist-src/v5/index.js +6 -0
- package/dist-src/v5/phone-field/PhoneField.js +149 -0
- package/dist-src/v5/phone-field/PhoneFieldFlag.js +46 -0
- package/dist-src/v5/phone-field/PhoneFieldMenu.js +40 -0
- package/dist-src/v5/phone-field/PhoneFieldMenuItem.js +54 -0
- package/dist-src/v5/phone-field/PhoneFieldStartAdornment.js +62 -0
- package/dist-src/v5/phone-link/PhoneLink.js +56 -0
- package/dist-src/v5/phone-service/PhoneService.js +185 -0
- package/dist-src/v5/phone-text/PhoneText.js +34 -0
- package/dist-types/index.d.ts +158 -2
- package/dist-web/index.js +683 -7
- package/dist-web/index.js.map +1 -1
- package/package.json +5 -3
package/dist-types/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import AwesomePhoneNumber from 'awesome-phonenumber';
|
|
2
2
|
import { ForwardRefExoticComponent, RefAttributes, ReactNode, ReactElement } from 'react';
|
|
3
|
-
import { BaseTextFieldProps, LinkProps } from '@material
|
|
3
|
+
import { BaseTextFieldProps, LinkProps } from '@mui/material';
|
|
4
|
+
import { BaseTextFieldProps as BaseTextFieldProps$1, LinkProps as LinkProps$1 } from '@material-ui/core';
|
|
4
5
|
|
|
5
6
|
declare const COUNTRY_CODE_METADATA: readonly [readonly ["US", 1, "United States"], readonly ["CA", 1, "Canada"], readonly ["AU", 61, "Australia"], readonly ["NZ", 64, "New Zealand"], readonly ["AC", 247, "Ascension Island"], readonly ["AD", 376, "Andorra"], readonly ["AE", 971, "United Arab Emirates"], readonly ["AF", 93, "Afghanistan"], readonly ["AG", 1, "Antigua and Barbuda"], readonly ["AI", 1, "Anguilla"], readonly ["AL", 355, "Albania"], readonly ["AM", 374, "Armenia"], readonly ["AO", 244, "Angola"], readonly ["AR", 54, "Argentina"], readonly ["AS", 1, "American Samoa"], readonly ["AT", 43, "Austria"], readonly ["AW", 297, "Aruba"], readonly ["AX", 358, "Åland Islands"], readonly ["AZ", 994, "Azerbaijan"], readonly ["BA", 387, "Bosnia and Herzegovina"], readonly ["BB", 1, "Barbados"], readonly ["BD", 880, "Bangladesh"], readonly ["BE", 32, "Belgium"], readonly ["BF", 226, "Burkina Faso"], readonly ["BG", 359, "Bulgaria"], readonly ["BH", 973, "Bahrain"], readonly ["BI", 257, "Burundi"], readonly ["BJ", 229, "Benin"], readonly ["BL", 590, "Saint Barthélemy"], readonly ["BM", 1, "Bermuda"], readonly ["BN", 673, "Brunei"], readonly ["BO", 591, "Bolivia"], readonly ["BQ", 599, "Caribbean Netherlands"], readonly ["BR", 55, "Brazil"], readonly ["BS", 1, "Bahamas"], readonly ["BT", 975, "Bhutan"], readonly ["BW", 267, "Botswana"], readonly ["BY", 375, "Belarus"], readonly ["BZ", 501, "Belize"], readonly ["CC", 61, "Cocos"], readonly ["CD", 243, "Congo"], readonly ["CF", 236, "Central African Republic"], readonly ["CG", 242, "Congo"], readonly ["CH", 41, "Switzerland"], readonly ["CI", 225, "Côte d’Ivoire"], readonly ["CK", 682, "Cook Islands"], readonly ["CL", 56, "Chile"], readonly ["CM", 237, "Cameroon"], readonly ["CN", 86, "China"], readonly ["CO", 57, "Colombia"], readonly ["CR", 506, "Costa Rica"], readonly ["CU", 53, "Cuba"], readonly ["CV", 238, "Cape Verde"], readonly ["CW", 599, "Curaçao"], readonly ["CX", 61, "Christmas Island"], readonly ["CY", 357, "Cyprus"], readonly ["CZ", 420, "Czech Republic"], readonly ["DE", 49, "Germany"], readonly ["DJ", 253, "Djibouti"], readonly ["DK", 45, "Denmark"], readonly ["DM", 1, "Dominica"], readonly ["DO", 1, "Dominican Republic"], readonly ["DZ", 213, "Algeria"], readonly ["EC", 593, "Ecuador"], readonly ["EE", 372, "Estonia"], readonly ["EG", 20, "Egypt"], readonly ["EH", 212, "Western Sahara"], readonly ["ER", 291, "Eritrea"], readonly ["ES", 34, "Spain"], readonly ["ET", 251, "Ethiopia"], readonly ["FI", 358, "Finland"], readonly ["FJ", 679, "Fiji"], readonly ["FK", 500, "Falkland Islands"], readonly ["FM", 691, "Micronesia"], readonly ["FO", 298, "Faroe Islands"], readonly ["FR", 33, "France"], readonly ["GA", 241, "Gabon"], readonly ["GB", 44, "United Kingdom"], readonly ["GD", 1, "Grenada"], readonly ["GE", 995, "Georgia"], readonly ["GF", 594, "French Guiana"], readonly ["GG", 44, "Guernsey"], readonly ["GH", 233, "Ghana"], readonly ["GI", 350, "Gibraltar"], readonly ["GL", 299, "Greenland"], readonly ["GM", 220, "Gambia"], readonly ["GN", 224, "Guinea"], readonly ["GP", 590, "Guadeloupe"], readonly ["GQ", 240, "Equatorial Guinea"], readonly ["GR", 30, "Greece"], readonly ["GT", 502, "Guatemala"], readonly ["GU", 1, "Guam"], readonly ["GW", 245, "Guinea-Bissau"], readonly ["GY", 592, "Guyana"], readonly ["HK", 852, "Hong Kong"], readonly ["HN", 504, "Honduras"], readonly ["HR", 385, "Croatia"], readonly ["HT", 509, "Haiti"], readonly ["HU", 36, "Hungary"], readonly ["ID", 62, "Indonesia"], readonly ["IE", 353, "Ireland"], readonly ["IL", 972, "Israel"], readonly ["IM", 44, "Isle of Man"], readonly ["IN", 91, "India"], readonly ["IO", 246, "British Indian Ocean Territory"], readonly ["IQ", 964, "Iraq"], readonly ["IR", 98, "Iran"], readonly ["IS", 354, "Iceland"], readonly ["IT", 39, "Italy"], readonly ["JE", 44, "Jersey"], readonly ["JM", 1, "Jamaica"], readonly ["JO", 962, "Jordan"], readonly ["JP", 81, "Japan"], readonly ["KE", 254, "Kenya"], readonly ["KG", 996, "Kyrgyzstan"], readonly ["KH", 855, "Cambodia"], readonly ["KI", 686, "Kiribati"], readonly ["KM", 269, "Comoros"], readonly ["KN", 1, "Saint Kitts and Nevis"], readonly ["KP", 850, "North Korea"], readonly ["KR", 82, "South Korea"], readonly ["KW", 965, "Kuwait"], readonly ["KY", 1, "Cayman Islands"], readonly ["KZ", 7, "Kazakhstan"], readonly ["LA", 856, "Laos"], readonly ["LB", 961, "Lebanon"], readonly ["LC", 1, "Saint Lucia"], readonly ["LI", 423, "Liechtenstein"], readonly ["LK", 94, "Sri Lanka"], readonly ["LR", 231, "Liberia"], readonly ["LS", 266, "Lesotho"], readonly ["LT", 370, "Lithuania"], readonly ["LU", 352, "Luxembourg"], readonly ["LV", 371, "Latvia"], readonly ["LY", 218, "Libya"], readonly ["MA", 212, "Morocco"], readonly ["MC", 377, "Monaco"], readonly ["MD", 373, "Moldova"], readonly ["ME", 382, "Montenegro"], readonly ["MF", 590, "Saint Martin"], readonly ["MG", 261, "Madagascar"], readonly ["MH", 692, "Marshall Islands"], readonly ["MK", 389, "Macedonia"], readonly ["ML", 223, "Mali"], readonly ["MM", 95, "Myanmar"], readonly ["MN", 976, "Mongolia"], readonly ["MO", 853, "Macau"], readonly ["MP", 1, "Northern Mariana Islands"], readonly ["MQ", 596, "Martinique"], readonly ["MR", 222, "Mauritania"], readonly ["MS", 1, "Montserrat"], readonly ["MT", 356, "Malta"], readonly ["MU", 230, "Mauritius"], readonly ["MV", 960, "Maldives"], readonly ["MW", 265, "Malawi"], readonly ["MX", 52, "Mexico"], readonly ["MY", 60, "Malaysia"], readonly ["MZ", 258, "Mozambique"], readonly ["NA", 264, "Namibia"], readonly ["NC", 687, "New Caledonia"], readonly ["NE", 227, "Niger"], readonly ["NF", 672, "Norfolk Island"], readonly ["NG", 234, "Nigeria"], readonly ["NI", 505, "Nicaragua"], readonly ["NL", 31, "Netherlands"], readonly ["NO", 47, "Norway"], readonly ["NP", 977, "Nepal"], readonly ["NR", 674, "Nauru"], readonly ["NU", 683, "Niue"], readonly ["OM", 968, "Oman"], readonly ["PA", 507, "Panama"], readonly ["PE", 51, "Peru"], readonly ["PF", 689, "French Polynesia"], readonly ["PG", 675, "Papua New Guinea"], readonly ["PH", 63, "Philippines"], readonly ["PK", 92, "Pakistan"], readonly ["PL", 48, "Poland"], readonly ["PM", 508, "Saint Pierre and Miquelon"], readonly ["PR", 1, "Puerto Rico"], readonly ["PS", 970, "Palestine"], readonly ["PT", 351, "Portugal"], readonly ["PW", 680, "Palau"], readonly ["PY", 595, "Paraguay"], readonly ["QA", 974, "Qatar"], readonly ["RE", 262, "Réunion"], readonly ["RO", 40, "Romania"], readonly ["RS", 381, "Serbia"], readonly ["RU", 7, "Russia"], readonly ["RW", 250, "Rwanda"], readonly ["SA", 966, "Saudi Arabia"], readonly ["SB", 677, "Solomon Islands"], readonly ["SC", 248, "Seychelles"], readonly ["SD", 249, "Sudan"], readonly ["SE", 46, "Sweden"], readonly ["SG", 65, "Singapore"], readonly ["SH", 290, "Saint Helena"], readonly ["SI", 386, "Slovenia"], readonly ["SJ", 47, "Svalbard and Jan Mayen"], readonly ["SK", 421, "Slovakia"], readonly ["SL", 232, "Sierra Leone"], readonly ["SM", 378, "San Marino"], readonly ["SN", 221, "Senegal"], readonly ["SO", 252, "Somalia"], readonly ["SR", 597, "Suriname"], readonly ["SS", 211, "South Sudan"], readonly ["ST", 239, "São Tomé and Príncipe"], readonly ["SV", 503, "El Salvador"], readonly ["SX", 1, "Sint Maarten"], readonly ["SY", 963, "Syria"], readonly ["SZ", 268, "Swaziland"], readonly ["TA", 290, "Tristan da Cunha"], readonly ["TC", 1, "Turks and Caicos Islands"], readonly ["TD", 235, "Chad"], readonly ["TG", 228, "Togo"], readonly ["TH", 66, "Thailand"], readonly ["TJ", 992, "Tajikistan"], readonly ["TK", 690, "Tokelau"], readonly ["TL", 670, "Timor-Leste"], readonly ["TM", 993, "Turkmenistan"], readonly ["TN", 216, "Tunisia"], readonly ["TO", 676, "Tonga"], readonly ["TR", 90, "Turkey"], readonly ["TT", 1, "Trinidad and Tobago"], readonly ["TV", 688, "Tuvalu"], readonly ["TW", 886, "Taiwan"], readonly ["TZ", 255, "Tanzania"], readonly ["UA", 380, "Ukraine"], readonly ["UG", 256, "Uganda"], readonly ["UY", 598, "Uruguay"], readonly ["UZ", 998, "Uzbekistan"], readonly ["VA", 39, "Vatican City"], readonly ["VC", 1, "Saint Vincent and the Grenadines"], readonly ["VE", 58, "Venezuela"], readonly ["VG", 1, "British Virgin Islands"], readonly ["VI", 1, "U.S. Virgin Islands"], readonly ["VN", 84, "Vietnam"], readonly ["VU", 678, "Vanuatu"], readonly ["WF", 681, "Wallis and Futuna"], readonly ["WS", 685, "Samoa"], readonly ["XK", 383, "Kosovo"], readonly ["YE", 967, "Yemen"], readonly ["YT", 262, "Mayotte"], readonly ["ZA", 27, "South Africa"], readonly ["ZM", 260, "Zambia"], readonly ["ZW", 263, "Zimbabwe"]];
|
|
6
7
|
declare type CountryISO = typeof COUNTRY_CODE_METADATA[number][0];
|
|
@@ -95,4 +96,159 @@ interface SuspendedPhoneTextProps extends PhoneTextProps {
|
|
|
95
96
|
}
|
|
96
97
|
declare function SuspendedPhoneText({ suspenseFallback, ...props }: SuspendedPhoneTextProps): ReactElement;
|
|
97
98
|
|
|
98
|
-
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
type index_d_CountryISO = CountryISO;
|
|
102
|
+
declare const index_d_DEFAULT_COUNTRY: typeof DEFAULT_COUNTRY;
|
|
103
|
+
declare const index_d_listCountries: typeof listCountries;
|
|
104
|
+
declare const index_d_isCountryISO: typeof isCountryISO;
|
|
105
|
+
declare const index_d_toCountryISO: typeof toCountryISO;
|
|
106
|
+
declare const index_d_getCountryCode: typeof getCountryCode;
|
|
107
|
+
declare const index_d_formatCountry: typeof formatCountry;
|
|
108
|
+
declare const index_d_useFormattedPhoneNumber: typeof useFormattedPhoneNumber;
|
|
109
|
+
type index_d_PhoneFieldProps = PhoneFieldProps;
|
|
110
|
+
declare const index_d_PhoneField: typeof PhoneField;
|
|
111
|
+
type index_d_SuspendedPhoneFieldProps = SuspendedPhoneFieldProps;
|
|
112
|
+
declare const index_d_SuspendedPhoneField: typeof SuspendedPhoneField;
|
|
113
|
+
type index_d_PhoneLinkProps = PhoneLinkProps;
|
|
114
|
+
declare const index_d_PhoneLink: typeof PhoneLink;
|
|
115
|
+
type index_d_SuspendedPhoneLinkProps = SuspendedPhoneLinkProps;
|
|
116
|
+
declare const index_d_SuspendedPhoneLink: typeof SuspendedPhoneLink;
|
|
117
|
+
type index_d_PhoneNumberPossibility = PhoneNumberPossibility;
|
|
118
|
+
type index_d_PhoneNumberInfo = PhoneNumberInfo;
|
|
119
|
+
type index_d_PhoneNumberFormat = PhoneNumberFormat;
|
|
120
|
+
type index_d_PhoneValidationRules = PhoneValidationRules;
|
|
121
|
+
type index_d_PhoneFormatOptions = PhoneFormatOptions;
|
|
122
|
+
type index_d_PhoneService = PhoneService;
|
|
123
|
+
declare const index_d_PhoneService: typeof PhoneService;
|
|
124
|
+
declare const index_d_usePhoneService: typeof usePhoneService;
|
|
125
|
+
type index_d_PhoneTextProps = PhoneTextProps;
|
|
126
|
+
declare const index_d_PhoneText: typeof PhoneText;
|
|
127
|
+
type index_d_SuspendedPhoneTextProps = SuspendedPhoneTextProps;
|
|
128
|
+
declare const index_d_SuspendedPhoneText: typeof SuspendedPhoneText;
|
|
129
|
+
declare namespace index_d {
|
|
130
|
+
export {
|
|
131
|
+
index_d_CountryISO as CountryISO,
|
|
132
|
+
index_d_DEFAULT_COUNTRY as DEFAULT_COUNTRY,
|
|
133
|
+
index_d_listCountries as listCountries,
|
|
134
|
+
index_d_isCountryISO as isCountryISO,
|
|
135
|
+
index_d_toCountryISO as toCountryISO,
|
|
136
|
+
index_d_getCountryCode as getCountryCode,
|
|
137
|
+
index_d_formatCountry as formatCountry,
|
|
138
|
+
index_d_useFormattedPhoneNumber as useFormattedPhoneNumber,
|
|
139
|
+
index_d_PhoneFieldProps as PhoneFieldProps,
|
|
140
|
+
index_d_PhoneField as PhoneField,
|
|
141
|
+
index_d_SuspendedPhoneFieldProps as SuspendedPhoneFieldProps,
|
|
142
|
+
index_d_SuspendedPhoneField as SuspendedPhoneField,
|
|
143
|
+
index_d_PhoneLinkProps as PhoneLinkProps,
|
|
144
|
+
index_d_PhoneLink as PhoneLink,
|
|
145
|
+
index_d_SuspendedPhoneLinkProps as SuspendedPhoneLinkProps,
|
|
146
|
+
index_d_SuspendedPhoneLink as SuspendedPhoneLink,
|
|
147
|
+
index_d_PhoneNumberPossibility as PhoneNumberPossibility,
|
|
148
|
+
index_d_PhoneNumberInfo as PhoneNumberInfo,
|
|
149
|
+
index_d_PhoneNumberFormat as PhoneNumberFormat,
|
|
150
|
+
index_d_PhoneValidationRules as PhoneValidationRules,
|
|
151
|
+
index_d_PhoneFormatOptions as PhoneFormatOptions,
|
|
152
|
+
index_d_PhoneService as PhoneService,
|
|
153
|
+
index_d_usePhoneService as usePhoneService,
|
|
154
|
+
index_d_PhoneTextProps as PhoneTextProps,
|
|
155
|
+
index_d_PhoneText as PhoneText,
|
|
156
|
+
index_d_SuspendedPhoneTextProps as SuspendedPhoneTextProps,
|
|
157
|
+
index_d_SuspendedPhoneText as SuspendedPhoneText,
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
declare const COUNTRY_CODE_METADATA$1: readonly [readonly ["US", 1, "United States"], readonly ["CA", 1, "Canada"], readonly ["AU", 61, "Australia"], readonly ["NZ", 64, "New Zealand"], readonly ["AC", 247, "Ascension Island"], readonly ["AD", 376, "Andorra"], readonly ["AE", 971, "United Arab Emirates"], readonly ["AF", 93, "Afghanistan"], readonly ["AG", 1, "Antigua and Barbuda"], readonly ["AI", 1, "Anguilla"], readonly ["AL", 355, "Albania"], readonly ["AM", 374, "Armenia"], readonly ["AO", 244, "Angola"], readonly ["AR", 54, "Argentina"], readonly ["AS", 1, "American Samoa"], readonly ["AT", 43, "Austria"], readonly ["AW", 297, "Aruba"], readonly ["AX", 358, "Åland Islands"], readonly ["AZ", 994, "Azerbaijan"], readonly ["BA", 387, "Bosnia and Herzegovina"], readonly ["BB", 1, "Barbados"], readonly ["BD", 880, "Bangladesh"], readonly ["BE", 32, "Belgium"], readonly ["BF", 226, "Burkina Faso"], readonly ["BG", 359, "Bulgaria"], readonly ["BH", 973, "Bahrain"], readonly ["BI", 257, "Burundi"], readonly ["BJ", 229, "Benin"], readonly ["BL", 590, "Saint Barthélemy"], readonly ["BM", 1, "Bermuda"], readonly ["BN", 673, "Brunei"], readonly ["BO", 591, "Bolivia"], readonly ["BQ", 599, "Caribbean Netherlands"], readonly ["BR", 55, "Brazil"], readonly ["BS", 1, "Bahamas"], readonly ["BT", 975, "Bhutan"], readonly ["BW", 267, "Botswana"], readonly ["BY", 375, "Belarus"], readonly ["BZ", 501, "Belize"], readonly ["CC", 61, "Cocos"], readonly ["CD", 243, "Congo"], readonly ["CF", 236, "Central African Republic"], readonly ["CG", 242, "Congo"], readonly ["CH", 41, "Switzerland"], readonly ["CI", 225, "Côte d’Ivoire"], readonly ["CK", 682, "Cook Islands"], readonly ["CL", 56, "Chile"], readonly ["CM", 237, "Cameroon"], readonly ["CN", 86, "China"], readonly ["CO", 57, "Colombia"], readonly ["CR", 506, "Costa Rica"], readonly ["CU", 53, "Cuba"], readonly ["CV", 238, "Cape Verde"], readonly ["CW", 599, "Curaçao"], readonly ["CX", 61, "Christmas Island"], readonly ["CY", 357, "Cyprus"], readonly ["CZ", 420, "Czech Republic"], readonly ["DE", 49, "Germany"], readonly ["DJ", 253, "Djibouti"], readonly ["DK", 45, "Denmark"], readonly ["DM", 1, "Dominica"], readonly ["DO", 1, "Dominican Republic"], readonly ["DZ", 213, "Algeria"], readonly ["EC", 593, "Ecuador"], readonly ["EE", 372, "Estonia"], readonly ["EG", 20, "Egypt"], readonly ["EH", 212, "Western Sahara"], readonly ["ER", 291, "Eritrea"], readonly ["ES", 34, "Spain"], readonly ["ET", 251, "Ethiopia"], readonly ["FI", 358, "Finland"], readonly ["FJ", 679, "Fiji"], readonly ["FK", 500, "Falkland Islands"], readonly ["FM", 691, "Micronesia"], readonly ["FO", 298, "Faroe Islands"], readonly ["FR", 33, "France"], readonly ["GA", 241, "Gabon"], readonly ["GB", 44, "United Kingdom"], readonly ["GD", 1, "Grenada"], readonly ["GE", 995, "Georgia"], readonly ["GF", 594, "French Guiana"], readonly ["GG", 44, "Guernsey"], readonly ["GH", 233, "Ghana"], readonly ["GI", 350, "Gibraltar"], readonly ["GL", 299, "Greenland"], readonly ["GM", 220, "Gambia"], readonly ["GN", 224, "Guinea"], readonly ["GP", 590, "Guadeloupe"], readonly ["GQ", 240, "Equatorial Guinea"], readonly ["GR", 30, "Greece"], readonly ["GT", 502, "Guatemala"], readonly ["GU", 1, "Guam"], readonly ["GW", 245, "Guinea-Bissau"], readonly ["GY", 592, "Guyana"], readonly ["HK", 852, "Hong Kong"], readonly ["HN", 504, "Honduras"], readonly ["HR", 385, "Croatia"], readonly ["HT", 509, "Haiti"], readonly ["HU", 36, "Hungary"], readonly ["ID", 62, "Indonesia"], readonly ["IE", 353, "Ireland"], readonly ["IL", 972, "Israel"], readonly ["IM", 44, "Isle of Man"], readonly ["IN", 91, "India"], readonly ["IO", 246, "British Indian Ocean Territory"], readonly ["IQ", 964, "Iraq"], readonly ["IR", 98, "Iran"], readonly ["IS", 354, "Iceland"], readonly ["IT", 39, "Italy"], readonly ["JE", 44, "Jersey"], readonly ["JM", 1, "Jamaica"], readonly ["JO", 962, "Jordan"], readonly ["JP", 81, "Japan"], readonly ["KE", 254, "Kenya"], readonly ["KG", 996, "Kyrgyzstan"], readonly ["KH", 855, "Cambodia"], readonly ["KI", 686, "Kiribati"], readonly ["KM", 269, "Comoros"], readonly ["KN", 1, "Saint Kitts and Nevis"], readonly ["KP", 850, "North Korea"], readonly ["KR", 82, "South Korea"], readonly ["KW", 965, "Kuwait"], readonly ["KY", 1, "Cayman Islands"], readonly ["KZ", 7, "Kazakhstan"], readonly ["LA", 856, "Laos"], readonly ["LB", 961, "Lebanon"], readonly ["LC", 1, "Saint Lucia"], readonly ["LI", 423, "Liechtenstein"], readonly ["LK", 94, "Sri Lanka"], readonly ["LR", 231, "Liberia"], readonly ["LS", 266, "Lesotho"], readonly ["LT", 370, "Lithuania"], readonly ["LU", 352, "Luxembourg"], readonly ["LV", 371, "Latvia"], readonly ["LY", 218, "Libya"], readonly ["MA", 212, "Morocco"], readonly ["MC", 377, "Monaco"], readonly ["MD", 373, "Moldova"], readonly ["ME", 382, "Montenegro"], readonly ["MF", 590, "Saint Martin"], readonly ["MG", 261, "Madagascar"], readonly ["MH", 692, "Marshall Islands"], readonly ["MK", 389, "Macedonia"], readonly ["ML", 223, "Mali"], readonly ["MM", 95, "Myanmar"], readonly ["MN", 976, "Mongolia"], readonly ["MO", 853, "Macau"], readonly ["MP", 1, "Northern Mariana Islands"], readonly ["MQ", 596, "Martinique"], readonly ["MR", 222, "Mauritania"], readonly ["MS", 1, "Montserrat"], readonly ["MT", 356, "Malta"], readonly ["MU", 230, "Mauritius"], readonly ["MV", 960, "Maldives"], readonly ["MW", 265, "Malawi"], readonly ["MX", 52, "Mexico"], readonly ["MY", 60, "Malaysia"], readonly ["MZ", 258, "Mozambique"], readonly ["NA", 264, "Namibia"], readonly ["NC", 687, "New Caledonia"], readonly ["NE", 227, "Niger"], readonly ["NF", 672, "Norfolk Island"], readonly ["NG", 234, "Nigeria"], readonly ["NI", 505, "Nicaragua"], readonly ["NL", 31, "Netherlands"], readonly ["NO", 47, "Norway"], readonly ["NP", 977, "Nepal"], readonly ["NR", 674, "Nauru"], readonly ["NU", 683, "Niue"], readonly ["OM", 968, "Oman"], readonly ["PA", 507, "Panama"], readonly ["PE", 51, "Peru"], readonly ["PF", 689, "French Polynesia"], readonly ["PG", 675, "Papua New Guinea"], readonly ["PH", 63, "Philippines"], readonly ["PK", 92, "Pakistan"], readonly ["PL", 48, "Poland"], readonly ["PM", 508, "Saint Pierre and Miquelon"], readonly ["PR", 1, "Puerto Rico"], readonly ["PS", 970, "Palestine"], readonly ["PT", 351, "Portugal"], readonly ["PW", 680, "Palau"], readonly ["PY", 595, "Paraguay"], readonly ["QA", 974, "Qatar"], readonly ["RE", 262, "Réunion"], readonly ["RO", 40, "Romania"], readonly ["RS", 381, "Serbia"], readonly ["RU", 7, "Russia"], readonly ["RW", 250, "Rwanda"], readonly ["SA", 966, "Saudi Arabia"], readonly ["SB", 677, "Solomon Islands"], readonly ["SC", 248, "Seychelles"], readonly ["SD", 249, "Sudan"], readonly ["SE", 46, "Sweden"], readonly ["SG", 65, "Singapore"], readonly ["SH", 290, "Saint Helena"], readonly ["SI", 386, "Slovenia"], readonly ["SJ", 47, "Svalbard and Jan Mayen"], readonly ["SK", 421, "Slovakia"], readonly ["SL", 232, "Sierra Leone"], readonly ["SM", 378, "San Marino"], readonly ["SN", 221, "Senegal"], readonly ["SO", 252, "Somalia"], readonly ["SR", 597, "Suriname"], readonly ["SS", 211, "South Sudan"], readonly ["ST", 239, "São Tomé and Príncipe"], readonly ["SV", 503, "El Salvador"], readonly ["SX", 1, "Sint Maarten"], readonly ["SY", 963, "Syria"], readonly ["SZ", 268, "Swaziland"], readonly ["TA", 290, "Tristan da Cunha"], readonly ["TC", 1, "Turks and Caicos Islands"], readonly ["TD", 235, "Chad"], readonly ["TG", 228, "Togo"], readonly ["TH", 66, "Thailand"], readonly ["TJ", 992, "Tajikistan"], readonly ["TK", 690, "Tokelau"], readonly ["TL", 670, "Timor-Leste"], readonly ["TM", 993, "Turkmenistan"], readonly ["TN", 216, "Tunisia"], readonly ["TO", 676, "Tonga"], readonly ["TR", 90, "Turkey"], readonly ["TT", 1, "Trinidad and Tobago"], readonly ["TV", 688, "Tuvalu"], readonly ["TW", 886, "Taiwan"], readonly ["TZ", 255, "Tanzania"], readonly ["UA", 380, "Ukraine"], readonly ["UG", 256, "Uganda"], readonly ["UY", 598, "Uruguay"], readonly ["UZ", 998, "Uzbekistan"], readonly ["VA", 39, "Vatican City"], readonly ["VC", 1, "Saint Vincent and the Grenadines"], readonly ["VE", 58, "Venezuela"], readonly ["VG", 1, "British Virgin Islands"], readonly ["VI", 1, "U.S. Virgin Islands"], readonly ["VN", 84, "Vietnam"], readonly ["VU", 678, "Vanuatu"], readonly ["WF", 681, "Wallis and Futuna"], readonly ["WS", 685, "Samoa"], readonly ["XK", 383, "Kosovo"], readonly ["YE", 967, "Yemen"], readonly ["YT", 262, "Mayotte"], readonly ["ZA", 27, "South Africa"], readonly ["ZM", 260, "Zambia"], readonly ["ZW", 263, "Zimbabwe"]];
|
|
162
|
+
declare type CountryISO$1 = typeof COUNTRY_CODE_METADATA$1[number][0];
|
|
163
|
+
declare const DEFAULT_COUNTRY$1: CountryISO$1;
|
|
164
|
+
declare function listCountries$1(): readonly CountryISO$1[];
|
|
165
|
+
declare function isCountryISO$1(value: unknown): value is CountryISO$1;
|
|
166
|
+
declare function toCountryISO$1(value: unknown): CountryISO$1;
|
|
167
|
+
declare function getCountryCode$1(country: CountryISO$1): number;
|
|
168
|
+
declare function formatCountry$1(country: CountryISO$1): string;
|
|
169
|
+
|
|
170
|
+
declare type APNType$1 = AwesomePhoneNumber;
|
|
171
|
+
declare type APNStatic$1 = typeof AwesomePhoneNumber;
|
|
172
|
+
|
|
173
|
+
declare type PhoneNumberPossibility$1 = 'is-possible' | 'invalid-country-code' | 'invalid-number' | 'too-long' | 'too-short' | 'unknown';
|
|
174
|
+
interface PhoneNumberJSON$1 {
|
|
175
|
+
valid: boolean;
|
|
176
|
+
possible: boolean;
|
|
177
|
+
possibility: PhoneNumberPossibility$1;
|
|
178
|
+
regionCode: CountryISO$1;
|
|
179
|
+
number: {
|
|
180
|
+
input: string;
|
|
181
|
+
national?: string;
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
interface PhoneNumberInfo$1 {
|
|
185
|
+
country: CountryISO$1;
|
|
186
|
+
nationalNumber: string;
|
|
187
|
+
}
|
|
188
|
+
declare type PhoneNumberFormat$1 = 'e164' | 'international' | 'national' | 'rfc3966';
|
|
189
|
+
interface PhoneValidationRules$1 {
|
|
190
|
+
required?: boolean;
|
|
191
|
+
requiredMessage?: string;
|
|
192
|
+
tooShortMessage?: string;
|
|
193
|
+
tooLongMessage?: string;
|
|
194
|
+
invalidMessage?: string;
|
|
195
|
+
}
|
|
196
|
+
interface PhoneFormatOptions$1 {
|
|
197
|
+
fallback?: string;
|
|
198
|
+
country?: CountryISO$1;
|
|
199
|
+
format?: PhoneNumberFormat$1;
|
|
200
|
+
}
|
|
201
|
+
declare class PhoneService$1 {
|
|
202
|
+
static load(): Promise<PhoneService$1>;
|
|
203
|
+
static checkPossibility(input: unknown): Promise<PhoneNumberPossibility$1>;
|
|
204
|
+
static validate(input: unknown, rules?: PhoneValidationRules$1): Promise<string | undefined>;
|
|
205
|
+
readonly APN: typeof AwesomePhonenumber.PhoneNumber;
|
|
206
|
+
constructor(APN: APNStatic$1);
|
|
207
|
+
createAPN(phone: string, country?: CountryISO$1): APNType$1;
|
|
208
|
+
getJSON(phone: string, country?: CountryISO$1): PhoneNumberJSON$1;
|
|
209
|
+
checkPossibility(input: unknown): PhoneNumberPossibility$1;
|
|
210
|
+
validate(input: unknown, { required, requiredMessage, invalidMessage, tooLongMessage, tooShortMessage, }?: PhoneValidationRules$1): string | undefined;
|
|
211
|
+
getInfo(phone: string): PhoneNumberInfo$1;
|
|
212
|
+
format(input: unknown, { country, format, fallback }?: PhoneFormatOptions$1): string;
|
|
213
|
+
}
|
|
214
|
+
declare function usePhoneService$1(): PhoneService$1;
|
|
215
|
+
|
|
216
|
+
declare function useFormattedPhoneNumber$1(input: unknown, { format, country, fallback }?: PhoneFormatOptions$1): string;
|
|
217
|
+
|
|
218
|
+
interface PhoneFieldProps$1 extends Pick<BaseTextFieldProps$1, 'disabled' | 'error' | 'fullWidth' | 'helperText' | 'id' | 'label' | 'name' | 'placeholder' | 'required'> {
|
|
219
|
+
value?: null | string;
|
|
220
|
+
onBlur?: (value: string) => void;
|
|
221
|
+
onFocus?: (value: string) => void;
|
|
222
|
+
onChange?: (value: string) => void;
|
|
223
|
+
}
|
|
224
|
+
declare const PhoneField$1: ForwardRefExoticComponent<PhoneFieldProps$1 & RefAttributes<HTMLDivElement>>;
|
|
225
|
+
interface SuspendedPhoneFieldProps$1 extends PhoneFieldProps$1 {
|
|
226
|
+
suspenseFallback?: ReactNode;
|
|
227
|
+
}
|
|
228
|
+
declare const SuspendedPhoneField$1: ForwardRefExoticComponent<SuspendedPhoneFieldProps$1 & RefAttributes<HTMLDivElement>>;
|
|
229
|
+
|
|
230
|
+
interface PhoneLinkProps$1 extends RefAttributes<HTMLAnchorElement>, Omit<LinkProps$1, 'ref' | 'href' | 'children'> {
|
|
231
|
+
phone: unknown;
|
|
232
|
+
country?: CountryISO$1;
|
|
233
|
+
format?: PhoneNumberFormat$1;
|
|
234
|
+
fallback?: ReactNode;
|
|
235
|
+
}
|
|
236
|
+
declare const PhoneLink$1: ForwardRefExoticComponent<PhoneLinkProps$1>;
|
|
237
|
+
interface SuspendedPhoneLinkProps$1 extends PhoneLinkProps$1 {
|
|
238
|
+
suspenseFallback?: ReactNode;
|
|
239
|
+
}
|
|
240
|
+
declare const SuspendedPhoneLink$1: ForwardRefExoticComponent<SuspendedPhoneLinkProps$1>;
|
|
241
|
+
|
|
242
|
+
interface PhoneTextProps$1 {
|
|
243
|
+
phone: unknown;
|
|
244
|
+
fallback?: ReactNode;
|
|
245
|
+
country?: CountryISO$1;
|
|
246
|
+
format?: PhoneNumberFormat$1;
|
|
247
|
+
}
|
|
248
|
+
declare function PhoneText$1({ phone, country, fallback, format, }: PhoneTextProps$1): null | ReactElement;
|
|
249
|
+
interface SuspendedPhoneTextProps$1 extends PhoneTextProps$1 {
|
|
250
|
+
suspenseFallback?: ReactNode;
|
|
251
|
+
}
|
|
252
|
+
declare function SuspendedPhoneText$1({ suspenseFallback, ...props }: SuspendedPhoneTextProps$1): ReactElement;
|
|
253
|
+
|
|
254
|
+
export { CountryISO$1 as CountryISO, DEFAULT_COUNTRY$1 as DEFAULT_COUNTRY, PhoneField$1 as PhoneField, PhoneFieldProps$1 as PhoneFieldProps, PhoneFormatOptions$1 as PhoneFormatOptions, PhoneLink$1 as PhoneLink, PhoneLinkProps$1 as PhoneLinkProps, PhoneNumberFormat$1 as PhoneNumberFormat, PhoneNumberInfo$1 as PhoneNumberInfo, PhoneNumberPossibility$1 as PhoneNumberPossibility, PhoneService$1 as PhoneService, PhoneText$1 as PhoneText, PhoneTextProps$1 as PhoneTextProps, PhoneValidationRules$1 as PhoneValidationRules, SuspendedPhoneField$1 as SuspendedPhoneField, SuspendedPhoneFieldProps$1 as SuspendedPhoneFieldProps, SuspendedPhoneLink$1 as SuspendedPhoneLink, SuspendedPhoneLinkProps$1 as SuspendedPhoneLinkProps, SuspendedPhoneText$1 as SuspendedPhoneText, SuspendedPhoneTextProps$1 as SuspendedPhoneTextProps, formatCountry$1 as formatCountry, getCountryCode$1 as getCountryCode, isCountryISO$1 as isCountryISO, listCountries$1 as listCountries, toCountryISO$1 as toCountryISO, useFormattedPhoneNumber$1 as useFormattedPhoneNumber, usePhoneService$1 as usePhoneService, index_d as v5 };
|