@mui/material 5.15.6 → 5.15.8

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 (90) hide show
  1. package/Accordion/Accordion.d.ts +2 -2
  2. package/Accordion/Accordion.js +2 -2
  3. package/Accordion/index.js +0 -2
  4. package/AccordionActions/index.js +0 -2
  5. package/AccordionDetails/index.js +0 -2
  6. package/AccordionSummary/index.js +0 -2
  7. package/Avatar/Avatar.js +5 -2
  8. package/AvatarGroup/AvatarGroup.js +19 -39
  9. package/Badge/Badge.js +2 -2
  10. package/ButtonBase/TouchRipple.js +9 -14
  11. package/CHANGELOG.md +186 -12
  12. package/Collapse/Collapse.js +3 -8
  13. package/Grow/Grow.js +3 -8
  14. package/Rating/index.js +0 -2
  15. package/Select/Select.js +1 -1
  16. package/Slider/Slider.d.ts +5 -0
  17. package/Slider/Slider.js +8 -1
  18. package/SpeedDial/SpeedDial.js +7 -12
  19. package/Toolbar/index.js +0 -2
  20. package/Tooltip/Tooltip.js +30 -40
  21. package/index.js +1 -3
  22. package/legacy/Accordion/Accordion.js +2 -2
  23. package/legacy/Accordion/index.js +0 -2
  24. package/legacy/AccordionActions/index.js +0 -2
  25. package/legacy/AccordionDetails/index.js +0 -2
  26. package/legacy/AccordionSummary/index.js +0 -2
  27. package/legacy/Avatar/Avatar.js +5 -2
  28. package/legacy/AvatarGroup/AvatarGroup.js +6 -31
  29. package/legacy/Badge/Badge.js +2 -2
  30. package/legacy/ButtonBase/TouchRipple.js +9 -14
  31. package/legacy/Collapse/Collapse.js +3 -8
  32. package/legacy/Grow/Grow.js +3 -8
  33. package/legacy/Rating/index.js +0 -2
  34. package/legacy/Select/Select.js +1 -1
  35. package/legacy/Slider/Slider.js +9 -1
  36. package/legacy/SpeedDial/SpeedDial.js +7 -12
  37. package/legacy/Toolbar/index.js +0 -2
  38. package/legacy/Tooltip/Tooltip.js +30 -38
  39. package/legacy/index.js +1 -3
  40. package/legacy/styles/createTheme.js +1 -13
  41. package/legacy/zero-styled/index.js +7 -2
  42. package/modern/Accordion/Accordion.js +2 -2
  43. package/modern/Accordion/index.js +0 -2
  44. package/modern/AccordionActions/index.js +0 -2
  45. package/modern/AccordionDetails/index.js +0 -2
  46. package/modern/AccordionSummary/index.js +0 -2
  47. package/modern/Avatar/Avatar.js +5 -2
  48. package/modern/AvatarGroup/AvatarGroup.js +19 -39
  49. package/modern/Badge/Badge.js +2 -2
  50. package/modern/ButtonBase/TouchRipple.js +9 -14
  51. package/modern/Collapse/Collapse.js +3 -8
  52. package/modern/Grow/Grow.js +3 -8
  53. package/modern/Rating/index.js +0 -2
  54. package/modern/Select/Select.js +1 -1
  55. package/modern/Slider/Slider.js +8 -1
  56. package/modern/SpeedDial/SpeedDial.js +7 -12
  57. package/modern/Toolbar/index.js +0 -2
  58. package/modern/Tooltip/Tooltip.js +30 -40
  59. package/modern/index.js +1 -3
  60. package/modern/styles/createTheme.js +1 -15
  61. package/modern/zero-styled/index.js +7 -2
  62. package/node/Accordion/Accordion.js +2 -2
  63. package/node/Accordion/index.js +0 -1
  64. package/node/AccordionActions/index.js +0 -1
  65. package/node/AccordionDetails/index.js +0 -1
  66. package/node/AccordionSummary/index.js +0 -1
  67. package/node/Avatar/Avatar.js +5 -2
  68. package/node/AvatarGroup/AvatarGroup.js +19 -39
  69. package/node/Badge/Badge.js +2 -2
  70. package/node/ButtonBase/TouchRipple.js +9 -14
  71. package/node/Collapse/Collapse.js +2 -7
  72. package/node/Grow/Grow.js +2 -7
  73. package/node/Rating/index.js +0 -1
  74. package/node/Select/Select.js +1 -1
  75. package/node/Slider/Slider.js +8 -1
  76. package/node/SpeedDial/SpeedDial.js +6 -11
  77. package/node/Toolbar/index.js +0 -1
  78. package/node/Tooltip/Tooltip.js +29 -39
  79. package/node/index.js +1 -3
  80. package/node/styles/createTheme.js +1 -15
  81. package/node/zero-styled/index.js +7 -1
  82. package/package.json +8 -7
  83. package/styles/createTheme.d.ts +0 -1
  84. package/styles/createTheme.js +1 -15
  85. package/styles/experimental_extendTheme.d.ts +3 -2
  86. package/styles/overrides.d.ts +13 -9
  87. package/umd/material-ui.development.js +1210 -1198
  88. package/umd/material-ui.production.min.js +4 -4
  89. package/zero-styled/index.d.ts +2 -1
  90. package/zero-styled/index.js +7 -2
@@ -175,6 +175,11 @@ export interface SliderOwnProps {
175
175
  * }
176
176
  */
177
177
  scale?: (value: number) => number;
178
+ /**
179
+ * The granularity with which the slider can step through values when using Page Up/Page Down or Shift + Arrow Up/Arrow Down.
180
+ * @default 10
181
+ */
182
+ shiftStep?: number;
178
183
  /**
179
184
  * The size of the slider.
180
185
  * @default 'medium'
package/Slider/Slider.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
4
  import _extends from "@babel/runtime/helpers/esm/extends";
5
- const _excluded = ["aria-label", "aria-valuetext", "aria-labelledby", "component", "components", "componentsProps", "color", "classes", "className", "disableSwap", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "orientation", "size", "step", "scale", "slotProps", "slots", "tabIndex", "track", "value", "valueLabelDisplay", "valueLabelFormat"];
5
+ const _excluded = ["aria-label", "aria-valuetext", "aria-labelledby", "component", "components", "componentsProps", "color", "classes", "className", "disableSwap", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "orientation", "shiftStep", "size", "step", "scale", "slotProps", "slots", "tabIndex", "track", "value", "valueLabelDisplay", "valueLabelFormat"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import clsx from 'clsx';
@@ -391,6 +391,7 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
391
391
  max = 100,
392
392
  min = 0,
393
393
  orientation = 'horizontal',
394
+ shiftStep = 10,
394
395
  size = 'medium',
395
396
  step = 1,
396
397
  scale = Identity,
@@ -413,6 +414,7 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
413
414
  color,
414
415
  size,
415
416
  step,
417
+ shiftStep,
416
418
  scale,
417
419
  track,
418
420
  valueLabelDisplay,
@@ -757,6 +759,11 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
757
759
  * }
758
760
  */
759
761
  scale: PropTypes.func,
762
+ /**
763
+ * The granularity with which the slider can step through values when using Page Up/Page Down or Shift + Arrow Up/Arrow Down.
764
+ * @default 10
765
+ */
766
+ shiftStep: PropTypes.number,
760
767
  /**
761
768
  * The size of the slider.
762
769
  * @default 'medium'
@@ -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 = React.useRef();
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
- clearTimeout(eventTimer.current);
250
+ eventTimer.clear();
256
251
  if (event.type === 'blur') {
257
- eventTimer.current = setTimeout(() => {
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
- clearTimeout(eventTimer.current);
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
- clearTimeout(eventTimer.current);
293
+ eventTimer.clear();
299
294
  if (!open) {
300
295
  // Wait for a future focus or click event
301
- eventTimer.current = setTimeout(() => {
296
+ eventTimer.start(0, () => {
302
297
  setOpenState(true);
303
298
  if (onOpen) {
304
299
  const eventMap = {
package/Toolbar/index.js CHANGED
@@ -1,5 +1,3 @@
1
- 'use client';
2
-
3
1
  export { default } from './Toolbar';
4
2
  export { default as toolbarClasses } from './toolbarClasses';
5
3
  export * from './toolbarClasses';
@@ -6,7 +6,7 @@ const _excluded = ["arrow", "children", "classes", "components", "componentsProp
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import clsx from 'clsx';
9
- import { elementAcceptingRef } from '@mui/utils';
9
+ import { elementAcceptingRef, unstable_useTimeout as useTimeout, unstable_Timeout as Timeout } from '@mui/utils';
10
10
  import { unstable_composeClasses as composeClasses, appendOwnerState } from '@mui/base';
11
11
  import { alpha } from '@mui/system';
12
12
  import styled from '../styles/styled';
@@ -194,14 +194,14 @@ const TooltipArrow = styled('span', {
194
194
  }
195
195
  }));
196
196
  let hystersisOpen = false;
197
- let hystersisTimer = null;
197
+ const hystersisTimer = new Timeout();
198
198
  let cursorPosition = {
199
199
  x: 0,
200
200
  y: 0
201
201
  };
202
202
  export function testReset() {
203
203
  hystersisOpen = false;
204
- clearTimeout(hystersisTimer);
204
+ hystersisTimer.clear();
205
205
  }
206
206
  function composeEventHandler(handler, eventHandler) {
207
207
  return event => {
@@ -260,10 +260,10 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
260
260
  const [arrowRef, setArrowRef] = React.useState(null);
261
261
  const ignoreNonTouchEvents = React.useRef(false);
262
262
  const disableInteractive = disableInteractiveProp || followCursor;
263
- const closeTimer = React.useRef();
264
- const enterTimer = React.useRef();
265
- const leaveTimer = React.useRef();
266
- const touchTimer = React.useRef();
263
+ const closeTimer = useTimeout();
264
+ const enterTimer = useTimeout();
265
+ const leaveTimer = useTimeout();
266
+ const touchTimer = useTimeout();
267
267
  const [openState, setOpenState] = useControlled({
268
268
  controlled: openProp,
269
269
  default: false,
@@ -286,23 +286,16 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
286
286
  }
287
287
  const id = useId(idProp);
288
288
  const prevUserSelect = React.useRef();
289
- const stopTouchInteraction = React.useCallback(() => {
289
+ const stopTouchInteraction = useEventCallback(() => {
290
290
  if (prevUserSelect.current !== undefined) {
291
291
  document.body.style.WebkitUserSelect = prevUserSelect.current;
292
292
  prevUserSelect.current = undefined;
293
293
  }
294
- clearTimeout(touchTimer.current);
295
- }, []);
296
- React.useEffect(() => {
297
- return () => {
298
- clearTimeout(closeTimer.current);
299
- clearTimeout(enterTimer.current);
300
- clearTimeout(leaveTimer.current);
301
- stopTouchInteraction();
302
- };
303
- }, [stopTouchInteraction]);
294
+ touchTimer.clear();
295
+ });
296
+ React.useEffect(() => stopTouchInteraction, [stopTouchInteraction]);
304
297
  const handleOpen = event => {
305
- clearTimeout(hystersisTimer);
298
+ hystersisTimer.clear();
306
299
  hystersisOpen = true;
307
300
 
308
301
  // The mouseover event will trigger for every nested element in the tooltip.
@@ -318,18 +311,16 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
318
311
  * @param {React.SyntheticEvent | Event} event
319
312
  */
320
313
  event => {
321
- clearTimeout(hystersisTimer);
322
- hystersisTimer = setTimeout(() => {
314
+ hystersisTimer.start(800 + leaveDelay, () => {
323
315
  hystersisOpen = false;
324
- }, 800 + leaveDelay);
316
+ });
325
317
  setOpenState(false);
326
318
  if (onClose && open) {
327
319
  onClose(event);
328
320
  }
329
- clearTimeout(closeTimer.current);
330
- closeTimer.current = setTimeout(() => {
321
+ closeTimer.start(theme.transitions.duration.shortest, () => {
331
322
  ignoreNonTouchEvents.current = false;
332
- }, theme.transitions.duration.shortest);
323
+ });
333
324
  });
334
325
  const handleEnter = event => {
335
326
  if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {
@@ -342,22 +333,21 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
342
333
  if (childNode) {
343
334
  childNode.removeAttribute('title');
344
335
  }
345
- clearTimeout(enterTimer.current);
346
- clearTimeout(leaveTimer.current);
336
+ enterTimer.clear();
337
+ leaveTimer.clear();
347
338
  if (enterDelay || hystersisOpen && enterNextDelay) {
348
- enterTimer.current = setTimeout(() => {
339
+ enterTimer.start(hystersisOpen ? enterNextDelay : enterDelay, () => {
349
340
  handleOpen(event);
350
- }, hystersisOpen ? enterNextDelay : enterDelay);
341
+ });
351
342
  } else {
352
343
  handleOpen(event);
353
344
  }
354
345
  };
355
346
  const handleLeave = event => {
356
- clearTimeout(enterTimer.current);
357
- clearTimeout(leaveTimer.current);
358
- leaveTimer.current = setTimeout(() => {
347
+ enterTimer.clear();
348
+ leaveTimer.start(leaveDelay, () => {
359
349
  handleClose(event);
360
- }, leaveDelay);
350
+ });
361
351
  };
362
352
  const {
363
353
  isFocusVisibleRef,
@@ -399,26 +389,25 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
399
389
  const handleMouseLeave = handleLeave;
400
390
  const handleTouchStart = event => {
401
391
  detectTouchStart(event);
402
- clearTimeout(leaveTimer.current);
403
- clearTimeout(closeTimer.current);
392
+ leaveTimer.clear();
393
+ closeTimer.clear();
404
394
  stopTouchInteraction();
405
395
  prevUserSelect.current = document.body.style.WebkitUserSelect;
406
396
  // Prevent iOS text selection on long-tap.
407
397
  document.body.style.WebkitUserSelect = 'none';
408
- touchTimer.current = setTimeout(() => {
398
+ touchTimer.start(enterTouchDelay, () => {
409
399
  document.body.style.WebkitUserSelect = prevUserSelect.current;
410
400
  handleEnter(event);
411
- }, enterTouchDelay);
401
+ });
412
402
  };
413
403
  const handleTouchEnd = event => {
414
404
  if (children.props.onTouchEnd) {
415
405
  children.props.onTouchEnd(event);
416
406
  }
417
407
  stopTouchInteraction();
418
- clearTimeout(leaveTimer.current);
419
- leaveTimer.current = setTimeout(() => {
408
+ leaveTimer.start(leaveTouchDelay, () => {
420
409
  handleClose(event);
421
- }, leaveTouchDelay);
410
+ });
422
411
  };
423
412
  React.useEffect(() => {
424
413
  if (!open) {
@@ -442,6 +431,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
442
431
  const handleRef = useForkRef(children.ref, focusVisibleRef, setChildNode, ref);
443
432
 
444
433
  // There is no point in displaying an empty tooltip.
434
+ // So we exclude all falsy values, except 0, which is valid.
445
435
  if (!title && title !== 0) {
446
436
  open = false;
447
437
  }
package/index.js CHANGED
@@ -1,12 +1,10 @@
1
1
  /**
2
- * @mui/material v5.15.6
2
+ * @mui/material v5.15.8
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- 'use client';
9
-
10
8
  /* eslint-disable import/export */
11
9
  import * as colors from './colors';
12
10
  export { colors };
@@ -284,13 +284,13 @@ process.env.NODE_ENV !== "production" ? Accordion.propTypes /* remove-proptypes
284
284
  /**
285
285
  * The component used for the transition.
286
286
  * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
287
- * @deprecated Use `slots.transition` instead. This prop will be removed in v7.
287
+ * @deprecated Use `slots.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
288
288
  */
289
289
  TransitionComponent: PropTypes.elementType,
290
290
  /**
291
291
  * Props applied to the transition element.
292
292
  * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.
293
- * @deprecated Use `slotProps.transition` instead. This prop will be removed in v7.
293
+ * @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
294
294
  */
295
295
  TransitionProps: PropTypes.object
296
296
  } : void 0;
@@ -1,5 +1,3 @@
1
- 'use client';
2
-
3
1
  export { default } from './Accordion';
4
2
  export { default as accordionClasses } from './accordionClasses';
5
3
  export * from './accordionClasses';
@@ -1,5 +1,3 @@
1
- 'use client';
2
-
3
1
  export { default } from './AccordionActions';
4
2
  export { default as accordionActionsClasses } from './accordionActionsClasses';
5
3
  export * from './accordionActionsClasses';
@@ -1,5 +1,3 @@
1
- 'use client';
2
-
3
1
  export { default } from './AccordionDetails';
4
2
  export { default as accordionDetailsClasses } from './accordionDetailsClasses';
5
3
  export * from './accordionDetailsClasses';
@@ -1,5 +1,3 @@
1
- 'use client';
2
-
3
1
  export { default } from './AccordionSummary';
4
2
  export { default as accordionSummaryClasses } from './accordionSummaryClasses';
5
3
  export * from './accordionSummaryClasses';
@@ -69,7 +69,7 @@ var AvatarRoot = styled('div', {
69
69
  backgroundColor: theme.vars.palette.Avatar.defaultBg
70
70
  } : _extends({
71
71
  backgroundColor: theme.palette.grey[400]
72
- }, theme.applyDarkStyles({
72
+ }, theme.applyStyles('dark', {
73
73
  backgroundColor: theme.palette.grey[600]
74
74
  })))
75
75
  }]
@@ -182,7 +182,10 @@ var Avatar = /*#__PURE__*/React.forwardRef(function Avatar(inProps, ref) {
182
182
  ownerState: ownerState,
183
183
  className: classes.img
184
184
  }, imgProps));
185
- } else if (childrenProp != null) {
185
+
186
+ // We only render valid children, non valid children are rendered with a fallback
187
+ // We consider that invalid children are all falsy values, except 0, which is valid.
188
+ } else if (!!childrenProp || childrenProp === 0) {
186
189
  children = childrenProp;
187
190
  } else if (hasImg && alt) {
188
191
  children = alt[0];
@@ -34,33 +34,18 @@ var AvatarGroupRoot = styled('div', {
34
34
  return _extends(_defineProperty({}, "& .".concat(avatarGroupClasses.avatar), styles.avatar), styles.root);
35
35
  }
36
36
  })(function (_ref) {
37
- var theme = _ref.theme;
37
+ var theme = _ref.theme,
38
+ ownerState = _ref.ownerState;
39
+ var marginValue = ownerState.spacing && SPACINGS[ownerState.spacing] !== undefined ? SPACINGS[ownerState.spacing] : -ownerState.spacing;
38
40
  return _defineProperty(_defineProperty(_defineProperty({}, "& .".concat(avatarClasses.root), {
39
41
  border: "2px solid ".concat((theme.vars || theme).palette.background.default),
40
42
  boxSizing: 'content-box',
41
- marginLeft: -8,
43
+ marginLeft: marginValue != null ? marginValue : -8,
42
44
  '&:last-child': {
43
45
  marginLeft: 0
44
46
  }
45
47
  }), "display", 'flex'), "flexDirection", 'row-reverse');
46
48
  });
47
- var AvatarGroupAvatar = styled(Avatar, {
48
- name: 'MuiAvatarGroup',
49
- slot: 'Avatar',
50
- overridesResolver: function overridesResolver(props, styles) {
51
- return styles.avatar;
52
- }
53
- })(function (_ref3) {
54
- var theme = _ref3.theme;
55
- return {
56
- border: "2px solid ".concat((theme.vars || theme).palette.background.default),
57
- boxSizing: 'content-box',
58
- marginLeft: -8,
59
- '&:last-child': {
60
- marginLeft: 0
61
- }
62
- };
63
- });
64
49
  var AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps, ref) {
65
50
  var _slotProps$additional;
66
51
  var props = useThemeProps({
@@ -108,7 +93,6 @@ var AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps, re
108
93
  var maxAvatars = Math.min(children.length, clampedMax - 1);
109
94
  var extraAvatars = Math.max(totalAvatars - clampedMax, totalAvatars - maxAvatars, 0);
110
95
  var extraAvatarsElement = renderSurplus ? renderSurplus(extraAvatars) : "+".concat(extraAvatars);
111
- var marginLeft = spacing && SPACINGS[spacing] !== undefined ? SPACINGS[spacing] : -spacing;
112
96
  var additionalAvatarSlotProps = (_slotProps$additional = slotProps.additionalAvatar) != null ? _slotProps$additional : componentsProps.additionalAvatar;
113
97
  return /*#__PURE__*/_jsxs(AvatarGroupRoot, _extends({
114
98
  as: component,
@@ -116,23 +100,14 @@ var AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps, re
116
100
  className: clsx(classes.root, className),
117
101
  ref: ref
118
102
  }, other, {
119
- children: [extraAvatars ? /*#__PURE__*/_jsx(AvatarGroupAvatar, _extends({
120
- ownerState: ownerState,
103
+ children: [extraAvatars ? /*#__PURE__*/_jsx(Avatar, _extends({
121
104
  variant: variant
122
105
  }, additionalAvatarSlotProps, {
123
106
  className: clsx(classes.avatar, additionalAvatarSlotProps == null ? void 0 : additionalAvatarSlotProps.className),
124
- style: _extends({
125
- marginLeft: marginLeft
126
- }, additionalAvatarSlotProps == null ? void 0 : additionalAvatarSlotProps.style),
127
107
  children: extraAvatarsElement
128
- })) : null, children.slice(0, maxAvatars).reverse().map(function (child, index) {
108
+ })) : null, children.slice(0, maxAvatars).reverse().map(function (child) {
129
109
  return /*#__PURE__*/React.cloneElement(child, {
130
110
  className: clsx(child.props.className, classes.avatar),
131
- style: _extends({
132
- // Consistent with "&:last-child" styling for the default spacing,
133
- // we do not apply custom marginLeft spacing on the last child
134
- marginLeft: index === maxAvatars - 1 ? undefined : marginLeft
135
- }, child.props.style),
136
111
  variant: child.props.variant || variant
137
112
  });
138
113
  })]
@@ -11,14 +11,14 @@ import { usePreviousProps } from '@mui/utils';
11
11
  import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
12
12
  import { useBadge } from '@mui/base/useBadge';
13
13
  import { useSlotProps } from '@mui/base';
14
- import { styled } from '../zero-styled';
15
- import useThemeProps from '../styles/useThemeProps';
14
+ import { styled, createUseThemeProps } from '../zero-styled';
16
15
  import capitalize from '../utils/capitalize';
17
16
  import badgeClasses, { getBadgeUtilityClass } from './badgeClasses';
18
17
  import { jsx as _jsx } from "react/jsx-runtime";
19
18
  import { jsxs as _jsxs } from "react/jsx-runtime";
20
19
  var RADIUS_STANDARD = 10;
21
20
  var RADIUS_DOT = 4;
21
+ var useThemeProps = createUseThemeProps('MuiBadge');
22
22
  var useUtilityClasses = function useUtilityClasses(ownerState) {
23
23
  var color = ownerState.color,
24
24
  anchorOrigin = ownerState.anchorOrigin,
@@ -10,6 +10,7 @@ import PropTypes from 'prop-types';
10
10
  import { TransitionGroup } from 'react-transition-group';
11
11
  import clsx from 'clsx';
12
12
  import { keyframes } from '@mui/system';
13
+ import { unstable_useTimeout as useTimeout } from '@mui/utils';
13
14
  import styled from '../styles/styled';
14
15
  import useThemeProps from '../styles/useThemeProps';
15
16
  import Ripple from './Ripple';
@@ -86,18 +87,11 @@ var TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, re
86
87
  var ignoringMouseDown = React.useRef(false);
87
88
  // We use a timer in order to only show the ripples for touch "click" like events.
88
89
  // We don't want to display the ripple for touch scroll events.
89
- var startTimer = React.useRef(0);
90
+ var startTimer = useTimeout();
90
91
 
91
92
  // This is the hook called once the previous timeout is ready.
92
93
  var startTimerCommit = React.useRef(null);
93
94
  var container = React.useRef(null);
94
- React.useEffect(function () {
95
- return function () {
96
- if (startTimer.current) {
97
- clearTimeout(startTimer.current);
98
- }
99
- };
100
- }, []);
101
95
  var startCommit = React.useCallback(function (params) {
102
96
  var pulsate = params.pulsate,
103
97
  rippleX = params.rippleX,
@@ -193,12 +187,13 @@ var TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, re
193
187
  });
194
188
  };
195
189
  // Delay the execution of the ripple effect.
196
- startTimer.current = setTimeout(function () {
190
+ // We have to make a tradeoff with this delay value.
191
+ startTimer.start(DELAY_RIPPLE, function () {
197
192
  if (startTimerCommit.current) {
198
193
  startTimerCommit.current();
199
194
  startTimerCommit.current = null;
200
195
  }
201
- }, DELAY_RIPPLE); // We have to make a tradeoff with this value.
196
+ });
202
197
  }
203
198
  } else {
204
199
  startCommit({
@@ -209,21 +204,21 @@ var TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, re
209
204
  cb: cb
210
205
  });
211
206
  }
212
- }, [centerProp, startCommit]);
207
+ }, [centerProp, startCommit, startTimer]);
213
208
  var pulsate = React.useCallback(function () {
214
209
  start({}, {
215
210
  pulsate: true
216
211
  });
217
212
  }, [start]);
218
213
  var stop = React.useCallback(function (event, cb) {
219
- clearTimeout(startTimer.current);
214
+ startTimer.clear();
220
215
 
221
216
  // The touch interaction occurs too quickly.
222
217
  // We still want to show ripple effect.
223
218
  if ((event == null ? void 0 : event.type) === 'touchend' && startTimerCommit.current) {
224
219
  startTimerCommit.current();
225
220
  startTimerCommit.current = null;
226
- startTimer.current = setTimeout(function () {
221
+ startTimer.start(0, function () {
227
222
  stop(event, cb);
228
223
  });
229
224
  return;
@@ -236,7 +231,7 @@ var TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, re
236
231
  return oldRipples;
237
232
  });
238
233
  rippleCallback.current = cb;
239
- }, []);
234
+ }, [startTimer]);
240
235
  React.useImperativeHandle(ref, function () {
241
236
  return {
242
237
  pulsate: pulsate,
@@ -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';
@@ -127,17 +127,12 @@ var Collapse = /*#__PURE__*/React.forwardRef(function Collapse(inProps, ref) {
127
127
  });
128
128
  var classes = useUtilityClasses(ownerState);
129
129
  var theme = useTheme();
130
- var timer = React.useRef();
130
+ var timer = useTimeout();
131
131
  var wrapperRef = React.useRef(null);
132
132
  var autoTransitionDuration = React.useRef();
133
133
  var collapsedSize = typeof collapsedSizeProp === 'number' ? "".concat(collapsedSizeProp, "px") : collapsedSizeProp;
134
134
  var isHorizontal = orientation === 'horizontal';
135
135
  var size = isHorizontal ? 'width' : 'height';
136
- React.useEffect(function () {
137
- return function () {
138
- clearTimeout(timer.current);
139
- };
140
- }, []);
141
136
  var nodeRef = React.useRef(null);
142
137
  var handleRef = useForkRef(ref, nodeRef);
143
138
  var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {
@@ -236,7 +231,7 @@ var Collapse = /*#__PURE__*/React.forwardRef(function Collapse(inProps, ref) {
236
231
  });
237
232
  var handleAddEndListener = function handleAddEndListener(next) {
238
233
  if (timeout === 'auto') {
239
- timer.current = setTimeout(next, autoTransitionDuration.current || 0);
234
+ timer.start(autoTransitionDuration.current || 0, next);
240
235
  }
241
236
  if (addEndListener) {
242
237
  // Old call signature before `react-transition-group` implemented `nodeRef`
@@ -4,7 +4,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  import * as React from 'react';
6
6
  import PropTypes from 'prop-types';
7
- import { elementAcceptingRef } from '@mui/utils';
7
+ import { elementAcceptingRef, unstable_useTimeout as useTimeout } from '@mui/utils';
8
8
  import { Transition } from 'react-transition-group';
9
9
  import useTheme from '../styles/useTheme';
10
10
  import { getTransitionProps, reflow } from '../transitions/utils';
@@ -54,7 +54,7 @@ var Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
54
54
  _props$TransitionComp = props.TransitionComponent,
55
55
  TransitionComponent = _props$TransitionComp === void 0 ? Transition : _props$TransitionComp,
56
56
  other = _objectWithoutProperties(props, ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"]);
57
- var timer = React.useRef();
57
+ var timer = useTimeout();
58
58
  var autoTimeout = React.useRef();
59
59
  var theme = useTheme();
60
60
  var nodeRef = React.useRef(null);
@@ -142,18 +142,13 @@ var Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
142
142
  var handleExited = normalizedTransitionCallback(onExited);
143
143
  var handleAddEndListener = function handleAddEndListener(next) {
144
144
  if (timeout === 'auto') {
145
- timer.current = setTimeout(next, autoTimeout.current || 0);
145
+ timer.start(autoTimeout.current || 0, next);
146
146
  }
147
147
  if (addEndListener) {
148
148
  // Old call signature before `react-transition-group` implemented `nodeRef`
149
149
  addEndListener(nodeRef.current, next);
150
150
  }
151
151
  };
152
- React.useEffect(function () {
153
- return function () {
154
- clearTimeout(timer.current);
155
- };
156
- }, []);
157
152
  return /*#__PURE__*/_jsx(TransitionComponent, _extends({
158
153
  appear: appear,
159
154
  in: inProp,
@@ -1,5 +1,3 @@
1
- 'use client';
2
-
3
1
  export { default } from './Rating';
4
2
  export { default as ratingClasses } from './ratingClasses';
5
3
  export * from './ratingClasses';
@@ -129,7 +129,7 @@ var Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
129
129
  }, inputProps, {
130
130
  classes: inputProps ? deepmerge(restOfClasses, inputProps.classes) : restOfClasses
131
131
  }, input ? input.props.inputProps : {})
132
- }, multiple && native && variant === 'outlined' ? {
132
+ }, (multiple && native || displayEmpty) && variant === 'outlined' ? {
133
133
  notched: true
134
134
  } : {}, {
135
135
  ref: inputComponentRef,
@@ -401,6 +401,8 @@ var Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
401
401
  onChangeCommitted = props.onChangeCommitted,
402
402
  _props$orientation = props.orientation,
403
403
  orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,
404
+ _props$shiftStep = props.shiftStep,
405
+ shiftStep = _props$shiftStep === void 0 ? 10 : _props$shiftStep,
404
406
  _props$size = props.size,
405
407
  size = _props$size === void 0 ? 'medium' : _props$size,
406
408
  _props$step = props.step,
@@ -417,7 +419,7 @@ var Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
417
419
  valueLabelDisplay = _props$valueLabelDisp === void 0 ? 'off' : _props$valueLabelDisp,
418
420
  _props$valueLabelForm = props.valueLabelFormat,
419
421
  valueLabelFormat = _props$valueLabelForm === void 0 ? Identity : _props$valueLabelForm,
420
- other = _objectWithoutProperties(props, ["aria-label", "aria-valuetext", "aria-labelledby", "component", "components", "componentsProps", "color", "classes", "className", "disableSwap", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "orientation", "size", "step", "scale", "slotProps", "slots", "tabIndex", "track", "value", "valueLabelDisplay", "valueLabelFormat"]);
422
+ other = _objectWithoutProperties(props, ["aria-label", "aria-valuetext", "aria-labelledby", "component", "components", "componentsProps", "color", "classes", "className", "disableSwap", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "orientation", "shiftStep", "size", "step", "scale", "slotProps", "slots", "tabIndex", "track", "value", "valueLabelDisplay", "valueLabelFormat"]);
421
423
  var ownerState = _extends({}, props, {
422
424
  isRtl: isRtl,
423
425
  max: max,
@@ -430,6 +432,7 @@ var Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
430
432
  color: color,
431
433
  size: size,
432
434
  step: step,
435
+ shiftStep: shiftStep,
433
436
  scale: scale,
434
437
  track: track,
435
438
  valueLabelDisplay: valueLabelDisplay,
@@ -777,6 +780,11 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
777
780
  * }
778
781
  */
779
782
  scale: PropTypes.func,
783
+ /**
784
+ * The granularity with which the slider can step through values when using Page Up/Page Down or Shift + Arrow Up/Arrow Down.
785
+ * @default 10
786
+ */
787
+ shiftStep: PropTypes.number,
780
788
  /**
781
789
  * The size of the slider.
782
790
  * @default 'medium'