@mui/material 5.15.15 → 6.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.js +1 -2
- package/AccordionSummary/AccordionSummary.js +1 -2
- package/Alert/Alert.js +1 -2
- package/AppBar/AppBar.js +119 -69
- package/Autocomplete/Autocomplete.js +11 -16
- package/AvatarGroup/AvatarGroup.js +27 -25
- package/Backdrop/Backdrop.d.ts +40 -22
- package/Backdrop/Backdrop.js +50 -33
- package/Badge/Badge.d.ts +2 -4
- package/Badge/Badge.js +158 -168
- package/BottomNavigation/BottomNavigation.js +2 -2
- package/BottomNavigationAction/BottomNavigationAction.js +40 -24
- package/Breadcrumbs/Breadcrumbs.js +2 -2
- package/Button/Button.js +221 -134
- package/ButtonBase/ButtonBase.js +3 -4
- package/ButtonBase/Ripple.js +1 -1
- package/ButtonBase/TouchRipple.js +37 -43
- package/ButtonGroup/ButtonGroup.js +168 -71
- package/ButtonGroup/buttonGroupClasses.d.ts +57 -17
- package/ButtonGroup/buttonGroupClasses.js +1 -1
- package/CHANGELOG.md +169 -3
- package/Card/Card.js +4 -6
- package/CardActionArea/CardActionArea.js +3 -4
- package/CardActions/CardActions.js +16 -12
- package/CardContent/CardContent.js +7 -9
- package/CardHeader/CardHeader.js +3 -4
- package/CardMedia/CardMedia.js +22 -13
- package/Checkbox/Checkbox.js +2 -3
- package/Chip/Chip.js +191 -122
- package/CircularProgress/CircularProgress.js +10 -15
- package/CssBaseline/CssBaseline.js +3 -6
- package/DialogTitle/DialogTitle.js +1 -1
- package/Divider/Divider.js +140 -81
- package/Fab/Fab.js +55 -58
- package/FilledInput/FilledInput.js +4 -6
- package/FormControl/FormControl.js +30 -15
- package/FormControlLabel/FormControlLabel.js +42 -27
- package/FormGroup/FormGroup.js +14 -10
- package/Grid/Grid.js +5 -4
- package/IconButton/IconButton.js +2 -3
- package/ImageListItemBar/ImageListItemBar.js +1 -2
- package/Input/Input.js +3 -4
- package/InputAdornment/InputAdornment.js +1 -2
- package/InputBase/InputBase.js +2 -4
- package/LinearProgress/LinearProgress.js +16 -24
- package/List/List.js +1 -2
- package/ListItem/ListItem.js +1 -2
- package/ListItemText/ListItemText.js +2 -3
- package/Menu/Menu.js +2 -3
- package/MobileStepper/MobileStepper.js +80 -47
- package/Modal/Modal.js +22 -19
- package/NativeSelect/NativeSelectInput.js +1 -2
- package/OutlinedInput/OutlinedInput.js +4 -5
- package/PaginationItem/PaginationItem.js +1 -2
- package/Paper/Paper.js +15 -18
- package/Popover/Popover.js +7 -8
- package/Popper/Popper.js +3 -4
- package/README.md +3 -1
- package/Radio/Radio.js +2 -3
- package/Radio/RadioButtonIcon.js +1 -2
- package/Rating/Rating.js +1 -2
- package/ScopedCssBaseline/ScopedCssBaseline.js +1 -2
- package/Select/SelectInput.js +3 -5
- package/Skeleton/Skeleton.js +11 -16
- package/Slider/Slider.js +185 -203
- package/Slider/SliderValueLabel.js +1 -2
- package/SnackbarContent/SnackbarContent.js +1 -2
- package/SpeedDial/SpeedDial.js +1 -2
- package/SpeedDialAction/SpeedDialAction.js +1 -2
- package/SpeedDialIcon/SpeedDialIcon.js +1 -2
- package/Step/Step.js +23 -14
- package/StepButton/StepButton.js +17 -14
- package/StepConnector/StepConnector.js +45 -26
- package/StepContent/StepContent.js +13 -8
- package/StepIcon/StepIcon.js +3 -4
- package/StepLabel/StepLabel.d.ts +25 -13
- package/StepLabel/StepLabel.js +47 -27
- package/Stepper/Stepper.js +29 -15
- package/SvgIcon/SvgIcon.js +26 -30
- package/SwipeableDrawer/SwipeableDrawer.js +2 -4
- package/Switch/Switch.js +1 -2
- package/TabScrollButton/TabScrollButton.js +2 -3
- package/Table/Table.d.ts +0 -2
- package/Table/Table.js +0 -2
- package/TablePagination/TablePagination.js +2 -4
- package/TablePagination/TablePaginationActions.js +11 -13
- package/TableSortLabel/TableSortLabel.js +1 -2
- package/Tabs/Tabs.js +6 -10
- package/TextField/TextField.js +1 -2
- package/Tooltip/Tooltip.js +14 -17
- package/index.js +1 -1
- package/internal/SwitchBase.js +1 -2
- package/legacy/Accordion/Accordion.js +1 -2
- package/legacy/AccordionSummary/AccordionSummary.js +1 -2
- package/legacy/Alert/Alert.js +1 -2
- package/legacy/AppBar/AppBar.js +124 -64
- package/legacy/Autocomplete/Autocomplete.js +1 -2
- package/legacy/AvatarGroup/AvatarGroup.js +19 -11
- package/legacy/Backdrop/Backdrop.js +66 -44
- package/legacy/Badge/Badge.js +3 -6
- package/legacy/BottomNavigation/BottomNavigation.js +2 -2
- package/legacy/BottomNavigationAction/BottomNavigationAction.js +42 -23
- package/legacy/Breadcrumbs/Breadcrumbs.js +2 -2
- package/legacy/Button/Button.js +219 -125
- package/legacy/ButtonBase/ButtonBase.js +3 -4
- package/legacy/ButtonBase/Ripple.js +1 -1
- package/legacy/ButtonBase/TouchRipple.js +3 -4
- package/legacy/ButtonGroup/ButtonGroup.js +164 -69
- package/legacy/ButtonGroup/buttonGroupClasses.js +1 -1
- package/legacy/Card/Card.js +4 -6
- package/legacy/CardActionArea/CardActionArea.js +3 -4
- package/legacy/CardActions/CardActions.js +16 -13
- package/legacy/CardContent/CardContent.js +7 -9
- package/legacy/CardHeader/CardHeader.js +3 -4
- package/legacy/CardMedia/CardMedia.js +24 -16
- package/legacy/Chip/Chip.js +199 -107
- package/legacy/CssBaseline/CssBaseline.js +1 -2
- package/legacy/Divider/Divider.js +148 -88
- package/legacy/FormControl/FormControl.js +37 -23
- package/legacy/FormControlLabel/FormControlLabel.js +42 -25
- package/legacy/FormGroup/FormGroup.js +15 -12
- package/legacy/Grid/Grid.js +3 -0
- package/legacy/ImageListItemBar/ImageListItemBar.js +1 -2
- package/legacy/InputAdornment/InputAdornment.js +1 -2
- package/legacy/InputBase/InputBase.js +1 -2
- package/legacy/LinearProgress/LinearProgress.js +1 -2
- package/legacy/List/List.js +1 -2
- package/legacy/ListItem/ListItem.js +1 -2
- package/legacy/ListItemText/ListItemText.js +1 -2
- package/legacy/MobileStepper/MobileStepper.js +80 -48
- package/legacy/Modal/Modal.js +20 -15
- package/legacy/NativeSelect/NativeSelectInput.js +1 -2
- package/legacy/OutlinedInput/OutlinedInput.js +1 -2
- package/legacy/PaginationItem/PaginationItem.js +1 -2
- package/legacy/Popover/Popover.js +2 -2
- package/legacy/Radio/RadioButtonIcon.js +1 -2
- package/legacy/Rating/Rating.js +1 -2
- package/legacy/Select/SelectInput.js +1 -2
- package/legacy/Slider/Slider.js +25 -26
- package/legacy/Slider/SliderValueLabel.js +1 -2
- package/legacy/SnackbarContent/SnackbarContent.js +1 -2
- package/legacy/SpeedDial/SpeedDial.js +1 -2
- package/legacy/SpeedDialAction/SpeedDialAction.js +1 -2
- package/legacy/SpeedDialIcon/SpeedDialIcon.js +1 -2
- package/legacy/Step/Step.js +22 -14
- package/legacy/StepButton/StepButton.js +17 -15
- package/legacy/StepConnector/StepConnector.js +46 -28
- package/legacy/StepContent/StepContent.js +15 -10
- package/legacy/StepIcon/StepIcon.js +3 -4
- package/legacy/StepLabel/StepLabel.js +65 -44
- package/legacy/Stepper/Stepper.js +28 -15
- package/legacy/SvgIcon/SvgIcon.js +1 -2
- package/legacy/SwipeableDrawer/SwipeableDrawer.js +1 -2
- package/legacy/Switch/Switch.js +1 -2
- package/legacy/Table/Table.js +0 -2
- package/legacy/TablePagination/TablePagination.js +1 -2
- package/legacy/TablePagination/TablePaginationActions.js +1 -2
- package/legacy/TableSortLabel/TableSortLabel.js +1 -2
- package/legacy/Tabs/Tabs.js +1 -2
- package/legacy/TextField/TextField.js +1 -2
- package/legacy/Tooltip/Tooltip.js +1 -2
- package/legacy/index.js +1 -1
- package/legacy/internal/SwitchBase.js +1 -2
- package/legacy/styles/CssVarsProvider.js +1 -3
- package/legacy/styles/createGetSelector.js +21 -0
- package/legacy/styles/experimental_extendTheme.js +50 -9
- package/legacy/zero-styled/index.js +1 -0
- package/modern/Accordion/Accordion.js +1 -2
- package/modern/AccordionSummary/AccordionSummary.js +1 -2
- package/modern/Alert/Alert.js +1 -2
- package/modern/AppBar/AppBar.js +118 -68
- package/modern/Autocomplete/Autocomplete.js +1 -2
- package/modern/AvatarGroup/AvatarGroup.js +25 -22
- package/modern/Backdrop/Backdrop.js +50 -32
- package/modern/Badge/Badge.js +3 -6
- package/modern/BottomNavigation/BottomNavigation.js +2 -2
- package/modern/BottomNavigationAction/BottomNavigationAction.js +40 -24
- package/modern/Breadcrumbs/Breadcrumbs.js +2 -2
- package/modern/Button/Button.js +221 -133
- package/modern/ButtonBase/ButtonBase.js +3 -4
- package/modern/ButtonBase/Ripple.js +1 -1
- package/modern/ButtonBase/TouchRipple.js +3 -4
- package/modern/ButtonGroup/ButtonGroup.js +168 -71
- package/modern/ButtonGroup/buttonGroupClasses.js +1 -1
- package/modern/Card/Card.js +4 -6
- package/modern/CardActionArea/CardActionArea.js +3 -4
- package/modern/CardActions/CardActions.js +16 -12
- package/modern/CardContent/CardContent.js +7 -9
- package/modern/CardHeader/CardHeader.js +3 -4
- package/modern/CardMedia/CardMedia.js +22 -13
- package/modern/Chip/Chip.js +191 -122
- package/modern/CssBaseline/CssBaseline.js +1 -2
- package/modern/Divider/Divider.js +140 -81
- package/modern/FormControl/FormControl.js +30 -15
- package/modern/FormControlLabel/FormControlLabel.js +38 -22
- package/modern/FormGroup/FormGroup.js +14 -10
- package/modern/Grid/Grid.js +3 -0
- package/modern/ImageListItemBar/ImageListItemBar.js +1 -2
- package/modern/InputAdornment/InputAdornment.js +1 -2
- package/modern/InputBase/InputBase.js +1 -2
- package/modern/LinearProgress/LinearProgress.js +1 -2
- package/modern/List/List.js +1 -2
- package/modern/ListItem/ListItem.js +1 -2
- package/modern/ListItemText/ListItemText.js +1 -2
- package/modern/MobileStepper/MobileStepper.js +80 -47
- package/modern/Modal/Modal.js +15 -11
- package/modern/NativeSelect/NativeSelectInput.js +1 -2
- package/modern/OutlinedInput/OutlinedInput.js +1 -2
- package/modern/PaginationItem/PaginationItem.js +1 -2
- package/modern/Popover/Popover.js +2 -2
- package/modern/Radio/RadioButtonIcon.js +1 -2
- package/modern/Rating/Rating.js +1 -2
- package/modern/Select/SelectInput.js +1 -2
- package/modern/Slider/Slider.js +23 -24
- package/modern/Slider/SliderValueLabel.js +1 -2
- package/modern/SnackbarContent/SnackbarContent.js +1 -2
- package/modern/SpeedDial/SpeedDial.js +1 -2
- package/modern/SpeedDialAction/SpeedDialAction.js +1 -2
- package/modern/SpeedDialIcon/SpeedDialIcon.js +1 -2
- package/modern/Step/Step.js +23 -14
- package/modern/StepButton/StepButton.js +17 -14
- package/modern/StepConnector/StepConnector.js +45 -26
- package/modern/StepContent/StepContent.js +13 -8
- package/modern/StepIcon/StepIcon.js +3 -4
- package/modern/StepLabel/StepLabel.js +47 -26
- package/modern/Stepper/Stepper.js +29 -15
- package/modern/SvgIcon/SvgIcon.js +1 -2
- package/modern/SwipeableDrawer/SwipeableDrawer.js +1 -2
- package/modern/Switch/Switch.js +1 -2
- package/modern/Table/Table.js +0 -2
- package/modern/TablePagination/TablePagination.js +1 -2
- package/modern/TablePagination/TablePaginationActions.js +1 -2
- package/modern/TableSortLabel/TableSortLabel.js +1 -2
- package/modern/Tabs/Tabs.js +1 -2
- package/modern/TextField/TextField.js +1 -2
- package/modern/Tooltip/Tooltip.js +1 -2
- package/modern/index.js +1 -1
- package/modern/internal/SwitchBase.js +1 -2
- package/modern/styles/CssVarsProvider.js +1 -3
- package/modern/styles/createGetSelector.js +21 -0
- package/modern/styles/experimental_extendTheme.js +45 -10
- package/modern/zero-styled/index.js +1 -0
- package/node/Accordion/Accordion.js +1 -1
- package/node/Accordion/AccordionContext.js +1 -1
- package/node/Accordion/index.js +1 -1
- package/node/AccordionActions/AccordionActions.js +1 -1
- package/node/AccordionActions/index.js +1 -1
- package/node/AccordionDetails/AccordionDetails.js +1 -1
- package/node/AccordionDetails/index.js +1 -1
- package/node/AccordionSummary/AccordionSummary.js +1 -1
- package/node/AccordionSummary/index.js +1 -1
- package/node/Alert/Alert.js +1 -1
- package/node/Alert/index.js +1 -1
- package/node/AlertTitle/AlertTitle.js +1 -1
- package/node/AlertTitle/index.js +1 -1
- package/node/AppBar/AppBar.js +126 -67
- package/node/AppBar/index.js +1 -1
- package/node/Autocomplete/Autocomplete.js +1 -1
- package/node/Autocomplete/index.js +1 -1
- package/node/Avatar/Avatar.js +1 -1
- package/node/Avatar/index.js +1 -1
- package/node/AvatarGroup/AvatarGroup.js +27 -23
- package/node/AvatarGroup/index.js +1 -1
- package/node/Backdrop/Backdrop.js +53 -36
- package/node/Backdrop/index.js +1 -1
- package/node/Badge/Badge.js +3 -5
- package/node/Badge/index.js +1 -1
- package/node/BottomNavigation/BottomNavigation.js +5 -5
- package/node/BottomNavigation/index.js +1 -1
- package/node/BottomNavigationAction/BottomNavigationAction.js +43 -26
- package/node/BottomNavigationAction/index.js +1 -1
- package/node/Box/index.js +1 -1
- package/node/Breadcrumbs/BreadcrumbCollapsed.js +1 -1
- package/node/Breadcrumbs/Breadcrumbs.js +7 -7
- package/node/Breadcrumbs/index.js +1 -1
- package/node/Button/Button.js +225 -136
- package/node/Button/index.js +1 -1
- package/node/ButtonBase/ButtonBase.js +5 -5
- package/node/ButtonBase/Ripple.js +2 -2
- package/node/ButtonBase/TouchRipple.js +10 -11
- package/node/ButtonBase/index.js +1 -1
- package/node/ButtonGroup/ButtonGroup.js +171 -74
- package/node/ButtonGroup/ButtonGroupButtonContext.js +1 -1
- package/node/ButtonGroup/ButtonGroupContext.js +1 -1
- package/node/ButtonGroup/buttonGroupClasses.js +1 -1
- package/node/ButtonGroup/index.js +1 -1
- package/node/Card/Card.js +7 -9
- package/node/Card/index.js +1 -1
- package/node/CardActionArea/CardActionArea.js +6 -6
- package/node/CardActionArea/index.js +1 -1
- package/node/CardActions/CardActions.js +19 -15
- package/node/CardActions/index.js +1 -1
- package/node/CardContent/CardContent.js +10 -12
- package/node/CardContent/index.js +1 -1
- package/node/CardHeader/CardHeader.js +8 -8
- package/node/CardHeader/index.js +1 -1
- package/node/CardMedia/CardMedia.js +25 -16
- package/node/CardMedia/index.js +1 -1
- package/node/Checkbox/Checkbox.js +1 -1
- package/node/Checkbox/index.js +1 -1
- package/node/Chip/Chip.js +194 -124
- package/node/Chip/index.js +1 -1
- package/node/CircularProgress/CircularProgress.js +1 -1
- package/node/CircularProgress/index.js +1 -1
- package/node/Collapse/Collapse.js +1 -1
- package/node/Collapse/index.js +1 -1
- package/node/Container/index.js +1 -1
- package/node/CssBaseline/CssBaseline.js +1 -1
- package/node/Dialog/Dialog.js +1 -1
- package/node/Dialog/DialogContext.js +1 -1
- package/node/Dialog/index.js +1 -1
- package/node/DialogActions/DialogActions.js +1 -1
- package/node/DialogActions/index.js +1 -1
- package/node/DialogContent/DialogContent.js +1 -1
- package/node/DialogContent/index.js +1 -1
- package/node/DialogContentText/DialogContentText.js +1 -1
- package/node/DialogContentText/index.js +1 -1
- package/node/DialogTitle/DialogTitle.js +1 -1
- package/node/DialogTitle/index.js +1 -1
- package/node/Divider/Divider.js +144 -85
- package/node/Divider/index.js +1 -1
- package/node/Drawer/Drawer.js +1 -1
- package/node/Drawer/index.js +1 -1
- package/node/Fab/Fab.js +1 -1
- package/node/Fab/index.js +1 -1
- package/node/Fade/Fade.js +1 -1
- package/node/FilledInput/FilledInput.js +1 -1
- package/node/FilledInput/index.js +1 -1
- package/node/FormControl/FormControl.js +33 -18
- package/node/FormControl/FormControlContext.js +1 -1
- package/node/FormControl/index.js +1 -1
- package/node/FormControl/useFormControl.js +1 -1
- package/node/FormControlLabel/FormControlLabel.js +41 -24
- package/node/FormControlLabel/index.js +1 -1
- package/node/FormGroup/FormGroup.js +17 -13
- package/node/FormGroup/index.js +1 -1
- package/node/FormHelperText/FormHelperText.js +1 -1
- package/node/FormHelperText/index.js +1 -1
- package/node/FormLabel/FormLabel.js +1 -1
- package/node/FormLabel/index.js +1 -1
- package/node/GlobalStyles/GlobalStyles.js +1 -1
- package/node/Grid/Grid.js +4 -1
- package/node/Grid/GridContext.js +1 -1
- package/node/Grid/index.js +1 -1
- package/node/Grow/Grow.js +1 -1
- package/node/Hidden/Hidden.js +1 -1
- package/node/Hidden/HiddenCss.js +1 -1
- package/node/Hidden/HiddenJs.js +1 -1
- package/node/Hidden/withWidth.js +1 -1
- package/node/Icon/Icon.js +1 -1
- package/node/Icon/index.js +1 -1
- package/node/IconButton/IconButton.js +1 -1
- package/node/IconButton/index.js +1 -1
- package/node/ImageList/ImageList.js +1 -1
- package/node/ImageList/ImageListContext.js +1 -1
- package/node/ImageList/index.js +1 -1
- package/node/ImageListItem/ImageListItem.js +1 -1
- package/node/ImageListItem/index.js +1 -1
- package/node/ImageListItemBar/ImageListItemBar.js +1 -1
- package/node/ImageListItemBar/index.js +1 -1
- package/node/Input/Input.js +1 -1
- package/node/Input/index.js +1 -1
- package/node/InputAdornment/InputAdornment.js +1 -1
- package/node/InputAdornment/index.js +1 -1
- package/node/InputBase/InputBase.js +1 -1
- package/node/InputBase/index.js +1 -1
- package/node/InputLabel/InputLabel.js +1 -1
- package/node/InputLabel/index.js +1 -1
- package/node/LinearProgress/LinearProgress.js +1 -1
- package/node/LinearProgress/index.js +1 -1
- package/node/Link/Link.js +1 -1
- package/node/Link/index.js +1 -1
- package/node/List/List.js +1 -1
- package/node/List/ListContext.js +1 -1
- package/node/List/index.js +1 -1
- package/node/ListItem/ListItem.js +1 -1
- package/node/ListItem/index.js +1 -1
- package/node/ListItemAvatar/ListItemAvatar.js +1 -1
- package/node/ListItemAvatar/index.js +1 -1
- package/node/ListItemButton/ListItemButton.js +1 -1
- package/node/ListItemButton/index.js +1 -1
- package/node/ListItemIcon/ListItemIcon.js +1 -1
- package/node/ListItemIcon/index.js +1 -1
- package/node/ListItemSecondaryAction/ListItemSecondaryAction.js +1 -1
- package/node/ListItemSecondaryAction/index.js +1 -1
- package/node/ListItemText/ListItemText.js +1 -1
- package/node/ListItemText/index.js +1 -1
- package/node/ListSubheader/ListSubheader.js +1 -1
- package/node/ListSubheader/index.js +1 -1
- package/node/Menu/Menu.js +1 -1
- package/node/Menu/index.js +1 -1
- package/node/MenuItem/MenuItem.js +1 -1
- package/node/MenuItem/index.js +1 -1
- package/node/MenuList/MenuList.js +1 -1
- package/node/MobileStepper/MobileStepper.js +86 -52
- package/node/MobileStepper/index.js +1 -1
- package/node/Modal/Modal.js +18 -13
- package/node/Modal/index.js +1 -1
- package/node/NativeSelect/NativeSelect.js +1 -1
- package/node/NativeSelect/NativeSelectInput.js +1 -1
- package/node/NativeSelect/index.js +1 -1
- package/node/OutlinedInput/NotchedOutline.js +1 -1
- package/node/OutlinedInput/OutlinedInput.js +1 -1
- package/node/OutlinedInput/index.js +1 -1
- package/node/Pagination/Pagination.js +1 -1
- package/node/Pagination/index.js +1 -1
- package/node/PaginationItem/PaginationItem.js +1 -1
- package/node/PaginationItem/index.js +1 -1
- package/node/Paper/Paper.js +1 -1
- package/node/Paper/index.js +1 -1
- package/node/Popover/Popover.js +6 -6
- package/node/Popover/index.js +1 -1
- package/node/Popper/Popper.js +1 -1
- package/node/Radio/Radio.js +1 -1
- package/node/Radio/RadioButtonIcon.js +1 -1
- package/node/Radio/index.js +1 -1
- package/node/RadioGroup/RadioGroup.js +1 -1
- package/node/RadioGroup/RadioGroupContext.js +1 -1
- package/node/RadioGroup/index.js +1 -1
- package/node/RadioGroup/useRadioGroup.js +1 -1
- package/node/Rating/Rating.js +1 -1
- package/node/Rating/index.js +1 -1
- package/node/ScopedCssBaseline/ScopedCssBaseline.js +1 -1
- package/node/ScopedCssBaseline/index.js +1 -1
- package/node/Select/Select.js +1 -1
- package/node/Select/SelectInput.js +1 -1
- package/node/Select/index.js +1 -1
- package/node/Skeleton/Skeleton.js +1 -1
- package/node/Skeleton/index.js +1 -1
- package/node/Slide/Slide.js +1 -1
- package/node/Slider/Slider.js +26 -26
- package/node/Slider/SliderValueLabel.js +1 -1
- package/node/Slider/index.js +1 -1
- package/node/Snackbar/Snackbar.js +1 -1
- package/node/Snackbar/index.js +1 -1
- package/node/SnackbarContent/SnackbarContent.js +1 -1
- package/node/SnackbarContent/index.js +1 -1
- package/node/SpeedDial/SpeedDial.js +1 -1
- package/node/SpeedDial/index.js +1 -1
- package/node/SpeedDialAction/SpeedDialAction.js +1 -1
- package/node/SpeedDialAction/index.js +1 -1
- package/node/SpeedDialIcon/SpeedDialIcon.js +1 -1
- package/node/SpeedDialIcon/index.js +1 -1
- package/node/Step/Step.js +25 -15
- package/node/Step/StepContext.js +1 -1
- package/node/Step/index.js +1 -1
- package/node/StepButton/StepButton.js +20 -17
- package/node/StepButton/index.js +1 -1
- package/node/StepConnector/StepConnector.js +49 -30
- package/node/StepConnector/index.js +1 -1
- package/node/StepContent/StepContent.js +17 -12
- package/node/StepContent/index.js +1 -1
- package/node/StepIcon/StepIcon.js +6 -6
- package/node/StepIcon/index.js +1 -1
- package/node/StepLabel/StepLabel.js +52 -31
- package/node/StepLabel/index.js +1 -1
- package/node/Stepper/Stepper.js +32 -18
- package/node/Stepper/StepperContext.js +1 -1
- package/node/Stepper/index.js +1 -1
- package/node/SvgIcon/SvgIcon.js +1 -1
- package/node/SvgIcon/index.js +1 -1
- package/node/SwipeableDrawer/SwipeArea.js +1 -1
- package/node/SwipeableDrawer/SwipeableDrawer.js +1 -1
- package/node/Switch/Switch.js +1 -1
- package/node/Switch/index.js +1 -1
- package/node/Tab/Tab.js +1 -1
- package/node/Tab/index.js +1 -1
- package/node/TabScrollButton/TabScrollButton.js +1 -1
- package/node/TabScrollButton/index.js +1 -1
- package/node/Table/Table.js +1 -3
- package/node/Table/TableContext.js +1 -1
- package/node/Table/Tablelvl2Context.js +1 -1
- package/node/Table/index.js +1 -1
- package/node/TableBody/TableBody.js +1 -1
- package/node/TableBody/index.js +1 -1
- package/node/TableCell/TableCell.js +1 -1
- package/node/TableCell/index.js +1 -1
- package/node/TableContainer/TableContainer.js +1 -1
- package/node/TableContainer/index.js +1 -1
- package/node/TableFooter/TableFooter.js +1 -1
- package/node/TableFooter/index.js +1 -1
- package/node/TableHead/TableHead.js +1 -1
- package/node/TableHead/index.js +1 -1
- package/node/TablePagination/TablePagination.js +1 -1
- package/node/TablePagination/TablePaginationActions.js +1 -1
- package/node/TablePagination/index.js +1 -1
- package/node/TableRow/TableRow.js +1 -1
- package/node/TableRow/index.js +1 -1
- package/node/TableSortLabel/TableSortLabel.js +1 -1
- package/node/TableSortLabel/index.js +1 -1
- package/node/Tabs/ScrollbarSize.js +1 -1
- package/node/Tabs/Tabs.js +1 -1
- package/node/Tabs/index.js +1 -1
- package/node/TextField/TextField.js +1 -1
- package/node/TextField/index.js +1 -1
- package/node/ToggleButton/ToggleButton.js +1 -1
- package/node/ToggleButton/index.js +1 -1
- package/node/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/node/ToggleButtonGroup/ToggleButtonGroupButtonContext.js +1 -1
- package/node/ToggleButtonGroup/ToggleButtonGroupContext.js +1 -1
- package/node/ToggleButtonGroup/index.js +1 -1
- package/node/Toolbar/Toolbar.js +1 -1
- package/node/Toolbar/index.js +1 -1
- package/node/Tooltip/Tooltip.js +1 -1
- package/node/Tooltip/index.js +1 -1
- package/node/Typography/Typography.js +1 -1
- package/node/Typography/index.js +1 -1
- package/node/Unstable_Grid2/index.js +1 -1
- package/node/Zoom/Zoom.js +1 -1
- package/node/index.js +2 -2
- package/node/internal/SwitchBase.js +1 -1
- package/node/internal/svg-icons/Add.js +1 -1
- package/node/internal/svg-icons/ArrowDownward.js +1 -1
- package/node/internal/svg-icons/ArrowDropDown.js +1 -1
- package/node/internal/svg-icons/Cancel.js +1 -1
- package/node/internal/svg-icons/CheckBox.js +1 -1
- package/node/internal/svg-icons/CheckBoxOutlineBlank.js +1 -1
- package/node/internal/svg-icons/CheckCircle.js +1 -1
- package/node/internal/svg-icons/Close.js +1 -1
- package/node/internal/svg-icons/ErrorOutline.js +1 -1
- package/node/internal/svg-icons/FirstPage.js +1 -1
- package/node/internal/svg-icons/IndeterminateCheckBox.js +1 -1
- package/node/internal/svg-icons/InfoOutlined.js +1 -1
- package/node/internal/svg-icons/KeyboardArrowLeft.js +1 -1
- package/node/internal/svg-icons/KeyboardArrowRight.js +1 -1
- package/node/internal/svg-icons/LastPage.js +1 -1
- package/node/internal/svg-icons/MoreHoriz.js +1 -1
- package/node/internal/svg-icons/NavigateBefore.js +1 -1
- package/node/internal/svg-icons/NavigateNext.js +1 -1
- package/node/internal/svg-icons/Person.js +1 -1
- package/node/internal/svg-icons/RadioButtonChecked.js +1 -1
- package/node/internal/svg-icons/RadioButtonUnchecked.js +1 -1
- package/node/internal/svg-icons/ReportProblemOutlined.js +1 -1
- package/node/internal/svg-icons/Star.js +1 -1
- package/node/internal/svg-icons/StarBorder.js +1 -1
- package/node/internal/svg-icons/SuccessOutlined.js +1 -1
- package/node/internal/svg-icons/Warning.js +1 -1
- package/node/styles/CssVarsProvider.js +1 -3
- package/node/styles/ThemeProvider.js +1 -1
- package/node/styles/createGetSelector.js +29 -0
- package/node/styles/createTheme.js +1 -1
- package/node/styles/experimental_extendTheme.js +46 -11
- package/node/styles/index.js +1 -1
- package/node/styles/useTheme.js +1 -1
- package/node/useAutocomplete/index.js +1 -1
- package/node/useScrollTrigger/useScrollTrigger.js +1 -1
- package/node/useTouchRipple/useTouchRipple.js +1 -1
- package/node/utils/createSvgIcon.js +1 -1
- package/node/zero-styled/index.js +7 -0
- package/package.json +6 -6
- package/styles/CssVarsProvider.js +1 -3
- package/styles/createGetSelector.d.ts +10 -0
- package/styles/createGetSelector.js +21 -0
- package/styles/createTheme.js +1 -1
- package/styles/excludeVariablesFromRoot.d.ts +1 -1
- package/styles/experimental_extendTheme.d.ts +25 -5
- package/styles/experimental_extendTheme.js +52 -18
- package/styles/shouldSkipGeneratingVar.js +1 -2
- package/transitions/utils.js +2 -3
- package/umd/material-ui.development.js +1718 -1047
- package/umd/material-ui.production.min.js +4 -4
- package/useTouchRipple/useTouchRipple.js +4 -8
- package/utils/useSlot.js +1 -1
- package/zero-styled/index.d.ts +1 -0
- package/zero-styled/index.js +1 -0
package/Button/Button.js
CHANGED
|
@@ -9,15 +9,15 @@ import clsx from 'clsx';
|
|
|
9
9
|
import resolveProps from '@mui/utils/resolveProps';
|
|
10
10
|
import composeClasses from '@mui/utils/composeClasses';
|
|
11
11
|
import { alpha } from '@mui/system/colorManipulator';
|
|
12
|
-
import
|
|
13
|
-
import
|
|
12
|
+
import { rootShouldForwardProp } from '../styles/styled';
|
|
13
|
+
import { styled, createUseThemeProps } from '../zero-styled';
|
|
14
14
|
import ButtonBase from '../ButtonBase';
|
|
15
15
|
import capitalize from '../utils/capitalize';
|
|
16
16
|
import buttonClasses, { getButtonUtilityClass } from './buttonClasses';
|
|
17
17
|
import ButtonGroupContext from '../ButtonGroup/ButtonGroupContext';
|
|
18
18
|
import ButtonGroupButtonContext from '../ButtonGroup/ButtonGroupButtonContext';
|
|
19
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
-
|
|
19
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
+
const useThemeProps = createUseThemeProps('MuiButton');
|
|
21
21
|
const useUtilityClasses = ownerState => {
|
|
22
22
|
const {
|
|
23
23
|
color,
|
|
@@ -36,19 +36,34 @@ const useUtilityClasses = ownerState => {
|
|
|
36
36
|
const composedClasses = composeClasses(slots, getButtonUtilityClass, classes);
|
|
37
37
|
return _extends({}, classes, composedClasses);
|
|
38
38
|
};
|
|
39
|
-
const commonIconStyles =
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
const commonIconStyles = [{
|
|
40
|
+
props: {
|
|
41
|
+
size: 'small'
|
|
42
|
+
},
|
|
43
|
+
style: {
|
|
44
|
+
'& > *:nth-of-type(1)': {
|
|
45
|
+
fontSize: 18
|
|
46
|
+
}
|
|
42
47
|
}
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
}, {
|
|
49
|
+
props: {
|
|
50
|
+
size: 'medium'
|
|
51
|
+
},
|
|
52
|
+
style: {
|
|
53
|
+
'& > *:nth-of-type(1)': {
|
|
54
|
+
fontSize: 20
|
|
55
|
+
}
|
|
46
56
|
}
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
|
|
57
|
+
}, {
|
|
58
|
+
props: {
|
|
59
|
+
size: 'large'
|
|
60
|
+
},
|
|
61
|
+
style: {
|
|
62
|
+
'& > *:nth-of-type(1)': {
|
|
63
|
+
fontSize: 22
|
|
64
|
+
}
|
|
50
65
|
}
|
|
51
|
-
}
|
|
66
|
+
}];
|
|
52
67
|
const ButtonRoot = styled(ButtonBase, {
|
|
53
68
|
shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',
|
|
54
69
|
name: 'MuiButton',
|
|
@@ -60,128 +75,192 @@ const ButtonRoot = styled(ButtonBase, {
|
|
|
60
75
|
return [styles.root, styles[ownerState.variant], styles[`${ownerState.variant}${capitalize(ownerState.color)}`], styles[`size${capitalize(ownerState.size)}`], styles[`${ownerState.variant}Size${capitalize(ownerState.size)}`], ownerState.color === 'inherit' && styles.colorInherit, ownerState.disableElevation && styles.disableElevation, ownerState.fullWidth && styles.fullWidth];
|
|
61
76
|
}
|
|
62
77
|
})(({
|
|
63
|
-
theme
|
|
64
|
-
ownerState
|
|
78
|
+
theme
|
|
65
79
|
}) => {
|
|
66
|
-
var _theme$palette$getCon, _theme$palette;
|
|
67
80
|
const inheritContainedBackgroundColor = theme.palette.mode === 'light' ? theme.palette.grey[300] : theme.palette.grey[800];
|
|
68
81
|
const inheritContainedHoverBackgroundColor = theme.palette.mode === 'light' ? theme.palette.grey.A100 : theme.palette.grey[700];
|
|
69
82
|
return _extends({}, theme.typography.button, {
|
|
70
83
|
minWidth: 64,
|
|
71
84
|
padding: '6px 16px',
|
|
85
|
+
border: 0,
|
|
72
86
|
borderRadius: (theme.vars || theme).shape.borderRadius,
|
|
73
87
|
transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color', 'color'], {
|
|
74
88
|
duration: theme.transitions.duration.short
|
|
75
89
|
}),
|
|
76
|
-
'&:hover':
|
|
77
|
-
textDecoration: 'none'
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
90
|
+
'&:hover': {
|
|
91
|
+
textDecoration: 'none'
|
|
92
|
+
},
|
|
93
|
+
[`&.${buttonClasses.disabled}`]: {
|
|
94
|
+
color: (theme.vars || theme).palette.action.disabled
|
|
95
|
+
},
|
|
96
|
+
variants: [{
|
|
97
|
+
props: {
|
|
98
|
+
variant: 'contained'
|
|
99
|
+
},
|
|
100
|
+
style: {
|
|
101
|
+
color: `var(--variant-containedColor)`,
|
|
102
|
+
backgroundColor: `var(--variant-containedBg)`,
|
|
103
|
+
boxShadow: (theme.vars || theme).shadows[2],
|
|
104
|
+
'&:hover': {
|
|
105
|
+
boxShadow: (theme.vars || theme).shadows[4],
|
|
106
|
+
// Reset on touch devices, it doesn't add specificity
|
|
107
|
+
'@media (hover: none)': {
|
|
108
|
+
boxShadow: (theme.vars || theme).shadows[2]
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
'&:active': {
|
|
112
|
+
boxShadow: (theme.vars || theme).shadows[8]
|
|
113
|
+
},
|
|
114
|
+
[`&.${buttonClasses.focusVisible}`]: {
|
|
115
|
+
boxShadow: (theme.vars || theme).shadows[6]
|
|
116
|
+
},
|
|
117
|
+
[`&.${buttonClasses.disabled}`]: {
|
|
118
|
+
color: (theme.vars || theme).palette.action.disabled,
|
|
119
|
+
boxShadow: (theme.vars || theme).shadows[0],
|
|
120
|
+
backgroundColor: (theme.vars || theme).palette.action.disabledBackground
|
|
121
|
+
}
|
|
82
122
|
}
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
123
|
+
}, {
|
|
124
|
+
props: {
|
|
125
|
+
variant: 'outlined'
|
|
126
|
+
},
|
|
127
|
+
style: {
|
|
128
|
+
padding: '5px 15px',
|
|
129
|
+
border: '1px solid currentColor',
|
|
130
|
+
borderColor: `var(--variant-outlinedBorder, currentColor)`,
|
|
131
|
+
backgroundColor: `var(--variant-outlinedBg)`,
|
|
132
|
+
color: `var(--variant-outlinedColor)`,
|
|
133
|
+
[`&.${buttonClasses.disabled}`]: {
|
|
134
|
+
border: `1px solid ${(theme.vars || theme).palette.action.disabledBackground}`
|
|
135
|
+
}
|
|
88
136
|
}
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
137
|
+
}, {
|
|
138
|
+
props: {
|
|
139
|
+
variant: 'text'
|
|
140
|
+
},
|
|
141
|
+
style: {
|
|
142
|
+
padding: '6px 8px',
|
|
143
|
+
color: `var(--variant-textColor)`,
|
|
144
|
+
backgroundColor: `var(--variant-textBg)`
|
|
95
145
|
}
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
146
|
+
}, ...Object.entries(theme.palette).filter(([, palette]) => palette.main && palette.dark && palette.contrastText).map(([color]) => ({
|
|
147
|
+
props: {
|
|
148
|
+
color
|
|
149
|
+
},
|
|
150
|
+
style: {
|
|
151
|
+
'--variant-textColor': (theme.vars || theme).palette[color].main,
|
|
152
|
+
'--variant-outlinedColor': (theme.vars || theme).palette[color].main,
|
|
153
|
+
'--variant-outlinedBorder': theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / 0.5)` : alpha(theme.palette[color].main, 0.5),
|
|
154
|
+
'--variant-containedColor': (theme.vars || theme).palette[color].contrastText,
|
|
155
|
+
'--variant-containedBg': (theme.vars || theme).palette[color].main,
|
|
156
|
+
'@media (hover: hover)': {
|
|
157
|
+
'&:hover': {
|
|
158
|
+
'--variant-containedBg': (theme.vars || theme).palette[color].dark,
|
|
159
|
+
'--variant-textBg': theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[color].main, theme.palette.action.hoverOpacity),
|
|
160
|
+
'--variant-outlinedBorder': (theme.vars || theme).palette[color].main,
|
|
161
|
+
'--variant-outlinedBg': theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[color].main, theme.palette.action.hoverOpacity)
|
|
162
|
+
}
|
|
163
|
+
}
|
|
103
164
|
}
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
165
|
+
})), {
|
|
166
|
+
props: {
|
|
167
|
+
color: 'inherit'
|
|
168
|
+
},
|
|
169
|
+
style: {
|
|
170
|
+
'--variant-containedColor': theme.vars ?
|
|
171
|
+
// this is safe because grey does not change between default light/dark mode
|
|
172
|
+
theme.vars.palette.text.primary : theme.palette.getContrastText?.(inheritContainedBackgroundColor),
|
|
173
|
+
'--variant-containedBg': theme.vars ? theme.vars.palette.Button.inheritContainedBg : inheritContainedBackgroundColor,
|
|
174
|
+
'@media (hover: hover)': {
|
|
175
|
+
'&:hover': {
|
|
176
|
+
'--variant-containedBg': theme.vars ? theme.vars.palette.Button.inheritContainedHoverBg : inheritContainedHoverBackgroundColor,
|
|
177
|
+
'--variant-textBg': theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity),
|
|
178
|
+
'--variant-outlinedBg': theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity)
|
|
179
|
+
}
|
|
180
|
+
}
|
|
109
181
|
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
182
|
+
}, {
|
|
183
|
+
props: {
|
|
184
|
+
size: 'small',
|
|
185
|
+
variant: 'text'
|
|
186
|
+
},
|
|
187
|
+
style: {
|
|
188
|
+
padding: '4px 5px',
|
|
189
|
+
fontSize: theme.typography.pxToRem(13)
|
|
190
|
+
}
|
|
191
|
+
}, {
|
|
192
|
+
props: {
|
|
193
|
+
size: 'large',
|
|
194
|
+
variant: 'text'
|
|
195
|
+
},
|
|
196
|
+
style: {
|
|
197
|
+
padding: '8px 11px',
|
|
198
|
+
fontSize: theme.typography.pxToRem(15)
|
|
199
|
+
}
|
|
200
|
+
}, {
|
|
201
|
+
props: {
|
|
202
|
+
size: 'small',
|
|
203
|
+
variant: 'outlined'
|
|
204
|
+
},
|
|
205
|
+
style: {
|
|
206
|
+
padding: '3px 9px',
|
|
207
|
+
fontSize: theme.typography.pxToRem(13)
|
|
208
|
+
}
|
|
209
|
+
}, {
|
|
210
|
+
props: {
|
|
211
|
+
size: 'large',
|
|
212
|
+
variant: 'outlined'
|
|
213
|
+
},
|
|
214
|
+
style: {
|
|
215
|
+
padding: '7px 21px',
|
|
216
|
+
fontSize: theme.typography.pxToRem(15)
|
|
217
|
+
}
|
|
218
|
+
}, {
|
|
219
|
+
props: {
|
|
220
|
+
size: 'small',
|
|
221
|
+
variant: 'contained'
|
|
222
|
+
},
|
|
223
|
+
style: {
|
|
224
|
+
padding: '4px 10px',
|
|
225
|
+
fontSize: theme.typography.pxToRem(13)
|
|
226
|
+
}
|
|
227
|
+
}, {
|
|
228
|
+
props: {
|
|
229
|
+
size: 'large',
|
|
230
|
+
variant: 'contained'
|
|
231
|
+
},
|
|
232
|
+
style: {
|
|
233
|
+
padding: '8px 22px',
|
|
234
|
+
fontSize: theme.typography.pxToRem(15)
|
|
235
|
+
}
|
|
236
|
+
}, {
|
|
237
|
+
props: {
|
|
238
|
+
disableElevation: true
|
|
239
|
+
},
|
|
240
|
+
style: {
|
|
241
|
+
boxShadow: 'none',
|
|
242
|
+
'&:hover': {
|
|
243
|
+
boxShadow: 'none'
|
|
244
|
+
},
|
|
245
|
+
[`&.${buttonClasses.focusVisible}`]: {
|
|
246
|
+
boxShadow: 'none'
|
|
247
|
+
},
|
|
248
|
+
'&:active': {
|
|
249
|
+
boxShadow: 'none'
|
|
250
|
+
},
|
|
251
|
+
[`&.${buttonClasses.disabled}`]: {
|
|
252
|
+
boxShadow: 'none'
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}, {
|
|
256
|
+
props: {
|
|
257
|
+
fullWidth: true
|
|
258
|
+
},
|
|
259
|
+
style: {
|
|
260
|
+
width: '100%'
|
|
261
|
+
}
|
|
262
|
+
}]
|
|
168
263
|
});
|
|
169
|
-
}, ({
|
|
170
|
-
ownerState
|
|
171
|
-
}) => ownerState.disableElevation && {
|
|
172
|
-
boxShadow: 'none',
|
|
173
|
-
'&:hover': {
|
|
174
|
-
boxShadow: 'none'
|
|
175
|
-
},
|
|
176
|
-
[`&.${buttonClasses.focusVisible}`]: {
|
|
177
|
-
boxShadow: 'none'
|
|
178
|
-
},
|
|
179
|
-
'&:active': {
|
|
180
|
-
boxShadow: 'none'
|
|
181
|
-
},
|
|
182
|
-
[`&.${buttonClasses.disabled}`]: {
|
|
183
|
-
boxShadow: 'none'
|
|
184
|
-
}
|
|
185
264
|
});
|
|
186
265
|
const ButtonStartIcon = styled('span', {
|
|
187
266
|
name: 'MuiButton',
|
|
@@ -192,15 +271,19 @@ const ButtonStartIcon = styled('span', {
|
|
|
192
271
|
} = props;
|
|
193
272
|
return [styles.startIcon, styles[`iconSize${capitalize(ownerState.size)}`]];
|
|
194
273
|
}
|
|
195
|
-
})(({
|
|
196
|
-
ownerState
|
|
197
|
-
}) => _extends({
|
|
274
|
+
})(() => ({
|
|
198
275
|
display: 'inherit',
|
|
199
276
|
marginRight: 8,
|
|
200
|
-
marginLeft: -4
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
277
|
+
marginLeft: -4,
|
|
278
|
+
variants: [{
|
|
279
|
+
props: {
|
|
280
|
+
size: 'small'
|
|
281
|
+
},
|
|
282
|
+
style: {
|
|
283
|
+
marginLeft: -2
|
|
284
|
+
}
|
|
285
|
+
}, ...commonIconStyles]
|
|
286
|
+
}));
|
|
204
287
|
const ButtonEndIcon = styled('span', {
|
|
205
288
|
name: 'MuiButton',
|
|
206
289
|
slot: 'EndIcon',
|
|
@@ -210,15 +293,19 @@ const ButtonEndIcon = styled('span', {
|
|
|
210
293
|
} = props;
|
|
211
294
|
return [styles.endIcon, styles[`iconSize${capitalize(ownerState.size)}`]];
|
|
212
295
|
}
|
|
213
|
-
})(({
|
|
214
|
-
ownerState
|
|
215
|
-
}) => _extends({
|
|
296
|
+
})(() => ({
|
|
216
297
|
display: 'inherit',
|
|
217
298
|
marginRight: -4,
|
|
218
|
-
marginLeft: 8
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
299
|
+
marginLeft: 8,
|
|
300
|
+
variants: [{
|
|
301
|
+
props: {
|
|
302
|
+
size: 'small'
|
|
303
|
+
},
|
|
304
|
+
style: {
|
|
305
|
+
marginRight: -2
|
|
306
|
+
}
|
|
307
|
+
}, ...commonIconStyles]
|
|
308
|
+
}));
|
|
222
309
|
const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
|
|
223
310
|
// props priority: `inProps` > `contextProps` > `themeDefaultProps`
|
|
224
311
|
const contextProps = React.useContext(ButtonGroupContext);
|
package/ButtonBase/ButtonBase.js
CHANGED
|
@@ -9,15 +9,14 @@ import clsx from 'clsx';
|
|
|
9
9
|
import refType from '@mui/utils/refType';
|
|
10
10
|
import elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';
|
|
11
11
|
import composeClasses from '@mui/utils/composeClasses';
|
|
12
|
-
import styled from '../
|
|
13
|
-
import useThemeProps from '../styles/useThemeProps';
|
|
12
|
+
import { styled, createUseThemeProps } from '../zero-styled';
|
|
14
13
|
import useForkRef from '../utils/useForkRef';
|
|
15
14
|
import useEventCallback from '../utils/useEventCallback';
|
|
16
15
|
import useIsFocusVisible from '../utils/useIsFocusVisible';
|
|
17
16
|
import TouchRipple from './TouchRipple';
|
|
18
17
|
import buttonBaseClasses, { getButtonBaseUtilityClass } from './buttonBaseClasses';
|
|
19
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
-
|
|
18
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
+
const useThemeProps = createUseThemeProps('MuiButtonBase');
|
|
21
20
|
const useUtilityClasses = ownerState => {
|
|
22
21
|
const {
|
|
23
22
|
disabled,
|
package/ButtonBase/Ripple.js
CHANGED
|
@@ -50,7 +50,7 @@ function Ripple(props) {
|
|
|
50
50
|
})
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
process.env.NODE_ENV !== "production" ? Ripple.propTypes = {
|
|
53
|
+
process.env.NODE_ENV !== "production" ? Ripple.propTypes /* remove-proptypes */ = {
|
|
54
54
|
/**
|
|
55
55
|
* Override or extend the styles applied to the component.
|
|
56
56
|
*/
|
|
@@ -3,25 +3,19 @@
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["center", "classes", "className"];
|
|
6
|
-
let _ = t => t,
|
|
7
|
-
_t,
|
|
8
|
-
_t2,
|
|
9
|
-
_t3,
|
|
10
|
-
_t4;
|
|
11
6
|
import * as React from 'react';
|
|
12
7
|
import PropTypes from 'prop-types';
|
|
13
8
|
import { TransitionGroup } from 'react-transition-group';
|
|
14
9
|
import clsx from 'clsx';
|
|
15
|
-
import { keyframes } from '@mui/system';
|
|
16
10
|
import useTimeout from '@mui/utils/useTimeout';
|
|
17
|
-
import styled from '../
|
|
18
|
-
import useThemeProps from '../styles/useThemeProps';
|
|
11
|
+
import { keyframes, styled, createUseThemeProps } from '../zero-styled';
|
|
19
12
|
import Ripple from './Ripple';
|
|
20
13
|
import touchRippleClasses from './touchRippleClasses';
|
|
21
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
const useThemeProps = createUseThemeProps('MuiTouchRipple');
|
|
22
16
|
const DURATION = 550;
|
|
23
17
|
export const DELAY_RIPPLE = 80;
|
|
24
|
-
const enterKeyframe = keyframes
|
|
18
|
+
const enterKeyframe = keyframes`
|
|
25
19
|
0% {
|
|
26
20
|
transform: scale(0);
|
|
27
21
|
opacity: 0.1;
|
|
@@ -31,8 +25,8 @@ const enterKeyframe = keyframes(_t || (_t = _`
|
|
|
31
25
|
transform: scale(1);
|
|
32
26
|
opacity: 0.3;
|
|
33
27
|
}
|
|
34
|
-
|
|
35
|
-
const exitKeyframe = keyframes
|
|
28
|
+
`;
|
|
29
|
+
const exitKeyframe = keyframes`
|
|
36
30
|
0% {
|
|
37
31
|
opacity: 1;
|
|
38
32
|
}
|
|
@@ -40,8 +34,8 @@ const exitKeyframe = keyframes(_t2 || (_t2 = _`
|
|
|
40
34
|
100% {
|
|
41
35
|
opacity: 0;
|
|
42
36
|
}
|
|
43
|
-
|
|
44
|
-
const pulsateKeyframe = keyframes
|
|
37
|
+
`;
|
|
38
|
+
const pulsateKeyframe = keyframes`
|
|
45
39
|
0% {
|
|
46
40
|
transform: scale(1);
|
|
47
41
|
}
|
|
@@ -53,7 +47,7 @@ const pulsateKeyframe = keyframes(_t3 || (_t3 = _`
|
|
|
53
47
|
100% {
|
|
54
48
|
transform: scale(1);
|
|
55
49
|
}
|
|
56
|
-
|
|
50
|
+
`;
|
|
57
51
|
export const TouchRippleRoot = styled('span', {
|
|
58
52
|
name: 'MuiTouchRipple',
|
|
59
53
|
slot: 'Root'
|
|
@@ -74,23 +68,27 @@ export const TouchRippleRoot = styled('span', {
|
|
|
74
68
|
export const TouchRippleRipple = styled(Ripple, {
|
|
75
69
|
name: 'MuiTouchRipple',
|
|
76
70
|
slot: 'Ripple'
|
|
77
|
-
})
|
|
71
|
+
})`
|
|
78
72
|
opacity: 0;
|
|
79
73
|
position: absolute;
|
|
80
74
|
|
|
81
|
-
&.${
|
|
75
|
+
&.${touchRippleClasses.rippleVisible} {
|
|
82
76
|
opacity: 0.3;
|
|
83
77
|
transform: scale(1);
|
|
84
|
-
animation-name: ${
|
|
85
|
-
animation-duration: ${
|
|
86
|
-
animation-timing-function: ${
|
|
78
|
+
animation-name: ${enterKeyframe};
|
|
79
|
+
animation-duration: ${DURATION}ms;
|
|
80
|
+
animation-timing-function: ${({
|
|
81
|
+
theme
|
|
82
|
+
}) => theme.transitions.easing.easeInOut};
|
|
87
83
|
}
|
|
88
84
|
|
|
89
|
-
&.${
|
|
90
|
-
animation-duration: ${
|
|
85
|
+
&.${touchRippleClasses.ripplePulsate} {
|
|
86
|
+
animation-duration: ${({
|
|
87
|
+
theme
|
|
88
|
+
}) => theme.transitions.duration.shorter}ms;
|
|
91
89
|
}
|
|
92
90
|
|
|
93
|
-
& .${
|
|
91
|
+
& .${touchRippleClasses.child} {
|
|
94
92
|
opacity: 1;
|
|
95
93
|
display: block;
|
|
96
94
|
width: 100%;
|
|
@@ -99,33 +97,29 @@ export const TouchRippleRipple = styled(Ripple, {
|
|
|
99
97
|
background-color: currentColor;
|
|
100
98
|
}
|
|
101
99
|
|
|
102
|
-
& .${
|
|
100
|
+
& .${touchRippleClasses.childLeaving} {
|
|
103
101
|
opacity: 0;
|
|
104
|
-
animation-name: ${
|
|
105
|
-
animation-duration: ${
|
|
106
|
-
animation-timing-function: ${
|
|
102
|
+
animation-name: ${exitKeyframe};
|
|
103
|
+
animation-duration: ${DURATION}ms;
|
|
104
|
+
animation-timing-function: ${({
|
|
105
|
+
theme
|
|
106
|
+
}) => theme.transitions.easing.easeInOut};
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
& .${
|
|
109
|
+
& .${touchRippleClasses.childPulsate} {
|
|
110
110
|
position: absolute;
|
|
111
111
|
/* @noflip */
|
|
112
112
|
left: 0px;
|
|
113
113
|
top: 0;
|
|
114
|
-
animation-name: ${
|
|
114
|
+
animation-name: ${pulsateKeyframe};
|
|
115
115
|
animation-duration: 2500ms;
|
|
116
|
-
animation-timing-function: ${
|
|
116
|
+
animation-timing-function: ${({
|
|
117
|
+
theme
|
|
118
|
+
}) => theme.transitions.easing.easeInOut};
|
|
117
119
|
animation-iteration-count: infinite;
|
|
118
120
|
animation-delay: 200ms;
|
|
119
121
|
}
|
|
120
|
-
|
|
121
|
-
theme
|
|
122
|
-
}) => theme.transitions.easing.easeInOut, touchRippleClasses.ripplePulsate, ({
|
|
123
|
-
theme
|
|
124
|
-
}) => theme.transitions.duration.shorter, touchRippleClasses.child, touchRippleClasses.childLeaving, exitKeyframe, DURATION, ({
|
|
125
|
-
theme
|
|
126
|
-
}) => theme.transitions.easing.easeInOut, touchRippleClasses.childPulsate, pulsateKeyframe, ({
|
|
127
|
-
theme
|
|
128
|
-
}) => theme.transitions.easing.easeInOut);
|
|
122
|
+
`;
|
|
129
123
|
|
|
130
124
|
/**
|
|
131
125
|
* @ignore - internal component.
|
|
@@ -194,11 +188,11 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
|
|
|
194
188
|
center = centerProp || options.pulsate,
|
|
195
189
|
fakeElement = false // For test purposes
|
|
196
190
|
} = options;
|
|
197
|
-
if (
|
|
191
|
+
if (event?.type === 'mousedown' && ignoringMouseDown.current) {
|
|
198
192
|
ignoringMouseDown.current = false;
|
|
199
193
|
return;
|
|
200
194
|
}
|
|
201
|
-
if (
|
|
195
|
+
if (event?.type === 'touchstart') {
|
|
202
196
|
ignoringMouseDown.current = true;
|
|
203
197
|
}
|
|
204
198
|
const element = fakeElement ? null : container.current;
|
|
@@ -238,7 +232,7 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
|
|
|
238
232
|
}
|
|
239
233
|
|
|
240
234
|
// Touche devices
|
|
241
|
-
if (event
|
|
235
|
+
if (event?.touches) {
|
|
242
236
|
// check that this isn't another touchstart due to multitouch
|
|
243
237
|
// otherwise we will only clear a single timer when unmounting while two
|
|
244
238
|
// are running
|
|
@@ -282,7 +276,7 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
|
|
|
282
276
|
|
|
283
277
|
// The touch interaction occurs too quickly.
|
|
284
278
|
// We still want to show ripple effect.
|
|
285
|
-
if (
|
|
279
|
+
if (event?.type === 'touchend' && startTimerCommit.current) {
|
|
286
280
|
startTimerCommit.current();
|
|
287
281
|
startTimerCommit.current = null;
|
|
288
282
|
startTimer.start(0, () => {
|
|
@@ -315,7 +309,7 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
|
|
|
315
309
|
})
|
|
316
310
|
}));
|
|
317
311
|
});
|
|
318
|
-
process.env.NODE_ENV !== "production" ? TouchRipple.propTypes = {
|
|
312
|
+
process.env.NODE_ENV !== "production" ? TouchRipple.propTypes /* remove-proptypes */ = {
|
|
319
313
|
/**
|
|
320
314
|
* If `true`, the ripple starts at the center of the component
|
|
321
315
|
* rather than at the point of interaction.
|