@matteoaliano/forest-ui 0.3.6 → 0.4.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.
package/dist/theme.js CHANGED
@@ -217,17 +217,6 @@ var misc = {
217
217
  950: "#0d2d3a"
218
218
  }
219
219
  };
220
- var radiusSharp = {
221
- xxs: 1,
222
- xs: 2,
223
- sm: 3,
224
- md: 4,
225
- lg: 5,
226
- xl: 6,
227
- "2xl": 8,
228
- "3xl": 10,
229
- "4xl": 12
230
- };
231
220
  var base = {
232
221
  white: "#ffffff",
233
222
  black: "#000000",
@@ -340,7 +329,8 @@ var focusRings = {
340
329
  error: "0px 0px 0px 4px #f044383d",
341
330
  errorShadowXs: "0px 1px 2px 0px #1018280d, 0px 0px 0px 4px #f044383d"
342
331
  };
343
- var fontFamily = '"Poppins", sans-serif';
332
+ var fontFamily = '"Aeonik", sans-serif';
333
+ var fontFamilyMono = '"Aeonik Mono", monospace';
344
334
  var fontSize = {
345
335
  xxs: 11,
346
336
  xs: 12,
@@ -696,18 +686,6 @@ function buildPalette(tokens) {
696
686
  chart: (_a = tokens.chartColors) != null ? _a : chartColors
697
687
  };
698
688
  }
699
- var palette = buildPalette({
700
- base,
701
- error,
702
- warning,
703
- success,
704
- info,
705
- text,
706
- bg,
707
- fg,
708
- border,
709
- chartColors
710
- });
711
689
 
712
690
  // src/theme/typography.ts
713
691
  function buildTypography(tokens) {
@@ -791,13 +769,6 @@ function buildTypography(tokens) {
791
769
  }
792
770
  };
793
771
  }
794
- var typography = buildTypography({
795
- fontFamily,
796
- display,
797
- fontSize,
798
- lineHeight,
799
- fontWeight
800
- });
801
772
 
802
773
  // src/theme/shadows.ts
803
774
  function buildShadows(tokens) {
@@ -855,9 +826,6 @@ function buildShadows(tokens) {
855
826
  // 24
856
827
  ];
857
828
  }
858
- var shadows2 = buildShadows({
859
- shadows
860
- });
861
829
 
862
830
  // src/theme/components.ts
863
831
  function buildComponents(tokens) {
@@ -950,7 +918,11 @@ function buildComponents(tokens) {
950
918
  MuiIconButton: {
951
919
  styleOverrides: {
952
920
  root: {
953
- borderRadius: radius5.md
921
+ borderRadius: radius5.md,
922
+ padding: 6,
923
+ "& .MuiSvgIcon-root": {
924
+ fontSize: 20
925
+ }
954
926
  }
955
927
  }
956
928
  },
@@ -980,6 +952,15 @@ function buildComponents(tokens) {
980
952
  variant: "outlined"
981
953
  }
982
954
  },
955
+ MuiFormControl: {
956
+ styleOverrides: {
957
+ root: {
958
+ "&:has(.Mui-disabled)": {
959
+ opacity: 0.5
960
+ }
961
+ }
962
+ }
963
+ },
983
964
  MuiInputBase: {
984
965
  styleOverrides: {
985
966
  input: {
@@ -997,20 +978,27 @@ function buildComponents(tokens) {
997
978
  root: {
998
979
  borderRadius: radius5.md,
999
980
  boxShadow: tokenShadows.xs,
1000
- "&:hover .MuiOutlinedInput-notchedOutline": {
981
+ "&&:hover:not(.Mui-focused):not(.Mui-disabled) .MuiOutlinedInput-notchedOutline": {
1001
982
  borderColor: border5.brand
1002
983
  },
1003
- "&.Mui-focused .MuiOutlinedInput-notchedOutline": {
984
+ "&&.Mui-focused .MuiOutlinedInput-notchedOutline": {
1004
985
  borderColor: border5.brandSolid,
1005
986
  borderWidth: 1,
1006
987
  boxShadow: "none"
1007
988
  },
1008
- "&.Mui-error .MuiOutlinedInput-notchedOutline": {
989
+ "&&.Mui-error:not(.Mui-focused) .MuiOutlinedInput-notchedOutline": {
1009
990
  borderColor: border5.error
1010
991
  },
1011
- "&.Mui-error.Mui-focused .MuiOutlinedInput-notchedOutline": {
992
+ "&&.Mui-error.Mui-focused .MuiOutlinedInput-notchedOutline": {
1012
993
  borderColor: border5.errorSolid,
1013
994
  boxShadow: "none"
995
+ },
996
+ "& .MuiInputAdornment-root .MuiIconButton-root": {
997
+ color: fg5.quaternary,
998
+ "&:hover": {
999
+ backgroundColor: bg5.primaryHover,
1000
+ color: fg5.brandPrimary
1001
+ }
1014
1002
  }
1015
1003
  },
1016
1004
  notchedOutline: {
@@ -1482,6 +1470,40 @@ function buildComponents(tokens) {
1482
1470
  }
1483
1471
  }
1484
1472
  },
1473
+ // ─── Tabs ──────────────────────────────────────────────────────────
1474
+ MuiTabs: {
1475
+ styleOverrides: {
1476
+ root: {
1477
+ minHeight: 48
1478
+ },
1479
+ indicator: {
1480
+ backgroundColor: fg5.brandPrimary,
1481
+ height: 2
1482
+ }
1483
+ }
1484
+ },
1485
+ MuiTab: {
1486
+ styleOverrides: {
1487
+ root: {
1488
+ minHeight: 48,
1489
+ height: 48,
1490
+ padding: "12px 16px",
1491
+ fontSize: 14,
1492
+ fontWeight: 600,
1493
+ lineHeight: "20px",
1494
+ textTransform: "none",
1495
+ color: text5.tertiary,
1496
+ borderRadius: `${radius5.md}px ${radius5.md}px 0 0`,
1497
+ "&:hover": {
1498
+ backgroundColor: bg5.primaryHover
1499
+ },
1500
+ "&.Mui-selected": {
1501
+ color: fg5.brandPrimary,
1502
+ backgroundColor: bg5.brandPrimary
1503
+ }
1504
+ }
1505
+ }
1506
+ },
1485
1507
  // ─── Chip ───────────────────────────────────────────────────────
1486
1508
  MuiChip: {
1487
1509
  styleOverrides: {
@@ -1502,15 +1524,15 @@ function buildComponents(tokens) {
1502
1524
  },
1503
1525
  colorDefault: {
1504
1526
  "&.MuiChip-filled": {
1505
- backgroundColor: gray[50],
1506
- color: gray[700],
1507
- "& .MuiChip-deleteIcon": { color: gray[400] }
1527
+ backgroundColor: tokens.bg.secondaryHover,
1528
+ color: tokens.fg.secondary,
1529
+ "& .MuiChip-deleteIcon": { color: tokens.fg.quinary }
1508
1530
  }
1509
1531
  },
1510
1532
  colorPrimary: {
1511
1533
  "&.MuiChip-filled": {
1512
1534
  backgroundColor: tokens.bg.brandPrimary,
1513
- color: tokens.text.brandPrimary,
1535
+ color: tokens.fg.brandPrimary,
1514
1536
  "& .MuiChip-deleteIcon": { color: tokens.fg.brandPrimary }
1515
1537
  }
1516
1538
  },
@@ -1600,13 +1622,16 @@ function buildComponents(tokens) {
1600
1622
  styleOverrides: {
1601
1623
  root: {
1602
1624
  backgroundColor: bg5.secondary,
1603
- borderBottom: `1px solid ${border5.secondary}`
1625
+ "& .MuiTableRow-root:last-child .MuiTableCell-root": {
1626
+ borderBottom: `1px solid ${border5.secondary}`
1627
+ }
1604
1628
  }
1605
1629
  }
1606
1630
  },
1607
1631
  MuiTableRow: {
1608
1632
  styleOverrides: {
1609
1633
  root: {
1634
+ backgroundColor: bg5.secondary,
1610
1635
  "&:last-child td, &:last-child th": {
1611
1636
  border: 0
1612
1637
  },
@@ -1962,6 +1987,7 @@ function buildComponents(tokens) {
1962
1987
  }
1963
1988
  },
1964
1989
  row: {
1990
+ backgroundColor: bg5.secondary,
1965
1991
  "&:hover": {
1966
1992
  backgroundColor: bg5.primaryHover
1967
1993
  },
@@ -2004,7 +2030,7 @@ function buildComponents(tokens) {
2004
2030
  "& .MuiOutlinedInput-notchedOutline": {
2005
2031
  borderColor: border5.primary
2006
2032
  },
2007
- "&:hover .MuiOutlinedInput-notchedOutline": {
2033
+ "&:hover:not(:has(.Mui-disabled)) .MuiOutlinedInput-notchedOutline": {
2008
2034
  borderColor: border5.brand
2009
2035
  },
2010
2036
  "& .Mui-focused .MuiOutlinedInput-notchedOutline": {
@@ -2014,7 +2040,6 @@ function buildComponents(tokens) {
2014
2040
  },
2015
2041
  "& .MuiInputAdornment-root .MuiIconButton-root": {
2016
2042
  color: fg5.quaternary,
2017
- padding: 4,
2018
2043
  "&:hover": {
2019
2044
  backgroundColor: bg5.primaryHover,
2020
2045
  color: fg5.brandPrimary
@@ -2166,21 +2191,6 @@ function buildComponents(tokens) {
2166
2191
  }
2167
2192
  };
2168
2193
  }
2169
- var components = buildComponents({
2170
- base,
2171
- error,
2172
- warning,
2173
- success,
2174
- info,
2175
- radius,
2176
- focusRings,
2177
- shadows,
2178
- text,
2179
- bg,
2180
- fg,
2181
- border,
2182
- buttonColors,
2183
- sliderColors});
2184
2194
 
2185
2195
  // src/theme/buildTheme.ts
2186
2196
  function buildThemeOptions(tokens) {
@@ -2457,6 +2467,7 @@ var forestExternalPreset = {
2457
2467
  shadows,
2458
2468
  focusRings: focusRings2,
2459
2469
  fontFamily: '"Aeonik", sans-serif',
2470
+ fontFamilyMono: '"Aeonik Mono", monospace',
2460
2471
  fontSize,
2461
2472
  lineHeight,
2462
2473
  fontWeight,
@@ -2597,7 +2608,7 @@ var border3 = {
2597
2608
  tertiary: gray[100],
2598
2609
  disabled: gray[300],
2599
2610
  disabledSubtle: gray[200],
2600
- brand: colors.brand[300],
2611
+ brand: gray[400],
2601
2612
  brandSolid: colors.brand[600],
2602
2613
  brandSolidAlt: colors.brand[600],
2603
2614
  error: error[300],
@@ -2757,6 +2768,7 @@ var forestAgencyPreset = {
2757
2768
  shadows,
2758
2769
  focusRings: focusRings3,
2759
2770
  fontFamily: '"Aeonik", sans-serif',
2771
+ fontFamilyMono: '"Aeonik Mono", monospace',
2760
2772
  fontSize,
2761
2773
  lineHeight,
2762
2774
  fontWeight,
@@ -3040,6 +3052,7 @@ var forestInternalPreset = {
3040
3052
  shadows,
3041
3053
  focusRings: focusRings4,
3042
3054
  fontFamily: '"Aeonik", sans-serif',
3055
+ fontFamilyMono: '"Aeonik Mono", monospace',
3043
3056
  fontSize,
3044
3057
  lineHeight,
3045
3058
  fontWeight,
@@ -3094,13 +3107,13 @@ exports.buildTheme = buildTheme;
3094
3107
  exports.buildThemeOptions = buildThemeOptions;
3095
3108
  exports.buttonColors = buttonColors;
3096
3109
  exports.chartColors = chartColors;
3097
- exports.components = components;
3098
3110
  exports.container = container;
3099
3111
  exports.display = display;
3100
3112
  exports.error = error;
3101
3113
  exports.fg = fg;
3102
3114
  exports.focusRings = focusRings;
3103
3115
  exports.fontFamily = fontFamily;
3116
+ exports.fontFamilyMono = fontFamilyMono;
3104
3117
  exports.fontSize = fontSize;
3105
3118
  exports.fontWeight = fontWeight;
3106
3119
  exports.forestAgencyPreset = forestAgencyPreset;
@@ -3117,18 +3130,15 @@ exports.lineHeight = lineHeight;
3117
3130
  exports.magenta = magenta;
3118
3131
  exports.misc = misc;
3119
3132
  exports.navColors = navColors;
3120
- exports.palette = palette;
3121
3133
  exports.radius = radius;
3122
- exports.radiusSharp = radiusSharp;
3123
3134
  exports.red = red;
3124
3135
  exports.registerPreset = registerPreset;
3125
- exports.shadows = shadows2;
3136
+ exports.shadows = shadows;
3126
3137
  exports.sliderColors = sliderColors;
3127
3138
  exports.spacing = spacing;
3128
3139
  exports.success = success;
3129
3140
  exports.text = text;
3130
3141
  exports.toggleColors = toggleColors;
3131
- exports.typography = typography;
3132
3142
  exports.violet = violet;
3133
3143
  exports.warning = warning;
3134
3144
  exports.widths = widths;