@matteoaliano/forest-ui 0.1.0 → 0.2.1

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.
@@ -0,0 +1,1384 @@
1
+ import { createTheme } from '@mui/material/styles';
2
+
3
+ // src/theme/index.ts
4
+
5
+ // src/theme/tokens.ts
6
+ var colors = {
7
+ base: {
8
+ white: "#ffffff",
9
+ black: "#000000",
10
+ transparent: "#ffffff00"
11
+ },
12
+ brand: {
13
+ 25: "#fcfaff",
14
+ 50: "#f9f5ff",
15
+ 100: "#f4ebff",
16
+ 200: "#e9d7fe",
17
+ 300: "#d6bbfb",
18
+ 400: "#b692f6",
19
+ 500: "#9e77ed",
20
+ 600: "#7f56d9",
21
+ 700: "#6941c6",
22
+ 800: "#53389e",
23
+ 900: "#42307d",
24
+ 950: "#2c1c5f"
25
+ },
26
+ gray: {
27
+ 25: "#fcfcfd",
28
+ 50: "#f9fafb",
29
+ 100: "#f2f4f7",
30
+ 200: "#eaecf0",
31
+ 300: "#d0d5dd",
32
+ 400: "#98a2b3",
33
+ 500: "#667085",
34
+ 600: "#475467",
35
+ 700: "#344054",
36
+ 800: "#182230",
37
+ 900: "#101828",
38
+ 950: "#0c111d"
39
+ },
40
+ error: {
41
+ 25: "#fffbfa",
42
+ 50: "#fef3f2",
43
+ 100: "#fee4e2",
44
+ 200: "#fecdca",
45
+ 300: "#fda29b",
46
+ 400: "#f97066",
47
+ 500: "#f04438",
48
+ 600: "#d92d20",
49
+ 700: "#b42318",
50
+ 800: "#912018",
51
+ 900: "#7a271a",
52
+ 950: "#55160c"
53
+ },
54
+ warning: {
55
+ 25: "#fffcf5",
56
+ 50: "#fffaeb",
57
+ 100: "#fef0c7",
58
+ 200: "#fedf89",
59
+ 300: "#fec84b",
60
+ 400: "#fdb022",
61
+ 500: "#f79009",
62
+ 600: "#dc6803",
63
+ 700: "#b54708",
64
+ 800: "#93370d",
65
+ 900: "#7a2e0e",
66
+ 950: "#4e1d09"
67
+ },
68
+ success: {
69
+ 25: "#f6fef9",
70
+ 50: "#ecfdf3",
71
+ 100: "#dcfae6",
72
+ 200: "#abefc6",
73
+ 300: "#75e0a7",
74
+ 400: "#47cd89",
75
+ 500: "#17b26a",
76
+ 600: "#079455",
77
+ 700: "#067647",
78
+ 800: "#085d3a",
79
+ 900: "#074d31",
80
+ 950: "#053321"
81
+ },
82
+ blue: {
83
+ 25: "#f5faff",
84
+ 50: "#eff8ff",
85
+ 100: "#d1e9ff",
86
+ 200: "#b2ddff",
87
+ 300: "#84caff",
88
+ 400: "#53b1fd",
89
+ 500: "#2e90fa",
90
+ 600: "#1570ef",
91
+ 700: "#175cd3",
92
+ 800: "#1849a9",
93
+ 900: "#194185",
94
+ 950: "#102a56"
95
+ }
96
+ };
97
+ var spacing = {
98
+ none: 0,
99
+ xxs: 2,
100
+ xs: 4,
101
+ sm: 6,
102
+ md: 8,
103
+ lg: 12,
104
+ xl: 16,
105
+ "2xl": 20,
106
+ "3xl": 24,
107
+ "4xl": 32,
108
+ "5xl": 40,
109
+ "6xl": 48,
110
+ "7xl": 64,
111
+ "8xl": 80,
112
+ "9xl": 96,
113
+ "10xl": 128,
114
+ "11xl": 160
115
+ };
116
+ var radius = {
117
+ none: 0,
118
+ xxs: 2,
119
+ xs: 4,
120
+ sm: 6,
121
+ md: 8,
122
+ lg: 10,
123
+ xl: 12,
124
+ "2xl": 16,
125
+ "3xl": 20,
126
+ "4xl": 24,
127
+ full: 9999
128
+ };
129
+ var shadows = {
130
+ xs: "0px 1px 2px 0px #1018280d",
131
+ sm: "0px 1px 3px 0px #1018281a, 0px 1px 2px 0px #1018280f",
132
+ md: "0px 4px 8px -2px #1018281a, 0px 2px 4px -2px #1018280f",
133
+ lg: "0px 12px 16px -4px #10182814, 0px 4px 6px -2px #10182808",
134
+ xl: "0px 20px 24px -4px #10182814, 0px 8px 8px -4px #10182808",
135
+ "2xl": "0px 24px 48px -12px #1018282e",
136
+ "3xl": "0px 32px 64px -12px #10182824"
137
+ };
138
+ var focusRings = {
139
+ brand: "0px 0px 0px 4px #9e77ed3d",
140
+ brandShadowXs: "0px 1px 2px 0px #1018280d, 0px 0px 0px 4px #9e77ed3d",
141
+ brandShadowSm: "0px 1px 3px 0px #1018281a, 0px 1px 2px 0px #1018280f, 0px 0px 0px 4px #9e77ed3d",
142
+ gray: "0px 0px 0px 4px #98a2b324",
143
+ grayShadowXs: "0px 1px 2px 0px #1018280d, 0px 0px 0px 4px #98a2b324",
144
+ grayShadowSm: "0px 1px 3px 0px #1018281a, 0px 1px 2px 0px #1018280f, 0px 0px 0px 4px #98a2b324",
145
+ error: "0px 0px 0px 4px #f044383d",
146
+ errorShadowXs: "0px 1px 2px 0px #1018280d, 0px 0px 0px 4px #f044383d"
147
+ };
148
+ var fontFamily = '"Poppins", sans-serif';
149
+ var fontSize = {
150
+ xxs: 11,
151
+ xs: 12,
152
+ sm: 14,
153
+ md: 16,
154
+ lg: 18,
155
+ xl: 20
156
+ };
157
+ var lineHeight = {
158
+ xxs: "16px",
159
+ xs: "18px",
160
+ sm: "20px",
161
+ md: "24px",
162
+ lg: "28px",
163
+ xl: "30px"
164
+ };
165
+ var fontWeight = {
166
+ regular: 400,
167
+ medium: 500,
168
+ semibold: 600,
169
+ bold: 700
170
+ };
171
+ var display = {
172
+ "2xl": { fontSize: 72, lineHeight: "90px", letterSpacing: "-0.02em" },
173
+ xl: { fontSize: 60, lineHeight: "72px", letterSpacing: "-0.02em" },
174
+ lg: { fontSize: 48, lineHeight: "60px", letterSpacing: "-0.02em" },
175
+ md: { fontSize: 36, lineHeight: "44px", letterSpacing: "-0.02em" },
176
+ sm: { fontSize: 30, lineHeight: "38px" },
177
+ xs: { fontSize: 24, lineHeight: "32px" }
178
+ };
179
+ var container = {
180
+ maxWidthDesktop: 1280,
181
+ paddingDesktop: 32,
182
+ paddingMobile: 16
183
+ };
184
+ var widths = {
185
+ xxs: 320,
186
+ xs: 384,
187
+ sm: 480,
188
+ md: 560,
189
+ lg: 640,
190
+ xl: 768,
191
+ "2xl": 1024,
192
+ "3xl": 1280,
193
+ "4xl": 1440,
194
+ "5xl": 1600,
195
+ "6xl": 1920
196
+ };
197
+
198
+ // src/theme/palette.ts
199
+ function buildPalette(tokens) {
200
+ const { colors: colors2 } = tokens;
201
+ return {
202
+ primary: {
203
+ main: colors2.brand[600],
204
+ light: colors2.brand[400],
205
+ dark: colors2.brand[700],
206
+ contrastText: colors2.base.white
207
+ },
208
+ secondary: {
209
+ main: colors2.gray[600],
210
+ light: colors2.gray[400],
211
+ dark: colors2.gray[700],
212
+ contrastText: colors2.base.white
213
+ },
214
+ error: {
215
+ main: colors2.error[600],
216
+ light: colors2.error[300],
217
+ dark: colors2.error[700],
218
+ contrastText: colors2.base.white
219
+ },
220
+ warning: {
221
+ main: colors2.warning[600],
222
+ light: colors2.warning[300],
223
+ dark: colors2.warning[700],
224
+ contrastText: colors2.base.white
225
+ },
226
+ success: {
227
+ main: colors2.success[600],
228
+ light: colors2.success[300],
229
+ dark: colors2.success[700],
230
+ contrastText: colors2.base.white
231
+ },
232
+ info: {
233
+ main: colors2.blue[600],
234
+ light: colors2.blue[300],
235
+ dark: colors2.blue[700],
236
+ contrastText: colors2.base.white
237
+ },
238
+ background: {
239
+ default: colors2.base.white,
240
+ paper: colors2.base.white
241
+ },
242
+ text: {
243
+ primary: colors2.gray[900],
244
+ secondary: colors2.gray[700],
245
+ disabled: colors2.gray[500]
246
+ },
247
+ divider: colors2.gray[200],
248
+ action: {
249
+ active: colors2.gray[600],
250
+ hover: colors2.gray[50],
251
+ selected: colors2.brand[50],
252
+ disabled: colors2.gray[400],
253
+ disabledBackground: colors2.gray[100]
254
+ }
255
+ };
256
+ }
257
+ var palette = buildPalette({
258
+ colors
259
+ });
260
+
261
+ // src/theme/typography.ts
262
+ function buildTypography(tokens) {
263
+ const { fontFamily: fontFamily2, display: display2, fontSize: fontSize2, lineHeight: lineHeight2, fontWeight: fontWeight2 } = tokens;
264
+ return {
265
+ fontFamily: fontFamily2,
266
+ fontWeightRegular: fontWeight2.regular,
267
+ fontWeightMedium: fontWeight2.medium,
268
+ fontWeightBold: fontWeight2.bold,
269
+ // Display styles → MUI headings
270
+ h1: {
271
+ fontSize: display2.xl.fontSize,
272
+ lineHeight: display2.xl.lineHeight,
273
+ letterSpacing: display2.xl.letterSpacing,
274
+ fontWeight: fontWeight2.semibold
275
+ },
276
+ h2: {
277
+ fontSize: display2.lg.fontSize,
278
+ lineHeight: display2.lg.lineHeight,
279
+ letterSpacing: display2.lg.letterSpacing,
280
+ fontWeight: fontWeight2.semibold
281
+ },
282
+ h3: {
283
+ fontSize: display2.md.fontSize,
284
+ lineHeight: display2.md.lineHeight,
285
+ letterSpacing: display2.md.letterSpacing,
286
+ fontWeight: fontWeight2.semibold
287
+ },
288
+ h4: {
289
+ fontSize: display2.sm.fontSize,
290
+ lineHeight: display2.sm.lineHeight,
291
+ fontWeight: fontWeight2.semibold
292
+ },
293
+ h5: {
294
+ fontSize: display2.xs.fontSize,
295
+ lineHeight: display2.xs.lineHeight,
296
+ fontWeight: fontWeight2.semibold
297
+ },
298
+ h6: {
299
+ fontSize: fontSize2.xl,
300
+ lineHeight: lineHeight2.xl,
301
+ fontWeight: fontWeight2.semibold
302
+ },
303
+ subtitle1: {
304
+ fontSize: fontSize2.lg,
305
+ lineHeight: lineHeight2.lg,
306
+ fontWeight: fontWeight2.medium
307
+ },
308
+ subtitle2: {
309
+ fontSize: fontSize2.md,
310
+ lineHeight: lineHeight2.md,
311
+ fontWeight: fontWeight2.medium
312
+ },
313
+ body1: {
314
+ fontSize: fontSize2.md,
315
+ lineHeight: lineHeight2.md,
316
+ fontWeight: fontWeight2.regular
317
+ },
318
+ body2: {
319
+ fontSize: fontSize2.sm,
320
+ lineHeight: lineHeight2.sm,
321
+ fontWeight: fontWeight2.regular
322
+ },
323
+ caption: {
324
+ fontSize: fontSize2.xs,
325
+ lineHeight: lineHeight2.xs,
326
+ fontWeight: fontWeight2.regular
327
+ },
328
+ overline: {
329
+ fontSize: fontSize2.xxs,
330
+ lineHeight: lineHeight2.xxs,
331
+ fontWeight: fontWeight2.medium,
332
+ textTransform: "uppercase",
333
+ letterSpacing: "0.08em"
334
+ },
335
+ button: {
336
+ fontSize: fontSize2.sm,
337
+ lineHeight: lineHeight2.sm,
338
+ fontWeight: fontWeight2.semibold,
339
+ textTransform: "none"
340
+ }
341
+ };
342
+ }
343
+ var typography = buildTypography({
344
+ fontFamily,
345
+ display,
346
+ fontSize,
347
+ lineHeight,
348
+ fontWeight
349
+ });
350
+
351
+ // src/theme/components.ts
352
+ function buildComponents(tokens) {
353
+ const { colors: colors2, radius: radius2, focusRings: focusRings2, shadows: tokenShadows } = tokens;
354
+ return {
355
+ // ─── Button ─────────────────────────────────────────────────────
356
+ MuiButton: {
357
+ defaultProps: {
358
+ disableElevation: true
359
+ },
360
+ styleOverrides: {
361
+ root: {
362
+ borderRadius: radius2.md,
363
+ fontWeight: 600,
364
+ "&:focus-visible": {
365
+ boxShadow: focusRings2.brandShadowXs
366
+ }
367
+ },
368
+ sizeLarge: {
369
+ padding: "12px 20px",
370
+ fontSize: 16,
371
+ lineHeight: "24px"
372
+ },
373
+ sizeMedium: {
374
+ padding: "10px 16px",
375
+ fontSize: 14,
376
+ lineHeight: "20px"
377
+ },
378
+ sizeSmall: {
379
+ padding: "8px 14px",
380
+ fontSize: 14,
381
+ lineHeight: "20px"
382
+ },
383
+ containedPrimary: {
384
+ backgroundColor: colors2.brand[600],
385
+ "&:hover": {
386
+ backgroundColor: colors2.brand[700]
387
+ }
388
+ },
389
+ outlinedPrimary: {
390
+ borderColor: colors2.brand[300],
391
+ color: colors2.brand[700],
392
+ "&:hover": {
393
+ backgroundColor: colors2.brand[50],
394
+ borderColor: colors2.brand[300]
395
+ }
396
+ },
397
+ textPrimary: {
398
+ color: colors2.brand[700],
399
+ "&:hover": {
400
+ backgroundColor: colors2.brand[50]
401
+ }
402
+ }
403
+ }
404
+ },
405
+ // ─── Button Group ───────────────────────────────────────────────
406
+ MuiButtonGroup: {
407
+ defaultProps: {
408
+ disableElevation: true
409
+ },
410
+ styleOverrides: {
411
+ root: {
412
+ borderRadius: radius2.md
413
+ },
414
+ grouped: {
415
+ "&:not(:last-of-type)": {
416
+ borderRight: `1px solid ${colors2.brand[700]}`
417
+ }
418
+ }
419
+ }
420
+ },
421
+ // ─── FAB ────────────────────────────────────────────────────────
422
+ MuiFab: {
423
+ styleOverrides: {
424
+ root: {
425
+ boxShadow: tokenShadows.md,
426
+ "&:hover": {
427
+ boxShadow: tokenShadows.lg
428
+ },
429
+ "&:focus-visible": {
430
+ boxShadow: focusRings2.brandShadowSm
431
+ }
432
+ },
433
+ primary: {
434
+ backgroundColor: colors2.brand[600],
435
+ "&:hover": {
436
+ backgroundColor: colors2.brand[700]
437
+ }
438
+ }
439
+ }
440
+ },
441
+ // ─── TextField / Input ──────────────────────────────────────────
442
+ MuiTextField: {
443
+ defaultProps: {
444
+ variant: "outlined",
445
+ size: "small"
446
+ }
447
+ },
448
+ MuiOutlinedInput: {
449
+ styleOverrides: {
450
+ root: {
451
+ borderRadius: radius2.md,
452
+ "&:hover .MuiOutlinedInput-notchedOutline": {
453
+ borderColor: colors2.brand[300]
454
+ },
455
+ "&.Mui-focused .MuiOutlinedInput-notchedOutline": {
456
+ borderColor: colors2.brand[600],
457
+ borderWidth: 1,
458
+ boxShadow: "none"
459
+ },
460
+ "&.Mui-error .MuiOutlinedInput-notchedOutline": {
461
+ borderColor: colors2.error[300]
462
+ },
463
+ "&.Mui-error.Mui-focused .MuiOutlinedInput-notchedOutline": {
464
+ borderColor: colors2.error[600],
465
+ boxShadow: "none"
466
+ }
467
+ },
468
+ notchedOutline: {
469
+ borderColor: colors2.gray[300]
470
+ },
471
+ input: {
472
+ padding: "10px 14px",
473
+ fontSize: 16,
474
+ lineHeight: "24px",
475
+ "&::placeholder": {
476
+ color: colors2.gray[500],
477
+ opacity: 1
478
+ }
479
+ },
480
+ inputSizeSmall: {
481
+ padding: "8px 12px",
482
+ fontSize: 14,
483
+ lineHeight: "20px"
484
+ }
485
+ }
486
+ },
487
+ MuiInputLabel: {
488
+ styleOverrides: {
489
+ root: {
490
+ fontSize: 14,
491
+ fontWeight: 500,
492
+ color: colors2.gray[700],
493
+ "&.Mui-focused": {
494
+ color: colors2.gray[700]
495
+ },
496
+ "&.Mui-error": {
497
+ color: colors2.error[600]
498
+ }
499
+ }
500
+ }
501
+ },
502
+ MuiFormHelperText: {
503
+ styleOverrides: {
504
+ root: {
505
+ fontSize: 14,
506
+ lineHeight: "20px",
507
+ marginTop: 6,
508
+ marginLeft: 0,
509
+ "&.Mui-error": {
510
+ color: colors2.error[600]
511
+ }
512
+ }
513
+ }
514
+ },
515
+ // ─── Select ─────────────────────────────────────────────────────
516
+ MuiSelect: {
517
+ defaultProps: {
518
+ size: "small"
519
+ },
520
+ styleOverrides: {
521
+ icon: {
522
+ color: colors2.gray[500]
523
+ }
524
+ }
525
+ },
526
+ // ─── Autocomplete ───────────────────────────────────────────────
527
+ MuiAutocomplete: {
528
+ styleOverrides: {
529
+ paper: {
530
+ borderRadius: radius2.md,
531
+ boxShadow: tokenShadows.lg,
532
+ border: `1px solid ${colors2.gray[200]}`,
533
+ marginTop: 4
534
+ },
535
+ option: {
536
+ fontSize: 16,
537
+ lineHeight: "24px",
538
+ padding: "10px 14px",
539
+ "&.Mui-focused": {
540
+ backgroundColor: colors2.gray[50]
541
+ },
542
+ '&[aria-selected="true"]': {
543
+ backgroundColor: colors2.brand[50]
544
+ }
545
+ },
546
+ listbox: {
547
+ padding: 4
548
+ }
549
+ }
550
+ },
551
+ // ─── Checkbox ───────────────────────────────────────────────────
552
+ MuiCheckbox: {
553
+ defaultProps: {
554
+ disableRipple: true
555
+ },
556
+ styleOverrides: {
557
+ root: {
558
+ color: colors2.gray[300],
559
+ borderRadius: radius2.xs,
560
+ padding: 0,
561
+ width: 20,
562
+ height: 20,
563
+ "&:hover": {
564
+ backgroundColor: "transparent",
565
+ color: colors2.brand[600]
566
+ },
567
+ "&.Mui-checked": {
568
+ color: colors2.brand[600]
569
+ },
570
+ "&.Mui-checked:hover": {
571
+ color: colors2.brand[700]
572
+ },
573
+ "&.Mui-focusVisible": {
574
+ outline: "none",
575
+ boxShadow: focusRings2.brand,
576
+ borderRadius: radius2.xs
577
+ },
578
+ "&.Mui-disabled": {
579
+ color: colors2.gray[300]
580
+ }
581
+ }
582
+ }
583
+ },
584
+ // ─── Radio ──────────────────────────────────────────────────────
585
+ MuiRadio: {
586
+ defaultProps: {
587
+ disableRipple: true
588
+ },
589
+ styleOverrides: {
590
+ root: {
591
+ color: colors2.gray[300],
592
+ padding: 0,
593
+ "&:hover": {
594
+ backgroundColor: "transparent",
595
+ color: colors2.brand[600]
596
+ },
597
+ "&.Mui-checked": {
598
+ color: colors2.brand[600]
599
+ },
600
+ "&.Mui-checked:hover": {
601
+ color: colors2.brand[700]
602
+ },
603
+ "&.Mui-focusVisible": {
604
+ outline: "none",
605
+ boxShadow: focusRings2.brand,
606
+ borderRadius: radius2.full
607
+ },
608
+ "&.Mui-disabled": {
609
+ color: colors2.gray[300]
610
+ }
611
+ }
612
+ }
613
+ },
614
+ // ─── Switch ─────────────────────────────────────────────────────
615
+ MuiSwitch: {
616
+ defaultProps: {
617
+ disableRipple: true
618
+ },
619
+ styleOverrides: {
620
+ root: {
621
+ width: 44,
622
+ height: 24,
623
+ padding: 0
624
+ },
625
+ switchBase: {
626
+ padding: 2,
627
+ "&.Mui-checked": {
628
+ transform: "translateX(20px)",
629
+ color: colors2.base.white,
630
+ "& + .MuiSwitch-track": {
631
+ backgroundColor: colors2.brand[600],
632
+ opacity: 1
633
+ }
634
+ },
635
+ "&.Mui-checked:hover + .MuiSwitch-track": {
636
+ backgroundColor: colors2.brand[700]
637
+ },
638
+ "&.Mui-focusVisible .MuiSwitch-thumb": {
639
+ boxShadow: focusRings2.brand
640
+ },
641
+ "&.Mui-disabled .MuiSwitch-thumb": {
642
+ color: colors2.gray[100]
643
+ },
644
+ "&.Mui-disabled + .MuiSwitch-track": {
645
+ opacity: 0.5
646
+ }
647
+ },
648
+ thumb: {
649
+ width: 20,
650
+ height: 20,
651
+ boxShadow: "0px 1px 2px 0px #1018280d"
652
+ },
653
+ track: {
654
+ borderRadius: radius2.full,
655
+ backgroundColor: colors2.gray[200],
656
+ opacity: 1
657
+ }
658
+ }
659
+ },
660
+ // ─── Toggle Button ─────────────────────────────────────────────
661
+ MuiToggleButton: {
662
+ styleOverrides: {
663
+ root: {
664
+ borderRadius: radius2.md,
665
+ borderColor: colors2.gray[300],
666
+ color: colors2.gray[700],
667
+ fontSize: 14,
668
+ fontWeight: 600,
669
+ lineHeight: "20px",
670
+ padding: "8px 14px",
671
+ textTransform: "none",
672
+ "&:hover": {
673
+ backgroundColor: colors2.gray[50]
674
+ },
675
+ "&.Mui-selected": {
676
+ backgroundColor: colors2.brand[50],
677
+ color: colors2.brand[700],
678
+ borderColor: colors2.brand[300],
679
+ "&:hover": {
680
+ backgroundColor: colors2.brand[100]
681
+ }
682
+ },
683
+ "&:focus-visible": {
684
+ boxShadow: focusRings2.brandShadowXs
685
+ }
686
+ }
687
+ }
688
+ },
689
+ MuiToggleButtonGroup: {
690
+ styleOverrides: {
691
+ root: {
692
+ borderRadius: radius2.md
693
+ },
694
+ grouped: {
695
+ "&:not(:first-of-type)": {
696
+ borderRadius: radius2.md,
697
+ marginLeft: -1
698
+ },
699
+ "&:first-of-type": {
700
+ borderRadius: radius2.md
701
+ }
702
+ }
703
+ }
704
+ },
705
+ // ─── Card ───────────────────────────────────────────────────────
706
+ MuiCard: {
707
+ defaultProps: {
708
+ elevation: 0
709
+ },
710
+ styleOverrides: {
711
+ root: {
712
+ borderRadius: radius2.xl,
713
+ border: `1px solid ${colors2.gray[200]}`,
714
+ backgroundColor: colors2.base.white,
715
+ overflow: "hidden"
716
+ }
717
+ }
718
+ },
719
+ MuiCardContent: {
720
+ styleOverrides: {
721
+ root: {
722
+ padding: "24px",
723
+ "&:last-child": {
724
+ paddingBottom: "24px"
725
+ }
726
+ }
727
+ }
728
+ },
729
+ MuiCardHeader: {
730
+ styleOverrides: {
731
+ root: {
732
+ padding: "24px 24px 0 24px"
733
+ },
734
+ title: {
735
+ fontSize: 18,
736
+ fontWeight: 600,
737
+ lineHeight: "28px"
738
+ },
739
+ subheader: {
740
+ fontSize: 14,
741
+ lineHeight: "20px",
742
+ marginTop: 4
743
+ },
744
+ action: {
745
+ marginTop: -4,
746
+ marginRight: -4
747
+ }
748
+ }
749
+ },
750
+ // ─── Paper ──────────────────────────────────────────────────────
751
+ MuiPaper: {
752
+ defaultProps: {
753
+ elevation: 0
754
+ },
755
+ styleOverrides: {
756
+ root: {
757
+ backgroundImage: "none"
758
+ },
759
+ rounded: {
760
+ borderRadius: radius2.lg
761
+ },
762
+ elevation1: {
763
+ boxShadow: tokenShadows.xs,
764
+ border: `1px solid ${colors2.gray[200]}`
765
+ },
766
+ elevation2: {
767
+ boxShadow: tokenShadows.sm,
768
+ border: `1px solid ${colors2.gray[200]}`
769
+ },
770
+ elevation3: {
771
+ boxShadow: tokenShadows.md,
772
+ border: `1px solid ${colors2.gray[200]}`
773
+ },
774
+ elevation4: {
775
+ boxShadow: tokenShadows.lg,
776
+ border: `1px solid ${colors2.gray[200]}`
777
+ },
778
+ elevation8: {
779
+ boxShadow: tokenShadows.xl,
780
+ border: `1px solid ${colors2.gray[200]}`
781
+ },
782
+ elevation16: {
783
+ boxShadow: tokenShadows["2xl"],
784
+ border: `1px solid ${colors2.gray[200]}`
785
+ },
786
+ elevation24: {
787
+ boxShadow: tokenShadows["3xl"],
788
+ border: `1px solid ${colors2.gray[200]}`
789
+ }
790
+ }
791
+ },
792
+ // ─── Accordion ──────────────────────────────────────────────────
793
+ MuiAccordion: {
794
+ defaultProps: {
795
+ disableGutters: true,
796
+ elevation: 0
797
+ },
798
+ styleOverrides: {
799
+ root: {
800
+ border: `1px solid ${colors2.gray[200]}`,
801
+ borderRadius: radius2.lg,
802
+ "&:not(:last-child)": {
803
+ marginBottom: 8
804
+ },
805
+ "&:before": {
806
+ display: "none"
807
+ },
808
+ "&.Mui-expanded": {
809
+ margin: 0,
810
+ marginBottom: 8,
811
+ borderRadius: radius2.lg
812
+ }
813
+ }
814
+ }
815
+ },
816
+ MuiAccordionSummary: {
817
+ styleOverrides: {
818
+ root: {
819
+ padding: "0 24px",
820
+ minHeight: 56,
821
+ "&.Mui-expanded": {
822
+ minHeight: 56,
823
+ borderBottom: `1px solid ${colors2.gray[200]}`
824
+ }
825
+ },
826
+ content: {
827
+ margin: "12px 0",
828
+ "&.Mui-expanded": {
829
+ margin: "12px 0"
830
+ }
831
+ }
832
+ }
833
+ },
834
+ MuiAccordionDetails: {
835
+ styleOverrides: {
836
+ root: {
837
+ padding: "24px"
838
+ }
839
+ }
840
+ },
841
+ // ─── AppBar ─────────────────────────────────────────────────────
842
+ MuiAppBar: {
843
+ defaultProps: {
844
+ elevation: 0,
845
+ color: "transparent"
846
+ },
847
+ styleOverrides: {
848
+ root: {
849
+ borderBottom: `1px solid ${colors2.gray[200]}`,
850
+ backgroundColor: colors2.base.white
851
+ }
852
+ }
853
+ },
854
+ MuiToolbar: {
855
+ styleOverrides: {
856
+ root: {
857
+ minHeight: 64,
858
+ "@media (min-width: 600px)": {
859
+ minHeight: 64
860
+ }
861
+ },
862
+ dense: {
863
+ minHeight: 48,
864
+ "@media (min-width: 600px)": {
865
+ minHeight: 48
866
+ }
867
+ }
868
+ }
869
+ },
870
+ // ─── Chip ───────────────────────────────────────────────────────
871
+ MuiChip: {
872
+ styleOverrides: {
873
+ root: {
874
+ borderRadius: radius2.md,
875
+ fontWeight: 500,
876
+ fontSize: 14
877
+ }
878
+ }
879
+ },
880
+ // ─── Form Control / Label ───────────────────────────────────────
881
+ MuiFormControlLabel: {
882
+ styleOverrides: {
883
+ root: {
884
+ marginLeft: 0,
885
+ gap: 8
886
+ },
887
+ label: {
888
+ fontSize: 14,
889
+ lineHeight: "20px",
890
+ fontWeight: 500,
891
+ color: colors2.gray[700]
892
+ }
893
+ }
894
+ },
895
+ // ─── Table ───────────────────────────────────────────────────────
896
+ MuiTable: {
897
+ styleOverrides: {
898
+ root: {
899
+ borderCollapse: "separate",
900
+ borderSpacing: 0
901
+ }
902
+ }
903
+ },
904
+ MuiTableCell: {
905
+ styleOverrides: {
906
+ root: {
907
+ borderBottom: `1px solid ${colors2.gray[200]}`,
908
+ padding: "16px 24px",
909
+ fontSize: 14,
910
+ lineHeight: "20px",
911
+ color: colors2.gray[600]
912
+ },
913
+ head: {
914
+ backgroundColor: colors2.gray[50],
915
+ color: colors2.gray[600],
916
+ fontWeight: 500,
917
+ fontSize: 12,
918
+ lineHeight: "18px"
919
+ },
920
+ body: {
921
+ color: colors2.gray[600]
922
+ }
923
+ }
924
+ },
925
+ MuiTableHead: {
926
+ styleOverrides: {
927
+ root: {
928
+ backgroundColor: colors2.gray[50],
929
+ borderBottom: `1px solid ${colors2.gray[200]}`
930
+ }
931
+ }
932
+ },
933
+ MuiTableRow: {
934
+ styleOverrides: {
935
+ root: {
936
+ "&:last-child td, &:last-child th": {
937
+ border: 0
938
+ },
939
+ "&:hover": {
940
+ backgroundColor: colors2.gray[50]
941
+ },
942
+ "&.Mui-selected": {
943
+ backgroundColor: colors2.brand[50],
944
+ "&:hover": {
945
+ backgroundColor: colors2.brand[50]
946
+ }
947
+ }
948
+ }
949
+ }
950
+ },
951
+ MuiTableContainer: {
952
+ styleOverrides: {
953
+ root: {
954
+ borderRadius: radius2.xl,
955
+ border: `1px solid ${colors2.gray[200]}`,
956
+ boxShadow: "none"
957
+ }
958
+ }
959
+ },
960
+ // ─── Badge ──────────────────────────────────────────────────────
961
+ MuiBadge: {
962
+ styleOverrides: {
963
+ standard: {
964
+ fontWeight: 500,
965
+ fontSize: 12,
966
+ lineHeight: "18px",
967
+ minWidth: 20,
968
+ height: 20,
969
+ borderRadius: radius2.full
970
+ },
971
+ colorPrimary: {
972
+ backgroundColor: colors2.brand[600]
973
+ },
974
+ colorError: {
975
+ backgroundColor: colors2.error[600]
976
+ },
977
+ colorSuccess: {
978
+ backgroundColor: colors2.success[600]
979
+ },
980
+ colorWarning: {
981
+ backgroundColor: colors2.warning[600]
982
+ },
983
+ dot: {
984
+ minWidth: 8,
985
+ height: 8,
986
+ borderRadius: radius2.full
987
+ }
988
+ }
989
+ },
990
+ // ─── Divider ────────────────────────────────────────────────────
991
+ MuiDivider: {
992
+ styleOverrides: {
993
+ root: {
994
+ borderColor: colors2.gray[200]
995
+ }
996
+ }
997
+ },
998
+ // ─── List ───────────────────────────────────────────────────────
999
+ MuiList: {
1000
+ styleOverrides: {
1001
+ root: {
1002
+ padding: 4
1003
+ }
1004
+ }
1005
+ },
1006
+ MuiListItemButton: {
1007
+ styleOverrides: {
1008
+ root: {
1009
+ borderRadius: radius2.sm,
1010
+ padding: "8px 12px",
1011
+ "&:hover": {
1012
+ backgroundColor: colors2.gray[50]
1013
+ },
1014
+ "&.Mui-selected": {
1015
+ backgroundColor: colors2.brand[50],
1016
+ color: colors2.brand[700],
1017
+ "&:hover": {
1018
+ backgroundColor: colors2.brand[100]
1019
+ }
1020
+ }
1021
+ }
1022
+ }
1023
+ },
1024
+ MuiListItemIcon: {
1025
+ styleOverrides: {
1026
+ root: {
1027
+ minWidth: 36,
1028
+ color: colors2.gray[500]
1029
+ }
1030
+ }
1031
+ },
1032
+ MuiListItemText: {
1033
+ styleOverrides: {
1034
+ primary: {
1035
+ fontSize: 14,
1036
+ lineHeight: "20px",
1037
+ fontWeight: 500,
1038
+ color: colors2.gray[700]
1039
+ },
1040
+ secondary: {
1041
+ fontSize: 14,
1042
+ lineHeight: "20px",
1043
+ color: colors2.gray[500]
1044
+ }
1045
+ }
1046
+ },
1047
+ // ─── Tooltip ────────────────────────────────────────────────────
1048
+ MuiTooltip: {
1049
+ styleOverrides: {
1050
+ tooltip: {
1051
+ backgroundColor: colors2.gray[900],
1052
+ color: colors2.base.white,
1053
+ fontSize: 12,
1054
+ lineHeight: "18px",
1055
+ fontWeight: 600,
1056
+ padding: "8px 12px",
1057
+ borderRadius: radius2.md,
1058
+ boxShadow: tokenShadows.lg
1059
+ },
1060
+ arrow: {
1061
+ color: colors2.gray[900]
1062
+ }
1063
+ }
1064
+ },
1065
+ // ─── Alert ──────────────────────────────────────────────────────
1066
+ MuiAlert: {
1067
+ defaultProps: {
1068
+ variant: "standard"
1069
+ },
1070
+ styleOverrides: {
1071
+ root: {
1072
+ borderRadius: radius2.xl,
1073
+ fontSize: 14,
1074
+ lineHeight: "20px",
1075
+ padding: "12px 16px"
1076
+ },
1077
+ standardError: {
1078
+ backgroundColor: colors2.error[50],
1079
+ color: colors2.error[700],
1080
+ border: `1px solid ${colors2.error[300]}`,
1081
+ "& .MuiAlert-icon": {
1082
+ color: colors2.error[600]
1083
+ }
1084
+ },
1085
+ standardWarning: {
1086
+ backgroundColor: colors2.warning[50],
1087
+ color: colors2.warning[700],
1088
+ border: `1px solid ${colors2.warning[300]}`,
1089
+ "& .MuiAlert-icon": {
1090
+ color: colors2.warning[600]
1091
+ }
1092
+ },
1093
+ standardSuccess: {
1094
+ backgroundColor: colors2.success[50],
1095
+ color: colors2.success[700],
1096
+ border: `1px solid ${colors2.success[300]}`,
1097
+ "& .MuiAlert-icon": {
1098
+ color: colors2.success[600]
1099
+ }
1100
+ },
1101
+ standardInfo: {
1102
+ backgroundColor: colors2.blue[50],
1103
+ color: colors2.blue[700],
1104
+ border: `1px solid ${colors2.blue[300]}`,
1105
+ "& .MuiAlert-icon": {
1106
+ color: colors2.blue[600]
1107
+ }
1108
+ },
1109
+ icon: {
1110
+ padding: "2px 0"
1111
+ }
1112
+ }
1113
+ },
1114
+ MuiAlertTitle: {
1115
+ styleOverrides: {
1116
+ root: {
1117
+ fontWeight: 600,
1118
+ fontSize: 14,
1119
+ lineHeight: "20px",
1120
+ marginBottom: 4
1121
+ }
1122
+ }
1123
+ },
1124
+ // ─── Backdrop ───────────────────────────────────────────────────
1125
+ MuiBackdrop: {
1126
+ styleOverrides: {
1127
+ root: {
1128
+ backgroundColor: "rgba(16, 24, 40, 0.7)"
1129
+ }
1130
+ }
1131
+ },
1132
+ // ─── Dialog ─────────────────────────────────────────────────────
1133
+ MuiDialog: {
1134
+ styleOverrides: {
1135
+ paper: {
1136
+ borderRadius: radius2.xl,
1137
+ boxShadow: tokenShadows.xl,
1138
+ padding: 0
1139
+ }
1140
+ }
1141
+ },
1142
+ MuiDialogTitle: {
1143
+ styleOverrides: {
1144
+ root: {
1145
+ fontSize: 18,
1146
+ lineHeight: "28px",
1147
+ fontWeight: 600,
1148
+ color: colors2.gray[900],
1149
+ padding: "24px 24px 0"
1150
+ }
1151
+ }
1152
+ },
1153
+ MuiDialogContent: {
1154
+ styleOverrides: {
1155
+ root: {
1156
+ padding: "20px 24px",
1157
+ fontSize: 14,
1158
+ lineHeight: "20px",
1159
+ color: colors2.gray[600]
1160
+ }
1161
+ }
1162
+ },
1163
+ MuiDialogActions: {
1164
+ styleOverrides: {
1165
+ root: {
1166
+ padding: "0 24px 24px",
1167
+ gap: 12
1168
+ }
1169
+ }
1170
+ },
1171
+ // ─── Progress ───────────────────────────────────────────────────
1172
+ MuiLinearProgress: {
1173
+ styleOverrides: {
1174
+ root: {
1175
+ borderRadius: radius2.full,
1176
+ height: 8,
1177
+ backgroundColor: colors2.gray[200]
1178
+ },
1179
+ barColorPrimary: {
1180
+ backgroundColor: colors2.brand[600],
1181
+ borderRadius: radius2.full
1182
+ },
1183
+ barColorSecondary: {
1184
+ backgroundColor: colors2.gray[600],
1185
+ borderRadius: radius2.full
1186
+ }
1187
+ }
1188
+ },
1189
+ MuiCircularProgress: {
1190
+ styleOverrides: {
1191
+ colorPrimary: {
1192
+ color: colors2.brand[600]
1193
+ },
1194
+ colorSecondary: {
1195
+ color: colors2.gray[600]
1196
+ }
1197
+ }
1198
+ },
1199
+ // ─── Skeleton ───────────────────────────────────────────────────
1200
+ MuiSkeleton: {
1201
+ defaultProps: {
1202
+ animation: "wave"
1203
+ },
1204
+ styleOverrides: {
1205
+ root: {
1206
+ backgroundColor: colors2.gray[100]
1207
+ },
1208
+ rounded: {
1209
+ borderRadius: radius2.md
1210
+ },
1211
+ circular: {
1212
+ borderRadius: radius2.full
1213
+ }
1214
+ }
1215
+ },
1216
+ // ─── Snackbar ───────────────────────────────────────────────────
1217
+ MuiSnackbarContent: {
1218
+ styleOverrides: {
1219
+ root: {
1220
+ backgroundColor: colors2.gray[900],
1221
+ color: colors2.base.white,
1222
+ borderRadius: radius2.xl,
1223
+ boxShadow: tokenShadows.lg,
1224
+ fontSize: 14,
1225
+ lineHeight: "20px",
1226
+ fontWeight: 500,
1227
+ padding: "6px 16px"
1228
+ }
1229
+ }
1230
+ },
1231
+ // ─── Typography ─────────────────────────────────────────────────
1232
+ MuiTypography: {
1233
+ defaultProps: {
1234
+ variantMapping: {
1235
+ h1: "h1",
1236
+ h2: "h2",
1237
+ h3: "h3",
1238
+ h4: "h4",
1239
+ h5: "h5",
1240
+ h6: "h6",
1241
+ subtitle1: "p",
1242
+ subtitle2: "p",
1243
+ body1: "p",
1244
+ body2: "p",
1245
+ caption: "span",
1246
+ overline: "span"
1247
+ }
1248
+ }
1249
+ }
1250
+ };
1251
+ }
1252
+ var components = buildComponents({
1253
+ colors,
1254
+ radius,
1255
+ focusRings,
1256
+ shadows
1257
+ });
1258
+
1259
+ // src/theme/shadows.ts
1260
+ function buildShadows(tokens) {
1261
+ const tokenShadows = tokens.shadows;
1262
+ return [
1263
+ "none",
1264
+ // 0
1265
+ tokenShadows.xs,
1266
+ // 1
1267
+ tokenShadows.sm,
1268
+ // 2
1269
+ tokenShadows.sm,
1270
+ // 3
1271
+ tokenShadows.md,
1272
+ // 4
1273
+ tokenShadows.md,
1274
+ // 5
1275
+ tokenShadows.md,
1276
+ // 6
1277
+ tokenShadows.lg,
1278
+ // 7
1279
+ tokenShadows.lg,
1280
+ // 8
1281
+ tokenShadows.lg,
1282
+ // 9
1283
+ tokenShadows.xl,
1284
+ // 10
1285
+ tokenShadows.xl,
1286
+ // 11
1287
+ tokenShadows.xl,
1288
+ // 12
1289
+ tokenShadows["2xl"],
1290
+ // 13
1291
+ tokenShadows["2xl"],
1292
+ // 14
1293
+ tokenShadows["2xl"],
1294
+ // 15
1295
+ tokenShadows["3xl"],
1296
+ // 16
1297
+ tokenShadows["3xl"],
1298
+ // 17
1299
+ tokenShadows["3xl"],
1300
+ // 18
1301
+ tokenShadows["3xl"],
1302
+ // 19
1303
+ tokenShadows["3xl"],
1304
+ // 20
1305
+ tokenShadows["3xl"],
1306
+ // 21
1307
+ tokenShadows["3xl"],
1308
+ // 22
1309
+ tokenShadows["3xl"],
1310
+ // 23
1311
+ tokenShadows["3xl"]
1312
+ // 24
1313
+ ];
1314
+ }
1315
+ var shadows2 = buildShadows({
1316
+ shadows
1317
+ });
1318
+ function buildThemeOptions(tokens) {
1319
+ return {
1320
+ palette: buildPalette(tokens),
1321
+ typography: buildTypography(tokens),
1322
+ components: buildComponents(tokens),
1323
+ shadows: buildShadows(tokens),
1324
+ shape: {
1325
+ borderRadius: tokens.radius.md
1326
+ }
1327
+ };
1328
+ }
1329
+ function buildTheme(tokens) {
1330
+ return createTheme(buildThemeOptions(tokens));
1331
+ }
1332
+
1333
+ // src/theme/presets/forest.ts
1334
+ var forestPreset = {
1335
+ name: "forest",
1336
+ defaultVariant: "light",
1337
+ variants: {
1338
+ light: {
1339
+ tokens: {
1340
+ colors,
1341
+ spacing,
1342
+ radius,
1343
+ shadows,
1344
+ focusRings,
1345
+ fontFamily,
1346
+ fontSize,
1347
+ lineHeight,
1348
+ fontWeight,
1349
+ display,
1350
+ container,
1351
+ widths
1352
+ }
1353
+ }
1354
+ }
1355
+ };
1356
+
1357
+ // src/theme/presets/index.ts
1358
+ var presetRegistry = /* @__PURE__ */ new Map();
1359
+ presetRegistry.set(forestPreset.name, forestPreset);
1360
+ function getPreset(name) {
1361
+ return presetRegistry.get(name);
1362
+ }
1363
+ function registerPreset(preset) {
1364
+ presetRegistry.set(preset.name, preset);
1365
+ }
1366
+ function getAvailablePresets() {
1367
+ return Array.from(presetRegistry.keys());
1368
+ }
1369
+
1370
+ // src/theme/index.ts
1371
+ var forestThemeOptions = {
1372
+ palette,
1373
+ typography,
1374
+ components,
1375
+ shadows: shadows2,
1376
+ shape: {
1377
+ borderRadius: 8
1378
+ }
1379
+ };
1380
+ var forestTheme = createTheme(forestThemeOptions);
1381
+
1382
+ export { buildTheme, buildThemeOptions, colors, components, container, display, focusRings, fontFamily, fontSize, fontWeight, forestPreset, forestTheme, forestThemeOptions, getAvailablePresets, getPreset, lineHeight, palette, radius, registerPreset, shadows, shadows2, spacing, typography, widths };
1383
+ //# sourceMappingURL=chunk-5C6DAZT2.mjs.map
1384
+ //# sourceMappingURL=chunk-5C6DAZT2.mjs.map