@mui/material 6.4.8 → 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 (194) hide show
  1. package/Accordion/Accordion.d.ts +3 -3
  2. package/AccordionActions/AccordionActions.d.ts +2 -2
  3. package/AccordionDetails/AccordionDetails.d.ts +2 -2
  4. package/AccordionSummary/AccordionSummary.d.ts +3 -3
  5. package/Alert/Alert.d.ts +3 -3
  6. package/AlertTitle/AlertTitle.d.ts +3 -3
  7. package/AppBar/AppBar.d.ts +3 -3
  8. package/Autocomplete/Autocomplete.d.ts +2 -2
  9. package/Autocomplete/Autocomplete.js +1 -1
  10. package/Avatar/Avatar.d.ts +2 -2
  11. package/AvatarGroup/AvatarGroup.d.ts +2 -2
  12. package/Backdrop/Backdrop.d.ts +3 -3
  13. package/Badge/Badge.d.ts +3 -3
  14. package/BottomNavigation/BottomNavigation.d.ts +2 -2
  15. package/BottomNavigationAction/BottomNavigationAction.d.ts +3 -3
  16. package/Box/Box.d.ts +2 -2
  17. package/Breadcrumbs/Breadcrumbs.d.ts +3 -3
  18. package/Button/Button.d.ts +4 -4
  19. package/ButtonBase/ButtonBase.d.ts +2 -2
  20. package/ButtonGroup/ButtonGroup.d.ts +2 -2
  21. package/CHANGELOG.md +31 -0
  22. package/Card/Card.d.ts +3 -3
  23. package/CardActionArea/CardActionArea.d.ts +3 -3
  24. package/CardActions/CardActions.d.ts +2 -2
  25. package/CardContent/CardContent.d.ts +2 -2
  26. package/CardHeader/CardHeader.d.ts +2 -2
  27. package/CardMedia/CardMedia.d.ts +2 -2
  28. package/Checkbox/Checkbox.d.ts +4 -4
  29. package/Chip/Chip.d.ts +2 -2
  30. package/CircularProgress/CircularProgress.d.ts +2 -2
  31. package/ClickAwayListener/ClickAwayListener.d.ts +3 -3
  32. package/ClickAwayListener/ClickAwayListener.js +3 -3
  33. package/Collapse/Collapse.d.ts +5 -5
  34. package/Container/Container.d.ts +2 -2
  35. package/CssBaseline/CssBaseline.d.ts +2 -2
  36. package/Dialog/Dialog.d.ts +3 -3
  37. package/DialogActions/DialogActions.d.ts +2 -2
  38. package/DialogContent/DialogContent.d.ts +2 -2
  39. package/DialogContentText/DialogContentText.d.ts +3 -3
  40. package/DialogTitle/DialogTitle.d.ts +3 -3
  41. package/Divider/Divider.d.ts +3 -3
  42. package/Drawer/Drawer.d.ts +3 -3
  43. package/Fab/Fab.d.ts +3 -3
  44. package/Fade/Fade.d.ts +3 -3
  45. package/FilledInput/FilledInput.d.ts +3 -3
  46. package/FormControl/FormControl.d.ts +6 -6
  47. package/FormControlLabel/FormControlLabel.d.ts +4 -4
  48. package/FormGroup/FormGroup.d.ts +3 -3
  49. package/FormHelperText/FormHelperText.d.ts +2 -2
  50. package/FormLabel/FormLabel.d.ts +4 -4
  51. package/GlobalStyles/GlobalStyles.d.ts +2 -2
  52. package/Grid/Grid.d.ts +2 -2
  53. package/Grid2/Grid2.d.ts +2 -2
  54. package/Grid2/Grid2.js +2 -2
  55. package/Grow/Grow.d.ts +5 -5
  56. package/Hidden/Hidden.d.ts +2 -2
  57. package/Icon/Icon.d.ts +3 -3
  58. package/IconButton/IconButton.d.ts +4 -4
  59. package/ImageList/ImageList.d.ts +2 -2
  60. package/ImageListItem/ImageListItem.d.ts +2 -2
  61. package/ImageListItemBar/ImageListItemBar.d.ts +2 -2
  62. package/Input/Input.d.ts +3 -3
  63. package/InputAdornment/InputAdornment.d.ts +2 -2
  64. package/InputBase/InputBase.d.ts +2 -2
  65. package/InputLabel/InputLabel.d.ts +3 -3
  66. package/LinearProgress/LinearProgress.d.ts +2 -2
  67. package/Link/Link.d.ts +4 -4
  68. package/List/List.d.ts +3 -3
  69. package/ListItem/ListItem.d.ts +3 -3
  70. package/ListItemAvatar/ListItemAvatar.d.ts +2 -2
  71. package/ListItemButton/ListItemButton.d.ts +3 -3
  72. package/ListItemIcon/ListItemIcon.d.ts +2 -2
  73. package/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +2 -2
  74. package/ListItemText/ListItemText.d.ts +2 -2
  75. package/ListSubheader/ListSubheader.d.ts +2 -2
  76. package/Menu/Menu.d.ts +4 -4
  77. package/MenuItem/MenuItem.d.ts +3 -3
  78. package/MenuList/MenuList.d.ts +4 -4
  79. package/MobileStepper/MobileStepper.d.ts +3 -3
  80. package/Modal/Modal.d.ts +7 -7
  81. package/NativeSelect/NativeSelect.d.ts +3 -3
  82. package/NoSsr/NoSsr.d.ts +2 -2
  83. package/NoSsr/NoSsr.js +2 -2
  84. package/OutlinedInput/OutlinedInput.d.ts +3 -3
  85. package/Pagination/Pagination.d.ts +2 -2
  86. package/PaginationItem/PaginationItem.d.ts +2 -2
  87. package/Paper/Paper.d.ts +3 -3
  88. package/PigmentContainer/PigmentContainer.d.ts +2 -2
  89. package/PigmentContainer/PigmentContainer.js +2 -2
  90. package/PigmentGrid/PigmentGrid.d.ts +2 -2
  91. package/PigmentGrid/PigmentGrid.js +2 -2
  92. package/PigmentHidden/PigmentHidden.d.ts +2 -2
  93. package/PigmentHidden/PigmentHidden.js +2 -2
  94. package/PigmentStack/PigmentStack.d.ts +2 -2
  95. package/PigmentStack/PigmentStack.js +2 -2
  96. package/Popover/Popover.d.ts +4 -4
  97. package/Popper/Popper.d.ts +4 -4
  98. package/Popper/Popper.js +4 -4
  99. package/Portal/Portal.d.ts +2 -2
  100. package/Portal/Portal.js +2 -2
  101. package/README.md +4 -2
  102. package/Radio/Radio.d.ts +3 -3
  103. package/RadioGroup/RadioGroup.d.ts +3 -3
  104. package/Rating/Rating.d.ts +2 -2
  105. package/ScopedCssBaseline/ScopedCssBaseline.d.ts +2 -2
  106. package/Select/Select.d.ts +3 -3
  107. package/Skeleton/Skeleton.d.ts +2 -2
  108. package/Slide/Slide.d.ts +4 -4
  109. package/Slider/Slider.d.ts +2 -2
  110. package/Snackbar/Snackbar.d.ts +2 -2
  111. package/SnackbarContent/SnackbarContent.d.ts +3 -3
  112. package/SpeedDial/SpeedDial.d.ts +2 -2
  113. package/SpeedDialAction/SpeedDialAction.d.ts +3 -3
  114. package/SpeedDialIcon/SpeedDialIcon.d.ts +2 -2
  115. package/Stack/Stack.d.ts +2 -2
  116. package/Step/Step.d.ts +2 -2
  117. package/StepButton/StepButton.d.ts +3 -3
  118. package/StepConnector/StepConnector.d.ts +2 -2
  119. package/StepContent/StepContent.d.ts +2 -2
  120. package/StepIcon/StepIcon.d.ts +3 -3
  121. package/StepLabel/StepLabel.d.ts +21 -3
  122. package/StepLabel/StepLabel.js +14 -5
  123. package/Stepper/Stepper.d.ts +2 -2
  124. package/SvgIcon/SvgIcon.d.ts +3 -3
  125. package/SwipeableDrawer/SwipeableDrawer.d.ts +3 -3
  126. package/Switch/Switch.d.ts +78 -5
  127. package/Switch/Switch.js +71 -9
  128. package/Tab/Tab.d.ts +3 -3
  129. package/TabScrollButton/TabScrollButton.d.ts +2 -2
  130. package/Table/Table.d.ts +2 -2
  131. package/TableBody/TableBody.d.ts +2 -2
  132. package/TableCell/TableCell.d.ts +2 -2
  133. package/TableContainer/TableContainer.d.ts +2 -2
  134. package/TableFooter/TableFooter.d.ts +2 -2
  135. package/TableHead/TableHead.d.ts +2 -2
  136. package/TablePagination/TablePagination.d.ts +4 -4
  137. package/TableRow/TableRow.d.ts +2 -2
  138. package/TableSortLabel/TableSortLabel.d.ts +3 -3
  139. package/Tabs/Tabs.d.ts +2 -2
  140. package/Tabs/Tabs.js +4 -0
  141. package/TextField/TextField.d.ts +40 -10
  142. package/TextField/TextField.js +22 -11
  143. package/TextareaAutosize/TextareaAutosize.d.ts +2 -2
  144. package/TextareaAutosize/TextareaAutosize.js +2 -2
  145. package/ToggleButton/ToggleButton.d.ts +3 -3
  146. package/ToggleButtonGroup/ToggleButtonGroup.d.ts +2 -2
  147. package/Toolbar/Toolbar.d.ts +2 -2
  148. package/Tooltip/Tooltip.d.ts +2 -2
  149. package/Typography/Typography.d.ts +3 -3
  150. package/Zoom/Zoom.d.ts +3 -3
  151. package/index.js +1 -1
  152. package/modern/Autocomplete/Autocomplete.js +1 -1
  153. package/modern/ClickAwayListener/ClickAwayListener.js +3 -3
  154. package/modern/Grid2/Grid2.js +2 -2
  155. package/modern/NoSsr/NoSsr.js +2 -2
  156. package/modern/PigmentContainer/PigmentContainer.js +2 -2
  157. package/modern/PigmentGrid/PigmentGrid.js +2 -2
  158. package/modern/PigmentHidden/PigmentHidden.js +2 -2
  159. package/modern/PigmentStack/PigmentStack.js +2 -2
  160. package/modern/Popper/Popper.js +4 -4
  161. package/modern/Portal/Portal.js +2 -2
  162. package/modern/StepLabel/StepLabel.js +14 -5
  163. package/modern/Switch/Switch.js +71 -9
  164. package/modern/Tabs/Tabs.js +4 -0
  165. package/modern/TextField/TextField.js +22 -11
  166. package/modern/TextareaAutosize/TextareaAutosize.js +2 -2
  167. package/modern/index.js +1 -1
  168. package/modern/styles/createThemeNoVars.js +1 -3
  169. package/modern/useAutocomplete/useAutocomplete.js +3 -3
  170. package/modern/version/index.js +2 -2
  171. package/node/Autocomplete/Autocomplete.js +1 -1
  172. package/node/ClickAwayListener/ClickAwayListener.js +3 -3
  173. package/node/Grid2/Grid2.js +2 -2
  174. package/node/NoSsr/NoSsr.js +2 -2
  175. package/node/PigmentContainer/PigmentContainer.js +2 -2
  176. package/node/PigmentGrid/PigmentGrid.js +2 -2
  177. package/node/PigmentHidden/PigmentHidden.js +2 -2
  178. package/node/PigmentStack/PigmentStack.js +2 -2
  179. package/node/Popper/Popper.js +4 -4
  180. package/node/Portal/Portal.js +2 -2
  181. package/node/StepLabel/StepLabel.js +14 -5
  182. package/node/Switch/Switch.js +71 -9
  183. package/node/Tabs/Tabs.js +4 -0
  184. package/node/TextField/TextField.js +22 -11
  185. package/node/TextareaAutosize/TextareaAutosize.js +2 -2
  186. package/node/index.js +1 -1
  187. package/node/styles/createThemeNoVars.js +1 -3
  188. package/node/useAutocomplete/useAutocomplete.js +3 -3
  189. package/node/version/index.js +2 -2
  190. package/package.json +5 -5
  191. package/styles/createThemeNoVars.js +1 -3
  192. package/useAutocomplete/useAutocomplete.d.ts +2 -2
  193. package/useAutocomplete/useAutocomplete.js +3 -3
  194. package/version/index.js +2 -2
@@ -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
  /**
@@ -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 {
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.4.8
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
@@ -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;
@@ -1,6 +1,6 @@
1
- export const version = "6.4.8";
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("8");
4
+ export const patch = Number("9");
5
5
  export const prerelease = undefined;
6
6
  export default version;
@@ -1049,7 +1049,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
1049
1049
  *
1050
1050
  * @param {React.SyntheticEvent} event The event source of the callback.
1051
1051
  * @param {Value} option The highlighted option.
1052
- * @param {string} reason Can be: `"keyboard"`, `"auto"`, `"mouse"`, `"touch"`.
1052
+ * @param {string} reason Can be: `"keyboard"`, `"mouse"`, `"touch"`.
1053
1053
  */
1054
1054
  onHighlightChange: _propTypes.default.func,
1055
1055
  /**
@@ -24,12 +24,12 @@ function clickedRootScrollbar(event, doc) {
24
24
  *
25
25
  * Demos:
26
26
  *
27
- * - [Click-Away Listener](https://mui.com/material-ui/react-click-away-listener/)
28
- * - [Menu](https://mui.com/material-ui/react-menu/)
27
+ * - [Click-Away Listener](https://v6.mui.com/material-ui/react-click-away-listener/)
28
+ * - [Menu](https://v6.mui.com/material-ui/react-menu/)
29
29
  *
30
30
  * API:
31
31
  *
32
- * - [ClickAwayListener API](https://mui.com/material-ui/api/click-away-listener/)
32
+ * - [ClickAwayListener API](https://v6.mui.com/material-ui/api/click-away-listener/)
33
33
  */
34
34
  function ClickAwayListener(props) {
35
35
  const {
@@ -16,11 +16,11 @@ var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
16
16
  *
17
17
  * Demos:
18
18
  *
19
- * - [Grid version 2](https://mui.com/material-ui/react-grid2/)
19
+ * - [Grid version 2](https://v6.mui.com/material-ui/react-grid2/)
20
20
  *
21
21
  * API:
22
22
  *
23
- * - [Grid2 API](https://mui.com/material-ui/api/grid-2/)
23
+ * - [Grid2 API](https://v6.mui.com/material-ui/api/grid-2/)
24
24
  */
25
25
  const Grid2 = (0, _Grid.createGrid)({
26
26
  createStyledComponent: (0, _styles.styled)('div', {
@@ -22,11 +22,11 @@ var _utils = require("@mui/utils");
22
22
  *
23
23
  * Demos:
24
24
  *
25
- * - [No SSR](https://mui.com/material-ui/react-no-ssr/)
25
+ * - [No SSR](https://v6.mui.com/material-ui/react-no-ssr/)
26
26
  *
27
27
  * API:
28
28
  *
29
- * - [NoSsr API](https://mui.com/material-ui/api/no-ssr/)
29
+ * - [NoSsr API](https://v6.mui.com/material-ui/api/no-ssr/)
30
30
  */
31
31
  function NoSsr(props) {
32
32
  const {
@@ -32,11 +32,11 @@ const useUtilityClasses = ownerState => {
32
32
  *
33
33
  * Demos:
34
34
  *
35
- * - [Container](https://mui.com/material-ui/react-container/)
35
+ * - [Container](https://v6.mui.com/material-ui/react-container/)
36
36
  *
37
37
  * API:
38
38
  *
39
- * - [PigmentContainer API](https://mui.com/material-ui/api/pigment-container/)
39
+ * - [PigmentContainer API](https://v6.mui.com/material-ui/api/pigment-container/)
40
40
  */
41
41
  const PigmentContainer = /*#__PURE__*/React.forwardRef(function PigmentContainer({
42
42
  className,
@@ -46,11 +46,11 @@ const useUtilityClasses = ownerState => {
46
46
  *
47
47
  * Demos:
48
48
  *
49
- * - [Grid version 2](https://mui.com/material-ui/react-grid2/)
49
+ * - [Grid version 2](https://v6.mui.com/material-ui/react-grid2/)
50
50
  *
51
51
  * API:
52
52
  *
53
- * - [PigmentGrid API](https://mui.com/material-ui/api/pigment-grid/)
53
+ * - [PigmentGrid API](https://v6.mui.com/material-ui/api/pigment-grid/)
54
54
  */
55
55
  const PigmentGrid = /*#__PURE__*/React.forwardRef(function PigmentGrid(props, ref) {
56
56
  const {
@@ -179,11 +179,11 @@ process.env.NODE_ENV !== "production" ? HiddenCss.propTypes /* remove-proptypes
179
179
  *
180
180
  * Demos:
181
181
  *
182
- * - [Hidden](https://mui.com/material-ui/react-hidden/)
182
+ * - [Hidden](https://v6.mui.com/material-ui/react-hidden/)
183
183
  *
184
184
  * API:
185
185
  *
186
- * - [PigmentHidden API](https://mui.com/material-ui/api/pigment-hidden/)
186
+ * - [PigmentHidden API](https://v6.mui.com/material-ui/api/pigment-hidden/)
187
187
  */
188
188
  function PigmentHidden({
189
189
  implementation = 'js',
@@ -25,11 +25,11 @@ const useUtilityClasses = () => {
25
25
  *
26
26
  * Demos:
27
27
  *
28
- * - [Stack](https://mui.com/material-ui/react-stack/)
28
+ * - [Stack](https://v6.mui.com/material-ui/react-stack/)
29
29
  *
30
30
  * API:
31
31
  *
32
- * - [PigmentStack API](https://mui.com/material-ui/api/pigment-stack/)
32
+ * - [PigmentStack API](https://v6.mui.com/material-ui/api/pigment-stack/)
33
33
  */
34
34
  const PigmentStack = /*#__PURE__*/React.forwardRef(function PigmentStack({
35
35
  className,
@@ -26,13 +26,13 @@ const PopperRoot = (0, _zeroStyled.styled)(_BasePopper.default, {
26
26
  *
27
27
  * Demos:
28
28
  *
29
- * - [Autocomplete](https://mui.com/material-ui/react-autocomplete/)
30
- * - [Menu](https://mui.com/material-ui/react-menu/)
31
- * - [Popper](https://mui.com/material-ui/react-popper/)
29
+ * - [Autocomplete](https://v6.mui.com/material-ui/react-autocomplete/)
30
+ * - [Menu](https://v6.mui.com/material-ui/react-menu/)
31
+ * - [Popper](https://v6.mui.com/material-ui/react-popper/)
32
32
  *
33
33
  * API:
34
34
  *
35
- * - [Popper API](https://mui.com/material-ui/api/popper/)
35
+ * - [Popper API](https://v6.mui.com/material-ui/api/popper/)
36
36
  */
37
37
  const Popper = /*#__PURE__*/React.forwardRef(function Popper(inProps, ref) {
38
38
  const isRtl = (0, _RtlProvider.useRtl)();
@@ -21,11 +21,11 @@ function getContainer(container) {
21
21
  *
22
22
  * Demos:
23
23
  *
24
- * - [Portal](https://mui.com/material-ui/react-portal/)
24
+ * - [Portal](https://v6.mui.com/material-ui/react-portal/)
25
25
  *
26
26
  * API:
27
27
  *
28
- * - [Portal API](https://mui.com/material-ui/api/portal/)
28
+ * - [Portal API](https://v6.mui.com/material-ui/api/portal/)
29
29
  */
30
30
  const Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef) {
31
31
  const {
@@ -169,6 +169,16 @@ const StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref)
169
169
  ...slotProps
170
170
  }
171
171
  };
172
+ const [RootSlot, rootProps] = (0, _useSlot.default)('root', {
173
+ elementType: StepLabelRoot,
174
+ externalForwardedProps: {
175
+ ...externalForwardedProps,
176
+ ...other
177
+ },
178
+ ownerState,
179
+ ref,
180
+ className: (0, _clsx.default)(classes.root, className)
181
+ });
172
182
  const [LabelSlot, labelProps] = (0, _useSlot.default)('label', {
173
183
  elementType: StepLabelLabel,
174
184
  externalForwardedProps,
@@ -179,11 +189,8 @@ const StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref)
179
189
  externalForwardedProps,
180
190
  ownerState
181
191
  });
182
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(StepLabelRoot, {
183
- className: (0, _clsx.default)(classes.root, className),
184
- ref: ref,
185
- ownerState: ownerState,
186
- ...other,
192
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(RootSlot, {
193
+ ...rootProps,
187
194
  children: [icon || StepIconSlot ? /*#__PURE__*/(0, _jsxRuntime.jsx)(StepLabelIconContainer, {
188
195
  className: classes.iconContainer,
189
196
  ownerState: ownerState,
@@ -249,6 +256,7 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes /* remove-proptypes
249
256
  */
250
257
  slotProps: _propTypes.default.shape({
251
258
  label: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
259
+ root: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
252
260
  stepIcon: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
253
261
  }),
254
262
  /**
@@ -257,6 +265,7 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes /* remove-proptypes
257
265
  */
258
266
  slots: _propTypes.default.shape({
259
267
  label: _propTypes.default.elementType,
268
+ root: _propTypes.default.elementType,
260
269
  stepIcon: _propTypes.default.elementType
261
270
  }),
262
271
  /**
@@ -21,6 +21,7 @@ var _zeroStyled = require("../zero-styled");
21
21
  var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
22
22
  var _DefaultPropsProvider = require("../DefaultPropsProvider");
23
23
  var _switchClasses = _interopRequireWildcard(require("./switchClasses"));
24
+ var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
24
25
  var _jsxRuntime = require("react/jsx-runtime");
25
26
  const useUtilityClasses = ownerState => {
26
27
  const {
@@ -219,6 +220,8 @@ const Switch = /*#__PURE__*/React.forwardRef(function Switch(inProps, ref) {
219
220
  edge = false,
220
221
  size = 'medium',
221
222
  sx,
223
+ slots = {},
224
+ slotProps = {},
222
225
  ...other
223
226
  } = props;
224
227
  const ownerState = {
@@ -228,14 +231,36 @@ const Switch = /*#__PURE__*/React.forwardRef(function Switch(inProps, ref) {
228
231
  size
229
232
  };
230
233
  const classes = useUtilityClasses(ownerState);
231
- const icon = /*#__PURE__*/(0, _jsxRuntime.jsx)(SwitchThumb, {
234
+ const externalForwardedProps = {
235
+ slots,
236
+ slotProps
237
+ };
238
+ const [RootSlot, rootSlotProps] = (0, _useSlot.default)('root', {
239
+ className: (0, _clsx.default)(classes.root, className),
240
+ elementType: SwitchRoot,
241
+ externalForwardedProps,
242
+ ownerState,
243
+ additionalProps: {
244
+ sx
245
+ }
246
+ });
247
+ const [ThumbSlot, thumbSlotProps] = (0, _useSlot.default)('thumb', {
232
248
  className: classes.thumb,
233
- ownerState: ownerState
249
+ elementType: SwitchThumb,
250
+ externalForwardedProps,
251
+ ownerState
234
252
  });
235
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(SwitchRoot, {
236
- className: (0, _clsx.default)(classes.root, className),
237
- sx: sx,
238
- ownerState: ownerState,
253
+ const icon = /*#__PURE__*/(0, _jsxRuntime.jsx)(ThumbSlot, {
254
+ ...thumbSlotProps
255
+ });
256
+ const [TrackSlot, trackSlotProps] = (0, _useSlot.default)('track', {
257
+ className: classes.track,
258
+ elementType: SwitchTrack,
259
+ externalForwardedProps,
260
+ ownerState
261
+ });
262
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(RootSlot, {
263
+ ...rootSlotProps,
239
264
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SwitchSwitchBase, {
240
265
  type: "checkbox",
241
266
  icon: icon,
@@ -246,10 +271,25 @@ const Switch = /*#__PURE__*/React.forwardRef(function Switch(inProps, ref) {
246
271
  classes: {
247
272
  ...classes,
248
273
  root: classes.switchBase
274
+ },
275
+ slots: {
276
+ ...(slots.switchBase && {
277
+ root: slots.switchBase
278
+ }),
279
+ ...(slots.input && {
280
+ input: slots.input
281
+ })
282
+ },
283
+ slotProps: {
284
+ ...(slotProps.switchBase && {
285
+ root: typeof slotProps.switchBase === 'function' ? slotProps.switchBase(ownerState) : slotProps.switchBase
286
+ }),
287
+ ...(slotProps.input && {
288
+ input: typeof slotProps.input === 'function' ? slotProps.input(ownerState) : slotProps.input
289
+ })
249
290
  }
250
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(SwitchTrack, {
251
- className: classes.track,
252
- ownerState: ownerState
291
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(TrackSlot, {
292
+ ...trackSlotProps
253
293
  })]
254
294
  });
255
295
  });
@@ -339,6 +379,28 @@ process.env.NODE_ENV !== "production" ? Switch.propTypes /* remove-proptypes */
339
379
  * @default 'medium'
340
380
  */
341
381
  size: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['medium', 'small']), _propTypes.default.string]),
382
+ /**
383
+ * The props used for each slot inside.
384
+ * @default {}
385
+ */
386
+ slotProps: _propTypes.default.shape({
387
+ input: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
388
+ root: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
389
+ switchBase: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
390
+ thumb: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
391
+ track: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
392
+ }),
393
+ /**
394
+ * The components used for each slot inside.
395
+ * @default {}
396
+ */
397
+ slots: _propTypes.default.shape({
398
+ input: _propTypes.default.elementType,
399
+ root: _propTypes.default.elementType,
400
+ switchBase: _propTypes.default.elementType,
401
+ thumb: _propTypes.default.elementType,
402
+ track: _propTypes.default.elementType
403
+ }),
342
404
  /**
343
405
  * The system prop that allows defining system overrides as well as additional CSS styles.
344
406
  */
package/node/Tabs/Tabs.js CHANGED
@@ -700,6 +700,10 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
700
700
  });
701
701
  });
702
702
  const handleKeyDown = event => {
703
+ // Check if a modifier key (Alt, Shift, Ctrl, Meta) is pressed
704
+ if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {
705
+ return;
706
+ }
703
707
  const list = tabListRef.current;
704
708
  const currentFocus = (0, _ownerDocument.default)(list).activeElement;
705
709
  // Keyboard navigation assumes that [role="tab"] are siblings
@@ -167,6 +167,25 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
167
167
  }
168
168
  inputAdditionalProps['aria-describedby'] = undefined;
169
169
  }
170
+ const [RootSlot, rootProps] = (0, _useSlot.default)('root', {
171
+ elementType: TextFieldRoot,
172
+ shouldForwardComponentProp: true,
173
+ externalForwardedProps: {
174
+ ...externalForwardedProps,
175
+ ...other
176
+ },
177
+ ownerState,
178
+ className: (0, _clsx.default)(classes.root, className),
179
+ ref,
180
+ additionalProps: {
181
+ disabled,
182
+ error,
183
+ fullWidth,
184
+ required,
185
+ color,
186
+ variant
187
+ }
188
+ });
170
189
  const [InputSlot, inputProps] = (0, _useSlot.default)('input', {
171
190
  elementType: InputComponent,
172
191
  externalForwardedProps,
@@ -218,17 +237,8 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
218
237
  },
219
238
  ...inputProps
220
239
  });
221
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(TextFieldRoot, {
222
- className: (0, _clsx.default)(classes.root, className),
223
- disabled: disabled,
224
- error: error,
225
- fullWidth: fullWidth,
226
- ref: ref,
227
- required: required,
228
- color: color,
229
- variant: variant,
230
- ownerState: ownerState,
231
- ...other,
240
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(RootSlot, {
241
+ ...rootProps,
232
242
  children: [label != null && label !== '' && /*#__PURE__*/(0, _jsxRuntime.jsx)(InputLabelSlot, {
233
243
  htmlFor: id,
234
244
  id: inputLabelId,
@@ -430,6 +440,7 @@ process.env.NODE_ENV !== "production" ? TextField.propTypes /* remove-proptypes
430
440
  htmlInput: _propTypes.default.elementType,
431
441
  input: _propTypes.default.elementType,
432
442
  inputLabel: _propTypes.default.elementType,
443
+ root: _propTypes.default.elementType,
433
444
  select: _propTypes.default.elementType
434
445
  }),
435
446
  /**
@@ -44,11 +44,11 @@ function isEmpty(obj) {
44
44
  *
45
45
  * Demos:
46
46
  *
47
- * - [Textarea Autosize](https://mui.com/material-ui/react-textarea-autosize/)
47
+ * - [Textarea Autosize](https://v6.mui.com/material-ui/react-textarea-autosize/)
48
48
  *
49
49
  * API:
50
50
  *
51
- * - [TextareaAutosize API](https://mui.com/material-ui/api/textarea-autosize/)
51
+ * - [TextareaAutosize API](https://v6.mui.com/material-ui/api/textarea-autosize/)
52
52
  */
53
53
  const TextareaAutosize = /*#__PURE__*/React.forwardRef(function TextareaAutosize(props, forwardedRef) {
54
54
  const {
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.4.8
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
@@ -34,9 +34,7 @@ function createThemeNoVars(options = {}, ...args) {
34
34
  // The error should throw only for the root theme creation because user is not allowed to use a custom node `vars`.
35
35
  // `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.
36
36
  options.generateThemeVars === undefined) {
37
- throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `vars` is a private field used for CSS variables support.\n' +
38
- // #host-reference
39
- 'Please use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.' : (0, _formatMuiErrorMessage2.default)(20));
37
+ 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.' : (0, _formatMuiErrorMessage2.default)(20));
40
38
  }
41
39
  const palette = (0, _createPalette.default)(paletteInput);
42
40
  const systemTheme = (0, _createTheme.default)(options);
@@ -244,7 +244,7 @@ function useAutocomplete(props) {
244
244
  const setHighlightedIndex = (0, _utils.unstable_useEventCallback)(({
245
245
  event,
246
246
  index,
247
- reason = 'auto'
247
+ reason
248
248
  }) => {
249
249
  highlightedIndexRef.current = index;
250
250
 
@@ -254,7 +254,7 @@ function useAutocomplete(props) {
254
254
  } else {
255
255
  inputRef.current.setAttribute('aria-activedescendant', `${id}-option-${index}`);
256
256
  }
257
- if (onHighlightChange) {
257
+ if (onHighlightChange && ['mouse', 'keyboard', 'touch'].includes(reason)) {
258
258
  onHighlightChange(event, index === -1 ? null : filteredOptions[index], reason);
259
259
  }
260
260
  if (!listboxRef.current) {
@@ -307,7 +307,7 @@ function useAutocomplete(props) {
307
307
  event,
308
308
  diff,
309
309
  direction = 'next',
310
- reason = 'auto'
310
+ reason
311
311
  }) => {
312
312
  if (!popupOpen) {
313
313
  return;
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.version = exports.prerelease = exports.patch = exports.minor = exports.major = exports.default = void 0;
7
- const version = exports.version = "6.4.8";
7
+ const version = exports.version = "6.4.9";
8
8
  const major = exports.major = Number("6");
9
9
  const minor = exports.minor = Number("4");
10
- const patch = exports.patch = Number("8");
10
+ const patch = exports.patch = Number("9");
11
11
  const prerelease = exports.prerelease = undefined;
12
12
  var _default = exports.default = version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/material",
3
- "version": "6.4.8",
3
+ "version": "6.4.9",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "Material UI is an open-source React component library that implements Google's Material Design. It's comprehensive and can be used in production out of the box.",
@@ -35,10 +35,10 @@
35
35
  "prop-types": "^15.8.1",
36
36
  "react-is": "^19.0.0",
37
37
  "react-transition-group": "^4.4.5",
38
- "@mui/utils": "^6.4.8",
39
38
  "@mui/types": "~7.2.24",
40
- "@mui/system": "^6.4.8",
41
- "@mui/core-downloads-tracker": "^6.4.8"
39
+ "@mui/system": "^6.4.9",
40
+ "@mui/utils": "^6.4.8",
41
+ "@mui/core-downloads-tracker": "^6.4.9"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@emotion/react": "^11.5.0",
@@ -46,7 +46,7 @@
46
46
  "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
47
47
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0",
48
48
  "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
49
- "@mui/material-pigment-css": "^6.4.8"
49
+ "@mui/material-pigment-css": "^6.4.9"
50
50
  },
51
51
  "peerDependenciesMeta": {
52
52
  "@types/react": {
@@ -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);
@@ -246,7 +246,7 @@ export interface UseAutocompleteProps<
246
246
  *
247
247
  * @param {React.SyntheticEvent} event The event source of the callback.
248
248
  * @param {Value} option The highlighted option.
249
- * @param {string} reason Can be: `"keyboard"`, `"auto"`, `"mouse"`, `"touch"`.
249
+ * @param {string} reason Can be: `"keyboard"`, `"mouse"`, `"touch"`.
250
250
  */
251
251
  onHighlightChange?: (
252
252
  event: React.SyntheticEvent,
@@ -312,7 +312,7 @@ export interface UseAutocompleteParameters<
312
312
  FreeSolo extends boolean | undefined,
313
313
  > extends UseAutocompleteProps<Value, Multiple, DisableClearable, FreeSolo> {}
314
314
 
315
- export type AutocompleteHighlightChangeReason = 'keyboard' | 'mouse' | 'auto' | 'touch';
315
+ export type AutocompleteHighlightChangeReason = 'keyboard' | 'mouse' | 'touch';
316
316
 
317
317
  export type AutocompleteChangeReason =
318
318
  | 'createOption'