@mui/material 5.8.2 → 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.
Files changed (154) hide show
  1. package/Alert/Alert.js +3 -1
  2. package/AppBar/AppBar.js +22 -5
  3. package/Autocomplete/autocompleteClasses.d.ts +1 -1
  4. package/Avatar/Avatar.js +7 -4
  5. package/Badge/Badge.js +2 -2
  6. package/Button/buttonClasses.d.ts +24 -0
  7. package/Button/buttonClasses.js +1 -1
  8. package/CHANGELOG.md +225 -8
  9. package/Checkbox/Checkbox.js +4 -4
  10. package/Chip/Chip.js +31 -30
  11. package/Dialog/Dialog.js +11 -6
  12. package/FilledInput/FilledInput.js +28 -13
  13. package/Grid/Grid.d.ts +73 -52
  14. package/Grid/Grid.js +94 -40
  15. package/Grow/Grow.js +1 -2
  16. package/Hidden/withWidth.js +0 -2
  17. package/InputBase/InputBase.js +2 -2
  18. package/LinearProgress/LinearProgress.js +6 -2
  19. package/Link/Link.js +10 -17
  20. package/Link/getTextDecoration.d.ts +15 -0
  21. package/Link/getTextDecoration.js +29 -0
  22. package/Modal/Modal.d.ts +2 -0
  23. package/Modal/Modal.js +25 -8
  24. package/OutlinedInput/OutlinedInput.js +25 -10
  25. package/Popover/Popover.d.ts +7 -0
  26. package/Popover/index.js +1 -0
  27. package/README.md +13 -12
  28. package/Skeleton/Skeleton.js +8 -3
  29. package/Slider/Slider.d.ts +3 -1
  30. package/Slider/Slider.js +35 -20
  31. package/Snackbar/Snackbar.js +6 -20
  32. package/SnackbarContent/SnackbarContent.js +3 -3
  33. package/SpeedDialAction/SpeedDialAction.js +7 -7
  34. package/Stack/Stack.js +1 -1
  35. package/StepConnector/StepConnector.js +14 -11
  36. package/StepContent/StepContent.js +1 -1
  37. package/StepIcon/StepIcon.js +2 -1
  38. package/Switch/Switch.js +11 -11
  39. package/Tab/Tab.d.ts +0 -1
  40. package/TableCell/TableCell.js +5 -5
  41. package/Tabs/Tabs.js +6 -0
  42. package/Tooltip/Tooltip.js +1 -1
  43. package/index.js +1 -1
  44. package/legacy/Alert/Alert.js +3 -1
  45. package/legacy/AppBar/AppBar.js +23 -4
  46. package/legacy/Avatar/Avatar.js +7 -4
  47. package/legacy/Badge/Badge.js +2 -2
  48. package/legacy/Button/buttonClasses.js +1 -1
  49. package/legacy/Checkbox/Checkbox.js +4 -4
  50. package/legacy/Chip/Chip.js +31 -30
  51. package/legacy/Dialog/Dialog.js +11 -6
  52. package/legacy/FilledInput/FilledInput.js +28 -14
  53. package/legacy/Grid/Grid.js +97 -48
  54. package/legacy/Grow/Grow.js +1 -2
  55. package/legacy/Hidden/withWidth.js +0 -2
  56. package/legacy/InputBase/InputBase.js +2 -2
  57. package/legacy/LinearProgress/LinearProgress.js +6 -2
  58. package/legacy/Link/Link.js +10 -17
  59. package/legacy/Link/getTextDecoration.js +28 -0
  60. package/legacy/Modal/Modal.js +23 -7
  61. package/legacy/OutlinedInput/OutlinedInput.js +21 -9
  62. package/legacy/Popover/index.js +1 -0
  63. package/legacy/Skeleton/Skeleton.js +2 -2
  64. package/legacy/Slider/Slider.js +35 -20
  65. package/legacy/Snackbar/Snackbar.js +6 -21
  66. package/legacy/SnackbarContent/SnackbarContent.js +3 -3
  67. package/legacy/SpeedDialAction/SpeedDialAction.js +7 -7
  68. package/legacy/Stack/Stack.js +2 -1
  69. package/legacy/StepConnector/StepConnector.js +2 -1
  70. package/legacy/StepContent/StepContent.js +1 -1
  71. package/legacy/StepIcon/StepIcon.js +2 -1
  72. package/legacy/Switch/Switch.js +11 -11
  73. package/legacy/TableCell/TableCell.js +5 -5
  74. package/legacy/Tabs/Tabs.js +6 -0
  75. package/legacy/Tooltip/Tooltip.js +1 -1
  76. package/legacy/index.js +1 -1
  77. package/legacy/styles/CssVarsProvider.js +4 -1
  78. package/legacy/styles/experimental_extendTheme.js +113 -18
  79. package/modern/Alert/Alert.js +3 -1
  80. package/modern/AppBar/AppBar.js +22 -5
  81. package/modern/Avatar/Avatar.js +7 -4
  82. package/modern/Badge/Badge.js +2 -2
  83. package/modern/Button/buttonClasses.js +1 -1
  84. package/modern/Checkbox/Checkbox.js +4 -4
  85. package/modern/Chip/Chip.js +31 -30
  86. package/modern/Dialog/Dialog.js +11 -6
  87. package/modern/FilledInput/FilledInput.js +27 -12
  88. package/modern/Grid/Grid.js +94 -40
  89. package/modern/Grow/Grow.js +1 -2
  90. package/modern/Hidden/withWidth.js +0 -2
  91. package/modern/InputBase/InputBase.js +2 -2
  92. package/modern/LinearProgress/LinearProgress.js +6 -2
  93. package/modern/Link/Link.js +10 -17
  94. package/modern/Link/getTextDecoration.js +29 -0
  95. package/modern/Modal/Modal.js +24 -7
  96. package/modern/OutlinedInput/OutlinedInput.js +25 -10
  97. package/modern/Popover/index.js +1 -0
  98. package/modern/Skeleton/Skeleton.js +7 -2
  99. package/modern/Slider/Slider.js +35 -20
  100. package/modern/Snackbar/Snackbar.js +6 -20
  101. package/modern/SnackbarContent/SnackbarContent.js +3 -3
  102. package/modern/SpeedDialAction/SpeedDialAction.js +7 -7
  103. package/modern/Stack/Stack.js +1 -1
  104. package/modern/StepConnector/StepConnector.js +14 -11
  105. package/modern/StepContent/StepContent.js +1 -1
  106. package/modern/StepIcon/StepIcon.js +2 -1
  107. package/modern/Switch/Switch.js +11 -11
  108. package/modern/TableCell/TableCell.js +5 -5
  109. package/modern/Tabs/Tabs.js +6 -0
  110. package/modern/Tooltip/Tooltip.js +1 -1
  111. package/modern/index.js +1 -1
  112. package/modern/styles/CssVarsProvider.js +4 -1
  113. package/modern/styles/experimental_extendTheme.js +114 -18
  114. package/node/Alert/Alert.js +3 -1
  115. package/node/AppBar/AppBar.js +22 -5
  116. package/node/Avatar/Avatar.js +7 -4
  117. package/node/Badge/Badge.js +2 -2
  118. package/node/Button/buttonClasses.js +1 -1
  119. package/node/Checkbox/Checkbox.js +4 -4
  120. package/node/Chip/Chip.js +31 -30
  121. package/node/Dialog/Dialog.js +11 -6
  122. package/node/FilledInput/FilledInput.js +28 -13
  123. package/node/Grid/Grid.js +95 -40
  124. package/node/Grow/Grow.js +1 -2
  125. package/node/Hidden/withWidth.js +0 -3
  126. package/node/InputBase/InputBase.js +2 -2
  127. package/node/LinearProgress/LinearProgress.js +6 -2
  128. package/node/Link/Link.js +12 -20
  129. package/node/Link/getTextDecoration.js +39 -0
  130. package/node/Modal/Modal.js +25 -8
  131. package/node/OutlinedInput/OutlinedInput.js +25 -10
  132. package/node/Popover/index.js +13 -3
  133. package/node/Skeleton/Skeleton.js +7 -2
  134. package/node/Slider/Slider.js +35 -20
  135. package/node/Snackbar/Snackbar.js +6 -18
  136. package/node/SnackbarContent/SnackbarContent.js +3 -3
  137. package/node/SpeedDialAction/SpeedDialAction.js +7 -7
  138. package/node/Stack/Stack.js +1 -1
  139. package/node/StepConnector/StepConnector.js +14 -11
  140. package/node/StepContent/StepContent.js +1 -1
  141. package/node/StepIcon/StepIcon.js +2 -1
  142. package/node/Switch/Switch.js +11 -11
  143. package/node/TableCell/TableCell.js +5 -5
  144. package/node/Tabs/Tabs.js +6 -0
  145. package/node/Tooltip/Tooltip.js +1 -1
  146. package/node/index.js +1 -1
  147. package/node/styles/CssVarsProvider.js +4 -1
  148. package/node/styles/experimental_extendTheme.js +112 -17
  149. package/package.json +6 -7
  150. package/styles/CssVarsProvider.js +4 -1
  151. package/styles/createPalette.d.ts +65 -2
  152. package/styles/experimental_extendTheme.js +114 -18
  153. package/umd/material-ui.development.js +767 -414
  154. package/umd/material-ui.production.min.js +27 -22
@@ -19,6 +19,12 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
19
19
  root: ['root', "color".concat(capitalize(color)), "position".concat(capitalize(position))]
20
20
  };
21
21
  return composeClasses(slots, getAppBarUtilityClass, classes);
22
+ }; // var2 is the fallback.
23
+ // Ex. var1: 'var(--a)', var2: 'var(--b)'; return: 'var(--a, var(--b))'
24
+
25
+
26
+ var joinVars = function joinVars(var1, var2) {
27
+ return "".concat(var1 == null ? void 0 : var1.replace(')', ''), ", ").concat(var2, ")");
22
28
  };
23
29
 
24
30
  var AppBarRoot = styled(Paper, {
@@ -41,7 +47,7 @@ var AppBarRoot = styled(Paper, {
41
47
  flexShrink: 0
42
48
  }, ownerState.position === 'fixed' && {
43
49
  position: 'fixed',
44
- zIndex: theme.zIndex.appBar,
50
+ zIndex: (theme.vars || theme).zIndex.appBar,
45
51
  top: 0,
46
52
  left: 'auto',
47
53
  right: 0,
@@ -51,14 +57,14 @@ var AppBarRoot = styled(Paper, {
51
57
  }
52
58
  }, ownerState.position === 'absolute' && {
53
59
  position: 'absolute',
54
- zIndex: theme.zIndex.appBar,
60
+ zIndex: (theme.vars || theme).zIndex.appBar,
55
61
  top: 0,
56
62
  left: 'auto',
57
63
  right: 0
58
64
  }, ownerState.position === 'sticky' && {
59
65
  // ⚠️ sticky is not supported by IE11.
60
66
  position: 'sticky',
61
- zIndex: theme.zIndex.appBar,
67
+ zIndex: (theme.vars || theme).zIndex.appBar,
62
68
  top: 0,
63
69
  left: 'auto',
64
70
  right: 0
@@ -66,7 +72,7 @@ var AppBarRoot = styled(Paper, {
66
72
  position: 'static'
67
73
  }, ownerState.position === 'relative' && {
68
74
  position: 'relative'
69
- }, ownerState.color === 'default' && {
75
+ }, !theme.vars && _extends({}, ownerState.color === 'default' && {
70
76
  backgroundColor: backgroundColorDefault,
71
77
  color: theme.palette.getContrastText(backgroundColorDefault)
72
78
  }, ownerState.color && ownerState.color !== 'default' && ownerState.color !== 'inherit' && ownerState.color !== 'transparent' && {
@@ -82,6 +88,19 @@ var AppBarRoot = styled(Paper, {
82
88
  color: 'inherit'
83
89
  }, theme.palette.mode === 'dark' && {
84
90
  backgroundImage: 'none'
91
+ })), theme.vars && _extends({}, ownerState.color === 'default' && {
92
+ '--AppBar-background': ownerState.enableColorOnDark ? theme.vars.palette.AppBar.defaultBg : joinVars(theme.vars.palette.AppBar.darkBg, theme.vars.palette.AppBar.defaultBg),
93
+ '--AppBar-color': ownerState.enableColorOnDark ? theme.vars.palette.text.primary : joinVars(theme.vars.palette.AppBar.darkColor, theme.vars.palette.text.primary)
94
+ }, ownerState.color && !ownerState.color.match(/^(default|inherit|transparent)$/) && {
95
+ '--AppBar-background': ownerState.enableColorOnDark ? theme.vars.palette[ownerState.color].main : joinVars(theme.vars.palette.AppBar.darkBg, theme.vars.palette[ownerState.color].main),
96
+ '--AppBar-color': ownerState.enableColorOnDark ? theme.vars.palette[ownerState.color].contrastText : joinVars(theme.vars.palette.AppBar.darkColor, theme.vars.palette[ownerState.color].contrastText)
97
+ }, {
98
+ backgroundColor: 'var(--AppBar-background)',
99
+ color: ownerState.color === 'inherit' ? 'inherit' : 'var(--AppBar-color)'
100
+ }, ownerState.color === 'transparent' && {
101
+ backgroundImage: 'none',
102
+ backgroundColor: 'transparent',
103
+ color: 'inherit'
85
104
  }));
86
105
  });
87
106
  var AppBar = /*#__PURE__*/React.forwardRef(function AppBar(inProps, ref) {
@@ -47,13 +47,16 @@ var AvatarRoot = styled('div', {
47
47
  overflow: 'hidden',
48
48
  userSelect: 'none'
49
49
  }, ownerState.variant === 'rounded' && {
50
- borderRadius: theme.shape.borderRadius
50
+ borderRadius: (theme.vars || theme).shape.borderRadius
51
51
  }, ownerState.variant === 'square' && {
52
52
  borderRadius: 0
53
- }, ownerState.colorDefault && {
54
- color: theme.palette.background.default,
53
+ }, ownerState.colorDefault && _extends({
54
+ color: (theme.vars || theme).palette.background.default
55
+ }, theme.vars ? {
56
+ backgroundColor: theme.vars.palette.Avatar.defaultBg
57
+ } : {
55
58
  backgroundColor: theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]
56
- });
59
+ }));
57
60
  });
58
61
  var AvatarImg = styled('img', {
59
62
  name: 'MuiAvatar',
@@ -325,8 +325,8 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes
325
325
  * @default {}
326
326
  */
327
327
  componentsProps: PropTypes.shape({
328
- badge: PropTypes.object,
329
- root: PropTypes.object
328
+ badge: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
329
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
330
330
  }),
331
331
 
332
332
  /**
@@ -2,5 +2,5 @@ import { generateUtilityClass, generateUtilityClasses } from '@mui/base';
2
2
  export function getButtonUtilityClass(slot) {
3
3
  return generateUtilityClass('MuiButton', slot);
4
4
  }
5
- var buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge']);
5
+ var buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'textSuccess', 'textError', 'textInfo', 'textWarning', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'outlinedSuccess', 'outlinedError', 'outlinedInfo', 'outlinedWarning', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'containedSuccess', 'containedError', 'containedInfo', 'containedWarning', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge']);
6
6
  export default buttonClasses;
@@ -43,19 +43,19 @@ var CheckboxRoot = styled(SwitchBase, {
43
43
  var theme = _ref.theme,
44
44
  ownerState = _ref.ownerState;
45
45
  return _extends({
46
- color: theme.palette.text.secondary
46
+ color: (theme.vars || theme).palette.text.secondary
47
47
  }, !ownerState.disableRipple && {
48
48
  '&:hover': {
49
- backgroundColor: alpha(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
49
+ backgroundColor: theme.vars ? "rgba(".concat(ownerState.color === 'default' ? theme.vars.palette.action.activeChannel : theme.vars.palette.primary.mainChannel, " / ").concat(theme.vars.palette.action.hoverOpacity, ")") : alpha(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
50
50
  // Reset on touch devices, it doesn't add specificity
51
51
  '@media (hover: none)': {
52
52
  backgroundColor: 'transparent'
53
53
  }
54
54
  }
55
55
  }, ownerState.color !== 'default' && (_ref2 = {}, _defineProperty(_ref2, "&.".concat(checkboxClasses.checked, ", &.").concat(checkboxClasses.indeterminate), {
56
- color: theme.palette[ownerState.color].main
56
+ color: (theme.vars || theme).palette[ownerState.color].main
57
57
  }), _defineProperty(_ref2, "&.".concat(checkboxClasses.disabled), {
58
- color: theme.palette.action.disabled
58
+ color: (theme.vars || theme).palette.action.disabled
59
59
  }), _ref2));
60
60
  });
61
61
 
@@ -53,6 +53,7 @@ var ChipRoot = styled('div', {
53
53
  var theme = _ref11.theme,
54
54
  ownerState = _ref11.ownerState;
55
55
  var deleteIconColor = alpha(theme.palette.text.primary, 0.26);
56
+ var textColor = theme.palette.mode === 'light' ? theme.palette.grey[700] : theme.palette.grey[300];
56
57
  return _extends((_extends2 = {
57
58
  maxWidth: '100%',
58
59
  fontFamily: theme.typography.fontFamily,
@@ -61,8 +62,8 @@ var ChipRoot = styled('div', {
61
62
  alignItems: 'center',
62
63
  justifyContent: 'center',
63
64
  height: 32,
64
- color: theme.palette.text.primary,
65
- backgroundColor: theme.palette.action.selected,
65
+ color: (theme.vars || theme).palette.text.primary,
66
+ backgroundColor: (theme.vars || theme).palette.action.selected,
66
67
  borderRadius: 32 / 2,
67
68
  whiteSpace: 'nowrap',
68
69
  transition: theme.transitions.create(['background-color', 'box-shadow']),
@@ -78,21 +79,21 @@ var ChipRoot = styled('div', {
78
79
  verticalAlign: 'middle',
79
80
  boxSizing: 'border-box'
80
81
  }, _defineProperty(_extends2, "&.".concat(chipClasses.disabled), {
81
- opacity: theme.palette.action.disabledOpacity,
82
+ opacity: (theme.vars || theme).palette.action.disabledOpacity,
82
83
  pointerEvents: 'none'
83
84
  }), _defineProperty(_extends2, "& .".concat(chipClasses.avatar), {
84
85
  marginLeft: 5,
85
86
  marginRight: -6,
86
87
  width: 24,
87
88
  height: 24,
88
- color: theme.palette.mode === 'light' ? theme.palette.grey[700] : theme.palette.grey[300],
89
+ color: theme.vars ? theme.vars.palette.Chip.defaultAvatarColor : textColor,
89
90
  fontSize: theme.typography.pxToRem(12)
90
91
  }), _defineProperty(_extends2, "& .".concat(chipClasses.avatarColorPrimary), {
91
- color: theme.palette.primary.contrastText,
92
- backgroundColor: theme.palette.primary.dark
92
+ color: (theme.vars || theme).palette.primary.contrastText,
93
+ backgroundColor: (theme.vars || theme).palette.primary.dark
93
94
  }), _defineProperty(_extends2, "& .".concat(chipClasses.avatarColorSecondary), {
94
- color: theme.palette.secondary.contrastText,
95
- backgroundColor: theme.palette.secondary.dark
95
+ color: (theme.vars || theme).palette.secondary.contrastText,
96
+ backgroundColor: (theme.vars || theme).palette.secondary.dark
96
97
  }), _defineProperty(_extends2, "& .".concat(chipClasses.avatarSmall), {
97
98
  marginLeft: 4,
98
99
  marginRight: -4,
@@ -100,7 +101,7 @@ var ChipRoot = styled('div', {
100
101
  height: 18,
101
102
  fontSize: theme.typography.pxToRem(10)
102
103
  }), _defineProperty(_extends2, "& .".concat(chipClasses.icon), _extends({
103
- color: theme.palette.mode === 'light' ? theme.palette.grey[700] : theme.palette.grey[300],
104
+ color: theme.vars ? theme.vars.palette.Chip.defaultIconColor : textColor,
104
105
  marginLeft: 5,
105
106
  marginRight: -6
106
107
  }, ownerState.size === 'small' && {
@@ -111,31 +112,31 @@ var ChipRoot = styled('div', {
111
112
  color: 'inherit'
112
113
  })), _defineProperty(_extends2, "& .".concat(chipClasses.deleteIcon), _extends({
113
114
  WebkitTapHighlightColor: 'transparent',
114
- color: deleteIconColor,
115
+ color: theme.vars ? "rgba(".concat(theme.vars.palette.text.primaryChannel, " / 0.26)") : deleteIconColor,
115
116
  fontSize: 22,
116
117
  cursor: 'pointer',
117
118
  margin: '0 5px 0 -6px',
118
119
  '&:hover': {
119
- color: alpha(deleteIconColor, 0.4)
120
+ color: theme.vars ? "rgba(".concat(theme.vars.palette.text.primaryChannel, " / 0.4)") : alpha(deleteIconColor, 0.4)
120
121
  }
121
122
  }, ownerState.size === 'small' && {
122
123
  fontSize: 16,
123
124
  marginRight: 4,
124
125
  marginLeft: -4
125
126
  }, ownerState.color !== 'default' && {
126
- color: alpha(theme.palette[ownerState.color].contrastText, 0.7),
127
+ color: theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].contrastTextChannel, " / 0.7)") : alpha(theme.palette[ownerState.color].contrastText, 0.7),
127
128
  '&:hover, &:active': {
128
- color: theme.palette[ownerState.color].contrastText
129
+ color: (theme.vars || theme).palette[ownerState.color].contrastText
129
130
  }
130
131
  })), _extends2), ownerState.size === 'small' && {
131
132
  height: 24
132
133
  }, ownerState.color !== 'default' && {
133
- backgroundColor: theme.palette[ownerState.color].main,
134
- color: theme.palette[ownerState.color].contrastText
134
+ backgroundColor: (theme.vars || theme).palette[ownerState.color].main,
135
+ color: (theme.vars || theme).palette[ownerState.color].contrastText
135
136
  }, ownerState.onDelete && _defineProperty({}, "&.".concat(chipClasses.focusVisible), {
136
- backgroundColor: alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
137
+ backgroundColor: theme.vars ? "rgba(".concat(theme.vars.palette.action.selectedChannel, " / calc(").concat(theme.vars.palette.action.selectedOpacity + theme.vars.palette.action.focusOpacity, "))") : alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
137
138
  }), ownerState.onDelete && ownerState.color !== 'default' && _defineProperty({}, "&.".concat(chipClasses.focusVisible), {
138
- backgroundColor: theme.palette[ownerState.color].dark
139
+ backgroundColor: (theme.vars || theme).palette[ownerState.color].dark
139
140
  }));
140
141
  }, function (_ref14) {
141
142
  var _ref15;
@@ -147,14 +148,14 @@ var ChipRoot = styled('div', {
147
148
  WebkitTapHighlightColor: 'transparent',
148
149
  cursor: 'pointer',
149
150
  '&:hover': {
150
- backgroundColor: alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)
151
+ backgroundColor: theme.vars ? "rgba(".concat(theme.vars.palette.action.selectedChannel, " / calc(").concat(theme.vars.palette.action.selectedOpacity + theme.vars.palette.action.hoverOpacity, "))") : alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)
151
152
  }
152
153
  }, _defineProperty(_ref15, "&.".concat(chipClasses.focusVisible), {
153
- backgroundColor: alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
154
+ backgroundColor: theme.vars ? "rgba(".concat(theme.vars.palette.action.selectedChannel, " / calc(").concat(theme.vars.palette.action.selectedOpacity + theme.vars.palette.action.focusOpacity, "))") : alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
154
155
  }), _defineProperty(_ref15, '&:active', {
155
- boxShadow: theme.shadows[1]
156
+ boxShadow: (theme.vars || theme).shadows[1]
156
157
  }), _ref15), ownerState.clickable && ownerState.color !== 'default' && _defineProperty({}, "&:hover, &.".concat(chipClasses.focusVisible), {
157
- backgroundColor: theme.palette[ownerState.color].dark
158
+ backgroundColor: (theme.vars || theme).palette[ownerState.color].dark
158
159
  }));
159
160
  }, function (_ref17) {
160
161
  var _ref18, _ref19;
@@ -163,11 +164,11 @@ var ChipRoot = styled('div', {
163
164
  ownerState = _ref17.ownerState;
164
165
  return _extends({}, ownerState.variant === 'outlined' && (_ref18 = {
165
166
  backgroundColor: 'transparent',
166
- border: "1px solid ".concat(theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[700])
167
+ border: theme.vars ? "1px solid ".concat(theme.vars.palette.Chip.defaultBorder) : "1px solid ".concat(theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[700])
167
168
  }, _defineProperty(_ref18, "&.".concat(chipClasses.clickable, ":hover"), {
168
- backgroundColor: theme.palette.action.hover
169
+ backgroundColor: (theme.vars || theme).palette.action.hover
169
170
  }), _defineProperty(_ref18, "&.".concat(chipClasses.focusVisible), {
170
- backgroundColor: theme.palette.action.focus
171
+ backgroundColor: (theme.vars || theme).palette.action.focus
171
172
  }), _defineProperty(_ref18, "& .".concat(chipClasses.avatar), {
172
173
  marginLeft: 4
173
174
  }), _defineProperty(_ref18, "& .".concat(chipClasses.avatarSmall), {
@@ -181,16 +182,16 @@ var ChipRoot = styled('div', {
181
182
  }), _defineProperty(_ref18, "& .".concat(chipClasses.deleteIconSmall), {
182
183
  marginRight: 3
183
184
  }), _ref18), ownerState.variant === 'outlined' && ownerState.color !== 'default' && (_ref19 = {
184
- color: theme.palette[ownerState.color].main,
185
- border: "1px solid ".concat(alpha(theme.palette[ownerState.color].main, 0.7))
185
+ color: (theme.vars || theme).palette[ownerState.color].main,
186
+ border: "1px solid ".concat(theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / 0.7)") : alpha(theme.palette[ownerState.color].main, 0.7))
186
187
  }, _defineProperty(_ref19, "&.".concat(chipClasses.clickable, ":hover"), {
187
- backgroundColor: alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity)
188
+ 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)
188
189
  }), _defineProperty(_ref19, "&.".concat(chipClasses.focusVisible), {
189
- backgroundColor: alpha(theme.palette[ownerState.color].main, theme.palette.action.focusOpacity)
190
+ backgroundColor: theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / ").concat(theme.vars.palette.action.focusOpacity, ")") : alpha(theme.palette[ownerState.color].main, theme.palette.action.focusOpacity)
190
191
  }), _defineProperty(_ref19, "& .".concat(chipClasses.deleteIcon), {
191
- color: alpha(theme.palette[ownerState.color].main, 0.7),
192
+ color: theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / 0.7)") : alpha(theme.palette[ownerState.color].main, 0.7),
192
193
  '&:hover, &:active': {
193
- color: theme.palette[ownerState.color].main
194
+ color: (theme.vars || theme).palette[ownerState.color].main
194
195
  }
195
196
  }), _ref19));
196
197
  });
@@ -121,7 +121,7 @@ var DialogPaper = styled(Paper, {
121
121
  maxWidth: theme.breakpoints.unit === 'px' ? Math.max(theme.breakpoints.values.xs, 444) : "".concat(theme.breakpoints.values.xs).concat(theme.breakpoints.unit)
122
122
  }, "&.".concat(dialogClasses.paperScrollBody), _defineProperty({}, theme.breakpoints.down(Math.max(theme.breakpoints.values.xs, 444) + 32 * 2), {
123
123
  maxWidth: 'calc(100% - 64px)'
124
- })), ownerState.maxWidth !== 'xs' && _defineProperty({
124
+ })), ownerState.maxWidth && ownerState.maxWidth !== 'xs' && _defineProperty({
125
125
  maxWidth: "".concat(theme.breakpoints.values[ownerState.maxWidth]).concat(theme.breakpoints.unit)
126
126
  }, "&.".concat(dialogClasses.paperScrollBody), _defineProperty({}, theme.breakpoints.down(theme.breakpoints.values[ownerState.maxWidth] + 32 * 2), {
127
127
  maxWidth: 'calc(100% - 64px)'
@@ -226,12 +226,16 @@ var Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
226
226
  }, [ariaLabelledby]);
227
227
  return /*#__PURE__*/_jsx(DialogRoot, _extends({
228
228
  className: clsx(classes.root, className),
229
- BackdropProps: _extends({
230
- transitionDuration: transitionDuration,
231
- as: BackdropComponent
232
- }, BackdropProps),
233
229
  closeAfterTransition: true,
234
- BackdropComponent: DialogBackdrop,
230
+ components: {
231
+ Backdrop: DialogBackdrop
232
+ },
233
+ componentsProps: {
234
+ backdrop: _extends({
235
+ transitionDuration: transitionDuration,
236
+ as: BackdropComponent
237
+ }, BackdropProps)
238
+ },
235
239
  disableEscapeKeyDown: disableEscapeKeyDown,
236
240
  onClose: onClose,
237
241
  open: open,
@@ -287,6 +291,7 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes
287
291
 
288
292
  /**
289
293
  * A backdrop component. This prop enables custom backdrop rendering.
294
+ * @deprecated Use `components.Backdrop` instead.
290
295
  * @default styled(Backdrop, {
291
296
  * name: 'MuiModal',
292
297
  * slot: 'Backdrop',
@@ -35,36 +35,38 @@ var FilledInputRoot = styled(InputBaseRoot, {
35
35
  return [].concat(_toConsumableArray(inputBaseRootOverridesResolver(props, styles)), [!ownerState.disableUnderline && styles.underline]);
36
36
  }
37
37
  })(function (_ref) {
38
- var _extends2, _theme$palette, _ref2;
38
+ var _extends2, _palette, _ref2;
39
39
 
40
40
  var theme = _ref.theme,
41
41
  ownerState = _ref.ownerState;
42
42
  var light = theme.palette.mode === 'light';
43
43
  var bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';
44
44
  var backgroundColor = light ? 'rgba(0, 0, 0, 0.06)' : 'rgba(255, 255, 255, 0.09)';
45
+ var hoverBackground = light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.13)';
46
+ var disabledBackground = light ? 'rgba(0, 0, 0, 0.12)' : 'rgba(255, 255, 255, 0.12)';
45
47
  return _extends((_extends2 = {
46
48
  position: 'relative',
47
- backgroundColor: backgroundColor,
48
- borderTopLeftRadius: theme.shape.borderRadius,
49
- borderTopRightRadius: theme.shape.borderRadius,
49
+ backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor,
50
+ borderTopLeftRadius: (theme.vars || theme).shape.borderRadius,
51
+ borderTopRightRadius: (theme.vars || theme).shape.borderRadius,
50
52
  transition: theme.transitions.create('background-color', {
51
53
  duration: theme.transitions.duration.shorter,
52
54
  easing: theme.transitions.easing.easeOut
53
55
  }),
54
56
  '&:hover': {
55
- backgroundColor: light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.13)',
57
+ backgroundColor: theme.vars ? theme.vars.palette.FilledInput.hoverBg : hoverBackground,
56
58
  // Reset on touch devices, it doesn't add specificity
57
59
  '@media (hover: none)': {
58
- backgroundColor: backgroundColor
60
+ backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor
59
61
  }
60
62
  }
61
63
  }, _defineProperty(_extends2, "&.".concat(filledInputClasses.focused), {
62
- backgroundColor: backgroundColor
64
+ backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor
63
65
  }), _defineProperty(_extends2, "&.".concat(filledInputClasses.disabled), {
64
- backgroundColor: light ? 'rgba(0, 0, 0, 0.12)' : 'rgba(255, 255, 255, 0.12)'
66
+ backgroundColor: theme.vars ? theme.vars.palette.FilledInput.disabledBg : disabledBackground
65
67
  }), _extends2), !ownerState.disableUnderline && (_ref2 = {
66
68
  '&:after': {
67
- borderBottom: "2px solid ".concat((_theme$palette = theme.palette[ownerState.color || 'primary']) == null ? void 0 : _theme$palette.main),
69
+ borderBottom: "2px solid ".concat((_palette = (theme.vars || theme).palette[ownerState.color || 'primary']) == null ? void 0 : _palette.main),
68
70
  left: 0,
69
71
  bottom: 0,
70
72
  // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
@@ -84,11 +86,11 @@ var FilledInputRoot = styled(InputBaseRoot, {
84
86
  // See https://github.com/mui/material-ui/issues/31766
85
87
  transform: 'scaleX(1) translateX(0)'
86
88
  }), _defineProperty(_ref2, "&.".concat(filledInputClasses.error, ":after"), {
87
- borderBottomColor: theme.palette.error.main,
89
+ borderBottomColor: (theme.vars || theme).palette.error.main,
88
90
  transform: 'scaleX(1)' // error is always underlined in red
89
91
 
90
92
  }), _defineProperty(_ref2, '&:before', {
91
- borderBottom: "1px solid ".concat(bottomLineColor),
93
+ borderBottom: "1px solid ".concat(theme.vars ? "rgba(".concat(theme.vars.palette.common.onBackgroundChannel, " / ").concat(theme.vars.opacity.inputTouchBottomLine, ")") : bottomLineColor),
92
94
  left: 0,
93
95
  bottom: 0,
94
96
  // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
@@ -101,7 +103,7 @@ var FilledInputRoot = styled(InputBaseRoot, {
101
103
  pointerEvents: 'none' // Transparent to the hover style.
102
104
 
103
105
  }), _defineProperty(_ref2, "&:hover:not(.".concat(filledInputClasses.disabled, "):before"), {
104
- borderBottom: "1px solid ".concat(theme.palette.text.primary)
106
+ borderBottom: "1px solid ".concat((theme.vars || theme).palette.text.primary)
105
107
  }), _defineProperty(_ref2, "&.".concat(filledInputClasses.disabled, ":before"), {
106
108
  borderBottomStyle: 'dotted'
107
109
  }), _ref2), ownerState.startAdornment && {
@@ -129,7 +131,8 @@ var FilledInputInput = styled(InputBaseInput, {
129
131
  paddingTop: 25,
130
132
  paddingRight: 12,
131
133
  paddingBottom: 8,
132
- paddingLeft: 12,
134
+ paddingLeft: 12
135
+ }, !theme.vars && {
133
136
  '&:-webkit-autofill': {
134
137
  WebkitBoxShadow: theme.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset',
135
138
  WebkitTextFillColor: theme.palette.mode === 'light' ? null : '#fff',
@@ -137,7 +140,18 @@ var FilledInputInput = styled(InputBaseInput, {
137
140
  borderTopLeftRadius: 'inherit',
138
141
  borderTopRightRadius: 'inherit'
139
142
  }
140
- }, ownerState.size === 'small' && {
143
+ }, theme.vars && _defineProperty({
144
+ '&:-webkit-autofill': {
145
+ borderTopLeftRadius: 'inherit',
146
+ borderTopRightRadius: 'inherit'
147
+ }
148
+ }, theme.getColorSchemeSelector('dark'), {
149
+ '&:-webkit-autofill': {
150
+ WebkitBoxShadow: '0 0 0 100px #266798 inset',
151
+ WebkitTextFillColor: '#fff',
152
+ caretColor: '#fff'
153
+ }
154
+ }), ownerState.size === 'small' && {
141
155
  paddingTop: 21,
142
156
  paddingBottom: 4
143
157
  }, ownerState.hiddenLabel && {