@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.
Files changed (158) hide show
  1. package/Alert/Alert.js +19 -11
  2. package/AppBar/AppBar.js +22 -5
  3. package/Autocomplete/autocompleteClasses.d.ts +1 -1
  4. package/Avatar/Avatar.js +7 -4
  5. package/Badge/Badge.js +2 -2
  6. package/Button/buttonClasses.d.ts +24 -0
  7. package/Button/buttonClasses.js +1 -1
  8. package/CHANGELOG.md +224 -14
  9. package/Chip/Chip.js +31 -30
  10. package/Dialog/Dialog.js +11 -6
  11. package/FilledInput/FilledInput.js +28 -13
  12. package/Grid/Grid.d.ts +73 -52
  13. package/Grid/Grid.js +94 -40
  14. package/Grow/Grow.js +1 -2
  15. package/Hidden/withWidth.js +0 -2
  16. package/Input/Input.js +1 -1
  17. package/InputBase/InputBase.js +2 -2
  18. package/LinearProgress/LinearProgress.js +6 -2
  19. package/Link/Link.js +10 -17
  20. package/Link/getTextDecoration.d.ts +15 -0
  21. package/Link/getTextDecoration.js +29 -0
  22. package/Modal/Modal.d.ts +2 -0
  23. package/Modal/Modal.js +25 -8
  24. package/OutlinedInput/OutlinedInput.js +40 -10
  25. package/Popover/Popover.d.ts +7 -0
  26. package/Popover/index.js +1 -0
  27. package/README.md +6 -9
  28. package/Skeleton/Skeleton.js +8 -3
  29. package/Slider/Slider.d.ts +3 -1
  30. package/Slider/Slider.js +24 -22
  31. package/Snackbar/Snackbar.js +6 -20
  32. package/SnackbarContent/SnackbarContent.js +3 -3
  33. package/SpeedDialAction/SpeedDialAction.js +7 -7
  34. package/Stack/Stack.js +1 -1
  35. package/StepConnector/StepConnector.js +14 -11
  36. package/StepContent/StepContent.js +1 -1
  37. package/StepIcon/StepIcon.js +2 -1
  38. package/Switch/Switch.js +11 -11
  39. package/Tab/Tab.d.ts +0 -1
  40. package/TableCell/TableCell.js +5 -5
  41. package/Tabs/Tabs.js +16 -2
  42. package/Tooltip/Tooltip.js +1 -1
  43. package/index.js +1 -1
  44. package/legacy/Alert/Alert.js +19 -11
  45. package/legacy/AppBar/AppBar.js +23 -4
  46. package/legacy/Avatar/Avatar.js +7 -4
  47. package/legacy/Badge/Badge.js +2 -2
  48. package/legacy/Button/buttonClasses.js +1 -1
  49. package/legacy/Chip/Chip.js +31 -30
  50. package/legacy/Dialog/Dialog.js +11 -6
  51. package/legacy/FilledInput/FilledInput.js +28 -14
  52. package/legacy/Grid/Grid.js +97 -48
  53. package/legacy/Grow/Grow.js +1 -2
  54. package/legacy/Hidden/withWidth.js +0 -2
  55. package/legacy/Input/Input.js +1 -1
  56. package/legacy/InputBase/InputBase.js +2 -2
  57. package/legacy/LinearProgress/LinearProgress.js +6 -2
  58. package/legacy/Link/Link.js +10 -17
  59. package/legacy/Link/getTextDecoration.js +28 -0
  60. package/legacy/Modal/Modal.js +23 -7
  61. package/legacy/OutlinedInput/OutlinedInput.js +36 -9
  62. package/legacy/Popover/index.js +1 -0
  63. package/legacy/Skeleton/Skeleton.js +2 -2
  64. package/legacy/Slider/Slider.js +24 -22
  65. package/legacy/Snackbar/Snackbar.js +6 -21
  66. package/legacy/SnackbarContent/SnackbarContent.js +3 -3
  67. package/legacy/SpeedDialAction/SpeedDialAction.js +7 -7
  68. package/legacy/Stack/Stack.js +2 -1
  69. package/legacy/StepConnector/StepConnector.js +2 -1
  70. package/legacy/StepContent/StepContent.js +1 -1
  71. package/legacy/StepIcon/StepIcon.js +2 -1
  72. package/legacy/Switch/Switch.js +11 -11
  73. package/legacy/TableCell/TableCell.js +5 -5
  74. package/legacy/Tabs/Tabs.js +16 -2
  75. package/legacy/Tooltip/Tooltip.js +1 -1
  76. package/legacy/index.js +1 -1
  77. package/legacy/styles/CssVarsProvider.js +4 -2
  78. package/legacy/styles/experimental_extendTheme.js +153 -18
  79. package/modern/Alert/Alert.js +19 -11
  80. package/modern/AppBar/AppBar.js +22 -5
  81. package/modern/Avatar/Avatar.js +7 -4
  82. package/modern/Badge/Badge.js +2 -2
  83. package/modern/Button/buttonClasses.js +1 -1
  84. package/modern/Chip/Chip.js +31 -30
  85. package/modern/Dialog/Dialog.js +11 -6
  86. package/modern/FilledInput/FilledInput.js +27 -12
  87. package/modern/Grid/Grid.js +94 -40
  88. package/modern/Grow/Grow.js +1 -2
  89. package/modern/Hidden/withWidth.js +0 -2
  90. package/modern/Input/Input.js +1 -1
  91. package/modern/InputBase/InputBase.js +2 -2
  92. package/modern/LinearProgress/LinearProgress.js +6 -2
  93. package/modern/Link/Link.js +10 -17
  94. package/modern/Link/getTextDecoration.js +29 -0
  95. package/modern/Modal/Modal.js +24 -7
  96. package/modern/OutlinedInput/OutlinedInput.js +40 -10
  97. package/modern/Popover/index.js +1 -0
  98. package/modern/Skeleton/Skeleton.js +7 -2
  99. package/modern/Slider/Slider.js +24 -22
  100. package/modern/Snackbar/Snackbar.js +6 -20
  101. package/modern/SnackbarContent/SnackbarContent.js +3 -3
  102. package/modern/SpeedDialAction/SpeedDialAction.js +7 -7
  103. package/modern/Stack/Stack.js +1 -1
  104. package/modern/StepConnector/StepConnector.js +14 -11
  105. package/modern/StepContent/StepContent.js +1 -1
  106. package/modern/StepIcon/StepIcon.js +2 -1
  107. package/modern/Switch/Switch.js +11 -11
  108. package/modern/TableCell/TableCell.js +5 -5
  109. package/modern/Tabs/Tabs.js +16 -2
  110. package/modern/Tooltip/Tooltip.js +1 -1
  111. package/modern/index.js +1 -1
  112. package/modern/styles/CssVarsProvider.js +2 -2
  113. package/modern/styles/experimental_extendTheme.js +154 -18
  114. package/node/Alert/Alert.js +19 -11
  115. package/node/AppBar/AppBar.js +22 -5
  116. package/node/Avatar/Avatar.js +7 -4
  117. package/node/Badge/Badge.js +2 -2
  118. package/node/Button/buttonClasses.js +1 -1
  119. package/node/Chip/Chip.js +31 -30
  120. package/node/Dialog/Dialog.js +11 -6
  121. package/node/FilledInput/FilledInput.js +28 -13
  122. package/node/Grid/Grid.js +95 -40
  123. package/node/Grow/Grow.js +1 -2
  124. package/node/Hidden/withWidth.js +0 -3
  125. package/node/Input/Input.js +1 -1
  126. package/node/InputBase/InputBase.js +2 -2
  127. package/node/LinearProgress/LinearProgress.js +6 -2
  128. package/node/Link/Link.js +12 -20
  129. package/node/Link/getTextDecoration.js +39 -0
  130. package/node/Modal/Modal.js +25 -8
  131. package/node/OutlinedInput/OutlinedInput.js +38 -10
  132. package/node/Popover/index.js +13 -3
  133. package/node/Skeleton/Skeleton.js +7 -2
  134. package/node/Slider/Slider.js +24 -22
  135. package/node/Snackbar/Snackbar.js +6 -18
  136. package/node/SnackbarContent/SnackbarContent.js +3 -3
  137. package/node/SpeedDialAction/SpeedDialAction.js +7 -7
  138. package/node/Stack/Stack.js +1 -1
  139. package/node/StepConnector/StepConnector.js +14 -11
  140. package/node/StepContent/StepContent.js +1 -1
  141. package/node/StepIcon/StepIcon.js +2 -1
  142. package/node/Switch/Switch.js +11 -11
  143. package/node/TableCell/TableCell.js +5 -5
  144. package/node/Tabs/Tabs.js +16 -2
  145. package/node/Tooltip/Tooltip.js +1 -1
  146. package/node/index.js +1 -1
  147. package/node/styles/CssVarsProvider.js +6 -2
  148. package/node/styles/experimental_extendTheme.js +152 -17
  149. package/package.json +6 -7
  150. package/styles/CssVarsProvider.d.ts +10 -28
  151. package/styles/CssVarsProvider.js +6 -2
  152. package/styles/createPalette.d.ts +0 -26
  153. package/styles/experimental_extendTheme.d.ts +225 -37
  154. package/styles/experimental_extendTheme.js +154 -18
  155. package/styles/index.d.ts +24 -1
  156. package/themeCssVarsAugmentation/index.d.ts +61 -0
  157. package/umd/material-ui.development.js +1048 -541
  158. package/umd/material-ui.production.min.js +27 -22
@@ -6,7 +6,6 @@ import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
7
7
  import { elementTypeAcceptingRef } from '@mui/utils';
8
8
  import { unstable_composeClasses as composeClasses } from '@mui/base';
9
- import { alpha, getPath } from '@mui/system';
10
9
  import capitalize from '../utils/capitalize';
11
10
  import styled from '../styles/styled';
12
11
  import useThemeProps from '../styles/useThemeProps';
@@ -14,18 +13,8 @@ import useIsFocusVisible from '../utils/useIsFocusVisible';
14
13
  import useForkRef from '../utils/useForkRef';
15
14
  import Typography from '../Typography';
16
15
  import linkClasses, { getLinkUtilityClass } from './linkClasses';
16
+ import getTextDecoration, { colorTransformations } from './getTextDecoration';
17
17
  import { jsx as _jsx } from "react/jsx-runtime";
18
- const colorTransformations = {
19
- primary: 'primary.main',
20
- textPrimary: 'text.primary',
21
- secondary: 'secondary.main',
22
- textSecondary: 'text.secondary',
23
- error: 'error.main'
24
- };
25
-
26
- const transformDeprecatedColors = color => {
27
- return colorTransformations[color] || color;
28
- };
29
18
 
30
19
  const useUtilityClasses = ownerState => {
31
20
  const {
@@ -53,7 +42,6 @@ const LinkRoot = styled(Typography, {
53
42
  theme,
54
43
  ownerState
55
44
  }) => {
56
- const color = getPath(theme, `palette.${transformDeprecatedColors(ownerState.color)}`) || ownerState.color;
57
45
  return _extends({}, ownerState.underline === 'none' && {
58
46
  textDecoration: 'none'
59
47
  }, ownerState.underline === 'hover' && {
@@ -61,13 +49,18 @@ const LinkRoot = styled(Typography, {
61
49
  '&:hover': {
62
50
  textDecoration: 'underline'
63
51
  }
64
- }, ownerState.underline === 'always' && {
65
- textDecoration: 'underline',
66
- textDecorationColor: color !== 'inherit' ? alpha(color, 0.4) : undefined,
52
+ }, ownerState.underline === 'always' && _extends({
53
+ textDecoration: 'underline'
54
+ }, ownerState.color !== 'inherit' && {
55
+ textDecorationColor: getTextDecoration({
56
+ theme,
57
+ ownerState
58
+ })
59
+ }, {
67
60
  '&:hover': {
68
61
  textDecorationColor: 'inherit'
69
62
  }
70
- }, ownerState.component === 'button' && {
63
+ }), ownerState.component === 'button' && {
71
64
  position: 'relative',
72
65
  WebkitTapHighlightColor: 'transparent',
73
66
  backgroundColor: 'transparent',
@@ -0,0 +1,29 @@
1
+ import { alpha, getPath } from '@mui/system';
2
+ export const colorTransformations = {
3
+ primary: 'primary.main',
4
+ textPrimary: 'text.primary',
5
+ secondary: 'secondary.main',
6
+ textSecondary: 'text.secondary',
7
+ error: 'error.main'
8
+ };
9
+
10
+ const transformDeprecatedColors = color => {
11
+ return colorTransformations[color] || color;
12
+ };
13
+
14
+ const getTextDecoration = ({
15
+ theme,
16
+ ownerState
17
+ }) => {
18
+ const transformedColor = transformDeprecatedColors(ownerState.color);
19
+ const color = getPath(theme, `palette.${transformedColor}`, false) || ownerState.color;
20
+ const channelColor = getPath(theme, `palette.${transformedColor}Channel`);
21
+
22
+ if ('vars' in theme && channelColor) {
23
+ return `rgba(${channelColor} / 0.4)`;
24
+ }
25
+
26
+ return alpha(color, 0.4);
27
+ };
28
+
29
+ export default getTextDecoration;
@@ -1,6 +1,6 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["BackdropComponent", "closeAfterTransition", "children", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted"];
3
+ const _excluded = ["BackdropComponent", "BackdropProps", "closeAfterTransition", "children", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "theme"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { isHostComponent } from '@mui/base';
@@ -69,8 +69,10 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
69
69
 
70
70
  const {
71
71
  BackdropComponent = ModalBackdrop,
72
+ BackdropProps,
72
73
  closeAfterTransition = false,
73
74
  children,
75
+ component,
74
76
  components = {},
75
77
  componentsProps = {},
76
78
  disableAutoFocus = false,
@@ -80,7 +82,9 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
80
82
  disableRestoreFocus = false,
81
83
  disableScrollLock = false,
82
84
  hideBackdrop = false,
83
- keepMounted = false
85
+ keepMounted = false,
86
+ // eslint-disable-next-line react/prop-types
87
+ theme
84
88
  } = props,
85
89
  other = _objectWithoutPropertiesLoose(props, _excluded);
86
90
 
@@ -102,16 +106,19 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
102
106
  });
103
107
 
104
108
  const classes = extendUtilityClasses(ownerState);
109
+ const Root = components.Root ?? component ?? ModalRoot;
105
110
  return /*#__PURE__*/_jsx(ModalUnstyled, _extends({
106
111
  components: _extends({
107
- Root: ModalRoot
112
+ Root,
113
+ Backdrop: BackdropComponent
108
114
  }, components),
109
115
  componentsProps: {
110
- root: _extends({}, componentsProps.root, (!components.Root || !isHostComponent(components.Root)) && {
111
- ownerState: _extends({}, componentsProps.root?.ownerState)
112
- })
116
+ root: _extends({}, componentsProps.root, !isHostComponent(Root) && {
117
+ as: component,
118
+ theme
119
+ }),
120
+ backdrop: _extends({}, BackdropProps, componentsProps.backdrop)
113
121
  },
114
- BackdropComponent: BackdropComponent,
115
122
  onTransitionEnter: () => setExited(false),
116
123
  onTransitionExited: () => setExited(true),
117
124
  ref: ref
@@ -131,6 +138,7 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
131
138
 
132
139
  /**
133
140
  * A backdrop component. This prop enables custom backdrop rendering.
141
+ * @deprecated Use `components.Backdrop` instead.
134
142
  * @default styled(Backdrop, {
135
143
  * name: 'MuiModal',
136
144
  * slot: 'Backdrop',
@@ -145,6 +153,7 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
145
153
 
146
154
  /**
147
155
  * Props applied to the [`Backdrop`](/material-ui/api/backdrop/) element.
156
+ * @deprecated Use `componentsProps.backdrop` instead.
148
157
  */
149
158
  BackdropProps: PropTypes.object,
150
159
 
@@ -164,12 +173,19 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
164
173
  */
165
174
  closeAfterTransition: PropTypes.bool,
166
175
 
176
+ /**
177
+ * The component used for the root node.
178
+ * Either a string to use a HTML element or a component.
179
+ */
180
+ component: PropTypes.elementType,
181
+
167
182
  /**
168
183
  * The components used for each slot inside the Modal.
169
184
  * Either a string to use a HTML element or a component.
170
185
  * @default {}
171
186
  */
172
187
  components: PropTypes.shape({
188
+ Backdrop: PropTypes.elementType,
173
189
  Root: PropTypes.elementType
174
190
  }),
175
191
 
@@ -178,6 +194,7 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
178
194
  * @default {}
179
195
  */
180
196
  componentsProps: PropTypes.shape({
197
+ backdrop: PropTypes.object,
181
198
  root: PropTypes.object
182
199
  }),
183
200
 
@@ -40,25 +40,25 @@ const OutlinedInputRoot = styled(InputBaseRoot, {
40
40
  const borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';
41
41
  return _extends({
42
42
  position: 'relative',
43
- borderRadius: theme.shape.borderRadius,
43
+ borderRadius: (theme.vars || theme).shape.borderRadius,
44
44
  [`&:hover .${outlinedInputClasses.notchedOutline}`]: {
45
- borderColor: theme.palette.text.primary
45
+ borderColor: (theme.vars || theme).palette.text.primary
46
46
  },
47
47
  // Reset on touch devices, it doesn't add specificity
48
48
  '@media (hover: none)': {
49
49
  [`&:hover .${outlinedInputClasses.notchedOutline}`]: {
50
- borderColor
50
+ borderColor: theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : borderColor
51
51
  }
52
52
  },
53
53
  [`&.${outlinedInputClasses.focused} .${outlinedInputClasses.notchedOutline}`]: {
54
- borderColor: theme.palette[ownerState.color].main,
54
+ borderColor: (theme.vars || theme).palette[ownerState.color].main,
55
55
  borderWidth: 2
56
56
  },
57
57
  [`&.${outlinedInputClasses.error} .${outlinedInputClasses.notchedOutline}`]: {
58
- borderColor: theme.palette.error.main
58
+ borderColor: (theme.vars || theme).palette.error.main
59
59
  },
60
60
  [`&.${outlinedInputClasses.disabled} .${outlinedInputClasses.notchedOutline}`]: {
61
- borderColor: theme.palette.action.disabled
61
+ borderColor: (theme.vars || theme).palette.action.disabled
62
62
  }
63
63
  }, ownerState.startAdornment && {
64
64
  paddingLeft: 14
@@ -76,9 +76,12 @@ const NotchedOutlineRoot = styled(NotchedOutline, {
76
76
  overridesResolver: (props, styles) => styles.notchedOutline
77
77
  })(({
78
78
  theme
79
- }) => ({
80
- borderColor: theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'
81
- }));
79
+ }) => {
80
+ const borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';
81
+ return {
82
+ borderColor: theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : borderColor
83
+ };
84
+ });
82
85
  const OutlinedInputInput = styled(InputBaseInput, {
83
86
  name: 'MuiOutlinedInput',
84
87
  slot: 'Input',
@@ -87,13 +90,25 @@ const OutlinedInputInput = styled(InputBaseInput, {
87
90
  theme,
88
91
  ownerState
89
92
  }) => _extends({
90
- padding: '16.5px 14px',
93
+ padding: '16.5px 14px'
94
+ }, !theme.vars && {
91
95
  '&:-webkit-autofill': {
92
96
  WebkitBoxShadow: theme.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset',
93
97
  WebkitTextFillColor: theme.palette.mode === 'light' ? null : '#fff',
94
98
  caretColor: theme.palette.mode === 'light' ? null : '#fff',
95
99
  borderRadius: 'inherit'
96
100
  }
101
+ }, theme.vars && {
102
+ '&:-webkit-autofill': {
103
+ borderRadius: 'inherit'
104
+ },
105
+ [theme.getColorSchemeSelector('dark')]: {
106
+ '&:-webkit-autofill': {
107
+ WebkitBoxShadow: '0 0 0 100px #266798 inset',
108
+ WebkitTextFillColor: '#fff',
109
+ caretColor: '#fff'
110
+ }
111
+ }
97
112
  }, ownerState.size === 'small' && {
98
113
  padding: '8.5px 14px'
99
114
  }, ownerState.multiline && {
@@ -129,12 +144,27 @@ const OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inPro
129
144
  muiFormControl,
130
145
  states: ['required']
131
146
  });
147
+
148
+ const ownerState = _extends({}, props, {
149
+ color: fcs.color || 'primary',
150
+ disabled: fcs.disabled,
151
+ error: fcs.error,
152
+ focused: fcs.focused,
153
+ formControl: muiFormControl,
154
+ fullWidth,
155
+ hiddenLabel: fcs.hiddenLabel,
156
+ multiline,
157
+ size: fcs.size,
158
+ type
159
+ });
160
+
132
161
  return /*#__PURE__*/_jsx(InputBase, _extends({
133
162
  components: _extends({
134
163
  Root: OutlinedInputRoot,
135
164
  Input: OutlinedInputInput
136
165
  }, components),
137
166
  renderSuffix: state => /*#__PURE__*/_jsx(NotchedOutlineRoot, {
167
+ ownerState: ownerState,
138
168
  className: classes.notchedOutline,
139
169
  label: label != null && label !== '' && fcs.required ? _React$Fragment || (_React$Fragment = /*#__PURE__*/_jsxs(React.Fragment, {
140
170
  children: [label, "\xA0", '*']
@@ -1,3 +1,4 @@
1
1
  export { default } from './Popover';
2
+ export * from './Popover';
2
3
  export { default as popoverClasses } from './popoverClasses';
3
4
  export * from './popoverClasses';
@@ -72,7 +72,7 @@ const SkeletonRoot = styled('span', {
72
72
  return _extends({
73
73
  display: 'block',
74
74
  // Create a "on paper" color with sufficient contrast retaining the color
75
- backgroundColor: alpha(theme.palette.text.primary, theme.palette.mode === 'light' ? 0.11 : 0.13),
75
+ backgroundColor: theme.vars ? theme.vars.palette.Skeleton.bg : alpha(theme.palette.text.primary, theme.palette.mode === 'light' ? 0.11 : 0.13),
76
76
  height: '1.2em'
77
77
  }, ownerState.variant === 'text' && {
78
78
  marginTop: 0,
@@ -111,7 +111,12 @@ const SkeletonRoot = styled('span', {
111
111
 
112
112
  &::after {
113
113
  animation: ${waveKeyframe} 1.6s linear 0.5s infinite;
114
- background: linear-gradient(90deg, transparent, ${theme.palette.action.hover}, transparent);
114
+ background: linear-gradient(
115
+ 90deg,
116
+ transparent,
117
+ ${(theme.vars || theme).palette.action.hover},
118
+ transparent
119
+ );
115
120
  content: '';
116
121
  position: absolute;
117
122
  transform: translateX(-100%); /* Avoid flash during server-side hydration */
@@ -34,7 +34,7 @@ const 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 @@ const SliderRoot = styled('span', {
69
69
  [`&.${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
  },
74
74
  [`&.${sliderClasses.dragging}`]: {
75
75
  [`& .${sliderClasses.thumb}, & .${sliderClasses.track}`]: {
@@ -162,8 +162,8 @@ const SliderTrack = styled('span', {
162
162
  }, ownerState.track === false && {
163
163
  display: 'none'
164
164
  }, ownerState.track === 'inverted' && {
165
- backgroundColor: color,
166
- borderColor: color
165
+ backgroundColor: theme.vars ? theme.vars.palette.Slider[`${ownerState.color}Track`] : color,
166
+ borderColor: theme.vars ? theme.vars.palette.Slider[`${ownerState.color}Track`] : color
167
167
  });
168
168
  });
169
169
  process.env.NODE_ENV !== "production" ? SliderTrack.propTypes
@@ -222,7 +222,7 @@ const SliderThumb = styled('span', {
222
222
  borderRadius: 'inherit',
223
223
  width: '100%',
224
224
  height: '100%',
225
- boxShadow: theme.shadows[2]
225
+ boxShadow: (theme.vars || theme).shadows[2]
226
226
  }, ownerState.size === 'small' && {
227
227
  boxShadow: 'none'
228
228
  }),
@@ -238,13 +238,13 @@ const SliderThumb = styled('span', {
238
238
  transform: 'translate(-50%, -50%)'
239
239
  },
240
240
  [`&:hover, &.${sliderClasses.focusVisible}`]: {
241
- boxShadow: `0px 0px 0px 8px ${alpha(theme.palette[ownerState.color].main, 0.16)}`,
241
+ boxShadow: `0px 0px 0px 8px ${theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.16)` : alpha(theme.palette[ownerState.color].main, 0.16)}`,
242
242
  '@media (hover: none)': {
243
243
  boxShadow: 'none'
244
244
  }
245
245
  },
246
246
  [`&.${sliderClasses.active}`]: {
247
- boxShadow: `0px 0px 0px 14px ${alpha(theme.palette[ownerState.color].main, 0.16)}`
247
+ boxShadow: `0px 0px 0px 14px ${theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.16)` : alpha(theme.palette[ownerState.color].main, 0.16)}`
248
248
  },
249
249
  [`&.${sliderClasses.disabled}`]: {
250
250
  '&:hover': {
@@ -287,9 +287,9 @@ const SliderValueLabel = styled(SliderValueLabelUnstyled, {
287
287
  transformOrigin: 'bottom center',
288
288
  transform: 'translateY(-100%) scale(0)',
289
289
  position: 'absolute',
290
- backgroundColor: theme.palette.grey[600],
290
+ backgroundColor: (theme.vars || theme).palette.grey[600],
291
291
  borderRadius: 2,
292
- color: theme.palette.common.white,
292
+ color: (theme.vars || theme).palette.common.white,
293
293
  display: 'flex',
294
294
  alignItems: 'center',
295
295
  justifyContent: 'center',
@@ -359,7 +359,7 @@ const SliderMark = styled('span', {
359
359
  left: '50%',
360
360
  transform: 'translate(-50%, 1px)'
361
361
  }, markActive && {
362
- backgroundColor: theme.palette.background.paper,
362
+ backgroundColor: (theme.vars || theme).palette.background.paper,
363
363
  opacity: 0.8
364
364
  }));
365
365
  process.env.NODE_ENV !== "production" ? SliderMark.propTypes
@@ -386,7 +386,7 @@ const SliderMarkLabel = styled('span', {
386
386
  ownerState,
387
387
  markLabelActive
388
388
  }) => _extends({}, theme.typography.body2, {
389
- color: theme.palette.text.secondary,
389
+ color: (theme.vars || theme).palette.text.secondary,
390
390
  position: 'absolute',
391
391
  whiteSpace: 'nowrap'
392
392
  }, ownerState.orientation === 'horizontal' && {
@@ -402,7 +402,7 @@ const SliderMarkLabel = styled('span', {
402
402
  left: 44
403
403
  }
404
404
  }, markLabelActive && {
405
- color: theme.palette.text.primary
405
+ color: (theme.vars || theme).palette.text.primary
406
406
  }));
407
407
  process.env.NODE_ENV !== "production" ? SliderMarkLabel.propTypes
408
408
  /* remove-proptypes */
@@ -577,22 +577,24 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes
577
577
  * @default {}
578
578
  */
579
579
  componentsProps: PropTypes.shape({
580
- input: PropTypes.object,
581
- mark: PropTypes.object,
582
- markLabel: PropTypes.object,
583
- rail: PropTypes.object,
584
- root: PropTypes.object,
585
- thumb: PropTypes.object,
586
- track: PropTypes.object,
587
- valueLabel: PropTypes.shape({
580
+ input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
581
+ mark: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
582
+ markLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
583
+ rail: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
584
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
585
+ thumb: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
586
+ track: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
587
+ valueLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
588
+ children: PropTypes.element,
588
589
  className: PropTypes.string,
589
590
  components: PropTypes.shape({
590
591
  Root: PropTypes.elementType
591
592
  }),
593
+ open: PropTypes.bool,
592
594
  style: PropTypes.object,
593
- value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number]),
595
+ value: PropTypes.number,
594
596
  valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on'])
595
- })
597
+ })])
596
598
  }),
597
599
 
598
600
  /**
@@ -41,16 +41,11 @@ const SnackbarRoot = styled('div', {
41
41
  theme,
42
42
  ownerState
43
43
  }) => {
44
- const center = _extends({}, !ownerState.isRtl && {
44
+ const center = {
45
45
  left: '50%',
46
46
  right: 'auto',
47
47
  transform: 'translateX(-50%)'
48
- }, ownerState.isRtl && {
49
- right: '50%',
50
- left: 'auto',
51
- transform: 'translateX(50%)'
52
- });
53
-
48
+ };
54
49
  return _extends({
55
50
  zIndex: (theme.vars || theme).zIndex.snackbar,
56
51
  position: 'fixed',
@@ -72,19 +67,13 @@ const SnackbarRoot = styled('div', {
72
67
  top: 24
73
68
  } : {
74
69
  bottom: 24
75
- }, ownerState.anchorOrigin.horizontal === 'center' && center, ownerState.anchorOrigin.horizontal === 'left' && _extends({}, !ownerState.isRtl && {
70
+ }, ownerState.anchorOrigin.horizontal === 'center' && center, ownerState.anchorOrigin.horizontal === 'left' && {
76
71
  left: 24,
77
72
  right: 'auto'
78
- }, ownerState.isRtl && {
73
+ }, ownerState.anchorOrigin.horizontal === 'right' && {
79
74
  right: 24,
80
75
  left: 'auto'
81
- }), ownerState.anchorOrigin.horizontal === 'right' && _extends({}, !ownerState.isRtl && {
82
- right: 24,
83
- left: 'auto'
84
- }, ownerState.isRtl && {
85
- left: 24,
86
- right: 'auto'
87
- }))
76
+ })
88
77
  });
89
78
  });
90
79
  const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
@@ -131,14 +120,11 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
131
120
  TransitionProps = _objectWithoutPropertiesLoose(props.TransitionProps, _excluded),
132
121
  other = _objectWithoutPropertiesLoose(props, _excluded2);
133
122
 
134
- const isRtl = theme.direction === 'rtl';
135
-
136
123
  const ownerState = _extends({}, props, {
137
124
  anchorOrigin: {
138
125
  vertical,
139
126
  horizontal
140
- },
141
- isRtl
127
+ }
142
128
  });
143
129
 
144
130
  const classes = useUtilityClasses(ownerState);
@@ -35,13 +35,13 @@ const SnackbarContentRoot = styled(Paper, {
35
35
  const emphasis = theme.palette.mode === 'light' ? 0.8 : 0.98;
36
36
  const backgroundColor = emphasize(theme.palette.background.default, emphasis);
37
37
  return _extends({}, theme.typography.body2, {
38
- color: theme.palette.getContrastText(backgroundColor),
39
- backgroundColor,
38
+ color: theme.vars ? theme.vars.palette.text.primary : theme.palette.getContrastText(backgroundColor),
39
+ backgroundColor: theme.vars ? theme.vars.palette.SnackbarContent.bg : backgroundColor,
40
40
  display: 'flex',
41
41
  alignItems: 'center',
42
42
  flexWrap: 'wrap',
43
43
  padding: '6px 16px',
44
- borderRadius: theme.shape.borderRadius,
44
+ borderRadius: (theme.vars || theme).shape.borderRadius,
45
45
  flexGrow: 1,
46
46
  [theme.breakpoints.up('sm')]: {
47
47
  flexGrow: 'initial',
@@ -45,10 +45,10 @@ const SpeedDialActionFab = styled(Fab, {
45
45
  ownerState
46
46
  }) => _extends({
47
47
  margin: 8,
48
- color: theme.palette.text.secondary,
49
- backgroundColor: theme.palette.background.paper,
48
+ color: (theme.vars || theme).palette.text.secondary,
49
+ backgroundColor: (theme.vars || theme).palette.background.paper,
50
50
  '&:hover': {
51
- backgroundColor: emphasize(theme.palette.background.paper, 0.15)
51
+ backgroundColor: theme.vars ? theme.vars.palette.SpeedDialAction.fabHoverBg : emphasize(theme.palette.background.paper, 0.15)
52
52
  },
53
53
  transition: `${theme.transitions.create('transform', {
54
54
  duration: theme.transitions.duration.shorter
@@ -101,10 +101,10 @@ const SpeedDialActionStaticTooltipLabel = styled('span', {
101
101
  }) => _extends({
102
102
  position: 'absolute'
103
103
  }, theme.typography.body1, {
104
- backgroundColor: theme.palette.background.paper,
105
- borderRadius: theme.shape.borderRadius,
106
- boxShadow: theme.shadows[1],
107
- color: theme.palette.text.secondary,
104
+ backgroundColor: (theme.vars || theme).palette.background.paper,
105
+ borderRadius: (theme.vars || theme).shape.borderRadius,
106
+ boxShadow: (theme.vars || theme).shadows[1],
107
+ color: (theme.vars || theme).palette.text.secondary,
108
108
  padding: '4px 16px',
109
109
  wordBreak: 'keep-all'
110
110
  }));
@@ -59,7 +59,7 @@ export const style = ({
59
59
  if (ownerState.spacing) {
60
60
  const transformer = createUnarySpacing(theme);
61
61
  const base = Object.keys(theme.breakpoints.values).reduce((acc, breakpoint) => {
62
- if (ownerState.spacing[breakpoint] != null || ownerState.direction[breakpoint] != null) {
62
+ if (typeof ownerState.spacing === 'object' && ownerState.spacing[breakpoint] != null || typeof ownerState.direction === 'object' && ownerState.direction[breakpoint] != null) {
63
63
  acc[breakpoint] = true;
64
64
  }
65
65
 
@@ -63,17 +63,20 @@ const StepConnectorLine = styled('span', {
63
63
  })(({
64
64
  ownerState,
65
65
  theme
66
- }) => _extends({
67
- display: 'block',
68
- borderColor: theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]
69
- }, ownerState.orientation === 'horizontal' && {
70
- borderTopStyle: 'solid',
71
- borderTopWidth: 1
72
- }, ownerState.orientation === 'vertical' && {
73
- borderLeftStyle: 'solid',
74
- borderLeftWidth: 1,
75
- minHeight: 24
76
- }));
66
+ }) => {
67
+ const borderColor = theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600];
68
+ return _extends({
69
+ display: 'block',
70
+ borderColor: theme.vars ? theme.vars.palette.StepConnector.border : borderColor
71
+ }, ownerState.orientation === 'horizontal' && {
72
+ borderTopStyle: 'solid',
73
+ borderTopWidth: 1
74
+ }, ownerState.orientation === 'vertical' && {
75
+ borderLeftStyle: 'solid',
76
+ borderLeftWidth: 1,
77
+ minHeight: 24
78
+ });
79
+ });
77
80
  const StepConnector = /*#__PURE__*/React.forwardRef(function StepConnector(inProps, ref) {
78
81
  const props = useThemeProps({
79
82
  props: inProps,
@@ -43,7 +43,7 @@ const StepContentRoot = styled('div', {
43
43
  paddingLeft: 8 + 12,
44
44
  // margin + half icon
45
45
  paddingRight: 8,
46
- borderLeft: `1px solid ${theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]}`
46
+ borderLeft: theme.vars ? `1px solid ${theme.vars.palette.StepContent.border}` : `1px solid ${theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]}`
47
47
  }, ownerState.last && {
48
48
  borderLeft: 'none'
49
49
  }));
@@ -120,8 +120,9 @@ const StepIcon = /*#__PURE__*/React.forwardRef(function StepIcon(inProps, ref) {
120
120
  })), /*#__PURE__*/_jsx(StepIconText, {
121
121
  className: classes.text,
122
122
  x: "12",
123
- y: "16",
123
+ y: "12",
124
124
  textAnchor: "middle",
125
+ dominantBaseline: "central",
125
126
  ownerState: ownerState,
126
127
  children: icon
127
128
  })]