@mui/material 5.8.4 → 5.8.5
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/accordionClasses.d.ts +18 -18
- package/AccordionActions/accordionActionsClasses.d.ts +10 -10
- package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
- package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
- package/Alert/alertClasses.d.ts +44 -44
- package/AlertTitle/alertTitleClasses.d.ts +8 -8
- package/AppBar/AppBar.js +22 -5
- package/AppBar/appBarClasses.d.ts +28 -28
- package/Autocomplete/autocompleteClasses.d.ts +54 -54
- package/Avatar/Avatar.js +7 -4
- package/Avatar/avatarClasses.d.ts +20 -20
- 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 +56 -56
- package/BottomNavigation/BottomNavigation.js +0 -0
- package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
- package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
- package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
- package/Button/buttonClasses.d.ts +100 -100
- package/ButtonBase/buttonBaseClasses.d.ts +12 -12
- package/ButtonBase/touchRippleClasses.d.ts +20 -20
- package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
- package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
- package/CHANGELOG.md +69 -4
- package/Card/cardClasses.d.ts +8 -8
- 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/Chip.js +31 -30
- package/Chip/chipClasses.d.ts +80 -80
- 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 +6 -6
- package/Dialog/Dialog.js +11 -6
- package/Dialog/DialogContext.d.ts +6 -6
- package/Dialog/dialogClasses.d.ts +36 -36
- package/DialogActions/dialogActionsClasses.d.ts +10 -10
- package/DialogContent/dialogContentClasses.d.ts +10 -10
- package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
- package/DialogTitle/dialogTitleClasses.d.ts +8 -8
- package/Divider/dividerClasses.d.ts +34 -34
- package/Drawer/drawerClasses.d.ts +30 -30
- package/Fab/fabClasses.d.ts +26 -26
- package/FilledInput/FilledInput.js +28 -13
- package/FilledInput/filledInputClasses.d.ts +40 -40
- package/FormControl/formControlClasses.d.ts +14 -14
- package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
- package/FormGroup/formGroupClasses.d.ts +12 -12
- package/FormHelperText/formHelperTextClasses.d.ts +22 -22
- package/FormLabel/formLabelClasses.d.ts +22 -22
- package/Grid/gridClasses.d.ts +48 -48
- package/Icon/iconClasses.d.ts +24 -24
- package/IconButton/iconButtonClasses.d.ts +26 -26
- package/ImageList/imageListClasses.d.ts +16 -16
- package/ImageListItem/imageListItemClasses.d.ts +18 -18
- package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
- package/Input/inputClasses.d.ts +34 -34
- package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
- package/InputBase/InputBase.js +2 -2
- package/InputBase/inputBaseClasses.d.ts +44 -44
- package/InputLabel/inputLabelClasses.d.ts +32 -32
- package/LinearProgress/LinearProgress.js +6 -2
- package/LinearProgress/linearProgressClasses.d.ts +42 -42
- package/Link/getTextDecoration.d.ts +15 -15
- package/Link/linkClasses.d.ts +18 -18
- package/List/listClasses.d.ts +14 -14
- package/ListItem/listItemClasses.d.ts +30 -30
- package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
- package/ListItemButton/listItemButtonClasses.d.ts +22 -22
- package/ListItemIcon/listItemIconClasses.d.ts +10 -10
- package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
- package/ListItemText/listItemTextClasses.d.ts +18 -18
- package/ListSubheader/listSubheaderClasses.d.ts +18 -18
- package/Menu/menuClasses.d.ts +12 -12
- package/MenuItem/menuItemClasses.d.ts +20 -20
- package/MobileStepper/mobileStepperClasses.d.ts +22 -22
- package/Modal/Modal.d.ts +2 -0
- package/Modal/Modal.js +25 -8
- package/NativeSelect/nativeSelectClasses.d.ts +32 -32
- package/OutlinedInput/OutlinedInput.js +25 -10
- package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
- package/Pagination/paginationClasses.d.ts +14 -14
- 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/Radio/radioClasses.d.ts +16 -16
- package/RadioGroup/RadioGroupContext.d.ts +11 -11
- package/RadioGroup/useRadioGroup.d.ts +4 -4
- package/Rating/ratingClasses.d.ts +40 -40
- package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
- package/Select/selectClasses.d.ts +30 -30
- package/Skeleton/Skeleton.js +8 -3
- package/Skeleton/skeletonClasses.d.ts +24 -24
- package/Slider/Slider.js +12 -12
- package/Snackbar/snackbarClasses.d.ts +20 -20
- package/SnackbarContent/SnackbarContent.js +3 -3
- package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
- package/SpeedDial/speedDialClasses.d.ts +22 -22
- package/SpeedDialAction/SpeedDialAction.js +7 -7
- 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/StepConnector.js +14 -11
- package/StepConnector/stepConnectorClasses.d.ts +26 -26
- package/StepContent/StepContent.js +1 -1
- package/StepContent/stepContentClasses.d.ts +12 -12
- package/StepIcon/stepIconClasses.d.ts +16 -16
- package/StepLabel/stepLabelClasses.d.ts +28 -28
- package/Stepper/StepperContext.d.ts +18 -18
- package/Stepper/stepperClasses.d.ts +14 -14
- package/SvgIcon/svgIconClasses.d.ts +24 -24
- package/Switch/Switch.js +11 -11
- package/Switch/switchClasses.d.ts +32 -32
- package/Tab/tabClasses.d.ts +26 -26
- package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
- package/Table/tableClasses.d.ts +10 -10
- package/TableBody/tableBodyClasses.d.ts +8 -8
- package/TableCell/TableCell.js +5 -5
- 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/tablePaginationClasses.d.ts +28 -28
- package/TableRow/tableRowClasses.d.ts +16 -16
- package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
- package/Tabs/Tabs.js +6 -16
- package/Tabs/tabsClasses.d.ts +32 -32
- package/TextField/textFieldClasses.d.ts +8 -8
- package/ToggleButton/toggleButtonClasses.d.ts +24 -24
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
- package/Toolbar/toolbarClasses.d.ts +14 -14
- package/Tooltip/Tooltip.js +1 -1
- package/Tooltip/tooltipClasses.d.ts +30 -30
- package/Typography/typographyClasses.d.ts +50 -50
- package/className/index.d.ts +1 -1
- package/darkScrollbar/index.d.ts +28 -28
- package/index.js +1 -1
- package/internal/switchBaseClasses.d.ts +12 -12
- package/legacy/AppBar/AppBar.js +23 -4
- package/legacy/Avatar/Avatar.js +7 -4
- package/legacy/Badge/Badge.js +2 -2
- package/legacy/BottomNavigation/BottomNavigation.js +0 -0
- package/legacy/Chip/Chip.js +31 -30
- package/legacy/Dialog/Dialog.js +11 -6
- package/legacy/FilledInput/FilledInput.js +28 -14
- package/legacy/InputBase/InputBase.js +2 -2
- package/legacy/LinearProgress/LinearProgress.js +6 -2
- package/legacy/Modal/Modal.js +23 -7
- package/legacy/OutlinedInput/OutlinedInput.js +21 -9
- package/legacy/Skeleton/Skeleton.js +2 -2
- package/legacy/Slider/Slider.js +12 -12
- package/legacy/SnackbarContent/SnackbarContent.js +3 -3
- package/legacy/SpeedDialAction/SpeedDialAction.js +7 -7
- package/legacy/StepConnector/StepConnector.js +2 -1
- package/legacy/StepContent/StepContent.js +1 -1
- package/legacy/Switch/Switch.js +11 -11
- package/legacy/TableCell/TableCell.js +5 -5
- package/legacy/Tabs/Tabs.js +6 -16
- package/legacy/Tooltip/Tooltip.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/styles/CssVarsProvider.js +1 -1
- package/legacy/styles/experimental_extendTheme.js +113 -18
- package/locale/index.d.ts +71 -71
- package/modern/AppBar/AppBar.js +22 -5
- package/modern/Avatar/Avatar.js +7 -4
- package/modern/Badge/Badge.js +2 -2
- package/modern/BottomNavigation/BottomNavigation.js +0 -0
- package/modern/Chip/Chip.js +31 -30
- package/modern/Dialog/Dialog.js +11 -6
- package/modern/FilledInput/FilledInput.js +27 -12
- package/modern/InputBase/InputBase.js +2 -2
- package/modern/LinearProgress/LinearProgress.js +6 -2
- package/modern/Modal/Modal.js +24 -7
- package/modern/OutlinedInput/OutlinedInput.js +25 -10
- package/modern/Skeleton/Skeleton.js +7 -2
- package/modern/Slider/Slider.js +12 -12
- package/modern/SnackbarContent/SnackbarContent.js +3 -3
- package/modern/SpeedDialAction/SpeedDialAction.js +7 -7
- package/modern/StepConnector/StepConnector.js +14 -11
- package/modern/StepContent/StepContent.js +1 -1
- package/modern/Switch/Switch.js +11 -11
- package/modern/TableCell/TableCell.js +5 -5
- package/modern/Tabs/Tabs.js +6 -16
- package/modern/Tooltip/Tooltip.js +1 -1
- package/modern/index.js +1 -1
- package/modern/styles/CssVarsProvider.js +1 -1
- package/modern/styles/experimental_extendTheme.js +114 -18
- package/node/AppBar/AppBar.js +22 -5
- package/node/Avatar/Avatar.js +7 -4
- package/node/Badge/Badge.js +2 -2
- package/node/BottomNavigation/BottomNavigation.js +0 -0
- package/node/Chip/Chip.js +31 -30
- package/node/Dialog/Dialog.js +11 -6
- package/node/FilledInput/FilledInput.js +28 -13
- package/node/InputBase/InputBase.js +2 -2
- package/node/LinearProgress/LinearProgress.js +6 -2
- package/node/Modal/Modal.js +25 -8
- package/node/OutlinedInput/OutlinedInput.js +25 -10
- package/node/Skeleton/Skeleton.js +7 -2
- package/node/Slider/Slider.js +12 -12
- package/node/SnackbarContent/SnackbarContent.js +3 -3
- package/node/SpeedDialAction/SpeedDialAction.js +7 -7
- package/node/StepConnector/StepConnector.js +14 -11
- package/node/StepContent/StepContent.js +1 -1
- package/node/Switch/Switch.js +11 -11
- package/node/TableCell/TableCell.js +5 -5
- package/node/Tabs/Tabs.js +6 -16
- package/node/Tooltip/Tooltip.js +1 -1
- package/node/index.js +1 -1
- package/node/styles/CssVarsProvider.js +1 -1
- package/node/styles/experimental_extendTheme.js +112 -17
- package/package.json +4 -4
- package/styles/CssVarsProvider.js +1 -1
- package/styles/createPalette.d.ts +65 -2
- package/styles/experimental_extendTheme.js +114 -18
- 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 +548 -240
- package/umd/material-ui.production.min.js +27 -22
- 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/legacy/Slider/Slider.js
CHANGED
|
@@ -34,7 +34,7 @@ var SliderRoot = styled('span', {
|
|
|
34
34
|
position: 'relative',
|
|
35
35
|
cursor: 'pointer',
|
|
36
36
|
touchAction: 'none',
|
|
37
|
-
color: theme.palette[ownerState.color].main,
|
|
37
|
+
color: (theme.vars || theme).palette[ownerState.color].main,
|
|
38
38
|
WebkitTapHighlightColor: 'transparent'
|
|
39
39
|
}, ownerState.orientation === 'horizontal' && _extends({
|
|
40
40
|
height: 4,
|
|
@@ -69,7 +69,7 @@ var SliderRoot = styled('span', {
|
|
|
69
69
|
}, _defineProperty(_extends2, "&.".concat(sliderClasses.disabled), {
|
|
70
70
|
pointerEvents: 'none',
|
|
71
71
|
cursor: 'default',
|
|
72
|
-
color: theme.palette.grey[400]
|
|
72
|
+
color: (theme.vars || theme).palette.grey[400]
|
|
73
73
|
}), _defineProperty(_extends2, "&.".concat(sliderClasses.dragging), _defineProperty({}, "& .".concat(sliderClasses.thumb, ", & .").concat(sliderClasses.track), {
|
|
74
74
|
transition: 'none'
|
|
75
75
|
})), _extends2));
|
|
@@ -163,8 +163,8 @@ var SliderTrack = styled('span', {
|
|
|
163
163
|
}, ownerState.track === false && {
|
|
164
164
|
display: 'none'
|
|
165
165
|
}, ownerState.track === 'inverted' && {
|
|
166
|
-
backgroundColor: color,
|
|
167
|
-
borderColor: color
|
|
166
|
+
backgroundColor: theme.vars ? theme.vars.palette.Slider["".concat(ownerState.color, "Track")] : color,
|
|
167
|
+
borderColor: theme.vars ? theme.vars.palette.Slider["".concat(ownerState.color, "Track")] : color
|
|
168
168
|
});
|
|
169
169
|
});
|
|
170
170
|
process.env.NODE_ENV !== "production" ? SliderTrack.propTypes
|
|
@@ -223,7 +223,7 @@ var SliderThumb = styled('span', {
|
|
|
223
223
|
borderRadius: 'inherit',
|
|
224
224
|
width: '100%',
|
|
225
225
|
height: '100%',
|
|
226
|
-
boxShadow: theme.shadows[2]
|
|
226
|
+
boxShadow: (theme.vars || theme).shadows[2]
|
|
227
227
|
}, ownerState.size === 'small' && {
|
|
228
228
|
boxShadow: 'none'
|
|
229
229
|
}),
|
|
@@ -239,12 +239,12 @@ var SliderThumb = styled('span', {
|
|
|
239
239
|
transform: 'translate(-50%, -50%)'
|
|
240
240
|
}
|
|
241
241
|
}, _defineProperty(_extends3, "&:hover, &.".concat(sliderClasses.focusVisible), {
|
|
242
|
-
boxShadow: "0px 0px 0px 8px ".concat(alpha(theme.palette[ownerState.color].main, 0.16)),
|
|
242
|
+
boxShadow: "0px 0px 0px 8px ".concat(theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / 0.16)") : alpha(theme.palette[ownerState.color].main, 0.16)),
|
|
243
243
|
'@media (hover: none)': {
|
|
244
244
|
boxShadow: 'none'
|
|
245
245
|
}
|
|
246
246
|
}), _defineProperty(_extends3, "&.".concat(sliderClasses.active), {
|
|
247
|
-
boxShadow: "0px 0px 0px 14px ".concat(alpha(theme.palette[ownerState.color].main, 0.16))
|
|
247
|
+
boxShadow: "0px 0px 0px 14px ".concat(theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / 0.16)") : alpha(theme.palette[ownerState.color].main, 0.16))
|
|
248
248
|
}), _defineProperty(_extends3, "&.".concat(sliderClasses.disabled), {
|
|
249
249
|
'&:hover': {
|
|
250
250
|
boxShadow: 'none'
|
|
@@ -286,9 +286,9 @@ var SliderValueLabel = styled(SliderValueLabelUnstyled, {
|
|
|
286
286
|
transformOrigin: 'bottom center',
|
|
287
287
|
transform: 'translateY(-100%) scale(0)',
|
|
288
288
|
position: 'absolute',
|
|
289
|
-
backgroundColor: theme.palette.grey[600],
|
|
289
|
+
backgroundColor: (theme.vars || theme).palette.grey[600],
|
|
290
290
|
borderRadius: 2,
|
|
291
|
-
color: theme.palette.common.white,
|
|
291
|
+
color: (theme.vars || theme).palette.common.white,
|
|
292
292
|
display: 'flex',
|
|
293
293
|
alignItems: 'center',
|
|
294
294
|
justifyContent: 'center',
|
|
@@ -363,7 +363,7 @@ var SliderMark = styled('span', {
|
|
|
363
363
|
left: '50%',
|
|
364
364
|
transform: 'translate(-50%, 1px)'
|
|
365
365
|
}, markActive && {
|
|
366
|
-
backgroundColor: theme.palette.background.paper,
|
|
366
|
+
backgroundColor: (theme.vars || theme).palette.background.paper,
|
|
367
367
|
opacity: 0.8
|
|
368
368
|
});
|
|
369
369
|
});
|
|
@@ -395,7 +395,7 @@ var SliderMarkLabel = styled('span', {
|
|
|
395
395
|
ownerState = _ref7.ownerState,
|
|
396
396
|
markLabelActive = _ref7.markLabelActive;
|
|
397
397
|
return _extends({}, theme.typography.body2, {
|
|
398
|
-
color: theme.palette.text.secondary,
|
|
398
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
399
399
|
position: 'absolute',
|
|
400
400
|
whiteSpace: 'nowrap'
|
|
401
401
|
}, ownerState.orientation === 'horizontal' && {
|
|
@@ -411,7 +411,7 @@ var SliderMarkLabel = styled('span', {
|
|
|
411
411
|
left: 44
|
|
412
412
|
}
|
|
413
413
|
}, markLabelActive && {
|
|
414
|
-
color: theme.palette.text.primary
|
|
414
|
+
color: (theme.vars || theme).palette.text.primary
|
|
415
415
|
});
|
|
416
416
|
});
|
|
417
417
|
process.env.NODE_ENV !== "production" ? SliderMarkLabel.propTypes
|
|
@@ -34,13 +34,13 @@ var SnackbarContentRoot = styled(Paper, {
|
|
|
34
34
|
var emphasis = theme.palette.mode === 'light' ? 0.8 : 0.98;
|
|
35
35
|
var backgroundColor = emphasize(theme.palette.background.default, emphasis);
|
|
36
36
|
return _extends({}, theme.typography.body2, _defineProperty({
|
|
37
|
-
color: theme.palette.getContrastText(backgroundColor),
|
|
38
|
-
backgroundColor: backgroundColor,
|
|
37
|
+
color: theme.vars ? theme.vars.palette.text.primary : theme.palette.getContrastText(backgroundColor),
|
|
38
|
+
backgroundColor: theme.vars ? theme.vars.palette.SnackbarContent.bg : backgroundColor,
|
|
39
39
|
display: 'flex',
|
|
40
40
|
alignItems: 'center',
|
|
41
41
|
flexWrap: 'wrap',
|
|
42
42
|
padding: '6px 16px',
|
|
43
|
-
borderRadius: theme.shape.borderRadius,
|
|
43
|
+
borderRadius: (theme.vars || theme).shape.borderRadius,
|
|
44
44
|
flexGrow: 1
|
|
45
45
|
}, theme.breakpoints.up('sm'), {
|
|
46
46
|
flexGrow: 'initial',
|
|
@@ -41,10 +41,10 @@ var SpeedDialActionFab = styled(Fab, {
|
|
|
41
41
|
ownerState = _ref.ownerState;
|
|
42
42
|
return _extends({
|
|
43
43
|
margin: 8,
|
|
44
|
-
color: theme.palette.text.secondary,
|
|
45
|
-
backgroundColor: theme.palette.background.paper,
|
|
44
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
45
|
+
backgroundColor: (theme.vars || theme).palette.background.paper,
|
|
46
46
|
'&:hover': {
|
|
47
|
-
backgroundColor: emphasize(theme.palette.background.paper, 0.15)
|
|
47
|
+
backgroundColor: theme.vars ? theme.vars.palette.SpeedDialAction.fabHoverBg : emphasize(theme.palette.background.paper, 0.15)
|
|
48
48
|
},
|
|
49
49
|
transition: "".concat(theme.transitions.create('transform', {
|
|
50
50
|
duration: theme.transitions.duration.shorter
|
|
@@ -98,10 +98,10 @@ var SpeedDialActionStaticTooltipLabel = styled('span', {
|
|
|
98
98
|
return _extends({
|
|
99
99
|
position: 'absolute'
|
|
100
100
|
}, theme.typography.body1, {
|
|
101
|
-
backgroundColor: theme.palette.background.paper,
|
|
102
|
-
borderRadius: theme.shape.borderRadius,
|
|
103
|
-
boxShadow: theme.shadows[1],
|
|
104
|
-
color: theme.palette.text.secondary,
|
|
101
|
+
backgroundColor: (theme.vars || theme).palette.background.paper,
|
|
102
|
+
borderRadius: (theme.vars || theme).shape.borderRadius,
|
|
103
|
+
boxShadow: (theme.vars || theme).shadows[1],
|
|
104
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
105
105
|
padding: '4px 16px',
|
|
106
106
|
wordBreak: 'keep-all'
|
|
107
107
|
});
|
|
@@ -57,9 +57,10 @@ var StepConnectorLine = styled('span', {
|
|
|
57
57
|
})(function (_ref2) {
|
|
58
58
|
var ownerState = _ref2.ownerState,
|
|
59
59
|
theme = _ref2.theme;
|
|
60
|
+
var borderColor = theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600];
|
|
60
61
|
return _extends({
|
|
61
62
|
display: 'block',
|
|
62
|
-
borderColor: theme.
|
|
63
|
+
borderColor: theme.vars ? theme.vars.palette.StepConnector.border : borderColor
|
|
63
64
|
}, ownerState.orientation === 'horizontal' && {
|
|
64
65
|
borderTopStyle: 'solid',
|
|
65
66
|
borderTopWidth: 1
|
|
@@ -38,7 +38,7 @@ var StepContentRoot = styled('div', {
|
|
|
38
38
|
paddingLeft: 8 + 12,
|
|
39
39
|
// margin + half icon
|
|
40
40
|
paddingRight: 8,
|
|
41
|
-
borderLeft: "1px solid ".concat(theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600])
|
|
41
|
+
borderLeft: theme.vars ? "1px solid ".concat(theme.vars.palette.StepContent.border) : "1px solid ".concat(theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600])
|
|
42
42
|
}, ownerState.last && {
|
|
43
43
|
borderLeft: 'none'
|
|
44
44
|
});
|
package/legacy/Switch/Switch.js
CHANGED
|
@@ -95,18 +95,18 @@ var SwitchSwitchBase = styled(SwitchBase, {
|
|
|
95
95
|
left: 0,
|
|
96
96
|
zIndex: 1,
|
|
97
97
|
// Render above the focus ripple.
|
|
98
|
-
color: theme.palette.mode === 'light' ? theme.palette.common.white : theme.palette.grey[300],
|
|
98
|
+
color: theme.vars ? theme.vars.palette.Switch.defaultColor : "".concat(theme.palette.mode === 'light' ? theme.palette.common.white : theme.palette.grey[300]),
|
|
99
99
|
transition: theme.transitions.create(['left', 'transform'], {
|
|
100
100
|
duration: theme.transitions.duration.shortest
|
|
101
101
|
})
|
|
102
102
|
}, _defineProperty(_ref5, "&.".concat(switchClasses.checked), {
|
|
103
103
|
transform: 'translateX(20px)'
|
|
104
104
|
}), _defineProperty(_ref5, "&.".concat(switchClasses.disabled), {
|
|
105
|
-
color: theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[600]
|
|
105
|
+
color: theme.vars ? theme.vars.palette.Switch.defaultDisabledColor : "".concat(theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[600])
|
|
106
106
|
}), _defineProperty(_ref5, "&.".concat(switchClasses.checked, " + .").concat(switchClasses.track), {
|
|
107
107
|
opacity: 0.5
|
|
108
108
|
}), _defineProperty(_ref5, "&.".concat(switchClasses.disabled, " + .").concat(switchClasses.track), {
|
|
109
|
-
opacity: theme.palette.mode === 'light' ? 0.12 : 0.2
|
|
109
|
+
opacity: theme.vars ? theme.vars.opacity.switchTrackDisabled : "".concat(theme.palette.mode === 'light' ? 0.12 : 0.2)
|
|
110
110
|
}), _defineProperty(_ref5, "& .".concat(switchClasses.input), {
|
|
111
111
|
left: '-100%',
|
|
112
112
|
width: '300%'
|
|
@@ -118,24 +118,24 @@ var SwitchSwitchBase = styled(SwitchBase, {
|
|
|
118
118
|
ownerState = _ref6.ownerState;
|
|
119
119
|
return _extends({
|
|
120
120
|
'&:hover': {
|
|
121
|
-
backgroundColor: alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
|
|
121
|
+
backgroundColor: theme.vars ? "rgba(".concat(theme.vars.palette.action.activeChannel, " / ").concat(theme.vars.palette.action.hoverOpacity, ")") : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
|
|
122
122
|
// Reset on touch devices, it doesn't add specificity
|
|
123
123
|
'@media (hover: none)': {
|
|
124
124
|
backgroundColor: 'transparent'
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
}, ownerState.color !== 'default' && (_ref7 = {}, _defineProperty(_ref7, "&.".concat(switchClasses.checked), _defineProperty({
|
|
128
|
-
color: theme.palette[ownerState.color].main,
|
|
128
|
+
color: (theme.vars || theme).palette[ownerState.color].main,
|
|
129
129
|
'&:hover': {
|
|
130
|
-
backgroundColor: alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
|
|
130
|
+
backgroundColor: theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / ").concat(theme.vars.palette.action.hoverOpacity, ")") : alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
|
|
131
131
|
'@media (hover: none)': {
|
|
132
132
|
backgroundColor: 'transparent'
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
}, "&.".concat(switchClasses.disabled), {
|
|
136
|
-
color: theme.palette.mode === 'light' ? lighten(theme.palette[ownerState.color].main, 0.62) : darken(theme.palette[ownerState.color].main, 0.55)
|
|
136
|
+
color: theme.vars ? theme.vars.palette.Switch["".concat(ownerState.color, "DisabledColor")] : "".concat(theme.palette.mode === 'light' ? lighten(theme.palette[ownerState.color].main, 0.62) : darken(theme.palette[ownerState.color].main, 0.55))
|
|
137
137
|
})), _defineProperty(_ref7, "&.".concat(switchClasses.checked, " + .").concat(switchClasses.track), {
|
|
138
|
-
backgroundColor: theme.palette[ownerState.color].main
|
|
138
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].main
|
|
139
139
|
}), _ref7));
|
|
140
140
|
});
|
|
141
141
|
var SwitchTrack = styled('span', {
|
|
@@ -154,8 +154,8 @@ var SwitchTrack = styled('span', {
|
|
|
154
154
|
transition: theme.transitions.create(['opacity', 'background-color'], {
|
|
155
155
|
duration: theme.transitions.duration.shortest
|
|
156
156
|
}),
|
|
157
|
-
backgroundColor: theme.palette.mode === 'light' ? theme.palette.common.black : theme.palette.common.white,
|
|
158
|
-
opacity: theme.palette.mode === 'light' ? 0.38 : 0.3
|
|
157
|
+
backgroundColor: theme.vars ? theme.vars.palette.common.onBackground : "".concat(theme.palette.mode === 'light' ? theme.palette.common.black : theme.palette.common.white),
|
|
158
|
+
opacity: theme.vars ? theme.vars.opacity.switchTrack : "".concat(theme.palette.mode === 'light' ? 0.38 : 0.3)
|
|
159
159
|
};
|
|
160
160
|
});
|
|
161
161
|
var SwitchThumb = styled('span', {
|
|
@@ -167,7 +167,7 @@ var SwitchThumb = styled('span', {
|
|
|
167
167
|
})(function (_ref9) {
|
|
168
168
|
var theme = _ref9.theme;
|
|
169
169
|
return {
|
|
170
|
-
boxShadow: theme.shadows[1],
|
|
170
|
+
boxShadow: (theme.vars || theme).shadows[1],
|
|
171
171
|
backgroundColor: 'currentColor',
|
|
172
172
|
width: 20,
|
|
173
173
|
height: 20,
|
|
@@ -42,17 +42,17 @@ var TableCellRoot = styled('td', {
|
|
|
42
42
|
verticalAlign: 'inherit',
|
|
43
43
|
// Workaround for a rendering bug with spanned columns in Chrome 62.0.
|
|
44
44
|
// Removes the alpha (sets it to 1), and lightens or darkens the theme color.
|
|
45
|
-
borderBottom: "1px solid\n ".concat(theme.palette.mode === 'light' ? lighten(alpha(theme.palette.divider, 1), 0.88) : darken(alpha(theme.palette.divider, 1), 0.68)),
|
|
45
|
+
borderBottom: theme.vars ? "1px solid ".concat(theme.vars.palette.TableCell.border) : "1px solid\n ".concat(theme.palette.mode === 'light' ? lighten(alpha(theme.palette.divider, 1), 0.88) : darken(alpha(theme.palette.divider, 1), 0.68)),
|
|
46
46
|
textAlign: 'left',
|
|
47
47
|
padding: 16
|
|
48
48
|
}, ownerState.variant === 'head' && {
|
|
49
|
-
color: theme.palette.text.primary,
|
|
49
|
+
color: (theme.vars || theme).palette.text.primary,
|
|
50
50
|
lineHeight: theme.typography.pxToRem(24),
|
|
51
51
|
fontWeight: theme.typography.fontWeightMedium
|
|
52
52
|
}, ownerState.variant === 'body' && {
|
|
53
|
-
color: theme.palette.text.primary
|
|
53
|
+
color: (theme.vars || theme).palette.text.primary
|
|
54
54
|
}, ownerState.variant === 'footer' && {
|
|
55
|
-
color: theme.palette.text.secondary,
|
|
55
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
56
56
|
lineHeight: theme.typography.pxToRem(21),
|
|
57
57
|
fontSize: theme.typography.pxToRem(12)
|
|
58
58
|
}, ownerState.size === 'small' && _defineProperty({
|
|
@@ -83,7 +83,7 @@ var TableCellRoot = styled('td', {
|
|
|
83
83
|
position: 'sticky',
|
|
84
84
|
top: 0,
|
|
85
85
|
zIndex: 2,
|
|
86
|
-
backgroundColor: theme.palette.background.default
|
|
86
|
+
backgroundColor: (theme.vars || theme).palette.background.default
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
89
|
/**
|
package/legacy/Tabs/Tabs.js
CHANGED
|
@@ -429,31 +429,21 @@ var Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
429
429
|
scroll(scrollValue);
|
|
430
430
|
};
|
|
431
431
|
|
|
432
|
-
var getFirstVisibleTab = function getFirstVisibleTab(tabs) {
|
|
433
|
-
var containerSize = tabsRef.current[clientSize];
|
|
434
|
-
var containerStartBound = Math.round(tabsRef.current[scrollStart]);
|
|
435
|
-
var containerEndBound = Math.round(containerStartBound + containerSize);
|
|
436
|
-
var offset = vertical ? 'offsetTop' : 'offsetLeft';
|
|
437
|
-
return tabs.find(function (tab) {
|
|
438
|
-
var centerPoint = tab[offset] + tab[clientSize] / 2;
|
|
439
|
-
return centerPoint >= containerStartBound && centerPoint <= containerEndBound;
|
|
440
|
-
});
|
|
441
|
-
};
|
|
442
|
-
|
|
443
432
|
var getScrollSize = function getScrollSize() {
|
|
444
433
|
var containerSize = tabsRef.current[clientSize];
|
|
445
434
|
var totalSize = 0;
|
|
446
435
|
var children = Array.from(tabListRef.current.children);
|
|
447
|
-
var firstVisibleTab = getFirstVisibleTab(children);
|
|
448
|
-
|
|
449
|
-
if (firstVisibleTab && firstVisibleTab[clientSize] > containerSize) {
|
|
450
|
-
return firstVisibleTab[clientSize];
|
|
451
|
-
}
|
|
452
436
|
|
|
453
437
|
for (var i = 0; i < children.length; i += 1) {
|
|
454
438
|
var tab = children[i];
|
|
455
439
|
|
|
456
440
|
if (totalSize + tab[clientSize] > containerSize) {
|
|
441
|
+
// If the first item is longer than the container size, then only scroll
|
|
442
|
+
// by the container size.
|
|
443
|
+
if (i === 0) {
|
|
444
|
+
totalSize = containerSize;
|
|
445
|
+
}
|
|
446
|
+
|
|
457
447
|
break;
|
|
458
448
|
}
|
|
459
449
|
|
|
@@ -112,7 +112,7 @@ var TooltipTooltip = styled('div', {
|
|
|
112
112
|
var theme = _ref3.theme,
|
|
113
113
|
ownerState = _ref3.ownerState;
|
|
114
114
|
return _extends({
|
|
115
|
-
backgroundColor: theme.vars ?
|
|
115
|
+
backgroundColor: theme.vars ? theme.vars.palette.Tooltip.bg : alpha(theme.palette.grey[700], 0.92),
|
|
116
116
|
borderRadius: (theme.vars || theme).shape.borderRadius,
|
|
117
117
|
color: (theme.vars || theme).palette.common.white,
|
|
118
118
|
fontFamily: theme.typography.fontFamily,
|
package/legacy/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var _createCssVarsProvide = createCssVarsProvider({
|
|
|
15
15
|
light: 'light',
|
|
16
16
|
dark: 'dark'
|
|
17
17
|
},
|
|
18
|
-
prefix: '
|
|
18
|
+
prefix: 'mui',
|
|
19
19
|
resolveTheme: function resolveTheme(theme) {
|
|
20
20
|
var newTheme = _extends({}, theme, {
|
|
21
21
|
typography: createTypography(theme.palette, theme.typography)
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
4
4
|
import { deepmerge } from '@mui/utils';
|
|
5
|
-
import { colorChannel } from '@mui/system';
|
|
5
|
+
import { colorChannel, alpha, darken, lighten, emphasize } from '@mui/system';
|
|
6
6
|
import createThemeWithoutVars from './createTheme';
|
|
7
7
|
import { getOverlayAlpha } from '../Paper/Paper';
|
|
8
8
|
|
|
@@ -15,6 +15,18 @@ var defaultDarkOverlays = _toConsumableArray(Array(25)).map(function (_, index)
|
|
|
15
15
|
return "linear-gradient(rgba(255 255 255 / ".concat(overlay, "), rgba(255 255 255 / ").concat(overlay, "))");
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
+
function assignNode(obj, keys) {
|
|
19
|
+
keys.forEach(function (k) {
|
|
20
|
+
if (!obj[k]) {
|
|
21
|
+
obj[k] = {};
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function setColor(obj, key, defaultValue) {
|
|
27
|
+
obj[key] = obj[key] || defaultValue;
|
|
28
|
+
}
|
|
29
|
+
|
|
18
30
|
export default function extendTheme() {
|
|
19
31
|
var _colorSchemesInput$li, _colorSchemesInput$da, _colorSchemesInput$li2, _colorSchemesInput$li3, _colorSchemesInput$da2, _colorSchemesInput$da3;
|
|
20
32
|
|
|
@@ -42,16 +54,20 @@ export default function extendTheme() {
|
|
|
42
54
|
light: _extends({}, colorSchemesInput.light, {
|
|
43
55
|
palette: lightPalette,
|
|
44
56
|
opacity: _extends({
|
|
45
|
-
|
|
46
|
-
inputTouchBottomLine: 0.42
|
|
57
|
+
inputPlaceholder: 0.42,
|
|
58
|
+
inputTouchBottomLine: 0.42,
|
|
59
|
+
switchTrackDisabled: 0.12,
|
|
60
|
+
switchTrack: 0.38
|
|
47
61
|
}, (_colorSchemesInput$li2 = colorSchemesInput.light) == null ? void 0 : _colorSchemesInput$li2.opacity),
|
|
48
62
|
overlays: ((_colorSchemesInput$li3 = colorSchemesInput.light) == null ? void 0 : _colorSchemesInput$li3.overlays) || []
|
|
49
63
|
}),
|
|
50
64
|
dark: _extends({}, colorSchemesInput.dark, {
|
|
51
65
|
palette: darkPalette,
|
|
52
66
|
opacity: _extends({
|
|
53
|
-
|
|
54
|
-
inputTouchBottomLine: 0.7
|
|
67
|
+
inputPlaceholder: 0.5,
|
|
68
|
+
inputTouchBottomLine: 0.7,
|
|
69
|
+
switchTrackDisabled: 0.2,
|
|
70
|
+
switchTrack: 0.3
|
|
55
71
|
}, (_colorSchemesInput$da2 = colorSchemesInput.dark) == null ? void 0 : _colorSchemesInput$da2.opacity),
|
|
56
72
|
overlays: ((_colorSchemesInput$da3 = colorSchemesInput.dark) == null ? void 0 : _colorSchemesInput$da3.overlays) || defaultDarkOverlays
|
|
57
73
|
})
|
|
@@ -61,23 +77,98 @@ export default function extendTheme() {
|
|
|
61
77
|
Object.keys(theme.colorSchemes).forEach(function (key) {
|
|
62
78
|
var palette = theme.colorSchemes[key].palette; // attach black & white channels to common node
|
|
63
79
|
|
|
64
|
-
if (key === '
|
|
65
|
-
palette.common
|
|
66
|
-
palette.common
|
|
80
|
+
if (key === 'light') {
|
|
81
|
+
setColor(palette.common, 'background', '#fff');
|
|
82
|
+
setColor(palette.common, 'onBackground', '#000');
|
|
83
|
+
} else {
|
|
84
|
+
setColor(palette.common, 'background', '#000');
|
|
85
|
+
setColor(palette.common, 'onBackground', '#fff');
|
|
86
|
+
} // assign component variables
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
assignNode(palette, ['AppBar', 'Avatar', 'Chip', 'FilledInput', 'LinearProgress', 'Skeleton', 'Slider', 'SnackbarContent', 'SpeedDialAction', 'StepConnector', 'StepContent', 'Switch', 'TableCell', 'Tooltip']);
|
|
90
|
+
|
|
91
|
+
if (key === 'light') {
|
|
92
|
+
setColor(palette.AppBar, 'defaultBg', 'var(--mui-palette-grey-100)');
|
|
93
|
+
setColor(palette.Avatar, 'defaultBg', 'var(--mui-palette-grey-400)');
|
|
94
|
+
setColor(palette.Chip, 'defaultBorder', 'var(--mui-palette-grey-400)');
|
|
95
|
+
setColor(palette.Chip, 'defaultAvatarColor', 'var(--mui-palette-grey-700)');
|
|
96
|
+
setColor(palette.Chip, 'defaultIconColor', 'var(--mui-palette-grey-700)');
|
|
97
|
+
setColor(palette.FilledInput, 'bg', 'rgba(0, 0, 0, 0.06)');
|
|
98
|
+
setColor(palette.FilledInput, 'hoverBg', 'rgba(0, 0, 0, 0.09)');
|
|
99
|
+
setColor(palette.FilledInput, 'disabledBg', 'rgba(0, 0, 0, 0.12)');
|
|
100
|
+
setColor(palette.LinearProgress, 'primaryBg', lighten(palette.primary.main, 0.62));
|
|
101
|
+
setColor(palette.LinearProgress, 'secondaryBg', lighten(palette.secondary.main, 0.62));
|
|
102
|
+
setColor(palette.LinearProgress, 'errorBg', lighten(palette.error.main, 0.62));
|
|
103
|
+
setColor(palette.LinearProgress, 'infoBg', lighten(palette.info.main, 0.62));
|
|
104
|
+
setColor(palette.LinearProgress, 'successBg', lighten(palette.success.main, 0.62));
|
|
105
|
+
setColor(palette.LinearProgress, 'warningBg', lighten(palette.warning.main, 0.62));
|
|
106
|
+
setColor(palette.Skeleton, 'bg', 'rgba(var(--mui-palette-text-primaryChannel) / 0.11)');
|
|
107
|
+
setColor(palette.Slider, 'primaryTrack', lighten(palette.primary.main, 0.62));
|
|
108
|
+
setColor(palette.Slider, 'secondaryTrack', lighten(palette.secondary.main, 0.62));
|
|
109
|
+
setColor(palette.Slider, 'errorTrack', lighten(palette.error.main, 0.62));
|
|
110
|
+
setColor(palette.Slider, 'infoTrack', lighten(palette.info.main, 0.62));
|
|
111
|
+
setColor(palette.Slider, 'successTrack', lighten(palette.success.main, 0.62));
|
|
112
|
+
setColor(palette.Slider, 'warningTrack', lighten(palette.warning.main, 0.62));
|
|
113
|
+
setColor(palette.SnackbarContent, 'bg', emphasize(palette.background.default, 0.8));
|
|
114
|
+
setColor(palette.SpeedDialAction, 'fabHoverBg', emphasize(palette.background.paper, 0.15));
|
|
115
|
+
setColor(palette.StepConnector, 'border', 'var(--mui-palette-grey-400)');
|
|
116
|
+
setColor(palette.StepContent, 'border', 'var(--mui-palette-grey-400)');
|
|
117
|
+
setColor(palette.Switch, 'defaultColor', 'var(--mui-palette-common-white)');
|
|
118
|
+
setColor(palette.Switch, 'defaultDisabledColor', 'var(--mui-palette-grey-100)');
|
|
119
|
+
setColor(palette.Switch, 'primaryDisabledColor', lighten(palette.primary.main, 0.62));
|
|
120
|
+
setColor(palette.Switch, 'secondaryDisabledColor', lighten(palette.secondary.main, 0.62));
|
|
121
|
+
setColor(palette.Switch, 'errorDisabledColor', lighten(palette.error.main, 0.62));
|
|
122
|
+
setColor(palette.Switch, 'infoDisabledColor', lighten(palette.info.main, 0.62));
|
|
123
|
+
setColor(palette.Switch, 'successDisabledColor', lighten(palette.success.main, 0.62));
|
|
124
|
+
setColor(palette.Switch, 'warningDisabledColor', lighten(palette.warning.main, 0.62));
|
|
125
|
+
setColor(palette.TableCell, 'border', lighten(alpha(palette.divider, 1), 0.88));
|
|
126
|
+
setColor(palette.Tooltip, 'bg', alpha(palette.grey[700], 0.92));
|
|
67
127
|
} else {
|
|
68
|
-
palette.
|
|
69
|
-
palette.
|
|
128
|
+
setColor(palette.AppBar, 'defaultBg', 'var(--mui-palette-grey-900)');
|
|
129
|
+
setColor(palette.AppBar, 'darkBg', 'var(--mui-palette-background-paper)'); // specific for dark mode
|
|
130
|
+
|
|
131
|
+
setColor(palette.AppBar, 'darkColor', 'var(--mui-palette-text-primary)'); // specific for dark mode
|
|
132
|
+
|
|
133
|
+
setColor(palette.Avatar, 'defaultBg', 'var(--mui-palette-grey-600)');
|
|
134
|
+
setColor(palette.Chip, 'defaultBorder', 'var(--mui-palette-grey-700)');
|
|
135
|
+
setColor(palette.Chip, 'defaultAvatarColor', 'var(--mui-palette-grey-300)');
|
|
136
|
+
setColor(palette.Chip, 'defaultIconColor', 'var(--mui-palette-grey-300)');
|
|
137
|
+
setColor(palette.FilledInput, 'bg', 'rgba(255, 255, 255, 0.09)');
|
|
138
|
+
setColor(palette.FilledInput, 'hoverBg', 'rgba(255, 255, 255, 0.13)');
|
|
139
|
+
setColor(palette.FilledInput, 'disabledBg', 'rgba(255, 255, 255, 0.12)');
|
|
140
|
+
setColor(palette.LinearProgress, 'primaryBg', darken(palette.primary.main, 0.5));
|
|
141
|
+
setColor(palette.LinearProgress, 'secondaryBg', darken(palette.secondary.main, 0.5));
|
|
142
|
+
setColor(palette.LinearProgress, 'errorBg', darken(palette.error.main, 0.5));
|
|
143
|
+
setColor(palette.LinearProgress, 'infoBg', darken(palette.info.main, 0.5));
|
|
144
|
+
setColor(palette.LinearProgress, 'successBg', darken(palette.success.main, 0.5));
|
|
145
|
+
setColor(palette.LinearProgress, 'warningBg', darken(palette.warning.main, 0.5));
|
|
146
|
+
setColor(palette.Skeleton, 'bg', 'rgba(var(--mui-palette-text-primaryChannel) / 0.13)');
|
|
147
|
+
setColor(palette.Slider, 'primaryTrack', darken(palette.primary.main, 0.5));
|
|
148
|
+
setColor(palette.Slider, 'secondaryTrack', darken(palette.secondary.main, 0.5));
|
|
149
|
+
setColor(palette.Slider, 'errorTrack', darken(palette.error.main, 0.5));
|
|
150
|
+
setColor(palette.Slider, 'infoTrack', darken(palette.info.main, 0.5));
|
|
151
|
+
setColor(palette.Slider, 'successTrack', darken(palette.success.main, 0.5));
|
|
152
|
+
setColor(palette.Slider, 'warningTrack', darken(palette.warning.main, 0.5));
|
|
153
|
+
setColor(palette.SnackbarContent, 'bg', emphasize(palette.background.default, 0.98));
|
|
154
|
+
setColor(palette.SpeedDialAction, 'fabHoverBg', emphasize(palette.background.paper, 0.15));
|
|
155
|
+
setColor(palette.StepConnector, 'border', 'var(--mui-palette-grey-600)');
|
|
156
|
+
setColor(palette.StepContent, 'border', 'var(--mui-palette-grey-600)');
|
|
157
|
+
setColor(palette.Switch, 'defaultColor', 'var(--mui-palette-grey-300)');
|
|
158
|
+
setColor(palette.Switch, 'defaultDisabledColor', 'var(--mui-palette-grey-600)');
|
|
159
|
+
setColor(palette.Switch, 'primaryDisabledColor', darken(palette.primary.main, 0.55));
|
|
160
|
+
setColor(palette.Switch, 'secondaryDisabledColor', darken(palette.secondary.main, 0.55));
|
|
161
|
+
setColor(palette.Switch, 'errorDisabledColor', darken(palette.error.main, 0.55));
|
|
162
|
+
setColor(palette.Switch, 'infoDisabledColor', darken(palette.info.main, 0.55));
|
|
163
|
+
setColor(palette.Switch, 'successDisabledColor', darken(palette.success.main, 0.55));
|
|
164
|
+
setColor(palette.Switch, 'warningDisabledColor', darken(palette.warning.main, 0.55));
|
|
165
|
+
setColor(palette.TableCell, 'border', darken(alpha(palette.divider, 1), 0.68));
|
|
166
|
+
setColor(palette.Tooltip, 'bg', alpha(palette.grey[700], 0.92));
|
|
70
167
|
}
|
|
71
168
|
|
|
72
169
|
palette.common.backgroundChannel = colorChannel(palette.common.background);
|
|
73
170
|
palette.common.onBackgroundChannel = colorChannel(palette.common.onBackground);
|
|
74
|
-
palette.dividerChannel = colorChannel(palette.divider);
|
|
75
|
-
// TODO: consider adding `main`, and `light` to palette.grey to make it consistent.
|
|
76
|
-
|
|
77
|
-
if (!palette.grey.dark) {
|
|
78
|
-
palette.grey.dark = palette.grey[700];
|
|
79
|
-
}
|
|
80
|
-
|
|
171
|
+
palette.dividerChannel = colorChannel(palette.divider);
|
|
81
172
|
Object.keys(palette).forEach(function (color) {
|
|
82
173
|
var colors = palette[color]; // Color palettes: primary, secondary, error, info, success, and warning
|
|
83
174
|
|
|
@@ -104,12 +195,16 @@ export default function extendTheme() {
|
|
|
104
195
|
|
|
105
196
|
if (colors.secondary) {
|
|
106
197
|
palette[color].secondaryChannel = colorChannel(colors.secondary);
|
|
107
|
-
} // Action colors: action.
|
|
198
|
+
} // Action colors: action.active, action.selected
|
|
108
199
|
|
|
109
200
|
|
|
110
201
|
if (colors.active) {
|
|
111
202
|
palette[color].activeChannel = colorChannel(colors.active);
|
|
112
203
|
}
|
|
204
|
+
|
|
205
|
+
if (colors.selected) {
|
|
206
|
+
palette[color].selectedChannel = colorChannel(colors.selected);
|
|
207
|
+
}
|
|
113
208
|
});
|
|
114
209
|
});
|
|
115
210
|
|