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