@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
@@ -3,7 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
3
3
  const _excluded = ["colorSchemes"],
4
4
  _excluded2 = ["palette"];
5
5
  import { deepmerge } from '@mui/utils';
6
- import { colorChannel } from '@mui/system';
6
+ import { colorChannel, alpha, darken, lighten, emphasize } from '@mui/system';
7
7
  import createThemeWithoutVars from './createTheme';
8
8
  import { getOverlayAlpha } from '../Paper/Paper';
9
9
  const defaultDarkOverlays = [...Array(25)].map((_, index) => {
@@ -14,6 +14,19 @@ const defaultDarkOverlays = [...Array(25)].map((_, index) => {
14
14
  const overlay = getOverlayAlpha(index);
15
15
  return `linear-gradient(rgba(255 255 255 / ${overlay}), rgba(255 255 255 / ${overlay}))`;
16
16
  });
17
+
18
+ function assignNode(obj, keys) {
19
+ keys.forEach(k => {
20
+ if (!obj[k]) {
21
+ obj[k] = {};
22
+ }
23
+ });
24
+ }
25
+
26
+ function setColor(obj, key, defaultValue) {
27
+ obj[key] = obj[key] || defaultValue;
28
+ }
29
+
17
30
  export default function extendTheme(options = {}, ...args) {
18
31
  const {
19
32
  colorSchemes: colorSchemesInput = {}
@@ -41,16 +54,20 @@ export default function extendTheme(options = {}, ...args) {
41
54
  light: _extends({}, colorSchemesInput.light, {
42
55
  palette: lightPalette,
43
56
  opacity: _extends({
44
- placeholder: 0.42,
45
- inputTouchBottomLine: 0.42
57
+ inputPlaceholder: 0.42,
58
+ inputTouchBottomLine: 0.42,
59
+ switchTrackDisabled: 0.12,
60
+ switchTrack: 0.38
46
61
  }, colorSchemesInput.light?.opacity),
47
62
  overlays: colorSchemesInput.light?.overlays || []
48
63
  }),
49
64
  dark: _extends({}, colorSchemesInput.dark, {
50
65
  palette: darkPalette,
51
66
  opacity: _extends({
52
- placeholder: 0.5,
53
- inputTouchBottomLine: 0.7
67
+ inputPlaceholder: 0.5,
68
+ inputTouchBottomLine: 0.7,
69
+ switchTrackDisabled: 0.2,
70
+ switchTrack: 0.3
54
71
  }, colorSchemesInput.dark?.opacity),
55
72
  overlays: colorSchemesInput.dark?.overlays || defaultDarkOverlays
56
73
  })
@@ -60,23 +77,98 @@ export default function extendTheme(options = {}, ...args) {
60
77
  Object.keys(theme.colorSchemes).forEach(key => {
61
78
  const palette = theme.colorSchemes[key].palette; // attach black & white channels to common node
62
79
 
63
- if (key === 'dark') {
64
- palette.common.background = palette.common.background || '#000';
65
- palette.common.onBackground = palette.common.onBackground || '#fff';
80
+ if (key === 'light') {
81
+ setColor(palette.common, 'background', '#fff');
82
+ setColor(palette.common, 'onBackground', '#000');
83
+ } else {
84
+ setColor(palette.common, 'background', '#000');
85
+ setColor(palette.common, 'onBackground', '#fff');
86
+ } // assign component variables
87
+
88
+
89
+ assignNode(palette, ['AppBar', 'Avatar', 'Chip', 'FilledInput', 'LinearProgress', 'Skeleton', 'Slider', 'SnackbarContent', 'SpeedDialAction', 'StepConnector', 'StepContent', 'Switch', 'TableCell', 'Tooltip']);
90
+
91
+ if (key === 'light') {
92
+ setColor(palette.AppBar, 'defaultBg', 'var(--mui-palette-grey-100)');
93
+ setColor(palette.Avatar, 'defaultBg', 'var(--mui-palette-grey-400)');
94
+ setColor(palette.Chip, 'defaultBorder', 'var(--mui-palette-grey-400)');
95
+ setColor(palette.Chip, 'defaultAvatarColor', 'var(--mui-palette-grey-700)');
96
+ setColor(palette.Chip, 'defaultIconColor', 'var(--mui-palette-grey-700)');
97
+ setColor(palette.FilledInput, 'bg', 'rgba(0, 0, 0, 0.06)');
98
+ setColor(palette.FilledInput, 'hoverBg', 'rgba(0, 0, 0, 0.09)');
99
+ setColor(palette.FilledInput, 'disabledBg', 'rgba(0, 0, 0, 0.12)');
100
+ setColor(palette.LinearProgress, 'primaryBg', lighten(palette.primary.main, 0.62));
101
+ setColor(palette.LinearProgress, 'secondaryBg', lighten(palette.secondary.main, 0.62));
102
+ setColor(palette.LinearProgress, 'errorBg', lighten(palette.error.main, 0.62));
103
+ setColor(palette.LinearProgress, 'infoBg', lighten(palette.info.main, 0.62));
104
+ setColor(palette.LinearProgress, 'successBg', lighten(palette.success.main, 0.62));
105
+ setColor(palette.LinearProgress, 'warningBg', lighten(palette.warning.main, 0.62));
106
+ setColor(palette.Skeleton, 'bg', 'rgba(var(--mui-palette-text-primaryChannel) / 0.11)');
107
+ setColor(palette.Slider, 'primaryTrack', lighten(palette.primary.main, 0.62));
108
+ setColor(palette.Slider, 'secondaryTrack', lighten(palette.secondary.main, 0.62));
109
+ setColor(palette.Slider, 'errorTrack', lighten(palette.error.main, 0.62));
110
+ setColor(palette.Slider, 'infoTrack', lighten(palette.info.main, 0.62));
111
+ setColor(palette.Slider, 'successTrack', lighten(palette.success.main, 0.62));
112
+ setColor(palette.Slider, 'warningTrack', lighten(palette.warning.main, 0.62));
113
+ setColor(palette.SnackbarContent, 'bg', emphasize(palette.background.default, 0.8));
114
+ setColor(palette.SpeedDialAction, 'fabHoverBg', emphasize(palette.background.paper, 0.15));
115
+ setColor(palette.StepConnector, 'border', 'var(--mui-palette-grey-400)');
116
+ setColor(palette.StepContent, 'border', 'var(--mui-palette-grey-400)');
117
+ setColor(palette.Switch, 'defaultColor', 'var(--mui-palette-common-white)');
118
+ setColor(palette.Switch, 'defaultDisabledColor', 'var(--mui-palette-grey-100)');
119
+ setColor(palette.Switch, 'primaryDisabledColor', lighten(palette.primary.main, 0.62));
120
+ setColor(palette.Switch, 'secondaryDisabledColor', lighten(palette.secondary.main, 0.62));
121
+ setColor(palette.Switch, 'errorDisabledColor', lighten(palette.error.main, 0.62));
122
+ setColor(palette.Switch, 'infoDisabledColor', lighten(palette.info.main, 0.62));
123
+ setColor(palette.Switch, 'successDisabledColor', lighten(palette.success.main, 0.62));
124
+ setColor(palette.Switch, 'warningDisabledColor', lighten(palette.warning.main, 0.62));
125
+ setColor(palette.TableCell, 'border', lighten(alpha(palette.divider, 1), 0.88));
126
+ setColor(palette.Tooltip, 'bg', alpha(palette.grey[700], 0.92));
66
127
  } else {
67
- palette.common.background = palette.common.background || '#fff';
68
- palette.common.onBackground = palette.common.onBackground || '#000';
128
+ setColor(palette.AppBar, 'defaultBg', 'var(--mui-palette-grey-900)');
129
+ setColor(palette.AppBar, 'darkBg', 'var(--mui-palette-background-paper)'); // specific for dark mode
130
+
131
+ setColor(palette.AppBar, 'darkColor', 'var(--mui-palette-text-primary)'); // specific for dark mode
132
+
133
+ setColor(palette.Avatar, 'defaultBg', 'var(--mui-palette-grey-600)');
134
+ setColor(palette.Chip, 'defaultBorder', 'var(--mui-palette-grey-700)');
135
+ setColor(palette.Chip, 'defaultAvatarColor', 'var(--mui-palette-grey-300)');
136
+ setColor(palette.Chip, 'defaultIconColor', 'var(--mui-palette-grey-300)');
137
+ setColor(palette.FilledInput, 'bg', 'rgba(255, 255, 255, 0.09)');
138
+ setColor(palette.FilledInput, 'hoverBg', 'rgba(255, 255, 255, 0.13)');
139
+ setColor(palette.FilledInput, 'disabledBg', 'rgba(255, 255, 255, 0.12)');
140
+ setColor(palette.LinearProgress, 'primaryBg', darken(palette.primary.main, 0.5));
141
+ setColor(palette.LinearProgress, 'secondaryBg', darken(palette.secondary.main, 0.5));
142
+ setColor(palette.LinearProgress, 'errorBg', darken(palette.error.main, 0.5));
143
+ setColor(palette.LinearProgress, 'infoBg', darken(palette.info.main, 0.5));
144
+ setColor(palette.LinearProgress, 'successBg', darken(palette.success.main, 0.5));
145
+ setColor(palette.LinearProgress, 'warningBg', darken(palette.warning.main, 0.5));
146
+ setColor(palette.Skeleton, 'bg', 'rgba(var(--mui-palette-text-primaryChannel) / 0.13)');
147
+ setColor(palette.Slider, 'primaryTrack', darken(palette.primary.main, 0.5));
148
+ setColor(palette.Slider, 'secondaryTrack', darken(palette.secondary.main, 0.5));
149
+ setColor(palette.Slider, 'errorTrack', darken(palette.error.main, 0.5));
150
+ setColor(palette.Slider, 'infoTrack', darken(palette.info.main, 0.5));
151
+ setColor(palette.Slider, 'successTrack', darken(palette.success.main, 0.5));
152
+ setColor(palette.Slider, 'warningTrack', darken(palette.warning.main, 0.5));
153
+ setColor(palette.SnackbarContent, 'bg', emphasize(palette.background.default, 0.98));
154
+ setColor(palette.SpeedDialAction, 'fabHoverBg', emphasize(palette.background.paper, 0.15));
155
+ setColor(palette.StepConnector, 'border', 'var(--mui-palette-grey-600)');
156
+ setColor(palette.StepContent, 'border', 'var(--mui-palette-grey-600)');
157
+ setColor(palette.Switch, 'defaultColor', 'var(--mui-palette-grey-300)');
158
+ setColor(palette.Switch, 'defaultDisabledColor', 'var(--mui-palette-grey-600)');
159
+ setColor(palette.Switch, 'primaryDisabledColor', darken(palette.primary.main, 0.55));
160
+ setColor(palette.Switch, 'secondaryDisabledColor', darken(palette.secondary.main, 0.55));
161
+ setColor(palette.Switch, 'errorDisabledColor', darken(palette.error.main, 0.55));
162
+ setColor(palette.Switch, 'infoDisabledColor', darken(palette.info.main, 0.55));
163
+ setColor(palette.Switch, 'successDisabledColor', darken(palette.success.main, 0.55));
164
+ setColor(palette.Switch, 'warningDisabledColor', darken(palette.warning.main, 0.55));
165
+ setColor(palette.TableCell, 'border', darken(alpha(palette.divider, 1), 0.68));
166
+ setColor(palette.Tooltip, 'bg', alpha(palette.grey[700], 0.92));
69
167
  }
70
168
 
71
169
  palette.common.backgroundChannel = colorChannel(palette.common.background);
72
170
  palette.common.onBackgroundChannel = colorChannel(palette.common.onBackground);
73
- palette.dividerChannel = colorChannel(palette.divider); // special token for Tooltip
74
- // TODO: consider adding `main`, and `light` to palette.grey to make it consistent.
75
-
76
- if (!palette.grey.dark) {
77
- palette.grey.dark = palette.grey[700];
78
- }
79
-
171
+ palette.dividerChannel = colorChannel(palette.divider);
80
172
  Object.keys(palette).forEach(color => {
81
173
  const colors = palette[color]; // Color palettes: primary, secondary, error, info, success, and warning
82
174
 
@@ -103,12 +195,16 @@ export default function extendTheme(options = {}, ...args) {
103
195
 
104
196
  if (colors.secondary) {
105
197
  palette[color].secondaryChannel = colorChannel(colors.secondary);
106
- } // Action colors: action.activeChannel
198
+ } // Action colors: action.active, action.selected
107
199
 
108
200
 
109
201
  if (colors.active) {
110
202
  palette[color].activeChannel = colorChannel(colors.active);
111
203
  }
204
+
205
+ if (colors.selected) {
206
+ palette[color].selectedChannel = colorChannel(colors.selected);
207
+ }
112
208
  });
113
209
  });
114
210
  theme = args.reduce((acc, argument) => deepmerge(acc, argument), theme);
@@ -123,7 +123,9 @@ const AlertMessage = (0, _styled.default)('div', {
123
123
  slot: 'Message',
124
124
  overridesResolver: (props, styles) => styles.message
125
125
  })({
126
- padding: '8px 0'
126
+ padding: '8px 0',
127
+ minWidth: 0,
128
+ overflow: 'auto'
127
129
  });
128
130
  const AlertAction = (0, _styled.default)('div', {
129
131
  name: 'MuiAlert',
@@ -47,7 +47,11 @@ const useUtilityClasses = ownerState => {
47
47
  root: ['root', `color${(0, _capitalize.default)(color)}`, `position${(0, _capitalize.default)(position)}`]
48
48
  };
49
49
  return (0, _base.unstable_composeClasses)(slots, _appBarClasses.getAppBarUtilityClass, classes);
50
- };
50
+ }; // var2 is the fallback.
51
+ // Ex. var1: 'var(--a)', var2: 'var(--b)'; return: 'var(--a, var(--b))'
52
+
53
+
54
+ const joinVars = (var1, var2) => `${var1 == null ? void 0 : var1.replace(')', '')}, ${var2})`;
51
55
 
52
56
  const AppBarRoot = (0, _styled.default)(_Paper.default, {
53
57
  name: 'MuiAppBar',
@@ -72,7 +76,7 @@ const AppBarRoot = (0, _styled.default)(_Paper.default, {
72
76
  flexShrink: 0
73
77
  }, ownerState.position === 'fixed' && {
74
78
  position: 'fixed',
75
- zIndex: theme.zIndex.appBar,
79
+ zIndex: (theme.vars || theme).zIndex.appBar,
76
80
  top: 0,
77
81
  left: 'auto',
78
82
  right: 0,
@@ -82,14 +86,14 @@ const AppBarRoot = (0, _styled.default)(_Paper.default, {
82
86
  }
83
87
  }, ownerState.position === 'absolute' && {
84
88
  position: 'absolute',
85
- zIndex: theme.zIndex.appBar,
89
+ zIndex: (theme.vars || theme).zIndex.appBar,
86
90
  top: 0,
87
91
  left: 'auto',
88
92
  right: 0
89
93
  }, ownerState.position === 'sticky' && {
90
94
  // ⚠️ sticky is not supported by IE11.
91
95
  position: 'sticky',
92
- zIndex: theme.zIndex.appBar,
96
+ zIndex: (theme.vars || theme).zIndex.appBar,
93
97
  top: 0,
94
98
  left: 'auto',
95
99
  right: 0
@@ -97,7 +101,7 @@ const AppBarRoot = (0, _styled.default)(_Paper.default, {
97
101
  position: 'static'
98
102
  }, ownerState.position === 'relative' && {
99
103
  position: 'relative'
100
- }, ownerState.color === 'default' && {
104
+ }, !theme.vars && (0, _extends2.default)({}, ownerState.color === 'default' && {
101
105
  backgroundColor: backgroundColorDefault,
102
106
  color: theme.palette.getContrastText(backgroundColorDefault)
103
107
  }, ownerState.color && ownerState.color !== 'default' && ownerState.color !== 'inherit' && ownerState.color !== 'transparent' && {
@@ -113,6 +117,19 @@ const AppBarRoot = (0, _styled.default)(_Paper.default, {
113
117
  color: 'inherit'
114
118
  }, theme.palette.mode === 'dark' && {
115
119
  backgroundImage: 'none'
120
+ })), theme.vars && (0, _extends2.default)({}, ownerState.color === 'default' && {
121
+ '--AppBar-background': ownerState.enableColorOnDark ? theme.vars.palette.AppBar.defaultBg : joinVars(theme.vars.palette.AppBar.darkBg, theme.vars.palette.AppBar.defaultBg),
122
+ '--AppBar-color': ownerState.enableColorOnDark ? theme.vars.palette.text.primary : joinVars(theme.vars.palette.AppBar.darkColor, theme.vars.palette.text.primary)
123
+ }, ownerState.color && !ownerState.color.match(/^(default|inherit|transparent)$/) && {
124
+ '--AppBar-background': ownerState.enableColorOnDark ? theme.vars.palette[ownerState.color].main : joinVars(theme.vars.palette.AppBar.darkBg, theme.vars.palette[ownerState.color].main),
125
+ '--AppBar-color': ownerState.enableColorOnDark ? theme.vars.palette[ownerState.color].contrastText : joinVars(theme.vars.palette.AppBar.darkColor, theme.vars.palette[ownerState.color].contrastText)
126
+ }, {
127
+ backgroundColor: 'var(--AppBar-background)',
128
+ color: ownerState.color === 'inherit' ? 'inherit' : 'var(--AppBar-color)'
129
+ }, ownerState.color === 'transparent' && {
130
+ backgroundImage: 'none',
131
+ backgroundColor: 'transparent',
132
+ color: 'inherit'
116
133
  }));
117
134
  });
118
135
  const AppBar = /*#__PURE__*/React.forwardRef(function AppBar(inProps, ref) {
@@ -76,13 +76,16 @@ const AvatarRoot = (0, _styled.default)('div', {
76
76
  overflow: 'hidden',
77
77
  userSelect: 'none'
78
78
  }, ownerState.variant === 'rounded' && {
79
- borderRadius: theme.shape.borderRadius
79
+ borderRadius: (theme.vars || theme).shape.borderRadius
80
80
  }, ownerState.variant === 'square' && {
81
81
  borderRadius: 0
82
- }, ownerState.colorDefault && {
83
- color: theme.palette.background.default,
82
+ }, ownerState.colorDefault && (0, _extends2.default)({
83
+ color: (theme.vars || theme).palette.background.default
84
+ }, theme.vars ? {
85
+ backgroundColor: theme.vars.palette.Avatar.defaultBg
86
+ } : {
84
87
  backgroundColor: theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]
85
- }));
88
+ })));
86
89
  const AvatarImg = (0, _styled.default)('img', {
87
90
  name: 'MuiAvatar',
88
91
  slot: 'Img',
@@ -347,8 +347,8 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes
347
347
  * @default {}
348
348
  */
349
349
  componentsProps: _propTypes.default.shape({
350
- badge: _propTypes.default.object,
351
- root: _propTypes.default.object
350
+ badge: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
351
+ root: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
352
352
  }),
353
353
 
354
354
  /**
@@ -12,6 +12,6 @@ function getButtonUtilityClass(slot) {
12
12
  return (0, _base.generateUtilityClass)('MuiButton', slot);
13
13
  }
14
14
 
15
- const buttonClasses = (0, _base.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']);
15
+ const buttonClasses = (0, _base.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']);
16
16
  var _default = buttonClasses;
17
17
  exports.default = _default;
@@ -72,10 +72,10 @@ const CheckboxRoot = (0, _styled.default)(_SwitchBase.default, {
72
72
  theme,
73
73
  ownerState
74
74
  }) => (0, _extends2.default)({
75
- color: theme.palette.text.secondary
75
+ color: (theme.vars || theme).palette.text.secondary
76
76
  }, !ownerState.disableRipple && {
77
77
  '&:hover': {
78
- backgroundColor: (0, _system.alpha)(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
78
+ backgroundColor: theme.vars ? `rgba(${ownerState.color === 'default' ? theme.vars.palette.action.activeChannel : theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : (0, _system.alpha)(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
79
79
  // Reset on touch devices, it doesn't add specificity
80
80
  '@media (hover: none)': {
81
81
  backgroundColor: 'transparent'
@@ -83,10 +83,10 @@ const CheckboxRoot = (0, _styled.default)(_SwitchBase.default, {
83
83
  }
84
84
  }, ownerState.color !== 'default' && {
85
85
  [`&.${_checkboxClasses.default.checked}, &.${_checkboxClasses.default.indeterminate}`]: {
86
- color: theme.palette[ownerState.color].main
86
+ color: (theme.vars || theme).palette[ownerState.color].main
87
87
  },
88
88
  [`&.${_checkboxClasses.default.disabled}`]: {
89
- color: theme.palette.action.disabled
89
+ color: (theme.vars || theme).palette.action.disabled
90
90
  }
91
91
  }));
92
92
  const defaultCheckedIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_CheckBox.default, {});
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.palette.mode === 'light' ? theme.palette.grey[700] : theme.palette.grey[300],
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.palette.mode === 'light' ? theme.palette.grey[700] : theme.palette.grey[300],
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
  }));
@@ -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
- BackdropComponent: DialogBackdrop,
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 _theme$palette;
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: light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.13)',
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: light ? 'rgba(0, 0, 0, 0.12)' : 'rgba(255, 255, 255, 0.12)'
94
+ backgroundColor: theme.vars ? theme.vars.palette.FilledInput.disabledBg : disabledBackground
93
95
  }
94
96
  }, !ownerState.disableUnderline && {
95
97
  '&:after': {
96
- borderBottom: `2px solid ${(_theme$palette = theme.palette[ownerState.color || 'primary']) == null ? void 0 : _theme$palette.main}`,
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.inputTouchBottomLine})` : 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