-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathesimflag.tsx
More file actions
407 lines (404 loc) · 19.1 KB
/
Copy pathesimflag.tsx
File metadata and controls
407 lines (404 loc) · 19.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
import {ESIMFLAG_SKIN} from './constants';
import {applyAlpha} from '../utils/color';
import type {GetKnownSkin, KnownSkin} from './types';
export const palette = {
blue: '#005CFF',
blue10: '#E5EFFF',
blue15: '#CCDEFF',
blue20: '#B2CEFF',
blue30: '#80ADFF',
blue55: '#004ED9',
blue65: '#0247BF',
blue80: '#0B2739',
blue85: '#001740',
grass: '#99D52A',
grass10: '#EBF7D4',
grass70: '#6B951D',
grass75: '#5C8019',
peach: '#FF9800',
peach10: '#FFF4D5',
peach75: '#995B00',
purple: '#A140C4',
purple30: '#D1A1E3',
purple10: '#FCEFFC',
purple55: '#8B3AA8',
blush: '#FFD2E3',
blush20: '#FFF1F7',
teal: '#2FDDEA',
teal10: '#D5F8FB',
teal75: '#197980',
chili: '#FA4549',
tomato: '#FA4549',
tomato10: '#FEECED',
tomato55: '#ED0C0C',
tomato60: '#BA160A',
tomato65: '#B61515',
grey1: '#F1F7FF',
grey2: '#E3EEFF',
grey3: '#CCD6E5',
grey4: '#828D9B',
grey5: '#666B73',
grey6: '#393C40',
black: '#00091A',
white: '#FFFFFF',
darkModeBlack: '#00001C',
darkModeGrey: '#08132B',
darkModeGrey6: '#14213D',
darkModeBlue: '#0F67FF',
};
export const getEsimflagSkin: GetKnownSkin = () => {
const skin: KnownSkin = {
name: ESIMFLAG_SKIN,
colors: {
background: palette.white,
backgroundAlternative: palette.grey1,
backgroundBrand: `linear-gradient(180deg, ${palette.blue55} 0%, ${palette.blue} 60%, ${palette.purple} 100%)`,
backgroundBrandSecondary: palette.blue,
backgroundContainer: palette.white,
backgroundContainerError: palette.tomato10,
backgroundContainerHover: applyAlpha(palette.blue55, 0.05),
backgroundContainerPressed: applyAlpha(palette.blue55, 0.08),
backgroundContainerBrand: `linear-gradient(180deg, ${palette.blue55} 0%, ${palette.blue} 60%, ${palette.purple} 100%)`,
backgroundContainerBrandHover: applyAlpha(palette.blue55, 0.2),
backgroundContainerBrandPressed: applyAlpha(palette.blue55, 0.4),
backgroundContainerBrandOverInverse: palette.blue80,
backgroundContainerAlternative: palette.grey1,
backgroundOverlay: applyAlpha(palette.black, 0.6),
backgroundSkeleton: palette.grey2,
backgroundSkeletonInverse: palette.blue55,
backgroundBrandTop: palette.blue65,
backgroundBrandBottom: palette.purple,
appBarBackground: palette.white,
navigationBarBackground: palette.blue55,
skeletonWave: palette.grey2,
borderLow: palette.grey1,
border: palette.grey3,
borderHigh: palette.grey5,
borderSelected: palette.blue,
coverBackgroundHover: applyAlpha(palette.darkModeBlack, 0.25),
coverBackgroundPressed: applyAlpha(palette.darkModeBlack, 0.35),
buttonDangerBackground: palette.tomato55,
buttonDangerBackgroundPressed: palette.tomato65,
buttonDangerBackgroundHover: palette.tomato60,
buttonLinkDangerBackgroundPressed: palette.tomato10,
buttonLinkDangerBackgroundInverse: palette.white,
buttonLinkDangerBackgroundInversePressed: palette.tomato10,
buttonLinkBackgroundPressed: applyAlpha(palette.purple55, 0.08),
buttonLinkBackgroundInversePressed: applyAlpha(palette.white, 0.08),
buttonPrimaryBackground: palette.blue,
buttonPrimaryBackgroundInverse: palette.white,
buttonPrimaryBackgroundPressed: palette.blue65,
buttonPrimaryBackgroundHover: palette.blue55,
buttonPrimaryBackgroundInversePressed: palette.blue15,
buttonSecondaryBorder: palette.blue,
buttonSecondaryBorderPressed: palette.blue55,
buttonSecondaryBackgroundHover: palette.blue10,
buttonSecondaryBackgroundPressed: palette.blue15,
buttonSecondaryBorderInverse: palette.white,
buttonSecondaryBorderInversePressed: palette.white,
buttonSecondaryBackgroundInverseHover: applyAlpha(palette.white, 0.15),
buttonSecondaryBackgroundInversePressed: applyAlpha(palette.white, 0.15),
textButtonPrimary: palette.white,
textButtonPrimaryInverse: palette.blue,
textButtonPrimaryInversePressed: palette.blue55,
textButtonSecondary: palette.blue,
textButtonSecondaryPressed: palette.blue55,
textButtonSecondaryInverse: palette.white,
textButtonSecondaryInversePressed: palette.white,
textLink: palette.purple,
textLinkInverse: palette.white,
textLinkDanger: palette.tomato55,
textLinkSnackbar: palette.blue30,
textActivated: palette.blue,
textBrand: palette.blue,
inputBorder: palette.grey4,
inputBorderInverse: palette.white,
completedStep: palette.blue,
completedStepInverse: palette.blue80,
control: palette.grey4,
controlActivated: palette.blue,
controlInverse: palette.blue20,
controlActivatedInverse: palette.white,
controlError: palette.tomato,
barTrack: palette.grey3,
barTrackInverse: applyAlpha(palette.white, 0.3),
loadingBar: palette.blue,
loadingBarBackground: palette.grey2,
toggleAndroidInactive: palette.grey3,
toggleAndroidBackgroundActive: palette.blue20,
iosControlKnob: palette.white,
controlKnobInverse: palette.blue,
divider: palette.grey3,
dividerInverse: applyAlpha(palette.white, 0.2),
navigationBarDivider: palette.grey3,
badge: palette.tomato65,
feedbackErrorBackground: palette.tomato,
feedbackInfoBackground: palette.blue80,
brand: palette.blue,
brandHigh: palette.blue55,
inverse: palette.white,
neutralHigh: palette.blue85,
neutralMedium: palette.grey5,
neutralMediumInverse: palette.grey5,
neutralLow: palette.grey1,
neutralLowAlternative: palette.grey2,
textPrimary: palette.blue85,
textPrimaryInverse: palette.white,
textSecondary: palette.grey5,
textSecondaryInverse: palette.blue10,
success: palette.grass,
warning: palette.peach,
error: palette.tomato,
textError: palette.tomato55,
textErrorInverse: palette.white,
promo: palette.purple,
highlight: palette.teal75,
successLow: palette.grass10,
warningLow: palette.peach10,
errorLow: palette.tomato10,
promoLow: palette.purple10,
brandLow: palette.blue10,
successHigh: palette.grass70,
warningHigh: palette.peach75,
errorHigh: palette.tomato60,
promoHigh: palette.purple,
successHighInverse: palette.grass70,
warningHighInverse: palette.peach75,
errorHighInverse: palette.tomato60,
promoHighInverse: palette.purple,
textNavigationBarPrimary: palette.white,
textNavigationBarSecondary: palette.blue20,
textNavigationSearchBarHint: palette.blue20,
textNavigationSearchBarText: palette.white,
textAppBar: palette.grey5,
textAppBarSelected: palette.blue55,
customTabsBackground: palette.blue,
tagTextPromo: palette.blue85,
tagTextActive: palette.blue85,
tagTextInactive: palette.grey5,
tagTextInfo: palette.blue85,
tagTextSuccess: palette.blue85,
tagTextWarning: palette.blue85,
tagTextError: palette.blue85,
tagBackgroundPromo: palette.blush,
tagBackgroundActive: palette.teal,
tagBackgroundInactive: palette.grey2,
tagBackgroundInfo: palette.purple30,
tagBackgroundSuccess: palette.grass,
tagBackgroundWarning: palette.peach,
tagBackgroundError: palette.chili,
tagTextPromoInverse: palette.purple55,
tagTextActiveInverse: palette.teal75,
tagTextInactiveInverse: palette.grey5,
tagTextInfoInverse: palette.purple,
tagTextSuccessInverse: palette.grass75,
tagTextWarningInverse: palette.peach75,
tagTextErrorInverse: palette.tomato65,
tagBackgroundPromoInverse: palette.blush,
tagBackgroundActiveInverse: palette.teal10,
tagBackgroundInactiveInverse: palette.grey2,
tagBackgroundInfoInverse: palette.purple10,
tagBackgroundSuccessInverse: palette.grass10,
tagBackgroundWarningInverse: palette.peach10,
tagBackgroundErrorInverse: palette.tomato10,
cardContentOverlay: `linear-gradient(180deg, ${applyAlpha(palette.black, 0)} 0%, ${applyAlpha(palette.black, 0.4)} 30%, ${applyAlpha(palette.black, 0.7)} 100%)`,
},
darkModeColors: {
background: palette.darkModeBlack,
backgroundAlternative: palette.darkModeBlack,
backgroundBrand: palette.darkModeBlack,
backgroundBrandSecondary: palette.darkModeBlack,
backgroundContainer: palette.darkModeGrey,
backgroundContainerError: palette.darkModeGrey,
backgroundContainerHover: applyAlpha(palette.white, 0.05),
backgroundContainerPressed: applyAlpha(palette.white, 0.08),
backgroundContainerBrand: palette.darkModeGrey,
backgroundContainerBrandHover: applyAlpha(palette.white, 0.03),
backgroundContainerBrandPressed: applyAlpha(palette.white, 0.05),
backgroundContainerBrandOverInverse: palette.darkModeGrey,
backgroundContainerAlternative: palette.darkModeGrey,
backgroundOverlay: applyAlpha(palette.darkModeGrey, 0.8),
backgroundSkeleton: palette.darkModeGrey6,
backgroundSkeletonInverse: palette.darkModeGrey6,
backgroundBrandTop: palette.darkModeBlack,
backgroundBrandBottom: palette.darkModeBlack,
appBarBackground: palette.darkModeGrey,
navigationBarBackground: palette.darkModeBlack,
skeletonWave: palette.grey6,
borderLow: palette.darkModeBlack,
border: palette.darkModeGrey,
borderHigh: palette.grey5,
borderSelected: palette.blue,
coverBackgroundHover: applyAlpha(palette.darkModeBlack, 0.25),
coverBackgroundPressed: applyAlpha(palette.darkModeBlack, 0.35),
buttonDangerBackground: palette.tomato,
buttonDangerBackgroundPressed: palette.tomato55,
buttonDangerBackgroundHover: palette.tomato55,
buttonLinkDangerBackgroundPressed: applyAlpha(palette.white, 0.08),
buttonLinkDangerBackgroundInverse: applyAlpha(palette.white, 0),
buttonLinkDangerBackgroundInversePressed: applyAlpha(palette.white, 0.08),
buttonLinkBackgroundPressed: applyAlpha(palette.white, 0.08),
buttonLinkBackgroundInversePressed: applyAlpha(palette.white, 0.08),
buttonPrimaryBackground: palette.blue,
buttonPrimaryBackgroundInverse: palette.blue,
buttonPrimaryBackgroundPressed: palette.blue55,
buttonPrimaryBackgroundHover: palette.blue55,
buttonPrimaryBackgroundInversePressed: palette.blue55,
buttonSecondaryBackgroundPressed: applyAlpha(palette.white, 0.15),
buttonSecondaryBorder: palette.white,
buttonSecondaryBorderPressed: palette.white,
buttonSecondaryBorderInverse: palette.white,
buttonSecondaryBorderInversePressed: palette.white,
buttonSecondaryBackgroundHover: applyAlpha(palette.white, 0.15),
buttonSecondaryBackgroundInverseHover: applyAlpha(palette.white, 0.15),
buttonSecondaryBackgroundInversePressed: applyAlpha(palette.white, 0.15),
textButtonPrimary: palette.white,
textButtonPrimaryInverse: palette.white,
textButtonPrimaryInversePressed: palette.white,
textButtonSecondary: palette.grey2,
textButtonSecondaryPressed: palette.grey2,
textButtonSecondaryInverse: palette.grey2,
textButtonSecondaryInversePressed: palette.grey2,
textLink: palette.purple30,
textLinkInverse: palette.purple30,
textLinkDanger: palette.chili,
textLinkSnackbar: palette.blue30,
textActivated: palette.blue30,
textBrand: palette.blue30,
inputBorder: palette.grey4,
inputBorderInverse: palette.grey4,
completedStep: palette.blue,
completedStepInverse: palette.blue,
control: palette.grey4,
controlActivated: palette.blue,
controlInverse: palette.grey4,
controlActivatedInverse: palette.darkModeBlue,
controlError: palette.tomato55,
barTrack: palette.darkModeGrey6,
barTrackInverse: palette.darkModeGrey6,
loadingBar: palette.darkModeBlue,
loadingBarBackground: palette.darkModeGrey6,
toggleAndroidInactive: palette.grey2,
toggleAndroidBackgroundActive: palette.blue15,
iosControlKnob: palette.grey3,
controlKnobInverse: palette.grey3,
badge: palette.tomato65,
feedbackErrorBackground: palette.tomato60,
feedbackInfoBackground: palette.darkModeGrey6,
divider: applyAlpha(palette.white, 0.1),
dividerInverse: applyAlpha(palette.white, 0.1),
navigationBarDivider: palette.darkModeBlack,
brand: palette.blue15,
brandHigh: applyAlpha(palette.white, 0.05),
inverse: palette.grey3,
neutralHigh: palette.grey3,
neutralMedium: palette.grey6,
neutralMediumInverse: palette.grey6,
neutralLow: palette.grey6,
neutralLowAlternative: palette.grey6,
textPrimary: palette.grey3,
textPrimaryInverse: palette.grey3,
textSecondary: palette.grey4,
textSecondaryInverse: palette.grey4,
success: palette.grass,
warning: palette.peach,
error: palette.chili,
textError: palette.chili,
textErrorInverse: palette.chili,
promo: palette.purple,
highlight: palette.teal,
successLow: palette.darkModeGrey6,
warningLow: palette.darkModeGrey6,
errorLow: palette.darkModeGrey6,
promoLow: palette.darkModeGrey6,
brandLow: palette.darkModeGrey6,
successHigh: palette.grass70,
warningHigh: palette.peach75,
errorHigh: palette.tomato60,
promoHigh: palette.purple55,
successHighInverse: palette.grass75,
warningHighInverse: palette.peach75,
errorHighInverse: palette.tomato60,
promoHighInverse: palette.purple55,
textNavigationBarPrimary: palette.grey3,
textNavigationBarSecondary: palette.grey4,
textNavigationSearchBarHint: palette.grey4,
textNavigationSearchBarText: palette.grey3,
textAppBar: palette.grey4,
textAppBarSelected: palette.blue15,
customTabsBackground: palette.darkModeBlack,
tagTextPromo: palette.blush,
tagTextActive: palette.blue30,
tagTextInactive: palette.grey3,
tagTextInfo: palette.purple30,
tagTextSuccess: palette.grass,
tagTextWarning: palette.peach,
tagTextError: palette.chili,
tagBackgroundPromo: palette.darkModeGrey6,
tagBackgroundActive: palette.darkModeGrey6,
tagBackgroundInactive: palette.darkModeGrey6,
tagBackgroundInfo: palette.darkModeGrey6,
tagBackgroundSuccess: palette.darkModeGrey6,
tagBackgroundWarning: palette.darkModeGrey6,
tagBackgroundError: palette.darkModeGrey6,
tagTextPromoInverse: palette.blush,
tagTextActiveInverse: palette.blue30,
tagTextInactiveInverse: palette.grey3,
tagTextInfoInverse: palette.blue30,
tagTextSuccessInverse: palette.grass,
tagTextWarningInverse: palette.peach,
tagTextErrorInverse: palette.chili,
tagBackgroundPromoInverse: palette.darkModeGrey6,
tagBackgroundActiveInverse: palette.darkModeGrey6,
tagBackgroundInactiveInverse: palette.darkModeGrey6,
tagBackgroundInfoInverse: palette.darkModeGrey6,
tagBackgroundSuccessInverse: palette.darkModeGrey6,
tagBackgroundWarningInverse: palette.darkModeGrey6,
tagBackgroundErrorInverse: palette.darkModeGrey6,
cardContentOverlay: `linear-gradient(180deg, ${applyAlpha(palette.black, 0)} 0%, ${applyAlpha(palette.black, 0.4)} 30%, ${applyAlpha(palette.black, 0.7)} 100%)`,
},
borderRadii: {
avatar: '50%',
bar: '999px',
button: '32px',
checkbox: '4px',
container: '20px',
indicator: '8px',
input: '16px',
legacyDisplay: '20px',
popup: '16px',
sheet: '16px',
mediaSmall: '8px',
},
textPresets: {
button: {weight: 'medium'},
cardTitle: {weight: 'medium'},
indicator: {weight: 'medium'},
link: {weight: 'medium'},
navigationBar: {weight: 'medium'},
tabsLabel: {
lineHeight: {desktop: 24, mobile: 24},
size: {desktop: 18, mobile: 16},
weight: 'medium',
},
text1: {lineHeight: {desktop: 20, mobile: 16}, size: {desktop: 14, mobile: 12}},
text2: {lineHeight: {desktop: 24, mobile: 20}, size: {desktop: 16, mobile: 14}},
text3: {lineHeight: {desktop: 24, mobile: 24}, size: {desktop: 18, mobile: 16}},
text4: {lineHeight: {desktop: 28, mobile: 24}, size: {desktop: 20, mobile: 18}},
text5: {lineHeight: {desktop: 32, mobile: 24}, size: {desktop: 28, mobile: 20}, weight: 'bold'},
text6: {lineHeight: {desktop: 40, mobile: 32}, size: {desktop: 32, mobile: 24}, weight: 'bold'},
text7: {lineHeight: {desktop: 48, mobile: 32}, size: {desktop: 40, mobile: 28}, weight: 'bold'},
text8: {lineHeight: {desktop: 56, mobile: 40}, size: {desktop: 48, mobile: 32}, weight: 'bold'},
text9: {lineHeight: {desktop: 64, mobile: 48}, size: {desktop: 56, mobile: 40}, weight: 'bold'},
text10: {lineHeight: {desktop: 72, mobile: 56}, size: {desktop: 64, mobile: 48}, weight: 'bold'},
title1: {weight: 'medium'},
title2: {weight: 'bold'},
title3: {lineHeight: {desktop: 32, mobile: 24}, size: {desktop: 28, mobile: 20}, weight: 'bold'},
},
themeVariants: {
successFeedback: 'inverse',
brandLoadingScreen: 'inverse',
},
};
return skin;
};