@idealyst/theme 1.0.83 → 1.0.85

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