@mui/material 5.15.3 → 5.15.5
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 +30 -2
- package/Accordion/Accordion.js +43 -10
- package/AccordionActions/AccordionActions.js +4 -4
- package/AccordionDetails/AccordionDetails.js +4 -4
- package/AccordionSummary/AccordionSummary.js +4 -4
- package/AccordionSummary/accordionSummaryClasses.d.ts +4 -1
- package/Alert/Alert.d.ts +4 -2
- package/Alert/Alert.js +5 -5
- package/AlertTitle/AlertTitle.js +4 -4
- package/AppBar/AppBar.js +4 -4
- package/Autocomplete/Autocomplete.js +4 -4
- package/Avatar/Avatar.js +4 -4
- package/AvatarGroup/AvatarGroup.js +4 -4
- package/Backdrop/Backdrop.js +4 -4
- package/Badge/Badge.js +5 -5
- package/BottomNavigation/BottomNavigation.js +4 -4
- package/BottomNavigationAction/BottomNavigationAction.js +4 -4
- package/Box/Box.js +4 -4
- package/Breadcrumbs/Breadcrumbs.js +4 -4
- package/Button/Button.js +4 -4
- package/ButtonBase/ButtonBase.js +4 -4
- package/ButtonGroup/ButtonGroup.js +4 -4
- package/ButtonGroup/ButtonGroupContext.d.ts +2 -2
- package/CHANGELOG.md +184 -1
- package/Card/Card.js +4 -4
- package/CardActionArea/CardActionArea.js +4 -4
- package/CardActions/CardActions.js +4 -4
- package/CardContent/CardContent.js +4 -4
- package/CardHeader/CardHeader.js +4 -4
- package/CardMedia/CardMedia.js +4 -4
- package/Checkbox/Checkbox.js +4 -4
- package/Chip/Chip.js +4 -4
- package/CircularProgress/CircularProgress.js +4 -4
- package/ClickAwayListener/index.d.ts +2 -1
- package/Collapse/Collapse.js +4 -4
- package/Container/Container.js +4 -4
- package/CssBaseline/CssBaseline.js +4 -4
- package/Dialog/Dialog.js +4 -4
- package/DialogActions/DialogActions.js +4 -4
- package/DialogContent/DialogContent.js +4 -4
- package/DialogContentText/DialogContentText.js +4 -4
- package/DialogTitle/DialogTitle.js +4 -4
- package/Divider/Divider.d.ts +1 -0
- package/Divider/Divider.js +5 -4
- package/Divider/dividerClasses.d.ts +6 -2
- package/Drawer/Drawer.js +4 -4
- package/Fab/Fab.js +4 -4
- package/Fade/Fade.js +4 -4
- package/FilledInput/FilledInput.js +4 -4
- package/FormControl/FormControl.d.ts +1 -1
- package/FormControl/FormControl.js +4 -4
- package/FormControlLabel/FormControlLabel.js +4 -4
- package/FormGroup/FormGroup.js +4 -4
- package/FormHelperText/FormHelperText.js +4 -4
- package/FormLabel/FormLabel.d.ts +1 -1
- package/FormLabel/FormLabel.js +4 -4
- package/GlobalStyles/GlobalStyles.js +4 -4
- package/Grid/Grid.js +4 -4
- package/Grow/Grow.js +4 -4
- package/Hidden/Hidden.js +4 -4
- package/Icon/Icon.js +4 -4
- package/IconButton/IconButton.js +4 -4
- package/ImageList/ImageList.js +4 -4
- package/ImageListItem/ImageListItem.js +4 -4
- package/ImageListItemBar/ImageListItemBar.js +4 -4
- package/Input/Input.js +4 -4
- package/InputAdornment/InputAdornment.js +4 -4
- package/InputBase/InputBase.js +4 -4
- package/InputLabel/InputLabel.d.ts +1 -5
- package/InputLabel/InputLabel.js +4 -4
- package/LinearProgress/LinearProgress.js +4 -4
- package/Link/Link.js +4 -4
- package/List/List.js +4 -4
- package/ListItem/ListItem.js +4 -4
- package/ListItemAvatar/ListItemAvatar.js +4 -4
- package/ListItemButton/ListItemButton.js +4 -4
- package/ListItemIcon/ListItemIcon.js +4 -4
- package/ListItemSecondaryAction/ListItemSecondaryAction.js +4 -4
- package/ListItemText/ListItemText.js +4 -4
- package/ListSubheader/ListSubheader.js +4 -4
- package/Menu/Menu.js +4 -4
- package/MenuItem/MenuItem.js +4 -4
- package/MenuList/MenuList.js +4 -4
- package/MobileStepper/MobileStepper.js +4 -4
- package/Modal/Modal.js +4 -4
- package/NativeSelect/NativeSelect.js +4 -4
- package/OutlinedInput/OutlinedInput.js +4 -4
- package/Pagination/Pagination.js +4 -4
- package/PaginationItem/PaginationItem.js +4 -4
- package/Paper/Paper.js +4 -4
- package/Popover/Popover.js +4 -4
- package/Popper/Popper.js +4 -4
- package/Radio/Radio.js +4 -4
- package/RadioGroup/RadioGroup.js +4 -4
- package/Rating/Rating.js +5 -14
- package/ScopedCssBaseline/ScopedCssBaseline.js +4 -4
- package/Select/Select.js +4 -4
- package/Skeleton/Skeleton.js +4 -4
- package/Slide/Slide.js +4 -4
- package/Slider/Slider.js +4 -4
- package/Snackbar/Snackbar.js +4 -4
- package/SnackbarContent/SnackbarContent.js +4 -4
- package/SpeedDial/SpeedDial.js +5 -13
- package/SpeedDialAction/SpeedDialAction.js +4 -4
- package/SpeedDialIcon/SpeedDialIcon.js +4 -4
- package/Stack/Stack.js +4 -4
- package/Step/Step.js +4 -4
- package/StepButton/StepButton.js +4 -4
- package/StepConnector/StepConnector.js +4 -4
- package/StepContent/StepContent.js +4 -4
- package/StepIcon/StepIcon.js +4 -4
- package/StepLabel/StepLabel.js +4 -4
- package/Stepper/Stepper.js +4 -4
- package/SvgIcon/SvgIcon.js +4 -4
- package/SwipeableDrawer/SwipeableDrawer.js +4 -4
- package/Switch/Switch.js +4 -4
- package/Tab/Tab.js +4 -4
- package/TabScrollButton/TabScrollButton.js +4 -4
- package/Table/Table.js +4 -4
- package/TableBody/TableBody.js +4 -4
- package/TableCell/TableCell.js +4 -4
- package/TableContainer/TableContainer.js +4 -4
- package/TableFooter/TableFooter.js +4 -4
- package/TableHead/TableHead.js +4 -4
- package/TablePagination/TablePagination.js +4 -4
- package/TableRow/TableRow.js +4 -4
- package/TableSortLabel/TableSortLabel.js +4 -4
- package/Tabs/Tabs.js +4 -4
- package/TextField/TextField.d.ts +1 -1
- package/TextField/TextField.js +4 -4
- package/ToggleButton/ToggleButton.js +24 -8
- package/ToggleButtonGroup/ToggleButtonGroup.js +88 -46
- package/ToggleButtonGroup/ToggleButtonGroupButtonContext.d.ts +6 -0
- package/ToggleButtonGroup/ToggleButtonGroupButtonContext.js +9 -0
- package/ToggleButtonGroup/ToggleButtonGroupContext.d.ts +16 -0
- package/ToggleButtonGroup/ToggleButtonGroupContext.js +9 -0
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +6 -0
- package/ToggleButtonGroup/toggleButtonGroupClasses.js +1 -1
- package/Toolbar/Toolbar.js +4 -4
- package/Tooltip/Tooltip.js +4 -4
- package/Typography/Typography.js +4 -4
- package/Unstable_Grid2/Grid2.js +4 -4
- package/Zoom/Zoom.js +4 -4
- package/index.js +1 -1
- package/legacy/Accordion/Accordion.js +48 -11
- package/legacy/AccordionActions/AccordionActions.js +4 -4
- package/legacy/AccordionDetails/AccordionDetails.js +4 -4
- package/legacy/AccordionSummary/AccordionSummary.js +4 -4
- package/legacy/Alert/Alert.js +5 -5
- package/legacy/AlertTitle/AlertTitle.js +4 -4
- package/legacy/AppBar/AppBar.js +4 -4
- package/legacy/Autocomplete/Autocomplete.js +4 -4
- package/legacy/Avatar/Avatar.js +4 -4
- package/legacy/AvatarGroup/AvatarGroup.js +4 -4
- package/legacy/Backdrop/Backdrop.js +4 -4
- package/legacy/Badge/Badge.js +5 -5
- package/legacy/BottomNavigation/BottomNavigation.js +4 -4
- package/legacy/BottomNavigationAction/BottomNavigationAction.js +4 -4
- package/legacy/Box/Box.js +4 -4
- package/legacy/Breadcrumbs/Breadcrumbs.js +4 -4
- package/legacy/Button/Button.js +4 -4
- package/legacy/ButtonBase/ButtonBase.js +4 -4
- package/legacy/ButtonGroup/ButtonGroup.js +4 -4
- package/legacy/Card/Card.js +4 -4
- package/legacy/CardActionArea/CardActionArea.js +4 -4
- package/legacy/CardActions/CardActions.js +4 -4
- package/legacy/CardContent/CardContent.js +4 -4
- package/legacy/CardHeader/CardHeader.js +4 -4
- package/legacy/CardMedia/CardMedia.js +4 -4
- package/legacy/Checkbox/Checkbox.js +4 -4
- package/legacy/Chip/Chip.js +4 -4
- package/legacy/CircularProgress/CircularProgress.js +4 -4
- package/legacy/Collapse/Collapse.js +4 -4
- package/legacy/Container/Container.js +4 -4
- package/legacy/CssBaseline/CssBaseline.js +4 -4
- package/legacy/Dialog/Dialog.js +4 -4
- package/legacy/DialogActions/DialogActions.js +4 -4
- package/legacy/DialogContent/DialogContent.js +4 -4
- package/legacy/DialogContentText/DialogContentText.js +4 -4
- package/legacy/DialogTitle/DialogTitle.js +4 -4
- package/legacy/Divider/Divider.js +5 -4
- package/legacy/Drawer/Drawer.js +4 -4
- package/legacy/Fab/Fab.js +4 -4
- package/legacy/Fade/Fade.js +4 -4
- package/legacy/FilledInput/FilledInput.js +4 -4
- package/legacy/FormControl/FormControl.js +4 -4
- package/legacy/FormControlLabel/FormControlLabel.js +4 -4
- package/legacy/FormGroup/FormGroup.js +4 -4
- package/legacy/FormHelperText/FormHelperText.js +4 -4
- package/legacy/FormLabel/FormLabel.js +4 -4
- package/legacy/GlobalStyles/GlobalStyles.js +4 -4
- package/legacy/Grid/Grid.js +4 -4
- package/legacy/Grow/Grow.js +4 -4
- package/legacy/Hidden/Hidden.js +4 -4
- package/legacy/Icon/Icon.js +4 -4
- package/legacy/IconButton/IconButton.js +4 -4
- package/legacy/ImageList/ImageList.js +4 -4
- package/legacy/ImageListItem/ImageListItem.js +4 -4
- package/legacy/ImageListItemBar/ImageListItemBar.js +4 -4
- package/legacy/Input/Input.js +4 -4
- package/legacy/InputAdornment/InputAdornment.js +4 -4
- package/legacy/InputBase/InputBase.js +4 -4
- package/legacy/InputLabel/InputLabel.js +4 -4
- package/legacy/LinearProgress/LinearProgress.js +4 -4
- package/legacy/Link/Link.js +4 -4
- package/legacy/List/List.js +4 -4
- package/legacy/ListItem/ListItem.js +4 -4
- package/legacy/ListItemAvatar/ListItemAvatar.js +4 -4
- package/legacy/ListItemButton/ListItemButton.js +4 -4
- package/legacy/ListItemIcon/ListItemIcon.js +4 -4
- package/legacy/ListItemSecondaryAction/ListItemSecondaryAction.js +4 -4
- package/legacy/ListItemText/ListItemText.js +4 -4
- package/legacy/ListSubheader/ListSubheader.js +4 -4
- package/legacy/Menu/Menu.js +4 -4
- package/legacy/MenuItem/MenuItem.js +4 -4
- package/legacy/MenuList/MenuList.js +4 -4
- package/legacy/MobileStepper/MobileStepper.js +4 -4
- package/legacy/Modal/Modal.js +4 -4
- package/legacy/NativeSelect/NativeSelect.js +4 -4
- package/legacy/OutlinedInput/OutlinedInput.js +4 -4
- package/legacy/Pagination/Pagination.js +4 -4
- package/legacy/PaginationItem/PaginationItem.js +4 -4
- package/legacy/Paper/Paper.js +4 -4
- package/legacy/Popover/Popover.js +4 -4
- package/legacy/Popper/Popper.js +4 -4
- package/legacy/Radio/Radio.js +4 -4
- package/legacy/RadioGroup/RadioGroup.js +4 -4
- package/legacy/Rating/Rating.js +5 -14
- package/legacy/ScopedCssBaseline/ScopedCssBaseline.js +4 -4
- package/legacy/Select/Select.js +4 -4
- package/legacy/Skeleton/Skeleton.js +4 -4
- package/legacy/Slide/Slide.js +4 -4
- package/legacy/Slider/Slider.js +4 -4
- package/legacy/Snackbar/Snackbar.js +4 -4
- package/legacy/SnackbarContent/SnackbarContent.js +4 -4
- package/legacy/SpeedDial/SpeedDial.js +5 -13
- package/legacy/SpeedDialAction/SpeedDialAction.js +4 -4
- package/legacy/SpeedDialIcon/SpeedDialIcon.js +4 -4
- package/legacy/Stack/Stack.js +4 -4
- package/legacy/Step/Step.js +4 -4
- package/legacy/StepButton/StepButton.js +4 -4
- package/legacy/StepConnector/StepConnector.js +4 -4
- package/legacy/StepContent/StepContent.js +4 -4
- package/legacy/StepIcon/StepIcon.js +4 -4
- package/legacy/StepLabel/StepLabel.js +4 -4
- package/legacy/Stepper/Stepper.js +4 -4
- package/legacy/SvgIcon/SvgIcon.js +4 -4
- package/legacy/SwipeableDrawer/SwipeableDrawer.js +4 -4
- package/legacy/Switch/Switch.js +4 -4
- package/legacy/Tab/Tab.js +4 -4
- package/legacy/TabScrollButton/TabScrollButton.js +4 -4
- package/legacy/Table/Table.js +4 -4
- package/legacy/TableBody/TableBody.js +4 -4
- package/legacy/TableCell/TableCell.js +4 -4
- package/legacy/TableContainer/TableContainer.js +4 -4
- package/legacy/TableFooter/TableFooter.js +4 -4
- package/legacy/TableHead/TableHead.js +4 -4
- package/legacy/TablePagination/TablePagination.js +4 -4
- package/legacy/TableRow/TableRow.js +4 -4
- package/legacy/TableSortLabel/TableSortLabel.js +4 -4
- package/legacy/Tabs/Tabs.js +4 -4
- package/legacy/TextField/TextField.js +4 -4
- package/legacy/ToggleButton/ToggleButton.js +19 -6
- package/legacy/ToggleButtonGroup/ToggleButtonGroup.js +81 -55
- package/legacy/ToggleButtonGroup/ToggleButtonGroupButtonContext.js +9 -0
- package/legacy/ToggleButtonGroup/ToggleButtonGroupContext.js +9 -0
- package/legacy/ToggleButtonGroup/toggleButtonGroupClasses.js +1 -1
- package/legacy/Toolbar/Toolbar.js +4 -4
- package/legacy/Tooltip/Tooltip.js +4 -4
- package/legacy/Typography/Typography.js +4 -4
- package/legacy/Unstable_Grid2/Grid2.js +4 -4
- package/legacy/Zoom/Zoom.js +4 -4
- package/legacy/index.js +1 -1
- package/legacy/styles/CssVarsProvider.js +3 -0
- package/legacy/utils/types.js +1 -0
- package/legacy/utils/useSlot.js +71 -0
- package/legacy/zero-styled/index.js +2 -0
- package/modern/Accordion/Accordion.js +43 -10
- package/modern/AccordionActions/AccordionActions.js +4 -4
- package/modern/AccordionDetails/AccordionDetails.js +4 -4
- package/modern/AccordionSummary/AccordionSummary.js +4 -4
- package/modern/Alert/Alert.js +5 -5
- package/modern/AlertTitle/AlertTitle.js +4 -4
- package/modern/AppBar/AppBar.js +4 -4
- package/modern/Autocomplete/Autocomplete.js +4 -4
- package/modern/Avatar/Avatar.js +4 -4
- package/modern/AvatarGroup/AvatarGroup.js +4 -4
- package/modern/Backdrop/Backdrop.js +4 -4
- package/modern/Badge/Badge.js +5 -5
- package/modern/BottomNavigation/BottomNavigation.js +4 -4
- package/modern/BottomNavigationAction/BottomNavigationAction.js +4 -4
- package/modern/Box/Box.js +4 -4
- package/modern/Breadcrumbs/Breadcrumbs.js +4 -4
- package/modern/Button/Button.js +4 -4
- package/modern/ButtonBase/ButtonBase.js +4 -4
- package/modern/ButtonGroup/ButtonGroup.js +4 -4
- package/modern/Card/Card.js +4 -4
- package/modern/CardActionArea/CardActionArea.js +4 -4
- package/modern/CardActions/CardActions.js +4 -4
- package/modern/CardContent/CardContent.js +4 -4
- package/modern/CardHeader/CardHeader.js +4 -4
- package/modern/CardMedia/CardMedia.js +4 -4
- package/modern/Checkbox/Checkbox.js +4 -4
- package/modern/Chip/Chip.js +4 -4
- package/modern/CircularProgress/CircularProgress.js +4 -4
- package/modern/Collapse/Collapse.js +4 -4
- package/modern/Container/Container.js +4 -4
- package/modern/CssBaseline/CssBaseline.js +4 -4
- package/modern/Dialog/Dialog.js +4 -4
- package/modern/DialogActions/DialogActions.js +4 -4
- package/modern/DialogContent/DialogContent.js +4 -4
- package/modern/DialogContentText/DialogContentText.js +4 -4
- package/modern/DialogTitle/DialogTitle.js +4 -4
- package/modern/Divider/Divider.js +5 -4
- package/modern/Drawer/Drawer.js +4 -4
- package/modern/Fab/Fab.js +4 -4
- package/modern/Fade/Fade.js +4 -4
- package/modern/FilledInput/FilledInput.js +4 -4
- package/modern/FormControl/FormControl.js +4 -4
- package/modern/FormControlLabel/FormControlLabel.js +4 -4
- package/modern/FormGroup/FormGroup.js +4 -4
- package/modern/FormHelperText/FormHelperText.js +4 -4
- package/modern/FormLabel/FormLabel.js +4 -4
- package/modern/GlobalStyles/GlobalStyles.js +4 -4
- package/modern/Grid/Grid.js +4 -4
- package/modern/Grow/Grow.js +4 -4
- package/modern/Hidden/Hidden.js +4 -4
- package/modern/Icon/Icon.js +4 -4
- package/modern/IconButton/IconButton.js +4 -4
- package/modern/ImageList/ImageList.js +4 -4
- package/modern/ImageListItem/ImageListItem.js +4 -4
- package/modern/ImageListItemBar/ImageListItemBar.js +4 -4
- package/modern/Input/Input.js +4 -4
- package/modern/InputAdornment/InputAdornment.js +4 -4
- package/modern/InputBase/InputBase.js +4 -4
- package/modern/InputLabel/InputLabel.js +4 -4
- package/modern/LinearProgress/LinearProgress.js +4 -4
- package/modern/Link/Link.js +4 -4
- package/modern/List/List.js +4 -4
- package/modern/ListItem/ListItem.js +4 -4
- package/modern/ListItemAvatar/ListItemAvatar.js +4 -4
- package/modern/ListItemButton/ListItemButton.js +4 -4
- package/modern/ListItemIcon/ListItemIcon.js +4 -4
- package/modern/ListItemSecondaryAction/ListItemSecondaryAction.js +4 -4
- package/modern/ListItemText/ListItemText.js +4 -4
- package/modern/ListSubheader/ListSubheader.js +4 -4
- package/modern/Menu/Menu.js +4 -4
- package/modern/MenuItem/MenuItem.js +4 -4
- package/modern/MenuList/MenuList.js +4 -4
- package/modern/MobileStepper/MobileStepper.js +4 -4
- package/modern/Modal/Modal.js +4 -4
- package/modern/NativeSelect/NativeSelect.js +4 -4
- package/modern/OutlinedInput/OutlinedInput.js +4 -4
- package/modern/Pagination/Pagination.js +4 -4
- package/modern/PaginationItem/PaginationItem.js +4 -4
- package/modern/Paper/Paper.js +4 -4
- package/modern/Popover/Popover.js +4 -4
- package/modern/Popper/Popper.js +4 -4
- package/modern/Radio/Radio.js +4 -4
- package/modern/RadioGroup/RadioGroup.js +4 -4
- package/modern/Rating/Rating.js +5 -14
- package/modern/ScopedCssBaseline/ScopedCssBaseline.js +4 -4
- package/modern/Select/Select.js +4 -4
- package/modern/Skeleton/Skeleton.js +4 -4
- package/modern/Slide/Slide.js +4 -4
- package/modern/Slider/Slider.js +4 -4
- package/modern/Snackbar/Snackbar.js +4 -4
- package/modern/SnackbarContent/SnackbarContent.js +4 -4
- package/modern/SpeedDial/SpeedDial.js +5 -13
- package/modern/SpeedDialAction/SpeedDialAction.js +4 -4
- package/modern/SpeedDialIcon/SpeedDialIcon.js +4 -4
- package/modern/Stack/Stack.js +4 -4
- package/modern/Step/Step.js +4 -4
- package/modern/StepButton/StepButton.js +4 -4
- package/modern/StepConnector/StepConnector.js +4 -4
- package/modern/StepContent/StepContent.js +4 -4
- package/modern/StepIcon/StepIcon.js +4 -4
- package/modern/StepLabel/StepLabel.js +4 -4
- package/modern/Stepper/Stepper.js +4 -4
- package/modern/SvgIcon/SvgIcon.js +4 -4
- package/modern/SwipeableDrawer/SwipeableDrawer.js +4 -4
- package/modern/Switch/Switch.js +4 -4
- package/modern/Tab/Tab.js +4 -4
- package/modern/TabScrollButton/TabScrollButton.js +4 -4
- package/modern/Table/Table.js +4 -4
- package/modern/TableBody/TableBody.js +4 -4
- package/modern/TableCell/TableCell.js +4 -4
- package/modern/TableContainer/TableContainer.js +4 -4
- package/modern/TableFooter/TableFooter.js +4 -4
- package/modern/TableHead/TableHead.js +4 -4
- package/modern/TablePagination/TablePagination.js +4 -4
- package/modern/TableRow/TableRow.js +4 -4
- package/modern/TableSortLabel/TableSortLabel.js +4 -4
- package/modern/Tabs/Tabs.js +4 -4
- package/modern/TextField/TextField.js +4 -4
- package/modern/ToggleButton/ToggleButton.js +24 -8
- package/modern/ToggleButtonGroup/ToggleButtonGroup.js +88 -46
- package/modern/ToggleButtonGroup/ToggleButtonGroupButtonContext.js +9 -0
- package/modern/ToggleButtonGroup/ToggleButtonGroupContext.js +9 -0
- package/modern/ToggleButtonGroup/toggleButtonGroupClasses.js +1 -1
- package/modern/Toolbar/Toolbar.js +4 -4
- package/modern/Tooltip/Tooltip.js +4 -4
- package/modern/Typography/Typography.js +4 -4
- package/modern/Unstable_Grid2/Grid2.js +4 -4
- package/modern/Zoom/Zoom.js +4 -4
- package/modern/index.js +1 -1
- package/modern/styles/CssVarsProvider.js +3 -0
- package/modern/utils/types.js +1 -0
- package/modern/utils/useSlot.js +82 -0
- package/modern/zero-styled/index.js +2 -0
- package/node/Accordion/Accordion.js +43 -10
- package/node/AccordionActions/AccordionActions.js +4 -4
- package/node/AccordionDetails/AccordionDetails.js +4 -4
- package/node/AccordionSummary/AccordionSummary.js +4 -4
- package/node/Alert/Alert.js +5 -5
- package/node/AlertTitle/AlertTitle.js +4 -4
- package/node/AppBar/AppBar.js +4 -4
- package/node/Autocomplete/Autocomplete.js +4 -4
- package/node/Avatar/Avatar.js +4 -4
- package/node/AvatarGroup/AvatarGroup.js +4 -4
- package/node/Backdrop/Backdrop.js +4 -4
- package/node/Badge/Badge.js +7 -7
- package/node/BottomNavigation/BottomNavigation.js +4 -4
- package/node/BottomNavigationAction/BottomNavigationAction.js +4 -4
- package/node/Box/Box.js +4 -4
- package/node/Breadcrumbs/Breadcrumbs.js +4 -4
- package/node/Button/Button.js +4 -4
- package/node/ButtonBase/ButtonBase.js +4 -4
- package/node/ButtonGroup/ButtonGroup.js +4 -4
- package/node/Card/Card.js +4 -4
- package/node/CardActionArea/CardActionArea.js +4 -4
- package/node/CardActions/CardActions.js +4 -4
- package/node/CardContent/CardContent.js +4 -4
- package/node/CardHeader/CardHeader.js +4 -4
- package/node/CardMedia/CardMedia.js +4 -4
- package/node/Checkbox/Checkbox.js +4 -4
- package/node/Chip/Chip.js +4 -4
- package/node/CircularProgress/CircularProgress.js +4 -4
- package/node/Collapse/Collapse.js +4 -4
- package/node/Container/Container.js +4 -4
- package/node/CssBaseline/CssBaseline.js +4 -4
- package/node/Dialog/Dialog.js +4 -4
- package/node/DialogActions/DialogActions.js +4 -4
- package/node/DialogContent/DialogContent.js +4 -4
- package/node/DialogContentText/DialogContentText.js +4 -4
- package/node/DialogTitle/DialogTitle.js +4 -4
- package/node/Divider/Divider.js +5 -4
- package/node/Drawer/Drawer.js +4 -4
- package/node/Fab/Fab.js +4 -4
- package/node/Fade/Fade.js +4 -4
- package/node/FilledInput/FilledInput.js +4 -4
- package/node/FormControl/FormControl.js +4 -4
- package/node/FormControlLabel/FormControlLabel.js +4 -4
- package/node/FormGroup/FormGroup.js +4 -4
- package/node/FormHelperText/FormHelperText.js +4 -4
- package/node/FormLabel/FormLabel.js +4 -4
- package/node/GlobalStyles/GlobalStyles.js +4 -4
- package/node/Grid/Grid.js +4 -4
- package/node/Grow/Grow.js +4 -4
- package/node/Hidden/Hidden.js +4 -4
- package/node/Icon/Icon.js +4 -4
- package/node/IconButton/IconButton.js +4 -4
- package/node/ImageList/ImageList.js +4 -4
- package/node/ImageListItem/ImageListItem.js +4 -4
- package/node/ImageListItemBar/ImageListItemBar.js +4 -4
- package/node/Input/Input.js +4 -4
- package/node/InputAdornment/InputAdornment.js +4 -4
- package/node/InputBase/InputBase.js +4 -4
- package/node/InputLabel/InputLabel.js +4 -4
- package/node/LinearProgress/LinearProgress.js +4 -4
- package/node/Link/Link.js +4 -4
- package/node/List/List.js +4 -4
- package/node/ListItem/ListItem.js +4 -4
- package/node/ListItemAvatar/ListItemAvatar.js +4 -4
- package/node/ListItemButton/ListItemButton.js +4 -4
- package/node/ListItemIcon/ListItemIcon.js +4 -4
- package/node/ListItemSecondaryAction/ListItemSecondaryAction.js +4 -4
- package/node/ListItemText/ListItemText.js +4 -4
- package/node/ListSubheader/ListSubheader.js +4 -4
- package/node/Menu/Menu.js +4 -4
- package/node/MenuItem/MenuItem.js +4 -4
- package/node/MenuList/MenuList.js +4 -4
- package/node/MobileStepper/MobileStepper.js +4 -4
- package/node/Modal/Modal.js +4 -4
- package/node/NativeSelect/NativeSelect.js +4 -4
- package/node/OutlinedInput/OutlinedInput.js +4 -4
- package/node/Pagination/Pagination.js +4 -4
- package/node/PaginationItem/PaginationItem.js +4 -4
- package/node/Paper/Paper.js +4 -4
- package/node/Popover/Popover.js +4 -4
- package/node/Popper/Popper.js +4 -4
- package/node/Radio/Radio.js +4 -4
- package/node/RadioGroup/RadioGroup.js +4 -4
- package/node/Rating/Rating.js +5 -14
- package/node/ScopedCssBaseline/ScopedCssBaseline.js +4 -4
- package/node/Select/Select.js +4 -4
- package/node/Skeleton/Skeleton.js +4 -4
- package/node/Slide/Slide.js +4 -4
- package/node/Slider/Slider.js +4 -4
- package/node/Snackbar/Snackbar.js +4 -4
- package/node/SnackbarContent/SnackbarContent.js +4 -4
- package/node/SpeedDial/SpeedDial.js +6 -14
- package/node/SpeedDialAction/SpeedDialAction.js +4 -4
- package/node/SpeedDialIcon/SpeedDialIcon.js +4 -4
- package/node/Stack/Stack.js +4 -4
- package/node/Step/Step.js +4 -4
- package/node/StepButton/StepButton.js +4 -4
- package/node/StepConnector/StepConnector.js +4 -4
- package/node/StepContent/StepContent.js +4 -4
- package/node/StepIcon/StepIcon.js +4 -4
- package/node/StepLabel/StepLabel.js +4 -4
- package/node/Stepper/Stepper.js +4 -4
- package/node/SvgIcon/SvgIcon.js +4 -4
- package/node/SwipeableDrawer/SwipeableDrawer.js +4 -4
- package/node/Switch/Switch.js +4 -4
- package/node/Tab/Tab.js +4 -4
- package/node/TabScrollButton/TabScrollButton.js +4 -4
- package/node/Table/Table.js +4 -4
- package/node/TableBody/TableBody.js +4 -4
- package/node/TableCell/TableCell.js +4 -4
- package/node/TableContainer/TableContainer.js +4 -4
- package/node/TableFooter/TableFooter.js +4 -4
- package/node/TableHead/TableHead.js +4 -4
- package/node/TablePagination/TablePagination.js +4 -4
- package/node/TableRow/TableRow.js +4 -4
- package/node/TableSortLabel/TableSortLabel.js +4 -4
- package/node/Tabs/Tabs.js +4 -4
- package/node/TextField/TextField.js +4 -4
- package/node/ToggleButton/ToggleButton.js +24 -8
- package/node/ToggleButtonGroup/ToggleButtonGroup.js +88 -46
- package/node/ToggleButtonGroup/ToggleButtonGroupButtonContext.js +17 -0
- package/node/ToggleButtonGroup/ToggleButtonGroupContext.js +17 -0
- package/node/ToggleButtonGroup/toggleButtonGroupClasses.js +1 -1
- package/node/Toolbar/Toolbar.js +4 -4
- package/node/Tooltip/Tooltip.js +4 -4
- package/node/Typography/Typography.js +4 -4
- package/node/Unstable_Grid2/Grid2.js +4 -4
- package/node/Zoom/Zoom.js +4 -4
- package/node/index.js +1 -1
- package/node/styles/CssVarsProvider.js +3 -0
- package/node/utils/types.js +5 -0
- package/node/utils/useSlot.js +88 -0
- package/node/zero-styled/index.js +13 -0
- package/package.json +11 -10
- package/styles/CssVarsProvider.d.ts +3 -3
- package/styles/CssVarsProvider.js +3 -0
- package/umd/material-ui.development.js +15848 -15745
- package/umd/material-ui.production.min.js +4 -207
- package/utils/types.d.ts +27 -0
- package/utils/types.js +1 -0
- package/utils/useSlot.d.ts +84 -0
- package/utils/useSlot.js +82 -0
- package/zero-styled/index.d.ts +2 -0
- package/zero-styled/index.js +2 -0
- package/zero-styled/package.json +6 -0
|
@@ -8,11 +8,14 @@ import { isFragment } from 'react-is';
|
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';
|
|
11
|
+
import { getValidReactChildren } from '@mui/utils';
|
|
11
12
|
import styled from '../styles/styled';
|
|
12
13
|
import useThemeProps from '../styles/useThemeProps';
|
|
13
14
|
import capitalize from '../utils/capitalize';
|
|
14
|
-
import isValueSelected from './isValueSelected';
|
|
15
15
|
import toggleButtonGroupClasses, { getToggleButtonGroupUtilityClass } from './toggleButtonGroupClasses';
|
|
16
|
+
import ToggleButtonGroupContext from './ToggleButtonGroupContext';
|
|
17
|
+
import ToggleButtonGroupButtonContext from './ToggleButtonGroupButtonContext';
|
|
18
|
+
import toggleButtonClasses from '../ToggleButton/toggleButtonClasses';
|
|
16
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
20
|
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
18
21
|
var classes = ownerState.classes,
|
|
@@ -21,7 +24,10 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
21
24
|
disabled = ownerState.disabled;
|
|
22
25
|
var slots = {
|
|
23
26
|
root: ['root', orientation === 'vertical' && 'vertical', fullWidth && 'fullWidth'],
|
|
24
|
-
grouped: ['grouped', "grouped".concat(capitalize(orientation)), disabled && 'disabled']
|
|
27
|
+
grouped: ['grouped', "grouped".concat(capitalize(orientation)), disabled && 'disabled'],
|
|
28
|
+
firstButton: ['firstButton'],
|
|
29
|
+
lastButton: ['lastButton'],
|
|
30
|
+
middleButton: ['middleButton']
|
|
25
31
|
};
|
|
26
32
|
return composeClasses(slots, getToggleButtonGroupUtilityClass, classes);
|
|
27
33
|
};
|
|
@@ -30,11 +36,11 @@ var ToggleButtonGroupRoot = styled('div', {
|
|
|
30
36
|
slot: 'Root',
|
|
31
37
|
overridesResolver: function overridesResolver(props, styles) {
|
|
32
38
|
var ownerState = props.ownerState;
|
|
33
|
-
return [_defineProperty({}, "& .".concat(toggleButtonGroupClasses.grouped), styles.grouped), _defineProperty({}, "& .".concat(toggleButtonGroupClasses.grouped), styles["grouped".concat(capitalize(ownerState.orientation))]), styles.root, ownerState.orientation === 'vertical' && styles.vertical, ownerState.fullWidth && styles.fullWidth];
|
|
39
|
+
return [_defineProperty({}, "& .".concat(toggleButtonGroupClasses.grouped), styles.grouped), _defineProperty({}, "& .".concat(toggleButtonGroupClasses.grouped), styles["grouped".concat(capitalize(ownerState.orientation))]), _defineProperty({}, "& .".concat(toggleButtonGroupClasses.firstButton), styles.firstButton), _defineProperty({}, "& .".concat(toggleButtonGroupClasses.lastButton), styles.lastButton), _defineProperty({}, "& .".concat(toggleButtonGroupClasses.middleButton), styles.middleButton), styles.root, ownerState.orientation === 'vertical' && styles.vertical, ownerState.fullWidth && styles.fullWidth];
|
|
34
40
|
}
|
|
35
|
-
})(function (
|
|
36
|
-
var ownerState =
|
|
37
|
-
theme =
|
|
41
|
+
})(function (_ref6) {
|
|
42
|
+
var ownerState = _ref6.ownerState,
|
|
43
|
+
theme = _ref6.theme;
|
|
38
44
|
return _extends({
|
|
39
45
|
display: 'inline-flex',
|
|
40
46
|
borderRadius: (theme.vars || theme).shape.borderRadius
|
|
@@ -42,35 +48,33 @@ var ToggleButtonGroupRoot = styled('div', {
|
|
|
42
48
|
flexDirection: 'column'
|
|
43
49
|
}, ownerState.fullWidth && {
|
|
44
50
|
width: '100%'
|
|
45
|
-
}, _defineProperty({}, "& .".concat(toggleButtonGroupClasses.grouped), _extends({}, ownerState.orientation === 'horizontal' ? _defineProperty({
|
|
46
|
-
'&:not(:first-of-type)': {
|
|
47
|
-
marginLeft: -1,
|
|
48
|
-
borderLeft: '1px solid transparent',
|
|
49
|
-
borderTopLeftRadius: 0,
|
|
50
|
-
borderBottomLeftRadius: 0
|
|
51
|
-
},
|
|
52
|
-
'&:not(:last-of-type)': {
|
|
53
|
-
borderTopRightRadius: 0,
|
|
54
|
-
borderBottomRightRadius: 0
|
|
55
|
-
}
|
|
56
|
-
}, "&.".concat(toggleButtonGroupClasses.selected, " + .").concat(toggleButtonGroupClasses.grouped, ".").concat(toggleButtonGroupClasses.selected), {
|
|
51
|
+
}, _defineProperty({}, "& .".concat(toggleButtonGroupClasses.grouped), _extends({}, ownerState.orientation === 'horizontal' ? _defineProperty({}, "&.".concat(toggleButtonGroupClasses.selected, " + .").concat(toggleButtonGroupClasses.grouped, ".").concat(toggleButtonGroupClasses.selected), {
|
|
57
52
|
borderLeft: 0,
|
|
58
53
|
marginLeft: 0
|
|
59
|
-
}) : _defineProperty({
|
|
60
|
-
'&:not(:first-of-type)': {
|
|
61
|
-
marginTop: -1,
|
|
62
|
-
borderTop: '1px solid transparent',
|
|
63
|
-
borderTopLeftRadius: 0,
|
|
64
|
-
borderTopRightRadius: 0
|
|
65
|
-
},
|
|
66
|
-
'&:not(:last-of-type)': {
|
|
67
|
-
borderBottomLeftRadius: 0,
|
|
68
|
-
borderBottomRightRadius: 0
|
|
69
|
-
}
|
|
70
|
-
}, "&.".concat(toggleButtonGroupClasses.selected, " + .").concat(toggleButtonGroupClasses.grouped, ".").concat(toggleButtonGroupClasses.selected), {
|
|
54
|
+
}) : _defineProperty({}, "&.".concat(toggleButtonGroupClasses.selected, " + .").concat(toggleButtonGroupClasses.grouped, ".").concat(toggleButtonGroupClasses.selected), {
|
|
71
55
|
borderTop: 0,
|
|
72
56
|
marginTop: 0
|
|
73
|
-
}))))
|
|
57
|
+
}))), ownerState.orientation === 'horizontal' ? _defineProperty(_defineProperty({}, "& .".concat(toggleButtonGroupClasses.firstButton, ",& .").concat(toggleButtonGroupClasses.middleButton), {
|
|
58
|
+
borderTopRightRadius: 0,
|
|
59
|
+
borderBottomRightRadius: 0
|
|
60
|
+
}), "& .".concat(toggleButtonGroupClasses.lastButton, ",& .").concat(toggleButtonGroupClasses.middleButton), {
|
|
61
|
+
marginLeft: -1,
|
|
62
|
+
borderLeft: '1px solid transparent',
|
|
63
|
+
borderTopLeftRadius: 0,
|
|
64
|
+
borderBottomLeftRadius: 0
|
|
65
|
+
}) : _defineProperty(_defineProperty({}, "& .".concat(toggleButtonGroupClasses.firstButton, ",& .").concat(toggleButtonGroupClasses.middleButton), {
|
|
66
|
+
borderBottomLeftRadius: 0,
|
|
67
|
+
borderBottomRightRadius: 0
|
|
68
|
+
}), "& .".concat(toggleButtonGroupClasses.lastButton, ",& .").concat(toggleButtonGroupClasses.middleButton), {
|
|
69
|
+
marginTop: -1,
|
|
70
|
+
borderTop: '1px solid transparent',
|
|
71
|
+
borderTopLeftRadius: 0,
|
|
72
|
+
borderTopRightRadius: 0
|
|
73
|
+
}), ownerState.orientation === 'horizontal' ? _defineProperty({}, "& .".concat(toggleButtonGroupClasses.lastButton, ".").concat(toggleButtonClasses.disabled, ",& .").concat(toggleButtonGroupClasses.middleButton, ".").concat(toggleButtonClasses.disabled), {
|
|
74
|
+
borderLeft: '1px solid transparent'
|
|
75
|
+
}) : _defineProperty({}, "& .".concat(toggleButtonGroupClasses.lastButton, ".").concat(toggleButtonClasses.disabled, ",& .").concat(toggleButtonGroupClasses.middleButton, ".").concat(toggleButtonClasses.disabled), {
|
|
76
|
+
borderTop: '1px solid transparent'
|
|
77
|
+
}));
|
|
74
78
|
});
|
|
75
79
|
var ToggleButtonGroup = /*#__PURE__*/React.forwardRef(function ToggleButtonGroup(inProps, ref) {
|
|
76
80
|
var props = useThemeProps({
|
|
@@ -101,7 +105,7 @@ var ToggleButtonGroup = /*#__PURE__*/React.forwardRef(function ToggleButtonGroup
|
|
|
101
105
|
size: size
|
|
102
106
|
});
|
|
103
107
|
var classes = useUtilityClasses(ownerState);
|
|
104
|
-
var handleChange = function
|
|
108
|
+
var handleChange = React.useCallback(function (event, buttonValue) {
|
|
105
109
|
if (!onChange) {
|
|
106
110
|
return;
|
|
107
111
|
}
|
|
@@ -114,12 +118,39 @@ var ToggleButtonGroup = /*#__PURE__*/React.forwardRef(function ToggleButtonGroup
|
|
|
114
118
|
newValue = value ? value.concat(buttonValue) : [buttonValue];
|
|
115
119
|
}
|
|
116
120
|
onChange(event, newValue);
|
|
117
|
-
};
|
|
118
|
-
var handleExclusiveChange = function
|
|
121
|
+
}, [onChange, value]);
|
|
122
|
+
var handleExclusiveChange = React.useCallback(function (event, buttonValue) {
|
|
119
123
|
if (!onChange) {
|
|
120
124
|
return;
|
|
121
125
|
}
|
|
122
126
|
onChange(event, value === buttonValue ? null : buttonValue);
|
|
127
|
+
}, [onChange, value]);
|
|
128
|
+
var context = React.useMemo(function () {
|
|
129
|
+
return {
|
|
130
|
+
className: classes.grouped,
|
|
131
|
+
onChange: exclusive ? handleExclusiveChange : handleChange,
|
|
132
|
+
value: value,
|
|
133
|
+
size: size,
|
|
134
|
+
fullWidth: fullWidth,
|
|
135
|
+
color: color,
|
|
136
|
+
disabled: disabled
|
|
137
|
+
};
|
|
138
|
+
}, [classes.grouped, exclusive, handleExclusiveChange, handleChange, value, size, fullWidth, color, disabled]);
|
|
139
|
+
var validChildren = getValidReactChildren(children);
|
|
140
|
+
var childrenCount = validChildren.length;
|
|
141
|
+
var getButtonPositionClassName = function getButtonPositionClassName(index) {
|
|
142
|
+
var isFirstButton = index === 0;
|
|
143
|
+
var isLastButton = index === childrenCount - 1;
|
|
144
|
+
if (isFirstButton && isLastButton) {
|
|
145
|
+
return '';
|
|
146
|
+
}
|
|
147
|
+
if (isFirstButton) {
|
|
148
|
+
return classes.firstButton;
|
|
149
|
+
}
|
|
150
|
+
if (isLastButton) {
|
|
151
|
+
return classes.lastButton;
|
|
152
|
+
}
|
|
153
|
+
return classes.middleButton;
|
|
123
154
|
};
|
|
124
155
|
return /*#__PURE__*/_jsx(ToggleButtonGroupRoot, _extends({
|
|
125
156
|
role: "group",
|
|
@@ -127,32 +158,27 @@ var ToggleButtonGroup = /*#__PURE__*/React.forwardRef(function ToggleButtonGroup
|
|
|
127
158
|
ref: ref,
|
|
128
159
|
ownerState: ownerState
|
|
129
160
|
}, other, {
|
|
130
|
-
children:
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
161
|
+
children: /*#__PURE__*/_jsx(ToggleButtonGroupContext.Provider, {
|
|
162
|
+
value: context,
|
|
163
|
+
children: validChildren.map(function (child, index) {
|
|
164
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
165
|
+
if (isFragment(child)) {
|
|
166
|
+
console.error(["MUI: The ToggleButtonGroup component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
|
|
167
|
+
}
|
|
137
168
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
size: child.props.size || size,
|
|
144
|
-
fullWidth: fullWidth,
|
|
145
|
-
color: child.props.color || color,
|
|
146
|
-
disabled: child.props.disabled || disabled
|
|
147
|
-
});
|
|
169
|
+
return /*#__PURE__*/_jsx(ToggleButtonGroupButtonContext.Provider, {
|
|
170
|
+
value: getButtonPositionClassName(index),
|
|
171
|
+
children: child
|
|
172
|
+
}, index);
|
|
173
|
+
})
|
|
148
174
|
})
|
|
149
175
|
}));
|
|
150
176
|
});
|
|
151
177
|
process.env.NODE_ENV !== "production" ? ToggleButtonGroup.propTypes /* remove-proptypes */ = {
|
|
152
|
-
//
|
|
153
|
-
//
|
|
154
|
-
//
|
|
155
|
-
//
|
|
178
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
179
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
180
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
181
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
156
182
|
/**
|
|
157
183
|
* The content of the component.
|
|
158
184
|
*/
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @ignore - internal component.
|
|
4
|
+
*/
|
|
5
|
+
var ToggleButtonGroupButtonContext = /*#__PURE__*/React.createContext(undefined);
|
|
6
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
7
|
+
ToggleButtonGroupButtonContext.displayName = 'ToggleButtonGroupButtonContext';
|
|
8
|
+
}
|
|
9
|
+
export default ToggleButtonGroupButtonContext;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @ignore - internal component.
|
|
4
|
+
*/
|
|
5
|
+
var ToggleButtonGroupContext = /*#__PURE__*/React.createContext({});
|
|
6
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
7
|
+
ToggleButtonGroupContext.displayName = 'ToggleButtonGroupContext';
|
|
8
|
+
}
|
|
9
|
+
export default ToggleButtonGroupContext;
|
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
|
3
3
|
export function getToggleButtonGroupUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiToggleButtonGroup', slot);
|
|
5
5
|
}
|
|
6
|
-
var toggleButtonGroupClasses = generateUtilityClasses('MuiToggleButtonGroup', ['root', 'selected', 'vertical', 'disabled', 'grouped', 'groupedHorizontal', 'groupedVertical', 'fullWidth']);
|
|
6
|
+
var toggleButtonGroupClasses = generateUtilityClasses('MuiToggleButtonGroup', ['root', 'selected', 'vertical', 'disabled', 'grouped', 'groupedHorizontal', 'groupedVertical', 'fullWidth', 'firstButton', 'lastButton', 'middleButton']);
|
|
7
7
|
export default toggleButtonGroupClasses;
|
|
@@ -75,10 +75,10 @@ var Toolbar = /*#__PURE__*/React.forwardRef(function Toolbar(inProps, ref) {
|
|
|
75
75
|
}, other));
|
|
76
76
|
});
|
|
77
77
|
process.env.NODE_ENV !== "production" ? Toolbar.propTypes /* remove-proptypes */ = {
|
|
78
|
-
//
|
|
79
|
-
//
|
|
80
|
-
//
|
|
81
|
-
//
|
|
78
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
79
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
80
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
81
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
82
82
|
/**
|
|
83
83
|
* The Toolbar children, usually a mixture of `IconButton`, `Button` and `Typography`.
|
|
84
84
|
* The Toolbar is a flex container, allowing flex item properties to be used to lay out the children.
|
|
@@ -598,10 +598,10 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
598
598
|
});
|
|
599
599
|
});
|
|
600
600
|
process.env.NODE_ENV !== "production" ? Tooltip.propTypes /* remove-proptypes */ = {
|
|
601
|
-
//
|
|
602
|
-
//
|
|
603
|
-
//
|
|
604
|
-
//
|
|
601
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
602
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
603
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
604
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
605
605
|
/**
|
|
606
606
|
* If `true`, adds an arrow to the tooltip.
|
|
607
607
|
* @default false
|
|
@@ -121,10 +121,10 @@ var Typography = /*#__PURE__*/React.forwardRef(function Typography(inProps, ref)
|
|
|
121
121
|
}, other));
|
|
122
122
|
});
|
|
123
123
|
process.env.NODE_ENV !== "production" ? Typography.propTypes /* remove-proptypes */ = {
|
|
124
|
-
//
|
|
125
|
-
//
|
|
126
|
-
//
|
|
127
|
-
//
|
|
124
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
125
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
126
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
127
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
128
128
|
/**
|
|
129
129
|
* Set the text-align on the component.
|
|
130
130
|
* @default 'inherit'
|
|
@@ -20,10 +20,10 @@ var Grid2 = createGrid2({
|
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
process.env.NODE_ENV !== "production" ? Grid2.propTypes /* remove-proptypes */ = {
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
//
|
|
23
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
24
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
25
|
+
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
26
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
27
27
|
/**
|
|
28
28
|
* The content of the component.
|
|
29
29
|
*/
|
package/legacy/Zoom/Zoom.js
CHANGED
|
@@ -129,10 +129,10 @@ var Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
129
129
|
}));
|
|
130
130
|
});
|
|
131
131
|
process.env.NODE_ENV !== "production" ? Zoom.propTypes /* remove-proptypes */ = {
|
|
132
|
-
//
|
|
133
|
-
//
|
|
134
|
-
//
|
|
135
|
-
//
|
|
132
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
133
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
134
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
135
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
136
136
|
/**
|
|
137
137
|
* Add a custom transition end trigger. Called with the transitioning DOM
|
|
138
138
|
* node and a done callback. Allows for more fine grained transition end
|
package/legacy/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
// do not remove the following import (https://github.com/microsoft/TypeScript/issues/29808#issuecomment-1320713018)
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5
|
+
// @ts-ignore
|
|
3
6
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
7
|
import { unstable_createCssVarsProvider as createCssVarsProvider, unstable_styleFunctionSx as styleFunctionSx } from '@mui/system';
|
|
5
8
|
import experimental_extendTheme from './experimental_extendTheme';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
5
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
|
+
import { unstable_useForkRef as useForkRef } from '@mui/utils';
|
|
7
|
+
import { appendOwnerState, resolveComponentProps, mergeSlotProps } from '@mui/base/utils';
|
|
8
|
+
/**
|
|
9
|
+
* An internal function to create a Material UI slot.
|
|
10
|
+
*
|
|
11
|
+
* This is an advanced version of Base UI `useSlotProps` because Material UI allows leaf component to be customized via `component` prop
|
|
12
|
+
* while Base UI does not need to support leaf component customization.
|
|
13
|
+
*
|
|
14
|
+
* @param {string} name: name of the slot
|
|
15
|
+
* @param {object} parameters
|
|
16
|
+
* @returns {[Slot, slotProps]} The slot's React component and the slot's props
|
|
17
|
+
*
|
|
18
|
+
* Note: the returned slot's props
|
|
19
|
+
* - will never contain `component` prop.
|
|
20
|
+
* - might contain `as` prop.
|
|
21
|
+
*/
|
|
22
|
+
export default function useSlot(
|
|
23
|
+
/**
|
|
24
|
+
* The slot's name. All Material UI components should have `root` slot.
|
|
25
|
+
*
|
|
26
|
+
* If the name is `root`, the logic behaves differently from other slots,
|
|
27
|
+
* e.g. the `externalForwardedProps` are spread to `root` slot but not other slots.
|
|
28
|
+
*/
|
|
29
|
+
name, parameters) {
|
|
30
|
+
var className = parameters.className,
|
|
31
|
+
initialElementType = parameters.elementType,
|
|
32
|
+
ownerState = parameters.ownerState,
|
|
33
|
+
externalForwardedProps = parameters.externalForwardedProps,
|
|
34
|
+
getSlotOwnerState = parameters.getSlotOwnerState,
|
|
35
|
+
internalForwardedProps = parameters.internalForwardedProps,
|
|
36
|
+
useSlotPropsParams = _objectWithoutProperties(parameters, ["className", "elementType", "ownerState", "externalForwardedProps", "getSlotOwnerState", "internalForwardedProps"]);
|
|
37
|
+
var rootComponent = externalForwardedProps.component,
|
|
38
|
+
_externalForwardedPro = externalForwardedProps.slots,
|
|
39
|
+
slots = _externalForwardedPro === void 0 ? _defineProperty({}, name, undefined) : _externalForwardedPro,
|
|
40
|
+
_externalForwardedPro2 = externalForwardedProps.slotProps,
|
|
41
|
+
slotProps = _externalForwardedPro2 === void 0 ? _defineProperty({}, name, undefined) : _externalForwardedPro2,
|
|
42
|
+
other = _objectWithoutProperties(externalForwardedProps, ["component", "slots", "slotProps"]);
|
|
43
|
+
var elementType = slots[name] || initialElementType;
|
|
44
|
+
|
|
45
|
+
// `slotProps[name]` can be a callback that receives the component's ownerState.
|
|
46
|
+
// `resolvedComponentsProps` is always a plain object.
|
|
47
|
+
var resolvedComponentsProps = resolveComponentProps(slotProps[name], ownerState);
|
|
48
|
+
var _mergeSlotProps = mergeSlotProps(_extends({
|
|
49
|
+
className: className
|
|
50
|
+
}, useSlotPropsParams, {
|
|
51
|
+
externalForwardedProps: name === 'root' ? other : undefined,
|
|
52
|
+
externalSlotProps: resolvedComponentsProps
|
|
53
|
+
})),
|
|
54
|
+
_mergeSlotProps$props = _mergeSlotProps.props,
|
|
55
|
+
slotComponent = _mergeSlotProps$props.component,
|
|
56
|
+
mergedProps = _objectWithoutProperties(_mergeSlotProps$props, ["component"]),
|
|
57
|
+
internalRef = _mergeSlotProps.internalRef;
|
|
58
|
+
var ref = useForkRef(internalRef, resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, parameters.ref);
|
|
59
|
+
var slotOwnerState = getSlotOwnerState ? getSlotOwnerState(mergedProps) : {};
|
|
60
|
+
var finalOwnerState = _extends({}, ownerState, slotOwnerState);
|
|
61
|
+
var LeafComponent = name === 'root' ? slotComponent || rootComponent : slotComponent;
|
|
62
|
+
var props = appendOwnerState(elementType, _extends({}, name === 'root' && !rootComponent && !slots[name] && internalForwardedProps, name !== 'root' && !slots[name] && internalForwardedProps, mergedProps, LeafComponent && {
|
|
63
|
+
as: LeafComponent
|
|
64
|
+
}, {
|
|
65
|
+
ref: ref
|
|
66
|
+
}), finalOwnerState);
|
|
67
|
+
Object.keys(slotOwnerState).forEach(function (propName) {
|
|
68
|
+
delete props[propName];
|
|
69
|
+
});
|
|
70
|
+
return [elementType, props];
|
|
71
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
|
-
const _excluded = ["children", "className", "defaultExpanded", "disabled", "disableGutters", "expanded", "onChange", "square", "TransitionComponent", "TransitionProps"];
|
|
5
|
+
const _excluded = ["children", "className", "defaultExpanded", "disabled", "disableGutters", "expanded", "onChange", "square", "slots", "slotProps", "TransitionComponent", "TransitionProps"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { isFragment } from 'react-is';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
@@ -15,6 +15,7 @@ import Collapse from '../Collapse';
|
|
|
15
15
|
import Paper from '../Paper';
|
|
16
16
|
import AccordionContext from './AccordionContext';
|
|
17
17
|
import useControlled from '../utils/useControlled';
|
|
18
|
+
import useSlot from '../utils/useSlot';
|
|
18
19
|
import accordionClasses, { getAccordionUtilityClass } from './accordionClasses';
|
|
19
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
21
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -127,8 +128,10 @@ const Accordion = /*#__PURE__*/React.forwardRef(function Accordion(inProps, ref)
|
|
|
127
128
|
expanded: expandedProp,
|
|
128
129
|
onChange,
|
|
129
130
|
square = false,
|
|
130
|
-
|
|
131
|
-
|
|
131
|
+
slots = {},
|
|
132
|
+
slotProps = {},
|
|
133
|
+
TransitionComponent: TransitionComponentProp,
|
|
134
|
+
TransitionProps: TransitionPropsProp
|
|
132
135
|
} = props,
|
|
133
136
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
134
137
|
const [expanded, setExpandedState] = useControlled({
|
|
@@ -157,6 +160,21 @@ const Accordion = /*#__PURE__*/React.forwardRef(function Accordion(inProps, ref)
|
|
|
157
160
|
expanded
|
|
158
161
|
});
|
|
159
162
|
const classes = useUtilityClasses(ownerState);
|
|
163
|
+
const backwardCompatibleSlots = _extends({
|
|
164
|
+
transition: TransitionComponentProp
|
|
165
|
+
}, slots);
|
|
166
|
+
const backwardCompatibleSlotProps = _extends({
|
|
167
|
+
transition: TransitionPropsProp
|
|
168
|
+
}, slotProps);
|
|
169
|
+
const [TransitionSlot, transitionProps] = useSlot('transition', {
|
|
170
|
+
elementType: Collapse,
|
|
171
|
+
externalForwardedProps: {
|
|
172
|
+
slots: backwardCompatibleSlots,
|
|
173
|
+
slotProps: backwardCompatibleSlotProps
|
|
174
|
+
},
|
|
175
|
+
ownerState
|
|
176
|
+
});
|
|
177
|
+
delete transitionProps.ownerState;
|
|
160
178
|
return /*#__PURE__*/_jsxs(AccordionRoot, _extends({
|
|
161
179
|
className: clsx(classes.root, className),
|
|
162
180
|
ref: ref,
|
|
@@ -166,10 +184,10 @@ const Accordion = /*#__PURE__*/React.forwardRef(function Accordion(inProps, ref)
|
|
|
166
184
|
children: [/*#__PURE__*/_jsx(AccordionContext.Provider, {
|
|
167
185
|
value: contextValue,
|
|
168
186
|
children: summary
|
|
169
|
-
}), /*#__PURE__*/_jsx(
|
|
187
|
+
}), /*#__PURE__*/_jsx(TransitionSlot, _extends({
|
|
170
188
|
in: expanded,
|
|
171
189
|
timeout: "auto"
|
|
172
|
-
},
|
|
190
|
+
}, transitionProps, {
|
|
173
191
|
children: /*#__PURE__*/_jsx("div", {
|
|
174
192
|
"aria-labelledby": summary.props.id,
|
|
175
193
|
id: summary.props['aria-controls'],
|
|
@@ -181,10 +199,10 @@ const Accordion = /*#__PURE__*/React.forwardRef(function Accordion(inProps, ref)
|
|
|
181
199
|
}));
|
|
182
200
|
});
|
|
183
201
|
process.env.NODE_ENV !== "production" ? Accordion.propTypes /* remove-proptypes */ = {
|
|
184
|
-
//
|
|
185
|
-
//
|
|
186
|
-
//
|
|
187
|
-
//
|
|
202
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
203
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
204
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
205
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
188
206
|
/**
|
|
189
207
|
* The content of the component.
|
|
190
208
|
*/
|
|
@@ -233,6 +251,20 @@ process.env.NODE_ENV !== "production" ? Accordion.propTypes /* remove-proptypes
|
|
|
233
251
|
* @param {boolean} expanded The `expanded` state of the accordion.
|
|
234
252
|
*/
|
|
235
253
|
onChange: PropTypes.func,
|
|
254
|
+
/**
|
|
255
|
+
* The props used for each slot inside.
|
|
256
|
+
* @default {}
|
|
257
|
+
*/
|
|
258
|
+
slotProps: PropTypes.shape({
|
|
259
|
+
transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
260
|
+
}),
|
|
261
|
+
/**
|
|
262
|
+
* The components used for each slot inside.
|
|
263
|
+
* @default {}
|
|
264
|
+
*/
|
|
265
|
+
slots: PropTypes.shape({
|
|
266
|
+
transition: PropTypes.elementType
|
|
267
|
+
}),
|
|
236
268
|
/**
|
|
237
269
|
* If `true`, rounded corners are disabled.
|
|
238
270
|
* @default false
|
|
@@ -245,12 +277,13 @@ process.env.NODE_ENV !== "production" ? Accordion.propTypes /* remove-proptypes
|
|
|
245
277
|
/**
|
|
246
278
|
* The component used for the transition.
|
|
247
279
|
* [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
|
248
|
-
* @
|
|
280
|
+
* @deprecated Use `slots.transition` instead. This prop will be removed in v7.
|
|
249
281
|
*/
|
|
250
282
|
TransitionComponent: PropTypes.elementType,
|
|
251
283
|
/**
|
|
252
284
|
* Props applied to the transition element.
|
|
253
285
|
* By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.
|
|
286
|
+
* @deprecated Use `slotProps.transition` instead. This prop will be removed in v7.
|
|
254
287
|
*/
|
|
255
288
|
TransitionProps: PropTypes.object
|
|
256
289
|
} : void 0;
|
|
@@ -63,10 +63,10 @@ const AccordionActions = /*#__PURE__*/React.forwardRef(function AccordionActions
|
|
|
63
63
|
}, other));
|
|
64
64
|
});
|
|
65
65
|
process.env.NODE_ENV !== "production" ? AccordionActions.propTypes /* remove-proptypes */ = {
|
|
66
|
-
//
|
|
67
|
-
//
|
|
68
|
-
//
|
|
69
|
-
//
|
|
66
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
67
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
68
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
69
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
70
70
|
/**
|
|
71
71
|
* The content of the component.
|
|
72
72
|
*/
|
|
@@ -47,10 +47,10 @@ const AccordionDetails = /*#__PURE__*/React.forwardRef(function AccordionDetails
|
|
|
47
47
|
}, other));
|
|
48
48
|
});
|
|
49
49
|
process.env.NODE_ENV !== "production" ? AccordionDetails.propTypes /* remove-proptypes */ = {
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
//
|
|
53
|
-
//
|
|
50
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
51
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
52
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
53
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
54
54
|
/**
|
|
55
55
|
* The content of the component.
|
|
56
56
|
*/
|
|
@@ -153,10 +153,10 @@ const AccordionSummary = /*#__PURE__*/React.forwardRef(function AccordionSummary
|
|
|
153
153
|
}));
|
|
154
154
|
});
|
|
155
155
|
process.env.NODE_ENV !== "production" ? AccordionSummary.propTypes /* remove-proptypes */ = {
|
|
156
|
-
//
|
|
157
|
-
//
|
|
158
|
-
//
|
|
159
|
-
//
|
|
156
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
157
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
158
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
159
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
160
160
|
/**
|
|
161
161
|
* The content of the component.
|
|
162
162
|
*/
|
package/modern/Alert/Alert.js
CHANGED
|
@@ -197,10 +197,10 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
|
|
|
197
197
|
}));
|
|
198
198
|
});
|
|
199
199
|
process.env.NODE_ENV !== "production" ? Alert.propTypes /* remove-proptypes */ = {
|
|
200
|
-
//
|
|
201
|
-
//
|
|
202
|
-
//
|
|
203
|
-
//
|
|
200
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
201
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
202
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
203
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
204
204
|
/**
|
|
205
205
|
* The action to display. It renders after the message, at the end of the alert.
|
|
206
206
|
*/
|
|
@@ -288,7 +288,7 @@ process.env.NODE_ENV !== "production" ? Alert.propTypes /* remove-proptypes */ =
|
|
|
288
288
|
* The severity of the alert. This defines the color and icon used.
|
|
289
289
|
* @default 'success'
|
|
290
290
|
*/
|
|
291
|
-
severity: PropTypes.oneOf(['error', 'info', 'success', 'warning']),
|
|
291
|
+
severity: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['error', 'info', 'success', 'warning']), PropTypes.string]),
|
|
292
292
|
/**
|
|
293
293
|
* The extra props for the slot components.
|
|
294
294
|
* You can override the existing props or add new ones.
|
|
@@ -53,10 +53,10 @@ const AlertTitle = /*#__PURE__*/React.forwardRef(function AlertTitle(inProps, re
|
|
|
53
53
|
}, other));
|
|
54
54
|
});
|
|
55
55
|
process.env.NODE_ENV !== "production" ? AlertTitle.propTypes /* remove-proptypes */ = {
|
|
56
|
-
//
|
|
57
|
-
//
|
|
58
|
-
//
|
|
59
|
-
//
|
|
56
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
57
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
58
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
59
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
60
60
|
/**
|
|
61
61
|
* The content of the component.
|
|
62
62
|
*/
|