@mui/material 5.0.0-rc.1 → 5.0.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 +4 -4
- package/Accordion/Accordion.js +3 -3
- package/Accordion/AccordionContext.js +1 -1
- 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 +2 -2
- package/AppBar/AppBar.d.ts +3 -3
- package/Autocomplete/Autocomplete.d.ts +2 -2
- package/Autocomplete/Autocomplete.js +2 -2
- package/Avatar/Avatar.d.ts +2 -2
- package/AvatarGroup/AvatarGroup.d.ts +2 -2
- package/AvatarGroup/AvatarGroup.js +2 -2
- package/Backdrop/Backdrop.d.ts +3 -3
- package/Badge/Badge.d.ts +4 -4
- package/BottomNavigation/BottomNavigation.d.ts +2 -2
- package/BottomNavigation/BottomNavigation.js +1 -1
- package/BottomNavigationAction/BottomNavigationAction.d.ts +3 -3
- package/Box/Box.d.ts +4 -4
- package/Breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/Breadcrumbs/Breadcrumbs.js +2 -2
- package/Button/Button.d.ts +4 -4
- package/ButtonBase/ButtonBase.d.ts +2 -2
- package/ButtonBase/ButtonBase.js +200 -30
- package/ButtonGroup/ButtonGroup.d.ts +2 -2
- package/ButtonGroup/ButtonGroup.js +1 -1
- package/CHANGELOG.md +119 -39
- package/Card/Card.d.ts +3 -3
- package/Card/Card.js +1 -1
- 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/CardMedia/CardMedia.js +1 -1
- package/Checkbox/Checkbox.d.ts +4 -4
- package/Checkbox/Checkbox.js +1 -1
- package/Chip/Chip.d.ts +2 -2
- package/Chip/Chip.js +1 -1
- package/CircularProgress/CircularProgress.d.ts +2 -2
- package/CircularProgress/CircularProgress.js +1 -1
- 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 +4 -4
- package/Dialog/Dialog.js +1 -1
- 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 +2 -2
- 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/FormControl/FormControl.js +1 -1
- 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/Grow/Grow.d.ts +5 -5
- package/Hidden/Hidden.d.ts +2 -2
- package/Hidden/HiddenCss.js +1 -1
- package/Icon/Icon.d.ts +3 -3
- package/IconButton/IconButton.d.ts +4 -4
- package/IconButton/IconButton.js +1 -1
- package/ImageList/ImageList.d.ts +2 -2
- package/ImageList/ImageList.js +2 -4
- package/ImageListItem/ImageListItem.d.ts +2 -2
- package/ImageListItem/ImageListItem.js +1 -1
- package/ImageListItemBar/ImageListItemBar.d.ts +2 -2
- package/Input/Input.d.ts +3 -3
- package/InputAdornment/InputAdornment.d.ts +2 -2
- package/InputAdornment/InputAdornment.js +1 -1
- package/InputBase/InputBase.d.ts +2 -2
- package/InputBase/InputBase.js +3 -3
- package/InputLabel/InputLabel.d.ts +3 -3
- package/LinearProgress/LinearProgress.d.ts +2 -2
- package/LinearProgress/LinearProgress.js +2 -2
- package/Link/Link.d.ts +4 -4
- package/List/List.d.ts +3 -3
- package/ListItem/ListItem.d.ts +3 -3
- package/ListItem/ListItem.js +2 -2
- package/ListItemAvatar/ListItemAvatar.d.ts +2 -2
- package/ListItemButton/ListItemButton.d.ts +3 -3
- package/ListItemButton/ListItemButton.js +1 -1
- 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 +5 -5
- package/Menu/Menu.js +2 -2
- package/MenuItem/MenuItem.d.ts +3 -3
- package/MenuItem/MenuItem.js +1 -1
- package/MenuList/MenuList.d.ts +4 -4
- package/MenuList/MenuList.js +1 -1
- package/MobileStepper/MobileStepper.d.ts +3 -3
- package/Modal/Modal.d.ts +7 -7
- package/NativeSelect/NativeSelect.d.ts +3 -3
- 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/Paper/Paper.js +2 -2
- package/Popover/Popover.d.ts +5 -5
- package/Popover/Popover.js +6 -6
- package/Popper/Popper.d.ts +4 -4
- package/Popper/Popper.js +3 -3
- package/README.md +24 -35
- package/Radio/Radio.d.ts +3 -3
- package/RadioGroup/RadioGroup.d.ts +3 -3
- package/Rating/Rating.d.ts +2 -2
- package/Rating/Rating.js +1 -1
- package/ScopedCssBaseline/ScopedCssBaseline.d.ts +4 -4
- package/Select/Select.d.ts +3 -3
- package/Select/SelectInput.js +3 -3
- package/Skeleton/Skeleton.d.ts +2 -2
- package/Slide/Slide.d.ts +4 -4
- package/Slide/Slide.js +2 -2
- package/Slider/Slider.d.ts +3 -3
- package/Slider/Slider.js +2 -2
- package/Snackbar/Snackbar.d.ts +3 -3
- package/Snackbar/Snackbar.js +1 -1
- package/SnackbarContent/SnackbarContent.d.ts +3 -3
- package/SpeedDial/SpeedDial.d.ts +3 -3
- package/SpeedDial/SpeedDial.js +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 +3 -3
- package/StepContent/StepContent.js +2 -2
- package/StepIcon/StepIcon.d.ts +2 -2
- 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 +3 -3
- package/TablePagination/TablePagination.js +1 -1
- package/TableRow/TableRow.d.ts +2 -2
- package/TableSortLabel/TableSortLabel.d.ts +3 -3
- package/Tabs/Tabs.d.ts +2 -2
- package/Tabs/Tabs.js +4 -4
- package/TextField/TextField.d.ts +11 -11
- package/TextField/TextField.js +4 -2
- package/TextareaAutosize/TextareaAutosize.d.ts +2 -2
- package/TextareaAutosize/TextareaAutosize.js +1 -1
- package/ToggleButton/ToggleButton.d.ts +3 -3
- package/ToggleButtonGroup/ToggleButtonGroup.d.ts +2 -2
- package/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/Toolbar/Toolbar.d.ts +2 -2
- package/Tooltip/Tooltip.d.ts +3 -3
- package/Tooltip/Tooltip.js +5 -5
- package/Typography/Typography.d.ts +3 -3
- package/Zoom/Zoom.d.ts +3 -3
- package/colors/amber.d.ts +15 -15
- package/colors/blue.d.ts +15 -15
- package/colors/blueGrey.d.ts +15 -15
- package/colors/brown.d.ts +15 -15
- package/colors/common.d.ts +3 -3
- package/colors/cyan.d.ts +15 -15
- package/colors/deepOrange.d.ts +15 -15
- package/colors/deepPurple.d.ts +15 -15
- package/colors/green.d.ts +15 -15
- package/colors/grey.d.ts +15 -15
- package/colors/indigo.d.ts +15 -15
- package/colors/lightBlue.d.ts +15 -15
- package/colors/lightGreen.d.ts +15 -15
- package/colors/lime.d.ts +15 -15
- package/colors/orange.d.ts +15 -15
- package/colors/pink.d.ts +15 -15
- package/colors/purple.d.ts +15 -15
- package/colors/red.d.ts +15 -15
- package/colors/teal.d.ts +15 -15
- package/colors/yellow.d.ts +15 -15
- package/index.js +1 -1
- package/legacy/Accordion/Accordion.js +3 -3
- package/legacy/Accordion/AccordionContext.js +1 -1
- package/legacy/Autocomplete/Autocomplete.js +2 -2
- package/legacy/AvatarGroup/AvatarGroup.js +2 -2
- package/legacy/BottomNavigation/BottomNavigation.js +1 -1
- package/legacy/Breadcrumbs/Breadcrumbs.js +2 -2
- package/legacy/ButtonBase/ButtonBase.js +191 -28
- package/legacy/ButtonGroup/ButtonGroup.js +1 -1
- package/legacy/Card/Card.js +1 -1
- package/legacy/CardMedia/CardMedia.js +1 -1
- package/legacy/Checkbox/Checkbox.js +1 -1
- package/legacy/Chip/Chip.js +1 -1
- package/legacy/CircularProgress/CircularProgress.js +1 -1
- package/legacy/ClickAwayListener/ClickAwayListener.js +3 -3
- package/legacy/Dialog/Dialog.js +1 -1
- package/legacy/FormControl/FormControl.js +1 -1
- package/legacy/Hidden/HiddenCss.js +1 -1
- package/legacy/IconButton/IconButton.js +1 -1
- package/legacy/ImageList/ImageList.js +2 -4
- package/legacy/ImageListItem/ImageListItem.js +1 -1
- package/legacy/InputAdornment/InputAdornment.js +1 -1
- package/legacy/InputBase/InputBase.js +3 -3
- package/legacy/LinearProgress/LinearProgress.js +2 -2
- package/legacy/ListItem/ListItem.js +2 -2
- package/legacy/ListItemButton/ListItemButton.js +1 -1
- package/legacy/Menu/Menu.js +2 -2
- package/legacy/MenuItem/MenuItem.js +1 -1
- package/legacy/MenuList/MenuList.js +1 -1
- package/legacy/Paper/Paper.js +2 -2
- package/legacy/Popover/Popover.js +6 -6
- package/legacy/Popper/Popper.js +3 -3
- package/legacy/Rating/Rating.js +1 -1
- package/legacy/Select/SelectInput.js +3 -3
- package/legacy/Slide/Slide.js +2 -2
- package/legacy/Slider/Slider.js +2 -2
- package/legacy/Snackbar/Snackbar.js +1 -1
- package/legacy/SpeedDial/SpeedDial.js +2 -2
- package/legacy/StepContent/StepContent.js +2 -2
- package/legacy/TablePagination/TablePagination.js +1 -1
- package/legacy/Tabs/Tabs.js +4 -4
- package/legacy/TextField/TextField.js +4 -2
- package/legacy/TextareaAutosize/TextareaAutosize.js +1 -1
- package/legacy/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/legacy/Tooltip/Tooltip.js +5 -5
- package/legacy/index.js +1 -1
- package/legacy/styles/adaptV4Theme.js +1 -1
- package/legacy/styles/createPalette.js +4 -4
- package/legacy/styles/createStyles.js +1 -1
- package/legacy/styles/createTheme.js +3 -3
- package/legacy/styles/createTransitions.js +5 -5
- package/legacy/styles/createTypography.js +2 -2
- package/legacy/styles/makeStyles.js +1 -1
- package/legacy/styles/responsiveFontSizes.js +1 -1
- package/legacy/styles/withStyles.js +1 -1
- package/legacy/styles/withTheme.js +1 -1
- package/legacy/useMediaQuery/useMediaQuery.js +2 -2
- package/modern/Accordion/Accordion.js +3 -3
- package/modern/Accordion/AccordionContext.js +1 -1
- package/modern/Autocomplete/Autocomplete.js +2 -2
- package/modern/AvatarGroup/AvatarGroup.js +2 -2
- package/modern/BottomNavigation/BottomNavigation.js +1 -1
- package/modern/Breadcrumbs/Breadcrumbs.js +2 -2
- package/modern/ButtonBase/ButtonBase.js +200 -30
- package/modern/ButtonGroup/ButtonGroup.js +1 -1
- package/modern/Card/Card.js +1 -1
- package/modern/CardMedia/CardMedia.js +1 -1
- package/modern/Checkbox/Checkbox.js +1 -1
- package/modern/Chip/Chip.js +1 -1
- package/modern/CircularProgress/CircularProgress.js +1 -1
- package/modern/ClickAwayListener/ClickAwayListener.js +3 -3
- package/modern/Dialog/Dialog.js +1 -1
- package/modern/FormControl/FormControl.js +1 -1
- package/modern/Hidden/HiddenCss.js +1 -1
- package/modern/IconButton/IconButton.js +1 -1
- package/modern/ImageList/ImageList.js +2 -4
- package/modern/ImageListItem/ImageListItem.js +1 -1
- package/modern/InputAdornment/InputAdornment.js +1 -1
- package/modern/InputBase/InputBase.js +3 -3
- package/modern/LinearProgress/LinearProgress.js +2 -2
- package/modern/ListItem/ListItem.js +2 -2
- package/modern/ListItemButton/ListItemButton.js +1 -1
- package/modern/Menu/Menu.js +2 -2
- package/modern/MenuItem/MenuItem.js +1 -1
- package/modern/MenuList/MenuList.js +1 -1
- package/modern/Paper/Paper.js +2 -2
- package/modern/Popover/Popover.js +6 -6
- package/modern/Popper/Popper.js +3 -3
- package/modern/Rating/Rating.js +1 -1
- package/modern/Select/SelectInput.js +3 -3
- package/modern/Slide/Slide.js +2 -2
- package/modern/Slider/Slider.js +2 -2
- package/modern/Snackbar/Snackbar.js +1 -1
- package/modern/SpeedDial/SpeedDial.js +2 -2
- package/modern/StepContent/StepContent.js +2 -2
- package/modern/TablePagination/TablePagination.js +1 -1
- package/modern/Tabs/Tabs.js +4 -4
- package/modern/TextField/TextField.js +4 -2
- package/modern/TextareaAutosize/TextareaAutosize.js +1 -1
- package/modern/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/modern/Tooltip/Tooltip.js +5 -5
- package/modern/index.js +1 -1
- package/modern/styles/adaptV4Theme.js +1 -1
- package/modern/styles/createPalette.js +4 -4
- package/modern/styles/createStyles.js +1 -1
- package/modern/styles/createTheme.js +3 -3
- package/modern/styles/createTransitions.js +5 -5
- package/modern/styles/createTypography.js +3 -3
- package/modern/styles/makeStyles.js +2 -2
- package/modern/styles/responsiveFontSizes.js +1 -1
- package/modern/styles/withStyles.js +2 -2
- package/modern/styles/withTheme.js +2 -2
- package/modern/useMediaQuery/useMediaQuery.js +2 -2
- package/node/Accordion/Accordion.js +3 -3
- package/node/Accordion/AccordionContext.js +1 -1
- package/node/Autocomplete/Autocomplete.js +2 -2
- package/node/AvatarGroup/AvatarGroup.js +2 -2
- package/node/BottomNavigation/BottomNavigation.js +1 -1
- package/node/Breadcrumbs/Breadcrumbs.js +2 -2
- package/node/ButtonBase/ButtonBase.js +202 -32
- package/node/ButtonGroup/ButtonGroup.js +1 -1
- package/node/Card/Card.js +1 -1
- package/node/CardMedia/CardMedia.js +1 -1
- package/node/Checkbox/Checkbox.js +1 -1
- package/node/Chip/Chip.js +1 -1
- package/node/CircularProgress/CircularProgress.js +1 -1
- package/node/ClickAwayListener/ClickAwayListener.js +3 -3
- package/node/Dialog/Dialog.js +1 -1
- package/node/FormControl/FormControl.js +1 -1
- package/node/Hidden/HiddenCss.js +1 -1
- package/node/IconButton/IconButton.js +1 -1
- package/node/ImageList/ImageList.js +2 -4
- package/node/ImageListItem/ImageListItem.js +1 -1
- package/node/InputAdornment/InputAdornment.js +1 -1
- package/node/InputBase/InputBase.js +3 -3
- package/node/LinearProgress/LinearProgress.js +2 -2
- package/node/ListItem/ListItem.js +2 -2
- package/node/ListItemButton/ListItemButton.js +1 -1
- package/node/Menu/Menu.js +2 -2
- package/node/MenuItem/MenuItem.js +1 -1
- package/node/MenuList/MenuList.js +1 -1
- package/node/Paper/Paper.js +2 -2
- package/node/Popover/Popover.js +6 -6
- package/node/Popper/Popper.js +3 -3
- package/node/Rating/Rating.js +1 -1
- package/node/Select/SelectInput.js +3 -3
- package/node/Slide/Slide.js +2 -2
- package/node/Slider/Slider.js +2 -2
- package/node/Snackbar/Snackbar.js +1 -1
- package/node/SpeedDial/SpeedDial.js +2 -2
- package/node/StepContent/StepContent.js +2 -2
- package/node/TablePagination/TablePagination.js +1 -1
- package/node/Tabs/Tabs.js +4 -4
- package/node/TextField/TextField.js +4 -2
- package/node/TextareaAutosize/TextareaAutosize.js +1 -1
- package/node/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/node/Tooltip/Tooltip.js +5 -5
- package/node/index.js +1 -1
- package/node/styles/adaptV4Theme.js +1 -1
- package/node/styles/createPalette.js +4 -4
- package/node/styles/createStyles.js +1 -1
- package/node/styles/createTheme.js +3 -3
- package/node/styles/createTransitions.js +5 -5
- package/node/styles/createTypography.js +3 -3
- package/node/styles/makeStyles.js +2 -2
- package/node/styles/responsiveFontSizes.js +1 -1
- package/node/styles/withStyles.js +2 -2
- package/node/styles/withTheme.js +2 -2
- package/node/useMediaQuery/useMediaQuery.js +2 -2
- package/package.json +10 -10
- package/styles/ThemeProvider.d.ts +1 -1
- package/styles/adaptV4Theme.d.ts +2 -2
- package/styles/adaptV4Theme.js +1 -1
- package/styles/createPalette.js +4 -4
- package/styles/createStyles.js +1 -1
- package/styles/createTheme.d.ts +2 -2
- package/styles/createTheme.js +3 -3
- package/styles/createTransitions.js +5 -5
- package/styles/createTypography.js +3 -3
- package/styles/makeStyles.js +2 -2
- package/styles/responsiveFontSizes.js +1 -1
- package/styles/withStyles.js +2 -2
- package/styles/withTheme.js +2 -2
- package/umd/material-ui.development.js +787 -364
- package/umd/material-ui.production.min.js +21 -21
- package/useMediaQuery/useMediaQuery.js +2 -2
package/styles/createStyles.js
CHANGED
|
@@ -2,7 +2,7 @@ let warnedOnce = false; // To remove in v6
|
|
|
2
2
|
|
|
3
3
|
export default function createStyles(styles) {
|
|
4
4
|
if (!warnedOnce) {
|
|
5
|
-
console.warn(['
|
|
5
|
+
console.warn(['MUI: createStyles from @mui/material/styles is deprecated.', 'Please use @mui/styles/createStyles'].join('\n'));
|
|
6
6
|
warnedOnce = true;
|
|
7
7
|
}
|
|
8
8
|
|
package/styles/createTheme.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export interface ThemeOptions extends SystemThemeOptions {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* Our [TypeScript guide on theme customization](https://
|
|
22
|
+
* Our [TypeScript guide on theme customization](https://mui.com/guides/typescript/#customization-of-theme) explains in detail how you would add custom properties.
|
|
23
23
|
*/
|
|
24
24
|
export interface Theme extends SystemTheme {
|
|
25
25
|
mixins: Mixins;
|
|
@@ -42,6 +42,6 @@ export function createMuiTheme(options?: ThemeOptions, ...args: object[]): Theme
|
|
|
42
42
|
* Generate a theme base on the options received.
|
|
43
43
|
* @param options Takes an incomplete theme object and adds the missing parts.
|
|
44
44
|
* @param args Deep merge the arguments with the about to be returned theme.
|
|
45
|
-
* @returns A complete, ready
|
|
45
|
+
* @returns A complete, ready-to-use theme object.
|
|
46
46
|
*/
|
|
47
47
|
export default function createTheme(options?: ThemeOptions, ...args: object[]): Theme;
|
package/styles/createTheme.js
CHANGED
|
@@ -46,11 +46,11 @@ function createTheme(options = {}, ...args) {
|
|
|
46
46
|
if (stateClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {
|
|
47
47
|
if (process.env.NODE_ENV !== 'production') {
|
|
48
48
|
const stateClass = generateUtilityClass('', key);
|
|
49
|
-
console.error([`
|
|
49
|
+
console.error([`MUI: The \`${component}\` component increases ` + `the CSS specificity of the \`${key}\` internal state.`, 'You can not override it like this: ', JSON.stringify(node, null, 2), '', `Instead, you need to use the '&.${stateClass}' syntax:`, JSON.stringify({
|
|
50
50
|
root: {
|
|
51
51
|
[`&.${stateClass}`]: child
|
|
52
52
|
}
|
|
53
|
-
}, null, 2), '', 'https://
|
|
53
|
+
}, null, 2), '', 'https://mui.com/r/state-classes-guide'].join('\n'));
|
|
54
54
|
} // Remove the style to prevent global conflicts.
|
|
55
55
|
|
|
56
56
|
|
|
@@ -76,7 +76,7 @@ export function createMuiTheme(...args) {
|
|
|
76
76
|
if (process.env.NODE_ENV !== 'production') {
|
|
77
77
|
if (!warnedOnce) {
|
|
78
78
|
warnedOnce = true;
|
|
79
|
-
console.error(['
|
|
79
|
+
console.error(['MUI: the createMuiTheme function was renamed to createTheme.', '', "You should use `import { createTheme } from '@mui/material/styles'`"].join('\n'));
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
|
@@ -65,23 +65,23 @@ export default function createTransitions(inputTransitions) {
|
|
|
65
65
|
const isNumber = value => !isNaN(parseFloat(value));
|
|
66
66
|
|
|
67
67
|
if (!isString(props) && !Array.isArray(props)) {
|
|
68
|
-
console.error('
|
|
68
|
+
console.error('MUI: Argument "props" must be a string or Array.');
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
if (!isNumber(durationOption) && !isString(durationOption)) {
|
|
72
|
-
console.error(`
|
|
72
|
+
console.error(`MUI: Argument "duration" must be a number or a string but found ${durationOption}.`);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
if (!isString(easingOption)) {
|
|
76
|
-
console.error('
|
|
76
|
+
console.error('MUI: Argument "easing" must be a string.');
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
if (!isNumber(delay) && !isString(delay)) {
|
|
80
|
-
console.error('
|
|
80
|
+
console.error('MUI: Argument "delay" must be a number or a string.');
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
if (Object.keys(other).length !== 0) {
|
|
84
|
-
console.error(`
|
|
84
|
+
console.error(`MUI: Unrecognized argument(s) [${Object.keys(other).join(',')}].`);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -27,7 +27,7 @@ export default function createTypography(palette, typography) {
|
|
|
27
27
|
fontWeightRegular = 400,
|
|
28
28
|
fontWeightMedium = 500,
|
|
29
29
|
fontWeightBold = 700,
|
|
30
|
-
// Tell
|
|
30
|
+
// Tell MUI what's the font-size on the html element.
|
|
31
31
|
// 16px is the default font-size used by browsers.
|
|
32
32
|
htmlFontSize = 16,
|
|
33
33
|
// Apply the CSS properties to all the variants.
|
|
@@ -38,11 +38,11 @@ export default function createTypography(palette, typography) {
|
|
|
38
38
|
|
|
39
39
|
if (process.env.NODE_ENV !== 'production') {
|
|
40
40
|
if (typeof fontSize !== 'number') {
|
|
41
|
-
console.error('
|
|
41
|
+
console.error('MUI: `fontSize` is required to be a number.');
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
if (typeof htmlFontSize !== 'number') {
|
|
45
|
-
console.error('
|
|
45
|
+
console.error('MUI: `htmlFontSize` is required to be a number.');
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
package/styles/makeStyles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@mui/utils";
|
|
2
2
|
export default function makeStyles() {
|
|
3
|
-
throw new Error(process.env.NODE_ENV !== "production" ? `
|
|
3
|
+
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: makeStyles is not longer exported from @mui/material/styles.
|
|
4
4
|
You have to import it from @mui/styles.
|
|
5
|
-
See https://
|
|
5
|
+
See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` : _formatMuiErrorMessage(14));
|
|
6
6
|
}
|
|
@@ -32,7 +32,7 @@ export default function responsiveFontSizes(themeInput, options = {}) {
|
|
|
32
32
|
} = style;
|
|
33
33
|
|
|
34
34
|
if (!isUnitless(lineHeight) && !disableAlign) {
|
|
35
|
-
throw new Error(process.env.NODE_ENV !== "production" ? `
|
|
35
|
+
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: Unsupported non-unitless line height with grid alignment.
|
|
36
36
|
Use unitless line heights instead.` : _formatMuiErrorMessage(6));
|
|
37
37
|
}
|
|
38
38
|
|
package/styles/withStyles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@mui/utils";
|
|
2
2
|
export default function withStyles() {
|
|
3
|
-
throw new Error(process.env.NODE_ENV !== "production" ? `
|
|
3
|
+
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: withStyles is not longer exported from @mui/material/styles.
|
|
4
4
|
You have to import it from @mui/styles.
|
|
5
|
-
See https://
|
|
5
|
+
See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` : _formatMuiErrorMessage(15));
|
|
6
6
|
}
|
package/styles/withTheme.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@mui/utils";
|
|
2
2
|
export default function withTheme() {
|
|
3
|
-
throw new Error(process.env.NODE_ENV !== "production" ? `
|
|
3
|
+
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: withTheme is not longer exported from @mui/material/styles.
|
|
4
4
|
You have to import it from @mui/styles.
|
|
5
|
-
See https://
|
|
5
|
+
See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` : _formatMuiErrorMessage(16));
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license
|
|
1
|
+
/** @license MUI v5.0.0
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -842,8 +842,8 @@
|
|
|
842
842
|
}
|
|
843
843
|
};
|
|
844
844
|
|
|
845
|
-
var isBrowser$
|
|
846
|
-
var getServerStylisCache = isBrowser$
|
|
845
|
+
var isBrowser$5 = typeof document !== 'undefined';
|
|
846
|
+
var getServerStylisCache = isBrowser$5 ? undefined : weakMemoize(function () {
|
|
847
847
|
return memoize$1(function () {
|
|
848
848
|
var cache = {};
|
|
849
849
|
return function (name) {
|
|
@@ -860,7 +860,7 @@
|
|
|
860
860
|
throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\n" + "If multiple caches share the same key they might \"fight\" for each other's style elements.");
|
|
861
861
|
}
|
|
862
862
|
|
|
863
|
-
if (isBrowser$
|
|
863
|
+
if (isBrowser$5 && key === 'css') {
|
|
864
864
|
var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration
|
|
865
865
|
// document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
|
|
866
866
|
// note this very very intentionally targets all style elements regardless of the key to ensure
|
|
@@ -897,7 +897,7 @@
|
|
|
897
897
|
var container;
|
|
898
898
|
var nodesToHydrate = [];
|
|
899
899
|
|
|
900
|
-
if (isBrowser$
|
|
900
|
+
if (isBrowser$5) {
|
|
901
901
|
container = options.container || document.head;
|
|
902
902
|
Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which
|
|
903
903
|
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
@@ -925,7 +925,7 @@
|
|
|
925
925
|
}), incorrectImportAlarm);
|
|
926
926
|
}
|
|
927
927
|
|
|
928
|
-
if (isBrowser$
|
|
928
|
+
if (isBrowser$5) {
|
|
929
929
|
var currentSheet;
|
|
930
930
|
var finalizingPlugins = [fe, function (element) {
|
|
931
931
|
if (!element.root) {
|
|
@@ -1390,8 +1390,8 @@
|
|
|
1390
1390
|
|
|
1391
1391
|
var hoistNonReactStatics_cjs = hoistNonReactStatics;
|
|
1392
1392
|
|
|
1393
|
-
var isBrowser$
|
|
1394
|
-
function getRegisteredStyles(registered, registeredStyles, classNames) {
|
|
1393
|
+
var isBrowser$4 = typeof document !== 'undefined';
|
|
1394
|
+
function getRegisteredStyles$1(registered, registeredStyles, classNames) {
|
|
1395
1395
|
var rawClassName = '';
|
|
1396
1396
|
classNames.split(' ').forEach(function (className) {
|
|
1397
1397
|
if (registered[className] !== undefined) {
|
|
@@ -1402,7 +1402,7 @@
|
|
|
1402
1402
|
});
|
|
1403
1403
|
return rawClassName;
|
|
1404
1404
|
}
|
|
1405
|
-
var insertStyles = function insertStyles(cache, serialized, isStringTag) {
|
|
1405
|
+
var insertStyles$1 = function insertStyles(cache, serialized, isStringTag) {
|
|
1406
1406
|
var className = cache.key + "-" + serialized.name;
|
|
1407
1407
|
|
|
1408
1408
|
if ( // we only need to add the styles to the registered cache if the
|
|
@@ -1414,7 +1414,7 @@
|
|
|
1414
1414
|
// in node since emotion-server relies on whether a style is in
|
|
1415
1415
|
// the registered cache to know whether a style is global or not
|
|
1416
1416
|
// also, note that this check will be dead code eliminated in the browser
|
|
1417
|
-
isBrowser$
|
|
1417
|
+
isBrowser$4 === false && cache.compat !== undefined) && cache.registered[className] === undefined) {
|
|
1418
1418
|
cache.registered[className] = serialized.styles;
|
|
1419
1419
|
}
|
|
1420
1420
|
|
|
@@ -1425,14 +1425,14 @@
|
|
|
1425
1425
|
do {
|
|
1426
1426
|
var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
|
|
1427
1427
|
|
|
1428
|
-
if (!isBrowser$
|
|
1428
|
+
if (!isBrowser$4 && maybeStyles !== undefined) {
|
|
1429
1429
|
stylesForSSR += maybeStyles;
|
|
1430
1430
|
}
|
|
1431
1431
|
|
|
1432
1432
|
current = current.next;
|
|
1433
1433
|
} while (current !== undefined);
|
|
1434
1434
|
|
|
1435
|
-
if (!isBrowser$
|
|
1435
|
+
if (!isBrowser$4 && stylesForSSR.length !== 0) {
|
|
1436
1436
|
return stylesForSSR;
|
|
1437
1437
|
}
|
|
1438
1438
|
}
|
|
@@ -1541,34 +1541,34 @@
|
|
|
1541
1541
|
strokeWidth: 1
|
|
1542
1542
|
};
|
|
1543
1543
|
|
|
1544
|
-
var ILLEGAL_ESCAPE_SEQUENCE_ERROR$
|
|
1545
|
-
var UNDEFINED_AS_OBJECT_KEY_ERROR = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).";
|
|
1546
|
-
var hyphenateRegex = /[A-Z]|^ms/g;
|
|
1547
|
-
var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
|
|
1544
|
+
var ILLEGAL_ESCAPE_SEQUENCE_ERROR$2 = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences";
|
|
1545
|
+
var UNDEFINED_AS_OBJECT_KEY_ERROR$1 = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).";
|
|
1546
|
+
var hyphenateRegex$1 = /[A-Z]|^ms/g;
|
|
1547
|
+
var animationRegex$1 = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
|
|
1548
1548
|
|
|
1549
|
-
var isCustomProperty = function isCustomProperty(property) {
|
|
1549
|
+
var isCustomProperty$1 = function isCustomProperty(property) {
|
|
1550
1550
|
return property.charCodeAt(1) === 45;
|
|
1551
1551
|
};
|
|
1552
1552
|
|
|
1553
|
-
var isProcessableValue = function isProcessableValue(value) {
|
|
1553
|
+
var isProcessableValue$1 = function isProcessableValue(value) {
|
|
1554
1554
|
return value != null && typeof value !== 'boolean';
|
|
1555
1555
|
};
|
|
1556
1556
|
|
|
1557
|
-
var processStyleName = /* #__PURE__ */memoize$1(function (styleName) {
|
|
1558
|
-
return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();
|
|
1557
|
+
var processStyleName$1 = /* #__PURE__ */memoize$1(function (styleName) {
|
|
1558
|
+
return isCustomProperty$1(styleName) ? styleName : styleName.replace(hyphenateRegex$1, '-$&').toLowerCase();
|
|
1559
1559
|
});
|
|
1560
1560
|
|
|
1561
|
-
var processStyleValue = function processStyleValue(key, value) {
|
|
1561
|
+
var processStyleValue$1 = function processStyleValue(key, value) {
|
|
1562
1562
|
switch (key) {
|
|
1563
1563
|
case 'animation':
|
|
1564
1564
|
case 'animationName':
|
|
1565
1565
|
{
|
|
1566
1566
|
if (typeof value === 'string') {
|
|
1567
|
-
return value.replace(animationRegex, function (match, p1, p2) {
|
|
1568
|
-
cursor = {
|
|
1567
|
+
return value.replace(animationRegex$1, function (match, p1, p2) {
|
|
1568
|
+
cursor$1 = {
|
|
1569
1569
|
name: p1,
|
|
1570
1570
|
styles: p2,
|
|
1571
|
-
next: cursor
|
|
1571
|
+
next: cursor$1
|
|
1572
1572
|
};
|
|
1573
1573
|
return p1;
|
|
1574
1574
|
});
|
|
@@ -1576,7 +1576,7 @@
|
|
|
1576
1576
|
}
|
|
1577
1577
|
}
|
|
1578
1578
|
|
|
1579
|
-
if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {
|
|
1579
|
+
if (unitlessKeys[key] !== 1 && !isCustomProperty$1(key) && typeof value === 'number' && value !== 0) {
|
|
1580
1580
|
return value + 'px';
|
|
1581
1581
|
}
|
|
1582
1582
|
|
|
@@ -1584,25 +1584,25 @@
|
|
|
1584
1584
|
};
|
|
1585
1585
|
|
|
1586
1586
|
{
|
|
1587
|
-
var contentValuePattern = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
|
|
1588
|
-
var contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];
|
|
1589
|
-
var oldProcessStyleValue = processStyleValue;
|
|
1590
|
-
var msPattern = /^-ms-/;
|
|
1591
|
-
var hyphenPattern = /-(.)/g;
|
|
1592
|
-
var hyphenatedCache = {};
|
|
1593
|
-
|
|
1594
|
-
processStyleValue = function processStyleValue(key, value) {
|
|
1587
|
+
var contentValuePattern$1 = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
|
|
1588
|
+
var contentValues$1 = ['normal', 'none', 'initial', 'inherit', 'unset'];
|
|
1589
|
+
var oldProcessStyleValue$1 = processStyleValue$1;
|
|
1590
|
+
var msPattern$1 = /^-ms-/;
|
|
1591
|
+
var hyphenPattern$1 = /-(.)/g;
|
|
1592
|
+
var hyphenatedCache$1 = {};
|
|
1593
|
+
|
|
1594
|
+
processStyleValue$1 = function processStyleValue(key, value) {
|
|
1595
1595
|
if (key === 'content') {
|
|
1596
|
-
if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '"' && value.charAt(0) !== "'")) {
|
|
1596
|
+
if (typeof value !== 'string' || contentValues$1.indexOf(value) === -1 && !contentValuePattern$1.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '"' && value.charAt(0) !== "'")) {
|
|
1597
1597
|
throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + value + "\"'`");
|
|
1598
1598
|
}
|
|
1599
1599
|
}
|
|
1600
1600
|
|
|
1601
|
-
var processed = oldProcessStyleValue(key, value);
|
|
1601
|
+
var processed = oldProcessStyleValue$1(key, value);
|
|
1602
1602
|
|
|
1603
|
-
if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {
|
|
1604
|
-
hyphenatedCache[key] = true;
|
|
1605
|
-
console.error("Using kebab-case for css properties in objects is not supported. Did you mean " + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {
|
|
1603
|
+
if (processed !== '' && !isCustomProperty$1(key) && key.indexOf('-') !== -1 && hyphenatedCache$1[key] === undefined) {
|
|
1604
|
+
hyphenatedCache$1[key] = true;
|
|
1605
|
+
console.error("Using kebab-case for css properties in objects is not supported. Did you mean " + key.replace(msPattern$1, 'ms-').replace(hyphenPattern$1, function (str, _char) {
|
|
1606
1606
|
return _char.toUpperCase();
|
|
1607
1607
|
}) + "?");
|
|
1608
1608
|
}
|
|
@@ -1611,7 +1611,7 @@
|
|
|
1611
1611
|
};
|
|
1612
1612
|
}
|
|
1613
1613
|
|
|
1614
|
-
function handleInterpolation(mergedProps, registered, interpolation) {
|
|
1614
|
+
function handleInterpolation$1(mergedProps, registered, interpolation) {
|
|
1615
1615
|
if (interpolation == null) {
|
|
1616
1616
|
return '';
|
|
1617
1617
|
}
|
|
@@ -1633,10 +1633,10 @@
|
|
|
1633
1633
|
case 'object':
|
|
1634
1634
|
{
|
|
1635
1635
|
if (interpolation.anim === 1) {
|
|
1636
|
-
cursor = {
|
|
1636
|
+
cursor$1 = {
|
|
1637
1637
|
name: interpolation.name,
|
|
1638
1638
|
styles: interpolation.styles,
|
|
1639
|
-
next: cursor
|
|
1639
|
+
next: cursor$1
|
|
1640
1640
|
};
|
|
1641
1641
|
return interpolation.name;
|
|
1642
1642
|
}
|
|
@@ -1648,10 +1648,10 @@
|
|
|
1648
1648
|
// not the most efficient thing ever but this is a pretty rare case
|
|
1649
1649
|
// and there will be very few iterations of this generally
|
|
1650
1650
|
while (next !== undefined) {
|
|
1651
|
-
cursor = {
|
|
1651
|
+
cursor$1 = {
|
|
1652
1652
|
name: next.name,
|
|
1653
1653
|
styles: next.styles,
|
|
1654
|
-
next: cursor
|
|
1654
|
+
next: cursor$1
|
|
1655
1655
|
};
|
|
1656
1656
|
next = next.next;
|
|
1657
1657
|
}
|
|
@@ -1666,16 +1666,16 @@
|
|
|
1666
1666
|
return styles;
|
|
1667
1667
|
}
|
|
1668
1668
|
|
|
1669
|
-
return createStringFromObject(mergedProps, registered, interpolation);
|
|
1669
|
+
return createStringFromObject$1(mergedProps, registered, interpolation);
|
|
1670
1670
|
}
|
|
1671
1671
|
|
|
1672
1672
|
case 'function':
|
|
1673
1673
|
{
|
|
1674
1674
|
if (mergedProps !== undefined) {
|
|
1675
|
-
var previousCursor = cursor;
|
|
1675
|
+
var previousCursor = cursor$1;
|
|
1676
1676
|
var result = interpolation(mergedProps);
|
|
1677
|
-
cursor = previousCursor;
|
|
1678
|
-
return handleInterpolation(mergedProps, registered, result);
|
|
1677
|
+
cursor$1 = previousCursor;
|
|
1678
|
+
return handleInterpolation$1(mergedProps, registered, result);
|
|
1679
1679
|
} else {
|
|
1680
1680
|
console.error('Functions that are interpolated in css calls will be stringified.\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\n' + 'It can be called directly with props or interpolated in a styled call like this\n' + "let SomeComponent = styled('div')`${dynamicStyle}`");
|
|
1681
1681
|
}
|
|
@@ -1686,7 +1686,7 @@
|
|
|
1686
1686
|
case 'string':
|
|
1687
1687
|
{
|
|
1688
1688
|
var matched = [];
|
|
1689
|
-
var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {
|
|
1689
|
+
var replaced = interpolation.replace(animationRegex$1, function (match, p1, p2) {
|
|
1690
1690
|
var fakeVarName = "animation" + matched.length;
|
|
1691
1691
|
matched.push("const " + fakeVarName + " = keyframes`" + p2.replace(/^@keyframes animation-\w+/, '') + "`");
|
|
1692
1692
|
return "${" + fakeVarName + "}";
|
|
@@ -1709,12 +1709,12 @@
|
|
|
1709
1709
|
return cached !== undefined ? cached : interpolation;
|
|
1710
1710
|
}
|
|
1711
1711
|
|
|
1712
|
-
function createStringFromObject(mergedProps, registered, obj) {
|
|
1712
|
+
function createStringFromObject$1(mergedProps, registered, obj) {
|
|
1713
1713
|
var string = '';
|
|
1714
1714
|
|
|
1715
1715
|
if (Array.isArray(obj)) {
|
|
1716
1716
|
for (var i = 0; i < obj.length; i++) {
|
|
1717
|
-
string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
|
|
1717
|
+
string += handleInterpolation$1(mergedProps, registered, obj[i]) + ";";
|
|
1718
1718
|
}
|
|
1719
1719
|
} else {
|
|
1720
1720
|
for (var _key in obj) {
|
|
@@ -1723,8 +1723,8 @@
|
|
|
1723
1723
|
if (typeof value !== 'object') {
|
|
1724
1724
|
if (registered != null && registered[value] !== undefined) {
|
|
1725
1725
|
string += _key + "{" + registered[value] + "}";
|
|
1726
|
-
} else if (isProcessableValue(value)) {
|
|
1727
|
-
string += processStyleName(_key) + ":" + processStyleValue(_key, value) + ";";
|
|
1726
|
+
} else if (isProcessableValue$1(value)) {
|
|
1727
|
+
string += processStyleName$1(_key) + ":" + processStyleValue$1(_key, value) + ";";
|
|
1728
1728
|
}
|
|
1729
1729
|
} else {
|
|
1730
1730
|
if (_key === 'NO_COMPONENT_SELECTOR' && "development" !== 'production') {
|
|
@@ -1733,25 +1733,25 @@
|
|
|
1733
1733
|
|
|
1734
1734
|
if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {
|
|
1735
1735
|
for (var _i = 0; _i < value.length; _i++) {
|
|
1736
|
-
if (isProcessableValue(value[_i])) {
|
|
1737
|
-
string += processStyleName(_key) + ":" + processStyleValue(_key, value[_i]) + ";";
|
|
1736
|
+
if (isProcessableValue$1(value[_i])) {
|
|
1737
|
+
string += processStyleName$1(_key) + ":" + processStyleValue$1(_key, value[_i]) + ";";
|
|
1738
1738
|
}
|
|
1739
1739
|
}
|
|
1740
1740
|
} else {
|
|
1741
|
-
var interpolated = handleInterpolation(mergedProps, registered, value);
|
|
1741
|
+
var interpolated = handleInterpolation$1(mergedProps, registered, value);
|
|
1742
1742
|
|
|
1743
1743
|
switch (_key) {
|
|
1744
1744
|
case 'animation':
|
|
1745
1745
|
case 'animationName':
|
|
1746
1746
|
{
|
|
1747
|
-
string += processStyleName(_key) + ":" + interpolated + ";";
|
|
1747
|
+
string += processStyleName$1(_key) + ":" + interpolated + ";";
|
|
1748
1748
|
break;
|
|
1749
1749
|
}
|
|
1750
1750
|
|
|
1751
1751
|
default:
|
|
1752
1752
|
{
|
|
1753
1753
|
if (_key === 'undefined') {
|
|
1754
|
-
console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);
|
|
1754
|
+
console.error(UNDEFINED_AS_OBJECT_KEY_ERROR$1);
|
|
1755
1755
|
}
|
|
1756
1756
|
|
|
1757
1757
|
string += _key + "{" + interpolated + "}";
|
|
@@ -1765,32 +1765,32 @@
|
|
|
1765
1765
|
return string;
|
|
1766
1766
|
}
|
|
1767
1767
|
|
|
1768
|
-
var labelPattern = /label:\s*([^\s;\n{]+)\s*(;|$)/g;
|
|
1769
|
-
var sourceMapPattern;
|
|
1768
|
+
var labelPattern$1 = /label:\s*([^\s;\n{]+)\s*(;|$)/g;
|
|
1769
|
+
var sourceMapPattern$1;
|
|
1770
1770
|
|
|
1771
1771
|
{
|
|
1772
|
-
sourceMapPattern = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;
|
|
1772
|
+
sourceMapPattern$1 = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;
|
|
1773
1773
|
} // this is the cursor for keyframes
|
|
1774
1774
|
// keyframes are stored on the SerializedStyles object as a linked list
|
|
1775
1775
|
|
|
1776
1776
|
|
|
1777
|
-
var cursor;
|
|
1778
|
-
var serializeStyles = function serializeStyles(args, registered, mergedProps) {
|
|
1777
|
+
var cursor$1;
|
|
1778
|
+
var serializeStyles$1 = function serializeStyles(args, registered, mergedProps) {
|
|
1779
1779
|
if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {
|
|
1780
1780
|
return args[0];
|
|
1781
1781
|
}
|
|
1782
1782
|
|
|
1783
1783
|
var stringMode = true;
|
|
1784
1784
|
var styles = '';
|
|
1785
|
-
cursor = undefined;
|
|
1785
|
+
cursor$1 = undefined;
|
|
1786
1786
|
var strings = args[0];
|
|
1787
1787
|
|
|
1788
1788
|
if (strings == null || strings.raw === undefined) {
|
|
1789
1789
|
stringMode = false;
|
|
1790
|
-
styles += handleInterpolation(mergedProps, registered, strings);
|
|
1790
|
+
styles += handleInterpolation$1(mergedProps, registered, strings);
|
|
1791
1791
|
} else {
|
|
1792
1792
|
if (strings[0] === undefined) {
|
|
1793
|
-
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR$
|
|
1793
|
+
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR$2);
|
|
1794
1794
|
}
|
|
1795
1795
|
|
|
1796
1796
|
styles += strings[0];
|
|
@@ -1798,11 +1798,11 @@
|
|
|
1798
1798
|
|
|
1799
1799
|
|
|
1800
1800
|
for (var i = 1; i < args.length; i++) {
|
|
1801
|
-
styles += handleInterpolation(mergedProps, registered, args[i]);
|
|
1801
|
+
styles += handleInterpolation$1(mergedProps, registered, args[i]);
|
|
1802
1802
|
|
|
1803
1803
|
if (stringMode) {
|
|
1804
1804
|
if (strings[i] === undefined) {
|
|
1805
|
-
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR$
|
|
1805
|
+
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR$2);
|
|
1806
1806
|
}
|
|
1807
1807
|
|
|
1808
1808
|
styles += strings[i];
|
|
@@ -1812,18 +1812,18 @@
|
|
|
1812
1812
|
var sourceMap;
|
|
1813
1813
|
|
|
1814
1814
|
{
|
|
1815
|
-
styles = styles.replace(sourceMapPattern, function (match) {
|
|
1815
|
+
styles = styles.replace(sourceMapPattern$1, function (match) {
|
|
1816
1816
|
sourceMap = match;
|
|
1817
1817
|
return '';
|
|
1818
1818
|
});
|
|
1819
1819
|
} // using a global regex with .exec is stateful so lastIndex has to be reset each time
|
|
1820
1820
|
|
|
1821
1821
|
|
|
1822
|
-
labelPattern.lastIndex = 0;
|
|
1822
|
+
labelPattern$1.lastIndex = 0;
|
|
1823
1823
|
var identifierName = '';
|
|
1824
1824
|
var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5
|
|
1825
1825
|
|
|
1826
|
-
while ((match = labelPattern.exec(styles)) !== null) {
|
|
1826
|
+
while ((match = labelPattern$1.exec(styles)) !== null) {
|
|
1827
1827
|
identifierName += '-' + // $FlowFixMe we know it's not null
|
|
1828
1828
|
match[1];
|
|
1829
1829
|
}
|
|
@@ -1836,7 +1836,7 @@
|
|
|
1836
1836
|
name: name,
|
|
1837
1837
|
styles: styles,
|
|
1838
1838
|
map: sourceMap,
|
|
1839
|
-
next: cursor,
|
|
1839
|
+
next: cursor$1,
|
|
1840
1840
|
toString: function toString() {
|
|
1841
1841
|
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
1842
1842
|
}
|
|
@@ -1844,7 +1844,7 @@
|
|
|
1844
1844
|
}
|
|
1845
1845
|
};
|
|
1846
1846
|
|
|
1847
|
-
var isBrowser$
|
|
1847
|
+
var isBrowser$3 = typeof document !== 'undefined';
|
|
1848
1848
|
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
1849
1849
|
|
|
1850
1850
|
var EmotionCacheContext = /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
@@ -1872,7 +1872,7 @@
|
|
|
1872
1872
|
});
|
|
1873
1873
|
};
|
|
1874
1874
|
|
|
1875
|
-
if (!isBrowser$
|
|
1875
|
+
if (!isBrowser$3) {
|
|
1876
1876
|
withEmotionCache = function withEmotionCache(func) {
|
|
1877
1877
|
return function (props) {
|
|
1878
1878
|
var cache = React.useContext(EmotionCacheContext);
|
|
@@ -1918,22 +1918,22 @@
|
|
|
1918
1918
|
var className = '';
|
|
1919
1919
|
|
|
1920
1920
|
if (typeof props.className === 'string') {
|
|
1921
|
-
className = getRegisteredStyles(cache.registered, registeredStyles, props.className);
|
|
1921
|
+
className = getRegisteredStyles$1(cache.registered, registeredStyles, props.className);
|
|
1922
1922
|
} else if (props.className != null) {
|
|
1923
1923
|
className = props.className + " ";
|
|
1924
1924
|
}
|
|
1925
1925
|
|
|
1926
|
-
var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext$2));
|
|
1926
|
+
var serialized = serializeStyles$1(registeredStyles, undefined, React.useContext(ThemeContext$2));
|
|
1927
1927
|
|
|
1928
1928
|
if (serialized.name.indexOf('-') === -1) {
|
|
1929
1929
|
var labelFromStack = props[labelPropName];
|
|
1930
1930
|
|
|
1931
1931
|
if (labelFromStack) {
|
|
1932
|
-
serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);
|
|
1932
|
+
serialized = serializeStyles$1([serialized, 'label:' + labelFromStack + ';']);
|
|
1933
1933
|
}
|
|
1934
1934
|
}
|
|
1935
1935
|
|
|
1936
|
-
var rules = insertStyles(cache, serialized, typeof type === 'string');
|
|
1936
|
+
var rules = insertStyles$1(cache, serialized, typeof type === 'string');
|
|
1937
1937
|
className += cache.key + "-" + serialized.name;
|
|
1938
1938
|
var newProps = {};
|
|
1939
1939
|
|
|
@@ -1947,7 +1947,7 @@
|
|
|
1947
1947
|
newProps.className = className;
|
|
1948
1948
|
var ele = /*#__PURE__*/React.createElement(type, newProps);
|
|
1949
1949
|
|
|
1950
|
-
if (!isBrowser$
|
|
1950
|
+
if (!isBrowser$3 && rules !== undefined) {
|
|
1951
1951
|
var _ref;
|
|
1952
1952
|
|
|
1953
1953
|
var serializedNames = serialized.name;
|
|
@@ -2061,9 +2061,9 @@
|
|
|
2061
2061
|
}
|
|
2062
2062
|
|
|
2063
2063
|
var styles = props.styles;
|
|
2064
|
-
var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext$2));
|
|
2064
|
+
var serialized = serializeStyles$1([styles], undefined, React.useContext(ThemeContext$2));
|
|
2065
2065
|
|
|
2066
|
-
if (!isBrowser$
|
|
2066
|
+
if (!isBrowser$3) {
|
|
2067
2067
|
var _ref;
|
|
2068
2068
|
|
|
2069
2069
|
var serializedNames = serialized.name;
|
|
@@ -2136,7 +2136,7 @@
|
|
|
2136
2136
|
|
|
2137
2137
|
if (serialized.next !== undefined) {
|
|
2138
2138
|
// insert keyframes
|
|
2139
|
-
insertStyles(cache, serialized.next, true);
|
|
2139
|
+
insertStyles$1(cache, serialized.next, true);
|
|
2140
2140
|
}
|
|
2141
2141
|
|
|
2142
2142
|
if (sheet.tags.length) {
|
|
@@ -2160,7 +2160,7 @@
|
|
|
2160
2160
|
args[_key] = arguments[_key];
|
|
2161
2161
|
}
|
|
2162
2162
|
|
|
2163
|
-
return serializeStyles(args);
|
|
2163
|
+
return serializeStyles$1(args);
|
|
2164
2164
|
}
|
|
2165
2165
|
|
|
2166
2166
|
var keyframes = function keyframes() {
|
|
@@ -2230,7 +2230,7 @@
|
|
|
2230
2230
|
|
|
2231
2231
|
function merge$1(registered, css, className) {
|
|
2232
2232
|
var registeredStyles = [];
|
|
2233
|
-
var rawClassName = getRegisteredStyles(registered, registeredStyles, className);
|
|
2233
|
+
var rawClassName = getRegisteredStyles$1(registered, registeredStyles, className);
|
|
2234
2234
|
|
|
2235
2235
|
if (registeredStyles.length < 2) {
|
|
2236
2236
|
return className;
|
|
@@ -2253,19 +2253,19 @@
|
|
|
2253
2253
|
args[_key] = arguments[_key];
|
|
2254
2254
|
}
|
|
2255
2255
|
|
|
2256
|
-
var serialized = serializeStyles(args, cache.registered);
|
|
2256
|
+
var serialized = serializeStyles$1(args, cache.registered);
|
|
2257
2257
|
|
|
2258
|
-
if (isBrowser$
|
|
2259
|
-
insertStyles(cache, serialized, false);
|
|
2258
|
+
if (isBrowser$3) {
|
|
2259
|
+
insertStyles$1(cache, serialized, false);
|
|
2260
2260
|
} else {
|
|
2261
|
-
var res = insertStyles(cache, serialized, false);
|
|
2261
|
+
var res = insertStyles$1(cache, serialized, false);
|
|
2262
2262
|
|
|
2263
2263
|
if (res !== undefined) {
|
|
2264
2264
|
rules += res;
|
|
2265
2265
|
}
|
|
2266
2266
|
}
|
|
2267
2267
|
|
|
2268
|
-
if (!isBrowser$
|
|
2268
|
+
if (!isBrowser$3) {
|
|
2269
2269
|
serializedHashes += " " + serialized.name;
|
|
2270
2270
|
}
|
|
2271
2271
|
|
|
@@ -2292,7 +2292,7 @@
|
|
|
2292
2292
|
var ele = props.children(content);
|
|
2293
2293
|
hasRendered = true;
|
|
2294
2294
|
|
|
2295
|
-
if (!isBrowser$
|
|
2295
|
+
if (!isBrowser$3 && rules.length !== 0) {
|
|
2296
2296
|
var _ref;
|
|
2297
2297
|
|
|
2298
2298
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("style", (_ref = {}, _ref["data-emotion"] = cache.key + " " + serializedHashes.substring(1), _ref.dangerouslySetInnerHTML = {
|
|
@@ -2308,12 +2308,12 @@
|
|
|
2308
2308
|
}
|
|
2309
2309
|
|
|
2310
2310
|
{
|
|
2311
|
-
var isBrowser$
|
|
2311
|
+
var isBrowser$2 = typeof document !== 'undefined'; // #1727 for some reason Jest evaluates modules twice if some consuming module gets mocked with jest.mock
|
|
2312
2312
|
|
|
2313
2313
|
var isJest = typeof jest !== 'undefined';
|
|
2314
2314
|
|
|
2315
|
-
if (isBrowser$
|
|
2316
|
-
var globalContext = isBrowser$
|
|
2315
|
+
if (isBrowser$2 && !isJest) {
|
|
2316
|
+
var globalContext = isBrowser$2 ? window : global$1;
|
|
2317
2317
|
var globalKey = "__EMOTION_REACT_" + pkg.version.split('.')[0] + "__";
|
|
2318
2318
|
|
|
2319
2319
|
if (globalContext[globalKey]) {
|
|
@@ -2324,6 +2324,357 @@
|
|
|
2324
2324
|
}
|
|
2325
2325
|
}
|
|
2326
2326
|
|
|
2327
|
+
var isBrowser$1 = typeof document !== 'undefined';
|
|
2328
|
+
function getRegisteredStyles(registered, registeredStyles, classNames) {
|
|
2329
|
+
var rawClassName = '';
|
|
2330
|
+
classNames.split(' ').forEach(function (className) {
|
|
2331
|
+
if (registered[className] !== undefined) {
|
|
2332
|
+
registeredStyles.push(registered[className] + ";");
|
|
2333
|
+
} else {
|
|
2334
|
+
rawClassName += className + " ";
|
|
2335
|
+
}
|
|
2336
|
+
});
|
|
2337
|
+
return rawClassName;
|
|
2338
|
+
}
|
|
2339
|
+
var insertStyles = function insertStyles(cache, serialized, isStringTag) {
|
|
2340
|
+
var className = cache.key + "-" + serialized.name;
|
|
2341
|
+
|
|
2342
|
+
if ( // we only need to add the styles to the registered cache if the
|
|
2343
|
+
// class name could be used further down
|
|
2344
|
+
// the tree but if it's a string tag, we know it won't
|
|
2345
|
+
// so we don't have to add it to registered cache.
|
|
2346
|
+
// this improves memory usage since we can avoid storing the whole style string
|
|
2347
|
+
(isStringTag === false || // we need to always store it if we're in compat mode and
|
|
2348
|
+
// in node since emotion-server relies on whether a style is in
|
|
2349
|
+
// the registered cache to know whether a style is global or not
|
|
2350
|
+
// also, note that this check will be dead code eliminated in the browser
|
|
2351
|
+
isBrowser$1 === false && cache.compat !== undefined) && cache.registered[className] === undefined) {
|
|
2352
|
+
cache.registered[className] = serialized.styles;
|
|
2353
|
+
}
|
|
2354
|
+
|
|
2355
|
+
if (cache.inserted[serialized.name] === undefined) {
|
|
2356
|
+
var stylesForSSR = '';
|
|
2357
|
+
var current = serialized;
|
|
2358
|
+
|
|
2359
|
+
do {
|
|
2360
|
+
var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
|
|
2361
|
+
|
|
2362
|
+
if (!isBrowser$1 && maybeStyles !== undefined) {
|
|
2363
|
+
stylesForSSR += maybeStyles;
|
|
2364
|
+
}
|
|
2365
|
+
|
|
2366
|
+
current = current.next;
|
|
2367
|
+
} while (current !== undefined);
|
|
2368
|
+
|
|
2369
|
+
if (!isBrowser$1 && stylesForSSR.length !== 0) {
|
|
2370
|
+
return stylesForSSR;
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
};
|
|
2374
|
+
|
|
2375
|
+
var ILLEGAL_ESCAPE_SEQUENCE_ERROR$1 = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences";
|
|
2376
|
+
var UNDEFINED_AS_OBJECT_KEY_ERROR = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).";
|
|
2377
|
+
var hyphenateRegex = /[A-Z]|^ms/g;
|
|
2378
|
+
var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
|
|
2379
|
+
|
|
2380
|
+
var isCustomProperty = function isCustomProperty(property) {
|
|
2381
|
+
return property.charCodeAt(1) === 45;
|
|
2382
|
+
};
|
|
2383
|
+
|
|
2384
|
+
var isProcessableValue = function isProcessableValue(value) {
|
|
2385
|
+
return value != null && typeof value !== 'boolean';
|
|
2386
|
+
};
|
|
2387
|
+
|
|
2388
|
+
var processStyleName = /* #__PURE__ */memoize$1(function (styleName) {
|
|
2389
|
+
return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();
|
|
2390
|
+
});
|
|
2391
|
+
|
|
2392
|
+
var processStyleValue = function processStyleValue(key, value) {
|
|
2393
|
+
switch (key) {
|
|
2394
|
+
case 'animation':
|
|
2395
|
+
case 'animationName':
|
|
2396
|
+
{
|
|
2397
|
+
if (typeof value === 'string') {
|
|
2398
|
+
return value.replace(animationRegex, function (match, p1, p2) {
|
|
2399
|
+
cursor = {
|
|
2400
|
+
name: p1,
|
|
2401
|
+
styles: p2,
|
|
2402
|
+
next: cursor
|
|
2403
|
+
};
|
|
2404
|
+
return p1;
|
|
2405
|
+
});
|
|
2406
|
+
}
|
|
2407
|
+
}
|
|
2408
|
+
}
|
|
2409
|
+
|
|
2410
|
+
if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {
|
|
2411
|
+
return value + 'px';
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2414
|
+
return value;
|
|
2415
|
+
};
|
|
2416
|
+
|
|
2417
|
+
{
|
|
2418
|
+
var contentValuePattern = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
|
|
2419
|
+
var contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];
|
|
2420
|
+
var oldProcessStyleValue = processStyleValue;
|
|
2421
|
+
var msPattern = /^-ms-/;
|
|
2422
|
+
var hyphenPattern = /-(.)/g;
|
|
2423
|
+
var hyphenatedCache = {};
|
|
2424
|
+
|
|
2425
|
+
processStyleValue = function processStyleValue(key, value) {
|
|
2426
|
+
if (key === 'content') {
|
|
2427
|
+
if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '"' && value.charAt(0) !== "'")) {
|
|
2428
|
+
throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + value + "\"'`");
|
|
2429
|
+
}
|
|
2430
|
+
}
|
|
2431
|
+
|
|
2432
|
+
var processed = oldProcessStyleValue(key, value);
|
|
2433
|
+
|
|
2434
|
+
if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {
|
|
2435
|
+
hyphenatedCache[key] = true;
|
|
2436
|
+
console.error("Using kebab-case for css properties in objects is not supported. Did you mean " + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {
|
|
2437
|
+
return _char.toUpperCase();
|
|
2438
|
+
}) + "?");
|
|
2439
|
+
}
|
|
2440
|
+
|
|
2441
|
+
return processed;
|
|
2442
|
+
};
|
|
2443
|
+
}
|
|
2444
|
+
|
|
2445
|
+
function handleInterpolation(mergedProps, registered, interpolation) {
|
|
2446
|
+
if (interpolation == null) {
|
|
2447
|
+
return '';
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
if (interpolation.__emotion_styles !== undefined) {
|
|
2451
|
+
if (interpolation.toString() === 'NO_COMPONENT_SELECTOR') {
|
|
2452
|
+
throw new Error('Component selectors can only be used in conjunction with @emotion/babel-plugin.');
|
|
2453
|
+
}
|
|
2454
|
+
|
|
2455
|
+
return interpolation;
|
|
2456
|
+
}
|
|
2457
|
+
|
|
2458
|
+
switch (typeof interpolation) {
|
|
2459
|
+
case 'boolean':
|
|
2460
|
+
{
|
|
2461
|
+
return '';
|
|
2462
|
+
}
|
|
2463
|
+
|
|
2464
|
+
case 'object':
|
|
2465
|
+
{
|
|
2466
|
+
if (interpolation.anim === 1) {
|
|
2467
|
+
cursor = {
|
|
2468
|
+
name: interpolation.name,
|
|
2469
|
+
styles: interpolation.styles,
|
|
2470
|
+
next: cursor
|
|
2471
|
+
};
|
|
2472
|
+
return interpolation.name;
|
|
2473
|
+
}
|
|
2474
|
+
|
|
2475
|
+
if (interpolation.styles !== undefined) {
|
|
2476
|
+
var next = interpolation.next;
|
|
2477
|
+
|
|
2478
|
+
if (next !== undefined) {
|
|
2479
|
+
// not the most efficient thing ever but this is a pretty rare case
|
|
2480
|
+
// and there will be very few iterations of this generally
|
|
2481
|
+
while (next !== undefined) {
|
|
2482
|
+
cursor = {
|
|
2483
|
+
name: next.name,
|
|
2484
|
+
styles: next.styles,
|
|
2485
|
+
next: cursor
|
|
2486
|
+
};
|
|
2487
|
+
next = next.next;
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2490
|
+
|
|
2491
|
+
var styles = interpolation.styles + ";";
|
|
2492
|
+
|
|
2493
|
+
if (interpolation.map !== undefined) {
|
|
2494
|
+
styles += interpolation.map;
|
|
2495
|
+
}
|
|
2496
|
+
|
|
2497
|
+
return styles;
|
|
2498
|
+
}
|
|
2499
|
+
|
|
2500
|
+
return createStringFromObject(mergedProps, registered, interpolation);
|
|
2501
|
+
}
|
|
2502
|
+
|
|
2503
|
+
case 'function':
|
|
2504
|
+
{
|
|
2505
|
+
if (mergedProps !== undefined) {
|
|
2506
|
+
var previousCursor = cursor;
|
|
2507
|
+
var result = interpolation(mergedProps);
|
|
2508
|
+
cursor = previousCursor;
|
|
2509
|
+
return handleInterpolation(mergedProps, registered, result);
|
|
2510
|
+
} else {
|
|
2511
|
+
console.error('Functions that are interpolated in css calls will be stringified.\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\n' + 'It can be called directly with props or interpolated in a styled call like this\n' + "let SomeComponent = styled('div')`${dynamicStyle}`");
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2514
|
+
break;
|
|
2515
|
+
}
|
|
2516
|
+
|
|
2517
|
+
case 'string':
|
|
2518
|
+
{
|
|
2519
|
+
var matched = [];
|
|
2520
|
+
var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {
|
|
2521
|
+
var fakeVarName = "animation" + matched.length;
|
|
2522
|
+
matched.push("const " + fakeVarName + " = keyframes`" + p2.replace(/^@keyframes animation-\w+/, '') + "`");
|
|
2523
|
+
return "${" + fakeVarName + "}";
|
|
2524
|
+
});
|
|
2525
|
+
|
|
2526
|
+
if (matched.length) {
|
|
2527
|
+
console.error('`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\n' + 'Instead of doing this:\n\n' + [].concat(matched, ["`" + replaced + "`"]).join('\n') + '\n\nYou should wrap it with `css` like this:\n\n' + ("css`" + replaced + "`"));
|
|
2528
|
+
}
|
|
2529
|
+
}
|
|
2530
|
+
|
|
2531
|
+
break;
|
|
2532
|
+
} // finalize string values (regular strings and functions interpolated into css calls)
|
|
2533
|
+
|
|
2534
|
+
|
|
2535
|
+
if (registered == null) {
|
|
2536
|
+
return interpolation;
|
|
2537
|
+
}
|
|
2538
|
+
|
|
2539
|
+
var cached = registered[interpolation];
|
|
2540
|
+
return cached !== undefined ? cached : interpolation;
|
|
2541
|
+
}
|
|
2542
|
+
|
|
2543
|
+
function createStringFromObject(mergedProps, registered, obj) {
|
|
2544
|
+
var string = '';
|
|
2545
|
+
|
|
2546
|
+
if (Array.isArray(obj)) {
|
|
2547
|
+
for (var i = 0; i < obj.length; i++) {
|
|
2548
|
+
string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
|
|
2549
|
+
}
|
|
2550
|
+
} else {
|
|
2551
|
+
for (var _key in obj) {
|
|
2552
|
+
var value = obj[_key];
|
|
2553
|
+
|
|
2554
|
+
if (typeof value !== 'object') {
|
|
2555
|
+
if (registered != null && registered[value] !== undefined) {
|
|
2556
|
+
string += _key + "{" + registered[value] + "}";
|
|
2557
|
+
} else if (isProcessableValue(value)) {
|
|
2558
|
+
string += processStyleName(_key) + ":" + processStyleValue(_key, value) + ";";
|
|
2559
|
+
}
|
|
2560
|
+
} else {
|
|
2561
|
+
if (_key === 'NO_COMPONENT_SELECTOR' && "development" !== 'production') {
|
|
2562
|
+
throw new Error('Component selectors can only be used in conjunction with @emotion/babel-plugin.');
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {
|
|
2566
|
+
for (var _i = 0; _i < value.length; _i++) {
|
|
2567
|
+
if (isProcessableValue(value[_i])) {
|
|
2568
|
+
string += processStyleName(_key) + ":" + processStyleValue(_key, value[_i]) + ";";
|
|
2569
|
+
}
|
|
2570
|
+
}
|
|
2571
|
+
} else {
|
|
2572
|
+
var interpolated = handleInterpolation(mergedProps, registered, value);
|
|
2573
|
+
|
|
2574
|
+
switch (_key) {
|
|
2575
|
+
case 'animation':
|
|
2576
|
+
case 'animationName':
|
|
2577
|
+
{
|
|
2578
|
+
string += processStyleName(_key) + ":" + interpolated + ";";
|
|
2579
|
+
break;
|
|
2580
|
+
}
|
|
2581
|
+
|
|
2582
|
+
default:
|
|
2583
|
+
{
|
|
2584
|
+
if (_key === 'undefined') {
|
|
2585
|
+
console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);
|
|
2586
|
+
}
|
|
2587
|
+
|
|
2588
|
+
string += _key + "{" + interpolated + "}";
|
|
2589
|
+
}
|
|
2590
|
+
}
|
|
2591
|
+
}
|
|
2592
|
+
}
|
|
2593
|
+
}
|
|
2594
|
+
}
|
|
2595
|
+
|
|
2596
|
+
return string;
|
|
2597
|
+
}
|
|
2598
|
+
|
|
2599
|
+
var labelPattern = /label:\s*([^\s;\n{]+)\s*(;|$)/g;
|
|
2600
|
+
var sourceMapPattern;
|
|
2601
|
+
|
|
2602
|
+
{
|
|
2603
|
+
sourceMapPattern = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;
|
|
2604
|
+
} // this is the cursor for keyframes
|
|
2605
|
+
// keyframes are stored on the SerializedStyles object as a linked list
|
|
2606
|
+
|
|
2607
|
+
|
|
2608
|
+
var cursor;
|
|
2609
|
+
var serializeStyles = function serializeStyles(args, registered, mergedProps) {
|
|
2610
|
+
if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {
|
|
2611
|
+
return args[0];
|
|
2612
|
+
}
|
|
2613
|
+
|
|
2614
|
+
var stringMode = true;
|
|
2615
|
+
var styles = '';
|
|
2616
|
+
cursor = undefined;
|
|
2617
|
+
var strings = args[0];
|
|
2618
|
+
|
|
2619
|
+
if (strings == null || strings.raw === undefined) {
|
|
2620
|
+
stringMode = false;
|
|
2621
|
+
styles += handleInterpolation(mergedProps, registered, strings);
|
|
2622
|
+
} else {
|
|
2623
|
+
if (strings[0] === undefined) {
|
|
2624
|
+
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR$1);
|
|
2625
|
+
}
|
|
2626
|
+
|
|
2627
|
+
styles += strings[0];
|
|
2628
|
+
} // we start at 1 since we've already handled the first arg
|
|
2629
|
+
|
|
2630
|
+
|
|
2631
|
+
for (var i = 1; i < args.length; i++) {
|
|
2632
|
+
styles += handleInterpolation(mergedProps, registered, args[i]);
|
|
2633
|
+
|
|
2634
|
+
if (stringMode) {
|
|
2635
|
+
if (strings[i] === undefined) {
|
|
2636
|
+
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR$1);
|
|
2637
|
+
}
|
|
2638
|
+
|
|
2639
|
+
styles += strings[i];
|
|
2640
|
+
}
|
|
2641
|
+
}
|
|
2642
|
+
|
|
2643
|
+
var sourceMap;
|
|
2644
|
+
|
|
2645
|
+
{
|
|
2646
|
+
styles = styles.replace(sourceMapPattern, function (match) {
|
|
2647
|
+
sourceMap = match;
|
|
2648
|
+
return '';
|
|
2649
|
+
});
|
|
2650
|
+
} // using a global regex with .exec is stateful so lastIndex has to be reset each time
|
|
2651
|
+
|
|
2652
|
+
|
|
2653
|
+
labelPattern.lastIndex = 0;
|
|
2654
|
+
var identifierName = '';
|
|
2655
|
+
var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5
|
|
2656
|
+
|
|
2657
|
+
while ((match = labelPattern.exec(styles)) !== null) {
|
|
2658
|
+
identifierName += '-' + // $FlowFixMe we know it's not null
|
|
2659
|
+
match[1];
|
|
2660
|
+
}
|
|
2661
|
+
|
|
2662
|
+
var name = murmur2(styles) + identifierName;
|
|
2663
|
+
|
|
2664
|
+
{
|
|
2665
|
+
// $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)
|
|
2666
|
+
return {
|
|
2667
|
+
name: name,
|
|
2668
|
+
styles: styles,
|
|
2669
|
+
map: sourceMap,
|
|
2670
|
+
next: cursor,
|
|
2671
|
+
toString: function toString() {
|
|
2672
|
+
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
2673
|
+
}
|
|
2674
|
+
};
|
|
2675
|
+
}
|
|
2676
|
+
};
|
|
2677
|
+
|
|
2327
2678
|
var testOmitPropsOnStringTag = isPropValid;
|
|
2328
2679
|
|
|
2329
2680
|
var testOmitPropsOnComponent = function testOmitPropsOnComponent(key) {
|
|
@@ -4555,7 +4906,7 @@
|
|
|
4555
4906
|
/**
|
|
4556
4907
|
* By default, the styles are injected last in the <head> element of the page.
|
|
4557
4908
|
* As a result, they gain more specificity than any other style sheet.
|
|
4558
|
-
* If you want to override
|
|
4909
|
+
* If you want to override MUI's styles, set this prop.
|
|
4559
4910
|
*/
|
|
4560
4911
|
injectFirst: propTypes.bool
|
|
4561
4912
|
} ;
|
|
@@ -4587,9 +4938,9 @@
|
|
|
4587
4938
|
const component = typeof tag === 'string' ? `"${tag}"` : 'component';
|
|
4588
4939
|
|
|
4589
4940
|
if (styles.length === 0) {
|
|
4590
|
-
console.error([`
|
|
4941
|
+
console.error([`MUI: Seems like you called \`styled(${component})()\` without a \`style\` argument.`, 'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join('\n'));
|
|
4591
4942
|
} else if (styles.some(style => style === undefined)) {
|
|
4592
|
-
console.error(`
|
|
4943
|
+
console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);
|
|
4593
4944
|
}
|
|
4594
4945
|
|
|
4595
4946
|
return stylesFactory(...styles);
|
|
@@ -4673,7 +5024,7 @@
|
|
|
4673
5024
|
}
|
|
4674
5025
|
|
|
4675
5026
|
if (warningHint !== undefined) {
|
|
4676
|
-
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an element that can hold a ref. ${warningHint} ` + 'For more information see https://
|
|
5027
|
+
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an element that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide');
|
|
4677
5028
|
}
|
|
4678
5029
|
|
|
4679
5030
|
return null;
|
|
@@ -4719,7 +5070,7 @@
|
|
|
4719
5070
|
}
|
|
4720
5071
|
|
|
4721
5072
|
if (warningHint !== undefined) {
|
|
4722
|
-
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an element type that can hold a ref. ${warningHint} ` + 'For more information see https://
|
|
5073
|
+
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an element type that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide');
|
|
4723
5074
|
}
|
|
4724
5075
|
|
|
4725
5076
|
return null;
|
|
@@ -4825,7 +5176,7 @@
|
|
|
4825
5176
|
// We only handle the first word.
|
|
4826
5177
|
function capitalize(string) {
|
|
4827
5178
|
if (typeof string !== 'string') {
|
|
4828
|
-
throw new Error(`
|
|
5179
|
+
throw new Error(`MUI: \`capitalize(string)\` expects a string argument.` );
|
|
4829
5180
|
}
|
|
4830
5181
|
|
|
4831
5182
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
@@ -4990,7 +5341,7 @@
|
|
|
4990
5341
|
{
|
|
4991
5342
|
React__namespace.useEffect(() => {
|
|
4992
5343
|
if (isControlled !== (controlled !== undefined)) {
|
|
4993
|
-
console.error([`
|
|
5344
|
+
console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", 'More info: https://fb.me/react-controlled-components'].join('\n'));
|
|
4994
5345
|
}
|
|
4995
5346
|
}, [state, name, controlled]);
|
|
4996
5347
|
const {
|
|
@@ -4998,7 +5349,7 @@
|
|
|
4998
5349
|
} = React__namespace.useRef(defaultProp);
|
|
4999
5350
|
React__namespace.useEffect(() => {
|
|
5000
5351
|
if (!isControlled && defaultValue !== defaultProp) {
|
|
5001
|
-
console.error([`
|
|
5352
|
+
console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\n'));
|
|
5002
5353
|
}
|
|
5003
5354
|
}, [JSON.stringify(defaultProp)]);
|
|
5004
5355
|
}
|
|
@@ -5643,7 +5994,7 @@
|
|
|
5643
5994
|
|
|
5644
5995
|
{
|
|
5645
5996
|
if (typeof abs !== 'number') {
|
|
5646
|
-
console.error(`
|
|
5997
|
+
console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${abs}.`);
|
|
5647
5998
|
}
|
|
5648
5999
|
}
|
|
5649
6000
|
|
|
@@ -5659,9 +6010,9 @@
|
|
|
5659
6010
|
|
|
5660
6011
|
{
|
|
5661
6012
|
if (!Number.isInteger(abs)) {
|
|
5662
|
-
console.error([`
|
|
6013
|
+
console.error([`MUI: The \`theme.${themeKey}\` array type cannot be combined with non integer values.` + `You should either use an integer value that can be used as index, or define the \`theme.${themeKey}\` as a number.`].join('\n'));
|
|
5663
6014
|
} else if (abs > themeSpacing.length - 1) {
|
|
5664
|
-
console.error([`
|
|
6015
|
+
console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\n'));
|
|
5665
6016
|
}
|
|
5666
6017
|
}
|
|
5667
6018
|
|
|
@@ -5674,7 +6025,7 @@
|
|
|
5674
6025
|
}
|
|
5675
6026
|
|
|
5676
6027
|
{
|
|
5677
|
-
console.error([`
|
|
6028
|
+
console.error([`MUI: The \`theme.${themeKey}\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\n'));
|
|
5678
6029
|
}
|
|
5679
6030
|
|
|
5680
6031
|
return () => undefined;
|
|
@@ -6357,7 +6708,7 @@
|
|
|
6357
6708
|
const spacing = (...argsInput) => {
|
|
6358
6709
|
{
|
|
6359
6710
|
if (!(argsInput.length <= 4)) {
|
|
6360
|
-
console.error(`
|
|
6711
|
+
console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);
|
|
6361
6712
|
}
|
|
6362
6713
|
}
|
|
6363
6714
|
|
|
@@ -6428,7 +6779,7 @@
|
|
|
6428
6779
|
|
|
6429
6780
|
{
|
|
6430
6781
|
if (!mergedTheme) {
|
|
6431
|
-
console.error(['
|
|
6782
|
+
console.error(['MUI: You should return an object from your theme function, i.e.', '<ThemeProvider theme={() => ({})} />'].join('\n'));
|
|
6432
6783
|
}
|
|
6433
6784
|
}
|
|
6434
6785
|
|
|
@@ -6453,7 +6804,7 @@
|
|
|
6453
6804
|
|
|
6454
6805
|
{
|
|
6455
6806
|
if (outerTheme === null && typeof localTheme === 'function') {
|
|
6456
|
-
console.error(['
|
|
6807
|
+
console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', '<ThemeProvider theme={outerTheme => outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\n'));
|
|
6457
6808
|
}
|
|
6458
6809
|
}
|
|
6459
6810
|
|
|
@@ -6830,7 +7181,7 @@
|
|
|
6830
7181
|
function clamp$3(value, min = 0, max = 1) {
|
|
6831
7182
|
{
|
|
6832
7183
|
if (value < min || value > max) {
|
|
6833
|
-
console.error(`
|
|
7184
|
+
console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`);
|
|
6834
7185
|
}
|
|
6835
7186
|
}
|
|
6836
7187
|
|
|
@@ -6884,7 +7235,7 @@
|
|
|
6884
7235
|
const type = color.substring(0, marker);
|
|
6885
7236
|
|
|
6886
7237
|
if (['rgb', 'rgba', 'hsl', 'hsla', 'color'].indexOf(type) === -1) {
|
|
6887
|
-
throw new Error(`
|
|
7238
|
+
throw new Error(`MUI: Unsupported \`${color}\` color.
|
|
6888
7239
|
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` );
|
|
6889
7240
|
}
|
|
6890
7241
|
|
|
@@ -6900,7 +7251,7 @@ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
|
|
|
6900
7251
|
}
|
|
6901
7252
|
|
|
6902
7253
|
if (['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].indexOf(colorSpace) === -1) {
|
|
6903
|
-
throw new Error(`
|
|
7254
|
+
throw new Error(`MUI: unsupported \`${colorSpace}\` color space.
|
|
6904
7255
|
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` );
|
|
6905
7256
|
}
|
|
6906
7257
|
} else {
|
|
@@ -7165,7 +7516,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7165
7516
|
_excluded2$b = ["type", "mode"];
|
|
7166
7517
|
function adaptV4Theme(inputTheme) {
|
|
7167
7518
|
{
|
|
7168
|
-
console.warn(['
|
|
7519
|
+
console.warn(['MUI: adaptV4Theme() is deprecated.', 'Follow the upgrade guide on https://mui.com/r/migration-v4#theme.'].join('\n'));
|
|
7169
7520
|
}
|
|
7170
7521
|
|
|
7171
7522
|
const {
|
|
@@ -7351,7 +7702,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7351
7702
|
if (typeof optionLabel !== 'string') {
|
|
7352
7703
|
{
|
|
7353
7704
|
const erroneousReturn = optionLabel === undefined ? 'undefined' : `${typeof optionLabel} (${optionLabel})`;
|
|
7354
|
-
console.error(`
|
|
7705
|
+
console.error(`MUI: The \`getOptionLabel\` method of ${componentName} returned ${erroneousReturn} instead of a string for ${JSON.stringify(option)}.`);
|
|
7355
7706
|
}
|
|
7356
7707
|
|
|
7357
7708
|
return String(optionLabel);
|
|
@@ -7409,10 +7760,15 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7409
7760
|
|
|
7410
7761
|
if (focused && !valueChange) {
|
|
7411
7762
|
return;
|
|
7763
|
+
} // Only reset the input's value when freeSolo if the component's value changes.
|
|
7764
|
+
|
|
7765
|
+
|
|
7766
|
+
if (freeSolo && !valueChange) {
|
|
7767
|
+
return;
|
|
7412
7768
|
}
|
|
7413
7769
|
|
|
7414
7770
|
resetInputValue(null, value);
|
|
7415
|
-
}, [value, resetInputValue, focused, prevValue]);
|
|
7771
|
+
}, [value, resetInputValue, focused, prevValue, freeSolo]);
|
|
7416
7772
|
const [open, setOpenState] = useControlled({
|
|
7417
7773
|
controlled: openProp,
|
|
7418
7774
|
default: false,
|
|
@@ -7441,7 +7797,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7441
7797
|
const missingValue = (multiple ? value : [value]).filter(value2 => !options.some(option => isOptionEqualToValue(option, value2)));
|
|
7442
7798
|
|
|
7443
7799
|
if (missingValue.length > 0) {
|
|
7444
|
-
console.warn([`
|
|
7800
|
+
console.warn([`MUI: The value provided to ${componentName} is invalid.`, `None of the options match with \`${missingValue.length > 1 ? JSON.stringify(missingValue) : JSON.stringify(missingValue[0])}\`.`, 'You can use the `isOptionEqualToValue` prop to customize the equality test.'].join('\n'));
|
|
7445
7801
|
}
|
|
7446
7802
|
}
|
|
7447
7803
|
}
|
|
@@ -7704,7 +8060,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7704
8060
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
7705
8061
|
React__namespace.useEffect(() => {
|
|
7706
8062
|
if (!inputRef.current || inputRef.current.nodeName !== 'INPUT') {
|
|
7707
|
-
console.error([`
|
|
8063
|
+
console.error([`MUI: Unable to find the input element. It was resolved to ${inputRef.current} while an HTMLInputElement was expected.`, `Instead, ${componentName} expects an input element.`, '', componentName === 'useAutocomplete' ? 'Make sure you have binded getInputProps correctly and that the normal ref/effect resolutions order is guaranteed.' : 'Make sure you have customized the input component correctly.'].join('\n'));
|
|
7708
8064
|
}
|
|
7709
8065
|
}, [componentName]);
|
|
7710
8066
|
}
|
|
@@ -7763,7 +8119,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7763
8119
|
const matches = newValue.filter(val => isOptionEqualToValue(option, val));
|
|
7764
8120
|
|
|
7765
8121
|
if (matches.length > 1) {
|
|
7766
|
-
console.error([`
|
|
8122
|
+
console.error([`MUI: The \`isOptionEqualToValue\` method of ${componentName} do not handle the arguments correctly.`, `The component expects a single value to match a given option but found ${matches.length} matches.`].join('\n'));
|
|
7767
8123
|
}
|
|
7768
8124
|
}
|
|
7769
8125
|
|
|
@@ -8139,7 +8495,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8139
8495
|
} else {
|
|
8140
8496
|
{
|
|
8141
8497
|
if (indexBy.get(group) && !warn) {
|
|
8142
|
-
console.warn(`
|
|
8498
|
+
console.warn(`MUI: The options provided combined with the \`groupBy\` method of ${componentName} returns duplicated headers.`, 'You can solve the issue by sorting the options with the output of `groupBy`.');
|
|
8143
8499
|
warn = true;
|
|
8144
8500
|
}
|
|
8145
8501
|
|
|
@@ -8860,11 +9216,11 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8860
9216
|
*
|
|
8861
9217
|
* Demos:
|
|
8862
9218
|
*
|
|
8863
|
-
* - [Buttons](https://
|
|
9219
|
+
* - [Buttons](https://mui.com/components/buttons/)
|
|
8864
9220
|
*
|
|
8865
9221
|
* API:
|
|
8866
9222
|
*
|
|
8867
|
-
* - [ButtonUnstyled API](https://
|
|
9223
|
+
* - [ButtonUnstyled API](https://mui.com/api/button-unstyled/)
|
|
8868
9224
|
*/
|
|
8869
9225
|
|
|
8870
9226
|
|
|
@@ -9012,7 +9368,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9012
9368
|
* * Input
|
|
9013
9369
|
* * InputLabel
|
|
9014
9370
|
*
|
|
9015
|
-
* You can find one composition example below and more going to [the demos](https://
|
|
9371
|
+
* You can find one composition example below and more going to [the demos](https://mui.com/components/text-fields/#components).
|
|
9016
9372
|
*
|
|
9017
9373
|
* ```jsx
|
|
9018
9374
|
* <FormControl>
|
|
@@ -9027,11 +9383,11 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9027
9383
|
*
|
|
9028
9384
|
* Demos:
|
|
9029
9385
|
*
|
|
9030
|
-
* - [Text Fields](https://
|
|
9386
|
+
* - [Text Fields](https://mui.com/components/text-fields/)
|
|
9031
9387
|
*
|
|
9032
9388
|
* API:
|
|
9033
9389
|
*
|
|
9034
|
-
* - [FormControlUnstyled API](https://
|
|
9390
|
+
* - [FormControlUnstyled API](https://mui.com/api/form-control-unstyled/)
|
|
9035
9391
|
*/
|
|
9036
9392
|
const FormControlUnstyled = /*#__PURE__*/React__namespace.forwardRef(function FormControlUnstyled(props, ref) {
|
|
9037
9393
|
var _ref;
|
|
@@ -9083,7 +9439,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9083
9439
|
|
|
9084
9440
|
registerEffect = () => {
|
|
9085
9441
|
if (registeredInput.current) {
|
|
9086
|
-
console.error(['
|
|
9442
|
+
console.error(['MUI: There are multiple `Input` components inside a FormControl.', 'This creates visual inconsistencies, only use one `Input`.'].join('\n'));
|
|
9087
9443
|
}
|
|
9088
9444
|
|
|
9089
9445
|
registeredInput.current = true;
|
|
@@ -9639,7 +9995,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9639
9995
|
if (!rootRef.current.contains(doc.activeElement)) {
|
|
9640
9996
|
if (!rootRef.current.hasAttribute('tabIndex')) {
|
|
9641
9997
|
{
|
|
9642
|
-
console.error(['
|
|
9998
|
+
console.error(['MUI: The modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to "-1".'].join('\n'));
|
|
9643
9999
|
}
|
|
9644
10000
|
|
|
9645
10001
|
rootRef.current.setAttribute('tabIndex', -1);
|
|
@@ -11189,7 +11545,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
11189
11545
|
const range = Array.isArray(props.value || props.defaultValue);
|
|
11190
11546
|
|
|
11191
11547
|
if (range && props['aria-label'] != null) {
|
|
11192
|
-
return new Error('
|
|
11548
|
+
return new Error('MUI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider.');
|
|
11193
11549
|
}
|
|
11194
11550
|
|
|
11195
11551
|
return null;
|
|
@@ -11207,7 +11563,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
11207
11563
|
const range = Array.isArray(props.value || props.defaultValue);
|
|
11208
11564
|
|
|
11209
11565
|
if (range && props['aria-valuetext'] != null) {
|
|
11210
|
-
return new Error('
|
|
11566
|
+
return new Error('MUI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider.');
|
|
11211
11567
|
}
|
|
11212
11568
|
|
|
11213
11569
|
return null;
|
|
@@ -11420,7 +11776,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
11420
11776
|
*
|
|
11421
11777
|
* Demos:
|
|
11422
11778
|
*
|
|
11423
|
-
* - [Switches](https://
|
|
11779
|
+
* - [Switches](https://mui.com/components/switches/)
|
|
11424
11780
|
*/
|
|
11425
11781
|
function useSwitch(props) {
|
|
11426
11782
|
const {
|
|
@@ -11530,11 +11886,11 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
11530
11886
|
*
|
|
11531
11887
|
* Demos:
|
|
11532
11888
|
*
|
|
11533
|
-
* - [Switches](https://
|
|
11889
|
+
* - [Switches](https://mui.com/components/switches/)
|
|
11534
11890
|
*
|
|
11535
11891
|
* API:
|
|
11536
11892
|
*
|
|
11537
|
-
* - [SwitchUnstyled API](https://
|
|
11893
|
+
* - [SwitchUnstyled API](https://mui.com/api/switch-unstyled/)
|
|
11538
11894
|
*/
|
|
11539
11895
|
const SwitchUnstyled = /*#__PURE__*/React__namespace.forwardRef(function SwitchUnstyled(props, ref) {
|
|
11540
11896
|
var _ref, _components$Thumb, _componentsProps$thum, _components$Input, _componentsProps$inpu, _components$Track, _componentsProps$trac;
|
|
@@ -11909,7 +12265,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
11909
12265
|
const contrast = getContrastRatio(background, contrastText);
|
|
11910
12266
|
|
|
11911
12267
|
if (contrast < 3) {
|
|
11912
|
-
console.error([`
|
|
12268
|
+
console.error([`MUI: The contrast ratio of ${contrast}:1 for ${contrastText} on ${background}`, 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\n'));
|
|
11913
12269
|
}
|
|
11914
12270
|
}
|
|
11915
12271
|
|
|
@@ -11930,12 +12286,12 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
11930
12286
|
}
|
|
11931
12287
|
|
|
11932
12288
|
if (!color.hasOwnProperty('main')) {
|
|
11933
|
-
throw new Error(`
|
|
12289
|
+
throw new Error(`MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.
|
|
11934
12290
|
The color object needs to have a \`main\` property or a \`${mainShade}\` property.` );
|
|
11935
12291
|
}
|
|
11936
12292
|
|
|
11937
12293
|
if (typeof color.main !== 'string') {
|
|
11938
|
-
throw new Error(`
|
|
12294
|
+
throw new Error(`MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.
|
|
11939
12295
|
\`color.main\` should be a string, but \`${JSON.stringify(color.main)}\` was provided instead.
|
|
11940
12296
|
|
|
11941
12297
|
Did you intend to use one of the following approaches?
|
|
@@ -11968,7 +12324,7 @@ const theme2 = createTheme({ palette: {
|
|
|
11968
12324
|
|
|
11969
12325
|
{
|
|
11970
12326
|
if (!modes[mode]) {
|
|
11971
|
-
console.error(`
|
|
12327
|
+
console.error(`MUI: The palette mode \`${mode}\` is not supported.`);
|
|
11972
12328
|
}
|
|
11973
12329
|
}
|
|
11974
12330
|
|
|
@@ -12053,7 +12409,7 @@ const theme2 = createTheme({ palette: {
|
|
|
12053
12409
|
fontWeightRegular = 400,
|
|
12054
12410
|
fontWeightMedium = 500,
|
|
12055
12411
|
fontWeightBold = 700,
|
|
12056
|
-
// Tell
|
|
12412
|
+
// Tell MUI what's the font-size on the html element.
|
|
12057
12413
|
// 16px is the default font-size used by browsers.
|
|
12058
12414
|
htmlFontSize = 16,
|
|
12059
12415
|
// Apply the CSS properties to all the variants.
|
|
@@ -12064,11 +12420,11 @@ const theme2 = createTheme({ palette: {
|
|
|
12064
12420
|
|
|
12065
12421
|
{
|
|
12066
12422
|
if (typeof fontSize !== 'number') {
|
|
12067
|
-
console.error('
|
|
12423
|
+
console.error('MUI: `fontSize` is required to be a number.');
|
|
12068
12424
|
}
|
|
12069
12425
|
|
|
12070
12426
|
if (typeof htmlFontSize !== 'number') {
|
|
12071
|
-
console.error('
|
|
12427
|
+
console.error('MUI: `htmlFontSize` is required to be a number.');
|
|
12072
12428
|
}
|
|
12073
12429
|
}
|
|
12074
12430
|
|
|
@@ -12193,23 +12549,23 @@ const theme2 = createTheme({ palette: {
|
|
|
12193
12549
|
const isNumber = value => !isNaN(parseFloat(value));
|
|
12194
12550
|
|
|
12195
12551
|
if (!isString(props) && !Array.isArray(props)) {
|
|
12196
|
-
console.error('
|
|
12552
|
+
console.error('MUI: Argument "props" must be a string or Array.');
|
|
12197
12553
|
}
|
|
12198
12554
|
|
|
12199
12555
|
if (!isNumber(durationOption) && !isString(durationOption)) {
|
|
12200
|
-
console.error(`
|
|
12556
|
+
console.error(`MUI: Argument "duration" must be a number or a string but found ${durationOption}.`);
|
|
12201
12557
|
}
|
|
12202
12558
|
|
|
12203
12559
|
if (!isString(easingOption)) {
|
|
12204
|
-
console.error('
|
|
12560
|
+
console.error('MUI: Argument "easing" must be a string.');
|
|
12205
12561
|
}
|
|
12206
12562
|
|
|
12207
12563
|
if (!isNumber(delay) && !isString(delay)) {
|
|
12208
|
-
console.error('
|
|
12564
|
+
console.error('MUI: Argument "delay" must be a number or a string.');
|
|
12209
12565
|
}
|
|
12210
12566
|
|
|
12211
12567
|
if (Object.keys(other).length !== 0) {
|
|
12212
|
-
console.error(`
|
|
12568
|
+
console.error(`MUI: Unrecognized argument(s) [${Object.keys(other).join(',')}].`);
|
|
12213
12569
|
}
|
|
12214
12570
|
}
|
|
12215
12571
|
|
|
@@ -12275,11 +12631,11 @@ const theme2 = createTheme({ palette: {
|
|
|
12275
12631
|
if (stateClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {
|
|
12276
12632
|
{
|
|
12277
12633
|
const stateClass = generateUtilityClass('', key);
|
|
12278
|
-
console.error([`
|
|
12634
|
+
console.error([`MUI: The \`${component}\` component increases ` + `the CSS specificity of the \`${key}\` internal state.`, 'You can not override it like this: ', JSON.stringify(node, null, 2), '', `Instead, you need to use the '&.${stateClass}' syntax:`, JSON.stringify({
|
|
12279
12635
|
root: {
|
|
12280
12636
|
[`&.${stateClass}`]: child
|
|
12281
12637
|
}
|
|
12282
|
-
}, null, 2), '', 'https://
|
|
12638
|
+
}, null, 2), '', 'https://mui.com/r/state-classes-guide'].join('\n'));
|
|
12283
12639
|
} // Remove the style to prevent global conflicts.
|
|
12284
12640
|
|
|
12285
12641
|
|
|
@@ -12305,7 +12661,7 @@ const theme2 = createTheme({ palette: {
|
|
|
12305
12661
|
{
|
|
12306
12662
|
if (!warnedOnce$1) {
|
|
12307
12663
|
warnedOnce$1 = true;
|
|
12308
|
-
console.error(['
|
|
12664
|
+
console.error(['MUI: the createMuiTheme function was renamed to createTheme.', '', "You should use `import { createTheme } from '@mui/material/styles'`"].join('\n'));
|
|
12309
12665
|
}
|
|
12310
12666
|
}
|
|
12311
12667
|
|
|
@@ -12322,7 +12678,7 @@ const theme2 = createTheme({ palette: {
|
|
|
12322
12678
|
|
|
12323
12679
|
function createStyles(styles) {
|
|
12324
12680
|
if (!warnedOnce) {
|
|
12325
|
-
console.warn(['
|
|
12681
|
+
console.warn(['MUI: createStyles from @mui/material/styles is deprecated.', 'Please use @mui/styles/createStyles'].join('\n'));
|
|
12326
12682
|
warnedOnce = true;
|
|
12327
12683
|
}
|
|
12328
12684
|
|
|
@@ -12486,7 +12842,7 @@ const theme2 = createTheme({ palette: {
|
|
|
12486
12842
|
} = style;
|
|
12487
12843
|
|
|
12488
12844
|
if (!isUnitless(lineHeight) && !disableAlign) {
|
|
12489
|
-
throw new Error(`
|
|
12845
|
+
throw new Error(`MUI: Unsupported non-unitless line height with grid alignment.
|
|
12490
12846
|
Use unitless line heights instead.` );
|
|
12491
12847
|
}
|
|
12492
12848
|
|
|
@@ -12554,21 +12910,21 @@ Use unitless line heights instead.` );
|
|
|
12554
12910
|
var styled$1 = styled;
|
|
12555
12911
|
|
|
12556
12912
|
function makeStyles() {
|
|
12557
|
-
throw new Error(`
|
|
12913
|
+
throw new Error(`MUI: makeStyles is not longer exported from @mui/material/styles.
|
|
12558
12914
|
You have to import it from @mui/styles.
|
|
12559
|
-
See https://
|
|
12915
|
+
See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` );
|
|
12560
12916
|
}
|
|
12561
12917
|
|
|
12562
12918
|
function withStyles() {
|
|
12563
|
-
throw new Error(`
|
|
12919
|
+
throw new Error(`MUI: withStyles is not longer exported from @mui/material/styles.
|
|
12564
12920
|
You have to import it from @mui/styles.
|
|
12565
|
-
See https://
|
|
12921
|
+
See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` );
|
|
12566
12922
|
}
|
|
12567
12923
|
|
|
12568
12924
|
function withTheme() {
|
|
12569
|
-
throw new Error(`
|
|
12925
|
+
throw new Error(`MUI: withTheme is not longer exported from @mui/material/styles.
|
|
12570
12926
|
You have to import it from @mui/styles.
|
|
12571
|
-
See https://
|
|
12927
|
+
See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` );
|
|
12572
12928
|
}
|
|
12573
12929
|
|
|
12574
12930
|
function getSvgIconUtilityClass(slot) {
|
|
@@ -14249,7 +14605,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
14249
14605
|
const theme = useTheme();
|
|
14250
14606
|
|
|
14251
14607
|
if (theme.shadows[elevation] === undefined) {
|
|
14252
|
-
console.error([`
|
|
14608
|
+
console.error([`MUI: The elevation provided <Paper elevation={${elevation}}> is not available in the theme.`, `Please make sure that \`theme.shadows[${elevation}]\` is defined.`].join('\n'));
|
|
14253
14609
|
}
|
|
14254
14610
|
}
|
|
14255
14611
|
|
|
@@ -14301,7 +14657,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
14301
14657
|
} = props;
|
|
14302
14658
|
|
|
14303
14659
|
if (elevation > 0 && variant === 'outlined') {
|
|
14304
|
-
return new Error(`
|
|
14660
|
+
return new Error(`MUI: Combining \`elevation={${elevation}}\` with \`variant="${variant}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`);
|
|
14305
14661
|
}
|
|
14306
14662
|
|
|
14307
14663
|
return null;
|
|
@@ -14330,7 +14686,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
14330
14686
|
|
|
14331
14687
|
/**
|
|
14332
14688
|
* @ignore - internal component.
|
|
14333
|
-
* @type {React.Context<{} | {expanded: boolean, disabled: boolean,
|
|
14689
|
+
* @type {React.Context<{} | {expanded: boolean, disabled: boolean, toggle: () => void}>}
|
|
14334
14690
|
*/
|
|
14335
14691
|
|
|
14336
14692
|
const AccordionContext = /*#__PURE__*/React__namespace.createContext({});
|
|
@@ -14532,11 +14888,11 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
14532
14888
|
const summary = React__namespace.Children.toArray(props.children)[0];
|
|
14533
14889
|
|
|
14534
14890
|
if (reactIs_2(summary)) {
|
|
14535
|
-
return new Error("
|
|
14891
|
+
return new Error("MUI: The Accordion doesn't accept a Fragment as a child. " + 'Consider providing an array instead.');
|
|
14536
14892
|
}
|
|
14537
14893
|
|
|
14538
14894
|
if (! /*#__PURE__*/React__namespace.isValidElement(summary)) {
|
|
14539
|
-
return new Error('
|
|
14895
|
+
return new Error('MUI: Expected the first child of Accordion to be a valid element.');
|
|
14540
14896
|
}
|
|
14541
14897
|
|
|
14542
14898
|
return null;
|
|
@@ -14604,7 +14960,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
14604
14960
|
|
|
14605
14961
|
/**
|
|
14606
14962
|
* Props applied to the transition element.
|
|
14607
|
-
* By default, the element is based on this [`Transition`](
|
|
14963
|
+
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition) component.
|
|
14608
14964
|
*/
|
|
14609
14965
|
TransitionProps: propTypes.object
|
|
14610
14966
|
} ;
|
|
@@ -15220,109 +15576,6 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
15220
15576
|
const buttonBaseClasses = generateUtilityClasses('MuiButtonBase', ['root', 'disabled', 'focusVisible']);
|
|
15221
15577
|
var buttonBaseClasses$1 = buttonBaseClasses;
|
|
15222
15578
|
|
|
15223
|
-
const useTouchRipple = props => {
|
|
15224
|
-
const {
|
|
15225
|
-
disabled,
|
|
15226
|
-
disableFocusRipple,
|
|
15227
|
-
disableRipple,
|
|
15228
|
-
disableTouchRipple,
|
|
15229
|
-
focusVisible,
|
|
15230
|
-
rippleRef
|
|
15231
|
-
} = props;
|
|
15232
|
-
React__namespace.useEffect(() => {
|
|
15233
|
-
if (focusVisible && !disableFocusRipple && !disableRipple) {
|
|
15234
|
-
var _rippleRef$current;
|
|
15235
|
-
|
|
15236
|
-
(_rippleRef$current = rippleRef.current) == null ? void 0 : _rippleRef$current.pulsate();
|
|
15237
|
-
}
|
|
15238
|
-
}, [rippleRef, focusVisible, disableFocusRipple, disableRipple]);
|
|
15239
|
-
|
|
15240
|
-
function useRippleHandler(rippleAction, skipRippleAction = disableTouchRipple) {
|
|
15241
|
-
return useEventCallback(event => {
|
|
15242
|
-
if (!skipRippleAction && rippleRef.current) {
|
|
15243
|
-
rippleRef.current[rippleAction](event);
|
|
15244
|
-
}
|
|
15245
|
-
|
|
15246
|
-
return true;
|
|
15247
|
-
});
|
|
15248
|
-
}
|
|
15249
|
-
|
|
15250
|
-
const keydownRef = React__namespace.useRef(false);
|
|
15251
|
-
const handleKeyDown = useEventCallback(event => {
|
|
15252
|
-
if (!disableFocusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === ' ') {
|
|
15253
|
-
keydownRef.current = true;
|
|
15254
|
-
rippleRef.current.stop(event, () => {
|
|
15255
|
-
var _rippleRef$current2;
|
|
15256
|
-
|
|
15257
|
-
rippleRef == null ? void 0 : (_rippleRef$current2 = rippleRef.current) == null ? void 0 : _rippleRef$current2.start(event);
|
|
15258
|
-
});
|
|
15259
|
-
}
|
|
15260
|
-
});
|
|
15261
|
-
const handleKeyUp = useEventCallback(event => {
|
|
15262
|
-
// calling preventDefault in keyUp on a <button> will not dispatch a click event if Space is pressed
|
|
15263
|
-
// https://codesandbox.io/s/button-keyup-preventdefault-dn7f0
|
|
15264
|
-
if (!disableFocusRipple && event.key === ' ' && rippleRef.current && focusVisible && !event.defaultPrevented) {
|
|
15265
|
-
keydownRef.current = false;
|
|
15266
|
-
rippleRef.current.stop(event, () => {
|
|
15267
|
-
var _rippleRef$current3;
|
|
15268
|
-
|
|
15269
|
-
rippleRef == null ? void 0 : (_rippleRef$current3 = rippleRef.current) == null ? void 0 : _rippleRef$current3.pulsate(event);
|
|
15270
|
-
});
|
|
15271
|
-
}
|
|
15272
|
-
});
|
|
15273
|
-
const handleBlur = useRippleHandler('stop', false);
|
|
15274
|
-
const handleMouseDown = useRippleHandler('start');
|
|
15275
|
-
const handleContextMenu = useRippleHandler('stop');
|
|
15276
|
-
const handleDragLeave = useRippleHandler('stop');
|
|
15277
|
-
const handleMouseUp = useRippleHandler('stop');
|
|
15278
|
-
const handleMouseLeave = useRippleHandler('stop');
|
|
15279
|
-
const handleTouchStart = useRippleHandler('start');
|
|
15280
|
-
const handleTouchEnd = useRippleHandler('stop');
|
|
15281
|
-
const handleTouchMove = useRippleHandler('stop');
|
|
15282
|
-
const [mountedState, setMountedState] = React__namespace.useState(false);
|
|
15283
|
-
React__namespace.useEffect(() => {
|
|
15284
|
-
setMountedState(true);
|
|
15285
|
-
}, []);
|
|
15286
|
-
const enableTouchRipple = mountedState && !disableRipple && !disabled;
|
|
15287
|
-
const getRippleHandlers = React__namespace.useMemo(() => {
|
|
15288
|
-
const rippleHandlers = {
|
|
15289
|
-
onBlur: handleBlur,
|
|
15290
|
-
onKeyDown: handleKeyDown,
|
|
15291
|
-
onKeyUp: handleKeyUp,
|
|
15292
|
-
onMouseDown: handleMouseDown,
|
|
15293
|
-
onMouseUp: handleMouseUp,
|
|
15294
|
-
onMouseLeave: handleMouseLeave,
|
|
15295
|
-
onContextMenu: handleContextMenu,
|
|
15296
|
-
onDragLeave: handleDragLeave,
|
|
15297
|
-
onTouchStart: handleTouchStart,
|
|
15298
|
-
onTouchEnd: handleTouchEnd,
|
|
15299
|
-
onTouchMove: handleTouchMove
|
|
15300
|
-
};
|
|
15301
|
-
return (otherEvents = {}) => {
|
|
15302
|
-
const eventNames = Object.keys(rippleHandlers);
|
|
15303
|
-
const wrappedEvents = eventNames.map(eventName => ({
|
|
15304
|
-
name: eventName,
|
|
15305
|
-
handler: ev => {
|
|
15306
|
-
var _otherEvents$eventNam;
|
|
15307
|
-
|
|
15308
|
-
(_otherEvents$eventNam = otherEvents[eventName]) == null ? void 0 : _otherEvents$eventNam.call(otherEvents, ev);
|
|
15309
|
-
rippleHandlers[eventName](ev);
|
|
15310
|
-
}
|
|
15311
|
-
}));
|
|
15312
|
-
return wrappedEvents.reduce((acc, current) => {
|
|
15313
|
-
acc[current.name] = current.handler;
|
|
15314
|
-
return acc;
|
|
15315
|
-
}, {});
|
|
15316
|
-
};
|
|
15317
|
-
}, [handleBlur, handleKeyDown, handleKeyUp, handleMouseDown, handleMouseUp, handleMouseLeave, handleContextMenu, handleDragLeave, handleTouchStart, handleTouchEnd, handleTouchMove]);
|
|
15318
|
-
return {
|
|
15319
|
-
enableTouchRipple,
|
|
15320
|
-
getRippleHandlers
|
|
15321
|
-
};
|
|
15322
|
-
};
|
|
15323
|
-
|
|
15324
|
-
var useTouchRipple$1 = useTouchRipple;
|
|
15325
|
-
|
|
15326
15579
|
const _excluded$1_ = ["action", "centerRipple", "children", "className", "component", "disabled", "disableRipple", "disableTouchRipple", "focusRipple", "focusVisibleClassName", "LinkComponent", "onBlur", "onClick", "onContextMenu", "onDragLeave", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseLeave", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "tabIndex", "TouchRippleProps", "type"];
|
|
15327
15580
|
|
|
15328
15581
|
const useUtilityClasses$1E = ownerState => {
|
|
@@ -15411,51 +15664,205 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
15411
15664
|
disableTouchRipple = false,
|
|
15412
15665
|
focusRipple = false,
|
|
15413
15666
|
LinkComponent = 'a',
|
|
15667
|
+
onBlur,
|
|
15668
|
+
onClick,
|
|
15669
|
+
onContextMenu,
|
|
15670
|
+
onDragLeave,
|
|
15671
|
+
onFocus,
|
|
15672
|
+
onFocusVisible,
|
|
15673
|
+
onKeyDown,
|
|
15674
|
+
onKeyUp,
|
|
15675
|
+
onMouseDown,
|
|
15676
|
+
onMouseLeave,
|
|
15677
|
+
onMouseUp,
|
|
15678
|
+
onTouchEnd,
|
|
15679
|
+
onTouchMove,
|
|
15680
|
+
onTouchStart,
|
|
15414
15681
|
tabIndex = 0,
|
|
15415
|
-
TouchRippleProps
|
|
15682
|
+
TouchRippleProps,
|
|
15683
|
+
type
|
|
15416
15684
|
} = props,
|
|
15417
15685
|
other = _objectWithoutPropertiesLoose(props, _excluded$1_);
|
|
15418
15686
|
|
|
15419
15687
|
const buttonRef = React__namespace.useRef(null);
|
|
15420
|
-
const handleRef = useForkRef(buttonRef, ref);
|
|
15421
15688
|
const rippleRef = React__namespace.useRef(null);
|
|
15422
|
-
|
|
15689
|
+
const {
|
|
15690
|
+
isFocusVisibleRef,
|
|
15691
|
+
onFocus: handleFocusVisible,
|
|
15692
|
+
onBlur: handleBlurVisible,
|
|
15693
|
+
ref: focusVisibleRef
|
|
15694
|
+
} = useIsFocusVisible();
|
|
15695
|
+
const [focusVisible, setFocusVisible] = React__namespace.useState(false);
|
|
15423
15696
|
|
|
15424
|
-
if (
|
|
15425
|
-
|
|
15697
|
+
if (disabled && focusVisible) {
|
|
15698
|
+
setFocusVisible(false);
|
|
15426
15699
|
}
|
|
15427
15700
|
|
|
15428
|
-
const {
|
|
15429
|
-
focusVisible,
|
|
15430
|
-
setFocusVisible,
|
|
15431
|
-
getRootProps
|
|
15432
|
-
} = useButton(_extends({}, props, {
|
|
15433
|
-
component: ComponentProp,
|
|
15434
|
-
ref: handleRef
|
|
15435
|
-
}));
|
|
15436
15701
|
React__namespace.useImperativeHandle(action, () => ({
|
|
15437
15702
|
focusVisible: () => {
|
|
15438
15703
|
setFocusVisible(true);
|
|
15439
15704
|
buttonRef.current.focus();
|
|
15440
15705
|
}
|
|
15441
|
-
}), [
|
|
15442
|
-
|
|
15443
|
-
|
|
15444
|
-
|
|
15445
|
-
|
|
15446
|
-
|
|
15447
|
-
|
|
15448
|
-
|
|
15449
|
-
|
|
15450
|
-
|
|
15451
|
-
|
|
15706
|
+
}), []);
|
|
15707
|
+
React__namespace.useEffect(() => {
|
|
15708
|
+
if (focusVisible && focusRipple && !disableRipple) {
|
|
15709
|
+
rippleRef.current.pulsate();
|
|
15710
|
+
}
|
|
15711
|
+
}, [disableRipple, focusRipple, focusVisible]);
|
|
15712
|
+
|
|
15713
|
+
function useRippleHandler(rippleAction, eventCallback, skipRippleAction = disableTouchRipple) {
|
|
15714
|
+
return useEventCallback(event => {
|
|
15715
|
+
if (eventCallback) {
|
|
15716
|
+
eventCallback(event);
|
|
15717
|
+
}
|
|
15718
|
+
|
|
15719
|
+
const ignore = skipRippleAction;
|
|
15720
|
+
|
|
15721
|
+
if (!ignore && rippleRef.current) {
|
|
15722
|
+
rippleRef.current[rippleAction](event);
|
|
15723
|
+
}
|
|
15724
|
+
|
|
15725
|
+
return true;
|
|
15726
|
+
});
|
|
15727
|
+
}
|
|
15728
|
+
|
|
15729
|
+
const handleMouseDown = useRippleHandler('start', onMouseDown);
|
|
15730
|
+
const handleContextMenu = useRippleHandler('stop', onContextMenu);
|
|
15731
|
+
const handleDragLeave = useRippleHandler('stop', onDragLeave);
|
|
15732
|
+
const handleMouseUp = useRippleHandler('stop', onMouseUp);
|
|
15733
|
+
const handleMouseLeave = useRippleHandler('stop', event => {
|
|
15734
|
+
if (focusVisible) {
|
|
15735
|
+
event.preventDefault();
|
|
15736
|
+
}
|
|
15737
|
+
|
|
15738
|
+
if (onMouseLeave) {
|
|
15739
|
+
onMouseLeave(event);
|
|
15740
|
+
}
|
|
15741
|
+
});
|
|
15742
|
+
const handleTouchStart = useRippleHandler('start', onTouchStart);
|
|
15743
|
+
const handleTouchEnd = useRippleHandler('stop', onTouchEnd);
|
|
15744
|
+
const handleTouchMove = useRippleHandler('stop', onTouchMove);
|
|
15745
|
+
const handleBlur = useRippleHandler('stop', event => {
|
|
15746
|
+
handleBlurVisible(event);
|
|
15747
|
+
|
|
15748
|
+
if (isFocusVisibleRef.current === false) {
|
|
15749
|
+
setFocusVisible(false);
|
|
15750
|
+
}
|
|
15751
|
+
|
|
15752
|
+
if (onBlur) {
|
|
15753
|
+
onBlur(event);
|
|
15754
|
+
}
|
|
15755
|
+
}, false);
|
|
15756
|
+
const handleFocus = useEventCallback(event => {
|
|
15757
|
+
// Fix for https://github.com/facebook/react/issues/7769
|
|
15758
|
+
if (!buttonRef.current) {
|
|
15759
|
+
buttonRef.current = event.currentTarget;
|
|
15760
|
+
}
|
|
15761
|
+
|
|
15762
|
+
handleFocusVisible(event);
|
|
15763
|
+
|
|
15764
|
+
if (isFocusVisibleRef.current === true) {
|
|
15765
|
+
setFocusVisible(true);
|
|
15766
|
+
|
|
15767
|
+
if (onFocusVisible) {
|
|
15768
|
+
onFocusVisible(event);
|
|
15769
|
+
}
|
|
15770
|
+
}
|
|
15771
|
+
|
|
15772
|
+
if (onFocus) {
|
|
15773
|
+
onFocus(event);
|
|
15774
|
+
}
|
|
15775
|
+
});
|
|
15776
|
+
|
|
15777
|
+
const isNonNativeButton = () => {
|
|
15778
|
+
const button = buttonRef.current;
|
|
15779
|
+
return component && component !== 'button' && !(button.tagName === 'A' && button.href);
|
|
15780
|
+
};
|
|
15781
|
+
/**
|
|
15782
|
+
* IE11 shim for https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat
|
|
15783
|
+
*/
|
|
15784
|
+
|
|
15785
|
+
|
|
15786
|
+
const keydownRef = React__namespace.useRef(false);
|
|
15787
|
+
const handleKeyDown = useEventCallback(event => {
|
|
15788
|
+
// Check if key is already down to avoid repeats being counted as multiple activations
|
|
15789
|
+
if (focusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === ' ') {
|
|
15790
|
+
keydownRef.current = true;
|
|
15791
|
+
rippleRef.current.stop(event, () => {
|
|
15792
|
+
rippleRef.current.start(event);
|
|
15793
|
+
});
|
|
15794
|
+
}
|
|
15795
|
+
|
|
15796
|
+
if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') {
|
|
15797
|
+
event.preventDefault();
|
|
15798
|
+
}
|
|
15799
|
+
|
|
15800
|
+
if (onKeyDown) {
|
|
15801
|
+
onKeyDown(event);
|
|
15802
|
+
} // Keyboard accessibility for non interactive elements
|
|
15803
|
+
|
|
15804
|
+
|
|
15805
|
+
if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) {
|
|
15806
|
+
event.preventDefault();
|
|
15807
|
+
|
|
15808
|
+
if (onClick) {
|
|
15809
|
+
onClick(event);
|
|
15810
|
+
}
|
|
15811
|
+
}
|
|
15812
|
+
});
|
|
15813
|
+
const handleKeyUp = useEventCallback(event => {
|
|
15814
|
+
// calling preventDefault in keyUp on a <button> will not dispatch a click event if Space is pressed
|
|
15815
|
+
// https://codesandbox.io/s/button-keyup-preventdefault-dn7f0
|
|
15816
|
+
if (focusRipple && event.key === ' ' && rippleRef.current && focusVisible && !event.defaultPrevented) {
|
|
15817
|
+
keydownRef.current = false;
|
|
15818
|
+
rippleRef.current.stop(event, () => {
|
|
15819
|
+
rippleRef.current.pulsate(event);
|
|
15820
|
+
});
|
|
15821
|
+
}
|
|
15822
|
+
|
|
15823
|
+
if (onKeyUp) {
|
|
15824
|
+
onKeyUp(event);
|
|
15825
|
+
} // Keyboard accessibility for non interactive elements
|
|
15826
|
+
|
|
15827
|
+
|
|
15828
|
+
if (onClick && event.target === event.currentTarget && isNonNativeButton() && event.key === ' ' && !event.defaultPrevented) {
|
|
15829
|
+
onClick(event);
|
|
15830
|
+
}
|
|
15452
15831
|
});
|
|
15832
|
+
let ComponentProp = component;
|
|
15833
|
+
|
|
15834
|
+
if (ComponentProp === 'button' && (other.href || other.to)) {
|
|
15835
|
+
ComponentProp = LinkComponent;
|
|
15836
|
+
}
|
|
15837
|
+
|
|
15838
|
+
const buttonProps = {};
|
|
15839
|
+
|
|
15840
|
+
if (ComponentProp === 'button') {
|
|
15841
|
+
buttonProps.type = type === undefined ? 'button' : type;
|
|
15842
|
+
buttonProps.disabled = disabled;
|
|
15843
|
+
} else {
|
|
15844
|
+
if (!other.href && !other.to) {
|
|
15845
|
+
buttonProps.role = 'button';
|
|
15846
|
+
}
|
|
15847
|
+
|
|
15848
|
+
if (disabled) {
|
|
15849
|
+
buttonProps['aria-disabled'] = disabled;
|
|
15850
|
+
}
|
|
15851
|
+
}
|
|
15852
|
+
|
|
15853
|
+
const handleOwnRef = useForkRef(focusVisibleRef, buttonRef);
|
|
15854
|
+
const handleRef = useForkRef(ref, handleOwnRef);
|
|
15855
|
+
const [mountedState, setMountedState] = React__namespace.useState(false);
|
|
15856
|
+
React__namespace.useEffect(() => {
|
|
15857
|
+
setMountedState(true);
|
|
15858
|
+
}, []);
|
|
15859
|
+
const enableTouchRipple = mountedState && !disableRipple && !disabled;
|
|
15453
15860
|
|
|
15454
15861
|
{
|
|
15455
15862
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
15456
15863
|
React__namespace.useEffect(() => {
|
|
15457
15864
|
if (enableTouchRipple && !rippleRef.current) {
|
|
15458
|
-
console.error(['
|
|
15865
|
+
console.error(['MUI: The `component` prop provided to ButtonBase is invalid.', 'Please make sure the children prop is rendered in this custom component.'].join('\n'));
|
|
15459
15866
|
}
|
|
15460
15867
|
}, [enableTouchRipple]);
|
|
15461
15868
|
}
|
|
@@ -15475,8 +15882,24 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
15475
15882
|
return /*#__PURE__*/jsxRuntime_2(ButtonBaseRoot, _extends({
|
|
15476
15883
|
as: ComponentProp,
|
|
15477
15884
|
className: clsx(classes.root, className),
|
|
15478
|
-
ownerState: ownerState
|
|
15479
|
-
|
|
15885
|
+
ownerState: ownerState,
|
|
15886
|
+
onBlur: handleBlur,
|
|
15887
|
+
onClick: onClick,
|
|
15888
|
+
onContextMenu: handleContextMenu,
|
|
15889
|
+
onFocus: handleFocus,
|
|
15890
|
+
onKeyDown: handleKeyDown,
|
|
15891
|
+
onKeyUp: handleKeyUp,
|
|
15892
|
+
onMouseDown: handleMouseDown,
|
|
15893
|
+
onMouseLeave: handleMouseLeave,
|
|
15894
|
+
onMouseUp: handleMouseUp,
|
|
15895
|
+
onDragLeave: handleDragLeave,
|
|
15896
|
+
onTouchEnd: handleTouchEnd,
|
|
15897
|
+
onTouchMove: handleTouchMove,
|
|
15898
|
+
onTouchStart: handleTouchStart,
|
|
15899
|
+
ref: handleRef,
|
|
15900
|
+
tabIndex: disabled ? -1 : tabIndex,
|
|
15901
|
+
type: type
|
|
15902
|
+
}, buttonProps, other, {
|
|
15480
15903
|
children: [children, enableTouchRipple ?
|
|
15481
15904
|
/*#__PURE__*/
|
|
15482
15905
|
|
|
@@ -16021,7 +16444,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
16021
16444
|
const found = React__namespace.Children.toArray(props.children).some(child => /*#__PURE__*/React__namespace.isValidElement(child) && child.props.onClick);
|
|
16022
16445
|
|
|
16023
16446
|
if (found) {
|
|
16024
|
-
return new Error(['
|
|
16447
|
+
return new Error(['MUI: You are providing an onClick event listener to a child of a button element.', 'Prefer applying it to the IconButton directly.', 'This guarantees that the whole <button> will be responsive to click events.'].join('\n'));
|
|
16025
16448
|
}
|
|
16026
16449
|
|
|
16027
16450
|
return null;
|
|
@@ -18783,7 +19206,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
18783
19206
|
const box = resolvedAnchorEl.getBoundingClientRect();
|
|
18784
19207
|
|
|
18785
19208
|
if (box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {
|
|
18786
|
-
console.warn(['
|
|
19209
|
+
console.warn(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', "Make sure the element is present in the document or that it's not display none."].join('\n'));
|
|
18787
19210
|
}
|
|
18788
19211
|
}
|
|
18789
19212
|
}
|
|
@@ -18936,10 +19359,10 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
18936
19359
|
const box = resolvedAnchorEl.getBoundingClientRect();
|
|
18937
19360
|
|
|
18938
19361
|
if (box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {
|
|
18939
|
-
return new Error(['
|
|
19362
|
+
return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', "Make sure the element is present in the document or that it's not display none."].join('\n'));
|
|
18940
19363
|
}
|
|
18941
19364
|
} else if (!resolvedAnchorEl || typeof resolvedAnchorEl.getBoundingClientRect !== 'function' || resolvedAnchorEl.contextElement != null && resolvedAnchorEl.contextElement.nodeType !== 1) {
|
|
18942
|
-
return new Error(['
|
|
19365
|
+
return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'It should be an HTML element instance or a virtualElement ', '(https://popper.js.org/docs/v2/virtual-elements/).'].join('\n'));
|
|
18943
19366
|
}
|
|
18944
19367
|
}
|
|
18945
19368
|
|
|
@@ -19570,7 +19993,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
19570
19993
|
|
|
19571
19994
|
{
|
|
19572
19995
|
if (avatar && icon) {
|
|
19573
|
-
console.error('
|
|
19996
|
+
console.error('MUI: The Chip component can not handle the avatar ' + 'and the icon prop at the same time. Pick one.');
|
|
19574
19997
|
}
|
|
19575
19998
|
}
|
|
19576
19999
|
|
|
@@ -20404,7 +20827,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
20404
20827
|
*/
|
|
20405
20828
|
defaultValue: chainPropTypes(propTypes.any, props => {
|
|
20406
20829
|
if (props.multiple && props.defaultValue !== undefined && !Array.isArray(props.defaultValue)) {
|
|
20407
|
-
return new Error(['
|
|
20830
|
+
return new Error(['MUI: The Autocomplete expects the `defaultValue` prop to be an array when `multiple={true}` or undefined.', `However, ${props.defaultValue} was provided.`].join('\n'));
|
|
20408
20831
|
}
|
|
20409
20832
|
|
|
20410
20833
|
return null;
|
|
@@ -20747,7 +21170,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
20747
21170
|
*/
|
|
20748
21171
|
value: chainPropTypes(propTypes.any, props => {
|
|
20749
21172
|
if (props.multiple && props.value !== undefined && !Array.isArray(props.value)) {
|
|
20750
|
-
return new Error(['
|
|
21173
|
+
return new Error(['MUI: The Autocomplete expects the `value` prop to be an array when `multiple={true}` or undefined.', `However, ${props.value} was provided.`].join('\n'));
|
|
20751
21174
|
}
|
|
20752
21175
|
|
|
20753
21176
|
return null;
|
|
@@ -21107,7 +21530,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
21107
21530
|
const children = React__namespace.Children.toArray(childrenProp).filter(child => {
|
|
21108
21531
|
{
|
|
21109
21532
|
if (reactIs_2(child)) {
|
|
21110
|
-
console.error(["
|
|
21533
|
+
console.error(["MUI: The AvatarGroup component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
|
|
21111
21534
|
}
|
|
21112
21535
|
}
|
|
21113
21536
|
|
|
@@ -21168,7 +21591,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
21168
21591
|
*/
|
|
21169
21592
|
max: chainPropTypes(propTypes.number, props => {
|
|
21170
21593
|
if (props.max < 2) {
|
|
21171
|
-
return new Error(['
|
|
21594
|
+
return new Error(['MUI: The prop `max` should be equal to 2 or above.', 'A value below is clamped to 2.'].join('\n'));
|
|
21172
21595
|
}
|
|
21173
21596
|
|
|
21174
21597
|
return null;
|
|
@@ -21907,7 +22330,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
21907
22330
|
|
|
21908
22331
|
{
|
|
21909
22332
|
if (reactIs_2(child)) {
|
|
21910
|
-
console.error(["
|
|
22333
|
+
console.error(["MUI: The BottomNavigation component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
|
|
21911
22334
|
}
|
|
21912
22335
|
}
|
|
21913
22336
|
|
|
@@ -22350,7 +22773,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
22350
22773
|
|
|
22351
22774
|
if (itemsBeforeCollapse + itemsAfterCollapse >= allItems.length) {
|
|
22352
22775
|
{
|
|
22353
|
-
console.error(['
|
|
22776
|
+
console.error(['MUI: You have provided an invalid combination of props to the Breadcrumbs.', `itemsAfterCollapse={${itemsAfterCollapse}} + itemsBeforeCollapse={${itemsBeforeCollapse}} >= maxItems={${maxItems}}`].join('\n'));
|
|
22354
22777
|
}
|
|
22355
22778
|
|
|
22356
22779
|
return allItems;
|
|
@@ -22365,7 +22788,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
22365
22788
|
const allItems = React__namespace.Children.toArray(children).filter(child => {
|
|
22366
22789
|
{
|
|
22367
22790
|
if (reactIs_2(child)) {
|
|
22368
|
-
console.error(["
|
|
22791
|
+
console.error(["MUI: The Breadcrumbs component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
|
|
22369
22792
|
}
|
|
22370
22793
|
}
|
|
22371
22794
|
|
|
@@ -23004,7 +23427,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
23004
23427
|
|
|
23005
23428
|
{
|
|
23006
23429
|
if (reactIs_2(child)) {
|
|
23007
|
-
console.error(["
|
|
23430
|
+
console.error(["MUI: The ButtonGroup component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
|
|
23008
23431
|
}
|
|
23009
23432
|
}
|
|
23010
23433
|
|
|
@@ -23199,7 +23622,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
23199
23622
|
*/
|
|
23200
23623
|
raised: chainPropTypes(propTypes.bool, props => {
|
|
23201
23624
|
if (props.raised && props.variant === 'outlined') {
|
|
23202
|
-
return new Error('
|
|
23625
|
+
return new Error('MUI: Combining `raised={true}` with `variant="outlined"` has no effect.');
|
|
23203
23626
|
}
|
|
23204
23627
|
|
|
23205
23628
|
return null;
|
|
@@ -23837,7 +24260,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
23837
24260
|
*/
|
|
23838
24261
|
children: chainPropTypes(propTypes.node, props => {
|
|
23839
24262
|
if (!props.children && !props.image && !props.src && !props.component) {
|
|
23840
|
-
return new Error('
|
|
24263
|
+
return new Error('MUI: Either `children`, `image`, `src` or `component` prop must be specified.');
|
|
23841
24264
|
}
|
|
23842
24265
|
|
|
23843
24266
|
return null;
|
|
@@ -24348,7 +24771,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
24348
24771
|
*/
|
|
24349
24772
|
color: propTypes
|
|
24350
24773
|
/* @typescript-to-proptypes-ignore */
|
|
24351
|
-
.oneOfType([propTypes.oneOf(['default', 'primary', 'secondary', 'error', 'info', '
|
|
24774
|
+
.oneOfType([propTypes.oneOf(['default', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), propTypes.string]),
|
|
24352
24775
|
|
|
24353
24776
|
/**
|
|
24354
24777
|
* The default checked state. Use when the component is not controlled.
|
|
@@ -24656,7 +25079,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
24656
25079
|
*/
|
|
24657
25080
|
disableShrink: chainPropTypes(propTypes.bool, props => {
|
|
24658
25081
|
if (props.disableShrink && props.variant && props.variant !== 'indeterminate') {
|
|
24659
|
-
return new Error('
|
|
25082
|
+
return new Error('MUI: You have provided the `disableShrink` prop ' + 'with a variant other than `indeterminate`. This will have no effect.');
|
|
24660
25083
|
}
|
|
24661
25084
|
|
|
24662
25085
|
return null;
|
|
@@ -24716,12 +25139,12 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
24716
25139
|
*
|
|
24717
25140
|
* Demos:
|
|
24718
25141
|
*
|
|
24719
|
-
* - [Click Away Listener](https://
|
|
24720
|
-
* - [Menus](https://
|
|
25142
|
+
* - [Click Away Listener](https://mui.com/components/click-away-listener/)
|
|
25143
|
+
* - [Menus](https://mui.com/components/menus/)
|
|
24721
25144
|
*
|
|
24722
25145
|
* API:
|
|
24723
25146
|
*
|
|
24724
|
-
* - [ClickAwayListener API](https://
|
|
25147
|
+
* - [ClickAwayListener API](https://mui.com/api/click-away-listener/)
|
|
24725
25148
|
*/
|
|
24726
25149
|
function ClickAwayListener(props) {
|
|
24727
25150
|
const {
|
|
@@ -25863,7 +26286,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
25863
26286
|
|
|
25864
26287
|
/**
|
|
25865
26288
|
* Props applied to the transition element.
|
|
25866
|
-
* By default, the element is based on this [`Transition`](
|
|
26289
|
+
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition) component.
|
|
25867
26290
|
*/
|
|
25868
26291
|
TransitionProps: propTypes.object
|
|
25869
26292
|
} ;
|
|
@@ -26747,10 +27170,10 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
26747
27170
|
const box = resolvedContainer.getBoundingClientRect();
|
|
26748
27171
|
|
|
26749
27172
|
if (box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {
|
|
26750
|
-
return new Error(['
|
|
27173
|
+
return new Error(['MUI: The `container` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', "Make sure the element is present in the document or that it's not display none."].join('\n'));
|
|
26751
27174
|
}
|
|
26752
27175
|
} else if (!resolvedContainer || typeof resolvedContainer.getBoundingClientRect !== 'function' || resolvedContainer.contextElement != null && resolvedContainer.contextElement.nodeType !== 1) {
|
|
26753
|
-
return new Error(['
|
|
27176
|
+
return new Error(['MUI: The `container` prop provided to the component is invalid.', 'It should be an HTML element instance.'].join('\n'));
|
|
26754
27177
|
}
|
|
26755
27178
|
}
|
|
26756
27179
|
|
|
@@ -27516,7 +27939,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
27516
27939
|
|
|
27517
27940
|
{
|
|
27518
27941
|
if (renders.current === 20) {
|
|
27519
|
-
console.error(['
|
|
27942
|
+
console.error(['MUI: Too many re-renders. The layout is unstable.', 'TextareaAutosize limits the number of renders to prevent an infinite loop.'].join('\n'));
|
|
27520
27943
|
}
|
|
27521
27944
|
}
|
|
27522
27945
|
|
|
@@ -27908,7 +28331,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
27908
28331
|
const handleInputRefWarning = React__namespace.useCallback(instance => {
|
|
27909
28332
|
{
|
|
27910
28333
|
if (instance && instance.nodeName !== 'INPUT' && !instance.focus) {
|
|
27911
|
-
console.error(['
|
|
28334
|
+
console.error(['MUI: You have provided a `inputComponent` to the input component', 'that does not correctly handle the `ref` prop.', 'Make sure the `ref` prop is called with a HTMLInputElement.'].join('\n'));
|
|
27912
28335
|
}
|
|
27913
28336
|
}
|
|
27914
28337
|
}, []);
|
|
@@ -28009,7 +28432,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
28009
28432
|
const element = event.target || inputRef.current;
|
|
28010
28433
|
|
|
28011
28434
|
if (element == null) {
|
|
28012
|
-
throw new Error(`
|
|
28435
|
+
throw new Error(`MUI: Expected valid input target. Did you use a custom \`inputComponent\` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.` );
|
|
28013
28436
|
}
|
|
28014
28437
|
|
|
28015
28438
|
checkDirty({
|
|
@@ -28050,7 +28473,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
28050
28473
|
if (rows) {
|
|
28051
28474
|
{
|
|
28052
28475
|
if (minRows || maxRows) {
|
|
28053
|
-
console.warn('
|
|
28476
|
+
console.warn('MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set.');
|
|
28054
28477
|
}
|
|
28055
28478
|
}
|
|
28056
28479
|
|
|
@@ -28947,7 +29370,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
28947
29370
|
|
|
28948
29371
|
registerEffect = () => {
|
|
28949
29372
|
if (registeredInput.current) {
|
|
28950
|
-
console.error(['
|
|
29373
|
+
console.error(['MUI: There are multiple `InputBase` components inside a FormControl.', 'This creates visual inconsistencies, only use one `InputBase`.'].join('\n'));
|
|
28951
29374
|
}
|
|
28952
29375
|
|
|
28953
29376
|
registeredInput.current = true;
|
|
@@ -30499,13 +30922,13 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
30499
30922
|
|
|
30500
30923
|
{
|
|
30501
30924
|
if (typeof queryInput === 'function' && theme === null) {
|
|
30502
|
-
console.error(['
|
|
30925
|
+
console.error(['MUI: The `query` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\n'));
|
|
30503
30926
|
}
|
|
30504
30927
|
}
|
|
30505
30928
|
|
|
30506
30929
|
let query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;
|
|
30507
30930
|
query = query.replace(/^@media( ?)/m, ''); // Wait for jsdom to support the match media feature.
|
|
30508
|
-
// All the browsers
|
|
30931
|
+
// All the browsers MUI support have this built-in.
|
|
30509
30932
|
// This defensive check is here for simplicity.
|
|
30510
30933
|
// Most of the time, the match media logic isn't central to people tests.
|
|
30511
30934
|
|
|
@@ -30904,7 +31327,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
30904
31327
|
});
|
|
30905
31328
|
|
|
30906
31329
|
if (unknownProps.length > 0) {
|
|
30907
|
-
console.error(`
|
|
31330
|
+
console.error(`MUI: Unsupported props received by \`<Hidden implementation="css" />\`: ${unknownProps.join(', ')}. Did you forget to wrap this component in a ThemeProvider declaring these breakpoints?`);
|
|
30908
31331
|
}
|
|
30909
31332
|
}
|
|
30910
31333
|
|
|
@@ -31409,7 +31832,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
31409
31832
|
{
|
|
31410
31833
|
// Detect Internet Explorer 8+
|
|
31411
31834
|
if (document !== undefined && 'objectFit' in document.documentElement.style === false) {
|
|
31412
|
-
console.error(['
|
|
31835
|
+
console.error(['MUI: ImageList v5+ no longer natively supports Internet Explorer.', 'Use v4 of this component instead, or polyfill CSS object-fit.'].join('\n'));
|
|
31413
31836
|
}
|
|
31414
31837
|
}
|
|
31415
31838
|
}, []);
|
|
@@ -31505,9 +31928,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
31505
31928
|
* The variant to use.
|
|
31506
31929
|
* @default 'standard'
|
|
31507
31930
|
*/
|
|
31508
|
-
variant: propTypes
|
|
31509
|
-
/* @typescript-to-proptypes-ignore */
|
|
31510
|
-
.oneOfType([propTypes.oneOf(['masonry', 'quilted', 'standard', 'woven']), propTypes.string])
|
|
31931
|
+
variant: propTypes.oneOf(['masonry', 'quilted', 'standard', 'woven'])
|
|
31511
31932
|
} ;
|
|
31512
31933
|
var ImageList$1 = ImageList;
|
|
31513
31934
|
|
|
@@ -31626,7 +32047,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
31626
32047
|
|
|
31627
32048
|
{
|
|
31628
32049
|
if (reactIs_2(child)) {
|
|
31629
|
-
console.error(["
|
|
32050
|
+
console.error(["MUI: The ImageListItem component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
|
|
31630
32051
|
}
|
|
31631
32052
|
}
|
|
31632
32053
|
|
|
@@ -32335,7 +32756,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
32335
32756
|
if (variantProp && muiFormControl.variant) {
|
|
32336
32757
|
{
|
|
32337
32758
|
if (variantProp === muiFormControl.variant) {
|
|
32338
|
-
console.error('
|
|
32759
|
+
console.error('MUI: The `InputAdornment` variant infers the variant prop ' + 'you do not have to provide one.');
|
|
32339
32760
|
}
|
|
32340
32761
|
}
|
|
32341
32762
|
}
|
|
@@ -32925,7 +33346,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
32925
33346
|
|
|
32926
33347
|
inlineStyles.bar1.transform = `translateX(${transform}%)`;
|
|
32927
33348
|
} else {
|
|
32928
|
-
console.error('
|
|
33349
|
+
console.error('MUI: You need to provide a value prop ' + 'when using the determinate or buffer variant of LinearProgress .');
|
|
32929
33350
|
}
|
|
32930
33351
|
}
|
|
32931
33352
|
|
|
@@ -32939,7 +33360,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
32939
33360
|
|
|
32940
33361
|
inlineStyles.bar2.transform = `translateX(${transform}%)`;
|
|
32941
33362
|
} else {
|
|
32942
|
-
console.error('
|
|
33363
|
+
console.error('MUI: You need to provide a valueBuffer prop ' + 'when using the buffer variant of LinearProgress.');
|
|
32943
33364
|
}
|
|
32944
33365
|
}
|
|
32945
33366
|
|
|
@@ -33527,7 +33948,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
33527
33948
|
if (listItemRef.current) {
|
|
33528
33949
|
listItemRef.current.focus();
|
|
33529
33950
|
} else {
|
|
33530
|
-
console.error('
|
|
33951
|
+
console.error('MUI: Unable to set focus to a ListItemButton whose component has not been rendered.');
|
|
33531
33952
|
}
|
|
33532
33953
|
}
|
|
33533
33954
|
}, [autoFocus]);
|
|
@@ -33896,7 +34317,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
33896
34317
|
if (listItemRef.current) {
|
|
33897
34318
|
listItemRef.current.focus();
|
|
33898
34319
|
} else {
|
|
33899
|
-
console.error('
|
|
34320
|
+
console.error('MUI: Unable to set focus to a ListItem whose component has not been rendered.');
|
|
33900
34321
|
}
|
|
33901
34322
|
}
|
|
33902
34323
|
}, [autoFocus]);
|
|
@@ -34031,7 +34452,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
34031
34452
|
|
|
34032
34453
|
|
|
34033
34454
|
if (secondaryActionIndex !== -1 && secondaryActionIndex !== children.length - 1) {
|
|
34034
|
-
return new Error('
|
|
34455
|
+
return new Error('MUI: You used an element after ListItemSecondaryAction. ' + 'For ListItem to detect that it has a secondary action ' + 'you must pass it as the last child to ListItem.');
|
|
34035
34456
|
}
|
|
34036
34457
|
|
|
34037
34458
|
return null;
|
|
@@ -34718,7 +35139,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
34718
35139
|
|
|
34719
35140
|
{
|
|
34720
35141
|
if (reactIs_2(child)) {
|
|
34721
|
-
console.error(["
|
|
35142
|
+
console.error(["MUI: The Menu component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
|
|
34722
35143
|
}
|
|
34723
35144
|
}
|
|
34724
35145
|
|
|
@@ -34947,7 +35368,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
34947
35368
|
if (anchorReference === 'anchorPosition') {
|
|
34948
35369
|
{
|
|
34949
35370
|
if (!anchorPosition) {
|
|
34950
|
-
console.error('
|
|
35371
|
+
console.error('MUI: You need to provide a `anchorPosition` prop when using ' + '<Popover anchorReference="anchorPosition" />.');
|
|
34951
35372
|
}
|
|
34952
35373
|
}
|
|
34953
35374
|
|
|
@@ -34963,7 +35384,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
34963
35384
|
const box = anchorElement.getBoundingClientRect();
|
|
34964
35385
|
|
|
34965
35386
|
if (box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {
|
|
34966
|
-
console.warn(['
|
|
35387
|
+
console.warn(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', "Make sure the element is present in the document or that it's not display none."].join('\n'));
|
|
34967
35388
|
}
|
|
34968
35389
|
}
|
|
34969
35390
|
|
|
@@ -35020,7 +35441,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
35020
35441
|
|
|
35021
35442
|
{
|
|
35022
35443
|
if (elemRect.height > heightThreshold && elemRect.height && heightThreshold) {
|
|
35023
|
-
console.error(['
|
|
35444
|
+
console.error(['MUI: The popover component is too tall.', `Some part of it can not be seen on the screen (${elemRect.height - heightThreshold}px).`, 'Please consider adding a `max-height` to improve the user-experience.'].join('\n'));
|
|
35024
35445
|
}
|
|
35025
35446
|
} // Check if the horizontal axis needs shifting
|
|
35026
35447
|
|
|
@@ -35156,10 +35577,10 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
35156
35577
|
const box = resolvedAnchorEl.getBoundingClientRect();
|
|
35157
35578
|
|
|
35158
35579
|
if (box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {
|
|
35159
|
-
return new Error(['
|
|
35580
|
+
return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', "Make sure the element is present in the document or that it's not display none."].join('\n'));
|
|
35160
35581
|
}
|
|
35161
35582
|
} else {
|
|
35162
|
-
return new Error(['
|
|
35583
|
+
return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', `It should be an Element instance but it's \`${resolvedAnchorEl}\` instead.`].join('\n'));
|
|
35163
35584
|
}
|
|
35164
35585
|
}
|
|
35165
35586
|
|
|
@@ -35300,7 +35721,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
35300
35721
|
|
|
35301
35722
|
/**
|
|
35302
35723
|
* Props applied to the transition element.
|
|
35303
|
-
* By default, the element is based on this [`Transition`](
|
|
35724
|
+
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition) component.
|
|
35304
35725
|
* @default {}
|
|
35305
35726
|
*/
|
|
35306
35727
|
TransitionProps: propTypes.object
|
|
@@ -35441,7 +35862,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
35441
35862
|
|
|
35442
35863
|
{
|
|
35443
35864
|
if (reactIs_2(child)) {
|
|
35444
|
-
console.error(["
|
|
35865
|
+
console.error(["MUI: The Menu component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
|
|
35445
35866
|
}
|
|
35446
35867
|
}
|
|
35447
35868
|
|
|
@@ -35579,7 +36000,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
35579
36000
|
|
|
35580
36001
|
/**
|
|
35581
36002
|
* Props applied to the transition element.
|
|
35582
|
-
* By default, the element is based on this [`Transition`](
|
|
36003
|
+
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition) component.
|
|
35583
36004
|
* @default {}
|
|
35584
36005
|
*/
|
|
35585
36006
|
TransitionProps: propTypes.object,
|
|
@@ -35732,7 +36153,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
35732
36153
|
if (menuItemRef.current) {
|
|
35733
36154
|
menuItemRef.current.focus();
|
|
35734
36155
|
} else {
|
|
35735
|
-
console.error('
|
|
36156
|
+
console.error('MUI: Unable to set focus to a MenuItem whose component has not been rendered.');
|
|
35736
36157
|
}
|
|
35737
36158
|
}
|
|
35738
36159
|
}, [autoFocus]);
|
|
@@ -38711,7 +39132,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
38711
39132
|
*/
|
|
38712
39133
|
precision: chainPropTypes(propTypes.number, props => {
|
|
38713
39134
|
if (props.precision < 0.1) {
|
|
38714
|
-
return new Error(['
|
|
39135
|
+
return new Error(['MUI: The prop `precision` should be above 0.1.', 'A value below this limit has an imperceptible impact.'].join('\n'));
|
|
38715
39136
|
}
|
|
38716
39137
|
|
|
38717
39138
|
return null;
|
|
@@ -39155,7 +39576,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
39155
39576
|
|
|
39156
39577
|
{
|
|
39157
39578
|
if (reactIs_2(child)) {
|
|
39158
|
-
console.error(["
|
|
39579
|
+
console.error(["MUI: The Select component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
|
|
39159
39580
|
}
|
|
39160
39581
|
}
|
|
39161
39582
|
|
|
@@ -39163,7 +39584,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
39163
39584
|
|
|
39164
39585
|
if (multiple) {
|
|
39165
39586
|
if (!Array.isArray(value)) {
|
|
39166
|
-
throw new Error(`
|
|
39587
|
+
throw new Error(`MUI: The \`value\` prop must be an array when using the \`Select\` component with \`multiple\`.` );
|
|
39167
39588
|
}
|
|
39168
39589
|
|
|
39169
39590
|
selected = value.some(v => areEqualValues(v, child.props.value));
|
|
@@ -39212,7 +39633,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
39212
39633
|
React__namespace.useEffect(() => {
|
|
39213
39634
|
if (!foundMatch && !multiple && value !== '') {
|
|
39214
39635
|
const values = childrenArray.map(child => child.props.value);
|
|
39215
|
-
console.warn([`
|
|
39636
|
+
console.warn([`MUI: You have provided an out-of-range value \`${value}\` for the select ${name ? `(name="${name}") ` : ''}component.`, "Consider providing a value that matches one of the available options or ''.", `The available values are ${values.filter(x => x != null).map(x => `\`${x}\``).join(', ') || '""'}.`].join('\n'));
|
|
39216
39637
|
}
|
|
39217
39638
|
}, [foundMatch, childrenArray, multiple, name, value]);
|
|
39218
39639
|
}
|
|
@@ -40425,7 +40846,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
40425
40846
|
const range = Array.isArray(props.value || props.defaultValue);
|
|
40426
40847
|
|
|
40427
40848
|
if (range && props['aria-label'] != null) {
|
|
40428
|
-
return new Error('
|
|
40849
|
+
return new Error('MUI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider.');
|
|
40429
40850
|
}
|
|
40430
40851
|
|
|
40431
40852
|
return null;
|
|
@@ -40443,7 +40864,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
40443
40864
|
const range = Array.isArray(props.value || props.defaultValue);
|
|
40444
40865
|
|
|
40445
40866
|
if (range && props['aria-valuetext'] != null) {
|
|
40446
|
-
return new Error('
|
|
40867
|
+
return new Error('MUI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider.');
|
|
40447
40868
|
}
|
|
40448
40869
|
|
|
40449
40870
|
return null;
|
|
@@ -41187,7 +41608,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
41187
41608
|
|
|
41188
41609
|
/**
|
|
41189
41610
|
* Props applied to the transition element.
|
|
41190
|
-
* By default, the element is based on this [`Transition`](
|
|
41611
|
+
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition) component.
|
|
41191
41612
|
* @default {}
|
|
41192
41613
|
*/
|
|
41193
41614
|
TransitionProps: propTypes.object
|
|
@@ -41736,7 +42157,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
41736
42157
|
const allItems = React__namespace.Children.toArray(childrenProp).filter(child => {
|
|
41737
42158
|
{
|
|
41738
42159
|
if (reactIs_2(child)) {
|
|
41739
|
-
console.error(["
|
|
42160
|
+
console.error(["MUI: The SpeedDial component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
|
|
41740
42161
|
}
|
|
41741
42162
|
}
|
|
41742
42163
|
|
|
@@ -41936,7 +42357,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
41936
42357
|
|
|
41937
42358
|
/**
|
|
41938
42359
|
* Props applied to the transition element.
|
|
41939
|
-
* By default, the element is based on this [`Transition`](
|
|
42360
|
+
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition) component.
|
|
41940
42361
|
*/
|
|
41941
42362
|
TransitionProps: propTypes.object
|
|
41942
42363
|
} ;
|
|
@@ -42196,7 +42617,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
42196
42617
|
|
|
42197
42618
|
React__namespace.useEffect(() => {
|
|
42198
42619
|
if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {
|
|
42199
|
-
console.error(['
|
|
42620
|
+
console.error(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', "Tooltip needs to listen to the child element's events to display the title.", '', 'Add a simple wrapper element, such as a `span`.'].join('\n'));
|
|
42200
42621
|
}
|
|
42201
42622
|
}, [title, childNode, isControlled]);
|
|
42202
42623
|
}
|
|
@@ -42352,7 +42773,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
42352
42773
|
children.props.onTouchEnd(event);
|
|
42353
42774
|
}
|
|
42354
42775
|
|
|
42355
|
-
|
|
42776
|
+
stopTouchInteraction();
|
|
42356
42777
|
clearTimeout(leaveTimer.current);
|
|
42357
42778
|
leaveTimer.current = setTimeout(() => {
|
|
42358
42779
|
handleClose(event);
|
|
@@ -42435,7 +42856,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
42435
42856
|
|
|
42436
42857
|
React__namespace.useEffect(() => {
|
|
42437
42858
|
if (childNode && !childNode.getAttribute('data-mui-internal-clone-element')) {
|
|
42438
|
-
console.error(['
|
|
42859
|
+
console.error(['MUI: The `children` component of the Tooltip is not forwarding its props correctly.', 'Please make sure that props are spread on the same element that the ref is applied to.'].join('\n'));
|
|
42439
42860
|
}
|
|
42440
42861
|
}, [childNode]);
|
|
42441
42862
|
}
|
|
@@ -42469,7 +42890,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
42469
42890
|
|
|
42470
42891
|
{
|
|
42471
42892
|
if (children.props.title) {
|
|
42472
|
-
console.error(['
|
|
42893
|
+
console.error(['MUI: You have provided a `title` prop to the child of <Tooltip />.', `Remove this title prop \`${children.props.title}\` or the Tooltip component.`].join('\n'));
|
|
42473
42894
|
}
|
|
42474
42895
|
}
|
|
42475
42896
|
|
|
@@ -42707,7 +43128,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
42707
43128
|
|
|
42708
43129
|
/**
|
|
42709
43130
|
* Props applied to the transition element.
|
|
42710
|
-
* By default, the element is based on this [`Transition`](
|
|
43131
|
+
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition) component.
|
|
42711
43132
|
*/
|
|
42712
43133
|
TransitionProps: propTypes.object
|
|
42713
43134
|
} ;
|
|
@@ -44233,7 +44654,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
44233
44654
|
|
|
44234
44655
|
{
|
|
44235
44656
|
if (orientation !== 'vertical') {
|
|
44236
|
-
console.error('
|
|
44657
|
+
console.error('MUI: <StepContent /> is only designed for use with the vertical stepper.');
|
|
44237
44658
|
}
|
|
44238
44659
|
}
|
|
44239
44660
|
|
|
@@ -44310,7 +44731,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
44310
44731
|
|
|
44311
44732
|
/**
|
|
44312
44733
|
* Props applied to the transition element.
|
|
44313
|
-
* By default, the element is based on this [`Transition`](
|
|
44734
|
+
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition) component.
|
|
44314
44735
|
*/
|
|
44315
44736
|
TransitionProps: propTypes.object
|
|
44316
44737
|
} ;
|
|
@@ -47121,7 +47542,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
47121
47542
|
const newLastPage = Math.max(0, Math.ceil(count / rowsPerPage) - 1);
|
|
47122
47543
|
|
|
47123
47544
|
if (page < 0 || page > newLastPage) {
|
|
47124
|
-
return new Error('
|
|
47545
|
+
return new Error('MUI: The page prop of a TablePagination is out of range ' + `(0 to ${newLastPage}, but page is ${page}).`);
|
|
47125
47546
|
}
|
|
47126
47547
|
|
|
47127
47548
|
return null;
|
|
@@ -47985,7 +48406,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
47985
48406
|
|
|
47986
48407
|
{
|
|
47987
48408
|
if (centered && scrollable) {
|
|
47988
|
-
console.error('
|
|
48409
|
+
console.error('MUI: You can not use the `centered={true}` and `variant="scrollable"` properties ' + 'at the same time on a `Tabs` component.');
|
|
47989
48410
|
}
|
|
47990
48411
|
}
|
|
47991
48412
|
|
|
@@ -48033,7 +48454,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
48033
48454
|
|
|
48034
48455
|
{
|
|
48035
48456
|
if (!tab) {
|
|
48036
|
-
console.error([`
|
|
48457
|
+
console.error([`MUI: The \`value\` provided to the Tabs component is invalid.`, `None of the Tabs' children match with "${value}".`, valueToIndex.keys ? `You can provide one of the following values: ${Array.from(valueToIndex.keys()).join(', ')}.` : null].join('\n'));
|
|
48037
48458
|
}
|
|
48038
48459
|
}
|
|
48039
48460
|
|
|
@@ -48042,7 +48463,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
48042
48463
|
{
|
|
48043
48464
|
if (!warnedOnceTabPresent && tabMeta && tabMeta.width === 0 && tabMeta.height === 0) {
|
|
48044
48465
|
tabsMeta = null;
|
|
48045
|
-
console.error(['
|
|
48466
|
+
console.error(['MUI: The `value` provided to the Tabs component is invalid.', `The Tab with this \`value\` ("${value}") is not part of the document layout.`, "Make sure the tab item is present in the document or that it's not `display: none`."].join('\n'));
|
|
48046
48467
|
warnedOnceTabPresent = true;
|
|
48047
48468
|
}
|
|
48048
48469
|
}
|
|
@@ -48302,7 +48723,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
48302
48723
|
|
|
48303
48724
|
{
|
|
48304
48725
|
if (reactIs_2(child)) {
|
|
48305
|
-
console.error(["
|
|
48726
|
+
console.error(["MUI: The Tabs component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
|
|
48306
48727
|
}
|
|
48307
48728
|
}
|
|
48308
48729
|
|
|
@@ -48676,7 +49097,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
48676
49097
|
|
|
48677
49098
|
{
|
|
48678
49099
|
if (select && !children) {
|
|
48679
|
-
console.error('
|
|
49100
|
+
console.error('MUI: `children` must be passed when using the `TextField` component with `select`.');
|
|
48680
49101
|
}
|
|
48681
49102
|
}
|
|
48682
49103
|
|
|
@@ -48962,7 +49383,9 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
48962
49383
|
/**
|
|
48963
49384
|
* Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).
|
|
48964
49385
|
*/
|
|
48965
|
-
type: propTypes
|
|
49386
|
+
type: propTypes
|
|
49387
|
+
/* @typescript-to-proptypes-ignore */
|
|
49388
|
+
.string,
|
|
48966
49389
|
|
|
48967
49390
|
/**
|
|
48968
49391
|
* The value of the `input` element, required for a controlled component.
|
|
@@ -49367,7 +49790,7 @@ See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more det
|
|
|
49367
49790
|
|
|
49368
49791
|
{
|
|
49369
49792
|
if (reactIs_2(child)) {
|
|
49370
|
-
console.error(["
|
|
49793
|
+
console.error(["MUI: The ToggleButtonGroup component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
|
|
49371
49794
|
}
|
|
49372
49795
|
}
|
|
49373
49796
|
|