@superdispatch/ui 0.20.4 → 0.21.5-alpha.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.
Files changed (55) hide show
  1. package/dist-node/index.js +1434 -1349
  2. package/dist-node/index.js.map +1 -1
  3. package/dist-src/adaptive-toolbar/AdaptiveToolbar.js +14 -12
  4. package/dist-src/adaptive-vertical-toolbar/AdaptiveVerticalToolbar.js +3 -3
  5. package/dist-src/app-bar/AppBarOverrides.js +6 -4
  6. package/dist-src/autocomplete/AutocompleteOverrides.js +14 -18
  7. package/dist-src/avatar/AvatarOverrides.js +14 -12
  8. package/dist-src/avatar-button/AvatarButton.js +80 -92
  9. package/dist-src/button/Button.js +11 -15
  10. package/dist-src/button/ButtonOverrides.js +147 -149
  11. package/dist-src/card/CardOverrides.js +10 -6
  12. package/dist-src/card-button/CardButton.js +78 -75
  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 +60 -50
  16. package/dist-src/chip/ChipOverrides.js +88 -85
  17. package/dist-src/description-list/DescriptionList.js +58 -55
  18. package/dist-src/dialog/DialogOverrides.js +31 -25
  19. package/dist-src/drawer/DrawerActions.js +32 -34
  20. package/dist-src/drawer/DrawerContent.js +10 -26
  21. package/dist-src/drawer/DrawerList.js +8 -27
  22. package/dist-src/drawer/DrawerOverrides.js +12 -10
  23. package/dist-src/drawer/DrawerTitle.js +46 -40
  24. package/dist-src/grid/GridStack.js +1 -1
  25. package/dist-src/grid/InlineGrid.js +2 -2
  26. package/dist-src/icon-button/IconButtonOverrides.js +48 -32
  27. package/dist-src/info-card/InfoCard.js +27 -37
  28. package/dist-src/link/LinkOverrides.js +29 -26
  29. package/dist-src/list/ListOverrides.js +10 -7
  30. package/dist-src/menu/MenuOverrides.js +28 -14
  31. package/dist-src/overflow-text/OverflowText.js +35 -34
  32. package/dist-src/pagination/PaginationOverrides.js +27 -32
  33. package/dist-src/paper/PaperOverrides.js +8 -6
  34. package/dist-src/radio/RadioField.js +1 -1
  35. package/dist-src/radio/RadioGroupField.js +1 -1
  36. package/dist-src/radio/RadioOverrides.js +38 -36
  37. package/dist-src/responsive/ResponsiveContext.js +1 -1
  38. package/dist-src/snackbar/Snackbar.js +1 -1
  39. package/dist-src/snackbar/SnackbarContent.js +3 -3
  40. package/dist-src/snackbar/SnackbarOverrides.js +28 -18
  41. package/dist-src/svg-icon/SvgIconOverrides.js +28 -18
  42. package/dist-src/switch/SwitchOverrides.js +72 -71
  43. package/dist-src/tabs/TabsOverrides.js +34 -30
  44. package/dist-src/tag/Tag.js +2 -2
  45. package/dist-src/text-field/TextFieldOverrides.js +158 -137
  46. package/dist-src/theme/CssBaselineOverrides.js +8 -0
  47. package/dist-src/theme/ThemeProvider.js +25 -28
  48. package/dist-src/tiles/Tiles.js +4 -3
  49. package/dist-src/toolbar/ToolbarOverrides.js +10 -8
  50. package/dist-src/tooltip/TooltipOverrides.js +33 -30
  51. package/dist-src/typography/TypographyOverrides.js +12 -2
  52. package/dist-types/index.d.ts +31 -26
  53. package/dist-web/index.js +1371 -1286
  54. package/dist-web/index.js.map +1 -1
  55. package/package.json +5 -5
@@ -1,56 +1,58 @@
1
- import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
1
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
+ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
3
3
  var _excluded = ["title", "enterDelay"],
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';
4
+ _excluded2 = ["onClick", "children", "disableUnderline", "TooltipProps"];
5
+ import { styled, Tooltip, Typography } from '@mui/material';
8
6
  import { forwardRef, useState } from 'react';
9
7
  import { Color } from "../theme/Color.js";
10
8
  import { VisibilityObserver } from "../utils/VisibilityObserver.js";
11
9
  import { jsx as _jsx } from "react/jsx-runtime";
12
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
13
- var useStyles = /*#__PURE__*/makeStyles(theme => ({
14
- root: {
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({
15
20
  marginBottom: -1,
16
21
  borderBottom: '1px dashed transparent',
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'
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'
31
35
  });
32
- export var OverflowText = /*#__PURE__*/forwardRef((_ref, rootRef) => {
36
+ export var OverflowText = /*#__PURE__*/forwardRef((_ref2, rootRef) => {
33
37
  var {
34
38
  onClick: _onClick,
35
39
  children,
36
- className,
37
40
  disableUnderline,
38
41
  TooltipProps: {
39
42
  title = children,
40
43
  enterDelay = 1000
41
44
  } = {}
42
- } = _ref,
43
- tooltipProps = _objectWithoutProperties(_ref.TooltipProps, _excluded),
44
- props = _objectWithoutProperties(_ref, _excluded2);
45
+ } = _ref2,
46
+ tooltipProps = _objectWithoutProperties(_ref2.TooltipProps, _excluded),
47
+ props = _objectWithoutProperties(_ref2, _excluded2);
45
48
 
46
49
  var [isOpen, setIsOpen] = useState(false);
47
- var styles = useStyles();
48
50
  return /*#__PURE__*/_jsx(VisibilityObserver, {
49
- render: _ref2 => {
51
+ render: _ref3 => {
50
52
  var {
51
53
  ref,
52
54
  visibility
53
- } = _ref2;
55
+ } = _ref3;
54
56
  var isTooltipEnabled = !!children && visibility === 'invisible';
55
57
  return /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({}, tooltipProps), {}, {
56
58
  enterDelay: 1000,
@@ -63,17 +65,16 @@ export var OverflowText = /*#__PURE__*/forwardRef((_ref, rootRef) => {
63
65
  onClose: () => {
64
66
  setIsOpen(false);
65
67
  },
66
- children: /*#__PURE__*/_jsxs(Typography, _objectSpread(_objectSpread({}, props), {}, {
68
+ children: /*#__PURE__*/_jsxs(Root, _objectSpread(_objectSpread({}, props), {}, {
67
69
  ref: rootRef,
68
70
  noWrap: true,
71
+ truncated: !disableUnderline && visibility === 'invisible',
69
72
  onClick: event => {
70
73
  setIsOpen(true);
71
74
  _onClick === null || _onClick === void 0 ? void 0 : _onClick(event);
72
75
  },
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
76
+ children: [children, !!children && /*#__PURE__*/_jsx(Sential, {
77
+ ref: ref
77
78
  })]
78
79
  }))
79
80
  }));
@@ -1,40 +1,35 @@
1
+ import { paginationItemClasses } from '@mui/material';
1
2
  import { Color } from "../theme/Color.js";
2
3
  export function overridePagination(theme) {
3
- var props = {};
4
- var overrides = {
5
- root: {
6
- color: Color.Dark400
7
- },
8
- page: {
9
- '&:hover': {
10
- backgroundColor: Color.Silver200
4
+ theme.components.MuiPaginationItem = {
5
+ styleOverrides: {
6
+ root: {
7
+ color: Color.Dark400
11
8
  },
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
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)
21
17
  },
22
- '&$disabled': {
23
- color: Color.Dark100,
24
- backgroundColor: Color.Silver400
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
+ }
27
+ },
28
+ ["&.".concat(paginationItemClasses.disabled)]: {
29
+ opacity: 1,
30
+ color: Color.Dark100
25
31
  }
26
- },
27
- '&$disabled': {
28
- opacity: undefined,
29
- color: Color.Dark100
30
32
  }
31
33
  }
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
- });
34
+ };
40
35
  }
@@ -1,11 +1,13 @@
1
1
  import { Color } from "../theme/Color.js";
2
2
  export function overridePaper(theme) {
3
- theme.props.MuiPaper = {
4
- elevation: 0
5
- };
6
- theme.overrides.MuiPaper = {
7
- elevation0: {
8
- border: "1px solid ".concat(Color.Silver400)
3
+ theme.components.MuiPaper = {
4
+ defaultProps: {
5
+ elevation: 0
6
+ },
7
+ styleOverrides: {
8
+ elevation0: {
9
+ border: "1px solid ".concat(Color.Silver400)
10
+ }
9
11
  }
10
12
  };
11
13
  }
@@ -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 '@material-ui/core';
4
+ import { FormControl, FormControlLabel, FormHelperText, Radio } from '@mui/material';
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 '@material-ui/core';
4
+ import { FormControl, FormHelperText, FormLabel, RadioGroup } from '@mui/material';
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,46 +1,48 @@
1
- import { SvgIcon } from '@material-ui/core';
1
+ import { radioClasses, SvgIcon } from '@mui/material';
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.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"
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
+ })]
15
31
  })
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)
37
32
  },
38
- colorPrimary: {
39
- '&$checked$disabled': {
40
- color: Color.Silver500
33
+ styleOverrides: {
34
+ root: {
35
+ color: Color.Dark100,
36
+ marginTop: theme.spacing(-0.625),
37
+ marginBottom: theme.spacing(-0.625)
41
38
  },
42
- '&:hover:not($checked)': {
43
- color: Color.Dark100
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
+ }
44
46
  }
45
47
  }
46
48
  };
@@ -1,4 +1,4 @@
1
- import { useMediaQuery } from '@material-ui/core';
1
+ import { useMediaQuery } from '@mui/material';
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 '@material-ui/core';
4
+ import { Portal, Slide, Snackbar as MaterialSnackbar } from '@mui/material';
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 { 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';
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';
8
8
  import clsx from 'clsx';
9
9
  import { forwardRef } from 'react';
10
10
  import { Color } from "../theme/Color.js";
@@ -1,25 +1,35 @@
1
1
  export function overrideSnackbar(theme) {
2
- theme.overrides.MuiSnackbar = {
3
- anchorOriginBottomCenter: {
4
- left: 0,
5
- right: 0,
6
- bottom: 0
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
+ }
7
15
  }
8
16
  };
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)
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'
18
32
  }
19
- },
20
- message: {
21
- flex: 1,
22
- display: 'flex'
23
33
  }
24
34
  };
25
35
  }
@@ -1,25 +1,35 @@
1
1
  import { Color } from "../theme/Color.js";
2
2
  export function overrideSvgIcon(theme) {
3
3
  var sm = theme.breakpoints.up('sm');
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)'
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
10
32
  }
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
23
33
  }
24
34
  };
25
35
  }
@@ -1,86 +1,87 @@
1
+ import { switchClasses } from '@mui/material';
1
2
  import { Color } from "../theme/Color.js";
2
3
  export function overrideSwitch(theme) {
3
4
  var sm = theme.breakpoints.up('sm');
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
- }
19
- },
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
- }
5
+ theme.components.MuiSwitch = {
6
+ defaultProps: {
7
+ color: 'primary',
8
+ disableRipple: true,
9
+ disableFocusRipple: true
40
10
  },
41
- switchBase: {
42
- left: theme.spacing(1),
43
- padding: theme.spacing(1.25, 1),
44
- [sm]: {
45
- padding: theme.spacing(1)
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
+ }
46
21
  },
47
- '&$checked': {
48
- transform: "translateX(".concat(theme.spacing(2.5), "px)"),
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),
49
29
  [sm]: {
50
- transform: "translateX(".concat(theme.spacing(2), "px)")
30
+ borderRadius: theme.spacing(1.625)
51
31
  }
52
32
  },
53
- '&$checked + $track': {
54
- opacity: undefined
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
+ }
55
42
  },
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
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), ")")
67
53
  }
54
+ },
55
+ ["&.".concat(switchClasses.checked, " + .").concat(switchClasses.track)]: {
56
+ opacity: 1
57
+ },
58
+ ["&.".concat(switchClasses.disabled, " + .").concat(switchClasses.track)]: {
59
+ opacity: 1
68
60
  }
69
61
  },
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)
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
+ }
84
85
  }
85
86
  }
86
87
  };