@mui/material 5.6.2 → 5.7.0
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 +6 -6
- package/Accordion/accordionClasses.d.ts +18 -18
- package/AccordionActions/accordionActionsClasses.d.ts +10 -10
- package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
- package/AccordionSummary/AccordionSummary.js +3 -3
- package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
- package/Alert/alertClasses.d.ts +44 -44
- package/AlertTitle/alertTitleClasses.d.ts +8 -8
- package/AppBar/appBarClasses.d.ts +28 -28
- package/Autocomplete/Autocomplete.js +15 -14
- package/Autocomplete/autocompleteClasses.d.ts +54 -54
- package/Avatar/avatarClasses.d.ts +20 -20
- package/AvatarGroup/AvatarGroup.js +2 -2
- package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
- package/Backdrop/backdropClasses.d.ts +10 -10
- package/Badge/Badge.js +2 -2
- package/Badge/badgeClasses.d.ts +24 -24
- package/BottomNavigation/BottomNavigation.js +1 -1
- package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
- package/BottomNavigationAction/BottomNavigationAction.js +6 -5
- package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
- package/Box/Box.d.ts +9 -28
- package/Box/Box.js +25 -4
- package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
- package/Button/buttonClasses.d.ts +76 -76
- package/ButtonBase/buttonBaseClasses.d.ts +12 -12
- package/ButtonBase/touchRippleClasses.d.ts +20 -20
- package/ButtonGroup/ButtonGroup.js +10 -10
- package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
- package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
- package/CHANGELOG.md +225 -0
- package/Card/cardClasses.d.ts +8 -8
- package/CardActionArea/CardActionArea.js +2 -2
- package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
- package/CardActions/cardActionsClasses.d.ts +10 -10
- package/CardContent/cardContentClasses.d.ts +8 -8
- package/CardHeader/cardHeaderClasses.d.ts +18 -18
- package/CardMedia/cardMediaClasses.d.ts +12 -12
- package/Checkbox/checkboxClasses.d.ts +18 -18
- package/Chip/chipClasses.d.ts +80 -80
- package/CircularProgress/CircularProgress.js +1 -1
- package/CircularProgress/circularProgressClasses.d.ts +26 -26
- package/ClickAwayListener/index.d.ts +2 -2
- package/Collapse/collapseClasses.d.ts +18 -18
- package/Container/containerClasses.d.ts +22 -22
- package/CssBaseline/CssBaseline.js +4 -4
- package/Dialog/DialogContext.d.ts +6 -6
- package/Dialog/dialogClasses.d.ts +36 -36
- package/DialogActions/dialogActionsClasses.d.ts +10 -10
- package/DialogContent/DialogContent.js +2 -2
- package/DialogContent/dialogContentClasses.d.ts +10 -10
- package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
- package/DialogTitle/DialogTitle.d.ts +30 -15
- package/DialogTitle/dialogTitleClasses.d.ts +8 -8
- package/Divider/Divider.js +4 -4
- package/Divider/dividerClasses.d.ts +34 -34
- package/Drawer/Drawer.js +6 -6
- package/Drawer/drawerClasses.d.ts +30 -30
- package/Fab/Fab.js +69 -65
- package/Fab/fabClasses.d.ts +26 -26
- package/FilledInput/FilledInput.js +3 -1
- package/FilledInput/filledInputClasses.d.ts +40 -40
- package/FormControl/formControlClasses.d.ts +14 -14
- package/FormControlLabel/FormControlLabel.js +1 -1
- package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
- package/FormGroup/formGroupClasses.d.ts +12 -12
- package/FormHelperText/FormHelperText.js +3 -3
- package/FormHelperText/formHelperTextClasses.d.ts +22 -22
- package/FormLabel/FormLabel.js +5 -5
- package/FormLabel/formLabelClasses.d.ts +22 -22
- package/Grid/gridClasses.d.ts +48 -48
- package/Icon/Icon.js +8 -8
- package/Icon/iconClasses.d.ts +24 -24
- package/IconButton/IconButton.js +5 -5
- package/IconButton/iconButtonClasses.d.ts +26 -26
- package/ImageList/imageListClasses.d.ts +16 -16
- package/ImageListItem/imageListItemClasses.d.ts +18 -18
- package/ImageListItemBar/ImageListItemBar.js +1 -1
- package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
- package/Input/Input.js +9 -4
- package/Input/inputClasses.d.ts +34 -34
- package/InputAdornment/InputAdornment.js +1 -1
- package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
- package/InputBase/InputBase.js +16 -8
- package/InputBase/inputBaseClasses.d.ts +44 -44
- package/InputLabel/inputLabelClasses.d.ts +32 -32
- package/LinearProgress/linearProgressClasses.d.ts +42 -42
- package/Link/Link.js +3 -8
- package/Link/linkClasses.d.ts +18 -18
- package/List/listClasses.d.ts +14 -14
- package/ListItem/ListItem.js +8 -8
- package/ListItem/listItemClasses.d.ts +30 -30
- package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
- package/ListItemButton/ListItemButton.js +8 -8
- package/ListItemButton/listItemButtonClasses.d.ts +22 -22
- package/ListItemIcon/ListItemIcon.js +1 -1
- package/ListItemIcon/listItemIconClasses.d.ts +10 -10
- package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
- package/ListItemText/listItemTextClasses.d.ts +18 -18
- package/ListSubheader/ListSubheader.js +3 -3
- package/ListSubheader/listSubheaderClasses.d.ts +18 -18
- package/Menu/menuClasses.d.ts +12 -12
- package/MenuItem/MenuItem.js +8 -8
- package/MenuItem/menuItemClasses.d.ts +20 -20
- package/MobileStepper/MobileStepper.js +5 -5
- package/MobileStepper/mobileStepperClasses.d.ts +22 -22
- package/Modal/Modal.js +1 -1
- package/NativeSelect/nativeSelectClasses.d.ts +32 -32
- package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
- package/Pagination/paginationClasses.d.ts +14 -14
- package/PaginationItem/PaginationItem.js +27 -27
- package/PaginationItem/paginationItemClasses.d.ts +42 -42
- package/Paper/paperClasses.d.ts +39 -39
- package/Popover/popoverClasses.d.ts +10 -10
- package/Popper/Popper.d.ts +29 -29
- package/README.md +79 -32
- package/Radio/radioClasses.d.ts +16 -16
- package/RadioGroup/RadioGroupContext.d.ts +11 -11
- package/RadioGroup/useRadioGroup.d.ts +4 -4
- package/Rating/Rating.js +2 -2
- package/Rating/ratingClasses.d.ts +40 -40
- package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
- package/Select/selectClasses.d.ts +30 -30
- package/Skeleton/skeletonClasses.d.ts +24 -24
- package/Snackbar/Snackbar.js +1 -1
- package/Snackbar/snackbarClasses.d.ts +20 -20
- package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
- package/SpeedDial/SpeedDial.js +1 -1
- package/SpeedDial/speedDialClasses.d.ts +22 -22
- package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
- package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
- package/Step/StepContext.d.ts +20 -20
- package/Step/stepClasses.d.ts +16 -16
- package/StepButton/stepButtonClasses.d.ts +14 -14
- package/StepConnector/stepConnectorClasses.d.ts +26 -26
- package/StepContent/StepContent.d.ts +3 -1
- package/StepContent/stepContentClasses.d.ts +12 -12
- package/StepIcon/StepIcon.js +5 -5
- package/StepIcon/stepIconClasses.d.ts +16 -16
- package/StepLabel/StepLabel.js +4 -4
- package/StepLabel/stepLabelClasses.d.ts +28 -28
- package/Stepper/StepperContext.d.ts +18 -0
- package/Stepper/StepperContext.js +10 -2
- package/Stepper/index.d.ts +3 -0
- package/Stepper/index.js +3 -1
- package/Stepper/stepperClasses.d.ts +14 -14
- package/SvgIcon/SvgIcon.js +4 -4
- package/SvgIcon/svgIconClasses.d.ts +24 -24
- package/Switch/switchClasses.d.ts +32 -32
- package/Tab/Tab.js +7 -7
- package/Tab/tabClasses.d.ts +26 -26
- package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
- package/Table/Table.js +1 -1
- package/Table/tableClasses.d.ts +10 -10
- package/TableBody/tableBodyClasses.d.ts +8 -8
- package/TableCell/tableCellClasses.d.ts +32 -32
- package/TableContainer/tableContainerClasses.d.ts +8 -8
- package/TableFooter/tableFooterClasses.d.ts +8 -8
- package/TableHead/tableHeadClasses.d.ts +8 -8
- package/TablePagination/TablePagination.js +1 -1
- package/TablePagination/tablePaginationClasses.d.ts +28 -28
- package/TableRow/TableRow.js +3 -3
- package/TableRow/tableRowClasses.d.ts +16 -16
- package/TableSortLabel/TableSortLabel.js +4 -4
- package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
- package/Tabs/Tabs.d.ts +1 -1
- package/Tabs/Tabs.js +2 -2
- package/Tabs/tabsClasses.d.ts +32 -32
- package/TextField/textFieldClasses.d.ts +8 -8
- package/ToggleButton/ToggleButton.js +17 -10
- package/ToggleButton/toggleButtonClasses.d.ts +24 -24
- package/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
- package/Toolbar/toolbarClasses.d.ts +14 -14
- package/Tooltip/Tooltip.js +5 -5
- package/Tooltip/tooltipClasses.d.ts +30 -30
- package/Typography/typographyClasses.d.ts +50 -50
- package/className/index.d.ts +1 -8
- package/className/index.js +1 -8
- package/darkScrollbar/index.d.ts +28 -28
- package/index.js +1 -1
- package/internal/switchBaseClasses.d.ts +12 -12
- package/legacy/Accordion/Accordion.js +6 -6
- package/legacy/AccordionSummary/AccordionSummary.js +3 -3
- package/legacy/Autocomplete/Autocomplete.js +15 -14
- package/legacy/AvatarGroup/AvatarGroup.js +2 -2
- package/legacy/Badge/Badge.js +2 -2
- package/legacy/BottomNavigation/BottomNavigation.js +1 -1
- package/legacy/BottomNavigationAction/BottomNavigationAction.js +6 -5
- package/legacy/Box/Box.js +25 -4
- package/legacy/ButtonGroup/ButtonGroup.js +10 -10
- package/legacy/CardActionArea/CardActionArea.js +2 -2
- package/legacy/CircularProgress/CircularProgress.js +1 -1
- package/legacy/CssBaseline/CssBaseline.js +4 -4
- package/legacy/DialogContent/DialogContent.js +2 -2
- package/legacy/Divider/Divider.js +4 -4
- package/legacy/Drawer/Drawer.js +6 -6
- package/legacy/Fab/Fab.js +17 -17
- package/legacy/FilledInput/FilledInput.js +2 -2
- package/legacy/FormControlLabel/FormControlLabel.js +1 -1
- package/legacy/FormHelperText/FormHelperText.js +3 -3
- package/legacy/FormLabel/FormLabel.js +5 -5
- package/legacy/Icon/Icon.js +8 -8
- package/legacy/IconButton/IconButton.js +5 -5
- package/legacy/ImageListItemBar/ImageListItemBar.js +1 -1
- package/legacy/Input/Input.js +8 -3
- package/legacy/InputAdornment/InputAdornment.js +1 -1
- package/legacy/InputBase/InputBase.js +16 -8
- package/legacy/Link/Link.js +3 -9
- package/legacy/ListItem/ListItem.js +8 -8
- package/legacy/ListItemButton/ListItemButton.js +8 -8
- package/legacy/ListItemIcon/ListItemIcon.js +1 -1
- package/legacy/ListSubheader/ListSubheader.js +3 -3
- package/legacy/MenuItem/MenuItem.js +8 -8
- package/legacy/MobileStepper/MobileStepper.js +5 -5
- package/legacy/Modal/Modal.js +1 -1
- package/legacy/PaginationItem/PaginationItem.js +27 -27
- package/legacy/Rating/Rating.js +2 -2
- package/legacy/Snackbar/Snackbar.js +1 -1
- package/legacy/SpeedDial/SpeedDial.js +1 -1
- package/legacy/StepIcon/StepIcon.js +5 -5
- package/legacy/StepLabel/StepLabel.js +4 -4
- package/legacy/Stepper/StepperContext.js +10 -2
- package/legacy/Stepper/index.js +3 -1
- package/legacy/SvgIcon/SvgIcon.js +4 -4
- package/legacy/Tab/Tab.js +7 -7
- package/legacy/Table/Table.js +1 -1
- package/legacy/TablePagination/TablePagination.js +1 -1
- package/legacy/TableRow/TableRow.js +3 -3
- package/legacy/TableSortLabel/TableSortLabel.js +4 -4
- package/legacy/Tabs/Tabs.js +2 -2
- package/legacy/ToggleButton/ToggleButton.js +16 -9
- package/legacy/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/legacy/Tooltip/Tooltip.js +5 -5
- package/legacy/className/index.js +1 -8
- package/legacy/index.js +1 -1
- package/legacy/locale/index.js +1 -1
- package/legacy/styles/createPalette.js +2 -1
- package/legacy/styles/experimental_extendTheme.js +52 -43
- package/locale/index.d.ts +71 -71
- package/locale/index.js +1 -1
- package/modern/Accordion/Accordion.js +6 -6
- package/modern/AccordionSummary/AccordionSummary.js +3 -3
- package/modern/Autocomplete/Autocomplete.js +15 -14
- package/modern/AvatarGroup/AvatarGroup.js +2 -2
- package/modern/Badge/Badge.js +2 -2
- package/modern/BottomNavigation/BottomNavigation.js +1 -1
- package/modern/BottomNavigationAction/BottomNavigationAction.js +6 -5
- package/modern/Box/Box.js +25 -4
- package/modern/ButtonGroup/ButtonGroup.js +10 -10
- package/modern/CardActionArea/CardActionArea.js +2 -2
- package/modern/CircularProgress/CircularProgress.js +1 -1
- package/modern/CssBaseline/CssBaseline.js +4 -4
- package/modern/DialogContent/DialogContent.js +2 -2
- package/modern/Divider/Divider.js +4 -4
- package/modern/Drawer/Drawer.js +6 -6
- package/modern/Fab/Fab.js +16 -16
- package/modern/FilledInput/FilledInput.js +1 -1
- package/modern/FormControlLabel/FormControlLabel.js +1 -1
- package/modern/FormHelperText/FormHelperText.js +3 -3
- package/modern/FormLabel/FormLabel.js +5 -5
- package/modern/Icon/Icon.js +8 -8
- package/modern/IconButton/IconButton.js +5 -5
- package/modern/ImageListItemBar/ImageListItemBar.js +1 -1
- package/modern/Input/Input.js +9 -4
- package/modern/InputAdornment/InputAdornment.js +1 -1
- package/modern/InputBase/InputBase.js +16 -8
- package/modern/Link/Link.js +3 -8
- package/modern/ListItem/ListItem.js +8 -8
- package/modern/ListItemButton/ListItemButton.js +8 -8
- package/modern/ListItemIcon/ListItemIcon.js +1 -1
- package/modern/ListSubheader/ListSubheader.js +3 -3
- package/modern/MenuItem/MenuItem.js +8 -8
- package/modern/MobileStepper/MobileStepper.js +5 -5
- package/modern/Modal/Modal.js +1 -1
- package/modern/PaginationItem/PaginationItem.js +27 -27
- package/modern/Rating/Rating.js +2 -2
- package/modern/Snackbar/Snackbar.js +1 -1
- package/modern/SpeedDial/SpeedDial.js +1 -1
- package/modern/StepIcon/StepIcon.js +5 -5
- package/modern/StepLabel/StepLabel.js +4 -4
- package/modern/Stepper/StepperContext.js +10 -2
- package/modern/Stepper/index.js +3 -1
- package/modern/SvgIcon/SvgIcon.js +3 -3
- package/modern/Tab/Tab.js +7 -7
- package/modern/Table/Table.js +1 -1
- package/modern/TablePagination/TablePagination.js +1 -1
- package/modern/TableRow/TableRow.js +3 -3
- package/modern/TableSortLabel/TableSortLabel.js +4 -4
- package/modern/Tabs/Tabs.js +2 -2
- package/modern/ToggleButton/ToggleButton.js +17 -10
- package/modern/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/modern/Tooltip/Tooltip.js +5 -5
- package/modern/className/index.js +1 -8
- package/modern/index.js +1 -1
- package/modern/locale/index.js +1 -1
- package/modern/styles/createPalette.js +2 -1
- package/modern/styles/experimental_extendTheme.js +56 -45
- package/node/Accordion/Accordion.js +6 -6
- package/node/AccordionSummary/AccordionSummary.js +3 -3
- package/node/Autocomplete/Autocomplete.js +15 -14
- package/node/AvatarGroup/AvatarGroup.js +2 -2
- package/node/Badge/Badge.js +2 -2
- package/node/BottomNavigation/BottomNavigation.js +1 -1
- package/node/BottomNavigationAction/BottomNavigationAction.js +6 -5
- package/node/Box/Box.js +28 -4
- package/node/ButtonGroup/ButtonGroup.js +10 -10
- package/node/CardActionArea/CardActionArea.js +2 -2
- package/node/CircularProgress/CircularProgress.js +1 -1
- package/node/CssBaseline/CssBaseline.js +4 -4
- package/node/DialogContent/DialogContent.js +2 -2
- package/node/Divider/Divider.js +4 -4
- package/node/Drawer/Drawer.js +6 -6
- package/node/Fab/Fab.js +69 -65
- package/node/FilledInput/FilledInput.js +3 -1
- package/node/FormControlLabel/FormControlLabel.js +1 -1
- package/node/FormHelperText/FormHelperText.js +3 -3
- package/node/FormLabel/FormLabel.js +5 -5
- package/node/Icon/Icon.js +8 -8
- package/node/IconButton/IconButton.js +5 -5
- package/node/ImageListItemBar/ImageListItemBar.js +1 -1
- package/node/Input/Input.js +9 -4
- package/node/InputAdornment/InputAdornment.js +1 -1
- package/node/InputBase/InputBase.js +14 -8
- package/node/Link/Link.js +3 -9
- package/node/ListItem/ListItem.js +8 -8
- package/node/ListItemButton/ListItemButton.js +8 -8
- package/node/ListItemIcon/ListItemIcon.js +1 -1
- package/node/ListSubheader/ListSubheader.js +3 -3
- package/node/MenuItem/MenuItem.js +8 -8
- package/node/MobileStepper/MobileStepper.js +5 -5
- package/node/Modal/Modal.js +1 -1
- package/node/PaginationItem/PaginationItem.js +27 -27
- package/node/Rating/Rating.js +2 -2
- package/node/Snackbar/Snackbar.js +1 -1
- package/node/SpeedDial/SpeedDial.js +1 -1
- package/node/StepIcon/StepIcon.js +5 -5
- package/node/StepLabel/StepLabel.js +4 -4
- package/node/Stepper/StepperContext.js +11 -1
- package/node/Stepper/index.js +22 -1
- package/node/SvgIcon/SvgIcon.js +4 -4
- package/node/Tab/Tab.js +7 -7
- package/node/Table/Table.js +1 -1
- package/node/TablePagination/TablePagination.js +1 -1
- package/node/TableRow/TableRow.js +3 -3
- package/node/TableSortLabel/TableSortLabel.js +4 -4
- package/node/Tabs/Tabs.js +2 -2
- package/node/ToggleButton/ToggleButton.js +17 -10
- package/node/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/node/Tooltip/Tooltip.js +5 -5
- package/node/className/index.js +2 -2
- package/node/index.js +1 -1
- package/node/locale/index.js +1 -1
- package/node/styles/createPalette.js +2 -1
- package/node/styles/experimental_extendTheme.js +57 -47
- package/package.json +6 -5
- package/styles/ThemeProvider.d.ts +1 -1
- package/styles/createPalette.d.ts +9 -2
- package/styles/createPalette.js +2 -1
- package/styles/experimental_extendTheme.d.ts +13 -16
- package/styles/experimental_extendTheme.js +57 -46
- package/transitions/index.d.ts +1 -1
- package/transitions/transition.d.ts +13 -13
- package/transitions/utils.d.ts +23 -23
- package/umd/material-ui.development.js +582 -484
- package/umd/material-ui.production.min.js +21 -21
- package/useMediaQuery/useMediaQuery.d.ts +31 -31
- package/useTouchRipple/index.d.ts +1 -1
- package/useTouchRipple/useTouchRipple.d.ts +28 -28
- package/utils/getScrollbarSize.d.ts +2 -2
- package/utils/ownerDocument.d.ts +2 -2
- package/utils/ownerWindow.d.ts +2 -2
- package/utils/setRef.d.ts +2 -2
package/node/Fab/Fab.js
CHANGED
|
@@ -62,77 +62,81 @@ const FabRoot = (0, _styled.default)(_ButtonBase.default, {
|
|
|
62
62
|
})(({
|
|
63
63
|
theme,
|
|
64
64
|
ownerState
|
|
65
|
-
}) =>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
'&:hover': {
|
|
83
|
-
backgroundColor: theme.palette.grey.A100,
|
|
84
|
-
// Reset on touch devices, it doesn't add specificity
|
|
85
|
-
'@media (hover: none)': {
|
|
86
|
-
backgroundColor: theme.palette.grey[300]
|
|
65
|
+
}) => {
|
|
66
|
+
var _theme$palette$getCon, _theme$palette;
|
|
67
|
+
|
|
68
|
+
return (0, _extends2.default)({}, theme.typography.button, {
|
|
69
|
+
minHeight: 36,
|
|
70
|
+
transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color'], {
|
|
71
|
+
duration: theme.transitions.duration.short
|
|
72
|
+
}),
|
|
73
|
+
borderRadius: '50%',
|
|
74
|
+
padding: 0,
|
|
75
|
+
minWidth: 0,
|
|
76
|
+
width: 56,
|
|
77
|
+
height: 56,
|
|
78
|
+
zIndex: (theme.vars || theme).zIndex.fab,
|
|
79
|
+
boxShadow: (theme.vars || theme).shadows[6],
|
|
80
|
+
'&:active': {
|
|
81
|
+
boxShadow: (theme.vars || theme).shadows[12]
|
|
87
82
|
},
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
83
|
+
color: theme.vars ? theme.vars.palette.text.primary : (_theme$palette$getCon = (_theme$palette = theme.palette).getContrastText) == null ? void 0 : _theme$palette$getCon.call(_theme$palette, theme.palette.grey[300]),
|
|
84
|
+
backgroundColor: (theme.vars || theme).palette.grey[300],
|
|
85
|
+
'&:hover': {
|
|
86
|
+
backgroundColor: (theme.vars || theme).palette.grey.A100,
|
|
87
|
+
// Reset on touch devices, it doesn't add specificity
|
|
88
|
+
'@media (hover: none)': {
|
|
89
|
+
backgroundColor: (theme.vars || theme).palette.grey[300]
|
|
90
|
+
},
|
|
91
|
+
textDecoration: 'none'
|
|
92
|
+
},
|
|
93
|
+
[`&.${_fabClasses.default.focusVisible}`]: {
|
|
94
|
+
boxShadow: (theme.vars || theme).shadows[6]
|
|
95
|
+
},
|
|
96
|
+
[`&.${_fabClasses.default.disabled}`]: {
|
|
97
|
+
color: (theme.vars || theme).palette.action.disabled,
|
|
98
|
+
boxShadow: (theme.vars || theme).shadows[0],
|
|
99
|
+
backgroundColor: (theme.vars || theme).palette.action.disabledBackground
|
|
100
|
+
}
|
|
101
|
+
}, ownerState.size === 'small' && {
|
|
102
|
+
width: 40,
|
|
103
|
+
height: 40
|
|
104
|
+
}, ownerState.size === 'medium' && {
|
|
105
|
+
width: 48,
|
|
106
|
+
height: 48
|
|
107
|
+
}, ownerState.variant === 'extended' && {
|
|
108
|
+
borderRadius: 48 / 2,
|
|
109
|
+
padding: '0 16px',
|
|
110
|
+
width: 'auto',
|
|
111
|
+
minHeight: 'auto',
|
|
112
|
+
minWidth: 48,
|
|
113
|
+
height: 48
|
|
114
|
+
}, ownerState.variant === 'extended' && ownerState.size === 'small' && {
|
|
115
|
+
width: 'auto',
|
|
116
|
+
padding: '0 8px',
|
|
117
|
+
borderRadius: 34 / 2,
|
|
118
|
+
minWidth: 34,
|
|
119
|
+
height: 34
|
|
120
|
+
}, ownerState.variant === 'extended' && ownerState.size === 'medium' && {
|
|
121
|
+
width: 'auto',
|
|
122
|
+
padding: '0 16px',
|
|
123
|
+
borderRadius: 40 / 2,
|
|
124
|
+
minWidth: 40,
|
|
125
|
+
height: 40
|
|
126
|
+
}, ownerState.color === 'inherit' && {
|
|
127
|
+
color: 'inherit'
|
|
128
|
+
});
|
|
129
|
+
}, ({
|
|
126
130
|
theme,
|
|
127
131
|
ownerState
|
|
128
|
-
}) => (0, _extends2.default)({}, ownerState.color !== 'inherit' && ownerState.color !== 'default' && theme.palette[ownerState.color] != null && {
|
|
129
|
-
color: theme.palette[ownerState.color].contrastText,
|
|
130
|
-
backgroundColor: theme.palette[ownerState.color].main,
|
|
132
|
+
}) => (0, _extends2.default)({}, ownerState.color !== 'inherit' && ownerState.color !== 'default' && (theme.vars || theme).palette[ownerState.color] != null && {
|
|
133
|
+
color: (theme.vars || theme).palette[ownerState.color].contrastText,
|
|
134
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].main,
|
|
131
135
|
'&:hover': {
|
|
132
|
-
backgroundColor: theme.palette[ownerState.color].dark,
|
|
136
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].dark,
|
|
133
137
|
// Reset on touch devices, it doesn't add specificity
|
|
134
138
|
'@media (hover: none)': {
|
|
135
|
-
backgroundColor: theme.palette[ownerState.color].main
|
|
139
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].main
|
|
136
140
|
}
|
|
137
141
|
}
|
|
138
142
|
}));
|
|
@@ -64,6 +64,8 @@ const FilledInputRoot = (0, _styled.default)(_InputBase2.InputBaseRoot, {
|
|
|
64
64
|
theme,
|
|
65
65
|
ownerState
|
|
66
66
|
}) => {
|
|
67
|
+
var _theme$palette;
|
|
68
|
+
|
|
67
69
|
const light = theme.palette.mode === 'light';
|
|
68
70
|
const bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';
|
|
69
71
|
const backgroundColor = light ? 'rgba(0, 0, 0, 0.06)' : 'rgba(255, 255, 255, 0.09)';
|
|
@@ -91,7 +93,7 @@ const FilledInputRoot = (0, _styled.default)(_InputBase2.InputBaseRoot, {
|
|
|
91
93
|
}
|
|
92
94
|
}, !ownerState.disableUnderline && {
|
|
93
95
|
'&:after': {
|
|
94
|
-
borderBottom: `2px solid ${theme.palette[ownerState.color].main}`,
|
|
96
|
+
borderBottom: `2px solid ${(_theme$palette = theme.palette[ownerState.color || 'primary']) == null ? void 0 : _theme$palette.main}`,
|
|
95
97
|
left: 0,
|
|
96
98
|
bottom: 0,
|
|
97
99
|
// Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
|
|
@@ -98,7 +98,7 @@ const FormControlLabelRoot = (0, _styled.default)('label', {
|
|
|
98
98
|
}, {
|
|
99
99
|
[`& .${_formControlLabelClasses.default.label}`]: {
|
|
100
100
|
[`&.${_formControlLabelClasses.default.disabled}`]: {
|
|
101
|
-
color: theme.palette.text.disabled
|
|
101
|
+
color: (theme.vars || theme).palette.text.disabled
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
}));
|
|
@@ -71,7 +71,7 @@ const FormHelperTextRoot = (0, _styled.default)('p', {
|
|
|
71
71
|
theme,
|
|
72
72
|
ownerState
|
|
73
73
|
}) => (0, _extends2.default)({
|
|
74
|
-
color: theme.palette.text.secondary
|
|
74
|
+
color: (theme.vars || theme).palette.text.secondary
|
|
75
75
|
}, theme.typography.caption, {
|
|
76
76
|
textAlign: 'left',
|
|
77
77
|
marginTop: 3,
|
|
@@ -79,10 +79,10 @@ const FormHelperTextRoot = (0, _styled.default)('p', {
|
|
|
79
79
|
marginBottom: 0,
|
|
80
80
|
marginLeft: 0,
|
|
81
81
|
[`&.${_formHelperTextClasses.default.disabled}`]: {
|
|
82
|
-
color: theme.palette.text.disabled
|
|
82
|
+
color: (theme.vars || theme).palette.text.disabled
|
|
83
83
|
},
|
|
84
84
|
[`&.${_formHelperTextClasses.default.error}`]: {
|
|
85
|
-
color: theme.palette.error.main
|
|
85
|
+
color: (theme.vars || theme).palette.error.main
|
|
86
86
|
}
|
|
87
87
|
}, ownerState.size === 'small' && {
|
|
88
88
|
marginTop: 4
|
|
@@ -68,19 +68,19 @@ const FormLabelRoot = (0, _styled.default)('label', {
|
|
|
68
68
|
theme,
|
|
69
69
|
ownerState
|
|
70
70
|
}) => (0, _extends2.default)({
|
|
71
|
-
color: theme.palette.text.secondary
|
|
71
|
+
color: (theme.vars || theme).palette.text.secondary
|
|
72
72
|
}, theme.typography.body1, {
|
|
73
73
|
lineHeight: '1.4375em',
|
|
74
74
|
padding: 0,
|
|
75
75
|
position: 'relative',
|
|
76
76
|
[`&.${_formLabelClasses.default.focused}`]: {
|
|
77
|
-
color: theme.palette[ownerState.color].main
|
|
77
|
+
color: (theme.vars || theme).palette[ownerState.color].main
|
|
78
78
|
},
|
|
79
79
|
[`&.${_formLabelClasses.default.disabled}`]: {
|
|
80
|
-
color: theme.palette.text.disabled
|
|
80
|
+
color: (theme.vars || theme).palette.text.disabled
|
|
81
81
|
},
|
|
82
82
|
[`&.${_formLabelClasses.default.error}`]: {
|
|
83
|
-
color: theme.palette.error.main
|
|
83
|
+
color: (theme.vars || theme).palette.error.main
|
|
84
84
|
}
|
|
85
85
|
}));
|
|
86
86
|
exports.FormLabelRoot = FormLabelRoot;
|
|
@@ -92,7 +92,7 @@ const AsteriskComponent = (0, _styled.default)('span', {
|
|
|
92
92
|
theme
|
|
93
93
|
}) => ({
|
|
94
94
|
[`&.${_formLabelClasses.default.error}`]: {
|
|
95
|
-
color: theme.palette.error.main
|
|
95
|
+
color: (theme.vars || theme).palette.error.main
|
|
96
96
|
}
|
|
97
97
|
}));
|
|
98
98
|
const FormLabel = /*#__PURE__*/React.forwardRef(function FormLabel(inProps, ref) {
|
package/node/Icon/Icon.js
CHANGED
|
@@ -79,14 +79,14 @@ const IconRoot = (0, _styled.default)('span', {
|
|
|
79
79
|
}[ownerState.fontSize],
|
|
80
80
|
// TODO v5 deprecate, v6 remove for sx
|
|
81
81
|
color: {
|
|
82
|
-
primary: theme.palette.primary.main,
|
|
83
|
-
secondary: theme.palette.secondary.main,
|
|
84
|
-
info: theme.palette.info.main,
|
|
85
|
-
success: theme.palette.success.main,
|
|
86
|
-
warning: theme.palette.warning.main,
|
|
87
|
-
action: theme.palette.action.active,
|
|
88
|
-
error: theme.palette.error.main,
|
|
89
|
-
disabled: theme.palette.action.disabled,
|
|
82
|
+
primary: (theme.vars || theme).palette.primary.main,
|
|
83
|
+
secondary: (theme.vars || theme).palette.secondary.main,
|
|
84
|
+
info: (theme.vars || theme).palette.info.main,
|
|
85
|
+
success: (theme.vars || theme).palette.success.main,
|
|
86
|
+
warning: (theme.vars || theme).palette.warning.main,
|
|
87
|
+
action: (theme.vars || theme).palette.action.active,
|
|
88
|
+
error: (theme.vars || theme).palette.error.main,
|
|
89
|
+
disabled: (theme.vars || theme).palette.action.disabled,
|
|
90
90
|
inherit: undefined
|
|
91
91
|
}[ownerState.color]
|
|
92
92
|
}));
|
|
@@ -75,13 +75,13 @@ const IconButtonRoot = (0, _styled.default)(_ButtonBase.default, {
|
|
|
75
75
|
borderRadius: '50%',
|
|
76
76
|
overflow: 'visible',
|
|
77
77
|
// Explicitly set the default value to solve a bug on IE11.
|
|
78
|
-
color: theme.palette.action.active,
|
|
78
|
+
color: (theme.vars || theme).palette.action.active,
|
|
79
79
|
transition: theme.transitions.create('background-color', {
|
|
80
80
|
duration: theme.transitions.duration.shortest
|
|
81
81
|
})
|
|
82
82
|
}, !ownerState.disableRipple && {
|
|
83
83
|
'&:hover': {
|
|
84
|
-
backgroundColor: (0, _system.alpha)(theme.palette.action.active, theme.palette.action.hoverOpacity),
|
|
84
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.active} / ${theme.vars.palette.action.hoverOpacity})` : (0, _system.alpha)(theme.palette.action.active, theme.palette.action.hoverOpacity),
|
|
85
85
|
// Reset on touch devices, it doesn't add specificity
|
|
86
86
|
'@media (hover: none)': {
|
|
87
87
|
backgroundColor: 'transparent'
|
|
@@ -97,10 +97,10 @@ const IconButtonRoot = (0, _styled.default)(_ButtonBase.default, {
|
|
|
97
97
|
}) => (0, _extends2.default)({}, ownerState.color === 'inherit' && {
|
|
98
98
|
color: 'inherit'
|
|
99
99
|
}, ownerState.color !== 'inherit' && ownerState.color !== 'default' && (0, _extends2.default)({
|
|
100
|
-
color: theme.palette[ownerState.color].main
|
|
100
|
+
color: (theme.vars || theme).palette[ownerState.color].main
|
|
101
101
|
}, !ownerState.disableRipple && {
|
|
102
102
|
'&:hover': {
|
|
103
|
-
backgroundColor: (0, _system.alpha)(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
|
|
103
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : (0, _system.alpha)(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
|
|
104
104
|
// Reset on touch devices, it doesn't add specificity
|
|
105
105
|
'@media (hover: none)': {
|
|
106
106
|
backgroundColor: 'transparent'
|
|
@@ -115,7 +115,7 @@ const IconButtonRoot = (0, _styled.default)(_ButtonBase.default, {
|
|
|
115
115
|
}, {
|
|
116
116
|
[`&.${_iconButtonClasses.default.disabled}`]: {
|
|
117
117
|
backgroundColor: 'transparent',
|
|
118
|
-
color: theme.palette.action.disabled
|
|
118
|
+
color: (theme.vars || theme).palette.action.disabled
|
|
119
119
|
}
|
|
120
120
|
}));
|
|
121
121
|
/**
|
|
@@ -99,7 +99,7 @@ const ImageListItemBarTitleWrap = (0, _styled.default)('div', {
|
|
|
99
99
|
return (0, _extends2.default)({
|
|
100
100
|
flexGrow: 1,
|
|
101
101
|
padding: '12px 16px',
|
|
102
|
-
color: theme.palette.common.white,
|
|
102
|
+
color: (theme.vars || theme).palette.common.white,
|
|
103
103
|
overflow: 'hidden'
|
|
104
104
|
}, ownerState.position === 'below' && {
|
|
105
105
|
padding: '6px 0 12px',
|
package/node/Input/Input.js
CHANGED
|
@@ -65,7 +65,12 @@ const InputRoot = (0, _styled.default)(_InputBase2.InputBaseRoot, {
|
|
|
65
65
|
ownerState
|
|
66
66
|
}) => {
|
|
67
67
|
const light = theme.palette.mode === 'light';
|
|
68
|
-
|
|
68
|
+
let bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';
|
|
69
|
+
|
|
70
|
+
if (theme.vars) {
|
|
71
|
+
bottomLineColor = `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.inputTouchBottomLine})`;
|
|
72
|
+
}
|
|
73
|
+
|
|
69
74
|
return (0, _extends2.default)({
|
|
70
75
|
position: 'relative'
|
|
71
76
|
}, ownerState.formControl && {
|
|
@@ -74,7 +79,7 @@ const InputRoot = (0, _styled.default)(_InputBase2.InputBaseRoot, {
|
|
|
74
79
|
}
|
|
75
80
|
}, !ownerState.disableUnderline && {
|
|
76
81
|
'&:after': {
|
|
77
|
-
borderBottom: `2px solid ${theme.palette[ownerState.color].main}`,
|
|
82
|
+
borderBottom: `2px solid ${(theme.vars || theme).palette[ownerState.color].main}`,
|
|
78
83
|
left: 0,
|
|
79
84
|
bottom: 0,
|
|
80
85
|
// Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
|
|
@@ -95,7 +100,7 @@ const InputRoot = (0, _styled.default)(_InputBase2.InputBaseRoot, {
|
|
|
95
100
|
transform: 'scaleX(1) translateX(0)'
|
|
96
101
|
},
|
|
97
102
|
[`&.${_inputClasses.default.error}:after`]: {
|
|
98
|
-
borderBottomColor: theme.palette.error.main,
|
|
103
|
+
borderBottomColor: (theme.vars || theme).palette.error.main,
|
|
99
104
|
transform: 'scaleX(1)' // error is always underlined in red
|
|
100
105
|
|
|
101
106
|
},
|
|
@@ -114,7 +119,7 @@ const InputRoot = (0, _styled.default)(_InputBase2.InputBaseRoot, {
|
|
|
114
119
|
|
|
115
120
|
},
|
|
116
121
|
[`&:hover:not(.${_inputClasses.default.disabled}):before`]: {
|
|
117
|
-
borderBottom: `2px solid ${theme.palette.text.primary}`,
|
|
122
|
+
borderBottom: `2px solid ${(theme.vars || theme).palette.text.primary}`,
|
|
118
123
|
// Reset on touch devices, it doesn't add specificity
|
|
119
124
|
'@media (hover: none)': {
|
|
120
125
|
borderBottom: `1px solid ${bottomLineColor}`
|
|
@@ -79,7 +79,7 @@ const InputAdornmentRoot = (0, _styled.default)('div', {
|
|
|
79
79
|
maxHeight: '2em',
|
|
80
80
|
alignItems: 'center',
|
|
81
81
|
whiteSpace: 'nowrap',
|
|
82
|
-
color: theme.palette.action.active
|
|
82
|
+
color: (theme.vars || theme).palette.action.active
|
|
83
83
|
}, ownerState.variant === 'filled' && {
|
|
84
84
|
// Styles applied to the root element if `variant="filled"`.
|
|
85
85
|
[`&.${_inputAdornmentClasses.default.positionStart}&:not(.${_inputAdornmentClasses.default.hiddenLabel})`]: {
|
|
@@ -100,7 +100,7 @@ const InputBaseRoot = (0, _styled.default)('div', {
|
|
|
100
100
|
theme,
|
|
101
101
|
ownerState
|
|
102
102
|
}) => (0, _extends2.default)({}, theme.typography.body1, {
|
|
103
|
-
color: theme.palette.text.primary,
|
|
103
|
+
color: (theme.vars || theme).palette.text.primary,
|
|
104
104
|
lineHeight: '1.4375em',
|
|
105
105
|
// 23px
|
|
106
106
|
boxSizing: 'border-box',
|
|
@@ -110,7 +110,7 @@ const InputBaseRoot = (0, _styled.default)('div', {
|
|
|
110
110
|
display: 'inline-flex',
|
|
111
111
|
alignItems: 'center',
|
|
112
112
|
[`&.${_inputBaseClasses.default.disabled}`]: {
|
|
113
|
-
color: theme.palette.text.disabled,
|
|
113
|
+
color: (theme.vars || theme).palette.text.disabled,
|
|
114
114
|
cursor: 'default'
|
|
115
115
|
}
|
|
116
116
|
}, ownerState.multiline && (0, _extends2.default)({
|
|
@@ -130,17 +130,23 @@ const InputBaseComponent = (0, _styled.default)('input', {
|
|
|
130
130
|
ownerState
|
|
131
131
|
}) => {
|
|
132
132
|
const light = theme.palette.mode === 'light';
|
|
133
|
-
const placeholder = {
|
|
134
|
-
color: 'currentColor'
|
|
135
|
-
|
|
133
|
+
const placeholder = (0, _extends2.default)({
|
|
134
|
+
color: 'currentColor'
|
|
135
|
+
}, theme.vars ? {
|
|
136
|
+
opacity: theme.vars.opacity.placeholder
|
|
137
|
+
} : {
|
|
138
|
+
opacity: light ? 0.42 : 0.5
|
|
139
|
+
}, {
|
|
136
140
|
transition: theme.transitions.create('opacity', {
|
|
137
141
|
duration: theme.transitions.duration.shorter
|
|
138
142
|
})
|
|
139
|
-
};
|
|
143
|
+
});
|
|
140
144
|
const placeholderHidden = {
|
|
141
145
|
opacity: '0 !important'
|
|
142
146
|
};
|
|
143
|
-
const placeholderVisible = {
|
|
147
|
+
const placeholderVisible = theme.vars ? {
|
|
148
|
+
opacity: theme.vars.opacity.placeholder
|
|
149
|
+
} : {
|
|
144
150
|
opacity: light ? 0.42 : 0.5
|
|
145
151
|
};
|
|
146
152
|
return (0, _extends2.default)({
|
|
@@ -201,7 +207,7 @@ const InputBaseComponent = (0, _styled.default)('input', {
|
|
|
201
207
|
[`&.${_inputBaseClasses.default.disabled}`]: {
|
|
202
208
|
opacity: 1,
|
|
203
209
|
// Reset iOS opacity
|
|
204
|
-
WebkitTextFillColor: theme.palette.text.disabled // Fix opacity Safari bug
|
|
210
|
+
WebkitTextFillColor: (theme.vars || theme).palette.text.disabled // Fix opacity Safari bug
|
|
205
211
|
|
|
206
212
|
},
|
|
207
213
|
'&:-webkit-autofill': {
|
package/node/Link/Link.js
CHANGED
|
@@ -27,8 +27,6 @@ var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
|
27
27
|
|
|
28
28
|
var _styled = _interopRequireDefault(require("../styles/styled"));
|
|
29
29
|
|
|
30
|
-
var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
|
|
31
|
-
|
|
32
30
|
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
33
31
|
|
|
34
32
|
var _useIsFocusVisible = _interopRequireDefault(require("../utils/useIsFocusVisible"));
|
|
@@ -129,7 +127,6 @@ const LinkRoot = (0, _styled.default)(_Typography.default, {
|
|
|
129
127
|
});
|
|
130
128
|
});
|
|
131
129
|
const Link = /*#__PURE__*/React.forwardRef(function Link(inProps, ref) {
|
|
132
|
-
const theme = (0, _useTheme.default)();
|
|
133
130
|
const props = (0, _useThemeProps.default)({
|
|
134
131
|
props: inProps,
|
|
135
132
|
name: 'MuiLink'
|
|
@@ -146,7 +143,6 @@ const Link = /*#__PURE__*/React.forwardRef(function Link(inProps, ref) {
|
|
|
146
143
|
sx
|
|
147
144
|
} = props,
|
|
148
145
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
149
|
-
const sxColor = typeof sx === 'function' ? sx(theme).color : sx == null ? void 0 : sx.color;
|
|
150
146
|
const {
|
|
151
147
|
isFocusVisibleRef,
|
|
152
148
|
onBlur: handleBlurVisible,
|
|
@@ -181,9 +177,7 @@ const Link = /*#__PURE__*/React.forwardRef(function Link(inProps, ref) {
|
|
|
181
177
|
};
|
|
182
178
|
|
|
183
179
|
const ownerState = (0, _extends2.default)({}, props, {
|
|
184
|
-
|
|
185
|
-
// Need to find a better way to get rid of the color manipulation for `textDecorationColor`.
|
|
186
|
-
color: (typeof sxColor === 'function' ? sxColor(theme) : sxColor) || color,
|
|
180
|
+
color,
|
|
187
181
|
component,
|
|
188
182
|
focusVisible,
|
|
189
183
|
underline,
|
|
@@ -200,8 +194,8 @@ const Link = /*#__PURE__*/React.forwardRef(function Link(inProps, ref) {
|
|
|
200
194
|
ref: handlerRef,
|
|
201
195
|
ownerState: ownerState,
|
|
202
196
|
variant: variant,
|
|
203
|
-
sx: [...(
|
|
204
|
-
color
|
|
197
|
+
sx: [...(!Object.keys(colorTransformations).includes(color) ? [{
|
|
198
|
+
color
|
|
205
199
|
}] : []), ...(Array.isArray(sx) ? sx : [sx])]
|
|
206
200
|
}, other));
|
|
207
201
|
});
|
|
@@ -116,21 +116,21 @@ const ListItemRoot = (0, _styled.default)('div', {
|
|
|
116
116
|
}
|
|
117
117
|
}, {
|
|
118
118
|
[`&.${_listItemClasses.default.focusVisible}`]: {
|
|
119
|
-
backgroundColor: theme.palette.action.focus
|
|
119
|
+
backgroundColor: (theme.vars || theme).palette.action.focus
|
|
120
120
|
},
|
|
121
121
|
[`&.${_listItemClasses.default.selected}`]: {
|
|
122
|
-
backgroundColor: (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity),
|
|
122
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity),
|
|
123
123
|
[`&.${_listItemClasses.default.focusVisible}`]: {
|
|
124
|
-
backgroundColor: (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
|
|
124
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
|
|
125
125
|
}
|
|
126
126
|
},
|
|
127
127
|
[`&.${_listItemClasses.default.disabled}`]: {
|
|
128
|
-
opacity: theme.palette.action.disabledOpacity
|
|
128
|
+
opacity: (theme.vars || theme).palette.action.disabledOpacity
|
|
129
129
|
}
|
|
130
130
|
}, ownerState.alignItems === 'flex-start' && {
|
|
131
131
|
alignItems: 'flex-start'
|
|
132
132
|
}, ownerState.divider && {
|
|
133
|
-
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
133
|
+
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
134
134
|
backgroundClip: 'padding-box'
|
|
135
135
|
}, ownerState.button && {
|
|
136
136
|
transition: theme.transitions.create('background-color', {
|
|
@@ -138,17 +138,17 @@ const ListItemRoot = (0, _styled.default)('div', {
|
|
|
138
138
|
}),
|
|
139
139
|
'&:hover': {
|
|
140
140
|
textDecoration: 'none',
|
|
141
|
-
backgroundColor: theme.palette.action.hover,
|
|
141
|
+
backgroundColor: (theme.vars || theme).palette.action.hover,
|
|
142
142
|
// Reset on touch devices, it doesn't add specificity
|
|
143
143
|
'@media (hover: none)': {
|
|
144
144
|
backgroundColor: 'transparent'
|
|
145
145
|
}
|
|
146
146
|
},
|
|
147
147
|
[`&.${_listItemClasses.default.selected}:hover`]: {
|
|
148
|
-
backgroundColor: (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
|
|
148
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
|
|
149
149
|
// Reset on touch devices, it doesn't add specificity
|
|
150
150
|
'@media (hover: none)': {
|
|
151
|
-
backgroundColor: (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity)
|
|
151
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity)
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
}, ownerState.hasSecondaryAction && {
|
|
@@ -94,33 +94,33 @@ const ListItemButtonRoot = (0, _styled.default)(_ButtonBase.default, {
|
|
|
94
94
|
}),
|
|
95
95
|
'&:hover': {
|
|
96
96
|
textDecoration: 'none',
|
|
97
|
-
backgroundColor: theme.palette.action.hover,
|
|
97
|
+
backgroundColor: (theme.vars || theme).palette.action.hover,
|
|
98
98
|
// Reset on touch devices, it doesn't add specificity
|
|
99
99
|
'@media (hover: none)': {
|
|
100
100
|
backgroundColor: 'transparent'
|
|
101
101
|
}
|
|
102
102
|
},
|
|
103
103
|
[`&.${_listItemButtonClasses.default.selected}`]: {
|
|
104
|
-
backgroundColor: (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity),
|
|
104
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity),
|
|
105
105
|
[`&.${_listItemButtonClasses.default.focusVisible}`]: {
|
|
106
|
-
backgroundColor: (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
|
|
106
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
109
|
[`&.${_listItemButtonClasses.default.selected}:hover`]: {
|
|
110
|
-
backgroundColor: (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
|
|
110
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
|
|
111
111
|
// Reset on touch devices, it doesn't add specificity
|
|
112
112
|
'@media (hover: none)': {
|
|
113
|
-
backgroundColor: (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity)
|
|
113
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity)
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
116
|
[`&.${_listItemButtonClasses.default.focusVisible}`]: {
|
|
117
|
-
backgroundColor: theme.palette.action.focus
|
|
117
|
+
backgroundColor: (theme.vars || theme).palette.action.focus
|
|
118
118
|
},
|
|
119
119
|
[`&.${_listItemButtonClasses.default.disabled}`]: {
|
|
120
|
-
opacity: theme.palette.action.disabledOpacity
|
|
120
|
+
opacity: (theme.vars || theme).palette.action.disabledOpacity
|
|
121
121
|
}
|
|
122
122
|
}, ownerState.divider && {
|
|
123
|
-
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
123
|
+
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
124
124
|
backgroundClip: 'padding-box'
|
|
125
125
|
}, ownerState.alignItems === 'flex-start' && {
|
|
126
126
|
alignItems: 'flex-start'
|
|
@@ -60,7 +60,7 @@ const ListItemIconRoot = (0, _styled.default)('div', {
|
|
|
60
60
|
ownerState
|
|
61
61
|
}) => (0, _extends2.default)({
|
|
62
62
|
minWidth: 56,
|
|
63
|
-
color: theme.palette.action.active,
|
|
63
|
+
color: (theme.vars || theme).palette.action.active,
|
|
64
64
|
flexShrink: 0,
|
|
65
65
|
display: 'inline-flex'
|
|
66
66
|
}, ownerState.alignItems === 'flex-start' && {
|
|
@@ -65,12 +65,12 @@ const ListSubheaderRoot = (0, _styled.default)('li', {
|
|
|
65
65
|
boxSizing: 'border-box',
|
|
66
66
|
lineHeight: '48px',
|
|
67
67
|
listStyle: 'none',
|
|
68
|
-
color: theme.palette.text.secondary,
|
|
68
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
69
69
|
fontFamily: theme.typography.fontFamily,
|
|
70
70
|
fontWeight: theme.typography.fontWeightMedium,
|
|
71
71
|
fontSize: theme.typography.pxToRem(14)
|
|
72
72
|
}, ownerState.color === 'primary' && {
|
|
73
|
-
color: theme.palette.primary.main
|
|
73
|
+
color: (theme.vars || theme).palette.primary.main
|
|
74
74
|
}, ownerState.color === 'inherit' && {
|
|
75
75
|
color: 'inherit'
|
|
76
76
|
}, !ownerState.disableGutters && {
|
|
@@ -82,7 +82,7 @@ const ListSubheaderRoot = (0, _styled.default)('li', {
|
|
|
82
82
|
position: 'sticky',
|
|
83
83
|
top: 0,
|
|
84
84
|
zIndex: 1,
|
|
85
|
-
backgroundColor: theme.palette.background.paper
|
|
85
|
+
backgroundColor: (theme.vars || theme).palette.background.paper
|
|
86
86
|
}));
|
|
87
87
|
const ListSubheader = /*#__PURE__*/React.forwardRef(function ListSubheader(inProps, ref) {
|
|
88
88
|
const props = (0, _useThemeProps.default)({
|
|
@@ -97,35 +97,35 @@ const MenuItemRoot = (0, _styled.default)(_ButtonBase.default, {
|
|
|
97
97
|
paddingLeft: 16,
|
|
98
98
|
paddingRight: 16
|
|
99
99
|
}, ownerState.divider && {
|
|
100
|
-
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
100
|
+
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
101
101
|
backgroundClip: 'padding-box'
|
|
102
102
|
}, {
|
|
103
103
|
'&:hover': {
|
|
104
104
|
textDecoration: 'none',
|
|
105
|
-
backgroundColor: theme.palette.action.hover,
|
|
105
|
+
backgroundColor: (theme.vars || theme).palette.action.hover,
|
|
106
106
|
// Reset on touch devices, it doesn't add specificity
|
|
107
107
|
'@media (hover: none)': {
|
|
108
108
|
backgroundColor: 'transparent'
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
[`&.${_menuItemClasses.default.selected}`]: {
|
|
112
|
-
backgroundColor: (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity),
|
|
112
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity),
|
|
113
113
|
[`&.${_menuItemClasses.default.focusVisible}`]: {
|
|
114
|
-
backgroundColor: (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
|
|
114
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
117
|
[`&.${_menuItemClasses.default.selected}:hover`]: {
|
|
118
|
-
backgroundColor: (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
|
|
118
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
|
|
119
119
|
// Reset on touch devices, it doesn't add specificity
|
|
120
120
|
'@media (hover: none)': {
|
|
121
|
-
backgroundColor: (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity)
|
|
121
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : (0, _system.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity)
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
124
|
[`&.${_menuItemClasses.default.focusVisible}`]: {
|
|
125
|
-
backgroundColor: theme.palette.action.focus
|
|
125
|
+
backgroundColor: (theme.vars || theme).palette.action.focus
|
|
126
126
|
},
|
|
127
127
|
[`&.${_menuItemClasses.default.disabled}`]: {
|
|
128
|
-
opacity: theme.palette.action.disabledOpacity
|
|
128
|
+
opacity: (theme.vars || theme).palette.action.disabledOpacity
|
|
129
129
|
},
|
|
130
130
|
[`& + .${_Divider.dividerClasses.root}`]: {
|
|
131
131
|
marginTop: theme.spacing(1),
|