@superdispatch/ui 0.21.5-alpha.4 → 0.21.8

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.
Files changed (57) hide show
  1. package/dist-node/index.js +1359 -1442
  2. package/dist-node/index.js.map +1 -1
  3. package/dist-src/adaptive-toolbar/AdaptiveToolbar.js +12 -14
  4. package/dist-src/adaptive-vertical-toolbar/AdaptiveVerticalToolbar.js +3 -3
  5. package/dist-src/app-bar/AppBarOverrides.js +4 -6
  6. package/dist-src/autocomplete/AutocompleteOverrides.js +18 -14
  7. package/dist-src/avatar/AvatarOverrides.js +12 -14
  8. package/dist-src/avatar-button/AvatarButton.js +92 -80
  9. package/dist-src/button/Button.js +15 -11
  10. package/dist-src/button/ButtonOverrides.js +149 -147
  11. package/dist-src/card/CardOverrides.js +6 -10
  12. package/dist-src/card-button/CardButton.js +75 -78
  13. package/dist-src/checkbox/CheckboxField.js +1 -1
  14. package/dist-src/checkbox/CheckboxGroudField.js +1 -1
  15. package/dist-src/checkbox/CheckboxOverrides.js +50 -60
  16. package/dist-src/chip/ChipOverrides.js +85 -88
  17. package/dist-src/description-list/DescriptionList.js +55 -58
  18. package/dist-src/dialog/DialogOverrides.js +25 -31
  19. package/dist-src/drawer/DrawerActions.js +34 -32
  20. package/dist-src/drawer/DrawerContent.js +26 -10
  21. package/dist-src/drawer/DrawerList.js +27 -8
  22. package/dist-src/drawer/DrawerOverrides.js +10 -12
  23. package/dist-src/drawer/DrawerTitle.js +40 -46
  24. package/dist-src/dropdown-button/DropdownButton.js +1 -1
  25. package/dist-src/grid/GridStack.js +1 -1
  26. package/dist-src/grid/InlineGrid.js +2 -2
  27. package/dist-src/icon-button/IconButtonOverrides.js +32 -48
  28. package/dist-src/info-card/InfoCard.js +37 -27
  29. package/dist-src/link/LinkOverrides.js +26 -29
  30. package/dist-src/list/ListOverrides.js +7 -10
  31. package/dist-src/menu/MenuOverrides.js +14 -28
  32. package/dist-src/number-field/NumberField.js +3 -2
  33. package/dist-src/overflow-text/OverflowText.js +34 -35
  34. package/dist-src/pagination/PaginationOverrides.js +32 -27
  35. package/dist-src/paper/PaperOverrides.js +6 -8
  36. package/dist-src/radio/RadioField.js +1 -1
  37. package/dist-src/radio/RadioGroupField.js +1 -1
  38. package/dist-src/radio/RadioOverrides.js +36 -38
  39. package/dist-src/responsive/ResponsiveContext.js +1 -1
  40. package/dist-src/snackbar/Snackbar.js +1 -1
  41. package/dist-src/snackbar/SnackbarContent.js +3 -3
  42. package/dist-src/snackbar/SnackbarOverrides.js +18 -28
  43. package/dist-src/svg-icon/SvgIconOverrides.js +18 -28
  44. package/dist-src/switch/SwitchOverrides.js +71 -72
  45. package/dist-src/tabs/TabsOverrides.js +30 -34
  46. package/dist-src/tag/Tag.js +2 -2
  47. package/dist-src/text-field/TextFieldOverrides.js +137 -158
  48. package/dist-src/theme/ThemeProvider.js +28 -25
  49. package/dist-src/tiles/Tiles.js +3 -4
  50. package/dist-src/toolbar/ToolbarOverrides.js +8 -10
  51. package/dist-src/tooltip/TooltipOverrides.js +30 -33
  52. package/dist-src/typography/TypographyOverrides.js +2 -12
  53. package/dist-types/index.d.ts +381 -385
  54. package/dist-web/index.js +1291 -1374
  55. package/dist-web/index.js.map +1 -1
  56. package/package.json +39 -39
  57. package/dist-src/theme/CssBaselineOverrides.js +0 -8
@@ -1,58 +1,56 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["title", "enterDelay"],
4
- _excluded2 = ["onClick", "children", "disableUnderline", "TooltipProps"];
5
- import { styled, Tooltip, Typography } from '@mui/material';
4
+ _excluded2 = ["onClick", "children", "className", "disableUnderline", "TooltipProps"];
5
+ import { Tooltip, Typography } from '@material-ui/core';
6
+ import { makeStyles } from '@material-ui/styles';
7
+ import clsx from 'clsx';
6
8
  import { forwardRef, useState } from 'react';
7
9
  import { Color } from "../theme/Color.js";
8
10
  import { VisibilityObserver } from "../utils/VisibilityObserver.js";
9
11
  import { jsx as _jsx } from "react/jsx-runtime";
10
12
  import { jsxs as _jsxs } from "react/jsx-runtime";
11
- var Root = /*#__PURE__*/styled(Typography, {
12
- name: 'SD-OverflowText',
13
- shouldForwardProp: prop => prop !== 'truncated'
14
- })(_ref => {
15
- var {
16
- truncated,
17
- theme
18
- } = _ref;
19
- return _objectSpread({
13
+ var useStyles = /*#__PURE__*/makeStyles(theme => ({
14
+ root: {
20
15
  marginBottom: -1,
21
16
  borderBottom: '1px dashed transparent',
22
- transition: theme.transitions.create('border')
23
- }, truncated && {
24
- cursor: 'pointer',
25
- borderBottomColor: Color.Silver500
26
- });
27
- });
28
- var Sential = /*#__PURE__*/styled('span', {
29
- name: 'SD-OverflowText',
30
- slot: 'Sential'
31
- })({
32
- width: 1,
33
- height: '100%',
34
- display: 'inline-block'
17
+ transition: theme.transitions.create('border'),
18
+ '&$truncated': {
19
+ cursor: 'pointer',
20
+ borderBottomColor: Color.Silver500
21
+ }
22
+ },
23
+ truncated: {},
24
+ sentinel: {
25
+ width: 1,
26
+ height: '100%',
27
+ display: 'inline-block'
28
+ }
29
+ }), {
30
+ name: 'SD-OverflowText'
35
31
  });
36
- export var OverflowText = /*#__PURE__*/forwardRef((_ref2, rootRef) => {
32
+ export var OverflowText = /*#__PURE__*/forwardRef((_ref, rootRef) => {
37
33
  var {
38
34
  onClick: _onClick,
39
35
  children,
36
+ className,
40
37
  disableUnderline,
41
38
  TooltipProps: {
42
39
  title = children,
43
40
  enterDelay = 1000
44
41
  } = {}
45
- } = _ref2,
46
- tooltipProps = _objectWithoutProperties(_ref2.TooltipProps, _excluded),
47
- props = _objectWithoutProperties(_ref2, _excluded2);
42
+ } = _ref,
43
+ tooltipProps = _objectWithoutProperties(_ref.TooltipProps, _excluded),
44
+ props = _objectWithoutProperties(_ref, _excluded2);
48
45
 
49
46
  var [isOpen, setIsOpen] = useState(false);
47
+ var styles = useStyles();
50
48
  return /*#__PURE__*/_jsx(VisibilityObserver, {
51
- render: _ref3 => {
49
+ render: _ref2 => {
52
50
  var {
53
51
  ref,
54
52
  visibility
55
- } = _ref3;
53
+ } = _ref2;
56
54
  var isTooltipEnabled = !!children && visibility === 'invisible';
57
55
  return /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({}, tooltipProps), {}, {
58
56
  enterDelay: 1000,
@@ -65,16 +63,17 @@ export var OverflowText = /*#__PURE__*/forwardRef((_ref2, rootRef) => {
65
63
  onClose: () => {
66
64
  setIsOpen(false);
67
65
  },
68
- children: /*#__PURE__*/_jsxs(Root, _objectSpread(_objectSpread({}, props), {}, {
66
+ children: /*#__PURE__*/_jsxs(Typography, _objectSpread(_objectSpread({}, props), {}, {
69
67
  ref: rootRef,
70
68
  noWrap: true,
71
- truncated: !disableUnderline && visibility === 'invisible',
72
69
  onClick: event => {
73
70
  setIsOpen(true);
74
71
  _onClick === null || _onClick === void 0 ? void 0 : _onClick(event);
75
72
  },
76
- children: [children, !!children && /*#__PURE__*/_jsx(Sential, {
77
- ref: ref
73
+ className: clsx(styles.root, className, !disableUnderline && visibility === 'invisible' && styles.truncated),
74
+ children: [children, !!children && /*#__PURE__*/_jsx("span", {
75
+ ref: ref,
76
+ className: styles.sentinel
78
77
  })]
79
78
  }))
80
79
  }));
@@ -1,35 +1,40 @@
1
- import { paginationItemClasses } from '@mui/material';
2
1
  import { Color } from "../theme/Color.js";
3
2
  export function overridePagination(theme) {
4
- theme.components.MuiPaginationItem = {
5
- styleOverrides: {
6
- root: {
7
- color: Color.Dark400
3
+ var props = {};
4
+ var overrides = {
5
+ root: {
6
+ color: Color.Dark400
7
+ },
8
+ page: {
9
+ '&:hover': {
10
+ backgroundColor: Color.Silver200
8
11
  },
9
- page: {
10
- '&:hover': {
11
- backgroundColor: Color.Silver200
12
- },
13
- ["&.".concat(paginationItemClasses.focusVisible)]: {
14
- borderRadius: 4,
15
- backgroundColor: Color.White,
16
- border: "1px solid ".concat(Color.Blue100)
17
- },
18
- ["&.".concat(paginationItemClasses.selected)]: {
19
- backgroundColor: Color.Silver400,
20
- ["&:hover, &.".concat(paginationItemClasses.focusVisible)]: {
21
- backgroundColor: Color.Silver400
22
- },
23
- ["&.".concat(paginationItemClasses.disabled)]: {
24
- color: Color.Dark100,
25
- backgroundColor: Color.Silver400
26
- }
12
+ '&$focusVisible': {
13
+ borderRadius: 4,
14
+ backgroundColor: Color.White,
15
+ border: "1px solid ".concat(Color.Blue100)
16
+ },
17
+ '&$selected': {
18
+ backgroundColor: Color.Silver400,
19
+ '&:hover, &$focusVisible': {
20
+ backgroundColor: Color.Silver400
27
21
  },
28
- ["&.".concat(paginationItemClasses.disabled)]: {
29
- opacity: 1,
30
- color: Color.Dark100
22
+ '&$disabled': {
23
+ color: Color.Dark100,
24
+ backgroundColor: Color.Silver400
31
25
  }
26
+ },
27
+ '&$disabled': {
28
+ opacity: undefined,
29
+ color: Color.Dark100
32
30
  }
33
31
  }
34
- };
32
+ }; // Remove `Object.assign` after official release of `PaginationItem`.
33
+
34
+ Object.assign(theme.props, {
35
+ MuiPaginationItem: props
36
+ });
37
+ Object.assign(theme.overrides, {
38
+ MuiPaginationItem: overrides
39
+ });
35
40
  }
@@ -1,13 +1,11 @@
1
1
  import { Color } from "../theme/Color.js";
2
2
  export function overridePaper(theme) {
3
- theme.components.MuiPaper = {
4
- defaultProps: {
5
- elevation: 0
6
- },
7
- styleOverrides: {
8
- elevation0: {
9
- border: "1px solid ".concat(Color.Silver400)
10
- }
3
+ theme.props.MuiPaper = {
4
+ elevation: 0
5
+ };
6
+ theme.overrides.MuiPaper = {
7
+ elevation0: {
8
+ border: "1px solid ".concat(Color.Silver400)
11
9
  }
12
10
  };
13
11
  }
@@ -1,7 +1,7 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["label", "error", "checked", "onBlur", "onChange", "helperText", "FormControlLabelProps"];
4
- import { FormControl, FormControlLabel, FormHelperText, Radio } from '@mui/material';
4
+ import { FormControl, FormControlLabel, FormHelperText, Radio } from '@material-ui/core';
5
5
  import { forwardRef } from 'react';
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -1,7 +1,7 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["name", "value", "onChange", "RadioGroupProps", "label", "FormLabelProps", "helperText", "FormHelperTextProps", "children"];
4
- import { FormControl, FormHelperText, FormLabel, RadioGroup } from '@mui/material';
4
+ import { FormControl, FormHelperText, FormLabel, RadioGroup } from '@material-ui/core';
5
5
  import { forwardRef } from 'react';
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -1,48 +1,46 @@
1
- import { radioClasses, SvgIcon } from '@mui/material';
1
+ import { SvgIcon } from '@material-ui/core';
2
2
  import { Color } from "../theme/Color.js";
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
4
  import { jsxs as _jsxs } from "react/jsx-runtime";
5
5
  export function overrideRadio(theme) {
6
- theme.components.MuiRadio = {
7
- defaultProps: {
8
- color: 'primary',
9
- icon: /*#__PURE__*/_jsx(SvgIcon, {
10
- children: /*#__PURE__*/_jsx("circle", {
11
- cx: "12",
12
- cy: "12",
13
- r: "8.5",
14
- fill: Color.White,
15
- stroke: "currentColor"
16
- })
17
- }),
18
- checkedIcon: /*#__PURE__*/_jsxs(SvgIcon, {
19
- children: [/*#__PURE__*/_jsx("circle", {
20
- cx: "12",
21
- cy: "12",
22
- r: "8.5",
23
- fill: "currentColor",
24
- stroke: "currentColor"
25
- }), /*#__PURE__*/_jsx("circle", {
26
- cx: "12",
27
- cy: "12",
28
- r: "4",
29
- fill: Color.White
30
- })]
6
+ theme.props.MuiRadio = {
7
+ color: 'primary',
8
+ icon: /*#__PURE__*/_jsx(SvgIcon, {
9
+ children: /*#__PURE__*/_jsx("circle", {
10
+ cx: "12",
11
+ cy: "12",
12
+ r: "8.5",
13
+ fill: Color.White,
14
+ stroke: "currentColor"
31
15
  })
16
+ }),
17
+ checkedIcon: /*#__PURE__*/_jsxs(SvgIcon, {
18
+ children: [/*#__PURE__*/_jsx("circle", {
19
+ cx: "12",
20
+ cy: "12",
21
+ r: "8.5",
22
+ fill: "currentColor",
23
+ stroke: "currentColor"
24
+ }), /*#__PURE__*/_jsx("circle", {
25
+ cx: "12",
26
+ cy: "12",
27
+ r: "4",
28
+ fill: Color.White
29
+ })]
30
+ })
31
+ };
32
+ theme.overrides.MuiRadio = {
33
+ root: {
34
+ color: Color.Dark100,
35
+ marginTop: theme.spacing(-0.625),
36
+ marginBottom: theme.spacing(-0.625)
32
37
  },
33
- styleOverrides: {
34
- root: {
35
- color: Color.Dark100,
36
- marginTop: theme.spacing(-0.625),
37
- marginBottom: theme.spacing(-0.625)
38
+ colorPrimary: {
39
+ '&$checked$disabled': {
40
+ color: Color.Silver500
38
41
  },
39
- colorPrimary: {
40
- ["&.".concat(radioClasses.disabled, ".").concat(radioClasses.checked)]: {
41
- color: Color.Silver500
42
- },
43
- ["&:hover:not(.".concat(radioClasses.checked, ")")]: {
44
- color: Color.Dark100
45
- }
42
+ '&:hover:not($checked)': {
43
+ color: Color.Dark100
46
44
  }
47
45
  }
48
46
  };
@@ -1,4 +1,4 @@
1
- import { useMediaQuery } from '@mui/material';
1
+ import { useMediaQuery } from '@material-ui/core';
2
2
  import { createContext, useContext, useMemo } from 'react';
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
4
  var Context = /*#__PURE__*/createContext({});
@@ -1,7 +1,7 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
2
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
3
3
  var _excluded = ["open", "action", "variant", "onClose", "children", "ContentProps", "hasCloseButton", "TransitionComponent"];
4
- import { Portal, Slide, Snackbar as MaterialSnackbar } from '@mui/material';
4
+ import { Portal, Slide, Snackbar as MaterialSnackbar } from '@material-ui/core';
5
5
  import { forwardRef } from 'react';
6
6
  import { SnackbarContent } from "./SnackbarContent.js";
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -2,9 +2,9 @@ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["action", "children", "onClose", "className", "classes", "variant"],
4
4
  _excluded2 = ["icon", "closeButton", "variantError", "variantSuccess"];
5
- import { CheckCircle, Close, Warning } from '@mui/icons-material';
6
- import { Grid, IconButton, SnackbarContent as MuiSnackbarContent } from '@mui/material';
7
- import { makeStyles } from '@mui/styles';
5
+ import { Grid, IconButton, SnackbarContent as MuiSnackbarContent } from '@material-ui/core';
6
+ import { CheckCircle, Close, Warning } from '@material-ui/icons';
7
+ import { makeStyles } from '@material-ui/styles';
8
8
  import clsx from 'clsx';
9
9
  import { forwardRef } from 'react';
10
10
  import { Color } from "../theme/Color.js";
@@ -1,35 +1,25 @@
1
1
  export function overrideSnackbar(theme) {
2
- theme.components.MuiSnackbar = {
3
- defaultProps: {
4
- anchorOrigin: {
5
- vertical: 'bottom',
6
- horizontal: 'center'
7
- }
8
- },
9
- styleOverrides: {
10
- anchorOriginBottomCenter: {
11
- left: 0,
12
- right: 0,
13
- bottom: 0
14
- }
2
+ theme.overrides.MuiSnackbar = {
3
+ anchorOriginBottomCenter: {
4
+ left: 0,
5
+ right: 0,
6
+ bottom: 0
15
7
  }
16
8
  };
17
- theme.components.MuiSnackbarContent = {
18
- styleOverrides: {
19
- root: {
20
- width: '100%',
21
- borderRadius: 0,
22
- minHeight: theme.spacing(7.5),
23
- [theme.breakpoints.up('sm')]: {
24
- width: theme.spacing(54),
25
- maxWidth: theme.spacing(54),
26
- borderRadius: theme.spacing(0.5)
27
- }
28
- },
29
- message: {
30
- flex: 1,
31
- display: 'flex'
9
+ theme.overrides.MuiSnackbarContent = {
10
+ root: {
11
+ width: '100%',
12
+ borderRadius: 0,
13
+ minHeight: theme.spacing(7.5),
14
+ [theme.breakpoints.up('sm')]: {
15
+ width: theme.spacing(54),
16
+ maxWidth: theme.spacing(54),
17
+ borderRadius: theme.spacing(0.5)
32
18
  }
19
+ },
20
+ message: {
21
+ flex: 1,
22
+ display: 'flex'
33
23
  }
34
24
  };
35
25
  }
@@ -1,35 +1,25 @@
1
1
  import { Color } from "../theme/Color.js";
2
2
  export function overrideSvgIcon(theme) {
3
3
  var sm = theme.breakpoints.up('sm');
4
- theme.components.MuiSvgIcon = {
5
- styleOverrides: {
6
- root: {
7
- display: 'inherit',
8
- fontSize: 'var(--mui-svg-icon-size, 32px)',
9
- [sm]: {
10
- fontSize: 'var(--mui-svg-icon-size, 24px)'
11
- }
12
- },
13
- fontSizeInherit: {
14
- fontSize: 'inherit',
15
- [sm]: {
16
- fontSize: 'inherit'
17
- }
18
- },
19
- fontSizeSmall: {
20
- fontSize: 'var(--mui-svg-icon-size, 24px)',
21
- [sm]: {
22
- fontSize: 'var(--mui-svg-icon-size, 16px)'
23
- }
24
- },
25
- fontSizeLarge: {
26
- '&': {
27
- fontSize: 'var(--mui-svg-icon-size, 32px)'
28
- }
29
- },
30
- colorAction: {
31
- color: Color.Dark100
4
+ theme.overrides.MuiSvgIcon = {
5
+ root: {
6
+ display: 'inherit',
7
+ fontSize: 'var(--mui-svg-icon-size, 32px)',
8
+ [sm]: {
9
+ fontSize: 'var(--mui-svg-icon-size, 24px)'
32
10
  }
11
+ },
12
+ fontSizeSmall: {
13
+ fontSize: 'var(--mui-svg-icon-size, 24px)',
14
+ [sm]: {
15
+ fontSize: 'var(--mui-svg-icon-size, 16px)'
16
+ }
17
+ },
18
+ fontSizeLarge: {
19
+ fontSize: 'var(--mui-svg-icon-size, 32px)'
20
+ },
21
+ colorAction: {
22
+ color: Color.Dark100
33
23
  }
34
24
  };
35
25
  }
@@ -1,87 +1,86 @@
1
- import { switchClasses } from '@mui/material';
2
1
  import { Color } from "../theme/Color.js";
3
2
  export function overrideSwitch(theme) {
4
3
  var sm = theme.breakpoints.up('sm');
5
- theme.components.MuiSwitch = {
6
- defaultProps: {
7
- color: 'primary',
8
- disableRipple: true,
9
- disableFocusRipple: true
4
+ theme.props.MuiSwitch = {
5
+ color: 'primary',
6
+ disableRipple: true,
7
+ disableFocusRipple: true
8
+ };
9
+ theme.overrides.MuiSwitch = {
10
+ root: {
11
+ width: theme.spacing(9.5),
12
+ height: theme.spacing(5.5),
13
+ padding: theme.spacing(0.75, 1.5),
14
+ [sm]: {
15
+ width: theme.spacing(8),
16
+ height: theme.spacing(4),
17
+ padding: theme.spacing(0.5, 1.5)
18
+ }
10
19
  },
11
- styleOverrides: {
12
- root: {
13
- width: theme.spacing(9.5),
14
- height: theme.spacing(5.5),
15
- padding: theme.spacing(0.75, 1.5),
16
- [sm]: {
17
- width: theme.spacing(8),
18
- height: theme.spacing(4),
19
- padding: theme.spacing(0.5, 1.5)
20
- }
20
+ track: {
21
+ opacity: undefined,
22
+ boxShadow: "0 0 0 0 ".concat(Color.Transparent),
23
+ transition: theme.transitions.create(['box-shadow', 'background-color'], {
24
+ duration: theme.transitions.duration.shortest
25
+ }),
26
+ borderRadius: theme.spacing(2),
27
+ [sm]: {
28
+ borderRadius: theme.spacing(1.625)
29
+ }
30
+ },
31
+ thumb: {
32
+ color: Color.White,
33
+ boxShadow: undefined,
34
+ width: theme.spacing(3),
35
+ height: theme.spacing(3),
36
+ [sm]: {
37
+ width: theme.spacing(2),
38
+ height: theme.spacing(2)
39
+ }
40
+ },
41
+ switchBase: {
42
+ left: theme.spacing(1),
43
+ padding: theme.spacing(1.25, 1),
44
+ [sm]: {
45
+ padding: theme.spacing(1)
21
46
  },
22
- track: {
23
- opacity: 1,
24
- boxShadow: "0 0 0 0 ".concat(Color.Transparent),
25
- transition: theme.transitions.create(['box-shadow', 'background-color'], {
26
- duration: theme.transitions.duration.shortest
27
- }),
28
- borderRadius: theme.spacing(2),
47
+ '&$checked': {
48
+ transform: "translateX(".concat(theme.spacing(2.5), "px)"),
29
49
  [sm]: {
30
- borderRadius: theme.spacing(1.625)
50
+ transform: "translateX(".concat(theme.spacing(2), "px)")
31
51
  }
32
52
  },
33
- thumb: {
34
- color: Color.White,
35
- boxShadow: 'none',
36
- width: theme.spacing(3),
37
- height: theme.spacing(3),
38
- [sm]: {
39
- width: theme.spacing(2),
40
- height: theme.spacing(2)
41
- }
53
+ '&$checked + $track': {
54
+ opacity: undefined
42
55
  },
43
- switchBase: {
44
- left: theme.spacing(1),
45
- padding: theme.spacing(1.25, 1),
46
- [sm]: {
47
- padding: theme.spacing(1)
48
- },
49
- ["&.".concat(switchClasses.checked)]: {
50
- transform: "translateX(".concat(theme.spacing(2.5), ")"),
51
- [sm]: {
52
- transform: "translateX(".concat(theme.spacing(2), ")")
56
+ '&$disabled + $track': {
57
+ opacity: undefined
58
+ }
59
+ },
60
+ colorPrimary: {
61
+ '&$checked': {
62
+ color: undefined,
63
+ '&:hover': {
64
+ backgroundColor: undefined,
65
+ '& + $track': {
66
+ backgroundColor: Color.Blue400
53
67
  }
54
- },
55
- ["&.".concat(switchClasses.checked, " + .").concat(switchClasses.track)]: {
56
- opacity: 1
57
- },
58
- ["&.".concat(switchClasses.disabled, " + .").concat(switchClasses.track)]: {
59
- opacity: 1
60
68
  }
61
69
  },
62
- colorPrimary: {
63
- ["&.".concat(switchClasses.checked)]: {
64
- '&:hover': {
65
- ["& + .".concat(switchClasses.track)]: {
66
- backgroundColor: Color.Blue400
67
- }
68
- }
69
- },
70
- ["& + .".concat(switchClasses.track)]: {
71
- backgroundColor: Color.Silver500
72
- },
73
- ["&.".concat(switchClasses.disabled, " + .").concat(switchClasses.track)]: {
74
- backgroundColor: Color.Silver300
75
- },
76
- ["&.".concat(switchClasses.checked, ".").concat(switchClasses.disabled, " + .").concat(switchClasses.track)]: {
77
- backgroundColor: Color.Blue100
78
- },
79
- ["&:hover + .".concat(switchClasses.track)]: {
80
- backgroundColor: Color.Dark100
81
- },
82
- ["&.Mui-focusVisible + .".concat(switchClasses.track)]: {
83
- boxShadow: "0 0 0 3px ".concat(Color.Blue100)
84
- }
70
+ '& + $track': {
71
+ backgroundColor: Color.Silver500
72
+ },
73
+ '&$disabled + $track': {
74
+ backgroundColor: Color.Silver300
75
+ },
76
+ '&$checked$disabled + $track': {
77
+ backgroundColor: Color.Blue100
78
+ },
79
+ '&:hover + $track': {
80
+ backgroundColor: Color.Dark100
81
+ },
82
+ '&.Mui-focusVisible + $track': {
83
+ boxShadow: "0 0 0 3px ".concat(Color.Blue100)
85
84
  }
86
85
  }
87
86
  };