@preply/ds-web-lib 3.1.1-beta.060c7778978d1ba1488656e79c5f79997a641cf1.0 → 3.1.1-beta.857b0ab30a03b836ac6c63997eeb17f464e3510c.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/assets/Accordion.css +2 -2
- package/dist/assets/AlertDialog.css +2 -2
- package/dist/assets/Avatar.css +3 -3
- package/dist/assets/AvatarWithStatus.css +2 -2
- package/dist/assets/Badge.css +1 -1
- package/dist/assets/Box.css +3 -3
- package/dist/assets/Button.css +4 -4
- package/dist/assets/ButtonBase.css +4 -4
- package/dist/assets/Checkbox.css +2 -2
- package/dist/assets/Chips.css +2 -2
- package/dist/assets/CountryFlag.css +5 -0
- package/dist/assets/Dialog.css +3 -3
- package/dist/assets/FieldButton.css +3 -3
- package/dist/assets/FormControl.css +1 -1
- package/dist/assets/Heading.css +3 -3
- package/dist/assets/Icon.css +3 -3
- package/dist/assets/InputContainer.css +2 -2
- package/dist/assets/LayoutFlex.css +1 -1
- package/dist/assets/LayoutFlexItem.css +1 -1
- package/dist/assets/Link.css +3 -3
- package/dist/assets/Loader.css +1 -1
- package/dist/assets/OnboardingTooltip.css +1 -1
- package/dist/assets/OnboardingTour.css +1 -1
- package/dist/assets/PreplyLogo.css +1 -1
- package/dist/assets/ProgressBar.css +1 -1
- package/dist/assets/ProgressSteps.css +1 -1
- package/dist/assets/Spinner.css +3 -3
- package/dist/assets/Steps.css +1 -1
- package/dist/assets/Text.css +3 -3
- package/dist/assets/TextHighlighted.css +3 -3
- package/dist/assets/TextInline.css +3 -3
- package/dist/assets/Toast.css +2 -2
- package/dist/assets/Tooltip.css +1 -1
- package/dist/assets/align-self.css +1 -1
- package/dist/assets/color.css +2 -2
- package/dist/assets/exp-color.css +2 -2
- package/dist/assets/layout-gap.css +3 -3
- package/dist/assets/layout-grid.css +3 -3
- package/dist/assets/layout-hide.css +1 -1
- package/dist/assets/layout-padding.css +3 -3
- package/dist/assets/layout-relative.css +1 -1
- package/dist/assets/text-accent.css +2 -2
- package/dist/assets/text-centered.css +1 -1
- package/dist/assets/text-weight.css +2 -2
- package/dist/components/CountryFlag/CountryFlag.d.ts +78 -0
- package/dist/components/CountryFlag/CountryFlag.d.ts.map +1 -0
- package/dist/components/CountryFlag/CountryFlag.js +33 -0
- package/dist/components/CountryFlag/types.d.ts +3 -0
- package/dist/components/CountryFlag/types.d.ts.map +1 -0
- package/dist/components/CountryFlag/types.js +1 -0
- package/dist/components/CountryFlag/utils/countries.d.ts +276 -0
- package/dist/components/CountryFlag/utils/countries.d.ts.map +1 -0
- package/dist/components/CountryFlag/utils/countries.js +275 -0
- package/dist/components/CountryFlag/utils/getCountryFlagUrl.d.ts +7 -0
- package/dist/components/CountryFlag/utils/getCountryFlagUrl.d.ts.map +1 -0
- package/dist/components/CountryFlag/utils/getCountryFlagUrl.js +14 -0
- package/dist/components/FormControl/FormControl.d.ts +1 -8
- package/dist/components/FormControl/FormControl.d.ts.map +1 -1
- package/dist/components/FormControl/FormControl.js +4 -12
- package/dist/components/NumberField/NumberField.d.ts.map +1 -1
- package/dist/components/NumberField/NumberField.js +1 -2
- package/dist/components/PasswordField/PasswordField.d.ts.map +1 -1
- package/dist/components/PasswordField/PasswordField.js +1 -2
- package/dist/components/SelectField/SelectField.d.ts.map +1 -1
- package/dist/components/SelectField/SelectField.js +1 -2
- package/dist/components/TextField/TextField.d.ts.map +1 -1
- package/dist/components/TextField/TextField.js +1 -2
- package/dist/components/TextareaField/TextareaField.d.ts.map +1 -1
- package/dist/components/TextareaField/TextareaField.js +1 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/index.js +2 -0
- package/package.json +8 -8
@@ -0,0 +1,276 @@
|
|
1
|
+
/**
|
2
|
+
* The following country list come from {@link https://github.com/lipis/flag-icons/blob/main/country.json.|the flag-icons library}.
|
3
|
+
*/
|
4
|
+
export declare const countryNames: {
|
5
|
+
af: string;
|
6
|
+
ax: string;
|
7
|
+
al: string;
|
8
|
+
dz: string;
|
9
|
+
as: string;
|
10
|
+
ad: string;
|
11
|
+
ao: string;
|
12
|
+
ai: string;
|
13
|
+
aq: string;
|
14
|
+
ag: string;
|
15
|
+
ar: string;
|
16
|
+
am: string;
|
17
|
+
aw: string;
|
18
|
+
'sh-ac': string;
|
19
|
+
asean: string;
|
20
|
+
au: string;
|
21
|
+
at: string;
|
22
|
+
az: string;
|
23
|
+
bs: string;
|
24
|
+
bh: string;
|
25
|
+
bd: string;
|
26
|
+
bb: string;
|
27
|
+
'es-pv': string;
|
28
|
+
by: string;
|
29
|
+
be: string;
|
30
|
+
bz: string;
|
31
|
+
bj: string;
|
32
|
+
bm: string;
|
33
|
+
bt: string;
|
34
|
+
bo: string;
|
35
|
+
bq: string;
|
36
|
+
ba: string;
|
37
|
+
bw: string;
|
38
|
+
bv: string;
|
39
|
+
br: string;
|
40
|
+
io: string;
|
41
|
+
bn: string;
|
42
|
+
bg: string;
|
43
|
+
bf: string;
|
44
|
+
bi: string;
|
45
|
+
cv: string;
|
46
|
+
kh: string;
|
47
|
+
cm: string;
|
48
|
+
ca: string;
|
49
|
+
ic: string;
|
50
|
+
'es-ct': string;
|
51
|
+
ky: string;
|
52
|
+
cf: string;
|
53
|
+
cefta: string;
|
54
|
+
td: string;
|
55
|
+
cl: string;
|
56
|
+
cn: string;
|
57
|
+
cx: string;
|
58
|
+
cp: string;
|
59
|
+
cc: string;
|
60
|
+
co: string;
|
61
|
+
km: string;
|
62
|
+
ck: string;
|
63
|
+
cr: string;
|
64
|
+
hr: string;
|
65
|
+
cu: string;
|
66
|
+
cw: string;
|
67
|
+
cy: string;
|
68
|
+
cz: string;
|
69
|
+
ci: string;
|
70
|
+
cd: string;
|
71
|
+
dk: string;
|
72
|
+
dg: string;
|
73
|
+
dj: string;
|
74
|
+
dm: string;
|
75
|
+
do: string;
|
76
|
+
eac: string;
|
77
|
+
ec: string;
|
78
|
+
eg: string;
|
79
|
+
sv: string;
|
80
|
+
'gb-eng': string;
|
81
|
+
gq: string;
|
82
|
+
er: string;
|
83
|
+
ee: string;
|
84
|
+
sz: string;
|
85
|
+
et: string;
|
86
|
+
eu: string;
|
87
|
+
fk: string;
|
88
|
+
fo: string;
|
89
|
+
fm: string;
|
90
|
+
fj: string;
|
91
|
+
fi: string;
|
92
|
+
fr: string;
|
93
|
+
gf: string;
|
94
|
+
pf: string;
|
95
|
+
tf: string;
|
96
|
+
ga: string;
|
97
|
+
'es-ga': string;
|
98
|
+
gm: string;
|
99
|
+
ge: string;
|
100
|
+
de: string;
|
101
|
+
gh: string;
|
102
|
+
gi: string;
|
103
|
+
gr: string;
|
104
|
+
gl: string;
|
105
|
+
gd: string;
|
106
|
+
gp: string;
|
107
|
+
gu: string;
|
108
|
+
gt: string;
|
109
|
+
gg: string;
|
110
|
+
gn: string;
|
111
|
+
gw: string;
|
112
|
+
gy: string;
|
113
|
+
ht: string;
|
114
|
+
hm: string;
|
115
|
+
va: string;
|
116
|
+
hn: string;
|
117
|
+
hk: string;
|
118
|
+
hu: string;
|
119
|
+
is: string;
|
120
|
+
in: string;
|
121
|
+
id: string;
|
122
|
+
ir: string;
|
123
|
+
iq: string;
|
124
|
+
ie: string;
|
125
|
+
im: string;
|
126
|
+
il: string;
|
127
|
+
it: string;
|
128
|
+
jm: string;
|
129
|
+
jp: string;
|
130
|
+
je: string;
|
131
|
+
jo: string;
|
132
|
+
kz: string;
|
133
|
+
ke: string;
|
134
|
+
ki: string;
|
135
|
+
xk: string;
|
136
|
+
kw: string;
|
137
|
+
kg: string;
|
138
|
+
la: string;
|
139
|
+
lv: string;
|
140
|
+
arab: string;
|
141
|
+
lb: string;
|
142
|
+
ls: string;
|
143
|
+
lr: string;
|
144
|
+
ly: string;
|
145
|
+
li: string;
|
146
|
+
lt: string;
|
147
|
+
lu: string;
|
148
|
+
mo: string;
|
149
|
+
mg: string;
|
150
|
+
mw: string;
|
151
|
+
my: string;
|
152
|
+
mv: string;
|
153
|
+
ml: string;
|
154
|
+
mt: string;
|
155
|
+
mh: string;
|
156
|
+
mq: string;
|
157
|
+
mr: string;
|
158
|
+
mu: string;
|
159
|
+
yt: string;
|
160
|
+
mx: string;
|
161
|
+
md: string;
|
162
|
+
mc: string;
|
163
|
+
mn: string;
|
164
|
+
me: string;
|
165
|
+
ms: string;
|
166
|
+
ma: string;
|
167
|
+
mz: string;
|
168
|
+
mm: string;
|
169
|
+
na: string;
|
170
|
+
nr: string;
|
171
|
+
np: string;
|
172
|
+
nl: string;
|
173
|
+
nc: string;
|
174
|
+
nz: string;
|
175
|
+
ni: string;
|
176
|
+
ne: string;
|
177
|
+
ng: string;
|
178
|
+
nu: string;
|
179
|
+
nf: string;
|
180
|
+
kp: string;
|
181
|
+
mk: string;
|
182
|
+
'gb-nir': string;
|
183
|
+
mp: string;
|
184
|
+
no: string;
|
185
|
+
om: string;
|
186
|
+
pc: string;
|
187
|
+
pk: string;
|
188
|
+
pw: string;
|
189
|
+
pa: string;
|
190
|
+
pg: string;
|
191
|
+
py: string;
|
192
|
+
pe: string;
|
193
|
+
ph: string;
|
194
|
+
pn: string;
|
195
|
+
pl: string;
|
196
|
+
pt: string;
|
197
|
+
pr: string;
|
198
|
+
qa: string;
|
199
|
+
cg: string;
|
200
|
+
ro: string;
|
201
|
+
ru: string;
|
202
|
+
rw: string;
|
203
|
+
re: string;
|
204
|
+
bl: string;
|
205
|
+
'sh-hl': string;
|
206
|
+
sh: string;
|
207
|
+
kn: string;
|
208
|
+
lc: string;
|
209
|
+
mf: string;
|
210
|
+
pm: string;
|
211
|
+
vc: string;
|
212
|
+
ws: string;
|
213
|
+
sm: string;
|
214
|
+
st: string;
|
215
|
+
sa: string;
|
216
|
+
'gb-sct': string;
|
217
|
+
sn: string;
|
218
|
+
rs: string;
|
219
|
+
sc: string;
|
220
|
+
sl: string;
|
221
|
+
sg: string;
|
222
|
+
sx: string;
|
223
|
+
sk: string;
|
224
|
+
si: string;
|
225
|
+
sb: string;
|
226
|
+
so: string;
|
227
|
+
za: string;
|
228
|
+
gs: string;
|
229
|
+
kr: string;
|
230
|
+
ss: string;
|
231
|
+
es: string;
|
232
|
+
lk: string;
|
233
|
+
ps: string;
|
234
|
+
sd: string;
|
235
|
+
sr: string;
|
236
|
+
sj: string;
|
237
|
+
se: string;
|
238
|
+
ch: string;
|
239
|
+
sy: string;
|
240
|
+
tw: string;
|
241
|
+
tj: string;
|
242
|
+
tz: string;
|
243
|
+
th: string;
|
244
|
+
tl: string;
|
245
|
+
tg: string;
|
246
|
+
tk: string;
|
247
|
+
to: string;
|
248
|
+
tt: string;
|
249
|
+
'sh-ta': string;
|
250
|
+
tn: string;
|
251
|
+
tm: string;
|
252
|
+
tc: string;
|
253
|
+
tv: string;
|
254
|
+
tr: string;
|
255
|
+
ug: string;
|
256
|
+
ua: string;
|
257
|
+
ae: string;
|
258
|
+
gb: string;
|
259
|
+
un: string;
|
260
|
+
um: string;
|
261
|
+
us: string;
|
262
|
+
uy: string;
|
263
|
+
uz: string;
|
264
|
+
vu: string;
|
265
|
+
ve: string;
|
266
|
+
vn: string;
|
267
|
+
vg: string;
|
268
|
+
vi: string;
|
269
|
+
'gb-wls': string;
|
270
|
+
wf: string;
|
271
|
+
eh: string;
|
272
|
+
ye: string;
|
273
|
+
zm: string;
|
274
|
+
zw: string;
|
275
|
+
};
|
276
|
+
//# sourceMappingURL=countries.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"countries.d.ts","sourceRoot":"","sources":["../../../../src/components/CountryFlag/utils/countries.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+QxB,CAAC"}
|
@@ -0,0 +1,275 @@
|
|
1
|
+
const countryNames = {
|
2
|
+
af: "Afghanistan",
|
3
|
+
ax: "Aland Islands",
|
4
|
+
al: "Albania",
|
5
|
+
dz: "Algeria",
|
6
|
+
as: "American Samoa",
|
7
|
+
ad: "Andorra",
|
8
|
+
ao: "Angola",
|
9
|
+
ai: "Anguilla",
|
10
|
+
aq: "Antarctica",
|
11
|
+
ag: "Antigua and Barbuda",
|
12
|
+
ar: "Argentina",
|
13
|
+
am: "Armenia",
|
14
|
+
aw: "Aruba",
|
15
|
+
"sh-ac": "Ascension Island",
|
16
|
+
asean: "Association of Southeast Asian Nations",
|
17
|
+
au: "Australia",
|
18
|
+
at: "Austria",
|
19
|
+
az: "Azerbaijan",
|
20
|
+
bs: "Bahamas",
|
21
|
+
bh: "Bahrain",
|
22
|
+
bd: "Bangladesh",
|
23
|
+
bb: "Barbados",
|
24
|
+
"es-pv": "Basque Country",
|
25
|
+
by: "Belarus",
|
26
|
+
be: "Belgium",
|
27
|
+
bz: "Belize",
|
28
|
+
bj: "Benin",
|
29
|
+
bm: "Bermuda",
|
30
|
+
bt: "Bhutan",
|
31
|
+
bo: "Bolivia",
|
32
|
+
bq: "Bonaire, Sint Eustatius and Saba",
|
33
|
+
ba: "Bosnia and Herzegovina",
|
34
|
+
bw: "Botswana",
|
35
|
+
bv: "Bouvet Island",
|
36
|
+
br: "Brazil",
|
37
|
+
io: "British Indian Ocean Territory",
|
38
|
+
bn: "Brunei Darussalam",
|
39
|
+
bg: "Bulgaria",
|
40
|
+
bf: "Burkina Faso",
|
41
|
+
bi: "Burundi",
|
42
|
+
cv: "Cabo Verde",
|
43
|
+
kh: "Cambodia",
|
44
|
+
cm: "Cameroon",
|
45
|
+
ca: "Canada",
|
46
|
+
ic: "Canary Islands",
|
47
|
+
"es-ct": "Catalonia",
|
48
|
+
ky: "Cayman Islands",
|
49
|
+
cf: "Central African Republic",
|
50
|
+
cefta: "Central European Free Trade Agreement",
|
51
|
+
td: "Chad",
|
52
|
+
cl: "Chile",
|
53
|
+
cn: "China",
|
54
|
+
cx: "Christmas Island",
|
55
|
+
cp: "Clipperton Island",
|
56
|
+
cc: "Cocos (Keeling) Islands",
|
57
|
+
co: "Colombia",
|
58
|
+
km: "Comoros",
|
59
|
+
ck: "Cook Islands",
|
60
|
+
cr: "Costa Rica",
|
61
|
+
hr: "Croatia",
|
62
|
+
cu: "Cuba",
|
63
|
+
cw: "Curaçao",
|
64
|
+
cy: "Cyprus",
|
65
|
+
cz: "Czech Republic",
|
66
|
+
ci: `Côte d'Ivoire`,
|
67
|
+
cd: "Democratic Republic of the Congo",
|
68
|
+
dk: "Denmark",
|
69
|
+
dg: "Diego Garcia",
|
70
|
+
dj: "Djibouti",
|
71
|
+
dm: "Dominica",
|
72
|
+
do: "Dominican Republic",
|
73
|
+
eac: "East African Community",
|
74
|
+
ec: "Ecuador",
|
75
|
+
eg: "Egypt",
|
76
|
+
sv: "El Salvador",
|
77
|
+
"gb-eng": "England",
|
78
|
+
gq: "Equatorial Guinea",
|
79
|
+
er: "Eritrea",
|
80
|
+
ee: "Estonia",
|
81
|
+
sz: "Eswatini",
|
82
|
+
et: "Ethiopia",
|
83
|
+
eu: "Europe",
|
84
|
+
fk: "Falkland Islands",
|
85
|
+
fo: "Faroe Islands",
|
86
|
+
fm: "Federated States of Micronesia",
|
87
|
+
fj: "Fiji",
|
88
|
+
fi: "Finland",
|
89
|
+
fr: "France",
|
90
|
+
gf: "French Guiana",
|
91
|
+
pf: "French Polynesia",
|
92
|
+
tf: "French Southern Territories",
|
93
|
+
ga: "Gabon",
|
94
|
+
"es-ga": "Galicia",
|
95
|
+
gm: "Gambia",
|
96
|
+
ge: "Georgia",
|
97
|
+
de: "Germany",
|
98
|
+
gh: "Ghana",
|
99
|
+
gi: "Gibraltar",
|
100
|
+
gr: "Greece",
|
101
|
+
gl: "Greenland",
|
102
|
+
gd: "Grenada",
|
103
|
+
gp: "Guadeloupe",
|
104
|
+
gu: "Guam",
|
105
|
+
gt: "Guatemala",
|
106
|
+
gg: "Guernsey",
|
107
|
+
gn: "Guinea",
|
108
|
+
gw: "Guinea-Bissau",
|
109
|
+
gy: "Guyana",
|
110
|
+
ht: "Haiti",
|
111
|
+
hm: "Heard Island and McDonald Islands",
|
112
|
+
va: "Holy See",
|
113
|
+
hn: "Honduras",
|
114
|
+
hk: "Hong Kong",
|
115
|
+
hu: "Hungary",
|
116
|
+
is: "Iceland",
|
117
|
+
in: "India",
|
118
|
+
id: "Indonesia",
|
119
|
+
ir: "Iran",
|
120
|
+
iq: "Iraq",
|
121
|
+
ie: "Ireland",
|
122
|
+
im: "Isle of Man",
|
123
|
+
il: "Israel",
|
124
|
+
it: "Italy",
|
125
|
+
jm: "Jamaica",
|
126
|
+
jp: "Japan",
|
127
|
+
je: "Jersey",
|
128
|
+
jo: "Jordan",
|
129
|
+
kz: "Kazakhstan",
|
130
|
+
ke: "Kenya",
|
131
|
+
ki: "Kiribati",
|
132
|
+
xk: "Kosovo",
|
133
|
+
kw: "Kuwait",
|
134
|
+
kg: "Kyrgyzstan",
|
135
|
+
la: "Laos",
|
136
|
+
lv: "Latvia",
|
137
|
+
arab: "League of Arab States",
|
138
|
+
lb: "Lebanon",
|
139
|
+
ls: "Lesotho",
|
140
|
+
lr: "Liberia",
|
141
|
+
ly: "Libya",
|
142
|
+
li: "Liechtenstein",
|
143
|
+
lt: "Lithuania",
|
144
|
+
lu: "Luxembourg",
|
145
|
+
mo: "Macau",
|
146
|
+
mg: "Madagascar",
|
147
|
+
mw: "Malawi",
|
148
|
+
my: "Malaysia",
|
149
|
+
mv: "Maldives",
|
150
|
+
ml: "Mali",
|
151
|
+
mt: "Malta",
|
152
|
+
mh: "Marshall Islands",
|
153
|
+
mq: "Martinique",
|
154
|
+
mr: "Mauritania",
|
155
|
+
mu: "Mauritius",
|
156
|
+
yt: "Mayotte",
|
157
|
+
mx: "Mexico",
|
158
|
+
md: "Moldova",
|
159
|
+
mc: "Monaco",
|
160
|
+
mn: "Mongolia",
|
161
|
+
me: "Montenegro",
|
162
|
+
ms: "Montserrat",
|
163
|
+
ma: "Morocco",
|
164
|
+
mz: "Mozambique",
|
165
|
+
mm: "Myanmar",
|
166
|
+
na: "Namibia",
|
167
|
+
nr: "Nauru",
|
168
|
+
np: "Nepal",
|
169
|
+
nl: "Netherlands",
|
170
|
+
nc: "New Caledonia",
|
171
|
+
nz: "New Zealand",
|
172
|
+
ni: "Nicaragua",
|
173
|
+
ne: "Niger",
|
174
|
+
ng: "Nigeria",
|
175
|
+
nu: "Niue",
|
176
|
+
nf: "Norfolk Island",
|
177
|
+
kp: "North Korea",
|
178
|
+
mk: "North Macedonia",
|
179
|
+
"gb-nir": "Northern Ireland",
|
180
|
+
mp: "Northern Mariana Islands",
|
181
|
+
no: "Norway",
|
182
|
+
om: "Oman",
|
183
|
+
pc: "Pacific Community",
|
184
|
+
pk: "Pakistan",
|
185
|
+
pw: "Palau",
|
186
|
+
pa: "Panama",
|
187
|
+
pg: "Papua New Guinea",
|
188
|
+
py: "Paraguay",
|
189
|
+
pe: "Peru",
|
190
|
+
ph: "Philippines",
|
191
|
+
pn: "Pitcairn",
|
192
|
+
pl: "Poland",
|
193
|
+
pt: "Portugal",
|
194
|
+
pr: "Puerto Rico",
|
195
|
+
qa: "Qatar",
|
196
|
+
cg: "Republic of the Congo",
|
197
|
+
ro: "Romania",
|
198
|
+
ru: "Russia",
|
199
|
+
rw: "Rwanda",
|
200
|
+
re: "Réunion",
|
201
|
+
bl: "Saint Barthélemy",
|
202
|
+
"sh-hl": "Saint Helena",
|
203
|
+
sh: "Saint Helena, Ascension and Tristan da Cunha",
|
204
|
+
kn: "Saint Kitts and Nevis",
|
205
|
+
lc: "Saint Lucia",
|
206
|
+
mf: "Saint Martin",
|
207
|
+
pm: "Saint Pierre and Miquelon",
|
208
|
+
vc: "Saint Vincent and the Grenadines",
|
209
|
+
ws: "Samoa",
|
210
|
+
sm: "San Marino",
|
211
|
+
st: "Sao Tome and Principe",
|
212
|
+
sa: "Saudi Arabia",
|
213
|
+
"gb-sct": "Scotland",
|
214
|
+
sn: "Senegal",
|
215
|
+
rs: "Serbia",
|
216
|
+
sc: "Seychelles",
|
217
|
+
sl: "Sierra Leone",
|
218
|
+
sg: "Singapore",
|
219
|
+
sx: "Sint Maarten",
|
220
|
+
sk: "Slovakia",
|
221
|
+
si: "Slovenia",
|
222
|
+
sb: "Solomon Islands",
|
223
|
+
so: "Somalia",
|
224
|
+
za: "South Africa",
|
225
|
+
gs: "South Georgia and the South Sandwich Islands",
|
226
|
+
kr: "South Korea",
|
227
|
+
ss: "South Sudan",
|
228
|
+
es: "Spain",
|
229
|
+
lk: "Sri Lanka",
|
230
|
+
ps: "State of Palestine",
|
231
|
+
sd: "Sudan",
|
232
|
+
sr: "Suriname",
|
233
|
+
sj: "Svalbard and Jan Mayen",
|
234
|
+
se: "Sweden",
|
235
|
+
ch: "Switzerland",
|
236
|
+
sy: "Syria",
|
237
|
+
tw: "Taiwan",
|
238
|
+
tj: "Tajikistan",
|
239
|
+
tz: "Tanzania",
|
240
|
+
th: "Thailand",
|
241
|
+
tl: "Timor-Leste",
|
242
|
+
tg: "Togo",
|
243
|
+
tk: "Tokelau",
|
244
|
+
to: "Tonga",
|
245
|
+
tt: "Trinidad and Tobago",
|
246
|
+
"sh-ta": "Tristan da Cunha",
|
247
|
+
tn: "Tunisia",
|
248
|
+
tm: "Turkmenistan",
|
249
|
+
tc: "Turks and Caicos Islands",
|
250
|
+
tv: "Tuvalu",
|
251
|
+
tr: "Türkiye",
|
252
|
+
ug: "Uganda",
|
253
|
+
ua: "Ukraine",
|
254
|
+
ae: "United Arab Emirates",
|
255
|
+
gb: "United Kingdom",
|
256
|
+
un: "United Nations",
|
257
|
+
um: "United States Minor Outlying Islands",
|
258
|
+
us: "United States of America",
|
259
|
+
uy: "Uruguay",
|
260
|
+
uz: "Uzbekistan",
|
261
|
+
vu: "Vanuatu",
|
262
|
+
ve: "Venezuela",
|
263
|
+
vn: "Vietnam",
|
264
|
+
vg: "Virgin Islands (British)",
|
265
|
+
vi: "Virgin Islands (U.S.)",
|
266
|
+
"gb-wls": "Wales",
|
267
|
+
wf: "Wallis and Futuna",
|
268
|
+
eh: "Western Sahara",
|
269
|
+
ye: "Yemen",
|
270
|
+
zm: "Zambia",
|
271
|
+
zw: "Zimbabwe"
|
272
|
+
};
|
273
|
+
export {
|
274
|
+
countryNames
|
275
|
+
};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { LooseCountryCode } from '../CountryFlag';
|
2
|
+
export declare function getCountryFlagUrl({ square, countryCode, simplified, }: {
|
3
|
+
square: boolean;
|
4
|
+
countryCode: LooseCountryCode;
|
5
|
+
simplified?: boolean;
|
6
|
+
}): string;
|
7
|
+
//# sourceMappingURL=getCountryFlagUrl.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getCountryFlagUrl.d.ts","sourceRoot":"","sources":["../../../../src/components/CountryFlag/utils/getCountryFlagUrl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,wBAAgB,iBAAiB,CAAC,EAC9B,MAAM,EACN,WAAW,EAEX,UAAiB,GACpB,EAAE;IACC,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,gBAAgB,CAAC;IAE9B,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB,UASA"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
function getCountryFlagUrl({
|
2
|
+
square,
|
3
|
+
countryCode,
|
4
|
+
simplified = true
|
5
|
+
}) {
|
6
|
+
const format = square ? "1x1" : "4x3";
|
7
|
+
if (simplified) {
|
8
|
+
if (countryCode === "es" || countryCode === "mx") return `https://static.preply.com/ds/country-flags/${format}/${countryCode}-simplified.svg`;
|
9
|
+
}
|
10
|
+
return `https://static.preply.com/ds/country-flags/${format}/${countryCode}.svg`;
|
11
|
+
}
|
12
|
+
export {
|
13
|
+
getCountryFlagUrl
|
14
|
+
};
|
@@ -43,13 +43,6 @@ export type FormControlProps = {
|
|
43
43
|
* @ignore
|
44
44
|
*/
|
45
45
|
preplyDsComponent?: string;
|
46
|
-
/**
|
47
|
-
* When true, adds a "Required" indicator next to the label for the required fields.
|
48
|
-
* When false, adds a "Optional" indicator next to the label for the optional fields instead.
|
49
|
-
*
|
50
|
-
* @deprecated This is a temporary solution for gradual migration to the "Optional" label.
|
51
|
-
*/
|
52
|
-
useLegacyRequiredLabel?: boolean;
|
53
46
|
};
|
54
47
|
/**
|
55
48
|
* FormControl component provides a consistent layout and accessibility
|
@@ -76,5 +69,5 @@ export type FormControlProps = {
|
|
76
69
|
* <MyCustomInput />
|
77
70
|
* </FormControl>
|
78
71
|
*/
|
79
|
-
export declare const FormControl: ({ id: idProp, label, hideLabel, description, error, hasError, children, required, dataset, onClick, preplyDsComponent,
|
72
|
+
export declare const FormControl: ({ id: idProp, label, hideLabel, description, error, hasError, children, required, dataset, onClick, preplyDsComponent, }: FormControlProps) => React.JSX.Element;
|
80
73
|
//# sourceMappingURL=FormControl.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FormControl.d.ts","sourceRoot":"","sources":["../../../src/components/FormControl/FormControl.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAIV,iBAAiB,EACjB,YAAY,EACZ,SAAS,EAEZ,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AA4B1C,MAAM,MAAM,gBAAgB,GAAG;IAC3B;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,YAAY,CAAC;IACvB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAC5C;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;
|
1
|
+
{"version":3,"file":"FormControl.d.ts","sourceRoot":"","sources":["../../../src/components/FormControl/FormControl.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAIV,iBAAiB,EACjB,YAAY,EACZ,SAAS,EAEZ,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AA4B1C,MAAM,MAAM,gBAAgB,GAAG;IAC3B;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,YAAY,CAAC;IACvB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAC5C;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,WAAW,6HAYrB,gBAAgB,sBAiFlB,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
"use client";
|
2
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
2
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
3
3
|
import { Slot } from "@radix-ui/react-slot";
|
4
4
|
import { useId, isValidElement } from "react";
|
5
5
|
import { FormattedMessage } from "react-intl";
|
@@ -47,8 +47,7 @@ const FormControl = ({
|
|
47
47
|
required: required2,
|
48
48
|
dataset,
|
49
49
|
onClick,
|
50
|
-
preplyDsComponent = webComponentNames.FormControl
|
51
|
-
useLegacyRequiredLabel = false
|
50
|
+
preplyDsComponent = webComponentNames.FormControl
|
52
51
|
}) => {
|
53
52
|
const generatedId = useId();
|
54
53
|
const id = idProp || generatedId;
|
@@ -80,20 +79,13 @@ const FormControl = ({
|
|
80
79
|
/* @__PURE__ */ jsxs("div", { className: styles.container, ...datasetProps, onClick, children: [
|
81
80
|
/* @__PURE__ */ jsxs("label", { htmlFor: id, className: styles.label, "data-hidden": hideLabel || !label2, "data-testid": "label", children: [
|
82
81
|
label2,
|
83
|
-
|
82
|
+
required2 && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("span", { "aria-hidden": true, className: styles.required, children: [
|
84
83
|
" • ",
|
85
84
|
/* @__PURE__ */ jsx(FormattedMessage, { id: "preply-ds.fieldLabel.required", defaultMessage: [{
|
86
85
|
"type": 0,
|
87
86
|
"value": "Required"
|
88
87
|
}] })
|
89
|
-
] })
|
90
|
-
!useLegacyRequiredLabel && !required2 && /* @__PURE__ */ jsxs("span", { "aria-hidden": true, className: styles.required, children: [
|
91
|
-
" • ",
|
92
|
-
/* @__PURE__ */ jsx(FormattedMessage, { id: "preply-ds.fieldLabel.optional", defaultMessage: [{
|
93
|
-
"type": 0,
|
94
|
-
"value": "Optional"
|
95
|
-
}] })
|
96
|
-
] })
|
88
|
+
] }) })
|
97
89
|
] }),
|
98
90
|
/* @__PURE__ */ jsx(Slot, { id, required: required2, ...inputAriaAttributes, children }),
|
99
91
|
error2 ? /* @__PURE__ */ jsx("p", { className: styles.error, role: "alert", id: `${id}-error`, "data-testid": "error", children: error2 }) : description2 ? /* @__PURE__ */ jsx("p", { className: styles.description, id: `${id}-description`, "data-testid": "description", children: description2 }) : null
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../src/components/NumberField/NumberField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAe,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAS,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG1C,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,mBAAmB,CAAC,GACnF,IAAI,CACA,UAAU,EACR,MAAM,GACN,MAAM,GACN,QAAQ,GACR,aAAa,GACb,UAAU,GACV,UAAU,GACV,WAAW,GACX,SAAS,GACT,UAAU,GACV,SAAS,GACT,QAAQ,GACR,WAAW,GACX,SAAS,GACT,QAAQ,GACR,SAAS,GACT,OAAO,CACZ,GAAG;IACA,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACpD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEN,eAAO,MAAM,WAAW;;;6BAPQ,MAAM,GAAG,SAAS,KAAK,IAAI;;;;;
|
1
|
+
{"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../src/components/NumberField/NumberField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAe,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAS,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG1C,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,mBAAmB,CAAC,GACnF,IAAI,CACA,UAAU,EACR,MAAM,GACN,MAAM,GACN,QAAQ,GACR,aAAa,GACb,UAAU,GACV,UAAU,GACV,WAAW,GACX,SAAS,GACT,UAAU,GACV,SAAS,GACT,QAAQ,GACR,WAAW,GACX,SAAS,GACT,QAAQ,GACR,SAAS,GACT,OAAO,CACZ,GAAG;IACA,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACpD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEN,eAAO,MAAM,WAAW;;;6BAPQ,MAAM,GAAG,SAAS,KAAK,IAAI;;;;;0CA2DzD,CAAC"}
|
@@ -19,7 +19,6 @@ const NumberField = forwardRef(function NumberField2({
|
|
19
19
|
onValueChange,
|
20
20
|
onChange,
|
21
21
|
hasError,
|
22
|
-
useLegacyRequiredLabel,
|
23
22
|
// @ts-expect-error: removing className from `props`
|
24
23
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
25
24
|
className,
|
@@ -33,7 +32,7 @@ const NumberField = forwardRef(function NumberField2({
|
|
33
32
|
const value = e.target.value;
|
34
33
|
onValueChange == null ? void 0 : onValueChange(value ? Number(value) : void 0);
|
35
34
|
};
|
36
|
-
return /* @__PURE__ */ jsx(FormControl, { id, label, description, error, hasError, required, dataset, hideLabel, onClick,
|
35
|
+
return /* @__PURE__ */ jsx(FormControl, { id, label, description, error, hasError, required, dataset, hideLabel, onClick, preplyDsComponent: webComponentNames.NumberField, children: /* @__PURE__ */ jsx(Input, { ...props, type: "number", ref, dataset: inputDataset, onChange: handleChange }) });
|
37
36
|
});
|
38
37
|
export {
|
39
38
|
NumberField
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PasswordField.d.ts","sourceRoot":"","sources":["../../../src/components/PasswordField/PasswordField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAe,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAS,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAgB,MAAM,iBAAiB,CAAC;AAsBxD,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,mBAAmB,CAAC,GACrF,IAAI,CACA,UAAU,EACR,MAAM,GACN,MAAM,GACN,aAAa,GACb,UAAU,GACV,UAAU,GACV,WAAW,GACX,SAAS,GACT,UAAU,GACV,eAAe,GACf,SAAS,GACT,QAAQ,GACR,WAAW,GACX,SAAS,GACT,QAAQ,GACR,SAAS,GACT,OAAO,CACZ,GAAG;IACA,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,KAAK,GAAG,cAAc,GAAG,kBAAkB,CAAC;IAC3D,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEN,eAAO,MAAM,aAAa;;;;;
|
1
|
+
{"version":3,"file":"PasswordField.d.ts","sourceRoot":"","sources":["../../../src/components/PasswordField/PasswordField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAe,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAS,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAgB,MAAM,iBAAiB,CAAC;AAsBxD,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,mBAAmB,CAAC,GACrF,IAAI,CACA,UAAU,EACR,MAAM,GACN,MAAM,GACN,aAAa,GACb,UAAU,GACV,UAAU,GACV,WAAW,GACX,SAAS,GACT,UAAU,GACV,eAAe,GACf,SAAS,GACT,QAAQ,GACR,WAAW,GACX,SAAS,GACT,QAAQ,GACR,SAAS,GACT,OAAO,CACZ,GAAG;IACA,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,KAAK,GAAG,cAAc,GAAG,kBAAkB,CAAC;IAC3D,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEN,eAAO,MAAM,aAAa;;;;;0CAsEzB,CAAC"}
|