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