@mui/material 6.4.7 → 6.4.9

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 (222) hide show
  1. package/Accordion/Accordion.d.ts +20 -5
  2. package/Accordion/Accordion.js +18 -6
  3. package/AccordionActions/AccordionActions.d.ts +2 -2
  4. package/AccordionDetails/AccordionDetails.d.ts +2 -2
  5. package/AccordionSummary/AccordionSummary.d.ts +62 -7
  6. package/AccordionSummary/AccordionSummary.js +67 -16
  7. package/Alert/Alert.d.ts +3 -3
  8. package/AlertTitle/AlertTitle.d.ts +3 -3
  9. package/AppBar/AppBar.d.ts +3 -3
  10. package/Autocomplete/Autocomplete.d.ts +2 -2
  11. package/Autocomplete/Autocomplete.js +1 -1
  12. package/Avatar/Avatar.d.ts +2 -2
  13. package/AvatarGroup/AvatarGroup.d.ts +2 -2
  14. package/Backdrop/Backdrop.d.ts +3 -3
  15. package/Badge/Badge.d.ts +3 -3
  16. package/BottomNavigation/BottomNavigation.d.ts +2 -2
  17. package/BottomNavigationAction/BottomNavigationAction.d.ts +3 -3
  18. package/Box/Box.d.ts +2 -2
  19. package/Breadcrumbs/Breadcrumbs.d.ts +3 -3
  20. package/Button/Button.d.ts +4 -4
  21. package/ButtonBase/ButtonBase.d.ts +2 -2
  22. package/ButtonGroup/ButtonGroup.d.ts +2 -2
  23. package/CHANGELOG.md +78 -4
  24. package/Card/Card.d.ts +3 -3
  25. package/CardActionArea/CardActionArea.d.ts +3 -3
  26. package/CardActions/CardActions.d.ts +2 -2
  27. package/CardContent/CardContent.d.ts +2 -2
  28. package/CardHeader/CardHeader.d.ts +2 -2
  29. package/CardMedia/CardMedia.d.ts +2 -2
  30. package/Checkbox/Checkbox.d.ts +4 -4
  31. package/Chip/Chip.d.ts +2 -2
  32. package/CircularProgress/CircularProgress.d.ts +2 -2
  33. package/ClickAwayListener/ClickAwayListener.d.ts +3 -3
  34. package/ClickAwayListener/ClickAwayListener.js +3 -3
  35. package/Collapse/Collapse.d.ts +5 -5
  36. package/Container/Container.d.ts +2 -2
  37. package/CssBaseline/CssBaseline.d.ts +2 -2
  38. package/Dialog/Dialog.d.ts +3 -3
  39. package/DialogActions/DialogActions.d.ts +2 -2
  40. package/DialogContent/DialogContent.d.ts +2 -2
  41. package/DialogContentText/DialogContentText.d.ts +3 -3
  42. package/DialogTitle/DialogTitle.d.ts +3 -3
  43. package/Divider/Divider.d.ts +3 -3
  44. package/Drawer/Drawer.d.ts +3 -3
  45. package/Fab/Fab.d.ts +3 -3
  46. package/Fade/Fade.d.ts +3 -3
  47. package/FilledInput/FilledInput.d.ts +3 -3
  48. package/FormControl/FormControl.d.ts +6 -6
  49. package/FormControlLabel/FormControlLabel.d.ts +4 -4
  50. package/FormGroup/FormGroup.d.ts +3 -3
  51. package/FormHelperText/FormHelperText.d.ts +2 -2
  52. package/FormLabel/FormLabel.d.ts +4 -4
  53. package/GlobalStyles/GlobalStyles.d.ts +2 -2
  54. package/Grid/Grid.d.ts +2 -2
  55. package/Grid2/Grid2.d.ts +2 -2
  56. package/Grid2/Grid2.js +2 -2
  57. package/Grow/Grow.d.ts +5 -5
  58. package/Hidden/Hidden.d.ts +2 -2
  59. package/Icon/Icon.d.ts +3 -3
  60. package/IconButton/IconButton.d.ts +4 -4
  61. package/ImageList/ImageList.d.ts +2 -2
  62. package/ImageListItem/ImageListItem.d.ts +2 -2
  63. package/ImageListItemBar/ImageListItemBar.d.ts +2 -2
  64. package/Input/Input.d.ts +3 -3
  65. package/InputAdornment/InputAdornment.d.ts +2 -2
  66. package/InputBase/InputBase.d.ts +2 -2
  67. package/InputLabel/InputLabel.d.ts +3 -3
  68. package/LinearProgress/LinearProgress.d.ts +2 -2
  69. package/Link/Link.d.ts +4 -4
  70. package/List/List.d.ts +3 -3
  71. package/ListItem/ListItem.d.ts +3 -3
  72. package/ListItemAvatar/ListItemAvatar.d.ts +2 -2
  73. package/ListItemButton/ListItemButton.d.ts +3 -3
  74. package/ListItemIcon/ListItemIcon.d.ts +2 -2
  75. package/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +2 -2
  76. package/ListItemText/ListItemText.d.ts +12 -2
  77. package/ListItemText/ListItemText.js +14 -5
  78. package/ListSubheader/ListSubheader.d.ts +2 -2
  79. package/Menu/Menu.d.ts +4 -4
  80. package/MenuItem/MenuItem.d.ts +3 -3
  81. package/MenuList/MenuList.d.ts +4 -4
  82. package/MobileStepper/MobileStepper.d.ts +3 -3
  83. package/Modal/Modal.d.ts +7 -7
  84. package/NativeSelect/NativeSelect.d.ts +3 -3
  85. package/NoSsr/NoSsr.d.ts +2 -2
  86. package/NoSsr/NoSsr.js +2 -2
  87. package/OutlinedInput/OutlinedInput.d.ts +3 -3
  88. package/Pagination/Pagination.d.ts +2 -2
  89. package/PaginationItem/PaginationItem.d.ts +2 -2
  90. package/Paper/Paper.d.ts +3 -3
  91. package/PigmentContainer/PigmentContainer.d.ts +2 -2
  92. package/PigmentContainer/PigmentContainer.js +2 -2
  93. package/PigmentGrid/PigmentGrid.d.ts +2 -2
  94. package/PigmentGrid/PigmentGrid.js +2 -2
  95. package/PigmentHidden/PigmentHidden.d.ts +2 -2
  96. package/PigmentHidden/PigmentHidden.js +2 -2
  97. package/PigmentStack/PigmentStack.d.ts +2 -2
  98. package/PigmentStack/PigmentStack.js +2 -2
  99. package/Popover/Popover.d.ts +4 -4
  100. package/Popper/Popper.d.ts +4 -4
  101. package/Popper/Popper.js +4 -4
  102. package/Portal/Portal.d.ts +2 -2
  103. package/Portal/Portal.js +2 -2
  104. package/README.md +4 -2
  105. package/Radio/Radio.d.ts +3 -3
  106. package/RadioGroup/RadioGroup.d.ts +3 -3
  107. package/Rating/Rating.d.ts +2 -2
  108. package/ScopedCssBaseline/ScopedCssBaseline.d.ts +2 -2
  109. package/Select/Select.d.ts +3 -3
  110. package/Skeleton/Skeleton.d.ts +2 -2
  111. package/Slide/Slide.d.ts +4 -4
  112. package/Slider/Slider.d.ts +2 -2
  113. package/Snackbar/Snackbar.d.ts +2 -2
  114. package/Snackbar/Snackbar.js +7 -1
  115. package/SnackbarContent/SnackbarContent.d.ts +3 -3
  116. package/SpeedDial/SpeedDial.d.ts +12 -2
  117. package/SpeedDial/SpeedDial.js +40 -11
  118. package/SpeedDialAction/SpeedDialAction.d.ts +3 -3
  119. package/SpeedDialAction/SpeedDialAction.js +1 -1
  120. package/SpeedDialIcon/SpeedDialIcon.d.ts +2 -2
  121. package/Stack/Stack.d.ts +2 -2
  122. package/Step/Step.d.ts +2 -2
  123. package/StepButton/StepButton.d.ts +3 -3
  124. package/StepConnector/StepConnector.d.ts +2 -2
  125. package/StepContent/StepContent.d.ts +2 -2
  126. package/StepIcon/StepIcon.d.ts +3 -3
  127. package/StepLabel/StepLabel.d.ts +21 -3
  128. package/StepLabel/StepLabel.js +14 -5
  129. package/Stepper/Stepper.d.ts +2 -2
  130. package/SvgIcon/SvgIcon.d.ts +3 -3
  131. package/SwipeableDrawer/SwipeableDrawer.d.ts +3 -3
  132. package/Switch/Switch.d.ts +78 -5
  133. package/Switch/Switch.js +71 -9
  134. package/Tab/Tab.d.ts +3 -3
  135. package/TabScrollButton/TabScrollButton.d.ts +2 -2
  136. package/Table/Table.d.ts +2 -2
  137. package/TableBody/TableBody.d.ts +2 -2
  138. package/TableCell/TableCell.d.ts +2 -2
  139. package/TableContainer/TableContainer.d.ts +2 -2
  140. package/TableFooter/TableFooter.d.ts +2 -2
  141. package/TableHead/TableHead.d.ts +2 -2
  142. package/TablePagination/TablePagination.d.ts +4 -4
  143. package/TableRow/TableRow.d.ts +2 -2
  144. package/TableSortLabel/TableSortLabel.d.ts +3 -3
  145. package/Tabs/Tabs.d.ts +2 -2
  146. package/Tabs/Tabs.js +4 -0
  147. package/TextField/TextField.d.ts +40 -10
  148. package/TextField/TextField.js +22 -11
  149. package/TextareaAutosize/TextareaAutosize.d.ts +2 -2
  150. package/TextareaAutosize/TextareaAutosize.js +28 -17
  151. package/ToggleButton/ToggleButton.d.ts +3 -3
  152. package/ToggleButtonGroup/ToggleButtonGroup.d.ts +2 -2
  153. package/Toolbar/Toolbar.d.ts +2 -2
  154. package/Tooltip/Tooltip.d.ts +3 -15
  155. package/Tooltip/Tooltip.js +1 -1
  156. package/Typography/Typography.d.ts +3 -3
  157. package/Zoom/Zoom.d.ts +3 -3
  158. package/index.js +1 -1
  159. package/modern/Accordion/Accordion.js +18 -6
  160. package/modern/AccordionSummary/AccordionSummary.js +67 -16
  161. package/modern/Autocomplete/Autocomplete.js +1 -1
  162. package/modern/ClickAwayListener/ClickAwayListener.js +3 -3
  163. package/modern/Grid2/Grid2.js +2 -2
  164. package/modern/ListItemText/ListItemText.js +14 -5
  165. package/modern/NoSsr/NoSsr.js +2 -2
  166. package/modern/PigmentContainer/PigmentContainer.js +2 -2
  167. package/modern/PigmentGrid/PigmentGrid.js +2 -2
  168. package/modern/PigmentHidden/PigmentHidden.js +2 -2
  169. package/modern/PigmentStack/PigmentStack.js +2 -2
  170. package/modern/Popper/Popper.js +4 -4
  171. package/modern/Portal/Portal.js +2 -2
  172. package/modern/Snackbar/Snackbar.js +7 -1
  173. package/modern/SpeedDial/SpeedDial.js +40 -11
  174. package/modern/SpeedDialAction/SpeedDialAction.js +1 -1
  175. package/modern/StepLabel/StepLabel.js +14 -5
  176. package/modern/Switch/Switch.js +71 -9
  177. package/modern/Tabs/Tabs.js +4 -0
  178. package/modern/TextField/TextField.js +22 -11
  179. package/modern/TextareaAutosize/TextareaAutosize.js +28 -17
  180. package/modern/Tooltip/Tooltip.js +1 -1
  181. package/modern/index.js +1 -1
  182. package/modern/styles/ThemeProvider.js +11 -0
  183. package/modern/styles/createThemeNoVars.js +1 -3
  184. package/modern/useAutocomplete/useAutocomplete.js +3 -3
  185. package/modern/useScrollTrigger/useScrollTrigger.js +3 -0
  186. package/modern/version/index.js +2 -2
  187. package/node/Accordion/Accordion.js +18 -6
  188. package/node/AccordionSummary/AccordionSummary.js +67 -16
  189. package/node/Autocomplete/Autocomplete.js +1 -1
  190. package/node/ClickAwayListener/ClickAwayListener.js +3 -3
  191. package/node/Grid2/Grid2.js +2 -2
  192. package/node/ListItemText/ListItemText.js +14 -5
  193. package/node/NoSsr/NoSsr.js +2 -2
  194. package/node/PigmentContainer/PigmentContainer.js +2 -2
  195. package/node/PigmentGrid/PigmentGrid.js +2 -2
  196. package/node/PigmentHidden/PigmentHidden.js +2 -2
  197. package/node/PigmentStack/PigmentStack.js +2 -2
  198. package/node/Popper/Popper.js +4 -4
  199. package/node/Portal/Portal.js +2 -2
  200. package/node/Snackbar/Snackbar.js +7 -1
  201. package/node/SpeedDial/SpeedDial.js +40 -11
  202. package/node/SpeedDialAction/SpeedDialAction.js +1 -1
  203. package/node/StepLabel/StepLabel.js +14 -5
  204. package/node/Switch/Switch.js +71 -9
  205. package/node/Tabs/Tabs.js +4 -0
  206. package/node/TextField/TextField.js +22 -11
  207. package/node/TextareaAutosize/TextareaAutosize.js +27 -16
  208. package/node/Tooltip/Tooltip.js +1 -1
  209. package/node/index.js +1 -1
  210. package/node/styles/ThemeProvider.js +11 -0
  211. package/node/styles/createThemeNoVars.js +1 -3
  212. package/node/useAutocomplete/useAutocomplete.js +3 -3
  213. package/node/useScrollTrigger/useScrollTrigger.js +3 -0
  214. package/node/version/index.js +2 -2
  215. package/package.json +6 -6
  216. package/styles/ThemeProvider.js +11 -0
  217. package/styles/createThemeNoVars.js +1 -3
  218. package/useAutocomplete/useAutocomplete.d.ts +2 -2
  219. package/useAutocomplete/useAutocomplete.js +3 -3
  220. package/useScrollTrigger/useScrollTrigger.d.ts +1 -1
  221. package/useScrollTrigger/useScrollTrigger.js +3 -0
  222. package/version/index.js +2 -2
@@ -23,11 +23,11 @@ const useUtilityClasses = ownerState => {
23
23
  *
24
24
  * Demos:
25
25
  *
26
- * - [Container](https://mui.com/material-ui/react-container/)
26
+ * - [Container](https://v6.mui.com/material-ui/react-container/)
27
27
  *
28
28
  * API:
29
29
  *
30
- * - [PigmentContainer API](https://mui.com/material-ui/api/pigment-container/)
30
+ * - [PigmentContainer API](https://v6.mui.com/material-ui/api/pigment-container/)
31
31
  */
32
32
  const PigmentContainer = /*#__PURE__*/React.forwardRef(function PigmentContainer({
33
33
  className,
@@ -37,11 +37,11 @@ const useUtilityClasses = ownerState => {
37
37
  *
38
38
  * Demos:
39
39
  *
40
- * - [Grid version 2](https://mui.com/material-ui/react-grid2/)
40
+ * - [Grid version 2](https://v6.mui.com/material-ui/react-grid2/)
41
41
  *
42
42
  * API:
43
43
  *
44
- * - [PigmentGrid API](https://mui.com/material-ui/api/pigment-grid/)
44
+ * - [PigmentGrid API](https://v6.mui.com/material-ui/api/pigment-grid/)
45
45
  */
46
46
  const PigmentGrid = /*#__PURE__*/React.forwardRef(function PigmentGrid(props, ref) {
47
47
  const {
@@ -171,11 +171,11 @@ process.env.NODE_ENV !== "production" ? HiddenCss.propTypes /* remove-proptypes
171
171
  *
172
172
  * Demos:
173
173
  *
174
- * - [Hidden](https://mui.com/material-ui/react-hidden/)
174
+ * - [Hidden](https://v6.mui.com/material-ui/react-hidden/)
175
175
  *
176
176
  * API:
177
177
  *
178
- * - [PigmentHidden API](https://mui.com/material-ui/api/pigment-hidden/)
178
+ * - [PigmentHidden API](https://v6.mui.com/material-ui/api/pigment-hidden/)
179
179
  */
180
180
  function PigmentHidden({
181
181
  implementation = 'js',
@@ -16,11 +16,11 @@ const useUtilityClasses = () => {
16
16
  *
17
17
  * Demos:
18
18
  *
19
- * - [Stack](https://mui.com/material-ui/react-stack/)
19
+ * - [Stack](https://v6.mui.com/material-ui/react-stack/)
20
20
  *
21
21
  * API:
22
22
  *
23
- * - [PigmentStack API](https://mui.com/material-ui/api/pigment-stack/)
23
+ * - [PigmentStack API](https://v6.mui.com/material-ui/api/pigment-stack/)
24
24
  */
25
25
  const PigmentStack = /*#__PURE__*/React.forwardRef(function PigmentStack({
26
26
  className,
@@ -19,13 +19,13 @@ const PopperRoot = styled(BasePopper, {
19
19
  *
20
20
  * Demos:
21
21
  *
22
- * - [Autocomplete](https://mui.com/material-ui/react-autocomplete/)
23
- * - [Menu](https://mui.com/material-ui/react-menu/)
24
- * - [Popper](https://mui.com/material-ui/react-popper/)
22
+ * - [Autocomplete](https://v6.mui.com/material-ui/react-autocomplete/)
23
+ * - [Menu](https://v6.mui.com/material-ui/react-menu/)
24
+ * - [Popper](https://v6.mui.com/material-ui/react-popper/)
25
25
  *
26
26
  * API:
27
27
  *
28
- * - [Popper API](https://mui.com/material-ui/api/popper/)
28
+ * - [Popper API](https://v6.mui.com/material-ui/api/popper/)
29
29
  */
30
30
  const Popper = /*#__PURE__*/React.forwardRef(function Popper(inProps, ref) {
31
31
  const isRtl = useRtl();
@@ -14,11 +14,11 @@ function getContainer(container) {
14
14
  *
15
15
  * Demos:
16
16
  *
17
- * - [Portal](https://mui.com/material-ui/react-portal/)
17
+ * - [Portal](https://v6.mui.com/material-ui/react-portal/)
18
18
  *
19
19
  * API:
20
20
  *
21
- * - [Portal API](https://mui.com/material-ui/api/portal/)
21
+ * - [Portal API](https://v6.mui.com/material-ui/api/portal/)
22
22
  */
23
23
  const Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef) {
24
24
  const {
@@ -196,7 +196,10 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
196
196
  },
197
197
  ownerState
198
198
  });
199
- const [ClickAwaySlot, clickAwayListenerProps] = useSlot('clickAwayListener', {
199
+ const [ClickAwaySlot, {
200
+ ownerState: clickAwayOwnerStateProp,
201
+ ...clickAwayListenerProps
202
+ }] = useSlot('clickAwayListener', {
200
203
  elementType: ClickAwayListener,
201
204
  externalForwardedProps,
202
205
  getSlotProps: handlers => ({
@@ -245,6 +248,9 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
245
248
  }
246
249
  return /*#__PURE__*/_jsx(ClickAwaySlot, {
247
250
  ...clickAwayListenerProps,
251
+ ...(slots.clickAwayListener && {
252
+ ownerState: clickAwayOwnerStateProp
253
+ }),
248
254
  children: /*#__PURE__*/_jsx(Root, {
249
255
  ...rootProps,
250
256
  children: /*#__PURE__*/_jsx(TransitionSlot, {
@@ -372,22 +372,49 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
372
372
  slots: backwardCompatibleSlots,
373
373
  slotProps: backwardCompatibleSlotProps
374
374
  };
375
+ const [RootSlot, rootSlotProps] = useSlot('root', {
376
+ elementType: SpeedDialRoot,
377
+ externalForwardedProps: {
378
+ ...externalForwardedProps,
379
+ ...other
380
+ },
381
+ ownerState,
382
+ ref,
383
+ className: clsx(classes.root, className),
384
+ additionalProps: {
385
+ role: 'presentation'
386
+ },
387
+ getSlotProps: handlers => ({
388
+ ...handlers,
389
+ onKeyDown: event => {
390
+ handlers.onKeyDown?.(event);
391
+ handleKeyDown(event);
392
+ },
393
+ onBlur: event => {
394
+ handlers.onBlur?.(event);
395
+ handleClose(event);
396
+ },
397
+ onFocus: event => {
398
+ handlers.onFocus?.(event);
399
+ handleOpen(event);
400
+ },
401
+ onMouseEnter: event => {
402
+ handlers.onMouseEnter?.(event);
403
+ handleOpen(event);
404
+ },
405
+ onMouseLeave: event => {
406
+ handlers.onMouseLeave?.(event);
407
+ handleClose(event);
408
+ }
409
+ })
410
+ });
375
411
  const [TransitionSlot, transitionProps] = useSlot('transition', {
376
412
  elementType: Zoom,
377
413
  externalForwardedProps,
378
414
  ownerState
379
415
  });
380
- return /*#__PURE__*/_jsxs(SpeedDialRoot, {
381
- className: clsx(classes.root, className),
382
- ref: ref,
383
- role: "presentation",
384
- onKeyDown: handleKeyDown,
385
- onBlur: handleClose,
386
- onFocus: handleOpen,
387
- onMouseEnter: handleOpen,
388
- onMouseLeave: handleClose,
389
- ownerState: ownerState,
390
- ...other,
416
+ return /*#__PURE__*/_jsxs(RootSlot, {
417
+ ...rootSlotProps,
391
418
  children: [/*#__PURE__*/_jsx(TransitionSlot, {
392
419
  in: !hidden,
393
420
  timeout: transitionDuration,
@@ -507,6 +534,7 @@ process.env.NODE_ENV !== "production" ? SpeedDial.propTypes /* remove-proptypes
507
534
  * @default {}
508
535
  */
509
536
  slotProps: PropTypes.shape({
537
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
510
538
  transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
511
539
  }),
512
540
  /**
@@ -514,6 +542,7 @@ process.env.NODE_ENV !== "production" ? SpeedDial.propTypes /* remove-proptypes
514
542
  * @default {}
515
543
  */
516
544
  slots: PropTypes.shape({
545
+ root: PropTypes.elementType,
517
546
  transition: PropTypes.elementType
518
547
  }),
519
548
  /**
@@ -341,7 +341,7 @@ process.env.NODE_ENV !== "production" ? SpeedDialAction.propTypes /* remove-prop
341
341
  * @default 'left'
342
342
  * @deprecated Use `slotProps.tooltip.placement` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
343
343
  */
344
- tooltipPlacement: PropTypes.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),
344
+ tooltipPlacement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),
345
345
  /**
346
346
  * Label to display in the tooltip.
347
347
  * @deprecated Use `slotProps.tooltip.title` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
@@ -162,6 +162,16 @@ const StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref)
162
162
  ...slotProps
163
163
  }
164
164
  };
165
+ const [RootSlot, rootProps] = useSlot('root', {
166
+ elementType: StepLabelRoot,
167
+ externalForwardedProps: {
168
+ ...externalForwardedProps,
169
+ ...other
170
+ },
171
+ ownerState,
172
+ ref,
173
+ className: clsx(classes.root, className)
174
+ });
165
175
  const [LabelSlot, labelProps] = useSlot('label', {
166
176
  elementType: StepLabelLabel,
167
177
  externalForwardedProps,
@@ -172,11 +182,8 @@ const StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref)
172
182
  externalForwardedProps,
173
183
  ownerState
174
184
  });
175
- return /*#__PURE__*/_jsxs(StepLabelRoot, {
176
- className: clsx(classes.root, className),
177
- ref: ref,
178
- ownerState: ownerState,
179
- ...other,
185
+ return /*#__PURE__*/_jsxs(RootSlot, {
186
+ ...rootProps,
180
187
  children: [icon || StepIconSlot ? /*#__PURE__*/_jsx(StepLabelIconContainer, {
181
188
  className: classes.iconContainer,
182
189
  ownerState: ownerState,
@@ -242,6 +249,7 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes /* remove-proptypes
242
249
  */
243
250
  slotProps: PropTypes.shape({
244
251
  label: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
252
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
245
253
  stepIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
246
254
  }),
247
255
  /**
@@ -250,6 +258,7 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes /* remove-proptypes
250
258
  */
251
259
  slots: PropTypes.shape({
252
260
  label: PropTypes.elementType,
261
+ root: PropTypes.elementType,
253
262
  stepIcon: PropTypes.elementType
254
263
  }),
255
264
  /**
@@ -14,6 +14,7 @@ import { styled } from "../zero-styled/index.js";
14
14
  import memoTheme from "../utils/memoTheme.js";
15
15
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
16
16
  import switchClasses, { getSwitchUtilityClass } from "./switchClasses.js";
17
+ import useSlot from "../utils/useSlot.js";
17
18
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
19
  const useUtilityClasses = ownerState => {
19
20
  const {
@@ -212,6 +213,8 @@ const Switch = /*#__PURE__*/React.forwardRef(function Switch(inProps, ref) {
212
213
  edge = false,
213
214
  size = 'medium',
214
215
  sx,
216
+ slots = {},
217
+ slotProps = {},
215
218
  ...other
216
219
  } = props;
217
220
  const ownerState = {
@@ -221,14 +224,36 @@ const Switch = /*#__PURE__*/React.forwardRef(function Switch(inProps, ref) {
221
224
  size
222
225
  };
223
226
  const classes = useUtilityClasses(ownerState);
224
- const icon = /*#__PURE__*/_jsx(SwitchThumb, {
227
+ const externalForwardedProps = {
228
+ slots,
229
+ slotProps
230
+ };
231
+ const [RootSlot, rootSlotProps] = useSlot('root', {
232
+ className: clsx(classes.root, className),
233
+ elementType: SwitchRoot,
234
+ externalForwardedProps,
235
+ ownerState,
236
+ additionalProps: {
237
+ sx
238
+ }
239
+ });
240
+ const [ThumbSlot, thumbSlotProps] = useSlot('thumb', {
225
241
  className: classes.thumb,
226
- ownerState: ownerState
242
+ elementType: SwitchThumb,
243
+ externalForwardedProps,
244
+ ownerState
227
245
  });
228
- return /*#__PURE__*/_jsxs(SwitchRoot, {
229
- className: clsx(classes.root, className),
230
- sx: sx,
231
- ownerState: ownerState,
246
+ const icon = /*#__PURE__*/_jsx(ThumbSlot, {
247
+ ...thumbSlotProps
248
+ });
249
+ const [TrackSlot, trackSlotProps] = useSlot('track', {
250
+ className: classes.track,
251
+ elementType: SwitchTrack,
252
+ externalForwardedProps,
253
+ ownerState
254
+ });
255
+ return /*#__PURE__*/_jsxs(RootSlot, {
256
+ ...rootSlotProps,
232
257
  children: [/*#__PURE__*/_jsx(SwitchSwitchBase, {
233
258
  type: "checkbox",
234
259
  icon: icon,
@@ -239,10 +264,25 @@ const Switch = /*#__PURE__*/React.forwardRef(function Switch(inProps, ref) {
239
264
  classes: {
240
265
  ...classes,
241
266
  root: classes.switchBase
267
+ },
268
+ slots: {
269
+ ...(slots.switchBase && {
270
+ root: slots.switchBase
271
+ }),
272
+ ...(slots.input && {
273
+ input: slots.input
274
+ })
275
+ },
276
+ slotProps: {
277
+ ...(slotProps.switchBase && {
278
+ root: typeof slotProps.switchBase === 'function' ? slotProps.switchBase(ownerState) : slotProps.switchBase
279
+ }),
280
+ ...(slotProps.input && {
281
+ input: typeof slotProps.input === 'function' ? slotProps.input(ownerState) : slotProps.input
282
+ })
242
283
  }
243
- }), /*#__PURE__*/_jsx(SwitchTrack, {
244
- className: classes.track,
245
- ownerState: ownerState
284
+ }), /*#__PURE__*/_jsx(TrackSlot, {
285
+ ...trackSlotProps
246
286
  })]
247
287
  });
248
288
  });
@@ -332,6 +372,28 @@ process.env.NODE_ENV !== "production" ? Switch.propTypes /* remove-proptypes */
332
372
  * @default 'medium'
333
373
  */
334
374
  size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),
375
+ /**
376
+ * The props used for each slot inside.
377
+ * @default {}
378
+ */
379
+ slotProps: PropTypes.shape({
380
+ input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
381
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
382
+ switchBase: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
383
+ thumb: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
384
+ track: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
385
+ }),
386
+ /**
387
+ * The components used for each slot inside.
388
+ * @default {}
389
+ */
390
+ slots: PropTypes.shape({
391
+ input: PropTypes.elementType,
392
+ root: PropTypes.elementType,
393
+ switchBase: PropTypes.elementType,
394
+ thumb: PropTypes.elementType,
395
+ track: PropTypes.elementType
396
+ }),
335
397
  /**
336
398
  * The system prop that allows defining system overrides as well as additional CSS styles.
337
399
  */
@@ -693,6 +693,10 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
693
693
  });
694
694
  });
695
695
  const handleKeyDown = event => {
696
+ // Check if a modifier key (Alt, Shift, Ctrl, Meta) is pressed
697
+ if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {
698
+ return;
699
+ }
696
700
  const list = tabListRef.current;
697
701
  const currentFocus = ownerDocument(list).activeElement;
698
702
  // Keyboard navigation assumes that [role="tab"] are siblings
@@ -160,6 +160,25 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
160
160
  }
161
161
  inputAdditionalProps['aria-describedby'] = undefined;
162
162
  }
163
+ const [RootSlot, rootProps] = useSlot('root', {
164
+ elementType: TextFieldRoot,
165
+ shouldForwardComponentProp: true,
166
+ externalForwardedProps: {
167
+ ...externalForwardedProps,
168
+ ...other
169
+ },
170
+ ownerState,
171
+ className: clsx(classes.root, className),
172
+ ref,
173
+ additionalProps: {
174
+ disabled,
175
+ error,
176
+ fullWidth,
177
+ required,
178
+ color,
179
+ variant
180
+ }
181
+ });
163
182
  const [InputSlot, inputProps] = useSlot('input', {
164
183
  elementType: InputComponent,
165
184
  externalForwardedProps,
@@ -211,17 +230,8 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
211
230
  },
212
231
  ...inputProps
213
232
  });
214
- return /*#__PURE__*/_jsxs(TextFieldRoot, {
215
- className: clsx(classes.root, className),
216
- disabled: disabled,
217
- error: error,
218
- fullWidth: fullWidth,
219
- ref: ref,
220
- required: required,
221
- color: color,
222
- variant: variant,
223
- ownerState: ownerState,
224
- ...other,
233
+ return /*#__PURE__*/_jsxs(RootSlot, {
234
+ ...rootProps,
225
235
  children: [label != null && label !== '' && /*#__PURE__*/_jsx(InputLabelSlot, {
226
236
  htmlFor: id,
227
237
  id: inputLabelId,
@@ -423,6 +433,7 @@ process.env.NODE_ENV !== "production" ? TextField.propTypes /* remove-proptypes
423
433
  htmlInput: PropTypes.elementType,
424
434
  input: PropTypes.elementType,
425
435
  inputLabel: PropTypes.elementType,
436
+ root: PropTypes.elementType,
426
437
  select: PropTypes.elementType
427
438
  }),
428
439
  /**
@@ -2,7 +2,7 @@
2
2
 
3
3
  import * as React from 'react';
4
4
  import PropTypes from 'prop-types';
5
- import { unstable_debounce as debounce, unstable_useForkRef as useForkRef, unstable_useEnhancedEffect as useEnhancedEffect, unstable_ownerWindow as ownerWindow } from '@mui/utils';
5
+ import { unstable_debounce as debounce, unstable_useForkRef as useForkRef, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useEventCallback as useEventCallback, unstable_ownerWindow as ownerWindow } from '@mui/utils';
6
6
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
7
  function getStyleValue(value) {
8
8
  return parseInt(value, 10) || 0;
@@ -37,11 +37,11 @@ function isEmpty(obj) {
37
37
  *
38
38
  * Demos:
39
39
  *
40
- * - [Textarea Autosize](https://mui.com/material-ui/react-textarea-autosize/)
40
+ * - [Textarea Autosize](https://v6.mui.com/material-ui/react-textarea-autosize/)
41
41
  *
42
42
  * API:
43
43
  *
44
- * - [TextareaAutosize API](https://mui.com/material-ui/api/textarea-autosize/)
44
+ * - [TextareaAutosize API](https://v6.mui.com/material-ui/api/textarea-autosize/)
45
45
  */
46
46
  const TextareaAutosize = /*#__PURE__*/React.forwardRef(function TextareaAutosize(props, forwardedRef) {
47
47
  const {
@@ -112,6 +112,15 @@ const TextareaAutosize = /*#__PURE__*/React.forwardRef(function TextareaAutosize
112
112
  overflowing
113
113
  };
114
114
  }, [maxRows, minRows, props.placeholder]);
115
+ const didHeightChange = useEventCallback(() => {
116
+ const textarea = textareaRef.current;
117
+ const textareaStyles = calculateTextareaStyles();
118
+ if (!textarea || !textareaStyles || isEmpty(textareaStyles)) {
119
+ return false;
120
+ }
121
+ const outerHeightStyle = textareaStyles.outerHeightStyle;
122
+ return heightRef.current != null && heightRef.current !== outerHeightStyle;
123
+ });
115
124
  const syncHeight = React.useCallback(() => {
116
125
  const textarea = textareaRef.current;
117
126
  const textareaStyles = calculateTextareaStyles();
@@ -127,37 +136,39 @@ const TextareaAutosize = /*#__PURE__*/React.forwardRef(function TextareaAutosize
127
136
  }, [calculateTextareaStyles]);
128
137
  const frameRef = React.useRef(-1);
129
138
  useEnhancedEffect(() => {
130
- const debounceHandleResize = debounce(() => syncHeight());
139
+ const debouncedHandleResize = debounce(syncHeight);
131
140
  const textarea = textareaRef?.current;
132
141
  if (!textarea) {
133
142
  return undefined;
134
143
  }
135
144
  const containerWindow = ownerWindow(textarea);
136
- containerWindow.addEventListener('resize', debounceHandleResize);
145
+ containerWindow.addEventListener('resize', debouncedHandleResize);
137
146
  let resizeObserver;
138
147
  if (typeof ResizeObserver !== 'undefined') {
139
148
  resizeObserver = new ResizeObserver(() => {
140
- // avoid "ResizeObserver loop completed with undelivered notifications" error
141
- // by temporarily unobserving the textarea element while manipulating the height
142
- // and reobserving one frame later
143
- resizeObserver.unobserve(textarea);
144
- cancelAnimationFrame(frameRef.current);
145
- syncHeight();
146
- frameRef.current = requestAnimationFrame(() => {
147
- resizeObserver.observe(textarea);
148
- });
149
+ if (didHeightChange()) {
150
+ // avoid "ResizeObserver loop completed with undelivered notifications" error
151
+ // by temporarily unobserving the textarea element while manipulating the height
152
+ // and reobserving one frame later
153
+ resizeObserver.unobserve(textarea);
154
+ cancelAnimationFrame(frameRef.current);
155
+ syncHeight();
156
+ frameRef.current = requestAnimationFrame(() => {
157
+ resizeObserver.observe(textarea);
158
+ });
159
+ }
149
160
  });
150
161
  resizeObserver.observe(textarea);
151
162
  }
152
163
  return () => {
153
- debounceHandleResize.clear();
164
+ debouncedHandleResize.clear();
154
165
  cancelAnimationFrame(frameRef.current);
155
- containerWindow.removeEventListener('resize', debounceHandleResize);
166
+ containerWindow.removeEventListener('resize', debouncedHandleResize);
156
167
  if (resizeObserver) {
157
168
  resizeObserver.disconnect();
158
169
  }
159
170
  };
160
- }, [calculateTextareaStyles, syncHeight]);
171
+ }, [calculateTextareaStyles, syncHeight, didHeightChange]);
161
172
  useEnhancedEffect(() => {
162
173
  syncHeight();
163
174
  });
@@ -841,7 +841,7 @@ process.env.NODE_ENV !== "production" ? Tooltip.propTypes /* remove-proptypes */
841
841
  * Tooltip placement.
842
842
  * @default 'bottom'
843
843
  */
844
- placement: PropTypes.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),
844
+ placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),
845
845
  /**
846
846
  * The component used for the popper.
847
847
  * @deprecated use the `slots.popper` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.4.7
2
+ * @mui/material v6.4.9
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -17,6 +17,17 @@ export default function ThemeProvider({
17
17
  }
18
18
  const muiTheme = THEME_ID in theme ? theme[THEME_ID] : theme;
19
19
  if (!('colorSchemes' in muiTheme)) {
20
+ if (!('vars' in muiTheme)) {
21
+ // For non-CSS variables themes, set `vars` to null to prevent theme inheritance from the upper theme.
22
+ // The example use case is the docs demo that uses ThemeProvider to customize the theme while the upper theme is using CSS variables.
23
+ return /*#__PURE__*/_jsx(ThemeProviderNoVars, {
24
+ theme: {
25
+ ...theme,
26
+ vars: null
27
+ },
28
+ ...props
29
+ });
30
+ }
20
31
  return /*#__PURE__*/_jsx(ThemeProviderNoVars, {
21
32
  theme: theme,
22
33
  ...props
@@ -25,9 +25,7 @@ function createThemeNoVars(options = {}, ...args) {
25
25
  // The error should throw only for the root theme creation because user is not allowed to use a custom node `vars`.
26
26
  // `generateThemeVars` is the closest identifier for checking that the `options` is a result of `createTheme` with CSS variables so that user can create new theme for nested ThemeProvider.
27
27
  options.generateThemeVars === undefined) {
28
- throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `vars` is a private field used for CSS variables support.\n' +
29
- // #host-reference
30
- 'Please use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.' : _formatMuiErrorMessage(20));
28
+ throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `vars` is a private field used for CSS variables support.\n' + 'Please use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.' : _formatMuiErrorMessage(20));
31
29
  }
32
30
  const palette = createPalette(paletteInput);
33
31
  const systemTheme = systemCreateTheme(options);
@@ -238,7 +238,7 @@ function useAutocomplete(props) {
238
238
  const setHighlightedIndex = useEventCallback(({
239
239
  event,
240
240
  index,
241
- reason = 'auto'
241
+ reason
242
242
  }) => {
243
243
  highlightedIndexRef.current = index;
244
244
 
@@ -248,7 +248,7 @@ function useAutocomplete(props) {
248
248
  } else {
249
249
  inputRef.current.setAttribute('aria-activedescendant', `${id}-option-${index}`);
250
250
  }
251
- if (onHighlightChange) {
251
+ if (onHighlightChange && ['mouse', 'keyboard', 'touch'].includes(reason)) {
252
252
  onHighlightChange(event, index === -1 ? null : filteredOptions[index], reason);
253
253
  }
254
254
  if (!listboxRef.current) {
@@ -301,7 +301,7 @@ function useAutocomplete(props) {
301
301
  event,
302
302
  diff,
303
303
  direction = 'next',
304
- reason = 'auto'
304
+ reason
305
305
  }) => {
306
306
  if (!popupOpen) {
307
307
  return;
@@ -29,6 +29,9 @@ export default function useScrollTrigger(options = {}) {
29
29
  const store = React.useRef();
30
30
  const [trigger, setTrigger] = React.useState(() => getTrigger(store, other));
31
31
  React.useEffect(() => {
32
+ if (target === null) {
33
+ return setTrigger(false);
34
+ }
32
35
  const handleScroll = () => {
33
36
  setTrigger(getTrigger(store, {
34
37
  target,
@@ -1,6 +1,6 @@
1
- export const version = "6.4.7";
1
+ export const version = "6.4.9";
2
2
  export const major = Number("6");
3
3
  export const minor = Number("4");
4
- export const patch = Number("7");
4
+ export const patch = Number("9");
5
5
  export const prerelease = undefined;
6
6
  export default version;