@mui/material 6.0.0-alpha.1 → 6.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.d.ts +2 -2
- package/Accordion/Accordion.js +35 -35
- package/AccordionActions/AccordionActions.d.ts +1 -1
- package/AccordionActions/AccordionActions.js +11 -12
- package/AccordionDetails/AccordionDetails.d.ts +1 -1
- package/AccordionDetails/AccordionDetails.js +7 -9
- package/AccordionSummary/AccordionSummary.js +14 -16
- package/AccordionSummary/accordionSummaryClasses.d.ts +1 -1
- package/Alert/Alert.d.ts +3 -3
- package/Alert/Alert.js +58 -53
- package/Alert/alertClasses.d.ts +12 -12
- package/AlertTitle/AlertTitle.d.ts +3 -3
- package/AlertTitle/AlertTitle.js +7 -9
- package/AppBar/AppBar.js +34 -33
- package/Autocomplete/Autocomplete.d.ts +79 -13
- package/Autocomplete/Autocomplete.js +251 -162
- package/Avatar/Avatar.d.ts +1 -1
- package/Avatar/Avatar.js +46 -38
- package/AvatarGroup/AvatarGroup.d.ts +51 -18
- package/AvatarGroup/AvatarGroup.js +60 -41
- package/Backdrop/Backdrop.d.ts +3 -5
- package/Backdrop/Backdrop.js +36 -35
- package/Badge/Badge.d.ts +2 -2
- package/Badge/Badge.js +33 -32
- package/BottomNavigation/BottomNavigation.js +15 -17
- package/BottomNavigationAction/BottomNavigationAction.js +15 -18
- package/Breadcrumbs/BreadcrumbCollapsed.js +36 -35
- package/Breadcrumbs/Breadcrumbs.js +19 -21
- package/Button/Button.d.ts +1 -1
- package/Button/Button.js +33 -30
- package/Button/buttonClasses.d.ts +33 -33
- package/ButtonBase/ButtonBase.d.ts +1 -1
- package/ButtonBase/ButtonBase.js +44 -50
- package/ButtonBase/TouchRipple.js +9 -12
- package/ButtonGroup/ButtonGroup.js +23 -25
- package/ButtonGroup/buttonGroupClasses.d.ts +17 -17
- package/CHANGELOG.md +462 -4
- package/Card/Card.js +11 -12
- package/CardActionArea/CardActionArea.js +9 -12
- package/CardActions/CardActions.d.ts +1 -1
- package/CardActions/CardActions.js +11 -12
- package/CardContent/CardContent.js +11 -12
- package/CardHeader/CardHeader.d.ts +1 -1
- package/CardHeader/CardHeader.js +30 -31
- package/CardMedia/CardMedia.js +19 -21
- package/Checkbox/Checkbox.d.ts +1 -1
- package/Checkbox/Checkbox.js +79 -43
- package/Chip/Chip.d.ts +3 -3
- package/Chip/Chip.js +38 -37
- package/Chip/chipClasses.d.ts +28 -26
- package/Chip/chipClasses.js +1 -1
- package/CircularProgress/CircularProgress.d.ts +1 -1
- package/CircularProgress/CircularProgress.js +88 -51
- package/CircularProgress/circularProgressClasses.d.ts +6 -2
- package/Collapse/Collapse.d.ts +1 -1
- package/Collapse/Collapse.js +109 -76
- package/CssBaseline/CssBaseline.d.ts +1 -1
- package/CssBaseline/CssBaseline.js +17 -14
- package/Dialog/Dialog.d.ts +1 -1
- package/Dialog/Dialog.js +152 -103
- package/DialogActions/DialogActions.d.ts +1 -1
- package/DialogActions/DialogActions.js +26 -23
- package/DialogContent/DialogContent.d.ts +1 -1
- package/DialogContent/DialogContent.js +35 -26
- package/DialogContentText/DialogContentText.js +16 -13
- package/DialogTitle/DialogTitle.js +10 -12
- package/Divider/Divider.d.ts +1 -1
- package/Divider/Divider.js +20 -22
- package/Drawer/Drawer.d.ts +1 -1
- package/Drawer/Drawer.js +122 -80
- package/Fab/Fab.js +108 -65
- package/Fade/Fade.d.ts +1 -1
- package/Fade/Fade.js +31 -30
- package/FilledInput/FilledInput.d.ts +2 -1
- package/FilledInput/FilledInput.js +223 -134
- package/FilledInput/filledInputClasses.d.ts +1 -13
- package/FilledInput/filledInputClasses.js +4 -2
- package/FormControl/FormControl.js +27 -25
- package/FormControlLabel/FormControlLabel.d.ts +22 -15
- package/FormControlLabel/FormControlLabel.js +50 -26
- package/FormGroup/FormGroup.d.ts +1 -1
- package/FormGroup/FormGroup.js +11 -12
- package/FormHelperText/FormHelperText.js +46 -28
- package/FormLabel/FormLabel.js +49 -31
- package/GlobalStyles/GlobalStyles.d.ts +1 -1
- package/GlobalStyles/GlobalStyles.js +3 -3
- package/Grid/Grid.d.ts +1 -0
- package/Grid/Grid.js +50 -41
- package/Grow/Grow.d.ts +1 -1
- package/Grow/Grow.js +34 -31
- package/Hidden/Hidden.d.ts +2 -0
- package/Hidden/Hidden.js +23 -22
- package/Hidden/HiddenCss.js +29 -29
- package/Hidden/withWidth.js +19 -19
- package/Icon/Icon.js +77 -38
- package/IconButton/IconButton.js +112 -59
- package/ImageList/ImageList.js +41 -47
- package/ImageListItem/ImageListItem.js +57 -43
- package/ImageListItemBar/ImageListItemBar.d.ts +1 -1
- package/ImageListItemBar/ImageListItemBar.js +81 -50
- package/Input/Input.d.ts +2 -1
- package/Input/Input.js +103 -83
- package/Input/inputClasses.js +4 -2
- package/InputAdornment/InputAdornment.js +52 -40
- package/InputBase/InputBase.d.ts +3 -5
- package/InputBase/InputBase.js +151 -119
- package/InputLabel/InputLabel.js +140 -74
- package/LinearProgress/LinearProgress.d.ts +1 -1
- package/LinearProgress/LinearProgress.js +195 -92
- package/Link/Link.js +115 -69
- package/Link/getTextDecoration.d.ts +2 -8
- package/Link/getTextDecoration.js +16 -8
- package/List/List.js +36 -29
- package/ListItem/ListItem.d.ts +4 -12
- package/ListItem/ListItem.js +159 -114
- package/ListItemAvatar/ListItemAvatar.d.ts +1 -1
- package/ListItemAvatar/ListItemAvatar.js +23 -20
- package/ListItemButton/ListItemButton.js +61 -39
- package/ListItemIcon/ListItemIcon.d.ts +1 -1
- package/ListItemIcon/ListItemIcon.js +23 -19
- package/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +5 -1
- package/ListItemSecondaryAction/ListItemSecondaryAction.js +25 -20
- package/ListItemText/ListItemText.d.ts +3 -1
- package/ListItemText/ListItemText.js +46 -39
- package/ListSubheader/ListSubheader.js +63 -37
- package/Menu/Menu.d.ts +1 -1
- package/Menu/Menu.js +38 -42
- package/MenuItem/MenuItem.js +71 -49
- package/MenuList/MenuList.js +17 -20
- package/MobileStepper/MobileStepper.d.ts +1 -1
- package/MobileStepper/MobileStepper.js +21 -22
- package/Modal/Modal.d.ts +3 -5
- package/Modal/Modal.js +49 -42
- package/NativeSelect/NativeSelect.d.ts +1 -1
- package/NativeSelect/NativeSelect.js +26 -22
- package/NativeSelect/NativeSelectInput.js +91 -67
- package/OutlinedInput/NotchedOutline.js +73 -56
- package/OutlinedInput/OutlinedInput.d.ts +3 -1
- package/OutlinedInput/OutlinedInput.js +142 -81
- package/OutlinedInput/outlinedInputClasses.js +4 -2
- package/OverridableComponent.d.ts +2 -2
- package/Pagination/Pagination.d.ts +1 -1
- package/Pagination/Pagination.js +38 -34
- package/PaginationItem/PaginationItem.d.ts +26 -14
- package/PaginationItem/PaginationItem.js +225 -119
- package/PaginationItem/paginationItemClasses.d.ts +4 -4
- package/Paper/Paper.js +60 -34
- package/Popover/Popover.d.ts +17 -22
- package/Popover/Popover.js +86 -85
- package/Popper/Popper.d.ts +4 -0
- package/Popper/Popper.js +29 -27
- package/Radio/Radio.d.ts +1 -1
- package/Radio/Radio.js +73 -39
- package/Radio/RadioButtonIcon.js +21 -15
- package/RadioGroup/RadioGroup.d.ts +1 -1
- package/RadioGroup/RadioGroup.js +15 -18
- package/Rating/Rating.d.ts +1 -1
- package/Rating/Rating.js +127 -85
- package/ScopedCssBaseline/ScopedCssBaseline.js +18 -15
- package/Select/Select.d.ts +9 -6
- package/Select/Select.js +65 -58
- package/Select/SelectInput.js +72 -65
- package/Skeleton/Skeleton.js +128 -81
- package/Slide/Slide.d.ts +1 -1
- package/Slide/Slide.js +37 -33
- package/Slider/Slider.d.ts +3 -3
- package/Slider/Slider.js +157 -108
- package/Slider/SliderValueLabel.types.d.ts +1 -1
- package/Snackbar/Snackbar.d.ts +1 -1
- package/Snackbar/Snackbar.js +117 -84
- package/SnackbarContent/SnackbarContent.d.ts +1 -1
- package/SnackbarContent/SnackbarContent.js +15 -17
- package/SpeedDial/SpeedDial.d.ts +29 -2
- package/SpeedDial/SpeedDial.js +151 -94
- package/SpeedDialAction/SpeedDialAction.d.ts +1 -1
- package/SpeedDialAction/SpeedDialAction.js +84 -57
- package/SpeedDialIcon/SpeedDialIcon.d.ts +3 -1
- package/SpeedDialIcon/SpeedDialIcon.js +46 -27
- package/Step/Step.js +18 -20
- package/StepButton/StepButton.js +16 -17
- package/StepConnector/StepConnector.d.ts +2 -2
- package/StepConnector/StepConnector.js +10 -12
- package/StepConnector/stepConnectorClasses.d.ts +6 -2
- package/StepContent/StepContent.d.ts +1 -1
- package/StepContent/StepContent.js +18 -20
- package/StepIcon/StepIcon.d.ts +1 -1
- package/StepIcon/StepIcon.js +22 -22
- package/StepLabel/StepLabel.d.ts +9 -2
- package/StepLabel/StepLabel.js +46 -34
- package/Stepper/Stepper.js +21 -22
- package/SvgIcon/SvgIcon.js +93 -41
- package/SwipeableDrawer/SwipeArea.js +53 -33
- package/SwipeableDrawer/SwipeableDrawer.js +49 -43
- package/Switch/Switch.d.ts +1 -1
- package/Switch/Switch.js +23 -20
- package/Tab/Tab.d.ts +1 -1
- package/Tab/Tab.js +159 -88
- package/TabScrollButton/TabScrollButton.d.ts +1 -1
- package/TabScrollButton/TabScrollButton.js +48 -30
- package/Table/Table.js +29 -24
- package/TableBody/TableBody.js +13 -14
- package/TableCell/TableCell.d.ts +1 -1
- package/TableCell/TableCell.js +117 -62
- package/TableContainer/TableContainer.js +13 -14
- package/TableFooter/TableFooter.js +13 -14
- package/TableHead/TableHead.js +13 -14
- package/TablePagination/TablePagination.js +58 -54
- package/TablePagination/TablePaginationActions.js +51 -38
- package/TableRow/TableRow.js +15 -16
- package/TableSortLabel/TableSortLabel.js +35 -27
- package/Tabs/ScrollbarSize.js +7 -9
- package/Tabs/Tabs.js +160 -112
- package/TextField/TextField.d.ts +59 -4
- package/TextField/TextField.js +139 -69
- package/ToggleButton/ToggleButton.js +102 -75
- package/ToggleButtonGroup/ToggleButtonGroup.d.ts +1 -1
- package/ToggleButtonGroup/ToggleButtonGroup.js +81 -71
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +10 -2
- package/ToggleButtonGroup/toggleButtonGroupClasses.js +1 -1
- package/Toolbar/Toolbar.js +44 -33
- package/Tooltip/Tooltip.d.ts +3 -5
- package/Tooltip/Tooltip.js +262 -153
- package/Typography/Typography.js +104 -49
- package/Zoom/Zoom.d.ts +1 -1
- package/Zoom/Zoom.js +31 -30
- package/index.js +1 -1
- package/internal/SwitchBase.js +75 -47
- package/locale/index.d.ts +1 -0
- package/locale/index.js +75 -2
- package/modern/Accordion/Accordion.js +35 -35
- package/modern/AccordionActions/AccordionActions.js +11 -12
- package/modern/AccordionDetails/AccordionDetails.js +7 -9
- package/modern/AccordionSummary/AccordionSummary.js +14 -16
- package/modern/Alert/Alert.js +58 -53
- package/modern/AlertTitle/AlertTitle.js +7 -9
- package/modern/AppBar/AppBar.js +34 -33
- package/modern/Autocomplete/Autocomplete.js +251 -162
- package/modern/Avatar/Avatar.js +46 -38
- package/modern/AvatarGroup/AvatarGroup.js +60 -41
- package/modern/Backdrop/Backdrop.js +36 -35
- package/modern/Badge/Badge.js +33 -32
- package/modern/BottomNavigation/BottomNavigation.js +15 -17
- package/modern/BottomNavigationAction/BottomNavigationAction.js +15 -18
- package/modern/Breadcrumbs/BreadcrumbCollapsed.js +36 -35
- package/modern/Breadcrumbs/Breadcrumbs.js +19 -21
- package/modern/Button/Button.js +33 -30
- package/modern/ButtonBase/ButtonBase.js +44 -50
- package/modern/ButtonBase/TouchRipple.js +9 -12
- package/modern/ButtonGroup/ButtonGroup.js +23 -25
- package/modern/Card/Card.js +11 -12
- package/modern/CardActionArea/CardActionArea.js +9 -12
- package/modern/CardActions/CardActions.js +11 -12
- package/modern/CardContent/CardContent.js +11 -12
- package/modern/CardHeader/CardHeader.js +30 -31
- package/modern/CardMedia/CardMedia.js +19 -21
- package/modern/Checkbox/Checkbox.js +79 -43
- package/modern/Chip/Chip.js +38 -37
- package/modern/Chip/chipClasses.js +1 -1
- package/modern/CircularProgress/CircularProgress.js +88 -51
- package/modern/Collapse/Collapse.js +109 -76
- package/modern/CssBaseline/CssBaseline.js +17 -14
- package/modern/Dialog/Dialog.js +152 -103
- package/modern/DialogActions/DialogActions.js +26 -23
- package/modern/DialogContent/DialogContent.js +35 -26
- package/modern/DialogContentText/DialogContentText.js +16 -13
- package/modern/DialogTitle/DialogTitle.js +10 -12
- package/modern/Divider/Divider.js +20 -22
- package/modern/Drawer/Drawer.js +122 -80
- package/modern/Fab/Fab.js +108 -65
- package/modern/Fade/Fade.js +31 -30
- package/modern/FilledInput/FilledInput.js +223 -134
- package/modern/FilledInput/filledInputClasses.js +4 -2
- package/modern/FormControl/FormControl.js +27 -25
- package/modern/FormControlLabel/FormControlLabel.js +50 -26
- package/modern/FormGroup/FormGroup.js +11 -12
- package/modern/FormHelperText/FormHelperText.js +46 -28
- package/modern/FormLabel/FormLabel.js +49 -31
- package/modern/GlobalStyles/GlobalStyles.js +3 -3
- package/modern/Grid/Grid.js +50 -41
- package/modern/Grow/Grow.js +34 -31
- package/modern/Hidden/Hidden.js +23 -22
- package/modern/Hidden/HiddenCss.js +29 -29
- package/modern/Hidden/withWidth.js +19 -19
- package/modern/Icon/Icon.js +77 -38
- package/modern/IconButton/IconButton.js +112 -59
- package/modern/ImageList/ImageList.js +41 -47
- package/modern/ImageListItem/ImageListItem.js +57 -43
- package/modern/ImageListItemBar/ImageListItemBar.js +81 -50
- package/modern/Input/Input.js +103 -83
- package/modern/Input/inputClasses.js +4 -2
- package/modern/InputAdornment/InputAdornment.js +52 -40
- package/modern/InputBase/InputBase.js +151 -119
- package/modern/InputLabel/InputLabel.js +140 -74
- package/modern/LinearProgress/LinearProgress.js +195 -92
- package/modern/Link/Link.js +115 -69
- package/modern/Link/getTextDecoration.js +16 -8
- package/modern/List/List.js +36 -29
- package/modern/ListItem/ListItem.js +159 -114
- package/modern/ListItemAvatar/ListItemAvatar.js +23 -20
- package/modern/ListItemButton/ListItemButton.js +61 -39
- package/modern/ListItemIcon/ListItemIcon.js +23 -19
- package/modern/ListItemSecondaryAction/ListItemSecondaryAction.js +25 -20
- package/modern/ListItemText/ListItemText.js +46 -39
- package/modern/ListSubheader/ListSubheader.js +63 -37
- package/modern/Menu/Menu.js +38 -42
- package/modern/MenuItem/MenuItem.js +71 -49
- package/modern/MenuList/MenuList.js +17 -20
- package/modern/MobileStepper/MobileStepper.js +21 -22
- package/modern/Modal/Modal.js +49 -42
- package/modern/NativeSelect/NativeSelect.js +26 -22
- package/modern/NativeSelect/NativeSelectInput.js +91 -67
- package/modern/OutlinedInput/NotchedOutline.js +73 -56
- package/modern/OutlinedInput/OutlinedInput.js +142 -81
- package/modern/OutlinedInput/outlinedInputClasses.js +4 -2
- package/modern/Pagination/Pagination.js +38 -34
- package/modern/PaginationItem/PaginationItem.js +225 -119
- package/modern/Paper/Paper.js +60 -34
- package/modern/Popover/Popover.js +86 -85
- package/modern/Popper/Popper.js +29 -27
- package/modern/Radio/Radio.js +73 -39
- package/modern/Radio/RadioButtonIcon.js +21 -15
- package/modern/RadioGroup/RadioGroup.js +15 -18
- package/modern/Rating/Rating.js +127 -85
- package/modern/ScopedCssBaseline/ScopedCssBaseline.js +18 -15
- package/modern/Select/Select.js +65 -58
- package/modern/Select/SelectInput.js +72 -65
- package/modern/Skeleton/Skeleton.js +128 -81
- package/modern/Slide/Slide.js +37 -33
- package/modern/Slider/Slider.js +157 -108
- package/modern/Snackbar/Snackbar.js +117 -84
- package/modern/SnackbarContent/SnackbarContent.js +15 -17
- package/modern/SpeedDial/SpeedDial.js +151 -94
- package/modern/SpeedDialAction/SpeedDialAction.js +84 -57
- package/modern/SpeedDialIcon/SpeedDialIcon.js +46 -27
- package/modern/Step/Step.js +18 -20
- package/modern/StepButton/StepButton.js +16 -17
- package/modern/StepConnector/StepConnector.js +10 -12
- package/modern/StepContent/StepContent.js +18 -20
- package/modern/StepIcon/StepIcon.js +22 -22
- package/modern/StepLabel/StepLabel.js +46 -34
- package/modern/Stepper/Stepper.js +21 -22
- package/modern/SvgIcon/SvgIcon.js +93 -41
- package/modern/SwipeableDrawer/SwipeArea.js +53 -33
- package/modern/SwipeableDrawer/SwipeableDrawer.js +49 -43
- package/modern/Switch/Switch.js +23 -20
- package/modern/Tab/Tab.js +159 -88
- package/modern/TabScrollButton/TabScrollButton.js +48 -30
- package/modern/Table/Table.js +29 -24
- package/modern/TableBody/TableBody.js +13 -14
- package/modern/TableCell/TableCell.js +117 -62
- package/modern/TableContainer/TableContainer.js +13 -14
- package/modern/TableFooter/TableFooter.js +13 -14
- package/modern/TableHead/TableHead.js +13 -14
- package/modern/TablePagination/TablePagination.js +58 -54
- package/modern/TablePagination/TablePaginationActions.js +51 -38
- package/modern/TableRow/TableRow.js +15 -16
- package/modern/TableSortLabel/TableSortLabel.js +35 -27
- package/modern/Tabs/ScrollbarSize.js +7 -9
- package/modern/Tabs/Tabs.js +160 -112
- package/modern/TextField/TextField.js +139 -69
- package/modern/ToggleButton/ToggleButton.js +102 -75
- package/modern/ToggleButtonGroup/ToggleButtonGroup.js +81 -71
- package/modern/ToggleButtonGroup/toggleButtonGroupClasses.js +1 -1
- package/modern/Toolbar/Toolbar.js +44 -33
- package/modern/Tooltip/Tooltip.js +262 -153
- package/modern/Typography/Typography.js +104 -49
- package/modern/Zoom/Zoom.js +31 -30
- package/modern/index.js +1 -1
- package/modern/internal/SwitchBase.js +75 -47
- package/modern/locale/index.js +75 -2
- package/modern/styles/CssVarsProvider.js +20 -9
- package/modern/styles/ThemeProvider.js +7 -10
- package/modern/styles/adaptV4Theme.js +31 -31
- package/modern/styles/createMixins.js +4 -4
- package/modern/styles/createPalette.js +16 -13
- package/modern/styles/createTheme.js +16 -11
- package/modern/styles/createTransitions.js +20 -19
- package/modern/styles/createTypography.js +31 -29
- package/modern/styles/experimental_extendTheme.js +8 -343
- package/{legacy/styles/experimental_extendTheme.js → modern/styles/extendTheme.js} +103 -125
- package/modern/styles/getOverlayAlpha.js +3 -4
- package/modern/styles/index.js +2 -1
- package/modern/styles/responsiveFontSizes.js +20 -11
- package/modern/usePagination/usePagination.js +18 -20
- package/modern/useScrollTrigger/useScrollTrigger.js +8 -10
- package/modern/utils/createSvgIcon.js +4 -5
- package/modern/utils/useSlot.js +41 -40
- package/modern/zero-styled/index.js +1 -1
- package/node/Accordion/Accordion.js +35 -35
- package/node/AccordionActions/AccordionActions.js +11 -12
- package/node/AccordionDetails/AccordionDetails.js +7 -9
- package/node/AccordionSummary/AccordionSummary.js +14 -16
- package/node/Alert/Alert.js +58 -53
- package/node/AlertTitle/AlertTitle.js +7 -9
- package/node/AppBar/AppBar.js +125 -130
- package/node/Autocomplete/Autocomplete.js +252 -164
- package/node/Avatar/Avatar.js +46 -38
- package/node/AvatarGroup/AvatarGroup.js +60 -41
- package/node/Backdrop/Backdrop.js +36 -35
- package/node/Badge/Badge.js +181 -186
- package/node/BottomNavigation/BottomNavigation.js +15 -17
- package/node/BottomNavigationAction/BottomNavigationAction.js +15 -18
- package/node/Breadcrumbs/BreadcrumbCollapsed.js +38 -37
- package/node/Breadcrumbs/Breadcrumbs.js +19 -21
- package/node/Button/Button.js +34 -31
- package/node/ButtonBase/ButtonBase.js +44 -50
- package/node/ButtonBase/TouchRipple.js +9 -12
- package/node/ButtonGroup/ButtonGroup.js +23 -25
- package/node/Card/Card.js +11 -12
- package/node/CardActionArea/CardActionArea.js +9 -12
- package/node/CardActions/CardActions.js +11 -12
- package/node/CardContent/CardContent.js +11 -12
- package/node/CardHeader/CardHeader.js +30 -31
- package/node/CardMedia/CardMedia.js +19 -21
- package/node/Checkbox/Checkbox.js +82 -46
- package/node/Chip/Chip.js +38 -37
- package/node/Chip/chipClasses.js +1 -1
- package/node/CircularProgress/CircularProgress.js +94 -57
- package/node/Collapse/Collapse.js +113 -80
- package/node/CssBaseline/CssBaseline.js +17 -14
- package/node/Dialog/Dialog.js +157 -108
- package/node/DialogActions/DialogActions.js +28 -25
- package/node/DialogContent/DialogContent.js +37 -28
- package/node/DialogContentText/DialogContentText.js +19 -16
- package/node/DialogTitle/DialogTitle.js +12 -14
- package/node/Divider/Divider.js +20 -22
- package/node/Drawer/Drawer.js +127 -85
- package/node/Fab/Fab.js +112 -69
- package/node/Fade/Fade.js +31 -30
- package/node/FilledInput/FilledInput.js +229 -138
- package/node/FilledInput/filledInputClasses.js +4 -2
- package/node/FormControl/FormControl.js +27 -25
- package/node/FormControlLabel/FormControlLabel.js +51 -27
- package/node/FormGroup/FormGroup.js +11 -12
- package/node/FormHelperText/FormHelperText.js +48 -30
- package/node/FormLabel/FormLabel.js +52 -34
- package/node/GlobalStyles/GlobalStyles.js +3 -3
- package/node/Grid/Grid.js +50 -41
- package/node/Grow/Grow.js +34 -31
- package/node/Hidden/Hidden.js +26 -26
- package/node/Hidden/HiddenCss.js +29 -29
- package/node/Hidden/withWidth.js +19 -19
- package/node/Icon/Icon.js +79 -40
- package/node/IconButton/IconButton.js +114 -62
- package/node/ImageList/ImageList.js +43 -49
- package/node/ImageListItem/ImageListItem.js +59 -45
- package/node/ImageListItemBar/ImageListItemBar.js +87 -56
- package/node/Input/Input.js +106 -86
- package/node/Input/inputClasses.js +4 -2
- package/node/InputAdornment/InputAdornment.js +54 -42
- package/node/InputBase/InputBase.js +154 -122
- package/node/InputLabel/InputLabel.js +143 -77
- package/node/LinearProgress/LinearProgress.js +203 -100
- package/node/Link/Link.js +117 -71
- package/node/Link/getTextDecoration.js +18 -10
- package/node/List/List.js +38 -31
- package/node/ListItem/ListItem.js +162 -117
- package/node/ListItemAvatar/ListItemAvatar.js +25 -22
- package/node/ListItemButton/ListItemButton.js +64 -42
- package/node/ListItemIcon/ListItemIcon.js +25 -21
- package/node/ListItemSecondaryAction/ListItemSecondaryAction.js +27 -22
- package/node/ListItemText/ListItemText.js +48 -41
- package/node/ListSubheader/ListSubheader.js +65 -39
- package/node/Menu/Menu.js +43 -47
- package/node/MenuItem/MenuItem.js +74 -52
- package/node/MenuList/MenuList.js +17 -20
- package/node/MobileStepper/MobileStepper.js +21 -22
- package/node/Modal/Modal.js +49 -42
- package/node/NativeSelect/NativeSelect.js +26 -22
- package/node/NativeSelect/NativeSelectInput.js +93 -71
- package/node/OutlinedInput/NotchedOutline.js +77 -60
- package/node/OutlinedInput/OutlinedInput.js +146 -85
- package/node/OutlinedInput/outlinedInputClasses.js +4 -2
- package/node/Pagination/Pagination.js +41 -37
- package/node/PaginationItem/PaginationItem.js +230 -123
- package/node/Paper/Paper.js +65 -41
- package/node/Popover/Popover.js +86 -85
- package/node/Popper/Popper.js +29 -27
- package/node/Radio/Radio.js +76 -42
- package/node/Radio/RadioButtonIcon.js +25 -19
- package/node/RadioGroup/RadioGroup.js +15 -18
- package/node/Rating/Rating.js +133 -91
- package/node/ScopedCssBaseline/ScopedCssBaseline.js +18 -15
- package/node/Select/Select.js +69 -62
- package/node/Select/SelectInput.js +73 -66
- package/node/Skeleton/Skeleton.js +132 -85
- package/node/Slide/Slide.js +39 -34
- package/node/Slider/Slider.js +301 -268
- package/node/Snackbar/Snackbar.js +119 -86
- package/node/SnackbarContent/SnackbarContent.js +19 -21
- package/node/SpeedDial/SpeedDial.js +155 -98
- package/node/SpeedDialAction/SpeedDialAction.js +88 -61
- package/node/SpeedDialIcon/SpeedDialIcon.js +48 -29
- package/node/Step/Step.js +18 -20
- package/node/StepButton/StepButton.js +16 -17
- package/node/StepConnector/StepConnector.js +10 -12
- package/node/StepContent/StepContent.js +18 -20
- package/node/StepIcon/StepIcon.js +22 -22
- package/node/StepLabel/StepLabel.js +46 -34
- package/node/Stepper/Stepper.js +21 -22
- package/node/SvgIcon/SvgIcon.js +99 -44
- package/node/SwipeableDrawer/SwipeArea.js +55 -35
- package/node/SwipeableDrawer/SwipeableDrawer.js +51 -44
- package/node/Switch/Switch.js +23 -20
- package/node/Tab/Tab.js +161 -90
- package/node/TabScrollButton/TabScrollButton.js +50 -32
- package/node/Table/Table.js +31 -26
- package/node/TableBody/TableBody.js +15 -16
- package/node/TableCell/TableCell.js +119 -64
- package/node/TableContainer/TableContainer.js +15 -16
- package/node/TableFooter/TableFooter.js +15 -16
- package/node/TableHead/TableHead.js +15 -16
- package/node/TablePagination/TablePagination.js +66 -62
- package/node/TablePagination/TablePaginationActions.js +54 -42
- package/node/TableRow/TableRow.js +17 -18
- package/node/TableSortLabel/TableSortLabel.js +38 -30
- package/node/Tabs/ScrollbarSize.js +7 -9
- package/node/Tabs/Tabs.js +166 -118
- package/node/TextField/TextField.js +141 -71
- package/node/ToggleButton/ToggleButton.js +104 -77
- package/node/ToggleButtonGroup/ToggleButtonGroup.js +83 -73
- package/node/ToggleButtonGroup/toggleButtonGroupClasses.js +1 -1
- package/node/Toolbar/Toolbar.js +46 -35
- package/node/Tooltip/Tooltip.js +266 -157
- package/node/Typography/Typography.js +105 -50
- package/node/Zoom/Zoom.js +31 -30
- package/node/index.js +1 -1
- package/node/internal/SwitchBase.js +77 -49
- package/node/locale/index.js +76 -3
- package/node/styles/CssVarsProvider.js +25 -10
- package/node/styles/ThemeProvider.js +7 -10
- package/node/styles/adaptV4Theme.js +31 -32
- package/node/styles/createMixins.js +4 -5
- package/node/styles/createPalette.js +16 -13
- package/node/styles/createTheme.js +16 -11
- package/node/styles/createTransitions.js +20 -20
- package/node/styles/createTypography.js +31 -29
- package/node/styles/experimental_extendTheme.js +9 -349
- package/node/styles/extendTheme.js +367 -0
- package/node/styles/getOverlayAlpha.js +4 -5
- package/node/styles/index.js +10 -0
- package/node/styles/responsiveFontSizes.js +20 -11
- package/node/usePagination/usePagination.js +18 -20
- package/node/useScrollTrigger/useScrollTrigger.js +8 -11
- package/node/utils/createSvgIcon.js +4 -5
- package/node/utils/useSlot.js +41 -40
- package/node/zero-styled/index.js +6 -0
- package/package.json +8 -8
- package/styles/CssVarsProvider.d.ts +3 -2
- package/styles/CssVarsProvider.js +20 -9
- package/styles/ThemeProvider.js +7 -10
- package/styles/adaptV4Theme.js +31 -31
- package/styles/createMixins.js +4 -4
- package/styles/createPalette.js +16 -13
- package/styles/createTheme.js +16 -11
- package/styles/createTransitions.js +20 -19
- package/styles/createTypography.js +31 -29
- package/styles/experimental_extendTheme.js +8 -343
- package/styles/{experimental_extendTheme.d.ts → extendTheme.d.ts} +3 -2
- package/styles/extendTheme.js +355 -0
- package/styles/getOverlayAlpha.d.ts +1 -2
- package/styles/getOverlayAlpha.js +3 -4
- package/styles/index.d.ts +2 -2
- package/styles/index.js +2 -1
- package/styles/responsiveFontSizes.js +20 -11
- package/themeCssVarsAugmentation/index.d.ts +1 -1
- package/types/OverridableComponentAugmentation.d.ts +2 -2
- package/usePagination/usePagination.d.ts +1 -1
- package/usePagination/usePagination.js +18 -20
- package/useScrollTrigger/useScrollTrigger.js +8 -10
- package/utils/createSvgIcon.js +4 -5
- package/utils/useSlot.js +41 -40
- 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/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
- package/modern/useMediaQuery/useMediaQueryTheme.js +0 -8
- package/modern/utils/scrollLeft.js +0 -1
- package/node/useMediaQuery/useMediaQueryTheme.js +0 -13
- package/node/utils/scrollLeft.js +0 -18
- package/umd/material-ui.development.js +0 -51770
- package/umd/material-ui.production.min.js +0 -25
- package/useMediaQuery/useMediaQueryTheme.d.ts +0 -3
- package/useMediaQuery/useMediaQueryTheme.js +0 -8
- package/utils/scrollLeft.js +0 -1
package/legacy/Tabs/Tabs.js
DELETED
|
@@ -1,849 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
|
-
import * as React from 'react';
|
|
7
|
-
import { isFragment } from 'react-is';
|
|
8
|
-
import PropTypes from 'prop-types';
|
|
9
|
-
import clsx from 'clsx';
|
|
10
|
-
import refType from '@mui/utils/refType';
|
|
11
|
-
import { useSlotProps } from '@mui/base/utils';
|
|
12
|
-
import composeClasses from '@mui/utils/composeClasses';
|
|
13
|
-
import { useRtl } from '@mui/system/RtlProvider';
|
|
14
|
-
import styled from '../styles/styled';
|
|
15
|
-
import useThemeProps from '../styles/useThemeProps';
|
|
16
|
-
import useTheme from '../styles/useTheme';
|
|
17
|
-
import debounce from '../utils/debounce';
|
|
18
|
-
import { getNormalizedScrollLeft, detectScrollType } from '../utils/scrollLeft';
|
|
19
|
-
import animate from '../internal/animate';
|
|
20
|
-
import ScrollbarSize from './ScrollbarSize';
|
|
21
|
-
import TabScrollButton from '../TabScrollButton';
|
|
22
|
-
import useEventCallback from '../utils/useEventCallback';
|
|
23
|
-
import tabsClasses, { getTabsUtilityClass } from './tabsClasses';
|
|
24
|
-
import ownerDocument from '../utils/ownerDocument';
|
|
25
|
-
import ownerWindow from '../utils/ownerWindow';
|
|
26
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
|
-
var nextItem = function nextItem(list, item) {
|
|
28
|
-
if (list === item) {
|
|
29
|
-
return list.firstChild;
|
|
30
|
-
}
|
|
31
|
-
if (item && item.nextElementSibling) {
|
|
32
|
-
return item.nextElementSibling;
|
|
33
|
-
}
|
|
34
|
-
return list.firstChild;
|
|
35
|
-
};
|
|
36
|
-
var previousItem = function previousItem(list, item) {
|
|
37
|
-
if (list === item) {
|
|
38
|
-
return list.lastChild;
|
|
39
|
-
}
|
|
40
|
-
if (item && item.previousElementSibling) {
|
|
41
|
-
return item.previousElementSibling;
|
|
42
|
-
}
|
|
43
|
-
return list.lastChild;
|
|
44
|
-
};
|
|
45
|
-
var moveFocus = function moveFocus(list, currentFocus, traversalFunction) {
|
|
46
|
-
var wrappedOnce = false;
|
|
47
|
-
var nextFocus = traversalFunction(list, currentFocus);
|
|
48
|
-
while (nextFocus) {
|
|
49
|
-
// Prevent infinite loop.
|
|
50
|
-
if (nextFocus === list.firstChild) {
|
|
51
|
-
if (wrappedOnce) {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
wrappedOnce = true;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// Same logic as useAutocomplete.js
|
|
58
|
-
var nextFocusDisabled = nextFocus.disabled || nextFocus.getAttribute('aria-disabled') === 'true';
|
|
59
|
-
if (!nextFocus.hasAttribute('tabindex') || nextFocusDisabled) {
|
|
60
|
-
// Move to the next element.
|
|
61
|
-
nextFocus = traversalFunction(list, nextFocus);
|
|
62
|
-
} else {
|
|
63
|
-
nextFocus.focus();
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
69
|
-
var vertical = ownerState.vertical,
|
|
70
|
-
fixed = ownerState.fixed,
|
|
71
|
-
hideScrollbar = ownerState.hideScrollbar,
|
|
72
|
-
scrollableX = ownerState.scrollableX,
|
|
73
|
-
scrollableY = ownerState.scrollableY,
|
|
74
|
-
centered = ownerState.centered,
|
|
75
|
-
scrollButtonsHideMobile = ownerState.scrollButtonsHideMobile,
|
|
76
|
-
classes = ownerState.classes;
|
|
77
|
-
var slots = {
|
|
78
|
-
root: ['root', vertical && 'vertical'],
|
|
79
|
-
scroller: ['scroller', fixed && 'fixed', hideScrollbar && 'hideScrollbar', scrollableX && 'scrollableX', scrollableY && 'scrollableY'],
|
|
80
|
-
flexContainer: ['flexContainer', vertical && 'flexContainerVertical', centered && 'centered'],
|
|
81
|
-
indicator: ['indicator'],
|
|
82
|
-
scrollButtons: ['scrollButtons', scrollButtonsHideMobile && 'scrollButtonsHideMobile'],
|
|
83
|
-
scrollableX: [scrollableX && 'scrollableX'],
|
|
84
|
-
hideScrollbar: [hideScrollbar && 'hideScrollbar']
|
|
85
|
-
};
|
|
86
|
-
return composeClasses(slots, getTabsUtilityClass, classes);
|
|
87
|
-
};
|
|
88
|
-
var TabsRoot = styled('div', {
|
|
89
|
-
name: 'MuiTabs',
|
|
90
|
-
slot: 'Root',
|
|
91
|
-
overridesResolver: function overridesResolver(props, styles) {
|
|
92
|
-
var ownerState = props.ownerState;
|
|
93
|
-
return [_defineProperty({}, "& .".concat(tabsClasses.scrollButtons), styles.scrollButtons), _defineProperty({}, "& .".concat(tabsClasses.scrollButtons), ownerState.scrollButtonsHideMobile && styles.scrollButtonsHideMobile), styles.root, ownerState.vertical && styles.vertical];
|
|
94
|
-
}
|
|
95
|
-
})(function (_ref3) {
|
|
96
|
-
var ownerState = _ref3.ownerState,
|
|
97
|
-
theme = _ref3.theme;
|
|
98
|
-
return _extends({
|
|
99
|
-
overflow: 'hidden',
|
|
100
|
-
minHeight: 48,
|
|
101
|
-
// Add iOS momentum scrolling for iOS < 13.0
|
|
102
|
-
WebkitOverflowScrolling: 'touch',
|
|
103
|
-
display: 'flex'
|
|
104
|
-
}, ownerState.vertical && {
|
|
105
|
-
flexDirection: 'column'
|
|
106
|
-
}, ownerState.scrollButtonsHideMobile && _defineProperty({}, "& .".concat(tabsClasses.scrollButtons), _defineProperty({}, theme.breakpoints.down('sm'), {
|
|
107
|
-
display: 'none'
|
|
108
|
-
})));
|
|
109
|
-
});
|
|
110
|
-
var TabsScroller = styled('div', {
|
|
111
|
-
name: 'MuiTabs',
|
|
112
|
-
slot: 'Scroller',
|
|
113
|
-
overridesResolver: function overridesResolver(props, styles) {
|
|
114
|
-
var ownerState = props.ownerState;
|
|
115
|
-
return [styles.scroller, ownerState.fixed && styles.fixed, ownerState.hideScrollbar && styles.hideScrollbar, ownerState.scrollableX && styles.scrollableX, ownerState.scrollableY && styles.scrollableY];
|
|
116
|
-
}
|
|
117
|
-
})(function (_ref5) {
|
|
118
|
-
var ownerState = _ref5.ownerState;
|
|
119
|
-
return _extends({
|
|
120
|
-
position: 'relative',
|
|
121
|
-
display: 'inline-block',
|
|
122
|
-
flex: '1 1 auto',
|
|
123
|
-
whiteSpace: 'nowrap'
|
|
124
|
-
}, ownerState.fixed && {
|
|
125
|
-
overflowX: 'hidden',
|
|
126
|
-
width: '100%'
|
|
127
|
-
}, ownerState.hideScrollbar && {
|
|
128
|
-
// Hide dimensionless scrollbar on macOS
|
|
129
|
-
scrollbarWidth: 'none',
|
|
130
|
-
// Firefox
|
|
131
|
-
'&::-webkit-scrollbar': {
|
|
132
|
-
display: 'none' // Safari + Chrome
|
|
133
|
-
}
|
|
134
|
-
}, ownerState.scrollableX && {
|
|
135
|
-
overflowX: 'auto',
|
|
136
|
-
overflowY: 'hidden'
|
|
137
|
-
}, ownerState.scrollableY && {
|
|
138
|
-
overflowY: 'auto',
|
|
139
|
-
overflowX: 'hidden'
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
var FlexContainer = styled('div', {
|
|
143
|
-
name: 'MuiTabs',
|
|
144
|
-
slot: 'FlexContainer',
|
|
145
|
-
overridesResolver: function overridesResolver(props, styles) {
|
|
146
|
-
var ownerState = props.ownerState;
|
|
147
|
-
return [styles.flexContainer, ownerState.vertical && styles.flexContainerVertical, ownerState.centered && styles.centered];
|
|
148
|
-
}
|
|
149
|
-
})(function (_ref6) {
|
|
150
|
-
var ownerState = _ref6.ownerState;
|
|
151
|
-
return _extends({
|
|
152
|
-
display: 'flex'
|
|
153
|
-
}, ownerState.vertical && {
|
|
154
|
-
flexDirection: 'column'
|
|
155
|
-
}, ownerState.centered && {
|
|
156
|
-
justifyContent: 'center'
|
|
157
|
-
});
|
|
158
|
-
});
|
|
159
|
-
var TabsIndicator = styled('span', {
|
|
160
|
-
name: 'MuiTabs',
|
|
161
|
-
slot: 'Indicator',
|
|
162
|
-
overridesResolver: function overridesResolver(props, styles) {
|
|
163
|
-
return styles.indicator;
|
|
164
|
-
}
|
|
165
|
-
})(function (_ref7) {
|
|
166
|
-
var ownerState = _ref7.ownerState,
|
|
167
|
-
theme = _ref7.theme;
|
|
168
|
-
return _extends({
|
|
169
|
-
position: 'absolute',
|
|
170
|
-
height: 2,
|
|
171
|
-
bottom: 0,
|
|
172
|
-
width: '100%',
|
|
173
|
-
transition: theme.transitions.create()
|
|
174
|
-
}, ownerState.indicatorColor === 'primary' && {
|
|
175
|
-
backgroundColor: (theme.vars || theme).palette.primary.main
|
|
176
|
-
}, ownerState.indicatorColor === 'secondary' && {
|
|
177
|
-
backgroundColor: (theme.vars || theme).palette.secondary.main
|
|
178
|
-
}, ownerState.vertical && {
|
|
179
|
-
height: '100%',
|
|
180
|
-
width: 2,
|
|
181
|
-
right: 0
|
|
182
|
-
});
|
|
183
|
-
});
|
|
184
|
-
var TabsScrollbarSize = styled(ScrollbarSize)({
|
|
185
|
-
overflowX: 'auto',
|
|
186
|
-
overflowY: 'hidden',
|
|
187
|
-
// Hide dimensionless scrollbar on macOS
|
|
188
|
-
scrollbarWidth: 'none',
|
|
189
|
-
// Firefox
|
|
190
|
-
'&::-webkit-scrollbar': {
|
|
191
|
-
display: 'none' // Safari + Chrome
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
var defaultIndicatorStyle = {};
|
|
195
|
-
var warnedOnceTabPresent = false;
|
|
196
|
-
var Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
197
|
-
var props = useThemeProps({
|
|
198
|
-
props: inProps,
|
|
199
|
-
name: 'MuiTabs'
|
|
200
|
-
});
|
|
201
|
-
var theme = useTheme();
|
|
202
|
-
var isRtl = useRtl();
|
|
203
|
-
var ariaLabel = props['aria-label'],
|
|
204
|
-
ariaLabelledBy = props['aria-labelledby'],
|
|
205
|
-
action = props.action,
|
|
206
|
-
_props$centered = props.centered,
|
|
207
|
-
centered = _props$centered === void 0 ? false : _props$centered,
|
|
208
|
-
childrenProp = props.children,
|
|
209
|
-
className = props.className,
|
|
210
|
-
_props$component = props.component,
|
|
211
|
-
component = _props$component === void 0 ? 'div' : _props$component,
|
|
212
|
-
_props$allowScrollBut = props.allowScrollButtonsMobile,
|
|
213
|
-
allowScrollButtonsMobile = _props$allowScrollBut === void 0 ? false : _props$allowScrollBut,
|
|
214
|
-
_props$indicatorColor = props.indicatorColor,
|
|
215
|
-
indicatorColor = _props$indicatorColor === void 0 ? 'primary' : _props$indicatorColor,
|
|
216
|
-
onChange = props.onChange,
|
|
217
|
-
_props$orientation = props.orientation,
|
|
218
|
-
orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,
|
|
219
|
-
_props$ScrollButtonCo = props.ScrollButtonComponent,
|
|
220
|
-
ScrollButtonComponent = _props$ScrollButtonCo === void 0 ? TabScrollButton : _props$ScrollButtonCo,
|
|
221
|
-
_props$scrollButtons = props.scrollButtons,
|
|
222
|
-
scrollButtons = _props$scrollButtons === void 0 ? 'auto' : _props$scrollButtons,
|
|
223
|
-
selectionFollowsFocus = props.selectionFollowsFocus,
|
|
224
|
-
_props$slots = props.slots,
|
|
225
|
-
slots = _props$slots === void 0 ? {} : _props$slots,
|
|
226
|
-
_props$slotProps = props.slotProps,
|
|
227
|
-
slotProps = _props$slotProps === void 0 ? {} : _props$slotProps,
|
|
228
|
-
_props$TabIndicatorPr = props.TabIndicatorProps,
|
|
229
|
-
TabIndicatorProps = _props$TabIndicatorPr === void 0 ? {} : _props$TabIndicatorPr,
|
|
230
|
-
_props$TabScrollButto = props.TabScrollButtonProps,
|
|
231
|
-
TabScrollButtonProps = _props$TabScrollButto === void 0 ? {} : _props$TabScrollButto,
|
|
232
|
-
_props$textColor = props.textColor,
|
|
233
|
-
textColor = _props$textColor === void 0 ? 'primary' : _props$textColor,
|
|
234
|
-
value = props.value,
|
|
235
|
-
_props$variant = props.variant,
|
|
236
|
-
variant = _props$variant === void 0 ? 'standard' : _props$variant,
|
|
237
|
-
_props$visibleScrollb = props.visibleScrollbar,
|
|
238
|
-
visibleScrollbar = _props$visibleScrollb === void 0 ? false : _props$visibleScrollb,
|
|
239
|
-
other = _objectWithoutProperties(props, ["aria-label", "aria-labelledby", "action", "centered", "children", "className", "component", "allowScrollButtonsMobile", "indicatorColor", "onChange", "orientation", "ScrollButtonComponent", "scrollButtons", "selectionFollowsFocus", "slots", "slotProps", "TabIndicatorProps", "TabScrollButtonProps", "textColor", "value", "variant", "visibleScrollbar"]);
|
|
240
|
-
var scrollable = variant === 'scrollable';
|
|
241
|
-
var vertical = orientation === 'vertical';
|
|
242
|
-
var scrollStart = vertical ? 'scrollTop' : 'scrollLeft';
|
|
243
|
-
var start = vertical ? 'top' : 'left';
|
|
244
|
-
var end = vertical ? 'bottom' : 'right';
|
|
245
|
-
var clientSize = vertical ? 'clientHeight' : 'clientWidth';
|
|
246
|
-
var size = vertical ? 'height' : 'width';
|
|
247
|
-
var ownerState = _extends({}, props, {
|
|
248
|
-
component: component,
|
|
249
|
-
allowScrollButtonsMobile: allowScrollButtonsMobile,
|
|
250
|
-
indicatorColor: indicatorColor,
|
|
251
|
-
orientation: orientation,
|
|
252
|
-
vertical: vertical,
|
|
253
|
-
scrollButtons: scrollButtons,
|
|
254
|
-
textColor: textColor,
|
|
255
|
-
variant: variant,
|
|
256
|
-
visibleScrollbar: visibleScrollbar,
|
|
257
|
-
fixed: !scrollable,
|
|
258
|
-
hideScrollbar: scrollable && !visibleScrollbar,
|
|
259
|
-
scrollableX: scrollable && !vertical,
|
|
260
|
-
scrollableY: scrollable && vertical,
|
|
261
|
-
centered: centered && !scrollable,
|
|
262
|
-
scrollButtonsHideMobile: !allowScrollButtonsMobile
|
|
263
|
-
});
|
|
264
|
-
var classes = useUtilityClasses(ownerState);
|
|
265
|
-
var startScrollButtonIconProps = useSlotProps({
|
|
266
|
-
elementType: slots.StartScrollButtonIcon,
|
|
267
|
-
externalSlotProps: slotProps.startScrollButtonIcon,
|
|
268
|
-
ownerState: ownerState
|
|
269
|
-
});
|
|
270
|
-
var endScrollButtonIconProps = useSlotProps({
|
|
271
|
-
elementType: slots.EndScrollButtonIcon,
|
|
272
|
-
externalSlotProps: slotProps.endScrollButtonIcon,
|
|
273
|
-
ownerState: ownerState
|
|
274
|
-
});
|
|
275
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
276
|
-
if (centered && scrollable) {
|
|
277
|
-
console.error('MUI: You can not use the `centered={true}` and `variant="scrollable"` properties ' + 'at the same time on a `Tabs` component.');
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
var _React$useState = React.useState(false),
|
|
281
|
-
mounted = _React$useState[0],
|
|
282
|
-
setMounted = _React$useState[1];
|
|
283
|
-
var _React$useState2 = React.useState(defaultIndicatorStyle),
|
|
284
|
-
indicatorStyle = _React$useState2[0],
|
|
285
|
-
setIndicatorStyle = _React$useState2[1];
|
|
286
|
-
var _React$useState3 = React.useState(false),
|
|
287
|
-
displayStartScroll = _React$useState3[0],
|
|
288
|
-
setDisplayStartScroll = _React$useState3[1];
|
|
289
|
-
var _React$useState4 = React.useState(false),
|
|
290
|
-
displayEndScroll = _React$useState4[0],
|
|
291
|
-
setDisplayEndScroll = _React$useState4[1];
|
|
292
|
-
var _React$useState5 = React.useState(false),
|
|
293
|
-
updateScrollObserver = _React$useState5[0],
|
|
294
|
-
setUpdateScrollObserver = _React$useState5[1];
|
|
295
|
-
var _React$useState6 = React.useState({
|
|
296
|
-
overflow: 'hidden',
|
|
297
|
-
scrollbarWidth: 0
|
|
298
|
-
}),
|
|
299
|
-
scrollerStyle = _React$useState6[0],
|
|
300
|
-
setScrollerStyle = _React$useState6[1];
|
|
301
|
-
var valueToIndex = new Map();
|
|
302
|
-
var tabsRef = React.useRef(null);
|
|
303
|
-
var tabListRef = React.useRef(null);
|
|
304
|
-
var getTabsMeta = function getTabsMeta() {
|
|
305
|
-
var tabsNode = tabsRef.current;
|
|
306
|
-
var tabsMeta;
|
|
307
|
-
if (tabsNode) {
|
|
308
|
-
var rect = tabsNode.getBoundingClientRect();
|
|
309
|
-
// create a new object with ClientRect class props + scrollLeft
|
|
310
|
-
tabsMeta = {
|
|
311
|
-
clientWidth: tabsNode.clientWidth,
|
|
312
|
-
scrollLeft: tabsNode.scrollLeft,
|
|
313
|
-
scrollTop: tabsNode.scrollTop,
|
|
314
|
-
scrollLeftNormalized: getNormalizedScrollLeft(tabsNode, isRtl ? 'rtl' : 'ltr'),
|
|
315
|
-
scrollWidth: tabsNode.scrollWidth,
|
|
316
|
-
top: rect.top,
|
|
317
|
-
bottom: rect.bottom,
|
|
318
|
-
left: rect.left,
|
|
319
|
-
right: rect.right
|
|
320
|
-
};
|
|
321
|
-
}
|
|
322
|
-
var tabMeta;
|
|
323
|
-
if (tabsNode && value !== false) {
|
|
324
|
-
var _children = tabListRef.current.children;
|
|
325
|
-
if (_children.length > 0) {
|
|
326
|
-
var tab = _children[valueToIndex.get(value)];
|
|
327
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
328
|
-
if (!tab) {
|
|
329
|
-
console.error(["MUI: The `value` provided to the Tabs component is invalid.", "None of the Tabs' children match with \"".concat(value, "\"."), valueToIndex.keys ? "You can provide one of the following values: ".concat(Array.from(valueToIndex.keys()).join(', '), ".") : null].join('\n'));
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
tabMeta = tab ? tab.getBoundingClientRect() : null;
|
|
333
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
334
|
-
if (process.env.NODE_ENV !== 'test' && !warnedOnceTabPresent && tabMeta && tabMeta.width === 0 && tabMeta.height === 0 &&
|
|
335
|
-
// if the whole Tabs component is hidden, don't warn
|
|
336
|
-
tabsMeta.clientWidth !== 0) {
|
|
337
|
-
tabsMeta = null;
|
|
338
|
-
console.error(['MUI: The `value` provided to the Tabs component is invalid.', "The Tab with this `value` (\"".concat(value, "\") is not part of the document layout."), "Make sure the tab item is present in the document or that it's not `display: none`."].join('\n'));
|
|
339
|
-
warnedOnceTabPresent = true;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
return {
|
|
345
|
-
tabsMeta: tabsMeta,
|
|
346
|
-
tabMeta: tabMeta
|
|
347
|
-
};
|
|
348
|
-
};
|
|
349
|
-
var updateIndicatorState = useEventCallback(function () {
|
|
350
|
-
var _getTabsMeta = getTabsMeta(),
|
|
351
|
-
tabsMeta = _getTabsMeta.tabsMeta,
|
|
352
|
-
tabMeta = _getTabsMeta.tabMeta;
|
|
353
|
-
var startValue = 0;
|
|
354
|
-
var startIndicator;
|
|
355
|
-
if (vertical) {
|
|
356
|
-
startIndicator = 'top';
|
|
357
|
-
if (tabMeta && tabsMeta) {
|
|
358
|
-
startValue = tabMeta.top - tabsMeta.top + tabsMeta.scrollTop;
|
|
359
|
-
}
|
|
360
|
-
} else {
|
|
361
|
-
startIndicator = isRtl ? 'right' : 'left';
|
|
362
|
-
if (tabMeta && tabsMeta) {
|
|
363
|
-
var correction = isRtl ? tabsMeta.scrollLeftNormalized + tabsMeta.clientWidth - tabsMeta.scrollWidth : tabsMeta.scrollLeft;
|
|
364
|
-
startValue = (isRtl ? -1 : 1) * (tabMeta[startIndicator] - tabsMeta[startIndicator] + correction);
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
var newIndicatorStyle = _defineProperty(_defineProperty({}, startIndicator, startValue), size, tabMeta ? tabMeta[size] : 0);
|
|
368
|
-
|
|
369
|
-
// IE11 support, replace with Number.isNaN
|
|
370
|
-
// eslint-disable-next-line no-restricted-globals
|
|
371
|
-
if (isNaN(indicatorStyle[startIndicator]) || isNaN(indicatorStyle[size])) {
|
|
372
|
-
setIndicatorStyle(newIndicatorStyle);
|
|
373
|
-
} else {
|
|
374
|
-
var dStart = Math.abs(indicatorStyle[startIndicator] - newIndicatorStyle[startIndicator]);
|
|
375
|
-
var dSize = Math.abs(indicatorStyle[size] - newIndicatorStyle[size]);
|
|
376
|
-
if (dStart >= 1 || dSize >= 1) {
|
|
377
|
-
setIndicatorStyle(newIndicatorStyle);
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
});
|
|
381
|
-
var scroll = function scroll(scrollValue) {
|
|
382
|
-
var _ref8 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
383
|
-
_ref8$animation = _ref8.animation,
|
|
384
|
-
animation = _ref8$animation === void 0 ? true : _ref8$animation;
|
|
385
|
-
if (animation) {
|
|
386
|
-
animate(scrollStart, tabsRef.current, scrollValue, {
|
|
387
|
-
duration: theme.transitions.duration.standard
|
|
388
|
-
});
|
|
389
|
-
} else {
|
|
390
|
-
tabsRef.current[scrollStart] = scrollValue;
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
var moveTabsScroll = function moveTabsScroll(delta) {
|
|
394
|
-
var scrollValue = tabsRef.current[scrollStart];
|
|
395
|
-
if (vertical) {
|
|
396
|
-
scrollValue += delta;
|
|
397
|
-
} else {
|
|
398
|
-
scrollValue += delta * (isRtl ? -1 : 1);
|
|
399
|
-
// Fix for Edge
|
|
400
|
-
scrollValue *= isRtl && detectScrollType() === 'reverse' ? -1 : 1;
|
|
401
|
-
}
|
|
402
|
-
scroll(scrollValue);
|
|
403
|
-
};
|
|
404
|
-
var getScrollSize = function getScrollSize() {
|
|
405
|
-
var containerSize = tabsRef.current[clientSize];
|
|
406
|
-
var totalSize = 0;
|
|
407
|
-
var children = Array.from(tabListRef.current.children);
|
|
408
|
-
for (var i = 0; i < children.length; i += 1) {
|
|
409
|
-
var tab = children[i];
|
|
410
|
-
if (totalSize + tab[clientSize] > containerSize) {
|
|
411
|
-
// If the first item is longer than the container size, then only scroll
|
|
412
|
-
// by the container size.
|
|
413
|
-
if (i === 0) {
|
|
414
|
-
totalSize = containerSize;
|
|
415
|
-
}
|
|
416
|
-
break;
|
|
417
|
-
}
|
|
418
|
-
totalSize += tab[clientSize];
|
|
419
|
-
}
|
|
420
|
-
return totalSize;
|
|
421
|
-
};
|
|
422
|
-
var handleStartScrollClick = function handleStartScrollClick() {
|
|
423
|
-
moveTabsScroll(-1 * getScrollSize());
|
|
424
|
-
};
|
|
425
|
-
var handleEndScrollClick = function handleEndScrollClick() {
|
|
426
|
-
moveTabsScroll(getScrollSize());
|
|
427
|
-
};
|
|
428
|
-
|
|
429
|
-
// TODO Remove <ScrollbarSize /> as browser support for hiding the scrollbar
|
|
430
|
-
// with CSS improves.
|
|
431
|
-
var handleScrollbarSizeChange = React.useCallback(function (scrollbarWidth) {
|
|
432
|
-
setScrollerStyle({
|
|
433
|
-
overflow: null,
|
|
434
|
-
scrollbarWidth: scrollbarWidth
|
|
435
|
-
});
|
|
436
|
-
}, []);
|
|
437
|
-
var getConditionalElements = function getConditionalElements() {
|
|
438
|
-
var conditionalElements = {};
|
|
439
|
-
conditionalElements.scrollbarSizeListener = scrollable ? /*#__PURE__*/_jsx(TabsScrollbarSize, {
|
|
440
|
-
onChange: handleScrollbarSizeChange,
|
|
441
|
-
className: clsx(classes.scrollableX, classes.hideScrollbar)
|
|
442
|
-
}) : null;
|
|
443
|
-
var scrollButtonsActive = displayStartScroll || displayEndScroll;
|
|
444
|
-
var showScrollButtons = scrollable && (scrollButtons === 'auto' && scrollButtonsActive || scrollButtons === true);
|
|
445
|
-
conditionalElements.scrollButtonStart = showScrollButtons ? /*#__PURE__*/_jsx(ScrollButtonComponent, _extends({
|
|
446
|
-
slots: {
|
|
447
|
-
StartScrollButtonIcon: slots.StartScrollButtonIcon
|
|
448
|
-
},
|
|
449
|
-
slotProps: {
|
|
450
|
-
startScrollButtonIcon: startScrollButtonIconProps
|
|
451
|
-
},
|
|
452
|
-
orientation: orientation,
|
|
453
|
-
direction: isRtl ? 'right' : 'left',
|
|
454
|
-
onClick: handleStartScrollClick,
|
|
455
|
-
disabled: !displayStartScroll
|
|
456
|
-
}, TabScrollButtonProps, {
|
|
457
|
-
className: clsx(classes.scrollButtons, TabScrollButtonProps.className)
|
|
458
|
-
})) : null;
|
|
459
|
-
conditionalElements.scrollButtonEnd = showScrollButtons ? /*#__PURE__*/_jsx(ScrollButtonComponent, _extends({
|
|
460
|
-
slots: {
|
|
461
|
-
EndScrollButtonIcon: slots.EndScrollButtonIcon
|
|
462
|
-
},
|
|
463
|
-
slotProps: {
|
|
464
|
-
endScrollButtonIcon: endScrollButtonIconProps
|
|
465
|
-
},
|
|
466
|
-
orientation: orientation,
|
|
467
|
-
direction: isRtl ? 'left' : 'right',
|
|
468
|
-
onClick: handleEndScrollClick,
|
|
469
|
-
disabled: !displayEndScroll
|
|
470
|
-
}, TabScrollButtonProps, {
|
|
471
|
-
className: clsx(classes.scrollButtons, TabScrollButtonProps.className)
|
|
472
|
-
})) : null;
|
|
473
|
-
return conditionalElements;
|
|
474
|
-
};
|
|
475
|
-
var scrollSelectedIntoView = useEventCallback(function (animation) {
|
|
476
|
-
var _getTabsMeta2 = getTabsMeta(),
|
|
477
|
-
tabsMeta = _getTabsMeta2.tabsMeta,
|
|
478
|
-
tabMeta = _getTabsMeta2.tabMeta;
|
|
479
|
-
if (!tabMeta || !tabsMeta) {
|
|
480
|
-
return;
|
|
481
|
-
}
|
|
482
|
-
if (tabMeta[start] < tabsMeta[start]) {
|
|
483
|
-
// left side of button is out of view
|
|
484
|
-
var nextScrollStart = tabsMeta[scrollStart] + (tabMeta[start] - tabsMeta[start]);
|
|
485
|
-
scroll(nextScrollStart, {
|
|
486
|
-
animation: animation
|
|
487
|
-
});
|
|
488
|
-
} else if (tabMeta[end] > tabsMeta[end]) {
|
|
489
|
-
// right side of button is out of view
|
|
490
|
-
var _nextScrollStart = tabsMeta[scrollStart] + (tabMeta[end] - tabsMeta[end]);
|
|
491
|
-
scroll(_nextScrollStart, {
|
|
492
|
-
animation: animation
|
|
493
|
-
});
|
|
494
|
-
}
|
|
495
|
-
});
|
|
496
|
-
var updateScrollButtonState = useEventCallback(function () {
|
|
497
|
-
if (scrollable && scrollButtons !== false) {
|
|
498
|
-
setUpdateScrollObserver(!updateScrollObserver);
|
|
499
|
-
}
|
|
500
|
-
});
|
|
501
|
-
React.useEffect(function () {
|
|
502
|
-
var handleResize = debounce(function () {
|
|
503
|
-
// If the Tabs component is replaced by Suspense with a fallback, the last
|
|
504
|
-
// ResizeObserver's handler that runs because of the change in the layout is trying to
|
|
505
|
-
// access a dom node that is no longer there (as the fallback component is being shown instead).
|
|
506
|
-
// See https://github.com/mui/material-ui/issues/33276
|
|
507
|
-
// TODO: Add tests that will ensure the component is not failing when
|
|
508
|
-
// replaced by Suspense with a fallback, once React is updated to version 18
|
|
509
|
-
if (tabsRef.current) {
|
|
510
|
-
updateIndicatorState();
|
|
511
|
-
}
|
|
512
|
-
});
|
|
513
|
-
var resizeObserver;
|
|
514
|
-
|
|
515
|
-
/**
|
|
516
|
-
* @type {MutationCallback}
|
|
517
|
-
*/
|
|
518
|
-
var handleMutation = function handleMutation(records) {
|
|
519
|
-
records.forEach(function (record) {
|
|
520
|
-
record.removedNodes.forEach(function (item) {
|
|
521
|
-
var _resizeObserver;
|
|
522
|
-
(_resizeObserver = resizeObserver) == null || _resizeObserver.unobserve(item);
|
|
523
|
-
});
|
|
524
|
-
record.addedNodes.forEach(function (item) {
|
|
525
|
-
var _resizeObserver2;
|
|
526
|
-
(_resizeObserver2 = resizeObserver) == null || _resizeObserver2.observe(item);
|
|
527
|
-
});
|
|
528
|
-
});
|
|
529
|
-
handleResize();
|
|
530
|
-
updateScrollButtonState();
|
|
531
|
-
};
|
|
532
|
-
var win = ownerWindow(tabsRef.current);
|
|
533
|
-
win.addEventListener('resize', handleResize);
|
|
534
|
-
var mutationObserver;
|
|
535
|
-
if (typeof ResizeObserver !== 'undefined') {
|
|
536
|
-
resizeObserver = new ResizeObserver(handleResize);
|
|
537
|
-
Array.from(tabListRef.current.children).forEach(function (child) {
|
|
538
|
-
resizeObserver.observe(child);
|
|
539
|
-
});
|
|
540
|
-
}
|
|
541
|
-
if (typeof MutationObserver !== 'undefined') {
|
|
542
|
-
mutationObserver = new MutationObserver(handleMutation);
|
|
543
|
-
mutationObserver.observe(tabListRef.current, {
|
|
544
|
-
childList: true
|
|
545
|
-
});
|
|
546
|
-
}
|
|
547
|
-
return function () {
|
|
548
|
-
var _mutationObserver, _resizeObserver3;
|
|
549
|
-
handleResize.clear();
|
|
550
|
-
win.removeEventListener('resize', handleResize);
|
|
551
|
-
(_mutationObserver = mutationObserver) == null || _mutationObserver.disconnect();
|
|
552
|
-
(_resizeObserver3 = resizeObserver) == null || _resizeObserver3.disconnect();
|
|
553
|
-
};
|
|
554
|
-
}, [updateIndicatorState, updateScrollButtonState]);
|
|
555
|
-
|
|
556
|
-
/**
|
|
557
|
-
* Toggle visibility of start and end scroll buttons
|
|
558
|
-
* Using IntersectionObserver on first and last Tabs.
|
|
559
|
-
*/
|
|
560
|
-
React.useEffect(function () {
|
|
561
|
-
var tabListChildren = Array.from(tabListRef.current.children);
|
|
562
|
-
var length = tabListChildren.length;
|
|
563
|
-
if (typeof IntersectionObserver !== 'undefined' && length > 0 && scrollable && scrollButtons !== false) {
|
|
564
|
-
var firstTab = tabListChildren[0];
|
|
565
|
-
var lastTab = tabListChildren[length - 1];
|
|
566
|
-
var observerOptions = {
|
|
567
|
-
root: tabsRef.current,
|
|
568
|
-
threshold: 0.99
|
|
569
|
-
};
|
|
570
|
-
var handleScrollButtonStart = function handleScrollButtonStart(entries) {
|
|
571
|
-
setDisplayStartScroll(!entries[0].isIntersecting);
|
|
572
|
-
};
|
|
573
|
-
var firstObserver = new IntersectionObserver(handleScrollButtonStart, observerOptions);
|
|
574
|
-
firstObserver.observe(firstTab);
|
|
575
|
-
var handleScrollButtonEnd = function handleScrollButtonEnd(entries) {
|
|
576
|
-
setDisplayEndScroll(!entries[0].isIntersecting);
|
|
577
|
-
};
|
|
578
|
-
var lastObserver = new IntersectionObserver(handleScrollButtonEnd, observerOptions);
|
|
579
|
-
lastObserver.observe(lastTab);
|
|
580
|
-
return function () {
|
|
581
|
-
firstObserver.disconnect();
|
|
582
|
-
lastObserver.disconnect();
|
|
583
|
-
};
|
|
584
|
-
}
|
|
585
|
-
return undefined;
|
|
586
|
-
}, [scrollable, scrollButtons, updateScrollObserver, childrenProp == null ? void 0 : childrenProp.length]);
|
|
587
|
-
React.useEffect(function () {
|
|
588
|
-
setMounted(true);
|
|
589
|
-
}, []);
|
|
590
|
-
React.useEffect(function () {
|
|
591
|
-
updateIndicatorState();
|
|
592
|
-
});
|
|
593
|
-
React.useEffect(function () {
|
|
594
|
-
// Don't animate on the first render.
|
|
595
|
-
scrollSelectedIntoView(defaultIndicatorStyle !== indicatorStyle);
|
|
596
|
-
}, [scrollSelectedIntoView, indicatorStyle]);
|
|
597
|
-
React.useImperativeHandle(action, function () {
|
|
598
|
-
return {
|
|
599
|
-
updateIndicator: updateIndicatorState,
|
|
600
|
-
updateScrollButtons: updateScrollButtonState
|
|
601
|
-
};
|
|
602
|
-
}, [updateIndicatorState, updateScrollButtonState]);
|
|
603
|
-
var indicator = /*#__PURE__*/_jsx(TabsIndicator, _extends({}, TabIndicatorProps, {
|
|
604
|
-
className: clsx(classes.indicator, TabIndicatorProps.className),
|
|
605
|
-
ownerState: ownerState,
|
|
606
|
-
style: _extends({}, indicatorStyle, TabIndicatorProps.style)
|
|
607
|
-
}));
|
|
608
|
-
var childIndex = 0;
|
|
609
|
-
var children = React.Children.map(childrenProp, function (child) {
|
|
610
|
-
if (! /*#__PURE__*/React.isValidElement(child)) {
|
|
611
|
-
return null;
|
|
612
|
-
}
|
|
613
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
614
|
-
if (isFragment(child)) {
|
|
615
|
-
console.error(["MUI: The Tabs component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
var childValue = child.props.value === undefined ? childIndex : child.props.value;
|
|
619
|
-
valueToIndex.set(childValue, childIndex);
|
|
620
|
-
var selected = childValue === value;
|
|
621
|
-
childIndex += 1;
|
|
622
|
-
return /*#__PURE__*/React.cloneElement(child, _extends({
|
|
623
|
-
fullWidth: variant === 'fullWidth',
|
|
624
|
-
indicator: selected && !mounted && indicator,
|
|
625
|
-
selected: selected,
|
|
626
|
-
selectionFollowsFocus: selectionFollowsFocus,
|
|
627
|
-
onChange: onChange,
|
|
628
|
-
textColor: textColor,
|
|
629
|
-
value: childValue
|
|
630
|
-
}, childIndex === 1 && value === false && !child.props.tabIndex ? {
|
|
631
|
-
tabIndex: 0
|
|
632
|
-
} : {}));
|
|
633
|
-
});
|
|
634
|
-
var handleKeyDown = function handleKeyDown(event) {
|
|
635
|
-
var list = tabListRef.current;
|
|
636
|
-
var currentFocus = ownerDocument(list).activeElement;
|
|
637
|
-
// Keyboard navigation assumes that [role="tab"] are siblings
|
|
638
|
-
// though we might warn in the future about nested, interactive elements
|
|
639
|
-
// as a a11y violation
|
|
640
|
-
var role = currentFocus.getAttribute('role');
|
|
641
|
-
if (role !== 'tab') {
|
|
642
|
-
return;
|
|
643
|
-
}
|
|
644
|
-
var previousItemKey = orientation === 'horizontal' ? 'ArrowLeft' : 'ArrowUp';
|
|
645
|
-
var nextItemKey = orientation === 'horizontal' ? 'ArrowRight' : 'ArrowDown';
|
|
646
|
-
if (orientation === 'horizontal' && isRtl) {
|
|
647
|
-
// swap previousItemKey with nextItemKey
|
|
648
|
-
previousItemKey = 'ArrowRight';
|
|
649
|
-
nextItemKey = 'ArrowLeft';
|
|
650
|
-
}
|
|
651
|
-
switch (event.key) {
|
|
652
|
-
case previousItemKey:
|
|
653
|
-
event.preventDefault();
|
|
654
|
-
moveFocus(list, currentFocus, previousItem);
|
|
655
|
-
break;
|
|
656
|
-
case nextItemKey:
|
|
657
|
-
event.preventDefault();
|
|
658
|
-
moveFocus(list, currentFocus, nextItem);
|
|
659
|
-
break;
|
|
660
|
-
case 'Home':
|
|
661
|
-
event.preventDefault();
|
|
662
|
-
moveFocus(list, null, nextItem);
|
|
663
|
-
break;
|
|
664
|
-
case 'End':
|
|
665
|
-
event.preventDefault();
|
|
666
|
-
moveFocus(list, null, previousItem);
|
|
667
|
-
break;
|
|
668
|
-
default:
|
|
669
|
-
break;
|
|
670
|
-
}
|
|
671
|
-
};
|
|
672
|
-
var conditionalElements = getConditionalElements();
|
|
673
|
-
return /*#__PURE__*/_jsxs(TabsRoot, _extends({
|
|
674
|
-
className: clsx(classes.root, className),
|
|
675
|
-
ownerState: ownerState,
|
|
676
|
-
ref: ref,
|
|
677
|
-
as: component
|
|
678
|
-
}, other, {
|
|
679
|
-
children: [conditionalElements.scrollButtonStart, conditionalElements.scrollbarSizeListener, /*#__PURE__*/_jsxs(TabsScroller, {
|
|
680
|
-
className: classes.scroller,
|
|
681
|
-
ownerState: ownerState,
|
|
682
|
-
style: _defineProperty({
|
|
683
|
-
overflow: scrollerStyle.overflow
|
|
684
|
-
}, vertical ? "margin".concat(isRtl ? 'Left' : 'Right') : 'marginBottom', visibleScrollbar ? undefined : -scrollerStyle.scrollbarWidth),
|
|
685
|
-
ref: tabsRef,
|
|
686
|
-
children: [/*#__PURE__*/_jsx(FlexContainer, {
|
|
687
|
-
"aria-label": ariaLabel,
|
|
688
|
-
"aria-labelledby": ariaLabelledBy,
|
|
689
|
-
"aria-orientation": orientation === 'vertical' ? 'vertical' : null,
|
|
690
|
-
className: classes.flexContainer,
|
|
691
|
-
ownerState: ownerState,
|
|
692
|
-
onKeyDown: handleKeyDown,
|
|
693
|
-
ref: tabListRef,
|
|
694
|
-
role: "tablist",
|
|
695
|
-
children: children
|
|
696
|
-
}), mounted && indicator]
|
|
697
|
-
}), conditionalElements.scrollButtonEnd]
|
|
698
|
-
}));
|
|
699
|
-
});
|
|
700
|
-
process.env.NODE_ENV !== "production" ? Tabs.propTypes /* remove-proptypes */ = {
|
|
701
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
702
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
703
|
-
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
704
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
705
|
-
/**
|
|
706
|
-
* Callback fired when the component mounts.
|
|
707
|
-
* This is useful when you want to trigger an action programmatically.
|
|
708
|
-
* It supports two actions: `updateIndicator()` and `updateScrollButtons()`
|
|
709
|
-
*
|
|
710
|
-
* @param {object} actions This object contains all possible actions
|
|
711
|
-
* that can be triggered programmatically.
|
|
712
|
-
*/
|
|
713
|
-
action: refType,
|
|
714
|
-
/**
|
|
715
|
-
* If `true`, the scroll buttons aren't forced hidden on mobile.
|
|
716
|
-
* By default the scroll buttons are hidden on mobile and takes precedence over `scrollButtons`.
|
|
717
|
-
* @default false
|
|
718
|
-
*/
|
|
719
|
-
allowScrollButtonsMobile: PropTypes.bool,
|
|
720
|
-
/**
|
|
721
|
-
* The label for the Tabs as a string.
|
|
722
|
-
*/
|
|
723
|
-
'aria-label': PropTypes.string,
|
|
724
|
-
/**
|
|
725
|
-
* An id or list of ids separated by a space that label the Tabs.
|
|
726
|
-
*/
|
|
727
|
-
'aria-labelledby': PropTypes.string,
|
|
728
|
-
/**
|
|
729
|
-
* If `true`, the tabs are centered.
|
|
730
|
-
* This prop is intended for large views.
|
|
731
|
-
* @default false
|
|
732
|
-
*/
|
|
733
|
-
centered: PropTypes.bool,
|
|
734
|
-
/**
|
|
735
|
-
* The content of the component.
|
|
736
|
-
*/
|
|
737
|
-
children: PropTypes.node,
|
|
738
|
-
/**
|
|
739
|
-
* Override or extend the styles applied to the component.
|
|
740
|
-
*/
|
|
741
|
-
classes: PropTypes.object,
|
|
742
|
-
/**
|
|
743
|
-
* @ignore
|
|
744
|
-
*/
|
|
745
|
-
className: PropTypes.string,
|
|
746
|
-
/**
|
|
747
|
-
* The component used for the root node.
|
|
748
|
-
* Either a string to use a HTML element or a component.
|
|
749
|
-
*/
|
|
750
|
-
component: PropTypes.elementType,
|
|
751
|
-
/**
|
|
752
|
-
* Determines the color of the indicator.
|
|
753
|
-
* @default 'primary'
|
|
754
|
-
*/
|
|
755
|
-
indicatorColor: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),
|
|
756
|
-
/**
|
|
757
|
-
* Callback fired when the value changes.
|
|
758
|
-
*
|
|
759
|
-
* @param {React.SyntheticEvent} event The event source of the callback. **Warning**: This is a generic event not a change event.
|
|
760
|
-
* @param {any} value We default to the index of the child (number)
|
|
761
|
-
*/
|
|
762
|
-
onChange: PropTypes.func,
|
|
763
|
-
/**
|
|
764
|
-
* The component orientation (layout flow direction).
|
|
765
|
-
* @default 'horizontal'
|
|
766
|
-
*/
|
|
767
|
-
orientation: PropTypes.oneOf(['horizontal', 'vertical']),
|
|
768
|
-
/**
|
|
769
|
-
* The component used to render the scroll buttons.
|
|
770
|
-
* @default TabScrollButton
|
|
771
|
-
*/
|
|
772
|
-
ScrollButtonComponent: PropTypes.elementType,
|
|
773
|
-
/**
|
|
774
|
-
* Determine behavior of scroll buttons when tabs are set to scroll:
|
|
775
|
-
*
|
|
776
|
-
* - `auto` will only present them when not all the items are visible.
|
|
777
|
-
* - `true` will always present them.
|
|
778
|
-
* - `false` will never present them.
|
|
779
|
-
*
|
|
780
|
-
* By default the scroll buttons are hidden on mobile.
|
|
781
|
-
* This behavior can be disabled with `allowScrollButtonsMobile`.
|
|
782
|
-
* @default 'auto'
|
|
783
|
-
*/
|
|
784
|
-
scrollButtons: PropTypes /* @typescript-to-proptypes-ignore */.oneOf(['auto', false, true]),
|
|
785
|
-
/**
|
|
786
|
-
* If `true` the selected tab changes on focus. Otherwise it only
|
|
787
|
-
* changes on activation.
|
|
788
|
-
*/
|
|
789
|
-
selectionFollowsFocus: PropTypes.bool,
|
|
790
|
-
/**
|
|
791
|
-
* The extra props for the slot components.
|
|
792
|
-
* You can override the existing props or add new ones.
|
|
793
|
-
* @default {}
|
|
794
|
-
*/
|
|
795
|
-
slotProps: PropTypes.shape({
|
|
796
|
-
endScrollButtonIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
797
|
-
startScrollButtonIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
798
|
-
}),
|
|
799
|
-
/**
|
|
800
|
-
* The components used for each slot inside.
|
|
801
|
-
* @default {}
|
|
802
|
-
*/
|
|
803
|
-
slots: PropTypes.shape({
|
|
804
|
-
EndScrollButtonIcon: PropTypes.elementType,
|
|
805
|
-
StartScrollButtonIcon: PropTypes.elementType
|
|
806
|
-
}),
|
|
807
|
-
/**
|
|
808
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
809
|
-
*/
|
|
810
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
811
|
-
/**
|
|
812
|
-
* Props applied to the tab indicator element.
|
|
813
|
-
* @default {}
|
|
814
|
-
*/
|
|
815
|
-
TabIndicatorProps: PropTypes.object,
|
|
816
|
-
/**
|
|
817
|
-
* Props applied to the [`TabScrollButton`](/material-ui/api/tab-scroll-button/) element.
|
|
818
|
-
* @default {}
|
|
819
|
-
*/
|
|
820
|
-
TabScrollButtonProps: PropTypes.object,
|
|
821
|
-
/**
|
|
822
|
-
* Determines the color of the `Tab`.
|
|
823
|
-
* @default 'primary'
|
|
824
|
-
*/
|
|
825
|
-
textColor: PropTypes.oneOf(['inherit', 'primary', 'secondary']),
|
|
826
|
-
/**
|
|
827
|
-
* The value of the currently selected `Tab`.
|
|
828
|
-
* If you don't want any selected `Tab`, you can set this prop to `false`.
|
|
829
|
-
*/
|
|
830
|
-
value: PropTypes.any,
|
|
831
|
-
/**
|
|
832
|
-
* Determines additional display behavior of the tabs:
|
|
833
|
-
*
|
|
834
|
-
* - `scrollable` will invoke scrolling properties and allow for horizontally
|
|
835
|
-
* scrolling (or swiping) of the tab bar.
|
|
836
|
-
* - `fullWidth` will make the tabs grow to use all the available space,
|
|
837
|
-
* which should be used for small views, like on mobile.
|
|
838
|
-
* - `standard` will render the default state.
|
|
839
|
-
* @default 'standard'
|
|
840
|
-
*/
|
|
841
|
-
variant: PropTypes.oneOf(['fullWidth', 'scrollable', 'standard']),
|
|
842
|
-
/**
|
|
843
|
-
* If `true`, the scrollbar is visible. It can be useful when displaying
|
|
844
|
-
* a long vertical list of tabs.
|
|
845
|
-
* @default false
|
|
846
|
-
*/
|
|
847
|
-
visibleScrollbar: PropTypes.bool
|
|
848
|
-
} : void 0;
|
|
849
|
-
export default Tabs;
|