@input-kit/phone 0.4.2 → 0.6.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/index.js CHANGED
@@ -1,10 +1,1967 @@
1
- import { forwardRef, useRef, useState, useId, useCallback, useEffect, useImperativeHandle, useMemo, useLayoutEffect } from 'react';
1
+ import { forwardRef, useRef, useCallback, useEffect, useImperativeHandle, useMemo, useState, useId, useLayoutEffect } from 'react';
2
2
  import { getCountries, getCountryCallingCode, getExampleNumber, parsePhoneNumberFromString, AsYouType, validatePhoneNumberLength, isPossiblePhoneNumber, isValidPhoneNumber } from 'libphonenumber-js';
3
3
  import examples from 'libphonenumber-js/mobile/examples';
4
- import worldCountries from 'world-countries';
5
4
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
6
5
 
7
6
  // src/usePhoneInput.ts
7
+
8
+ // src/country-data.ts
9
+ var COUNTRY_DATA = {
10
+ "AC": {
11
+ "name": "Ascension Island",
12
+ "dialCodes": [
13
+ "+247"
14
+ ]
15
+ },
16
+ "AD": {
17
+ "name": "Andorra",
18
+ "dialCodes": [
19
+ "+376"
20
+ ]
21
+ },
22
+ "AE": {
23
+ "name": "United Arab Emirates",
24
+ "dialCodes": [
25
+ "+971"
26
+ ]
27
+ },
28
+ "AF": {
29
+ "name": "Afghanistan",
30
+ "dialCodes": [
31
+ "+93"
32
+ ]
33
+ },
34
+ "AG": {
35
+ "name": "Antigua and Barbuda",
36
+ "dialCodes": [
37
+ "+1",
38
+ "+1268"
39
+ ]
40
+ },
41
+ "AI": {
42
+ "name": "Anguilla",
43
+ "dialCodes": [
44
+ "+1",
45
+ "+1264"
46
+ ]
47
+ },
48
+ "AL": {
49
+ "name": "Albania",
50
+ "dialCodes": [
51
+ "+355"
52
+ ]
53
+ },
54
+ "AM": {
55
+ "name": "Armenia",
56
+ "dialCodes": [
57
+ "+374"
58
+ ]
59
+ },
60
+ "AO": {
61
+ "name": "Angola",
62
+ "dialCodes": [
63
+ "+244"
64
+ ]
65
+ },
66
+ "AR": {
67
+ "name": "Argentina",
68
+ "dialCodes": [
69
+ "+54"
70
+ ]
71
+ },
72
+ "AS": {
73
+ "name": "American Samoa",
74
+ "dialCodes": [
75
+ "+1",
76
+ "+1684"
77
+ ]
78
+ },
79
+ "AT": {
80
+ "name": "Austria",
81
+ "dialCodes": [
82
+ "+43"
83
+ ]
84
+ },
85
+ "AU": {
86
+ "name": "Australia",
87
+ "dialCodes": [
88
+ "+61"
89
+ ]
90
+ },
91
+ "AW": {
92
+ "name": "Aruba",
93
+ "dialCodes": [
94
+ "+297"
95
+ ]
96
+ },
97
+ "AX": {
98
+ "name": "\xC5land Islands",
99
+ "dialCodes": [
100
+ "+358",
101
+ "+35818"
102
+ ]
103
+ },
104
+ "AZ": {
105
+ "name": "Azerbaijan",
106
+ "dialCodes": [
107
+ "+994"
108
+ ]
109
+ },
110
+ "BA": {
111
+ "name": "Bosnia and Herzegovina",
112
+ "dialCodes": [
113
+ "+387"
114
+ ]
115
+ },
116
+ "BB": {
117
+ "name": "Barbados",
118
+ "dialCodes": [
119
+ "+1",
120
+ "+1246"
121
+ ]
122
+ },
123
+ "BD": {
124
+ "name": "Bangladesh",
125
+ "dialCodes": [
126
+ "+880"
127
+ ]
128
+ },
129
+ "BE": {
130
+ "name": "Belgium",
131
+ "dialCodes": [
132
+ "+32"
133
+ ]
134
+ },
135
+ "BF": {
136
+ "name": "Burkina Faso",
137
+ "dialCodes": [
138
+ "+226"
139
+ ]
140
+ },
141
+ "BG": {
142
+ "name": "Bulgaria",
143
+ "dialCodes": [
144
+ "+359"
145
+ ]
146
+ },
147
+ "BH": {
148
+ "name": "Bahrain",
149
+ "dialCodes": [
150
+ "+973"
151
+ ]
152
+ },
153
+ "BI": {
154
+ "name": "Burundi",
155
+ "dialCodes": [
156
+ "+257"
157
+ ]
158
+ },
159
+ "BJ": {
160
+ "name": "Benin",
161
+ "dialCodes": [
162
+ "+229"
163
+ ]
164
+ },
165
+ "BL": {
166
+ "name": "Saint Barth\xE9lemy",
167
+ "dialCodes": [
168
+ "+590"
169
+ ]
170
+ },
171
+ "BM": {
172
+ "name": "Bermuda",
173
+ "dialCodes": [
174
+ "+1",
175
+ "+1441"
176
+ ]
177
+ },
178
+ "BN": {
179
+ "name": "Brunei",
180
+ "dialCodes": [
181
+ "+673"
182
+ ]
183
+ },
184
+ "BO": {
185
+ "name": "Bolivia",
186
+ "dialCodes": [
187
+ "+591"
188
+ ]
189
+ },
190
+ "BQ": {
191
+ "name": "Caribbean Netherlands",
192
+ "dialCodes": [
193
+ "+599"
194
+ ]
195
+ },
196
+ "BR": {
197
+ "name": "Brazil",
198
+ "dialCodes": [
199
+ "+55"
200
+ ]
201
+ },
202
+ "BS": {
203
+ "name": "Bahamas",
204
+ "dialCodes": [
205
+ "+1",
206
+ "+1242"
207
+ ]
208
+ },
209
+ "BT": {
210
+ "name": "Bhutan",
211
+ "dialCodes": [
212
+ "+975"
213
+ ]
214
+ },
215
+ "BW": {
216
+ "name": "Botswana",
217
+ "dialCodes": [
218
+ "+267"
219
+ ]
220
+ },
221
+ "BY": {
222
+ "name": "Belarus",
223
+ "dialCodes": [
224
+ "+375"
225
+ ]
226
+ },
227
+ "BZ": {
228
+ "name": "Belize",
229
+ "dialCodes": [
230
+ "+501"
231
+ ]
232
+ },
233
+ "CA": {
234
+ "name": "Canada",
235
+ "dialCodes": [
236
+ "+1",
237
+ "+1204",
238
+ "+1226",
239
+ "+1236",
240
+ "+1249",
241
+ "+1250",
242
+ "+1263",
243
+ "+1289",
244
+ "+1306",
245
+ "+1343",
246
+ "+1354",
247
+ "+1365",
248
+ "+1367",
249
+ "+1368",
250
+ "+1382",
251
+ "+1387",
252
+ "+1403",
253
+ "+1416",
254
+ "+1418",
255
+ "+1428",
256
+ "+1431",
257
+ "+1437",
258
+ "+1438",
259
+ "+1450",
260
+ "+1468",
261
+ "+1474",
262
+ "+1506",
263
+ "+1514",
264
+ "+1519",
265
+ "+1548",
266
+ "+1579",
267
+ "+1581",
268
+ "+1584",
269
+ "+1587",
270
+ "+1600",
271
+ "+1604",
272
+ "+1613",
273
+ "+1622",
274
+ "+1633",
275
+ "+1639",
276
+ "+1644",
277
+ "+1647",
278
+ "+1655",
279
+ "+1672",
280
+ "+1677",
281
+ "+1683",
282
+ "+1688",
283
+ "+1705",
284
+ "+1709",
285
+ "+1742",
286
+ "+1753",
287
+ "+1778",
288
+ "+1780",
289
+ "+1782",
290
+ "+1807",
291
+ "+1819",
292
+ "+1825",
293
+ "+1867",
294
+ "+1873",
295
+ "+1879",
296
+ "+1902",
297
+ "+1905",
298
+ "+1942"
299
+ ]
300
+ },
301
+ "CC": {
302
+ "name": "Cocos (Keeling) Islands",
303
+ "dialCodes": [
304
+ "+61"
305
+ ]
306
+ },
307
+ "CD": {
308
+ "name": "DR Congo",
309
+ "dialCodes": [
310
+ "+243"
311
+ ]
312
+ },
313
+ "CF": {
314
+ "name": "Central African Republic",
315
+ "dialCodes": [
316
+ "+236"
317
+ ]
318
+ },
319
+ "CG": {
320
+ "name": "Republic of the Congo",
321
+ "dialCodes": [
322
+ "+242"
323
+ ]
324
+ },
325
+ "CH": {
326
+ "name": "Switzerland",
327
+ "dialCodes": [
328
+ "+41"
329
+ ]
330
+ },
331
+ "CI": {
332
+ "name": "Ivory Coast",
333
+ "dialCodes": [
334
+ "+225"
335
+ ]
336
+ },
337
+ "CK": {
338
+ "name": "Cook Islands",
339
+ "dialCodes": [
340
+ "+682"
341
+ ]
342
+ },
343
+ "CL": {
344
+ "name": "Chile",
345
+ "dialCodes": [
346
+ "+56"
347
+ ]
348
+ },
349
+ "CM": {
350
+ "name": "Cameroon",
351
+ "dialCodes": [
352
+ "+237"
353
+ ]
354
+ },
355
+ "CN": {
356
+ "name": "China",
357
+ "dialCodes": [
358
+ "+86"
359
+ ]
360
+ },
361
+ "CO": {
362
+ "name": "Colombia",
363
+ "dialCodes": [
364
+ "+57"
365
+ ]
366
+ },
367
+ "CR": {
368
+ "name": "Costa Rica",
369
+ "dialCodes": [
370
+ "+506"
371
+ ]
372
+ },
373
+ "CU": {
374
+ "name": "Cuba",
375
+ "dialCodes": [
376
+ "+53"
377
+ ]
378
+ },
379
+ "CV": {
380
+ "name": "Cape Verde",
381
+ "dialCodes": [
382
+ "+238"
383
+ ]
384
+ },
385
+ "CW": {
386
+ "name": "Cura\xE7ao",
387
+ "dialCodes": [
388
+ "+599"
389
+ ]
390
+ },
391
+ "CX": {
392
+ "name": "Christmas Island",
393
+ "dialCodes": [
394
+ "+61"
395
+ ]
396
+ },
397
+ "CY": {
398
+ "name": "Cyprus",
399
+ "dialCodes": [
400
+ "+357"
401
+ ]
402
+ },
403
+ "CZ": {
404
+ "name": "Czechia",
405
+ "dialCodes": [
406
+ "+420"
407
+ ]
408
+ },
409
+ "DE": {
410
+ "name": "Germany",
411
+ "dialCodes": [
412
+ "+49"
413
+ ]
414
+ },
415
+ "DJ": {
416
+ "name": "Djibouti",
417
+ "dialCodes": [
418
+ "+253"
419
+ ]
420
+ },
421
+ "DK": {
422
+ "name": "Denmark",
423
+ "dialCodes": [
424
+ "+45"
425
+ ]
426
+ },
427
+ "DM": {
428
+ "name": "Dominica",
429
+ "dialCodes": [
430
+ "+1",
431
+ "+1767"
432
+ ]
433
+ },
434
+ "DO": {
435
+ "name": "Dominican Republic",
436
+ "dialCodes": [
437
+ "+1",
438
+ "+1809",
439
+ "+1829",
440
+ "+1849"
441
+ ]
442
+ },
443
+ "DZ": {
444
+ "name": "Algeria",
445
+ "dialCodes": [
446
+ "+213"
447
+ ]
448
+ },
449
+ "EC": {
450
+ "name": "Ecuador",
451
+ "dialCodes": [
452
+ "+593"
453
+ ]
454
+ },
455
+ "EE": {
456
+ "name": "Estonia",
457
+ "dialCodes": [
458
+ "+372"
459
+ ]
460
+ },
461
+ "EG": {
462
+ "name": "Egypt",
463
+ "dialCodes": [
464
+ "+20"
465
+ ]
466
+ },
467
+ "EH": {
468
+ "name": "Western Sahara",
469
+ "dialCodes": [
470
+ "+212",
471
+ "+2125288",
472
+ "+2125289"
473
+ ]
474
+ },
475
+ "ER": {
476
+ "name": "Eritrea",
477
+ "dialCodes": [
478
+ "+291"
479
+ ]
480
+ },
481
+ "ES": {
482
+ "name": "Spain",
483
+ "dialCodes": [
484
+ "+34"
485
+ ]
486
+ },
487
+ "ET": {
488
+ "name": "Ethiopia",
489
+ "dialCodes": [
490
+ "+251"
491
+ ]
492
+ },
493
+ "FI": {
494
+ "name": "Finland",
495
+ "dialCodes": [
496
+ "+358"
497
+ ]
498
+ },
499
+ "FJ": {
500
+ "name": "Fiji",
501
+ "dialCodes": [
502
+ "+679"
503
+ ]
504
+ },
505
+ "FK": {
506
+ "name": "Falkland Islands",
507
+ "dialCodes": [
508
+ "+500"
509
+ ]
510
+ },
511
+ "FM": {
512
+ "name": "Micronesia",
513
+ "dialCodes": [
514
+ "+691"
515
+ ]
516
+ },
517
+ "FO": {
518
+ "name": "Faroe Islands",
519
+ "dialCodes": [
520
+ "+298"
521
+ ]
522
+ },
523
+ "FR": {
524
+ "name": "France",
525
+ "dialCodes": [
526
+ "+33"
527
+ ]
528
+ },
529
+ "GA": {
530
+ "name": "Gabon",
531
+ "dialCodes": [
532
+ "+241"
533
+ ]
534
+ },
535
+ "GB": {
536
+ "name": "United Kingdom",
537
+ "dialCodes": [
538
+ "+44"
539
+ ]
540
+ },
541
+ "GD": {
542
+ "name": "Grenada",
543
+ "dialCodes": [
544
+ "+1",
545
+ "+1473"
546
+ ]
547
+ },
548
+ "GE": {
549
+ "name": "Georgia",
550
+ "dialCodes": [
551
+ "+995"
552
+ ]
553
+ },
554
+ "GF": {
555
+ "name": "French Guiana",
556
+ "dialCodes": [
557
+ "+594"
558
+ ]
559
+ },
560
+ "GG": {
561
+ "name": "Guernsey",
562
+ "dialCodes": [
563
+ "+44"
564
+ ]
565
+ },
566
+ "GH": {
567
+ "name": "Ghana",
568
+ "dialCodes": [
569
+ "+233"
570
+ ]
571
+ },
572
+ "GI": {
573
+ "name": "Gibraltar",
574
+ "dialCodes": [
575
+ "+350"
576
+ ]
577
+ },
578
+ "GL": {
579
+ "name": "Greenland",
580
+ "dialCodes": [
581
+ "+299"
582
+ ]
583
+ },
584
+ "GM": {
585
+ "name": "Gambia",
586
+ "dialCodes": [
587
+ "+220"
588
+ ]
589
+ },
590
+ "GN": {
591
+ "name": "Guinea",
592
+ "dialCodes": [
593
+ "+224"
594
+ ]
595
+ },
596
+ "GP": {
597
+ "name": "Guadeloupe",
598
+ "dialCodes": [
599
+ "+590"
600
+ ]
601
+ },
602
+ "GQ": {
603
+ "name": "Equatorial Guinea",
604
+ "dialCodes": [
605
+ "+240"
606
+ ]
607
+ },
608
+ "GR": {
609
+ "name": "Greece",
610
+ "dialCodes": [
611
+ "+30"
612
+ ]
613
+ },
614
+ "GT": {
615
+ "name": "Guatemala",
616
+ "dialCodes": [
617
+ "+502"
618
+ ]
619
+ },
620
+ "GU": {
621
+ "name": "Guam",
622
+ "dialCodes": [
623
+ "+1",
624
+ "+1671"
625
+ ]
626
+ },
627
+ "GW": {
628
+ "name": "Guinea-Bissau",
629
+ "dialCodes": [
630
+ "+245"
631
+ ]
632
+ },
633
+ "GY": {
634
+ "name": "Guyana",
635
+ "dialCodes": [
636
+ "+592"
637
+ ]
638
+ },
639
+ "HK": {
640
+ "name": "Hong Kong",
641
+ "dialCodes": [
642
+ "+852"
643
+ ]
644
+ },
645
+ "HN": {
646
+ "name": "Honduras",
647
+ "dialCodes": [
648
+ "+504"
649
+ ]
650
+ },
651
+ "HR": {
652
+ "name": "Croatia",
653
+ "dialCodes": [
654
+ "+385"
655
+ ]
656
+ },
657
+ "HT": {
658
+ "name": "Haiti",
659
+ "dialCodes": [
660
+ "+509"
661
+ ]
662
+ },
663
+ "HU": {
664
+ "name": "Hungary",
665
+ "dialCodes": [
666
+ "+36"
667
+ ]
668
+ },
669
+ "ID": {
670
+ "name": "Indonesia",
671
+ "dialCodes": [
672
+ "+62"
673
+ ]
674
+ },
675
+ "IE": {
676
+ "name": "Ireland",
677
+ "dialCodes": [
678
+ "+353"
679
+ ]
680
+ },
681
+ "IL": {
682
+ "name": "Israel",
683
+ "dialCodes": [
684
+ "+972"
685
+ ]
686
+ },
687
+ "IM": {
688
+ "name": "Isle of Man",
689
+ "dialCodes": [
690
+ "+44"
691
+ ]
692
+ },
693
+ "IN": {
694
+ "name": "India",
695
+ "dialCodes": [
696
+ "+91"
697
+ ]
698
+ },
699
+ "IO": {
700
+ "name": "British Indian Ocean Territory",
701
+ "dialCodes": [
702
+ "+246"
703
+ ]
704
+ },
705
+ "IQ": {
706
+ "name": "Iraq",
707
+ "dialCodes": [
708
+ "+964"
709
+ ]
710
+ },
711
+ "IR": {
712
+ "name": "Iran",
713
+ "dialCodes": [
714
+ "+98"
715
+ ]
716
+ },
717
+ "IS": {
718
+ "name": "Iceland",
719
+ "dialCodes": [
720
+ "+354"
721
+ ]
722
+ },
723
+ "IT": {
724
+ "name": "Italy",
725
+ "dialCodes": [
726
+ "+39"
727
+ ]
728
+ },
729
+ "JE": {
730
+ "name": "Jersey",
731
+ "dialCodes": [
732
+ "+44"
733
+ ]
734
+ },
735
+ "JM": {
736
+ "name": "Jamaica",
737
+ "dialCodes": [
738
+ "+1",
739
+ "+1876"
740
+ ]
741
+ },
742
+ "JO": {
743
+ "name": "Jordan",
744
+ "dialCodes": [
745
+ "+962"
746
+ ]
747
+ },
748
+ "JP": {
749
+ "name": "Japan",
750
+ "dialCodes": [
751
+ "+81"
752
+ ]
753
+ },
754
+ "KE": {
755
+ "name": "Kenya",
756
+ "dialCodes": [
757
+ "+254"
758
+ ]
759
+ },
760
+ "KG": {
761
+ "name": "Kyrgyzstan",
762
+ "dialCodes": [
763
+ "+996"
764
+ ]
765
+ },
766
+ "KH": {
767
+ "name": "Cambodia",
768
+ "dialCodes": [
769
+ "+855"
770
+ ]
771
+ },
772
+ "KI": {
773
+ "name": "Kiribati",
774
+ "dialCodes": [
775
+ "+686"
776
+ ]
777
+ },
778
+ "KM": {
779
+ "name": "Comoros",
780
+ "dialCodes": [
781
+ "+269"
782
+ ]
783
+ },
784
+ "KN": {
785
+ "name": "Saint Kitts and Nevis",
786
+ "dialCodes": [
787
+ "+1",
788
+ "+1869"
789
+ ]
790
+ },
791
+ "KP": {
792
+ "name": "North Korea",
793
+ "dialCodes": [
794
+ "+850"
795
+ ]
796
+ },
797
+ "KR": {
798
+ "name": "South Korea",
799
+ "dialCodes": [
800
+ "+82"
801
+ ]
802
+ },
803
+ "KW": {
804
+ "name": "Kuwait",
805
+ "dialCodes": [
806
+ "+965"
807
+ ]
808
+ },
809
+ "KY": {
810
+ "name": "Cayman Islands",
811
+ "dialCodes": [
812
+ "+1",
813
+ "+1345"
814
+ ]
815
+ },
816
+ "KZ": {
817
+ "name": "Kazakhstan",
818
+ "dialCodes": [
819
+ "+7",
820
+ "+76",
821
+ "+77"
822
+ ]
823
+ },
824
+ "LA": {
825
+ "name": "Laos",
826
+ "dialCodes": [
827
+ "+856"
828
+ ]
829
+ },
830
+ "LB": {
831
+ "name": "Lebanon",
832
+ "dialCodes": [
833
+ "+961"
834
+ ]
835
+ },
836
+ "LC": {
837
+ "name": "Saint Lucia",
838
+ "dialCodes": [
839
+ "+1",
840
+ "+1758"
841
+ ]
842
+ },
843
+ "LI": {
844
+ "name": "Liechtenstein",
845
+ "dialCodes": [
846
+ "+423"
847
+ ]
848
+ },
849
+ "LK": {
850
+ "name": "Sri Lanka",
851
+ "dialCodes": [
852
+ "+94"
853
+ ]
854
+ },
855
+ "LR": {
856
+ "name": "Liberia",
857
+ "dialCodes": [
858
+ "+231"
859
+ ]
860
+ },
861
+ "LS": {
862
+ "name": "Lesotho",
863
+ "dialCodes": [
864
+ "+266"
865
+ ]
866
+ },
867
+ "LT": {
868
+ "name": "Lithuania",
869
+ "dialCodes": [
870
+ "+370"
871
+ ]
872
+ },
873
+ "LU": {
874
+ "name": "Luxembourg",
875
+ "dialCodes": [
876
+ "+352"
877
+ ]
878
+ },
879
+ "LV": {
880
+ "name": "Latvia",
881
+ "dialCodes": [
882
+ "+371"
883
+ ]
884
+ },
885
+ "LY": {
886
+ "name": "Libya",
887
+ "dialCodes": [
888
+ "+218"
889
+ ]
890
+ },
891
+ "MA": {
892
+ "name": "Morocco",
893
+ "dialCodes": [
894
+ "+212"
895
+ ]
896
+ },
897
+ "MC": {
898
+ "name": "Monaco",
899
+ "dialCodes": [
900
+ "+377"
901
+ ]
902
+ },
903
+ "MD": {
904
+ "name": "Moldova",
905
+ "dialCodes": [
906
+ "+373"
907
+ ]
908
+ },
909
+ "ME": {
910
+ "name": "Montenegro",
911
+ "dialCodes": [
912
+ "+382"
913
+ ]
914
+ },
915
+ "MF": {
916
+ "name": "Saint Martin",
917
+ "dialCodes": [
918
+ "+590"
919
+ ]
920
+ },
921
+ "MG": {
922
+ "name": "Madagascar",
923
+ "dialCodes": [
924
+ "+261"
925
+ ]
926
+ },
927
+ "MH": {
928
+ "name": "Marshall Islands",
929
+ "dialCodes": [
930
+ "+692"
931
+ ]
932
+ },
933
+ "MK": {
934
+ "name": "North Macedonia",
935
+ "dialCodes": [
936
+ "+389"
937
+ ]
938
+ },
939
+ "ML": {
940
+ "name": "Mali",
941
+ "dialCodes": [
942
+ "+223"
943
+ ]
944
+ },
945
+ "MM": {
946
+ "name": "Myanmar",
947
+ "dialCodes": [
948
+ "+95"
949
+ ]
950
+ },
951
+ "MN": {
952
+ "name": "Mongolia",
953
+ "dialCodes": [
954
+ "+976"
955
+ ]
956
+ },
957
+ "MO": {
958
+ "name": "Macau",
959
+ "dialCodes": [
960
+ "+853"
961
+ ]
962
+ },
963
+ "MP": {
964
+ "name": "Northern Mariana Islands",
965
+ "dialCodes": [
966
+ "+1",
967
+ "+1670"
968
+ ]
969
+ },
970
+ "MQ": {
971
+ "name": "Martinique",
972
+ "dialCodes": [
973
+ "+596"
974
+ ]
975
+ },
976
+ "MR": {
977
+ "name": "Mauritania",
978
+ "dialCodes": [
979
+ "+222"
980
+ ]
981
+ },
982
+ "MS": {
983
+ "name": "Montserrat",
984
+ "dialCodes": [
985
+ "+1",
986
+ "+1664"
987
+ ]
988
+ },
989
+ "MT": {
990
+ "name": "Malta",
991
+ "dialCodes": [
992
+ "+356"
993
+ ]
994
+ },
995
+ "MU": {
996
+ "name": "Mauritius",
997
+ "dialCodes": [
998
+ "+230"
999
+ ]
1000
+ },
1001
+ "MV": {
1002
+ "name": "Maldives",
1003
+ "dialCodes": [
1004
+ "+960"
1005
+ ]
1006
+ },
1007
+ "MW": {
1008
+ "name": "Malawi",
1009
+ "dialCodes": [
1010
+ "+265"
1011
+ ]
1012
+ },
1013
+ "MX": {
1014
+ "name": "Mexico",
1015
+ "dialCodes": [
1016
+ "+52"
1017
+ ]
1018
+ },
1019
+ "MY": {
1020
+ "name": "Malaysia",
1021
+ "dialCodes": [
1022
+ "+60"
1023
+ ]
1024
+ },
1025
+ "MZ": {
1026
+ "name": "Mozambique",
1027
+ "dialCodes": [
1028
+ "+258"
1029
+ ]
1030
+ },
1031
+ "NA": {
1032
+ "name": "Namibia",
1033
+ "dialCodes": [
1034
+ "+264"
1035
+ ]
1036
+ },
1037
+ "NC": {
1038
+ "name": "New Caledonia",
1039
+ "dialCodes": [
1040
+ "+687"
1041
+ ]
1042
+ },
1043
+ "NE": {
1044
+ "name": "Niger",
1045
+ "dialCodes": [
1046
+ "+227"
1047
+ ]
1048
+ },
1049
+ "NF": {
1050
+ "name": "Norfolk Island",
1051
+ "dialCodes": [
1052
+ "+672"
1053
+ ]
1054
+ },
1055
+ "NG": {
1056
+ "name": "Nigeria",
1057
+ "dialCodes": [
1058
+ "+234"
1059
+ ]
1060
+ },
1061
+ "NI": {
1062
+ "name": "Nicaragua",
1063
+ "dialCodes": [
1064
+ "+505"
1065
+ ]
1066
+ },
1067
+ "NL": {
1068
+ "name": "Netherlands",
1069
+ "dialCodes": [
1070
+ "+31"
1071
+ ]
1072
+ },
1073
+ "NO": {
1074
+ "name": "Norway",
1075
+ "dialCodes": [
1076
+ "+47"
1077
+ ]
1078
+ },
1079
+ "NP": {
1080
+ "name": "Nepal",
1081
+ "dialCodes": [
1082
+ "+977"
1083
+ ]
1084
+ },
1085
+ "NR": {
1086
+ "name": "Nauru",
1087
+ "dialCodes": [
1088
+ "+674"
1089
+ ]
1090
+ },
1091
+ "NU": {
1092
+ "name": "Niue",
1093
+ "dialCodes": [
1094
+ "+683"
1095
+ ]
1096
+ },
1097
+ "NZ": {
1098
+ "name": "New Zealand",
1099
+ "dialCodes": [
1100
+ "+64"
1101
+ ]
1102
+ },
1103
+ "OM": {
1104
+ "name": "Oman",
1105
+ "dialCodes": [
1106
+ "+968"
1107
+ ]
1108
+ },
1109
+ "PA": {
1110
+ "name": "Panama",
1111
+ "dialCodes": [
1112
+ "+507"
1113
+ ]
1114
+ },
1115
+ "PE": {
1116
+ "name": "Peru",
1117
+ "dialCodes": [
1118
+ "+51"
1119
+ ]
1120
+ },
1121
+ "PF": {
1122
+ "name": "French Polynesia",
1123
+ "dialCodes": [
1124
+ "+689"
1125
+ ]
1126
+ },
1127
+ "PG": {
1128
+ "name": "Papua New Guinea",
1129
+ "dialCodes": [
1130
+ "+675"
1131
+ ]
1132
+ },
1133
+ "PH": {
1134
+ "name": "Philippines",
1135
+ "dialCodes": [
1136
+ "+63"
1137
+ ]
1138
+ },
1139
+ "PK": {
1140
+ "name": "Pakistan",
1141
+ "dialCodes": [
1142
+ "+92"
1143
+ ]
1144
+ },
1145
+ "PL": {
1146
+ "name": "Poland",
1147
+ "dialCodes": [
1148
+ "+48"
1149
+ ]
1150
+ },
1151
+ "PM": {
1152
+ "name": "Saint Pierre and Miquelon",
1153
+ "dialCodes": [
1154
+ "+508"
1155
+ ]
1156
+ },
1157
+ "PR": {
1158
+ "name": "Puerto Rico",
1159
+ "dialCodes": [
1160
+ "+1",
1161
+ "+1787",
1162
+ "+1939"
1163
+ ]
1164
+ },
1165
+ "PS": {
1166
+ "name": "Palestine",
1167
+ "dialCodes": [
1168
+ "+970"
1169
+ ]
1170
+ },
1171
+ "PT": {
1172
+ "name": "Portugal",
1173
+ "dialCodes": [
1174
+ "+351"
1175
+ ]
1176
+ },
1177
+ "PW": {
1178
+ "name": "Palau",
1179
+ "dialCodes": [
1180
+ "+680"
1181
+ ]
1182
+ },
1183
+ "PY": {
1184
+ "name": "Paraguay",
1185
+ "dialCodes": [
1186
+ "+595"
1187
+ ]
1188
+ },
1189
+ "QA": {
1190
+ "name": "Qatar",
1191
+ "dialCodes": [
1192
+ "+974"
1193
+ ]
1194
+ },
1195
+ "RE": {
1196
+ "name": "R\xE9union",
1197
+ "dialCodes": [
1198
+ "+262"
1199
+ ]
1200
+ },
1201
+ "RO": {
1202
+ "name": "Romania",
1203
+ "dialCodes": [
1204
+ "+40"
1205
+ ]
1206
+ },
1207
+ "RS": {
1208
+ "name": "Serbia",
1209
+ "dialCodes": [
1210
+ "+381"
1211
+ ]
1212
+ },
1213
+ "RU": {
1214
+ "name": "Russia",
1215
+ "dialCodes": [
1216
+ "+7",
1217
+ "+73",
1218
+ "+74",
1219
+ "+75",
1220
+ "+78",
1221
+ "+79"
1222
+ ]
1223
+ },
1224
+ "RW": {
1225
+ "name": "Rwanda",
1226
+ "dialCodes": [
1227
+ "+250"
1228
+ ]
1229
+ },
1230
+ "SA": {
1231
+ "name": "Saudi Arabia",
1232
+ "dialCodes": [
1233
+ "+966"
1234
+ ]
1235
+ },
1236
+ "SB": {
1237
+ "name": "Solomon Islands",
1238
+ "dialCodes": [
1239
+ "+677"
1240
+ ]
1241
+ },
1242
+ "SC": {
1243
+ "name": "Seychelles",
1244
+ "dialCodes": [
1245
+ "+248"
1246
+ ]
1247
+ },
1248
+ "SD": {
1249
+ "name": "Sudan",
1250
+ "dialCodes": [
1251
+ "+249"
1252
+ ]
1253
+ },
1254
+ "SE": {
1255
+ "name": "Sweden",
1256
+ "dialCodes": [
1257
+ "+46"
1258
+ ]
1259
+ },
1260
+ "SG": {
1261
+ "name": "Singapore",
1262
+ "dialCodes": [
1263
+ "+65"
1264
+ ]
1265
+ },
1266
+ "SH": {
1267
+ "name": "Saint Helena, Ascension and Tristan da Cunha",
1268
+ "dialCodes": [
1269
+ "+290",
1270
+ "+247"
1271
+ ]
1272
+ },
1273
+ "SI": {
1274
+ "name": "Slovenia",
1275
+ "dialCodes": [
1276
+ "+386"
1277
+ ]
1278
+ },
1279
+ "SJ": {
1280
+ "name": "Svalbard and Jan Mayen",
1281
+ "dialCodes": [
1282
+ "+47",
1283
+ "+4779"
1284
+ ]
1285
+ },
1286
+ "SK": {
1287
+ "name": "Slovakia",
1288
+ "dialCodes": [
1289
+ "+421"
1290
+ ]
1291
+ },
1292
+ "SL": {
1293
+ "name": "Sierra Leone",
1294
+ "dialCodes": [
1295
+ "+232"
1296
+ ]
1297
+ },
1298
+ "SM": {
1299
+ "name": "San Marino",
1300
+ "dialCodes": [
1301
+ "+378"
1302
+ ]
1303
+ },
1304
+ "SN": {
1305
+ "name": "Senegal",
1306
+ "dialCodes": [
1307
+ "+221"
1308
+ ]
1309
+ },
1310
+ "SO": {
1311
+ "name": "Somalia",
1312
+ "dialCodes": [
1313
+ "+252"
1314
+ ]
1315
+ },
1316
+ "SR": {
1317
+ "name": "Suriname",
1318
+ "dialCodes": [
1319
+ "+597"
1320
+ ]
1321
+ },
1322
+ "SS": {
1323
+ "name": "South Sudan",
1324
+ "dialCodes": [
1325
+ "+211"
1326
+ ]
1327
+ },
1328
+ "ST": {
1329
+ "name": "S\xE3o Tom\xE9 and Pr\xEDncipe",
1330
+ "dialCodes": [
1331
+ "+239"
1332
+ ]
1333
+ },
1334
+ "SV": {
1335
+ "name": "El Salvador",
1336
+ "dialCodes": [
1337
+ "+503"
1338
+ ]
1339
+ },
1340
+ "SX": {
1341
+ "name": "Sint Maarten",
1342
+ "dialCodes": [
1343
+ "+1",
1344
+ "+1721"
1345
+ ]
1346
+ },
1347
+ "SY": {
1348
+ "name": "Syria",
1349
+ "dialCodes": [
1350
+ "+963"
1351
+ ]
1352
+ },
1353
+ "SZ": {
1354
+ "name": "Eswatini",
1355
+ "dialCodes": [
1356
+ "+268"
1357
+ ]
1358
+ },
1359
+ "TA": {
1360
+ "name": "Tristan da Cunha",
1361
+ "dialCodes": [
1362
+ "+290"
1363
+ ]
1364
+ },
1365
+ "TC": {
1366
+ "name": "Turks and Caicos Islands",
1367
+ "dialCodes": [
1368
+ "+1",
1369
+ "+1649"
1370
+ ]
1371
+ },
1372
+ "TD": {
1373
+ "name": "Chad",
1374
+ "dialCodes": [
1375
+ "+235"
1376
+ ]
1377
+ },
1378
+ "TG": {
1379
+ "name": "Togo",
1380
+ "dialCodes": [
1381
+ "+228"
1382
+ ]
1383
+ },
1384
+ "TH": {
1385
+ "name": "Thailand",
1386
+ "dialCodes": [
1387
+ "+66"
1388
+ ]
1389
+ },
1390
+ "TJ": {
1391
+ "name": "Tajikistan",
1392
+ "dialCodes": [
1393
+ "+992"
1394
+ ]
1395
+ },
1396
+ "TK": {
1397
+ "name": "Tokelau",
1398
+ "dialCodes": [
1399
+ "+690"
1400
+ ]
1401
+ },
1402
+ "TL": {
1403
+ "name": "Timor-Leste",
1404
+ "dialCodes": [
1405
+ "+670"
1406
+ ]
1407
+ },
1408
+ "TM": {
1409
+ "name": "Turkmenistan",
1410
+ "dialCodes": [
1411
+ "+993"
1412
+ ]
1413
+ },
1414
+ "TN": {
1415
+ "name": "Tunisia",
1416
+ "dialCodes": [
1417
+ "+216"
1418
+ ]
1419
+ },
1420
+ "TO": {
1421
+ "name": "Tonga",
1422
+ "dialCodes": [
1423
+ "+676"
1424
+ ]
1425
+ },
1426
+ "TR": {
1427
+ "name": "T\xFCrkiye",
1428
+ "dialCodes": [
1429
+ "+90"
1430
+ ]
1431
+ },
1432
+ "TT": {
1433
+ "name": "Trinidad and Tobago",
1434
+ "dialCodes": [
1435
+ "+1",
1436
+ "+1868"
1437
+ ]
1438
+ },
1439
+ "TV": {
1440
+ "name": "Tuvalu",
1441
+ "dialCodes": [
1442
+ "+688"
1443
+ ]
1444
+ },
1445
+ "TW": {
1446
+ "name": "Taiwan",
1447
+ "dialCodes": [
1448
+ "+886"
1449
+ ]
1450
+ },
1451
+ "TZ": {
1452
+ "name": "Tanzania",
1453
+ "dialCodes": [
1454
+ "+255"
1455
+ ]
1456
+ },
1457
+ "UA": {
1458
+ "name": "Ukraine",
1459
+ "dialCodes": [
1460
+ "+380"
1461
+ ]
1462
+ },
1463
+ "UG": {
1464
+ "name": "Uganda",
1465
+ "dialCodes": [
1466
+ "+256"
1467
+ ]
1468
+ },
1469
+ "US": {
1470
+ "name": "United States",
1471
+ "dialCodes": [
1472
+ "+1",
1473
+ "+1201",
1474
+ "+1202",
1475
+ "+1203",
1476
+ "+1205",
1477
+ "+1206",
1478
+ "+1207",
1479
+ "+1208",
1480
+ "+1209",
1481
+ "+1210",
1482
+ "+1212",
1483
+ "+1213",
1484
+ "+1214",
1485
+ "+1215",
1486
+ "+1216",
1487
+ "+1217",
1488
+ "+1218",
1489
+ "+1219",
1490
+ "+1220",
1491
+ "+1223",
1492
+ "+1224",
1493
+ "+1225",
1494
+ "+1227",
1495
+ "+1228",
1496
+ "+1229",
1497
+ "+1231",
1498
+ "+1234",
1499
+ "+1239",
1500
+ "+1240",
1501
+ "+1248",
1502
+ "+1251",
1503
+ "+1252",
1504
+ "+1253",
1505
+ "+1254",
1506
+ "+1256",
1507
+ "+1260",
1508
+ "+1262",
1509
+ "+1267",
1510
+ "+1269",
1511
+ "+1270",
1512
+ "+1272",
1513
+ "+1274",
1514
+ "+1276",
1515
+ "+1279",
1516
+ "+1281",
1517
+ "+1283",
1518
+ "+1301",
1519
+ "+1302",
1520
+ "+1303",
1521
+ "+1304",
1522
+ "+1305",
1523
+ "+1307",
1524
+ "+1308",
1525
+ "+1309",
1526
+ "+1310",
1527
+ "+1312",
1528
+ "+1313",
1529
+ "+1314",
1530
+ "+1315",
1531
+ "+1316",
1532
+ "+1317",
1533
+ "+1318",
1534
+ "+1319",
1535
+ "+1320",
1536
+ "+1321",
1537
+ "+1323",
1538
+ "+1325",
1539
+ "+1326",
1540
+ "+1327",
1541
+ "+1330",
1542
+ "+1331",
1543
+ "+1332",
1544
+ "+1334",
1545
+ "+1336",
1546
+ "+1337",
1547
+ "+1339",
1548
+ "+1341",
1549
+ "+1346",
1550
+ "+1347",
1551
+ "+1351",
1552
+ "+1352",
1553
+ "+1360",
1554
+ "+1361",
1555
+ "+1364",
1556
+ "+1380",
1557
+ "+1385",
1558
+ "+1386",
1559
+ "+1401",
1560
+ "+1402",
1561
+ "+1404",
1562
+ "+1405",
1563
+ "+1406",
1564
+ "+1407",
1565
+ "+1408",
1566
+ "+1409",
1567
+ "+1410",
1568
+ "+1412",
1569
+ "+1413",
1570
+ "+1414",
1571
+ "+1415",
1572
+ "+1417",
1573
+ "+1419",
1574
+ "+1423",
1575
+ "+1424",
1576
+ "+1425",
1577
+ "+1430",
1578
+ "+1432",
1579
+ "+1434",
1580
+ "+1435",
1581
+ "+1440",
1582
+ "+1442",
1583
+ "+1443",
1584
+ "+1445",
1585
+ "+1447",
1586
+ "+1448",
1587
+ "+1458",
1588
+ "+1463",
1589
+ "+1464",
1590
+ "+1469",
1591
+ "+1470",
1592
+ "+1475",
1593
+ "+1478",
1594
+ "+1479",
1595
+ "+1480",
1596
+ "+1484",
1597
+ "+1500",
1598
+ "+1501",
1599
+ "+1502",
1600
+ "+1503",
1601
+ "+1504",
1602
+ "+1505",
1603
+ "+1507",
1604
+ "+1508",
1605
+ "+1509",
1606
+ "+1510",
1607
+ "+1512",
1608
+ "+1513",
1609
+ "+1515",
1610
+ "+1516",
1611
+ "+1517",
1612
+ "+1518",
1613
+ "+1520",
1614
+ "+1521",
1615
+ "+1522",
1616
+ "+1523",
1617
+ "+1524",
1618
+ "+1525",
1619
+ "+1526",
1620
+ "+1527",
1621
+ "+1528",
1622
+ "+1529",
1623
+ "+1530",
1624
+ "+1531",
1625
+ "+1532",
1626
+ "+1533",
1627
+ "+1534",
1628
+ "+1535",
1629
+ "+1538",
1630
+ "+1539",
1631
+ "+1540",
1632
+ "+1541",
1633
+ "+1542",
1634
+ "+1543",
1635
+ "+1544",
1636
+ "+1545",
1637
+ "+1546",
1638
+ "+1547",
1639
+ "+1549",
1640
+ "+1550",
1641
+ "+1551",
1642
+ "+1552",
1643
+ "+1553",
1644
+ "+1554",
1645
+ "+1556",
1646
+ "+1557",
1647
+ "+1558",
1648
+ "+1559",
1649
+ "+1561",
1650
+ "+1562",
1651
+ "+1563",
1652
+ "+1564",
1653
+ "+1566",
1654
+ "+1567",
1655
+ "+1569",
1656
+ "+1570",
1657
+ "+1571",
1658
+ "+1572",
1659
+ "+1573",
1660
+ "+1574",
1661
+ "+1575",
1662
+ "+1577",
1663
+ "+1578",
1664
+ "+1580",
1665
+ "+1582",
1666
+ "+1585",
1667
+ "+1586",
1668
+ "+1588",
1669
+ "+1589",
1670
+ "+1601",
1671
+ "+1602",
1672
+ "+1603",
1673
+ "+1605",
1674
+ "+1606",
1675
+ "+1607",
1676
+ "+1608",
1677
+ "+1609",
1678
+ "+1610",
1679
+ "+1612",
1680
+ "+1614",
1681
+ "+1615",
1682
+ "+1616",
1683
+ "+1617",
1684
+ "+1618",
1685
+ "+1619",
1686
+ "+1620",
1687
+ "+1623",
1688
+ "+1626",
1689
+ "+1628",
1690
+ "+1629",
1691
+ "+1630",
1692
+ "+1631",
1693
+ "+1636",
1694
+ "+1640",
1695
+ "+1641",
1696
+ "+1646",
1697
+ "+1650",
1698
+ "+1651",
1699
+ "+1656",
1700
+ "+1657",
1701
+ "+1659",
1702
+ "+1660",
1703
+ "+1661",
1704
+ "+1662",
1705
+ "+1667",
1706
+ "+1669",
1707
+ "+1678",
1708
+ "+1679",
1709
+ "+1680",
1710
+ "+1681",
1711
+ "+1682",
1712
+ "+1689",
1713
+ "+1700",
1714
+ "+1701",
1715
+ "+1702",
1716
+ "+1703",
1717
+ "+1704",
1718
+ "+1706",
1719
+ "+1707",
1720
+ "+1708",
1721
+ "+1710",
1722
+ "+1712",
1723
+ "+1713",
1724
+ "+1714",
1725
+ "+1715",
1726
+ "+1716",
1727
+ "+1717",
1728
+ "+1718",
1729
+ "+1719",
1730
+ "+1720",
1731
+ "+1724",
1732
+ "+1725",
1733
+ "+1726",
1734
+ "+1727",
1735
+ "+1730",
1736
+ "+1731",
1737
+ "+1732",
1738
+ "+1734",
1739
+ "+1737",
1740
+ "+1740",
1741
+ "+1743",
1742
+ "+1747",
1743
+ "+1754",
1744
+ "+1757",
1745
+ "+1760",
1746
+ "+1762",
1747
+ "+1763",
1748
+ "+1765",
1749
+ "+1769",
1750
+ "+1770",
1751
+ "+1771",
1752
+ "+1772",
1753
+ "+1773",
1754
+ "+1774",
1755
+ "+1775",
1756
+ "+1779",
1757
+ "+1781",
1758
+ "+1785",
1759
+ "+1786",
1760
+ "+1801",
1761
+ "+1802",
1762
+ "+1803",
1763
+ "+1804",
1764
+ "+1805",
1765
+ "+1806",
1766
+ "+1808",
1767
+ "+1810",
1768
+ "+1812",
1769
+ "+1813",
1770
+ "+1814",
1771
+ "+1815",
1772
+ "+1816",
1773
+ "+1817",
1774
+ "+1818",
1775
+ "+1820",
1776
+ "+1826",
1777
+ "+1828",
1778
+ "+1830",
1779
+ "+1831",
1780
+ "+1832",
1781
+ "+1838",
1782
+ "+1839",
1783
+ "+1840",
1784
+ "+1843",
1785
+ "+1845",
1786
+ "+1847",
1787
+ "+1848",
1788
+ "+1850",
1789
+ "+1854",
1790
+ "+1856",
1791
+ "+1857",
1792
+ "+1858",
1793
+ "+1859",
1794
+ "+1860",
1795
+ "+1862",
1796
+ "+1863",
1797
+ "+1864",
1798
+ "+1865",
1799
+ "+1870",
1800
+ "+1872",
1801
+ "+1878",
1802
+ "+1901",
1803
+ "+1903",
1804
+ "+1904",
1805
+ "+1906",
1806
+ "+1907",
1807
+ "+1908",
1808
+ "+1909",
1809
+ "+1910",
1810
+ "+1912",
1811
+ "+1913",
1812
+ "+1914",
1813
+ "+1915",
1814
+ "+1916",
1815
+ "+1917",
1816
+ "+1918",
1817
+ "+1919",
1818
+ "+1920",
1819
+ "+1925",
1820
+ "+1928",
1821
+ "+1929",
1822
+ "+1930",
1823
+ "+1931",
1824
+ "+1934",
1825
+ "+1936",
1826
+ "+1937",
1827
+ "+1938",
1828
+ "+1940",
1829
+ "+1941",
1830
+ "+1943",
1831
+ "+1945",
1832
+ "+1947",
1833
+ "+1948",
1834
+ "+1949",
1835
+ "+1951",
1836
+ "+1952",
1837
+ "+1954",
1838
+ "+1956",
1839
+ "+1959",
1840
+ "+1970",
1841
+ "+1971",
1842
+ "+1972",
1843
+ "+1973",
1844
+ "+1975",
1845
+ "+1978",
1846
+ "+1979",
1847
+ "+1980",
1848
+ "+1983",
1849
+ "+1984",
1850
+ "+1985",
1851
+ "+1986",
1852
+ "+1989"
1853
+ ]
1854
+ },
1855
+ "UY": {
1856
+ "name": "Uruguay",
1857
+ "dialCodes": [
1858
+ "+598"
1859
+ ]
1860
+ },
1861
+ "UZ": {
1862
+ "name": "Uzbekistan",
1863
+ "dialCodes": [
1864
+ "+998"
1865
+ ]
1866
+ },
1867
+ "VA": {
1868
+ "name": "Vatican City",
1869
+ "dialCodes": [
1870
+ "+39",
1871
+ "+3906698",
1872
+ "+379"
1873
+ ]
1874
+ },
1875
+ "VC": {
1876
+ "name": "Saint Vincent and the Grenadines",
1877
+ "dialCodes": [
1878
+ "+1",
1879
+ "+1784"
1880
+ ]
1881
+ },
1882
+ "VE": {
1883
+ "name": "Venezuela",
1884
+ "dialCodes": [
1885
+ "+58"
1886
+ ]
1887
+ },
1888
+ "VG": {
1889
+ "name": "British Virgin Islands",
1890
+ "dialCodes": [
1891
+ "+1",
1892
+ "+1284"
1893
+ ]
1894
+ },
1895
+ "VI": {
1896
+ "name": "United States Virgin Islands",
1897
+ "dialCodes": [
1898
+ "+1",
1899
+ "+1340"
1900
+ ]
1901
+ },
1902
+ "VN": {
1903
+ "name": "Vietnam",
1904
+ "dialCodes": [
1905
+ "+84"
1906
+ ]
1907
+ },
1908
+ "VU": {
1909
+ "name": "Vanuatu",
1910
+ "dialCodes": [
1911
+ "+678"
1912
+ ]
1913
+ },
1914
+ "WF": {
1915
+ "name": "Wallis and Futuna",
1916
+ "dialCodes": [
1917
+ "+681"
1918
+ ]
1919
+ },
1920
+ "WS": {
1921
+ "name": "Samoa",
1922
+ "dialCodes": [
1923
+ "+685"
1924
+ ]
1925
+ },
1926
+ "XK": {
1927
+ "name": "Kosovo",
1928
+ "dialCodes": [
1929
+ "+383"
1930
+ ]
1931
+ },
1932
+ "YE": {
1933
+ "name": "Yemen",
1934
+ "dialCodes": [
1935
+ "+967"
1936
+ ]
1937
+ },
1938
+ "YT": {
1939
+ "name": "Mayotte",
1940
+ "dialCodes": [
1941
+ "+262"
1942
+ ]
1943
+ },
1944
+ "ZA": {
1945
+ "name": "South Africa",
1946
+ "dialCodes": [
1947
+ "+27"
1948
+ ]
1949
+ },
1950
+ "ZM": {
1951
+ "name": "Zambia",
1952
+ "dialCodes": [
1953
+ "+260"
1954
+ ]
1955
+ },
1956
+ "ZW": {
1957
+ "name": "Zimbabwe",
1958
+ "dialCodes": [
1959
+ "+263"
1960
+ ]
1961
+ }
1962
+ };
1963
+
1964
+ // src/countries.ts
8
1965
  var PRIORITY_COUNTRIES = [
9
1966
  "US",
10
1967
  "GB",
@@ -38,29 +1995,9 @@ var PRIORITY_COUNTRIES = [
38
1995
  "AR"
39
1996
  ];
40
1997
  var supportedCountries = new Set(getCountries());
41
- var worldCountryMap = new Map(worldCountries.map((country) => [country.cca2, country]));
42
- var FALLBACK_COUNTRIES = {
43
- AC: { name: "Ascension Island", dialCode: "+247" },
44
- TA: { name: "Tristan da Cunha", dialCode: "+290" },
45
- BQ: { name: "Caribbean Netherlands", dialCode: "+599" }
46
- };
47
- function normalizeDialCode(root, suffix) {
48
- const normalizedRoot = root.startsWith("+") ? root : `+${root}`;
49
- const digitsOnlySuffix = suffix.replace(/\D/g, "");
50
- return `${normalizedRoot}${digitsOnlySuffix}`;
51
- }
52
1998
  function codeToFlag(code) {
53
1999
  return code.toUpperCase().replace(/./g, (char) => String.fromCodePoint(127397 + char.charCodeAt(0)));
54
2000
  }
55
- function buildDialCodes(country, fallbackDialCode) {
56
- const root = country?.idd?.root;
57
- if (!root) {
58
- return [fallbackDialCode];
59
- }
60
- const suffixes = country.idd?.suffixes?.length ? country.idd.suffixes : [""];
61
- const dialCodes = suffixes.map((suffix) => normalizeDialCode(root, suffix)).filter((dialCode) => /^\+\d+$/.test(dialCode));
62
- return Array.from(/* @__PURE__ */ new Set([fallbackDialCode, ...dialCodes.length ? dialCodes : []]));
63
- }
64
2001
  function getCountryFormat(code) {
65
2002
  const example = getExampleNumber(code, examples);
66
2003
  return example ? example.formatNational().replace(/\d/g, "#") : void 0;
@@ -70,16 +2007,15 @@ function getCountryPriority(code) {
70
2007
  return index === -1 ? Number.MAX_SAFE_INTEGER : index;
71
2008
  }
72
2009
  var generatedCountries = Array.from(supportedCountries).map((code) => {
73
- const country = worldCountryMap.get(code);
74
- const fallback = FALLBACK_COUNTRIES[code];
75
- const dialCode = fallback?.dialCode ?? `+${getCountryCallingCode(code)}`;
76
- const dialCodes = buildDialCodes(country, dialCode);
2010
+ const data = COUNTRY_DATA[code];
2011
+ const dialCode = data?.dialCodes[0] ?? `+${getCountryCallingCode(code)}`;
2012
+ const dialCodes = data?.dialCodes ?? [dialCode];
77
2013
  return {
78
2014
  code,
79
- name: country?.name.common ?? fallback?.name ?? code,
2015
+ name: data?.name ?? code,
80
2016
  dialCode,
81
2017
  dialCodes,
82
- flag: country?.flag || fallback?.flag || codeToFlag(code),
2018
+ flag: codeToFlag(code),
83
2019
  format: getCountryFormat(code)
84
2020
  };
85
2021
  }).sort((left, right) => {
@@ -210,7 +2146,8 @@ var DEFAULT_PHONE_INPUT_LABELS = {
210
2146
  noCountriesFound: "No countries found",
211
2147
  searchCountriesAriaLabel: "Search countries",
212
2148
  countryOptionsAriaLabel: "Country options",
213
- countryButtonAriaLabel: "Open country selector"
2149
+ countryButtonAriaLabel: "Open country selector",
2150
+ countryResultsAnnouncement: "{count} countries"
214
2151
  };
215
2152
  var LABELS_BY_LANGUAGE = {
216
2153
  en: DEFAULT_PHONE_INPUT_LABELS,
@@ -220,7 +2157,8 @@ var LABELS_BY_LANGUAGE = {
220
2157
  noCountriesFound: "Aucun pays trouv\xE9",
221
2158
  searchCountriesAriaLabel: "Rechercher des pays",
222
2159
  countryOptionsAriaLabel: "Options de pays",
223
- countryButtonAriaLabel: "Ouvrir le s\xE9lecteur de pays"
2160
+ countryButtonAriaLabel: "Ouvrir le s\xE9lecteur de pays",
2161
+ countryResultsAnnouncement: "{count} pays"
224
2162
  },
225
2163
  de: {
226
2164
  selectCountry: "Land ausw\xE4hlen",
@@ -228,7 +2166,8 @@ var LABELS_BY_LANGUAGE = {
228
2166
  noCountriesFound: "Keine L\xE4nder gefunden",
229
2167
  searchCountriesAriaLabel: "L\xE4nder suchen",
230
2168
  countryOptionsAriaLabel: "L\xE4nderoptionen",
231
- countryButtonAriaLabel: "L\xE4nderauswahl \xF6ffnen"
2169
+ countryButtonAriaLabel: "L\xE4nderauswahl \xF6ffnen",
2170
+ countryResultsAnnouncement: "{count} L\xE4nder"
232
2171
  },
233
2172
  es: {
234
2173
  selectCountry: "Seleccionar pa\xEDs",
@@ -236,7 +2175,8 @@ var LABELS_BY_LANGUAGE = {
236
2175
  noCountriesFound: "No se encontraron pa\xEDses",
237
2176
  searchCountriesAriaLabel: "Buscar pa\xEDses",
238
2177
  countryOptionsAriaLabel: "Opciones de pa\xEDs",
239
- countryButtonAriaLabel: "Abrir selector de pa\xEDs"
2178
+ countryButtonAriaLabel: "Abrir selector de pa\xEDs",
2179
+ countryResultsAnnouncement: "{count} pa\xEDses"
240
2180
  },
241
2181
  pt: {
242
2182
  selectCountry: "Selecionar pa\xEDs",
@@ -244,7 +2184,8 @@ var LABELS_BY_LANGUAGE = {
244
2184
  noCountriesFound: "Nenhum pa\xEDs encontrado",
245
2185
  searchCountriesAriaLabel: "Pesquisar pa\xEDses",
246
2186
  countryOptionsAriaLabel: "Op\xE7\xF5es de pa\xEDs",
247
- countryButtonAriaLabel: "Abrir seletor de pa\xEDs"
2187
+ countryButtonAriaLabel: "Abrir seletor de pa\xEDs",
2188
+ countryResultsAnnouncement: "{count} pa\xEDses"
248
2189
  },
249
2190
  it: {
250
2191
  selectCountry: "Seleziona paese",
@@ -252,7 +2193,8 @@ var LABELS_BY_LANGUAGE = {
252
2193
  noCountriesFound: "Nessun paese trovato",
253
2194
  searchCountriesAriaLabel: "Cerca paesi",
254
2195
  countryOptionsAriaLabel: "Opzioni paese",
255
- countryButtonAriaLabel: "Apri selettore paese"
2196
+ countryButtonAriaLabel: "Apri selettore paese",
2197
+ countryResultsAnnouncement: "{count} paesi"
256
2198
  },
257
2199
  ja: {
258
2200
  selectCountry: "\u56FD\u3092\u9078\u629E",
@@ -260,7 +2202,8 @@ var LABELS_BY_LANGUAGE = {
260
2202
  noCountriesFound: "\u56FD\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093",
261
2203
  searchCountriesAriaLabel: "\u56FD\u3092\u691C\u7D22",
262
2204
  countryOptionsAriaLabel: "\u56FD\u306E\u5019\u88DC",
263
- countryButtonAriaLabel: "\u56FD\u306E\u30BB\u30EC\u30AF\u30BF\u30FC\u3092\u958B\u304F"
2205
+ countryButtonAriaLabel: "\u56FD\u306E\u30BB\u30EC\u30AF\u30BF\u30FC\u3092\u958B\u304F",
2206
+ countryResultsAnnouncement: "{count} \u4EF6\u306E\u56FD"
264
2207
  },
265
2208
  ko: {
266
2209
  selectCountry: "\uAD6D\uAC00 \uC120\uD0DD",
@@ -268,7 +2211,8 @@ var LABELS_BY_LANGUAGE = {
268
2211
  noCountriesFound: "\uAD6D\uAC00\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4",
269
2212
  searchCountriesAriaLabel: "\uAD6D\uAC00 \uAC80\uC0C9",
270
2213
  countryOptionsAriaLabel: "\uAD6D\uAC00 \uC635\uC158",
271
- countryButtonAriaLabel: "\uAD6D\uAC00 \uC120\uD0DD\uAE30 \uC5F4\uAE30"
2214
+ countryButtonAriaLabel: "\uAD6D\uAC00 \uC120\uD0DD\uAE30 \uC5F4\uAE30",
2215
+ countryResultsAnnouncement: "\uAD6D\uAC00 {count}\uAC1C"
272
2216
  },
273
2217
  zh: {
274
2218
  selectCountry: "\u9009\u62E9\u56FD\u5BB6",
@@ -276,7 +2220,8 @@ var LABELS_BY_LANGUAGE = {
276
2220
  noCountriesFound: "\u672A\u627E\u5230\u56FD\u5BB6",
277
2221
  searchCountriesAriaLabel: "\u641C\u7D22\u56FD\u5BB6",
278
2222
  countryOptionsAriaLabel: "\u56FD\u5BB6\u9009\u9879",
279
- countryButtonAriaLabel: "\u6253\u5F00\u56FD\u5BB6\u9009\u62E9\u5668"
2223
+ countryButtonAriaLabel: "\u6253\u5F00\u56FD\u5BB6\u9009\u62E9\u5668",
2224
+ countryResultsAnnouncement: "{count} \u4E2A\u56FD\u5BB6"
280
2225
  },
281
2226
  ar: {
282
2227
  selectCountry: "\u0627\u062E\u062A\u0631 \u0627\u0644\u062F\u0648\u0644\u0629",
@@ -284,7 +2229,8 @@ var LABELS_BY_LANGUAGE = {
284
2229
  noCountriesFound: "\u0644\u0645 \u064A\u062A\u0645 \u0627\u0644\u0639\u062B\u0648\u0631 \u0639\u0644\u0649 \u062F\u0648\u0644",
285
2230
  searchCountriesAriaLabel: "\u0627\u0628\u062D\u062B \u0639\u0646 \u0627\u0644\u062F\u0648\u0644",
286
2231
  countryOptionsAriaLabel: "\u062E\u064A\u0627\u0631\u0627\u062A \u0627\u0644\u062F\u0648\u0644",
287
- countryButtonAriaLabel: "\u0627\u0641\u062A\u062D \u0645\u062D\u062F\u062F \u0627\u0644\u062F\u0648\u0644\u0629"
2232
+ countryButtonAriaLabel: "\u0627\u0641\u062A\u062D \u0645\u062D\u062F\u062F \u0627\u0644\u062F\u0648\u0644\u0629",
2233
+ countryResultsAnnouncement: "{count} \u062F\u0648\u0644\u0629"
288
2234
  },
289
2235
  hi: {
290
2236
  selectCountry: "\u0926\u0947\u0936 \u091A\u0941\u0928\u0947\u0902",
@@ -292,7 +2238,8 @@ var LABELS_BY_LANGUAGE = {
292
2238
  noCountriesFound: "\u0915\u094B\u0908 \u0926\u0947\u0936 \u0928\u0939\u0940\u0902 \u092E\u093F\u0932\u093E",
293
2239
  searchCountriesAriaLabel: "\u0926\u0947\u0936 \u0916\u094B\u091C\u0947\u0902",
294
2240
  countryOptionsAriaLabel: "\u0926\u0947\u0936 \u0935\u093F\u0915\u0932\u094D\u092A",
295
- countryButtonAriaLabel: "\u0926\u0947\u0936 \u091A\u092F\u0928 \u0916\u094B\u0932\u0947\u0902"
2241
+ countryButtonAriaLabel: "\u0926\u0947\u0936 \u091A\u092F\u0928 \u0916\u094B\u0932\u0947\u0902",
2242
+ countryResultsAnnouncement: "{count} \u0926\u0947\u0936"
296
2243
  }
297
2244
  };
298
2245
  function getPrimaryLanguage(locale) {
@@ -634,6 +2581,8 @@ function usePhoneInput(options = {}) {
634
2581
  const [country, setCountry] = useState(initialCountry);
635
2582
  const [isOpen, setIsOpen] = useState(false);
636
2583
  const [searchQuery, setSearchQuery] = useState("");
2584
+ const [highlightedIndex, setHighlightedIndex] = useState(0);
2585
+ const listboxId = useId();
637
2586
  const phone = isControlled ? controlledValue : internalPhone;
638
2587
  const getOutputCountry = useCallback(
639
2588
  (nextCountry) => localizeCountry(nextCountry, locale),
@@ -704,6 +2653,26 @@ function usePhoneInput(options = {}) {
704
2653
  () => filterCountries(localizedCountries, searchQuery, preferredCountries),
705
2654
  [localizedCountries, searchQuery, preferredCountries]
706
2655
  );
2656
+ useEffect(() => {
2657
+ setHighlightedIndex(0);
2658
+ }, [searchQuery]);
2659
+ useEffect(() => {
2660
+ setHighlightedIndex((current) => {
2661
+ if (filteredCountries.length === 0) {
2662
+ return 0;
2663
+ }
2664
+ return current >= filteredCountries.length ? filteredCountries.length - 1 : current;
2665
+ });
2666
+ }, [filteredCountries.length]);
2667
+ const wasOpenRef = useRef(false);
2668
+ useEffect(() => {
2669
+ if (isOpen && !wasOpenRef.current) {
2670
+ const selectedIndex = filteredCountries.findIndex((candidate) => candidate.code === country?.code);
2671
+ setHighlightedIndex(selectedIndex >= 0 ? selectedIndex : 0);
2672
+ }
2673
+ wasOpenRef.current = isOpen;
2674
+ }, [isOpen, filteredCountries, country?.code]);
2675
+ const activeCountry = filteredCountries[highlightedIndex];
707
2676
  useIsomorphicLayoutEffect(() => {
708
2677
  const nextDigitIndex = pendingCaretDigitIndexRef.current;
709
2678
  const input = inputRef.current;
@@ -816,11 +2785,22 @@ function usePhoneInput(options = {}) {
816
2785
  (code) => `phone-input-country-${code}`,
817
2786
  []
818
2787
  );
2788
+ const activeOptionId = activeCountry ? getCountryOptionId(activeCountry.code) : void 0;
2789
+ const countryResultsText = filteredCountries.length === 0 ? resolvedLabels.noCountriesFound : resolvedLabels.countryResultsAnnouncement.replace("{count}", String(filteredCountries.length));
2790
+ const moveHighlight = useCallback(
2791
+ (nextIndex) => {
2792
+ const lastIndex = filteredCountries.length - 1;
2793
+ setHighlightedIndex(lastIndex < 0 ? 0 : Math.min(Math.max(nextIndex, 0), lastIndex));
2794
+ },
2795
+ [filteredCountries.length]
2796
+ );
819
2797
  const getCountryOptionProps = useCallback(
820
2798
  (optionCountry, index) => ({
821
2799
  id: getCountryOptionId(optionCountry.code),
822
2800
  role: "option",
823
- "aria-selected": optionCountry.code === country?.code,
2801
+ // Selection follows the active option in a single-select listbox, so this
2802
+ // tracks the highlight rather than the committed country.
2803
+ "aria-selected": index === highlightedIndex,
824
2804
  onClick: () => selectCountry(optionCountry),
825
2805
  onKeyDown: (event) => {
826
2806
  if (event.key === "Enter" || event.key === " ") {
@@ -834,7 +2814,7 @@ function usePhoneInput(options = {}) {
834
2814
  },
835
2815
  tabIndex: index === 0 ? 0 : -1
836
2816
  }),
837
- [closeDropdown, country?.code, getCountryOptionId, selectCountry]
2817
+ [closeDropdown, highlightedIndex, getCountryOptionId, selectCountry]
838
2818
  );
839
2819
  return {
840
2820
  // State
@@ -849,6 +2829,9 @@ function usePhoneInput(options = {}) {
849
2829
  searchQuery,
850
2830
  labels: resolvedLabels,
851
2831
  formattedValue: formattedPhone,
2832
+ highlightedIndex,
2833
+ activeCountry,
2834
+ countryResultsText,
852
2835
  // Actions
853
2836
  setPhone,
854
2837
  setValue: setPhone,
@@ -860,6 +2843,8 @@ function usePhoneInput(options = {}) {
860
2843
  closeDropdown,
861
2844
  close: closeDropdown,
862
2845
  setSearchQuery,
2846
+ setHighlightedIndex,
2847
+ moveHighlight,
863
2848
  clear,
864
2849
  // Props
865
2850
  inputProps: {
@@ -878,7 +2863,21 @@ function usePhoneInput(options = {}) {
878
2863
  onClick: toggleDropdown,
879
2864
  "aria-expanded": isOpen,
880
2865
  "aria-haspopup": "listbox",
881
- "aria-label": countryButtonAriaLabel
2866
+ "aria-label": countryButtonAriaLabel,
2867
+ "aria-controls": listboxId
2868
+ },
2869
+ // The search field is the combobox: it keeps focus while the arrow keys
2870
+ // move `aria-activedescendant` through the listbox.
2871
+ countrySearchProps: {
2872
+ role: "combobox",
2873
+ value: searchQuery,
2874
+ onChange: (event) => setSearchQuery(event.target.value),
2875
+ "aria-expanded": isOpen,
2876
+ "aria-controls": listboxId,
2877
+ "aria-autocomplete": "list",
2878
+ "aria-activedescendant": activeOptionId,
2879
+ "aria-label": resolvedLabels.searchCountriesAriaLabel,
2880
+ placeholder: resolvedLabels.countrySearchPlaceholder
882
2881
  },
883
2882
  countrySelectorProps: {
884
2883
  onClick: toggleDropdown,
@@ -887,9 +2886,12 @@ function usePhoneInput(options = {}) {
887
2886
  "aria-label": countryButtonAriaLabel
888
2887
  },
889
2888
  dropdownProps: {
2889
+ id: listboxId,
890
2890
  role: "listbox",
891
2891
  "aria-label": resolvedLabels.countryOptionsAriaLabel
892
2892
  },
2893
+ listboxId,
2894
+ activeOptionId,
893
2895
  getCountryOptionId,
894
2896
  filteredCountries,
895
2897
  countries: filteredCountries,
@@ -924,24 +2926,25 @@ var PhoneInput = forwardRef(
924
2926
  const inputRef = useRef(null);
925
2927
  const optionRefs = useRef([]);
926
2928
  const countryButtonRef = useRef(null);
927
- const [highlightedIndex, setHighlightedIndex] = useState(0);
928
- const listboxId = useId();
929
2929
  const {
930
2930
  inputProps,
931
2931
  countryButtonProps,
2932
+ countrySearchProps,
932
2933
  dropdownProps,
933
2934
  country,
934
2935
  filteredCountries,
935
2936
  isOpen,
936
2937
  isValid,
937
- searchQuery,
938
- setSearchQuery,
939
2938
  setCountry,
940
2939
  selectCountry,
941
2940
  clear,
942
2941
  openDropdown,
943
2942
  closeDropdown,
944
2943
  getCountryOptionId,
2944
+ highlightedIndex,
2945
+ setHighlightedIndex,
2946
+ moveHighlight,
2947
+ countryResultsText,
945
2948
  labels
946
2949
  } = usePhoneInput({
947
2950
  value,
@@ -971,7 +2974,6 @@ var PhoneInput = forwardRef(
971
2974
  }, []);
972
2975
  const handleCountryClick = useCallback((c) => {
973
2976
  selectCountry(c);
974
- setHighlightedIndex(0);
975
2977
  returnFocusToButton();
976
2978
  }, [selectCountry, returnFocusToButton]);
977
2979
  const handleCountryKeyDown = useCallback((e, c, index) => {
@@ -980,7 +2982,6 @@ var PhoneInput = forwardRef(
980
2982
  case " ":
981
2983
  e.preventDefault();
982
2984
  selectCountry(c);
983
- setHighlightedIndex(0);
984
2985
  returnFocusToButton();
985
2986
  break;
986
2987
  case "ArrowDown":
@@ -1017,7 +3018,7 @@ var PhoneInput = forwardRef(
1017
3018
  returnFocusToButton();
1018
3019
  break;
1019
3020
  }
1020
- }, [selectCountry, filteredCountries.length, closeDropdown, returnFocusToButton]);
3021
+ }, [selectCountry, filteredCountries.length, closeDropdown, returnFocusToButton, setHighlightedIndex]);
1021
3022
  useEffect(() => {
1022
3023
  if (!isOpen) {
1023
3024
  return;
@@ -1042,16 +3043,14 @@ var PhoneInput = forwardRef(
1042
3043
  };
1043
3044
  }, [isOpen, closeDropdown]);
1044
3045
  useEffect(() => {
1045
- if (filteredCountries.length === 0) {
1046
- if (highlightedIndex !== 0) {
1047
- setHighlightedIndex(0);
1048
- }
3046
+ if (!isOpen || !searchable) {
1049
3047
  return;
1050
3048
  }
1051
- if (highlightedIndex >= filteredCountries.length) {
1052
- setHighlightedIndex(filteredCountries.length - 1);
3049
+ const activeOption = optionRefs.current[highlightedIndex];
3050
+ if (typeof activeOption?.scrollIntoView === "function") {
3051
+ activeOption.scrollIntoView({ block: "nearest" });
1053
3052
  }
1054
- }, [filteredCountries.length, highlightedIndex]);
3053
+ }, [isOpen, searchable, highlightedIndex]);
1055
3054
  useImperativeHandle(ref, () => ({
1056
3055
  focus,
1057
3056
  blur,
@@ -1062,16 +3061,39 @@ var PhoneInput = forwardRef(
1062
3061
  close: closeDropdown
1063
3062
  }));
1064
3063
  const handleSearchKeyDown = useCallback((e) => {
1065
- if (e.key === "ArrowDown") {
1066
- e.preventDefault();
1067
- setHighlightedIndex(0);
1068
- optionRefs.current[0]?.focus();
1069
- } else if (e.key === "Escape") {
1070
- e.preventDefault();
1071
- closeDropdown();
1072
- returnFocusToButton();
3064
+ switch (e.key) {
3065
+ case "ArrowDown":
3066
+ e.preventDefault();
3067
+ moveHighlight(highlightedIndex + 1);
3068
+ break;
3069
+ case "ArrowUp":
3070
+ e.preventDefault();
3071
+ moveHighlight(highlightedIndex - 1);
3072
+ break;
3073
+ case "Home":
3074
+ e.preventDefault();
3075
+ moveHighlight(0);
3076
+ break;
3077
+ case "End":
3078
+ e.preventDefault();
3079
+ moveHighlight(filteredCountries.length - 1);
3080
+ break;
3081
+ case "Enter": {
3082
+ const active = filteredCountries[highlightedIndex];
3083
+ if (active) {
3084
+ e.preventDefault();
3085
+ selectCountry(active);
3086
+ returnFocusToButton();
3087
+ }
3088
+ break;
3089
+ }
3090
+ case "Escape":
3091
+ e.preventDefault();
3092
+ closeDropdown();
3093
+ returnFocusToButton();
3094
+ break;
1073
3095
  }
1074
- }, [closeDropdown, returnFocusToButton]);
3096
+ }, [closeDropdown, returnFocusToButton, moveHighlight, highlightedIndex, filteredCountries, selectCountry]);
1075
3097
  return /* @__PURE__ */ jsxs("div", { ref: containerRef, className: containerClassName, "data-valid": isValid, children: [
1076
3098
  /* @__PURE__ */ jsxs(
1077
3099
  "button",
@@ -1082,7 +3104,6 @@ var PhoneInput = forwardRef(
1082
3104
  className: selectorClassName,
1083
3105
  disabled,
1084
3106
  tabIndex: disabled ? -1 : 0,
1085
- "aria-controls": listboxId,
1086
3107
  children: [
1087
3108
  country ? /* @__PURE__ */ jsxs(Fragment, { children: [
1088
3109
  /* @__PURE__ */ jsx("span", { className: "phone-input-flag", children: country.flag }),
@@ -1111,22 +3132,26 @@ var PhoneInput = forwardRef(
1111
3132
  searchable && /* @__PURE__ */ jsx("div", { className: "phone-input-search", children: /* @__PURE__ */ jsx(
1112
3133
  "input",
1113
3134
  {
3135
+ ...countrySearchProps,
1114
3136
  type: "text",
1115
- value: searchQuery,
1116
- onChange: (e) => setSearchQuery(e.target.value),
1117
3137
  onKeyDown: handleSearchKeyDown,
1118
- placeholder: labels.countrySearchPlaceholder,
1119
- autoFocus: true,
1120
- "aria-controls": listboxId,
1121
- "aria-label": labels.searchCountriesAriaLabel
3138
+ autoFocus: true
1122
3139
  }
1123
3140
  ) }),
3141
+ /* @__PURE__ */ jsx(
3142
+ "div",
3143
+ {
3144
+ role: "status",
3145
+ "aria-live": "polite",
3146
+ style: { position: "absolute", width: 1, height: 1, overflow: "hidden", clip: "rect(0 0 0 0)", whiteSpace: "nowrap" },
3147
+ children: countryResultsText
3148
+ }
3149
+ ),
1124
3150
  /* @__PURE__ */ jsxs(
1125
3151
  "ul",
1126
3152
  {
1127
3153
  ...dropdownProps,
1128
3154
  className: "phone-input-country-list",
1129
- id: listboxId,
1130
3155
  children: [
1131
3156
  filteredCountries.map((c, index) => /* @__PURE__ */ jsxs(
1132
3157
  "li",
@@ -1136,12 +3161,12 @@ var PhoneInput = forwardRef(
1136
3161
  optionRefs.current[index] = element;
1137
3162
  },
1138
3163
  role: "option",
1139
- "aria-selected": c.code === country?.code,
3164
+ "aria-selected": index === highlightedIndex,
1140
3165
  className: `phone-input-country-option ${c.code === country?.code ? "selected" : ""} ${index === highlightedIndex ? "highlighted" : ""}`,
1141
3166
  onClick: () => handleCountryClick(c),
1142
3167
  onKeyDown: (e) => handleCountryKeyDown(e, c, index),
1143
3168
  onMouseEnter: () => setHighlightedIndex(index),
1144
- tabIndex: index === highlightedIndex ? 0 : -1,
3169
+ tabIndex: searchable ? -1 : index === highlightedIndex ? 0 : -1,
1145
3170
  children: [
1146
3171
  /* @__PURE__ */ jsx("span", { className: "phone-input-flag", children: c.flag }),
1147
3172
  /* @__PURE__ */ jsx("span", { className: "phone-input-country-name", children: getCountryDisplayName(c) }),