@helpdice/ui 2.5.1 → 2.5.3
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/auto-complete/index.js +999 -1249
- package/dist/index.d.ts +0 -1
- package/dist/index.js +999 -1249
- package/dist/input/index.d.ts +2 -2
- package/dist/input/index.js +999 -1249
- package/dist/input/{currency-input/components/CurrencyInput.d.ts → input-currency.d.ts} +1 -1
- package/{esm/input/phone-input/phone.d.ts → dist/input/input-phone.d.ts} +1 -1
- package/dist/input/{currency-input/components/utils → utils}/cleanValue.d.ts +1 -1
- package/dist/input/{currency-input/components/utils → utils}/formatValue.d.ts +1 -1
- package/dist/input/{currency-input/components/utils → utils}/getLocaleConfig.d.ts +1 -1
- package/dist/table/index.js +999 -1249
- package/esm/index.d.ts +0 -1
- package/esm/index.js +1 -1
- package/esm/input/index.d.ts +2 -2
- package/esm/input/index.js +2 -2
- package/esm/input/{currency-input/components/CurrencyInput.d.ts → input-currency.d.ts} +1 -1
- package/esm/input/{currency-input/components/CurrencyInput.js → input-currency.js} +2 -2
- package/{dist/input/phone-input/phone.d.ts → esm/input/input-phone.d.ts} +1 -1
- package/esm/input/input-phone.js +1166 -0
- package/esm/input/{currency-input/components/utils → utils}/cleanValue.d.ts +1 -1
- package/esm/input/{currency-input/components/utils → utils}/formatValue.d.ts +1 -1
- package/esm/input/{currency-input/components/utils → utils}/getLocaleConfig.d.ts +1 -1
- package/package.json +1 -1
- package/dist/input/currency-input/index.d.ts +0 -5
- package/dist/input/phone-input/index.d.ts +0 -2
- package/esm/input/currency-input/index.d.ts +0 -5
- package/esm/input/currency-input/index.js +0 -4
- package/esm/input/phone-input/index.d.ts +0 -2
- package/esm/input/phone-input/index.js +0 -2
- package/esm/input/phone-input/phone.js +0 -167
- /package/dist/input/{currency-input/components/CurrencyInputProps.d.ts → input-currency-props.d.ts} +0 -0
- /package/dist/input/{currency-input/components/utils → utils}/escapeRegExp.d.ts +0 -0
- /package/dist/input/{currency-input/components/utils → utils}/fixedDecimalValue.d.ts +0 -0
- /package/dist/input/{currency-input/components/utils → utils}/getSuffix.d.ts +0 -0
- /package/dist/input/{currency-input/components/utils → utils}/index.d.ts +0 -0
- /package/dist/input/{currency-input/components/utils → utils}/isNumber.d.ts +0 -0
- /package/dist/input/{currency-input/components/utils → utils}/padTrimValue.d.ts +0 -0
- /package/dist/input/{currency-input/components/utils → utils}/parseAbbrValue.d.ts +0 -0
- /package/dist/input/{currency-input/components/utils → utils}/removeInvalidChars.d.ts +0 -0
- /package/dist/input/{currency-input/components/utils → utils}/removeSeparators.d.ts +0 -0
- /package/dist/input/{currency-input/components/utils → utils}/repositionCursor.d.ts +0 -0
- /package/esm/input/{currency-input/components/CurrencyInputProps.d.ts → input-currency-props.d.ts} +0 -0
- /package/esm/input/{currency-input/components/CurrencyInputProps.js → input-currency-props.js} +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/addSeparators.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/cleanValue.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/escapeRegExp.d.ts +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/escapeRegExp.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/fixedDecimalValue.d.ts +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/fixedDecimalValue.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/formatValue.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/getLocaleConfig.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/getSuffix.d.ts +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/getSuffix.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/index.d.ts +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/index.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/isNumber.d.ts +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/isNumber.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/padTrimValue.d.ts +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/padTrimValue.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/parseAbbrValue.d.ts +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/parseAbbrValue.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/removeInvalidChars.d.ts +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/removeInvalidChars.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/removeSeparators.d.ts +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/removeSeparators.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/repositionCursor.d.ts +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/repositionCursor.js +0 -0
|
@@ -0,0 +1,1166 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import _JSXStyle from "../styled-jsx.es.js";
|
|
3
|
+
import React, { useState, useRef, useEffect, useMemo } from 'react';
|
|
4
|
+
// import countries from './countries.json';
|
|
5
|
+
import { useTheme } from '@helpdice/theme';
|
|
6
|
+
import { getColors } from './styles';
|
|
7
|
+
import useScale, { withScale } from '../use-scale';
|
|
8
|
+
import InputBlockLabel from './input-block-label';
|
|
9
|
+
var countries = [{
|
|
10
|
+
"code": "AD",
|
|
11
|
+
"label": "Andorra",
|
|
12
|
+
"phone": "+376"
|
|
13
|
+
}, {
|
|
14
|
+
"code": "AE",
|
|
15
|
+
"label": "United Arab Emirates",
|
|
16
|
+
"phone": "+971"
|
|
17
|
+
}, {
|
|
18
|
+
"code": "AF",
|
|
19
|
+
"label": "Afghanistan",
|
|
20
|
+
"phone": "+93"
|
|
21
|
+
}, {
|
|
22
|
+
"code": "AG",
|
|
23
|
+
"label": "Antigua and Barbuda",
|
|
24
|
+
"phone": "+1-268"
|
|
25
|
+
}, {
|
|
26
|
+
"code": "AI",
|
|
27
|
+
"label": "Anguilla",
|
|
28
|
+
"phone": "+1-264"
|
|
29
|
+
}, {
|
|
30
|
+
"code": "AL",
|
|
31
|
+
"label": "Albania",
|
|
32
|
+
"phone": "+355"
|
|
33
|
+
}, {
|
|
34
|
+
"code": "AM",
|
|
35
|
+
"label": "Armenia",
|
|
36
|
+
"phone": "+374"
|
|
37
|
+
}, {
|
|
38
|
+
"code": "AO",
|
|
39
|
+
"label": "Angola",
|
|
40
|
+
"phone": "+244"
|
|
41
|
+
}, {
|
|
42
|
+
"code": "AQ",
|
|
43
|
+
"label": "Antarctica",
|
|
44
|
+
"phone": "+672"
|
|
45
|
+
}, {
|
|
46
|
+
"code": "AR",
|
|
47
|
+
"label": "Argentina",
|
|
48
|
+
"phone": "+54"
|
|
49
|
+
}, {
|
|
50
|
+
"code": "AS",
|
|
51
|
+
"label": "American Samoa",
|
|
52
|
+
"phone": "+1-684"
|
|
53
|
+
}, {
|
|
54
|
+
"code": "AT",
|
|
55
|
+
"label": "Austria",
|
|
56
|
+
"phone": "+43"
|
|
57
|
+
}, {
|
|
58
|
+
"code": "AU",
|
|
59
|
+
"label": "Australia",
|
|
60
|
+
"phone": "+61",
|
|
61
|
+
"suggested": true
|
|
62
|
+
}, {
|
|
63
|
+
"code": "AW",
|
|
64
|
+
"label": "Aruba",
|
|
65
|
+
"phone": "+297"
|
|
66
|
+
}, {
|
|
67
|
+
"code": "AX",
|
|
68
|
+
"label": "Alland Islands",
|
|
69
|
+
"phone": "+358"
|
|
70
|
+
}, {
|
|
71
|
+
"code": "AZ",
|
|
72
|
+
"label": "Azerbaijan",
|
|
73
|
+
"phone": "+994"
|
|
74
|
+
}, {
|
|
75
|
+
"code": "BA",
|
|
76
|
+
"label": "Bosnia and Herzegovina",
|
|
77
|
+
"phone": "+387"
|
|
78
|
+
}, {
|
|
79
|
+
"code": "BB",
|
|
80
|
+
"label": "Barbados",
|
|
81
|
+
"phone": "+1-246"
|
|
82
|
+
}, {
|
|
83
|
+
"code": "BD",
|
|
84
|
+
"label": "Bangladesh",
|
|
85
|
+
"phone": "+880"
|
|
86
|
+
}, {
|
|
87
|
+
"code": "BE",
|
|
88
|
+
"label": "Belgium",
|
|
89
|
+
"phone": "+32"
|
|
90
|
+
}, {
|
|
91
|
+
"code": "BF",
|
|
92
|
+
"label": "Burkina Faso",
|
|
93
|
+
"phone": "+226"
|
|
94
|
+
}, {
|
|
95
|
+
"code": "BG",
|
|
96
|
+
"label": "Bulgaria",
|
|
97
|
+
"phone": "+359"
|
|
98
|
+
}, {
|
|
99
|
+
"code": "BH",
|
|
100
|
+
"label": "Bahrain",
|
|
101
|
+
"phone": "+973"
|
|
102
|
+
}, {
|
|
103
|
+
"code": "BI",
|
|
104
|
+
"label": "Burundi",
|
|
105
|
+
"phone": "+257"
|
|
106
|
+
}, {
|
|
107
|
+
"code": "BJ",
|
|
108
|
+
"label": "Benin",
|
|
109
|
+
"phone": "+229"
|
|
110
|
+
}, {
|
|
111
|
+
"code": "BL",
|
|
112
|
+
"label": "Saint Barthelemy",
|
|
113
|
+
"phone": "+590"
|
|
114
|
+
}, {
|
|
115
|
+
"code": "BM",
|
|
116
|
+
"label": "Bermuda",
|
|
117
|
+
"phone": "+1-441"
|
|
118
|
+
}, {
|
|
119
|
+
"code": "BN",
|
|
120
|
+
"label": "Brunei Darussalam",
|
|
121
|
+
"phone": "+673"
|
|
122
|
+
}, {
|
|
123
|
+
"code": "BO",
|
|
124
|
+
"label": "Bolivia",
|
|
125
|
+
"phone": "+591"
|
|
126
|
+
}, {
|
|
127
|
+
"code": "BR",
|
|
128
|
+
"label": "Brazil",
|
|
129
|
+
"phone": "+55"
|
|
130
|
+
}, {
|
|
131
|
+
"code": "BS",
|
|
132
|
+
"label": "Bahamas",
|
|
133
|
+
"phone": "+1-242"
|
|
134
|
+
}, {
|
|
135
|
+
"code": "BT",
|
|
136
|
+
"label": "Bhutan",
|
|
137
|
+
"phone": "+975"
|
|
138
|
+
}, {
|
|
139
|
+
"code": "BV",
|
|
140
|
+
"label": "Bouvet Island",
|
|
141
|
+
"phone": "+47"
|
|
142
|
+
}, {
|
|
143
|
+
"code": "BW",
|
|
144
|
+
"label": "Botswana",
|
|
145
|
+
"phone": "+267"
|
|
146
|
+
}, {
|
|
147
|
+
"code": "BY",
|
|
148
|
+
"label": "Belarus",
|
|
149
|
+
"phone": "+375"
|
|
150
|
+
}, {
|
|
151
|
+
"code": "BZ",
|
|
152
|
+
"label": "Belize",
|
|
153
|
+
"phone": "+501"
|
|
154
|
+
}, {
|
|
155
|
+
"code": "CA",
|
|
156
|
+
"label": "Canada",
|
|
157
|
+
"phone": "+1",
|
|
158
|
+
"suggested": true
|
|
159
|
+
}, {
|
|
160
|
+
"code": "CC",
|
|
161
|
+
"label": "Cocos (Keeling) Islands",
|
|
162
|
+
"phone": "+61"
|
|
163
|
+
}, {
|
|
164
|
+
"code": "CD",
|
|
165
|
+
"label": "Congo, Democratic Republic of the",
|
|
166
|
+
"phone": "+243"
|
|
167
|
+
}, {
|
|
168
|
+
"code": "CF",
|
|
169
|
+
"label": "Central African Republic",
|
|
170
|
+
"phone": "+236"
|
|
171
|
+
}, {
|
|
172
|
+
"code": "CG",
|
|
173
|
+
"label": "Congo, Republic of the",
|
|
174
|
+
"phone": "+242"
|
|
175
|
+
}, {
|
|
176
|
+
"code": "CH",
|
|
177
|
+
"label": "Switzerland",
|
|
178
|
+
"phone": "+41"
|
|
179
|
+
}, {
|
|
180
|
+
"code": "CI",
|
|
181
|
+
"label": "Cote d'Ivoire",
|
|
182
|
+
"phone": "+225"
|
|
183
|
+
}, {
|
|
184
|
+
"code": "CK",
|
|
185
|
+
"label": "Cook Islands",
|
|
186
|
+
"phone": "+682"
|
|
187
|
+
}, {
|
|
188
|
+
"code": "CL",
|
|
189
|
+
"label": "Chile",
|
|
190
|
+
"phone": "+56"
|
|
191
|
+
}, {
|
|
192
|
+
"code": "CM",
|
|
193
|
+
"label": "Cameroon",
|
|
194
|
+
"phone": "+237"
|
|
195
|
+
}, {
|
|
196
|
+
"code": "CN",
|
|
197
|
+
"label": "China",
|
|
198
|
+
"phone": "+86"
|
|
199
|
+
}, {
|
|
200
|
+
"code": "CO",
|
|
201
|
+
"label": "Colombia",
|
|
202
|
+
"phone": "+57"
|
|
203
|
+
}, {
|
|
204
|
+
"code": "CR",
|
|
205
|
+
"label": "Costa Rica",
|
|
206
|
+
"phone": "+506"
|
|
207
|
+
}, {
|
|
208
|
+
"code": "CU",
|
|
209
|
+
"label": "Cuba",
|
|
210
|
+
"phone": "+53"
|
|
211
|
+
}, {
|
|
212
|
+
"code": "CV",
|
|
213
|
+
"label": "Cape Verde",
|
|
214
|
+
"phone": "+238"
|
|
215
|
+
}, {
|
|
216
|
+
"code": "CW",
|
|
217
|
+
"label": "Curacao",
|
|
218
|
+
"phone": "+599"
|
|
219
|
+
}, {
|
|
220
|
+
"code": "CX",
|
|
221
|
+
"label": "Christmas Island",
|
|
222
|
+
"phone": "+61"
|
|
223
|
+
}, {
|
|
224
|
+
"code": "CY",
|
|
225
|
+
"label": "Cyprus",
|
|
226
|
+
"phone": "+357"
|
|
227
|
+
}, {
|
|
228
|
+
"code": "CZ",
|
|
229
|
+
"label": "Czech Republic",
|
|
230
|
+
"phone": "+420"
|
|
231
|
+
}, {
|
|
232
|
+
"code": "DE",
|
|
233
|
+
"label": "Germany",
|
|
234
|
+
"phone": "+49",
|
|
235
|
+
"suggested": true
|
|
236
|
+
}, {
|
|
237
|
+
"code": "DJ",
|
|
238
|
+
"label": "Djibouti",
|
|
239
|
+
"phone": "+253"
|
|
240
|
+
}, {
|
|
241
|
+
"code": "DK",
|
|
242
|
+
"label": "Denmark",
|
|
243
|
+
"phone": "+45"
|
|
244
|
+
}, {
|
|
245
|
+
"code": "DM",
|
|
246
|
+
"label": "Dominica",
|
|
247
|
+
"phone": "+1-767"
|
|
248
|
+
}, {
|
|
249
|
+
"code": "DO",
|
|
250
|
+
"label": "Dominican Republic",
|
|
251
|
+
"phone": "+1-809"
|
|
252
|
+
}, {
|
|
253
|
+
"code": "DZ",
|
|
254
|
+
"label": "Algeria",
|
|
255
|
+
"phone": "+213"
|
|
256
|
+
}, {
|
|
257
|
+
"code": "EC",
|
|
258
|
+
"label": "Ecuador",
|
|
259
|
+
"phone": "+593"
|
|
260
|
+
}, {
|
|
261
|
+
"code": "EE",
|
|
262
|
+
"label": "Estonia",
|
|
263
|
+
"phone": "+372"
|
|
264
|
+
}, {
|
|
265
|
+
"code": "EG",
|
|
266
|
+
"label": "Egypt",
|
|
267
|
+
"phone": "+20"
|
|
268
|
+
}, {
|
|
269
|
+
"code": "EH",
|
|
270
|
+
"label": "Western Sahara",
|
|
271
|
+
"phone": "+212"
|
|
272
|
+
}, {
|
|
273
|
+
"code": "ER",
|
|
274
|
+
"label": "Eritrea",
|
|
275
|
+
"phone": "+291"
|
|
276
|
+
}, {
|
|
277
|
+
"code": "ES",
|
|
278
|
+
"label": "Spain",
|
|
279
|
+
"phone": "+34"
|
|
280
|
+
}, {
|
|
281
|
+
"code": "ET",
|
|
282
|
+
"label": "Ethiopia",
|
|
283
|
+
"phone": "+251"
|
|
284
|
+
}, {
|
|
285
|
+
"code": "FI",
|
|
286
|
+
"label": "Finland",
|
|
287
|
+
"phone": "+358"
|
|
288
|
+
}, {
|
|
289
|
+
"code": "FJ",
|
|
290
|
+
"label": "Fiji",
|
|
291
|
+
"phone": "+679"
|
|
292
|
+
}, {
|
|
293
|
+
"code": "FK",
|
|
294
|
+
"label": "Falkland Islands (Malvinas)",
|
|
295
|
+
"phone": "+500"
|
|
296
|
+
}, {
|
|
297
|
+
"code": "FM",
|
|
298
|
+
"label": "Micronesia, Federated States of",
|
|
299
|
+
"phone": "+691"
|
|
300
|
+
}, {
|
|
301
|
+
"code": "FO",
|
|
302
|
+
"label": "Faroe Islands",
|
|
303
|
+
"phone": "+298"
|
|
304
|
+
}, {
|
|
305
|
+
"code": "FR",
|
|
306
|
+
"label": "France",
|
|
307
|
+
"phone": "+33",
|
|
308
|
+
"suggested": true
|
|
309
|
+
}, {
|
|
310
|
+
"code": "GA",
|
|
311
|
+
"label": "Gabon",
|
|
312
|
+
"phone": "+241"
|
|
313
|
+
}, {
|
|
314
|
+
"code": "GB",
|
|
315
|
+
"label": "United Kingdom",
|
|
316
|
+
"phone": "+44"
|
|
317
|
+
}, {
|
|
318
|
+
"code": "GD",
|
|
319
|
+
"label": "Grenada",
|
|
320
|
+
"phone": "+1-473"
|
|
321
|
+
}, {
|
|
322
|
+
"code": "GE",
|
|
323
|
+
"label": "Georgia",
|
|
324
|
+
"phone": "+995"
|
|
325
|
+
}, {
|
|
326
|
+
"code": "GF",
|
|
327
|
+
"label": "French Guiana",
|
|
328
|
+
"phone": "+594"
|
|
329
|
+
}, {
|
|
330
|
+
"code": "GG",
|
|
331
|
+
"label": "Guernsey",
|
|
332
|
+
"phone": "+44"
|
|
333
|
+
}, {
|
|
334
|
+
"code": "GH",
|
|
335
|
+
"label": "Ghana",
|
|
336
|
+
"phone": "+233"
|
|
337
|
+
}, {
|
|
338
|
+
"code": "GI",
|
|
339
|
+
"label": "Gibraltar",
|
|
340
|
+
"phone": "+350"
|
|
341
|
+
}, {
|
|
342
|
+
"code": "GL",
|
|
343
|
+
"label": "Greenland",
|
|
344
|
+
"phone": "+299"
|
|
345
|
+
}, {
|
|
346
|
+
"code": "GM",
|
|
347
|
+
"label": "Gambia",
|
|
348
|
+
"phone": "+220"
|
|
349
|
+
}, {
|
|
350
|
+
"code": "GN",
|
|
351
|
+
"label": "Guinea",
|
|
352
|
+
"phone": "+224"
|
|
353
|
+
}, {
|
|
354
|
+
"code": "GP",
|
|
355
|
+
"label": "Guadeloupe",
|
|
356
|
+
"phone": "+590"
|
|
357
|
+
}, {
|
|
358
|
+
"code": "GQ",
|
|
359
|
+
"label": "Equatorial Guinea",
|
|
360
|
+
"phone": "+240"
|
|
361
|
+
}, {
|
|
362
|
+
"code": "GR",
|
|
363
|
+
"label": "Greece",
|
|
364
|
+
"phone": "+30"
|
|
365
|
+
}, {
|
|
366
|
+
"code": "GS",
|
|
367
|
+
"label": "South Georgia and the South Sandwich Islands",
|
|
368
|
+
"phone": "+500"
|
|
369
|
+
}, {
|
|
370
|
+
"code": "GT",
|
|
371
|
+
"label": "Guatemala",
|
|
372
|
+
"phone": "+502"
|
|
373
|
+
}, {
|
|
374
|
+
"code": "GU",
|
|
375
|
+
"label": "Guam",
|
|
376
|
+
"phone": "+1-671"
|
|
377
|
+
}, {
|
|
378
|
+
"code": "GW",
|
|
379
|
+
"label": "Guinea-Bissau",
|
|
380
|
+
"phone": "+245"
|
|
381
|
+
}, {
|
|
382
|
+
"code": "GY",
|
|
383
|
+
"label": "Guyana",
|
|
384
|
+
"phone": "+592"
|
|
385
|
+
}, {
|
|
386
|
+
"code": "HK",
|
|
387
|
+
"label": "Hong Kong",
|
|
388
|
+
"phone": "+852"
|
|
389
|
+
}, {
|
|
390
|
+
"code": "HM",
|
|
391
|
+
"label": "Heard Island and McDonald Islands",
|
|
392
|
+
"phone": "+672"
|
|
393
|
+
}, {
|
|
394
|
+
"code": "HN",
|
|
395
|
+
"label": "Honduras",
|
|
396
|
+
"phone": "+504"
|
|
397
|
+
}, {
|
|
398
|
+
"code": "HR",
|
|
399
|
+
"label": "Croatia",
|
|
400
|
+
"phone": "+385"
|
|
401
|
+
}, {
|
|
402
|
+
"code": "HT",
|
|
403
|
+
"label": "Haiti",
|
|
404
|
+
"phone": "+509"
|
|
405
|
+
}, {
|
|
406
|
+
"code": "HU",
|
|
407
|
+
"label": "Hungary",
|
|
408
|
+
"phone": "+36"
|
|
409
|
+
}, {
|
|
410
|
+
"code": "ID",
|
|
411
|
+
"label": "Indonesia",
|
|
412
|
+
"phone": "+62"
|
|
413
|
+
}, {
|
|
414
|
+
"code": "IE",
|
|
415
|
+
"label": "Ireland",
|
|
416
|
+
"phone": "+353"
|
|
417
|
+
}, {
|
|
418
|
+
"code": "IL",
|
|
419
|
+
"label": "Israel",
|
|
420
|
+
"phone": "+972"
|
|
421
|
+
}, {
|
|
422
|
+
"code": "IM",
|
|
423
|
+
"label": "Isle of Man",
|
|
424
|
+
"phone": "+44"
|
|
425
|
+
}, {
|
|
426
|
+
"code": "IN",
|
|
427
|
+
"label": "India",
|
|
428
|
+
"phone": "+91"
|
|
429
|
+
}, {
|
|
430
|
+
"code": "IO",
|
|
431
|
+
"label": "British Indian Ocean Territory",
|
|
432
|
+
"phone": "+246"
|
|
433
|
+
}, {
|
|
434
|
+
"code": "IQ",
|
|
435
|
+
"label": "Iraq",
|
|
436
|
+
"phone": "+964"
|
|
437
|
+
}, {
|
|
438
|
+
"code": "IR",
|
|
439
|
+
"label": "Iran, Islamic Republic of",
|
|
440
|
+
"phone": "+98"
|
|
441
|
+
}, {
|
|
442
|
+
"code": "IS",
|
|
443
|
+
"label": "Iceland",
|
|
444
|
+
"phone": "+354"
|
|
445
|
+
}, {
|
|
446
|
+
"code": "IT",
|
|
447
|
+
"label": "Italy",
|
|
448
|
+
"phone": "+39"
|
|
449
|
+
}, {
|
|
450
|
+
"code": "JE",
|
|
451
|
+
"label": "Jersey",
|
|
452
|
+
"phone": "+44"
|
|
453
|
+
}, {
|
|
454
|
+
"code": "JM",
|
|
455
|
+
"label": "Jamaica",
|
|
456
|
+
"phone": "+1-876"
|
|
457
|
+
}, {
|
|
458
|
+
"code": "JO",
|
|
459
|
+
"label": "Jordan",
|
|
460
|
+
"phone": "+962"
|
|
461
|
+
}, {
|
|
462
|
+
"code": "JP",
|
|
463
|
+
"label": "Japan",
|
|
464
|
+
"phone": "+81",
|
|
465
|
+
"suggested": true
|
|
466
|
+
}, {
|
|
467
|
+
"code": "KE",
|
|
468
|
+
"label": "Kenya",
|
|
469
|
+
"phone": "+254"
|
|
470
|
+
}, {
|
|
471
|
+
"code": "KG",
|
|
472
|
+
"label": "Kyrgyzstan",
|
|
473
|
+
"phone": "+996"
|
|
474
|
+
}, {
|
|
475
|
+
"code": "KH",
|
|
476
|
+
"label": "Cambodia",
|
|
477
|
+
"phone": "+855"
|
|
478
|
+
}, {
|
|
479
|
+
"code": "KI",
|
|
480
|
+
"label": "Kiribati",
|
|
481
|
+
"phone": "+686"
|
|
482
|
+
}, {
|
|
483
|
+
"code": "KM",
|
|
484
|
+
"label": "Comoros",
|
|
485
|
+
"phone": "+269"
|
|
486
|
+
}, {
|
|
487
|
+
"code": "KN",
|
|
488
|
+
"label": "Saint Kitts and Nevis",
|
|
489
|
+
"phone": "+1-869"
|
|
490
|
+
}, {
|
|
491
|
+
"code": "KP",
|
|
492
|
+
"label": "Korea, Democratic People's Republic of",
|
|
493
|
+
"phone": "+850"
|
|
494
|
+
}, {
|
|
495
|
+
"code": "KR",
|
|
496
|
+
"label": "Korea, Republic of",
|
|
497
|
+
"phone": "+82"
|
|
498
|
+
}, {
|
|
499
|
+
"code": "KW",
|
|
500
|
+
"label": "Kuwait",
|
|
501
|
+
"phone": "+965"
|
|
502
|
+
}, {
|
|
503
|
+
"code": "KY",
|
|
504
|
+
"label": "Cayman Islands",
|
|
505
|
+
"phone": "+1-345"
|
|
506
|
+
}, {
|
|
507
|
+
"code": "KZ",
|
|
508
|
+
"label": "Kazakhstan",
|
|
509
|
+
"phone": "+7"
|
|
510
|
+
}, {
|
|
511
|
+
"code": "LA",
|
|
512
|
+
"label": "Lao People's Democratic Republic",
|
|
513
|
+
"phone": "+856"
|
|
514
|
+
}, {
|
|
515
|
+
"code": "LB",
|
|
516
|
+
"label": "Lebanon",
|
|
517
|
+
"phone": "+961"
|
|
518
|
+
}, {
|
|
519
|
+
"code": "LC",
|
|
520
|
+
"label": "Saint Lucia",
|
|
521
|
+
"phone": "+1-758"
|
|
522
|
+
}, {
|
|
523
|
+
"code": "LI",
|
|
524
|
+
"label": "Liechtenstein",
|
|
525
|
+
"phone": "+423"
|
|
526
|
+
}, {
|
|
527
|
+
"code": "LK",
|
|
528
|
+
"label": "Sri Lanka",
|
|
529
|
+
"phone": "+94"
|
|
530
|
+
}, {
|
|
531
|
+
"code": "LR",
|
|
532
|
+
"label": "Liberia",
|
|
533
|
+
"phone": "+231"
|
|
534
|
+
}, {
|
|
535
|
+
"code": "LS",
|
|
536
|
+
"label": "Lesotho",
|
|
537
|
+
"phone": "+266"
|
|
538
|
+
}, {
|
|
539
|
+
"code": "LT",
|
|
540
|
+
"label": "Lithuania",
|
|
541
|
+
"phone": "+370"
|
|
542
|
+
}, {
|
|
543
|
+
"code": "LU",
|
|
544
|
+
"label": "Luxembourg",
|
|
545
|
+
"phone": "+352"
|
|
546
|
+
}, {
|
|
547
|
+
"code": "LV",
|
|
548
|
+
"label": "Latvia",
|
|
549
|
+
"phone": "+371"
|
|
550
|
+
}, {
|
|
551
|
+
"code": "LY",
|
|
552
|
+
"label": "Libya",
|
|
553
|
+
"phone": "+218"
|
|
554
|
+
}, {
|
|
555
|
+
"code": "MA",
|
|
556
|
+
"label": "Morocco",
|
|
557
|
+
"phone": "+212"
|
|
558
|
+
}, {
|
|
559
|
+
"code": "MC",
|
|
560
|
+
"label": "Monaco",
|
|
561
|
+
"phone": "+377"
|
|
562
|
+
}, {
|
|
563
|
+
"code": "MD",
|
|
564
|
+
"label": "Moldova, Republic of",
|
|
565
|
+
"phone": "+373"
|
|
566
|
+
}, {
|
|
567
|
+
"code": "ME",
|
|
568
|
+
"label": "Montenegro",
|
|
569
|
+
"phone": "+382"
|
|
570
|
+
}, {
|
|
571
|
+
"code": "MF",
|
|
572
|
+
"label": "Saint Martin (French part)",
|
|
573
|
+
"phone": "+590"
|
|
574
|
+
}, {
|
|
575
|
+
"code": "MG",
|
|
576
|
+
"label": "Madagascar",
|
|
577
|
+
"phone": "+261"
|
|
578
|
+
}, {
|
|
579
|
+
"code": "MH",
|
|
580
|
+
"label": "Marshall Islands",
|
|
581
|
+
"phone": "+692"
|
|
582
|
+
}, {
|
|
583
|
+
"code": "MK",
|
|
584
|
+
"label": "Macedonia, the Former Yugoslav Republic of",
|
|
585
|
+
"phone": "+389"
|
|
586
|
+
}, {
|
|
587
|
+
"code": "ML",
|
|
588
|
+
"label": "Mali",
|
|
589
|
+
"phone": "+223"
|
|
590
|
+
}, {
|
|
591
|
+
"code": "MM",
|
|
592
|
+
"label": "Myanmar",
|
|
593
|
+
"phone": "+95"
|
|
594
|
+
}, {
|
|
595
|
+
"code": "MN",
|
|
596
|
+
"label": "Mongolia",
|
|
597
|
+
"phone": "+976"
|
|
598
|
+
}, {
|
|
599
|
+
"code": "MO",
|
|
600
|
+
"label": "Macao",
|
|
601
|
+
"phone": "+853"
|
|
602
|
+
}, {
|
|
603
|
+
"code": "MP",
|
|
604
|
+
"label": "Northern Mariana Islands",
|
|
605
|
+
"phone": "+1-670"
|
|
606
|
+
}, {
|
|
607
|
+
"code": "MQ",
|
|
608
|
+
"label": "Martinique",
|
|
609
|
+
"phone": "+596"
|
|
610
|
+
}, {
|
|
611
|
+
"code": "MR",
|
|
612
|
+
"label": "Mauritania",
|
|
613
|
+
"phone": "+222"
|
|
614
|
+
}, {
|
|
615
|
+
"code": "MS",
|
|
616
|
+
"label": "Montserrat",
|
|
617
|
+
"phone": "+1-664"
|
|
618
|
+
}, {
|
|
619
|
+
"code": "MT",
|
|
620
|
+
"label": "Malta",
|
|
621
|
+
"phone": "+356"
|
|
622
|
+
}, {
|
|
623
|
+
"code": "MU",
|
|
624
|
+
"label": "Mauritius",
|
|
625
|
+
"phone": "+230"
|
|
626
|
+
}, {
|
|
627
|
+
"code": "MV",
|
|
628
|
+
"label": "Maldives",
|
|
629
|
+
"phone": "+960"
|
|
630
|
+
}, {
|
|
631
|
+
"code": "MW",
|
|
632
|
+
"label": "Malawi",
|
|
633
|
+
"phone": "+265"
|
|
634
|
+
}, {
|
|
635
|
+
"code": "MX",
|
|
636
|
+
"label": "Mexico",
|
|
637
|
+
"phone": "+52"
|
|
638
|
+
}, {
|
|
639
|
+
"code": "MY",
|
|
640
|
+
"label": "Malaysia",
|
|
641
|
+
"phone": "+60"
|
|
642
|
+
}, {
|
|
643
|
+
"code": "MZ",
|
|
644
|
+
"label": "Mozambique",
|
|
645
|
+
"phone": "+258"
|
|
646
|
+
}, {
|
|
647
|
+
"code": "NA",
|
|
648
|
+
"label": "Namibia",
|
|
649
|
+
"phone": "+264"
|
|
650
|
+
}, {
|
|
651
|
+
"code": "NC",
|
|
652
|
+
"label": "New Caledonia",
|
|
653
|
+
"phone": "+687"
|
|
654
|
+
}, {
|
|
655
|
+
"code": "NE",
|
|
656
|
+
"label": "Niger",
|
|
657
|
+
"phone": "+227"
|
|
658
|
+
}, {
|
|
659
|
+
"code": "NF",
|
|
660
|
+
"label": "Norfolk Island",
|
|
661
|
+
"phone": "+672"
|
|
662
|
+
}, {
|
|
663
|
+
"code": "NG",
|
|
664
|
+
"label": "Nigeria",
|
|
665
|
+
"phone": "+234"
|
|
666
|
+
}, {
|
|
667
|
+
"code": "NI",
|
|
668
|
+
"label": "Nicaragua",
|
|
669
|
+
"phone": "+505"
|
|
670
|
+
}, {
|
|
671
|
+
"code": "NL",
|
|
672
|
+
"label": "Netherlands",
|
|
673
|
+
"phone": "+31"
|
|
674
|
+
}, {
|
|
675
|
+
"code": "NO",
|
|
676
|
+
"label": "Norway",
|
|
677
|
+
"phone": "+47"
|
|
678
|
+
}, {
|
|
679
|
+
"code": "NP",
|
|
680
|
+
"label": "Nepal",
|
|
681
|
+
"phone": "+977"
|
|
682
|
+
}, {
|
|
683
|
+
"code": "NR",
|
|
684
|
+
"label": "Nauru",
|
|
685
|
+
"phone": "+674"
|
|
686
|
+
}, {
|
|
687
|
+
"code": "NU",
|
|
688
|
+
"label": "Niue",
|
|
689
|
+
"phone": "+683"
|
|
690
|
+
}, {
|
|
691
|
+
"code": "NZ",
|
|
692
|
+
"label": "New Zealand",
|
|
693
|
+
"phone": "+64"
|
|
694
|
+
}, {
|
|
695
|
+
"code": "OM",
|
|
696
|
+
"label": "Oman",
|
|
697
|
+
"phone": "+968"
|
|
698
|
+
}, {
|
|
699
|
+
"code": "PA",
|
|
700
|
+
"label": "Panama",
|
|
701
|
+
"phone": "+507"
|
|
702
|
+
}, {
|
|
703
|
+
"code": "PE",
|
|
704
|
+
"label": "Peru",
|
|
705
|
+
"phone": "+51"
|
|
706
|
+
}, {
|
|
707
|
+
"code": "PF",
|
|
708
|
+
"label": "French Polynesia",
|
|
709
|
+
"phone": "+689"
|
|
710
|
+
}, {
|
|
711
|
+
"code": "PG",
|
|
712
|
+
"label": "Papua New Guinea",
|
|
713
|
+
"phone": "+675"
|
|
714
|
+
}, {
|
|
715
|
+
"code": "PH",
|
|
716
|
+
"label": "Philippines",
|
|
717
|
+
"phone": "+63"
|
|
718
|
+
}, {
|
|
719
|
+
"code": "PK",
|
|
720
|
+
"label": "Pakistan",
|
|
721
|
+
"phone": "+92"
|
|
722
|
+
}, {
|
|
723
|
+
"code": "PL",
|
|
724
|
+
"label": "Poland",
|
|
725
|
+
"phone": "+48"
|
|
726
|
+
}, {
|
|
727
|
+
"code": "PM",
|
|
728
|
+
"label": "Saint Pierre and Miquelon",
|
|
729
|
+
"phone": "+508"
|
|
730
|
+
}, {
|
|
731
|
+
"code": "PN",
|
|
732
|
+
"label": "Pitcairn",
|
|
733
|
+
"phone": "+870"
|
|
734
|
+
}, {
|
|
735
|
+
"code": "PR",
|
|
736
|
+
"label": "Puerto Rico",
|
|
737
|
+
"phone": "+1"
|
|
738
|
+
}, {
|
|
739
|
+
"code": "PS",
|
|
740
|
+
"label": "Palestine, State of",
|
|
741
|
+
"phone": "+970"
|
|
742
|
+
}, {
|
|
743
|
+
"code": "PT",
|
|
744
|
+
"label": "Portugal",
|
|
745
|
+
"phone": "+351"
|
|
746
|
+
}, {
|
|
747
|
+
"code": "PW",
|
|
748
|
+
"label": "Palau",
|
|
749
|
+
"phone": "+680"
|
|
750
|
+
}, {
|
|
751
|
+
"code": "PY",
|
|
752
|
+
"label": "Paraguay",
|
|
753
|
+
"phone": "+595"
|
|
754
|
+
}, {
|
|
755
|
+
"code": "QA",
|
|
756
|
+
"label": "Qatar",
|
|
757
|
+
"phone": "+974"
|
|
758
|
+
}, {
|
|
759
|
+
"code": "RE",
|
|
760
|
+
"label": "Reunion",
|
|
761
|
+
"phone": "+262"
|
|
762
|
+
}, {
|
|
763
|
+
"code": "RO",
|
|
764
|
+
"label": "Romania",
|
|
765
|
+
"phone": "+40"
|
|
766
|
+
}, {
|
|
767
|
+
"code": "RS",
|
|
768
|
+
"label": "Serbia",
|
|
769
|
+
"phone": "+381"
|
|
770
|
+
}, {
|
|
771
|
+
"code": "RU",
|
|
772
|
+
"label": "Russian Federation",
|
|
773
|
+
"phone": "+7"
|
|
774
|
+
}, {
|
|
775
|
+
"code": "RW",
|
|
776
|
+
"label": "Rwanda",
|
|
777
|
+
"phone": "+250"
|
|
778
|
+
}, {
|
|
779
|
+
"code": "SA",
|
|
780
|
+
"label": "Saudi Arabia",
|
|
781
|
+
"phone": "+966"
|
|
782
|
+
}, {
|
|
783
|
+
"code": "SB",
|
|
784
|
+
"label": "Solomon Islands",
|
|
785
|
+
"phone": "+677"
|
|
786
|
+
}, {
|
|
787
|
+
"code": "SC",
|
|
788
|
+
"label": "Seychelles",
|
|
789
|
+
"phone": "+248"
|
|
790
|
+
}, {
|
|
791
|
+
"code": "SD",
|
|
792
|
+
"label": "Sudan",
|
|
793
|
+
"phone": "+249"
|
|
794
|
+
}, {
|
|
795
|
+
"code": "SE",
|
|
796
|
+
"label": "Sweden",
|
|
797
|
+
"phone": "+46"
|
|
798
|
+
}, {
|
|
799
|
+
"code": "SG",
|
|
800
|
+
"label": "Singapore",
|
|
801
|
+
"phone": "+65"
|
|
802
|
+
}, {
|
|
803
|
+
"code": "SH",
|
|
804
|
+
"label": "Saint Helena",
|
|
805
|
+
"phone": "+290"
|
|
806
|
+
}, {
|
|
807
|
+
"code": "SI",
|
|
808
|
+
"label": "Slovenia",
|
|
809
|
+
"phone": "+386"
|
|
810
|
+
}, {
|
|
811
|
+
"code": "SJ",
|
|
812
|
+
"label": "Svalbard and Jan Mayen",
|
|
813
|
+
"phone": "+47"
|
|
814
|
+
}, {
|
|
815
|
+
"code": "SK",
|
|
816
|
+
"label": "Slovakia",
|
|
817
|
+
"phone": "+421"
|
|
818
|
+
}, {
|
|
819
|
+
"code": "SL",
|
|
820
|
+
"label": "Sierra Leone",
|
|
821
|
+
"phone": "+232"
|
|
822
|
+
}, {
|
|
823
|
+
"code": "SM",
|
|
824
|
+
"label": "San Marino",
|
|
825
|
+
"phone": "+378"
|
|
826
|
+
}, {
|
|
827
|
+
"code": "SN",
|
|
828
|
+
"label": "Senegal",
|
|
829
|
+
"phone": "+221"
|
|
830
|
+
}, {
|
|
831
|
+
"code": "SO",
|
|
832
|
+
"label": "Somalia",
|
|
833
|
+
"phone": "+252"
|
|
834
|
+
}, {
|
|
835
|
+
"code": "SR",
|
|
836
|
+
"label": "Suriname",
|
|
837
|
+
"phone": "+597"
|
|
838
|
+
}, {
|
|
839
|
+
"code": "SS",
|
|
840
|
+
"label": "South Sudan",
|
|
841
|
+
"phone": "+211"
|
|
842
|
+
}, {
|
|
843
|
+
"code": "ST",
|
|
844
|
+
"label": "Sao Tome and Principe",
|
|
845
|
+
"phone": "+239"
|
|
846
|
+
}, {
|
|
847
|
+
"code": "SV",
|
|
848
|
+
"label": "El Salvador",
|
|
849
|
+
"phone": "+503"
|
|
850
|
+
}, {
|
|
851
|
+
"code": "SX",
|
|
852
|
+
"label": "Sint Maarten (Dutch part)",
|
|
853
|
+
"phone": "+1-721"
|
|
854
|
+
}, {
|
|
855
|
+
"code": "SY",
|
|
856
|
+
"label": "Syrian Arab Republic",
|
|
857
|
+
"phone": "+963"
|
|
858
|
+
}, {
|
|
859
|
+
"code": "SZ",
|
|
860
|
+
"label": "Swaziland",
|
|
861
|
+
"phone": "+268"
|
|
862
|
+
}, {
|
|
863
|
+
"code": "TC",
|
|
864
|
+
"label": "Turks and Caicos Islands",
|
|
865
|
+
"phone": "+1-649"
|
|
866
|
+
}, {
|
|
867
|
+
"code": "TD",
|
|
868
|
+
"label": "Chad",
|
|
869
|
+
"phone": "+235"
|
|
870
|
+
}, {
|
|
871
|
+
"code": "TF",
|
|
872
|
+
"label": "French Southern Territories",
|
|
873
|
+
"phone": "+262"
|
|
874
|
+
}, {
|
|
875
|
+
"code": "TG",
|
|
876
|
+
"label": "Togo",
|
|
877
|
+
"phone": "+228"
|
|
878
|
+
}, {
|
|
879
|
+
"code": "TH",
|
|
880
|
+
"label": "Thailand",
|
|
881
|
+
"phone": "+66"
|
|
882
|
+
}, {
|
|
883
|
+
"code": "TJ",
|
|
884
|
+
"label": "Tajikistan",
|
|
885
|
+
"phone": "+992"
|
|
886
|
+
}, {
|
|
887
|
+
"code": "TK",
|
|
888
|
+
"label": "Tokelau",
|
|
889
|
+
"phone": "+690"
|
|
890
|
+
}, {
|
|
891
|
+
"code": "TL",
|
|
892
|
+
"label": "Timor-Leste",
|
|
893
|
+
"phone": "+670"
|
|
894
|
+
}, {
|
|
895
|
+
"code": "TM",
|
|
896
|
+
"label": "Turkmenistan",
|
|
897
|
+
"phone": "+993"
|
|
898
|
+
}, {
|
|
899
|
+
"code": "TN",
|
|
900
|
+
"label": "Tunisia",
|
|
901
|
+
"phone": "+216"
|
|
902
|
+
}, {
|
|
903
|
+
"code": "TO",
|
|
904
|
+
"label": "Tonga",
|
|
905
|
+
"phone": "+676"
|
|
906
|
+
}, {
|
|
907
|
+
"code": "TR",
|
|
908
|
+
"label": "Turkey",
|
|
909
|
+
"phone": "+90"
|
|
910
|
+
}, {
|
|
911
|
+
"code": "TT",
|
|
912
|
+
"label": "Trinidad and Tobago",
|
|
913
|
+
"phone": "+1-868"
|
|
914
|
+
}, {
|
|
915
|
+
"code": "TV",
|
|
916
|
+
"label": "Tuvalu",
|
|
917
|
+
"phone": "+688"
|
|
918
|
+
}, {
|
|
919
|
+
"code": "TW",
|
|
920
|
+
"label": "Taiwan, Province of China",
|
|
921
|
+
"phone": "+886"
|
|
922
|
+
}, {
|
|
923
|
+
"code": "TZ",
|
|
924
|
+
"label": "United Republic of Tanzania",
|
|
925
|
+
"phone": "+255"
|
|
926
|
+
}, {
|
|
927
|
+
"code": "UA",
|
|
928
|
+
"label": "Ukraine",
|
|
929
|
+
"phone": "+380"
|
|
930
|
+
}, {
|
|
931
|
+
"code": "UG",
|
|
932
|
+
"label": "Uganda",
|
|
933
|
+
"phone": "+256"
|
|
934
|
+
}, {
|
|
935
|
+
"code": "US",
|
|
936
|
+
"label": "United States",
|
|
937
|
+
"phone": "+1",
|
|
938
|
+
"suggested": true
|
|
939
|
+
}, {
|
|
940
|
+
"code": "UY",
|
|
941
|
+
"label": "Uruguay",
|
|
942
|
+
"phone": "+598"
|
|
943
|
+
}, {
|
|
944
|
+
"code": "UZ",
|
|
945
|
+
"label": "Uzbekistan",
|
|
946
|
+
"phone": "+998"
|
|
947
|
+
}, {
|
|
948
|
+
"code": "VA",
|
|
949
|
+
"label": "Holy See (Vatican City State)",
|
|
950
|
+
"phone": "+379"
|
|
951
|
+
}, {
|
|
952
|
+
"code": "VC",
|
|
953
|
+
"label": "Saint Vincent and the Grenadines",
|
|
954
|
+
"phone": "+1-784"
|
|
955
|
+
}, {
|
|
956
|
+
"code": "VE",
|
|
957
|
+
"label": "Venezuela",
|
|
958
|
+
"phone": "+58"
|
|
959
|
+
}, {
|
|
960
|
+
"code": "VG",
|
|
961
|
+
"label": "British Virgin Islands",
|
|
962
|
+
"phone": "+1-284"
|
|
963
|
+
}, {
|
|
964
|
+
"code": "VI",
|
|
965
|
+
"label": "US Virgin Islands",
|
|
966
|
+
"phone": "+1-340"
|
|
967
|
+
}, {
|
|
968
|
+
"code": "VN",
|
|
969
|
+
"label": "Vietnam",
|
|
970
|
+
"phone": "+84"
|
|
971
|
+
}, {
|
|
972
|
+
"code": "VU",
|
|
973
|
+
"label": "Vanuatu",
|
|
974
|
+
"phone": "+678"
|
|
975
|
+
}, {
|
|
976
|
+
"code": "WF",
|
|
977
|
+
"label": "Wallis and Futuna",
|
|
978
|
+
"phone": "+681"
|
|
979
|
+
}, {
|
|
980
|
+
"code": "WS",
|
|
981
|
+
"label": "Samoa",
|
|
982
|
+
"phone": "+685"
|
|
983
|
+
}, {
|
|
984
|
+
"code": "XK",
|
|
985
|
+
"label": "Kosovo",
|
|
986
|
+
"phone": "+383"
|
|
987
|
+
}, {
|
|
988
|
+
"code": "YE",
|
|
989
|
+
"label": "Yemen",
|
|
990
|
+
"phone": "+967"
|
|
991
|
+
}, {
|
|
992
|
+
"code": "YT",
|
|
993
|
+
"label": "Mayotte",
|
|
994
|
+
"phone": "+262"
|
|
995
|
+
}, {
|
|
996
|
+
"code": "ZA",
|
|
997
|
+
"label": "South Africa",
|
|
998
|
+
"phone": "+27"
|
|
999
|
+
}, {
|
|
1000
|
+
"code": "ZM",
|
|
1001
|
+
"label": "Zambia",
|
|
1002
|
+
"phone": "+260"
|
|
1003
|
+
}, {
|
|
1004
|
+
"code": "ZW",
|
|
1005
|
+
"label": "Zimbabwe",
|
|
1006
|
+
"phone": "+263"
|
|
1007
|
+
}];
|
|
1008
|
+
function PhoneInput(_ref) {
|
|
1009
|
+
var onChange = _ref.onChange,
|
|
1010
|
+
_ref$value = _ref.value,
|
|
1011
|
+
value = _ref$value === void 0 ? '' : _ref$value,
|
|
1012
|
+
country = _ref.country,
|
|
1013
|
+
_ref$placeholder = _ref.placeholder,
|
|
1014
|
+
placeholder = _ref$placeholder === void 0 ? 'Enter phone number' : _ref$placeholder,
|
|
1015
|
+
_ref$color = _ref.color,
|
|
1016
|
+
_color = _ref$color === void 0 ? 'default' : _ref$color,
|
|
1017
|
+
children = _ref.children,
|
|
1018
|
+
fullWidth = _ref.fullWidth;
|
|
1019
|
+
var theme = useTheme();
|
|
1020
|
+
var _useScale = useScale(),
|
|
1021
|
+
SCALES = _useScale.SCALES;
|
|
1022
|
+
var defaultValue = country ? countries.findIndex(function (cn) {
|
|
1023
|
+
return cn.code == country;
|
|
1024
|
+
}) : 103;
|
|
1025
|
+
var _useState = useState(countries[defaultValue]),
|
|
1026
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1027
|
+
selectedCountry = _useState2[0],
|
|
1028
|
+
setSelectedCountry = _useState2[1];
|
|
1029
|
+
var _useState3 = useState(value),
|
|
1030
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
1031
|
+
phoneNumber = _useState4[0],
|
|
1032
|
+
setPhoneNumber = _useState4[1];
|
|
1033
|
+
var _useState5 = useState(false),
|
|
1034
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
1035
|
+
isFocused = _useState6[0],
|
|
1036
|
+
setIsFocused = _useState6[1];
|
|
1037
|
+
var _useState7 = useState(false),
|
|
1038
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
1039
|
+
dropdownOpen = _useState8[0],
|
|
1040
|
+
setDropdownOpen = _useState8[1];
|
|
1041
|
+
var _useState9 = useState(''),
|
|
1042
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
1043
|
+
searchTerm = _useState10[0],
|
|
1044
|
+
setSearchTerm = _useState10[1];
|
|
1045
|
+
var dropdownRef = useRef(null);
|
|
1046
|
+
var _useMemo = useMemo(function () {
|
|
1047
|
+
return getColors(theme.palette, _color);
|
|
1048
|
+
}, [theme.palette]),
|
|
1049
|
+
borderColor = _useMemo.borderColor,
|
|
1050
|
+
hoverBorder = _useMemo.hoverBorder;
|
|
1051
|
+
var handleSelectCountry = function handleSelectCountry(country) {
|
|
1052
|
+
setSelectedCountry(country);
|
|
1053
|
+
setDropdownOpen(false);
|
|
1054
|
+
setSearchTerm('');
|
|
1055
|
+
if (onChange) onChange("".concat(country.code, ":").concat(phoneNumber));
|
|
1056
|
+
};
|
|
1057
|
+
var handlePhoneChange = function handlePhoneChange(e) {
|
|
1058
|
+
var value = e.target.value.replace(/[^\d]/g, '');
|
|
1059
|
+
setPhoneNumber(value);
|
|
1060
|
+
if (onChange) onChange("".concat(selectedCountry.phone, ",").concat(value));
|
|
1061
|
+
};
|
|
1062
|
+
var handleClickOutside = function handleClickOutside(e) {
|
|
1063
|
+
if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
|
|
1064
|
+
setDropdownOpen(false);
|
|
1065
|
+
setSearchTerm('');
|
|
1066
|
+
}
|
|
1067
|
+
};
|
|
1068
|
+
useEffect(function () {
|
|
1069
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
1070
|
+
return function () {
|
|
1071
|
+
return document.removeEventListener('mousedown', handleClickOutside);
|
|
1072
|
+
};
|
|
1073
|
+
}, []);
|
|
1074
|
+
var filteredCountries = countries.filter(function (c) {
|
|
1075
|
+
return "".concat(c.label, " ").concat(c.code, " ").concat(c.phone).toLowerCase().includes(searchTerm.toLowerCase());
|
|
1076
|
+
});
|
|
1077
|
+
var defaultWidth = fullWidth ? '100%' : 'initial';
|
|
1078
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1079
|
+
ref: dropdownRef,
|
|
1080
|
+
className: _JSXStyle.dynamic([["2480261071", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "with-label ".concat(isFocused ? 'focused' : '')
|
|
1081
|
+
}, children && /*#__PURE__*/React.createElement(InputBlockLabel, null, children), /*#__PURE__*/React.createElement("div", {
|
|
1082
|
+
className: _JSXStyle.dynamic([["2480261071", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "input-wrapper"
|
|
1083
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1084
|
+
onClick: function onClick() {
|
|
1085
|
+
return setDropdownOpen(!dropdownOpen);
|
|
1086
|
+
},
|
|
1087
|
+
className: _JSXStyle.dynamic([["2480261071", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "dropdown-toggle"
|
|
1088
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
1089
|
+
style: {
|
|
1090
|
+
display: 'flex',
|
|
1091
|
+
alignItems: 'center',
|
|
1092
|
+
gap: 5,
|
|
1093
|
+
paddingRight: '15px'
|
|
1094
|
+
},
|
|
1095
|
+
className: _JSXStyle.dynamic([["2480261071", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
1096
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
1097
|
+
loading: "lazy",
|
|
1098
|
+
width: "20",
|
|
1099
|
+
height: "20",
|
|
1100
|
+
src: "https://flagcdn.com/w20/".concat(selectedCountry.code.toLowerCase(), ".png"),
|
|
1101
|
+
srcSet: "https://flagcdn.com/w40/".concat(selectedCountry.code.toLowerCase(), ".png 2x"),
|
|
1102
|
+
alt: "".concat(selectedCountry.label, " Flag"),
|
|
1103
|
+
className: _JSXStyle.dynamic([["2480261071", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
1104
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
1105
|
+
className: _JSXStyle.dynamic([["2480261071", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
1106
|
+
}, selectedCountry.phone))), /*#__PURE__*/React.createElement("input", {
|
|
1107
|
+
type: "tel",
|
|
1108
|
+
placeholder: placeholder,
|
|
1109
|
+
value: phoneNumber,
|
|
1110
|
+
onChange: handlePhoneChange,
|
|
1111
|
+
onFocus: function onFocus() {
|
|
1112
|
+
return setIsFocused(true);
|
|
1113
|
+
},
|
|
1114
|
+
onBlur: function onBlur() {
|
|
1115
|
+
return setIsFocused(false);
|
|
1116
|
+
},
|
|
1117
|
+
className: _JSXStyle.dynamic([["2480261071", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "phone-input"
|
|
1118
|
+
})), dropdownOpen && /*#__PURE__*/React.createElement("div", {
|
|
1119
|
+
className: _JSXStyle.dynamic([["2480261071", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "dropdown"
|
|
1120
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
1121
|
+
type: "text",
|
|
1122
|
+
placeholder: "Search country...",
|
|
1123
|
+
value: searchTerm,
|
|
1124
|
+
onChange: function onChange(e) {
|
|
1125
|
+
return setSearchTerm(e.target.value);
|
|
1126
|
+
},
|
|
1127
|
+
className: _JSXStyle.dynamic([["2480261071", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "search-input"
|
|
1128
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1129
|
+
className: _JSXStyle.dynamic([["2480261071", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "country-list"
|
|
1130
|
+
}, filteredCountries.length > 0 ? filteredCountries.map(function (c) {
|
|
1131
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1132
|
+
key: c.code,
|
|
1133
|
+
onClick: function onClick() {
|
|
1134
|
+
return handleSelectCountry(c);
|
|
1135
|
+
},
|
|
1136
|
+
className: _JSXStyle.dynamic([["2480261071", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "dropdown-item"
|
|
1137
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
1138
|
+
style: {
|
|
1139
|
+
display: 'flex',
|
|
1140
|
+
alignItems: 'center',
|
|
1141
|
+
gap: 5
|
|
1142
|
+
},
|
|
1143
|
+
className: _JSXStyle.dynamic([["2480261071", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
1144
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
1145
|
+
loading: "lazy",
|
|
1146
|
+
width: "23",
|
|
1147
|
+
height: "23",
|
|
1148
|
+
src: "https://flagcdn.com/w20/".concat(c.code.toLowerCase(), ".png"),
|
|
1149
|
+
srcSet: "https://flagcdn.com/w40/".concat(c.code.toLowerCase(), ".png 2x"),
|
|
1150
|
+
alt: "".concat(c.label, " Flag"),
|
|
1151
|
+
className: _JSXStyle.dynamic([["2480261071", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
1152
|
+
}), c.phone, " ", /*#__PURE__*/React.createElement("span", {
|
|
1153
|
+
style: {
|
|
1154
|
+
color: 'grey'
|
|
1155
|
+
},
|
|
1156
|
+
className: _JSXStyle.dynamic([["2480261071", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
1157
|
+
}, c.label)));
|
|
1158
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
1159
|
+
className: _JSXStyle.dynamic([["2480261071", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "dropdown-item disabled"
|
|
1160
|
+
}, "No results"))), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1161
|
+
id: "2480261071",
|
|
1162
|
+
dynamic: [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']
|
|
1163
|
+
}, ".with-label.__jsx-style-dynamic-selector{position:relative;display:inline-block;box-sizing:border-box;-webkit-box-align:center;--input-height:".concat(SCALES.height(2.25), ";font-size:").concat(SCALES.font(0.875), ";width:").concat(SCALES.width(1, defaultWidth), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.phone-input-container.focused.__jsx-style-dynamic-selector{outline:1px solid ").concat(hoverBorder, ";border-radius:6px;}.input-wrapper.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:1px solid ").concat(borderColor, ";width:").concat(SCALES.width(1, defaultWidth), ";height:var(--input-height);border-radius:6px;overflow:hidden;}.dropdown-toggle.__jsx-style-dynamic-selector{padding:7px 12px;border-radius:6px 0px 0px 6px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:14px;border-right:1px solid ").concat(borderColor, ";}.phone-input.__jsx-style-dynamic-selector{width:100%;min-width:0;padding:5px 10px;background-color:transparent;font-size:14px;border:none;}.phone-input.__jsx-style-dynamic-selector:focus{outline:none;}.dropdown.__jsx-style-dynamic-selector{position:absolute;top:100%;left:0;width:").concat(SCALES.width(1, defaultWidth), ";background:").concat(theme.type == 'dark' ? 'black' : 'white', ";border:1px solid ").concat(borderColor, ";border-radius:6px;margin-top:4px;z-index:999;box-shadow:0 4px 10px rgba(0,0,0,0.1);}.search-input.__jsx-style-dynamic-selector{width:100%;padding:8px 10px;border:none;background-color:transparent;border-bottom:1px solid ").concat(borderColor, ";font-size:14px;}.search-input.__jsx-style-dynamic-selector:focus{outline:none;}.country-list.__jsx-style-dynamic-selector{max-height:200px;overflow-y:auto;}.dropdown-item.__jsx-style-dynamic-selector{padding:10px;cursor:pointer;font-size:14px;}.dropdown-item.__jsx-style-dynamic-selector:hover{background:").concat(theme.type == 'dark' ? '#3a3d3d' : '#efefef', ";}.dropdown-item.disabled.__jsx-style-dynamic-selector{color:#888;cursor:default;}")));
|
|
1164
|
+
}
|
|
1165
|
+
;
|
|
1166
|
+
export default withScale(PhoneInput);
|