@mui/material 5.15.6 → 5.15.7
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/Accordion/index.js +0 -2
- package/AccordionActions/index.js +0 -2
- package/AccordionDetails/index.js +0 -2
- package/AccordionSummary/index.js +0 -2
- package/Avatar/Avatar.js +2 -2
- package/AvatarGroup/AvatarGroup.js +19 -39
- package/Badge/Badge.js +2 -2
- package/ButtonBase/TouchRipple.js +9 -14
- package/CHANGELOG.md +97 -3
- package/Collapse/Collapse.js +3 -8
- package/Grow/Grow.js +3 -8
- package/Rating/index.js +0 -2
- package/Select/Select.js +1 -1
- package/SpeedDial/SpeedDial.js +7 -12
- package/Toolbar/index.js +0 -2
- package/Tooltip/Tooltip.js +29 -40
- package/index.js +1 -3
- package/legacy/Accordion/index.js +0 -2
- package/legacy/AccordionActions/index.js +0 -2
- package/legacy/AccordionDetails/index.js +0 -2
- package/legacy/AccordionSummary/index.js +0 -2
- package/legacy/Avatar/Avatar.js +2 -2
- package/legacy/AvatarGroup/AvatarGroup.js +6 -31
- package/legacy/Badge/Badge.js +2 -2
- package/legacy/ButtonBase/TouchRipple.js +9 -14
- package/legacy/Collapse/Collapse.js +3 -8
- package/legacy/Grow/Grow.js +3 -8
- package/legacy/Rating/index.js +0 -2
- package/legacy/Select/Select.js +1 -1
- package/legacy/SpeedDial/SpeedDial.js +7 -12
- package/legacy/Toolbar/index.js +0 -2
- package/legacy/Tooltip/Tooltip.js +29 -38
- package/legacy/index.js +1 -3
- package/legacy/styles/createTheme.js +1 -13
- package/legacy/zero-styled/index.js +7 -2
- package/modern/Accordion/index.js +0 -2
- package/modern/AccordionActions/index.js +0 -2
- package/modern/AccordionDetails/index.js +0 -2
- package/modern/AccordionSummary/index.js +0 -2
- package/modern/Avatar/Avatar.js +2 -2
- package/modern/AvatarGroup/AvatarGroup.js +19 -39
- package/modern/Badge/Badge.js +2 -2
- package/modern/ButtonBase/TouchRipple.js +9 -14
- package/modern/Collapse/Collapse.js +3 -8
- package/modern/Grow/Grow.js +3 -8
- package/modern/Rating/index.js +0 -2
- package/modern/Select/Select.js +1 -1
- package/modern/SpeedDial/SpeedDial.js +7 -12
- package/modern/Toolbar/index.js +0 -2
- package/modern/Tooltip/Tooltip.js +29 -40
- package/modern/index.js +1 -3
- package/modern/styles/createTheme.js +1 -15
- package/modern/zero-styled/index.js +7 -2
- package/node/Accordion/index.js +0 -1
- package/node/AccordionActions/index.js +0 -1
- package/node/AccordionDetails/index.js +0 -1
- package/node/AccordionSummary/index.js +0 -1
- package/node/Avatar/Avatar.js +2 -2
- package/node/AvatarGroup/AvatarGroup.js +19 -39
- package/node/Badge/Badge.js +2 -2
- package/node/ButtonBase/TouchRipple.js +9 -14
- package/node/Collapse/Collapse.js +2 -7
- package/node/Grow/Grow.js +2 -7
- package/node/Rating/index.js +0 -1
- package/node/Select/Select.js +1 -1
- package/node/SpeedDial/SpeedDial.js +6 -11
- package/node/Toolbar/index.js +0 -1
- package/node/Tooltip/Tooltip.js +28 -39
- package/node/index.js +1 -3
- package/node/styles/createTheme.js +1 -15
- package/node/zero-styled/index.js +7 -1
- package/package.json +6 -6
- package/styles/createTheme.d.ts +0 -1
- package/styles/createTheme.js +1 -15
- package/styles/experimental_extendTheme.d.ts +3 -2
- package/umd/material-ui.development.js +367 -289
- package/umd/material-ui.production.min.js +4 -4
- package/zero-styled/index.d.ts +2 -1
- package/zero-styled/index.js +7 -2
package/Accordion/index.js
CHANGED
package/Avatar/Avatar.js
CHANGED
|
@@ -74,7 +74,7 @@ const AvatarRoot = styled('div', {
|
|
|
74
74
|
backgroundColor: theme.vars.palette.Avatar.defaultBg
|
|
75
75
|
} : _extends({
|
|
76
76
|
backgroundColor: theme.palette.grey[400]
|
|
77
|
-
}, theme.
|
|
77
|
+
}, theme.applyStyles('dark', {
|
|
78
78
|
backgroundColor: theme.palette.grey[600]
|
|
79
79
|
})))
|
|
80
80
|
}]
|
|
@@ -181,7 +181,7 @@ const Avatar = /*#__PURE__*/React.forwardRef(function Avatar(inProps, ref) {
|
|
|
181
181
|
ownerState: ownerState,
|
|
182
182
|
className: classes.img
|
|
183
183
|
}, imgProps));
|
|
184
|
-
} else if (childrenProp != null) {
|
|
184
|
+
} else if (childrenProp != null && childrenProp !== '' && typeof childrenProp !== 'boolean') {
|
|
185
185
|
children = childrenProp;
|
|
186
186
|
} else if (hasImg && alt) {
|
|
187
187
|
children = alt[0];
|
|
@@ -36,33 +36,23 @@ const AvatarGroupRoot = styled('div', {
|
|
|
36
36
|
[`& .${avatarGroupClasses.avatar}`]: styles.avatar
|
|
37
37
|
}, styles.root)
|
|
38
38
|
})(({
|
|
39
|
-
theme
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
})(({
|
|
57
|
-
theme
|
|
58
|
-
}) => ({
|
|
59
|
-
border: `2px solid ${(theme.vars || theme).palette.background.default}`,
|
|
60
|
-
boxSizing: 'content-box',
|
|
61
|
-
marginLeft: -8,
|
|
62
|
-
'&:last-child': {
|
|
63
|
-
marginLeft: 0
|
|
64
|
-
}
|
|
65
|
-
}));
|
|
39
|
+
theme,
|
|
40
|
+
ownerState
|
|
41
|
+
}) => {
|
|
42
|
+
const marginValue = ownerState.spacing && SPACINGS[ownerState.spacing] !== undefined ? SPACINGS[ownerState.spacing] : -ownerState.spacing;
|
|
43
|
+
return {
|
|
44
|
+
[`& .${avatarClasses.root}`]: {
|
|
45
|
+
border: `2px solid ${(theme.vars || theme).palette.background.default}`,
|
|
46
|
+
boxSizing: 'content-box',
|
|
47
|
+
marginLeft: marginValue != null ? marginValue : -8,
|
|
48
|
+
'&:last-child': {
|
|
49
|
+
marginLeft: 0
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
display: 'flex',
|
|
53
|
+
flexDirection: 'row-reverse'
|
|
54
|
+
};
|
|
55
|
+
});
|
|
66
56
|
const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps, ref) {
|
|
67
57
|
var _slotProps$additional;
|
|
68
58
|
const props = useThemeProps({
|
|
@@ -106,7 +96,6 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
106
96
|
const maxAvatars = Math.min(children.length, clampedMax - 1);
|
|
107
97
|
const extraAvatars = Math.max(totalAvatars - clampedMax, totalAvatars - maxAvatars, 0);
|
|
108
98
|
const extraAvatarsElement = renderSurplus ? renderSurplus(extraAvatars) : `+${extraAvatars}`;
|
|
109
|
-
const marginLeft = spacing && SPACINGS[spacing] !== undefined ? SPACINGS[spacing] : -spacing;
|
|
110
99
|
const additionalAvatarSlotProps = (_slotProps$additional = slotProps.additionalAvatar) != null ? _slotProps$additional : componentsProps.additionalAvatar;
|
|
111
100
|
return /*#__PURE__*/_jsxs(AvatarGroupRoot, _extends({
|
|
112
101
|
as: component,
|
|
@@ -114,23 +103,14 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
114
103
|
className: clsx(classes.root, className),
|
|
115
104
|
ref: ref
|
|
116
105
|
}, other, {
|
|
117
|
-
children: [extraAvatars ? /*#__PURE__*/_jsx(
|
|
118
|
-
ownerState: ownerState,
|
|
106
|
+
children: [extraAvatars ? /*#__PURE__*/_jsx(Avatar, _extends({
|
|
119
107
|
variant: variant
|
|
120
108
|
}, additionalAvatarSlotProps, {
|
|
121
109
|
className: clsx(classes.avatar, additionalAvatarSlotProps == null ? void 0 : additionalAvatarSlotProps.className),
|
|
122
|
-
style: _extends({
|
|
123
|
-
marginLeft
|
|
124
|
-
}, additionalAvatarSlotProps == null ? void 0 : additionalAvatarSlotProps.style),
|
|
125
110
|
children: extraAvatarsElement
|
|
126
|
-
})) : null, children.slice(0, maxAvatars).reverse().map(
|
|
111
|
+
})) : null, children.slice(0, maxAvatars).reverse().map(child => {
|
|
127
112
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
128
113
|
className: clsx(child.props.className, classes.avatar),
|
|
129
|
-
style: _extends({
|
|
130
|
-
// Consistent with "&:last-child" styling for the default spacing,
|
|
131
|
-
// we do not apply custom marginLeft spacing on the last child
|
|
132
|
-
marginLeft: index === maxAvatars - 1 ? undefined : marginLeft
|
|
133
|
-
}, child.props.style),
|
|
134
114
|
variant: child.props.variant || variant
|
|
135
115
|
});
|
|
136
116
|
})]
|
package/Badge/Badge.js
CHANGED
|
@@ -10,14 +10,14 @@ import { usePreviousProps } from '@mui/utils';
|
|
|
10
10
|
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
|
|
11
11
|
import { useBadge } from '@mui/base/useBadge';
|
|
12
12
|
import { useSlotProps } from '@mui/base';
|
|
13
|
-
import { styled } from '../zero-styled';
|
|
14
|
-
import useThemeProps from '../styles/useThemeProps';
|
|
13
|
+
import { styled, createUseThemeProps } from '../zero-styled';
|
|
15
14
|
import capitalize from '../utils/capitalize';
|
|
16
15
|
import badgeClasses, { getBadgeUtilityClass } from './badgeClasses';
|
|
17
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
18
|
const RADIUS_STANDARD = 10;
|
|
20
19
|
const RADIUS_DOT = 4;
|
|
20
|
+
const useThemeProps = createUseThemeProps('MuiBadge');
|
|
21
21
|
const useUtilityClasses = ownerState => {
|
|
22
22
|
const {
|
|
23
23
|
color,
|
|
@@ -13,6 +13,7 @@ import PropTypes from 'prop-types';
|
|
|
13
13
|
import { TransitionGroup } from 'react-transition-group';
|
|
14
14
|
import clsx from 'clsx';
|
|
15
15
|
import { keyframes } from '@mui/system';
|
|
16
|
+
import { unstable_useTimeout as useTimeout } from '@mui/utils';
|
|
16
17
|
import styled from '../styles/styled';
|
|
17
18
|
import useThemeProps from '../styles/useThemeProps';
|
|
18
19
|
import Ripple from './Ripple';
|
|
@@ -156,18 +157,11 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
|
|
|
156
157
|
const ignoringMouseDown = React.useRef(false);
|
|
157
158
|
// We use a timer in order to only show the ripples for touch "click" like events.
|
|
158
159
|
// We don't want to display the ripple for touch scroll events.
|
|
159
|
-
const startTimer =
|
|
160
|
+
const startTimer = useTimeout();
|
|
160
161
|
|
|
161
162
|
// This is the hook called once the previous timeout is ready.
|
|
162
163
|
const startTimerCommit = React.useRef(null);
|
|
163
164
|
const container = React.useRef(null);
|
|
164
|
-
React.useEffect(() => {
|
|
165
|
-
return () => {
|
|
166
|
-
if (startTimer.current) {
|
|
167
|
-
clearTimeout(startTimer.current);
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
}, []);
|
|
171
165
|
const startCommit = React.useCallback(params => {
|
|
172
166
|
const {
|
|
173
167
|
pulsate,
|
|
@@ -260,12 +254,13 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
|
|
|
260
254
|
});
|
|
261
255
|
};
|
|
262
256
|
// Delay the execution of the ripple effect.
|
|
263
|
-
|
|
257
|
+
// We have to make a tradeoff with this delay value.
|
|
258
|
+
startTimer.start(DELAY_RIPPLE, () => {
|
|
264
259
|
if (startTimerCommit.current) {
|
|
265
260
|
startTimerCommit.current();
|
|
266
261
|
startTimerCommit.current = null;
|
|
267
262
|
}
|
|
268
|
-
}
|
|
263
|
+
});
|
|
269
264
|
}
|
|
270
265
|
} else {
|
|
271
266
|
startCommit({
|
|
@@ -276,21 +271,21 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
|
|
|
276
271
|
cb
|
|
277
272
|
});
|
|
278
273
|
}
|
|
279
|
-
}, [centerProp, startCommit]);
|
|
274
|
+
}, [centerProp, startCommit, startTimer]);
|
|
280
275
|
const pulsate = React.useCallback(() => {
|
|
281
276
|
start({}, {
|
|
282
277
|
pulsate: true
|
|
283
278
|
});
|
|
284
279
|
}, [start]);
|
|
285
280
|
const stop = React.useCallback((event, cb) => {
|
|
286
|
-
|
|
281
|
+
startTimer.clear();
|
|
287
282
|
|
|
288
283
|
// The touch interaction occurs too quickly.
|
|
289
284
|
// We still want to show ripple effect.
|
|
290
285
|
if ((event == null ? void 0 : event.type) === 'touchend' && startTimerCommit.current) {
|
|
291
286
|
startTimerCommit.current();
|
|
292
287
|
startTimerCommit.current = null;
|
|
293
|
-
startTimer.
|
|
288
|
+
startTimer.start(0, () => {
|
|
294
289
|
stop(event, cb);
|
|
295
290
|
});
|
|
296
291
|
return;
|
|
@@ -303,7 +298,7 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
|
|
|
303
298
|
return oldRipples;
|
|
304
299
|
});
|
|
305
300
|
rippleCallback.current = cb;
|
|
306
|
-
}, []);
|
|
301
|
+
}, [startTimer]);
|
|
307
302
|
React.useImperativeHandle(ref, () => ({
|
|
308
303
|
pulsate,
|
|
309
304
|
start,
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,99 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## v5.15.7
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.15.6..master -->
|
|
6
|
+
|
|
7
|
+
_Jan 31, 2024_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 21 contributors who made this release possible.
|
|
10
|
+
This release was mostly about 🐛 bug fixes and 📚 documentation improvements.
|
|
11
|
+
|
|
12
|
+
### `@mui/material@5.15.7`
|
|
13
|
+
|
|
14
|
+
- ​<!-- 55 -->[Select] Fix to show notched outline when `displayEmpty` (#40865) @ZeeshanTamboli
|
|
15
|
+
- ​<!-- 51 -->[Avatar] Improve fallback when `children` is empty string or boolean (#40766) @mirus-ua
|
|
16
|
+
- ​<!-- 50 -->[AvatarGroup] Refactor component thereby fixing custom spacing logic (#40686) @ZeeshanTamboli
|
|
17
|
+
|
|
18
|
+
### `@mui/codemod@5.15.7`
|
|
19
|
+
|
|
20
|
+
- ​<!-- 38 -->Add accordion props deprecation (#40771) @siriwatknp
|
|
21
|
+
|
|
22
|
+
### `@mui/system@5.15.7`
|
|
23
|
+
|
|
24
|
+
- ​<!-- 56 -->[zero-runtime] Use lodash instead of its subpackages (#40868) @michaldudak
|
|
25
|
+
- ​<!-- 19 -->Add `applyStyles()` to theme (#40667) @siriwatknp
|
|
26
|
+
- ​<!-- 02 -->[zero] Use `theme.applyStyles` in the demo app (#40787) @siriwatknp
|
|
27
|
+
- ​<!-- 01 -->[zero] Add `useThemeProps` processor (#40648) @siriwatknp
|
|
28
|
+
|
|
29
|
+
### `@mui/utils@5.15.7`
|
|
30
|
+
|
|
31
|
+
- ​<!-- 16 -->[core] Remove unnecessary default export (#40788) @siriwatknp
|
|
32
|
+
- ​<!-- 15 -->[core] Convert all exports to modules (#39882) @mnajdova
|
|
33
|
+
- ​<!-- 20 -->[perf] Prevent unneeded `clearTimeout` calls (#39060) @romgrk
|
|
34
|
+
|
|
35
|
+
### `@mui/base@5.0.0-beta.34`
|
|
36
|
+
|
|
37
|
+
- ​<!-- 48 -->[Input] Add OTP input demo (#40539) @sai6855
|
|
38
|
+
- ​<!-- 47 -->[Menu] Focus last item after opening a menu using up arrow (#40764) @Jaswanth-Sriram-Veturi
|
|
39
|
+
- ​<!-- 46 -->[Menu] Focus Menu Items on hover (#40755) @michaldudak
|
|
40
|
+
|
|
41
|
+
### `@mui/joy@5.0.0-beta.25`
|
|
42
|
+
|
|
43
|
+
- ​<!-- 22 -->Change the color scheme type to `SupportedColorScheme` (#40776) @Nikhilh26
|
|
44
|
+
|
|
45
|
+
### `@mui/lab@5.0.0-alpha.163`
|
|
46
|
+
|
|
47
|
+
- ​<!-- 21 -->[TabContext] Support number type in `value` (#40829) @srinidhi9831
|
|
48
|
+
|
|
49
|
+
### Docs
|
|
50
|
+
|
|
51
|
+
- ​<!-- 53 -->[material-ui] Fix typo on styled-components guide (#40858) @dancielos
|
|
52
|
+
- ​<!-- 49 -->[base-ui] Fix CSS vars from the plain CSS theme stylesheet (#40762) @zanivan
|
|
53
|
+
- ​<!-- 31 -->[material-ui][Divider] Remove light prop references from docs (#40782) @sai6855
|
|
54
|
+
- ​<!-- 30 -->Fix build @oliviertassinari
|
|
55
|
+
- ​<!-- 29 -->Add support pages for each product @oliviertassinari
|
|
56
|
+
- ​<!-- 28 -->Add survey banner to docs and website (#40553) @joserodolfofreitas
|
|
57
|
+
- ​<!-- 24 -->[Menu] Fix hydration mismatch error on Base UI's Menu docs (#40758) @michaldudak
|
|
58
|
+
- ​<!-- 25 -->[material-nextjs] Add theming and configuration content to the page (#40626) @siriwatknp
|
|
59
|
+
|
|
60
|
+
### Core
|
|
61
|
+
|
|
62
|
+
- ​<!-- 54 -->[website] Move `React Engineer - X` into the future roles section (#40867) @DanailH
|
|
63
|
+
- ​<!-- 52 -->[material-ui][test][Alert] Add action, icon, and iconMapping tests (#40682) @DiegoAndai
|
|
64
|
+
- ​<!-- 45 -->[blog] Lint duplicate h1 on the page (#40835) @oliviertassinari
|
|
65
|
+
- ​<!-- 44 -->[blog] MUI X v7 beta announcement blogpost (#40784) @joserodolfofreitas
|
|
66
|
+
- ​<!-- 43 -->[code-infra] Remove custom TS installation script (#40636) @michaldudak
|
|
67
|
+
- ​<!-- 42 -->[code-infra] Correct API Docs Builder dependencies (#40775) @michaldudak
|
|
68
|
+
- ​<!-- 41 -->[code-infra] Migrate to prettier async APIs (#40668) @Janpot
|
|
69
|
+
- ​<!-- 40 -->[code-infra] Refined docs generation (#40603) @alexfauquette
|
|
70
|
+
- ​<!-- 39 -->[code-infra] Explain how to install the browsers (#40474) @oliviertassinari
|
|
71
|
+
- ​<!-- 37 -->`missingKeyGenerator` do no longer exist (#40830) @oliviertassinari
|
|
72
|
+
- ​<!-- 36 -->Rely on immutable ref when possible (#40831) @oliviertassinari
|
|
73
|
+
- ​<!-- 35 -->Remove deprecated `@types/markdown-to-jsx` package from docs (#40828) @ZeeshanTamboli
|
|
74
|
+
- ​<!-- 34 -->Remove unneeded `@slack/web-api` package (#40840) @ZeeshanTamboli
|
|
75
|
+
- ​<!-- 33 -->Clarify TODO instruction @oliviertassinari
|
|
76
|
+
- ​<!-- 32 -->Remove unneeded use-clients (#40663) @oliviertassinari
|
|
77
|
+
- ​<!-- 27 -->[docs-infra] Fix anchor link hook (#40836) @oliviertassinari
|
|
78
|
+
- ​<!-- 26 -->[docs-infra] Avoid layout shift on docs-pages (#40749) @oliviertassinari
|
|
79
|
+
- ​<!-- 23 -->[examples] Fix build on Next.js Pages Router examples (#40665) @oliviertassinari
|
|
80
|
+
- ​<!-- 18 -->[test] Speed up the envinfo test (#40669) @michaldudak
|
|
81
|
+
- ​<!-- 17 -->[typescript-to-proptypes] Allow to represent dates as `PropTypes.object` (#40774) @flaviendelangle
|
|
82
|
+
- ​<!-- 14 -->[website] Add new Base UI role (#40773) @colmtuite
|
|
83
|
+
- ​<!-- 13 -->[website] Fix a couple of rough edges (#40849) @danilo-leal
|
|
84
|
+
- ​<!-- 12 -->[website] Small polishing after latest changes to the theme (#40846) @zanivan
|
|
85
|
+
- ​<!-- 11 -->[website] Polish some pages and stray components (#40797) @danilo-leal
|
|
86
|
+
- ​<!-- 10 -->[website] Refine the careers page slightly (#40793) @danilo-leal
|
|
87
|
+
- ​<!-- 09 -->[website] Fix missing key on the Testimonials section (#40791) @Janpot
|
|
88
|
+
- ​<!-- 08 -->[website] Fix Footer layout shift (#40786) @oliviertassinari
|
|
89
|
+
- ​<!-- 07 -->[website] Revamp the testimonial section in the homepage (#40752) @danilo-leal
|
|
90
|
+
- ​<!-- 06 -->[website] Fix pricing license model toggle style (#40747) @oliviertassinari
|
|
91
|
+
- ​<!-- 05 -->[website] Fine-tune colors and styles on the branding theme (#40751) @danilo-leal
|
|
92
|
+
- ​<!-- 04 -->[website] Fix Toggle Button styles in the homepage demos (#40744) @mohamedsaiedd
|
|
93
|
+
- ​<!-- 03 -->[website] Update stats on the testimonials section (#40769) @EyaOuenniche
|
|
94
|
+
|
|
95
|
+
All contributors of this release in alphabetical order: @alexfauquette, @colmtuite, @danilo-leal, @DiegoAndai, @EyaOuenniche, @flaviendelangle, @Janpot, @Jaswanth-Sriram-Veturi, @joserodolfofreitas, @michaldudak, @mirus-ua, @mnajdova, @mohamedsaiedd, @Nikhilh26, @oliviertassinari, @romgrk, @sai6855, @siriwatknp, @srinidhi9831, @zanivan, @ZeeshanTamboli
|
|
96
|
+
|
|
3
97
|
## v5.15.6
|
|
4
98
|
|
|
5
99
|
<!-- generated comparing v5.15.5..master -->
|
|
@@ -3712,7 +3806,7 @@ This release was mostly about 🐛 bug fixes and 📚 documentation improvements
|
|
|
3712
3806
|
|
|
3713
3807
|
### Core
|
|
3714
3808
|
|
|
3715
|
-
- [core] Close 2022
|
|
3809
|
+
- [core] Close 2022 Developer Survey @oliviertassinari
|
|
3716
3810
|
- [core] Fix the product license reference name (#35703) @oliviertassinari
|
|
3717
3811
|
- [core] Use TypeScript AST instead of TTP for component doc building (#35379) @flaviendelangle
|
|
3718
3812
|
- [test] Always use & for nesting styles (#35702) @oliviertassinari
|
|
@@ -3946,7 +4040,7 @@ A big thanks to the 19 contributors who made this release possible. Here are som
|
|
|
3946
4040
|
- [docs] Fix typo in FormControl API docs (#35449) @Spanishiwa
|
|
3947
4041
|
- [docs] Update callouts design (#35390) @danilo-leal
|
|
3948
4042
|
- [website] New wave of open roles (#35240) @mnajdova
|
|
3949
|
-
- [website] Developer
|
|
4043
|
+
- [website] Developer Survey 2022 (#35407) @joserodolfofreitas
|
|
3950
4044
|
|
|
3951
4045
|
### Core
|
|
3952
4046
|
|
|
@@ -7469,7 +7563,7 @@ This is an early release to fix `export 'useId' (imported as 'React') was not fo
|
|
|
7469
7563
|
- ​<!-- 9 -->[core] Fix PR run detection in test_bundle_size_monitor (#29879) @eps1lon
|
|
7470
7564
|
- ​<!-- 8 -->[core] Move bundle size monitoring to CircleCI (#29876) @eps1lon
|
|
7471
7565
|
- ​<!-- 7 -->[docs] Add keys to Responsive AppBar demo (#29884) @mbrookes
|
|
7472
|
-
- ​<!-- 6 -->[docs] MUI's 2021 Developer
|
|
7566
|
+
- ​<!-- 6 -->[docs] MUI's 2021 Developer Survey (#29765) @prakhargupta1
|
|
7473
7567
|
- ​<!-- 5 -->[docs] Smoother image loading UX (#29858) @oliviertassinari
|
|
7474
7568
|
- ​<!-- 4 -->[Select] Fix select display value with React Nodes (#29836) @kegi
|
|
7475
7569
|
- ​<!-- 3 -->[system] Add `experimental_sx` utility (#29833) @mnajdova
|
package/Collapse/Collapse.js
CHANGED
|
@@ -7,7 +7,7 @@ import * as React from 'react';
|
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import { Transition } from 'react-transition-group';
|
|
10
|
-
import { elementTypeAcceptingRef } from '@mui/utils';
|
|
10
|
+
import { elementTypeAcceptingRef, unstable_useTimeout as useTimeout } from '@mui/utils';
|
|
11
11
|
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
|
|
12
12
|
import styled from '../styles/styled';
|
|
13
13
|
import useThemeProps from '../styles/useThemeProps';
|
|
@@ -123,17 +123,12 @@ const Collapse = /*#__PURE__*/React.forwardRef(function Collapse(inProps, ref) {
|
|
|
123
123
|
});
|
|
124
124
|
const classes = useUtilityClasses(ownerState);
|
|
125
125
|
const theme = useTheme();
|
|
126
|
-
const timer =
|
|
126
|
+
const timer = useTimeout();
|
|
127
127
|
const wrapperRef = React.useRef(null);
|
|
128
128
|
const autoTransitionDuration = React.useRef();
|
|
129
129
|
const collapsedSize = typeof collapsedSizeProp === 'number' ? `${collapsedSizeProp}px` : collapsedSizeProp;
|
|
130
130
|
const isHorizontal = orientation === 'horizontal';
|
|
131
131
|
const size = isHorizontal ? 'width' : 'height';
|
|
132
|
-
React.useEffect(() => {
|
|
133
|
-
return () => {
|
|
134
|
-
clearTimeout(timer.current);
|
|
135
|
-
};
|
|
136
|
-
}, []);
|
|
137
132
|
const nodeRef = React.useRef(null);
|
|
138
133
|
const handleRef = useForkRef(ref, nodeRef);
|
|
139
134
|
const normalizedTransitionCallback = callback => maybeIsAppearing => {
|
|
@@ -230,7 +225,7 @@ const Collapse = /*#__PURE__*/React.forwardRef(function Collapse(inProps, ref) {
|
|
|
230
225
|
});
|
|
231
226
|
const handleAddEndListener = next => {
|
|
232
227
|
if (timeout === 'auto') {
|
|
233
|
-
timer.
|
|
228
|
+
timer.start(autoTransitionDuration.current || 0, next);
|
|
234
229
|
}
|
|
235
230
|
if (addEndListener) {
|
|
236
231
|
// Old call signature before `react-transition-group` implemented `nodeRef`
|
package/Grow/Grow.js
CHANGED
|
@@ -5,7 +5,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
5
5
|
const _excluded = ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import { elementAcceptingRef } from '@mui/utils';
|
|
8
|
+
import { elementAcceptingRef, unstable_useTimeout as useTimeout } from '@mui/utils';
|
|
9
9
|
import { Transition } from 'react-transition-group';
|
|
10
10
|
import useTheme from '../styles/useTheme';
|
|
11
11
|
import { getTransitionProps, reflow } from '../transitions/utils';
|
|
@@ -55,7 +55,7 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
|
|
|
55
55
|
TransitionComponent = Transition
|
|
56
56
|
} = props,
|
|
57
57
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
58
|
-
const timer =
|
|
58
|
+
const timer = useTimeout();
|
|
59
59
|
const autoTimeout = React.useRef();
|
|
60
60
|
const theme = useTheme();
|
|
61
61
|
const nodeRef = React.useRef(null);
|
|
@@ -144,18 +144,13 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
|
|
|
144
144
|
const handleExited = normalizedTransitionCallback(onExited);
|
|
145
145
|
const handleAddEndListener = next => {
|
|
146
146
|
if (timeout === 'auto') {
|
|
147
|
-
timer.
|
|
147
|
+
timer.start(autoTimeout.current || 0, next);
|
|
148
148
|
}
|
|
149
149
|
if (addEndListener) {
|
|
150
150
|
// Old call signature before `react-transition-group` implemented `nodeRef`
|
|
151
151
|
addEndListener(nodeRef.current, next);
|
|
152
152
|
}
|
|
153
153
|
};
|
|
154
|
-
React.useEffect(() => {
|
|
155
|
-
return () => {
|
|
156
|
-
clearTimeout(timer.current);
|
|
157
|
-
};
|
|
158
|
-
}, []);
|
|
159
154
|
return /*#__PURE__*/_jsx(TransitionComponent, _extends({
|
|
160
155
|
appear: appear,
|
|
161
156
|
in: inProp,
|
package/Rating/index.js
CHANGED
package/Select/Select.js
CHANGED
|
@@ -122,7 +122,7 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
|
122
122
|
}, inputProps, {
|
|
123
123
|
classes: inputProps ? deepmerge(restOfClasses, inputProps.classes) : restOfClasses
|
|
124
124
|
}, input ? input.props.inputProps : {})
|
|
125
|
-
}, multiple && native && variant === 'outlined' ? {
|
|
125
|
+
}, (multiple && native || displayEmpty) && variant === 'outlined' ? {
|
|
126
126
|
notched: true
|
|
127
127
|
} : {}, {
|
|
128
128
|
ref: inputComponentRef,
|
package/SpeedDial/SpeedDial.js
CHANGED
|
@@ -10,7 +10,7 @@ import { isFragment } from 'react-is';
|
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import clsx from 'clsx';
|
|
12
12
|
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
|
|
13
|
-
import { clamp } from '@mui/utils';
|
|
13
|
+
import { clamp, unstable_useTimeout as useTimeout } from '@mui/utils';
|
|
14
14
|
import styled from '../styles/styled';
|
|
15
15
|
import useThemeProps from '../styles/useThemeProps';
|
|
16
16
|
import useTheme from '../styles/useTheme';
|
|
@@ -163,12 +163,7 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
|
|
|
163
163
|
direction
|
|
164
164
|
});
|
|
165
165
|
const classes = useUtilityClasses(ownerState);
|
|
166
|
-
const eventTimer =
|
|
167
|
-
React.useEffect(() => {
|
|
168
|
-
return () => {
|
|
169
|
-
clearTimeout(eventTimer.current);
|
|
170
|
-
};
|
|
171
|
-
}, []);
|
|
166
|
+
const eventTimer = useTimeout();
|
|
172
167
|
|
|
173
168
|
/**
|
|
174
169
|
* an index in actions.current
|
|
@@ -252,9 +247,9 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
|
|
|
252
247
|
if (event.type === 'blur' && onBlur) {
|
|
253
248
|
onBlur(event);
|
|
254
249
|
}
|
|
255
|
-
|
|
250
|
+
eventTimer.clear();
|
|
256
251
|
if (event.type === 'blur') {
|
|
257
|
-
eventTimer.
|
|
252
|
+
eventTimer.start(0, () => {
|
|
258
253
|
setOpenState(false);
|
|
259
254
|
if (onClose) {
|
|
260
255
|
onClose(event, 'blur');
|
|
@@ -271,7 +266,7 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
|
|
|
271
266
|
if (FabProps.onClick) {
|
|
272
267
|
FabProps.onClick(event);
|
|
273
268
|
}
|
|
274
|
-
|
|
269
|
+
eventTimer.clear();
|
|
275
270
|
if (open) {
|
|
276
271
|
setOpenState(false);
|
|
277
272
|
if (onClose) {
|
|
@@ -295,10 +290,10 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
|
|
|
295
290
|
// When moving the focus between two items,
|
|
296
291
|
// a chain if blur and focus event is triggered.
|
|
297
292
|
// We only handle the last event.
|
|
298
|
-
|
|
293
|
+
eventTimer.clear();
|
|
299
294
|
if (!open) {
|
|
300
295
|
// Wait for a future focus or click event
|
|
301
|
-
eventTimer.
|
|
296
|
+
eventTimer.start(0, () => {
|
|
302
297
|
setOpenState(true);
|
|
303
298
|
if (onOpen) {
|
|
304
299
|
const eventMap = {
|