@mui/material 5.8.3 → 5.8.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/Alert/Alert.js +19 -11
- package/AppBar/AppBar.js +22 -5
- package/Autocomplete/autocompleteClasses.d.ts +1 -1
- package/Avatar/Avatar.js +7 -4
- package/Badge/Badge.js +2 -2
- package/Button/buttonClasses.d.ts +24 -0
- package/Button/buttonClasses.js +1 -1
- package/CHANGELOG.md +224 -14
- package/Chip/Chip.js +31 -30
- package/Dialog/Dialog.js +11 -6
- package/FilledInput/FilledInput.js +28 -13
- package/Grid/Grid.d.ts +73 -52
- package/Grid/Grid.js +94 -40
- package/Grow/Grow.js +1 -2
- package/Hidden/withWidth.js +0 -2
- package/Input/Input.js +1 -1
- package/InputBase/InputBase.js +2 -2
- package/LinearProgress/LinearProgress.js +6 -2
- package/Link/Link.js +10 -17
- package/Link/getTextDecoration.d.ts +15 -0
- package/Link/getTextDecoration.js +29 -0
- package/Modal/Modal.d.ts +2 -0
- package/Modal/Modal.js +25 -8
- package/OutlinedInput/OutlinedInput.js +40 -10
- package/Popover/Popover.d.ts +7 -0
- package/Popover/index.js +1 -0
- package/README.md +6 -9
- package/Skeleton/Skeleton.js +8 -3
- package/Slider/Slider.d.ts +3 -1
- package/Slider/Slider.js +24 -22
- package/Snackbar/Snackbar.js +6 -20
- package/SnackbarContent/SnackbarContent.js +3 -3
- package/SpeedDialAction/SpeedDialAction.js +7 -7
- package/Stack/Stack.js +1 -1
- package/StepConnector/StepConnector.js +14 -11
- package/StepContent/StepContent.js +1 -1
- package/StepIcon/StepIcon.js +2 -1
- package/Switch/Switch.js +11 -11
- package/Tab/Tab.d.ts +0 -1
- package/TableCell/TableCell.js +5 -5
- package/Tabs/Tabs.js +16 -2
- package/Tooltip/Tooltip.js +1 -1
- package/index.js +1 -1
- package/legacy/Alert/Alert.js +19 -11
- package/legacy/AppBar/AppBar.js +23 -4
- package/legacy/Avatar/Avatar.js +7 -4
- package/legacy/Badge/Badge.js +2 -2
- package/legacy/Button/buttonClasses.js +1 -1
- package/legacy/Chip/Chip.js +31 -30
- package/legacy/Dialog/Dialog.js +11 -6
- package/legacy/FilledInput/FilledInput.js +28 -14
- package/legacy/Grid/Grid.js +97 -48
- package/legacy/Grow/Grow.js +1 -2
- package/legacy/Hidden/withWidth.js +0 -2
- package/legacy/Input/Input.js +1 -1
- package/legacy/InputBase/InputBase.js +2 -2
- package/legacy/LinearProgress/LinearProgress.js +6 -2
- package/legacy/Link/Link.js +10 -17
- package/legacy/Link/getTextDecoration.js +28 -0
- package/legacy/Modal/Modal.js +23 -7
- package/legacy/OutlinedInput/OutlinedInput.js +36 -9
- package/legacy/Popover/index.js +1 -0
- package/legacy/Skeleton/Skeleton.js +2 -2
- package/legacy/Slider/Slider.js +24 -22
- package/legacy/Snackbar/Snackbar.js +6 -21
- package/legacy/SnackbarContent/SnackbarContent.js +3 -3
- package/legacy/SpeedDialAction/SpeedDialAction.js +7 -7
- package/legacy/Stack/Stack.js +2 -1
- package/legacy/StepConnector/StepConnector.js +2 -1
- package/legacy/StepContent/StepContent.js +1 -1
- package/legacy/StepIcon/StepIcon.js +2 -1
- package/legacy/Switch/Switch.js +11 -11
- package/legacy/TableCell/TableCell.js +5 -5
- package/legacy/Tabs/Tabs.js +16 -2
- package/legacy/Tooltip/Tooltip.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/styles/CssVarsProvider.js +4 -2
- package/legacy/styles/experimental_extendTheme.js +153 -18
- package/modern/Alert/Alert.js +19 -11
- package/modern/AppBar/AppBar.js +22 -5
- package/modern/Avatar/Avatar.js +7 -4
- package/modern/Badge/Badge.js +2 -2
- package/modern/Button/buttonClasses.js +1 -1
- package/modern/Chip/Chip.js +31 -30
- package/modern/Dialog/Dialog.js +11 -6
- package/modern/FilledInput/FilledInput.js +27 -12
- package/modern/Grid/Grid.js +94 -40
- package/modern/Grow/Grow.js +1 -2
- package/modern/Hidden/withWidth.js +0 -2
- package/modern/Input/Input.js +1 -1
- package/modern/InputBase/InputBase.js +2 -2
- package/modern/LinearProgress/LinearProgress.js +6 -2
- package/modern/Link/Link.js +10 -17
- package/modern/Link/getTextDecoration.js +29 -0
- package/modern/Modal/Modal.js +24 -7
- package/modern/OutlinedInput/OutlinedInput.js +40 -10
- package/modern/Popover/index.js +1 -0
- package/modern/Skeleton/Skeleton.js +7 -2
- package/modern/Slider/Slider.js +24 -22
- package/modern/Snackbar/Snackbar.js +6 -20
- package/modern/SnackbarContent/SnackbarContent.js +3 -3
- package/modern/SpeedDialAction/SpeedDialAction.js +7 -7
- package/modern/Stack/Stack.js +1 -1
- package/modern/StepConnector/StepConnector.js +14 -11
- package/modern/StepContent/StepContent.js +1 -1
- package/modern/StepIcon/StepIcon.js +2 -1
- package/modern/Switch/Switch.js +11 -11
- package/modern/TableCell/TableCell.js +5 -5
- package/modern/Tabs/Tabs.js +16 -2
- package/modern/Tooltip/Tooltip.js +1 -1
- package/modern/index.js +1 -1
- package/modern/styles/CssVarsProvider.js +2 -2
- package/modern/styles/experimental_extendTheme.js +154 -18
- package/node/Alert/Alert.js +19 -11
- package/node/AppBar/AppBar.js +22 -5
- package/node/Avatar/Avatar.js +7 -4
- package/node/Badge/Badge.js +2 -2
- package/node/Button/buttonClasses.js +1 -1
- package/node/Chip/Chip.js +31 -30
- package/node/Dialog/Dialog.js +11 -6
- package/node/FilledInput/FilledInput.js +28 -13
- package/node/Grid/Grid.js +95 -40
- package/node/Grow/Grow.js +1 -2
- package/node/Hidden/withWidth.js +0 -3
- package/node/Input/Input.js +1 -1
- package/node/InputBase/InputBase.js +2 -2
- package/node/LinearProgress/LinearProgress.js +6 -2
- package/node/Link/Link.js +12 -20
- package/node/Link/getTextDecoration.js +39 -0
- package/node/Modal/Modal.js +25 -8
- package/node/OutlinedInput/OutlinedInput.js +38 -10
- package/node/Popover/index.js +13 -3
- package/node/Skeleton/Skeleton.js +7 -2
- package/node/Slider/Slider.js +24 -22
- package/node/Snackbar/Snackbar.js +6 -18
- package/node/SnackbarContent/SnackbarContent.js +3 -3
- package/node/SpeedDialAction/SpeedDialAction.js +7 -7
- package/node/Stack/Stack.js +1 -1
- package/node/StepConnector/StepConnector.js +14 -11
- package/node/StepContent/StepContent.js +1 -1
- package/node/StepIcon/StepIcon.js +2 -1
- package/node/Switch/Switch.js +11 -11
- package/node/TableCell/TableCell.js +5 -5
- package/node/Tabs/Tabs.js +16 -2
- package/node/Tooltip/Tooltip.js +1 -1
- package/node/index.js +1 -1
- package/node/styles/CssVarsProvider.js +6 -2
- package/node/styles/experimental_extendTheme.js +152 -17
- package/package.json +6 -7
- package/styles/CssVarsProvider.d.ts +10 -28
- package/styles/CssVarsProvider.js +6 -2
- package/styles/createPalette.d.ts +0 -26
- package/styles/experimental_extendTheme.d.ts +225 -37
- package/styles/experimental_extendTheme.js +154 -18
- package/styles/index.d.ts +24 -1
- package/themeCssVarsAugmentation/index.d.ts +61 -0
- package/umd/material-ui.development.js +1048 -541
- package/umd/material-ui.production.min.js +27 -22
package/legacy/Grow/Grow.js
CHANGED
|
@@ -26,10 +26,9 @@ var styles = {
|
|
|
26
26
|
/*
|
|
27
27
|
TODO v6: remove
|
|
28
28
|
Conditionally apply a workaround for the CSS transition bug in Safari 15.4 / WebKit browsers.
|
|
29
|
-
Remove this workaround once the WebKit bug fix is released.
|
|
30
29
|
*/
|
|
31
30
|
|
|
32
|
-
var isWebKit154 = typeof navigator !== 'undefined' && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)
|
|
31
|
+
var isWebKit154 = typeof navigator !== 'undefined' && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)4/i.test(navigator.userAgent);
|
|
33
32
|
/**
|
|
34
33
|
* The Grow transition is used by the [Tooltip](/material-ui/react-tooltip/) and
|
|
35
34
|
* [Popover](/material-ui/react-popover/) components.
|
|
@@ -4,7 +4,6 @@ import * as React from 'react';
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { getDisplayName } from '@mui/utils';
|
|
6
6
|
import { getThemeProps } from '@mui/system';
|
|
7
|
-
import hoistNonReactStatics from 'hoist-non-react-statics';
|
|
8
7
|
import useTheme from '../styles/useTheme';
|
|
9
8
|
import useEnhancedEffect from '../utils/useEnhancedEffect';
|
|
10
9
|
import useMediaQuery from '../useMediaQuery';
|
|
@@ -119,7 +118,6 @@ var withWidth = function withWidth() {
|
|
|
119
118
|
WithWidth.displayName = "WithWidth(".concat(getDisplayName(Component), ")");
|
|
120
119
|
}
|
|
121
120
|
|
|
122
|
-
hoistNonReactStatics(WithWidth, Component);
|
|
123
121
|
return WithWidth;
|
|
124
122
|
};
|
|
125
123
|
};
|
package/legacy/Input/Input.js
CHANGED
|
@@ -43,7 +43,7 @@ var InputRoot = styled(InputBaseRoot, {
|
|
|
43
43
|
var bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';
|
|
44
44
|
|
|
45
45
|
if (theme.vars) {
|
|
46
|
-
bottomLineColor = "rgba(".concat(theme.vars.palette.common.onBackgroundChannel, " / ").concat(theme.vars.opacity.
|
|
46
|
+
bottomLineColor = "rgba(".concat(theme.vars.palette.common.onBackgroundChannel, " / ").concat(theme.vars.opacity.inputUnderline, ")");
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
return _extends({
|
|
@@ -92,7 +92,7 @@ export var InputBaseComponent = styled('input', {
|
|
|
92
92
|
var placeholder = _extends({
|
|
93
93
|
color: 'currentColor'
|
|
94
94
|
}, theme.vars ? {
|
|
95
|
-
opacity: theme.vars.opacity.
|
|
95
|
+
opacity: theme.vars.opacity.inputPlaceholder
|
|
96
96
|
} : {
|
|
97
97
|
opacity: light ? 0.42 : 0.5
|
|
98
98
|
}, {
|
|
@@ -105,7 +105,7 @@ export var InputBaseComponent = styled('input', {
|
|
|
105
105
|
opacity: '0 !important'
|
|
106
106
|
};
|
|
107
107
|
var placeholderVisible = theme.vars ? {
|
|
108
|
-
opacity: theme.vars.opacity.
|
|
108
|
+
opacity: theme.vars.opacity.inputPlaceholder
|
|
109
109
|
} : {
|
|
110
110
|
opacity: light ? 0.42 : 0.5
|
|
111
111
|
};
|
|
@@ -40,6 +40,10 @@ var getColorShade = function getColorShade(theme, color) {
|
|
|
40
40
|
return 'currentColor';
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
if (theme.vars) {
|
|
44
|
+
return theme.vars.palette.LinearProgress["".concat(color, "Bg")];
|
|
45
|
+
}
|
|
46
|
+
|
|
43
47
|
return theme.palette.mode === 'light' ? lighten(theme.palette[color].main, 0.62) : darken(theme.palette[color].main, 0.5);
|
|
44
48
|
};
|
|
45
49
|
|
|
@@ -124,7 +128,7 @@ var LinearProgressBar1 = styled('span', {
|
|
|
124
128
|
top: 0,
|
|
125
129
|
transition: 'transform 0.2s linear',
|
|
126
130
|
transformOrigin: 'left',
|
|
127
|
-
backgroundColor: ownerState.color === 'inherit' ? 'currentColor' : theme.palette[ownerState.color].main
|
|
131
|
+
backgroundColor: ownerState.color === 'inherit' ? 'currentColor' : (theme.vars || theme).palette[ownerState.color].main
|
|
128
132
|
}, ownerState.variant === 'determinate' && {
|
|
129
133
|
transition: "transform .".concat(TRANSITION_DURATION, "s linear")
|
|
130
134
|
}, ownerState.variant === 'buffer' && {
|
|
@@ -154,7 +158,7 @@ var LinearProgressBar2 = styled('span', {
|
|
|
154
158
|
transition: 'transform 0.2s linear',
|
|
155
159
|
transformOrigin: 'left'
|
|
156
160
|
}, ownerState.variant !== 'buffer' && {
|
|
157
|
-
backgroundColor: ownerState.color === 'inherit' ? 'currentColor' : theme.palette[ownerState.color].main
|
|
161
|
+
backgroundColor: ownerState.color === 'inherit' ? 'currentColor' : (theme.vars || theme).palette[ownerState.color].main
|
|
158
162
|
}, ownerState.color === 'inherit' && {
|
|
159
163
|
opacity: 0.3
|
|
160
164
|
}, ownerState.variant === 'buffer' && {
|
package/legacy/Link/Link.js
CHANGED
|
@@ -7,7 +7,6 @@ import PropTypes from 'prop-types';
|
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import { elementTypeAcceptingRef } from '@mui/utils';
|
|
9
9
|
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
10
|
-
import { alpha, getPath } from '@mui/system';
|
|
11
10
|
import capitalize from '../utils/capitalize';
|
|
12
11
|
import styled from '../styles/styled';
|
|
13
12
|
import useThemeProps from '../styles/useThemeProps';
|
|
@@ -15,18 +14,8 @@ import useIsFocusVisible from '../utils/useIsFocusVisible';
|
|
|
15
14
|
import useForkRef from '../utils/useForkRef';
|
|
16
15
|
import Typography from '../Typography';
|
|
17
16
|
import linkClasses, { getLinkUtilityClass } from './linkClasses';
|
|
17
|
+
import getTextDecoration, { colorTransformations } from './getTextDecoration';
|
|
18
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
-
var colorTransformations = {
|
|
20
|
-
primary: 'primary.main',
|
|
21
|
-
textPrimary: 'text.primary',
|
|
22
|
-
secondary: 'secondary.main',
|
|
23
|
-
textSecondary: 'text.secondary',
|
|
24
|
-
error: 'error.main'
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
var transformDeprecatedColors = function transformDeprecatedColors(color) {
|
|
28
|
-
return colorTransformations[color] || color;
|
|
29
|
-
};
|
|
30
19
|
|
|
31
20
|
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
32
21
|
var classes = ownerState.classes,
|
|
@@ -49,7 +38,6 @@ var LinkRoot = styled(Typography, {
|
|
|
49
38
|
})(function (_ref) {
|
|
50
39
|
var theme = _ref.theme,
|
|
51
40
|
ownerState = _ref.ownerState;
|
|
52
|
-
var color = getPath(theme, "palette.".concat(transformDeprecatedColors(ownerState.color))) || ownerState.color;
|
|
53
41
|
return _extends({}, ownerState.underline === 'none' && {
|
|
54
42
|
textDecoration: 'none'
|
|
55
43
|
}, ownerState.underline === 'hover' && {
|
|
@@ -57,13 +45,18 @@ var LinkRoot = styled(Typography, {
|
|
|
57
45
|
'&:hover': {
|
|
58
46
|
textDecoration: 'underline'
|
|
59
47
|
}
|
|
60
|
-
}, ownerState.underline === 'always' && {
|
|
61
|
-
textDecoration: 'underline'
|
|
62
|
-
|
|
48
|
+
}, ownerState.underline === 'always' && _extends({
|
|
49
|
+
textDecoration: 'underline'
|
|
50
|
+
}, ownerState.color !== 'inherit' && {
|
|
51
|
+
textDecorationColor: getTextDecoration({
|
|
52
|
+
theme: theme,
|
|
53
|
+
ownerState: ownerState
|
|
54
|
+
})
|
|
55
|
+
}, {
|
|
63
56
|
'&:hover': {
|
|
64
57
|
textDecorationColor: 'inherit'
|
|
65
58
|
}
|
|
66
|
-
}, ownerState.component === 'button' && _defineProperty({
|
|
59
|
+
}), ownerState.component === 'button' && _defineProperty({
|
|
67
60
|
position: 'relative',
|
|
68
61
|
WebkitTapHighlightColor: 'transparent',
|
|
69
62
|
backgroundColor: 'transparent',
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { alpha, getPath } from '@mui/system';
|
|
2
|
+
export var colorTransformations = {
|
|
3
|
+
primary: 'primary.main',
|
|
4
|
+
textPrimary: 'text.primary',
|
|
5
|
+
secondary: 'secondary.main',
|
|
6
|
+
textSecondary: 'text.secondary',
|
|
7
|
+
error: 'error.main'
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
var transformDeprecatedColors = function transformDeprecatedColors(color) {
|
|
11
|
+
return colorTransformations[color] || color;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
var getTextDecoration = function getTextDecoration(_ref) {
|
|
15
|
+
var theme = _ref.theme,
|
|
16
|
+
ownerState = _ref.ownerState;
|
|
17
|
+
var transformedColor = transformDeprecatedColors(ownerState.color);
|
|
18
|
+
var color = getPath(theme, "palette.".concat(transformedColor), false) || ownerState.color;
|
|
19
|
+
var channelColor = getPath(theme, "palette.".concat(transformedColor, "Channel"));
|
|
20
|
+
|
|
21
|
+
if ('vars' in theme && channelColor) {
|
|
22
|
+
return "rgba(".concat(channelColor, " / 0.4)");
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return alpha(color, 0.4);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default getTextDecoration;
|
package/legacy/Modal/Modal.js
CHANGED
|
@@ -60,7 +60,7 @@ var ModalBackdrop = styled(Backdrop, {
|
|
|
60
60
|
*/
|
|
61
61
|
|
|
62
62
|
var Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
63
|
-
var
|
|
63
|
+
var _ref2, _components$Root;
|
|
64
64
|
|
|
65
65
|
var props = useThemeProps({
|
|
66
66
|
name: 'MuiModal',
|
|
@@ -69,9 +69,11 @@ var Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
|
69
69
|
|
|
70
70
|
var _props$BackdropCompon = props.BackdropComponent,
|
|
71
71
|
BackdropComponent = _props$BackdropCompon === void 0 ? ModalBackdrop : _props$BackdropCompon,
|
|
72
|
+
BackdropProps = props.BackdropProps,
|
|
72
73
|
_props$closeAfterTran = props.closeAfterTransition,
|
|
73
74
|
closeAfterTransition = _props$closeAfterTran === void 0 ? false : _props$closeAfterTran,
|
|
74
75
|
children = props.children,
|
|
76
|
+
component = props.component,
|
|
75
77
|
_props$components = props.components,
|
|
76
78
|
components = _props$components === void 0 ? {} : _props$components,
|
|
77
79
|
_props$componentsProp = props.componentsProps,
|
|
@@ -92,7 +94,8 @@ var Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
|
92
94
|
hideBackdrop = _props$hideBackdrop === void 0 ? false : _props$hideBackdrop,
|
|
93
95
|
_props$keepMounted = props.keepMounted,
|
|
94
96
|
keepMounted = _props$keepMounted === void 0 ? false : _props$keepMounted,
|
|
95
|
-
|
|
97
|
+
theme = props.theme,
|
|
98
|
+
other = _objectWithoutProperties(props, ["BackdropComponent", "BackdropProps", "closeAfterTransition", "children", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "theme"]);
|
|
96
99
|
|
|
97
100
|
var _React$useState = React.useState(true),
|
|
98
101
|
exited = _React$useState[0],
|
|
@@ -115,16 +118,19 @@ var Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
|
115
118
|
});
|
|
116
119
|
|
|
117
120
|
var classes = extendUtilityClasses(ownerState);
|
|
121
|
+
var Root = (_ref2 = (_components$Root = components.Root) != null ? _components$Root : component) != null ? _ref2 : ModalRoot;
|
|
118
122
|
return /*#__PURE__*/_jsx(ModalUnstyled, _extends({
|
|
119
123
|
components: _extends({
|
|
120
|
-
Root:
|
|
124
|
+
Root: Root,
|
|
125
|
+
Backdrop: BackdropComponent
|
|
121
126
|
}, components),
|
|
122
127
|
componentsProps: {
|
|
123
|
-
root: _extends({}, componentsProps.root,
|
|
124
|
-
|
|
125
|
-
|
|
128
|
+
root: _extends({}, componentsProps.root, !isHostComponent(Root) && {
|
|
129
|
+
as: component,
|
|
130
|
+
theme: theme
|
|
131
|
+
}),
|
|
132
|
+
backdrop: _extends({}, BackdropProps, componentsProps.backdrop)
|
|
126
133
|
},
|
|
127
|
-
BackdropComponent: BackdropComponent,
|
|
128
134
|
onTransitionEnter: function onTransitionEnter() {
|
|
129
135
|
return setExited(false);
|
|
130
136
|
},
|
|
@@ -148,6 +154,7 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
|
|
|
148
154
|
|
|
149
155
|
/**
|
|
150
156
|
* A backdrop component. This prop enables custom backdrop rendering.
|
|
157
|
+
* @deprecated Use `components.Backdrop` instead.
|
|
151
158
|
* @default styled(Backdrop, {
|
|
152
159
|
* name: 'MuiModal',
|
|
153
160
|
* slot: 'Backdrop',
|
|
@@ -162,6 +169,7 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
|
|
|
162
169
|
|
|
163
170
|
/**
|
|
164
171
|
* Props applied to the [`Backdrop`](/material-ui/api/backdrop/) element.
|
|
172
|
+
* @deprecated Use `componentsProps.backdrop` instead.
|
|
165
173
|
*/
|
|
166
174
|
BackdropProps: PropTypes.object,
|
|
167
175
|
|
|
@@ -181,12 +189,19 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
|
|
|
181
189
|
*/
|
|
182
190
|
closeAfterTransition: PropTypes.bool,
|
|
183
191
|
|
|
192
|
+
/**
|
|
193
|
+
* The component used for the root node.
|
|
194
|
+
* Either a string to use a HTML element or a component.
|
|
195
|
+
*/
|
|
196
|
+
component: PropTypes.elementType,
|
|
197
|
+
|
|
184
198
|
/**
|
|
185
199
|
* The components used for each slot inside the Modal.
|
|
186
200
|
* Either a string to use a HTML element or a component.
|
|
187
201
|
* @default {}
|
|
188
202
|
*/
|
|
189
203
|
components: PropTypes.shape({
|
|
204
|
+
Backdrop: PropTypes.elementType,
|
|
190
205
|
Root: PropTypes.elementType
|
|
191
206
|
}),
|
|
192
207
|
|
|
@@ -195,6 +210,7 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
|
|
|
195
210
|
* @default {}
|
|
196
211
|
*/
|
|
197
212
|
componentsProps: PropTypes.shape({
|
|
213
|
+
backdrop: PropTypes.object,
|
|
198
214
|
root: PropTypes.object
|
|
199
215
|
}),
|
|
200
216
|
|
|
@@ -41,18 +41,18 @@ var OutlinedInputRoot = styled(InputBaseRoot, {
|
|
|
41
41
|
var borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';
|
|
42
42
|
return _extends((_extends2 = {
|
|
43
43
|
position: 'relative',
|
|
44
|
-
borderRadius: theme.shape.borderRadius
|
|
44
|
+
borderRadius: (theme.vars || theme).shape.borderRadius
|
|
45
45
|
}, _defineProperty(_extends2, "&:hover .".concat(outlinedInputClasses.notchedOutline), {
|
|
46
|
-
borderColor: theme.palette.text.primary
|
|
46
|
+
borderColor: (theme.vars || theme).palette.text.primary
|
|
47
47
|
}), _defineProperty(_extends2, '@media (hover: none)', _defineProperty({}, "&:hover .".concat(outlinedInputClasses.notchedOutline), {
|
|
48
|
-
borderColor: borderColor
|
|
48
|
+
borderColor: theme.vars ? "rgba(".concat(theme.vars.palette.common.onBackgroundChannel, " / 0.23)") : borderColor
|
|
49
49
|
})), _defineProperty(_extends2, "&.".concat(outlinedInputClasses.focused, " .").concat(outlinedInputClasses.notchedOutline), {
|
|
50
|
-
borderColor: theme.palette[ownerState.color].main,
|
|
50
|
+
borderColor: (theme.vars || theme).palette[ownerState.color].main,
|
|
51
51
|
borderWidth: 2
|
|
52
52
|
}), _defineProperty(_extends2, "&.".concat(outlinedInputClasses.error, " .").concat(outlinedInputClasses.notchedOutline), {
|
|
53
|
-
borderColor: theme.palette.error.main
|
|
53
|
+
borderColor: (theme.vars || theme).palette.error.main
|
|
54
54
|
}), _defineProperty(_extends2, "&.".concat(outlinedInputClasses.disabled, " .").concat(outlinedInputClasses.notchedOutline), {
|
|
55
|
-
borderColor: theme.palette.action.disabled
|
|
55
|
+
borderColor: (theme.vars || theme).palette.action.disabled
|
|
56
56
|
}), _extends2), ownerState.startAdornment && {
|
|
57
57
|
paddingLeft: 14
|
|
58
58
|
}, ownerState.endAdornment && {
|
|
@@ -71,8 +71,9 @@ var NotchedOutlineRoot = styled(NotchedOutline, {
|
|
|
71
71
|
}
|
|
72
72
|
})(function (_ref2) {
|
|
73
73
|
var theme = _ref2.theme;
|
|
74
|
+
var borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';
|
|
74
75
|
return {
|
|
75
|
-
borderColor: theme.
|
|
76
|
+
borderColor: theme.vars ? "rgba(".concat(theme.vars.palette.common.onBackgroundChannel, " / 0.23)") : borderColor
|
|
76
77
|
};
|
|
77
78
|
});
|
|
78
79
|
var OutlinedInputInput = styled(InputBaseInput, {
|
|
@@ -83,14 +84,25 @@ var OutlinedInputInput = styled(InputBaseInput, {
|
|
|
83
84
|
var theme = _ref3.theme,
|
|
84
85
|
ownerState = _ref3.ownerState;
|
|
85
86
|
return _extends({
|
|
86
|
-
padding: '16.5px 14px'
|
|
87
|
+
padding: '16.5px 14px'
|
|
88
|
+
}, !theme.vars && {
|
|
87
89
|
'&:-webkit-autofill': {
|
|
88
90
|
WebkitBoxShadow: theme.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset',
|
|
89
91
|
WebkitTextFillColor: theme.palette.mode === 'light' ? null : '#fff',
|
|
90
92
|
caretColor: theme.palette.mode === 'light' ? null : '#fff',
|
|
91
93
|
borderRadius: 'inherit'
|
|
92
94
|
}
|
|
93
|
-
},
|
|
95
|
+
}, theme.vars && _defineProperty({
|
|
96
|
+
'&:-webkit-autofill': {
|
|
97
|
+
borderRadius: 'inherit'
|
|
98
|
+
}
|
|
99
|
+
}, theme.getColorSchemeSelector('dark'), {
|
|
100
|
+
'&:-webkit-autofill': {
|
|
101
|
+
WebkitBoxShadow: '0 0 0 100px #266798 inset',
|
|
102
|
+
WebkitTextFillColor: '#fff',
|
|
103
|
+
caretColor: '#fff'
|
|
104
|
+
}
|
|
105
|
+
}), ownerState.size === 'small' && {
|
|
94
106
|
padding: '8.5px 14px'
|
|
95
107
|
}, ownerState.multiline && {
|
|
96
108
|
padding: 0
|
|
@@ -129,6 +141,20 @@ var OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inProps
|
|
|
129
141
|
muiFormControl: muiFormControl,
|
|
130
142
|
states: ['required']
|
|
131
143
|
});
|
|
144
|
+
|
|
145
|
+
var ownerState = _extends({}, props, {
|
|
146
|
+
color: fcs.color || 'primary',
|
|
147
|
+
disabled: fcs.disabled,
|
|
148
|
+
error: fcs.error,
|
|
149
|
+
focused: fcs.focused,
|
|
150
|
+
formControl: muiFormControl,
|
|
151
|
+
fullWidth: fullWidth,
|
|
152
|
+
hiddenLabel: fcs.hiddenLabel,
|
|
153
|
+
multiline: multiline,
|
|
154
|
+
size: fcs.size,
|
|
155
|
+
type: type
|
|
156
|
+
});
|
|
157
|
+
|
|
132
158
|
return /*#__PURE__*/_jsx(InputBase, _extends({
|
|
133
159
|
components: _extends({
|
|
134
160
|
Root: OutlinedInputRoot,
|
|
@@ -136,6 +162,7 @@ var OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inProps
|
|
|
136
162
|
}, components),
|
|
137
163
|
renderSuffix: function renderSuffix(state) {
|
|
138
164
|
return /*#__PURE__*/_jsx(NotchedOutlineRoot, {
|
|
165
|
+
ownerState: ownerState,
|
|
139
166
|
className: classes.notchedOutline,
|
|
140
167
|
label: label != null && label !== '' && fcs.required ? _React$Fragment || (_React$Fragment = /*#__PURE__*/_jsxs(React.Fragment, {
|
|
141
168
|
children: [label, "\xA0", '*']
|
package/legacy/Popover/index.js
CHANGED
|
@@ -45,7 +45,7 @@ var SkeletonRoot = styled('span', {
|
|
|
45
45
|
return _extends({
|
|
46
46
|
display: 'block',
|
|
47
47
|
// Create a "on paper" color with sufficient contrast retaining the color
|
|
48
|
-
backgroundColor: alpha(theme.palette.text.primary, theme.palette.mode === 'light' ? 0.11 : 0.13),
|
|
48
|
+
backgroundColor: theme.vars ? theme.vars.palette.Skeleton.bg : alpha(theme.palette.text.primary, theme.palette.mode === 'light' ? 0.11 : 0.13),
|
|
49
49
|
height: '1.2em'
|
|
50
50
|
}, ownerState.variant === 'text' && {
|
|
51
51
|
marginTop: 0,
|
|
@@ -74,7 +74,7 @@ var SkeletonRoot = styled('span', {
|
|
|
74
74
|
}, function (_ref3) {
|
|
75
75
|
var ownerState = _ref3.ownerState,
|
|
76
76
|
theme = _ref3.theme;
|
|
77
|
-
return ownerState.animation === 'wave' && css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n\n /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n\n &::after {\n animation: ", " 1.6s linear 0.5s infinite;\n background: linear-gradient(90deg
|
|
77
|
+
return ownerState.animation === 'wave' && css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n\n /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n\n &::after {\n animation: ", " 1.6s linear 0.5s infinite;\n background: linear-gradient(\n 90deg,\n transparent,\n ", ",\n transparent\n );\n content: '';\n position: absolute;\n transform: translateX(-100%); /* Avoid flash during server-side hydration */\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n }\n "])), waveKeyframe, (theme.vars || theme).palette.action.hover);
|
|
78
78
|
});
|
|
79
79
|
var Skeleton = /*#__PURE__*/React.forwardRef(function Skeleton(inProps, ref) {
|
|
80
80
|
var props = useThemeProps({
|
package/legacy/Slider/Slider.js
CHANGED
|
@@ -34,7 +34,7 @@ var SliderRoot = styled('span', {
|
|
|
34
34
|
position: 'relative',
|
|
35
35
|
cursor: 'pointer',
|
|
36
36
|
touchAction: 'none',
|
|
37
|
-
color: theme.palette[ownerState.color].main,
|
|
37
|
+
color: (theme.vars || theme).palette[ownerState.color].main,
|
|
38
38
|
WebkitTapHighlightColor: 'transparent'
|
|
39
39
|
}, ownerState.orientation === 'horizontal' && _extends({
|
|
40
40
|
height: 4,
|
|
@@ -69,7 +69,7 @@ var SliderRoot = styled('span', {
|
|
|
69
69
|
}, _defineProperty(_extends2, "&.".concat(sliderClasses.disabled), {
|
|
70
70
|
pointerEvents: 'none',
|
|
71
71
|
cursor: 'default',
|
|
72
|
-
color: theme.palette.grey[400]
|
|
72
|
+
color: (theme.vars || theme).palette.grey[400]
|
|
73
73
|
}), _defineProperty(_extends2, "&.".concat(sliderClasses.dragging), _defineProperty({}, "& .".concat(sliderClasses.thumb, ", & .").concat(sliderClasses.track), {
|
|
74
74
|
transition: 'none'
|
|
75
75
|
})), _extends2));
|
|
@@ -163,8 +163,8 @@ var SliderTrack = styled('span', {
|
|
|
163
163
|
}, ownerState.track === false && {
|
|
164
164
|
display: 'none'
|
|
165
165
|
}, ownerState.track === 'inverted' && {
|
|
166
|
-
backgroundColor: color,
|
|
167
|
-
borderColor: color
|
|
166
|
+
backgroundColor: theme.vars ? theme.vars.palette.Slider["".concat(ownerState.color, "Track")] : color,
|
|
167
|
+
borderColor: theme.vars ? theme.vars.palette.Slider["".concat(ownerState.color, "Track")] : color
|
|
168
168
|
});
|
|
169
169
|
});
|
|
170
170
|
process.env.NODE_ENV !== "production" ? SliderTrack.propTypes
|
|
@@ -223,7 +223,7 @@ var SliderThumb = styled('span', {
|
|
|
223
223
|
borderRadius: 'inherit',
|
|
224
224
|
width: '100%',
|
|
225
225
|
height: '100%',
|
|
226
|
-
boxShadow: theme.shadows[2]
|
|
226
|
+
boxShadow: (theme.vars || theme).shadows[2]
|
|
227
227
|
}, ownerState.size === 'small' && {
|
|
228
228
|
boxShadow: 'none'
|
|
229
229
|
}),
|
|
@@ -239,12 +239,12 @@ var SliderThumb = styled('span', {
|
|
|
239
239
|
transform: 'translate(-50%, -50%)'
|
|
240
240
|
}
|
|
241
241
|
}, _defineProperty(_extends3, "&:hover, &.".concat(sliderClasses.focusVisible), {
|
|
242
|
-
boxShadow: "0px 0px 0px 8px ".concat(alpha(theme.palette[ownerState.color].main, 0.16)),
|
|
242
|
+
boxShadow: "0px 0px 0px 8px ".concat(theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / 0.16)") : alpha(theme.palette[ownerState.color].main, 0.16)),
|
|
243
243
|
'@media (hover: none)': {
|
|
244
244
|
boxShadow: 'none'
|
|
245
245
|
}
|
|
246
246
|
}), _defineProperty(_extends3, "&.".concat(sliderClasses.active), {
|
|
247
|
-
boxShadow: "0px 0px 0px 14px ".concat(alpha(theme.palette[ownerState.color].main, 0.16))
|
|
247
|
+
boxShadow: "0px 0px 0px 14px ".concat(theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / 0.16)") : alpha(theme.palette[ownerState.color].main, 0.16))
|
|
248
248
|
}), _defineProperty(_extends3, "&.".concat(sliderClasses.disabled), {
|
|
249
249
|
'&:hover': {
|
|
250
250
|
boxShadow: 'none'
|
|
@@ -286,9 +286,9 @@ var SliderValueLabel = styled(SliderValueLabelUnstyled, {
|
|
|
286
286
|
transformOrigin: 'bottom center',
|
|
287
287
|
transform: 'translateY(-100%) scale(0)',
|
|
288
288
|
position: 'absolute',
|
|
289
|
-
backgroundColor: theme.palette.grey[600],
|
|
289
|
+
backgroundColor: (theme.vars || theme).palette.grey[600],
|
|
290
290
|
borderRadius: 2,
|
|
291
|
-
color: theme.palette.common.white,
|
|
291
|
+
color: (theme.vars || theme).palette.common.white,
|
|
292
292
|
display: 'flex',
|
|
293
293
|
alignItems: 'center',
|
|
294
294
|
justifyContent: 'center',
|
|
@@ -363,7 +363,7 @@ var SliderMark = styled('span', {
|
|
|
363
363
|
left: '50%',
|
|
364
364
|
transform: 'translate(-50%, 1px)'
|
|
365
365
|
}, markActive && {
|
|
366
|
-
backgroundColor: theme.palette.background.paper,
|
|
366
|
+
backgroundColor: (theme.vars || theme).palette.background.paper,
|
|
367
367
|
opacity: 0.8
|
|
368
368
|
});
|
|
369
369
|
});
|
|
@@ -395,7 +395,7 @@ var SliderMarkLabel = styled('span', {
|
|
|
395
395
|
ownerState = _ref7.ownerState,
|
|
396
396
|
markLabelActive = _ref7.markLabelActive;
|
|
397
397
|
return _extends({}, theme.typography.body2, {
|
|
398
|
-
color: theme.palette.text.secondary,
|
|
398
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
399
399
|
position: 'absolute',
|
|
400
400
|
whiteSpace: 'nowrap'
|
|
401
401
|
}, ownerState.orientation === 'horizontal' && {
|
|
@@ -411,7 +411,7 @@ var SliderMarkLabel = styled('span', {
|
|
|
411
411
|
left: 44
|
|
412
412
|
}
|
|
413
413
|
}, markLabelActive && {
|
|
414
|
-
color: theme.palette.text.primary
|
|
414
|
+
color: (theme.vars || theme).palette.text.primary
|
|
415
415
|
});
|
|
416
416
|
});
|
|
417
417
|
process.env.NODE_ENV !== "production" ? SliderMarkLabel.propTypes
|
|
@@ -590,22 +590,24 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes
|
|
|
590
590
|
* @default {}
|
|
591
591
|
*/
|
|
592
592
|
componentsProps: PropTypes.shape({
|
|
593
|
-
input: PropTypes.object,
|
|
594
|
-
mark: PropTypes.object,
|
|
595
|
-
markLabel: PropTypes.object,
|
|
596
|
-
rail: PropTypes.object,
|
|
597
|
-
root: PropTypes.object,
|
|
598
|
-
thumb: PropTypes.object,
|
|
599
|
-
track: PropTypes.object,
|
|
600
|
-
valueLabel: PropTypes.shape({
|
|
593
|
+
input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
594
|
+
mark: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
595
|
+
markLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
596
|
+
rail: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
597
|
+
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
598
|
+
thumb: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
599
|
+
track: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
600
|
+
valueLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
601
|
+
children: PropTypes.element,
|
|
601
602
|
className: PropTypes.string,
|
|
602
603
|
components: PropTypes.shape({
|
|
603
604
|
Root: PropTypes.elementType
|
|
604
605
|
}),
|
|
606
|
+
open: PropTypes.bool,
|
|
605
607
|
style: PropTypes.object,
|
|
606
|
-
value: PropTypes.
|
|
608
|
+
value: PropTypes.number,
|
|
607
609
|
valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on'])
|
|
608
|
-
})
|
|
610
|
+
})])
|
|
609
611
|
}),
|
|
610
612
|
|
|
611
613
|
/**
|
|
@@ -35,17 +35,11 @@ var SnackbarRoot = styled('div', {
|
|
|
35
35
|
})(function (_ref) {
|
|
36
36
|
var theme = _ref.theme,
|
|
37
37
|
ownerState = _ref.ownerState;
|
|
38
|
-
|
|
39
|
-
var center = _extends({}, !ownerState.isRtl && {
|
|
38
|
+
var center = {
|
|
40
39
|
left: '50%',
|
|
41
40
|
right: 'auto',
|
|
42
41
|
transform: 'translateX(-50%)'
|
|
43
|
-
}
|
|
44
|
-
right: '50%',
|
|
45
|
-
left: 'auto',
|
|
46
|
-
transform: 'translateX(50%)'
|
|
47
|
-
});
|
|
48
|
-
|
|
42
|
+
};
|
|
49
43
|
return _extends({
|
|
50
44
|
zIndex: (theme.vars || theme).zIndex.snackbar,
|
|
51
45
|
position: 'fixed',
|
|
@@ -66,19 +60,13 @@ var SnackbarRoot = styled('div', {
|
|
|
66
60
|
top: 24
|
|
67
61
|
} : {
|
|
68
62
|
bottom: 24
|
|
69
|
-
}, ownerState.anchorOrigin.horizontal === 'center' && center, ownerState.anchorOrigin.horizontal === 'left' &&
|
|
63
|
+
}, ownerState.anchorOrigin.horizontal === 'center' && center, ownerState.anchorOrigin.horizontal === 'left' && {
|
|
70
64
|
left: 24,
|
|
71
65
|
right: 'auto'
|
|
72
|
-
}, ownerState.
|
|
73
|
-
right: 24,
|
|
74
|
-
left: 'auto'
|
|
75
|
-
}), ownerState.anchorOrigin.horizontal === 'right' && _extends({}, !ownerState.isRtl && {
|
|
66
|
+
}, ownerState.anchorOrigin.horizontal === 'right' && {
|
|
76
67
|
right: 24,
|
|
77
68
|
left: 'auto'
|
|
78
|
-
}
|
|
79
|
-
left: 24,
|
|
80
|
-
right: 'auto'
|
|
81
|
-
}))));
|
|
69
|
+
})));
|
|
82
70
|
});
|
|
83
71
|
var Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
|
|
84
72
|
var props = useThemeProps({
|
|
@@ -126,14 +114,11 @@ var Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
|
|
|
126
114
|
TransitionProps = _objectWithoutProperties(_props$TransitionProp, ["onEnter", "onExited"]),
|
|
127
115
|
other = _objectWithoutProperties(props, ["action", "anchorOrigin", "autoHideDuration", "children", "className", "ClickAwayListenerProps", "ContentProps", "disableWindowBlurListener", "message", "onBlur", "onClose", "onFocus", "onMouseEnter", "onMouseLeave", "open", "resumeHideDuration", "TransitionComponent", "transitionDuration", "TransitionProps"]);
|
|
128
116
|
|
|
129
|
-
var isRtl = theme.direction === 'rtl';
|
|
130
|
-
|
|
131
117
|
var ownerState = _extends({}, props, {
|
|
132
118
|
anchorOrigin: {
|
|
133
119
|
vertical: vertical,
|
|
134
120
|
horizontal: horizontal
|
|
135
|
-
}
|
|
136
|
-
isRtl: isRtl
|
|
121
|
+
}
|
|
137
122
|
});
|
|
138
123
|
|
|
139
124
|
var classes = useUtilityClasses(ownerState);
|
|
@@ -34,13 +34,13 @@ var SnackbarContentRoot = styled(Paper, {
|
|
|
34
34
|
var emphasis = theme.palette.mode === 'light' ? 0.8 : 0.98;
|
|
35
35
|
var backgroundColor = emphasize(theme.palette.background.default, emphasis);
|
|
36
36
|
return _extends({}, theme.typography.body2, _defineProperty({
|
|
37
|
-
color: theme.palette.getContrastText(backgroundColor),
|
|
38
|
-
backgroundColor: backgroundColor,
|
|
37
|
+
color: theme.vars ? theme.vars.palette.text.primary : theme.palette.getContrastText(backgroundColor),
|
|
38
|
+
backgroundColor: theme.vars ? theme.vars.palette.SnackbarContent.bg : backgroundColor,
|
|
39
39
|
display: 'flex',
|
|
40
40
|
alignItems: 'center',
|
|
41
41
|
flexWrap: 'wrap',
|
|
42
42
|
padding: '6px 16px',
|
|
43
|
-
borderRadius: theme.shape.borderRadius,
|
|
43
|
+
borderRadius: (theme.vars || theme).shape.borderRadius,
|
|
44
44
|
flexGrow: 1
|
|
45
45
|
}, theme.breakpoints.up('sm'), {
|
|
46
46
|
flexGrow: 'initial',
|
|
@@ -41,10 +41,10 @@ var SpeedDialActionFab = styled(Fab, {
|
|
|
41
41
|
ownerState = _ref.ownerState;
|
|
42
42
|
return _extends({
|
|
43
43
|
margin: 8,
|
|
44
|
-
color: theme.palette.text.secondary,
|
|
45
|
-
backgroundColor: theme.palette.background.paper,
|
|
44
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
45
|
+
backgroundColor: (theme.vars || theme).palette.background.paper,
|
|
46
46
|
'&:hover': {
|
|
47
|
-
backgroundColor: emphasize(theme.palette.background.paper, 0.15)
|
|
47
|
+
backgroundColor: theme.vars ? theme.vars.palette.SpeedDialAction.fabHoverBg : emphasize(theme.palette.background.paper, 0.15)
|
|
48
48
|
},
|
|
49
49
|
transition: "".concat(theme.transitions.create('transform', {
|
|
50
50
|
duration: theme.transitions.duration.shorter
|
|
@@ -98,10 +98,10 @@ var SpeedDialActionStaticTooltipLabel = styled('span', {
|
|
|
98
98
|
return _extends({
|
|
99
99
|
position: 'absolute'
|
|
100
100
|
}, theme.typography.body1, {
|
|
101
|
-
backgroundColor: theme.palette.background.paper,
|
|
102
|
-
borderRadius: theme.shape.borderRadius,
|
|
103
|
-
boxShadow: theme.shadows[1],
|
|
104
|
-
color: theme.palette.text.secondary,
|
|
101
|
+
backgroundColor: (theme.vars || theme).palette.background.paper,
|
|
102
|
+
borderRadius: (theme.vars || theme).shape.borderRadius,
|
|
103
|
+
boxShadow: (theme.vars || theme).shadows[1],
|
|
104
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
105
105
|
padding: '4px 16px',
|
|
106
106
|
wordBreak: 'keep-all'
|
|
107
107
|
});
|
package/legacy/Stack/Stack.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
3
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
5
|
import * as React from 'react';
|
|
5
6
|
import PropTypes from 'prop-types';
|
|
@@ -61,7 +62,7 @@ export var style = function style(_ref) {
|
|
|
61
62
|
if (ownerState.spacing) {
|
|
62
63
|
var transformer = createUnarySpacing(theme);
|
|
63
64
|
var base = Object.keys(theme.breakpoints.values).reduce(function (acc, breakpoint) {
|
|
64
|
-
if (ownerState.spacing[breakpoint] != null || ownerState.direction[breakpoint] != null) {
|
|
65
|
+
if (_typeof(ownerState.spacing) === 'object' && ownerState.spacing[breakpoint] != null || _typeof(ownerState.direction) === 'object' && ownerState.direction[breakpoint] != null) {
|
|
65
66
|
acc[breakpoint] = true;
|
|
66
67
|
}
|
|
67
68
|
|
|
@@ -57,9 +57,10 @@ var StepConnectorLine = styled('span', {
|
|
|
57
57
|
})(function (_ref2) {
|
|
58
58
|
var ownerState = _ref2.ownerState,
|
|
59
59
|
theme = _ref2.theme;
|
|
60
|
+
var borderColor = theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600];
|
|
60
61
|
return _extends({
|
|
61
62
|
display: 'block',
|
|
62
|
-
borderColor: theme.
|
|
63
|
+
borderColor: theme.vars ? theme.vars.palette.StepConnector.border : borderColor
|
|
63
64
|
}, ownerState.orientation === 'horizontal' && {
|
|
64
65
|
borderTopStyle: 'solid',
|
|
65
66
|
borderTopWidth: 1
|