@idealyst/theme 1.0.83 → 1.0.84
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/package.json +2 -1
- package/src/components/CLAUDE.md +468 -0
- package/src/components/accordion.ts +34 -0
- package/src/components/activity-indicator.ts +28 -0
- package/src/components/alert.ts +32 -0
- package/src/components/avatar.ts +27 -0
- package/src/components/badge.ts +28 -0
- package/src/components/breadcrumb.ts +36 -0
- package/src/components/button.ts +32 -0
- package/src/components/card.ts +31 -0
- package/src/components/checkbox.ts +37 -0
- package/src/components/chip.ts +34 -0
- package/src/components/dialog.ts +31 -0
- package/src/components/divider.ts +36 -0
- package/src/components/icon.ts +26 -0
- package/src/components/image.ts +22 -0
- package/src/components/index.ts +37 -0
- package/src/components/input.ts +35 -0
- package/src/components/list.ts +40 -0
- package/src/components/menu-item.ts +29 -0
- package/src/components/menu.ts +32 -0
- package/src/components/popover.ts +25 -0
- package/src/components/pressable.ts +20 -0
- package/src/components/progress.ts +35 -0
- package/src/components/radio-button.ts +38 -0
- package/src/components/screen.ts +25 -0
- package/src/components/select.ts +62 -0
- package/src/components/skeleton.ts +26 -0
- package/src/components/slider.ts +62 -0
- package/src/components/svg-image.ts +24 -0
- package/src/components/switch.ts +54 -0
- package/src/components/tab-bar.ts +54 -0
- package/src/components/table.ts +57 -0
- package/src/components/text.ts +29 -0
- package/src/components/textarea.ts +53 -0
- package/src/components/tooltip.ts +29 -0
- package/src/components/video.ts +18 -0
- package/src/components/view.ts +31 -0
- package/src/darkTheme.ts +890 -0
- package/src/index.ts +7 -166
- package/src/lightTheme.ts +873 -0
- package/src/styles.ts +14 -0
- package/src/theme/color.ts +15 -0
- package/src/theme/index.ts +16 -0
- package/src/theme/intent.ts +8 -0
- package/src/theme/shadow.ts +18 -0
- package/src/theme/size.ts +182 -0
- package/src/theme/surface.ts +3 -0
- package/src/unistyles.ts +6 -14
- package/src/variants/color.ts +9 -0
- package/src/variants/index.ts +2 -0
- package/src/variants/intent.ts +16 -0
- package/src/variants/size.ts +0 -0
- package/CLAUDE.md +0 -447
- package/LLM-ACCESS-GUIDE.md +0 -208
- package/README.md +0 -633
- package/src/README.md +0 -138
- package/src/breakpoints.ts +0 -8
- package/src/colorResolver.ts +0 -218
- package/src/colors.md +0 -353
- package/src/colors.ts +0 -315
- package/src/common.ts +0 -92
- package/src/defaultThemes.md +0 -407
- package/src/defaultThemes.ts +0 -238
- package/src/themeBuilder.md +0 -400
- package/src/themeBuilder.ts +0 -602
- package/src/variantHelpers.ts +0 -584
- package/src/variants.ts +0 -56
|
@@ -0,0 +1,873 @@
|
|
|
1
|
+
import { ButtonSizeValue, ColorValue, Pallet, Shade, Size } from "./theme";
|
|
2
|
+
import { Theme } from "./theme/index";
|
|
3
|
+
|
|
4
|
+
export const lightTheme: Theme = {
|
|
5
|
+
shadows: {
|
|
6
|
+
none: {},
|
|
7
|
+
sm: {
|
|
8
|
+
elevation: 1,
|
|
9
|
+
shadowColor: 'rgb(0, 0, 0, 0.5)',
|
|
10
|
+
shadowOffset: { width: 0, height: 1 },
|
|
11
|
+
shadowOpacity: 0.08,
|
|
12
|
+
shadowRadius: 1.0,
|
|
13
|
+
boxShadow: '0px 1px 2px rgba(0, 0, 0, 0.1)',
|
|
14
|
+
},
|
|
15
|
+
md: {
|
|
16
|
+
elevation: 2,
|
|
17
|
+
shadowColor: 'rgb(0, 0, 0, 0.5)',
|
|
18
|
+
shadowOffset: { width: 0, height: 3 },
|
|
19
|
+
shadowOpacity: 0.1,
|
|
20
|
+
shadowRadius: 4.65,
|
|
21
|
+
boxShadow: '0px 3px 6px rgba(0, 0, 0, 0.16)',
|
|
22
|
+
},
|
|
23
|
+
lg: {
|
|
24
|
+
elevation: 3,
|
|
25
|
+
shadowColor: 'rgb(0, 0, 0, 0.5)',
|
|
26
|
+
shadowOffset: { width: 0, height: 6 },
|
|
27
|
+
shadowOpacity: 0.12,
|
|
28
|
+
shadowRadius: 6.27,
|
|
29
|
+
boxShadow: '0px 6px 12px rgba(0, 0, 0, 0.12)',
|
|
30
|
+
},
|
|
31
|
+
xl: {
|
|
32
|
+
elevation: 4,
|
|
33
|
+
shadowColor: 'rgb(0, 0, 0, 0.5)',
|
|
34
|
+
shadowOffset: { width: 0, height: 12 },
|
|
35
|
+
shadowOpacity: 0.14,
|
|
36
|
+
shadowRadius: 16.0,
|
|
37
|
+
boxShadow: '0px 12px 24px rgba(0, 0, 0, 0.18)',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
intents: {
|
|
41
|
+
primary: {
|
|
42
|
+
primary: '#3b82f6',
|
|
43
|
+
contrast: '#ffffff',
|
|
44
|
+
light: '#bfdbfe',
|
|
45
|
+
dark: '#1e40af',
|
|
46
|
+
},
|
|
47
|
+
success: {
|
|
48
|
+
primary: '#22c55e',
|
|
49
|
+
contrast: '#ffffff',
|
|
50
|
+
light: '#a7f3d0',
|
|
51
|
+
dark: '#165e29',
|
|
52
|
+
},
|
|
53
|
+
error: {
|
|
54
|
+
primary: '#ef4444',
|
|
55
|
+
contrast: '#ffffff',
|
|
56
|
+
light: '#fca5a1',
|
|
57
|
+
dark: '#9b2222',
|
|
58
|
+
},
|
|
59
|
+
warning: {
|
|
60
|
+
primary: '#f97316',
|
|
61
|
+
contrast: '#ffffff',
|
|
62
|
+
light: '#ffedd5',
|
|
63
|
+
dark: '#9a6a00',
|
|
64
|
+
},
|
|
65
|
+
neutral: {
|
|
66
|
+
primary: '#6b7280',
|
|
67
|
+
contrast: '#ffffff',
|
|
68
|
+
light: '#e5e7eb',
|
|
69
|
+
dark: '#374151',
|
|
70
|
+
},
|
|
71
|
+
info: {
|
|
72
|
+
primary: '#0ea5e9',
|
|
73
|
+
contrast: '#ffffff',
|
|
74
|
+
light: '#a5f3fc',
|
|
75
|
+
dark: '#1e40af',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
colors: {
|
|
79
|
+
pallet: generateColorPallette(),
|
|
80
|
+
surface: {
|
|
81
|
+
primary: '#ffffff',
|
|
82
|
+
secondary: '#f5f5f5',
|
|
83
|
+
tertiary: '#e0e0e0',
|
|
84
|
+
inverse: '#000000',
|
|
85
|
+
'inverse-secondary': 'rgba(0, 0, 0, 0.9)',
|
|
86
|
+
'inverse-tertiary': 'rgba(0, 0, 0, 0.7)',
|
|
87
|
+
},
|
|
88
|
+
text: {
|
|
89
|
+
primary: '#000000',
|
|
90
|
+
secondary: '#333333',
|
|
91
|
+
tertiary: '#666666',
|
|
92
|
+
inverse: '#ffffff',
|
|
93
|
+
'inverse-secondary': 'rgba(255, 255, 255, 0.9)',
|
|
94
|
+
'inverse-tertiary': 'rgba(255, 255, 255, 0.7)',
|
|
95
|
+
},
|
|
96
|
+
border: {
|
|
97
|
+
primary: '#e0e0e0',
|
|
98
|
+
secondary: '#d0d0d0',
|
|
99
|
+
tertiary: '#c0c0c0',
|
|
100
|
+
disabled: '#f0f0f0',
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
sizes: {
|
|
104
|
+
button: {
|
|
105
|
+
xs: {
|
|
106
|
+
paddingVertical: 4,
|
|
107
|
+
paddingHorizontal: 8,
|
|
108
|
+
minHeight: 24,
|
|
109
|
+
fontSize: 12,
|
|
110
|
+
lineHeight: 16,
|
|
111
|
+
iconSize: 12,
|
|
112
|
+
},
|
|
113
|
+
sm: {
|
|
114
|
+
paddingVertical: 6,
|
|
115
|
+
paddingHorizontal: 12,
|
|
116
|
+
minHeight: 32,
|
|
117
|
+
fontSize: 14,
|
|
118
|
+
lineHeight: 20,
|
|
119
|
+
iconSize: 14,
|
|
120
|
+
},
|
|
121
|
+
md: {
|
|
122
|
+
paddingVertical: 8,
|
|
123
|
+
paddingHorizontal: 16,
|
|
124
|
+
minHeight: 40,
|
|
125
|
+
fontSize: 16,
|
|
126
|
+
lineHeight: 24,
|
|
127
|
+
iconSize: 16,
|
|
128
|
+
},
|
|
129
|
+
lg: {
|
|
130
|
+
paddingVertical: 10,
|
|
131
|
+
paddingHorizontal: 20,
|
|
132
|
+
minHeight: 48,
|
|
133
|
+
fontSize: 18,
|
|
134
|
+
lineHeight: 28,
|
|
135
|
+
iconSize: 18,
|
|
136
|
+
},
|
|
137
|
+
xl: {
|
|
138
|
+
paddingVertical: 12,
|
|
139
|
+
paddingHorizontal: 24,
|
|
140
|
+
minHeight: 56,
|
|
141
|
+
fontSize: 20,
|
|
142
|
+
lineHeight: 32,
|
|
143
|
+
iconSize: 20,
|
|
144
|
+
}
|
|
145
|
+
} as Record<Size, ButtonSizeValue>,
|
|
146
|
+
chip: {
|
|
147
|
+
xs: {
|
|
148
|
+
paddingVertical: 1,
|
|
149
|
+
paddingHorizontal: 6,
|
|
150
|
+
minHeight: 16,
|
|
151
|
+
borderRadius: 999,
|
|
152
|
+
fontSize: 10,
|
|
153
|
+
lineHeight: 12,
|
|
154
|
+
iconSize: 10,
|
|
155
|
+
},
|
|
156
|
+
sm: {
|
|
157
|
+
paddingVertical: 2,
|
|
158
|
+
paddingHorizontal: 8,
|
|
159
|
+
minHeight: 20,
|
|
160
|
+
borderRadius: 999,
|
|
161
|
+
fontSize: 11,
|
|
162
|
+
lineHeight: 14,
|
|
163
|
+
iconSize: 12,
|
|
164
|
+
},
|
|
165
|
+
md: {
|
|
166
|
+
paddingVertical: 2,
|
|
167
|
+
paddingHorizontal: 10,
|
|
168
|
+
minHeight: 24,
|
|
169
|
+
borderRadius: 999,
|
|
170
|
+
fontSize: 12,
|
|
171
|
+
lineHeight: 16,
|
|
172
|
+
iconSize: 14,
|
|
173
|
+
},
|
|
174
|
+
lg: {
|
|
175
|
+
paddingVertical: 3,
|
|
176
|
+
paddingHorizontal: 12,
|
|
177
|
+
minHeight: 28,
|
|
178
|
+
borderRadius: 999,
|
|
179
|
+
fontSize: 14,
|
|
180
|
+
lineHeight: 18,
|
|
181
|
+
iconSize: 16,
|
|
182
|
+
},
|
|
183
|
+
xl: {
|
|
184
|
+
paddingVertical: 4,
|
|
185
|
+
paddingHorizontal: 14,
|
|
186
|
+
minHeight: 32,
|
|
187
|
+
borderRadius: 999,
|
|
188
|
+
fontSize: 16,
|
|
189
|
+
lineHeight: 20,
|
|
190
|
+
iconSize: 18,
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
badge: {
|
|
194
|
+
xs: {
|
|
195
|
+
minWidth: 12,
|
|
196
|
+
height: 12,
|
|
197
|
+
paddingHorizontal: 2,
|
|
198
|
+
fontSize: 8,
|
|
199
|
+
lineHeight: 10,
|
|
200
|
+
iconSize: 8,
|
|
201
|
+
},
|
|
202
|
+
sm: {
|
|
203
|
+
minWidth: 16,
|
|
204
|
+
height: 16,
|
|
205
|
+
paddingHorizontal: 4,
|
|
206
|
+
fontSize: 10,
|
|
207
|
+
lineHeight: 12,
|
|
208
|
+
iconSize: 10,
|
|
209
|
+
},
|
|
210
|
+
md: {
|
|
211
|
+
minWidth: 20,
|
|
212
|
+
height: 20,
|
|
213
|
+
paddingHorizontal: 6,
|
|
214
|
+
fontSize: 12,
|
|
215
|
+
lineHeight: 14,
|
|
216
|
+
iconSize: 12,
|
|
217
|
+
},
|
|
218
|
+
lg: {
|
|
219
|
+
minWidth: 24,
|
|
220
|
+
height: 24,
|
|
221
|
+
paddingHorizontal: 8,
|
|
222
|
+
fontSize: 14,
|
|
223
|
+
lineHeight: 16,
|
|
224
|
+
iconSize: 14,
|
|
225
|
+
},
|
|
226
|
+
xl: {
|
|
227
|
+
minWidth: 28,
|
|
228
|
+
height: 28,
|
|
229
|
+
paddingHorizontal: 10,
|
|
230
|
+
fontSize: 16,
|
|
231
|
+
lineHeight: 18,
|
|
232
|
+
iconSize: 16,
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
icon: {
|
|
236
|
+
xs: {
|
|
237
|
+
width: 12,
|
|
238
|
+
height: 12,
|
|
239
|
+
fontSize: 12,
|
|
240
|
+
},
|
|
241
|
+
sm: {
|
|
242
|
+
width: 16,
|
|
243
|
+
height: 16,
|
|
244
|
+
fontSize: 16,
|
|
245
|
+
},
|
|
246
|
+
md: {
|
|
247
|
+
width: 24,
|
|
248
|
+
height: 24,
|
|
249
|
+
fontSize: 24,
|
|
250
|
+
},
|
|
251
|
+
lg: {
|
|
252
|
+
width: 32,
|
|
253
|
+
height: 32,
|
|
254
|
+
fontSize: 32,
|
|
255
|
+
},
|
|
256
|
+
xl: {
|
|
257
|
+
width: 48,
|
|
258
|
+
height: 48,
|
|
259
|
+
fontSize: 48,
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
input: {
|
|
263
|
+
xs: {
|
|
264
|
+
height: 28,
|
|
265
|
+
paddingHorizontal: 6,
|
|
266
|
+
fontSize: 12,
|
|
267
|
+
iconSize: 12,
|
|
268
|
+
iconMargin: 4,
|
|
269
|
+
},
|
|
270
|
+
sm: {
|
|
271
|
+
height: 36,
|
|
272
|
+
paddingHorizontal: 8,
|
|
273
|
+
fontSize: 14,
|
|
274
|
+
iconSize: 16,
|
|
275
|
+
iconMargin: 4,
|
|
276
|
+
},
|
|
277
|
+
md: {
|
|
278
|
+
height: 44,
|
|
279
|
+
paddingHorizontal: 12,
|
|
280
|
+
fontSize: 16,
|
|
281
|
+
iconSize: 20,
|
|
282
|
+
iconMargin: 6,
|
|
283
|
+
},
|
|
284
|
+
lg: {
|
|
285
|
+
height: 52,
|
|
286
|
+
paddingHorizontal: 16,
|
|
287
|
+
fontSize: 18,
|
|
288
|
+
iconSize: 24,
|
|
289
|
+
iconMargin: 8,
|
|
290
|
+
},
|
|
291
|
+
xl: {
|
|
292
|
+
height: 60,
|
|
293
|
+
paddingHorizontal: 20,
|
|
294
|
+
fontSize: 20,
|
|
295
|
+
iconSize: 28,
|
|
296
|
+
iconMargin: 10,
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
radioButton: {
|
|
300
|
+
xs: {
|
|
301
|
+
radioSize: 12,
|
|
302
|
+
radioDotSize: 8,
|
|
303
|
+
fontSize: 12,
|
|
304
|
+
gap: 6,
|
|
305
|
+
},
|
|
306
|
+
sm: {
|
|
307
|
+
radioSize: 14,
|
|
308
|
+
radioDotSize: 10,
|
|
309
|
+
fontSize: 14,
|
|
310
|
+
gap: 8,
|
|
311
|
+
},
|
|
312
|
+
md: {
|
|
313
|
+
radioSize: 18,
|
|
314
|
+
radioDotSize: 12,
|
|
315
|
+
fontSize: 16,
|
|
316
|
+
gap: 8,
|
|
317
|
+
},
|
|
318
|
+
lg: {
|
|
319
|
+
radioSize: 22,
|
|
320
|
+
radioDotSize: 16,
|
|
321
|
+
fontSize: 18,
|
|
322
|
+
gap: 10,
|
|
323
|
+
},
|
|
324
|
+
xl: {
|
|
325
|
+
radioSize: 26,
|
|
326
|
+
radioDotSize: 20,
|
|
327
|
+
fontSize: 20,
|
|
328
|
+
gap: 12,
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
select: {
|
|
332
|
+
xs: {
|
|
333
|
+
paddingHorizontal: 8,
|
|
334
|
+
minHeight: 28,
|
|
335
|
+
fontSize: 12,
|
|
336
|
+
iconSize: 16,
|
|
337
|
+
},
|
|
338
|
+
sm: {
|
|
339
|
+
paddingHorizontal: 10,
|
|
340
|
+
minHeight: 36,
|
|
341
|
+
fontSize: 14,
|
|
342
|
+
iconSize: 18,
|
|
343
|
+
},
|
|
344
|
+
md: {
|
|
345
|
+
paddingHorizontal: 12,
|
|
346
|
+
minHeight: 44,
|
|
347
|
+
fontSize: 16,
|
|
348
|
+
iconSize: 20,
|
|
349
|
+
},
|
|
350
|
+
lg: {
|
|
351
|
+
paddingHorizontal: 16,
|
|
352
|
+
minHeight: 52,
|
|
353
|
+
fontSize: 18,
|
|
354
|
+
iconSize: 24,
|
|
355
|
+
},
|
|
356
|
+
xl: {
|
|
357
|
+
paddingHorizontal: 20,
|
|
358
|
+
minHeight: 60,
|
|
359
|
+
fontSize: 20,
|
|
360
|
+
iconSize: 28,
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
slider: {
|
|
364
|
+
xs: {
|
|
365
|
+
trackHeight: 2,
|
|
366
|
+
thumbSize: 12,
|
|
367
|
+
thumbIconSize: 8,
|
|
368
|
+
markHeight: 6,
|
|
369
|
+
labelFontSize: 10,
|
|
370
|
+
},
|
|
371
|
+
sm: {
|
|
372
|
+
trackHeight: 4,
|
|
373
|
+
thumbSize: 16,
|
|
374
|
+
thumbIconSize: 10,
|
|
375
|
+
markHeight: 8,
|
|
376
|
+
labelFontSize: 11,
|
|
377
|
+
},
|
|
378
|
+
md: {
|
|
379
|
+
trackHeight: 6,
|
|
380
|
+
thumbSize: 20,
|
|
381
|
+
thumbIconSize: 12,
|
|
382
|
+
markHeight: 10,
|
|
383
|
+
labelFontSize: 12,
|
|
384
|
+
},
|
|
385
|
+
lg: {
|
|
386
|
+
trackHeight: 8,
|
|
387
|
+
thumbSize: 24,
|
|
388
|
+
thumbIconSize: 16,
|
|
389
|
+
markHeight: 12,
|
|
390
|
+
labelFontSize: 13,
|
|
391
|
+
},
|
|
392
|
+
xl: {
|
|
393
|
+
trackHeight: 10,
|
|
394
|
+
thumbSize: 28,
|
|
395
|
+
thumbIconSize: 18,
|
|
396
|
+
markHeight: 14,
|
|
397
|
+
labelFontSize: 14,
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
switch: {
|
|
401
|
+
xs: {
|
|
402
|
+
trackWidth: 32,
|
|
403
|
+
trackHeight: 18,
|
|
404
|
+
thumbSize: 14,
|
|
405
|
+
thumbIconSize: 8,
|
|
406
|
+
translateX: 14,
|
|
407
|
+
},
|
|
408
|
+
sm: {
|
|
409
|
+
trackWidth: 36,
|
|
410
|
+
trackHeight: 20,
|
|
411
|
+
thumbSize: 16,
|
|
412
|
+
thumbIconSize: 10,
|
|
413
|
+
translateX: 16,
|
|
414
|
+
},
|
|
415
|
+
md: {
|
|
416
|
+
trackWidth: 44,
|
|
417
|
+
trackHeight: 24,
|
|
418
|
+
thumbSize: 20,
|
|
419
|
+
thumbIconSize: 12,
|
|
420
|
+
translateX: 20,
|
|
421
|
+
},
|
|
422
|
+
lg: {
|
|
423
|
+
trackWidth: 52,
|
|
424
|
+
trackHeight: 28,
|
|
425
|
+
thumbSize: 24,
|
|
426
|
+
thumbIconSize: 14,
|
|
427
|
+
translateX: 24,
|
|
428
|
+
},
|
|
429
|
+
xl: {
|
|
430
|
+
trackWidth: 60,
|
|
431
|
+
trackHeight: 32,
|
|
432
|
+
thumbSize: 28,
|
|
433
|
+
thumbIconSize: 16,
|
|
434
|
+
translateX: 28,
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
textarea: {
|
|
438
|
+
xs: {
|
|
439
|
+
fontSize: 12,
|
|
440
|
+
padding: 6,
|
|
441
|
+
lineHeight: 18,
|
|
442
|
+
minHeight: 60,
|
|
443
|
+
},
|
|
444
|
+
sm: {
|
|
445
|
+
fontSize: 14,
|
|
446
|
+
padding: 8,
|
|
447
|
+
lineHeight: 20,
|
|
448
|
+
minHeight: 80,
|
|
449
|
+
},
|
|
450
|
+
md: {
|
|
451
|
+
fontSize: 16,
|
|
452
|
+
padding: 12,
|
|
453
|
+
lineHeight: 24,
|
|
454
|
+
minHeight: 100,
|
|
455
|
+
},
|
|
456
|
+
lg: {
|
|
457
|
+
fontSize: 18,
|
|
458
|
+
padding: 16,
|
|
459
|
+
lineHeight: 28,
|
|
460
|
+
minHeight: 120,
|
|
461
|
+
},
|
|
462
|
+
xl: {
|
|
463
|
+
fontSize: 20,
|
|
464
|
+
padding: 20,
|
|
465
|
+
lineHeight: 32,
|
|
466
|
+
minHeight: 140,
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
avatar: {
|
|
470
|
+
xs: {
|
|
471
|
+
width: 24,
|
|
472
|
+
height: 24,
|
|
473
|
+
fontSize: 12,
|
|
474
|
+
},
|
|
475
|
+
sm: {
|
|
476
|
+
width: 32,
|
|
477
|
+
height: 32,
|
|
478
|
+
fontSize: 14,
|
|
479
|
+
},
|
|
480
|
+
md: {
|
|
481
|
+
width: 40,
|
|
482
|
+
height: 40,
|
|
483
|
+
fontSize: 16,
|
|
484
|
+
},
|
|
485
|
+
lg: {
|
|
486
|
+
width: 48,
|
|
487
|
+
height: 48,
|
|
488
|
+
fontSize: 18,
|
|
489
|
+
},
|
|
490
|
+
xl: {
|
|
491
|
+
width: 64,
|
|
492
|
+
height: 64,
|
|
493
|
+
fontSize: 24,
|
|
494
|
+
}
|
|
495
|
+
},
|
|
496
|
+
progress: {
|
|
497
|
+
xs: {
|
|
498
|
+
linearHeight: 2,
|
|
499
|
+
circularSize: 24,
|
|
500
|
+
labelFontSize: 10,
|
|
501
|
+
circularLabelFontSize: 8,
|
|
502
|
+
},
|
|
503
|
+
sm: {
|
|
504
|
+
linearHeight: 4,
|
|
505
|
+
circularSize: 32,
|
|
506
|
+
labelFontSize: 12,
|
|
507
|
+
circularLabelFontSize: 10,
|
|
508
|
+
},
|
|
509
|
+
md: {
|
|
510
|
+
linearHeight: 8,
|
|
511
|
+
circularSize: 48,
|
|
512
|
+
labelFontSize: 14,
|
|
513
|
+
circularLabelFontSize: 12,
|
|
514
|
+
},
|
|
515
|
+
lg: {
|
|
516
|
+
linearHeight: 12,
|
|
517
|
+
circularSize: 64,
|
|
518
|
+
labelFontSize: 16,
|
|
519
|
+
circularLabelFontSize: 14,
|
|
520
|
+
},
|
|
521
|
+
xl: {
|
|
522
|
+
linearHeight: 16,
|
|
523
|
+
circularSize: 80,
|
|
524
|
+
labelFontSize: 18,
|
|
525
|
+
circularLabelFontSize: 16,
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
accordion: {
|
|
529
|
+
xs: {
|
|
530
|
+
headerPadding: 8,
|
|
531
|
+
headerFontSize: 12,
|
|
532
|
+
iconSize: 16,
|
|
533
|
+
contentPadding: 8,
|
|
534
|
+
},
|
|
535
|
+
sm: {
|
|
536
|
+
headerPadding: 12,
|
|
537
|
+
headerFontSize: 14,
|
|
538
|
+
iconSize: 18,
|
|
539
|
+
contentPadding: 12,
|
|
540
|
+
},
|
|
541
|
+
md: {
|
|
542
|
+
headerPadding: 16,
|
|
543
|
+
headerFontSize: 16,
|
|
544
|
+
iconSize: 20,
|
|
545
|
+
contentPadding: 16,
|
|
546
|
+
},
|
|
547
|
+
lg: {
|
|
548
|
+
headerPadding: 20,
|
|
549
|
+
headerFontSize: 18,
|
|
550
|
+
iconSize: 24,
|
|
551
|
+
contentPadding: 20,
|
|
552
|
+
},
|
|
553
|
+
xl: {
|
|
554
|
+
headerPadding: 24,
|
|
555
|
+
headerFontSize: 20,
|
|
556
|
+
iconSize: 28,
|
|
557
|
+
contentPadding: 24,
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
activityIndicator: {
|
|
561
|
+
xs: {
|
|
562
|
+
size: 16,
|
|
563
|
+
borderWidth: 2,
|
|
564
|
+
},
|
|
565
|
+
sm: {
|
|
566
|
+
size: 20,
|
|
567
|
+
borderWidth: 2,
|
|
568
|
+
},
|
|
569
|
+
md: {
|
|
570
|
+
size: 36,
|
|
571
|
+
borderWidth: 3,
|
|
572
|
+
},
|
|
573
|
+
lg: {
|
|
574
|
+
size: 48,
|
|
575
|
+
borderWidth: 4,
|
|
576
|
+
},
|
|
577
|
+
xl: {
|
|
578
|
+
size: 64,
|
|
579
|
+
borderWidth: 5,
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
breadcrumb: {
|
|
583
|
+
xs: {
|
|
584
|
+
fontSize: 10,
|
|
585
|
+
lineHeight: 14,
|
|
586
|
+
iconSize: 12,
|
|
587
|
+
},
|
|
588
|
+
sm: {
|
|
589
|
+
fontSize: 12,
|
|
590
|
+
lineHeight: 16,
|
|
591
|
+
iconSize: 14,
|
|
592
|
+
},
|
|
593
|
+
md: {
|
|
594
|
+
fontSize: 14,
|
|
595
|
+
lineHeight: 20,
|
|
596
|
+
iconSize: 16,
|
|
597
|
+
},
|
|
598
|
+
lg: {
|
|
599
|
+
fontSize: 16,
|
|
600
|
+
lineHeight: 24,
|
|
601
|
+
iconSize: 18,
|
|
602
|
+
},
|
|
603
|
+
xl: {
|
|
604
|
+
fontSize: 18,
|
|
605
|
+
lineHeight: 28,
|
|
606
|
+
iconSize: 20,
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
list: {
|
|
610
|
+
xs: {
|
|
611
|
+
paddingVertical: 2,
|
|
612
|
+
paddingHorizontal: 3,
|
|
613
|
+
minHeight: 28,
|
|
614
|
+
iconSize: 14,
|
|
615
|
+
labelFontSize: 12,
|
|
616
|
+
labelLineHeight: 16,
|
|
617
|
+
},
|
|
618
|
+
sm: {
|
|
619
|
+
paddingVertical: 4,
|
|
620
|
+
paddingHorizontal: 8,
|
|
621
|
+
minHeight: 32,
|
|
622
|
+
iconSize: 16,
|
|
623
|
+
labelFontSize: 14,
|
|
624
|
+
labelLineHeight: 20,
|
|
625
|
+
},
|
|
626
|
+
md: {
|
|
627
|
+
paddingVertical: 4,
|
|
628
|
+
paddingHorizontal: 12,
|
|
629
|
+
minHeight: 44,
|
|
630
|
+
iconSize: 20,
|
|
631
|
+
labelFontSize: 16,
|
|
632
|
+
labelLineHeight: 24,
|
|
633
|
+
},
|
|
634
|
+
lg: {
|
|
635
|
+
paddingVertical: 6,
|
|
636
|
+
paddingHorizontal: 16,
|
|
637
|
+
minHeight: 52,
|
|
638
|
+
iconSize: 24,
|
|
639
|
+
labelFontSize: 18,
|
|
640
|
+
labelLineHeight: 28,
|
|
641
|
+
},
|
|
642
|
+
xl: {
|
|
643
|
+
paddingVertical: 8,
|
|
644
|
+
paddingHorizontal: 20,
|
|
645
|
+
minHeight: 60,
|
|
646
|
+
iconSize: 28,
|
|
647
|
+
labelFontSize: 20,
|
|
648
|
+
labelLineHeight: 32,
|
|
649
|
+
}
|
|
650
|
+
},
|
|
651
|
+
menu: {
|
|
652
|
+
xs: {
|
|
653
|
+
paddingVertical: 2,
|
|
654
|
+
paddingHorizontal: 6,
|
|
655
|
+
iconSize: 14,
|
|
656
|
+
labelFontSize: 12,
|
|
657
|
+
},
|
|
658
|
+
sm: {
|
|
659
|
+
paddingVertical: 4,
|
|
660
|
+
paddingHorizontal: 8,
|
|
661
|
+
iconSize: 16,
|
|
662
|
+
labelFontSize: 14,
|
|
663
|
+
},
|
|
664
|
+
md: {
|
|
665
|
+
paddingVertical: 8,
|
|
666
|
+
paddingHorizontal: 16,
|
|
667
|
+
iconSize: 20,
|
|
668
|
+
labelFontSize: 16,
|
|
669
|
+
},
|
|
670
|
+
lg: {
|
|
671
|
+
paddingVertical: 16,
|
|
672
|
+
paddingHorizontal: 24,
|
|
673
|
+
iconSize: 24,
|
|
674
|
+
labelFontSize: 18,
|
|
675
|
+
},
|
|
676
|
+
xl: {
|
|
677
|
+
paddingVertical: 20,
|
|
678
|
+
paddingHorizontal: 28,
|
|
679
|
+
iconSize: 28,
|
|
680
|
+
labelFontSize: 20,
|
|
681
|
+
}
|
|
682
|
+
},
|
|
683
|
+
text: {
|
|
684
|
+
xs: {
|
|
685
|
+
fontSize: 12,
|
|
686
|
+
lineHeight: 18,
|
|
687
|
+
},
|
|
688
|
+
sm: {
|
|
689
|
+
fontSize: 14,
|
|
690
|
+
lineHeight: 21,
|
|
691
|
+
},
|
|
692
|
+
md: {
|
|
693
|
+
fontSize: 16,
|
|
694
|
+
lineHeight: 24,
|
|
695
|
+
},
|
|
696
|
+
lg: {
|
|
697
|
+
fontSize: 18,
|
|
698
|
+
lineHeight: 25.2,
|
|
699
|
+
},
|
|
700
|
+
xl: {
|
|
701
|
+
fontSize: 24,
|
|
702
|
+
lineHeight: 31.92,
|
|
703
|
+
}
|
|
704
|
+
},
|
|
705
|
+
tabBar: {
|
|
706
|
+
xs: {
|
|
707
|
+
fontSize: 12,
|
|
708
|
+
lineHeight: 18,
|
|
709
|
+
padding: 6,
|
|
710
|
+
},
|
|
711
|
+
sm: {
|
|
712
|
+
fontSize: 14,
|
|
713
|
+
lineHeight: 20,
|
|
714
|
+
padding: 8,
|
|
715
|
+
},
|
|
716
|
+
md: {
|
|
717
|
+
fontSize: 16,
|
|
718
|
+
lineHeight: 24,
|
|
719
|
+
padding: 12,
|
|
720
|
+
},
|
|
721
|
+
lg: {
|
|
722
|
+
fontSize: 18,
|
|
723
|
+
lineHeight: 28,
|
|
724
|
+
padding: 16,
|
|
725
|
+
},
|
|
726
|
+
xl: {
|
|
727
|
+
fontSize: 20,
|
|
728
|
+
lineHeight: 32,
|
|
729
|
+
padding: 20,
|
|
730
|
+
}
|
|
731
|
+
},
|
|
732
|
+
table: {
|
|
733
|
+
xs: {
|
|
734
|
+
padding: 6,
|
|
735
|
+
fontSize: 12,
|
|
736
|
+
lineHeight: 16,
|
|
737
|
+
},
|
|
738
|
+
sm: {
|
|
739
|
+
padding: 8,
|
|
740
|
+
fontSize: 13,
|
|
741
|
+
lineHeight: 18,
|
|
742
|
+
},
|
|
743
|
+
md: {
|
|
744
|
+
padding: 16,
|
|
745
|
+
fontSize: 14,
|
|
746
|
+
lineHeight: 20,
|
|
747
|
+
},
|
|
748
|
+
lg: {
|
|
749
|
+
padding: 24,
|
|
750
|
+
fontSize: 15,
|
|
751
|
+
lineHeight: 22,
|
|
752
|
+
},
|
|
753
|
+
xl: {
|
|
754
|
+
padding: 32,
|
|
755
|
+
fontSize: 16,
|
|
756
|
+
lineHeight: 24,
|
|
757
|
+
}
|
|
758
|
+
},
|
|
759
|
+
tooltip: {
|
|
760
|
+
xs: {
|
|
761
|
+
fontSize: 11,
|
|
762
|
+
padding: 4,
|
|
763
|
+
},
|
|
764
|
+
sm: {
|
|
765
|
+
fontSize: 12,
|
|
766
|
+
padding: 6,
|
|
767
|
+
},
|
|
768
|
+
md: {
|
|
769
|
+
fontSize: 14,
|
|
770
|
+
padding: 8,
|
|
771
|
+
},
|
|
772
|
+
lg: {
|
|
773
|
+
fontSize: 16,
|
|
774
|
+
padding: 10,
|
|
775
|
+
},
|
|
776
|
+
xl: {
|
|
777
|
+
fontSize: 18,
|
|
778
|
+
padding: 12,
|
|
779
|
+
},
|
|
780
|
+
},
|
|
781
|
+
view: {
|
|
782
|
+
xs: {
|
|
783
|
+
padding: 4,
|
|
784
|
+
spacing: 4,
|
|
785
|
+
},
|
|
786
|
+
sm: {
|
|
787
|
+
padding: 8,
|
|
788
|
+
spacing: 8,
|
|
789
|
+
},
|
|
790
|
+
md: {
|
|
791
|
+
padding: 16,
|
|
792
|
+
spacing: 16,
|
|
793
|
+
},
|
|
794
|
+
lg: {
|
|
795
|
+
padding: 24,
|
|
796
|
+
spacing: 24,
|
|
797
|
+
},
|
|
798
|
+
xl: {
|
|
799
|
+
padding: 32,
|
|
800
|
+
spacing: 32,
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
} as Theme
|
|
805
|
+
|
|
806
|
+
function generateColorPallette() {
|
|
807
|
+
const colors = {} as Record<Pallet, Record<Shade, ColorValue>>
|
|
808
|
+
|
|
809
|
+
const baseColors: Record<Pallet, ColorValue> = {
|
|
810
|
+
red: '#ef4444',
|
|
811
|
+
blue: '#3b82f6',
|
|
812
|
+
green: '#22c55e',
|
|
813
|
+
yellow: '#f59e0b',
|
|
814
|
+
purple: '#8b5cf6',
|
|
815
|
+
gray: '#6b7280',
|
|
816
|
+
orange: '#f97316',
|
|
817
|
+
black: '#000000',
|
|
818
|
+
white: '#ffffff',
|
|
819
|
+
};
|
|
820
|
+
|
|
821
|
+
// Helper function to convert hex to RGB
|
|
822
|
+
const hexToRgb = (hex: string): [number, number, number] => {
|
|
823
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
824
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
825
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
826
|
+
return [r, g, b];
|
|
827
|
+
};
|
|
828
|
+
|
|
829
|
+
// Helper function to convert RGB to hex
|
|
830
|
+
const rgbToHex = (r: number, g: number, b: number): string => {
|
|
831
|
+
const toHex = (n: number) => Math.round(n).toString(16).padStart(2, '0');
|
|
832
|
+
return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
|
|
833
|
+
};
|
|
834
|
+
|
|
835
|
+
// Helper function to interpolate between two colors
|
|
836
|
+
const interpolate = (color1: [number, number, number], color2: [number, number, number], factor: number): [number, number, number] => {
|
|
837
|
+
return [
|
|
838
|
+
color1[0] + (color2[0] - color1[0]) * factor,
|
|
839
|
+
color1[1] + (color2[1] - color1[1]) * factor,
|
|
840
|
+
color1[2] + (color2[2] - color1[2]) * factor,
|
|
841
|
+
];
|
|
842
|
+
};
|
|
843
|
+
|
|
844
|
+
const shades = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
|
|
845
|
+
const white: [number, number, number] = [255, 255, 255];
|
|
846
|
+
const black: [number, number, number] = [0, 0, 0];
|
|
847
|
+
|
|
848
|
+
for (const [colorName, baseColor] of Object.entries(baseColors)) {
|
|
849
|
+
colors[colorName] = {} as Record<Shade, ColorValue>;
|
|
850
|
+
const baseRgb = hexToRgb(baseColor);
|
|
851
|
+
|
|
852
|
+
for (const shade of shades) {
|
|
853
|
+
if (shade === 500) {
|
|
854
|
+
// 500 is the base color
|
|
855
|
+
colors[colorName][shade] = baseColor;
|
|
856
|
+
} else if (shade < 500) {
|
|
857
|
+
// Lighter shades - interpolate towards white
|
|
858
|
+
// 50 is closest to white, 400 is closest to base
|
|
859
|
+
const factor = (500 - shade) / 450; // 450 = 500 - 50
|
|
860
|
+
const interpolated = interpolate(baseRgb, white, factor);
|
|
861
|
+
colors[colorName][shade] = rgbToHex(...interpolated);
|
|
862
|
+
} else {
|
|
863
|
+
// Darker shades - interpolate towards black
|
|
864
|
+
// 600 is closest to base, 900 is closest to black
|
|
865
|
+
const factor = (shade - 500) / 400; // 400 = 900 - 500
|
|
866
|
+
const interpolated = interpolate(baseRgb, black, factor);
|
|
867
|
+
colors[colorName][shade] = rgbToHex(...interpolated);
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
return colors;
|
|
873
|
+
}
|