@mui/material 5.8.3 → 5.8.6
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/Alert/Alert.js +19 -11
- package/AppBar/AppBar.js +22 -5
- package/Autocomplete/autocompleteClasses.d.ts +1 -1
- package/Avatar/Avatar.js +7 -4
- package/Badge/Badge.js +2 -2
- package/Button/buttonClasses.d.ts +24 -0
- package/Button/buttonClasses.js +1 -1
- package/CHANGELOG.md +224 -14
- package/Chip/Chip.js +31 -30
- package/Dialog/Dialog.js +11 -6
- package/FilledInput/FilledInput.js +28 -13
- package/Grid/Grid.d.ts +73 -52
- package/Grid/Grid.js +94 -40
- package/Grow/Grow.js +1 -2
- package/Hidden/withWidth.js +0 -2
- package/Input/Input.js +1 -1
- package/InputBase/InputBase.js +2 -2
- package/LinearProgress/LinearProgress.js +6 -2
- package/Link/Link.js +10 -17
- package/Link/getTextDecoration.d.ts +15 -0
- package/Link/getTextDecoration.js +29 -0
- package/Modal/Modal.d.ts +2 -0
- package/Modal/Modal.js +25 -8
- package/OutlinedInput/OutlinedInput.js +40 -10
- package/Popover/Popover.d.ts +7 -0
- package/Popover/index.js +1 -0
- package/README.md +6 -9
- package/Skeleton/Skeleton.js +8 -3
- package/Slider/Slider.d.ts +3 -1
- package/Slider/Slider.js +24 -22
- package/Snackbar/Snackbar.js +6 -20
- package/SnackbarContent/SnackbarContent.js +3 -3
- package/SpeedDialAction/SpeedDialAction.js +7 -7
- package/Stack/Stack.js +1 -1
- package/StepConnector/StepConnector.js +14 -11
- package/StepContent/StepContent.js +1 -1
- package/StepIcon/StepIcon.js +2 -1
- package/Switch/Switch.js +11 -11
- package/Tab/Tab.d.ts +0 -1
- package/TableCell/TableCell.js +5 -5
- package/Tabs/Tabs.js +16 -2
- package/Tooltip/Tooltip.js +1 -1
- package/index.js +1 -1
- package/legacy/Alert/Alert.js +19 -11
- package/legacy/AppBar/AppBar.js +23 -4
- package/legacy/Avatar/Avatar.js +7 -4
- package/legacy/Badge/Badge.js +2 -2
- package/legacy/Button/buttonClasses.js +1 -1
- package/legacy/Chip/Chip.js +31 -30
- package/legacy/Dialog/Dialog.js +11 -6
- package/legacy/FilledInput/FilledInput.js +28 -14
- package/legacy/Grid/Grid.js +97 -48
- package/legacy/Grow/Grow.js +1 -2
- package/legacy/Hidden/withWidth.js +0 -2
- package/legacy/Input/Input.js +1 -1
- package/legacy/InputBase/InputBase.js +2 -2
- package/legacy/LinearProgress/LinearProgress.js +6 -2
- package/legacy/Link/Link.js +10 -17
- package/legacy/Link/getTextDecoration.js +28 -0
- package/legacy/Modal/Modal.js +23 -7
- package/legacy/OutlinedInput/OutlinedInput.js +36 -9
- package/legacy/Popover/index.js +1 -0
- package/legacy/Skeleton/Skeleton.js +2 -2
- package/legacy/Slider/Slider.js +24 -22
- package/legacy/Snackbar/Snackbar.js +6 -21
- package/legacy/SnackbarContent/SnackbarContent.js +3 -3
- package/legacy/SpeedDialAction/SpeedDialAction.js +7 -7
- package/legacy/Stack/Stack.js +2 -1
- package/legacy/StepConnector/StepConnector.js +2 -1
- package/legacy/StepContent/StepContent.js +1 -1
- package/legacy/StepIcon/StepIcon.js +2 -1
- package/legacy/Switch/Switch.js +11 -11
- package/legacy/TableCell/TableCell.js +5 -5
- package/legacy/Tabs/Tabs.js +16 -2
- package/legacy/Tooltip/Tooltip.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/styles/CssVarsProvider.js +4 -2
- package/legacy/styles/experimental_extendTheme.js +153 -18
- package/modern/Alert/Alert.js +19 -11
- package/modern/AppBar/AppBar.js +22 -5
- package/modern/Avatar/Avatar.js +7 -4
- package/modern/Badge/Badge.js +2 -2
- package/modern/Button/buttonClasses.js +1 -1
- package/modern/Chip/Chip.js +31 -30
- package/modern/Dialog/Dialog.js +11 -6
- package/modern/FilledInput/FilledInput.js +27 -12
- package/modern/Grid/Grid.js +94 -40
- package/modern/Grow/Grow.js +1 -2
- package/modern/Hidden/withWidth.js +0 -2
- package/modern/Input/Input.js +1 -1
- package/modern/InputBase/InputBase.js +2 -2
- package/modern/LinearProgress/LinearProgress.js +6 -2
- package/modern/Link/Link.js +10 -17
- package/modern/Link/getTextDecoration.js +29 -0
- package/modern/Modal/Modal.js +24 -7
- package/modern/OutlinedInput/OutlinedInput.js +40 -10
- package/modern/Popover/index.js +1 -0
- package/modern/Skeleton/Skeleton.js +7 -2
- package/modern/Slider/Slider.js +24 -22
- package/modern/Snackbar/Snackbar.js +6 -20
- package/modern/SnackbarContent/SnackbarContent.js +3 -3
- package/modern/SpeedDialAction/SpeedDialAction.js +7 -7
- package/modern/Stack/Stack.js +1 -1
- package/modern/StepConnector/StepConnector.js +14 -11
- package/modern/StepContent/StepContent.js +1 -1
- package/modern/StepIcon/StepIcon.js +2 -1
- package/modern/Switch/Switch.js +11 -11
- package/modern/TableCell/TableCell.js +5 -5
- package/modern/Tabs/Tabs.js +16 -2
- package/modern/Tooltip/Tooltip.js +1 -1
- package/modern/index.js +1 -1
- package/modern/styles/CssVarsProvider.js +2 -2
- package/modern/styles/experimental_extendTheme.js +154 -18
- package/node/Alert/Alert.js +19 -11
- package/node/AppBar/AppBar.js +22 -5
- package/node/Avatar/Avatar.js +7 -4
- package/node/Badge/Badge.js +2 -2
- package/node/Button/buttonClasses.js +1 -1
- package/node/Chip/Chip.js +31 -30
- package/node/Dialog/Dialog.js +11 -6
- package/node/FilledInput/FilledInput.js +28 -13
- package/node/Grid/Grid.js +95 -40
- package/node/Grow/Grow.js +1 -2
- package/node/Hidden/withWidth.js +0 -3
- package/node/Input/Input.js +1 -1
- package/node/InputBase/InputBase.js +2 -2
- package/node/LinearProgress/LinearProgress.js +6 -2
- package/node/Link/Link.js +12 -20
- package/node/Link/getTextDecoration.js +39 -0
- package/node/Modal/Modal.js +25 -8
- package/node/OutlinedInput/OutlinedInput.js +38 -10
- package/node/Popover/index.js +13 -3
- package/node/Skeleton/Skeleton.js +7 -2
- package/node/Slider/Slider.js +24 -22
- package/node/Snackbar/Snackbar.js +6 -18
- package/node/SnackbarContent/SnackbarContent.js +3 -3
- package/node/SpeedDialAction/SpeedDialAction.js +7 -7
- package/node/Stack/Stack.js +1 -1
- package/node/StepConnector/StepConnector.js +14 -11
- package/node/StepContent/StepContent.js +1 -1
- package/node/StepIcon/StepIcon.js +2 -1
- package/node/Switch/Switch.js +11 -11
- package/node/TableCell/TableCell.js +5 -5
- package/node/Tabs/Tabs.js +16 -2
- package/node/Tooltip/Tooltip.js +1 -1
- package/node/index.js +1 -1
- package/node/styles/CssVarsProvider.js +6 -2
- package/node/styles/experimental_extendTheme.js +152 -17
- package/package.json +6 -7
- package/styles/CssVarsProvider.d.ts +10 -28
- package/styles/CssVarsProvider.js +6 -2
- package/styles/createPalette.d.ts +0 -26
- package/styles/experimental_extendTheme.d.ts +225 -37
- package/styles/experimental_extendTheme.js +154 -18
- package/styles/index.d.ts +24 -1
- package/themeCssVarsAugmentation/index.d.ts +61 -0
- package/umd/material-ui.development.js +1048 -541
- package/umd/material-ui.production.min.js +27 -22
|
@@ -141,8 +141,9 @@ const StepIcon = /*#__PURE__*/React.forwardRef(function StepIcon(inProps, ref) {
|
|
|
141
141
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(StepIconText, {
|
|
142
142
|
className: classes.text,
|
|
143
143
|
x: "12",
|
|
144
|
-
y: "
|
|
144
|
+
y: "12",
|
|
145
145
|
textAnchor: "middle",
|
|
146
|
+
dominantBaseline: "central",
|
|
146
147
|
ownerState: ownerState,
|
|
147
148
|
children: icon
|
|
148
149
|
})]
|
package/node/Switch/Switch.js
CHANGED
|
@@ -126,7 +126,7 @@ const SwitchSwitchBase = (0, _styled.default)(_SwitchBase.default, {
|
|
|
126
126
|
left: 0,
|
|
127
127
|
zIndex: 1,
|
|
128
128
|
// Render above the focus ripple.
|
|
129
|
-
color: theme.palette.mode === 'light' ? theme.palette.common.white : theme.palette.grey[300]
|
|
129
|
+
color: theme.vars ? theme.vars.palette.Switch.defaultColor : `${theme.palette.mode === 'light' ? theme.palette.common.white : theme.palette.grey[300]}`,
|
|
130
130
|
transition: theme.transitions.create(['left', 'transform'], {
|
|
131
131
|
duration: theme.transitions.duration.shortest
|
|
132
132
|
}),
|
|
@@ -134,13 +134,13 @@ const SwitchSwitchBase = (0, _styled.default)(_SwitchBase.default, {
|
|
|
134
134
|
transform: 'translateX(20px)'
|
|
135
135
|
},
|
|
136
136
|
[`&.${_switchClasses.default.disabled}`]: {
|
|
137
|
-
color: theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[600]
|
|
137
|
+
color: theme.vars ? theme.vars.palette.Switch.defaultDisabledColor : `${theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[600]}`
|
|
138
138
|
},
|
|
139
139
|
[`&.${_switchClasses.default.checked} + .${_switchClasses.default.track}`]: {
|
|
140
140
|
opacity: 0.5
|
|
141
141
|
},
|
|
142
142
|
[`&.${_switchClasses.default.disabled} + .${_switchClasses.default.track}`]: {
|
|
143
|
-
opacity: theme.palette.mode === 'light' ? 0.12 : 0.2
|
|
143
|
+
opacity: theme.vars ? theme.vars.opacity.switchTrackDisabled : `${theme.palette.mode === 'light' ? 0.12 : 0.2}`
|
|
144
144
|
},
|
|
145
145
|
[`& .${_switchClasses.default.input}`]: {
|
|
146
146
|
left: '-100%',
|
|
@@ -151,7 +151,7 @@ const SwitchSwitchBase = (0, _styled.default)(_SwitchBase.default, {
|
|
|
151
151
|
ownerState
|
|
152
152
|
}) => (0, _extends2.default)({
|
|
153
153
|
'&:hover': {
|
|
154
|
-
backgroundColor: (0, _system.alpha)(theme.palette.action.active, theme.palette.action.hoverOpacity),
|
|
154
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : (0, _system.alpha)(theme.palette.action.active, theme.palette.action.hoverOpacity),
|
|
155
155
|
// Reset on touch devices, it doesn't add specificity
|
|
156
156
|
'@media (hover: none)': {
|
|
157
157
|
backgroundColor: 'transparent'
|
|
@@ -159,19 +159,19 @@ const SwitchSwitchBase = (0, _styled.default)(_SwitchBase.default, {
|
|
|
159
159
|
}
|
|
160
160
|
}, ownerState.color !== 'default' && {
|
|
161
161
|
[`&.${_switchClasses.default.checked}`]: {
|
|
162
|
-
color: theme.palette[ownerState.color].main,
|
|
162
|
+
color: (theme.vars || theme).palette[ownerState.color].main,
|
|
163
163
|
'&:hover': {
|
|
164
|
-
backgroundColor: (0, _system.alpha)(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
|
|
164
|
+
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),
|
|
165
165
|
'@media (hover: none)': {
|
|
166
166
|
backgroundColor: 'transparent'
|
|
167
167
|
}
|
|
168
168
|
},
|
|
169
169
|
[`&.${_switchClasses.default.disabled}`]: {
|
|
170
|
-
color: theme.palette.mode === 'light' ? (0, _system.lighten)(theme.palette[ownerState.color].main, 0.62) : (0, _system.darken)(theme.palette[ownerState.color].main, 0.55)
|
|
170
|
+
color: theme.vars ? theme.vars.palette.Switch[`${ownerState.color}DisabledColor`] : `${theme.palette.mode === 'light' ? (0, _system.lighten)(theme.palette[ownerState.color].main, 0.62) : (0, _system.darken)(theme.palette[ownerState.color].main, 0.55)}`
|
|
171
171
|
}
|
|
172
172
|
},
|
|
173
173
|
[`&.${_switchClasses.default.checked} + .${_switchClasses.default.track}`]: {
|
|
174
|
-
backgroundColor: theme.palette[ownerState.color].main
|
|
174
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].main
|
|
175
175
|
}
|
|
176
176
|
}));
|
|
177
177
|
const SwitchTrack = (0, _styled.default)('span', {
|
|
@@ -188,8 +188,8 @@ const SwitchTrack = (0, _styled.default)('span', {
|
|
|
188
188
|
transition: theme.transitions.create(['opacity', 'background-color'], {
|
|
189
189
|
duration: theme.transitions.duration.shortest
|
|
190
190
|
}),
|
|
191
|
-
backgroundColor: theme.palette.mode === 'light' ? theme.palette.common.black : theme.palette.common.white
|
|
192
|
-
opacity: theme.palette.mode === 'light' ? 0.38 : 0.3
|
|
191
|
+
backgroundColor: theme.vars ? theme.vars.palette.common.onBackground : `${theme.palette.mode === 'light' ? theme.palette.common.black : theme.palette.common.white}`,
|
|
192
|
+
opacity: theme.vars ? theme.vars.opacity.switchTrack : `${theme.palette.mode === 'light' ? 0.38 : 0.3}`
|
|
193
193
|
}));
|
|
194
194
|
const SwitchThumb = (0, _styled.default)('span', {
|
|
195
195
|
name: 'MuiSwitch',
|
|
@@ -198,7 +198,7 @@ const SwitchThumb = (0, _styled.default)('span', {
|
|
|
198
198
|
})(({
|
|
199
199
|
theme
|
|
200
200
|
}) => ({
|
|
201
|
-
boxShadow: theme.shadows[1],
|
|
201
|
+
boxShadow: (theme.vars || theme).shadows[1],
|
|
202
202
|
backgroundColor: 'currentColor',
|
|
203
203
|
width: 20,
|
|
204
204
|
height: 20,
|
|
@@ -73,18 +73,18 @@ const TableCellRoot = (0, _styled.default)('td', {
|
|
|
73
73
|
verticalAlign: 'inherit',
|
|
74
74
|
// Workaround for a rendering bug with spanned columns in Chrome 62.0.
|
|
75
75
|
// Removes the alpha (sets it to 1), and lightens or darkens the theme color.
|
|
76
|
-
borderBottom: `1px solid
|
|
76
|
+
borderBottom: theme.vars ? `1px solid ${theme.vars.palette.TableCell.border}` : `1px solid
|
|
77
77
|
${theme.palette.mode === 'light' ? (0, _system.lighten)((0, _system.alpha)(theme.palette.divider, 1), 0.88) : (0, _system.darken)((0, _system.alpha)(theme.palette.divider, 1), 0.68)}`,
|
|
78
78
|
textAlign: 'left',
|
|
79
79
|
padding: 16
|
|
80
80
|
}, ownerState.variant === 'head' && {
|
|
81
|
-
color: theme.palette.text.primary,
|
|
81
|
+
color: (theme.vars || theme).palette.text.primary,
|
|
82
82
|
lineHeight: theme.typography.pxToRem(24),
|
|
83
83
|
fontWeight: theme.typography.fontWeightMedium
|
|
84
84
|
}, ownerState.variant === 'body' && {
|
|
85
|
-
color: theme.palette.text.primary
|
|
85
|
+
color: (theme.vars || theme).palette.text.primary
|
|
86
86
|
}, ownerState.variant === 'footer' && {
|
|
87
|
-
color: theme.palette.text.secondary,
|
|
87
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
88
88
|
lineHeight: theme.typography.pxToRem(21),
|
|
89
89
|
fontSize: theme.typography.pxToRem(12)
|
|
90
90
|
}, ownerState.size === 'small' && {
|
|
@@ -116,7 +116,7 @@ const TableCellRoot = (0, _styled.default)('td', {
|
|
|
116
116
|
position: 'sticky',
|
|
117
117
|
top: 0,
|
|
118
118
|
zIndex: 2,
|
|
119
|
-
backgroundColor: theme.palette.background.default
|
|
119
|
+
backgroundColor: (theme.vars || theme).palette.background.default
|
|
120
120
|
}));
|
|
121
121
|
/**
|
|
122
122
|
* The component renders a `<th>` element when the parent context is a header
|
package/node/Tabs/Tabs.js
CHANGED
|
@@ -455,6 +455,12 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
455
455
|
const tab = children[i];
|
|
456
456
|
|
|
457
457
|
if (totalSize + tab[clientSize] > containerSize) {
|
|
458
|
+
// If the first item is longer than the container size, then only scroll
|
|
459
|
+
// by the container size.
|
|
460
|
+
if (i === 0) {
|
|
461
|
+
totalSize = containerSize;
|
|
462
|
+
}
|
|
463
|
+
|
|
458
464
|
break;
|
|
459
465
|
}
|
|
460
466
|
|
|
@@ -564,8 +570,16 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
564
570
|
});
|
|
565
571
|
React.useEffect(() => {
|
|
566
572
|
const handleResize = (0, _debounce.default)(() => {
|
|
567
|
-
|
|
568
|
-
|
|
573
|
+
// If the Tabs component is replaced by Suspense with a fallback, the last
|
|
574
|
+
// ResizeObserver's handler that runs because of the change in the layout is trying to
|
|
575
|
+
// access a dom node that is no longer there (as the fallback component is being shown instead).
|
|
576
|
+
// See https://github.com/mui/material-ui/issues/33276
|
|
577
|
+
// TODO: Add tests that will ensure the component is not failing when
|
|
578
|
+
// replaced by Suspense with a fallback, once React is updated to version 18
|
|
579
|
+
if (tabsRef.current) {
|
|
580
|
+
updateIndicatorState();
|
|
581
|
+
updateScrollButtonState();
|
|
582
|
+
}
|
|
569
583
|
});
|
|
570
584
|
const win = (0, _ownerWindow.default)(tabsRef.current);
|
|
571
585
|
win.addEventListener('resize', handleResize);
|
package/node/Tooltip/Tooltip.js
CHANGED
|
@@ -151,7 +151,7 @@ const TooltipTooltip = (0, _styled.default)('div', {
|
|
|
151
151
|
theme,
|
|
152
152
|
ownerState
|
|
153
153
|
}) => (0, _extends2.default)({
|
|
154
|
-
backgroundColor: theme.vars ?
|
|
154
|
+
backgroundColor: theme.vars ? theme.vars.palette.Tooltip.bg : (0, _system.alpha)(theme.palette.grey[700], 0.92),
|
|
155
155
|
borderRadius: (theme.vars || theme).shape.borderRadius,
|
|
156
156
|
color: (theme.vars || theme).palette.common.white,
|
|
157
157
|
fontFamily: theme.typography.fontFamily,
|
package/node/index.js
CHANGED
|
@@ -30,14 +30,18 @@ const {
|
|
|
30
30
|
light: 'light',
|
|
31
31
|
dark: 'dark'
|
|
32
32
|
},
|
|
33
|
-
prefix: '
|
|
33
|
+
prefix: 'mui',
|
|
34
34
|
resolveTheme: theme => {
|
|
35
35
|
const newTheme = (0, _extends2.default)({}, theme, {
|
|
36
36
|
typography: (0, _createTypography.default)(theme.palette, theme.typography)
|
|
37
37
|
});
|
|
38
38
|
return newTheme;
|
|
39
39
|
},
|
|
40
|
-
shouldSkipGeneratingVar: keys =>
|
|
40
|
+
shouldSkipGeneratingVar: keys => {
|
|
41
|
+
var _keys$;
|
|
42
|
+
|
|
43
|
+
return !!keys[0].match(/(typography|mixins|breakpoints|direction|transitions)/) || keys[0] === 'palette' && !!((_keys$ = keys[1]) != null && _keys$.match(/(mode|contrastThreshold|tonalOffset)/));
|
|
44
|
+
}
|
|
41
45
|
});
|
|
42
46
|
exports.getInitColorSchemeScript = getInitColorSchemeScript;
|
|
43
47
|
exports.useColorScheme = useColorScheme;
|
|
@@ -30,6 +30,18 @@ const defaultDarkOverlays = [...Array(25)].map((_, index) => {
|
|
|
30
30
|
return `linear-gradient(rgba(255 255 255 / ${overlay}), rgba(255 255 255 / ${overlay}))`;
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
+
function assignNode(obj, keys) {
|
|
34
|
+
keys.forEach(k => {
|
|
35
|
+
if (!obj[k]) {
|
|
36
|
+
obj[k] = {};
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function setColor(obj, key, defaultValue) {
|
|
42
|
+
obj[key] = obj[key] || defaultValue;
|
|
43
|
+
}
|
|
44
|
+
|
|
33
45
|
function extendTheme(options = {}, ...args) {
|
|
34
46
|
var _colorSchemesInput$li, _colorSchemesInput$da, _colorSchemesInput$li2, _colorSchemesInput$li3, _colorSchemesInput$da2, _colorSchemesInput$da3;
|
|
35
47
|
|
|
@@ -58,16 +70,20 @@ function extendTheme(options = {}, ...args) {
|
|
|
58
70
|
light: (0, _extends2.default)({}, colorSchemesInput.light, {
|
|
59
71
|
palette: lightPalette,
|
|
60
72
|
opacity: (0, _extends2.default)({
|
|
61
|
-
|
|
62
|
-
|
|
73
|
+
inputPlaceholder: 0.42,
|
|
74
|
+
inputUnderline: 0.42,
|
|
75
|
+
switchTrackDisabled: 0.12,
|
|
76
|
+
switchTrack: 0.38
|
|
63
77
|
}, (_colorSchemesInput$li2 = colorSchemesInput.light) == null ? void 0 : _colorSchemesInput$li2.opacity),
|
|
64
78
|
overlays: ((_colorSchemesInput$li3 = colorSchemesInput.light) == null ? void 0 : _colorSchemesInput$li3.overlays) || []
|
|
65
79
|
}),
|
|
66
80
|
dark: (0, _extends2.default)({}, colorSchemesInput.dark, {
|
|
67
81
|
palette: darkPalette,
|
|
68
82
|
opacity: (0, _extends2.default)({
|
|
69
|
-
|
|
70
|
-
|
|
83
|
+
inputPlaceholder: 0.5,
|
|
84
|
+
inputUnderline: 0.7,
|
|
85
|
+
switchTrackDisabled: 0.2,
|
|
86
|
+
switchTrack: 0.3
|
|
71
87
|
}, (_colorSchemesInput$da2 = colorSchemesInput.dark) == null ? void 0 : _colorSchemesInput$da2.opacity),
|
|
72
88
|
overlays: ((_colorSchemesInput$da3 = colorSchemesInput.dark) == null ? void 0 : _colorSchemesInput$da3.overlays) || defaultDarkOverlays
|
|
73
89
|
})
|
|
@@ -76,23 +92,138 @@ function extendTheme(options = {}, ...args) {
|
|
|
76
92
|
Object.keys(theme.colorSchemes).forEach(key => {
|
|
77
93
|
const palette = theme.colorSchemes[key].palette; // attach black & white channels to common node
|
|
78
94
|
|
|
79
|
-
if (key === '
|
|
80
|
-
palette.common
|
|
81
|
-
palette.common
|
|
95
|
+
if (key === 'light') {
|
|
96
|
+
setColor(palette.common, 'background', '#fff');
|
|
97
|
+
setColor(palette.common, 'onBackground', '#000');
|
|
82
98
|
} else {
|
|
83
|
-
palette.common
|
|
84
|
-
palette.common
|
|
85
|
-
}
|
|
99
|
+
setColor(palette.common, 'background', '#000');
|
|
100
|
+
setColor(palette.common, 'onBackground', '#fff');
|
|
101
|
+
} // assign component variables
|
|
86
102
|
|
|
87
|
-
palette.common.backgroundChannel = (0, _system.colorChannel)(palette.common.background);
|
|
88
|
-
palette.common.onBackgroundChannel = (0, _system.colorChannel)(palette.common.onBackground);
|
|
89
|
-
palette.dividerChannel = (0, _system.colorChannel)(palette.divider); // special token for Tooltip
|
|
90
|
-
// TODO: consider adding `main`, and `light` to palette.grey to make it consistent.
|
|
91
103
|
|
|
92
|
-
|
|
93
|
-
|
|
104
|
+
assignNode(palette, ['Alert', 'AppBar', 'Avatar', 'Chip', 'FilledInput', 'LinearProgress', 'Skeleton', 'Slider', 'SnackbarContent', 'SpeedDialAction', 'StepConnector', 'StepContent', 'Switch', 'TableCell', 'Tooltip']);
|
|
105
|
+
|
|
106
|
+
if (key === 'light') {
|
|
107
|
+
setColor(palette.Alert, 'errorColor', (0, _system.darken)(palette.error.light, 0.6));
|
|
108
|
+
setColor(palette.Alert, 'infoColor', (0, _system.darken)(palette.info.light, 0.6));
|
|
109
|
+
setColor(palette.Alert, 'successColor', (0, _system.darken)(palette.success.light, 0.6));
|
|
110
|
+
setColor(palette.Alert, 'warningColor', (0, _system.darken)(palette.warning.light, 0.6));
|
|
111
|
+
setColor(palette.Alert, 'errorFilledBg', 'var(--mui-palette-error-main)');
|
|
112
|
+
setColor(palette.Alert, 'infoFilledBg', 'var(--mui-palette-info-main)');
|
|
113
|
+
setColor(palette.Alert, 'successFilledBg', 'var(--mui-palette-success-main)');
|
|
114
|
+
setColor(palette.Alert, 'warningFilledBg', 'var(--mui-palette-warning-main)');
|
|
115
|
+
setColor(palette.Alert, 'errorFilledColor', lightPalette.getContrastText(palette.error.main));
|
|
116
|
+
setColor(palette.Alert, 'infoFilledColor', lightPalette.getContrastText(palette.info.main));
|
|
117
|
+
setColor(palette.Alert, 'successFilledColor', lightPalette.getContrastText(palette.success.main));
|
|
118
|
+
setColor(palette.Alert, 'warningFilledColor', lightPalette.getContrastText(palette.warning.main));
|
|
119
|
+
setColor(palette.Alert, 'errorStandardBg', (0, _system.lighten)(palette.error.light, 0.9));
|
|
120
|
+
setColor(palette.Alert, 'infoStandardBg', (0, _system.lighten)(palette.info.light, 0.9));
|
|
121
|
+
setColor(palette.Alert, 'successStandardBg', (0, _system.lighten)(palette.success.light, 0.9));
|
|
122
|
+
setColor(palette.Alert, 'warningStandardBg', (0, _system.lighten)(palette.warning.light, 0.9));
|
|
123
|
+
setColor(palette.Alert, 'errorIconColor', 'var(--mui-palette-error-light)');
|
|
124
|
+
setColor(palette.Alert, 'infoIconColor', 'var(--mui-palette-info-light)');
|
|
125
|
+
setColor(palette.Alert, 'successIconColor', 'var(--mui-palette-success-light)');
|
|
126
|
+
setColor(palette.Alert, 'warningIconColor', 'var(--mui-palette-warning-light)');
|
|
127
|
+
setColor(palette.AppBar, 'defaultBg', 'var(--mui-palette-grey-100)');
|
|
128
|
+
setColor(palette.Avatar, 'defaultBg', 'var(--mui-palette-grey-400)');
|
|
129
|
+
setColor(palette.Chip, 'defaultBorder', 'var(--mui-palette-grey-400)');
|
|
130
|
+
setColor(palette.Chip, 'defaultAvatarColor', 'var(--mui-palette-grey-700)');
|
|
131
|
+
setColor(palette.Chip, 'defaultIconColor', 'var(--mui-palette-grey-700)');
|
|
132
|
+
setColor(palette.FilledInput, 'bg', 'rgba(0, 0, 0, 0.06)');
|
|
133
|
+
setColor(palette.FilledInput, 'hoverBg', 'rgba(0, 0, 0, 0.09)');
|
|
134
|
+
setColor(palette.FilledInput, 'disabledBg', 'rgba(0, 0, 0, 0.12)');
|
|
135
|
+
setColor(palette.LinearProgress, 'primaryBg', (0, _system.lighten)(palette.primary.main, 0.62));
|
|
136
|
+
setColor(palette.LinearProgress, 'secondaryBg', (0, _system.lighten)(palette.secondary.main, 0.62));
|
|
137
|
+
setColor(palette.LinearProgress, 'errorBg', (0, _system.lighten)(palette.error.main, 0.62));
|
|
138
|
+
setColor(palette.LinearProgress, 'infoBg', (0, _system.lighten)(palette.info.main, 0.62));
|
|
139
|
+
setColor(palette.LinearProgress, 'successBg', (0, _system.lighten)(palette.success.main, 0.62));
|
|
140
|
+
setColor(palette.LinearProgress, 'warningBg', (0, _system.lighten)(palette.warning.main, 0.62));
|
|
141
|
+
setColor(palette.Skeleton, 'bg', 'rgba(var(--mui-palette-text-primaryChannel) / 0.11)');
|
|
142
|
+
setColor(palette.Slider, 'primaryTrack', (0, _system.lighten)(palette.primary.main, 0.62));
|
|
143
|
+
setColor(palette.Slider, 'secondaryTrack', (0, _system.lighten)(palette.secondary.main, 0.62));
|
|
144
|
+
setColor(palette.Slider, 'errorTrack', (0, _system.lighten)(palette.error.main, 0.62));
|
|
145
|
+
setColor(palette.Slider, 'infoTrack', (0, _system.lighten)(palette.info.main, 0.62));
|
|
146
|
+
setColor(palette.Slider, 'successTrack', (0, _system.lighten)(palette.success.main, 0.62));
|
|
147
|
+
setColor(palette.Slider, 'warningTrack', (0, _system.lighten)(palette.warning.main, 0.62));
|
|
148
|
+
setColor(palette.SnackbarContent, 'bg', (0, _system.emphasize)(palette.background.default, 0.8));
|
|
149
|
+
setColor(palette.SpeedDialAction, 'fabHoverBg', (0, _system.emphasize)(palette.background.paper, 0.15));
|
|
150
|
+
setColor(palette.StepConnector, 'border', 'var(--mui-palette-grey-400)');
|
|
151
|
+
setColor(palette.StepContent, 'border', 'var(--mui-palette-grey-400)');
|
|
152
|
+
setColor(palette.Switch, 'defaultColor', 'var(--mui-palette-common-white)');
|
|
153
|
+
setColor(palette.Switch, 'defaultDisabledColor', 'var(--mui-palette-grey-100)');
|
|
154
|
+
setColor(palette.Switch, 'primaryDisabledColor', (0, _system.lighten)(palette.primary.main, 0.62));
|
|
155
|
+
setColor(palette.Switch, 'secondaryDisabledColor', (0, _system.lighten)(palette.secondary.main, 0.62));
|
|
156
|
+
setColor(palette.Switch, 'errorDisabledColor', (0, _system.lighten)(palette.error.main, 0.62));
|
|
157
|
+
setColor(palette.Switch, 'infoDisabledColor', (0, _system.lighten)(palette.info.main, 0.62));
|
|
158
|
+
setColor(palette.Switch, 'successDisabledColor', (0, _system.lighten)(palette.success.main, 0.62));
|
|
159
|
+
setColor(palette.Switch, 'warningDisabledColor', (0, _system.lighten)(palette.warning.main, 0.62));
|
|
160
|
+
setColor(palette.TableCell, 'border', (0, _system.lighten)((0, _system.alpha)(palette.divider, 1), 0.88));
|
|
161
|
+
setColor(palette.Tooltip, 'bg', (0, _system.alpha)(palette.grey[700], 0.92));
|
|
162
|
+
} else {
|
|
163
|
+
setColor(palette.Alert, 'errorColor', (0, _system.lighten)(palette.error.light, 0.6));
|
|
164
|
+
setColor(palette.Alert, 'infoColor', (0, _system.lighten)(palette.info.light, 0.6));
|
|
165
|
+
setColor(palette.Alert, 'successColor', (0, _system.lighten)(palette.success.light, 0.6));
|
|
166
|
+
setColor(palette.Alert, 'warningColor', (0, _system.lighten)(palette.warning.light, 0.6));
|
|
167
|
+
setColor(palette.Alert, 'errorFilledBg', 'var(--mui-palette-error-dark)');
|
|
168
|
+
setColor(palette.Alert, 'infoFilledBg', 'var(--mui-palette-info-dark)');
|
|
169
|
+
setColor(palette.Alert, 'successFilledBg', 'var(--mui-palette-success-dark)');
|
|
170
|
+
setColor(palette.Alert, 'warningFilledBg', 'var(--mui-palette-warning-dark)');
|
|
171
|
+
setColor(palette.Alert, 'errorFilledColor', darkPalette.getContrastText(palette.error.dark));
|
|
172
|
+
setColor(palette.Alert, 'infoFilledColor', darkPalette.getContrastText(palette.info.dark));
|
|
173
|
+
setColor(palette.Alert, 'successFilledColor', darkPalette.getContrastText(palette.success.dark));
|
|
174
|
+
setColor(palette.Alert, 'warningFilledColor', darkPalette.getContrastText(palette.warning.dark));
|
|
175
|
+
setColor(palette.Alert, 'errorStandardBg', (0, _system.darken)(palette.error.light, 0.9));
|
|
176
|
+
setColor(palette.Alert, 'infoStandardBg', (0, _system.darken)(palette.info.light, 0.9));
|
|
177
|
+
setColor(palette.Alert, 'successStandardBg', (0, _system.darken)(palette.success.light, 0.9));
|
|
178
|
+
setColor(palette.Alert, 'warningStandardBg', (0, _system.darken)(palette.warning.light, 0.9));
|
|
179
|
+
setColor(palette.Alert, 'errorIconColor', 'var(--mui-palette-error-main)');
|
|
180
|
+
setColor(palette.Alert, 'infoIconColor', 'var(--mui-palette-info-main)');
|
|
181
|
+
setColor(palette.Alert, 'successIconColor', 'var(--mui-palette-success-main)');
|
|
182
|
+
setColor(palette.Alert, 'warningIconColor', 'var(--mui-palette-warning-main)');
|
|
183
|
+
setColor(palette.AppBar, 'defaultBg', 'var(--mui-palette-grey-900)');
|
|
184
|
+
setColor(palette.AppBar, 'darkBg', 'var(--mui-palette-background-paper)'); // specific for dark mode
|
|
185
|
+
|
|
186
|
+
setColor(palette.AppBar, 'darkColor', 'var(--mui-palette-text-primary)'); // specific for dark mode
|
|
187
|
+
|
|
188
|
+
setColor(palette.Avatar, 'defaultBg', 'var(--mui-palette-grey-600)');
|
|
189
|
+
setColor(palette.Chip, 'defaultBorder', 'var(--mui-palette-grey-700)');
|
|
190
|
+
setColor(palette.Chip, 'defaultAvatarColor', 'var(--mui-palette-grey-300)');
|
|
191
|
+
setColor(palette.Chip, 'defaultIconColor', 'var(--mui-palette-grey-300)');
|
|
192
|
+
setColor(palette.FilledInput, 'bg', 'rgba(255, 255, 255, 0.09)');
|
|
193
|
+
setColor(palette.FilledInput, 'hoverBg', 'rgba(255, 255, 255, 0.13)');
|
|
194
|
+
setColor(palette.FilledInput, 'disabledBg', 'rgba(255, 255, 255, 0.12)');
|
|
195
|
+
setColor(palette.LinearProgress, 'primaryBg', (0, _system.darken)(palette.primary.main, 0.5));
|
|
196
|
+
setColor(palette.LinearProgress, 'secondaryBg', (0, _system.darken)(palette.secondary.main, 0.5));
|
|
197
|
+
setColor(palette.LinearProgress, 'errorBg', (0, _system.darken)(palette.error.main, 0.5));
|
|
198
|
+
setColor(palette.LinearProgress, 'infoBg', (0, _system.darken)(palette.info.main, 0.5));
|
|
199
|
+
setColor(palette.LinearProgress, 'successBg', (0, _system.darken)(palette.success.main, 0.5));
|
|
200
|
+
setColor(palette.LinearProgress, 'warningBg', (0, _system.darken)(palette.warning.main, 0.5));
|
|
201
|
+
setColor(palette.Skeleton, 'bg', 'rgba(var(--mui-palette-text-primaryChannel) / 0.13)');
|
|
202
|
+
setColor(palette.Slider, 'primaryTrack', (0, _system.darken)(palette.primary.main, 0.5));
|
|
203
|
+
setColor(palette.Slider, 'secondaryTrack', (0, _system.darken)(palette.secondary.main, 0.5));
|
|
204
|
+
setColor(palette.Slider, 'errorTrack', (0, _system.darken)(palette.error.main, 0.5));
|
|
205
|
+
setColor(palette.Slider, 'infoTrack', (0, _system.darken)(palette.info.main, 0.5));
|
|
206
|
+
setColor(palette.Slider, 'successTrack', (0, _system.darken)(palette.success.main, 0.5));
|
|
207
|
+
setColor(palette.Slider, 'warningTrack', (0, _system.darken)(palette.warning.main, 0.5));
|
|
208
|
+
setColor(palette.SnackbarContent, 'bg', (0, _system.emphasize)(palette.background.default, 0.98));
|
|
209
|
+
setColor(palette.SpeedDialAction, 'fabHoverBg', (0, _system.emphasize)(palette.background.paper, 0.15));
|
|
210
|
+
setColor(palette.StepConnector, 'border', 'var(--mui-palette-grey-600)');
|
|
211
|
+
setColor(palette.StepContent, 'border', 'var(--mui-palette-grey-600)');
|
|
212
|
+
setColor(palette.Switch, 'defaultColor', 'var(--mui-palette-grey-300)');
|
|
213
|
+
setColor(palette.Switch, 'defaultDisabledColor', 'var(--mui-palette-grey-600)');
|
|
214
|
+
setColor(palette.Switch, 'primaryDisabledColor', (0, _system.darken)(palette.primary.main, 0.55));
|
|
215
|
+
setColor(palette.Switch, 'secondaryDisabledColor', (0, _system.darken)(palette.secondary.main, 0.55));
|
|
216
|
+
setColor(palette.Switch, 'errorDisabledColor', (0, _system.darken)(palette.error.main, 0.55));
|
|
217
|
+
setColor(palette.Switch, 'infoDisabledColor', (0, _system.darken)(palette.info.main, 0.55));
|
|
218
|
+
setColor(palette.Switch, 'successDisabledColor', (0, _system.darken)(palette.success.main, 0.55));
|
|
219
|
+
setColor(palette.Switch, 'warningDisabledColor', (0, _system.darken)(palette.warning.main, 0.55));
|
|
220
|
+
setColor(palette.TableCell, 'border', (0, _system.darken)((0, _system.alpha)(palette.divider, 1), 0.68));
|
|
221
|
+
setColor(palette.Tooltip, 'bg', (0, _system.alpha)(palette.grey[700], 0.92));
|
|
94
222
|
}
|
|
95
223
|
|
|
224
|
+
palette.common.backgroundChannel = (0, _system.colorChannel)(palette.common.background);
|
|
225
|
+
palette.common.onBackgroundChannel = (0, _system.colorChannel)(palette.common.onBackground);
|
|
226
|
+
palette.dividerChannel = (0, _system.colorChannel)(palette.divider);
|
|
96
227
|
Object.keys(palette).forEach(color => {
|
|
97
228
|
const colors = palette[color]; // Color palettes: primary, secondary, error, info, success, and warning
|
|
98
229
|
|
|
@@ -119,12 +250,16 @@ function extendTheme(options = {}, ...args) {
|
|
|
119
250
|
|
|
120
251
|
if (colors.secondary) {
|
|
121
252
|
palette[color].secondaryChannel = (0, _system.colorChannel)(colors.secondary);
|
|
122
|
-
} // Action colors: action.
|
|
253
|
+
} // Action colors: action.active, action.selected
|
|
123
254
|
|
|
124
255
|
|
|
125
256
|
if (colors.active) {
|
|
126
257
|
palette[color].activeChannel = (0, _system.colorChannel)(colors.active);
|
|
127
258
|
}
|
|
259
|
+
|
|
260
|
+
if (colors.selected) {
|
|
261
|
+
palette[color].selectedChannel = (0, _system.colorChannel)(colors.selected);
|
|
262
|
+
}
|
|
128
263
|
});
|
|
129
264
|
});
|
|
130
265
|
theme = args.reduce((acc, argument) => (0, _utils.deepmerge)(acc, argument), theme);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "5.8.
|
|
3
|
+
"version": "5.8.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "React components that implement Google's Material Design.",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"bugs": {
|
|
22
22
|
"url": "https://github.com/mui/material-ui/issues"
|
|
23
23
|
},
|
|
24
|
-
"homepage": "https://mui.com/material-ui/getting-started/
|
|
24
|
+
"homepage": "https://mui.com/material-ui/getting-started/overview/",
|
|
25
25
|
"funding": {
|
|
26
26
|
"type": "opencollective",
|
|
27
27
|
"url": "https://opencollective.com/mui"
|
|
@@ -46,14 +46,13 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@babel/runtime": "^7.17.2",
|
|
49
|
-
"@mui/base": "5.0.0-alpha.
|
|
50
|
-
"@mui/system": "^5.8.
|
|
51
|
-
"@mui/types": "^7.1.
|
|
52
|
-
"@mui/utils": "^5.8.
|
|
49
|
+
"@mui/base": "5.0.0-alpha.87",
|
|
50
|
+
"@mui/system": "^5.8.6",
|
|
51
|
+
"@mui/types": "^7.1.4",
|
|
52
|
+
"@mui/utils": "^5.8.6",
|
|
53
53
|
"@types/react-transition-group": "^4.4.4",
|
|
54
54
|
"clsx": "^1.1.1",
|
|
55
55
|
"csstype": "^3.1.0",
|
|
56
|
-
"hoist-non-react-statics": "^3.3.2",
|
|
57
56
|
"prop-types": "^15.8.1",
|
|
58
57
|
"react-is": "^17.0.2",
|
|
59
58
|
"react-transition-group": "^4.4.2"
|
|
@@ -1,28 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
palette: PaletteWithChannels;
|
|
12
|
-
}
|
|
13
|
-
>
|
|
14
|
-
>;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
type MDCreateCssVarsProviderResult = CreateCssVarsProviderResult<SupportedColorScheme, ThemeInput>;
|
|
18
|
-
|
|
19
|
-
declare const useColorScheme: MDCreateCssVarsProviderResult['useColorScheme'];
|
|
20
|
-
declare const getInitColorSchemeScript: MDCreateCssVarsProviderResult['getInitColorSchemeScript'];
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* This component is an experimental Theme Provider that generates CSS variabels out of the theme tokens.
|
|
24
|
-
* It should preferably be used at **the root of your component tree**.
|
|
25
|
-
*/
|
|
26
|
-
declare const Experimental_CssVarsProvider: MDCreateCssVarsProviderResult['CssVarsProvider'];
|
|
27
|
-
|
|
28
|
-
export { useColorScheme, getInitColorSchemeScript, Experimental_CssVarsProvider };
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SupportedColorScheme, CssVarsTheme } from './experimental_extendTheme';
|
|
3
|
+
declare const Experimental_CssVarsProvider: (props: import("react").PropsWithChildren<Partial<import("packages/mui-system/src/cssVars/createCssVarsProvider").CssVarsProviderConfig<SupportedColorScheme>> & {
|
|
4
|
+
theme?: CssVarsTheme | undefined;
|
|
5
|
+
documentNode?: Document | null | undefined;
|
|
6
|
+
colorSchemeNode?: Document | HTMLElement | null | undefined;
|
|
7
|
+
colorSchemeSelector?: string | undefined;
|
|
8
|
+
storageWindow?: Window | null | undefined;
|
|
9
|
+
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>, useColorScheme: () => import("packages/mui-system/src/cssVars/createCssVarsProvider").ColorSchemeContextValue<SupportedColorScheme>, getInitColorSchemeScript: typeof import("packages/mui-system/src/cssVars/getInitColorSchemeScript").default;
|
|
10
|
+
export { useColorScheme, getInitColorSchemeScript, Experimental_CssVarsProvider };
|
|
@@ -18,7 +18,7 @@ const {
|
|
|
18
18
|
light: 'light',
|
|
19
19
|
dark: 'dark'
|
|
20
20
|
},
|
|
21
|
-
prefix: '
|
|
21
|
+
prefix: 'mui',
|
|
22
22
|
resolveTheme: theme => {
|
|
23
23
|
const newTheme = _extends({}, theme, {
|
|
24
24
|
typography: createTypography(theme.palette, theme.typography)
|
|
@@ -26,6 +26,10 @@ const {
|
|
|
26
26
|
|
|
27
27
|
return newTheme;
|
|
28
28
|
},
|
|
29
|
-
shouldSkipGeneratingVar: keys =>
|
|
29
|
+
shouldSkipGeneratingVar: keys => {
|
|
30
|
+
var _keys$;
|
|
31
|
+
|
|
32
|
+
return !!keys[0].match(/(typography|mixins|breakpoints|direction|transitions)/) || keys[0] === 'palette' && !!((_keys$ = keys[1]) != null && _keys$.match(/(mode|contrastThreshold|tonalOffset)/));
|
|
33
|
+
}
|
|
30
34
|
});
|
|
31
35
|
export { useColorScheme, getInitColorSchemeScript, Experimental_CssVarsProvider };
|
|
@@ -105,32 +105,6 @@ export interface Channels {
|
|
|
105
105
|
contrastTextChannel: string;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
export interface PaletteWithChannels {
|
|
109
|
-
common: CommonColors & {
|
|
110
|
-
background: string;
|
|
111
|
-
onBackground: string;
|
|
112
|
-
backgroundChannel: string;
|
|
113
|
-
onBackgroundChannel: string;
|
|
114
|
-
};
|
|
115
|
-
mode: PaletteMode;
|
|
116
|
-
contrastThreshold: number;
|
|
117
|
-
tonalOffset: PaletteTonalOffset;
|
|
118
|
-
primary: PaletteColor & Channels;
|
|
119
|
-
secondary: PaletteColor & Channels;
|
|
120
|
-
error: PaletteColor & Channels;
|
|
121
|
-
warning: PaletteColor & Channels;
|
|
122
|
-
info: PaletteColor & Channels;
|
|
123
|
-
success: PaletteColor & Channels;
|
|
124
|
-
grey: Color & { darkChannel: string };
|
|
125
|
-
text: TypeText & { primaryChannel: string; secondaryChannel: string; disabledChannel: string };
|
|
126
|
-
divider: TypeDivider;
|
|
127
|
-
dividerChannel: TypeDivider;
|
|
128
|
-
action: TypeAction & { disabledChannel: string; activeChannel: string };
|
|
129
|
-
background: TypeBackground;
|
|
130
|
-
getContrastText: (background: string) => string;
|
|
131
|
-
augmentColor: (options: PaletteAugmentColorOptions) => PaletteColor;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
108
|
export type PartialTypeObject = { [P in keyof TypeObject]?: Partial<TypeObject[P]> };
|
|
135
109
|
|
|
136
110
|
export interface PaletteOptions {
|