@mui/material 6.4.8 → 6.4.10

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 (197) 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 +54 -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 +5 -6
  97. package/Popover/Popover.js +1 -1
  98. package/Popper/Popper.d.ts +4 -4
  99. package/Popper/Popper.js +4 -4
  100. package/Portal/Portal.d.ts +2 -2
  101. package/Portal/Portal.js +2 -2
  102. package/README.md +4 -2
  103. package/Radio/Radio.d.ts +3 -3
  104. package/RadioGroup/RadioGroup.d.ts +3 -3
  105. package/Rating/Rating.d.ts +2 -2
  106. package/ScopedCssBaseline/ScopedCssBaseline.d.ts +2 -2
  107. package/Select/Select.d.ts +3 -3
  108. package/Skeleton/Skeleton.d.ts +2 -2
  109. package/Slide/Slide.d.ts +4 -4
  110. package/Slider/Slider.d.ts +2 -2
  111. package/Snackbar/Snackbar.d.ts +2 -2
  112. package/SnackbarContent/SnackbarContent.d.ts +3 -3
  113. package/SpeedDial/SpeedDial.d.ts +2 -2
  114. package/SpeedDialAction/SpeedDialAction.d.ts +3 -3
  115. package/SpeedDialIcon/SpeedDialIcon.d.ts +2 -2
  116. package/Stack/Stack.d.ts +2 -2
  117. package/Step/Step.d.ts +2 -2
  118. package/StepButton/StepButton.d.ts +3 -3
  119. package/StepConnector/StepConnector.d.ts +2 -2
  120. package/StepContent/StepContent.d.ts +2 -2
  121. package/StepIcon/StepIcon.d.ts +3 -3
  122. package/StepLabel/StepLabel.d.ts +21 -3
  123. package/StepLabel/StepLabel.js +14 -5
  124. package/Stepper/Stepper.d.ts +2 -2
  125. package/SvgIcon/SvgIcon.d.ts +3 -3
  126. package/SwipeableDrawer/SwipeableDrawer.d.ts +3 -3
  127. package/Switch/Switch.d.ts +78 -5
  128. package/Switch/Switch.js +71 -9
  129. package/Tab/Tab.d.ts +3 -3
  130. package/TabScrollButton/TabScrollButton.d.ts +2 -2
  131. package/Table/Table.d.ts +2 -2
  132. package/TableBody/TableBody.d.ts +2 -2
  133. package/TableCell/TableCell.d.ts +2 -2
  134. package/TableContainer/TableContainer.d.ts +2 -2
  135. package/TableFooter/TableFooter.d.ts +2 -2
  136. package/TableHead/TableHead.d.ts +2 -2
  137. package/TablePagination/TablePagination.d.ts +4 -4
  138. package/TableRow/TableRow.d.ts +2 -2
  139. package/TableSortLabel/TableSortLabel.d.ts +3 -3
  140. package/Tabs/Tabs.d.ts +2 -2
  141. package/Tabs/Tabs.js +4 -0
  142. package/TextField/TextField.d.ts +40 -10
  143. package/TextField/TextField.js +22 -11
  144. package/TextareaAutosize/TextareaAutosize.d.ts +2 -2
  145. package/TextareaAutosize/TextareaAutosize.js +2 -2
  146. package/ToggleButton/ToggleButton.d.ts +3 -3
  147. package/ToggleButtonGroup/ToggleButtonGroup.d.ts +2 -2
  148. package/Toolbar/Toolbar.d.ts +2 -2
  149. package/Tooltip/Tooltip.d.ts +2 -2
  150. package/Typography/Typography.d.ts +3 -3
  151. package/Zoom/Zoom.d.ts +3 -3
  152. package/index.js +1 -1
  153. package/modern/Autocomplete/Autocomplete.js +1 -1
  154. package/modern/ClickAwayListener/ClickAwayListener.js +3 -3
  155. package/modern/Grid2/Grid2.js +2 -2
  156. package/modern/NoSsr/NoSsr.js +2 -2
  157. package/modern/PigmentContainer/PigmentContainer.js +2 -2
  158. package/modern/PigmentGrid/PigmentGrid.js +2 -2
  159. package/modern/PigmentHidden/PigmentHidden.js +2 -2
  160. package/modern/PigmentStack/PigmentStack.js +2 -2
  161. package/modern/Popover/Popover.js +1 -1
  162. package/modern/Popper/Popper.js +4 -4
  163. package/modern/Portal/Portal.js +2 -2
  164. package/modern/StepLabel/StepLabel.js +14 -5
  165. package/modern/Switch/Switch.js +71 -9
  166. package/modern/Tabs/Tabs.js +4 -0
  167. package/modern/TextField/TextField.js +22 -11
  168. package/modern/TextareaAutosize/TextareaAutosize.js +2 -2
  169. package/modern/index.js +1 -1
  170. package/modern/styles/createThemeNoVars.js +1 -3
  171. package/modern/useAutocomplete/useAutocomplete.js +5 -5
  172. package/modern/version/index.js +2 -2
  173. package/node/Autocomplete/Autocomplete.js +1 -1
  174. package/node/ClickAwayListener/ClickAwayListener.js +3 -3
  175. package/node/Grid2/Grid2.js +2 -2
  176. package/node/NoSsr/NoSsr.js +2 -2
  177. package/node/PigmentContainer/PigmentContainer.js +2 -2
  178. package/node/PigmentGrid/PigmentGrid.js +2 -2
  179. package/node/PigmentHidden/PigmentHidden.js +2 -2
  180. package/node/PigmentStack/PigmentStack.js +2 -2
  181. package/node/Popover/Popover.js +1 -1
  182. package/node/Popper/Popper.js +4 -4
  183. package/node/Portal/Portal.js +2 -2
  184. package/node/StepLabel/StepLabel.js +14 -5
  185. package/node/Switch/Switch.js +71 -9
  186. package/node/Tabs/Tabs.js +4 -0
  187. package/node/TextField/TextField.js +22 -11
  188. package/node/TextareaAutosize/TextareaAutosize.js +2 -2
  189. package/node/index.js +1 -1
  190. package/node/styles/createThemeNoVars.js +1 -3
  191. package/node/useAutocomplete/useAutocomplete.js +5 -5
  192. package/node/version/index.js +2 -2
  193. package/package.json +6 -6
  194. package/styles/createThemeNoVars.js +1 -3
  195. package/useAutocomplete/useAutocomplete.d.ts +2 -2
  196. package/useAutocomplete/useAutocomplete.js +5 -5
  197. package/version/index.js +2 -2
@@ -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
  /**
@@ -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.10
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);
@@ -121,8 +121,8 @@ function useAutocomplete(props) {
121
121
  const highlightedIndexRef = React.useRef(defaultHighlighted);
122
122
 
123
123
  // Calculate the initial inputValue on mount only.
124
- // Using useRef since defaultValue doesn't need to update inputValue dynamically.
125
- const initialInputValue = React.useRef(getInputValue(defaultValue, multiple, getOptionLabel)).current;
124
+ // useRef ensures it doesn't update dynamically with defaultValue or value props.
125
+ const initialInputValue = React.useRef(getInputValue(defaultValue ?? valueProp, multiple, getOptionLabel)).current;
126
126
  const [value, setValueState] = useControlled({
127
127
  controlled: valueProp,
128
128
  default: defaultValue,
@@ -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.10";
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("10");
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,
@@ -285,7 +285,7 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
285
285
  const handleResize = (0, _debounce.default)(() => {
286
286
  setPositioningStyles();
287
287
  });
288
- const containerWindow = (0, _ownerWindow.default)(anchorEl);
288
+ const containerWindow = (0, _ownerWindow.default)(resolveAnchorEl(anchorEl));
289
289
  containerWindow.addEventListener('resize', handleResize);
290
290
  return () => {
291
291
  handleResize.clear();
@@ -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
  /**