@mui/material 5.10.11 → 5.10.13

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 (127) hide show
  1. package/Alert/Alert.d.ts +34 -3
  2. package/Alert/Alert.js +46 -9
  3. package/Autocomplete/Autocomplete.d.ts +10 -0
  4. package/Autocomplete/Autocomplete.js +27 -11
  5. package/AvatarGroup/AvatarGroup.d.ts +18 -1
  6. package/AvatarGroup/AvatarGroup.js +25 -6
  7. package/Backdrop/Backdrop.d.ts +33 -3
  8. package/Backdrop/Backdrop.js +46 -11
  9. package/Badge/Badge.d.ts +11 -3
  10. package/Badge/Badge.js +11 -3
  11. package/ButtonBase/TouchRipple.js +1 -1
  12. package/CHANGELOG.md +134 -0
  13. package/Chip/Chip.js +8 -4
  14. package/FilledInput/FilledInput.js +48 -9
  15. package/FormControl/FormControl.js +29 -29
  16. package/FormControlLabel/FormControlLabel.d.ts +12 -0
  17. package/FormControlLabel/FormControlLabel.js +17 -5
  18. package/Input/Input.js +49 -10
  19. package/InputBase/InputBase.d.ts +34 -3
  20. package/InputBase/InputBase.js +45 -8
  21. package/ListItem/ListItem.d.ts +32 -3
  22. package/ListItem/ListItem.js +43 -11
  23. package/ListItemButton/ListItemButton.js +2 -2
  24. package/MenuItem/MenuItem.js +2 -2
  25. package/Modal/Modal.d.ts +11 -3
  26. package/Modal/Modal.js +11 -3
  27. package/NativeSelect/NativeSelectInput.js +11 -9
  28. package/OutlinedInput/OutlinedInput.js +26 -8
  29. package/PaginationItem/PaginationItem.d.ts +19 -7
  30. package/PaginationItem/PaginationItem.js +31 -22
  31. package/README.md +1 -0
  32. package/Radio/Radio.js +2 -1
  33. package/RadioGroup/RadioGroup.js +12 -12
  34. package/Select/Select.d.ts +3 -3
  35. package/Select/Select.js +3 -3
  36. package/Slider/Slider.d.ts +14 -2
  37. package/Slider/Slider.js +12 -3
  38. package/StepLabel/StepLabel.d.ts +11 -0
  39. package/StepLabel/StepLabel.js +15 -3
  40. package/SwipeableDrawer/SwipeableDrawer.js +10 -2
  41. package/Tooltip/Tooltip.d.ts +43 -6
  42. package/Tooltip/Tooltip.js +69 -32
  43. package/Unstable_Grid2/Grid2Props.d.ts +1 -1
  44. package/esm/Alert/Alert.js +46 -9
  45. package/esm/Autocomplete/Autocomplete.js +27 -11
  46. package/esm/AvatarGroup/AvatarGroup.js +25 -6
  47. package/esm/Backdrop/Backdrop.js +46 -11
  48. package/esm/Badge/Badge.js +11 -3
  49. package/esm/ButtonBase/TouchRipple.js +1 -1
  50. package/esm/Chip/Chip.js +8 -4
  51. package/esm/FilledInput/FilledInput.js +48 -9
  52. package/esm/FormControl/FormControl.js +29 -29
  53. package/esm/FormControlLabel/FormControlLabel.js +17 -5
  54. package/esm/Input/Input.js +49 -10
  55. package/esm/InputBase/InputBase.js +45 -8
  56. package/esm/ListItem/ListItem.js +43 -11
  57. package/esm/ListItemButton/ListItemButton.js +2 -2
  58. package/esm/MenuItem/MenuItem.js +2 -2
  59. package/esm/Modal/Modal.js +11 -3
  60. package/esm/NativeSelect/NativeSelectInput.js +11 -9
  61. package/esm/OutlinedInput/OutlinedInput.js +26 -8
  62. package/esm/PaginationItem/PaginationItem.js +31 -22
  63. package/esm/Radio/Radio.js +2 -1
  64. package/esm/RadioGroup/RadioGroup.js +12 -12
  65. package/esm/Select/Select.js +3 -3
  66. package/esm/Slider/Slider.js +12 -3
  67. package/esm/StepLabel/StepLabel.js +15 -3
  68. package/esm/SwipeableDrawer/SwipeableDrawer.js +9 -2
  69. package/esm/Tooltip/Tooltip.js +69 -32
  70. package/index.js +1 -1
  71. package/legacy/Alert/Alert.js +48 -9
  72. package/legacy/Autocomplete/Autocomplete.js +27 -10
  73. package/legacy/AvatarGroup/AvatarGroup.js +26 -6
  74. package/legacy/Backdrop/Backdrop.js +48 -11
  75. package/legacy/Badge/Badge.js +11 -3
  76. package/legacy/ButtonBase/TouchRipple.js +1 -1
  77. package/legacy/Chip/Chip.js +8 -4
  78. package/legacy/FilledInput/FilledInput.js +49 -9
  79. package/legacy/FormControl/FormControl.js +29 -29
  80. package/legacy/FormControlLabel/FormControlLabel.js +17 -4
  81. package/legacy/Input/Input.js +50 -10
  82. package/legacy/InputBase/InputBase.js +47 -8
  83. package/legacy/ListItem/ListItem.js +49 -13
  84. package/legacy/ListItemButton/ListItemButton.js +7 -5
  85. package/legacy/MenuItem/MenuItem.js +6 -4
  86. package/legacy/Modal/Modal.js +11 -3
  87. package/legacy/NativeSelect/NativeSelectInput.js +11 -9
  88. package/legacy/OutlinedInput/OutlinedInput.js +27 -8
  89. package/legacy/PaginationItem/PaginationItem.js +32 -22
  90. package/legacy/Radio/Radio.js +2 -1
  91. package/legacy/RadioGroup/RadioGroup.js +14 -14
  92. package/legacy/Select/Select.js +3 -3
  93. package/legacy/Slider/Slider.js +12 -3
  94. package/legacy/StepLabel/StepLabel.js +16 -3
  95. package/legacy/SwipeableDrawer/SwipeableDrawer.js +9 -2
  96. package/legacy/Tooltip/Tooltip.js +64 -23
  97. package/legacy/index.js +1 -1
  98. package/modern/Alert/Alert.js +45 -8
  99. package/modern/Autocomplete/Autocomplete.js +26 -10
  100. package/modern/AvatarGroup/AvatarGroup.js +24 -5
  101. package/modern/Backdrop/Backdrop.js +45 -10
  102. package/modern/Badge/Badge.js +11 -3
  103. package/modern/ButtonBase/TouchRipple.js +1 -1
  104. package/modern/Chip/Chip.js +8 -4
  105. package/modern/FilledInput/FilledInput.js +46 -9
  106. package/modern/FormControl/FormControl.js +29 -29
  107. package/modern/FormControlLabel/FormControlLabel.js +15 -5
  108. package/modern/Input/Input.js +47 -10
  109. package/modern/InputBase/InputBase.js +43 -8
  110. package/modern/ListItem/ListItem.js +43 -11
  111. package/modern/ListItemButton/ListItemButton.js +2 -2
  112. package/modern/MenuItem/MenuItem.js +2 -2
  113. package/modern/Modal/Modal.js +11 -3
  114. package/modern/NativeSelect/NativeSelectInput.js +11 -9
  115. package/modern/OutlinedInput/OutlinedInput.js +25 -7
  116. package/modern/PaginationItem/PaginationItem.js +31 -22
  117. package/modern/Radio/Radio.js +2 -1
  118. package/modern/RadioGroup/RadioGroup.js +12 -12
  119. package/modern/Select/Select.js +3 -3
  120. package/modern/Slider/Slider.js +12 -3
  121. package/modern/StepLabel/StepLabel.js +13 -3
  122. package/modern/SwipeableDrawer/SwipeableDrawer.js +9 -2
  123. package/modern/Tooltip/Tooltip.js +59 -18
  124. package/modern/index.js +1 -1
  125. package/package.json +4 -4
  126. package/umd/material-ui.development.js +617 -234
  127. package/umd/material-ui.production.min.js +20 -20
@@ -164,14 +164,20 @@ var ListItem = /*#__PURE__*/React.forwardRef(function ListItem(inProps, ref) {
164
164
  secondaryAction = props.secondaryAction,
165
165
  _props$selected = props.selected,
166
166
  selected = _props$selected === void 0 ? false : _props$selected,
167
- other = _objectWithoutProperties(props, ["alignItems", "autoFocus", "button", "children", "className", "component", "components", "componentsProps", "ContainerComponent", "ContainerProps", "dense", "disabled", "disableGutters", "disablePadding", "divider", "focusVisibleClassName", "secondaryAction", "selected"]);
167
+ _props$slotProps = props.slotProps,
168
+ slotProps = _props$slotProps === void 0 ? {} : _props$slotProps,
169
+ _props$slots = props.slots,
170
+ slots = _props$slots === void 0 ? {} : _props$slots,
171
+ other = _objectWithoutProperties(props, ["alignItems", "autoFocus", "button", "children", "className", "component", "components", "componentsProps", "ContainerComponent", "ContainerProps", "dense", "disabled", "disableGutters", "disablePadding", "divider", "focusVisibleClassName", "secondaryAction", "selected", "slotProps", "slots"]);
168
172
 
169
173
  var context = React.useContext(ListContext);
170
- var childContext = {
171
- dense: dense || context.dense || false,
172
- alignItems: alignItems,
173
- disableGutters: disableGutters
174
- };
174
+ var childContext = React.useMemo(function () {
175
+ return {
176
+ dense: dense || context.dense || false,
177
+ alignItems: alignItems,
178
+ disableGutters: disableGutters
179
+ };
180
+ }, [alignItems, context.dense, dense, disableGutters]);
175
181
  var listItemRef = React.useRef(null);
176
182
  useEnhancedEffect(function () {
177
183
  if (autoFocus) {
@@ -201,8 +207,8 @@ var ListItem = /*#__PURE__*/React.forwardRef(function ListItem(inProps, ref) {
201
207
 
202
208
  var classes = useUtilityClasses(ownerState);
203
209
  var handleRef = useForkRef(listItemRef, ref);
204
- var Root = components.Root || ListItemRoot;
205
- var rootProps = componentsProps.root || {};
210
+ var Root = slots.root || components.Root || ListItemRoot;
211
+ var rootProps = slotProps.root || componentsProps.root || {};
206
212
 
207
213
  var componentProps = _extends({
208
214
  className: clsx(classes.root, rootProps.className, className),
@@ -252,8 +258,7 @@ var ListItem = /*#__PURE__*/React.forwardRef(function ListItem(inProps, ref) {
252
258
  value: childContext,
253
259
  children: /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, {
254
260
  as: Component,
255
- ref: handleRef,
256
- ownerState: ownerState
261
+ ref: handleRef
257
262
  }, !isHostComponent(Root) && {
258
263
  ownerState: _extends({}, ownerState, rootProps.ownerState)
259
264
  }, componentProps, {
@@ -336,8 +341,11 @@ process.env.NODE_ENV !== "production" ? ListItem.propTypes
336
341
  component: PropTypes.elementType,
337
342
 
338
343
  /**
339
- * The components used for each slot inside the InputBase.
340
- * Either a string to use a HTML element or a component.
344
+ * The components used for each slot inside.
345
+ *
346
+ * This prop is an alias for the `slots` prop.
347
+ * It's recommended to use the `slots` prop instead.
348
+ *
341
349
  * @default {}
342
350
  */
343
351
  components: PropTypes.shape({
@@ -345,7 +353,12 @@ process.env.NODE_ENV !== "production" ? ListItem.propTypes
345
353
  }),
346
354
 
347
355
  /**
348
- * The props used for each slot inside the Input.
356
+ * The extra props for the slot components.
357
+ * You can override the existing props or add new ones.
358
+ *
359
+ * This prop is an alias for the `slotProps` prop.
360
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
361
+ *
349
362
  * @default {}
350
363
  */
351
364
  componentsProps: PropTypes.shape({
@@ -415,6 +428,29 @@ process.env.NODE_ENV !== "production" ? ListItem.propTypes
415
428
  */
416
429
  selected: PropTypes.bool,
417
430
 
431
+ /**
432
+ * The extra props for the slot components.
433
+ * You can override the existing props or add new ones.
434
+ *
435
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
436
+ *
437
+ * @default {}
438
+ */
439
+ slotProps: PropTypes.shape({
440
+ root: PropTypes.object
441
+ }),
442
+
443
+ /**
444
+ * The components used for each slot inside.
445
+ *
446
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
447
+ *
448
+ * @default {}
449
+ */
450
+ slots: PropTypes.shape({
451
+ root: PropTypes.elementType
452
+ }),
453
+
418
454
  /**
419
455
  * The system prop that allows defining system overrides as well as additional CSS styles.
420
456
  */
@@ -122,11 +122,13 @@ var ListItemButton = /*#__PURE__*/React.forwardRef(function ListItemButton(inPro
122
122
  other = _objectWithoutProperties(props, ["alignItems", "autoFocus", "component", "children", "dense", "disableGutters", "divider", "focusVisibleClassName", "selected", "className"]);
123
123
 
124
124
  var context = React.useContext(ListContext);
125
- var childContext = {
126
- dense: dense || context.dense || false,
127
- alignItems: alignItems,
128
- disableGutters: disableGutters
129
- };
125
+ var childContext = React.useMemo(function () {
126
+ return {
127
+ dense: dense || context.dense || false,
128
+ alignItems: alignItems,
129
+ disableGutters: disableGutters
130
+ };
131
+ }, [alignItems, context.dense, dense, disableGutters]);
130
132
  var listItemRef = React.useRef(null);
131
133
  useEnhancedEffect(function () {
132
134
  if (autoFocus) {
@@ -135,10 +135,12 @@ var MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(inProps, ref) {
135
135
  other = _objectWithoutProperties(props, ["autoFocus", "component", "dense", "divider", "disableGutters", "focusVisibleClassName", "role", "tabIndex", "className"]);
136
136
 
137
137
  var context = React.useContext(ListContext);
138
- var childContext = {
139
- dense: dense || context.dense || false,
140
- disableGutters: disableGutters
141
- };
138
+ var childContext = React.useMemo(function () {
139
+ return {
140
+ dense: dense || context.dense || false,
141
+ disableGutters: disableGutters
142
+ };
143
+ }, [context.dense, dense, disableGutters]);
142
144
  var menuItemRef = React.useRef(null);
143
145
  useEnhancedEffect(function () {
144
146
  if (autoFocus) {
@@ -206,8 +206,11 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
206
206
  component: PropTypes.elementType,
207
207
 
208
208
  /**
209
- * The components used for each slot inside the Modal.
210
- * Either a string to use a HTML element or a component.
209
+ * The components used for each slot inside.
210
+ *
211
+ * This prop is an alias for the `slots` prop.
212
+ * It's recommended to use the `slots` prop instead.
213
+ *
211
214
  * @default {}
212
215
  */
213
216
  components: PropTypes.shape({
@@ -216,7 +219,12 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
216
219
  }),
217
220
 
218
221
  /**
219
- * The props used for each slot inside the Modal.
222
+ * The extra props for the slot components.
223
+ * You can override the existing props or add new ones.
224
+ *
225
+ * This prop is an alias for the `slotProps` prop.
226
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
227
+ *
220
228
  * @default {}
221
229
  */
222
230
  componentsProps: PropTypes.shape({
@@ -41,12 +41,14 @@ export var nativeSelectSelectStyles = function nativeSelectSelectStyles(_ref) {
41
41
  borderRadius: 0,
42
42
  // Reset
43
43
  cursor: 'pointer',
44
- '&:focus': {
45
- // Show that it's not an text input
46
- backgroundColor: theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.05)' : 'rgba(255, 255, 255, 0.05)',
44
+ '&:focus': _extends({}, theme.vars ? {
45
+ backgroundColor: "rgba(".concat(theme.vars.palette.common.onBackgroundChannel, " / 0.05)")
46
+ } : {
47
+ backgroundColor: theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.05)' : 'rgba(255, 255, 255, 0.05)'
48
+ }, {
47
49
  borderRadius: 0 // Reset Chrome style
48
50
 
49
- },
51
+ }),
50
52
  // Remove IE11 arrow
51
53
  '&::-ms-expand': {
52
54
  display: 'none'
@@ -56,7 +58,7 @@ export var nativeSelectSelectStyles = function nativeSelectSelectStyles(_ref) {
56
58
  }), _defineProperty(_extends2, '&[multiple]', {
57
59
  height: 'auto'
58
60
  }), _defineProperty(_extends2, '&:not([multiple]) option, &:not([multiple]) optgroup', {
59
- backgroundColor: theme.palette.background.paper
61
+ backgroundColor: (theme.vars || theme).palette.background.paper
60
62
  }), _defineProperty(_extends2, '&&&', {
61
63
  paddingRight: 24,
62
64
  minWidth: 16 // So it doesn't collapse.
@@ -66,9 +68,9 @@ export var nativeSelectSelectStyles = function nativeSelectSelectStyles(_ref) {
66
68
  paddingRight: 32
67
69
  }
68
70
  }, ownerState.variant === 'outlined' && {
69
- borderRadius: theme.shape.borderRadius,
71
+ borderRadius: (theme.vars || theme).shape.borderRadius,
70
72
  '&:focus': {
71
- borderRadius: theme.shape.borderRadius // Reset the reset for Chrome style
73
+ borderRadius: (theme.vars || theme).shape.borderRadius // Reset the reset for Chrome style
72
74
 
73
75
  },
74
76
  '&&&': {
@@ -97,9 +99,9 @@ export var nativeSelectIconStyles = function nativeSelectIconStyles(_ref3) {
97
99
  // Center vertically, height is 1em
98
100
  pointerEvents: 'none',
99
101
  // Don't block pointer events on the select under the icon.
100
- color: theme.palette.action.active
102
+ color: (theme.vars || theme).palette.action.active
101
103
  }, "&.".concat(nativeSelectClasses.disabled), {
102
- color: theme.palette.action.disabled
104
+ color: (theme.vars || theme).palette.action.disabled
103
105
  }), ownerState.open && {
104
106
  transform: 'rotate(180deg)'
105
107
  }, ownerState.variant === 'filled' && {
@@ -113,7 +113,7 @@ var OutlinedInputInput = styled(InputBaseInput, {
113
113
  });
114
114
  });
115
115
  var OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inProps, ref) {
116
- var _React$Fragment;
116
+ var _ref5, _slots$root, _ref6, _slots$input, _React$Fragment;
117
117
 
118
118
  var props = useThemeProps({
119
119
  props: inProps,
@@ -130,9 +130,11 @@ var OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inProps
130
130
  _props$multiline = props.multiline,
131
131
  multiline = _props$multiline === void 0 ? false : _props$multiline,
132
132
  notched = props.notched,
133
+ _props$slots = props.slots,
134
+ slots = _props$slots === void 0 ? {} : _props$slots,
133
135
  _props$type = props.type,
134
136
  type = _props$type === void 0 ? 'text' : _props$type,
135
- other = _objectWithoutProperties(props, ["components", "fullWidth", "inputComponent", "label", "multiline", "notched", "type"]);
137
+ other = _objectWithoutProperties(props, ["components", "fullWidth", "inputComponent", "label", "multiline", "notched", "slots", "type"]);
136
138
 
137
139
  var classes = useUtilityClasses(props);
138
140
  var muiFormControl = useFormControl();
@@ -155,11 +157,13 @@ var OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inProps
155
157
  type: type
156
158
  });
157
159
 
160
+ var RootSlot = (_ref5 = (_slots$root = slots.root) != null ? _slots$root : components.Root) != null ? _ref5 : OutlinedInputRoot;
161
+ var InputSlot = (_ref6 = (_slots$input = slots.input) != null ? _slots$input : components.Input) != null ? _ref6 : OutlinedInputInput;
158
162
  return /*#__PURE__*/_jsx(InputBase, _extends({
159
- components: _extends({
160
- Root: OutlinedInputRoot,
161
- Input: OutlinedInputInput
162
- }, components),
163
+ slots: {
164
+ root: RootSlot,
165
+ input: InputSlot
166
+ },
163
167
  renderSuffix: function renderSuffix(state) {
164
168
  return /*#__PURE__*/_jsx(NotchedOutlineRoot, {
165
169
  ownerState: ownerState,
@@ -217,8 +221,11 @@ process.env.NODE_ENV !== "production" ? OutlinedInput.propTypes
217
221
  .oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),
218
222
 
219
223
  /**
220
- * The components used for each slot inside the InputBase.
221
- * Either a string to use a HTML element or a component.
224
+ * The components used for each slot inside.
225
+ *
226
+ * This prop is an alias for the `slots` prop.
227
+ * It's recommended to use the `slots` prop instead.
228
+ *
222
229
  * @default {}
223
230
  */
224
231
  components: PropTypes.shape({
@@ -346,6 +353,18 @@ process.env.NODE_ENV !== "production" ? OutlinedInput.propTypes
346
353
  */
347
354
  rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
348
355
 
356
+ /**
357
+ * The components used for each slot inside.
358
+ *
359
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
360
+ *
361
+ * @default {}
362
+ */
363
+ slots: PropTypes.shape({
364
+ input: PropTypes.elementType,
365
+ root: PropTypes.elementType
366
+ }),
367
+
349
368
  /**
350
369
  * Start `InputAdornment` for this component.
351
370
  */
@@ -204,12 +204,7 @@ var PaginationItem = /*#__PURE__*/React.forwardRef(function PaginationItem(inPro
204
204
  color = _props$color === void 0 ? 'standard' : _props$color,
205
205
  component = props.component,
206
206
  _props$components = props.components,
207
- components = _props$components === void 0 ? {
208
- first: FirstPageIcon,
209
- last: LastPageIcon,
210
- next: NavigateNextIcon,
211
- previous: NavigateBeforeIcon
212
- } : _props$components,
207
+ components = _props$components === void 0 ? {} : _props$components,
213
208
  _props$disabled = props.disabled,
214
209
  disabled = _props$disabled === void 0 ? false : _props$disabled,
215
210
  page = props.page,
@@ -219,11 +214,13 @@ var PaginationItem = /*#__PURE__*/React.forwardRef(function PaginationItem(inPro
219
214
  shape = _props$shape === void 0 ? 'circular' : _props$shape,
220
215
  _props$size = props.size,
221
216
  size = _props$size === void 0 ? 'medium' : _props$size,
217
+ _props$slots = props.slots,
218
+ slots = _props$slots === void 0 ? {} : _props$slots,
222
219
  _props$type = props.type,
223
220
  type = _props$type === void 0 ? 'page' : _props$type,
224
221
  _props$variant = props.variant,
225
222
  variant = _props$variant === void 0 ? 'text' : _props$variant,
226
- other = _objectWithoutProperties(props, ["className", "color", "component", "components", "disabled", "page", "selected", "shape", "size", "type", "variant"]);
223
+ other = _objectWithoutProperties(props, ["className", "color", "component", "components", "disabled", "page", "selected", "shape", "size", "slots", "type", "variant"]);
227
224
 
228
225
  var ownerState = _extends({}, props, {
229
226
  color: color,
@@ -238,15 +235,15 @@ var PaginationItem = /*#__PURE__*/React.forwardRef(function PaginationItem(inPro
238
235
  var theme = useTheme();
239
236
  var classes = useUtilityClasses(ownerState);
240
237
  var normalizedIcons = theme.direction === 'rtl' ? {
241
- previous: components.next || NavigateNextIcon,
242
- next: components.previous || NavigateBeforeIcon,
243
- last: components.first || FirstPageIcon,
244
- first: components.last || LastPageIcon
238
+ previous: slots.next || components.next || NavigateNextIcon,
239
+ next: slots.previous || components.previous || NavigateBeforeIcon,
240
+ last: slots.first || components.first || FirstPageIcon,
241
+ first: slots.last || components.last || LastPageIcon
245
242
  } : {
246
- previous: components.previous || NavigateBeforeIcon,
247
- next: components.next || NavigateNextIcon,
248
- first: components.first || FirstPageIcon,
249
- last: components.last || LastPageIcon
243
+ previous: slots.previous || components.previous || NavigateBeforeIcon,
244
+ next: slots.next || components.next || NavigateNextIcon,
245
+ first: slots.first || components.first || FirstPageIcon,
246
+ last: slots.last || components.last || LastPageIcon
250
247
  };
251
248
  var Icon = normalizedIcons[type];
252
249
  return type === 'start-ellipsis' || type === 'end-ellipsis' ? /*#__PURE__*/_jsx(PaginationItemEllipsis, {
@@ -308,13 +305,12 @@ process.env.NODE_ENV !== "production" ? PaginationItem.propTypes
308
305
  component: PropTypes.elementType,
309
306
 
310
307
  /**
311
- * The components used for first, last, next & previous item type
312
- * @default {
313
- * first: FirstPageIcon,
314
- * last: LastPageIcon,
315
- * next: NavigateNextIcon,
316
- * previous: NavigateBeforeIcon,
317
- * }
308
+ * The components used for each slot inside.
309
+ *
310
+ * This prop is an alias for the `slots` prop.
311
+ * It's recommended to use the `slots` prop instead.
312
+ *
313
+ * @default {}
318
314
  */
319
315
  components: PropTypes.shape({
320
316
  first: PropTypes.elementType,
@@ -354,6 +350,20 @@ process.env.NODE_ENV !== "production" ? PaginationItem.propTypes
354
350
  /* @typescript-to-proptypes-ignore */
355
351
  .oneOfType([PropTypes.oneOf(['small', 'medium', 'large']), PropTypes.string]),
356
352
 
353
+ /**
354
+ * The components used for each slot inside.
355
+ *
356
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
357
+ *
358
+ * @default {}
359
+ */
360
+ slots: PropTypes.shape({
361
+ first: PropTypes.elementType,
362
+ last: PropTypes.elementType,
363
+ next: PropTypes.elementType,
364
+ previous: PropTypes.elementType
365
+ }),
366
+
357
367
  /**
358
368
  * The system prop that allows defining system overrides as well as additional CSS styles.
359
369
  */
@@ -41,7 +41,8 @@ var RadioRoot = styled(SwitchBase, {
41
41
  var theme = _ref.theme,
42
42
  ownerState = _ref.ownerState;
43
43
  return _extends({
44
- color: (theme.vars || theme).palette.text.secondary,
44
+ color: (theme.vars || theme).palette.text.secondary
45
+ }, !ownerState.disableRipple && {
45
46
  '&:hover': {
46
47
  backgroundColor: theme.vars ? "rgba(".concat(ownerState.color === 'default' ? theme.vars.palette.action.activeChannel : theme.vars.palette[ownerState.color].mainChannel, " / ").concat(theme.vars.palette.action.hoverOpacity, ")") : alpha(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
47
48
  // Reset on touch devices, it doesn't add specificity
@@ -14,7 +14,7 @@ var RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref) {
14
14
  children = props.children,
15
15
  defaultValue = props.defaultValue,
16
16
  nameProp = props.name,
17
- onChange = props.onChange,
17
+ _onChange = props.onChange,
18
18
  valueProp = props.value,
19
19
  other = _objectWithoutProperties(props, ["actions", "children", "defaultValue", "name", "onChange", "value"]);
20
20
 
@@ -45,22 +45,22 @@ var RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref) {
45
45
  };
46
46
  }, []);
47
47
  var handleRef = useForkRef(ref, rootRef);
48
-
49
- var handleChange = function handleChange(event) {
50
- setValueState(event.target.value);
51
-
52
- if (onChange) {
53
- onChange(event, event.target.value);
54
- }
55
- };
56
-
57
48
  var name = useId(nameProp);
58
- return /*#__PURE__*/_jsx(RadioGroupContext.Provider, {
59
- value: {
49
+ var contextValue = React.useMemo(function () {
50
+ return {
60
51
  name: name,
61
- onChange: handleChange,
52
+ onChange: function onChange(event) {
53
+ setValueState(event.target.value);
54
+
55
+ if (_onChange) {
56
+ _onChange(event, event.target.value);
57
+ }
58
+ },
62
59
  value: value
63
- },
60
+ };
61
+ }, [name, _onChange, setValueState, value]);
62
+ return /*#__PURE__*/_jsx(RadioGroupContext.Provider, {
63
+ value: contextValue,
64
64
  children: /*#__PURE__*/_jsx(FormGroup, _extends({
65
65
  role: "radiogroup",
66
66
  ref: handleRef
@@ -251,14 +251,14 @@ process.env.NODE_ENV !== "production" ? Select.propTypes
251
251
  *
252
252
  * @param {SelectChangeEvent<T>} event The event source of the callback.
253
253
  * You can pull out the new value by accessing `event.target.value` (any).
254
- * **Warning**: This is a generic event not a change event unless the change event is caused by browser autofill.
254
+ * **Warning**: This is a generic event, not a change event, unless the change event is caused by browser autofill.
255
255
  * @param {object} [child] The react element that was selected when `native` is `false` (default).
256
256
  */
257
257
  onChange: PropTypes.func,
258
258
 
259
259
  /**
260
260
  * Callback fired when the component requests to be closed.
261
- * Use in controlled mode (see open).
261
+ * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select collapes).
262
262
  *
263
263
  * @param {object} event The event source of the callback.
264
264
  */
@@ -266,7 +266,7 @@ process.env.NODE_ENV !== "production" ? Select.propTypes
266
266
 
267
267
  /**
268
268
  * Callback fired when the component requests to be opened.
269
- * Use in controlled mode (see open).
269
+ * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select expands).
270
270
  *
271
271
  * @param {object} event The event source of the callback.
272
272
  */
@@ -594,8 +594,11 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes
594
594
  .oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),
595
595
 
596
596
  /**
597
- * The components used for each slot inside the Slider.
598
- * Either a string to use a HTML element or a component.
597
+ * The components used for each slot inside.
598
+ *
599
+ * This prop is an alias for the `slots` prop.
600
+ * It's recommended to use the `slots` prop instead.
601
+ *
599
602
  * @default {}
600
603
  */
601
604
  components: PropTypes.shape({
@@ -610,7 +613,13 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes
610
613
  }),
611
614
 
612
615
  /**
613
- * @ignore
616
+ * The extra props for the slot components.
617
+ * You can override the existing props or add new ones.
618
+ *
619
+ * This prop is an alias for the `slotProps` prop.
620
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
621
+ *
622
+ * @default {}
614
623
  */
615
624
  componentsProps: PropTypes.shape({
616
625
  input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
@@ -113,6 +113,8 @@ var StepLabelLabelContainer = styled('span', {
113
113
  });
114
114
  });
115
115
  var StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref) {
116
+ var _slotProps$label;
117
+
116
118
  var props = useThemeProps({
117
119
  props: inProps,
118
120
  name: 'MuiStepLabel'
@@ -126,9 +128,11 @@ var StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref) {
126
128
  error = _props$error === void 0 ? false : _props$error,
127
129
  iconProp = props.icon,
128
130
  optional = props.optional,
131
+ _props$slotProps = props.slotProps,
132
+ slotProps = _props$slotProps === void 0 ? {} : _props$slotProps,
129
133
  StepIconComponentProp = props.StepIconComponent,
130
134
  StepIconProps = props.StepIconProps,
131
- other = _objectWithoutProperties(props, ["children", "className", "componentsProps", "error", "icon", "optional", "StepIconComponent", "StepIconProps"]);
135
+ other = _objectWithoutProperties(props, ["children", "className", "componentsProps", "error", "icon", "optional", "slotProps", "StepIconComponent", "StepIconProps"]);
132
136
 
133
137
  var _React$useContext = React.useContext(StepperContext),
134
138
  alternativeLabel = _React$useContext.alternativeLabel,
@@ -157,6 +161,7 @@ var StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref) {
157
161
  });
158
162
 
159
163
  var classes = useUtilityClasses(ownerState);
164
+ var labelSlotProps = (_slotProps$label = slotProps.label) != null ? _slotProps$label : componentsProps.label;
160
165
  return /*#__PURE__*/_jsxs(StepLabelRoot, _extends({
161
166
  className: clsx(classes.root, className),
162
167
  ref: ref,
@@ -175,9 +180,9 @@ var StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref) {
175
180
  className: classes.labelContainer,
176
181
  ownerState: ownerState,
177
182
  children: [children ? /*#__PURE__*/_jsx(StepLabelLabel, _extends({
178
- className: classes.label,
179
183
  ownerState: ownerState
180
- }, componentsProps.label, {
184
+ }, labelSlotProps, {
185
+ className: clsx(classes.label, labelSlotProps == null ? void 0 : labelSlotProps.className),
181
186
  children: children
182
187
  })) : null, optional]
183
188
  })]
@@ -230,6 +235,14 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes
230
235
  */
231
236
  optional: PropTypes.node,
232
237
 
238
+ /**
239
+ * The props used for each slot inside.
240
+ * @default {}
241
+ */
242
+ slotProps: PropTypes.shape({
243
+ label: PropTypes.object
244
+ }),
245
+
233
246
  /**
234
247
  * The component to render in place of the [`StepIcon`](/material-ui/api/step-icon/).
235
248
  */
@@ -1,6 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  import * as React from 'react';
4
+ import { flushSync } from 'react-dom';
4
5
  import PropTypes from 'prop-types';
5
6
  import { elementTypeAcceptingRef } from '@mui/utils';
6
7
  import { useThemeProps } from '@mui/system';
@@ -227,7 +228,9 @@ var SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inP
227
228
 
228
229
  claimedSwipeInstance = null;
229
230
  touchDetected.current = false;
230
- setMaybeSwiping(false); // The swipe wasn't started.
231
+ flushSync(function () {
232
+ setMaybeSwiping(false);
233
+ }); // The swipe wasn't started.
231
234
 
232
235
  if (!swipeInstance.current.isSwiping) {
233
236
  swipeInstance.current.isSwiping = null;
@@ -429,7 +432,9 @@ var SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inP
429
432
  claimedSwipeInstance = null;
430
433
  swipeInstance.current.startX = currentX;
431
434
  swipeInstance.current.startY = currentY;
432
- setMaybeSwiping(true);
435
+ flushSync(function () {
436
+ setMaybeSwiping(true);
437
+ });
433
438
 
434
439
  if (!open && paperRef.current) {
435
440
  // The ref may be null when a parent component updates while swiping.
@@ -487,6 +492,8 @@ var SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inP
487
492
  BackdropProps: _extends({}, BackdropProps, {
488
493
  ref: backdropRef
489
494
  })
495
+ }, variant === 'temporary' && {
496
+ keepMounted: true
490
497
  }, ModalPropsProp),
491
498
  hideBackdrop: hideBackdrop,
492
499
  PaperProps: _extends({}, PaperProps, {