@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
package/Tabs/Tabs.d.ts CHANGED
@@ -285,11 +285,11 @@ export interface TabsTypeMap<
285
285
  *
286
286
  * Demos:
287
287
  *
288
- * - [Tabs](https://mui.com/material-ui/react-tabs/)
288
+ * - [Tabs](https://v6.mui.com/material-ui/react-tabs/)
289
289
  *
290
290
  * API:
291
291
  *
292
- * - [Tabs API](https://mui.com/material-ui/api/tabs/)
292
+ * - [Tabs API](https://v6.mui.com/material-ui/api/tabs/)
293
293
  */
294
294
  declare const Tabs: OverridableComponent<TabsTypeMap>;
295
295
 
package/Tabs/Tabs.js CHANGED
@@ -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
@@ -18,6 +18,11 @@ export interface TextFieldPropsColorOverrides {}
18
18
  export interface TextFieldPropsSizeOverrides {}
19
19
 
20
20
  export interface TextFieldSlots {
21
+ /**
22
+ * The component that renders the root.
23
+ * @default FormControl
24
+ */
25
+ root: React.ElementType;
21
26
  /**
22
27
  * The component that renders the input.
23
28
  * @default OutlinedInput
@@ -48,10 +53,35 @@ export interface TextFieldSlots {
48
53
  export type TextFieldSlotsAndSlotProps<InputPropsType> = CreateSlotsAndSlotProps<
49
54
  TextFieldSlots,
50
55
  {
56
+ /**
57
+ * Props forwarded to the root slot.
58
+ * By default, the avaible props are based on the [FormControl](https://mui.com/material-ui/api/form-control/#props) component.
59
+ */
60
+ root: SlotProps<React.ElementType<FormControlProps>, {}, TextFieldOwnerState>;
61
+ /**
62
+ * Props forwarded to the input slot.
63
+ * By default, the avaible props are based on the [Input](https://mui.com/material-ui/api/input/#props) component.
64
+ */
51
65
  input: SlotProps<React.ElementType<InputPropsType>, {}, TextFieldOwnerState>;
66
+ /**
67
+ * Props forwarded to the input label slot.
68
+ * By default, the avaible props are based on the [InputLabel](https://mui.com/material-ui/api/input-label/#props) component.
69
+ */
52
70
  inputLabel: SlotProps<React.ElementType<InputLabelProps>, {}, TextFieldOwnerState>;
71
+ /**
72
+ * Props forwarded to the html input slot.
73
+ * By default, the avaible props are based on the html input element.
74
+ */
53
75
  htmlInput: SlotProps<React.ElementType<InputBaseProps['inputProps']>, {}, TextFieldOwnerState>;
76
+ /**
77
+ * Props forwarded to the form helper text slot.
78
+ * By default, the avaible props are based on the [FormHelperText](https://mui.com/material-ui/api/form-helper-text/#props) component.
79
+ */
54
80
  formHelperText: SlotProps<React.ElementType<FormHelperTextProps>, {}, TextFieldOwnerState>;
81
+ /**
82
+ * Props forwarded to the select slot.
83
+ * By default, the avaible props are based on the [Select](https://mui.com/material-ui/api/select/#props) component.
84
+ */
55
85
  select: SlotProps<React.ElementType<SelectProps>, {}, TextFieldOwnerState>;
56
86
  }
57
87
  >;
@@ -300,12 +330,12 @@ export type TextFieldOwnerState = BaseTextFieldProps;
300
330
  * It's important to understand that the text field is a simple abstraction
301
331
  * on top of the following components:
302
332
  *
303
- * * [FormControl](https://mui.com/material-ui/api/form-control/)
304
- * * [InputLabel](https://mui.com/material-ui/api/input-label/)
305
- * * [FilledInput](https://mui.com/material-ui/api/filled-input/)
306
- * * [OutlinedInput](https://mui.com/material-ui/api/outlined-input/)
307
- * * [Input](https://mui.com/material-ui/api/input/)
308
- * * [FormHelperText](https://mui.com/material-ui/api/form-helper-text/)
333
+ * * [FormControl](https://v6.mui.com/material-ui/api/form-control/)
334
+ * * [InputLabel](https://v6.mui.com/material-ui/api/input-label/)
335
+ * * [FilledInput](https://v6.mui.com/material-ui/api/filled-input/)
336
+ * * [OutlinedInput](https://v6.mui.com/material-ui/api/outlined-input/)
337
+ * * [Input](https://v6.mui.com/material-ui/api/input/)
338
+ * * [FormHelperText](https://v6.mui.com/material-ui/api/form-helper-text/)
309
339
  *
310
340
  * If you wish to alter the props applied to the `input` element, you can do so as follows:
311
341
  *
@@ -325,13 +355,13 @@ export type TextFieldOwnerState = BaseTextFieldProps;
325
355
  *
326
356
  * Demos:
327
357
  *
328
- * - [Autocomplete](https://mui.com/material-ui/react-autocomplete/)
329
- * - [Text Field](https://mui.com/material-ui/react-text-field/)
358
+ * - [Autocomplete](https://v6.mui.com/material-ui/react-autocomplete/)
359
+ * - [Text Field](https://v6.mui.com/material-ui/react-text-field/)
330
360
  *
331
361
  * API:
332
362
  *
333
- * - [TextField API](https://mui.com/material-ui/api/text-field/)
334
- * - inherits [FormControl API](https://mui.com/material-ui/api/form-control/)
363
+ * - [TextField API](https://v6.mui.com/material-ui/api/text-field/)
364
+ * - inherits [FormControl API](https://v6.mui.com/material-ui/api/form-control/)
335
365
  */
336
366
  export default function TextField<Variant extends TextFieldVariants>(
337
367
  props: {
@@ -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
  /**
@@ -4,11 +4,11 @@ import { TextareaAutosizeProps } from './TextareaAutosize.types';
4
4
  *
5
5
  * Demos:
6
6
  *
7
- * - [Textarea Autosize](https://mui.com/material-ui/react-textarea-autosize/)
7
+ * - [Textarea Autosize](https://v6.mui.com/material-ui/react-textarea-autosize/)
8
8
  *
9
9
  * API:
10
10
  *
11
- * - [TextareaAutosize API](https://mui.com/material-ui/api/textarea-autosize/)
11
+ * - [TextareaAutosize API](https://v6.mui.com/material-ui/api/textarea-autosize/)
12
12
  */
13
13
  declare const TextareaAutosize: React.ForwardRefExoticComponent<TextareaAutosizeProps & React.RefAttributes<Element>>;
14
14
  export default TextareaAutosize;
@@ -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 {
@@ -91,12 +91,12 @@ export type ToggleButtonTypeMap<
91
91
  *
92
92
  * Demos:
93
93
  *
94
- * - [Toggle Button](https://mui.com/material-ui/react-toggle-button/)
94
+ * - [Toggle Button](https://v6.mui.com/material-ui/react-toggle-button/)
95
95
  *
96
96
  * API:
97
97
  *
98
- * - [ToggleButton API](https://mui.com/material-ui/api/toggle-button/)
99
- * - inherits [ButtonBase API](https://mui.com/material-ui/api/button-base/)
98
+ * - [ToggleButton API](https://v6.mui.com/material-ui/api/toggle-button/)
99
+ * - inherits [ButtonBase API](https://v6.mui.com/material-ui/api/button-base/)
100
100
  */
101
101
  declare const ToggleButton: ExtendButtonBase<ToggleButtonTypeMap>;
102
102
 
@@ -80,10 +80,10 @@ export interface ToggleButtonGroupProps
80
80
  *
81
81
  * Demos:
82
82
  *
83
- * - [Toggle Button](https://mui.com/material-ui/react-toggle-button/)
83
+ * - [Toggle Button](https://v6.mui.com/material-ui/react-toggle-button/)
84
84
  *
85
85
  * API:
86
86
  *
87
- * - [ToggleButtonGroup API](https://mui.com/material-ui/api/toggle-button-group/)
87
+ * - [ToggleButtonGroup API](https://v6.mui.com/material-ui/api/toggle-button-group/)
88
88
  */
89
89
  export default function ToggleButtonGroup(props: ToggleButtonGroupProps): React.JSX.Element;
@@ -44,11 +44,11 @@ export interface ToolbarTypeMap<
44
44
  *
45
45
  * Demos:
46
46
  *
47
- * - [App Bar](https://mui.com/material-ui/react-app-bar/)
47
+ * - [App Bar](https://v6.mui.com/material-ui/react-app-bar/)
48
48
  *
49
49
  * API:
50
50
  *
51
- * - [Toolbar API](https://mui.com/material-ui/api/toolbar/)
51
+ * - [Toolbar API](https://v6.mui.com/material-ui/api/toolbar/)
52
52
  */
53
53
  declare const Toolbar: OverridableComponent<ToolbarTypeMap>;
54
54
 
@@ -246,10 +246,10 @@ export interface TooltipOwnerState extends TooltipProps {}
246
246
  *
247
247
  * Demos:
248
248
  *
249
- * - [Tooltip](https://mui.com/material-ui/react-tooltip/)
249
+ * - [Tooltip](https://v6.mui.com/material-ui/react-tooltip/)
250
250
  *
251
251
  * API:
252
252
  *
253
- * - [Tooltip API](https://mui.com/material-ui/api/tooltip/)
253
+ * - [Tooltip API](https://v6.mui.com/material-ui/api/tooltip/)
254
254
  */
255
255
  export default function Tooltip(props: TooltipProps): React.JSX.Element;
@@ -105,12 +105,12 @@ export interface TypographyTypeMap<
105
105
  *
106
106
  * Demos:
107
107
  *
108
- * - [Breadcrumbs](https://mui.com/material-ui/react-breadcrumbs/)
109
- * - [Typography](https://mui.com/material-ui/react-typography/)
108
+ * - [Breadcrumbs](https://v6.mui.com/material-ui/react-breadcrumbs/)
109
+ * - [Typography](https://v6.mui.com/material-ui/react-typography/)
110
110
  *
111
111
  * API:
112
112
  *
113
- * - [Typography API](https://mui.com/material-ui/api/typography/)
113
+ * - [Typography API](https://v6.mui.com/material-ui/api/typography/)
114
114
  */
115
115
  declare const Typography: OverridableComponent<TypographyTypeMap>;
116
116
 
package/Zoom/Zoom.d.ts CHANGED
@@ -35,16 +35,16 @@ export interface ZoomProps extends TransitionProps {
35
35
 
36
36
  /**
37
37
  * The Zoom transition can be used for the floating variant of the
38
- * [Button](https://mui.com/material-ui/react-button/#floating-action-buttons) component.
38
+ * [Button](https://v6.mui.com/material-ui/react-button/#floating-action-buttons) component.
39
39
  * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
40
40
  *
41
41
  * Demos:
42
42
  *
43
- * - [Transitions](https://mui.com/material-ui/transitions/)
43
+ * - [Transitions](https://v6.mui.com/material-ui/transitions/)
44
44
  *
45
45
  * API:
46
46
  *
47
- * - [Zoom API](https://mui.com/material-ui/api/zoom/)
47
+ * - [Zoom API](https://v6.mui.com/material-ui/api/zoom/)
48
48
  * - inherits [Transition API](https://reactcommunity.org/react-transition-group/transition/#Transition-props)
49
49
  */
50
50
  export default function Zoom(props: ZoomProps): React.JSX.Element;
package/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
@@ -1037,7 +1037,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
1037
1037
  *
1038
1038
  * @param {React.SyntheticEvent} event The event source of the callback.
1039
1039
  * @param {Value} option The highlighted option.
1040
- * @param {string} reason Can be: `"keyboard"`, `"auto"`, `"mouse"`, `"touch"`.
1040
+ * @param {string} reason Can be: `"keyboard"`, `"mouse"`, `"touch"`.
1041
1041
  */
1042
1042
  onHighlightChange: PropTypes.func,
1043
1043
  /**
@@ -18,12 +18,12 @@ function clickedRootScrollbar(event, doc) {
18
18
  *
19
19
  * Demos:
20
20
  *
21
- * - [Click-Away Listener](https://mui.com/material-ui/react-click-away-listener/)
22
- * - [Menu](https://mui.com/material-ui/react-menu/)
21
+ * - [Click-Away Listener](https://v6.mui.com/material-ui/react-click-away-listener/)
22
+ * - [Menu](https://v6.mui.com/material-ui/react-menu/)
23
23
  *
24
24
  * API:
25
25
  *
26
- * - [ClickAwayListener API](https://mui.com/material-ui/api/click-away-listener/)
26
+ * - [ClickAwayListener API](https://v6.mui.com/material-ui/api/click-away-listener/)
27
27
  */
28
28
  function ClickAwayListener(props) {
29
29
  const {
@@ -10,11 +10,11 @@ import useTheme from "../styles/useTheme.js";
10
10
  *
11
11
  * Demos:
12
12
  *
13
- * - [Grid version 2](https://mui.com/material-ui/react-grid2/)
13
+ * - [Grid version 2](https://v6.mui.com/material-ui/react-grid2/)
14
14
  *
15
15
  * API:
16
16
  *
17
- * - [Grid2 API](https://mui.com/material-ui/api/grid-2/)
17
+ * - [Grid2 API](https://v6.mui.com/material-ui/api/grid-2/)
18
18
  */
19
19
  const Grid2 = createGrid2({
20
20
  createStyledComponent: styled('div', {
@@ -15,11 +15,11 @@ import { exactProp, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui
15
15
  *
16
16
  * Demos:
17
17
  *
18
- * - [No SSR](https://mui.com/material-ui/react-no-ssr/)
18
+ * - [No SSR](https://v6.mui.com/material-ui/react-no-ssr/)
19
19
  *
20
20
  * API:
21
21
  *
22
- * - [NoSsr API](https://mui.com/material-ui/api/no-ssr/)
22
+ * - [NoSsr API](https://v6.mui.com/material-ui/api/no-ssr/)
23
23
  */
24
24
  function NoSsr(props) {
25
25
  const {
@@ -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 {
@@ -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