@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
|
@@ -42,8 +42,8 @@ const DialogContentRoot = styled('div', {
|
|
|
42
42
|
padding: '20px 24px'
|
|
43
43
|
}, ownerState.dividers ? {
|
|
44
44
|
padding: '16px 24px',
|
|
45
|
-
borderTop: `1px solid ${theme.palette.divider}`,
|
|
46
|
-
borderBottom: `1px solid ${theme.palette.divider}`
|
|
45
|
+
borderTop: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
46
|
+
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`
|
|
47
47
|
} : {
|
|
48
48
|
[`.${dialogTitleClasses.root} + &`]: {
|
|
49
49
|
paddingTop: 0
|
|
@@ -47,7 +47,7 @@ const DividerRoot = styled('div', {
|
|
|
47
47
|
flexShrink: 0,
|
|
48
48
|
borderWidth: 0,
|
|
49
49
|
borderStyle: 'solid',
|
|
50
|
-
borderColor: theme.palette.divider,
|
|
50
|
+
borderColor: (theme.vars || theme).palette.divider,
|
|
51
51
|
borderBottomWidth: 'thin'
|
|
52
52
|
}, ownerState.absolute && {
|
|
53
53
|
position: 'absolute',
|
|
@@ -55,7 +55,7 @@ const DividerRoot = styled('div', {
|
|
|
55
55
|
left: 0,
|
|
56
56
|
width: '100%'
|
|
57
57
|
}, ownerState.light && {
|
|
58
|
-
borderColor: alpha(theme.palette.divider, 0.08)
|
|
58
|
+
borderColor: theme.vars ? `rgba(${theme.vars.palette.dividerChannel} / 0.08)` : alpha(theme.palette.divider, 0.08)
|
|
59
59
|
}, ownerState.variant === 'inset' && {
|
|
60
60
|
marginLeft: 72
|
|
61
61
|
}, ownerState.variant === 'middle' && ownerState.orientation === 'horizontal' && {
|
|
@@ -82,7 +82,7 @@ const DividerRoot = styled('div', {
|
|
|
82
82
|
'&::before, &::after': {
|
|
83
83
|
position: 'relative',
|
|
84
84
|
width: '100%',
|
|
85
|
-
borderTop: `thin solid ${theme.palette.divider}`,
|
|
85
|
+
borderTop: `thin solid ${(theme.vars || theme).palette.divider}`,
|
|
86
86
|
top: '50%',
|
|
87
87
|
content: '""',
|
|
88
88
|
transform: 'translateY(50%)'
|
|
@@ -97,7 +97,7 @@ const DividerRoot = styled('div', {
|
|
|
97
97
|
top: '0%',
|
|
98
98
|
left: '50%',
|
|
99
99
|
borderTop: 0,
|
|
100
|
-
borderLeft: `thin solid ${theme.palette.divider}`,
|
|
100
|
+
borderLeft: `thin solid ${(theme.vars || theme).palette.divider}`,
|
|
101
101
|
transform: 'translateX(0%)'
|
|
102
102
|
}
|
|
103
103
|
}), ({
|
package/modern/Drawer/Drawer.js
CHANGED
|
@@ -46,7 +46,7 @@ const DrawerRoot = styled(Modal, {
|
|
|
46
46
|
})(({
|
|
47
47
|
theme
|
|
48
48
|
}) => ({
|
|
49
|
-
zIndex: theme.zIndex.drawer
|
|
49
|
+
zIndex: (theme.vars || theme).zIndex.drawer
|
|
50
50
|
}));
|
|
51
51
|
const DrawerDockedRoot = styled('div', {
|
|
52
52
|
shouldForwardProp: rootShouldForwardProp,
|
|
@@ -75,7 +75,7 @@ const DrawerPaper = styled(Paper, {
|
|
|
75
75
|
flexDirection: 'column',
|
|
76
76
|
height: '100%',
|
|
77
77
|
flex: '1 0 auto',
|
|
78
|
-
zIndex: theme.zIndex.drawer,
|
|
78
|
+
zIndex: (theme.vars || theme).zIndex.drawer,
|
|
79
79
|
// Add iOS momentum scrolling for iOS < 13.0
|
|
80
80
|
WebkitOverflowScrolling: 'touch',
|
|
81
81
|
// temporary style
|
|
@@ -103,13 +103,13 @@ const DrawerPaper = styled(Paper, {
|
|
|
103
103
|
height: 'auto',
|
|
104
104
|
maxHeight: '100%'
|
|
105
105
|
}, ownerState.anchor === 'left' && ownerState.variant !== 'temporary' && {
|
|
106
|
-
borderRight: `1px solid ${theme.palette.divider}`
|
|
106
|
+
borderRight: `1px solid ${(theme.vars || theme).palette.divider}`
|
|
107
107
|
}, ownerState.anchor === 'top' && ownerState.variant !== 'temporary' && {
|
|
108
|
-
borderBottom: `1px solid ${theme.palette.divider}`
|
|
108
|
+
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`
|
|
109
109
|
}, ownerState.anchor === 'right' && ownerState.variant !== 'temporary' && {
|
|
110
|
-
borderLeft: `1px solid ${theme.palette.divider}`
|
|
110
|
+
borderLeft: `1px solid ${(theme.vars || theme).palette.divider}`
|
|
111
111
|
}, ownerState.anchor === 'bottom' && ownerState.variant !== 'temporary' && {
|
|
112
|
-
borderTop: `1px solid ${theme.palette.divider}`
|
|
112
|
+
borderTop: `1px solid ${(theme.vars || theme).palette.divider}`
|
|
113
113
|
}));
|
|
114
114
|
const oppositeDirection = {
|
|
115
115
|
left: 'right',
|
package/modern/Fab/Fab.js
CHANGED
|
@@ -47,28 +47,28 @@ const FabRoot = styled(ButtonBase, {
|
|
|
47
47
|
minWidth: 0,
|
|
48
48
|
width: 56,
|
|
49
49
|
height: 56,
|
|
50
|
-
zIndex: theme.zIndex.fab,
|
|
51
|
-
boxShadow: theme.shadows[6],
|
|
50
|
+
zIndex: (theme.vars || theme).zIndex.fab,
|
|
51
|
+
boxShadow: (theme.vars || theme).shadows[6],
|
|
52
52
|
'&:active': {
|
|
53
|
-
boxShadow: theme.shadows[12]
|
|
53
|
+
boxShadow: (theme.vars || theme).shadows[12]
|
|
54
54
|
},
|
|
55
|
-
color: theme.palette.getContrastText(theme.palette.grey[300]),
|
|
56
|
-
backgroundColor: theme.palette.grey[300],
|
|
55
|
+
color: theme.vars ? theme.vars.palette.text.primary : theme.palette.getContrastText?.(theme.palette.grey[300]),
|
|
56
|
+
backgroundColor: (theme.vars || theme).palette.grey[300],
|
|
57
57
|
'&:hover': {
|
|
58
|
-
backgroundColor: theme.palette.grey.A100,
|
|
58
|
+
backgroundColor: (theme.vars || theme).palette.grey.A100,
|
|
59
59
|
// Reset on touch devices, it doesn't add specificity
|
|
60
60
|
'@media (hover: none)': {
|
|
61
|
-
backgroundColor: theme.palette.grey[300]
|
|
61
|
+
backgroundColor: (theme.vars || theme).palette.grey[300]
|
|
62
62
|
},
|
|
63
63
|
textDecoration: 'none'
|
|
64
64
|
},
|
|
65
65
|
[`&.${fabClasses.focusVisible}`]: {
|
|
66
|
-
boxShadow: theme.shadows[6]
|
|
66
|
+
boxShadow: (theme.vars || theme).shadows[6]
|
|
67
67
|
},
|
|
68
68
|
[`&.${fabClasses.disabled}`]: {
|
|
69
|
-
color: theme.palette.action.disabled,
|
|
70
|
-
boxShadow: theme.shadows[0],
|
|
71
|
-
backgroundColor: theme.palette.action.disabledBackground
|
|
69
|
+
color: (theme.vars || theme).palette.action.disabled,
|
|
70
|
+
boxShadow: (theme.vars || theme).shadows[0],
|
|
71
|
+
backgroundColor: (theme.vars || theme).palette.action.disabledBackground
|
|
72
72
|
}
|
|
73
73
|
}, ownerState.size === 'small' && {
|
|
74
74
|
width: 40,
|
|
@@ -100,14 +100,14 @@ const FabRoot = styled(ButtonBase, {
|
|
|
100
100
|
}), ({
|
|
101
101
|
theme,
|
|
102
102
|
ownerState
|
|
103
|
-
}) => _extends({}, ownerState.color !== 'inherit' && ownerState.color !== 'default' && theme.palette[ownerState.color] != null && {
|
|
104
|
-
color: theme.palette[ownerState.color].contrastText,
|
|
105
|
-
backgroundColor: theme.palette[ownerState.color].main,
|
|
103
|
+
}) => _extends({}, ownerState.color !== 'inherit' && ownerState.color !== 'default' && (theme.vars || theme).palette[ownerState.color] != null && {
|
|
104
|
+
color: (theme.vars || theme).palette[ownerState.color].contrastText,
|
|
105
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].main,
|
|
106
106
|
'&:hover': {
|
|
107
|
-
backgroundColor: theme.palette[ownerState.color].dark,
|
|
107
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].dark,
|
|
108
108
|
// Reset on touch devices, it doesn't add specificity
|
|
109
109
|
'@media (hover: none)': {
|
|
110
|
-
backgroundColor: theme.palette[ownerState.color].main
|
|
110
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].main
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
}));
|
|
@@ -66,7 +66,7 @@ const FilledInputRoot = styled(InputBaseRoot, {
|
|
|
66
66
|
}
|
|
67
67
|
}, !ownerState.disableUnderline && {
|
|
68
68
|
'&:after': {
|
|
69
|
-
borderBottom: `2px solid ${theme.palette[ownerState.color]
|
|
69
|
+
borderBottom: `2px solid ${theme.palette[ownerState.color || 'primary']?.main}`,
|
|
70
70
|
left: 0,
|
|
71
71
|
bottom: 0,
|
|
72
72
|
// Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
|
|
@@ -71,7 +71,7 @@ export const FormControlLabelRoot = styled('label', {
|
|
|
71
71
|
}, {
|
|
72
72
|
[`& .${formControlLabelClasses.label}`]: {
|
|
73
73
|
[`&.${formControlLabelClasses.disabled}`]: {
|
|
74
|
-
color: theme.palette.text.disabled
|
|
74
|
+
color: (theme.vars || theme).palette.text.disabled
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
}));
|
|
@@ -46,7 +46,7 @@ const FormHelperTextRoot = styled('p', {
|
|
|
46
46
|
theme,
|
|
47
47
|
ownerState
|
|
48
48
|
}) => _extends({
|
|
49
|
-
color: theme.palette.text.secondary
|
|
49
|
+
color: (theme.vars || theme).palette.text.secondary
|
|
50
50
|
}, theme.typography.caption, {
|
|
51
51
|
textAlign: 'left',
|
|
52
52
|
marginTop: 3,
|
|
@@ -54,10 +54,10 @@ const FormHelperTextRoot = styled('p', {
|
|
|
54
54
|
marginBottom: 0,
|
|
55
55
|
marginLeft: 0,
|
|
56
56
|
[`&.${formHelperTextClasses.disabled}`]: {
|
|
57
|
-
color: theme.palette.text.disabled
|
|
57
|
+
color: (theme.vars || theme).palette.text.disabled
|
|
58
58
|
},
|
|
59
59
|
[`&.${formHelperTextClasses.error}`]: {
|
|
60
|
-
color: theme.palette.error.main
|
|
60
|
+
color: (theme.vars || theme).palette.error.main
|
|
61
61
|
}
|
|
62
62
|
}, ownerState.size === 'small' && {
|
|
63
63
|
marginTop: 4
|
|
@@ -42,19 +42,19 @@ export const FormLabelRoot = styled('label', {
|
|
|
42
42
|
theme,
|
|
43
43
|
ownerState
|
|
44
44
|
}) => _extends({
|
|
45
|
-
color: theme.palette.text.secondary
|
|
45
|
+
color: (theme.vars || theme).palette.text.secondary
|
|
46
46
|
}, theme.typography.body1, {
|
|
47
47
|
lineHeight: '1.4375em',
|
|
48
48
|
padding: 0,
|
|
49
49
|
position: 'relative',
|
|
50
50
|
[`&.${formLabelClasses.focused}`]: {
|
|
51
|
-
color: theme.palette[ownerState.color].main
|
|
51
|
+
color: (theme.vars || theme).palette[ownerState.color].main
|
|
52
52
|
},
|
|
53
53
|
[`&.${formLabelClasses.disabled}`]: {
|
|
54
|
-
color: theme.palette.text.disabled
|
|
54
|
+
color: (theme.vars || theme).palette.text.disabled
|
|
55
55
|
},
|
|
56
56
|
[`&.${formLabelClasses.error}`]: {
|
|
57
|
-
color: theme.palette.error.main
|
|
57
|
+
color: (theme.vars || theme).palette.error.main
|
|
58
58
|
}
|
|
59
59
|
}));
|
|
60
60
|
const AsteriskComponent = styled('span', {
|
|
@@ -65,7 +65,7 @@ const AsteriskComponent = styled('span', {
|
|
|
65
65
|
theme
|
|
66
66
|
}) => ({
|
|
67
67
|
[`&.${formLabelClasses.error}`]: {
|
|
68
|
-
color: theme.palette.error.main
|
|
68
|
+
color: (theme.vars || theme).palette.error.main
|
|
69
69
|
}
|
|
70
70
|
}));
|
|
71
71
|
const FormLabel = /*#__PURE__*/React.forwardRef(function FormLabel(inProps, ref) {
|
package/modern/Icon/Icon.js
CHANGED
|
@@ -55,14 +55,14 @@ const IconRoot = styled('span', {
|
|
|
55
55
|
}[ownerState.fontSize],
|
|
56
56
|
// TODO v5 deprecate, v6 remove for sx
|
|
57
57
|
color: {
|
|
58
|
-
primary: theme.palette.primary.main,
|
|
59
|
-
secondary: theme.palette.secondary.main,
|
|
60
|
-
info: theme.palette.info.main,
|
|
61
|
-
success: theme.palette.success.main,
|
|
62
|
-
warning: theme.palette.warning.main,
|
|
63
|
-
action: theme.palette.action.active,
|
|
64
|
-
error: theme.palette.error.main,
|
|
65
|
-
disabled: theme.palette.action.disabled,
|
|
58
|
+
primary: (theme.vars || theme).palette.primary.main,
|
|
59
|
+
secondary: (theme.vars || theme).palette.secondary.main,
|
|
60
|
+
info: (theme.vars || theme).palette.info.main,
|
|
61
|
+
success: (theme.vars || theme).palette.success.main,
|
|
62
|
+
warning: (theme.vars || theme).palette.warning.main,
|
|
63
|
+
action: (theme.vars || theme).palette.action.active,
|
|
64
|
+
error: (theme.vars || theme).palette.error.main,
|
|
65
|
+
disabled: (theme.vars || theme).palette.action.disabled,
|
|
66
66
|
inherit: undefined
|
|
67
67
|
}[ownerState.color]
|
|
68
68
|
}));
|
|
@@ -48,13 +48,13 @@ const IconButtonRoot = styled(ButtonBase, {
|
|
|
48
48
|
borderRadius: '50%',
|
|
49
49
|
overflow: 'visible',
|
|
50
50
|
// Explicitly set the default value to solve a bug on IE11.
|
|
51
|
-
color: theme.palette.action.active,
|
|
51
|
+
color: (theme.vars || theme).palette.action.active,
|
|
52
52
|
transition: theme.transitions.create('background-color', {
|
|
53
53
|
duration: theme.transitions.duration.shortest
|
|
54
54
|
})
|
|
55
55
|
}, !ownerState.disableRipple && {
|
|
56
56
|
'&:hover': {
|
|
57
|
-
backgroundColor: alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
|
|
57
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.active} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
|
|
58
58
|
// Reset on touch devices, it doesn't add specificity
|
|
59
59
|
'@media (hover: none)': {
|
|
60
60
|
backgroundColor: 'transparent'
|
|
@@ -70,10 +70,10 @@ const IconButtonRoot = styled(ButtonBase, {
|
|
|
70
70
|
}) => _extends({}, ownerState.color === 'inherit' && {
|
|
71
71
|
color: 'inherit'
|
|
72
72
|
}, ownerState.color !== 'inherit' && ownerState.color !== 'default' && _extends({
|
|
73
|
-
color: theme.palette[ownerState.color].main
|
|
73
|
+
color: (theme.vars || theme).palette[ownerState.color].main
|
|
74
74
|
}, !ownerState.disableRipple && {
|
|
75
75
|
'&:hover': {
|
|
76
|
-
backgroundColor: alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
|
|
76
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
|
|
77
77
|
// Reset on touch devices, it doesn't add specificity
|
|
78
78
|
'@media (hover: none)': {
|
|
79
79
|
backgroundColor: 'transparent'
|
|
@@ -88,7 +88,7 @@ const IconButtonRoot = styled(ButtonBase, {
|
|
|
88
88
|
}, {
|
|
89
89
|
[`&.${iconButtonClasses.disabled}`]: {
|
|
90
90
|
backgroundColor: 'transparent',
|
|
91
|
-
color: theme.palette.action.disabled
|
|
91
|
+
color: (theme.vars || theme).palette.action.disabled
|
|
92
92
|
}
|
|
93
93
|
}));
|
|
94
94
|
/**
|
|
@@ -76,7 +76,7 @@ const ImageListItemBarTitleWrap = styled('div', {
|
|
|
76
76
|
return _extends({
|
|
77
77
|
flexGrow: 1,
|
|
78
78
|
padding: '12px 16px',
|
|
79
|
-
color: theme.palette.common.white,
|
|
79
|
+
color: (theme.vars || theme).palette.common.white,
|
|
80
80
|
overflow: 'hidden'
|
|
81
81
|
}, ownerState.position === 'below' && {
|
|
82
82
|
padding: '6px 0 12px',
|
package/modern/Input/Input.js
CHANGED
|
@@ -40,7 +40,12 @@ const InputRoot = styled(InputBaseRoot, {
|
|
|
40
40
|
ownerState
|
|
41
41
|
}) => {
|
|
42
42
|
const light = theme.palette.mode === 'light';
|
|
43
|
-
|
|
43
|
+
let bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';
|
|
44
|
+
|
|
45
|
+
if (theme.vars) {
|
|
46
|
+
bottomLineColor = `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.inputTouchBottomLine})`;
|
|
47
|
+
}
|
|
48
|
+
|
|
44
49
|
return _extends({
|
|
45
50
|
position: 'relative'
|
|
46
51
|
}, ownerState.formControl && {
|
|
@@ -49,7 +54,7 @@ const InputRoot = styled(InputBaseRoot, {
|
|
|
49
54
|
}
|
|
50
55
|
}, !ownerState.disableUnderline && {
|
|
51
56
|
'&:after': {
|
|
52
|
-
borderBottom: `2px solid ${theme.palette[ownerState.color].main}`,
|
|
57
|
+
borderBottom: `2px solid ${(theme.vars || theme).palette[ownerState.color].main}`,
|
|
53
58
|
left: 0,
|
|
54
59
|
bottom: 0,
|
|
55
60
|
// Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
|
|
@@ -70,7 +75,7 @@ const InputRoot = styled(InputBaseRoot, {
|
|
|
70
75
|
transform: 'scaleX(1) translateX(0)'
|
|
71
76
|
},
|
|
72
77
|
[`&.${inputClasses.error}:after`]: {
|
|
73
|
-
borderBottomColor: theme.palette.error.main,
|
|
78
|
+
borderBottomColor: (theme.vars || theme).palette.error.main,
|
|
74
79
|
transform: 'scaleX(1)' // error is always underlined in red
|
|
75
80
|
|
|
76
81
|
},
|
|
@@ -89,7 +94,7 @@ const InputRoot = styled(InputBaseRoot, {
|
|
|
89
94
|
|
|
90
95
|
},
|
|
91
96
|
[`&:hover:not(.${inputClasses.disabled}):before`]: {
|
|
92
|
-
borderBottom: `2px solid ${theme.palette.text.primary}`,
|
|
97
|
+
borderBottom: `2px solid ${(theme.vars || theme).palette.text.primary}`,
|
|
93
98
|
// Reset on touch devices, it doesn't add specificity
|
|
94
99
|
'@media (hover: none)': {
|
|
95
100
|
borderBottom: `1px solid ${bottomLineColor}`
|
|
@@ -54,7 +54,7 @@ const InputAdornmentRoot = styled('div', {
|
|
|
54
54
|
maxHeight: '2em',
|
|
55
55
|
alignItems: 'center',
|
|
56
56
|
whiteSpace: 'nowrap',
|
|
57
|
-
color: theme.palette.action.active
|
|
57
|
+
color: (theme.vars || theme).palette.action.active
|
|
58
58
|
}, ownerState.variant === 'filled' && {
|
|
59
59
|
// Styles applied to the root element if `variant="filled"`.
|
|
60
60
|
[`&.${inputAdornmentClasses.positionStart}&:not(.${inputAdornmentClasses.hiddenLabel})`]: {
|
|
@@ -64,7 +64,7 @@ export const InputBaseRoot = styled('div', {
|
|
|
64
64
|
theme,
|
|
65
65
|
ownerState
|
|
66
66
|
}) => _extends({}, theme.typography.body1, {
|
|
67
|
-
color: theme.palette.text.primary,
|
|
67
|
+
color: (theme.vars || theme).palette.text.primary,
|
|
68
68
|
lineHeight: '1.4375em',
|
|
69
69
|
// 23px
|
|
70
70
|
boxSizing: 'border-box',
|
|
@@ -74,7 +74,7 @@ export const InputBaseRoot = styled('div', {
|
|
|
74
74
|
display: 'inline-flex',
|
|
75
75
|
alignItems: 'center',
|
|
76
76
|
[`&.${inputBaseClasses.disabled}`]: {
|
|
77
|
-
color: theme.palette.text.disabled,
|
|
77
|
+
color: (theme.vars || theme).palette.text.disabled,
|
|
78
78
|
cursor: 'default'
|
|
79
79
|
}
|
|
80
80
|
}, ownerState.multiline && _extends({
|
|
@@ -93,17 +93,25 @@ export const InputBaseComponent = styled('input', {
|
|
|
93
93
|
ownerState
|
|
94
94
|
}) => {
|
|
95
95
|
const light = theme.palette.mode === 'light';
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
|
|
97
|
+
const placeholder = _extends({
|
|
98
|
+
color: 'currentColor'
|
|
99
|
+
}, theme.vars ? {
|
|
100
|
+
opacity: theme.vars.opacity.placeholder
|
|
101
|
+
} : {
|
|
102
|
+
opacity: light ? 0.42 : 0.5
|
|
103
|
+
}, {
|
|
99
104
|
transition: theme.transitions.create('opacity', {
|
|
100
105
|
duration: theme.transitions.duration.shorter
|
|
101
106
|
})
|
|
102
|
-
};
|
|
107
|
+
});
|
|
108
|
+
|
|
103
109
|
const placeholderHidden = {
|
|
104
110
|
opacity: '0 !important'
|
|
105
111
|
};
|
|
106
|
-
const placeholderVisible = {
|
|
112
|
+
const placeholderVisible = theme.vars ? {
|
|
113
|
+
opacity: theme.vars.opacity.placeholder
|
|
114
|
+
} : {
|
|
107
115
|
opacity: light ? 0.42 : 0.5
|
|
108
116
|
};
|
|
109
117
|
return _extends({
|
|
@@ -164,7 +172,7 @@ export const InputBaseComponent = styled('input', {
|
|
|
164
172
|
[`&.${inputBaseClasses.disabled}`]: {
|
|
165
173
|
opacity: 1,
|
|
166
174
|
// Reset iOS opacity
|
|
167
|
-
WebkitTextFillColor: theme.palette.text.disabled // Fix opacity Safari bug
|
|
175
|
+
WebkitTextFillColor: (theme.vars || theme).palette.text.disabled // Fix opacity Safari bug
|
|
168
176
|
|
|
169
177
|
},
|
|
170
178
|
'&:-webkit-autofill': {
|
package/modern/Link/Link.js
CHANGED
|
@@ -9,7 +9,6 @@ import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
|
9
9
|
import { alpha, getPath } from '@mui/system';
|
|
10
10
|
import capitalize from '../utils/capitalize';
|
|
11
11
|
import styled from '../styles/styled';
|
|
12
|
-
import useTheme from '../styles/useTheme';
|
|
13
12
|
import useThemeProps from '../styles/useThemeProps';
|
|
14
13
|
import useIsFocusVisible from '../utils/useIsFocusVisible';
|
|
15
14
|
import useForkRef from '../utils/useForkRef';
|
|
@@ -98,7 +97,6 @@ const LinkRoot = styled(Typography, {
|
|
|
98
97
|
});
|
|
99
98
|
});
|
|
100
99
|
const Link = /*#__PURE__*/React.forwardRef(function Link(inProps, ref) {
|
|
101
|
-
const theme = useTheme();
|
|
102
100
|
const props = useThemeProps({
|
|
103
101
|
props: inProps,
|
|
104
102
|
name: 'MuiLink'
|
|
@@ -117,7 +115,6 @@ const Link = /*#__PURE__*/React.forwardRef(function Link(inProps, ref) {
|
|
|
117
115
|
} = props,
|
|
118
116
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
119
117
|
|
|
120
|
-
const sxColor = typeof sx === 'function' ? sx(theme).color : sx?.color;
|
|
121
118
|
const {
|
|
122
119
|
isFocusVisibleRef,
|
|
123
120
|
onBlur: handleBlurVisible,
|
|
@@ -152,9 +149,7 @@ const Link = /*#__PURE__*/React.forwardRef(function Link(inProps, ref) {
|
|
|
152
149
|
};
|
|
153
150
|
|
|
154
151
|
const ownerState = _extends({}, props, {
|
|
155
|
-
|
|
156
|
-
// Need to find a better way to get rid of the color manipulation for `textDecorationColor`.
|
|
157
|
-
color: (typeof sxColor === 'function' ? sxColor(theme) : sxColor) || color,
|
|
152
|
+
color,
|
|
158
153
|
component,
|
|
159
154
|
focusVisible,
|
|
160
155
|
underline,
|
|
@@ -172,8 +167,8 @@ const Link = /*#__PURE__*/React.forwardRef(function Link(inProps, ref) {
|
|
|
172
167
|
ref: handlerRef,
|
|
173
168
|
ownerState: ownerState,
|
|
174
169
|
variant: variant,
|
|
175
|
-
sx: [...(
|
|
176
|
-
color
|
|
170
|
+
sx: [...(!Object.keys(colorTransformations).includes(color) ? [{
|
|
171
|
+
color
|
|
177
172
|
}] : []), ...(Array.isArray(sx) ? sx : [sx])]
|
|
178
173
|
}, other));
|
|
179
174
|
});
|
|
@@ -82,21 +82,21 @@ export const ListItemRoot = styled('div', {
|
|
|
82
82
|
}
|
|
83
83
|
}, {
|
|
84
84
|
[`&.${listItemClasses.focusVisible}`]: {
|
|
85
|
-
backgroundColor: theme.palette.action.focus
|
|
85
|
+
backgroundColor: (theme.vars || theme).palette.action.focus
|
|
86
86
|
},
|
|
87
87
|
[`&.${listItemClasses.selected}`]: {
|
|
88
|
-
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
|
|
88
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
|
|
89
89
|
[`&.${listItemClasses.focusVisible}`]: {
|
|
90
|
-
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
|
|
90
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
[`&.${listItemClasses.disabled}`]: {
|
|
94
|
-
opacity: theme.palette.action.disabledOpacity
|
|
94
|
+
opacity: (theme.vars || theme).palette.action.disabledOpacity
|
|
95
95
|
}
|
|
96
96
|
}, ownerState.alignItems === 'flex-start' && {
|
|
97
97
|
alignItems: 'flex-start'
|
|
98
98
|
}, ownerState.divider && {
|
|
99
|
-
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
99
|
+
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
100
100
|
backgroundClip: 'padding-box'
|
|
101
101
|
}, ownerState.button && {
|
|
102
102
|
transition: theme.transitions.create('background-color', {
|
|
@@ -104,17 +104,17 @@ export const ListItemRoot = styled('div', {
|
|
|
104
104
|
}),
|
|
105
105
|
'&:hover': {
|
|
106
106
|
textDecoration: 'none',
|
|
107
|
-
backgroundColor: theme.palette.action.hover,
|
|
107
|
+
backgroundColor: (theme.vars || theme).palette.action.hover,
|
|
108
108
|
// Reset on touch devices, it doesn't add specificity
|
|
109
109
|
'@media (hover: none)': {
|
|
110
110
|
backgroundColor: 'transparent'
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
113
|
[`&.${listItemClasses.selected}:hover`]: {
|
|
114
|
-
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
|
|
114
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
|
|
115
115
|
// Reset on touch devices, it doesn't add specificity
|
|
116
116
|
'@media (hover: none)': {
|
|
117
|
-
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity)
|
|
117
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity)
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
}, ownerState.hasSecondaryAction && {
|
|
@@ -63,33 +63,33 @@ const ListItemButtonRoot = styled(ButtonBase, {
|
|
|
63
63
|
}),
|
|
64
64
|
'&:hover': {
|
|
65
65
|
textDecoration: 'none',
|
|
66
|
-
backgroundColor: theme.palette.action.hover,
|
|
66
|
+
backgroundColor: (theme.vars || theme).palette.action.hover,
|
|
67
67
|
// Reset on touch devices, it doesn't add specificity
|
|
68
68
|
'@media (hover: none)': {
|
|
69
69
|
backgroundColor: 'transparent'
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
[`&.${listItemButtonClasses.selected}`]: {
|
|
73
|
-
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
|
|
73
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
|
|
74
74
|
[`&.${listItemButtonClasses.focusVisible}`]: {
|
|
75
|
-
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
|
|
75
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
[`&.${listItemButtonClasses.selected}:hover`]: {
|
|
79
|
-
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
|
|
79
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
|
|
80
80
|
// Reset on touch devices, it doesn't add specificity
|
|
81
81
|
'@media (hover: none)': {
|
|
82
|
-
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity)
|
|
82
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity)
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
[`&.${listItemButtonClasses.focusVisible}`]: {
|
|
86
|
-
backgroundColor: theme.palette.action.focus
|
|
86
|
+
backgroundColor: (theme.vars || theme).palette.action.focus
|
|
87
87
|
},
|
|
88
88
|
[`&.${listItemButtonClasses.disabled}`]: {
|
|
89
|
-
opacity: theme.palette.action.disabledOpacity
|
|
89
|
+
opacity: (theme.vars || theme).palette.action.disabledOpacity
|
|
90
90
|
}
|
|
91
91
|
}, ownerState.divider && {
|
|
92
|
-
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
92
|
+
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
93
93
|
backgroundClip: 'padding-box'
|
|
94
94
|
}, ownerState.alignItems === 'flex-start' && {
|
|
95
95
|
alignItems: 'flex-start'
|
|
@@ -36,7 +36,7 @@ const ListItemIconRoot = styled('div', {
|
|
|
36
36
|
ownerState
|
|
37
37
|
}) => _extends({
|
|
38
38
|
minWidth: 56,
|
|
39
|
-
color: theme.palette.action.active,
|
|
39
|
+
color: (theme.vars || theme).palette.action.active,
|
|
40
40
|
flexShrink: 0,
|
|
41
41
|
display: 'inline-flex'
|
|
42
42
|
}, ownerState.alignItems === 'flex-start' && {
|
|
@@ -41,12 +41,12 @@ const ListSubheaderRoot = styled('li', {
|
|
|
41
41
|
boxSizing: 'border-box',
|
|
42
42
|
lineHeight: '48px',
|
|
43
43
|
listStyle: 'none',
|
|
44
|
-
color: theme.palette.text.secondary,
|
|
44
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
45
45
|
fontFamily: theme.typography.fontFamily,
|
|
46
46
|
fontWeight: theme.typography.fontWeightMedium,
|
|
47
47
|
fontSize: theme.typography.pxToRem(14)
|
|
48
48
|
}, ownerState.color === 'primary' && {
|
|
49
|
-
color: theme.palette.primary.main
|
|
49
|
+
color: (theme.vars || theme).palette.primary.main
|
|
50
50
|
}, ownerState.color === 'inherit' && {
|
|
51
51
|
color: 'inherit'
|
|
52
52
|
}, !ownerState.disableGutters && {
|
|
@@ -58,7 +58,7 @@ const ListSubheaderRoot = styled('li', {
|
|
|
58
58
|
position: 'sticky',
|
|
59
59
|
top: 0,
|
|
60
60
|
zIndex: 1,
|
|
61
|
-
backgroundColor: theme.palette.background.paper
|
|
61
|
+
backgroundColor: (theme.vars || theme).palette.background.paper
|
|
62
62
|
}));
|
|
63
63
|
const ListSubheader = /*#__PURE__*/React.forwardRef(function ListSubheader(inProps, ref) {
|
|
64
64
|
const props = useThemeProps({
|
|
@@ -63,35 +63,35 @@ const MenuItemRoot = styled(ButtonBase, {
|
|
|
63
63
|
paddingLeft: 16,
|
|
64
64
|
paddingRight: 16
|
|
65
65
|
}, ownerState.divider && {
|
|
66
|
-
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
66
|
+
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
67
67
|
backgroundClip: 'padding-box'
|
|
68
68
|
}, {
|
|
69
69
|
'&:hover': {
|
|
70
70
|
textDecoration: 'none',
|
|
71
|
-
backgroundColor: theme.palette.action.hover,
|
|
71
|
+
backgroundColor: (theme.vars || theme).palette.action.hover,
|
|
72
72
|
// Reset on touch devices, it doesn't add specificity
|
|
73
73
|
'@media (hover: none)': {
|
|
74
74
|
backgroundColor: 'transparent'
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
[`&.${menuItemClasses.selected}`]: {
|
|
78
|
-
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
|
|
78
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
|
|
79
79
|
[`&.${menuItemClasses.focusVisible}`]: {
|
|
80
|
-
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
|
|
80
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
[`&.${menuItemClasses.selected}:hover`]: {
|
|
84
|
-
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
|
|
84
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
|
|
85
85
|
// Reset on touch devices, it doesn't add specificity
|
|
86
86
|
'@media (hover: none)': {
|
|
87
|
-
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity)
|
|
87
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity)
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
90
|
[`&.${menuItemClasses.focusVisible}`]: {
|
|
91
|
-
backgroundColor: theme.palette.action.focus
|
|
91
|
+
backgroundColor: (theme.vars || theme).palette.action.focus
|
|
92
92
|
},
|
|
93
93
|
[`&.${menuItemClasses.disabled}`]: {
|
|
94
|
-
opacity: theme.palette.action.disabledOpacity
|
|
94
|
+
opacity: (theme.vars || theme).palette.action.disabledOpacity
|
|
95
95
|
},
|
|
96
96
|
[`& + .${dividerClasses.root}`]: {
|
|
97
97
|
marginTop: theme.spacing(1),
|