@superdispatch/ui 0.21.5-alpha.4 → 0.21.6
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.
- package/dist-node/index.js +1357 -1441
- package/dist-node/index.js.map +1 -1
- package/dist-src/adaptive-toolbar/AdaptiveToolbar.js +12 -14
- package/dist-src/adaptive-vertical-toolbar/AdaptiveVerticalToolbar.js +3 -3
- package/dist-src/app-bar/AppBarOverrides.js +4 -6
- package/dist-src/autocomplete/AutocompleteOverrides.js +18 -14
- package/dist-src/avatar/AvatarOverrides.js +12 -14
- package/dist-src/avatar-button/AvatarButton.js +92 -80
- package/dist-src/button/Button.js +15 -11
- package/dist-src/button/ButtonOverrides.js +149 -147
- package/dist-src/card/CardOverrides.js +6 -10
- package/dist-src/card-button/CardButton.js +75 -78
- package/dist-src/checkbox/CheckboxField.js +1 -1
- package/dist-src/checkbox/CheckboxGroudField.js +1 -1
- package/dist-src/checkbox/CheckboxOverrides.js +50 -60
- package/dist-src/chip/ChipOverrides.js +85 -88
- package/dist-src/description-list/DescriptionList.js +55 -58
- package/dist-src/dialog/DialogOverrides.js +25 -31
- package/dist-src/drawer/DrawerActions.js +34 -32
- package/dist-src/drawer/DrawerContent.js +26 -10
- package/dist-src/drawer/DrawerList.js +27 -8
- package/dist-src/drawer/DrawerOverrides.js +10 -12
- package/dist-src/drawer/DrawerTitle.js +40 -46
- package/dist-src/dropdown-button/DropdownButton.js +1 -1
- package/dist-src/grid/GridStack.js +1 -1
- package/dist-src/grid/InlineGrid.js +2 -2
- package/dist-src/icon-button/IconButtonOverrides.js +32 -48
- package/dist-src/info-card/InfoCard.js +37 -27
- package/dist-src/link/LinkOverrides.js +26 -29
- package/dist-src/list/ListOverrides.js +7 -10
- package/dist-src/menu/MenuOverrides.js +14 -28
- package/dist-src/number-field/NumberField.js +1 -1
- package/dist-src/overflow-text/OverflowText.js +34 -35
- package/dist-src/pagination/PaginationOverrides.js +32 -27
- package/dist-src/paper/PaperOverrides.js +6 -8
- package/dist-src/radio/RadioField.js +1 -1
- package/dist-src/radio/RadioGroupField.js +1 -1
- package/dist-src/radio/RadioOverrides.js +36 -38
- package/dist-src/responsive/ResponsiveContext.js +1 -1
- package/dist-src/snackbar/Snackbar.js +1 -1
- package/dist-src/snackbar/SnackbarContent.js +3 -3
- package/dist-src/snackbar/SnackbarOverrides.js +18 -28
- package/dist-src/svg-icon/SvgIconOverrides.js +18 -28
- package/dist-src/switch/SwitchOverrides.js +71 -72
- package/dist-src/tabs/TabsOverrides.js +30 -34
- package/dist-src/tag/Tag.js +2 -2
- package/dist-src/text-field/TextFieldOverrides.js +137 -158
- package/dist-src/theme/ThemeProvider.js +28 -25
- package/dist-src/tiles/Tiles.js +3 -4
- package/dist-src/toolbar/ToolbarOverrides.js +8 -10
- package/dist-src/tooltip/TooltipOverrides.js +30 -33
- package/dist-src/typography/TypographyOverrides.js +2 -12
- package/dist-types/index.d.ts +381 -385
- package/dist-web/index.js +1289 -1373
- package/dist-web/index.js.map +1 -1
- package/package.json +39 -39
- 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 {
|
|
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
|
|
12
|
-
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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((
|
|
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
|
-
} =
|
|
46
|
-
tooltipProps = _objectWithoutProperties(
|
|
47
|
-
props = _objectWithoutProperties(
|
|
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:
|
|
49
|
+
render: _ref2 => {
|
|
52
50
|
var {
|
|
53
51
|
ref,
|
|
54
52
|
visibility
|
|
55
|
-
} =
|
|
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(
|
|
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
|
-
|
|
77
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
var props = {};
|
|
4
|
+
var overrides = {
|
|
5
|
+
root: {
|
|
6
|
+
color: Color.Dark400
|
|
7
|
+
},
|
|
8
|
+
page: {
|
|
9
|
+
'&:hover': {
|
|
10
|
+
backgroundColor: Color.Silver200
|
|
8
11
|
},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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 '@
|
|
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 '@
|
|
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 {
|
|
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.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
color: Color.
|
|
36
|
-
marginTop: theme.spacing(-0.625),
|
|
37
|
-
marginBottom: theme.spacing(-0.625)
|
|
38
|
+
colorPrimary: {
|
|
39
|
+
'&$checked$disabled': {
|
|
40
|
+
color: Color.Silver500
|
|
38
41
|
},
|
|
39
|
-
|
|
40
|
-
|
|
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,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 '@
|
|
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 {
|
|
6
|
-
import {
|
|
7
|
-
import { makeStyles } from '@
|
|
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.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
23
|
-
|
|
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
|
-
|
|
50
|
+
transform: "translateX(".concat(theme.spacing(2), "px)")
|
|
31
51
|
}
|
|
32
52
|
},
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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
|
};
|