@mui/material 5.10.8 → 5.10.10
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/ButtonBase/ButtonBase.js +1 -2
- package/CHANGELOG.md +208 -19
- package/CssBaseline/CssBaseline.js +15 -3
- package/Fade/Fade.js +1 -2
- package/Grow/Grow.js +1 -2
- package/InputBase/InputBase.js +1 -3
- package/Popover/Popover.js +13 -1
- package/Rating/Rating.js +1 -2
- package/ScopedCssBaseline/ScopedCssBaseline.js +13 -1
- package/Slide/Slide.js +1 -2
- package/Tooltip/Tooltip.js +1 -3
- package/Unstable_TrapFocus/index.d.ts +1 -1
- package/Zoom/Zoom.js +1 -2
- package/esm/ButtonBase/ButtonBase.js +1 -2
- package/esm/CssBaseline/CssBaseline.js +16 -3
- package/esm/Fade/Fade.js +1 -2
- package/esm/Grow/Grow.js +1 -2
- package/esm/InputBase/InputBase.js +1 -3
- package/esm/Popover/Popover.js +13 -1
- package/esm/Rating/Rating.js +1 -2
- package/esm/ScopedCssBaseline/ScopedCssBaseline.js +13 -1
- package/esm/Slide/Slide.js +1 -2
- package/esm/Tooltip/Tooltip.js +1 -3
- package/esm/Zoom/Zoom.js +1 -2
- package/esm/utils/createSvgIcon.js +8 -6
- package/index.js +1 -1
- package/legacy/ButtonBase/ButtonBase.js +1 -2
- package/legacy/CssBaseline/CssBaseline.js +21 -3
- package/legacy/Fade/Fade.js +1 -2
- package/legacy/Grow/Grow.js +1 -2
- package/legacy/InputBase/InputBase.js +1 -3
- package/legacy/Popover/Popover.js +17 -1
- package/legacy/Rating/Rating.js +1 -2
- package/legacy/ScopedCssBaseline/ScopedCssBaseline.js +18 -1
- package/legacy/Slide/Slide.js +1 -2
- package/legacy/Tooltip/Tooltip.js +1 -3
- package/legacy/Zoom/Zoom.js +1 -2
- package/legacy/index.js +1 -1
- package/legacy/utils/createSvgIcon.js +2 -2
- package/modern/ButtonBase/ButtonBase.js +1 -2
- package/modern/CssBaseline/CssBaseline.js +14 -3
- package/modern/Fade/Fade.js +1 -2
- package/modern/Grow/Grow.js +1 -2
- package/modern/InputBase/InputBase.js +1 -3
- package/modern/Popover/Popover.js +13 -1
- package/modern/Rating/Rating.js +1 -2
- package/modern/ScopedCssBaseline/ScopedCssBaseline.js +11 -1
- package/modern/Slide/Slide.js +1 -2
- package/modern/Tooltip/Tooltip.js +1 -3
- package/modern/Zoom/Zoom.js +1 -2
- package/modern/index.js +1 -1
- package/modern/utils/createSvgIcon.js +8 -6
- package/package.json +5 -5
- package/styles/components.d.ts +3 -0
- package/styles/experimental_extendTheme.d.ts +1 -1
- package/umd/material-ui.development.js +165 -95
- package/umd/material-ui.production.min.js +20 -20
- package/utils/createSvgIcon.js +8 -6
package/esm/Slide/Slide.js
CHANGED
|
@@ -119,8 +119,7 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
|
119
119
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
120
120
|
|
|
121
121
|
const childrenRef = React.useRef(null);
|
|
122
|
-
const
|
|
123
|
-
const handleRef = useForkRef(handleRefIntermediary, ref);
|
|
122
|
+
const handleRef = useForkRef(children.ref, childrenRef, ref);
|
|
124
123
|
|
|
125
124
|
const normalizedTransitionCallback = callback => isAppearing => {
|
|
126
125
|
if (callback) {
|
package/esm/Tooltip/Tooltip.js
CHANGED
|
@@ -461,9 +461,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
461
461
|
document.removeEventListener('keydown', handleKeyDown);
|
|
462
462
|
};
|
|
463
463
|
}, [handleClose, open]);
|
|
464
|
-
const
|
|
465
|
-
const handleFocusRef = useForkRef(focusVisibleRef, handleUseRef);
|
|
466
|
-
const handleRef = useForkRef(children.ref, handleFocusRef); // There is no point in displaying an empty tooltip.
|
|
464
|
+
const handleRef = useForkRef(children.ref, focusVisibleRef, setChildNode, ref); // There is no point in displaying an empty tooltip.
|
|
467
465
|
|
|
468
466
|
if (typeof title !== 'number' && !title) {
|
|
469
467
|
open = false;
|
package/esm/Zoom/Zoom.js
CHANGED
|
@@ -50,8 +50,7 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
50
50
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
51
51
|
|
|
52
52
|
const nodeRef = React.useRef(null);
|
|
53
|
-
const
|
|
54
|
-
const handleRef = useForkRef(nodeRef, foreignRef);
|
|
53
|
+
const handleRef = useForkRef(nodeRef, children.ref, ref);
|
|
55
54
|
|
|
56
55
|
const normalizedTransitionCallback = callback => maybeIsAppearing => {
|
|
57
56
|
if (callback) {
|
|
@@ -7,12 +7,14 @@ import SvgIcon from '../SvgIcon';
|
|
|
7
7
|
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
export default function createSvgIcon(path, displayName) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
function Component(props, ref) {
|
|
11
|
+
return /*#__PURE__*/_jsx(SvgIcon, _extends({
|
|
12
|
+
"data-testid": `${displayName}Icon`,
|
|
13
|
+
ref: ref
|
|
14
|
+
}, props, {
|
|
15
|
+
children: path
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
16
18
|
|
|
17
19
|
if (process.env.NODE_ENV !== 'production') {
|
|
18
20
|
// Need to set `displayName` on the inner component for React.memo.
|
package/index.js
CHANGED
|
@@ -313,8 +313,7 @@ var ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, ref)
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
var
|
|
317
|
-
var handleRef = useForkRef(ref, handleOwnRef);
|
|
316
|
+
var handleRef = useForkRef(ref, focusVisibleRef, buttonRef);
|
|
318
317
|
|
|
319
318
|
if (process.env.NODE_ENV !== 'production') {
|
|
320
319
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
1
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import PropTypes from 'prop-types';
|
|
@@ -16,7 +17,7 @@ export var html = function html(theme, enableColorScheme) {
|
|
|
16
17
|
boxSizing: 'border-box',
|
|
17
18
|
// Fix font resize problem in iOS
|
|
18
19
|
WebkitTextSizeAdjust: '100%'
|
|
19
|
-
}, enableColorScheme && {
|
|
20
|
+
}, enableColorScheme && !theme.vars && {
|
|
20
21
|
colorScheme: theme.palette.mode
|
|
21
22
|
});
|
|
22
23
|
};
|
|
@@ -36,7 +37,23 @@ var _styles = function styles(theme) {
|
|
|
36
37
|
var _theme$components, _theme$components$Mui;
|
|
37
38
|
|
|
38
39
|
var enableColorScheme = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
39
|
-
var
|
|
40
|
+
var colorSchemeStyles = {};
|
|
41
|
+
|
|
42
|
+
if (enableColorScheme && theme.colorSchemes) {
|
|
43
|
+
Object.entries(theme.colorSchemes).forEach(function (_ref) {
|
|
44
|
+
var _scheme$palette;
|
|
45
|
+
|
|
46
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
47
|
+
key = _ref2[0],
|
|
48
|
+
scheme = _ref2[1];
|
|
49
|
+
|
|
50
|
+
colorSchemeStyles[theme.getColorSchemeSelector(key).replace(/\s*&/, '')] = {
|
|
51
|
+
colorScheme: (_scheme$palette = scheme.palette) == null ? void 0 : _scheme$palette.mode
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
var defaultStyles = _extends({
|
|
40
57
|
html: html(theme, enableColorScheme),
|
|
41
58
|
'*, *::before, *::after': {
|
|
42
59
|
boxSizing: 'inherit'
|
|
@@ -53,7 +70,8 @@ var _styles = function styles(theme) {
|
|
|
53
70
|
backgroundColor: (theme.vars || theme).palette.background.default
|
|
54
71
|
}
|
|
55
72
|
})
|
|
56
|
-
};
|
|
73
|
+
}, colorSchemeStyles);
|
|
74
|
+
|
|
57
75
|
var themeOverrides = (_theme$components = theme.components) == null ? void 0 : (_theme$components$Mui = _theme$components.MuiCssBaseline) == null ? void 0 : _theme$components$Mui.styleOverrides;
|
|
58
76
|
|
|
59
77
|
if (themeOverrides) {
|
package/legacy/Fade/Fade.js
CHANGED
|
@@ -49,8 +49,7 @@ var Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {
|
|
|
49
49
|
|
|
50
50
|
var enableStrictModeCompat = true;
|
|
51
51
|
var nodeRef = React.useRef(null);
|
|
52
|
-
var
|
|
53
|
-
var handleRef = useForkRef(nodeRef, foreignRef);
|
|
52
|
+
var handleRef = useForkRef(nodeRef, _children.ref, ref);
|
|
54
53
|
|
|
55
54
|
var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {
|
|
56
55
|
return function (maybeIsAppearing) {
|
package/legacy/Grow/Grow.js
CHANGED
|
@@ -59,8 +59,7 @@ var Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
|
|
|
59
59
|
var autoTimeout = React.useRef();
|
|
60
60
|
var theme = useTheme();
|
|
61
61
|
var nodeRef = React.useRef(null);
|
|
62
|
-
var
|
|
63
|
-
var handleRef = useForkRef(nodeRef, foreignRef);
|
|
62
|
+
var handleRef = useForkRef(nodeRef, _children.ref, ref);
|
|
64
63
|
|
|
65
64
|
var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {
|
|
66
65
|
return function (maybeIsAppearing) {
|
|
@@ -269,9 +269,7 @@ var InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref) {
|
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
}, []);
|
|
272
|
-
var
|
|
273
|
-
var handleInputRefProp = useForkRef(inputRefProp, handleInputPropsRefProp);
|
|
274
|
-
var handleInputRef = useForkRef(inputRef, handleInputRefProp);
|
|
272
|
+
var handleInputRef = useForkRef(inputRef, inputRefProp, inputPropsProp.ref, handleInputRefWarning);
|
|
275
273
|
|
|
276
274
|
var _React$useState = React.useState(false),
|
|
277
275
|
focused = _React$useState[0],
|
|
@@ -248,6 +248,11 @@ var Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
248
248
|
transformOrigin: getTransformOriginValue(elemTransformOrigin)
|
|
249
249
|
};
|
|
250
250
|
}, [anchorEl, anchorReference, getAnchorOffset, getTransformOrigin, marginThreshold]);
|
|
251
|
+
|
|
252
|
+
var _React$useState = React.useState(open),
|
|
253
|
+
isPositioned = _React$useState[0],
|
|
254
|
+
setIsPositioned = _React$useState[1];
|
|
255
|
+
|
|
251
256
|
var setPositioningStyles = React.useCallback(function () {
|
|
252
257
|
var element = paperRef.current;
|
|
253
258
|
|
|
@@ -266,6 +271,7 @@ var Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
266
271
|
}
|
|
267
272
|
|
|
268
273
|
element.style.transformOrigin = positioning.transformOrigin;
|
|
274
|
+
setIsPositioned(true);
|
|
269
275
|
}, [getPositioningStyle]);
|
|
270
276
|
|
|
271
277
|
var handleEntering = function handleEntering(element, isAppearing) {
|
|
@@ -276,6 +282,10 @@ var Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
276
282
|
setPositioningStyles();
|
|
277
283
|
};
|
|
278
284
|
|
|
285
|
+
var handleExited = function handleExited() {
|
|
286
|
+
setIsPositioned(false);
|
|
287
|
+
};
|
|
288
|
+
|
|
279
289
|
React.useEffect(function () {
|
|
280
290
|
if (open) {
|
|
281
291
|
setPositioningStyles();
|
|
@@ -327,13 +337,19 @@ var Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
327
337
|
appear: true,
|
|
328
338
|
in: open,
|
|
329
339
|
onEntering: handleEntering,
|
|
340
|
+
onExited: handleExited,
|
|
330
341
|
timeout: transitionDuration
|
|
331
342
|
}, TransitionProps, {
|
|
332
343
|
children: /*#__PURE__*/_jsx(PopoverPaper, _extends({
|
|
333
344
|
elevation: elevation
|
|
334
345
|
}, PaperProps, {
|
|
335
346
|
ref: handlePaperRef,
|
|
336
|
-
className: clsx(classes.paper, PaperProps.className)
|
|
347
|
+
className: clsx(classes.paper, PaperProps.className)
|
|
348
|
+
}, isPositioned ? undefined : {
|
|
349
|
+
style: _extends({}, PaperProps.style, {
|
|
350
|
+
opacity: 0
|
|
351
|
+
})
|
|
352
|
+
}, {
|
|
337
353
|
ownerState: ownerState,
|
|
338
354
|
children: children
|
|
339
355
|
}))
|
package/legacy/Rating/Rating.js
CHANGED
|
@@ -367,8 +367,7 @@ var Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
|
|
|
367
367
|
setFocusVisible = _React$useState2[1];
|
|
368
368
|
|
|
369
369
|
var rootRef = React.useRef();
|
|
370
|
-
var
|
|
371
|
-
var handleRef = useForkRef(handleFocusRef, ref);
|
|
370
|
+
var handleRef = useForkRef(focusVisibleRef, rootRef, ref);
|
|
372
371
|
|
|
373
372
|
var handleMouseMove = function handleMouseMove(event) {
|
|
374
373
|
if (onMouseMove) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
5
6
|
import clsx from 'clsx';
|
|
@@ -27,6 +28,22 @@ var ScopedCssBaselineRoot = styled('div', {
|
|
|
27
28
|
})(function (_ref) {
|
|
28
29
|
var theme = _ref.theme,
|
|
29
30
|
ownerState = _ref.ownerState;
|
|
31
|
+
var colorSchemeStyles = {};
|
|
32
|
+
|
|
33
|
+
if (ownerState.enableColorScheme && theme.colorSchemes) {
|
|
34
|
+
Object.entries(theme.colorSchemes).forEach(function (_ref2) {
|
|
35
|
+
var _scheme$palette;
|
|
36
|
+
|
|
37
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
38
|
+
key = _ref3[0],
|
|
39
|
+
scheme = _ref3[1];
|
|
40
|
+
|
|
41
|
+
colorSchemeStyles["&".concat(theme.getColorSchemeSelector(key).replace(/\s*&/, ''))] = {
|
|
42
|
+
colorScheme: (_scheme$palette = scheme.palette) == null ? void 0 : _scheme$palette.mode
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
30
47
|
return _extends({}, html(theme, ownerState.enableColorScheme), body(theme), {
|
|
31
48
|
'& *, & *::before, & *::after': {
|
|
32
49
|
boxSizing: 'inherit'
|
|
@@ -34,7 +51,7 @@ var ScopedCssBaselineRoot = styled('div', {
|
|
|
34
51
|
'& strong, & b': {
|
|
35
52
|
fontWeight: theme.typography.fontWeightBold
|
|
36
53
|
}
|
|
37
|
-
});
|
|
54
|
+
}, colorSchemeStyles);
|
|
38
55
|
});
|
|
39
56
|
var ScopedCssBaseline = /*#__PURE__*/React.forwardRef(function ScopedCssBaseline(inProps, ref) {
|
|
40
57
|
var props = useThemeProps({
|
package/legacy/Slide/Slide.js
CHANGED
|
@@ -120,8 +120,7 @@ var Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
|
120
120
|
other = _objectWithoutProperties(props, ["addEndListener", "appear", "children", "container", "direction", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"]);
|
|
121
121
|
|
|
122
122
|
var childrenRef = React.useRef(null);
|
|
123
|
-
var
|
|
124
|
-
var handleRef = useForkRef(handleRefIntermediary, ref);
|
|
123
|
+
var handleRef = useForkRef(_children.ref, childrenRef, ref);
|
|
125
124
|
|
|
126
125
|
var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {
|
|
127
126
|
return function (isAppearing) {
|
|
@@ -484,9 +484,7 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
484
484
|
document.removeEventListener('keydown', handleKeyDown);
|
|
485
485
|
};
|
|
486
486
|
}, [handleClose, open]);
|
|
487
|
-
var
|
|
488
|
-
var handleFocusRef = useForkRef(focusVisibleRef, handleUseRef);
|
|
489
|
-
var handleRef = useForkRef(children.ref, handleFocusRef); // There is no point in displaying an empty tooltip.
|
|
487
|
+
var handleRef = useForkRef(children.ref, focusVisibleRef, setChildNode, ref); // There is no point in displaying an empty tooltip.
|
|
490
488
|
|
|
491
489
|
if (typeof title !== 'number' && !title) {
|
|
492
490
|
open = false;
|
package/legacy/Zoom/Zoom.js
CHANGED
|
@@ -49,8 +49,7 @@ var Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
49
49
|
other = _objectWithoutProperties(props, ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"]);
|
|
50
50
|
|
|
51
51
|
var nodeRef = React.useRef(null);
|
|
52
|
-
var
|
|
53
|
-
var handleRef = useForkRef(nodeRef, foreignRef);
|
|
52
|
+
var handleRef = useForkRef(nodeRef, _children.ref, ref);
|
|
54
53
|
|
|
55
54
|
var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {
|
|
56
55
|
return function (maybeIsAppearing) {
|
package/legacy/index.js
CHANGED
|
@@ -7,14 +7,14 @@ import SvgIcon from '../SvgIcon';
|
|
|
7
7
|
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
export default function createSvgIcon(path, displayName) {
|
|
10
|
-
|
|
10
|
+
function Component(props, ref) {
|
|
11
11
|
return /*#__PURE__*/_jsx(SvgIcon, _extends({
|
|
12
12
|
"data-testid": "".concat(displayName, "Icon"),
|
|
13
13
|
ref: ref
|
|
14
14
|
}, props, {
|
|
15
15
|
children: path
|
|
16
16
|
}));
|
|
17
|
-
}
|
|
17
|
+
}
|
|
18
18
|
|
|
19
19
|
if (process.env.NODE_ENV !== 'production') {
|
|
20
20
|
// Need to set `displayName` on the inner component for React.memo.
|
|
@@ -295,8 +295,7 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
|
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
-
const
|
|
299
|
-
const handleRef = useForkRef(ref, handleOwnRef);
|
|
298
|
+
const handleRef = useForkRef(ref, focusVisibleRef, buttonRef);
|
|
300
299
|
|
|
301
300
|
if (process.env.NODE_ENV !== 'production') {
|
|
302
301
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
@@ -15,7 +15,7 @@ export const html = (theme, enableColorScheme) => _extends({
|
|
|
15
15
|
boxSizing: 'border-box',
|
|
16
16
|
// Fix font resize problem in iOS
|
|
17
17
|
WebkitTextSizeAdjust: '100%'
|
|
18
|
-
}, enableColorScheme && {
|
|
18
|
+
}, enableColorScheme && !theme.vars && {
|
|
19
19
|
colorScheme: theme.palette.mode
|
|
20
20
|
});
|
|
21
21
|
export const body = theme => _extends({
|
|
@@ -28,7 +28,17 @@ export const body = theme => _extends({
|
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
export const styles = (theme, enableColorScheme = false) => {
|
|
31
|
-
|
|
31
|
+
const colorSchemeStyles = {};
|
|
32
|
+
|
|
33
|
+
if (enableColorScheme && theme.colorSchemes) {
|
|
34
|
+
Object.entries(theme.colorSchemes).forEach(([key, scheme]) => {
|
|
35
|
+
colorSchemeStyles[theme.getColorSchemeSelector(key).replace(/\s*&/, '')] = {
|
|
36
|
+
colorScheme: scheme.palette?.mode
|
|
37
|
+
};
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
let defaultStyles = _extends({
|
|
32
42
|
html: html(theme, enableColorScheme),
|
|
33
43
|
'*, *::before, *::after': {
|
|
34
44
|
boxSizing: 'inherit'
|
|
@@ -45,7 +55,8 @@ export const styles = (theme, enableColorScheme = false) => {
|
|
|
45
55
|
backgroundColor: (theme.vars || theme).palette.background.default
|
|
46
56
|
}
|
|
47
57
|
})
|
|
48
|
-
};
|
|
58
|
+
}, colorSchemeStyles);
|
|
59
|
+
|
|
49
60
|
const themeOverrides = theme.components?.MuiCssBaseline?.styleOverrides;
|
|
50
61
|
|
|
51
62
|
if (themeOverrides) {
|
package/modern/Fade/Fade.js
CHANGED
|
@@ -50,8 +50,7 @@ const Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {
|
|
|
50
50
|
|
|
51
51
|
const enableStrictModeCompat = true;
|
|
52
52
|
const nodeRef = React.useRef(null);
|
|
53
|
-
const
|
|
54
|
-
const handleRef = useForkRef(nodeRef, foreignRef);
|
|
53
|
+
const handleRef = useForkRef(nodeRef, children.ref, ref);
|
|
55
54
|
|
|
56
55
|
const normalizedTransitionCallback = callback => maybeIsAppearing => {
|
|
57
56
|
if (callback) {
|
package/modern/Grow/Grow.js
CHANGED
|
@@ -60,8 +60,7 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
|
|
|
60
60
|
const autoTimeout = React.useRef();
|
|
61
61
|
const theme = useTheme();
|
|
62
62
|
const nodeRef = React.useRef(null);
|
|
63
|
-
const
|
|
64
|
-
const handleRef = useForkRef(nodeRef, foreignRef);
|
|
63
|
+
const handleRef = useForkRef(nodeRef, children.ref, ref);
|
|
65
64
|
|
|
66
65
|
const normalizedTransitionCallback = callback => maybeIsAppearing => {
|
|
67
66
|
if (callback) {
|
|
@@ -268,9 +268,7 @@ const InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref)
|
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
}, []);
|
|
271
|
-
const
|
|
272
|
-
const handleInputRefProp = useForkRef(inputRefProp, handleInputPropsRefProp);
|
|
273
|
-
const handleInputRef = useForkRef(inputRef, handleInputRefProp);
|
|
271
|
+
const handleInputRef = useForkRef(inputRef, inputRefProp, inputPropsProp.ref, handleInputRefWarning);
|
|
274
272
|
const [focused, setFocused] = React.useState(false);
|
|
275
273
|
const muiFormControl = useFormControl();
|
|
276
274
|
|
|
@@ -237,6 +237,7 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
237
237
|
transformOrigin: getTransformOriginValue(elemTransformOrigin)
|
|
238
238
|
};
|
|
239
239
|
}, [anchorEl, anchorReference, getAnchorOffset, getTransformOrigin, marginThreshold]);
|
|
240
|
+
const [isPositioned, setIsPositioned] = React.useState(open);
|
|
240
241
|
const setPositioningStyles = React.useCallback(() => {
|
|
241
242
|
const element = paperRef.current;
|
|
242
243
|
|
|
@@ -255,6 +256,7 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
255
256
|
}
|
|
256
257
|
|
|
257
258
|
element.style.transformOrigin = positioning.transformOrigin;
|
|
259
|
+
setIsPositioned(true);
|
|
258
260
|
}, [getPositioningStyle]);
|
|
259
261
|
|
|
260
262
|
const handleEntering = (element, isAppearing) => {
|
|
@@ -265,6 +267,10 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
265
267
|
setPositioningStyles();
|
|
266
268
|
};
|
|
267
269
|
|
|
270
|
+
const handleExited = () => {
|
|
271
|
+
setIsPositioned(false);
|
|
272
|
+
};
|
|
273
|
+
|
|
268
274
|
React.useEffect(() => {
|
|
269
275
|
if (open) {
|
|
270
276
|
setPositioningStyles();
|
|
@@ -314,13 +320,19 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
314
320
|
appear: true,
|
|
315
321
|
in: open,
|
|
316
322
|
onEntering: handleEntering,
|
|
323
|
+
onExited: handleExited,
|
|
317
324
|
timeout: transitionDuration
|
|
318
325
|
}, TransitionProps, {
|
|
319
326
|
children: /*#__PURE__*/_jsx(PopoverPaper, _extends({
|
|
320
327
|
elevation: elevation
|
|
321
328
|
}, PaperProps, {
|
|
322
329
|
ref: handlePaperRef,
|
|
323
|
-
className: clsx(classes.paper, PaperProps.className)
|
|
330
|
+
className: clsx(classes.paper, PaperProps.className)
|
|
331
|
+
}, isPositioned ? undefined : {
|
|
332
|
+
style: _extends({}, PaperProps.style, {
|
|
333
|
+
opacity: 0
|
|
334
|
+
})
|
|
335
|
+
}, {
|
|
324
336
|
ownerState: ownerState,
|
|
325
337
|
children: children
|
|
326
338
|
}))
|
package/modern/Rating/Rating.js
CHANGED
|
@@ -350,8 +350,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
|
|
|
350
350
|
} = useIsFocusVisible();
|
|
351
351
|
const [focusVisible, setFocusVisible] = React.useState(false);
|
|
352
352
|
const rootRef = React.useRef();
|
|
353
|
-
const
|
|
354
|
-
const handleRef = useForkRef(handleFocusRef, ref);
|
|
353
|
+
const handleRef = useForkRef(focusVisibleRef, rootRef, ref);
|
|
355
354
|
|
|
356
355
|
const handleMouseMove = event => {
|
|
357
356
|
if (onMouseMove) {
|
|
@@ -29,6 +29,16 @@ const ScopedCssBaselineRoot = styled('div', {
|
|
|
29
29
|
theme,
|
|
30
30
|
ownerState
|
|
31
31
|
}) => {
|
|
32
|
+
const colorSchemeStyles = {};
|
|
33
|
+
|
|
34
|
+
if (ownerState.enableColorScheme && theme.colorSchemes) {
|
|
35
|
+
Object.entries(theme.colorSchemes).forEach(([key, scheme]) => {
|
|
36
|
+
colorSchemeStyles[`&${theme.getColorSchemeSelector(key).replace(/\s*&/, '')}`] = {
|
|
37
|
+
colorScheme: scheme.palette?.mode
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
32
42
|
return _extends({}, html(theme, ownerState.enableColorScheme), body(theme), {
|
|
33
43
|
'& *, & *::before, & *::after': {
|
|
34
44
|
boxSizing: 'inherit'
|
|
@@ -36,7 +46,7 @@ const ScopedCssBaselineRoot = styled('div', {
|
|
|
36
46
|
'& strong, & b': {
|
|
37
47
|
fontWeight: theme.typography.fontWeightBold
|
|
38
48
|
}
|
|
39
|
-
});
|
|
49
|
+
}, colorSchemeStyles);
|
|
40
50
|
});
|
|
41
51
|
const ScopedCssBaseline = /*#__PURE__*/React.forwardRef(function ScopedCssBaseline(inProps, ref) {
|
|
42
52
|
const props = useThemeProps({
|
package/modern/Slide/Slide.js
CHANGED
|
@@ -119,8 +119,7 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
|
119
119
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
120
120
|
|
|
121
121
|
const childrenRef = React.useRef(null);
|
|
122
|
-
const
|
|
123
|
-
const handleRef = useForkRef(handleRefIntermediary, ref);
|
|
122
|
+
const handleRef = useForkRef(children.ref, childrenRef, ref);
|
|
124
123
|
|
|
125
124
|
const normalizedTransitionCallback = callback => isAppearing => {
|
|
126
125
|
if (callback) {
|
|
@@ -459,9 +459,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
459
459
|
document.removeEventListener('keydown', handleKeyDown);
|
|
460
460
|
};
|
|
461
461
|
}, [handleClose, open]);
|
|
462
|
-
const
|
|
463
|
-
const handleFocusRef = useForkRef(focusVisibleRef, handleUseRef);
|
|
464
|
-
const handleRef = useForkRef(children.ref, handleFocusRef); // There is no point in displaying an empty tooltip.
|
|
462
|
+
const handleRef = useForkRef(children.ref, focusVisibleRef, setChildNode, ref); // There is no point in displaying an empty tooltip.
|
|
465
463
|
|
|
466
464
|
if (typeof title !== 'number' && !title) {
|
|
467
465
|
open = false;
|
package/modern/Zoom/Zoom.js
CHANGED
|
@@ -50,8 +50,7 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
50
50
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
51
51
|
|
|
52
52
|
const nodeRef = React.useRef(null);
|
|
53
|
-
const
|
|
54
|
-
const handleRef = useForkRef(nodeRef, foreignRef);
|
|
53
|
+
const handleRef = useForkRef(nodeRef, children.ref, ref);
|
|
55
54
|
|
|
56
55
|
const normalizedTransitionCallback = callback => maybeIsAppearing => {
|
|
57
56
|
if (callback) {
|
package/modern/index.js
CHANGED
|
@@ -7,12 +7,14 @@ import SvgIcon from '../SvgIcon';
|
|
|
7
7
|
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
export default function createSvgIcon(path, displayName) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
function Component(props, ref) {
|
|
11
|
+
return /*#__PURE__*/_jsx(SvgIcon, _extends({
|
|
12
|
+
"data-testid": `${displayName}Icon`,
|
|
13
|
+
ref: ref
|
|
14
|
+
}, props, {
|
|
15
|
+
children: path
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
16
18
|
|
|
17
19
|
if (process.env.NODE_ENV !== 'production') {
|
|
18
20
|
// Need to set `displayName` on the inner component for React.memo.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "5.10.
|
|
3
|
+
"version": "5.10.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "React components that implement Google's Material Design.",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@babel/runtime": "^7.19.0",
|
|
49
|
-
"@mui/base": "5.0.0-alpha.
|
|
50
|
-
"@mui/core-downloads-tracker": "^5.10.
|
|
51
|
-
"@mui/system": "^5.10.
|
|
49
|
+
"@mui/base": "5.0.0-alpha.102",
|
|
50
|
+
"@mui/core-downloads-tracker": "^5.10.10",
|
|
51
|
+
"@mui/system": "^5.10.10",
|
|
52
52
|
"@mui/types": "^7.2.0",
|
|
53
|
-
"@mui/utils": "^5.10.
|
|
53
|
+
"@mui/utils": "^5.10.9",
|
|
54
54
|
"@types/react-transition-group": "^4.4.5",
|
|
55
55
|
"clsx": "^1.2.1",
|
|
56
56
|
"csstype": "^3.1.1",
|
package/styles/components.d.ts
CHANGED
|
@@ -480,6 +480,9 @@ export interface Components<Theme = unknown> {
|
|
|
480
480
|
styleOverrides?: ComponentsOverrides<Theme>['MuiSvgIcon'];
|
|
481
481
|
variants?: ComponentsVariants['MuiSvgIcon'];
|
|
482
482
|
};
|
|
483
|
+
MuiSwipeableDrawer?: {
|
|
484
|
+
defaultProps?: ComponentsProps['MuiSwipeableDrawer'];
|
|
485
|
+
};
|
|
483
486
|
MuiSwitch?: {
|
|
484
487
|
defaultProps?: ComponentsProps['MuiSwitch'];
|
|
485
488
|
styleOverrides?: ComponentsOverrides<Theme>['MuiSwitch'];
|
|
@@ -193,7 +193,7 @@ export interface PaletteTooltip {
|
|
|
193
193
|
|
|
194
194
|
// The Palette should be sync with `../themeCssVarsAugmentation/index.d.ts`
|
|
195
195
|
export interface ColorSystemOptions {
|
|
196
|
-
palette?:
|
|
196
|
+
palette?: PaletteOptions & {
|
|
197
197
|
common?: Partial<PaletteCommonChannel>;
|
|
198
198
|
primary?: Partial<PaletteColorChannel>;
|
|
199
199
|
secondary?: Partial<PaletteColorChannel>;
|