@matteoaliano/forest-ui 1.1.1 → 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,