@superdispatch/ui 0.40.0 → 0.40.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.
@@ -1,14 +1,17 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
- import { ColorDynamic } from "../theme/Color.js";
2
+ import { Color, ColorDark } from "../theme/Color.js";
3
3
  export function overrideTooltip(theme) {
4
+ var mode = theme.palette.type;
5
+ var color = mode === 'dark' ? ColorDark.Silver400 : Color.Dark500;
4
6
  theme.props.MuiTooltip = {
5
7
  arrow: true
6
8
  };
7
9
  theme.overrides.MuiTooltip = {
8
10
  tooltip: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
9
11
  padding: theme.spacing(1, 1.5),
10
- backgroundColor: ColorDynamic.Dark500,
11
- '--sd-dark-300': ColorDynamic.Silver500 //tooltip secondary color(Dark300) is invisible in dark mode
12
+ backgroundColor: color,
13
+ color: Color.White,
14
+ '--sd-dark-300': Color.Silver500 //tooltip secondary color(Dark300) is invisible in light mode
12
15
  }),
13
16
  popperArrow: {
14
17
  '&[x-placement*="top"] $arrow': {
@@ -33,7 +36,7 @@ export function overrideTooltip(theme) {
33
36
  }
34
37
  },
35
38
  arrow: {
36
- color: ColorDynamic.Dark500,
39
+ color,
37
40
  fontSize: theme.spacing(1)
38
41
  }
39
42
  };
package/dist-web/index.js CHANGED
@@ -3931,14 +3931,17 @@ function overrideToolbar(theme) {
3931
3931
  }
3932
3932
 
3933
3933
  function overrideTooltip(theme) {
3934
+ var mode = theme.palette.type;
3935
+ var color = mode === 'dark' ? ColorDark.Silver400 : Color.Dark500;
3934
3936
  theme.props.MuiTooltip = {
3935
3937
  arrow: true
3936
3938
  };
3937
3939
  theme.overrides.MuiTooltip = {
3938
3940
  tooltip: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
3939
3941
  padding: theme.spacing(1, 1.5),
3940
- backgroundColor: ColorDynamic.Dark500,
3941
- '--sd-dark-300': ColorDynamic.Silver500 //tooltip secondary color(Dark300) is invisible in dark mode
3942
+ backgroundColor: color,
3943
+ color: Color.White,
3944
+ '--sd-dark-300': Color.Silver500 //tooltip secondary color(Dark300) is invisible in light mode
3942
3945
  }),
3943
3946
  popperArrow: {
3944
3947
  '&[x-placement*="top"] $arrow': {
@@ -3963,7 +3966,7 @@ function overrideTooltip(theme) {
3963
3966
  }
3964
3967
  },
3965
3968
  arrow: {
3966
- color: ColorDynamic.Dark500,
3969
+ color,
3967
3970
  fontSize: theme.spacing(1)
3968
3971
  }
3969
3972
  };