@matteoaliano/forest-ui 1.2.0 → 1.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.
@@ -447,6 +447,20 @@ function buildComponents(tokens2) {
447
447
  borderTopRightRadius: radius4.md,
448
448
  opacity: 0.75
449
449
  },
450
+ // Unified disabled treatment across the button family (Button,
451
+ // IconButton, Fab, ButtonGroup, ToggleButton): transparent face,
452
+ // disabled border, disabled text — matching the outlined
453
+ // IconButton reference. Contained's fill is dropped and the bevel
454
+ // geometry re-asserted (MUI's outlined disabled `border: 1px`
455
+ // shorthand would otherwise flatten it).
456
+ "&.Mui-disabled": {
457
+ backgroundColor: "transparent",
458
+ borderColor: border4.disabled,
459
+ borderTopWidth: 1,
460
+ borderRightWidth: 1,
461
+ borderLeftWidth: 1,
462
+ borderBottomWidth: 4
463
+ },
450
464
  "@media (prefers-reduced-motion: reduce)": {
451
465
  transition: "none",
452
466
  "&::before": { display: "none" }
@@ -488,6 +502,13 @@ function buildComponents(tokens2) {
488
502
  "&.MuiButtonGroup-contained .MuiButtonGroup-grouped:not(.Mui-disabled)": {
489
503
  borderColor: fg4.tertiary
490
504
  },
505
+ // Disabled grouped children: MUI's per-position grouped-contained
506
+ // border wins over the child Button's own .Mui-disabled rule on the
507
+ // first/middle buttons — pin the unified disabled border here so the
508
+ // whole group matches the standalone disabled Button.
509
+ "&.MuiButtonGroup-contained .MuiButtonGroup-grouped.Mui-disabled": {
510
+ borderColor: border4.disabled
511
+ },
491
512
  // outlined group → the outlined-Button look (outlinedFill), including
492
513
  // its lightened hover sweep (the forced-contained children would
493
514
  // otherwise sweep at full currentColor strength).
@@ -552,6 +573,13 @@ function buildComponents(tokens2) {
552
573
  },
553
574
  "&.ForestIconButton": {
554
575
  ...bevel3D,
576
+ // Square 32×32 with border-box so the faux-3D bevel (1px top + 4px
577
+ // bottom, 1px left/right) is absorbed rather than added on top —
578
+ // otherwise it rendered a 37×34 control instead of matching the
579
+ // standalone Button's 32px height.
580
+ height: 32,
581
+ width: 32,
582
+ boxSizing: "border-box",
555
583
  boxShadow: tokenShadows.xs,
556
584
  "&:focus-visible": {
557
585
  boxShadow: focusRings4.brandShadowXs
@@ -589,15 +617,13 @@ function buildComponents(tokens2) {
589
617
  filter: "brightness(0.97)"
590
618
  }
591
619
  },
592
- // Disabled parity with the Button variants: MUI IconButton's own
593
- // .Mui-disabled (transparent bg + action.disabled icon) ties with the
594
- // variant faces at (0,2,0) and loses on insertion order pin the
595
- // disabled treatment one class higher.
596
- "&.ForestIconButton-contained.Mui-disabled": {
597
- backgroundColor: (theme.vars || theme).palette.action.disabledBackground,
598
- color: (theme.vars || theme).palette.action.disabled
599
- },
600
- "&.ForestIconButton-outlined.Mui-disabled": {
620
+ // Unified disabled treatment for both variants: transparent face,
621
+ // disabled border, disabled icon bevel geometry retained. This is
622
+ // the reference the rest of the button family matches. The two-class
623
+ // selector out-specifies the single-class variant faces so contained's
624
+ // fill is dropped.
625
+ "&.ForestIconButton.Mui-disabled": {
626
+ backgroundColor: "transparent",
601
627
  color: (theme.vars || theme).palette.action.disabled,
602
628
  borderColor: border4.disabled
603
629
  }
@@ -664,6 +690,13 @@ function buildComponents(tokens2) {
664
690
  "&:focus-visible": {
665
691
  boxShadow: focusRings4.brandShadowSm
666
692
  },
693
+ // Same unified disabled treatment as Button/IconButton: drop the
694
+ // contained fill for a transparent, disabled-bordered face.
695
+ "&.Mui-disabled": {
696
+ backgroundColor: "transparent",
697
+ borderColor: border4.disabled,
698
+ color: (theme.vars || theme).palette.action.disabled
699
+ },
667
700
  "@media (prefers-reduced-motion: reduce)": {
668
701
  transition: "none",
669
702
  "&::before": { display: "none" }
@@ -1059,16 +1092,16 @@ function buildComponents(tokens2) {
1059
1092
  borderTopRightRadius: radius4.md
1060
1093
  }
1061
1094
  },
1062
- // Disabled parity with the disabled contained Button: greyed face +
1063
- // disabled fg, bevel geometry retained. MUI's own .Mui-disabled rule
1064
- // only swaps color and border-shorthands the bevel away — and ties
1065
- // with .Mui-selected at (0,2,0) — so this block sits AFTER selected
1066
- // to win both.
1095
+ // Disabled parity with the rest of the button family: transparent
1096
+ // face, disabled border + fg, bevel geometry retained. MUI's own
1097
+ // .Mui-disabled rule only swaps color and border-shorthands the bevel
1098
+ // away — and ties with .Mui-selected at (0,2,0) — so this block sits
1099
+ // AFTER selected to win both.
1067
1100
  "&.Mui-disabled": {
1068
- backgroundColor: (theme.vars || theme).palette.action.disabledBackground,
1101
+ backgroundColor: "transparent",
1069
1102
  color: (theme.vars || theme).palette.action.disabled,
1070
1103
  borderStyle: "solid",
1071
- borderColor: fg4.tertiary,
1104
+ borderColor: border4.disabled,
1072
1105
  borderTopWidth: 1,
1073
1106
  borderRightWidth: 1,
1074
1107
  borderLeftWidth: 1,
@@ -3988,4 +4021,4 @@ export {
3988
4021
  forestTheme,
3989
4022
  forestThemeOptions
3990
4023
  };
3991
- //# sourceMappingURL=chunk-VIQ5IYUZ.mjs.map
4024
+ //# sourceMappingURL=chunk-4PNVZETQ.mjs.map