@mui/material 5.9.1 → 5.10.0

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 (250) 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/Badge.js +1 -1
  13. package/Badge/badgeClasses.d.ts +56 -56
  14. package/BottomNavigation/BottomNavigation.js +0 -0
  15. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  16. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  17. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  18. package/Button/Button.js +8 -3
  19. package/Button/buttonClasses.d.ts +100 -100
  20. package/ButtonBase/TouchRipple.js +1 -1
  21. package/ButtonBase/buttonBaseClasses.d.ts +12 -12
  22. package/ButtonBase/touchRippleClasses.d.ts +20 -20
  23. package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
  24. package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
  25. package/CHANGELOG.md +200 -9
  26. package/Card/cardClasses.d.ts +8 -8
  27. package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
  28. package/CardActions/cardActionsClasses.d.ts +10 -10
  29. package/CardContent/cardContentClasses.d.ts +8 -8
  30. package/CardHeader/cardHeaderClasses.d.ts +18 -18
  31. package/CardMedia/cardMediaClasses.d.ts +12 -12
  32. package/Checkbox/checkboxClasses.d.ts +18 -18
  33. package/Chip/Chip.js +5 -7
  34. package/Chip/chipClasses.d.ts +88 -80
  35. package/Chip/chipClasses.js +1 -1
  36. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  37. package/ClickAwayListener/index.d.ts +2 -2
  38. package/Collapse/collapseClasses.d.ts +18 -18
  39. package/Container/containerClasses.d.ts +6 -6
  40. package/Dialog/Dialog.js +2 -1
  41. package/Dialog/DialogContext.d.ts +6 -6
  42. package/Dialog/dialogClasses.d.ts +36 -36
  43. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  44. package/DialogContent/dialogContentClasses.d.ts +10 -10
  45. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  46. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  47. package/Divider/dividerClasses.d.ts +34 -34
  48. package/Drawer/drawerClasses.d.ts +30 -30
  49. package/Fab/fabClasses.d.ts +26 -26
  50. package/FilledInput/filledInputClasses.d.ts +40 -40
  51. package/FormControl/formControlClasses.d.ts +14 -14
  52. package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
  53. package/FormGroup/formGroupClasses.d.ts +12 -12
  54. package/FormHelperText/FormHelperText.d.ts +7 -1
  55. package/FormHelperText/FormHelperText.js +3 -1
  56. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  57. package/FormLabel/formLabelClasses.d.ts +22 -22
  58. package/Grid/Grid.d.ts +1 -1
  59. package/Grid/Grid.js +71 -4
  60. package/Grid/gridClasses.d.ts +48 -48
  61. package/Icon/iconClasses.d.ts +24 -24
  62. package/IconButton/iconButtonClasses.d.ts +26 -26
  63. package/ImageList/imageListClasses.d.ts +16 -16
  64. package/ImageListItem/ImageListItem.js +4 -4
  65. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  66. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  67. package/Input/inputClasses.d.ts +34 -34
  68. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  69. package/InputBase/InputBase.js +3 -2
  70. package/InputBase/inputBaseClasses.d.ts +46 -44
  71. package/InputBase/inputBaseClasses.js +1 -1
  72. package/InputLabel/inputLabelClasses.d.ts +32 -32
  73. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  74. package/Link/getTextDecoration.d.ts +15 -15
  75. package/Link/linkClasses.d.ts +18 -18
  76. package/List/listClasses.d.ts +14 -14
  77. package/ListItem/listItemClasses.d.ts +30 -30
  78. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  79. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  80. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  81. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  82. package/ListItemText/listItemTextClasses.d.ts +18 -18
  83. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  84. package/Menu/menuClasses.d.ts +12 -12
  85. package/MenuItem/menuItemClasses.d.ts +20 -20
  86. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  87. package/Modal/Modal.d.ts +2 -1
  88. package/Modal/Modal.js +2 -1
  89. package/NativeSelect/nativeSelectClasses.d.ts +32 -32
  90. package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
  91. package/OverridableComponent.d.ts +4 -0
  92. package/Pagination/paginationClasses.d.ts +14 -14
  93. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  94. package/Paper/paperClasses.d.ts +39 -39
  95. package/Popover/popoverClasses.d.ts +10 -10
  96. package/Popper/Popper.d.ts +24 -24
  97. package/Popper/Popper.js +24 -0
  98. package/README.md +5 -4
  99. package/Radio/radioClasses.d.ts +16 -16
  100. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  101. package/RadioGroup/useRadioGroup.d.ts +4 -4
  102. package/Rating/ratingClasses.d.ts +40 -40
  103. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  104. package/Select/SelectInput.js +1 -1
  105. package/Select/selectClasses.d.ts +30 -30
  106. package/Skeleton/Skeleton.d.ts +1 -1
  107. package/Skeleton/Skeleton.js +3 -1
  108. package/Skeleton/skeletonClasses.d.ts +26 -24
  109. package/Skeleton/skeletonClasses.js +1 -1
  110. package/Snackbar/snackbarClasses.d.ts +20 -20
  111. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  112. package/SpeedDial/speedDialClasses.d.ts +22 -22
  113. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  114. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  115. package/Stack/Stack.js +15 -2
  116. package/Step/StepContext.d.ts +20 -20
  117. package/Step/stepClasses.d.ts +16 -16
  118. package/StepButton/stepButtonClasses.d.ts +14 -14
  119. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  120. package/StepContent/stepContentClasses.d.ts +12 -12
  121. package/StepIcon/stepIconClasses.d.ts +16 -16
  122. package/StepLabel/StepLabel.js +1 -1
  123. package/StepLabel/stepLabelClasses.d.ts +28 -28
  124. package/Stepper/StepperContext.d.ts +18 -18
  125. package/Stepper/stepperClasses.d.ts +14 -14
  126. package/SvgIcon/svgIconClasses.d.ts +24 -24
  127. package/Switch/switchClasses.d.ts +32 -32
  128. package/Tab/tabClasses.d.ts +26 -26
  129. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  130. package/Table/tableClasses.d.ts +10 -10
  131. package/TableBody/tableBodyClasses.d.ts +8 -8
  132. package/TableCell/TableCell.d.ts +4 -1
  133. package/TableCell/TableCell.js +3 -1
  134. package/TableCell/tableCellClasses.d.ts +32 -32
  135. package/TableContainer/tableContainerClasses.d.ts +8 -8
  136. package/TableFooter/tableFooterClasses.d.ts +8 -8
  137. package/TableHead/tableHeadClasses.d.ts +8 -8
  138. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  139. package/TableRow/tableRowClasses.d.ts +16 -16
  140. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  141. package/Tabs/Tabs.d.ts +7 -1
  142. package/Tabs/Tabs.js +3 -1
  143. package/Tabs/tabsClasses.d.ts +32 -32
  144. package/TextField/textFieldClasses.d.ts +8 -8
  145. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  146. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  147. package/Toolbar/toolbarClasses.d.ts +14 -14
  148. package/Tooltip/Tooltip.js +6 -7
  149. package/Tooltip/tooltipClasses.d.ts +30 -30
  150. package/Typography/typographyClasses.d.ts +50 -50
  151. package/Unstable_Grid2/Grid2.d.ts +4 -4
  152. package/Unstable_Grid2/Grid2Props.d.ts +15 -15
  153. package/Unstable_Grid2/grid2Classes.d.ts +5 -5
  154. package/Unstable_Grid2/index.d.ts +4 -4
  155. package/className/index.d.ts +1 -1
  156. package/darkScrollbar/index.d.ts +28 -28
  157. package/index.js +1 -1
  158. package/internal/switchBaseClasses.d.ts +12 -12
  159. package/legacy/Badge/Badge.js +1 -1
  160. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  161. package/legacy/Button/Button.js +4 -2
  162. package/legacy/ButtonBase/TouchRipple.js +1 -1
  163. package/legacy/Chip/Chip.js +4 -6
  164. package/legacy/Chip/chipClasses.js +1 -1
  165. package/legacy/Dialog/Dialog.js +2 -1
  166. package/legacy/FormHelperText/FormHelperText.js +3 -1
  167. package/legacy/Grid/Grid.js +76 -12
  168. package/legacy/ImageListItem/ImageListItem.js +4 -4
  169. package/legacy/InputBase/InputBase.js +3 -2
  170. package/legacy/InputBase/inputBaseClasses.js +1 -1
  171. package/legacy/Modal/Modal.js +2 -1
  172. package/legacy/Popper/Popper.js +24 -0
  173. package/legacy/Select/SelectInput.js +1 -1
  174. package/legacy/Skeleton/Skeleton.js +3 -1
  175. package/legacy/Skeleton/skeletonClasses.js +1 -1
  176. package/legacy/Stack/Stack.js +15 -2
  177. package/legacy/StepLabel/StepLabel.js +1 -1
  178. package/legacy/TableCell/TableCell.js +3 -1
  179. package/legacy/Tabs/Tabs.js +3 -1
  180. package/legacy/Tooltip/Tooltip.js +6 -7
  181. package/legacy/index.js +1 -1
  182. package/legacy/styles/createTheme.js +5 -0
  183. package/legacy/useScrollTrigger/useScrollTrigger.js +6 -2
  184. package/locale/index.d.ts +71 -71
  185. package/modern/Badge/Badge.js +1 -1
  186. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  187. package/modern/Button/Button.js +8 -3
  188. package/modern/ButtonBase/TouchRipple.js +1 -1
  189. package/modern/Chip/Chip.js +5 -7
  190. package/modern/Chip/chipClasses.js +1 -1
  191. package/modern/Dialog/Dialog.js +2 -1
  192. package/modern/FormHelperText/FormHelperText.js +3 -1
  193. package/modern/Grid/Grid.js +67 -4
  194. package/modern/ImageListItem/ImageListItem.js +4 -4
  195. package/modern/InputBase/InputBase.js +3 -2
  196. package/modern/InputBase/inputBaseClasses.js +1 -1
  197. package/modern/Modal/Modal.js +2 -1
  198. package/modern/Popper/Popper.js +24 -0
  199. package/modern/Select/SelectInput.js +1 -1
  200. package/modern/Skeleton/Skeleton.js +3 -1
  201. package/modern/Skeleton/skeletonClasses.js +1 -1
  202. package/modern/Stack/Stack.js +15 -2
  203. package/modern/StepLabel/StepLabel.js +1 -1
  204. package/modern/TableCell/TableCell.js +3 -1
  205. package/modern/Tabs/Tabs.js +3 -1
  206. package/modern/Tooltip/Tooltip.js +6 -7
  207. package/modern/index.js +1 -1
  208. package/modern/styles/createTheme.js +6 -0
  209. package/modern/useScrollTrigger/useScrollTrigger.js +6 -2
  210. package/node/Badge/Badge.js +1 -1
  211. package/node/BottomNavigation/BottomNavigation.js +0 -0
  212. package/node/Button/Button.js +10 -3
  213. package/node/ButtonBase/TouchRipple.js +1 -1
  214. package/node/Chip/Chip.js +5 -7
  215. package/node/Chip/chipClasses.js +1 -1
  216. package/node/Dialog/Dialog.js +2 -1
  217. package/node/FormHelperText/FormHelperText.js +3 -1
  218. package/node/Grid/Grid.js +71 -4
  219. package/node/ImageListItem/ImageListItem.js +4 -4
  220. package/node/InputBase/InputBase.js +3 -2
  221. package/node/InputBase/inputBaseClasses.js +1 -1
  222. package/node/Modal/Modal.js +2 -1
  223. package/node/Popper/Popper.js +24 -0
  224. package/node/Select/SelectInput.js +1 -1
  225. package/node/Skeleton/Skeleton.js +3 -1
  226. package/node/Skeleton/skeletonClasses.js +1 -1
  227. package/node/Stack/Stack.js +14 -1
  228. package/node/StepLabel/StepLabel.js +1 -1
  229. package/node/TableCell/TableCell.js +3 -1
  230. package/node/Tabs/Tabs.js +3 -1
  231. package/node/Tooltip/Tooltip.js +6 -7
  232. package/node/index.js +1 -1
  233. package/node/styles/createTheme.js +6 -0
  234. package/node/useScrollTrigger/useScrollTrigger.js +6 -2
  235. package/package.json +6 -6
  236. package/styles/CssVarsProvider.d.ts +14 -14
  237. package/styles/createTheme.js +6 -0
  238. package/transitions/index.d.ts +1 -1
  239. package/transitions/transition.d.ts +13 -13
  240. package/transitions/utils.d.ts +23 -23
  241. package/umd/material-ui.development.js +288 -74
  242. package/umd/material-ui.production.min.js +20 -20
  243. package/useMediaQuery/useMediaQuery.d.ts +31 -31
  244. package/useScrollTrigger/useScrollTrigger.js +6 -2
  245. package/useTouchRipple/index.d.ts +1 -1
  246. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  247. package/utils/getScrollbarSize.d.ts +2 -2
  248. package/utils/ownerDocument.d.ts +2 -2
  249. package/utils/ownerWindow.d.ts +2 -2
  250. package/utils/setRef.d.ts +2 -2
@@ -30,7 +30,7 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
30
30
  label: ['label', "label".concat(capitalize(size))],
31
31
  avatar: ['avatar', "avatar".concat(capitalize(size)), "avatarColor".concat(capitalize(color))],
32
32
  icon: ['icon', "icon".concat(capitalize(size)), "iconColor".concat(capitalize(color))],
33
- deleteIcon: ['deleteIcon', "deleteIcon".concat(capitalize(size)), "deleteIconColor".concat(capitalize(color)), "deleteIconOutlinedColor".concat(capitalize(color))]
33
+ deleteIcon: ['deleteIcon', "deleteIcon".concat(capitalize(size)), "deleteIconColor".concat(capitalize(color)), "deleteIcon".concat(capitalize(variant), "Color").concat(capitalize(color))]
34
34
  };
35
35
  return composeClasses(slots, getChipUtilityClass, classes);
36
36
  };
@@ -45,7 +45,7 @@ var ChipRoot = styled('div', {
45
45
  onDelete = ownerState.onDelete,
46
46
  size = ownerState.size,
47
47
  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["deleteIconOutlinedColor".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], variant === 'outlined' && styles["outlined".concat(capitalize(color))]];
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))]];
49
49
  }
50
50
  })(function (_ref11) {
51
51
  var _extends2;
@@ -293,7 +293,6 @@ var Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {
293
293
  };
294
294
 
295
295
  var clickable = clickableProp !== false && onClick ? true : clickableProp;
296
- var small = size === 'small';
297
296
  var component = clickable || onDelete ? ButtonBase : ComponentProp || 'div';
298
297
 
299
298
  var ownerState = _extends({}, props, {
@@ -316,12 +315,11 @@ var Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {
316
315
  var deleteIcon = null;
317
316
 
318
317
  if (onDelete) {
319
- var customClasses = clsx(color !== 'default' && (variant === 'outlined' ? classes["deleteIconOutlinedColor".concat(capitalize(color))] : classes["deleteIconColor".concat(capitalize(color))]), small && classes.deleteIconSmall);
320
318
  deleteIcon = deleteIconProp && /*#__PURE__*/React.isValidElement(deleteIconProp) ? /*#__PURE__*/React.cloneElement(deleteIconProp, {
321
- className: clsx(deleteIconProp.props.className, classes.deleteIcon, customClasses),
319
+ className: clsx(deleteIconProp.props.className, classes.deleteIcon),
322
320
  onClick: handleDeleteIconClick
323
321
  }) : /*#__PURE__*/_jsx(CancelIcon, {
324
- className: clsx(classes.deleteIcon, customClasses),
322
+ className: clsx(classes.deleteIcon),
325
323
  onClick: handleDeleteIconClick
326
324
  });
327
325
  }
@@ -2,5 +2,5 @@ import { generateUtilityClass, generateUtilityClasses } from '@mui/base';
2
2
  export function getChipUtilityClass(slot) {
3
3
  return generateUtilityClass('MuiChip', slot);
4
4
  }
5
- var chipClasses = generateUtilityClasses('MuiChip', ['root', 'sizeSmall', 'sizeMedium', 'colorPrimary', 'colorSecondary', 'disabled', 'clickable', 'clickableColorPrimary', 'clickableColorSecondary', 'deletable', 'deletableColorPrimary', 'deletableColorSecondary', 'outlined', 'filled', 'outlinedPrimary', 'outlinedSecondary', 'avatar', 'avatarSmall', 'avatarMedium', 'avatarColorPrimary', 'avatarColorSecondary', 'icon', 'iconSmall', 'iconMedium', 'iconColorPrimary', 'iconColorSecondary', 'label', 'labelSmall', 'labelMedium', 'deleteIcon', 'deleteIconSmall', 'deleteIconMedium', 'deleteIconColorPrimary', 'deleteIconColorSecondary', 'deleteIconOutlinedColorPrimary', 'deleteIconOutlinedColorSecondary', 'focusVisible']);
5
+ var chipClasses = generateUtilityClasses('MuiChip', ['root', 'sizeSmall', 'sizeMedium', 'colorPrimary', 'colorSecondary', 'disabled', 'clickable', 'clickableColorPrimary', 'clickableColorSecondary', 'deletable', 'deletableColorPrimary', 'deletableColorSecondary', 'outlined', 'filled', 'outlinedPrimary', 'outlinedSecondary', 'filledPrimary', 'filledSecondary', 'avatar', 'avatarSmall', 'avatarMedium', 'avatarColorPrimary', 'avatarColorSecondary', 'icon', 'iconSmall', 'iconMedium', 'iconColorPrimary', 'iconColorSecondary', 'label', 'labelSmall', 'labelMedium', 'deleteIcon', 'deleteIconSmall', 'deleteIconMedium', 'deleteIconColorPrimary', 'deleteIconColorSecondary', 'deleteIconOutlinedColorPrimary', 'deleteIconOutlinedColorSecondary', 'deleteIconFilledColorPrimary', 'deleteIconFilledColorSecondary', 'focusVisible']);
6
6
  export default chipClasses;
@@ -291,7 +291,8 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes
291
291
 
292
292
  /**
293
293
  * A backdrop component. This prop enables custom backdrop rendering.
294
- * @deprecated Use `components.Backdrop` instead.
294
+ * @deprecated Use `components.Backdrop` instead. While this prop currently works, it will be removed in the next major version.
295
+ * Use the `components.Backdrop` prop to make your application ready for the next version of Material UI.
295
296
  * @default styled(Backdrop, {
296
297
  * name: 'MuiModal',
297
298
  * slot: 'Backdrop',
@@ -184,6 +184,8 @@ process.env.NODE_ENV !== "production" ? FormHelperText.propTypes
184
184
  /**
185
185
  * The variant to use.
186
186
  */
187
- variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])
187
+ variant: PropTypes
188
+ /* @typescript-to-proptypes-ignore */
189
+ .oneOfType([PropTypes.oneOf(['filled', 'outlined', 'standard']), PropTypes.string])
188
190
  } : void 0;
189
191
  export default FormHelperText;
@@ -131,9 +131,34 @@ export function generateDirection(_ref2) {
131
131
  return output;
132
132
  });
133
133
  }
134
- export function generateRowGap(_ref3) {
135
- var theme = _ref3.theme,
136
- ownerState = _ref3.ownerState;
134
+ /**
135
+ * Extracts zero value breakpoint keys before a non-zero value breakpoint key.
136
+ * @example { xs: 0, sm: 0, md: 2, lg: 0, xl: 0 } or [0, 0, 2, 0, 0]
137
+ * @returns [xs, sm]
138
+ */
139
+
140
+ function extractZeroValueBreakpointKeys(_ref3) {
141
+ var breakpoints = _ref3.breakpoints,
142
+ values = _ref3.values;
143
+ var nonZeroKey = '';
144
+ Object.keys(values).forEach(function (key) {
145
+ if (nonZeroKey !== '') {
146
+ return;
147
+ }
148
+
149
+ if (values[key] !== 0) {
150
+ nonZeroKey = key;
151
+ }
152
+ });
153
+ var sortedBreakpointKeysByValue = Object.keys(breakpoints).sort(function (a, b) {
154
+ return breakpoints[a] - breakpoints[b];
155
+ });
156
+ return sortedBreakpointKeysByValue.slice(0, sortedBreakpointKeysByValue.indexOf(nonZeroKey));
157
+ }
158
+
159
+ export function generateRowGap(_ref4) {
160
+ var theme = _ref4.theme,
161
+ ownerState = _ref4.ownerState;
137
162
  var container = ownerState.container,
138
163
  rowSpacing = ownerState.rowSpacing;
139
164
  var styles = {};
@@ -143,9 +168,20 @@ export function generateRowGap(_ref3) {
143
168
  values: rowSpacing,
144
169
  breakpoints: theme.breakpoints.values
145
170
  });
171
+ var zeroValueBreakpointKeys;
172
+
173
+ if (_typeof(rowSpacingValues) === 'object') {
174
+ zeroValueBreakpointKeys = extractZeroValueBreakpointKeys({
175
+ breakpoints: theme.breakpoints.values,
176
+ values: rowSpacingValues
177
+ });
178
+ }
179
+
146
180
  styles = handleBreakpoints({
147
181
  theme: theme
148
- }, rowSpacingValues, function (propValue) {
182
+ }, rowSpacingValues, function (propValue, breakpoint) {
183
+ var _zeroValueBreakpointK;
184
+
149
185
  var themeSpacing = theme.spacing(propValue);
150
186
 
151
187
  if (themeSpacing !== '0px') {
@@ -156,15 +192,23 @@ export function generateRowGap(_ref3) {
156
192
  });
157
193
  }
158
194
 
159
- return {};
195
+ if ((_zeroValueBreakpointK = zeroValueBreakpointKeys) != null && _zeroValueBreakpointK.includes(breakpoint)) {
196
+ return {};
197
+ }
198
+
199
+ return _defineProperty({
200
+ marginTop: 0
201
+ }, "& > .".concat(gridClasses.item), {
202
+ paddingTop: 0
203
+ });
160
204
  });
161
205
  }
162
206
 
163
207
  return styles;
164
208
  }
165
- export function generateColumnGap(_ref5) {
166
- var theme = _ref5.theme,
167
- ownerState = _ref5.ownerState;
209
+ export function generateColumnGap(_ref7) {
210
+ var theme = _ref7.theme,
211
+ ownerState = _ref7.ownerState;
168
212
  var container = ownerState.container,
169
213
  columnSpacing = ownerState.columnSpacing;
170
214
  var styles = {};
@@ -174,9 +218,20 @@ export function generateColumnGap(_ref5) {
174
218
  values: columnSpacing,
175
219
  breakpoints: theme.breakpoints.values
176
220
  });
221
+ var zeroValueBreakpointKeys;
222
+
223
+ if (_typeof(columnSpacingValues) === 'object') {
224
+ zeroValueBreakpointKeys = extractZeroValueBreakpointKeys({
225
+ breakpoints: theme.breakpoints.values,
226
+ values: columnSpacingValues
227
+ });
228
+ }
229
+
177
230
  styles = handleBreakpoints({
178
231
  theme: theme
179
- }, columnSpacingValues, function (propValue) {
232
+ }, columnSpacingValues, function (propValue, breakpoint) {
233
+ var _zeroValueBreakpointK2;
234
+
180
235
  var themeSpacing = theme.spacing(propValue);
181
236
 
182
237
  if (themeSpacing !== '0px') {
@@ -188,7 +243,16 @@ export function generateColumnGap(_ref5) {
188
243
  });
189
244
  }
190
245
 
191
- return {};
246
+ if ((_zeroValueBreakpointK2 = zeroValueBreakpointKeys) != null && _zeroValueBreakpointK2.includes(breakpoint)) {
247
+ return {};
248
+ }
249
+
250
+ return _defineProperty({
251
+ width: '100%',
252
+ marginLeft: 0
253
+ }, "& > .".concat(gridClasses.item), {
254
+ paddingLeft: 0
255
+ });
192
256
  });
193
257
  }
194
258
 
@@ -252,8 +316,8 @@ var GridRoot = styled('div', {
252
316
  });
253
317
  return [styles.root, container && styles.container, item && styles.item, zeroMinWidth && styles.zeroMinWidth].concat(_toConsumableArray(spacingStyles), [direction !== 'row' && styles["direction-xs-".concat(String(direction))], wrap !== 'wrap' && styles["wrap-xs-".concat(String(wrap))]], breakpointsStyles);
254
318
  }
255
- })(function (_ref7) {
256
- var ownerState = _ref7.ownerState;
319
+ })(function (_ref10) {
320
+ var ownerState = _ref10.ownerState;
257
321
  return _extends({
258
322
  boxSizing: 'border-box'
259
323
  }, ownerState.container && {
@@ -34,9 +34,8 @@ var ImageListItemRoot = styled('li', {
34
34
  })(function (_ref2) {
35
35
  var ownerState = _ref2.ownerState;
36
36
  return _extends({
37
- display: 'inline-block',
38
- position: 'relative',
39
- lineHeight: 0
37
+ display: 'block',
38
+ position: 'relative'
40
39
  }, ownerState.variant === 'standard' && {
41
40
  // For titlebar under list item
42
41
  display: 'flex',
@@ -50,7 +49,8 @@ var ImageListItemRoot = styled('li', {
50
49
  }, _defineProperty({}, "& .".concat(imageListItemClasses.img), _extends({
51
50
  objectFit: 'cover',
52
51
  width: '100%',
53
- height: '100%'
52
+ height: '100%',
53
+ display: 'block'
54
54
  }, ownerState.variant === 'standard' && {
55
55
  height: 'auto',
56
56
  flexGrow: 1
@@ -40,12 +40,13 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
40
40
  fullWidth = ownerState.fullWidth,
41
41
  hiddenLabel = ownerState.hiddenLabel,
42
42
  multiline = ownerState.multiline,
43
+ readOnly = ownerState.readOnly,
43
44
  size = ownerState.size,
44
45
  startAdornment = ownerState.startAdornment,
45
46
  type = ownerState.type;
46
47
  var slots = {
47
- root: ['root', "color".concat(capitalize(color)), disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size === 'small' && 'sizeSmall', multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel'],
48
- input: ['input', disabled && 'disabled', type === 'search' && 'inputTypeSearch', multiline && 'inputMultiline', size === 'small' && 'inputSizeSmall', hiddenLabel && 'inputHiddenLabel', startAdornment && 'inputAdornedStart', endAdornment && 'inputAdornedEnd']
48
+ root: ['root', "color".concat(capitalize(color)), disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size === 'small' && 'sizeSmall', multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel', readOnly && 'readOnly'],
49
+ input: ['input', disabled && 'disabled', type === 'search' && 'inputTypeSearch', multiline && 'inputMultiline', size === 'small' && 'inputSizeSmall', hiddenLabel && 'inputHiddenLabel', startAdornment && 'inputAdornedStart', endAdornment && 'inputAdornedEnd', readOnly && 'readOnly']
49
50
  };
50
51
  return composeClasses(slots, getInputBaseUtilityClass, classes);
51
52
  };
@@ -2,5 +2,5 @@ import { generateUtilityClass, generateUtilityClasses } from '@mui/base';
2
2
  export function getInputBaseUtilityClass(slot) {
3
3
  return generateUtilityClass('MuiInputBase', slot);
4
4
  }
5
- var inputBaseClasses = generateUtilityClasses('MuiInputBase', ['root', 'formControl', 'focused', 'disabled', 'adornedStart', 'adornedEnd', 'error', 'sizeSmall', 'multiline', 'colorSecondary', 'fullWidth', 'hiddenLabel', 'input', 'inputSizeSmall', 'inputMultiline', 'inputTypeSearch', 'inputAdornedStart', 'inputAdornedEnd', 'inputHiddenLabel']);
5
+ var inputBaseClasses = generateUtilityClasses('MuiInputBase', ['root', 'formControl', 'focused', 'disabled', 'adornedStart', 'adornedEnd', 'error', 'sizeSmall', 'multiline', 'colorSecondary', 'fullWidth', 'hiddenLabel', 'readOnly', 'input', 'inputSizeSmall', 'inputMultiline', 'inputTypeSearch', 'inputAdornedStart', 'inputAdornedEnd', 'inputHiddenLabel']);
6
6
  export default inputBaseClasses;
@@ -158,7 +158,8 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
158
158
 
159
159
  /**
160
160
  * A backdrop component. This prop enables custom backdrop rendering.
161
- * @deprecated Use `components.Backdrop` instead.
161
+ * @deprecated Use `components.Backdrop` instead. While this prop currently works, it will be removed in the next major version.
162
+ * Use the `components.Backdrop` prop to make your application ready for the next version of Material UI.
162
163
  * @default styled(Backdrop, {
163
164
  * name: 'MuiModal',
164
165
  * slot: 'Backdrop',
@@ -63,6 +63,30 @@ process.env.NODE_ENV !== "production" ? Popper.propTypes
63
63
  /* @typescript-to-proptypes-ignore */
64
64
  .oneOfType([PropTypes.node, PropTypes.func]),
65
65
 
66
+ /**
67
+ * @ignore
68
+ */
69
+ component: PropTypes
70
+ /* @typescript-to-proptypes-ignore */
71
+ .elementType,
72
+
73
+ /**
74
+ * The components used for each slot inside the Popper.
75
+ * Either a string to use a HTML element or a component.
76
+ * @default {}
77
+ */
78
+ components: PropTypes.shape({
79
+ Root: PropTypes.elementType
80
+ }),
81
+
82
+ /**
83
+ * The props used for each slot inside the Popper.
84
+ * @default {}
85
+ */
86
+ componentsProps: PropTypes.shape({
87
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
88
+ }),
89
+
66
90
  /**
67
91
  * An HTML element or function that returns one.
68
92
  * The `container` will have the portal children appended to it.
@@ -531,7 +531,7 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
531
531
  onFocus: onFocus
532
532
  }, SelectDisplayProps, {
533
533
  ownerState: ownerState,
534
- className: clsx(classes.select, className, SelectDisplayProps.className) // The id is required for proper a11y
534
+ className: clsx(SelectDisplayProps.className, classes.select, className) // The id is required for proper a11y
535
535
  ,
536
536
  id: buttonId,
537
537
  children: isEmpty(display) ? // notranslate needed while Google Translate will not fix zero-width space issue
@@ -59,6 +59,8 @@ var SkeletonRoot = styled('span', {
59
59
  }
60
60
  }, ownerState.variant === 'circular' && {
61
61
  borderRadius: '50%'
62
+ }, ownerState.variant === 'rounded' && {
63
+ borderRadius: (theme.vars || theme).shape.borderRadius
62
64
  }, ownerState.hasChildren && {
63
65
  '& > *': {
64
66
  visibility: 'hidden'
@@ -172,7 +174,7 @@ process.env.NODE_ENV !== "production" ? Skeleton.propTypes
172
174
  */
173
175
  variant: PropTypes
174
176
  /* @typescript-to-proptypes-ignore */
175
- .oneOfType([PropTypes.oneOf(['circular', 'rectangular', 'text']), PropTypes.string]),
177
+ .oneOfType([PropTypes.oneOf(['circular', 'rectangular', 'rounded', 'text']), PropTypes.string]),
176
178
 
177
179
  /**
178
180
  * Width of the skeleton.
@@ -2,5 +2,5 @@ import { generateUtilityClass, generateUtilityClasses } from '@mui/base';
2
2
  export function getSkeletonUtilityClass(slot) {
3
3
  return generateUtilityClass('MuiSkeleton', slot);
4
4
  }
5
- var skeletonClasses = generateUtilityClasses('MuiSkeleton', ['root', 'text', 'rectangular', 'circular', 'pulse', 'wave', 'withChildren', 'fitContent', 'heightAuto']);
5
+ var skeletonClasses = generateUtilityClasses('MuiSkeleton', ['root', 'text', 'rectangular', 'rounded', 'circular', 'pulse', 'wave', 'withChildren', 'fitContent', 'heightAuto']);
6
6
  export default skeletonClasses;
@@ -4,7 +4,7 @@ import _typeof from "@babel/runtime/helpers/esm/typeof";
4
4
  import _extends from "@babel/runtime/helpers/esm/extends";
5
5
  import * as React from 'react';
6
6
  import PropTypes from 'prop-types';
7
- import { createUnarySpacing, getValue, handleBreakpoints, unstable_extendSxProp as extendSxProp, unstable_resolveBreakpointValues as resolveBreakpointValues } from '@mui/system';
7
+ import { createUnarySpacing, getValue, handleBreakpoints, mergeBreakpointsInOrder, unstable_extendSxProp as extendSxProp, unstable_resolveBreakpointValues as resolveBreakpointValues } from '@mui/system';
8
8
  import { deepmerge } from '@mui/utils';
9
9
  import styled from '../styles/styled';
10
10
  import useThemeProps from '../styles/useThemeProps';
@@ -47,7 +47,8 @@ export var style = function style(_ref) {
47
47
  theme = _ref.theme;
48
48
 
49
49
  var styles = _extends({
50
- display: 'flex'
50
+ display: 'flex',
51
+ flexDirection: 'column'
51
52
  }, handleBreakpoints({
52
53
  theme: theme
53
54
  }, resolveBreakpointValues({
@@ -77,6 +78,17 @@ export var style = function style(_ref) {
77
78
  base: base
78
79
  });
79
80
 
81
+ if (_typeof(directionValues) === 'object') {
82
+ Object.keys(directionValues).forEach(function (breakpoint, index, breakpoints) {
83
+ var directionValue = directionValues[breakpoint];
84
+
85
+ if (!directionValue) {
86
+ var previousDirectionValue = index > 0 ? directionValues[breakpoints[index - 1]] : 'column';
87
+ directionValues[breakpoint] = previousDirectionValue;
88
+ }
89
+ });
90
+ }
91
+
80
92
  var styleFromPropValue = function styleFromPropValue(propValue, breakpoint) {
81
93
  return {
82
94
  '& > :not(style) + :not(style)': _defineProperty({
@@ -90,6 +102,7 @@ export var style = function style(_ref) {
90
102
  }, spacingValues, styleFromPropValue));
91
103
  }
92
104
 
105
+ styles = mergeBreakpointsInOrder(theme.breakpoints, styles);
93
106
  return styles;
94
107
  };
95
108
  var StackRoot = styled('div', {
@@ -25,7 +25,7 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
25
25
  var slots = {
26
26
  root: ['root', orientation, error && 'error', disabled && 'disabled', alternativeLabel && 'alternativeLabel'],
27
27
  label: ['label', active && 'active', completed && 'completed', error && 'error', disabled && 'disabled', alternativeLabel && 'alternativeLabel'],
28
- iconContainer: ['iconContainer', alternativeLabel && 'alternativeLabel'],
28
+ iconContainer: ['iconContainer', active && 'active', completed && 'completed', error && 'error', disabled && 'disabled', alternativeLabel && 'alternativeLabel'],
29
29
  labelContainer: ['labelContainer']
30
30
  };
31
31
  return composeClasses(slots, getStepLabelUtilityClass, classes);
@@ -206,7 +206,9 @@ process.env.NODE_ENV !== "production" ? TableCell.propTypes
206
206
  * Specify the size of the cell.
207
207
  * The prop defaults to the value (`'medium'`) inherited from the parent Table component.
208
208
  */
209
- size: PropTypes.oneOf(['small', 'medium']),
209
+ size: PropTypes
210
+ /* @typescript-to-proptypes-ignore */
211
+ .oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),
210
212
 
211
213
  /**
212
214
  * Set aria-sort direction.
@@ -789,7 +789,9 @@ process.env.NODE_ENV !== "production" ? Tabs.propTypes
789
789
  * Determines the color of the indicator.
790
790
  * @default 'primary'
791
791
  */
792
- indicatorColor: PropTypes.oneOf(['primary', 'secondary']),
792
+ indicatorColor: PropTypes
793
+ /* @typescript-to-proptypes-ignore */
794
+ .oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),
793
795
 
794
796
  /**
795
797
  * Callback fired when the value changes.
@@ -178,7 +178,7 @@ var TooltipArrow = styled('span', {
178
178
  /* = width / sqrt(2) = (length of the hypotenuse) */
179
179
  ,
180
180
  boxSizing: 'border-box',
181
- color: theme.vars ? "rgba(".concat(theme.vars.palette.grey.darkChannel, " / 0.9)") : alpha(theme.palette.grey[700], 0.9),
181
+ color: theme.vars ? theme.vars.palette.Tooltip.bg : alpha(theme.palette.grey[700], 0.9),
182
182
  '&::before': {
183
183
  content: '""',
184
184
  margin: 'auto',
@@ -360,15 +360,12 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
360
360
  var handleEnter = function handleEnter(event) {
361
361
  if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {
362
362
  return;
363
- } // Workaround for https://github.com/facebook/react/issues/7769
364
-
365
-
366
- if (!childNode) {
367
- setChildNode(event.currentTarget);
368
363
  } // Remove the title ahead of time.
369
364
  // We don't want to wait for the next render commit.
370
365
  // We would risk displaying two tooltips at the same time (native + this one).
371
- else {
366
+
367
+
368
+ if (childNode) {
372
369
  childNode.removeAttribute('title');
373
370
  }
374
371
 
@@ -414,6 +411,8 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
414
411
 
415
412
  var handleFocus = function handleFocus(event) {
416
413
  // Workaround for https://github.com/facebook/react/issues/7769
414
+ // The autoFocus of React might trigger the event before the componentDidMount.
415
+ // We need to account for this eventuality.
417
416
  if (!childNode) {
418
417
  setChildNode(event.currentTarget);
419
418
  }
package/legacy/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.9.1
1
+ /** @license MUI v5.10.0
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,6 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
+ import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@mui/utils";
4
5
  import { deepmerge } from '@mui/utils';
5
6
  import { generateUtilityClass } from '@mui/base';
6
7
  import { createTheme as systemCreateTheme } from '@mui/system';
@@ -27,6 +28,10 @@ function createTheme() {
27
28
  shapeInput = options.shape,
28
29
  other = _objectWithoutProperties(options, ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"]);
29
30
 
31
+ if (options.vars) {
32
+ throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `vars` is a private field used for CSS variables support.\nPlease use another name." : _formatMuiErrorMessage(18));
33
+ }
34
+
30
35
  var palette = createPalette(paletteInput);
31
36
  var systemTheme = systemCreateTheme(options);
32
37
  var muiTheme = deepmerge(systemTheme, {
@@ -51,9 +51,13 @@ export default function useScrollTrigger() {
51
51
 
52
52
  handleScroll(); // Re-evaluate trigger when dependencies change
53
53
 
54
- target.addEventListener('scroll', handleScroll);
54
+ target.addEventListener('scroll', handleScroll, {
55
+ passive: true
56
+ });
55
57
  return function () {
56
- target.removeEventListener('scroll', handleScroll);
58
+ target.removeEventListener('scroll', handleScroll, {
59
+ passive: true
60
+ });
57
61
  }; // See Option 3. https://github.com/facebook/react/issues/14476#issuecomment-471199055
58
62
  // eslint-disable-next-line react-hooks/exhaustive-deps
59
63
  }, [target, getTrigger, JSON.stringify(other)]);