@mui/material 5.2.0 → 5.2.4
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 +1 -1
- package/Accordion/Accordion.js +2 -2
- package/Accordion/accordionClasses.d.ts +18 -18
- package/AccordionActions/AccordionActions.js +1 -1
- package/AccordionActions/accordionActionsClasses.d.ts +10 -10
- package/AccordionDetails/AccordionDetails.js +1 -1
- package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
- package/AccordionSummary/AccordionSummary.js +2 -2
- package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
- package/Alert/Alert.js +1 -3
- package/Alert/alertClasses.d.ts +44 -44
- package/AlertTitle/AlertTitle.js +1 -1
- package/AlertTitle/alertTitleClasses.d.ts +8 -8
- package/AppBar/AppBar.js +1 -1
- package/AppBar/appBarClasses.d.ts +28 -28
- package/Autocomplete/Autocomplete.js +1 -1
- package/Autocomplete/autocompleteClasses.d.ts +54 -54
- package/Avatar/Avatar.d.ts +1 -1
- package/Avatar/Avatar.js +1 -1
- package/Avatar/avatarClasses.d.ts +20 -20
- package/AvatarGroup/AvatarGroup.d.ts +5 -0
- package/AvatarGroup/AvatarGroup.js +20 -5
- package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
- package/Backdrop/Backdrop.js +1 -1
- package/Badge/Badge.js +17 -4
- package/BottomNavigation/BottomNavigation.js +1 -1
- package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
- package/BottomNavigationAction/BottomNavigationAction.js +1 -1
- package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
- package/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/Breadcrumbs/Breadcrumbs.js +1 -1
- package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
- package/Button/Button.js +16 -35
- package/Button/buttonClasses.d.ts +76 -76
- package/ButtonBase/ButtonBase.d.ts +1 -1
- package/ButtonBase/ButtonBase.js +2 -2
- package/ButtonBase/buttonBaseClasses.d.ts +12 -12
- package/ButtonBase/touchRippleClasses.d.ts +20 -20
- package/ButtonGroup/ButtonGroup.js +1 -1
- package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
- package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
- package/CHANGELOG.md +244 -1
- package/Card/Card.js +1 -1
- package/Card/cardClasses.d.ts +8 -8
- package/CardActionArea/CardActionArea.js +1 -1
- package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
- package/CardActions/CardActions.js +1 -1
- package/CardActions/cardActionsClasses.d.ts +10 -10
- package/CardContent/CardContent.js +1 -1
- package/CardContent/cardContentClasses.d.ts +8 -8
- package/CardHeader/CardHeader.js +1 -1
- package/CardHeader/cardHeaderClasses.d.ts +18 -18
- package/CardMedia/CardMedia.js +1 -1
- package/CardMedia/cardMediaClasses.d.ts +12 -12
- package/Checkbox/Checkbox.js +1 -1
- package/Checkbox/checkboxClasses.d.ts +18 -18
- package/Chip/Chip.js +1 -1
- package/Chip/chipClasses.d.ts +80 -80
- package/CircularProgress/CircularProgress.js +1 -1
- package/CircularProgress/circularProgressClasses.d.ts +26 -26
- package/ClickAwayListener/index.d.ts +2 -2
- package/Collapse/Collapse.d.ts +1 -1
- package/Collapse/Collapse.js +1 -1
- package/Collapse/collapseClasses.d.ts +18 -18
- package/Container/Container.js +1 -1
- package/Container/containerClasses.d.ts +22 -22
- package/CssBaseline/CssBaseline.d.ts +2 -2
- package/CssBaseline/CssBaseline.js +1 -1
- package/Dialog/Dialog.d.ts +1 -1
- package/Dialog/Dialog.js +2 -2
- package/Dialog/DialogContext.d.ts +6 -6
- package/Dialog/dialogClasses.d.ts +36 -36
- package/DialogActions/DialogActions.js +1 -1
- package/DialogActions/dialogActionsClasses.d.ts +10 -10
- package/DialogContent/DialogContent.js +1 -1
- package/DialogContent/dialogContentClasses.d.ts +10 -10
- package/DialogContentText/DialogContentText.js +1 -1
- package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
- package/DialogTitle/DialogTitle.js +1 -1
- package/DialogTitle/dialogTitleClasses.d.ts +8 -8
- package/Divider/Divider.js +1 -1
- package/Divider/dividerClasses.d.ts +34 -34
- package/Drawer/Drawer.js +1 -1
- package/Drawer/drawerClasses.d.ts +30 -30
- package/Fab/Fab.js +1 -1
- package/Fab/fabClasses.d.ts +26 -26
- package/Fade/Fade.d.ts +1 -1
- package/FilledInput/FilledInput.js +1 -1
- package/FilledInput/filledInputClasses.d.ts +40 -40
- package/FormControl/FormControl.js +1 -1
- package/FormControl/formControlClasses.d.ts +14 -14
- package/FormControlLabel/FormControlLabel.js +1 -1
- package/FormControlLabel/formControlLabelClasses.d.ts +18 -18
- package/FormGroup/FormGroup.js +1 -1
- package/FormGroup/formGroupClasses.d.ts +10 -10
- package/FormHelperText/FormHelperText.js +1 -1
- package/FormHelperText/formHelperTextClasses.d.ts +22 -22
- package/FormLabel/FormLabel.js +1 -1
- package/FormLabel/formLabelClasses.d.ts +22 -22
- package/GlobalStyles/GlobalStyles.d.ts +2 -1
- package/Grid/Grid.js +98 -69
- package/Grid/gridClasses.d.ts +48 -48
- package/Grow/Grow.d.ts +1 -1
- package/Icon/Icon.js +1 -1
- package/Icon/iconClasses.d.ts +24 -24
- package/IconButton/IconButton.js +1 -1
- package/IconButton/iconButtonClasses.d.ts +26 -26
- package/ImageList/ImageList.js +1 -1
- package/ImageList/imageListClasses.d.ts +16 -16
- package/ImageListItem/ImageListItem.js +1 -1
- package/ImageListItem/imageListItemClasses.d.ts +18 -18
- package/ImageListItemBar/ImageListItemBar.js +1 -1
- package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
- package/Input/Input.js +1 -1
- package/Input/inputClasses.d.ts +34 -34
- package/InputAdornment/InputAdornment.js +1 -1
- package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
- package/InputBase/InputBase.d.ts +6 -0
- package/InputBase/InputBase.js +11 -3
- package/InputBase/inputBaseClasses.d.ts +44 -44
- package/InputLabel/InputLabel.js +1 -1
- package/InputLabel/inputLabelClasses.d.ts +32 -32
- package/LinearProgress/LinearProgress.js +1 -1
- package/LinearProgress/linearProgressClasses.d.ts +42 -42
- package/Link/Link.js +1 -1
- package/Link/linkClasses.d.ts +18 -18
- package/List/List.d.ts +12 -2
- package/List/List.js +1 -1
- package/List/listClasses.d.ts +14 -14
- package/ListItem/ListItem.d.ts +1 -1
- package/ListItem/ListItem.js +1 -1
- package/ListItem/listItemClasses.d.ts +30 -30
- package/ListItemAvatar/ListItemAvatar.js +1 -1
- package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
- package/ListItemButton/ListItemButton.d.ts +1 -1
- package/ListItemButton/ListItemButton.js +2 -2
- package/ListItemButton/listItemButtonClasses.d.ts +22 -22
- package/ListItemIcon/ListItemIcon.js +1 -1
- package/ListItemIcon/listItemIconClasses.d.ts +10 -10
- package/ListItemSecondaryAction/ListItemSecondaryAction.js +1 -1
- package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
- package/ListItemText/ListItemText.js +1 -1
- package/ListItemText/listItemTextClasses.d.ts +18 -18
- package/ListSubheader/ListSubheader.js +1 -1
- package/ListSubheader/listSubheaderClasses.d.ts +18 -18
- package/Menu/Menu.d.ts +1 -1
- package/Menu/Menu.js +2 -2
- package/Menu/menuClasses.d.ts +12 -12
- package/MenuItem/MenuItem.d.ts +1 -1
- package/MenuItem/MenuItem.js +2 -2
- package/MenuItem/menuItemClasses.d.ts +20 -20
- package/MenuList/MenuList.d.ts +47 -36
- package/MobileStepper/MobileStepper.js +1 -1
- package/MobileStepper/mobileStepperClasses.d.ts +22 -22
- package/Modal/Modal.js +1 -1
- package/NativeSelect/NativeSelect.js +1 -1
- package/NativeSelect/nativeSelectClasses.d.ts +32 -32
- package/OutlinedInput/OutlinedInput.js +15 -2
- package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
- package/Pagination/Pagination.js +1 -1
- package/Pagination/paginationClasses.d.ts +14 -14
- package/PaginationItem/PaginationItem.js +1 -1
- package/PaginationItem/paginationItemClasses.d.ts +42 -42
- package/Paper/Paper.js +1 -1
- package/Paper/paperClasses.d.ts +39 -39
- package/Popover/Popover.d.ts +1 -1
- package/Popover/Popover.js +2 -2
- package/Popover/popoverClasses.d.ts +10 -10
- package/Popper/Popper.d.ts +17 -17
- package/README.md +9 -7
- package/Radio/Radio.js +1 -1
- package/Radio/radioClasses.d.ts +16 -16
- package/RadioGroup/RadioGroupContext.d.ts +11 -11
- package/RadioGroup/useRadioGroup.d.ts +4 -4
- package/Rating/Rating.js +1 -1
- package/Rating/ratingClasses.d.ts +40 -40
- package/ScopedCssBaseline/ScopedCssBaseline.d.ts +1 -1
- package/ScopedCssBaseline/ScopedCssBaseline.js +1 -1
- package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
- package/Select/Select.js +1 -1
- package/Select/SelectInput.js +17 -1
- package/Select/selectClasses.d.ts +30 -30
- package/Skeleton/Skeleton.js +1 -1
- package/Skeleton/skeletonClasses.d.ts +24 -24
- package/Slide/Slide.d.ts +1 -1
- package/Slider/Slider.js +1 -1
- package/Snackbar/Snackbar.d.ts +5 -5
- package/Snackbar/Snackbar.js +62 -6
- package/Snackbar/snackbarClasses.d.ts +20 -20
- package/SnackbarContent/SnackbarContent.js +1 -1
- package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
- package/SpeedDial/SpeedDial.d.ts +1 -1
- package/SpeedDial/SpeedDial.js +2 -2
- package/SpeedDial/speedDialClasses.d.ts +22 -22
- package/SpeedDialAction/SpeedDialAction.js +1 -1
- package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
- package/SpeedDialIcon/SpeedDialIcon.js +1 -1
- package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
- package/Stack/Stack.js +1 -1
- package/Step/Step.js +1 -1
- package/Step/stepClasses.d.ts +16 -16
- package/StepButton/StepButton.js +1 -1
- package/StepButton/stepButtonClasses.d.ts +14 -14
- package/StepConnector/StepConnector.js +1 -1
- package/StepConnector/stepConnectorClasses.d.ts +26 -26
- package/StepContent/StepContent.d.ts +1 -1
- package/StepContent/StepContent.js +2 -2
- package/StepContent/stepContentClasses.d.ts +12 -12
- package/StepIcon/StepIcon.js +1 -1
- package/StepIcon/stepIconClasses.d.ts +16 -16
- package/StepLabel/StepLabel.js +1 -1
- package/StepLabel/stepLabelClasses.d.ts +28 -28
- package/Stepper/Stepper.js +1 -1
- package/Stepper/stepperClasses.d.ts +14 -14
- package/SvgIcon/SvgIcon.js +1 -1
- package/SvgIcon/svgIconClasses.d.ts +24 -24
- package/Switch/Switch.js +1 -1
- package/Switch/switchClasses.d.ts +32 -32
- package/Tab/Tab.js +1 -1
- package/Tab/tabClasses.d.ts +26 -26
- package/TabScrollButton/TabScrollButton.js +1 -1
- package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
- package/Table/Table.js +1 -1
- package/Table/tableClasses.d.ts +10 -10
- package/TableBody/TableBody.js +1 -1
- package/TableBody/tableBodyClasses.d.ts +8 -8
- package/TableCell/TableCell.js +1 -1
- package/TableCell/tableCellClasses.d.ts +32 -32
- package/TableContainer/TableContainer.js +1 -1
- package/TableContainer/tableContainerClasses.d.ts +8 -8
- package/TableFooter/TableFooter.js +1 -1
- package/TableFooter/tableFooterClasses.d.ts +8 -8
- package/TableHead/TableHead.js +1 -1
- package/TableHead/tableHeadClasses.d.ts +8 -8
- package/TablePagination/TablePagination.js +1 -1
- package/TablePagination/tablePaginationClasses.d.ts +28 -28
- package/TableRow/TableRow.js +1 -1
- package/TableRow/tableRowClasses.d.ts +16 -16
- package/TableSortLabel/TableSortLabel.js +1 -1
- package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
- package/Tabs/Tabs.js +1 -1
- package/Tabs/tabsClasses.d.ts +32 -32
- package/TextField/TextField.js +6 -12
- package/TextField/textFieldClasses.d.ts +8 -8
- package/ToggleButton/ToggleButton.js +1 -1
- package/ToggleButton/toggleButtonClasses.d.ts +24 -24
- package/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
- package/Toolbar/Toolbar.js +1 -1
- package/Toolbar/toolbarClasses.d.ts +14 -14
- package/Tooltip/Tooltip.d.ts +1 -1
- package/Tooltip/Tooltip.js +2 -2
- package/Tooltip/tooltipClasses.d.ts +30 -30
- package/Typography/Typography.js +1 -1
- package/Typography/typographyClasses.d.ts +50 -50
- package/Zoom/Zoom.d.ts +1 -1
- package/darkScrollbar/index.d.ts +28 -28
- package/index.js +1 -1
- package/internal/switchBaseClasses.d.ts +12 -12
- package/legacy/Accordion/Accordion.js +2 -2
- package/legacy/AccordionActions/AccordionActions.js +1 -1
- package/legacy/AccordionDetails/AccordionDetails.js +1 -1
- package/legacy/AccordionSummary/AccordionSummary.js +2 -2
- package/legacy/Alert/Alert.js +1 -3
- package/legacy/AlertTitle/AlertTitle.js +1 -1
- package/legacy/AppBar/AppBar.js +1 -1
- package/legacy/Autocomplete/Autocomplete.js +1 -1
- package/legacy/Avatar/Avatar.js +1 -1
- package/legacy/AvatarGroup/AvatarGroup.js +19 -4
- package/legacy/Backdrop/Backdrop.js +1 -1
- package/legacy/Badge/Badge.js +19 -5
- package/legacy/BottomNavigation/BottomNavigation.js +1 -1
- package/legacy/BottomNavigationAction/BottomNavigationAction.js +1 -1
- package/legacy/Breadcrumbs/Breadcrumbs.js +1 -1
- package/legacy/Button/Button.js +23 -35
- package/legacy/ButtonBase/ButtonBase.js +2 -2
- package/legacy/ButtonGroup/ButtonGroup.js +1 -1
- package/legacy/Card/Card.js +1 -1
- package/legacy/CardActionArea/CardActionArea.js +1 -1
- package/legacy/CardActions/CardActions.js +1 -1
- package/legacy/CardContent/CardContent.js +1 -1
- package/legacy/CardHeader/CardHeader.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/Collapse/Collapse.js +1 -1
- package/legacy/Container/Container.js +1 -1
- package/legacy/CssBaseline/CssBaseline.js +1 -1
- package/legacy/Dialog/Dialog.js +2 -2
- package/legacy/DialogActions/DialogActions.js +1 -1
- package/legacy/DialogContent/DialogContent.js +1 -1
- package/legacy/DialogContentText/DialogContentText.js +1 -1
- package/legacy/DialogTitle/DialogTitle.js +1 -1
- package/legacy/Divider/Divider.js +1 -1
- package/legacy/Drawer/Drawer.js +1 -1
- package/legacy/Fab/Fab.js +1 -1
- package/legacy/FilledInput/FilledInput.js +1 -1
- package/legacy/FormControl/FormControl.js +1 -1
- package/legacy/FormControlLabel/FormControlLabel.js +1 -1
- package/legacy/FormGroup/FormGroup.js +1 -1
- package/legacy/FormHelperText/FormHelperText.js +1 -1
- package/legacy/FormLabel/FormLabel.js +1 -1
- package/legacy/Grid/Grid.js +109 -81
- package/legacy/Icon/Icon.js +1 -1
- package/legacy/IconButton/IconButton.js +1 -1
- package/legacy/ImageList/ImageList.js +1 -1
- package/legacy/ImageListItem/ImageListItem.js +1 -1
- package/legacy/ImageListItemBar/ImageListItemBar.js +1 -1
- package/legacy/Input/Input.js +1 -1
- package/legacy/InputAdornment/InputAdornment.js +1 -1
- package/legacy/InputBase/InputBase.js +11 -3
- package/legacy/InputLabel/InputLabel.js +1 -1
- package/legacy/LinearProgress/LinearProgress.js +1 -1
- package/legacy/Link/Link.js +1 -1
- package/legacy/List/List.js +1 -1
- package/legacy/ListItem/ListItem.js +1 -1
- package/legacy/ListItemAvatar/ListItemAvatar.js +1 -1
- package/legacy/ListItemButton/ListItemButton.js +2 -2
- package/legacy/ListItemIcon/ListItemIcon.js +1 -1
- package/legacy/ListItemSecondaryAction/ListItemSecondaryAction.js +1 -1
- package/legacy/ListItemText/ListItemText.js +1 -1
- package/legacy/ListSubheader/ListSubheader.js +1 -1
- package/legacy/Menu/Menu.js +2 -2
- package/legacy/MenuItem/MenuItem.js +2 -2
- package/legacy/MobileStepper/MobileStepper.js +1 -1
- package/legacy/Modal/Modal.js +1 -1
- package/legacy/NativeSelect/NativeSelect.js +1 -1
- package/legacy/OutlinedInput/OutlinedInput.js +15 -2
- package/legacy/Pagination/Pagination.js +1 -1
- package/legacy/PaginationItem/PaginationItem.js +1 -1
- package/legacy/Paper/Paper.js +1 -1
- package/legacy/Popover/Popover.js +2 -2
- package/legacy/Radio/Radio.js +1 -1
- package/legacy/Rating/Rating.js +1 -1
- package/legacy/ScopedCssBaseline/ScopedCssBaseline.js +1 -1
- package/legacy/Select/Select.js +1 -1
- package/legacy/Select/SelectInput.js +17 -1
- package/legacy/Skeleton/Skeleton.js +1 -1
- package/legacy/Slider/Slider.js +1 -1
- package/legacy/Snackbar/Snackbar.js +62 -6
- package/legacy/SnackbarContent/SnackbarContent.js +1 -1
- package/legacy/SpeedDial/SpeedDial.js +2 -2
- package/legacy/SpeedDialAction/SpeedDialAction.js +1 -1
- package/legacy/SpeedDialIcon/SpeedDialIcon.js +1 -1
- package/legacy/Stack/Stack.js +1 -1
- package/legacy/Step/Step.js +1 -1
- package/legacy/StepButton/StepButton.js +1 -1
- package/legacy/StepConnector/StepConnector.js +1 -1
- package/legacy/StepContent/StepContent.js +2 -2
- package/legacy/StepIcon/StepIcon.js +1 -1
- package/legacy/StepLabel/StepLabel.js +1 -1
- package/legacy/Stepper/Stepper.js +1 -1
- package/legacy/SvgIcon/SvgIcon.js +1 -1
- package/legacy/Switch/Switch.js +1 -1
- package/legacy/Tab/Tab.js +1 -1
- package/legacy/TabScrollButton/TabScrollButton.js +1 -1
- package/legacy/Table/Table.js +1 -1
- package/legacy/TableBody/TableBody.js +1 -1
- package/legacy/TableCell/TableCell.js +1 -1
- package/legacy/TableContainer/TableContainer.js +1 -1
- package/legacy/TableFooter/TableFooter.js +1 -1
- package/legacy/TableHead/TableHead.js +1 -1
- package/legacy/TablePagination/TablePagination.js +1 -1
- package/legacy/TableRow/TableRow.js +1 -1
- package/legacy/TableSortLabel/TableSortLabel.js +1 -1
- package/legacy/Tabs/Tabs.js +1 -1
- package/legacy/TextField/TextField.js +6 -12
- package/legacy/ToggleButton/ToggleButton.js +1 -1
- package/legacy/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/legacy/Toolbar/Toolbar.js +1 -1
- package/legacy/Tooltip/Tooltip.js +2 -2
- package/legacy/Typography/Typography.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/styles/adaptV4Theme.js +1 -1
- package/legacy/styles/index.js +1 -1
- package/legacy/styles/responsiveFontSizes.js +1 -1
- package/legacy/useMediaQuery/useMediaQuery.js +31 -83
- package/locale/index.d.ts +66 -66
- package/modern/Accordion/Accordion.js +2 -2
- package/modern/AccordionActions/AccordionActions.js +1 -1
- package/modern/AccordionDetails/AccordionDetails.js +1 -1
- package/modern/AccordionSummary/AccordionSummary.js +2 -2
- package/modern/Alert/Alert.js +1 -3
- package/modern/AlertTitle/AlertTitle.js +1 -1
- package/modern/AppBar/AppBar.js +1 -1
- package/modern/Autocomplete/Autocomplete.js +1 -1
- package/modern/Avatar/Avatar.js +1 -1
- package/modern/AvatarGroup/AvatarGroup.js +20 -5
- package/modern/Backdrop/Backdrop.js +1 -1
- package/modern/Badge/Badge.js +17 -4
- package/modern/BottomNavigation/BottomNavigation.js +1 -1
- package/modern/BottomNavigationAction/BottomNavigationAction.js +1 -1
- package/modern/Breadcrumbs/Breadcrumbs.js +1 -1
- package/modern/Button/Button.js +16 -35
- package/modern/ButtonBase/ButtonBase.js +2 -2
- package/modern/ButtonGroup/ButtonGroup.js +1 -1
- package/modern/Card/Card.js +1 -1
- package/modern/CardActionArea/CardActionArea.js +1 -1
- package/modern/CardActions/CardActions.js +1 -1
- package/modern/CardContent/CardContent.js +1 -1
- package/modern/CardHeader/CardHeader.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/Collapse/Collapse.js +1 -1
- package/modern/Container/Container.js +1 -1
- package/modern/CssBaseline/CssBaseline.js +1 -1
- package/modern/Dialog/Dialog.js +2 -2
- package/modern/DialogActions/DialogActions.js +1 -1
- package/modern/DialogContent/DialogContent.js +1 -1
- package/modern/DialogContentText/DialogContentText.js +1 -1
- package/modern/DialogTitle/DialogTitle.js +1 -1
- package/modern/Divider/Divider.js +1 -1
- package/modern/Drawer/Drawer.js +1 -1
- package/modern/Fab/Fab.js +1 -1
- package/modern/FilledInput/FilledInput.js +1 -1
- package/modern/FormControl/FormControl.js +1 -1
- package/modern/FormControlLabel/FormControlLabel.js +1 -1
- package/modern/FormGroup/FormGroup.js +1 -1
- package/modern/FormHelperText/FormHelperText.js +1 -1
- package/modern/FormLabel/FormLabel.js +1 -1
- package/modern/Grid/Grid.js +98 -69
- package/modern/Icon/Icon.js +1 -1
- package/modern/IconButton/IconButton.js +1 -1
- package/modern/ImageList/ImageList.js +1 -1
- package/modern/ImageListItem/ImageListItem.js +1 -1
- package/modern/ImageListItemBar/ImageListItemBar.js +1 -1
- package/modern/Input/Input.js +1 -1
- package/modern/InputAdornment/InputAdornment.js +1 -1
- package/modern/InputBase/InputBase.js +11 -3
- package/modern/InputLabel/InputLabel.js +1 -1
- package/modern/LinearProgress/LinearProgress.js +1 -1
- package/modern/Link/Link.js +1 -1
- package/modern/List/List.js +1 -1
- package/modern/ListItem/ListItem.js +1 -1
- package/modern/ListItemAvatar/ListItemAvatar.js +1 -1
- package/modern/ListItemButton/ListItemButton.js +2 -2
- package/modern/ListItemIcon/ListItemIcon.js +1 -1
- package/modern/ListItemSecondaryAction/ListItemSecondaryAction.js +1 -1
- package/modern/ListItemText/ListItemText.js +1 -1
- package/modern/ListSubheader/ListSubheader.js +1 -1
- package/modern/Menu/Menu.js +2 -2
- package/modern/MenuItem/MenuItem.js +2 -2
- package/modern/MobileStepper/MobileStepper.js +1 -1
- package/modern/Modal/Modal.js +1 -1
- package/modern/NativeSelect/NativeSelect.js +1 -1
- package/modern/OutlinedInput/OutlinedInput.js +15 -2
- package/modern/Pagination/Pagination.js +1 -1
- package/modern/PaginationItem/PaginationItem.js +1 -1
- package/modern/Paper/Paper.js +1 -1
- package/modern/Popover/Popover.js +2 -2
- package/modern/Radio/Radio.js +1 -1
- package/modern/Rating/Rating.js +1 -1
- package/modern/ScopedCssBaseline/ScopedCssBaseline.js +1 -1
- package/modern/Select/Select.js +1 -1
- package/modern/Select/SelectInput.js +17 -1
- package/modern/Skeleton/Skeleton.js +1 -1
- package/modern/Slider/Slider.js +1 -1
- package/modern/Snackbar/Snackbar.js +62 -6
- package/modern/SnackbarContent/SnackbarContent.js +1 -1
- package/modern/SpeedDial/SpeedDial.js +2 -2
- package/modern/SpeedDialAction/SpeedDialAction.js +1 -1
- package/modern/SpeedDialIcon/SpeedDialIcon.js +1 -1
- package/modern/Stack/Stack.js +1 -1
- package/modern/Step/Step.js +1 -1
- package/modern/StepButton/StepButton.js +1 -1
- package/modern/StepConnector/StepConnector.js +1 -1
- package/modern/StepContent/StepContent.js +2 -2
- package/modern/StepIcon/StepIcon.js +1 -1
- package/modern/StepLabel/StepLabel.js +1 -1
- package/modern/Stepper/Stepper.js +1 -1
- package/modern/SvgIcon/SvgIcon.js +1 -1
- package/modern/Switch/Switch.js +1 -1
- package/modern/Tab/Tab.js +1 -1
- package/modern/TabScrollButton/TabScrollButton.js +1 -1
- package/modern/Table/Table.js +1 -1
- package/modern/TableBody/TableBody.js +1 -1
- package/modern/TableCell/TableCell.js +1 -1
- package/modern/TableContainer/TableContainer.js +1 -1
- package/modern/TableFooter/TableFooter.js +1 -1
- package/modern/TableHead/TableHead.js +1 -1
- package/modern/TablePagination/TablePagination.js +1 -1
- package/modern/TableRow/TableRow.js +1 -1
- package/modern/TableSortLabel/TableSortLabel.js +1 -1
- package/modern/Tabs/Tabs.js +1 -1
- package/modern/TextField/TextField.js +6 -10
- package/modern/ToggleButton/ToggleButton.js +1 -1
- package/modern/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/modern/Toolbar/Toolbar.js +1 -1
- package/modern/Tooltip/Tooltip.js +2 -2
- package/modern/Typography/Typography.js +1 -1
- package/modern/index.js +1 -1
- package/modern/styles/adaptV4Theme.js +1 -1
- package/modern/styles/index.js +1 -1
- package/modern/styles/responsiveFontSizes.js +1 -1
- package/modern/useMediaQuery/useMediaQuery.js +26 -65
- package/node/Accordion/Accordion.js +2 -2
- package/node/AccordionActions/AccordionActions.js +1 -1
- package/node/AccordionDetails/AccordionDetails.js +1 -1
- package/node/AccordionSummary/AccordionSummary.js +2 -2
- package/node/Alert/Alert.js +1 -3
- package/node/AlertTitle/AlertTitle.js +1 -1
- package/node/AppBar/AppBar.js +1 -1
- package/node/Autocomplete/Autocomplete.js +1 -1
- package/node/Avatar/Avatar.js +1 -1
- package/node/AvatarGroup/AvatarGroup.js +20 -5
- package/node/Backdrop/Backdrop.js +1 -1
- package/node/Badge/Badge.js +17 -4
- package/node/BottomNavigation/BottomNavigation.js +1 -1
- package/node/BottomNavigationAction/BottomNavigationAction.js +1 -1
- package/node/Breadcrumbs/Breadcrumbs.js +1 -1
- package/node/Button/Button.js +17 -34
- package/node/ButtonBase/ButtonBase.js +2 -2
- package/node/ButtonGroup/ButtonGroup.js +1 -1
- package/node/Card/Card.js +1 -1
- package/node/CardActionArea/CardActionArea.js +1 -1
- package/node/CardActions/CardActions.js +1 -1
- package/node/CardContent/CardContent.js +1 -1
- package/node/CardHeader/CardHeader.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/Collapse/Collapse.js +1 -1
- package/node/Container/Container.js +1 -1
- package/node/CssBaseline/CssBaseline.js +1 -1
- package/node/Dialog/Dialog.js +2 -2
- package/node/DialogActions/DialogActions.js +1 -1
- package/node/DialogContent/DialogContent.js +1 -1
- package/node/DialogContentText/DialogContentText.js +1 -1
- package/node/DialogTitle/DialogTitle.js +1 -1
- package/node/Divider/Divider.js +1 -1
- package/node/Drawer/Drawer.js +1 -1
- package/node/Fab/Fab.js +1 -1
- package/node/FilledInput/FilledInput.js +1 -1
- package/node/FormControl/FormControl.js +1 -1
- package/node/FormControlLabel/FormControlLabel.js +1 -1
- package/node/FormGroup/FormGroup.js +1 -1
- package/node/FormHelperText/FormHelperText.js +1 -1
- package/node/FormLabel/FormLabel.js +1 -1
- package/node/Grid/Grid.js +101 -68
- package/node/Icon/Icon.js +1 -1
- package/node/IconButton/IconButton.js +1 -1
- package/node/ImageList/ImageList.js +1 -1
- package/node/ImageListItem/ImageListItem.js +1 -1
- package/node/ImageListItemBar/ImageListItemBar.js +1 -1
- package/node/Input/Input.js +1 -1
- package/node/InputAdornment/InputAdornment.js +1 -1
- package/node/InputBase/InputBase.js +11 -3
- package/node/InputLabel/InputLabel.js +1 -1
- package/node/LinearProgress/LinearProgress.js +1 -1
- package/node/Link/Link.js +1 -1
- package/node/List/List.js +1 -1
- package/node/ListItem/ListItem.js +1 -1
- package/node/ListItemAvatar/ListItemAvatar.js +1 -1
- package/node/ListItemButton/ListItemButton.js +2 -2
- package/node/ListItemIcon/ListItemIcon.js +1 -1
- package/node/ListItemSecondaryAction/ListItemSecondaryAction.js +1 -1
- package/node/ListItemText/ListItemText.js +1 -1
- package/node/ListSubheader/ListSubheader.js +1 -1
- package/node/Menu/Menu.js +2 -2
- package/node/MenuItem/MenuItem.js +2 -2
- package/node/MobileStepper/MobileStepper.js +1 -1
- package/node/Modal/Modal.js +1 -1
- package/node/NativeSelect/NativeSelect.js +1 -1
- package/node/OutlinedInput/OutlinedInput.js +16 -2
- package/node/Pagination/Pagination.js +1 -1
- package/node/PaginationItem/PaginationItem.js +1 -1
- package/node/Paper/Paper.js +1 -1
- package/node/Popover/Popover.js +2 -2
- package/node/Radio/Radio.js +1 -1
- package/node/Rating/Rating.js +1 -1
- package/node/ScopedCssBaseline/ScopedCssBaseline.js +1 -1
- package/node/Select/Select.js +1 -1
- package/node/Select/SelectInput.js +17 -1
- package/node/Skeleton/Skeleton.js +1 -1
- package/node/Slider/Slider.js +1 -1
- package/node/Snackbar/Snackbar.js +62 -6
- package/node/SnackbarContent/SnackbarContent.js +1 -1
- package/node/SpeedDial/SpeedDial.js +2 -2
- package/node/SpeedDialAction/SpeedDialAction.js +1 -1
- package/node/SpeedDialIcon/SpeedDialIcon.js +1 -1
- package/node/Stack/Stack.js +1 -1
- package/node/Step/Step.js +1 -1
- package/node/StepButton/StepButton.js +1 -1
- package/node/StepConnector/StepConnector.js +1 -1
- package/node/StepContent/StepContent.js +2 -2
- package/node/StepIcon/StepIcon.js +1 -1
- package/node/StepLabel/StepLabel.js +1 -1
- package/node/Stepper/Stepper.js +1 -1
- package/node/SvgIcon/SvgIcon.js +1 -1
- package/node/Switch/Switch.js +1 -1
- package/node/Tab/Tab.js +1 -1
- package/node/TabScrollButton/TabScrollButton.js +1 -1
- package/node/Table/Table.js +1 -1
- package/node/TableBody/TableBody.js +1 -1
- package/node/TableCell/TableCell.js +1 -1
- package/node/TableContainer/TableContainer.js +1 -1
- package/node/TableFooter/TableFooter.js +1 -1
- package/node/TableHead/TableHead.js +1 -1
- package/node/TablePagination/TablePagination.js +1 -1
- package/node/TableRow/TableRow.js +1 -1
- package/node/TableSortLabel/TableSortLabel.js +1 -1
- package/node/Tabs/Tabs.js +1 -1
- package/node/TextField/TextField.js +4 -10
- package/node/ToggleButton/ToggleButton.js +1 -1
- package/node/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/node/Toolbar/Toolbar.js +1 -1
- package/node/Tooltip/Tooltip.js +2 -2
- package/node/Typography/Typography.js +1 -1
- package/node/index.js +1 -1
- package/node/styles/adaptV4Theme.js +1 -1
- package/node/styles/index.js +6 -0
- package/node/styles/responsiveFontSizes.js +1 -1
- package/node/useMediaQuery/useMediaQuery.js +26 -65
- package/package.json +5 -5
- package/styles/adaptV4Theme.js +1 -1
- package/styles/createTheme.d.ts +1 -1
- package/styles/cssUtils.d.ts +32 -0
- package/styles/index.d.ts +4 -1
- package/styles/index.js +1 -1
- package/styles/responsiveFontSizes.js +1 -1
- package/transitions/index.d.ts +1 -1
- package/transitions/transition.d.ts +13 -14
- package/transitions/utils.d.ts +23 -23
- package/umd/material-ui.development.js +1116 -1032
- package/umd/material-ui.production.min.js +21 -21
- package/useMediaQuery/useMediaQuery.d.ts +27 -31
- package/useMediaQuery/useMediaQuery.js +26 -65
- package/useTouchRipple/index.d.ts +1 -1
- package/useTouchRipple/useTouchRipple.d.ts +28 -28
- package/utils/getScrollbarSize.d.ts +2 -2
- package/utils/ownerDocument.d.ts +2 -2
- package/utils/ownerWindow.d.ts +2 -2
- package/utils/setRef.d.ts +2 -2
|
@@ -823,7 +823,7 @@ process.env.NODE_ENV !== "production" ? Tooltip.propTypes
|
|
|
823
823
|
/**
|
|
824
824
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
825
825
|
*/
|
|
826
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object]),
|
|
826
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
827
827
|
|
|
828
828
|
/**
|
|
829
829
|
* Tooltip title. Zero-length titles string are never displayed.
|
|
@@ -841,7 +841,7 @@ process.env.NODE_ENV !== "production" ? Tooltip.propTypes
|
|
|
841
841
|
|
|
842
842
|
/**
|
|
843
843
|
* Props applied to the transition element.
|
|
844
|
-
* By default, the element is based on this [`Transition`](
|
|
844
|
+
* By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.
|
|
845
845
|
*/
|
|
846
846
|
TransitionProps: PropTypes.object
|
|
847
847
|
} : void 0;
|
|
@@ -180,7 +180,7 @@ process.env.NODE_ENV !== "production" ? Typography.propTypes
|
|
|
180
180
|
/**
|
|
181
181
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
182
182
|
*/
|
|
183
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object]),
|
|
183
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
184
184
|
|
|
185
185
|
/**
|
|
186
186
|
* Applies the theme typography styles.
|
package/legacy/index.js
CHANGED
|
@@ -35,7 +35,7 @@ export default function adaptV4Theme(inputTheme) {
|
|
|
35
35
|
var componentValue = theme.components[component] || {};
|
|
36
36
|
componentValue.defaultProps = props[component];
|
|
37
37
|
theme.components[component] = componentValue;
|
|
38
|
-
}); //
|
|
38
|
+
}); // CSS overrides
|
|
39
39
|
|
|
40
40
|
Object.keys(styleOverrides).forEach(function (component) {
|
|
41
41
|
var componentValue = theme.components[component] || {};
|
package/legacy/styles/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as adaptV4Theme } from './adaptV4Theme';
|
|
2
|
-
export { hexToRgb, rgbToHex, hslToRgb, decomposeColor, recomposeColor, getContrastRatio, getLuminance, emphasize, alpha, darken, lighten, css, keyframes } from '@mui/system';
|
|
2
|
+
export { hexToRgb, rgbToHex, hslToRgb, decomposeColor, recomposeColor, getContrastRatio, getLuminance, emphasize, alpha, darken, lighten, css, keyframes, experimental_sx } from '@mui/system';
|
|
3
3
|
export { default as createTheme, createMuiTheme } from './createTheme';
|
|
4
4
|
export { default as unstable_createMuiStrictModeTheme } from './createMuiStrictModeTheme';
|
|
5
5
|
export { default as createStyles } from './createStyles';
|
|
@@ -15,7 +15,7 @@ export default function responsiveFontSizes(themeInput) {
|
|
|
15
15
|
var theme = _extends({}, themeInput);
|
|
16
16
|
|
|
17
17
|
theme.typography = _extends({}, theme.typography);
|
|
18
|
-
var typography = theme.typography; // Convert between
|
|
18
|
+
var typography = theme.typography; // Convert between CSS lengths e.g. em->px or px->rem
|
|
19
19
|
// Set the baseFontSize for your project. Defaults to 16px (also the browser default).
|
|
20
20
|
|
|
21
21
|
var convert = convertLength(typography.htmlFontSize);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { getThemeProps, useThemeWithoutDefault as useTheme } from '@mui/system';
|
|
4
3
|
import useEnhancedEffect from '../utils/useEnhancedEffect';
|
|
@@ -6,9 +5,38 @@ import useEnhancedEffect from '../utils/useEnhancedEffect';
|
|
|
6
5
|
* @deprecated Not used internally. Use `MediaQueryListEvent` from lib.dom.d.ts instead.
|
|
7
6
|
*/
|
|
8
7
|
|
|
9
|
-
function
|
|
8
|
+
export default function useMediaQuery(queryInput) {
|
|
9
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
10
|
+
var theme = useTheme(); // Wait for jsdom to support the match media feature.
|
|
11
|
+
// All the browsers MUI support have this built-in.
|
|
12
|
+
// This defensive check is here for simplicity.
|
|
13
|
+
// Most of the time, the match media logic isn't central to people tests.
|
|
14
|
+
|
|
10
15
|
var supportMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined';
|
|
11
16
|
|
|
17
|
+
var _getThemeProps = getThemeProps({
|
|
18
|
+
name: 'MuiUseMediaQuery',
|
|
19
|
+
props: options,
|
|
20
|
+
theme: theme
|
|
21
|
+
}),
|
|
22
|
+
_getThemeProps$defaul = _getThemeProps.defaultMatches,
|
|
23
|
+
defaultMatches = _getThemeProps$defaul === void 0 ? false : _getThemeProps$defaul,
|
|
24
|
+
_getThemeProps$matchM = _getThemeProps.matchMedia,
|
|
25
|
+
matchMedia = _getThemeProps$matchM === void 0 ? supportMatchMedia ? window.matchMedia : null : _getThemeProps$matchM,
|
|
26
|
+
_getThemeProps$noSsr = _getThemeProps.noSsr,
|
|
27
|
+
noSsr = _getThemeProps$noSsr === void 0 ? false : _getThemeProps$noSsr,
|
|
28
|
+
_getThemeProps$ssrMat = _getThemeProps.ssrMatchMedia,
|
|
29
|
+
ssrMatchMedia = _getThemeProps$ssrMat === void 0 ? null : _getThemeProps$ssrMat;
|
|
30
|
+
|
|
31
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
32
|
+
if (typeof queryInput === 'function' && theme === null) {
|
|
33
|
+
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'));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
var query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;
|
|
38
|
+
query = query.replace(/^@media( ?)/m, '');
|
|
39
|
+
|
|
12
40
|
var _React$useState = React.useState(function () {
|
|
13
41
|
if (noSsr && supportMatchMedia) {
|
|
14
42
|
return matchMedia(query).matches;
|
|
@@ -45,93 +73,13 @@ function useMediaQueryOld(query, defaultMatches, matchMedia, ssrMatchMedia, noSs
|
|
|
45
73
|
}
|
|
46
74
|
};
|
|
47
75
|
|
|
48
|
-
updateMatch();
|
|
49
|
-
|
|
76
|
+
updateMatch();
|
|
50
77
|
queryList.addListener(updateMatch);
|
|
51
78
|
return function () {
|
|
52
79
|
active = false;
|
|
53
80
|
queryList.removeListener(updateMatch);
|
|
54
81
|
};
|
|
55
82
|
}, [query, matchMedia, supportMatchMedia]);
|
|
56
|
-
return match;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function useMediaQueryNew(query, defaultMatches, matchMedia, ssrMatchMedia) {
|
|
60
|
-
var getDefaultSnapshot = React.useCallback(function () {
|
|
61
|
-
return defaultMatches;
|
|
62
|
-
}, [defaultMatches]);
|
|
63
|
-
var getServerSnapshot = React.useMemo(function () {
|
|
64
|
-
if (ssrMatchMedia !== null) {
|
|
65
|
-
var _ssrMatchMedia = ssrMatchMedia(query),
|
|
66
|
-
matches = _ssrMatchMedia.matches;
|
|
67
|
-
|
|
68
|
-
return function () {
|
|
69
|
-
return matches;
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return getDefaultSnapshot;
|
|
74
|
-
}, [getDefaultSnapshot, query, ssrMatchMedia]);
|
|
75
|
-
|
|
76
|
-
var _React$useMemo = React.useMemo(function () {
|
|
77
|
-
if (matchMedia === null) {
|
|
78
|
-
return [getDefaultSnapshot, function () {
|
|
79
|
-
return function () {};
|
|
80
|
-
}];
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
var mediaQueryList = matchMedia(query);
|
|
84
|
-
return [function () {
|
|
85
|
-
return mediaQueryList.matches;
|
|
86
|
-
}, function (notify) {
|
|
87
|
-
// TODO: Use `addEventListener` once support for Safari < 14 is dropped
|
|
88
|
-
mediaQueryList.addListener(notify);
|
|
89
|
-
return function () {
|
|
90
|
-
mediaQueryList.removeListener(notify);
|
|
91
|
-
};
|
|
92
|
-
}];
|
|
93
|
-
}, [getDefaultSnapshot, matchMedia, query]),
|
|
94
|
-
_React$useMemo2 = _slicedToArray(_React$useMemo, 2),
|
|
95
|
-
getSnapshot = _React$useMemo2[0],
|
|
96
|
-
subscribe = _React$useMemo2[1];
|
|
97
|
-
|
|
98
|
-
var match = React.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
99
|
-
return match;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export default function useMediaQuery(queryInput) {
|
|
103
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
104
|
-
var theme = useTheme(); // Wait for jsdom to support the match media feature.
|
|
105
|
-
// All the browsers MUI support have this built-in.
|
|
106
|
-
// This defensive check is here for simplicity.
|
|
107
|
-
// Most of the time, the match media logic isn't central to people tests.
|
|
108
|
-
|
|
109
|
-
var supportMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined';
|
|
110
|
-
|
|
111
|
-
var _getThemeProps = getThemeProps({
|
|
112
|
-
name: 'MuiUseMediaQuery',
|
|
113
|
-
props: options,
|
|
114
|
-
theme: theme
|
|
115
|
-
}),
|
|
116
|
-
_getThemeProps$defaul = _getThemeProps.defaultMatches,
|
|
117
|
-
defaultMatches = _getThemeProps$defaul === void 0 ? false : _getThemeProps$defaul,
|
|
118
|
-
_getThemeProps$matchM = _getThemeProps.matchMedia,
|
|
119
|
-
matchMedia = _getThemeProps$matchM === void 0 ? supportMatchMedia ? window.matchMedia : null : _getThemeProps$matchM,
|
|
120
|
-
_getThemeProps$ssrMat = _getThemeProps.ssrMatchMedia,
|
|
121
|
-
ssrMatchMedia = _getThemeProps$ssrMat === void 0 ? null : _getThemeProps$ssrMat,
|
|
122
|
-
noSsr = _getThemeProps.noSsr;
|
|
123
|
-
|
|
124
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
125
|
-
if (typeof queryInput === 'function' && theme === null) {
|
|
126
|
-
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'));
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
var query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;
|
|
131
|
-
query = query.replace(/^@media( ?)/m, ''); // TODO: Drop `useMediaQueryOld` and use `use-sync-external-store` shim in `useMediaQueryNew` once the package is stable
|
|
132
|
-
|
|
133
|
-
var useMediaQueryImplementation = React.useSyncExternalStore !== undefined ? useMediaQueryNew : useMediaQueryOld;
|
|
134
|
-
var match = useMediaQueryImplementation(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr);
|
|
135
83
|
|
|
136
84
|
if (process.env.NODE_ENV !== 'production') {
|
|
137
85
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
package/locale/index.d.ts
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import { ComponentsPropsList } from '../styles/props';
|
|
2
|
-
export interface Localization {
|
|
3
|
-
components?: {
|
|
4
|
-
MuiAlert?: {
|
|
5
|
-
defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
|
|
6
|
-
};
|
|
7
|
-
MuiBreadcrumbs?: {
|
|
8
|
-
defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
|
|
9
|
-
};
|
|
10
|
-
MuiTablePagination?: {
|
|
11
|
-
defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
|
|
12
|
-
};
|
|
13
|
-
MuiRating?: {
|
|
14
|
-
defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
|
|
15
|
-
};
|
|
16
|
-
MuiAutocomplete?: {
|
|
17
|
-
defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
|
|
18
|
-
};
|
|
19
|
-
MuiPagination?: {
|
|
20
|
-
defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
export declare const amET: Localization;
|
|
25
|
-
export declare const arEG: Localization;
|
|
26
|
-
export declare const arSD: Localization;
|
|
27
|
-
export declare const azAZ: Localization;
|
|
28
|
-
export declare const bnBD: Localization;
|
|
29
|
-
export declare const bgBG: Localization;
|
|
30
|
-
export declare const caES: Localization;
|
|
31
|
-
export declare const csCZ: Localization;
|
|
32
|
-
export declare const deDE: Localization;
|
|
33
|
-
export declare const elGR: Localization;
|
|
34
|
-
export declare const enUS: Localization;
|
|
35
|
-
export declare const esES: Localization;
|
|
36
|
-
export declare const etEE: Localization;
|
|
37
|
-
export declare const faIR: Localization;
|
|
38
|
-
export declare const fiFI: Localization;
|
|
39
|
-
export declare const frFR: Localization;
|
|
40
|
-
export declare const heIL: Localization;
|
|
41
|
-
export declare const hiIN: Localization;
|
|
42
|
-
export declare const huHU: Localization;
|
|
43
|
-
export declare const hyAM: Localization;
|
|
44
|
-
export declare const idID: Localization;
|
|
45
|
-
export declare const isIS: Localization;
|
|
46
|
-
export declare const itIT: Localization;
|
|
47
|
-
export declare const jaJP: Localization;
|
|
48
|
-
export declare const khKH: Localization;
|
|
49
|
-
export declare const koKR: Localization;
|
|
50
|
-
export declare const kzKZ: Localization;
|
|
51
|
-
export declare const nlNL: Localization;
|
|
52
|
-
export declare const plPL: Localization;
|
|
53
|
-
export declare const ptBR: Localization;
|
|
54
|
-
export declare const ptPT: Localization;
|
|
55
|
-
export declare const roRO: Localization;
|
|
56
|
-
export declare const ruRU: Localization;
|
|
57
|
-
export declare const siLK: Localization;
|
|
58
|
-
export declare const skSK: Localization;
|
|
59
|
-
export declare const svSE: Localization;
|
|
60
|
-
export declare const thTH: Localization;
|
|
61
|
-
export declare const trTR: Localization;
|
|
62
|
-
export declare const ukUA: Localization;
|
|
63
|
-
export declare const viVN: Localization;
|
|
64
|
-
export declare const zhCN: Localization;
|
|
65
|
-
export declare const zhHK: Localization;
|
|
66
|
-
export declare const zhTW: Localization;
|
|
1
|
+
import { ComponentsPropsList } from '../styles/props';
|
|
2
|
+
export interface Localization {
|
|
3
|
+
components?: {
|
|
4
|
+
MuiAlert?: {
|
|
5
|
+
defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
|
|
6
|
+
};
|
|
7
|
+
MuiBreadcrumbs?: {
|
|
8
|
+
defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
|
|
9
|
+
};
|
|
10
|
+
MuiTablePagination?: {
|
|
11
|
+
defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
|
|
12
|
+
};
|
|
13
|
+
MuiRating?: {
|
|
14
|
+
defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
|
|
15
|
+
};
|
|
16
|
+
MuiAutocomplete?: {
|
|
17
|
+
defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
|
|
18
|
+
};
|
|
19
|
+
MuiPagination?: {
|
|
20
|
+
defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export declare const amET: Localization;
|
|
25
|
+
export declare const arEG: Localization;
|
|
26
|
+
export declare const arSD: Localization;
|
|
27
|
+
export declare const azAZ: Localization;
|
|
28
|
+
export declare const bnBD: Localization;
|
|
29
|
+
export declare const bgBG: Localization;
|
|
30
|
+
export declare const caES: Localization;
|
|
31
|
+
export declare const csCZ: Localization;
|
|
32
|
+
export declare const deDE: Localization;
|
|
33
|
+
export declare const elGR: Localization;
|
|
34
|
+
export declare const enUS: Localization;
|
|
35
|
+
export declare const esES: Localization;
|
|
36
|
+
export declare const etEE: Localization;
|
|
37
|
+
export declare const faIR: Localization;
|
|
38
|
+
export declare const fiFI: Localization;
|
|
39
|
+
export declare const frFR: Localization;
|
|
40
|
+
export declare const heIL: Localization;
|
|
41
|
+
export declare const hiIN: Localization;
|
|
42
|
+
export declare const huHU: Localization;
|
|
43
|
+
export declare const hyAM: Localization;
|
|
44
|
+
export declare const idID: Localization;
|
|
45
|
+
export declare const isIS: Localization;
|
|
46
|
+
export declare const itIT: Localization;
|
|
47
|
+
export declare const jaJP: Localization;
|
|
48
|
+
export declare const khKH: Localization;
|
|
49
|
+
export declare const koKR: Localization;
|
|
50
|
+
export declare const kzKZ: Localization;
|
|
51
|
+
export declare const nlNL: Localization;
|
|
52
|
+
export declare const plPL: Localization;
|
|
53
|
+
export declare const ptBR: Localization;
|
|
54
|
+
export declare const ptPT: Localization;
|
|
55
|
+
export declare const roRO: Localization;
|
|
56
|
+
export declare const ruRU: Localization;
|
|
57
|
+
export declare const siLK: Localization;
|
|
58
|
+
export declare const skSK: Localization;
|
|
59
|
+
export declare const svSE: Localization;
|
|
60
|
+
export declare const thTH: Localization;
|
|
61
|
+
export declare const trTR: Localization;
|
|
62
|
+
export declare const ukUA: Localization;
|
|
63
|
+
export declare const viVN: Localization;
|
|
64
|
+
export declare const zhCN: Localization;
|
|
65
|
+
export declare const zhHK: Localization;
|
|
66
|
+
export declare const zhTW: Localization;
|
|
@@ -261,7 +261,7 @@ process.env.NODE_ENV !== "production" ? Accordion.propTypes
|
|
|
261
261
|
/**
|
|
262
262
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
263
263
|
*/
|
|
264
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object]),
|
|
264
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
265
265
|
|
|
266
266
|
/**
|
|
267
267
|
* The component used for the transition.
|
|
@@ -272,7 +272,7 @@ process.env.NODE_ENV !== "production" ? Accordion.propTypes
|
|
|
272
272
|
|
|
273
273
|
/**
|
|
274
274
|
* Props applied to the transition element.
|
|
275
|
-
* By default, the element is based on this [`Transition`](
|
|
275
|
+
* By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.
|
|
276
276
|
*/
|
|
277
277
|
TransitionProps: PropTypes.object
|
|
278
278
|
} : void 0;
|
|
@@ -97,6 +97,6 @@ process.env.NODE_ENV !== "production" ? AccordionActions.propTypes
|
|
|
97
97
|
/**
|
|
98
98
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
99
99
|
*/
|
|
100
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object])
|
|
100
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
101
101
|
} : void 0;
|
|
102
102
|
export default AccordionActions;
|
|
@@ -74,6 +74,6 @@ process.env.NODE_ENV !== "production" ? AccordionDetails.propTypes
|
|
|
74
74
|
/**
|
|
75
75
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
76
76
|
*/
|
|
77
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object])
|
|
77
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
78
78
|
} : void 0;
|
|
79
79
|
export default AccordionDetails;
|
|
@@ -190,7 +190,7 @@ process.env.NODE_ENV !== "production" ? AccordionSummary.propTypes
|
|
|
190
190
|
* This prop can help identify which element has keyboard focus.
|
|
191
191
|
* The class name will be applied when the element gains the focus through keyboard interaction.
|
|
192
192
|
* It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
|
|
193
|
-
* The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/
|
|
193
|
+
* The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
|
|
194
194
|
* A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
|
|
195
195
|
* if needed.
|
|
196
196
|
*/
|
|
@@ -204,6 +204,6 @@ process.env.NODE_ENV !== "production" ? AccordionSummary.propTypes
|
|
|
204
204
|
/**
|
|
205
205
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
206
206
|
*/
|
|
207
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object])
|
|
207
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
208
208
|
} : void 0;
|
|
209
209
|
export default AccordionSummary;
|
package/modern/Alert/Alert.js
CHANGED
|
@@ -56,7 +56,6 @@ const AlertRoot = styled(Paper, {
|
|
|
56
56
|
const getBackgroundColor = theme.palette.mode === 'light' ? lighten : darken;
|
|
57
57
|
const color = ownerState.color || ownerState.severity;
|
|
58
58
|
return _extends({}, theme.typography.body2, {
|
|
59
|
-
borderRadius: theme.shape.borderRadius,
|
|
60
59
|
backgroundColor: 'transparent',
|
|
61
60
|
display: 'flex',
|
|
62
61
|
padding: '6px 16px'
|
|
@@ -151,7 +150,6 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
|
|
|
151
150
|
const classes = useUtilityClasses(ownerState);
|
|
152
151
|
return /*#__PURE__*/_jsxs(AlertRoot, _extends({
|
|
153
152
|
role: role,
|
|
154
|
-
square: true,
|
|
155
153
|
elevation: 0,
|
|
156
154
|
ownerState: ownerState,
|
|
157
155
|
className: clsx(classes.root, className),
|
|
@@ -269,7 +267,7 @@ process.env.NODE_ENV !== "production" ? Alert.propTypes
|
|
|
269
267
|
/**
|
|
270
268
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
271
269
|
*/
|
|
272
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object]),
|
|
270
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
273
271
|
|
|
274
272
|
/**
|
|
275
273
|
* The variant to use.
|
|
@@ -80,6 +80,6 @@ process.env.NODE_ENV !== "production" ? AlertTitle.propTypes
|
|
|
80
80
|
/**
|
|
81
81
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
82
82
|
*/
|
|
83
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object])
|
|
83
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
84
84
|
} : void 0;
|
|
85
85
|
export default AlertTitle;
|
package/modern/AppBar/AppBar.js
CHANGED
|
@@ -168,6 +168,6 @@ process.env.NODE_ENV !== "production" ? AppBar.propTypes
|
|
|
168
168
|
/**
|
|
169
169
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
170
170
|
*/
|
|
171
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object])
|
|
171
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
172
172
|
} : void 0;
|
|
173
173
|
export default AppBar;
|
|
@@ -1040,7 +1040,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
|
|
|
1040
1040
|
/**
|
|
1041
1041
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
1042
1042
|
*/
|
|
1043
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object]),
|
|
1043
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
1044
1044
|
|
|
1045
1045
|
/**
|
|
1046
1046
|
* The value of the autocomplete.
|
package/modern/Avatar/Avatar.js
CHANGED
|
@@ -255,7 +255,7 @@ process.env.NODE_ENV !== "production" ? Avatar.propTypes
|
|
|
255
255
|
/**
|
|
256
256
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
257
257
|
*/
|
|
258
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object]),
|
|
258
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
259
259
|
|
|
260
260
|
/**
|
|
261
261
|
* The shape of the avatar.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["children", "className", "max", "spacing", "variant"];
|
|
3
|
+
const _excluded = ["children", "className", "max", "spacing", "total", "variant"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { isFragment } from 'react-is';
|
|
@@ -73,11 +73,12 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
73
73
|
className,
|
|
74
74
|
max = 5,
|
|
75
75
|
spacing = 'medium',
|
|
76
|
+
total,
|
|
76
77
|
variant = 'circular'
|
|
77
78
|
} = props,
|
|
78
79
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
79
80
|
|
|
80
|
-
|
|
81
|
+
let clampedMax = max < 2 ? 2 : max;
|
|
81
82
|
|
|
82
83
|
const ownerState = _extends({}, props, {
|
|
83
84
|
max,
|
|
@@ -95,7 +96,15 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
95
96
|
|
|
96
97
|
return /*#__PURE__*/React.isValidElement(child);
|
|
97
98
|
});
|
|
98
|
-
const
|
|
99
|
+
const totalAvatars = total || children.length;
|
|
100
|
+
|
|
101
|
+
if (totalAvatars === clampedMax) {
|
|
102
|
+
clampedMax += 1;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
clampedMax = Math.min(totalAvatars + 1, clampedMax);
|
|
106
|
+
const maxAvatars = Math.min(children.length, clampedMax - 1);
|
|
107
|
+
const extraAvatars = Math.max(totalAvatars - clampedMax, totalAvatars - maxAvatars, 0);
|
|
99
108
|
const marginLeft = spacing && SPACINGS[spacing] !== undefined ? SPACINGS[spacing] : -spacing;
|
|
100
109
|
return /*#__PURE__*/_jsxs(AvatarGroupRoot, _extends({
|
|
101
110
|
ownerState: ownerState,
|
|
@@ -110,7 +119,7 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
110
119
|
},
|
|
111
120
|
variant: variant,
|
|
112
121
|
children: ["+", extraAvatars]
|
|
113
|
-
}) : null, children.slice(0,
|
|
122
|
+
}) : null, children.slice(0, maxAvatars).reverse().map(child => {
|
|
114
123
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
115
124
|
className: clsx(child.props.className, classes.avatar),
|
|
116
125
|
style: _extends({
|
|
@@ -165,7 +174,13 @@ process.env.NODE_ENV !== "production" ? AvatarGroup.propTypes
|
|
|
165
174
|
/**
|
|
166
175
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
167
176
|
*/
|
|
168
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object]),
|
|
177
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* The total number of avatars. Used for calculating the number of extra avatars.
|
|
181
|
+
* @default children.length
|
|
182
|
+
*/
|
|
183
|
+
total: PropTypes.number,
|
|
169
184
|
|
|
170
185
|
/**
|
|
171
186
|
* The variant to use.
|
|
@@ -141,7 +141,7 @@ process.env.NODE_ENV !== "production" ? Backdrop.propTypes
|
|
|
141
141
|
/**
|
|
142
142
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
143
143
|
*/
|
|
144
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object]),
|
|
144
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
147
|
* The duration for the transition, in milliseconds.
|
package/modern/Badge/Badge.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["components", "componentsProps", "color", "invisible", "badgeContent", "showZero", "variant"];
|
|
3
|
+
const _excluded = ["component", "components", "componentsProps", "color", "invisible", "badgeContent", "showZero", "variant"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -149,6 +149,11 @@ const BadgeBadge = styled('span', {
|
|
|
149
149
|
duration: theme.transitions.duration.leavingScreen
|
|
150
150
|
})
|
|
151
151
|
}));
|
|
152
|
+
|
|
153
|
+
const shouldSpreadAdditionalProps = Slot => {
|
|
154
|
+
return !Slot || !isHostComponent(Slot);
|
|
155
|
+
};
|
|
156
|
+
|
|
152
157
|
const Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
|
|
153
158
|
const props = useThemeProps({
|
|
154
159
|
props: inProps,
|
|
@@ -156,6 +161,7 @@ const Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
|
|
|
156
161
|
});
|
|
157
162
|
|
|
158
163
|
const {
|
|
164
|
+
component = 'span',
|
|
159
165
|
components = {},
|
|
160
166
|
componentsProps = {},
|
|
161
167
|
color: colorProp = 'default',
|
|
@@ -196,12 +202,13 @@ const Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
|
|
|
196
202
|
Badge: BadgeBadge
|
|
197
203
|
}, components),
|
|
198
204
|
componentsProps: {
|
|
199
|
-
root: _extends({}, componentsProps.root, (
|
|
205
|
+
root: _extends({}, componentsProps.root, shouldSpreadAdditionalProps(components.Root) && {
|
|
206
|
+
as: component,
|
|
200
207
|
ownerState: _extends({}, componentsProps.root?.ownerState, {
|
|
201
208
|
color
|
|
202
209
|
})
|
|
203
210
|
}),
|
|
204
|
-
badge: _extends({}, componentsProps.badge, (
|
|
211
|
+
badge: _extends({}, componentsProps.badge, shouldSpreadAdditionalProps(components.Badge) && {
|
|
205
212
|
ownerState: _extends({}, componentsProps.badge?.ownerState, {
|
|
206
213
|
color
|
|
207
214
|
})
|
|
@@ -254,6 +261,12 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes
|
|
|
254
261
|
/* @typescript-to-proptypes-ignore */
|
|
255
262
|
.oneOfType([PropTypes.oneOf(['default', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),
|
|
256
263
|
|
|
264
|
+
/**
|
|
265
|
+
* The component used for the root node.
|
|
266
|
+
* Either a string to use a HTML element or a component.
|
|
267
|
+
*/
|
|
268
|
+
component: PropTypes.elementType,
|
|
269
|
+
|
|
257
270
|
/**
|
|
258
271
|
* The components used for each slot inside the Badge.
|
|
259
272
|
* Either a string to use a HTML element or a component.
|
|
@@ -296,7 +309,7 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes
|
|
|
296
309
|
/**
|
|
297
310
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
298
311
|
*/
|
|
299
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object]),
|
|
312
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
300
313
|
|
|
301
314
|
/**
|
|
302
315
|
* The variant to use.
|
|
@@ -129,7 +129,7 @@ process.env.NODE_ENV !== "production" ? BottomNavigation.propTypes
|
|
|
129
129
|
/**
|
|
130
130
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
131
131
|
*/
|
|
132
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object]),
|
|
132
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
135
|
* The value of the currently selected `BottomNavigationAction`.
|
|
@@ -176,7 +176,7 @@ process.env.NODE_ENV !== "production" ? BottomNavigationAction.propTypes
|
|
|
176
176
|
/**
|
|
177
177
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
178
178
|
*/
|
|
179
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object]),
|
|
179
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
180
180
|
|
|
181
181
|
/**
|
|
182
182
|
* You can provide your own value. Otherwise, we fallback to the child position index.
|
|
@@ -232,6 +232,6 @@ process.env.NODE_ENV !== "production" ? Breadcrumbs.propTypes
|
|
|
232
232
|
/**
|
|
233
233
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
234
234
|
*/
|
|
235
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object])
|
|
235
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
236
236
|
} : void 0;
|
|
237
237
|
export default Breadcrumbs;
|