Skip to content

Commit 0db4661

Browse files
fix(clerk-js): Update and expand country code data (#7378)
1 parent 4ff106a commit 0db4661

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

.changeset/legal-hands-lead.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/clerk-js': patch
3+
---
4+
5+
Country code updates: Aland Islands, Ascension Island, Kosovo, Mayotte, Western Sahara, and updated names for Algeria, Congo (split into Democratic Republic and Republic), Macedonia (to North Macedonia), and Swaziland (to Eswatini).

packages/clerk-js/src/ui/elements/PhoneInput/countryCodeData.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ const data = [
1313
['France', 'fr', '33', '. .. .. .. ..', 100],
1414
['Russia', 'ru', '7', '... ...-..-..', 100],
1515
['Afghanistan', 'af', '93'],
16+
['Åland Islands', 'ax', '358'],
1617
['Albania', 'al', '355'],
17-
['Algeria ', 'dz', '213'],
18+
['Algeria', 'dz', '213'],
1819
['American Samoa', 'as', '1684'],
1920
['Andorra', 'ad', '376'],
2021
['Angola', 'ao', '244'],
@@ -23,6 +24,7 @@ const data = [
2324
['Argentina', 'ar', '54'],
2425
['Armenia', 'am', '374'],
2526
['Aruba', 'aw', '297'],
27+
['Ascension Island', 'ac', '247'],
2628
['Australia', 'au', '61', '... ... ...'],
2729
['Austria', 'at', '43'],
2830
['Azerbaijan', 'az', '994'],
@@ -57,8 +59,8 @@ const data = [
5759
['China', 'cn', '86', '...-....-....'],
5860
['Colombia', 'co', '57'],
5961
['Comoros', 'km', '269'],
60-
['Congo', 'cd', '243'],
61-
['Congo', 'cg', '242'],
62+
['Democratic Republic of the Congo', 'cd', '243'],
63+
['Republic of the Congo', 'cg', '242'],
6264
['Cook Islands', 'ck', '682'],
6365
['Costa Rica', 'cr', '506', '....-....'],
6466
['Côte d’Ivoire', 'ci', '225'],
@@ -115,6 +117,7 @@ const data = [
115117
['Kazakhstan', 'kz', '7', '... ...-..-..'],
116118
['Kenya', 'ke', '254'],
117119
['Kiribati', 'ki', '686'],
120+
['Kosovo', 'xk', '383'],
118121
['Kuwait', 'kw', '965'],
119122
['Kyrgyzstan', 'kg', '996'],
120123
['Laos', 'la', '856'],
@@ -127,7 +130,6 @@ const data = [
127130
['Lithuania', 'lt', '370'],
128131
['Luxembourg', 'lu', '352'],
129132
['Macau', 'mo', '853'],
130-
['Macedonia', 'mk', '389'],
131133
['Madagascar', 'mg', '261'],
132134
['Malawi', 'mw', '265'],
133135
['Malaysia', 'my', '60', '..-....-....'],
@@ -138,6 +140,7 @@ const data = [
138140
['Martinique', 'mq', '596'],
139141
['Mauritania', 'mr', '222'],
140142
['Mauritius', 'mu', '230'],
143+
['Mayotte', 'yt', '262'],
141144
['Mexico', 'mx', '52'],
142145
['Micronesia', 'fm', '691'],
143146
['Moldova', 'md', '373'],
@@ -160,6 +163,7 @@ const data = [
160163
['Niue', 'nu', '683'],
161164
['Norfolk Island', 'nf', '672'],
162165
['North Korea', 'kp', '850'],
166+
['North Macedonia', 'mk', '389'],
163167
['Northern Mariana Islands', 'mp', '1670'],
164168
['Norway', 'no', '47', '... .. ...'],
165169
['Oman', 'om', '968'],
@@ -206,7 +210,7 @@ const data = [
206210
['Sri Lanka', 'lk', '94'],
207211
['Sudan', 'sd', '249'],
208212
['Suriname', 'sr', '597'],
209-
['Swaziland', 'sz', '268'],
213+
['Eswatini', 'sz', '268'],
210214
['Sweden', 'se', '46', '.. ... .. ..'],
211215
['Switzerland', 'ch', '41', '.. ... .. ..'],
212216
['Syria', 'sy', '963'],
@@ -235,6 +239,7 @@ const data = [
235239
['Venezuela', 've', '58'],
236240
['Vietnam', 'vn', '84'],
237241
['Wallis and Futuna', 'wf', '681'],
242+
['Western Sahara', 'eh', '212'],
238243
['Yemen', 'ye', '967'],
239244
['Zambia', 'zm', '260'],
240245
['Zimbabwe', 'zw', '263'],

0 commit comments

Comments
 (0)