@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
package/node/Link/Link.js CHANGED
@@ -21,8 +21,6 @@ var _utils = require("@mui/utils");
21
21
 
22
22
  var _base = require("@mui/base");
23
23
 
24
- var _system = require("@mui/system");
25
-
26
24
  var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
27
25
 
28
26
  var _styled = _interopRequireDefault(require("../styles/styled"));
@@ -37,6 +35,8 @@ var _Typography = _interopRequireDefault(require("../Typography"));
37
35
 
38
36
  var _linkClasses = _interopRequireWildcard(require("./linkClasses"));
39
37
 
38
+ var _getTextDecoration = _interopRequireWildcard(require("./getTextDecoration"));
39
+
40
40
  var _jsxRuntime = require("react/jsx-runtime");
41
41
 
42
42
  const _excluded = ["className", "color", "component", "onBlur", "onFocus", "TypographyClasses", "underline", "variant", "sx"];
@@ -45,18 +45,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
45
45
 
46
46
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
47
47
 
48
- const colorTransformations = {
49
- primary: 'primary.main',
50
- textPrimary: 'text.primary',
51
- secondary: 'secondary.main',
52
- textSecondary: 'text.secondary',
53
- error: 'error.main'
54
- };
55
-
56
- const transformDeprecatedColors = color => {
57
- return colorTransformations[color] || color;
58
- };
59
-
60
48
  const useUtilityClasses = ownerState => {
61
49
  const {
62
50
  classes,
@@ -83,7 +71,6 @@ const LinkRoot = (0, _styled.default)(_Typography.default, {
83
71
  theme,
84
72
  ownerState
85
73
  }) => {
86
- const color = (0, _system.getPath)(theme, `palette.${transformDeprecatedColors(ownerState.color)}`) || ownerState.color;
87
74
  return (0, _extends2.default)({}, ownerState.underline === 'none' && {
88
75
  textDecoration: 'none'
89
76
  }, ownerState.underline === 'hover' && {
@@ -91,13 +78,18 @@ const LinkRoot = (0, _styled.default)(_Typography.default, {
91
78
  '&:hover': {
92
79
  textDecoration: 'underline'
93
80
  }
94
- }, ownerState.underline === 'always' && {
95
- textDecoration: 'underline',
96
- textDecorationColor: color !== 'inherit' ? (0, _system.alpha)(color, 0.4) : undefined,
81
+ }, ownerState.underline === 'always' && (0, _extends2.default)({
82
+ textDecoration: 'underline'
83
+ }, ownerState.color !== 'inherit' && {
84
+ textDecorationColor: (0, _getTextDecoration.default)({
85
+ theme,
86
+ ownerState
87
+ })
88
+ }, {
97
89
  '&:hover': {
98
90
  textDecorationColor: 'inherit'
99
91
  }
100
- }, ownerState.component === 'button' && {
92
+ }), ownerState.component === 'button' && {
101
93
  position: 'relative',
102
94
  WebkitTapHighlightColor: 'transparent',
103
95
  backgroundColor: 'transparent',
@@ -194,7 +186,7 @@ const Link = /*#__PURE__*/React.forwardRef(function Link(inProps, ref) {
194
186
  ref: handlerRef,
195
187
  ownerState: ownerState,
196
188
  variant: variant,
197
- sx: [...(!Object.keys(colorTransformations).includes(color) ? [{
189
+ sx: [...(!Object.keys(_getTextDecoration.colorTransformations).includes(color) ? [{
198
190
  color
199
191
  }] : []), ...(Array.isArray(sx) ? sx : [sx])]
200
192
  }, other));
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.colorTransformations = void 0;
7
+
8
+ var _system = require("@mui/system");
9
+
10
+ const colorTransformations = {
11
+ primary: 'primary.main',
12
+ textPrimary: 'text.primary',
13
+ secondary: 'secondary.main',
14
+ textSecondary: 'text.secondary',
15
+ error: 'error.main'
16
+ };
17
+ exports.colorTransformations = colorTransformations;
18
+
19
+ const transformDeprecatedColors = color => {
20
+ return colorTransformations[color] || color;
21
+ };
22
+
23
+ const getTextDecoration = ({
24
+ theme,
25
+ ownerState
26
+ }) => {
27
+ const transformedColor = transformDeprecatedColors(ownerState.color);
28
+ const color = (0, _system.getPath)(theme, `palette.${transformedColor}`, false) || ownerState.color;
29
+ const channelColor = (0, _system.getPath)(theme, `palette.${transformedColor}Channel`);
30
+
31
+ if ('vars' in theme && channelColor) {
32
+ return `rgba(${channelColor} / 0.4)`;
33
+ }
34
+
35
+ return (0, _system.alpha)(color, 0.4);
36
+ };
37
+
38
+ var _default = getTextDecoration;
39
+ exports.default = _default;
@@ -29,7 +29,7 @@ var _Backdrop = _interopRequireDefault(require("../Backdrop"));
29
29
 
30
30
  var _jsxRuntime = require("react/jsx-runtime");
31
31
 
32
- const _excluded = ["BackdropComponent", "closeAfterTransition", "children", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted"];
32
+ const _excluded = ["BackdropComponent", "BackdropProps", "closeAfterTransition", "children", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "theme"];
33
33
 
34
34
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
35
35
 
@@ -88,7 +88,7 @@ const ModalBackdrop = (0, _styled.default)(_Backdrop.default, {
88
88
  */
89
89
 
90
90
  const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
91
- var _componentsProps$root;
91
+ var _ref, _components$Root;
92
92
 
93
93
  const props = (0, _useThemeProps.default)({
94
94
  name: 'MuiModal',
@@ -96,8 +96,10 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
96
96
  });
97
97
  const {
98
98
  BackdropComponent = ModalBackdrop,
99
+ BackdropProps,
99
100
  closeAfterTransition = false,
100
101
  children,
102
+ component,
101
103
  components = {},
102
104
  componentsProps = {},
103
105
  disableAutoFocus = false,
@@ -107,7 +109,9 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
107
109
  disableRestoreFocus = false,
108
110
  disableScrollLock = false,
109
111
  hideBackdrop = false,
110
- keepMounted = false
112
+ keepMounted = false,
113
+ // eslint-disable-next-line react/prop-types
114
+ theme
111
115
  } = props,
112
116
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
113
117
  const [exited, setExited] = React.useState(true);
@@ -126,16 +130,19 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
126
130
  exited
127
131
  });
128
132
  const classes = extendUtilityClasses(ownerState);
133
+ const Root = (_ref = (_components$Root = components.Root) != null ? _components$Root : component) != null ? _ref : ModalRoot;
129
134
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ModalUnstyled.default, (0, _extends2.default)({
130
135
  components: (0, _extends2.default)({
131
- Root: ModalRoot
136
+ Root,
137
+ Backdrop: BackdropComponent
132
138
  }, components),
133
139
  componentsProps: {
134
- root: (0, _extends2.default)({}, componentsProps.root, (!components.Root || !(0, _base.isHostComponent)(components.Root)) && {
135
- ownerState: (0, _extends2.default)({}, (_componentsProps$root = componentsProps.root) == null ? void 0 : _componentsProps$root.ownerState)
136
- })
140
+ root: (0, _extends2.default)({}, componentsProps.root, !(0, _base.isHostComponent)(Root) && {
141
+ as: component,
142
+ theme
143
+ }),
144
+ backdrop: (0, _extends2.default)({}, BackdropProps, componentsProps.backdrop)
137
145
  },
138
- BackdropComponent: BackdropComponent,
139
146
  onTransitionEnter: () => setExited(false),
140
147
  onTransitionExited: () => setExited(true),
141
148
  ref: ref
@@ -155,6 +162,7 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
155
162
 
156
163
  /**
157
164
  * A backdrop component. This prop enables custom backdrop rendering.
165
+ * @deprecated Use `components.Backdrop` instead.
158
166
  * @default styled(Backdrop, {
159
167
  * name: 'MuiModal',
160
168
  * slot: 'Backdrop',
@@ -169,6 +177,7 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
169
177
 
170
178
  /**
171
179
  * Props applied to the [`Backdrop`](/material-ui/api/backdrop/) element.
180
+ * @deprecated Use `componentsProps.backdrop` instead.
172
181
  */
173
182
  BackdropProps: _propTypes.default.object,
174
183
 
@@ -188,12 +197,19 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
188
197
  */
189
198
  closeAfterTransition: _propTypes.default.bool,
190
199
 
200
+ /**
201
+ * The component used for the root node.
202
+ * Either a string to use a HTML element or a component.
203
+ */
204
+ component: _propTypes.default.elementType,
205
+
191
206
  /**
192
207
  * The components used for each slot inside the Modal.
193
208
  * Either a string to use a HTML element or a component.
194
209
  * @default {}
195
210
  */
196
211
  components: _propTypes.default.shape({
212
+ Backdrop: _propTypes.default.elementType,
197
213
  Root: _propTypes.default.elementType
198
214
  }),
199
215
 
@@ -202,6 +218,7 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
202
218
  * @default {}
203
219
  */
204
220
  componentsProps: _propTypes.default.shape({
221
+ backdrop: _propTypes.default.object,
205
222
  root: _propTypes.default.object
206
223
  }),
207
224
 
@@ -66,25 +66,25 @@ const OutlinedInputRoot = (0, _styled.default)(_InputBase.InputBaseRoot, {
66
66
  const borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';
67
67
  return (0, _extends2.default)({
68
68
  position: 'relative',
69
- borderRadius: theme.shape.borderRadius,
69
+ borderRadius: (theme.vars || theme).shape.borderRadius,
70
70
  [`&:hover .${_outlinedInputClasses.default.notchedOutline}`]: {
71
- borderColor: theme.palette.text.primary
71
+ borderColor: (theme.vars || theme).palette.text.primary
72
72
  },
73
73
  // Reset on touch devices, it doesn't add specificity
74
74
  '@media (hover: none)': {
75
75
  [`&:hover .${_outlinedInputClasses.default.notchedOutline}`]: {
76
- borderColor
76
+ borderColor: theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : borderColor
77
77
  }
78
78
  },
79
79
  [`&.${_outlinedInputClasses.default.focused} .${_outlinedInputClasses.default.notchedOutline}`]: {
80
- borderColor: theme.palette[ownerState.color].main,
80
+ borderColor: (theme.vars || theme).palette[ownerState.color].main,
81
81
  borderWidth: 2
82
82
  },
83
83
  [`&.${_outlinedInputClasses.default.error} .${_outlinedInputClasses.default.notchedOutline}`]: {
84
- borderColor: theme.palette.error.main
84
+ borderColor: (theme.vars || theme).palette.error.main
85
85
  },
86
86
  [`&.${_outlinedInputClasses.default.disabled} .${_outlinedInputClasses.default.notchedOutline}`]: {
87
- borderColor: theme.palette.action.disabled
87
+ borderColor: (theme.vars || theme).palette.action.disabled
88
88
  }
89
89
  }, ownerState.startAdornment && {
90
90
  paddingLeft: 14
@@ -102,9 +102,12 @@ const NotchedOutlineRoot = (0, _styled.default)(_NotchedOutline.default, {
102
102
  overridesResolver: (props, styles) => styles.notchedOutline
103
103
  })(({
104
104
  theme
105
- }) => ({
106
- borderColor: theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'
107
- }));
105
+ }) => {
106
+ const borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';
107
+ return {
108
+ borderColor: theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : borderColor
109
+ };
110
+ });
108
111
  const OutlinedInputInput = (0, _styled.default)(_InputBase.InputBaseComponent, {
109
112
  name: 'MuiOutlinedInput',
110
113
  slot: 'Input',
@@ -113,13 +116,25 @@ const OutlinedInputInput = (0, _styled.default)(_InputBase.InputBaseComponent, {
113
116
  theme,
114
117
  ownerState
115
118
  }) => (0, _extends2.default)({
116
- padding: '16.5px 14px',
119
+ padding: '16.5px 14px'
120
+ }, !theme.vars && {
117
121
  '&:-webkit-autofill': {
118
122
  WebkitBoxShadow: theme.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset',
119
123
  WebkitTextFillColor: theme.palette.mode === 'light' ? null : '#fff',
120
124
  caretColor: theme.palette.mode === 'light' ? null : '#fff',
121
125
  borderRadius: 'inherit'
122
126
  }
127
+ }, theme.vars && {
128
+ '&:-webkit-autofill': {
129
+ borderRadius: 'inherit'
130
+ },
131
+ [theme.getColorSchemeSelector('dark')]: {
132
+ '&:-webkit-autofill': {
133
+ WebkitBoxShadow: '0 0 0 100px #266798 inset',
134
+ WebkitTextFillColor: '#fff',
135
+ caretColor: '#fff'
136
+ }
137
+ }
123
138
  }, ownerState.size === 'small' && {
124
139
  padding: '8.5px 14px'
125
140
  }, ownerState.multiline && {
@@ -153,12 +168,25 @@ const OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inPro
153
168
  muiFormControl,
154
169
  states: ['required']
155
170
  });
171
+ const ownerState = (0, _extends2.default)({}, props, {
172
+ color: fcs.color || 'primary',
173
+ disabled: fcs.disabled,
174
+ error: fcs.error,
175
+ focused: fcs.focused,
176
+ formControl: muiFormControl,
177
+ fullWidth,
178
+ hiddenLabel: fcs.hiddenLabel,
179
+ multiline,
180
+ size: fcs.size,
181
+ type
182
+ });
156
183
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputBase.default, (0, _extends2.default)({
157
184
  components: (0, _extends2.default)({
158
185
  Root: OutlinedInputRoot,
159
186
  Input: OutlinedInputInput
160
187
  }, components),
161
188
  renderSuffix: state => /*#__PURE__*/(0, _jsxRuntime.jsx)(NotchedOutlineRoot, {
189
+ ownerState: ownerState,
162
190
  className: classes.notchedOutline,
163
191
  label: label != null && label !== '' && fcs.required ? _React$Fragment || (_React$Fragment = /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
164
192
  children: [label, "\xA0", '*']
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
@@ -21,7 +19,19 @@ Object.defineProperty(exports, "popoverClasses", {
21
19
  }
22
20
  });
23
21
 
24
- var _Popover = _interopRequireDefault(require("./Popover"));
22
+ var _Popover = _interopRequireWildcard(require("./Popover"));
23
+
24
+ Object.keys(_Popover).forEach(function (key) {
25
+ if (key === "default" || key === "__esModule") return;
26
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
27
+ if (key in exports && exports[key] === _Popover[key]) return;
28
+ Object.defineProperty(exports, key, {
29
+ enumerable: true,
30
+ get: function () {
31
+ return _Popover[key];
32
+ }
33
+ });
34
+ });
25
35
 
26
36
  var _popoverClasses = _interopRequireWildcard(require("./popoverClasses"));
27
37
 
@@ -97,7 +97,7 @@ const SkeletonRoot = (0, _styled.default)('span', {
97
97
  return (0, _extends2.default)({
98
98
  display: 'block',
99
99
  // Create a "on paper" color with sufficient contrast retaining the color
100
- backgroundColor: (0, _styles.alpha)(theme.palette.text.primary, theme.palette.mode === 'light' ? 0.11 : 0.13),
100
+ backgroundColor: theme.vars ? theme.vars.palette.Skeleton.bg : (0, _styles.alpha)(theme.palette.text.primary, theme.palette.mode === 'light' ? 0.11 : 0.13),
101
101
  height: '1.2em'
102
102
  }, ownerState.variant === 'text' && {
103
103
  marginTop: 0,
@@ -136,7 +136,12 @@ const SkeletonRoot = (0, _styled.default)('span', {
136
136
 
137
137
  &::after {
138
138
  animation: ${waveKeyframe} 1.6s linear 0.5s infinite;
139
- background: linear-gradient(90deg, transparent, ${theme.palette.action.hover}, transparent);
139
+ background: linear-gradient(
140
+ 90deg,
141
+ transparent,
142
+ ${(theme.vars || theme).palette.action.hover},
143
+ transparent
144
+ );
140
145
  content: '';
141
146
  position: absolute;
142
147
  transform: translateX(-100%); /* Avoid flash during server-side hydration */
@@ -64,7 +64,7 @@ const SliderRoot = (0, _styled.default)('span', {
64
64
  position: 'relative',
65
65
  cursor: 'pointer',
66
66
  touchAction: 'none',
67
- color: theme.palette[ownerState.color].main,
67
+ color: (theme.vars || theme).palette[ownerState.color].main,
68
68
  WebkitTapHighlightColor: 'transparent'
69
69
  }, ownerState.orientation === 'horizontal' && (0, _extends2.default)({
70
70
  height: 4,
@@ -99,7 +99,7 @@ const SliderRoot = (0, _styled.default)('span', {
99
99
  [`&.${sliderClasses.disabled}`]: {
100
100
  pointerEvents: 'none',
101
101
  cursor: 'default',
102
- color: theme.palette.grey[400]
102
+ color: (theme.vars || theme).palette.grey[400]
103
103
  },
104
104
  [`&.${sliderClasses.dragging}`]: {
105
105
  [`& .${sliderClasses.thumb}, & .${sliderClasses.track}`]: {
@@ -192,8 +192,8 @@ const SliderTrack = (0, _styled.default)('span', {
192
192
  }, ownerState.track === false && {
193
193
  display: 'none'
194
194
  }, ownerState.track === 'inverted' && {
195
- backgroundColor: color,
196
- borderColor: color
195
+ backgroundColor: theme.vars ? theme.vars.palette.Slider[`${ownerState.color}Track`] : color,
196
+ borderColor: theme.vars ? theme.vars.palette.Slider[`${ownerState.color}Track`] : color
197
197
  });
198
198
  });
199
199
  exports.SliderTrack = SliderTrack;
@@ -252,7 +252,7 @@ const SliderThumb = (0, _styled.default)('span', {
252
252
  borderRadius: 'inherit',
253
253
  width: '100%',
254
254
  height: '100%',
255
- boxShadow: theme.shadows[2]
255
+ boxShadow: (theme.vars || theme).shadows[2]
256
256
  }, ownerState.size === 'small' && {
257
257
  boxShadow: 'none'
258
258
  }),
@@ -268,13 +268,13 @@ const SliderThumb = (0, _styled.default)('span', {
268
268
  transform: 'translate(-50%, -50%)'
269
269
  },
270
270
  [`&:hover, &.${sliderClasses.focusVisible}`]: {
271
- boxShadow: `0px 0px 0px 8px ${(0, _system.alpha)(theme.palette[ownerState.color].main, 0.16)}`,
271
+ boxShadow: `0px 0px 0px 8px ${theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.16)` : (0, _system.alpha)(theme.palette[ownerState.color].main, 0.16)}`,
272
272
  '@media (hover: none)': {
273
273
  boxShadow: 'none'
274
274
  }
275
275
  },
276
276
  [`&.${sliderClasses.active}`]: {
277
- boxShadow: `0px 0px 0px 14px ${(0, _system.alpha)(theme.palette[ownerState.color].main, 0.16)}`
277
+ boxShadow: `0px 0px 0px 14px ${theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.16)` : (0, _system.alpha)(theme.palette[ownerState.color].main, 0.16)}`
278
278
  },
279
279
  [`&.${sliderClasses.disabled}`]: {
280
280
  '&:hover': {
@@ -317,9 +317,9 @@ const SliderValueLabel = (0, _styled.default)(_SliderUnstyled.SliderValueLabelUn
317
317
  transformOrigin: 'bottom center',
318
318
  transform: 'translateY(-100%) scale(0)',
319
319
  position: 'absolute',
320
- backgroundColor: theme.palette.grey[600],
320
+ backgroundColor: (theme.vars || theme).palette.grey[600],
321
321
  borderRadius: 2,
322
- color: theme.palette.common.white,
322
+ color: (theme.vars || theme).palette.common.white,
323
323
  display: 'flex',
324
324
  alignItems: 'center',
325
325
  justifyContent: 'center',
@@ -389,7 +389,7 @@ const SliderMark = (0, _styled.default)('span', {
389
389
  left: '50%',
390
390
  transform: 'translate(-50%, 1px)'
391
391
  }, markActive && {
392
- backgroundColor: theme.palette.background.paper,
392
+ backgroundColor: (theme.vars || theme).palette.background.paper,
393
393
  opacity: 0.8
394
394
  }));
395
395
  exports.SliderMark = SliderMark;
@@ -416,7 +416,7 @@ const SliderMarkLabel = (0, _styled.default)('span', {
416
416
  ownerState,
417
417
  markLabelActive
418
418
  }) => (0, _extends2.default)({}, theme.typography.body2, {
419
- color: theme.palette.text.secondary,
419
+ color: (theme.vars || theme).palette.text.secondary,
420
420
  position: 'absolute',
421
421
  whiteSpace: 'nowrap'
422
422
  }, ownerState.orientation === 'horizontal' && {
@@ -432,7 +432,7 @@ const SliderMarkLabel = (0, _styled.default)('span', {
432
432
  left: 44
433
433
  }
434
434
  }, markLabelActive && {
435
- color: theme.palette.text.primary
435
+ color: (theme.vars || theme).palette.text.primary
436
436
  }));
437
437
  exports.SliderMarkLabel = SliderMarkLabel;
438
438
  process.env.NODE_ENV !== "production" ? SliderMarkLabel.propTypes
@@ -606,22 +606,24 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes
606
606
  * @default {}
607
607
  */
608
608
  componentsProps: _propTypes.default.shape({
609
- input: _propTypes.default.object,
610
- mark: _propTypes.default.object,
611
- markLabel: _propTypes.default.object,
612
- rail: _propTypes.default.object,
613
- root: _propTypes.default.object,
614
- thumb: _propTypes.default.object,
615
- track: _propTypes.default.object,
616
- valueLabel: _propTypes.default.shape({
609
+ input: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
610
+ mark: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
611
+ markLabel: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
612
+ rail: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
613
+ root: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
614
+ thumb: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
615
+ track: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
616
+ valueLabel: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.shape({
617
+ children: _propTypes.default.element,
617
618
  className: _propTypes.default.string,
618
619
  components: _propTypes.default.shape({
619
620
  Root: _propTypes.default.elementType
620
621
  }),
622
+ open: _propTypes.default.bool,
621
623
  style: _propTypes.default.object,
622
- value: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.number), _propTypes.default.number]),
624
+ value: _propTypes.default.number,
623
625
  valueLabelDisplay: _propTypes.default.oneOf(['auto', 'off', 'on'])
624
- })
626
+ })])
625
627
  }),
626
628
 
627
629
  /**
@@ -70,15 +70,11 @@ const SnackbarRoot = (0, _styled.default)('div', {
70
70
  theme,
71
71
  ownerState
72
72
  }) => {
73
- const center = (0, _extends2.default)({}, !ownerState.isRtl && {
73
+ const center = {
74
74
  left: '50%',
75
75
  right: 'auto',
76
76
  transform: 'translateX(-50%)'
77
- }, ownerState.isRtl && {
78
- right: '50%',
79
- left: 'auto',
80
- transform: 'translateX(50%)'
81
- });
77
+ };
82
78
  return (0, _extends2.default)({
83
79
  zIndex: (theme.vars || theme).zIndex.snackbar,
84
80
  position: 'fixed',
@@ -100,19 +96,13 @@ const SnackbarRoot = (0, _styled.default)('div', {
100
96
  top: 24
101
97
  } : {
102
98
  bottom: 24
103
- }, ownerState.anchorOrigin.horizontal === 'center' && center, ownerState.anchorOrigin.horizontal === 'left' && (0, _extends2.default)({}, !ownerState.isRtl && {
99
+ }, ownerState.anchorOrigin.horizontal === 'center' && center, ownerState.anchorOrigin.horizontal === 'left' && {
104
100
  left: 24,
105
101
  right: 'auto'
106
- }, ownerState.isRtl && {
102
+ }, ownerState.anchorOrigin.horizontal === 'right' && {
107
103
  right: 24,
108
104
  left: 'auto'
109
- }), ownerState.anchorOrigin.horizontal === 'right' && (0, _extends2.default)({}, !ownerState.isRtl && {
110
- right: 24,
111
- left: 'auto'
112
- }, ownerState.isRtl && {
113
- left: 24,
114
- right: 'auto'
115
- }))
105
+ })
116
106
  });
117
107
  });
118
108
  const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
@@ -157,13 +147,11 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
157
147
  } = props,
158
148
  TransitionProps = (0, _objectWithoutPropertiesLoose2.default)(props.TransitionProps, _excluded),
159
149
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded2);
160
- const isRtl = theme.direction === 'rtl';
161
150
  const ownerState = (0, _extends2.default)({}, props, {
162
151
  anchorOrigin: {
163
152
  vertical,
164
153
  horizontal
165
- },
166
- isRtl
154
+ }
167
155
  });
168
156
  const classes = useUtilityClasses(ownerState);
169
157
  const timerAutoHide = React.useRef();
@@ -59,13 +59,13 @@ const SnackbarContentRoot = (0, _styled.default)(_Paper.default, {
59
59
  const emphasis = theme.palette.mode === 'light' ? 0.8 : 0.98;
60
60
  const backgroundColor = (0, _system.emphasize)(theme.palette.background.default, emphasis);
61
61
  return (0, _extends2.default)({}, theme.typography.body2, {
62
- color: theme.palette.getContrastText(backgroundColor),
63
- backgroundColor,
62
+ color: theme.vars ? theme.vars.palette.text.primary : theme.palette.getContrastText(backgroundColor),
63
+ backgroundColor: theme.vars ? theme.vars.palette.SnackbarContent.bg : backgroundColor,
64
64
  display: 'flex',
65
65
  alignItems: 'center',
66
66
  flexWrap: 'wrap',
67
67
  padding: '6px 16px',
68
- borderRadius: theme.shape.borderRadius,
68
+ borderRadius: (theme.vars || theme).shape.borderRadius,
69
69
  flexGrow: 1,
70
70
  [theme.breakpoints.up('sm')]: {
71
71
  flexGrow: 'initial',
@@ -70,10 +70,10 @@ const SpeedDialActionFab = (0, _styled.default)(_Fab.default, {
70
70
  ownerState
71
71
  }) => (0, _extends2.default)({
72
72
  margin: 8,
73
- color: theme.palette.text.secondary,
74
- backgroundColor: theme.palette.background.paper,
73
+ color: (theme.vars || theme).palette.text.secondary,
74
+ backgroundColor: (theme.vars || theme).palette.background.paper,
75
75
  '&:hover': {
76
- backgroundColor: (0, _system.emphasize)(theme.palette.background.paper, 0.15)
76
+ backgroundColor: theme.vars ? theme.vars.palette.SpeedDialAction.fabHoverBg : (0, _system.emphasize)(theme.palette.background.paper, 0.15)
77
77
  },
78
78
  transition: `${theme.transitions.create('transform', {
79
79
  duration: theme.transitions.duration.shorter
@@ -126,10 +126,10 @@ const SpeedDialActionStaticTooltipLabel = (0, _styled.default)('span', {
126
126
  }) => (0, _extends2.default)({
127
127
  position: 'absolute'
128
128
  }, theme.typography.body1, {
129
- backgroundColor: theme.palette.background.paper,
130
- borderRadius: theme.shape.borderRadius,
131
- boxShadow: theme.shadows[1],
132
- color: theme.palette.text.secondary,
129
+ backgroundColor: (theme.vars || theme).palette.background.paper,
130
+ borderRadius: (theme.vars || theme).shape.borderRadius,
131
+ boxShadow: (theme.vars || theme).shadows[1],
132
+ color: (theme.vars || theme).palette.text.secondary,
133
133
  padding: '4px 16px',
134
134
  wordBreak: 'keep-all'
135
135
  }));
@@ -80,7 +80,7 @@ const style = ({
80
80
  if (ownerState.spacing) {
81
81
  const transformer = (0, _system.createUnarySpacing)(theme);
82
82
  const base = Object.keys(theme.breakpoints.values).reduce((acc, breakpoint) => {
83
- if (ownerState.spacing[breakpoint] != null || ownerState.direction[breakpoint] != null) {
83
+ if (typeof ownerState.spacing === 'object' && ownerState.spacing[breakpoint] != null || typeof ownerState.direction === 'object' && ownerState.direction[breakpoint] != null) {
84
84
  acc[breakpoint] = true;
85
85
  }
86
86
 
@@ -89,17 +89,20 @@ const StepConnectorLine = (0, _styled.default)('span', {
89
89
  })(({
90
90
  ownerState,
91
91
  theme
92
- }) => (0, _extends2.default)({
93
- display: 'block',
94
- borderColor: theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]
95
- }, ownerState.orientation === 'horizontal' && {
96
- borderTopStyle: 'solid',
97
- borderTopWidth: 1
98
- }, ownerState.orientation === 'vertical' && {
99
- borderLeftStyle: 'solid',
100
- borderLeftWidth: 1,
101
- minHeight: 24
102
- }));
92
+ }) => {
93
+ const borderColor = theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600];
94
+ return (0, _extends2.default)({
95
+ display: 'block',
96
+ borderColor: theme.vars ? theme.vars.palette.StepConnector.border : borderColor
97
+ }, ownerState.orientation === 'horizontal' && {
98
+ borderTopStyle: 'solid',
99
+ borderTopWidth: 1
100
+ }, ownerState.orientation === 'vertical' && {
101
+ borderLeftStyle: 'solid',
102
+ borderLeftWidth: 1,
103
+ minHeight: 24
104
+ });
105
+ });
103
106
  const StepConnector = /*#__PURE__*/React.forwardRef(function StepConnector(inProps, ref) {
104
107
  const props = (0, _useThemeProps.default)({
105
108
  props: inProps,
@@ -69,7 +69,7 @@ const StepContentRoot = (0, _styled.default)('div', {
69
69
  paddingLeft: 8 + 12,
70
70
  // margin + half icon
71
71
  paddingRight: 8,
72
- borderLeft: `1px solid ${theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]}`
72
+ borderLeft: theme.vars ? `1px solid ${theme.vars.palette.StepContent.border}` : `1px solid ${theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]}`
73
73
  }, ownerState.last && {
74
74
  borderLeft: 'none'
75
75
  }));