@matteoaliano/forest-ui 1.1.0 → 1.2.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.
package/dist/theme.js CHANGED
@@ -1021,7 +1021,19 @@ function buildComponents(tokens2) {
1021
1021
  root: {
1022
1022
  width: 44,
1023
1023
  height: 24,
1024
- padding: 0
1024
+ padding: 0,
1025
+ // MUI's `size="small"` variant only half-applies here: the theme pins
1026
+ // the track at the wide 44px medium geometry, but MUI still shrinks the
1027
+ // thumb (16px), bumps switchBase padding (4px), and cuts the checked
1028
+ // travel to 16px — leaving the thumb parked mid-track. Forest ships a
1029
+ // single calibrated 24px switch, so neutralize `small` back to it.
1030
+ "&.MuiSwitch-sizeSmall": {
1031
+ "& .MuiSwitch-switchBase": {
1032
+ padding: 2,
1033
+ "&.Mui-checked": { transform: "translateX(20px)" }
1034
+ },
1035
+ "& .MuiSwitch-thumb": { width: 20, height: 20 }
1036
+ }
1025
1037
  },
1026
1038
  switchBase: {
1027
1039
  padding: 2,
@@ -2119,8 +2131,11 @@ function buildComponents(tokens2) {
2119
2131
  }
2120
2132
  },
2121
2133
  staticTooltipLabel: {
2134
+ // Match MuiTooltip: inverted face (charcoal in light, near-white in
2135
+ // dark) with on-solid fg that inverts WITH it. text.white is
2136
+ // mode-invariant and vanished on the dark-mode light face.
2122
2137
  backgroundColor: bg4.primarySolid,
2123
- color: text4.white,
2138
+ color: buttonColors4.primary.fg,
2124
2139
  fontSize: 12,
2125
2140
  fontWeight: 600,
2126
2141
  borderRadius: radius4.md,