@mui/material 5.0.4 → 5.0.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.js +1 -1
- package/AccordionActions/AccordionActions.js +1 -1
- package/AccordionDetails/AccordionDetails.js +1 -1
- package/AccordionSummary/AccordionSummary.js +1 -1
- package/Alert/Alert.js +1 -1
- package/AlertTitle/AlertTitle.js +1 -1
- package/AppBar/AppBar.js +1 -1
- package/Autocomplete/Autocomplete.js +14 -10
- package/Avatar/Avatar.js +1 -1
- package/AvatarGroup/AvatarGroup.js +3 -3
- package/Backdrop/Backdrop.js +1 -1
- package/Badge/Badge.js +1 -1
- package/BottomNavigation/BottomNavigation.js +1 -1
- package/BottomNavigationAction/BottomNavigationAction.js +1 -1
- package/Breadcrumbs/Breadcrumbs.js +1 -1
- package/Button/Button.js +1 -1
- package/ButtonBase/ButtonBase.js +1 -1
- package/ButtonGroup/ButtonGroup.js +1 -1
- package/CHANGELOG.md +79 -0
- package/Card/Card.js +1 -1
- package/CardActionArea/CardActionArea.js +1 -1
- package/CardActions/CardActions.js +1 -1
- package/CardContent/CardContent.js +1 -1
- package/CardHeader/CardHeader.js +1 -1
- package/CardMedia/CardMedia.js +2 -2
- package/Checkbox/Checkbox.js +1 -1
- package/Chip/Chip.js +1 -1
- package/CircularProgress/CircularProgress.js +1 -1
- package/ClickAwayListener/index.d.ts +2 -2
- package/ClickAwayListener/index.js +2 -2
- package/Collapse/Collapse.js +1 -1
- package/Container/Container.js +1 -1
- package/Dialog/Dialog.js +1 -1
- package/DialogActions/DialogActions.js +1 -1
- package/DialogContent/DialogContent.js +3 -2
- package/DialogContentText/DialogContentText.js +1 -1
- package/DialogTitle/DialogTitle.js +1 -1
- package/Divider/Divider.js +1 -1
- package/Drawer/Drawer.js +1 -1
- package/Fab/Fab.js +1 -1
- package/FilledInput/FilledInput.js +1 -1
- package/FormControl/FormControl.js +1 -1
- package/FormControlLabel/FormControlLabel.js +1 -1
- package/FormGroup/FormGroup.js +1 -1
- package/FormHelperText/FormHelperText.js +1 -1
- package/FormLabel/FormLabel.js +1 -1
- package/Grid/Grid.js +6 -3
- package/Icon/Icon.js +1 -1
- package/IconButton/IconButton.js +1 -1
- package/ImageList/ImageList.js +1 -1
- package/ImageListItem/ImageListItem.js +1 -1
- package/ImageListItemBar/ImageListItemBar.js +1 -1
- package/Input/Input.js +1 -1
- package/InputAdornment/InputAdornment.js +1 -1
- package/InputBase/InputBase.js +4 -9
- package/InputLabel/InputLabel.js +1 -1
- package/LinearProgress/LinearProgress.js +1 -1
- package/Link/Link.js +1 -1
- package/List/List.js +1 -1
- package/ListItem/ListItem.js +1 -1
- package/ListItemAvatar/ListItemAvatar.js +1 -1
- package/ListItemButton/ListItemButton.js +1 -1
- package/ListItemIcon/ListItemIcon.js +1 -1
- package/ListItemSecondaryAction/ListItemSecondaryAction.js +1 -1
- package/ListItemText/ListItemText.js +1 -1
- package/ListSubheader/ListSubheader.js +1 -1
- package/Menu/Menu.js +1 -1
- package/MenuItem/MenuItem.js +5 -2
- package/MobileStepper/MobileStepper.js +1 -1
- package/Modal/Modal.js +1 -1
- package/NativeSelect/NativeSelect.js +1 -1
- package/OutlinedInput/OutlinedInput.js +1 -1
- package/Pagination/Pagination.js +1 -1
- package/PaginationItem/PaginationItem.js +1 -1
- package/Paper/Paper.js +1 -1
- package/Popover/Popover.js +1 -1
- package/Popper/index.d.ts +2 -2
- package/Popper/index.js +1 -1
- package/Radio/Radio.js +1 -1
- package/Rating/Rating.js +1 -1
- package/Select/Select.js +1 -1
- package/Skeleton/Skeleton.js +1 -1
- package/Slider/Slider.js +1 -1
- package/Snackbar/Snackbar.d.ts +1 -1
- package/Snackbar/Snackbar.js +2 -2
- package/SnackbarContent/SnackbarContent.js +1 -1
- package/SpeedDial/SpeedDial.js +1 -1
- package/SpeedDialAction/SpeedDialAction.js +1 -1
- package/SpeedDialIcon/SpeedDialIcon.js +1 -1
- package/Stack/Stack.js +1 -1
- package/Step/Step.js +1 -1
- package/StepButton/StepButton.js +1 -1
- package/StepConnector/StepConnector.js +1 -1
- package/StepContent/StepContent.js +1 -1
- package/StepIcon/StepIcon.js +1 -1
- package/StepLabel/StepLabel.js +1 -1
- package/Stepper/Stepper.js +1 -1
- package/SvgIcon/SvgIcon.js +1 -1
- package/Switch/Switch.js +1 -1
- package/Tab/Tab.d.ts +6 -0
- package/Tab/Tab.js +27 -7
- package/TabScrollButton/TabScrollButton.js +1 -1
- package/Table/Table.js +1 -1
- package/TableBody/TableBody.js +1 -1
- package/TableCell/TableCell.js +1 -1
- package/TableContainer/TableContainer.js +1 -1
- package/TableFooter/TableFooter.js +1 -1
- package/TableHead/TableHead.js +1 -1
- package/TablePagination/TablePagination.js +1 -1
- package/TableRow/TableRow.js +1 -1
- package/TableSortLabel/TableSortLabel.js +1 -1
- package/Tabs/Tabs.js +1 -1
- package/TextField/TextField.js +1 -1
- package/TextareaAutosize/index.d.ts +2 -2
- package/TextareaAutosize/index.js +1 -1
- package/ToggleButton/ToggleButton.js +1 -1
- package/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/Toolbar/Toolbar.js +1 -1
- package/Tooltip/Tooltip.d.ts +1 -1
- package/Tooltip/Tooltip.js +4 -4
- package/Typography/Typography.js +1 -1
- package/index.js +1 -1
- package/legacy/Accordion/Accordion.js +1 -1
- package/legacy/AccordionActions/AccordionActions.js +1 -1
- package/legacy/AccordionDetails/AccordionDetails.js +1 -1
- package/legacy/AccordionSummary/AccordionSummary.js +1 -1
- package/legacy/Alert/Alert.js +1 -1
- package/legacy/AlertTitle/AlertTitle.js +1 -1
- package/legacy/AppBar/AppBar.js +1 -1
- package/legacy/Autocomplete/Autocomplete.js +33 -32
- package/legacy/Avatar/Avatar.js +1 -1
- package/legacy/AvatarGroup/AvatarGroup.js +3 -3
- package/legacy/Backdrop/Backdrop.js +1 -1
- package/legacy/Badge/Badge.js +1 -1
- 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 +1 -1
- package/legacy/ButtonBase/ButtonBase.js +1 -1
- 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 +2 -2
- package/legacy/Checkbox/Checkbox.js +1 -1
- package/legacy/Chip/Chip.js +1 -1
- package/legacy/CircularProgress/CircularProgress.js +1 -1
- package/legacy/ClickAwayListener/index.js +2 -2
- package/legacy/Collapse/Collapse.js +1 -1
- package/legacy/Container/Container.js +1 -1
- package/legacy/Dialog/Dialog.js +1 -1
- package/legacy/DialogActions/DialogActions.js +1 -1
- package/legacy/DialogContent/DialogContent.js +6 -6
- 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 +6 -4
- 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 +4 -9
- 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 +1 -1
- 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 +1 -1
- package/legacy/MenuItem/MenuItem.js +5 -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 +1 -1
- 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 +1 -1
- package/legacy/Popper/index.js +1 -1
- package/legacy/Radio/Radio.js +1 -1
- package/legacy/Rating/Rating.js +1 -1
- package/legacy/Select/Select.js +1 -1
- package/legacy/Skeleton/Skeleton.js +1 -1
- package/legacy/Slider/Slider.js +1 -1
- package/legacy/Snackbar/Snackbar.js +2 -2
- package/legacy/SnackbarContent/SnackbarContent.js +1 -1
- package/legacy/SpeedDial/SpeedDial.js +1 -1
- 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 +1 -1
- 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 +28 -7
- 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 +1 -1
- package/legacy/TextareaAutosize/index.js +1 -1
- 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 +4 -4
- package/legacy/Typography/Typography.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/styles/index.js +1 -1
- package/legacy/utils/index.js +2 -1
- package/modern/Accordion/Accordion.js +1 -1
- package/modern/AccordionActions/AccordionActions.js +1 -1
- package/modern/AccordionDetails/AccordionDetails.js +1 -1
- package/modern/AccordionSummary/AccordionSummary.js +1 -1
- package/modern/Alert/Alert.js +1 -1
- package/modern/AlertTitle/AlertTitle.js +1 -1
- package/modern/AppBar/AppBar.js +1 -1
- package/modern/Autocomplete/Autocomplete.js +14 -10
- package/modern/Avatar/Avatar.js +1 -1
- package/modern/AvatarGroup/AvatarGroup.js +3 -3
- package/modern/Backdrop/Backdrop.js +1 -1
- package/modern/Badge/Badge.js +1 -1
- 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 +1 -1
- package/modern/ButtonBase/ButtonBase.js +1 -1
- 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 +2 -2
- package/modern/Checkbox/Checkbox.js +1 -1
- package/modern/Chip/Chip.js +1 -1
- package/modern/CircularProgress/CircularProgress.js +1 -1
- package/modern/ClickAwayListener/index.js +2 -2
- package/modern/Collapse/Collapse.js +1 -1
- package/modern/Container/Container.js +1 -1
- package/modern/Dialog/Dialog.js +1 -1
- package/modern/DialogActions/DialogActions.js +1 -1
- package/modern/DialogContent/DialogContent.js +3 -2
- 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 +6 -3
- 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 +4 -9
- 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 +1 -1
- 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 +1 -1
- package/modern/MenuItem/MenuItem.js +5 -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 +1 -1
- 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 +1 -1
- package/modern/Popper/index.js +1 -1
- package/modern/Radio/Radio.js +1 -1
- package/modern/Rating/Rating.js +1 -1
- package/modern/Select/Select.js +1 -1
- package/modern/Skeleton/Skeleton.js +1 -1
- package/modern/Slider/Slider.js +1 -1
- package/modern/Snackbar/Snackbar.js +2 -2
- package/modern/SnackbarContent/SnackbarContent.js +1 -1
- package/modern/SpeedDial/SpeedDial.js +1 -1
- 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 +1 -1
- 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 +27 -7
- 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 +1 -1
- package/modern/TextareaAutosize/index.js +1 -1
- 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 +3 -3
- package/modern/Typography/Typography.js +1 -1
- package/modern/index.js +1 -1
- package/modern/styles/index.js +1 -1
- package/modern/utils/index.js +2 -1
- package/node/Accordion/Accordion.js +1 -1
- package/node/AccordionActions/AccordionActions.js +1 -1
- package/node/AccordionDetails/AccordionDetails.js +1 -1
- package/node/AccordionSummary/AccordionSummary.js +1 -1
- package/node/Alert/Alert.js +1 -1
- package/node/AlertTitle/AlertTitle.js +1 -1
- package/node/AppBar/AppBar.js +1 -1
- package/node/Autocomplete/Autocomplete.js +18 -10
- package/node/Avatar/Avatar.js +1 -1
- package/node/AvatarGroup/AvatarGroup.js +3 -3
- package/node/Backdrop/Backdrop.js +1 -1
- package/node/Badge/Badge.js +1 -1
- 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 +1 -1
- package/node/ButtonBase/ButtonBase.js +1 -1
- 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 +2 -2
- package/node/Checkbox/Checkbox.js +1 -1
- package/node/Chip/Chip.js +1 -1
- package/node/CircularProgress/CircularProgress.js +1 -1
- package/node/ClickAwayListener/index.js +1 -1
- package/node/Collapse/Collapse.js +1 -1
- package/node/Container/Container.js +1 -1
- package/node/Dialog/Dialog.js +1 -1
- package/node/DialogActions/DialogActions.js +1 -1
- package/node/DialogContent/DialogContent.js +4 -2
- 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 +6 -3
- 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 +4 -11
- 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 +1 -1
- 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 +1 -1
- package/node/MenuItem/MenuItem.js +5 -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 +1 -1
- 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 +1 -1
- package/node/Popper/index.js +1 -1
- package/node/Radio/Radio.js +1 -1
- package/node/Rating/Rating.js +1 -1
- package/node/Select/Select.js +1 -1
- package/node/Skeleton/Skeleton.js +1 -1
- package/node/Slider/Slider.js +1 -1
- package/node/Snackbar/Snackbar.js +3 -3
- package/node/SnackbarContent/SnackbarContent.js +1 -1
- package/node/SpeedDial/SpeedDial.js +1 -1
- 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 +1 -1
- 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 +27 -7
- 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 +1 -1
- package/node/TextareaAutosize/index.js +1 -1
- 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 +4 -4
- package/node/Typography/Typography.js +1 -1
- package/node/index.js +1 -1
- package/node/styles/index.js +12 -0
- package/node/utils/index.js +9 -1
- package/package.json +5 -6
- package/styles/components.d.ts +0 -3
- package/styles/index.d.ts +4 -0
- package/styles/index.js +1 -1
- package/umd/material-ui.development.js +7835 -7748
- package/umd/material-ui.production.min.js +21 -21
- package/utils/index.d.ts +1 -0
- package/utils/index.js +2 -1
- package/ClickAwayListener/ClickAwayListener.d.ts +0 -47
- package/ClickAwayListener/ClickAwayListener.js +0 -196
- package/Popper/Popper.d.ts +0 -97
- package/Popper/Popper.js +0 -354
- package/TextareaAutosize/TextareaAutosize.d.ts +0 -27
- package/TextareaAutosize/TextareaAutosize.js +0 -224
- package/legacy/ClickAwayListener/ClickAwayListener.js +0 -199
- package/legacy/Popper/Popper.js +0 -359
- package/legacy/TextareaAutosize/TextareaAutosize.js +0 -226
- package/modern/ClickAwayListener/ClickAwayListener.js +0 -196
- package/modern/Popper/Popper.js +0 -354
- package/modern/TextareaAutosize/TextareaAutosize.js +0 -224
- package/node/ClickAwayListener/ClickAwayListener.js +0 -216
- package/node/Popper/Popper.js +0 -378
- package/node/TextareaAutosize/TextareaAutosize.js +0 -245
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { elementAcceptingRef, exactProp } from '@mui/utils';
|
|
4
|
-
import ownerDocument from '../utils/ownerDocument';
|
|
5
|
-
import useForkRef from '../utils/useForkRef';
|
|
6
|
-
import useEventCallback from '../utils/useEventCallback'; // TODO: return `EventHandlerName extends `on${infer EventName}` ? Lowercase<EventName> : never` once generatePropTypes runs with TS 4.1
|
|
7
|
-
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
|
|
10
|
-
function mapEventPropToEvent(eventProp) {
|
|
11
|
-
return eventProp.substring(2).toLowerCase();
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function clickedRootScrollbar(event, doc) {
|
|
15
|
-
return doc.documentElement.clientWidth < event.clientX || doc.documentElement.clientHeight < event.clientY;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Listen for click events that occur somewhere in the document, outside of the element itself.
|
|
20
|
-
* For instance, if you need to hide a menu when people click anywhere else on your page.
|
|
21
|
-
*
|
|
22
|
-
* Demos:
|
|
23
|
-
*
|
|
24
|
-
* - [Click Away Listener](https://mui.com/components/click-away-listener/)
|
|
25
|
-
* - [Menus](https://mui.com/components/menus/)
|
|
26
|
-
*
|
|
27
|
-
* API:
|
|
28
|
-
*
|
|
29
|
-
* - [ClickAwayListener API](https://mui.com/api/click-away-listener/)
|
|
30
|
-
*/
|
|
31
|
-
function ClickAwayListener(props) {
|
|
32
|
-
var children = props.children,
|
|
33
|
-
_props$disableReactTr = props.disableReactTree,
|
|
34
|
-
disableReactTree = _props$disableReactTr === void 0 ? false : _props$disableReactTr,
|
|
35
|
-
_props$mouseEvent = props.mouseEvent,
|
|
36
|
-
mouseEvent = _props$mouseEvent === void 0 ? 'onClick' : _props$mouseEvent,
|
|
37
|
-
onClickAway = props.onClickAway,
|
|
38
|
-
_props$touchEvent = props.touchEvent,
|
|
39
|
-
touchEvent = _props$touchEvent === void 0 ? 'onTouchEnd' : _props$touchEvent;
|
|
40
|
-
var movedRef = React.useRef(false);
|
|
41
|
-
var nodeRef = React.useRef(null);
|
|
42
|
-
var activatedRef = React.useRef(false);
|
|
43
|
-
var syntheticEventRef = React.useRef(false);
|
|
44
|
-
React.useEffect(function () {
|
|
45
|
-
// Ensure that this component is not "activated" synchronously.
|
|
46
|
-
// https://github.com/facebook/react/issues/20074
|
|
47
|
-
setTimeout(function () {
|
|
48
|
-
activatedRef.current = true;
|
|
49
|
-
}, 0);
|
|
50
|
-
return function () {
|
|
51
|
-
activatedRef.current = false;
|
|
52
|
-
};
|
|
53
|
-
}, []);
|
|
54
|
-
var handleRef = useForkRef( // @ts-expect-error TODO upstream fix
|
|
55
|
-
children.ref, nodeRef); // The handler doesn't take event.defaultPrevented into account:
|
|
56
|
-
//
|
|
57
|
-
// event.preventDefault() is meant to stop default behaviors like
|
|
58
|
-
// clicking a checkbox to check it, hitting a button to submit a form,
|
|
59
|
-
// and hitting left arrow to move the cursor in a text input etc.
|
|
60
|
-
// Only special HTML elements have these default behaviors.
|
|
61
|
-
|
|
62
|
-
var handleClickAway = useEventCallback(function (event) {
|
|
63
|
-
// Given developers can stop the propagation of the synthetic event,
|
|
64
|
-
// we can only be confident with a positive value.
|
|
65
|
-
var insideReactTree = syntheticEventRef.current;
|
|
66
|
-
syntheticEventRef.current = false;
|
|
67
|
-
var doc = ownerDocument(nodeRef.current); // 1. IE11 support, which trigger the handleClickAway even after the unbind
|
|
68
|
-
// 2. The child might render null.
|
|
69
|
-
// 3. Behave like a blur listener.
|
|
70
|
-
|
|
71
|
-
if (!activatedRef.current || !nodeRef.current || 'clientX' in event && clickedRootScrollbar(event, doc)) {
|
|
72
|
-
return;
|
|
73
|
-
} // Do not act if user performed touchmove
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
if (movedRef.current) {
|
|
77
|
-
movedRef.current = false;
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
var insideDOM; // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js
|
|
82
|
-
|
|
83
|
-
if (event.composedPath) {
|
|
84
|
-
insideDOM = event.composedPath().indexOf(nodeRef.current) > -1;
|
|
85
|
-
} else {
|
|
86
|
-
insideDOM = !doc.documentElement.contains( // @ts-expect-error returns `false` as intended when not dispatched from a Node
|
|
87
|
-
event.target) || nodeRef.current.contains( // @ts-expect-error returns `false` as intended when not dispatched from a Node
|
|
88
|
-
event.target);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
if (!insideDOM && (disableReactTree || !insideReactTree)) {
|
|
92
|
-
onClickAway(event);
|
|
93
|
-
}
|
|
94
|
-
}); // Keep track of mouse/touch events that bubbled up through the portal.
|
|
95
|
-
|
|
96
|
-
var createHandleSynthetic = function createHandleSynthetic(handlerName) {
|
|
97
|
-
return function (event) {
|
|
98
|
-
syntheticEventRef.current = true;
|
|
99
|
-
var childrenPropsHandler = children.props[handlerName];
|
|
100
|
-
|
|
101
|
-
if (childrenPropsHandler) {
|
|
102
|
-
childrenPropsHandler(event);
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
var childrenProps = {
|
|
108
|
-
ref: handleRef
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
if (touchEvent !== false) {
|
|
112
|
-
childrenProps[touchEvent] = createHandleSynthetic(touchEvent);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
React.useEffect(function () {
|
|
116
|
-
if (touchEvent !== false) {
|
|
117
|
-
var mappedTouchEvent = mapEventPropToEvent(touchEvent);
|
|
118
|
-
var doc = ownerDocument(nodeRef.current);
|
|
119
|
-
|
|
120
|
-
var handleTouchMove = function handleTouchMove() {
|
|
121
|
-
movedRef.current = true;
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
doc.addEventListener(mappedTouchEvent, handleClickAway);
|
|
125
|
-
doc.addEventListener('touchmove', handleTouchMove);
|
|
126
|
-
return function () {
|
|
127
|
-
doc.removeEventListener(mappedTouchEvent, handleClickAway);
|
|
128
|
-
doc.removeEventListener('touchmove', handleTouchMove);
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
return undefined;
|
|
133
|
-
}, [handleClickAway, touchEvent]);
|
|
134
|
-
|
|
135
|
-
if (mouseEvent !== false) {
|
|
136
|
-
childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
React.useEffect(function () {
|
|
140
|
-
if (mouseEvent !== false) {
|
|
141
|
-
var mappedMouseEvent = mapEventPropToEvent(mouseEvent);
|
|
142
|
-
var doc = ownerDocument(nodeRef.current);
|
|
143
|
-
doc.addEventListener(mappedMouseEvent, handleClickAway);
|
|
144
|
-
return function () {
|
|
145
|
-
doc.removeEventListener(mappedMouseEvent, handleClickAway);
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
return undefined;
|
|
150
|
-
}, [handleClickAway, mouseEvent]);
|
|
151
|
-
return /*#__PURE__*/_jsx(React.Fragment, {
|
|
152
|
-
children: /*#__PURE__*/React.cloneElement(children, childrenProps)
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
process.env.NODE_ENV !== "production" ? ClickAwayListener.propTypes
|
|
157
|
-
/* remove-proptypes */
|
|
158
|
-
= {
|
|
159
|
-
// ----------------------------- Warning --------------------------------
|
|
160
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
161
|
-
// | To update them edit TypeScript types and run "yarn proptypes" |
|
|
162
|
-
// ----------------------------------------------------------------------
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* The wrapped element.
|
|
166
|
-
*/
|
|
167
|
-
children: elementAcceptingRef.isRequired,
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* If `true`, the React tree is ignored and only the DOM tree is considered.
|
|
171
|
-
* This prop changes how portaled elements are handled.
|
|
172
|
-
* @default false
|
|
173
|
-
*/
|
|
174
|
-
disableReactTree: PropTypes.bool,
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* The mouse event to listen to. You can disable the listener by providing `false`.
|
|
178
|
-
* @default 'onClick'
|
|
179
|
-
*/
|
|
180
|
-
mouseEvent: PropTypes.oneOf(['onClick', 'onMouseDown', 'onMouseUp', false]),
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Callback fired when a "click away" event is detected.
|
|
184
|
-
*/
|
|
185
|
-
onClickAway: PropTypes.func.isRequired,
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* The touch event to listen to. You can disable the listener by providing `false`.
|
|
189
|
-
* @default 'onTouchEnd'
|
|
190
|
-
*/
|
|
191
|
-
touchEvent: PropTypes.oneOf(['onTouchEnd', 'onTouchStart', false])
|
|
192
|
-
} : void 0;
|
|
193
|
-
|
|
194
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
195
|
-
// eslint-disable-next-line
|
|
196
|
-
ClickAwayListener['propTypes' + ''] = exactProp(ClickAwayListener.propTypes);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
export default ClickAwayListener;
|
package/legacy/Popper/Popper.js
DELETED
|
@@ -1,359 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
import { createPopper } from '@popperjs/core';
|
|
6
|
-
import { chainPropTypes, refType, HTMLElementType } from '@mui/utils';
|
|
7
|
-
import { useThemeWithoutDefault as useTheme } from '@mui/system';
|
|
8
|
-
import Portal from '../Portal';
|
|
9
|
-
import ownerDocument from '../utils/ownerDocument';
|
|
10
|
-
import useForkRef from '../utils/useForkRef';
|
|
11
|
-
import useEnhancedEffect from '../utils/useEnhancedEffect';
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
|
|
14
|
-
function flipPlacement(placement, theme) {
|
|
15
|
-
var direction = theme && theme.direction || 'ltr';
|
|
16
|
-
|
|
17
|
-
if (direction === 'ltr') {
|
|
18
|
-
return placement;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
switch (placement) {
|
|
22
|
-
case 'bottom-end':
|
|
23
|
-
return 'bottom-start';
|
|
24
|
-
|
|
25
|
-
case 'bottom-start':
|
|
26
|
-
return 'bottom-end';
|
|
27
|
-
|
|
28
|
-
case 'top-end':
|
|
29
|
-
return 'top-start';
|
|
30
|
-
|
|
31
|
-
case 'top-start':
|
|
32
|
-
return 'top-end';
|
|
33
|
-
|
|
34
|
-
default:
|
|
35
|
-
return placement;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function resolveAnchorEl(anchorEl) {
|
|
40
|
-
return typeof anchorEl === 'function' ? anchorEl() : anchorEl;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
var defaultPopperOptions = {};
|
|
44
|
-
/* eslint-disable react/prop-types */
|
|
45
|
-
|
|
46
|
-
var PopperTooltip = /*#__PURE__*/React.forwardRef(function PopperTooltip(props, ref) {
|
|
47
|
-
var anchorEl = props.anchorEl,
|
|
48
|
-
children = props.children,
|
|
49
|
-
disablePortal = props.disablePortal,
|
|
50
|
-
modifiers = props.modifiers,
|
|
51
|
-
open = props.open,
|
|
52
|
-
initialPlacement = props.placement,
|
|
53
|
-
popperOptions = props.popperOptions,
|
|
54
|
-
popperRefProp = props.popperRef,
|
|
55
|
-
TransitionProps = props.TransitionProps,
|
|
56
|
-
other = _objectWithoutProperties(props, ["anchorEl", "children", "disablePortal", "modifiers", "open", "placement", "popperOptions", "popperRef", "TransitionProps"]);
|
|
57
|
-
|
|
58
|
-
var tooltipRef = React.useRef(null);
|
|
59
|
-
var ownRef = useForkRef(tooltipRef, ref);
|
|
60
|
-
var popperRef = React.useRef(null);
|
|
61
|
-
var handlePopperRef = useForkRef(popperRef, popperRefProp);
|
|
62
|
-
var handlePopperRefRef = React.useRef(handlePopperRef);
|
|
63
|
-
useEnhancedEffect(function () {
|
|
64
|
-
handlePopperRefRef.current = handlePopperRef;
|
|
65
|
-
}, [handlePopperRef]);
|
|
66
|
-
React.useImperativeHandle(popperRefProp, function () {
|
|
67
|
-
return popperRef.current;
|
|
68
|
-
}, []);
|
|
69
|
-
var theme = useTheme();
|
|
70
|
-
var rtlPlacement = flipPlacement(initialPlacement, theme);
|
|
71
|
-
/**
|
|
72
|
-
* placement initialized from prop but can change during lifetime if modifiers.flip.
|
|
73
|
-
* modifiers.flip is essentially a flip for controlled/uncontrolled behavior
|
|
74
|
-
*/
|
|
75
|
-
|
|
76
|
-
var _React$useState = React.useState(rtlPlacement),
|
|
77
|
-
placement = _React$useState[0],
|
|
78
|
-
setPlacement = _React$useState[1];
|
|
79
|
-
|
|
80
|
-
React.useEffect(function () {
|
|
81
|
-
if (popperRef.current) {
|
|
82
|
-
popperRef.current.forceUpdate();
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
useEnhancedEffect(function () {
|
|
86
|
-
if (!anchorEl || !open) {
|
|
87
|
-
return undefined;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
var handlePopperUpdate = function handlePopperUpdate(data) {
|
|
91
|
-
setPlacement(data.placement);
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
var resolvedAnchorEl = resolveAnchorEl(anchorEl);
|
|
95
|
-
|
|
96
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
97
|
-
if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {
|
|
98
|
-
var box = resolvedAnchorEl.getBoundingClientRect();
|
|
99
|
-
|
|
100
|
-
if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {
|
|
101
|
-
console.warn(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', "Make sure the element is present in the document or that it's not display none."].join('\n'));
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
var popperModifiers = [{
|
|
107
|
-
name: 'preventOverflow',
|
|
108
|
-
options: {
|
|
109
|
-
altBoundary: disablePortal
|
|
110
|
-
}
|
|
111
|
-
}, {
|
|
112
|
-
name: 'flip',
|
|
113
|
-
options: {
|
|
114
|
-
altBoundary: disablePortal
|
|
115
|
-
}
|
|
116
|
-
}, {
|
|
117
|
-
name: 'onUpdate',
|
|
118
|
-
enabled: true,
|
|
119
|
-
phase: 'afterWrite',
|
|
120
|
-
fn: function fn(_ref) {
|
|
121
|
-
var state = _ref.state;
|
|
122
|
-
handlePopperUpdate(state);
|
|
123
|
-
}
|
|
124
|
-
}];
|
|
125
|
-
|
|
126
|
-
if (modifiers != null) {
|
|
127
|
-
popperModifiers = popperModifiers.concat(modifiers);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
if (popperOptions && popperOptions.modifiers != null) {
|
|
131
|
-
popperModifiers = popperModifiers.concat(popperOptions.modifiers);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
var popper = createPopper(resolveAnchorEl(anchorEl), tooltipRef.current, _extends({
|
|
135
|
-
placement: rtlPlacement
|
|
136
|
-
}, popperOptions, {
|
|
137
|
-
modifiers: popperModifiers
|
|
138
|
-
}));
|
|
139
|
-
handlePopperRefRef.current(popper);
|
|
140
|
-
return function () {
|
|
141
|
-
popper.destroy();
|
|
142
|
-
handlePopperRefRef.current(null);
|
|
143
|
-
};
|
|
144
|
-
}, [anchorEl, disablePortal, modifiers, open, popperOptions, rtlPlacement]);
|
|
145
|
-
var childProps = {
|
|
146
|
-
placement: placement
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
if (TransitionProps !== null) {
|
|
150
|
-
childProps.TransitionProps = TransitionProps;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
return /*#__PURE__*/_jsx("div", _extends({
|
|
154
|
-
ref: ownRef,
|
|
155
|
-
role: "tooltip"
|
|
156
|
-
}, other, {
|
|
157
|
-
children: typeof children === 'function' ? children(childProps) : children
|
|
158
|
-
}));
|
|
159
|
-
});
|
|
160
|
-
/* eslint-enable react/prop-types */
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Poppers rely on the 3rd party library [Popper.js](https://popper.js.org/docs/v2/) for positioning.
|
|
164
|
-
*/
|
|
165
|
-
|
|
166
|
-
var Popper = /*#__PURE__*/React.forwardRef(function Popper(props, ref) {
|
|
167
|
-
var anchorEl = props.anchorEl,
|
|
168
|
-
children = props.children,
|
|
169
|
-
containerProp = props.container,
|
|
170
|
-
_props$disablePortal = props.disablePortal,
|
|
171
|
-
disablePortal = _props$disablePortal === void 0 ? false : _props$disablePortal,
|
|
172
|
-
_props$keepMounted = props.keepMounted,
|
|
173
|
-
keepMounted = _props$keepMounted === void 0 ? false : _props$keepMounted,
|
|
174
|
-
modifiers = props.modifiers,
|
|
175
|
-
open = props.open,
|
|
176
|
-
_props$placement = props.placement,
|
|
177
|
-
placement = _props$placement === void 0 ? 'bottom' : _props$placement,
|
|
178
|
-
_props$popperOptions = props.popperOptions,
|
|
179
|
-
popperOptions = _props$popperOptions === void 0 ? defaultPopperOptions : _props$popperOptions,
|
|
180
|
-
popperRef = props.popperRef,
|
|
181
|
-
style = props.style,
|
|
182
|
-
_props$transition = props.transition,
|
|
183
|
-
transition = _props$transition === void 0 ? false : _props$transition,
|
|
184
|
-
other = _objectWithoutProperties(props, ["anchorEl", "children", "container", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition"]);
|
|
185
|
-
|
|
186
|
-
var _React$useState2 = React.useState(true),
|
|
187
|
-
exited = _React$useState2[0],
|
|
188
|
-
setExited = _React$useState2[1];
|
|
189
|
-
|
|
190
|
-
var handleEnter = function handleEnter() {
|
|
191
|
-
setExited(false);
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
var handleExited = function handleExited() {
|
|
195
|
-
setExited(true);
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
if (!keepMounted && !open && (!transition || exited)) {
|
|
199
|
-
return null;
|
|
200
|
-
} // If the container prop is provided, use that
|
|
201
|
-
// If the anchorEl prop is provided, use its parent body element as the container
|
|
202
|
-
// If neither are provided let the Modal take care of choosing the container
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
var container = containerProp || (anchorEl ? ownerDocument(resolveAnchorEl(anchorEl)).body : undefined);
|
|
206
|
-
return /*#__PURE__*/_jsx(Portal, {
|
|
207
|
-
disablePortal: disablePortal,
|
|
208
|
-
container: container,
|
|
209
|
-
children: /*#__PURE__*/_jsx(PopperTooltip, _extends({
|
|
210
|
-
anchorEl: anchorEl,
|
|
211
|
-
disablePortal: disablePortal,
|
|
212
|
-
modifiers: modifiers,
|
|
213
|
-
ref: ref,
|
|
214
|
-
open: transition ? !exited : open,
|
|
215
|
-
placement: placement,
|
|
216
|
-
popperOptions: popperOptions,
|
|
217
|
-
popperRef: popperRef
|
|
218
|
-
}, other, {
|
|
219
|
-
style: _extends({
|
|
220
|
-
// Prevents scroll issue, waiting for Popper.js to add this style once initiated.
|
|
221
|
-
position: 'fixed',
|
|
222
|
-
// Fix Popper.js display issue
|
|
223
|
-
top: 0,
|
|
224
|
-
left: 0,
|
|
225
|
-
display: !open && keepMounted && !transition ? 'none' : null
|
|
226
|
-
}, style),
|
|
227
|
-
TransitionProps: transition ? {
|
|
228
|
-
in: open,
|
|
229
|
-
onEnter: handleEnter,
|
|
230
|
-
onExited: handleExited
|
|
231
|
-
} : null,
|
|
232
|
-
children: children
|
|
233
|
-
}))
|
|
234
|
-
});
|
|
235
|
-
});
|
|
236
|
-
process.env.NODE_ENV !== "production" ? Popper.propTypes
|
|
237
|
-
/* remove-proptypes */
|
|
238
|
-
= {
|
|
239
|
-
// ----------------------------- Warning --------------------------------
|
|
240
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
241
|
-
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
242
|
-
// ----------------------------------------------------------------------
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),
|
|
246
|
-
* or a function that returns either.
|
|
247
|
-
* It's used to set the position of the popper.
|
|
248
|
-
* The return value will passed as the reference object of the Popper instance.
|
|
249
|
-
*/
|
|
250
|
-
anchorEl: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]), function (props) {
|
|
251
|
-
if (props.open) {
|
|
252
|
-
var resolvedAnchorEl = resolveAnchorEl(props.anchorEl);
|
|
253
|
-
|
|
254
|
-
if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {
|
|
255
|
-
var box = resolvedAnchorEl.getBoundingClientRect();
|
|
256
|
-
|
|
257
|
-
if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {
|
|
258
|
-
return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', "Make sure the element is present in the document or that it's not display none."].join('\n'));
|
|
259
|
-
}
|
|
260
|
-
} else if (!resolvedAnchorEl || typeof resolvedAnchorEl.getBoundingClientRect !== 'function' || resolvedAnchorEl.contextElement != null && resolvedAnchorEl.contextElement.nodeType !== 1) {
|
|
261
|
-
return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'It should be an HTML element instance or a virtualElement ', '(https://popper.js.org/docs/v2/virtual-elements/).'].join('\n'));
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
return null;
|
|
266
|
-
}),
|
|
267
|
-
|
|
268
|
-
/**
|
|
269
|
-
* Popper render function or node.
|
|
270
|
-
*/
|
|
271
|
-
children: PropTypes
|
|
272
|
-
/* @typescript-to-proptypes-ignore */
|
|
273
|
-
.oneOfType([PropTypes.node, PropTypes.func]),
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* An HTML element or function that returns one.
|
|
277
|
-
* The `container` will have the portal children appended to it.
|
|
278
|
-
*
|
|
279
|
-
* By default, it uses the body of the top-level document object,
|
|
280
|
-
* so it's simply `document.body` most of the time.
|
|
281
|
-
*/
|
|
282
|
-
container: PropTypes
|
|
283
|
-
/* @typescript-to-proptypes-ignore */
|
|
284
|
-
.oneOfType([HTMLElementType, PropTypes.func]),
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* The `children` will be under the DOM hierarchy of the parent component.
|
|
288
|
-
* @default false
|
|
289
|
-
*/
|
|
290
|
-
disablePortal: PropTypes.bool,
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* Always keep the children in the DOM.
|
|
294
|
-
* This prop can be useful in SEO situation or
|
|
295
|
-
* when you want to maximize the responsiveness of the Popper.
|
|
296
|
-
* @default false
|
|
297
|
-
*/
|
|
298
|
-
keepMounted: PropTypes.bool,
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* Popper.js is based on a "plugin-like" architecture,
|
|
302
|
-
* most of its features are fully encapsulated "modifiers".
|
|
303
|
-
*
|
|
304
|
-
* A modifier is a function that is called each time Popper.js needs to
|
|
305
|
-
* compute the position of the popper.
|
|
306
|
-
* For this reason, modifiers should be very performant to avoid bottlenecks.
|
|
307
|
-
* To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).
|
|
308
|
-
*/
|
|
309
|
-
modifiers: PropTypes.arrayOf(PropTypes.shape({
|
|
310
|
-
data: PropTypes.object,
|
|
311
|
-
effect: PropTypes.func,
|
|
312
|
-
enabled: PropTypes.bool,
|
|
313
|
-
fn: PropTypes.func,
|
|
314
|
-
name: PropTypes.any.isRequired,
|
|
315
|
-
options: PropTypes.object,
|
|
316
|
-
phase: PropTypes.oneOf(['afterMain', 'afterRead', 'afterWrite', 'beforeMain', 'beforeRead', 'beforeWrite', 'main', 'read', 'write']),
|
|
317
|
-
requires: PropTypes.arrayOf(PropTypes.string),
|
|
318
|
-
requiresIfExists: PropTypes.arrayOf(PropTypes.string)
|
|
319
|
-
})),
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
* If `true`, the component is shown.
|
|
323
|
-
*/
|
|
324
|
-
open: PropTypes.bool.isRequired,
|
|
325
|
-
|
|
326
|
-
/**
|
|
327
|
-
* Popper placement.
|
|
328
|
-
* @default 'bottom'
|
|
329
|
-
*/
|
|
330
|
-
placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),
|
|
331
|
-
|
|
332
|
-
/**
|
|
333
|
-
* Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.
|
|
334
|
-
* @default {}
|
|
335
|
-
*/
|
|
336
|
-
popperOptions: PropTypes.shape({
|
|
337
|
-
modifiers: PropTypes.array,
|
|
338
|
-
onFirstUpdate: PropTypes.func,
|
|
339
|
-
placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),
|
|
340
|
-
strategy: PropTypes.oneOf(['absolute', 'fixed'])
|
|
341
|
-
}),
|
|
342
|
-
|
|
343
|
-
/**
|
|
344
|
-
* A ref that points to the used popper instance.
|
|
345
|
-
*/
|
|
346
|
-
popperRef: refType,
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* @ignore
|
|
350
|
-
*/
|
|
351
|
-
style: PropTypes.object,
|
|
352
|
-
|
|
353
|
-
/**
|
|
354
|
-
* Help supporting a react-transition-group/Transition component.
|
|
355
|
-
* @default false
|
|
356
|
-
*/
|
|
357
|
-
transition: PropTypes.bool
|
|
358
|
-
} : void 0;
|
|
359
|
-
export default Popper;
|