@matteoaliano/forest-ui 0.5.2 → 0.7.0

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.
@@ -625,7 +625,7 @@ var alpha = {
625
625
  // src/theme/palette.ts
626
626
  function buildPalette(tokens) {
627
627
  var _a;
628
- const { base: base2, error: error2, warning: warning2, success: success2, info: info2, text: text6, bg: bg6, fg: fg6, border: border6 } = tokens;
628
+ const { base: base2, error: error2, warning: warning2, success: success2, info: info3, text: text6, bg: bg6, fg: fg6, border: border6 } = tokens;
629
629
  return {
630
630
  primary: {
631
631
  main: tokens.bg.brandSolid,
@@ -670,7 +670,8 @@ function buildPalette(tokens) {
670
670
  text: {
671
671
  primary: text6.primary,
672
672
  secondary: text6.secondary,
673
- disabled: text6.disabled
673
+ disabled: text6.disabled,
674
+ placeholder: text6.placeholder
674
675
  },
675
676
  divider: border6.secondary,
676
677
  action: {
@@ -680,13 +681,23 @@ function buildPalette(tokens) {
680
681
  disabled: fg6.disabled,
681
682
  disabledBackground: bg6.disabled
682
683
  },
683
- chart: (_a = tokens.chartColors) != null ? _a : chartColors
684
+ chart: (_a = tokens.chartColors) != null ? _a : chartColors,
685
+ ...tokens.highlight && {
686
+ highlight: {
687
+ main: tokens.highlight[600],
688
+ light: tokens.highlight[300],
689
+ dark: tokens.highlight[700],
690
+ contrastText: tokens.base.white
691
+ }
692
+ }
684
693
  };
685
694
  }
686
695
 
687
696
  // src/theme/typography.ts
688
697
  function buildTypography(tokens) {
689
- const { fontFamily: fontFamily2, display: display2, fontSize: fontSize2, lineHeight: lineHeight2, fontWeight: fontWeight2 } = tokens;
698
+ var _a, _b, _c, _d;
699
+ const { fontFamily: fontFamily2, display: display2, fontSize: fontSize2, lineHeight: lineHeight2, fontWeight: fontWeight2, letterSpacing: letterSpacing2 } = tokens;
700
+ const ls = letterSpacing2 != null ? letterSpacing2 : {};
690
701
  return {
691
702
  fontFamily: fontFamily2,
692
703
  fontWeightRegular: fontWeight2.regular,
@@ -696,59 +707,67 @@ function buildTypography(tokens) {
696
707
  h1: {
697
708
  fontSize: display2.xl.fontSize,
698
709
  lineHeight: display2.xl.lineHeight,
699
- letterSpacing: display2.xl.letterSpacing,
710
+ letterSpacing: (_a = ls.h1) != null ? _a : display2.xl.letterSpacing,
700
711
  fontWeight: fontWeight2.semibold
701
712
  },
702
713
  h2: {
703
714
  fontSize: display2.lg.fontSize,
704
715
  lineHeight: display2.lg.lineHeight,
705
- letterSpacing: display2.lg.letterSpacing,
716
+ letterSpacing: (_b = ls.h2) != null ? _b : display2.lg.letterSpacing,
706
717
  fontWeight: fontWeight2.semibold
707
718
  },
708
719
  h3: {
709
720
  fontSize: display2.md.fontSize,
710
721
  lineHeight: display2.md.lineHeight,
711
- letterSpacing: display2.md.letterSpacing,
722
+ letterSpacing: (_c = ls.h3) != null ? _c : display2.md.letterSpacing,
712
723
  fontWeight: fontWeight2.semibold
713
724
  },
714
725
  h4: {
715
726
  fontSize: display2.sm.fontSize,
716
727
  lineHeight: display2.sm.lineHeight,
728
+ ...ls.h4 !== void 0 && { letterSpacing: ls.h4 },
717
729
  fontWeight: fontWeight2.semibold
718
730
  },
719
731
  h5: {
720
732
  fontSize: display2.xs.fontSize,
721
733
  lineHeight: display2.xs.lineHeight,
734
+ ...ls.h5 !== void 0 && { letterSpacing: ls.h5 },
722
735
  fontWeight: fontWeight2.semibold
723
736
  },
724
737
  h6: {
725
738
  fontSize: fontSize2.xl,
726
739
  lineHeight: lineHeight2.xl,
740
+ ...ls.h6 !== void 0 && { letterSpacing: ls.h6 },
727
741
  fontWeight: fontWeight2.semibold
728
742
  },
729
743
  subtitle1: {
730
744
  fontSize: fontSize2.lg,
731
745
  lineHeight: lineHeight2.lg,
746
+ ...ls.subtitle1 !== void 0 && { letterSpacing: ls.subtitle1 },
732
747
  fontWeight: fontWeight2.medium
733
748
  },
734
749
  subtitle2: {
735
750
  fontSize: fontSize2.md,
736
751
  lineHeight: lineHeight2.md,
752
+ ...ls.subtitle2 !== void 0 && { letterSpacing: ls.subtitle2 },
737
753
  fontWeight: fontWeight2.medium
738
754
  },
739
755
  body1: {
740
756
  fontSize: fontSize2.md,
741
757
  lineHeight: lineHeight2.md,
758
+ ...ls.body1 !== void 0 && { letterSpacing: ls.body1 },
742
759
  fontWeight: fontWeight2.regular
743
760
  },
744
761
  body2: {
745
762
  fontSize: fontSize2.sm,
746
763
  lineHeight: lineHeight2.sm,
764
+ ...ls.body2 !== void 0 && { letterSpacing: ls.body2 },
747
765
  fontWeight: fontWeight2.regular
748
766
  },
749
767
  caption: {
750
768
  fontSize: fontSize2.xs,
751
769
  lineHeight: lineHeight2.xs,
770
+ ...ls.caption !== void 0 && { letterSpacing: ls.caption },
752
771
  fontWeight: fontWeight2.regular
753
772
  },
754
773
  overline: {
@@ -756,13 +775,14 @@ function buildTypography(tokens) {
756
775
  lineHeight: lineHeight2.xxs,
757
776
  fontWeight: fontWeight2.medium,
758
777
  textTransform: "uppercase",
759
- letterSpacing: "0.08em"
778
+ letterSpacing: (_d = ls.overline) != null ? _d : "0.08em"
760
779
  },
761
780
  button: {
762
781
  fontSize: fontSize2.sm,
763
782
  lineHeight: lineHeight2.sm,
764
783
  fontWeight: fontWeight2.semibold,
765
- textTransform: "none"
784
+ textTransform: "none",
785
+ ...ls.button !== void 0 && { letterSpacing: ls.button }
766
786
  }
767
787
  };
768
788
  }
@@ -831,7 +851,8 @@ function buildComponents(tokens) {
831
851
  error: error2,
832
852
  warning: warning2,
833
853
  success: success2,
834
- info: info2,
854
+ info: info3,
855
+ highlight: highlight2,
835
856
  radius: radius6,
836
857
  focusRings: focusRings6,
837
858
  shadows: tokenShadows,
@@ -1095,6 +1116,13 @@ function buildComponents(tokens) {
1095
1116
  gap: 4,
1096
1117
  "&:hover": {
1097
1118
  backgroundColor: bg6.primaryHover
1119
+ },
1120
+ "&.Mui-selected": {
1121
+ backgroundColor: info3[50],
1122
+ color: info3[700],
1123
+ "&:hover": {
1124
+ backgroundColor: info3[100]
1125
+ }
1098
1126
  }
1099
1127
  }
1100
1128
  }
@@ -1125,7 +1153,11 @@ function buildComponents(tokens) {
1125
1153
  backgroundColor: bg6.primaryHover
1126
1154
  },
1127
1155
  '&[aria-selected="true"]': {
1128
- backgroundColor: bg6.brandPrimary
1156
+ backgroundColor: info3[50],
1157
+ color: info3[700]
1158
+ },
1159
+ '&[aria-selected="true"].Mui-focused': {
1160
+ backgroundColor: info3[100]
1129
1161
  }
1130
1162
  },
1131
1163
  listbox: {
@@ -1476,7 +1508,7 @@ function buildComponents(tokens) {
1476
1508
  minHeight: 48
1477
1509
  },
1478
1510
  indicator: {
1479
- backgroundColor: fg6.brandPrimary,
1511
+ backgroundColor: info3[600],
1480
1512
  height: 2
1481
1513
  }
1482
1514
  }
@@ -1497,14 +1529,33 @@ function buildComponents(tokens) {
1497
1529
  backgroundColor: bg6.primaryHover
1498
1530
  },
1499
1531
  "&.Mui-selected": {
1500
- color: fg6.brandPrimary,
1501
- backgroundColor: bg6.brandPrimary
1532
+ color: info3[700],
1533
+ backgroundColor: info3[50]
1502
1534
  }
1503
1535
  }
1504
1536
  }
1505
1537
  },
1506
1538
  // ─── Chip ───────────────────────────────────────────────────────
1507
1539
  MuiChip: {
1540
+ variants: [
1541
+ ...highlight2 ? [
1542
+ {
1543
+ props: { color: "highlight" },
1544
+ style: {
1545
+ "&.MuiChip-filled": {
1546
+ backgroundColor: highlight2[600],
1547
+ color: base2.white,
1548
+ "& .MuiChip-deleteIcon": { color: highlight2[200] }
1549
+ },
1550
+ "&.MuiChip-outlined": {
1551
+ borderColor: highlight2[300],
1552
+ color: highlight2[700],
1553
+ "& .MuiChip-deleteIcon": { color: highlight2[400] }
1554
+ }
1555
+ }
1556
+ }
1557
+ ] : []
1558
+ ],
1508
1559
  styleOverrides: {
1509
1560
  root: {
1510
1561
  borderRadius: radius6.md
@@ -1537,9 +1588,11 @@ function buildComponents(tokens) {
1537
1588
  },
1538
1589
  colorSecondary: {
1539
1590
  "&.MuiChip-filled": {
1540
- backgroundColor: tokens.bg.secondarySubtle,
1541
- color: tokens.text.secondary,
1542
- "& .MuiChip-deleteIcon": { color: tokens.fg.secondary }
1591
+ backgroundColor: highlight2 ? highlight2[50] : tokens.bg.secondarySubtle,
1592
+ color: highlight2 ? highlight2[700] : tokens.text.secondary,
1593
+ "& .MuiChip-deleteIcon": {
1594
+ color: highlight2 ? highlight2[500] : tokens.fg.secondary
1595
+ }
1543
1596
  }
1544
1597
  },
1545
1598
  colorError: {
@@ -1565,9 +1618,9 @@ function buildComponents(tokens) {
1565
1618
  },
1566
1619
  colorInfo: {
1567
1620
  "&.MuiChip-filled": {
1568
- backgroundColor: info2[50],
1569
- color: info2[700],
1570
- "& .MuiChip-deleteIcon": { color: info2[400] }
1621
+ backgroundColor: info3[50],
1622
+ color: info3[700],
1623
+ "& .MuiChip-deleteIcon": { color: info3[400] }
1571
1624
  }
1572
1625
  }
1573
1626
  }
@@ -1638,9 +1691,9 @@ function buildComponents(tokens) {
1638
1691
  backgroundColor: bg6.primaryHover
1639
1692
  },
1640
1693
  "&.Mui-selected": {
1641
- backgroundColor: bg6.brandPrimary,
1694
+ backgroundColor: info3[50],
1642
1695
  "&:hover": {
1643
- backgroundColor: bg6.brandPrimary
1696
+ backgroundColor: info3[100]
1644
1697
  }
1645
1698
  }
1646
1699
  }
@@ -1681,7 +1734,12 @@ function buildComponents(tokens) {
1681
1734
  dot: {
1682
1735
  minWidth: 8,
1683
1736
  height: 8,
1684
- borderRadius: radius6.full
1737
+ borderRadius: radius6.full,
1738
+ ...highlight2 && {
1739
+ "&.MuiBadge-colorDefault, &.MuiBadge-colorPrimary": {
1740
+ backgroundColor: highlight2[500]
1741
+ }
1742
+ }
1685
1743
  }
1686
1744
  }
1687
1745
  },
@@ -1710,10 +1768,10 @@ function buildComponents(tokens) {
1710
1768
  backgroundColor: bg6.primaryHover
1711
1769
  },
1712
1770
  "&.Mui-selected": {
1713
- backgroundColor: bg6.brandPrimary,
1714
- color: buttonColors6.secondaryColor.fg,
1771
+ backgroundColor: info3[50],
1772
+ color: info3[700],
1715
1773
  "&:hover": {
1716
- backgroundColor: bg6.brandSecondary
1774
+ backgroundColor: info3[100]
1717
1775
  }
1718
1776
  }
1719
1777
  }
@@ -1765,6 +1823,31 @@ function buildComponents(tokens) {
1765
1823
  defaultProps: {
1766
1824
  variant: "standard"
1767
1825
  },
1826
+ variants: [
1827
+ ...highlight2 ? [
1828
+ {
1829
+ props: { variant: "featured" },
1830
+ style: {
1831
+ borderRadius: radius6.xl,
1832
+ fontSize: 14,
1833
+ lineHeight: "20px",
1834
+ padding: "12px 16px",
1835
+ alignItems: "center",
1836
+ backgroundColor: highlight2[50],
1837
+ color: highlight2[700],
1838
+ border: `1px solid ${highlight2[200]}`,
1839
+ "& .MuiAlert-icon": {
1840
+ color: highlight2[600],
1841
+ padding: 0,
1842
+ marginRight: 12
1843
+ },
1844
+ "& .MuiAlertTitle-root": {
1845
+ color: highlight2[800]
1846
+ }
1847
+ }
1848
+ }
1849
+ ] : []
1850
+ ],
1768
1851
  styleOverrides: {
1769
1852
  root: {
1770
1853
  borderRadius: radius6.xl,
@@ -1798,11 +1881,11 @@ function buildComponents(tokens) {
1798
1881
  }
1799
1882
  },
1800
1883
  standardInfo: {
1801
- backgroundColor: info2[50],
1802
- color: info2[700],
1803
- border: `1px solid ${info2[300]}`,
1884
+ backgroundColor: info3[50],
1885
+ color: info3[700],
1886
+ border: `1px solid ${info3[300]}`,
1804
1887
  "& .MuiAlert-icon": {
1805
- color: info2[600]
1888
+ color: info3[600]
1806
1889
  }
1807
1890
  },
1808
1891
  icon: {
@@ -2251,10 +2334,12 @@ function buildComponents(tokens) {
2251
2334
  MuiLink: {
2252
2335
  styleOverrides: {
2253
2336
  root: {
2254
- color: fg6.brandPrimary,
2337
+ color: info3[600],
2255
2338
  fontWeight: 500,
2339
+ textDecorationColor: info3[600],
2256
2340
  "&:hover": {
2257
- color: buttonColors6.primary.bgHover
2341
+ color: info3[700],
2342
+ textDecorationColor: info3[700]
2258
2343
  }
2259
2344
  }
2260
2345
  }
@@ -2547,23 +2632,23 @@ function buildComponents(tokens) {
2547
2632
  backgroundColor: bg6.primaryHover
2548
2633
  },
2549
2634
  "&.Mui-selected": {
2550
- backgroundColor: fg6.brandPrimary,
2635
+ backgroundColor: info3[600],
2551
2636
  color: base2.white,
2552
2637
  fontWeight: 600,
2553
2638
  "&:hover": {
2554
- backgroundColor: buttonColors6.primary.bgHover
2639
+ backgroundColor: info3[700]
2555
2640
  },
2556
2641
  "&:focus": {
2557
- backgroundColor: fg6.brandPrimary
2642
+ backgroundColor: info3[600]
2558
2643
  }
2559
2644
  },
2560
2645
  "&.MuiPickersDay-today": {
2561
- border: `1px solid ${border6.brandSolid}`,
2562
- color: fg6.brandPrimary,
2646
+ border: `1px solid ${info3[600]}`,
2647
+ color: info3[700],
2563
2648
  backgroundColor: "transparent",
2564
2649
  fontWeight: 600,
2565
2650
  "&.Mui-selected": {
2566
- backgroundColor: fg6.brandPrimary,
2651
+ backgroundColor: info3[600],
2567
2652
  color: base2.white,
2568
2653
  border: "none"
2569
2654
  }
@@ -3505,12 +3590,14 @@ var forestInternalPreset = {
3505
3590
  };
3506
3591
 
3507
3592
  // src/theme/presets/forest-alkemy-plus.ts
3593
+ var info2 = violet;
3594
+ var highlight = magenta;
3508
3595
  var colors2 = {
3509
3596
  base,
3510
3597
  error,
3511
3598
  warning,
3512
3599
  success,
3513
- info,
3600
+ info: info2,
3514
3601
  brand: {
3515
3602
  25: gray[25],
3516
3603
  50: gray[50],
@@ -3566,8 +3653,8 @@ var text5 = {
3566
3653
  successPrimary: success[600]
3567
3654
  };
3568
3655
  var bg5 = {
3569
- primary: gray[50],
3570
- primaryAlt: gray[50],
3656
+ primary: gray[25],
3657
+ primaryAlt: gray[25],
3571
3658
  primaryHover: gray[100],
3572
3659
  primarySolid: gray[950],
3573
3660
  secondary: base.white,
@@ -3575,8 +3662,8 @@ var bg5 = {
3575
3662
  secondarySubtle: gray[25],
3576
3663
  secondaryHover: gray[50],
3577
3664
  secondarySolid: gray[600],
3578
- tertiary: gray[100],
3579
- quaternary: gray[200],
3665
+ tertiary: gray[50],
3666
+ quaternary: gray[100],
3580
3667
  active: gray[200],
3581
3668
  disabled: gray[100],
3582
3669
  disabledSubtle: gray[50],
@@ -3748,20 +3835,38 @@ var chartColors5 = {
3748
3835
  crosshairFg: gray[500],
3749
3836
  legendFg: text5.tertiary,
3750
3837
  series: [
3751
- { fg: misc.purple[500], fgHover: misc.purple[600], bg: misc.purple[100], bgHover: misc.purple[200] },
3752
- { fg: misc.orangeDark[400], fgHover: misc.orangeDark[500], bg: misc.orangeDark[100], bgHover: misc.orangeDark[200] },
3838
+ // Brand accents lead violet + magenta anchor the palette
3839
+ { fg: violet[500], fgHover: violet[600], bg: violet[100], bgHover: violet[200] },
3840
+ { fg: magenta[500], fgHover: magenta[600], bg: magenta[100], bgHover: magenta[200] },
3841
+ // Complementary rotation — cool → warm → earth
3753
3842
  { fg: misc.teal[300], fgHover: misc.teal[400], bg: misc.teal[50], bgHover: misc.teal[100] },
3754
3843
  { fg: warning[400], fgHover: warning[500], bg: warning[100], bgHover: warning[200] },
3755
- { fg: misc.rose[400], fgHover: misc.rose[500], bg: misc.rose[100], bgHover: misc.rose[200] },
3756
3844
  { fg: misc.blueLight[400], fgHover: misc.blueLight[500], bg: misc.blueLight[100], bgHover: misc.blueLight[200] },
3757
- { fg: misc.orange[300], fgHover: misc.orange[400], bg: misc.orange[100], bgHover: misc.orange[200] },
3758
- { fg: misc.cyan[600], fgHover: misc.cyan[700], bg: misc.cyan[100], bgHover: misc.cyan[200] },
3845
+ { fg: misc.rose[400], fgHover: misc.rose[500], bg: misc.rose[100], bgHover: misc.rose[200] },
3759
3846
  { fg: misc.green[500], fgHover: misc.green[600], bg: misc.green[100], bgHover: misc.green[200] },
3760
- { fg: misc.pink[400], fgHover: misc.pink[500], bg: misc.pink[100], bgHover: misc.pink[200] },
3761
- { fg: misc.fuchsia[400], fgHover: misc.fuchsia[500], bg: misc.fuchsia[100], bgHover: misc.fuchsia[200] },
3762
- { fg: misc.teal[600], fgHover: misc.teal[700], bg: misc.teal[100], bgHover: misc.teal[200] }
3847
+ { fg: misc.orangeDark[400], fgHover: misc.orangeDark[500], bg: misc.orangeDark[100], bgHover: misc.orangeDark[200] },
3848
+ { fg: misc.cyan[600], fgHover: misc.cyan[700], bg: misc.cyan[100], bgHover: misc.cyan[200] },
3849
+ { fg: misc.orange[300], fgHover: misc.orange[400], bg: misc.orange[100], bgHover: misc.orange[200] },
3850
+ { fg: misc.teal[600], fgHover: misc.teal[700], bg: misc.teal[100], bgHover: misc.teal[200] },
3851
+ // Pink/fuchsia kept as tail fallbacks only — too close to magenta to sit near position 1
3852
+ { fg: misc.pink[400], fgHover: misc.pink[500], bg: misc.pink[100], bgHover: misc.pink[200] }
3763
3853
  ]
3764
3854
  };
3855
+ var letterSpacing = {
3856
+ h1: "-0.02em",
3857
+ h2: "-0.02em",
3858
+ h3: "-0.02em",
3859
+ h4: "-0.02em",
3860
+ h5: "-0.02em",
3861
+ h6: "-0.02em",
3862
+ subtitle1: "0.02em",
3863
+ subtitle2: "0.02em",
3864
+ body1: "0.02em",
3865
+ body2: "0.02em",
3866
+ caption: "0.02em",
3867
+ overline: "0.02em",
3868
+ button: "0.02em"
3869
+ };
3765
3870
  var focusRings5 = {
3766
3871
  brand: "0px 0px 0px 4px #4040403d",
3767
3872
  brandShadowXs: "0px 1px 2px 0px #1018280d, 0px 0px 0px 4px #4040403d",
@@ -3782,7 +3887,7 @@ var forestAlkemyPlusPreset = {
3782
3887
  error,
3783
3888
  warning,
3784
3889
  success,
3785
- info,
3890
+ info: info2,
3786
3891
  spacing,
3787
3892
  radius: radius5,
3788
3893
  shadows,
@@ -3807,7 +3912,9 @@ var forestAlkemyPlusPreset = {
3807
3912
  sliderColors: sliderColors5,
3808
3913
  toggleColors: toggleColors5,
3809
3914
  chartColors: chartColors5,
3810
- alpha
3915
+ alpha,
3916
+ letterSpacing,
3917
+ highlight
3811
3918
  }
3812
3919
  }
3813
3920
  }
@@ -3882,4 +3989,4 @@ export {
3882
3989
  forestTheme,
3883
3990
  forestThemeOptions
3884
3991
  };
3885
- //# sourceMappingURL=chunk-TECEHFAG.mjs.map
3992
+ //# sourceMappingURL=chunk-WUUQHE5X.mjs.map