@mui/material 6.0.0-alpha.2 → 6.0.0-alpha.3
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/AppBar/AppBar.js +0 -1
- package/Avatar/Avatar.js +1 -1
- package/CHANGELOG.md +73 -0
- package/CardMedia/CardMedia.js +0 -1
- package/CircularProgress/CircularProgress.js +66 -30
- package/Dialog/Dialog.js +10 -1
- package/Fab/Fab.js +83 -43
- package/LinearProgress/LinearProgress.js +180 -75
- package/PaginationItem/PaginationItem.js +137 -76
- package/StepConnector/stepConnectorClasses.d.ts +6 -2
- package/StepLabel/StepLabel.d.ts +7 -0
- package/StepLabel/StepLabel.js +17 -6
- package/ToggleButton/ToggleButton.js +74 -45
- package/ToggleButtonGroup/ToggleButtonGroup.js +63 -51
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +8 -2
- package/ToggleButtonGroup/toggleButtonGroupClasses.js +1 -1
- package/Tooltip/Tooltip.js +1 -2
- package/Typography/Typography.js +3 -1
- package/index.js +1 -1
- package/modern/AppBar/AppBar.js +0 -1
- package/modern/Avatar/Avatar.js +1 -1
- package/modern/CardMedia/CardMedia.js +0 -1
- package/modern/CircularProgress/CircularProgress.js +66 -30
- package/modern/Dialog/Dialog.js +10 -1
- package/modern/Fab/Fab.js +83 -43
- package/modern/LinearProgress/LinearProgress.js +180 -75
- package/modern/PaginationItem/PaginationItem.js +137 -76
- package/modern/StepLabel/StepLabel.js +17 -6
- package/modern/ToggleButton/ToggleButton.js +74 -45
- package/modern/ToggleButtonGroup/ToggleButtonGroup.js +63 -51
- package/modern/ToggleButtonGroup/toggleButtonGroupClasses.js +1 -1
- package/modern/Tooltip/Tooltip.js +1 -2
- package/modern/Typography/Typography.js +3 -1
- package/modern/index.js +1 -1
- package/modern/styles/createTransitions.js +1 -3
- package/modern/zero-styled/index.js +1 -1
- package/node/AppBar/AppBar.js +0 -1
- package/node/Avatar/Avatar.js +1 -1
- package/node/CardMedia/CardMedia.js +0 -1
- package/node/CircularProgress/CircularProgress.js +72 -36
- package/node/Dialog/Dialog.js +10 -1
- package/node/Fab/Fab.js +85 -45
- package/node/LinearProgress/LinearProgress.js +188 -83
- package/node/PaginationItem/PaginationItem.js +141 -80
- package/node/StepLabel/StepLabel.js +17 -6
- package/node/ToggleButton/ToggleButton.js +76 -47
- package/node/ToggleButtonGroup/ToggleButtonGroup.js +65 -53
- package/node/ToggleButtonGroup/toggleButtonGroupClasses.js +1 -1
- package/node/Tooltip/Tooltip.js +1 -2
- package/node/Typography/Typography.js +3 -1
- package/node/index.js +1 -1
- package/node/styles/createTransitions.js +1 -3
- package/node/zero-styled/index.js +6 -0
- package/package.json +5 -5
- package/styles/createTransitions.js +1 -3
- package/umd/material-ui.development.js +973 -509
- package/umd/material-ui.production.min.js +4 -4
- package/zero-styled/index.d.ts +1 -1
- package/zero-styled/index.js +1 -1
- package/legacy/Accordion/Accordion.js +0 -306
- package/legacy/Accordion/AccordionContext.js +0 -13
- package/legacy/Accordion/accordionClasses.js +0 -7
- package/legacy/Accordion/index.js +0 -3
- package/legacy/AccordionActions/AccordionActions.js +0 -90
- package/legacy/AccordionActions/accordionActionsClasses.js +0 -7
- package/legacy/AccordionActions/index.js +0 -3
- package/legacy/AccordionDetails/AccordionDetails.js +0 -69
- package/legacy/AccordionDetails/accordionDetailsClasses.js +0 -7
- package/legacy/AccordionDetails/index.js +0 -3
- package/legacy/AccordionSummary/AccordionSummary.js +0 -198
- package/legacy/AccordionSummary/accordionSummaryClasses.js +0 -7
- package/legacy/AccordionSummary/index.js +0 -3
- package/legacy/Alert/Alert.js +0 -385
- package/legacy/Alert/alertClasses.js +0 -7
- package/legacy/Alert/index.js +0 -5
- package/legacy/AlertTitle/AlertTitle.js +0 -73
- package/legacy/AlertTitle/alertTitleClasses.js +0 -7
- package/legacy/AlertTitle/index.js +0 -5
- package/legacy/AppBar/AppBar.js +0 -235
- package/legacy/AppBar/appBarClasses.js +0 -7
- package/legacy/AppBar/index.js +0 -5
- package/legacy/Autocomplete/Autocomplete.js +0 -1127
- package/legacy/Autocomplete/autocompleteClasses.js +0 -7
- package/legacy/Autocomplete/index.js +0 -5
- package/legacy/Avatar/Avatar.js +0 -296
- package/legacy/Avatar/avatarClasses.js +0 -7
- package/legacy/Avatar/index.js +0 -5
- package/legacy/AvatarGroup/AvatarGroup.js +0 -205
- package/legacy/AvatarGroup/avatarGroupClasses.js +0 -7
- package/legacy/AvatarGroup/index.js +0 -5
- package/legacy/Backdrop/Backdrop.js +0 -211
- package/legacy/Backdrop/backdropClasses.js +0 -7
- package/legacy/Backdrop/index.js +0 -5
- package/legacy/Badge/Badge.js +0 -439
- package/legacy/Badge/badgeClasses.js +0 -9
- package/legacy/Badge/index.js +0 -5
- package/legacy/BottomNavigation/BottomNavigation.js +0 -124
- package/legacy/BottomNavigation/bottomNavigationClasses.js +0 -7
- package/legacy/BottomNavigation/index.js +0 -5
- package/legacy/BottomNavigationAction/BottomNavigationAction.js +0 -185
- package/legacy/BottomNavigationAction/bottomNavigationActionClasses.js +0 -7
- package/legacy/BottomNavigationAction/index.js +0 -5
- package/legacy/Box/Box.js +0 -35
- package/legacy/Box/boxClasses.js +0 -3
- package/legacy/Box/index.js +0 -5
- package/legacy/Breadcrumbs/BreadcrumbCollapsed.js +0 -88
- package/legacy/Breadcrumbs/Breadcrumbs.js +0 -253
- package/legacy/Breadcrumbs/breadcrumbsClasses.js +0 -7
- package/legacy/Breadcrumbs/index.js +0 -5
- package/legacy/Button/Button.js +0 -472
- package/legacy/Button/buttonClasses.js +0 -7
- package/legacy/Button/index.js +0 -5
- package/legacy/ButtonBase/ButtonBase.js +0 -487
- package/legacy/ButtonBase/Ripple.js +0 -89
- package/legacy/ButtonBase/TouchRipple.js +0 -267
- package/legacy/ButtonBase/buttonBaseClasses.js +0 -7
- package/legacy/ButtonBase/index.js +0 -7
- package/legacy/ButtonBase/touchRippleClasses.js +0 -7
- package/legacy/ButtonGroup/ButtonGroup.js +0 -371
- package/legacy/ButtonGroup/ButtonGroupButtonContext.js +0 -9
- package/legacy/ButtonGroup/ButtonGroupContext.js +0 -9
- package/legacy/ButtonGroup/buttonGroupClasses.js +0 -7
- package/legacy/ButtonGroup/index.js +0 -7
- package/legacy/Card/Card.js +0 -83
- package/legacy/Card/cardClasses.js +0 -7
- package/legacy/Card/index.js +0 -5
- package/legacy/CardActionArea/CardActionArea.js +0 -119
- package/legacy/CardActionArea/cardActionAreaClasses.js +0 -7
- package/legacy/CardActionArea/index.js +0 -5
- package/legacy/CardActions/CardActions.js +0 -89
- package/legacy/CardActions/cardActionsClasses.js +0 -7
- package/legacy/CardActions/index.js +0 -5
- package/legacy/CardContent/CardContent.js +0 -79
- package/legacy/CardContent/cardContentClasses.js +0 -7
- package/legacy/CardContent/index.js +0 -5
- package/legacy/CardHeader/CardHeader.js +0 -198
- package/legacy/CardHeader/cardHeaderClasses.js +0 -7
- package/legacy/CardHeader/index.js +0 -5
- package/legacy/CardMedia/CardMedia.js +0 -139
- package/legacy/CardMedia/cardMediaClasses.js +0 -7
- package/legacy/CardMedia/index.js +0 -5
- package/legacy/Checkbox/Checkbox.js +0 -212
- package/legacy/Checkbox/checkboxClasses.js +0 -7
- package/legacy/Checkbox/index.js +0 -5
- package/legacy/Chip/Chip.js +0 -547
- package/legacy/Chip/chipClasses.js +0 -7
- package/legacy/Chip/index.js +0 -5
- package/legacy/CircularProgress/CircularProgress.js +0 -224
- package/legacy/CircularProgress/circularProgressClasses.js +0 -7
- package/legacy/CircularProgress/index.js +0 -5
- package/legacy/ClickAwayListener/index.js +0 -1
- package/legacy/Collapse/Collapse.js +0 -383
- package/legacy/Collapse/collapseClasses.js +0 -7
- package/legacy/Collapse/index.js +0 -5
- package/legacy/Container/Container.js +0 -67
- package/legacy/Container/containerClasses.js +0 -7
- package/legacy/Container/index.js +0 -5
- package/legacy/CssBaseline/CssBaseline.js +0 -113
- package/legacy/CssBaseline/index.js +0 -3
- package/legacy/Dialog/Dialog.js +0 -392
- package/legacy/Dialog/DialogContext.js +0 -6
- package/legacy/Dialog/dialogClasses.js +0 -7
- package/legacy/Dialog/index.js +0 -5
- package/legacy/DialogActions/DialogActions.js +0 -88
- package/legacy/DialogActions/dialogActionsClasses.js +0 -7
- package/legacy/DialogActions/index.js +0 -5
- package/legacy/DialogContent/DialogContent.js +0 -93
- package/legacy/DialogContent/dialogContentClasses.js +0 -7
- package/legacy/DialogContent/index.js +0 -5
- package/legacy/DialogContentText/DialogContentText.js +0 -74
- package/legacy/DialogContentText/dialogContentTextClasses.js +0 -7
- package/legacy/DialogContentText/index.js +0 -5
- package/legacy/DialogTitle/DialogTitle.js +0 -80
- package/legacy/DialogTitle/dialogTitleClasses.js +0 -7
- package/legacy/DialogTitle/index.js +0 -5
- package/legacy/Divider/Divider.js +0 -316
- package/legacy/Divider/dividerClasses.js +0 -7
- package/legacy/Divider/index.js +0 -5
- package/legacy/Drawer/Drawer.js +0 -316
- package/legacy/Drawer/drawerClasses.js +0 -7
- package/legacy/Drawer/index.js +0 -5
- package/legacy/Fab/Fab.js +0 -229
- package/legacy/Fab/fabClasses.js +0 -7
- package/legacy/Fab/index.js +0 -5
- package/legacy/Fade/Fade.js +0 -206
- package/legacy/Fade/index.js +0 -3
- package/legacy/FilledInput/FilledInput.js +0 -425
- package/legacy/FilledInput/filledInputClasses.js +0 -9
- package/legacy/FilledInput/index.js +0 -5
- package/legacy/FormControl/FormControl.js +0 -315
- package/legacy/FormControl/FormControlContext.js +0 -9
- package/legacy/FormControl/formControlClasses.js +0 -7
- package/legacy/FormControl/formControlState.js +0 -14
- package/legacy/FormControl/index.js +0 -6
- package/legacy/FormControl/useFormControl.js +0 -7
- package/legacy/FormControlLabel/FormControlLabel.js +0 -258
- package/legacy/FormControlLabel/formControlLabelClasses.js +0 -7
- package/legacy/FormControlLabel/index.js +0 -5
- package/legacy/FormGroup/FormGroup.js +0 -103
- package/legacy/FormGroup/formGroupClasses.js +0 -7
- package/legacy/FormGroup/index.js +0 -5
- package/legacy/FormHelperText/FormHelperText.js +0 -167
- package/legacy/FormHelperText/formHelperTextClasses.js +0 -7
- package/legacy/FormHelperText/index.js +0 -5
- package/legacy/FormLabel/FormLabel.js +0 -166
- package/legacy/FormLabel/formLabelClasses.js +0 -7
- package/legacy/FormLabel/index.js +0 -6
- package/legacy/GlobalStyles/GlobalStyles.js +0 -26
- package/legacy/GlobalStyles/index.js +0 -1
- package/legacy/Grid/Grid.js +0 -561
- package/legacy/Grid/GridContext.js +0 -12
- package/legacy/Grid/gridClasses.js +0 -28
- package/legacy/Grid/index.js +0 -5
- package/legacy/Grow/Grow.js +0 -253
- package/legacy/Grow/index.js +0 -3
- package/legacy/Hidden/Hidden.js +0 -147
- package/legacy/Hidden/HiddenCss.js +0 -168
- package/legacy/Hidden/HiddenJs.js +0 -123
- package/legacy/Hidden/hiddenCssClasses.js +0 -7
- package/legacy/Hidden/index.js +0 -3
- package/legacy/Hidden/withWidth.js +0 -110
- package/legacy/Icon/Icon.js +0 -144
- package/legacy/Icon/iconClasses.js +0 -7
- package/legacy/Icon/index.js +0 -5
- package/legacy/IconButton/IconButton.js +0 -204
- package/legacy/IconButton/iconButtonClasses.js +0 -7
- package/legacy/IconButton/index.js +0 -5
- package/legacy/ImageList/ImageList.js +0 -155
- package/legacy/ImageList/ImageListContext.js +0 -13
- package/legacy/ImageList/imageListClasses.js +0 -7
- package/legacy/ImageList/index.js +0 -5
- package/legacy/ImageListItem/ImageListItem.js +0 -168
- package/legacy/ImageListItem/imageListItemClasses.js +0 -7
- package/legacy/ImageListItem/index.js +0 -5
- package/legacy/ImageListItemBar/ImageListItemBar.js +0 -211
- package/legacy/ImageListItemBar/imageListItemBarClasses.js +0 -7
- package/legacy/ImageListItemBar/index.js +0 -5
- package/legacy/Input/Input.js +0 -339
- package/legacy/Input/index.js +0 -5
- package/legacy/Input/inputClasses.js +0 -9
- package/legacy/InputAdornment/InputAdornment.js +0 -167
- package/legacy/InputAdornment/index.js +0 -5
- package/legacy/InputAdornment/inputAdornmentClasses.js +0 -7
- package/legacy/InputBase/InputBase.js +0 -713
- package/legacy/InputBase/index.js +0 -5
- package/legacy/InputBase/inputBaseClasses.js +0 -7
- package/legacy/InputBase/utils.js +0 -31
- package/legacy/InputLabel/InputLabel.js +0 -214
- package/legacy/InputLabel/index.js +0 -5
- package/legacy/InputLabel/inputLabelClasses.js +0 -7
- package/legacy/LinearProgress/LinearProgress.js +0 -285
- package/legacy/LinearProgress/index.js +0 -5
- package/legacy/LinearProgress/linearProgressClasses.js +0 -7
- package/legacy/Link/Link.js +0 -209
- package/legacy/Link/getTextDecoration.js +0 -24
- package/legacy/Link/index.js +0 -5
- package/legacy/Link/linkClasses.js +0 -7
- package/legacy/List/List.js +0 -126
- package/legacy/List/ListContext.js +0 -12
- package/legacy/List/index.js +0 -5
- package/legacy/List/listClasses.js +0 -7
- package/legacy/ListItem/ListItem.js +0 -425
- package/legacy/ListItem/index.js +0 -5
- package/legacy/ListItem/listItemClasses.js +0 -7
- package/legacy/ListItemAvatar/ListItemAvatar.js +0 -82
- package/legacy/ListItemAvatar/index.js +0 -5
- package/legacy/ListItemAvatar/listItemAvatarClasses.js +0 -7
- package/legacy/ListItemButton/ListItemButton.js +0 -242
- package/legacy/ListItemButton/index.js +0 -5
- package/legacy/ListItemButton/listItemButtonClasses.js +0 -7
- package/legacy/ListItemIcon/ListItemIcon.js +0 -86
- package/legacy/ListItemIcon/index.js +0 -5
- package/legacy/ListItemIcon/listItemIconClasses.js +0 -7
- package/legacy/ListItemSecondaryAction/ListItemSecondaryAction.js +0 -85
- package/legacy/ListItemSecondaryAction/index.js +0 -5
- package/legacy/ListItemSecondaryAction/listItemSecondaryActionClasses.js +0 -7
- package/legacy/ListItemText/ListItemText.js +0 -160
- package/legacy/ListItemText/index.js +0 -5
- package/legacy/ListItemText/listItemTextClasses.js +0 -7
- package/legacy/ListSubheader/ListSubheader.js +0 -139
- package/legacy/ListSubheader/index.js +0 -5
- package/legacy/ListSubheader/listSubheaderClasses.js +0 -7
- package/legacy/Menu/Menu.js +0 -317
- package/legacy/Menu/index.js +0 -5
- package/legacy/Menu/menuClasses.js +0 -7
- package/legacy/MenuItem/MenuItem.js +0 -251
- package/legacy/MenuItem/index.js +0 -5
- package/legacy/MenuItem/menuItemClasses.js +0 -7
- package/legacy/MenuList/MenuList.js +0 -285
- package/legacy/MenuList/index.js +0 -3
- package/legacy/MobileStepper/MobileStepper.js +0 -254
- package/legacy/MobileStepper/index.js +0 -5
- package/legacy/MobileStepper/mobileStepperClasses.js +0 -7
- package/legacy/Modal/Modal.js +0 -398
- package/legacy/Modal/index.js +0 -6
- package/legacy/Modal/modalClasses.js +0 -7
- package/legacy/NativeSelect/NativeSelect.js +0 -128
- package/legacy/NativeSelect/NativeSelectInput.js +0 -203
- package/legacy/NativeSelect/index.js +0 -5
- package/legacy/NativeSelect/nativeSelectClasses.js +0 -7
- package/legacy/NoSsr/index.js +0 -1
- package/legacy/OutlinedInput/NotchedOutline.js +0 -135
- package/legacy/OutlinedInput/OutlinedInput.js +0 -347
- package/legacy/OutlinedInput/index.js +0 -5
- package/legacy/OutlinedInput/outlinedInputClasses.js +0 -9
- package/legacy/Pagination/Pagination.js +0 -256
- package/legacy/Pagination/index.js +0 -5
- package/legacy/Pagination/paginationClasses.js +0 -7
- package/legacy/PaginationItem/PaginationItem.js +0 -356
- package/legacy/PaginationItem/index.js +0 -5
- package/legacy/PaginationItem/paginationItemClasses.js +0 -7
- package/legacy/Paper/Paper.js +0 -141
- package/legacy/Paper/index.js +0 -5
- package/legacy/Paper/paperClasses.js +0 -7
- package/legacy/Popover/Popover.js +0 -548
- package/legacy/Popover/index.js +0 -6
- package/legacy/Popover/popoverClasses.js +0 -7
- package/legacy/Popper/Popper.js +0 -207
- package/legacy/Popper/index.js +0 -3
- package/legacy/Portal/index.js +0 -1
- package/legacy/Radio/Radio.js +0 -212
- package/legacy/Radio/RadioButtonIcon.js +0 -81
- package/legacy/Radio/index.js +0 -5
- package/legacy/Radio/radioClasses.js +0 -7
- package/legacy/RadioGroup/RadioGroup.js +0 -118
- package/legacy/RadioGroup/RadioGroupContext.js +0 -9
- package/legacy/RadioGroup/index.js +0 -6
- package/legacy/RadioGroup/radioGroupClasses.js +0 -7
- package/legacy/RadioGroup/useRadioGroup.js +0 -7
- package/legacy/Rating/Rating.js +0 -657
- package/legacy/Rating/index.js +0 -3
- package/legacy/Rating/ratingClasses.js +0 -7
- package/legacy/ScopedCssBaseline/ScopedCssBaseline.js +0 -106
- package/legacy/ScopedCssBaseline/index.js +0 -5
- package/legacy/ScopedCssBaseline/scopedCssBaselineClasses.js +0 -7
- package/legacy/Select/Select.js +0 -290
- package/legacy/Select/SelectInput.js +0 -667
- package/legacy/Select/index.js +0 -5
- package/legacy/Select/selectClasses.js +0 -7
- package/legacy/Skeleton/Skeleton.js +0 -166
- package/legacy/Skeleton/index.js +0 -5
- package/legacy/Skeleton/skeletonClasses.js +0 -7
- package/legacy/Slide/Slide.js +0 -333
- package/legacy/Slide/index.js +0 -3
- package/legacy/Slider/Slider.js +0 -1063
- package/legacy/Slider/SliderValueLabel.js +0 -49
- package/legacy/Slider/SliderValueLabel.types.js +0 -1
- package/legacy/Slider/index.js +0 -6
- package/legacy/Slider/sliderClasses.js +0 -7
- package/legacy/Snackbar/Snackbar.js +0 -312
- package/legacy/Snackbar/index.js +0 -5
- package/legacy/Snackbar/snackbarClasses.js +0 -7
- package/legacy/SnackbarContent/SnackbarContent.js +0 -134
- package/legacy/SnackbarContent/index.js +0 -5
- package/legacy/SnackbarContent/snackbarContentClasses.js +0 -7
- package/legacy/SpeedDial/SpeedDial.js +0 -491
- package/legacy/SpeedDial/index.js +0 -5
- package/legacy/SpeedDial/speedDialClasses.js +0 -7
- package/legacy/SpeedDialAction/SpeedDialAction.js +0 -247
- package/legacy/SpeedDialAction/index.js +0 -5
- package/legacy/SpeedDialAction/speedDialActionClasses.js +0 -7
- package/legacy/SpeedDialIcon/SpeedDialIcon.js +0 -120
- package/legacy/SpeedDialIcon/index.js +0 -5
- package/legacy/SpeedDialIcon/speedDialIconClasses.js +0 -7
- package/legacy/Stack/Stack.js +0 -66
- package/legacy/Stack/index.js +0 -4
- package/legacy/Stack/stackClasses.js +0 -7
- package/legacy/Step/Step.js +0 -179
- package/legacy/Step/StepContext.js +0 -17
- package/legacy/Step/index.js +0 -7
- package/legacy/Step/stepClasses.js +0 -7
- package/legacy/StepButton/StepButton.js +0 -122
- package/legacy/StepButton/index.js +0 -5
- package/legacy/StepButton/stepButtonClasses.js +0 -7
- package/legacy/StepConnector/StepConnector.js +0 -142
- package/legacy/StepConnector/index.js +0 -5
- package/legacy/StepConnector/stepConnectorClasses.js +0 -7
- package/legacy/StepContent/StepContent.js +0 -152
- package/legacy/StepContent/index.js +0 -5
- package/legacy/StepContent/stepContentClasses.js +0 -7
- package/legacy/StepIcon/StepIcon.js +0 -162
- package/legacy/StepIcon/index.js +0 -5
- package/legacy/StepIcon/stepIconClasses.js +0 -7
- package/legacy/StepLabel/StepLabel.js +0 -258
- package/legacy/StepLabel/index.js +0 -5
- package/legacy/StepLabel/stepLabelClasses.js +0 -7
- package/legacy/Stepper/Stepper.js +0 -167
- package/legacy/Stepper/StepperContext.js +0 -17
- package/legacy/Stepper/index.js +0 -7
- package/legacy/Stepper/stepperClasses.js +0 -7
- package/legacy/StyledEngineProvider/index.js +0 -1
- package/legacy/SvgIcon/SvgIcon.js +0 -183
- package/legacy/SvgIcon/index.js +0 -5
- package/legacy/SvgIcon/svgIconClasses.js +0 -7
- package/legacy/SwipeableDrawer/SwipeArea.js +0 -81
- package/legacy/SwipeableDrawer/SwipeableDrawer.js +0 -621
- package/legacy/SwipeableDrawer/index.js +0 -3
- package/legacy/Switch/Switch.js +0 -337
- package/legacy/Switch/index.js +0 -5
- package/legacy/Switch/switchClasses.js +0 -7
- package/legacy/Tab/Tab.js +0 -249
- package/legacy/Tab/index.js +0 -5
- package/legacy/Tab/tabClasses.js +0 -7
- package/legacy/TabScrollButton/TabScrollButton.js +0 -153
- package/legacy/TabScrollButton/index.js +0 -5
- package/legacy/TabScrollButton/tabScrollButtonClasses.js +0 -7
- package/legacy/Table/Table.js +0 -130
- package/legacy/Table/TableContext.js +0 -12
- package/legacy/Table/Tablelvl2Context.js +0 -10
- package/legacy/Table/index.js +0 -5
- package/legacy/Table/tableClasses.js +0 -7
- package/legacy/TableBody/TableBody.js +0 -85
- package/legacy/TableBody/index.js +0 -5
- package/legacy/TableBody/tableBodyClasses.js +0 -7
- package/legacy/TableCell/TableCell.js +0 -208
- package/legacy/TableCell/index.js +0 -5
- package/legacy/TableCell/tableCellClasses.js +0 -7
- package/legacy/TableContainer/TableContainer.js +0 -77
- package/legacy/TableContainer/index.js +0 -5
- package/legacy/TableContainer/tableContainerClasses.js +0 -7
- package/legacy/TableFooter/TableFooter.js +0 -85
- package/legacy/TableFooter/index.js +0 -5
- package/legacy/TableFooter/tableFooterClasses.js +0 -7
- package/legacy/TableHead/TableHead.js +0 -85
- package/legacy/TableHead/index.js +0 -5
- package/legacy/TableHead/tableHeadClasses.js +0 -7
- package/legacy/TablePagination/TablePagination.js +0 -461
- package/legacy/TablePagination/TablePaginationActions.js +0 -182
- package/legacy/TablePagination/index.js +0 -5
- package/legacy/TablePagination/tablePaginationClasses.js +0 -7
- package/legacy/TableRow/TableRow.js +0 -123
- package/legacy/TableRow/index.js +0 -5
- package/legacy/TableRow/tableRowClasses.js +0 -7
- package/legacy/TableSortLabel/TableSortLabel.js +0 -165
- package/legacy/TableSortLabel/index.js +0 -5
- package/legacy/TableSortLabel/tableSortLabelClasses.js +0 -7
- package/legacy/Tabs/ScrollbarSize.js +0 -57
- package/legacy/Tabs/Tabs.js +0 -849
- package/legacy/Tabs/index.js +0 -5
- package/legacy/Tabs/tabsClasses.js +0 -7
- package/legacy/TextField/TextField.js +0 -381
- package/legacy/TextField/index.js +0 -5
- package/legacy/TextField/textFieldClasses.js +0 -7
- package/legacy/TextareaAutosize/index.js +0 -1
- package/legacy/ToggleButton/ToggleButton.js +0 -230
- package/legacy/ToggleButton/index.js +0 -5
- package/legacy/ToggleButton/toggleButtonClasses.js +0 -7
- package/legacy/ToggleButtonGroup/ToggleButtonGroup.js +0 -247
- package/legacy/ToggleButtonGroup/ToggleButtonGroupButtonContext.js +0 -9
- package/legacy/ToggleButtonGroup/ToggleButtonGroupContext.js +0 -9
- package/legacy/ToggleButtonGroup/index.js +0 -5
- package/legacy/ToggleButtonGroup/isValueSelected.js +0 -11
- package/legacy/ToggleButtonGroup/toggleButtonGroupClasses.js +0 -7
- package/legacy/Toolbar/Toolbar.js +0 -115
- package/legacy/Toolbar/index.js +0 -3
- package/legacy/Toolbar/toolbarClasses.js +0 -7
- package/legacy/Tooltip/Tooltip.js +0 -788
- package/legacy/Tooltip/index.js +0 -5
- package/legacy/Tooltip/tooltipClasses.js +0 -7
- package/legacy/Typography/Typography.js +0 -198
- package/legacy/Typography/index.js +0 -5
- package/legacy/Typography/typographyClasses.js +0 -7
- package/legacy/Unstable_Grid2/Grid2.js +0 -36
- package/legacy/Unstable_Grid2/Grid2Props.js +0 -1
- package/legacy/Unstable_Grid2/grid2Classes.js +0 -28
- package/legacy/Unstable_Grid2/index.js +0 -6
- package/legacy/Unstable_TrapFocus/index.js +0 -1
- package/legacy/Zoom/Zoom.js +0 -206
- package/legacy/Zoom/index.js +0 -3
- package/legacy/className/index.js +0 -2
- package/legacy/colors/amber.js +0 -17
- package/legacy/colors/blue.js +0 -17
- package/legacy/colors/blueGrey.js +0 -17
- package/legacy/colors/brown.js +0 -17
- package/legacy/colors/common.js +0 -5
- package/legacy/colors/cyan.js +0 -17
- package/legacy/colors/deepOrange.js +0 -17
- package/legacy/colors/deepPurple.js +0 -17
- package/legacy/colors/green.js +0 -17
- package/legacy/colors/grey.js +0 -17
- package/legacy/colors/index.js +0 -20
- package/legacy/colors/indigo.js +0 -17
- package/legacy/colors/lightBlue.js +0 -17
- package/legacy/colors/lightGreen.js +0 -17
- package/legacy/colors/lime.js +0 -17
- package/legacy/colors/orange.js +0 -17
- package/legacy/colors/pink.js +0 -17
- package/legacy/colors/purple.js +0 -17
- package/legacy/colors/red.js +0 -17
- package/legacy/colors/teal.js +0 -17
- package/legacy/colors/yellow.js +0 -17
- package/legacy/darkScrollbar/index.js +0 -33
- package/legacy/generateUtilityClass/index.js +0 -1
- package/legacy/generateUtilityClasses/index.js +0 -1
- package/legacy/index.js +0 -288
- package/legacy/internal/SwitchBase.js +0 -275
- package/legacy/internal/animate.js +0 -41
- package/legacy/internal/svg-icons/Add.js +0 -12
- package/legacy/internal/svg-icons/ArrowDownward.js +0 -12
- package/legacy/internal/svg-icons/ArrowDropDown.js +0 -12
- package/legacy/internal/svg-icons/Cancel.js +0 -12
- package/legacy/internal/svg-icons/CheckBox.js +0 -12
- package/legacy/internal/svg-icons/CheckBoxOutlineBlank.js +0 -12
- package/legacy/internal/svg-icons/CheckCircle.js +0 -12
- package/legacy/internal/svg-icons/Close.js +0 -14
- package/legacy/internal/svg-icons/ErrorOutline.js +0 -12
- package/legacy/internal/svg-icons/FirstPage.js +0 -12
- package/legacy/internal/svg-icons/IndeterminateCheckBox.js +0 -12
- package/legacy/internal/svg-icons/InfoOutlined.js +0 -12
- package/legacy/internal/svg-icons/KeyboardArrowLeft.js +0 -12
- package/legacy/internal/svg-icons/KeyboardArrowRight.js +0 -12
- package/legacy/internal/svg-icons/LastPage.js +0 -12
- package/legacy/internal/svg-icons/MoreHoriz.js +0 -12
- package/legacy/internal/svg-icons/NavigateBefore.js +0 -12
- package/legacy/internal/svg-icons/NavigateNext.js +0 -12
- package/legacy/internal/svg-icons/Person.js +0 -12
- package/legacy/internal/svg-icons/RadioButtonChecked.js +0 -12
- package/legacy/internal/svg-icons/RadioButtonUnchecked.js +0 -12
- package/legacy/internal/svg-icons/ReportProblemOutlined.js +0 -12
- package/legacy/internal/svg-icons/Star.js +0 -12
- package/legacy/internal/svg-icons/StarBorder.js +0 -12
- package/legacy/internal/svg-icons/SuccessOutlined.js +0 -12
- package/legacy/internal/svg-icons/Warning.js +0 -12
- package/legacy/internal/switchBaseClasses.js +0 -7
- package/legacy/locale/index.js +0 -4389
- package/legacy/styles/CssVarsProvider.js +0 -39
- package/legacy/styles/ThemeProvider.js +0 -28
- package/legacy/styles/adaptV4Theme.js +0 -81
- package/legacy/styles/createGetSelector.js +0 -21
- package/legacy/styles/createMixins.js +0 -15
- package/legacy/styles/createMuiStrictModeTheme.js +0 -10
- package/legacy/styles/createPalette.js +0 -299
- package/legacy/styles/createStyles.js +0 -10
- package/legacy/styles/createTheme.js +0 -97
- package/legacy/styles/createTransitions.js +0 -97
- package/legacy/styles/createTypography.js +0 -93
- package/legacy/styles/cssUtils.js +0 -122
- package/legacy/styles/defaultTheme.js +0 -5
- package/legacy/styles/excludeVariablesFromRoot.js +0 -10
- package/legacy/styles/experimental_extendTheme.js +0 -377
- package/legacy/styles/getOverlayAlpha.js +0 -11
- package/legacy/styles/identifier.js +0 -1
- package/legacy/styles/index.js +0 -37
- package/legacy/styles/makeStyles.js +0 -4
- package/legacy/styles/responsiveFontSizes.js +0 -63
- package/legacy/styles/rootShouldForwardProp.js +0 -5
- package/legacy/styles/shadows.js +0 -10
- package/legacy/styles/shouldSkipGeneratingVar.js +0 -6
- package/legacy/styles/slotShouldForwardProp.js +0 -5
- package/legacy/styles/styled.js +0 -14
- package/legacy/styles/useTheme.js +0 -14
- package/legacy/styles/useThemeProps.js +0 -15
- package/legacy/styles/withStyles.js +0 -4
- package/legacy/styles/withTheme.js +0 -4
- package/legacy/styles/zIndex.js +0 -13
- package/legacy/transitions/index.js +0 -1
- package/legacy/transitions/transition.js +0 -1
- package/legacy/transitions/utils.js +0 -16
- package/legacy/types/OverridableComponentAugmentation.js +0 -1
- package/legacy/useAutocomplete/index.js +0 -3
- package/legacy/useAutocomplete/useAutocomplete.js +0 -4
- package/legacy/useMediaQuery/index.js +0 -1
- package/legacy/useMediaQuery/useMediaQueryTheme.js +0 -8
- package/legacy/usePagination/index.js +0 -3
- package/legacy/usePagination/usePagination.js +0 -122
- package/legacy/useScrollTrigger/index.js +0 -3
- package/legacy/useScrollTrigger/useScrollTrigger.js +0 -57
- package/legacy/useTouchRipple/index.js +0 -3
- package/legacy/useTouchRipple/useTouchRipple.js +0 -102
- package/legacy/utils/capitalize.js +0 -2
- package/legacy/utils/createChainedFunction.js +0 -2
- package/legacy/utils/createSvgIcon.js +0 -27
- package/legacy/utils/debounce.js +0 -2
- package/legacy/utils/deprecatedPropType.js +0 -2
- package/legacy/utils/getScrollbarSize.js +0 -2
- package/legacy/utils/index.js +0 -30
- package/legacy/utils/isMuiElement.js +0 -2
- package/legacy/utils/ownerDocument.js +0 -2
- package/legacy/utils/ownerWindow.js +0 -2
- package/legacy/utils/requirePropFactory.js +0 -2
- package/legacy/utils/scrollLeft.js +0 -1
- package/legacy/utils/setRef.js +0 -2
- package/legacy/utils/shouldSpreadAdditionalProps.js +0 -5
- package/legacy/utils/types.js +0 -1
- package/legacy/utils/unsupportedProp.js +0 -2
- package/legacy/utils/useControlled.js +0 -4
- package/legacy/utils/useEnhancedEffect.js +0 -4
- package/legacy/utils/useEventCallback.js +0 -4
- package/legacy/utils/useForkRef.js +0 -4
- package/legacy/utils/useId.js +0 -4
- package/legacy/utils/useIsFocusVisible.js +0 -4
- package/legacy/utils/useSlot.js +0 -71
- package/legacy/zero-styled/index.js +0 -8
|
@@ -1,621 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import * as ReactDOM from 'react-dom';
|
|
7
|
-
import PropTypes from 'prop-types';
|
|
8
|
-
import elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';
|
|
9
|
-
import useThemeProps from '@mui/system/useThemeProps';
|
|
10
|
-
import { NoSsr } from '@mui/base';
|
|
11
|
-
import Drawer, { getAnchor, isHorizontal } from '../Drawer/Drawer';
|
|
12
|
-
import useForkRef from '../utils/useForkRef';
|
|
13
|
-
import ownerDocument from '../utils/ownerDocument';
|
|
14
|
-
import ownerWindow from '../utils/ownerWindow';
|
|
15
|
-
import useEventCallback from '../utils/useEventCallback';
|
|
16
|
-
import useEnhancedEffect from '../utils/useEnhancedEffect';
|
|
17
|
-
import useTheme from '../styles/useTheme';
|
|
18
|
-
import { getTransitionProps } from '../transitions/utils';
|
|
19
|
-
import SwipeArea from './SwipeArea';
|
|
20
|
-
|
|
21
|
-
// This value is closed to what browsers are using internally to
|
|
22
|
-
// trigger a native scroll.
|
|
23
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
-
var UNCERTAINTY_THRESHOLD = 3; // px
|
|
25
|
-
|
|
26
|
-
// This is the part of the drawer displayed on touch start.
|
|
27
|
-
var DRAG_STARTED_SIGNAL = 20; // px
|
|
28
|
-
|
|
29
|
-
// We can only have one instance at the time claiming ownership for handling the swipe.
|
|
30
|
-
// Otherwise, the UX would be confusing.
|
|
31
|
-
// That's why we use a singleton here.
|
|
32
|
-
var claimedSwipeInstance = null;
|
|
33
|
-
|
|
34
|
-
// Exported for test purposes.
|
|
35
|
-
export function reset() {
|
|
36
|
-
claimedSwipeInstance = null;
|
|
37
|
-
}
|
|
38
|
-
function calculateCurrentX(anchor, touches, doc) {
|
|
39
|
-
return anchor === 'right' ? doc.body.offsetWidth - touches[0].pageX : touches[0].pageX;
|
|
40
|
-
}
|
|
41
|
-
function calculateCurrentY(anchor, touches, containerWindow) {
|
|
42
|
-
return anchor === 'bottom' ? containerWindow.innerHeight - touches[0].clientY : touches[0].clientY;
|
|
43
|
-
}
|
|
44
|
-
function getMaxTranslate(horizontalSwipe, paperInstance) {
|
|
45
|
-
return horizontalSwipe ? paperInstance.clientWidth : paperInstance.clientHeight;
|
|
46
|
-
}
|
|
47
|
-
function getTranslate(currentTranslate, startLocation, open, maxTranslate) {
|
|
48
|
-
return Math.min(Math.max(open ? startLocation - currentTranslate : maxTranslate + startLocation - currentTranslate, 0), maxTranslate);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* @param {Element | null} element
|
|
53
|
-
* @param {Element} rootNode
|
|
54
|
-
*/
|
|
55
|
-
function getDomTreeShapes(element, rootNode) {
|
|
56
|
-
// Adapted from https://github.com/oliviertassinari/react-swipeable-views/blob/7666de1dba253b896911adf2790ce51467670856/packages/react-swipeable-views/src/SwipeableViews.js#L129
|
|
57
|
-
var domTreeShapes = [];
|
|
58
|
-
while (element && element !== rootNode.parentElement) {
|
|
59
|
-
var style = ownerWindow(rootNode).getComputedStyle(element);
|
|
60
|
-
if (
|
|
61
|
-
// Ignore the scroll children if the element is absolute positioned.
|
|
62
|
-
style.getPropertyValue('position') === 'absolute' ||
|
|
63
|
-
// Ignore the scroll children if the element has an overflowX hidden
|
|
64
|
-
style.getPropertyValue('overflow-x') === 'hidden') {
|
|
65
|
-
// noop
|
|
66
|
-
} else if (element.clientWidth > 0 && element.scrollWidth > element.clientWidth || element.clientHeight > 0 && element.scrollHeight > element.clientHeight) {
|
|
67
|
-
// Ignore the nodes that have no width.
|
|
68
|
-
// Keep elements with a scroll
|
|
69
|
-
domTreeShapes.push(element);
|
|
70
|
-
}
|
|
71
|
-
element = element.parentElement;
|
|
72
|
-
}
|
|
73
|
-
return domTreeShapes;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* @param {object} param0
|
|
78
|
-
* @param {ReturnType<getDomTreeShapes>} param0.domTreeShapes
|
|
79
|
-
*/
|
|
80
|
-
function computeHasNativeHandler(_ref) {
|
|
81
|
-
var domTreeShapes = _ref.domTreeShapes,
|
|
82
|
-
start = _ref.start,
|
|
83
|
-
current = _ref.current,
|
|
84
|
-
anchor = _ref.anchor;
|
|
85
|
-
// Adapted from https://github.com/oliviertassinari/react-swipeable-views/blob/7666de1dba253b896911adf2790ce51467670856/packages/react-swipeable-views/src/SwipeableViews.js#L175
|
|
86
|
-
var axisProperties = {
|
|
87
|
-
scrollPosition: {
|
|
88
|
-
x: 'scrollLeft',
|
|
89
|
-
y: 'scrollTop'
|
|
90
|
-
},
|
|
91
|
-
scrollLength: {
|
|
92
|
-
x: 'scrollWidth',
|
|
93
|
-
y: 'scrollHeight'
|
|
94
|
-
},
|
|
95
|
-
clientLength: {
|
|
96
|
-
x: 'clientWidth',
|
|
97
|
-
y: 'clientHeight'
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
return domTreeShapes.some(function (shape) {
|
|
101
|
-
// Determine if we are going backward or forward.
|
|
102
|
-
var goingForward = current >= start;
|
|
103
|
-
if (anchor === 'top' || anchor === 'left') {
|
|
104
|
-
goingForward = !goingForward;
|
|
105
|
-
}
|
|
106
|
-
var axis = anchor === 'left' || anchor === 'right' ? 'x' : 'y';
|
|
107
|
-
var scrollPosition = Math.round(shape[axisProperties.scrollPosition[axis]]);
|
|
108
|
-
var areNotAtStart = scrollPosition > 0;
|
|
109
|
-
var areNotAtEnd = scrollPosition + shape[axisProperties.clientLength[axis]] < shape[axisProperties.scrollLength[axis]];
|
|
110
|
-
if (goingForward && areNotAtEnd || !goingForward && areNotAtStart) {
|
|
111
|
-
return true;
|
|
112
|
-
}
|
|
113
|
-
return false;
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
var iOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent);
|
|
117
|
-
var SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inProps, ref) {
|
|
118
|
-
var props = useThemeProps({
|
|
119
|
-
name: 'MuiSwipeableDrawer',
|
|
120
|
-
props: inProps
|
|
121
|
-
});
|
|
122
|
-
var theme = useTheme();
|
|
123
|
-
var transitionDurationDefault = {
|
|
124
|
-
enter: theme.transitions.duration.enteringScreen,
|
|
125
|
-
exit: theme.transitions.duration.leavingScreen
|
|
126
|
-
};
|
|
127
|
-
var _props$anchor = props.anchor,
|
|
128
|
-
anchor = _props$anchor === void 0 ? 'left' : _props$anchor,
|
|
129
|
-
_props$disableBackdro = props.disableBackdropTransition,
|
|
130
|
-
disableBackdropTransition = _props$disableBackdro === void 0 ? false : _props$disableBackdro,
|
|
131
|
-
_props$disableDiscove = props.disableDiscovery,
|
|
132
|
-
disableDiscovery = _props$disableDiscove === void 0 ? false : _props$disableDiscove,
|
|
133
|
-
_props$disableSwipeTo = props.disableSwipeToOpen,
|
|
134
|
-
disableSwipeToOpen = _props$disableSwipeTo === void 0 ? iOS : _props$disableSwipeTo,
|
|
135
|
-
hideBackdrop = props.hideBackdrop,
|
|
136
|
-
_props$hysteresis = props.hysteresis,
|
|
137
|
-
hysteresis = _props$hysteresis === void 0 ? 0.52 : _props$hysteresis,
|
|
138
|
-
_props$allowSwipeInCh = props.allowSwipeInChildren,
|
|
139
|
-
allowSwipeInChildren = _props$allowSwipeInCh === void 0 ? false : _props$allowSwipeInCh,
|
|
140
|
-
_props$minFlingVeloci = props.minFlingVelocity,
|
|
141
|
-
minFlingVelocity = _props$minFlingVeloci === void 0 ? 450 : _props$minFlingVeloci,
|
|
142
|
-
_props$ModalProps = props.ModalProps,
|
|
143
|
-
_props$ModalProps2 = _props$ModalProps === void 0 ? {} : _props$ModalProps,
|
|
144
|
-
BackdropProps = _props$ModalProps2.BackdropProps,
|
|
145
|
-
ModalPropsProp = _objectWithoutProperties(_props$ModalProps2, ["BackdropProps"]),
|
|
146
|
-
onClose = props.onClose,
|
|
147
|
-
onOpen = props.onOpen,
|
|
148
|
-
_props$open = props.open,
|
|
149
|
-
open = _props$open === void 0 ? false : _props$open,
|
|
150
|
-
_props$PaperProps = props.PaperProps,
|
|
151
|
-
PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps,
|
|
152
|
-
SwipeAreaProps = props.SwipeAreaProps,
|
|
153
|
-
_props$swipeAreaWidth = props.swipeAreaWidth,
|
|
154
|
-
swipeAreaWidth = _props$swipeAreaWidth === void 0 ? 20 : _props$swipeAreaWidth,
|
|
155
|
-
_props$transitionDura = props.transitionDuration,
|
|
156
|
-
transitionDuration = _props$transitionDura === void 0 ? transitionDurationDefault : _props$transitionDura,
|
|
157
|
-
_props$variant = props.variant,
|
|
158
|
-
variant = _props$variant === void 0 ? 'temporary' : _props$variant,
|
|
159
|
-
other = _objectWithoutProperties(props, ["anchor", "disableBackdropTransition", "disableDiscovery", "disableSwipeToOpen", "hideBackdrop", "hysteresis", "allowSwipeInChildren", "minFlingVelocity", "ModalProps", "onClose", "onOpen", "open", "PaperProps", "SwipeAreaProps", "swipeAreaWidth", "transitionDuration", "variant"]);
|
|
160
|
-
var _React$useState = React.useState(false),
|
|
161
|
-
maybeSwiping = _React$useState[0],
|
|
162
|
-
setMaybeSwiping = _React$useState[1];
|
|
163
|
-
var swipeInstance = React.useRef({
|
|
164
|
-
isSwiping: null
|
|
165
|
-
});
|
|
166
|
-
var swipeAreaRef = React.useRef();
|
|
167
|
-
var backdropRef = React.useRef();
|
|
168
|
-
var paperRef = React.useRef();
|
|
169
|
-
var handleRef = useForkRef(PaperProps.ref, paperRef);
|
|
170
|
-
var touchDetected = React.useRef(false);
|
|
171
|
-
|
|
172
|
-
// Ref for transition duration based on / to match swipe speed
|
|
173
|
-
var calculatedDurationRef = React.useRef();
|
|
174
|
-
|
|
175
|
-
// Use a ref so the open value used is always up to date inside useCallback.
|
|
176
|
-
useEnhancedEffect(function () {
|
|
177
|
-
calculatedDurationRef.current = null;
|
|
178
|
-
}, [open]);
|
|
179
|
-
var setPosition = React.useCallback(function (translate) {
|
|
180
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
181
|
-
var _options$mode = options.mode,
|
|
182
|
-
mode = _options$mode === void 0 ? null : _options$mode,
|
|
183
|
-
_options$changeTransi = options.changeTransition,
|
|
184
|
-
changeTransition = _options$changeTransi === void 0 ? true : _options$changeTransi;
|
|
185
|
-
var anchorRtl = getAnchor(theme, anchor);
|
|
186
|
-
var rtlTranslateMultiplier = ['right', 'bottom'].indexOf(anchorRtl) !== -1 ? 1 : -1;
|
|
187
|
-
var horizontalSwipe = isHorizontal(anchor);
|
|
188
|
-
var transform = horizontalSwipe ? "translate(".concat(rtlTranslateMultiplier * translate, "px, 0)") : "translate(0, ".concat(rtlTranslateMultiplier * translate, "px)");
|
|
189
|
-
var drawerStyle = paperRef.current.style;
|
|
190
|
-
drawerStyle.webkitTransform = transform;
|
|
191
|
-
drawerStyle.transform = transform;
|
|
192
|
-
var transition = '';
|
|
193
|
-
if (mode) {
|
|
194
|
-
transition = theme.transitions.create('all', getTransitionProps({
|
|
195
|
-
easing: undefined,
|
|
196
|
-
style: undefined,
|
|
197
|
-
timeout: transitionDuration
|
|
198
|
-
}, {
|
|
199
|
-
mode: mode
|
|
200
|
-
}));
|
|
201
|
-
}
|
|
202
|
-
if (changeTransition) {
|
|
203
|
-
drawerStyle.webkitTransition = transition;
|
|
204
|
-
drawerStyle.transition = transition;
|
|
205
|
-
}
|
|
206
|
-
if (!disableBackdropTransition && !hideBackdrop) {
|
|
207
|
-
var backdropStyle = backdropRef.current.style;
|
|
208
|
-
backdropStyle.opacity = 1 - translate / getMaxTranslate(horizontalSwipe, paperRef.current);
|
|
209
|
-
if (changeTransition) {
|
|
210
|
-
backdropStyle.webkitTransition = transition;
|
|
211
|
-
backdropStyle.transition = transition;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}, [anchor, disableBackdropTransition, hideBackdrop, theme, transitionDuration]);
|
|
215
|
-
var handleBodyTouchEnd = useEventCallback(function (nativeEvent) {
|
|
216
|
-
if (!touchDetected.current) {
|
|
217
|
-
return;
|
|
218
|
-
}
|
|
219
|
-
claimedSwipeInstance = null;
|
|
220
|
-
touchDetected.current = false;
|
|
221
|
-
ReactDOM.flushSync(function () {
|
|
222
|
-
setMaybeSwiping(false);
|
|
223
|
-
});
|
|
224
|
-
|
|
225
|
-
// The swipe wasn't started.
|
|
226
|
-
if (!swipeInstance.current.isSwiping) {
|
|
227
|
-
swipeInstance.current.isSwiping = null;
|
|
228
|
-
return;
|
|
229
|
-
}
|
|
230
|
-
swipeInstance.current.isSwiping = null;
|
|
231
|
-
var anchorRtl = getAnchor(theme, anchor);
|
|
232
|
-
var horizontal = isHorizontal(anchor);
|
|
233
|
-
var current;
|
|
234
|
-
if (horizontal) {
|
|
235
|
-
current = calculateCurrentX(anchorRtl, nativeEvent.changedTouches, ownerDocument(nativeEvent.currentTarget));
|
|
236
|
-
} else {
|
|
237
|
-
current = calculateCurrentY(anchorRtl, nativeEvent.changedTouches, ownerWindow(nativeEvent.currentTarget));
|
|
238
|
-
}
|
|
239
|
-
var startLocation = horizontal ? swipeInstance.current.startX : swipeInstance.current.startY;
|
|
240
|
-
var maxTranslate = getMaxTranslate(horizontal, paperRef.current);
|
|
241
|
-
var currentTranslate = getTranslate(current, startLocation, open, maxTranslate);
|
|
242
|
-
var translateRatio = currentTranslate / maxTranslate;
|
|
243
|
-
if (Math.abs(swipeInstance.current.velocity) > minFlingVelocity) {
|
|
244
|
-
// Calculate transition duration to match swipe speed
|
|
245
|
-
calculatedDurationRef.current = Math.abs((maxTranslate - currentTranslate) / swipeInstance.current.velocity) * 1000;
|
|
246
|
-
}
|
|
247
|
-
if (open) {
|
|
248
|
-
if (swipeInstance.current.velocity > minFlingVelocity || translateRatio > hysteresis) {
|
|
249
|
-
onClose();
|
|
250
|
-
} else {
|
|
251
|
-
// Reset the position, the swipe was aborted.
|
|
252
|
-
setPosition(0, {
|
|
253
|
-
mode: 'exit'
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
return;
|
|
257
|
-
}
|
|
258
|
-
if (swipeInstance.current.velocity < -minFlingVelocity || 1 - translateRatio > hysteresis) {
|
|
259
|
-
onOpen();
|
|
260
|
-
} else {
|
|
261
|
-
// Reset the position, the swipe was aborted.
|
|
262
|
-
setPosition(getMaxTranslate(horizontal, paperRef.current), {
|
|
263
|
-
mode: 'enter'
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
});
|
|
267
|
-
var startMaybeSwiping = function startMaybeSwiping() {
|
|
268
|
-
var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
269
|
-
if (!maybeSwiping) {
|
|
270
|
-
// on Safari Mobile, if you want to be able to have the 'click' event fired on child elements, nothing in the DOM can be changed.
|
|
271
|
-
// this is because Safari Mobile will not fire any mouse events (still fires touch though) if the DOM changes during mousemove.
|
|
272
|
-
// so do this change on first touchmove instead of touchstart
|
|
273
|
-
if (force || !(disableDiscovery && allowSwipeInChildren)) {
|
|
274
|
-
ReactDOM.flushSync(function () {
|
|
275
|
-
setMaybeSwiping(true);
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
var horizontalSwipe = isHorizontal(anchor);
|
|
279
|
-
if (!open && paperRef.current) {
|
|
280
|
-
// The ref may be null when a parent component updates while swiping.
|
|
281
|
-
setPosition(getMaxTranslate(horizontalSwipe, paperRef.current) + (disableDiscovery ? 15 : -DRAG_STARTED_SIGNAL), {
|
|
282
|
-
changeTransition: false
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
swipeInstance.current.velocity = 0;
|
|
286
|
-
swipeInstance.current.lastTime = null;
|
|
287
|
-
swipeInstance.current.lastTranslate = null;
|
|
288
|
-
swipeInstance.current.paperHit = false;
|
|
289
|
-
touchDetected.current = true;
|
|
290
|
-
}
|
|
291
|
-
};
|
|
292
|
-
var handleBodyTouchMove = useEventCallback(function (nativeEvent) {
|
|
293
|
-
// the ref may be null when a parent component updates while swiping
|
|
294
|
-
if (!paperRef.current || !touchDetected.current) {
|
|
295
|
-
return;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
// We are not supposed to handle this touch move because the swipe was started in a scrollable container in the drawer
|
|
299
|
-
if (claimedSwipeInstance !== null && claimedSwipeInstance !== swipeInstance.current) {
|
|
300
|
-
return;
|
|
301
|
-
}
|
|
302
|
-
startMaybeSwiping(true);
|
|
303
|
-
var anchorRtl = getAnchor(theme, anchor);
|
|
304
|
-
var horizontalSwipe = isHorizontal(anchor);
|
|
305
|
-
var currentX = calculateCurrentX(anchorRtl, nativeEvent.touches, ownerDocument(nativeEvent.currentTarget));
|
|
306
|
-
var currentY = calculateCurrentY(anchorRtl, nativeEvent.touches, ownerWindow(nativeEvent.currentTarget));
|
|
307
|
-
if (open && paperRef.current.contains(nativeEvent.target) && claimedSwipeInstance === null) {
|
|
308
|
-
var domTreeShapes = getDomTreeShapes(nativeEvent.target, paperRef.current);
|
|
309
|
-
var hasNativeHandler = computeHasNativeHandler({
|
|
310
|
-
domTreeShapes: domTreeShapes,
|
|
311
|
-
start: horizontalSwipe ? swipeInstance.current.startX : swipeInstance.current.startY,
|
|
312
|
-
current: horizontalSwipe ? currentX : currentY,
|
|
313
|
-
anchor: anchor
|
|
314
|
-
});
|
|
315
|
-
if (hasNativeHandler) {
|
|
316
|
-
claimedSwipeInstance = true;
|
|
317
|
-
return;
|
|
318
|
-
}
|
|
319
|
-
claimedSwipeInstance = swipeInstance.current;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
// We don't know yet.
|
|
323
|
-
if (swipeInstance.current.isSwiping == null) {
|
|
324
|
-
var dx = Math.abs(currentX - swipeInstance.current.startX);
|
|
325
|
-
var dy = Math.abs(currentY - swipeInstance.current.startY);
|
|
326
|
-
var definitelySwiping = horizontalSwipe ? dx > dy && dx > UNCERTAINTY_THRESHOLD : dy > dx && dy > UNCERTAINTY_THRESHOLD;
|
|
327
|
-
if (definitelySwiping && nativeEvent.cancelable) {
|
|
328
|
-
nativeEvent.preventDefault();
|
|
329
|
-
}
|
|
330
|
-
if (definitelySwiping === true || (horizontalSwipe ? dy > UNCERTAINTY_THRESHOLD : dx > UNCERTAINTY_THRESHOLD)) {
|
|
331
|
-
swipeInstance.current.isSwiping = definitelySwiping;
|
|
332
|
-
if (!definitelySwiping) {
|
|
333
|
-
handleBodyTouchEnd(nativeEvent);
|
|
334
|
-
return;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
// Shift the starting point.
|
|
338
|
-
swipeInstance.current.startX = currentX;
|
|
339
|
-
swipeInstance.current.startY = currentY;
|
|
340
|
-
|
|
341
|
-
// Compensate for the part of the drawer displayed on touch start.
|
|
342
|
-
if (!disableDiscovery && !open) {
|
|
343
|
-
if (horizontalSwipe) {
|
|
344
|
-
swipeInstance.current.startX -= DRAG_STARTED_SIGNAL;
|
|
345
|
-
} else {
|
|
346
|
-
swipeInstance.current.startY -= DRAG_STARTED_SIGNAL;
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
if (!swipeInstance.current.isSwiping) {
|
|
352
|
-
return;
|
|
353
|
-
}
|
|
354
|
-
var maxTranslate = getMaxTranslate(horizontalSwipe, paperRef.current);
|
|
355
|
-
var startLocation = horizontalSwipe ? swipeInstance.current.startX : swipeInstance.current.startY;
|
|
356
|
-
if (open && !swipeInstance.current.paperHit) {
|
|
357
|
-
startLocation = Math.min(startLocation, maxTranslate);
|
|
358
|
-
}
|
|
359
|
-
var translate = getTranslate(horizontalSwipe ? currentX : currentY, startLocation, open, maxTranslate);
|
|
360
|
-
if (open) {
|
|
361
|
-
if (!swipeInstance.current.paperHit) {
|
|
362
|
-
var paperHit = horizontalSwipe ? currentX < maxTranslate : currentY < maxTranslate;
|
|
363
|
-
if (paperHit) {
|
|
364
|
-
swipeInstance.current.paperHit = true;
|
|
365
|
-
swipeInstance.current.startX = currentX;
|
|
366
|
-
swipeInstance.current.startY = currentY;
|
|
367
|
-
} else {
|
|
368
|
-
return;
|
|
369
|
-
}
|
|
370
|
-
} else if (translate === 0) {
|
|
371
|
-
swipeInstance.current.startX = currentX;
|
|
372
|
-
swipeInstance.current.startY = currentY;
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
if (swipeInstance.current.lastTranslate === null) {
|
|
376
|
-
swipeInstance.current.lastTranslate = translate;
|
|
377
|
-
swipeInstance.current.lastTime = performance.now() + 1;
|
|
378
|
-
}
|
|
379
|
-
var velocity = (translate - swipeInstance.current.lastTranslate) / (performance.now() - swipeInstance.current.lastTime) * 1e3;
|
|
380
|
-
|
|
381
|
-
// Low Pass filter.
|
|
382
|
-
swipeInstance.current.velocity = swipeInstance.current.velocity * 0.4 + velocity * 0.6;
|
|
383
|
-
swipeInstance.current.lastTranslate = translate;
|
|
384
|
-
swipeInstance.current.lastTime = performance.now();
|
|
385
|
-
|
|
386
|
-
// We are swiping, let's prevent the scroll event on iOS.
|
|
387
|
-
if (nativeEvent.cancelable) {
|
|
388
|
-
nativeEvent.preventDefault();
|
|
389
|
-
}
|
|
390
|
-
setPosition(translate);
|
|
391
|
-
});
|
|
392
|
-
var handleBodyTouchStart = useEventCallback(function (nativeEvent) {
|
|
393
|
-
// We are not supposed to handle this touch move.
|
|
394
|
-
// Example of use case: ignore the event if there is a Slider.
|
|
395
|
-
if (nativeEvent.defaultPrevented) {
|
|
396
|
-
return;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
// We can only have one node at the time claiming ownership for handling the swipe.
|
|
400
|
-
if (nativeEvent.defaultMuiPrevented) {
|
|
401
|
-
return;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
// At least one element clogs the drawer interaction zone.
|
|
405
|
-
if (open && (hideBackdrop || !backdropRef.current.contains(nativeEvent.target)) && !paperRef.current.contains(nativeEvent.target)) {
|
|
406
|
-
return;
|
|
407
|
-
}
|
|
408
|
-
var anchorRtl = getAnchor(theme, anchor);
|
|
409
|
-
var horizontalSwipe = isHorizontal(anchor);
|
|
410
|
-
var currentX = calculateCurrentX(anchorRtl, nativeEvent.touches, ownerDocument(nativeEvent.currentTarget));
|
|
411
|
-
var currentY = calculateCurrentY(anchorRtl, nativeEvent.touches, ownerWindow(nativeEvent.currentTarget));
|
|
412
|
-
if (!open) {
|
|
413
|
-
var _paperRef$current;
|
|
414
|
-
// logic for if swipe should be ignored:
|
|
415
|
-
// if disableSwipeToOpen
|
|
416
|
-
// if target != swipeArea, and target is not a child of paper ref
|
|
417
|
-
// if is a child of paper ref, and `allowSwipeInChildren` does not allow it
|
|
418
|
-
if (disableSwipeToOpen || !(nativeEvent.target === swipeAreaRef.current || (_paperRef$current = paperRef.current) != null && _paperRef$current.contains(nativeEvent.target) && (typeof allowSwipeInChildren === 'function' ? allowSwipeInChildren(nativeEvent, swipeAreaRef.current, paperRef.current) : allowSwipeInChildren))) {
|
|
419
|
-
return;
|
|
420
|
-
}
|
|
421
|
-
if (horizontalSwipe) {
|
|
422
|
-
if (currentX > swipeAreaWidth) {
|
|
423
|
-
return;
|
|
424
|
-
}
|
|
425
|
-
} else if (currentY > swipeAreaWidth) {
|
|
426
|
-
return;
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
nativeEvent.defaultMuiPrevented = true;
|
|
430
|
-
claimedSwipeInstance = null;
|
|
431
|
-
swipeInstance.current.startX = currentX;
|
|
432
|
-
swipeInstance.current.startY = currentY;
|
|
433
|
-
startMaybeSwiping();
|
|
434
|
-
});
|
|
435
|
-
React.useEffect(function () {
|
|
436
|
-
if (variant === 'temporary') {
|
|
437
|
-
var doc = ownerDocument(paperRef.current);
|
|
438
|
-
doc.addEventListener('touchstart', handleBodyTouchStart);
|
|
439
|
-
// A blocking listener prevents Firefox's navbar to auto-hide on scroll.
|
|
440
|
-
// It only needs to prevent scrolling on the drawer's content when open.
|
|
441
|
-
// When closed, the overlay prevents scrolling.
|
|
442
|
-
doc.addEventListener('touchmove', handleBodyTouchMove, {
|
|
443
|
-
passive: !open
|
|
444
|
-
});
|
|
445
|
-
doc.addEventListener('touchend', handleBodyTouchEnd);
|
|
446
|
-
return function () {
|
|
447
|
-
doc.removeEventListener('touchstart', handleBodyTouchStart);
|
|
448
|
-
doc.removeEventListener('touchmove', handleBodyTouchMove, {
|
|
449
|
-
passive: !open
|
|
450
|
-
});
|
|
451
|
-
doc.removeEventListener('touchend', handleBodyTouchEnd);
|
|
452
|
-
};
|
|
453
|
-
}
|
|
454
|
-
return undefined;
|
|
455
|
-
}, [variant, open, handleBodyTouchStart, handleBodyTouchMove, handleBodyTouchEnd]);
|
|
456
|
-
React.useEffect(function () {
|
|
457
|
-
return function () {
|
|
458
|
-
// We need to release the lock.
|
|
459
|
-
if (claimedSwipeInstance === swipeInstance.current) {
|
|
460
|
-
claimedSwipeInstance = null;
|
|
461
|
-
}
|
|
462
|
-
};
|
|
463
|
-
}, []);
|
|
464
|
-
React.useEffect(function () {
|
|
465
|
-
if (!open) {
|
|
466
|
-
setMaybeSwiping(false);
|
|
467
|
-
}
|
|
468
|
-
}, [open]);
|
|
469
|
-
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
470
|
-
children: [/*#__PURE__*/_jsx(Drawer, _extends({
|
|
471
|
-
open: variant === 'temporary' && maybeSwiping ? true : open,
|
|
472
|
-
variant: variant,
|
|
473
|
-
ModalProps: _extends({
|
|
474
|
-
BackdropProps: _extends({}, BackdropProps, {
|
|
475
|
-
ref: backdropRef
|
|
476
|
-
})
|
|
477
|
-
}, variant === 'temporary' && {
|
|
478
|
-
keepMounted: true
|
|
479
|
-
}, ModalPropsProp),
|
|
480
|
-
hideBackdrop: hideBackdrop,
|
|
481
|
-
PaperProps: _extends({}, PaperProps, {
|
|
482
|
-
style: _extends({
|
|
483
|
-
pointerEvents: variant === 'temporary' && !open && !allowSwipeInChildren ? 'none' : ''
|
|
484
|
-
}, PaperProps.style),
|
|
485
|
-
ref: handleRef
|
|
486
|
-
}),
|
|
487
|
-
anchor: anchor,
|
|
488
|
-
transitionDuration: calculatedDurationRef.current || transitionDuration,
|
|
489
|
-
onClose: onClose,
|
|
490
|
-
ref: ref
|
|
491
|
-
}, other)), !disableSwipeToOpen && variant === 'temporary' && /*#__PURE__*/_jsx(NoSsr, {
|
|
492
|
-
children: /*#__PURE__*/_jsx(SwipeArea, _extends({
|
|
493
|
-
anchor: anchor,
|
|
494
|
-
ref: swipeAreaRef,
|
|
495
|
-
width: swipeAreaWidth
|
|
496
|
-
}, SwipeAreaProps))
|
|
497
|
-
})]
|
|
498
|
-
});
|
|
499
|
-
});
|
|
500
|
-
process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes /* remove-proptypes */ = {
|
|
501
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
502
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
503
|
-
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
504
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
505
|
-
/**
|
|
506
|
-
* If set to true, the swipe event will open the drawer even if the user begins the swipe on one of the drawer's children.
|
|
507
|
-
* This can be useful in scenarios where the drawer is partially visible.
|
|
508
|
-
* You can customize it further with a callback that determines which children the user can drag over to open the drawer
|
|
509
|
-
* (for example, to ignore other elements that handle touch move events, like sliders).
|
|
510
|
-
*
|
|
511
|
-
* @param {TouchEvent} event The 'touchstart' event
|
|
512
|
-
* @param {HTMLDivElement} swipeArea The swipe area element
|
|
513
|
-
* @param {HTMLDivElement} paper The drawer's paper element
|
|
514
|
-
*
|
|
515
|
-
* @default false
|
|
516
|
-
*/
|
|
517
|
-
allowSwipeInChildren: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),
|
|
518
|
-
/**
|
|
519
|
-
* @ignore
|
|
520
|
-
*/
|
|
521
|
-
anchor: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
522
|
-
/**
|
|
523
|
-
* The content of the component.
|
|
524
|
-
*/
|
|
525
|
-
children: PropTypes.node,
|
|
526
|
-
/**
|
|
527
|
-
* Disable the backdrop transition.
|
|
528
|
-
* This can improve the FPS on low-end devices.
|
|
529
|
-
* @default false
|
|
530
|
-
*/
|
|
531
|
-
disableBackdropTransition: PropTypes.bool,
|
|
532
|
-
/**
|
|
533
|
-
* If `true`, touching the screen near the edge of the drawer will not slide in the drawer a bit
|
|
534
|
-
* to promote accidental discovery of the swipe gesture.
|
|
535
|
-
* @default false
|
|
536
|
-
*/
|
|
537
|
-
disableDiscovery: PropTypes.bool,
|
|
538
|
-
/**
|
|
539
|
-
* If `true`, swipe to open is disabled. This is useful in browsers where swiping triggers
|
|
540
|
-
* navigation actions. Swipe to open is disabled on iOS browsers by default.
|
|
541
|
-
* @default typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent)
|
|
542
|
-
*/
|
|
543
|
-
disableSwipeToOpen: PropTypes.bool,
|
|
544
|
-
/**
|
|
545
|
-
* @ignore
|
|
546
|
-
*/
|
|
547
|
-
hideBackdrop: PropTypes.bool,
|
|
548
|
-
/**
|
|
549
|
-
* Affects how far the drawer must be opened/closed to change its state.
|
|
550
|
-
* Specified as percent (0-1) of the width of the drawer
|
|
551
|
-
* @default 0.52
|
|
552
|
-
*/
|
|
553
|
-
hysteresis: PropTypes.number,
|
|
554
|
-
/**
|
|
555
|
-
* Defines, from which (average) velocity on, the swipe is
|
|
556
|
-
* defined as complete although hysteresis isn't reached.
|
|
557
|
-
* Good threshold is between 250 - 1000 px/s
|
|
558
|
-
* @default 450
|
|
559
|
-
*/
|
|
560
|
-
minFlingVelocity: PropTypes.number,
|
|
561
|
-
/**
|
|
562
|
-
* @ignore
|
|
563
|
-
*/
|
|
564
|
-
ModalProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({
|
|
565
|
-
BackdropProps: PropTypes.shape({
|
|
566
|
-
component: elementTypeAcceptingRef
|
|
567
|
-
})
|
|
568
|
-
}),
|
|
569
|
-
/**
|
|
570
|
-
* Callback fired when the component requests to be closed.
|
|
571
|
-
*
|
|
572
|
-
* @param {React.SyntheticEvent<{}>} event The event source of the callback.
|
|
573
|
-
*/
|
|
574
|
-
onClose: PropTypes.func.isRequired,
|
|
575
|
-
/**
|
|
576
|
-
* Callback fired when the component requests to be opened.
|
|
577
|
-
*
|
|
578
|
-
* @param {React.SyntheticEvent<{}>} event The event source of the callback.
|
|
579
|
-
*/
|
|
580
|
-
onOpen: PropTypes.func.isRequired,
|
|
581
|
-
/**
|
|
582
|
-
* If `true`, the component is shown.
|
|
583
|
-
* @default false
|
|
584
|
-
*/
|
|
585
|
-
open: PropTypes.bool,
|
|
586
|
-
/**
|
|
587
|
-
* @ignore
|
|
588
|
-
*/
|
|
589
|
-
PaperProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({
|
|
590
|
-
component: elementTypeAcceptingRef,
|
|
591
|
-
style: PropTypes.object
|
|
592
|
-
}),
|
|
593
|
-
/**
|
|
594
|
-
* The element is used to intercept the touch events on the edge.
|
|
595
|
-
*/
|
|
596
|
-
SwipeAreaProps: PropTypes.object,
|
|
597
|
-
/**
|
|
598
|
-
* The width of the left most (or right most) area in `px` that
|
|
599
|
-
* the drawer can be swiped open from.
|
|
600
|
-
* @default 20
|
|
601
|
-
*/
|
|
602
|
-
swipeAreaWidth: PropTypes.number,
|
|
603
|
-
/**
|
|
604
|
-
* The duration for the transition, in milliseconds.
|
|
605
|
-
* You may specify a single timeout for all transitions, or individually with an object.
|
|
606
|
-
* @default {
|
|
607
|
-
* enter: theme.transitions.duration.enteringScreen,
|
|
608
|
-
* exit: theme.transitions.duration.leavingScreen,
|
|
609
|
-
* }
|
|
610
|
-
*/
|
|
611
|
-
transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
612
|
-
appear: PropTypes.number,
|
|
613
|
-
enter: PropTypes.number,
|
|
614
|
-
exit: PropTypes.number
|
|
615
|
-
})]),
|
|
616
|
-
/**
|
|
617
|
-
* @ignore
|
|
618
|
-
*/
|
|
619
|
-
variant: PropTypes.oneOf(['permanent', 'persistent', 'temporary'])
|
|
620
|
-
} : void 0;
|
|
621
|
-
export default SwipeableDrawer;
|