@mui/material 6.4.4 → 7.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) 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/Avatar/Avatar.d.ts +2 -2
  10. package/AvatarGroup/AvatarGroup.d.ts +2 -2
  11. package/Backdrop/Backdrop.d.ts +3 -3
  12. package/Badge/Badge.d.ts +3 -3
  13. package/BottomNavigation/BottomNavigation.d.ts +2 -2
  14. package/BottomNavigationAction/BottomNavigationAction.d.ts +3 -3
  15. package/Box/Box.d.ts +2 -2
  16. package/Breadcrumbs/Breadcrumbs.d.ts +3 -3
  17. package/Button/Button.d.ts +4 -4
  18. package/ButtonBase/ButtonBase.d.ts +2 -2
  19. package/ButtonGroup/ButtonGroup.d.ts +2 -2
  20. package/CHANGELOG.md +24 -2272
  21. package/Card/Card.d.ts +3 -3
  22. package/CardActionArea/CardActionArea.d.ts +3 -3
  23. package/CardActions/CardActions.d.ts +2 -2
  24. package/CardContent/CardContent.d.ts +2 -2
  25. package/CardHeader/CardHeader.d.ts +2 -2
  26. package/CardMedia/CardMedia.d.ts +2 -2
  27. package/Checkbox/Checkbox.d.ts +4 -4
  28. package/Chip/Chip.d.ts +2 -2
  29. package/CircularProgress/CircularProgress.d.ts +3 -7
  30. package/ClickAwayListener/ClickAwayListener.d.ts +3 -3
  31. package/ClickAwayListener/ClickAwayListener.js +3 -3
  32. package/Collapse/Collapse.d.ts +5 -5
  33. package/Container/Container.d.ts +2 -2
  34. package/CssBaseline/CssBaseline.d.ts +2 -2
  35. package/Dialog/Dialog.d.ts +3 -3
  36. package/DialogActions/DialogActions.d.ts +2 -2
  37. package/DialogContent/DialogContent.d.ts +2 -2
  38. package/DialogContentText/DialogContentText.d.ts +3 -3
  39. package/DialogTitle/DialogTitle.d.ts +3 -3
  40. package/Divider/Divider.d.ts +3 -3
  41. package/Drawer/Drawer.d.ts +3 -3
  42. package/Fab/Fab.d.ts +3 -3
  43. package/Fade/Fade.d.ts +3 -3
  44. package/FilledInput/FilledInput.d.ts +3 -3
  45. package/FormControl/FormControl.d.ts +6 -6
  46. package/FormControlLabel/FormControlLabel.d.ts +4 -4
  47. package/FormGroup/FormGroup.d.ts +3 -3
  48. package/FormHelperText/FormHelperText.d.ts +2 -2
  49. package/FormLabel/FormLabel.d.ts +4 -4
  50. package/GlobalStyles/GlobalStyles.d.ts +2 -2
  51. package/Grid/Grid.d.ts +2 -2
  52. package/Grid2/Grid2.d.ts +2 -2
  53. package/Grid2/Grid2.js +2 -2
  54. package/Grow/Grow.d.ts +5 -5
  55. package/Hidden/Hidden.d.ts +2 -2
  56. package/Icon/Icon.d.ts +3 -3
  57. package/IconButton/IconButton.d.ts +4 -4
  58. package/ImageList/ImageList.d.ts +2 -2
  59. package/ImageListItem/ImageListItem.d.ts +2 -2
  60. package/ImageListItemBar/ImageListItemBar.d.ts +2 -2
  61. package/Input/Input.d.ts +3 -3
  62. package/InputAdornment/InputAdornment.d.ts +2 -2
  63. package/InputBase/InputBase.d.ts +2 -2
  64. package/InputLabel/InputLabel.d.ts +3 -3
  65. package/LinearProgress/LinearProgress.d.ts +3 -7
  66. package/Link/Link.d.ts +4 -4
  67. package/List/List.d.ts +3 -3
  68. package/ListItem/ListItem.d.ts +3 -3
  69. package/ListItemAvatar/ListItemAvatar.d.ts +2 -2
  70. package/ListItemButton/ListItemButton.d.ts +3 -3
  71. package/ListItemIcon/ListItemIcon.d.ts +2 -2
  72. package/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +2 -2
  73. package/ListItemText/ListItemText.d.ts +2 -2
  74. package/ListSubheader/ListSubheader.d.ts +2 -2
  75. package/Menu/Menu.d.ts +4 -4
  76. package/Menu/Menu.js +6 -2
  77. package/MenuItem/MenuItem.d.ts +3 -3
  78. package/MenuList/MenuList.d.ts +4 -4
  79. package/MobileStepper/MobileStepper.d.ts +4 -72
  80. package/MobileStepper/MobileStepper.js +18 -76
  81. package/Modal/Modal.d.ts +7 -7
  82. package/Modal/Modal.js +9 -10
  83. package/NativeSelect/NativeSelect.d.ts +3 -3
  84. package/NoSsr/NoSsr.d.ts +2 -2
  85. package/NoSsr/NoSsr.js +2 -2
  86. package/OutlinedInput/OutlinedInput.d.ts +3 -3
  87. package/Pagination/Pagination.d.ts +2 -2
  88. package/PaginationItem/PaginationItem.d.ts +2 -2
  89. package/Paper/Paper.d.ts +3 -3
  90. package/PigmentContainer/PigmentContainer.d.ts +2 -2
  91. package/PigmentContainer/PigmentContainer.js +2 -2
  92. package/PigmentGrid/PigmentGrid.d.ts +2 -2
  93. package/PigmentGrid/PigmentGrid.js +2 -2
  94. package/PigmentHidden/PigmentHidden.d.ts +2 -2
  95. package/PigmentHidden/PigmentHidden.js +2 -2
  96. package/PigmentStack/PigmentStack.d.ts +2 -2
  97. package/PigmentStack/PigmentStack.js +2 -2
  98. package/Popover/Popover.d.ts +64 -10
  99. package/Popover/Popover.js +78 -51
  100. package/Popper/Popper.d.ts +4 -4
  101. package/Popper/Popper.js +4 -4
  102. package/Portal/Portal.d.ts +2 -2
  103. package/Portal/Portal.js +2 -2
  104. package/README.md +4 -3
  105. package/Radio/Radio.d.ts +3 -3
  106. package/RadioGroup/RadioGroup.d.ts +3 -3
  107. package/Rating/Rating.d.ts +2 -2
  108. package/ScopedCssBaseline/ScopedCssBaseline.d.ts +2 -2
  109. package/Select/Select.d.ts +3 -3
  110. package/Skeleton/Skeleton.d.ts +2 -2
  111. package/Slide/Slide.d.ts +4 -4
  112. package/Slider/Slider.d.ts +20 -11
  113. package/Slider/Slider.js +2 -2
  114. package/Slider/sliderClasses.d.ts +7 -21
  115. package/Snackbar/Snackbar.d.ts +80 -3
  116. package/Snackbar/Snackbar.js +122 -32
  117. package/SnackbarContent/SnackbarContent.d.ts +3 -3
  118. package/SpeedDial/SpeedDial.d.ts +2 -2
  119. package/SpeedDialAction/SpeedDialAction.d.ts +3 -3
  120. package/SpeedDialIcon/SpeedDialIcon.d.ts +2 -2
  121. package/Stack/Stack.d.ts +2 -2
  122. package/Step/Step.d.ts +2 -2
  123. package/StepButton/StepButton.d.ts +3 -3
  124. package/StepConnector/StepConnector.d.ts +2 -2
  125. package/StepContent/StepContent.d.ts +2 -2
  126. package/StepIcon/StepIcon.d.ts +3 -3
  127. package/StepLabel/StepLabel.d.ts +2 -2
  128. package/Stepper/Stepper.d.ts +2 -2
  129. package/SvgIcon/SvgIcon.d.ts +3 -3
  130. package/SwipeableDrawer/SwipeableDrawer.d.ts +3 -3
  131. package/Switch/Switch.d.ts +4 -4
  132. package/Tab/Tab.d.ts +3 -3
  133. package/TabScrollButton/TabScrollButton.d.ts +2 -2
  134. package/Table/Table.d.ts +2 -2
  135. package/TableBody/TableBody.d.ts +2 -2
  136. package/TableCell/TableCell.d.ts +2 -2
  137. package/TableContainer/TableContainer.d.ts +2 -2
  138. package/TableFooter/TableFooter.d.ts +2 -2
  139. package/TableHead/TableHead.d.ts +2 -2
  140. package/TablePagination/TablePagination.d.ts +4 -4
  141. package/TableRow/TableRow.d.ts +2 -2
  142. package/TableSortLabel/TableSortLabel.d.ts +3 -3
  143. package/Tabs/Tabs.d.ts +2 -2
  144. package/TextField/TextField.d.ts +10 -10
  145. package/TextareaAutosize/TextareaAutosize.d.ts +2 -2
  146. package/TextareaAutosize/TextareaAutosize.js +2 -2
  147. package/ToggleButton/ToggleButton.d.ts +3 -3
  148. package/ToggleButtonGroup/ToggleButtonGroup.d.ts +2 -2
  149. package/Toolbar/Toolbar.d.ts +2 -2
  150. package/Tooltip/Tooltip.d.ts +2 -2
  151. package/Typography/Typography.d.ts +3 -3
  152. package/Zoom/Zoom.d.ts +3 -3
  153. package/index.js +1 -1
  154. package/internal/SwitchBase.d.ts +33 -1
  155. package/internal/SwitchBase.js +84 -30
  156. package/modern/ClickAwayListener/ClickAwayListener.js +3 -3
  157. package/modern/Grid2/Grid2.js +2 -2
  158. package/modern/Menu/Menu.js +6 -2
  159. package/modern/MobileStepper/MobileStepper.js +18 -76
  160. package/modern/Modal/Modal.js +9 -10
  161. package/modern/NoSsr/NoSsr.js +2 -2
  162. package/modern/PigmentContainer/PigmentContainer.js +2 -2
  163. package/modern/PigmentGrid/PigmentGrid.js +2 -2
  164. package/modern/PigmentHidden/PigmentHidden.js +2 -2
  165. package/modern/PigmentStack/PigmentStack.js +2 -2
  166. package/modern/Popover/Popover.js +78 -51
  167. package/modern/Popper/Popper.js +4 -4
  168. package/modern/Portal/Portal.js +2 -2
  169. package/modern/Slider/Slider.js +2 -2
  170. package/modern/Snackbar/Snackbar.js +122 -32
  171. package/modern/TextareaAutosize/TextareaAutosize.js +2 -2
  172. package/modern/index.js +1 -1
  173. package/modern/internal/SwitchBase.js +84 -30
  174. package/modern/version/index.js +5 -5
  175. package/node/ClickAwayListener/ClickAwayListener.js +3 -3
  176. package/node/Grid2/Grid2.js +2 -2
  177. package/node/Menu/Menu.js +6 -2
  178. package/node/MobileStepper/MobileStepper.js +18 -76
  179. package/node/Modal/Modal.js +9 -10
  180. package/node/NoSsr/NoSsr.js +2 -2
  181. package/node/PigmentContainer/PigmentContainer.js +2 -2
  182. package/node/PigmentGrid/PigmentGrid.js +2 -2
  183. package/node/PigmentHidden/PigmentHidden.js +2 -2
  184. package/node/PigmentStack/PigmentStack.js +2 -2
  185. package/node/Popover/Popover.js +78 -51
  186. package/node/Popper/Popper.js +4 -4
  187. package/node/Portal/Portal.js +2 -2
  188. package/node/Slider/Slider.js +2 -2
  189. package/node/Snackbar/Snackbar.js +122 -32
  190. package/node/TextareaAutosize/TextareaAutosize.js +2 -2
  191. package/node/index.js +1 -1
  192. package/node/internal/SwitchBase.js +84 -30
  193. package/node/version/index.js +5 -5
  194. package/package.json +7 -7
  195. package/version/index.js +5 -5
@@ -30,11 +30,11 @@ export interface TableBodyTypeMap<
30
30
  *
31
31
  * Demos:
32
32
  *
33
- * - [Table](https://mui.com/material-ui/react-table/)
33
+ * - [Table](https://next.mui.com/material-ui/react-table/)
34
34
  *
35
35
  * API:
36
36
  *
37
- * - [TableBody API](https://mui.com/material-ui/api/table-body/)
37
+ * - [TableBody API](https://next.mui.com/material-ui/api/table-body/)
38
38
  */
39
39
  declare const TableBody: OverridableComponent<TableBodyTypeMap>;
40
40
 
@@ -77,10 +77,10 @@ export type SortDirection = 'asc' | 'desc' | false;
77
77
  *
78
78
  * Demos:
79
79
  *
80
- * - [Table](https://mui.com/material-ui/react-table/)
80
+ * - [Table](https://next.mui.com/material-ui/react-table/)
81
81
  *
82
82
  * API:
83
83
  *
84
- * - [TableCell API](https://mui.com/material-ui/api/table-cell/)
84
+ * - [TableCell API](https://next.mui.com/material-ui/api/table-cell/)
85
85
  */
86
86
  export default function TableCell(props: TableCellProps): React.JSX.Element;
@@ -30,11 +30,11 @@ export interface TableContainerTypeMap<
30
30
  *
31
31
  * Demos:
32
32
  *
33
- * - [Table](https://mui.com/material-ui/react-table/)
33
+ * - [Table](https://next.mui.com/material-ui/react-table/)
34
34
  *
35
35
  * API:
36
36
  *
37
- * - [TableContainer API](https://mui.com/material-ui/api/table-container/)
37
+ * - [TableContainer API](https://next.mui.com/material-ui/api/table-container/)
38
38
  */
39
39
  declare const TableContainer: OverridableComponent<TableContainerTypeMap>;
40
40
 
@@ -30,11 +30,11 @@ export interface TableFooterTypeMap<
30
30
  *
31
31
  * Demos:
32
32
  *
33
- * - [Table](https://mui.com/material-ui/react-table/)
33
+ * - [Table](https://next.mui.com/material-ui/react-table/)
34
34
  *
35
35
  * API:
36
36
  *
37
- * - [TableFooter API](https://mui.com/material-ui/api/table-footer/)
37
+ * - [TableFooter API](https://next.mui.com/material-ui/api/table-footer/)
38
38
  */
39
39
  declare const TableFooter: OverridableComponent<TableFooterTypeMap>;
40
40
 
@@ -30,11 +30,11 @@ export interface TableHeadTypeMap<
30
30
  *
31
31
  * Demos:
32
32
  *
33
- * - [Table](https://mui.com/material-ui/react-table/)
33
+ * - [Table](https://next.mui.com/material-ui/react-table/)
34
34
  *
35
35
  * API:
36
36
  *
37
- * - [TableHead API](https://mui.com/material-ui/api/table-head/)
37
+ * - [TableHead API](https://next.mui.com/material-ui/api/table-head/)
38
38
  */
39
39
  declare const TableHead: OverridableComponent<TableHeadTypeMap>;
40
40
 
@@ -282,13 +282,13 @@ export interface TablePaginationTypeMap<AdditionalProps, RootComponent extends R
282
282
  *
283
283
  * Demos:
284
284
  *
285
- * - [Pagination](https://mui.com/material-ui/react-pagination/)
286
- * - [Table](https://mui.com/material-ui/react-table/)
285
+ * - [Pagination](https://next.mui.com/material-ui/react-pagination/)
286
+ * - [Table](https://next.mui.com/material-ui/react-table/)
287
287
  *
288
288
  * API:
289
289
  *
290
- * - [TablePagination API](https://mui.com/material-ui/api/table-pagination/)
291
- * - inherits [TableCell API](https://mui.com/material-ui/api/table-cell/)
290
+ * - [TablePagination API](https://next.mui.com/material-ui/api/table-pagination/)
291
+ * - inherits [TableCell API](https://next.mui.com/material-ui/api/table-cell/)
292
292
  */
293
293
  declare const TablePagination: OverridableComponent<
294
294
  TablePaginationTypeMap<{}, React.JSXElementConstructor<TablePaginationBaseProps>>
@@ -42,11 +42,11 @@ export interface TableRowTypeMap<
42
42
  *
43
43
  * Demos:
44
44
  *
45
- * - [Table](https://mui.com/material-ui/react-table/)
45
+ * - [Table](https://next.mui.com/material-ui/react-table/)
46
46
  *
47
47
  * API:
48
48
  *
49
- * - [TableRow API](https://mui.com/material-ui/api/table-row/)
49
+ * - [TableRow API](https://next.mui.com/material-ui/api/table-row/)
50
50
  */
51
51
  declare const TableRow: OverridableComponent<TableRowTypeMap>;
52
52
 
@@ -97,12 +97,12 @@ export type TableSortLabelTypeMap<
97
97
  *
98
98
  * Demos:
99
99
  *
100
- * - [Table](https://mui.com/material-ui/react-table/)
100
+ * - [Table](https://next.mui.com/material-ui/react-table/)
101
101
  *
102
102
  * API:
103
103
  *
104
- * - [TableSortLabel API](https://mui.com/material-ui/api/table-sort-label/)
105
- * - inherits [ButtonBase API](https://mui.com/material-ui/api/button-base/)
104
+ * - [TableSortLabel API](https://next.mui.com/material-ui/api/table-sort-label/)
105
+ * - inherits [ButtonBase API](https://next.mui.com/material-ui/api/button-base/)
106
106
  */
107
107
  declare const TableSortLabel: ExtendButtonBase<TableSortLabelTypeMap>;
108
108
 
package/Tabs/Tabs.d.ts CHANGED
@@ -185,11 +185,11 @@ export interface TabsTypeMap<
185
185
  *
186
186
  * Demos:
187
187
  *
188
- * - [Tabs](https://mui.com/material-ui/react-tabs/)
188
+ * - [Tabs](https://next.mui.com/material-ui/react-tabs/)
189
189
  *
190
190
  * API:
191
191
  *
192
- * - [Tabs API](https://mui.com/material-ui/api/tabs/)
192
+ * - [Tabs API](https://next.mui.com/material-ui/api/tabs/)
193
193
  */
194
194
  declare const Tabs: OverridableComponent<TabsTypeMap>;
195
195
 
@@ -300,12 +300,12 @@ export type TextFieldOwnerState = BaseTextFieldProps;
300
300
  * It's important to understand that the text field is a simple abstraction
301
301
  * on top of the following components:
302
302
  *
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/)
303
+ * * [FormControl](https://next.mui.com/material-ui/api/form-control/)
304
+ * * [InputLabel](https://next.mui.com/material-ui/api/input-label/)
305
+ * * [FilledInput](https://next.mui.com/material-ui/api/filled-input/)
306
+ * * [OutlinedInput](https://next.mui.com/material-ui/api/outlined-input/)
307
+ * * [Input](https://next.mui.com/material-ui/api/input/)
308
+ * * [FormHelperText](https://next.mui.com/material-ui/api/form-helper-text/)
309
309
  *
310
310
  * If you wish to alter the props applied to the `input` element, you can do so as follows:
311
311
  *
@@ -325,13 +325,13 @@ export type TextFieldOwnerState = BaseTextFieldProps;
325
325
  *
326
326
  * Demos:
327
327
  *
328
- * - [Autocomplete](https://mui.com/material-ui/react-autocomplete/)
329
- * - [Text Field](https://mui.com/material-ui/react-text-field/)
328
+ * - [Autocomplete](https://next.mui.com/material-ui/react-autocomplete/)
329
+ * - [Text Field](https://next.mui.com/material-ui/react-text-field/)
330
330
  *
331
331
  * API:
332
332
  *
333
- * - [TextField API](https://mui.com/material-ui/api/text-field/)
334
- * - inherits [FormControl API](https://mui.com/material-ui/api/form-control/)
333
+ * - [TextField API](https://next.mui.com/material-ui/api/text-field/)
334
+ * - inherits [FormControl API](https://next.mui.com/material-ui/api/form-control/)
335
335
  */
336
336
  export default function TextField<Variant extends TextFieldVariants>(
337
337
  props: {
@@ -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://next.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://next.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://next.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://next.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://next.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://next.mui.com/material-ui/api/toggle-button/)
99
+ * - inherits [ButtonBase API](https://next.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://next.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://next.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://next.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://next.mui.com/material-ui/api/toolbar/)
52
52
  */
53
53
  declare const Toolbar: OverridableComponent<ToolbarTypeMap>;
54
54
 
@@ -250,10 +250,10 @@ export interface TooltipOwnerState extends TooltipProps {}
250
250
  *
251
251
  * Demos:
252
252
  *
253
- * - [Tooltip](https://mui.com/material-ui/react-tooltip/)
253
+ * - [Tooltip](https://next.mui.com/material-ui/react-tooltip/)
254
254
  *
255
255
  * API:
256
256
  *
257
- * - [Tooltip API](https://mui.com/material-ui/api/tooltip/)
257
+ * - [Tooltip API](https://next.mui.com/material-ui/api/tooltip/)
258
258
  */
259
259
  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://next.mui.com/material-ui/react-breadcrumbs/)
109
+ * - [Typography](https://next.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://next.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://next.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://next.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://next.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.4
2
+ * @mui/material v7.0.0-alpha.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -2,9 +2,39 @@ import * as React from 'react';
2
2
  import { InternalStandardProps as StandardProps } from '..';
3
3
  import { ButtonBaseProps } from '../ButtonBase';
4
4
  import { SwitchBaseClasses } from './switchBaseClasses';
5
+ import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
6
+
7
+ interface SwitchBaseSlots {
8
+ /**
9
+ * The component that renders the root slot.
10
+ * @default ButtonBase
11
+ */
12
+ root: React.ElementType;
13
+ /**
14
+ * The component that renders the input slot.
15
+ * @default 'input'
16
+ */
17
+ input: React.ElementType;
18
+ }
19
+
20
+ type SwitchBaseSlotsAndSlotProps = CreateSlotsAndSlotProps<
21
+ SwitchBaseSlots,
22
+ {
23
+ /**
24
+ * Props forwarded to the root slot.
25
+ * By default, the avaible props are based on the [ButtonBase](https://mui.com/material-ui/api/button-base/#props) component.
26
+ */
27
+ root: SlotProps<React.ElementType<ButtonBaseProps>, {}, SwitchBaseOwnerState>;
28
+ /**
29
+ * Props forwarded to the input slot.
30
+ */
31
+ input: SlotProps<'input', {}, SwitchBaseOwnerState>;
32
+ }
33
+ >;
5
34
 
6
35
  export interface SwitchBaseProps
7
- extends StandardProps<ButtonBaseProps, 'children' | 'onChange' | 'type' | 'value'> {
36
+ extends StandardProps<ButtonBaseProps, 'children' | 'onChange' | 'type' | 'value'>,
37
+ SwitchBaseSlotsAndSlotProps {
8
38
  autoFocus?: boolean;
9
39
  /**
10
40
  * If `true`, the component is checked.
@@ -80,6 +110,8 @@ export interface SwitchBaseProps
80
110
  value?: unknown;
81
111
  }
82
112
 
113
+ export interface SwitchBaseOwnerState extends Omit<SwitchBaseProps, 'slots' | 'slotProps'> {}
114
+
83
115
  declare const SwitchBase: React.JSXElementConstructor<SwitchBaseProps>;
84
116
 
85
117
  export default SwitchBase;
@@ -2,7 +2,6 @@
2
2
 
3
3
  import * as React from 'react';
4
4
  import PropTypes from 'prop-types';
5
- import clsx from 'clsx';
6
5
  import refType from '@mui/utils/refType';
7
6
  import composeClasses from '@mui/utils/composeClasses';
8
7
  import capitalize from "../utils/capitalize.js";
@@ -12,6 +11,7 @@ import useControlled from "../utils/useControlled.js";
12
11
  import useFormControl from "../FormControl/useFormControl.js";
13
12
  import ButtonBase from "../ButtonBase/index.js";
14
13
  import { getSwitchBaseUtilityClass } from "./switchBaseClasses.js";
14
+ import useSlot from "../utils/useSlot.js";
15
15
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
16
  const useUtilityClasses = ownerState => {
17
17
  const {
@@ -86,7 +86,6 @@ const SwitchBase = /*#__PURE__*/React.forwardRef(function SwitchBase(props, ref)
86
86
  autoFocus,
87
87
  checked: checkedProp,
88
88
  checkedIcon,
89
- className,
90
89
  defaultChecked,
91
90
  disabled: disabledProp,
92
91
  disableFocusRipple = false,
@@ -104,6 +103,8 @@ const SwitchBase = /*#__PURE__*/React.forwardRef(function SwitchBase(props, ref)
104
103
  tabIndex,
105
104
  type,
106
105
  value,
106
+ slots = {},
107
+ slotProps = {},
107
108
  ...other
108
109
  } = props;
109
110
  const [checked, setCheckedState] = useControlled({
@@ -156,38 +157,75 @@ const SwitchBase = /*#__PURE__*/React.forwardRef(function SwitchBase(props, ref)
156
157
  edge
157
158
  };
158
159
  const classes = useUtilityClasses(ownerState);
159
- return /*#__PURE__*/_jsxs(SwitchBaseRoot, {
160
- component: "span",
161
- className: clsx(classes.root, className),
162
- centerRipple: true,
163
- focusRipple: !disableFocusRipple,
164
- disabled: disabled,
165
- tabIndex: null,
166
- role: undefined,
167
- onFocus: handleFocus,
168
- onBlur: handleBlur,
169
- ownerState: ownerState,
170
- ref: ref,
171
- ...other,
172
- children: [/*#__PURE__*/_jsx(SwitchBaseInput, {
173
- autoFocus: autoFocus,
160
+ const externalForwardedProps = {
161
+ slots,
162
+ slotProps: {
163
+ input: inputProps,
164
+ ...slotProps
165
+ }
166
+ };
167
+ const [RootSlot, rootSlotProps] = useSlot('root', {
168
+ ref,
169
+ elementType: SwitchBaseRoot,
170
+ className: classes.root,
171
+ shouldForwardComponentProp: true,
172
+ externalForwardedProps: {
173
+ ...externalForwardedProps,
174
+ component: 'span',
175
+ ...other
176
+ },
177
+ getSlotProps: handlers => ({
178
+ ...handlers,
179
+ onFocus: event => {
180
+ handlers.onFocus?.(event);
181
+ handleFocus(event);
182
+ },
183
+ onBlur: event => {
184
+ handlers.onBlur?.(event);
185
+ handleBlur(event);
186
+ }
187
+ }),
188
+ ownerState,
189
+ additionalProps: {
190
+ centerRipple: true,
191
+ focusRipple: !disableFocusRipple,
192
+ disabled,
193
+ role: undefined,
194
+ tabIndex: null
195
+ }
196
+ });
197
+ const [InputSlot, inputSlotProps] = useSlot('input', {
198
+ ref: inputRef,
199
+ elementType: SwitchBaseInput,
200
+ className: classes.input,
201
+ externalForwardedProps,
202
+ getSlotProps: handlers => ({
203
+ onChange: event => {
204
+ handlers.onChange?.(event);
205
+ handleInputChange(event);
206
+ }
207
+ }),
208
+ ownerState,
209
+ additionalProps: {
210
+ autoFocus,
174
211
  checked: checkedProp,
175
- defaultChecked: defaultChecked,
176
- className: classes.input,
177
- disabled: disabled,
212
+ defaultChecked,
213
+ disabled,
178
214
  id: hasLabelFor ? id : undefined,
179
- name: name,
180
- onChange: handleInputChange,
181
- readOnly: readOnly,
182
- ref: inputRef,
183
- required: required,
184
- ownerState: ownerState,
185
- tabIndex: tabIndex,
186
- type: type,
215
+ name,
216
+ readOnly,
217
+ required,
218
+ tabIndex,
219
+ type,
187
220
  ...(type === 'checkbox' && value === undefined ? {} : {
188
221
  value
189
- }),
190
- ...inputProps
222
+ })
223
+ }
224
+ });
225
+ return /*#__PURE__*/_jsxs(RootSlot, {
226
+ ...rootSlotProps,
227
+ children: [/*#__PURE__*/_jsx(InputSlot, {
228
+ ...inputSlotProps
191
229
  }), checked ? checkedIcon : icon]
192
230
  });
193
231
  });
@@ -280,6 +318,22 @@ process.env.NODE_ENV !== "production" ? SwitchBase.propTypes = {
280
318
  * If `true`, the `input` element is required.
281
319
  */
282
320
  required: PropTypes.bool,
321
+ /**
322
+ * The props used for each slot inside.
323
+ * @default {}
324
+ */
325
+ slotProps: PropTypes.shape({
326
+ input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
327
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
328
+ }),
329
+ /**
330
+ * The components used for each slot inside.
331
+ * @default {}
332
+ */
333
+ slots: PropTypes.shape({
334
+ input: PropTypes.elementType,
335
+ root: PropTypes.elementType
336
+ }),
283
337
  /**
284
338
  * The system prop that allows defining system overrides as well as additional CSS styles.
285
339
  */
@@ -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://next.mui.com/material-ui/react-click-away-listener/)
22
+ * - [Menu](https://next.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://next.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://next.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://next.mui.com/material-ui/api/grid-2/)
18
18
  */
19
19
  const Grid2 = createGrid2({
20
20
  createStyledComponent: styled('div', {
@@ -263,16 +263,20 @@ process.env.NODE_ENV !== "production" ? Menu.propTypes /* remove-proptypes */ =
263
263
  * @default {}
264
264
  */
265
265
  slotProps: PropTypes.shape({
266
+ backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
266
267
  paper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
267
- root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
268
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
269
+ transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
268
270
  }),
269
271
  /**
270
272
  * The components used for each slot inside.
271
273
  * @default {}
272
274
  */
273
275
  slots: PropTypes.shape({
276
+ backdrop: PropTypes.elementType,
274
277
  paper: PropTypes.elementType,
275
- root: PropTypes.elementType
278
+ root: PropTypes.elementType,
279
+ transition: PropTypes.elementType
276
280
  }),
277
281
  /**
278
282
  * The system prop that allows defining system overrides as well as additional CSS styles.