@superdispatch/ui 0.38.0 → 0.39.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.
@@ -0,0 +1,17 @@
1
+ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["srcDark", "src"];
4
+ import { useTheme } from '@material-ui/core';
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ export function Image(_ref) {
7
+ var {
8
+ srcDark,
9
+ src
10
+ } = _ref,
11
+ props = _objectWithoutProperties(_ref, _excluded);
12
+ var theme = useTheme();
13
+ var value = theme.palette.type === 'dark' && srcDark ? srcDark : src;
14
+ return /*#__PURE__*/_jsx("img", _objectSpread(_objectSpread({}, props), {}, {
15
+ src: value
16
+ }));
17
+ }
@@ -0,0 +1,12 @@
1
+ import { useTheme } from '@material-ui/core';
2
+ import { renderChildren } from '@superdispatch/ui';
3
+ export function LightDark(_ref) {
4
+ var {
5
+ light,
6
+ dark
7
+ } = _ref;
8
+ var theme = useTheme();
9
+ var isDarkMode = theme.palette.type === 'dark';
10
+ var mode = isDarkMode ? dark : light;
11
+ return renderChildren(mode);
12
+ }
@@ -1,8 +1,10 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
- import { SvgIcon } from '@material-ui/core';
2
+ import { alpha, SvgIcon } from '@material-ui/core';
3
+ import { Color, ColorDynamic } from "../theme/Color.js";
3
4
  import { jsx as _jsx } from "react/jsx-runtime";
4
5
  export function overrideAutocomplete(theme) {
5
6
  var sm = theme.breakpoints.up('sm');
7
+ var color = theme.palette.type === 'dark' ? alpha(Color.White, 0.08) : ColorDynamic.Silver200;
6
8
 
7
9
  // Remove `Object.assign` after official release of `Autocomplete`.
8
10
  Object.assign(theme.props, {
@@ -61,6 +63,11 @@ export function overrideAutocomplete(theme) {
61
63
  }
62
64
  }
63
65
  }
66
+ },
67
+ option: {
68
+ '&[data-focus="true"]': {
69
+ backgroundColor: color
70
+ }
64
71
  }
65
72
  }
66
73
  });
@@ -32,7 +32,8 @@ export function overrideIconButton(theme) {
32
32
  },
33
33
  '&:focus': {
34
34
  backgroundColor: ColorDynamic.Blue50
35
- }
35
+ },
36
+ color: ColorDynamic.Blue500
36
37
  },
37
38
  edgeEnd: {
38
39
  marginRight: theme.spacing(-1)
package/dist-web/index.js CHANGED
@@ -2625,6 +2625,7 @@ function overrideAppBar(theme) {
2625
2625
 
2626
2626
  function overrideAutocomplete(theme) {
2627
2627
  var sm = theme.breakpoints.up('sm');
2628
+ var color = theme.palette.type === 'dark' ? alpha(Color.White, 0.08) : ColorDynamic.Silver200;
2628
2629
 
2629
2630
  // Remove `Object.assign` after official release of `Autocomplete`.
2630
2631
  Object.assign(theme.props, {
@@ -2683,6 +2684,11 @@ function overrideAutocomplete(theme) {
2683
2684
  }
2684
2685
  }
2685
2686
  }
2687
+ },
2688
+ option: {
2689
+ '&[data-focus="true"]': {
2690
+ backgroundColor: color
2691
+ }
2686
2692
  }
2687
2693
  }
2688
2694
  });
@@ -3209,7 +3215,8 @@ function overrideIconButton(theme) {
3209
3215
  },
3210
3216
  '&:focus': {
3211
3217
  backgroundColor: ColorDynamic.Blue50
3212
- }
3218
+ },
3219
+ color: ColorDynamic.Blue500
3213
3220
  },
3214
3221
  edgeEnd: {
3215
3222
  marginRight: theme.spacing(-1)