@mui/material 5.10.11 → 5.10.12

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 (193) hide show
  1. package/Accordion/accordionClasses.d.ts +18 -18
  2. package/AccordionActions/accordionActionsClasses.d.ts +10 -10
  3. package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
  4. package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
  5. package/Alert/alertClasses.d.ts +44 -44
  6. package/AlertTitle/alertTitleClasses.d.ts +8 -8
  7. package/AppBar/appBarClasses.d.ts +28 -28
  8. package/Autocomplete/autocompleteClasses.d.ts +54 -54
  9. package/Avatar/avatarClasses.d.ts +20 -20
  10. package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
  11. package/Backdrop/backdropClasses.d.ts +10 -10
  12. package/Badge/badgeClasses.d.ts +56 -56
  13. package/BottomNavigation/BottomNavigation.js +0 -0
  14. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  15. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  16. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  17. package/Button/buttonClasses.d.ts +100 -100
  18. package/ButtonBase/TouchRipple.js +1 -1
  19. package/ButtonBase/buttonBaseClasses.d.ts +12 -12
  20. package/ButtonBase/touchRippleClasses.d.ts +20 -20
  21. package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
  22. package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
  23. package/CHANGELOG.md +76 -0
  24. package/Card/cardClasses.d.ts +8 -8
  25. package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
  26. package/CardActions/cardActionsClasses.d.ts +10 -10
  27. package/CardContent/cardContentClasses.d.ts +8 -8
  28. package/CardHeader/cardHeaderClasses.d.ts +18 -18
  29. package/CardMedia/cardMediaClasses.d.ts +12 -12
  30. package/Checkbox/checkboxClasses.d.ts +18 -18
  31. package/Chip/Chip.js +8 -4
  32. package/Chip/chipClasses.d.ts +96 -96
  33. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  34. package/ClickAwayListener/index.d.ts +2 -2
  35. package/Collapse/collapseClasses.d.ts +18 -18
  36. package/Container/containerClasses.d.ts +6 -6
  37. package/Dialog/DialogContext.d.ts +6 -6
  38. package/Dialog/dialogClasses.d.ts +36 -36
  39. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  40. package/DialogContent/dialogContentClasses.d.ts +10 -10
  41. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  42. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  43. package/Divider/dividerClasses.d.ts +34 -34
  44. package/Drawer/drawerClasses.d.ts +30 -30
  45. package/Fab/fabClasses.d.ts +26 -26
  46. package/FilledInput/filledInputClasses.d.ts +40 -40
  47. package/FormControl/FormControl.js +29 -29
  48. package/FormControl/formControlClasses.d.ts +14 -14
  49. package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
  50. package/FormGroup/formGroupClasses.d.ts +12 -12
  51. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  52. package/FormLabel/formLabelClasses.d.ts +22 -22
  53. package/Grid/gridClasses.d.ts +48 -48
  54. package/Icon/iconClasses.d.ts +24 -24
  55. package/IconButton/iconButtonClasses.d.ts +26 -26
  56. package/ImageList/imageListClasses.d.ts +16 -16
  57. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  58. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  59. package/Input/inputClasses.d.ts +34 -34
  60. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  61. package/InputBase/inputBaseClasses.d.ts +46 -46
  62. package/InputLabel/inputLabelClasses.d.ts +32 -32
  63. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  64. package/Link/getTextDecoration.d.ts +15 -15
  65. package/Link/linkClasses.d.ts +18 -18
  66. package/List/listClasses.d.ts +14 -14
  67. package/ListItem/ListItem.js +2 -2
  68. package/ListItem/listItemClasses.d.ts +30 -30
  69. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  70. package/ListItemButton/ListItemButton.js +2 -2
  71. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  72. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  73. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  74. package/ListItemText/listItemTextClasses.d.ts +18 -18
  75. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  76. package/Menu/menuClasses.d.ts +12 -12
  77. package/MenuItem/MenuItem.js +2 -2
  78. package/MenuItem/menuItemClasses.d.ts +20 -20
  79. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  80. package/NativeSelect/nativeSelectClasses.d.ts +32 -32
  81. package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
  82. package/OverridableComponentAugmentation.d.ts +31 -31
  83. package/Pagination/paginationClasses.d.ts +14 -14
  84. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  85. package/Paper/paperClasses.d.ts +39 -39
  86. package/Popover/popoverClasses.d.ts +10 -10
  87. package/Popper/Popper.d.ts +37 -37
  88. package/Radio/Radio.js +2 -1
  89. package/Radio/radioClasses.d.ts +16 -16
  90. package/RadioGroup/RadioGroup.js +12 -12
  91. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  92. package/RadioGroup/useRadioGroup.d.ts +4 -4
  93. package/Rating/ratingClasses.d.ts +40 -40
  94. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  95. package/Select/selectClasses.d.ts +30 -30
  96. package/Skeleton/skeletonClasses.d.ts +26 -26
  97. package/Snackbar/snackbarClasses.d.ts +20 -20
  98. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  99. package/SpeedDial/speedDialClasses.d.ts +22 -22
  100. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  101. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  102. package/Step/StepContext.d.ts +20 -20
  103. package/Step/stepClasses.d.ts +16 -16
  104. package/StepButton/stepButtonClasses.d.ts +14 -14
  105. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  106. package/StepContent/stepContentClasses.d.ts +12 -12
  107. package/StepIcon/stepIconClasses.d.ts +16 -16
  108. package/StepLabel/stepLabelClasses.d.ts +28 -28
  109. package/Stepper/StepperContext.d.ts +18 -18
  110. package/Stepper/stepperClasses.d.ts +14 -14
  111. package/SvgIcon/svgIconClasses.d.ts +26 -26
  112. package/SwipeableDrawer/SwipeableDrawer.js +10 -2
  113. package/Switch/switchClasses.d.ts +32 -32
  114. package/Tab/tabClasses.d.ts +26 -26
  115. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  116. package/Table/tableClasses.d.ts +10 -10
  117. package/TableBody/tableBodyClasses.d.ts +8 -8
  118. package/TableCell/tableCellClasses.d.ts +32 -32
  119. package/TableContainer/tableContainerClasses.d.ts +8 -8
  120. package/TableFooter/tableFooterClasses.d.ts +8 -8
  121. package/TableHead/tableHeadClasses.d.ts +8 -8
  122. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  123. package/TableRow/tableRowClasses.d.ts +16 -16
  124. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  125. package/Tabs/tabsClasses.d.ts +32 -32
  126. package/TextField/textFieldClasses.d.ts +8 -8
  127. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  128. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  129. package/Toolbar/toolbarClasses.d.ts +14 -14
  130. package/Tooltip/Tooltip.js +1 -1
  131. package/Tooltip/tooltipClasses.d.ts +30 -30
  132. package/Typography/typographyClasses.d.ts +50 -50
  133. package/Unstable_Grid2/Grid2.d.ts +4 -4
  134. package/Unstable_Grid2/Grid2Props.d.ts +15 -15
  135. package/Unstable_Grid2/grid2Classes.d.ts +5 -5
  136. package/Unstable_Grid2/index.d.ts +4 -4
  137. package/className/index.d.ts +1 -1
  138. package/darkScrollbar/index.d.ts +28 -28
  139. package/esm/BottomNavigation/BottomNavigation.js +0 -0
  140. package/esm/ButtonBase/TouchRipple.js +1 -1
  141. package/esm/Chip/Chip.js +8 -4
  142. package/esm/FormControl/FormControl.js +29 -29
  143. package/esm/ListItem/ListItem.js +2 -2
  144. package/esm/ListItemButton/ListItemButton.js +2 -2
  145. package/esm/MenuItem/MenuItem.js +2 -2
  146. package/esm/Radio/Radio.js +2 -1
  147. package/esm/RadioGroup/RadioGroup.js +12 -12
  148. package/esm/SwipeableDrawer/SwipeableDrawer.js +9 -2
  149. package/esm/Tooltip/Tooltip.js +1 -1
  150. package/generateUtilityClass/index.d.ts +2 -2
  151. package/generateUtilityClasses/index.d.ts +1 -1
  152. package/index.js +1 -1
  153. package/internal/switchBaseClasses.d.ts +12 -12
  154. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  155. package/legacy/ButtonBase/TouchRipple.js +1 -1
  156. package/legacy/Chip/Chip.js +8 -4
  157. package/legacy/FormControl/FormControl.js +29 -29
  158. package/legacy/ListItem/ListItem.js +7 -5
  159. package/legacy/ListItemButton/ListItemButton.js +7 -5
  160. package/legacy/MenuItem/MenuItem.js +6 -4
  161. package/legacy/Radio/Radio.js +2 -1
  162. package/legacy/RadioGroup/RadioGroup.js +14 -14
  163. package/legacy/SwipeableDrawer/SwipeableDrawer.js +9 -2
  164. package/legacy/Tooltip/Tooltip.js +1 -1
  165. package/legacy/index.js +1 -1
  166. package/locale/index.d.ts +72 -72
  167. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  168. package/modern/ButtonBase/TouchRipple.js +1 -1
  169. package/modern/Chip/Chip.js +8 -4
  170. package/modern/FormControl/FormControl.js +29 -29
  171. package/modern/ListItem/ListItem.js +2 -2
  172. package/modern/ListItemButton/ListItemButton.js +2 -2
  173. package/modern/MenuItem/MenuItem.js +2 -2
  174. package/modern/Radio/Radio.js +2 -1
  175. package/modern/RadioGroup/RadioGroup.js +12 -12
  176. package/modern/SwipeableDrawer/SwipeableDrawer.js +9 -2
  177. package/modern/Tooltip/Tooltip.js +1 -1
  178. package/modern/index.js +1 -1
  179. package/package.json +4 -4
  180. package/styles/CssVarsProvider.d.ts +14 -14
  181. package/styles/excludeVariablesFromRoot.d.ts +5 -5
  182. package/transitions/index.d.ts +1 -1
  183. package/transitions/transition.d.ts +13 -13
  184. package/transitions/utils.d.ts +23 -23
  185. package/umd/material-ui.development.js +84 -70
  186. package/umd/material-ui.production.min.js +20 -20
  187. package/useMediaQuery/useMediaQuery.d.ts +31 -31
  188. package/useTouchRipple/index.d.ts +1 -1
  189. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  190. package/utils/getScrollbarSize.d.ts +2 -2
  191. package/utils/ownerDocument.d.ts +2 -2
  192. package/utils/ownerWindow.d.ts +2 -2
  193. package/utils/setRef.d.ts +2 -2
@@ -182,35 +182,35 @@ const FormControl = /*#__PURE__*/React.forwardRef(function FormControl(inProps,
182
182
  };
183
183
  }
184
184
 
185
- const onFilled = React.useCallback(() => {
186
- setFilled(true);
187
- }, []);
188
- const onEmpty = React.useCallback(() => {
189
- setFilled(false);
190
- }, []);
191
- const childContext = {
192
- adornedStart,
193
- setAdornedStart,
194
- color,
195
- disabled,
196
- error,
197
- filled,
198
- focused,
199
- fullWidth,
200
- hiddenLabel,
201
- size,
202
- onBlur: () => {
203
- setFocused(false);
204
- },
205
- onEmpty,
206
- onFilled,
207
- onFocus: () => {
208
- setFocused(true);
209
- },
210
- registerEffect,
211
- required,
212
- variant
213
- };
185
+ const childContext = React.useMemo(() => {
186
+ return {
187
+ adornedStart,
188
+ setAdornedStart,
189
+ color,
190
+ disabled,
191
+ error,
192
+ filled,
193
+ focused,
194
+ fullWidth,
195
+ hiddenLabel,
196
+ size,
197
+ onBlur: () => {
198
+ setFocused(false);
199
+ },
200
+ onEmpty: () => {
201
+ setFilled(false);
202
+ },
203
+ onFilled: () => {
204
+ setFilled(true);
205
+ },
206
+ onFocus: () => {
207
+ setFocused(true);
208
+ },
209
+ registerEffect,
210
+ required,
211
+ variant
212
+ };
213
+ }, [adornedStart, color, disabled, error, filled, focused, fullWidth, hiddenLabel, registerEffect, required, size, variant]);
214
214
  return /*#__PURE__*/_jsx(FormControlContext.Provider, {
215
215
  value: childContext,
216
216
  children: /*#__PURE__*/_jsx(FormControlRoot, _extends({
@@ -165,11 +165,11 @@ const ListItem = /*#__PURE__*/React.forwardRef(function ListItem(inProps, ref) {
165
165
  other = _objectWithoutPropertiesLoose(props, _excluded2);
166
166
 
167
167
  const context = React.useContext(ListContext);
168
- const childContext = {
168
+ const childContext = React.useMemo(() => ({
169
169
  dense: dense || context.dense || false,
170
170
  alignItems,
171
171
  disableGutters
172
- };
172
+ }), [alignItems, context.dense, dense, disableGutters]);
173
173
  const listItemRef = React.useRef(null);
174
174
  useEnhancedEffect(() => {
175
175
  if (autoFocus) {
@@ -121,11 +121,11 @@ const ListItemButton = /*#__PURE__*/React.forwardRef(function ListItemButton(inP
121
121
  other = _objectWithoutPropertiesLoose(props, _excluded);
122
122
 
123
123
  const context = React.useContext(ListContext);
124
- const childContext = {
124
+ const childContext = React.useMemo(() => ({
125
125
  dense: dense || context.dense || false,
126
126
  alignItems,
127
127
  disableGutters
128
- };
128
+ }), [alignItems, context.dense, dense, disableGutters]);
129
129
  const listItemRef = React.useRef(null);
130
130
  useEnhancedEffect(() => {
131
131
  if (autoFocus) {
@@ -144,10 +144,10 @@ const MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(inProps, ref) {
144
144
  other = _objectWithoutPropertiesLoose(props, _excluded);
145
145
 
146
146
  const context = React.useContext(ListContext);
147
- const childContext = {
147
+ const childContext = React.useMemo(() => ({
148
148
  dense: dense || context.dense || false,
149
149
  disableGutters
150
- };
150
+ }), [context.dense, dense, disableGutters]);
151
151
  const menuItemRef = React.useRef(null);
152
152
  useEnhancedEffect(() => {
153
153
  if (autoFocus) {
@@ -42,7 +42,8 @@ const RadioRoot = styled(SwitchBase, {
42
42
  theme,
43
43
  ownerState
44
44
  }) => _extends({
45
- color: (theme.vars || theme).palette.text.secondary,
45
+ color: (theme.vars || theme).palette.text.secondary
46
+ }, !ownerState.disableRipple && {
46
47
  '&:hover': {
47
48
  backgroundColor: theme.vars ? `rgba(${ownerState.color === 'default' ? theme.vars.palette.action.activeChannel : theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
48
49
  // Reset on touch devices, it doesn't add specificity
@@ -42,22 +42,22 @@ const RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref)
42
42
  }
43
43
  }), []);
44
44
  const handleRef = useForkRef(ref, rootRef);
45
+ const name = useId(nameProp);
46
+ const contextValue = React.useMemo(() => ({
47
+ name,
45
48
 
46
- const handleChange = event => {
47
- setValueState(event.target.value);
49
+ onChange(event) {
50
+ setValueState(event.target.value);
48
51
 
49
- if (onChange) {
50
- onChange(event, event.target.value);
51
- }
52
- };
52
+ if (onChange) {
53
+ onChange(event, event.target.value);
54
+ }
55
+ },
53
56
 
54
- const name = useId(nameProp);
57
+ value
58
+ }), [name, onChange, setValueState, value]);
55
59
  return /*#__PURE__*/_jsx(RadioGroupContext.Provider, {
56
- value: {
57
- name,
58
- onChange: handleChange,
59
- value
60
- },
60
+ value: contextValue,
61
61
  children: /*#__PURE__*/_jsx(FormGroup, _extends({
62
62
  role: "radiogroup",
63
63
  ref: handleRef
@@ -3,6 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
3
3
  const _excluded = ["BackdropProps"],
4
4
  _excluded2 = ["anchor", "disableBackdropTransition", "disableDiscovery", "disableSwipeToOpen", "hideBackdrop", "hysteresis", "minFlingVelocity", "ModalProps", "onClose", "onOpen", "open", "PaperProps", "SwipeAreaProps", "swipeAreaWidth", "transitionDuration", "variant"];
5
5
  import * as React from 'react';
6
+ import { flushSync } from 'react-dom';
6
7
  import PropTypes from 'prop-types';
7
8
  import { elementTypeAcceptingRef } from '@mui/utils';
8
9
  import { useThemeProps } from '@mui/system';
@@ -218,7 +219,9 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
218
219
 
219
220
  claimedSwipeInstance = null;
220
221
  touchDetected.current = false;
221
- setMaybeSwiping(false); // The swipe wasn't started.
222
+ flushSync(() => {
223
+ setMaybeSwiping(false);
224
+ }); // The swipe wasn't started.
222
225
 
223
226
  if (!swipeInstance.current.isSwiping) {
224
227
  swipeInstance.current.isSwiping = null;
@@ -420,7 +423,9 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
420
423
  claimedSwipeInstance = null;
421
424
  swipeInstance.current.startX = currentX;
422
425
  swipeInstance.current.startY = currentY;
423
- setMaybeSwiping(true);
426
+ flushSync(() => {
427
+ setMaybeSwiping(true);
428
+ });
424
429
 
425
430
  if (!open && paperRef.current) {
426
431
  // The ref may be null when a parent component updates while swiping.
@@ -476,6 +481,8 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
476
481
  BackdropProps: _extends({}, BackdropProps, {
477
482
  ref: backdropRef
478
483
  })
484
+ }, variant === 'temporary' && {
485
+ keepMounted: true
479
486
  }, ModalPropsProp),
480
487
  hideBackdrop: hideBackdrop,
481
488
  PaperProps: _extends({}, PaperProps, {
@@ -463,7 +463,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
463
463
  }, [handleClose, open]);
464
464
  const handleRef = useForkRef(children.ref, focusVisibleRef, setChildNode, ref); // There is no point in displaying an empty tooltip.
465
465
 
466
- if (typeof title !== 'number' && !title) {
466
+ if (!title && title !== 0) {
467
467
  open = false;
468
468
  }
469
469
 
@@ -1,2 +1,2 @@
1
- export { unstable_generateUtilityClass as default } from '@mui/utils';
2
- export type { GlobalStateSlot } from '@mui/utils';
1
+ export { unstable_generateUtilityClass as default } from '@mui/utils';
2
+ export type { GlobalStateSlot } from '@mui/utils';
@@ -1 +1 @@
1
- export { unstable_generateUtilityClasses as default } from '@mui/utils';
1
+ export { unstable_generateUtilityClasses as default } from '@mui/utils';
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.10.11
1
+ /** @license MUI v5.10.12
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -1,12 +1,12 @@
1
- export interface SwitchBaseClasses {
2
- root: string;
3
- checked: string;
4
- disabled: string;
5
- input: string;
6
- edgeStart: string;
7
- edgeEnd: string;
8
- }
9
- export declare type SwitchBaseClassKey = keyof SwitchBaseClasses;
10
- export declare function getSwitchBaseUtilityClass(slot: string): string;
11
- declare const switchBaseClasses: SwitchBaseClasses;
12
- export default switchBaseClasses;
1
+ export interface SwitchBaseClasses {
2
+ root: string;
3
+ checked: string;
4
+ disabled: string;
5
+ input: string;
6
+ edgeStart: string;
7
+ edgeEnd: string;
8
+ }
9
+ export declare type SwitchBaseClassKey = keyof SwitchBaseClasses;
10
+ export declare function getSwitchBaseUtilityClass(slot: string): string;
11
+ declare const switchBaseClasses: SwitchBaseClasses;
12
+ export default switchBaseClasses;
File without changes
@@ -125,7 +125,7 @@ var TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, re
125
125
  var start = React.useCallback(function () {
126
126
  var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
127
127
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
128
- var cb = arguments.length > 2 ? arguments[2] : undefined;
128
+ var cb = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};
129
129
  var _options$pulsate = options.pulsate,
130
130
  pulsate = _options$pulsate === void 0 ? false : _options$pulsate,
131
131
  _options$center = options.center,
@@ -22,6 +22,7 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
22
22
  disabled = ownerState.disabled,
23
23
  size = ownerState.size,
24
24
  color = ownerState.color,
25
+ iconColor = ownerState.iconColor,
25
26
  onDelete = ownerState.onDelete,
26
27
  clickable = ownerState.clickable,
27
28
  variant = ownerState.variant;
@@ -29,7 +30,7 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
29
30
  root: ['root', variant, disabled && 'disabled', "size".concat(capitalize(size)), "color".concat(capitalize(color)), clickable && 'clickable', clickable && "clickableColor".concat(capitalize(color)), onDelete && 'deletable', onDelete && "deletableColor".concat(capitalize(color)), "".concat(variant).concat(capitalize(color))],
30
31
  label: ['label', "label".concat(capitalize(size))],
31
32
  avatar: ['avatar', "avatar".concat(capitalize(size)), "avatarColor".concat(capitalize(color))],
32
- icon: ['icon', "icon".concat(capitalize(size)), "iconColor".concat(capitalize(color))],
33
+ icon: ['icon', "icon".concat(capitalize(size)), "iconColor".concat(capitalize(iconColor))],
33
34
  deleteIcon: ['deleteIcon', "deleteIcon".concat(capitalize(size)), "deleteIconColor".concat(capitalize(color)), "deleteIcon".concat(capitalize(variant), "Color").concat(capitalize(color))]
34
35
  };
35
36
  return composeClasses(slots, getChipUtilityClass, classes);
@@ -41,11 +42,12 @@ var ChipRoot = styled('div', {
41
42
  overridesResolver: function overridesResolver(props, styles) {
42
43
  var ownerState = props.ownerState;
43
44
  var color = ownerState.color,
45
+ iconColor = ownerState.iconColor,
44
46
  clickable = ownerState.clickable,
45
47
  onDelete = ownerState.onDelete,
46
48
  size = ownerState.size,
47
49
  variant = ownerState.variant;
48
- return [_defineProperty({}, "& .".concat(chipClasses.avatar), styles.avatar), _defineProperty({}, "& .".concat(chipClasses.avatar), styles["avatar".concat(capitalize(size))]), _defineProperty({}, "& .".concat(chipClasses.avatar), styles["avatarColor".concat(capitalize(color))]), _defineProperty({}, "& .".concat(chipClasses.icon), styles.icon), _defineProperty({}, "& .".concat(chipClasses.icon), styles["icon".concat(capitalize(size))]), _defineProperty({}, "& .".concat(chipClasses.icon), styles["iconColor".concat(capitalize(color))]), _defineProperty({}, "& .".concat(chipClasses.deleteIcon), styles.deleteIcon), _defineProperty({}, "& .".concat(chipClasses.deleteIcon), styles["deleteIcon".concat(capitalize(size))]), _defineProperty({}, "& .".concat(chipClasses.deleteIcon), styles["deleteIconColor".concat(capitalize(color))]), _defineProperty({}, "& .".concat(chipClasses.deleteIcon), styles["deleteIcon".concat(capitalize(variant), "Color").concat(capitalize(color))]), styles.root, styles["size".concat(capitalize(size))], styles["color".concat(capitalize(color))], clickable && styles.clickable, clickable && color !== 'default' && styles["clickableColor".concat(capitalize(color), ")")], onDelete && styles.deletable, onDelete && color !== 'default' && styles["deletableColor".concat(capitalize(color))], styles[variant], styles["".concat(variant).concat(capitalize(color))]];
50
+ return [_defineProperty({}, "& .".concat(chipClasses.avatar), styles.avatar), _defineProperty({}, "& .".concat(chipClasses.avatar), styles["avatar".concat(capitalize(size))]), _defineProperty({}, "& .".concat(chipClasses.avatar), styles["avatarColor".concat(capitalize(color))]), _defineProperty({}, "& .".concat(chipClasses.icon), styles.icon), _defineProperty({}, "& .".concat(chipClasses.icon), styles["icon".concat(capitalize(size))]), _defineProperty({}, "& .".concat(chipClasses.icon), styles["iconColor".concat(capitalize(iconColor))]), _defineProperty({}, "& .".concat(chipClasses.deleteIcon), styles.deleteIcon), _defineProperty({}, "& .".concat(chipClasses.deleteIcon), styles["deleteIcon".concat(capitalize(size))]), _defineProperty({}, "& .".concat(chipClasses.deleteIcon), styles["deleteIconColor".concat(capitalize(color))]), _defineProperty({}, "& .".concat(chipClasses.deleteIcon), styles["deleteIcon".concat(capitalize(variant), "Color").concat(capitalize(color))]), styles.root, styles["size".concat(capitalize(size))], styles["color".concat(capitalize(color))], clickable && styles.clickable, clickable && color !== 'default' && styles["clickableColor".concat(capitalize(color), ")")], onDelete && styles.deletable, onDelete && color !== 'default' && styles["deletableColor".concat(capitalize(color))], styles[variant], styles["".concat(variant).concat(capitalize(color))]];
49
51
  }
50
52
  })(function (_ref11) {
51
53
  var _extends2;
@@ -101,16 +103,17 @@ var ChipRoot = styled('div', {
101
103
  height: 18,
102
104
  fontSize: theme.typography.pxToRem(10)
103
105
  }), _defineProperty(_extends2, "& .".concat(chipClasses.icon), _extends({
104
- color: theme.vars ? theme.vars.palette.Chip.defaultIconColor : textColor,
105
106
  marginLeft: 5,
106
107
  marginRight: -6
107
108
  }, ownerState.size === 'small' && {
108
109
  fontSize: 18,
109
110
  marginLeft: 4,
110
111
  marginRight: -4
112
+ }, ownerState.iconColor === ownerState.color && _extends({
113
+ color: theme.vars ? theme.vars.palette.Chip.defaultIconColor : textColor
111
114
  }, ownerState.color !== 'default' && {
112
115
  color: 'inherit'
113
- })), _defineProperty(_extends2, "& .".concat(chipClasses.deleteIcon), _extends({
116
+ }))), _defineProperty(_extends2, "& .".concat(chipClasses.deleteIcon), _extends({
114
117
  WebkitTapHighlightColor: 'transparent',
115
118
  color: theme.vars ? "rgba(".concat(theme.vars.palette.text.primaryChannel, " / 0.26)") : deleteIconColor,
116
119
  fontSize: 22,
@@ -300,6 +303,7 @@ var Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {
300
303
  disabled: disabled,
301
304
  size: size,
302
305
  color: color,
306
+ iconColor: /*#__PURE__*/React.isValidElement(iconProp) ? iconProp.props.color || color : color,
303
307
  onDelete: !!onDelete,
304
308
  clickable: clickable,
305
309
  variant: variant
@@ -196,35 +196,35 @@ var FormControl = /*#__PURE__*/React.forwardRef(function FormControl(inProps, re
196
196
  };
197
197
  }
198
198
 
199
- var onFilled = React.useCallback(function () {
200
- setFilled(true);
201
- }, []);
202
- var onEmpty = React.useCallback(function () {
203
- setFilled(false);
204
- }, []);
205
- var childContext = {
206
- adornedStart: adornedStart,
207
- setAdornedStart: setAdornedStart,
208
- color: color,
209
- disabled: disabled,
210
- error: error,
211
- filled: filled,
212
- focused: focused,
213
- fullWidth: fullWidth,
214
- hiddenLabel: hiddenLabel,
215
- size: size,
216
- onBlur: function onBlur() {
217
- setFocused(false);
218
- },
219
- onEmpty: onEmpty,
220
- onFilled: onFilled,
221
- onFocus: function onFocus() {
222
- setFocused(true);
223
- },
224
- registerEffect: registerEffect,
225
- required: required,
226
- variant: variant
227
- };
199
+ var childContext = React.useMemo(function () {
200
+ return {
201
+ adornedStart: adornedStart,
202
+ setAdornedStart: setAdornedStart,
203
+ color: color,
204
+ disabled: disabled,
205
+ error: error,
206
+ filled: filled,
207
+ focused: focused,
208
+ fullWidth: fullWidth,
209
+ hiddenLabel: hiddenLabel,
210
+ size: size,
211
+ onBlur: function onBlur() {
212
+ setFocused(false);
213
+ },
214
+ onEmpty: function onEmpty() {
215
+ setFilled(false);
216
+ },
217
+ onFilled: function onFilled() {
218
+ setFilled(true);
219
+ },
220
+ onFocus: function onFocus() {
221
+ setFocused(true);
222
+ },
223
+ registerEffect: registerEffect,
224
+ required: required,
225
+ variant: variant
226
+ };
227
+ }, [adornedStart, color, disabled, error, filled, focused, fullWidth, hiddenLabel, registerEffect, required, size, variant]);
228
228
  return /*#__PURE__*/_jsx(FormControlContext.Provider, {
229
229
  value: childContext,
230
230
  children: /*#__PURE__*/_jsx(FormControlRoot, _extends({
@@ -167,11 +167,13 @@ var ListItem = /*#__PURE__*/React.forwardRef(function ListItem(inProps, ref) {
167
167
  other = _objectWithoutProperties(props, ["alignItems", "autoFocus", "button", "children", "className", "component", "components", "componentsProps", "ContainerComponent", "ContainerProps", "dense", "disabled", "disableGutters", "disablePadding", "divider", "focusVisibleClassName", "secondaryAction", "selected"]);
168
168
 
169
169
  var context = React.useContext(ListContext);
170
- var childContext = {
171
- dense: dense || context.dense || false,
172
- alignItems: alignItems,
173
- disableGutters: disableGutters
174
- };
170
+ var childContext = React.useMemo(function () {
171
+ return {
172
+ dense: dense || context.dense || false,
173
+ alignItems: alignItems,
174
+ disableGutters: disableGutters
175
+ };
176
+ }, [alignItems, context.dense, dense, disableGutters]);
175
177
  var listItemRef = React.useRef(null);
176
178
  useEnhancedEffect(function () {
177
179
  if (autoFocus) {
@@ -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) {
@@ -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
@@ -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, {
@@ -486,7 +486,7 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
486
486
  }, [handleClose, open]);
487
487
  var handleRef = useForkRef(children.ref, focusVisibleRef, setChildNode, ref); // There is no point in displaying an empty tooltip.
488
488
 
489
- if (typeof title !== 'number' && !title) {
489
+ if (!title && title !== 0) {
490
490
  open = false;
491
491
  }
492
492
 
package/legacy/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.10.11
1
+ /** @license MUI v5.10.12
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.