@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
package/node/Chip/Chip.js
CHANGED
|
@@ -106,6 +106,7 @@ const ChipRoot = (0, _styled.default)('div', {
|
|
|
106
106
|
ownerState
|
|
107
107
|
}) => {
|
|
108
108
|
const deleteIconColor = (0, _system.alpha)(theme.palette.text.primary, 0.26);
|
|
109
|
+
const textColor = theme.palette.mode === 'light' ? theme.palette.grey[700] : theme.palette.grey[300];
|
|
109
110
|
return (0, _extends2.default)({
|
|
110
111
|
maxWidth: '100%',
|
|
111
112
|
fontFamily: theme.typography.fontFamily,
|
|
@@ -114,8 +115,8 @@ const ChipRoot = (0, _styled.default)('div', {
|
|
|
114
115
|
alignItems: 'center',
|
|
115
116
|
justifyContent: 'center',
|
|
116
117
|
height: 32,
|
|
117
|
-
color: theme.palette.text.primary,
|
|
118
|
-
backgroundColor: theme.palette.action.selected,
|
|
118
|
+
color: (theme.vars || theme).palette.text.primary,
|
|
119
|
+
backgroundColor: (theme.vars || theme).palette.action.selected,
|
|
119
120
|
borderRadius: 32 / 2,
|
|
120
121
|
whiteSpace: 'nowrap',
|
|
121
122
|
transition: theme.transitions.create(['background-color', 'box-shadow']),
|
|
@@ -131,7 +132,7 @@ const ChipRoot = (0, _styled.default)('div', {
|
|
|
131
132
|
verticalAlign: 'middle',
|
|
132
133
|
boxSizing: 'border-box',
|
|
133
134
|
[`&.${_chipClasses.default.disabled}`]: {
|
|
134
|
-
opacity: theme.palette.action.disabledOpacity,
|
|
135
|
+
opacity: (theme.vars || theme).palette.action.disabledOpacity,
|
|
135
136
|
pointerEvents: 'none'
|
|
136
137
|
},
|
|
137
138
|
[`& .${_chipClasses.default.avatar}`]: {
|
|
@@ -139,16 +140,16 @@ const ChipRoot = (0, _styled.default)('div', {
|
|
|
139
140
|
marginRight: -6,
|
|
140
141
|
width: 24,
|
|
141
142
|
height: 24,
|
|
142
|
-
color: theme.
|
|
143
|
+
color: theme.vars ? theme.vars.palette.Chip.defaultAvatarColor : textColor,
|
|
143
144
|
fontSize: theme.typography.pxToRem(12)
|
|
144
145
|
},
|
|
145
146
|
[`& .${_chipClasses.default.avatarColorPrimary}`]: {
|
|
146
|
-
color: theme.palette.primary.contrastText,
|
|
147
|
-
backgroundColor: theme.palette.primary.dark
|
|
147
|
+
color: (theme.vars || theme).palette.primary.contrastText,
|
|
148
|
+
backgroundColor: (theme.vars || theme).palette.primary.dark
|
|
148
149
|
},
|
|
149
150
|
[`& .${_chipClasses.default.avatarColorSecondary}`]: {
|
|
150
|
-
color: theme.palette.secondary.contrastText,
|
|
151
|
-
backgroundColor: theme.palette.secondary.dark
|
|
151
|
+
color: (theme.vars || theme).palette.secondary.contrastText,
|
|
152
|
+
backgroundColor: (theme.vars || theme).palette.secondary.dark
|
|
152
153
|
},
|
|
153
154
|
[`& .${_chipClasses.default.avatarSmall}`]: {
|
|
154
155
|
marginLeft: 4,
|
|
@@ -158,7 +159,7 @@ const ChipRoot = (0, _styled.default)('div', {
|
|
|
158
159
|
fontSize: theme.typography.pxToRem(10)
|
|
159
160
|
},
|
|
160
161
|
[`& .${_chipClasses.default.icon}`]: (0, _extends2.default)({
|
|
161
|
-
color: theme.
|
|
162
|
+
color: theme.vars ? theme.vars.palette.Chip.defaultIconColor : textColor,
|
|
162
163
|
marginLeft: 5,
|
|
163
164
|
marginRight: -6
|
|
164
165
|
}, ownerState.size === 'small' && {
|
|
@@ -170,35 +171,35 @@ const ChipRoot = (0, _styled.default)('div', {
|
|
|
170
171
|
}),
|
|
171
172
|
[`& .${_chipClasses.default.deleteIcon}`]: (0, _extends2.default)({
|
|
172
173
|
WebkitTapHighlightColor: 'transparent',
|
|
173
|
-
color: deleteIconColor,
|
|
174
|
+
color: theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / 0.26)` : deleteIconColor,
|
|
174
175
|
fontSize: 22,
|
|
175
176
|
cursor: 'pointer',
|
|
176
177
|
margin: '0 5px 0 -6px',
|
|
177
178
|
'&:hover': {
|
|
178
|
-
color: (0, _system.alpha)(deleteIconColor, 0.4)
|
|
179
|
+
color: theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / 0.4)` : (0, _system.alpha)(deleteIconColor, 0.4)
|
|
179
180
|
}
|
|
180
181
|
}, ownerState.size === 'small' && {
|
|
181
182
|
fontSize: 16,
|
|
182
183
|
marginRight: 4,
|
|
183
184
|
marginLeft: -4
|
|
184
185
|
}, ownerState.color !== 'default' && {
|
|
185
|
-
color: (0, _system.alpha)(theme.palette[ownerState.color].contrastText, 0.7),
|
|
186
|
+
color: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].contrastTextChannel} / 0.7)` : (0, _system.alpha)(theme.palette[ownerState.color].contrastText, 0.7),
|
|
186
187
|
'&:hover, &:active': {
|
|
187
|
-
color: theme.palette[ownerState.color].contrastText
|
|
188
|
+
color: (theme.vars || theme).palette[ownerState.color].contrastText
|
|
188
189
|
}
|
|
189
190
|
})
|
|
190
191
|
}, ownerState.size === 'small' && {
|
|
191
192
|
height: 24
|
|
192
193
|
}, ownerState.color !== 'default' && {
|
|
193
|
-
backgroundColor: theme.palette[ownerState.color].main,
|
|
194
|
-
color: theme.palette[ownerState.color].contrastText
|
|
194
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].main,
|
|
195
|
+
color: (theme.vars || theme).palette[ownerState.color].contrastText
|
|
195
196
|
}, ownerState.onDelete && {
|
|
196
197
|
[`&.${_chipClasses.default.focusVisible}`]: {
|
|
197
|
-
backgroundColor: (0, _system.alpha)(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
|
|
198
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity + theme.vars.palette.action.focusOpacity}))` : (0, _system.alpha)(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
|
|
198
199
|
}
|
|
199
200
|
}, ownerState.onDelete && ownerState.color !== 'default' && {
|
|
200
201
|
[`&.${_chipClasses.default.focusVisible}`]: {
|
|
201
|
-
backgroundColor: theme.palette[ownerState.color].dark
|
|
202
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].dark
|
|
202
203
|
}
|
|
203
204
|
});
|
|
204
205
|
}, ({
|
|
@@ -209,29 +210,29 @@ const ChipRoot = (0, _styled.default)('div', {
|
|
|
209
210
|
WebkitTapHighlightColor: 'transparent',
|
|
210
211
|
cursor: 'pointer',
|
|
211
212
|
'&:hover': {
|
|
212
|
-
backgroundColor: (0, _system.alpha)(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)
|
|
213
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity + theme.vars.palette.action.hoverOpacity}))` : (0, _system.alpha)(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)
|
|
213
214
|
},
|
|
214
215
|
[`&.${_chipClasses.default.focusVisible}`]: {
|
|
215
|
-
backgroundColor: (0, _system.alpha)(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
|
|
216
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity + theme.vars.palette.action.focusOpacity}))` : (0, _system.alpha)(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
|
|
216
217
|
},
|
|
217
218
|
'&:active': {
|
|
218
|
-
boxShadow: theme.shadows[1]
|
|
219
|
+
boxShadow: (theme.vars || theme).shadows[1]
|
|
219
220
|
}
|
|
220
221
|
}, ownerState.clickable && ownerState.color !== 'default' && {
|
|
221
222
|
[`&:hover, &.${_chipClasses.default.focusVisible}`]: {
|
|
222
|
-
backgroundColor: theme.palette[ownerState.color].dark
|
|
223
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].dark
|
|
223
224
|
}
|
|
224
225
|
}), ({
|
|
225
226
|
theme,
|
|
226
227
|
ownerState
|
|
227
228
|
}) => (0, _extends2.default)({}, ownerState.variant === 'outlined' && {
|
|
228
229
|
backgroundColor: 'transparent',
|
|
229
|
-
border: `1px solid ${theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[700]}`,
|
|
230
|
+
border: theme.vars ? `1px solid ${theme.vars.palette.Chip.defaultBorder}` : `1px solid ${theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[700]}`,
|
|
230
231
|
[`&.${_chipClasses.default.clickable}:hover`]: {
|
|
231
|
-
backgroundColor: theme.palette.action.hover
|
|
232
|
+
backgroundColor: (theme.vars || theme).palette.action.hover
|
|
232
233
|
},
|
|
233
234
|
[`&.${_chipClasses.default.focusVisible}`]: {
|
|
234
|
-
backgroundColor: theme.palette.action.focus
|
|
235
|
+
backgroundColor: (theme.vars || theme).palette.action.focus
|
|
235
236
|
},
|
|
236
237
|
[`& .${_chipClasses.default.avatar}`]: {
|
|
237
238
|
marginLeft: 4
|
|
@@ -252,18 +253,18 @@ const ChipRoot = (0, _styled.default)('div', {
|
|
|
252
253
|
marginRight: 3
|
|
253
254
|
}
|
|
254
255
|
}, ownerState.variant === 'outlined' && ownerState.color !== 'default' && {
|
|
255
|
-
color: theme.palette[ownerState.color].main,
|
|
256
|
-
border: `1px solid ${(0, _system.alpha)(theme.palette[ownerState.color].main, 0.7)}`,
|
|
256
|
+
color: (theme.vars || theme).palette[ownerState.color].main,
|
|
257
|
+
border: `1px solid ${theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.7)` : (0, _system.alpha)(theme.palette[ownerState.color].main, 0.7)}`,
|
|
257
258
|
[`&.${_chipClasses.default.clickable}:hover`]: {
|
|
258
|
-
backgroundColor: (0, _system.alpha)(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity)
|
|
259
|
+
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)
|
|
259
260
|
},
|
|
260
261
|
[`&.${_chipClasses.default.focusVisible}`]: {
|
|
261
|
-
backgroundColor: (0, _system.alpha)(theme.palette[ownerState.color].main, theme.palette.action.focusOpacity)
|
|
262
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.focusOpacity})` : (0, _system.alpha)(theme.palette[ownerState.color].main, theme.palette.action.focusOpacity)
|
|
262
263
|
},
|
|
263
264
|
[`& .${_chipClasses.default.deleteIcon}`]: {
|
|
264
|
-
color: (0, _system.alpha)(theme.palette[ownerState.color].main, 0.7),
|
|
265
|
+
color: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.7)` : (0, _system.alpha)(theme.palette[ownerState.color].main, 0.7),
|
|
265
266
|
'&:hover, &:active': {
|
|
266
|
-
color: theme.palette[ownerState.color].main
|
|
267
|
+
color: (theme.vars || theme).palette[ownerState.color].main
|
|
267
268
|
}
|
|
268
269
|
}
|
|
269
270
|
}));
|
package/node/Dialog/Dialog.js
CHANGED
|
@@ -157,7 +157,7 @@ const DialogPaper = (0, _styled.default)(_Paper.default, {
|
|
|
157
157
|
maxWidth: 'calc(100% - 64px)'
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
-
}, ownerState.maxWidth !== 'xs' && {
|
|
160
|
+
}, ownerState.maxWidth && ownerState.maxWidth !== 'xs' && {
|
|
161
161
|
maxWidth: `${theme.breakpoints.values[ownerState.maxWidth]}${theme.breakpoints.unit}`,
|
|
162
162
|
[`&.${_dialogClasses.default.paperScrollBody}`]: {
|
|
163
163
|
[theme.breakpoints.down(theme.breakpoints.values[ownerState.maxWidth] + 32 * 2)]: {
|
|
@@ -255,12 +255,16 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
|
|
|
255
255
|
}, [ariaLabelledby]);
|
|
256
256
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(DialogRoot, (0, _extends2.default)({
|
|
257
257
|
className: (0, _clsx.default)(classes.root, className),
|
|
258
|
-
BackdropProps: (0, _extends2.default)({
|
|
259
|
-
transitionDuration,
|
|
260
|
-
as: BackdropComponent
|
|
261
|
-
}, BackdropProps),
|
|
262
258
|
closeAfterTransition: true,
|
|
263
|
-
|
|
259
|
+
components: {
|
|
260
|
+
Backdrop: DialogBackdrop
|
|
261
|
+
},
|
|
262
|
+
componentsProps: {
|
|
263
|
+
backdrop: (0, _extends2.default)({
|
|
264
|
+
transitionDuration,
|
|
265
|
+
as: BackdropComponent
|
|
266
|
+
}, BackdropProps)
|
|
267
|
+
},
|
|
264
268
|
disableEscapeKeyDown: disableEscapeKeyDown,
|
|
265
269
|
onClose: onClose,
|
|
266
270
|
open: open,
|
|
@@ -316,6 +320,7 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes
|
|
|
316
320
|
|
|
317
321
|
/**
|
|
318
322
|
* A backdrop component. This prop enables custom backdrop rendering.
|
|
323
|
+
* @deprecated Use `components.Backdrop` instead.
|
|
319
324
|
* @default styled(Backdrop, {
|
|
320
325
|
* name: 'MuiModal',
|
|
321
326
|
* slot: 'Backdrop',
|
|
@@ -64,36 +64,38 @@ const FilledInputRoot = (0, _styled.default)(_InputBase2.InputBaseRoot, {
|
|
|
64
64
|
theme,
|
|
65
65
|
ownerState
|
|
66
66
|
}) => {
|
|
67
|
-
var
|
|
67
|
+
var _palette;
|
|
68
68
|
|
|
69
69
|
const light = theme.palette.mode === 'light';
|
|
70
70
|
const bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';
|
|
71
71
|
const backgroundColor = light ? 'rgba(0, 0, 0, 0.06)' : 'rgba(255, 255, 255, 0.09)';
|
|
72
|
+
const hoverBackground = light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.13)';
|
|
73
|
+
const disabledBackground = light ? 'rgba(0, 0, 0, 0.12)' : 'rgba(255, 255, 255, 0.12)';
|
|
72
74
|
return (0, _extends2.default)({
|
|
73
75
|
position: 'relative',
|
|
74
|
-
backgroundColor,
|
|
75
|
-
borderTopLeftRadius: theme.shape.borderRadius,
|
|
76
|
-
borderTopRightRadius: theme.shape.borderRadius,
|
|
76
|
+
backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor,
|
|
77
|
+
borderTopLeftRadius: (theme.vars || theme).shape.borderRadius,
|
|
78
|
+
borderTopRightRadius: (theme.vars || theme).shape.borderRadius,
|
|
77
79
|
transition: theme.transitions.create('background-color', {
|
|
78
80
|
duration: theme.transitions.duration.shorter,
|
|
79
81
|
easing: theme.transitions.easing.easeOut
|
|
80
82
|
}),
|
|
81
83
|
'&:hover': {
|
|
82
|
-
backgroundColor:
|
|
84
|
+
backgroundColor: theme.vars ? theme.vars.palette.FilledInput.hoverBg : hoverBackground,
|
|
83
85
|
// Reset on touch devices, it doesn't add specificity
|
|
84
86
|
'@media (hover: none)': {
|
|
85
|
-
backgroundColor
|
|
87
|
+
backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor
|
|
86
88
|
}
|
|
87
89
|
},
|
|
88
90
|
[`&.${_filledInputClasses.default.focused}`]: {
|
|
89
|
-
backgroundColor
|
|
91
|
+
backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor
|
|
90
92
|
},
|
|
91
93
|
[`&.${_filledInputClasses.default.disabled}`]: {
|
|
92
|
-
backgroundColor:
|
|
94
|
+
backgroundColor: theme.vars ? theme.vars.palette.FilledInput.disabledBg : disabledBackground
|
|
93
95
|
}
|
|
94
96
|
}, !ownerState.disableUnderline && {
|
|
95
97
|
'&:after': {
|
|
96
|
-
borderBottom: `2px solid ${(
|
|
98
|
+
borderBottom: `2px solid ${(_palette = (theme.vars || theme).palette[ownerState.color || 'primary']) == null ? void 0 : _palette.main}`,
|
|
97
99
|
left: 0,
|
|
98
100
|
bottom: 0,
|
|
99
101
|
// Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
|
|
@@ -114,12 +116,12 @@ const FilledInputRoot = (0, _styled.default)(_InputBase2.InputBaseRoot, {
|
|
|
114
116
|
transform: 'scaleX(1) translateX(0)'
|
|
115
117
|
},
|
|
116
118
|
[`&.${_filledInputClasses.default.error}:after`]: {
|
|
117
|
-
borderBottomColor: theme.palette.error.main,
|
|
119
|
+
borderBottomColor: (theme.vars || theme).palette.error.main,
|
|
118
120
|
transform: 'scaleX(1)' // error is always underlined in red
|
|
119
121
|
|
|
120
122
|
},
|
|
121
123
|
'&:before': {
|
|
122
|
-
borderBottom: `1px solid ${bottomLineColor}`,
|
|
124
|
+
borderBottom: `1px solid ${theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.inputUnderline})` : bottomLineColor}`,
|
|
123
125
|
left: 0,
|
|
124
126
|
bottom: 0,
|
|
125
127
|
// Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
|
|
@@ -133,7 +135,7 @@ const FilledInputRoot = (0, _styled.default)(_InputBase2.InputBaseRoot, {
|
|
|
133
135
|
|
|
134
136
|
},
|
|
135
137
|
[`&:hover:not(.${_filledInputClasses.default.disabled}):before`]: {
|
|
136
|
-
borderBottom: `1px solid ${theme.palette.text.primary}`
|
|
138
|
+
borderBottom: `1px solid ${(theme.vars || theme).palette.text.primary}`
|
|
137
139
|
},
|
|
138
140
|
[`&.${_filledInputClasses.default.disabled}:before`]: {
|
|
139
141
|
borderBottomStyle: 'dotted'
|
|
@@ -163,7 +165,8 @@ const FilledInputInput = (0, _styled.default)(_InputBase2.InputBaseComponent, {
|
|
|
163
165
|
paddingTop: 25,
|
|
164
166
|
paddingRight: 12,
|
|
165
167
|
paddingBottom: 8,
|
|
166
|
-
paddingLeft: 12
|
|
168
|
+
paddingLeft: 12
|
|
169
|
+
}, !theme.vars && {
|
|
167
170
|
'&:-webkit-autofill': {
|
|
168
171
|
WebkitBoxShadow: theme.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset',
|
|
169
172
|
WebkitTextFillColor: theme.palette.mode === 'light' ? null : '#fff',
|
|
@@ -171,6 +174,18 @@ const FilledInputInput = (0, _styled.default)(_InputBase2.InputBaseComponent, {
|
|
|
171
174
|
borderTopLeftRadius: 'inherit',
|
|
172
175
|
borderTopRightRadius: 'inherit'
|
|
173
176
|
}
|
|
177
|
+
}, theme.vars && {
|
|
178
|
+
'&:-webkit-autofill': {
|
|
179
|
+
borderTopLeftRadius: 'inherit',
|
|
180
|
+
borderTopRightRadius: 'inherit'
|
|
181
|
+
},
|
|
182
|
+
[theme.getColorSchemeSelector('dark')]: {
|
|
183
|
+
'&:-webkit-autofill': {
|
|
184
|
+
WebkitBoxShadow: '0 0 0 100px #266798 inset',
|
|
185
|
+
WebkitTextFillColor: '#fff',
|
|
186
|
+
caretColor: '#fff'
|
|
187
|
+
}
|
|
188
|
+
}
|
|
174
189
|
}, ownerState.size === 'small' && {
|
|
175
190
|
paddingTop: 21,
|
|
176
191
|
paddingBottom: 4
|
package/node/Grid/Grid.js
CHANGED
|
@@ -11,6 +11,7 @@ exports.generateDirection = generateDirection;
|
|
|
11
11
|
exports.generateGrid = generateGrid;
|
|
12
12
|
exports.generateRowGap = generateRowGap;
|
|
13
13
|
exports.resolveSpacingClasses = resolveSpacingClasses;
|
|
14
|
+
exports.resolveSpacingStyles = resolveSpacingStyles;
|
|
14
15
|
|
|
15
16
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
16
17
|
|
|
@@ -32,13 +33,15 @@ var _styled = _interopRequireDefault(require("../styles/styled"));
|
|
|
32
33
|
|
|
33
34
|
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
34
35
|
|
|
36
|
+
var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
|
|
37
|
+
|
|
35
38
|
var _GridContext = _interopRequireDefault(require("./GridContext"));
|
|
36
39
|
|
|
37
40
|
var _gridClasses = _interopRequireWildcard(require("./gridClasses"));
|
|
38
41
|
|
|
39
42
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
40
43
|
|
|
41
|
-
const _excluded = ["className", "columns", "columnSpacing", "component", "container", "direction", "item", "
|
|
44
|
+
const _excluded = ["className", "columns", "columnSpacing", "component", "container", "direction", "item", "rowSpacing", "spacing", "wrap", "zeroMinWidth"];
|
|
42
45
|
|
|
43
46
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
44
47
|
|
|
@@ -226,26 +229,27 @@ function generateColumnGap({
|
|
|
226
229
|
return styles;
|
|
227
230
|
}
|
|
228
231
|
|
|
229
|
-
function
|
|
230
|
-
//
|
|
231
|
-
if (!
|
|
232
|
+
function resolveSpacingStyles(spacing, breakpoints, styles = {}) {
|
|
233
|
+
// undefined/null or `spacing` <= 0
|
|
234
|
+
if (!spacing || spacing <= 0) {
|
|
232
235
|
return [];
|
|
233
236
|
} // in case of string/number `spacing`
|
|
234
237
|
|
|
235
238
|
|
|
236
239
|
if (typeof spacing === 'string' && !Number.isNaN(Number(spacing)) || typeof spacing === 'number') {
|
|
237
|
-
return [styles[`spacing-xs-${String(spacing)}`]
|
|
240
|
+
return [styles[`spacing-xs-${String(spacing)}`]];
|
|
238
241
|
} // in case of object `spacing`
|
|
239
242
|
|
|
240
243
|
|
|
241
|
-
const
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
244
|
+
const spacingStyles = [];
|
|
245
|
+
breakpoints.forEach(breakpoint => {
|
|
246
|
+
const value = spacing[breakpoint];
|
|
247
|
+
|
|
248
|
+
if (Number(value) > 0) {
|
|
249
|
+
spacingStyles.push(styles[`spacing-${breakpoint}-${String(value)}`]);
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
return spacingStyles;
|
|
249
253
|
} // Default CSS values
|
|
250
254
|
// flex: '0 1 auto',
|
|
251
255
|
// flexDirection: 'row',
|
|
@@ -258,20 +262,33 @@ const GridRoot = (0, _styled.default)('div', {
|
|
|
258
262
|
name: 'MuiGrid',
|
|
259
263
|
slot: 'Root',
|
|
260
264
|
overridesResolver: (props, styles) => {
|
|
265
|
+
const {
|
|
266
|
+
ownerState
|
|
267
|
+
} = props;
|
|
261
268
|
const {
|
|
262
269
|
container,
|
|
263
270
|
direction,
|
|
264
271
|
item,
|
|
265
|
-
lg,
|
|
266
|
-
md,
|
|
267
|
-
sm,
|
|
268
272
|
spacing,
|
|
269
273
|
wrap,
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
274
|
+
zeroMinWidth,
|
|
275
|
+
breakpoints
|
|
276
|
+
} = ownerState;
|
|
277
|
+
let spacingStyles = []; // in case of grid item
|
|
278
|
+
|
|
279
|
+
if (container) {
|
|
280
|
+
spacingStyles = resolveSpacingStyles(spacing, breakpoints, styles);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
const breakpointsStyles = [];
|
|
284
|
+
breakpoints.forEach(breakpoint => {
|
|
285
|
+
const value = ownerState[breakpoint];
|
|
286
|
+
|
|
287
|
+
if (value) {
|
|
288
|
+
breakpointsStyles.push(styles[`grid-${breakpoint}-${String(value)}`]);
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
return [styles.root, container && styles.container, item && styles.item, zeroMinWidth && styles.zeroMinWidth, ...spacingStyles, direction !== 'row' && styles[`direction-xs-${String(direction)}`], wrap !== 'wrap' && styles[`wrap-xs-${String(wrap)}`], ...breakpointsStyles];
|
|
275
292
|
}
|
|
276
293
|
})(({
|
|
277
294
|
ownerState
|
|
@@ -290,23 +307,57 @@ const GridRoot = (0, _styled.default)('div', {
|
|
|
290
307
|
flexWrap: ownerState.wrap
|
|
291
308
|
}), generateDirection, generateRowGap, generateColumnGap, generateGrid);
|
|
292
309
|
|
|
310
|
+
function resolveSpacingClasses(spacing, breakpoints) {
|
|
311
|
+
// undefined/null or `spacing` <= 0
|
|
312
|
+
if (!spacing || spacing <= 0) {
|
|
313
|
+
return [];
|
|
314
|
+
} // in case of string/number `spacing`
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
if (typeof spacing === 'string' && !Number.isNaN(Number(spacing)) || typeof spacing === 'number') {
|
|
318
|
+
return [`spacing-xs-${String(spacing)}`];
|
|
319
|
+
} // in case of object `spacing`
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
const classes = [];
|
|
323
|
+
breakpoints.forEach(breakpoint => {
|
|
324
|
+
const value = spacing[breakpoint];
|
|
325
|
+
|
|
326
|
+
if (Number(value) > 0) {
|
|
327
|
+
const className = `spacing-${breakpoint}-${String(value)}`;
|
|
328
|
+
classes.push(className);
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
return classes;
|
|
332
|
+
}
|
|
333
|
+
|
|
293
334
|
const useUtilityClasses = ownerState => {
|
|
294
335
|
const {
|
|
295
336
|
classes,
|
|
296
337
|
container,
|
|
297
338
|
direction,
|
|
298
339
|
item,
|
|
299
|
-
lg,
|
|
300
|
-
md,
|
|
301
|
-
sm,
|
|
302
340
|
spacing,
|
|
303
341
|
wrap,
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
zeroMinWidth
|
|
342
|
+
zeroMinWidth,
|
|
343
|
+
breakpoints
|
|
307
344
|
} = ownerState;
|
|
345
|
+
let spacingClasses = []; // in case of grid item
|
|
346
|
+
|
|
347
|
+
if (container) {
|
|
348
|
+
spacingClasses = resolveSpacingClasses(spacing, breakpoints);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
const breakpointsClasses = [];
|
|
352
|
+
breakpoints.forEach(breakpoint => {
|
|
353
|
+
const value = ownerState[breakpoint];
|
|
354
|
+
|
|
355
|
+
if (value) {
|
|
356
|
+
breakpointsClasses.push(`grid-${breakpoint}-${String(value)}`);
|
|
357
|
+
}
|
|
358
|
+
});
|
|
308
359
|
const slots = {
|
|
309
|
-
root: ['root', container && 'container', item && 'item', zeroMinWidth && 'zeroMinWidth', ...
|
|
360
|
+
root: ['root', container && 'container', item && 'item', zeroMinWidth && 'zeroMinWidth', ...spacingClasses, direction !== 'row' && `direction-xs-${String(direction)}`, wrap !== 'wrap' && `wrap-xs-${String(wrap)}`, ...breakpointsClasses]
|
|
310
361
|
};
|
|
311
362
|
return (0, _base.unstable_composeClasses)(slots, _gridClasses.getGridUtilityClass, classes);
|
|
312
363
|
};
|
|
@@ -316,6 +367,9 @@ const Grid = /*#__PURE__*/React.forwardRef(function Grid(inProps, ref) {
|
|
|
316
367
|
props: inProps,
|
|
317
368
|
name: 'MuiGrid'
|
|
318
369
|
});
|
|
370
|
+
const {
|
|
371
|
+
breakpoints
|
|
372
|
+
} = (0, _useTheme.default)();
|
|
319
373
|
const props = (0, _system.unstable_extendSxProp)(themeProps);
|
|
320
374
|
const {
|
|
321
375
|
className,
|
|
@@ -325,14 +379,9 @@ const Grid = /*#__PURE__*/React.forwardRef(function Grid(inProps, ref) {
|
|
|
325
379
|
container = false,
|
|
326
380
|
direction = 'row',
|
|
327
381
|
item = false,
|
|
328
|
-
lg = false,
|
|
329
|
-
md = false,
|
|
330
382
|
rowSpacing: rowSpacingProp,
|
|
331
|
-
sm = false,
|
|
332
383
|
spacing = 0,
|
|
333
384
|
wrap = 'wrap',
|
|
334
|
-
xl = false,
|
|
335
|
-
xs = false,
|
|
336
385
|
zeroMinWidth = false
|
|
337
386
|
} = props,
|
|
338
387
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
@@ -341,20 +390,26 @@ const Grid = /*#__PURE__*/React.forwardRef(function Grid(inProps, ref) {
|
|
|
341
390
|
const columnsContext = React.useContext(_GridContext.default); // columns set with default breakpoint unit of 12
|
|
342
391
|
|
|
343
392
|
const columns = container ? columnsProp || 12 : columnsContext;
|
|
393
|
+
const breakpointsValues = {};
|
|
394
|
+
const otherFiltered = (0, _extends2.default)({}, other);
|
|
395
|
+
breakpoints.keys.forEach(breakpoint => {
|
|
396
|
+
if (other[breakpoint] != null) {
|
|
397
|
+
breakpointsValues[breakpoint] = other[breakpoint];
|
|
398
|
+
delete otherFiltered[breakpoint];
|
|
399
|
+
}
|
|
400
|
+
});
|
|
344
401
|
const ownerState = (0, _extends2.default)({}, props, {
|
|
345
402
|
columns,
|
|
346
403
|
container,
|
|
347
404
|
direction,
|
|
348
405
|
item,
|
|
349
|
-
lg,
|
|
350
|
-
md,
|
|
351
|
-
sm,
|
|
352
406
|
rowSpacing,
|
|
353
407
|
columnSpacing,
|
|
354
408
|
wrap,
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
409
|
+
zeroMinWidth,
|
|
410
|
+
spacing
|
|
411
|
+
}, breakpointsValues, {
|
|
412
|
+
breakpoints: breakpoints.keys
|
|
358
413
|
});
|
|
359
414
|
const classes = useUtilityClasses(ownerState);
|
|
360
415
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridContext.default.Provider, {
|
|
@@ -364,7 +419,7 @@ const Grid = /*#__PURE__*/React.forwardRef(function Grid(inProps, ref) {
|
|
|
364
419
|
className: (0, _clsx.default)(classes.root, className),
|
|
365
420
|
as: component,
|
|
366
421
|
ref: ref
|
|
367
|
-
},
|
|
422
|
+
}, otherFiltered))
|
|
368
423
|
});
|
|
369
424
|
});
|
|
370
425
|
process.env.NODE_ENV !== "production" ? Grid.propTypes
|
package/node/Grow/Grow.js
CHANGED
|
@@ -50,10 +50,9 @@ const styles = {
|
|
|
50
50
|
/*
|
|
51
51
|
TODO v6: remove
|
|
52
52
|
Conditionally apply a workaround for the CSS transition bug in Safari 15.4 / WebKit browsers.
|
|
53
|
-
Remove this workaround once the WebKit bug fix is released.
|
|
54
53
|
*/
|
|
55
54
|
|
|
56
|
-
const isWebKit154 = typeof navigator !== 'undefined' && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)
|
|
55
|
+
const isWebKit154 = typeof navigator !== 'undefined' && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)4/i.test(navigator.userAgent);
|
|
57
56
|
/**
|
|
58
57
|
* The Grow transition is used by the [Tooltip](/material-ui/react-tooltip/) and
|
|
59
58
|
* [Popover](/material-ui/react-popover/) components.
|
package/node/Hidden/withWidth.js
CHANGED
|
@@ -19,8 +19,6 @@ var _utils = require("@mui/utils");
|
|
|
19
19
|
|
|
20
20
|
var _system = require("@mui/system");
|
|
21
21
|
|
|
22
|
-
var _hoistNonReactStatics = _interopRequireDefault(require("hoist-non-react-statics"));
|
|
23
|
-
|
|
24
22
|
var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
|
|
25
23
|
|
|
26
24
|
var _useEnhancedEffect = _interopRequireDefault(require("../utils/useEnhancedEffect"));
|
|
@@ -141,7 +139,6 @@ const withWidth = (options = {}) => Component => {
|
|
|
141
139
|
WithWidth.displayName = `WithWidth(${(0, _utils.getDisplayName)(Component)})`;
|
|
142
140
|
}
|
|
143
141
|
|
|
144
|
-
(0, _hoistNonReactStatics.default)(WithWidth, Component);
|
|
145
142
|
return WithWidth;
|
|
146
143
|
};
|
|
147
144
|
|
package/node/Input/Input.js
CHANGED
|
@@ -68,7 +68,7 @@ const InputRoot = (0, _styled.default)(_InputBase2.InputBaseRoot, {
|
|
|
68
68
|
let bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';
|
|
69
69
|
|
|
70
70
|
if (theme.vars) {
|
|
71
|
-
bottomLineColor = `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.
|
|
71
|
+
bottomLineColor = `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.inputUnderline})`;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
return (0, _extends2.default)({
|
|
@@ -133,7 +133,7 @@ const InputBaseComponent = (0, _styled.default)('input', {
|
|
|
133
133
|
const placeholder = (0, _extends2.default)({
|
|
134
134
|
color: 'currentColor'
|
|
135
135
|
}, theme.vars ? {
|
|
136
|
-
opacity: theme.vars.opacity.
|
|
136
|
+
opacity: theme.vars.opacity.inputPlaceholder
|
|
137
137
|
} : {
|
|
138
138
|
opacity: light ? 0.42 : 0.5
|
|
139
139
|
}, {
|
|
@@ -145,7 +145,7 @@ const InputBaseComponent = (0, _styled.default)('input', {
|
|
|
145
145
|
opacity: '0 !important'
|
|
146
146
|
};
|
|
147
147
|
const placeholderVisible = theme.vars ? {
|
|
148
|
-
opacity: theme.vars.opacity.
|
|
148
|
+
opacity: theme.vars.opacity.inputPlaceholder
|
|
149
149
|
} : {
|
|
150
150
|
opacity: light ? 0.42 : 0.5
|
|
151
151
|
};
|
|
@@ -110,6 +110,10 @@ const getColorShade = (theme, color) => {
|
|
|
110
110
|
return 'currentColor';
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
if (theme.vars) {
|
|
114
|
+
return theme.vars.palette.LinearProgress[`${color}Bg`];
|
|
115
|
+
}
|
|
116
|
+
|
|
113
117
|
return theme.palette.mode === 'light' ? (0, _system.lighten)(theme.palette[color].main, 0.62) : (0, _system.darken)(theme.palette[color].main, 0.5);
|
|
114
118
|
};
|
|
115
119
|
|
|
@@ -202,7 +206,7 @@ const LinearProgressBar1 = (0, _styled.default)('span', {
|
|
|
202
206
|
top: 0,
|
|
203
207
|
transition: 'transform 0.2s linear',
|
|
204
208
|
transformOrigin: 'left',
|
|
205
|
-
backgroundColor: ownerState.color === 'inherit' ? 'currentColor' : theme.palette[ownerState.color].main
|
|
209
|
+
backgroundColor: ownerState.color === 'inherit' ? 'currentColor' : (theme.vars || theme).palette[ownerState.color].main
|
|
206
210
|
}, ownerState.variant === 'determinate' && {
|
|
207
211
|
transition: `transform .${TRANSITION_DURATION}s linear`
|
|
208
212
|
}, ownerState.variant === 'buffer' && {
|
|
@@ -235,7 +239,7 @@ const LinearProgressBar2 = (0, _styled.default)('span', {
|
|
|
235
239
|
transition: 'transform 0.2s linear',
|
|
236
240
|
transformOrigin: 'left'
|
|
237
241
|
}, ownerState.variant !== 'buffer' && {
|
|
238
|
-
backgroundColor: ownerState.color === 'inherit' ? 'currentColor' : theme.palette[ownerState.color].main
|
|
242
|
+
backgroundColor: ownerState.color === 'inherit' ? 'currentColor' : (theme.vars || theme).palette[ownerState.color].main
|
|
239
243
|
}, ownerState.color === 'inherit' && {
|
|
240
244
|
opacity: 0.3
|
|
241
245
|
}, ownerState.variant === 'buffer' && {
|