@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.
- package/Accordion/Accordion.d.ts +3 -3
- package/AccordionActions/AccordionActions.d.ts +2 -2
- package/AccordionDetails/AccordionDetails.d.ts +2 -2
- package/AccordionSummary/AccordionSummary.d.ts +3 -3
- package/Alert/Alert.d.ts +3 -3
- package/AlertTitle/AlertTitle.d.ts +3 -3
- package/AppBar/AppBar.d.ts +3 -3
- package/Autocomplete/Autocomplete.d.ts +2 -2
- package/Avatar/Avatar.d.ts +2 -2
- package/AvatarGroup/AvatarGroup.d.ts +2 -2
- package/Backdrop/Backdrop.d.ts +3 -3
- package/Badge/Badge.d.ts +3 -3
- package/BottomNavigation/BottomNavigation.d.ts +2 -2
- package/BottomNavigationAction/BottomNavigationAction.d.ts +3 -3
- package/Box/Box.d.ts +2 -2
- package/Breadcrumbs/Breadcrumbs.d.ts +3 -3
- package/Button/Button.d.ts +4 -4
- package/ButtonBase/ButtonBase.d.ts +2 -2
- package/ButtonGroup/ButtonGroup.d.ts +2 -2
- package/CHANGELOG.md +24 -2272
- package/Card/Card.d.ts +3 -3
- package/CardActionArea/CardActionArea.d.ts +3 -3
- package/CardActions/CardActions.d.ts +2 -2
- package/CardContent/CardContent.d.ts +2 -2
- package/CardHeader/CardHeader.d.ts +2 -2
- package/CardMedia/CardMedia.d.ts +2 -2
- package/Checkbox/Checkbox.d.ts +4 -4
- package/Chip/Chip.d.ts +2 -2
- package/CircularProgress/CircularProgress.d.ts +3 -7
- package/ClickAwayListener/ClickAwayListener.d.ts +3 -3
- package/ClickAwayListener/ClickAwayListener.js +3 -3
- package/Collapse/Collapse.d.ts +5 -5
- package/Container/Container.d.ts +2 -2
- package/CssBaseline/CssBaseline.d.ts +2 -2
- package/Dialog/Dialog.d.ts +3 -3
- package/DialogActions/DialogActions.d.ts +2 -2
- package/DialogContent/DialogContent.d.ts +2 -2
- package/DialogContentText/DialogContentText.d.ts +3 -3
- package/DialogTitle/DialogTitle.d.ts +3 -3
- package/Divider/Divider.d.ts +3 -3
- package/Drawer/Drawer.d.ts +3 -3
- package/Fab/Fab.d.ts +3 -3
- package/Fade/Fade.d.ts +3 -3
- package/FilledInput/FilledInput.d.ts +3 -3
- package/FormControl/FormControl.d.ts +6 -6
- package/FormControlLabel/FormControlLabel.d.ts +4 -4
- package/FormGroup/FormGroup.d.ts +3 -3
- package/FormHelperText/FormHelperText.d.ts +2 -2
- package/FormLabel/FormLabel.d.ts +4 -4
- package/GlobalStyles/GlobalStyles.d.ts +2 -2
- package/Grid/Grid.d.ts +2 -2
- package/Grid2/Grid2.d.ts +2 -2
- package/Grid2/Grid2.js +2 -2
- package/Grow/Grow.d.ts +5 -5
- package/Hidden/Hidden.d.ts +2 -2
- package/Icon/Icon.d.ts +3 -3
- package/IconButton/IconButton.d.ts +4 -4
- package/ImageList/ImageList.d.ts +2 -2
- package/ImageListItem/ImageListItem.d.ts +2 -2
- package/ImageListItemBar/ImageListItemBar.d.ts +2 -2
- package/Input/Input.d.ts +3 -3
- package/InputAdornment/InputAdornment.d.ts +2 -2
- package/InputBase/InputBase.d.ts +2 -2
- package/InputLabel/InputLabel.d.ts +3 -3
- package/LinearProgress/LinearProgress.d.ts +3 -7
- package/Link/Link.d.ts +4 -4
- package/List/List.d.ts +3 -3
- package/ListItem/ListItem.d.ts +3 -3
- package/ListItemAvatar/ListItemAvatar.d.ts +2 -2
- package/ListItemButton/ListItemButton.d.ts +3 -3
- package/ListItemIcon/ListItemIcon.d.ts +2 -2
- package/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +2 -2
- package/ListItemText/ListItemText.d.ts +2 -2
- package/ListSubheader/ListSubheader.d.ts +2 -2
- package/Menu/Menu.d.ts +4 -4
- package/Menu/Menu.js +6 -2
- package/MenuItem/MenuItem.d.ts +3 -3
- package/MenuList/MenuList.d.ts +4 -4
- package/MobileStepper/MobileStepper.d.ts +4 -72
- package/MobileStepper/MobileStepper.js +18 -76
- package/Modal/Modal.d.ts +7 -7
- package/Modal/Modal.js +9 -10
- package/NativeSelect/NativeSelect.d.ts +3 -3
- package/NoSsr/NoSsr.d.ts +2 -2
- package/NoSsr/NoSsr.js +2 -2
- package/OutlinedInput/OutlinedInput.d.ts +3 -3
- package/Pagination/Pagination.d.ts +2 -2
- package/PaginationItem/PaginationItem.d.ts +2 -2
- package/Paper/Paper.d.ts +3 -3
- package/PigmentContainer/PigmentContainer.d.ts +2 -2
- package/PigmentContainer/PigmentContainer.js +2 -2
- package/PigmentGrid/PigmentGrid.d.ts +2 -2
- package/PigmentGrid/PigmentGrid.js +2 -2
- package/PigmentHidden/PigmentHidden.d.ts +2 -2
- package/PigmentHidden/PigmentHidden.js +2 -2
- package/PigmentStack/PigmentStack.d.ts +2 -2
- package/PigmentStack/PigmentStack.js +2 -2
- package/Popover/Popover.d.ts +64 -10
- package/Popover/Popover.js +78 -51
- package/Popper/Popper.d.ts +4 -4
- package/Popper/Popper.js +4 -4
- package/Portal/Portal.d.ts +2 -2
- package/Portal/Portal.js +2 -2
- package/README.md +4 -3
- package/Radio/Radio.d.ts +3 -3
- package/RadioGroup/RadioGroup.d.ts +3 -3
- package/Rating/Rating.d.ts +2 -2
- package/ScopedCssBaseline/ScopedCssBaseline.d.ts +2 -2
- package/Select/Select.d.ts +3 -3
- package/Skeleton/Skeleton.d.ts +2 -2
- package/Slide/Slide.d.ts +4 -4
- package/Slider/Slider.d.ts +20 -11
- package/Slider/Slider.js +2 -2
- package/Slider/sliderClasses.d.ts +7 -21
- package/Snackbar/Snackbar.d.ts +80 -3
- package/Snackbar/Snackbar.js +122 -32
- package/SnackbarContent/SnackbarContent.d.ts +3 -3
- package/SpeedDial/SpeedDial.d.ts +2 -2
- package/SpeedDialAction/SpeedDialAction.d.ts +3 -3
- package/SpeedDialIcon/SpeedDialIcon.d.ts +2 -2
- package/Stack/Stack.d.ts +2 -2
- package/Step/Step.d.ts +2 -2
- package/StepButton/StepButton.d.ts +3 -3
- package/StepConnector/StepConnector.d.ts +2 -2
- package/StepContent/StepContent.d.ts +2 -2
- package/StepIcon/StepIcon.d.ts +3 -3
- package/StepLabel/StepLabel.d.ts +2 -2
- package/Stepper/Stepper.d.ts +2 -2
- package/SvgIcon/SvgIcon.d.ts +3 -3
- package/SwipeableDrawer/SwipeableDrawer.d.ts +3 -3
- package/Switch/Switch.d.ts +4 -4
- package/Tab/Tab.d.ts +3 -3
- package/TabScrollButton/TabScrollButton.d.ts +2 -2
- package/Table/Table.d.ts +2 -2
- package/TableBody/TableBody.d.ts +2 -2
- package/TableCell/TableCell.d.ts +2 -2
- package/TableContainer/TableContainer.d.ts +2 -2
- package/TableFooter/TableFooter.d.ts +2 -2
- package/TableHead/TableHead.d.ts +2 -2
- package/TablePagination/TablePagination.d.ts +4 -4
- package/TableRow/TableRow.d.ts +2 -2
- package/TableSortLabel/TableSortLabel.d.ts +3 -3
- package/Tabs/Tabs.d.ts +2 -2
- package/TextField/TextField.d.ts +10 -10
- package/TextareaAutosize/TextareaAutosize.d.ts +2 -2
- package/TextareaAutosize/TextareaAutosize.js +2 -2
- package/ToggleButton/ToggleButton.d.ts +3 -3
- package/ToggleButtonGroup/ToggleButtonGroup.d.ts +2 -2
- package/Toolbar/Toolbar.d.ts +2 -2
- package/Tooltip/Tooltip.d.ts +2 -2
- package/Typography/Typography.d.ts +3 -3
- package/Zoom/Zoom.d.ts +3 -3
- package/index.js +1 -1
- package/internal/SwitchBase.d.ts +33 -1
- package/internal/SwitchBase.js +84 -30
- package/modern/ClickAwayListener/ClickAwayListener.js +3 -3
- package/modern/Grid2/Grid2.js +2 -2
- package/modern/Menu/Menu.js +6 -2
- package/modern/MobileStepper/MobileStepper.js +18 -76
- package/modern/Modal/Modal.js +9 -10
- package/modern/NoSsr/NoSsr.js +2 -2
- package/modern/PigmentContainer/PigmentContainer.js +2 -2
- package/modern/PigmentGrid/PigmentGrid.js +2 -2
- package/modern/PigmentHidden/PigmentHidden.js +2 -2
- package/modern/PigmentStack/PigmentStack.js +2 -2
- package/modern/Popover/Popover.js +78 -51
- package/modern/Popper/Popper.js +4 -4
- package/modern/Portal/Portal.js +2 -2
- package/modern/Slider/Slider.js +2 -2
- package/modern/Snackbar/Snackbar.js +122 -32
- package/modern/TextareaAutosize/TextareaAutosize.js +2 -2
- package/modern/index.js +1 -1
- package/modern/internal/SwitchBase.js +84 -30
- package/modern/version/index.js +5 -5
- package/node/ClickAwayListener/ClickAwayListener.js +3 -3
- package/node/Grid2/Grid2.js +2 -2
- package/node/Menu/Menu.js +6 -2
- package/node/MobileStepper/MobileStepper.js +18 -76
- package/node/Modal/Modal.js +9 -10
- package/node/NoSsr/NoSsr.js +2 -2
- package/node/PigmentContainer/PigmentContainer.js +2 -2
- package/node/PigmentGrid/PigmentGrid.js +2 -2
- package/node/PigmentHidden/PigmentHidden.js +2 -2
- package/node/PigmentStack/PigmentStack.js +2 -2
- package/node/Popover/Popover.js +78 -51
- package/node/Popper/Popper.js +4 -4
- package/node/Portal/Portal.js +2 -2
- package/node/Slider/Slider.js +2 -2
- package/node/Snackbar/Snackbar.js +122 -32
- package/node/TextareaAutosize/TextareaAutosize.js +2 -2
- package/node/index.js +1 -1
- package/node/internal/SwitchBase.js +84 -30
- package/node/version/index.js +5 -5
- package/package.json +7 -7
- package/version/index.js +5 -5
package/TableBody/TableBody.d.ts
CHANGED
|
@@ -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
|
|
package/TableCell/TableCell.d.ts
CHANGED
|
@@ -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
|
|
package/TableHead/TableHead.d.ts
CHANGED
|
@@ -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>>
|
package/TableRow/TableRow.d.ts
CHANGED
|
@@ -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
|
|
package/TextField/TextField.d.ts
CHANGED
|
@@ -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;
|
package/Toolbar/Toolbar.d.ts
CHANGED
|
@@ -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
|
|
package/Tooltip/Tooltip.d.ts
CHANGED
|
@@ -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
package/internal/SwitchBase.d.ts
CHANGED
|
@@ -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;
|
package/internal/SwitchBase.js
CHANGED
|
@@ -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
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
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
|
|
176
|
-
|
|
177
|
-
disabled: disabled,
|
|
212
|
+
defaultChecked,
|
|
213
|
+
disabled,
|
|
178
214
|
id: hasLabelFor ? id : undefined,
|
|
179
|
-
name
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
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
|
-
|
|
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 {
|
package/modern/Grid2/Grid2.js
CHANGED
|
@@ -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', {
|
package/modern/Menu/Menu.js
CHANGED
|
@@ -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.
|