@mui/material 5.8.4 → 5.8.7

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 (257) hide show
  1. package/Accordion/accordionClasses.d.ts +18 -18
  2. package/AccordionActions/accordionActionsClasses.d.ts +10 -10
  3. package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
  4. package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
  5. package/Alert/Alert.js +19 -11
  6. package/Alert/alertClasses.d.ts +44 -44
  7. package/AlertTitle/alertTitleClasses.d.ts +8 -8
  8. package/AppBar/AppBar.js +22 -5
  9. package/AppBar/appBarClasses.d.ts +28 -28
  10. package/Autocomplete/Autocomplete.d.ts +2 -0
  11. package/Autocomplete/Autocomplete.js +12 -8
  12. package/Autocomplete/autocompleteClasses.d.ts +54 -54
  13. package/Avatar/Avatar.js +7 -4
  14. package/Avatar/avatarClasses.d.ts +20 -20
  15. package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
  16. package/Backdrop/backdropClasses.d.ts +10 -10
  17. package/Badge/Badge.js +2 -2
  18. package/Badge/badgeClasses.d.ts +56 -56
  19. package/BottomNavigation/BottomNavigation.js +0 -0
  20. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  21. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  22. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  23. package/Button/buttonClasses.d.ts +100 -100
  24. package/ButtonBase/buttonBaseClasses.d.ts +12 -12
  25. package/ButtonBase/touchRippleClasses.d.ts +20 -20
  26. package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
  27. package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
  28. package/CHANGELOG.md +185 -4
  29. package/Card/cardClasses.d.ts +8 -8
  30. package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
  31. package/CardActions/cardActionsClasses.d.ts +10 -10
  32. package/CardContent/cardContentClasses.d.ts +8 -8
  33. package/CardHeader/cardHeaderClasses.d.ts +18 -18
  34. package/CardMedia/cardMediaClasses.d.ts +12 -12
  35. package/Checkbox/checkboxClasses.d.ts +18 -18
  36. package/Chip/Chip.js +31 -30
  37. package/Chip/chipClasses.d.ts +80 -80
  38. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  39. package/ClickAwayListener/index.d.ts +2 -2
  40. package/Collapse/collapseClasses.d.ts +18 -18
  41. package/Container/containerClasses.d.ts +6 -6
  42. package/Dialog/Dialog.js +11 -6
  43. package/Dialog/DialogContext.d.ts +6 -6
  44. package/Dialog/dialogClasses.d.ts +36 -36
  45. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  46. package/DialogContent/dialogContentClasses.d.ts +10 -10
  47. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  48. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  49. package/Divider/dividerClasses.d.ts +34 -34
  50. package/Drawer/drawerClasses.d.ts +30 -30
  51. package/Fab/fabClasses.d.ts +26 -26
  52. package/FilledInput/FilledInput.js +28 -13
  53. package/FilledInput/filledInputClasses.d.ts +40 -40
  54. package/FormControl/formControlClasses.d.ts +14 -14
  55. package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
  56. package/FormGroup/formGroupClasses.d.ts +12 -12
  57. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  58. package/FormLabel/formLabelClasses.d.ts +22 -22
  59. package/Grid/gridClasses.d.ts +48 -48
  60. package/Icon/iconClasses.d.ts +24 -24
  61. package/IconButton/iconButtonClasses.d.ts +26 -26
  62. package/ImageList/imageListClasses.d.ts +16 -16
  63. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  64. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  65. package/Input/Input.js +1 -1
  66. package/Input/inputClasses.d.ts +34 -34
  67. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  68. package/InputBase/InputBase.js +2 -2
  69. package/InputBase/inputBaseClasses.d.ts +44 -44
  70. package/InputLabel/inputLabelClasses.d.ts +32 -32
  71. package/LinearProgress/LinearProgress.js +6 -2
  72. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  73. package/Link/getTextDecoration.d.ts +15 -15
  74. package/Link/linkClasses.d.ts +18 -18
  75. package/List/listClasses.d.ts +14 -14
  76. package/ListItem/listItemClasses.d.ts +30 -30
  77. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  78. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  79. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  80. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  81. package/ListItemText/listItemTextClasses.d.ts +18 -18
  82. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  83. package/Menu/menuClasses.d.ts +12 -12
  84. package/MenuItem/menuItemClasses.d.ts +20 -20
  85. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  86. package/Modal/Modal.d.ts +2 -0
  87. package/Modal/Modal.js +25 -8
  88. package/NativeSelect/nativeSelectClasses.d.ts +32 -32
  89. package/OutlinedInput/OutlinedInput.js +40 -10
  90. package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
  91. package/Pagination/paginationClasses.d.ts +14 -14
  92. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  93. package/Paper/paperClasses.d.ts +39 -39
  94. package/Popover/popoverClasses.d.ts +10 -10
  95. package/Popper/Popper.d.ts +29 -29
  96. package/Radio/radioClasses.d.ts +16 -16
  97. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  98. package/RadioGroup/useRadioGroup.d.ts +4 -4
  99. package/Rating/ratingClasses.d.ts +40 -40
  100. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  101. package/Select/Select.d.ts +1 -1
  102. package/Select/Select.js +1 -1
  103. package/Select/selectClasses.d.ts +30 -30
  104. package/Skeleton/Skeleton.js +8 -3
  105. package/Skeleton/skeletonClasses.d.ts +24 -24
  106. package/Slider/Slider.js +21 -21
  107. package/Snackbar/snackbarClasses.d.ts +20 -20
  108. package/SnackbarContent/SnackbarContent.js +3 -3
  109. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  110. package/SpeedDial/speedDialClasses.d.ts +22 -22
  111. package/SpeedDialAction/SpeedDialAction.js +7 -7
  112. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  113. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  114. package/Step/StepContext.d.ts +20 -20
  115. package/Step/stepClasses.d.ts +16 -16
  116. package/StepButton/stepButtonClasses.d.ts +14 -14
  117. package/StepConnector/StepConnector.js +14 -11
  118. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  119. package/StepContent/StepContent.js +1 -1
  120. package/StepContent/stepContentClasses.d.ts +12 -12
  121. package/StepIcon/stepIconClasses.d.ts +16 -16
  122. package/StepLabel/stepLabelClasses.d.ts +28 -28
  123. package/Stepper/StepperContext.d.ts +18 -18
  124. package/Stepper/stepperClasses.d.ts +14 -14
  125. package/SvgIcon/svgIconClasses.d.ts +24 -24
  126. package/Switch/Switch.js +11 -11
  127. package/Switch/switchClasses.d.ts +32 -32
  128. package/Tab/tabClasses.d.ts +26 -26
  129. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  130. package/Table/tableClasses.d.ts +10 -10
  131. package/TableBody/tableBodyClasses.d.ts +8 -8
  132. package/TableCell/TableCell.js +5 -5
  133. package/TableCell/tableCellClasses.d.ts +32 -32
  134. package/TableContainer/tableContainerClasses.d.ts +8 -8
  135. package/TableFooter/tableFooterClasses.d.ts +8 -8
  136. package/TableHead/tableHeadClasses.d.ts +8 -8
  137. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  138. package/TableRow/tableRowClasses.d.ts +16 -16
  139. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  140. package/Tabs/Tabs.js +16 -18
  141. package/Tabs/tabsClasses.d.ts +32 -32
  142. package/TextField/textFieldClasses.d.ts +8 -8
  143. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  144. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  145. package/Toolbar/toolbarClasses.d.ts +14 -14
  146. package/Tooltip/Tooltip.js +1 -1
  147. package/Tooltip/tooltipClasses.d.ts +30 -30
  148. package/Typography/typographyClasses.d.ts +50 -50
  149. package/className/index.d.ts +1 -1
  150. package/darkScrollbar/index.d.ts +28 -28
  151. package/index.js +1 -1
  152. package/internal/switchBaseClasses.d.ts +12 -12
  153. package/legacy/Alert/Alert.js +19 -11
  154. package/legacy/AppBar/AppBar.js +23 -4
  155. package/legacy/Autocomplete/Autocomplete.js +12 -8
  156. package/legacy/Avatar/Avatar.js +7 -4
  157. package/legacy/Badge/Badge.js +2 -2
  158. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  159. package/legacy/Chip/Chip.js +31 -30
  160. package/legacy/Dialog/Dialog.js +11 -6
  161. package/legacy/FilledInput/FilledInput.js +28 -14
  162. package/legacy/Input/Input.js +1 -1
  163. package/legacy/InputBase/InputBase.js +2 -2
  164. package/legacy/LinearProgress/LinearProgress.js +6 -2
  165. package/legacy/Modal/Modal.js +23 -7
  166. package/legacy/OutlinedInput/OutlinedInput.js +36 -9
  167. package/legacy/Select/Select.js +1 -1
  168. package/legacy/Skeleton/Skeleton.js +2 -2
  169. package/legacy/Slider/Slider.js +21 -21
  170. package/legacy/SnackbarContent/SnackbarContent.js +3 -3
  171. package/legacy/SpeedDialAction/SpeedDialAction.js +7 -7
  172. package/legacy/StepConnector/StepConnector.js +2 -1
  173. package/legacy/StepContent/StepContent.js +1 -1
  174. package/legacy/Switch/Switch.js +11 -11
  175. package/legacy/TableCell/TableCell.js +5 -5
  176. package/legacy/Tabs/Tabs.js +16 -18
  177. package/legacy/Tooltip/Tooltip.js +1 -1
  178. package/legacy/index.js +1 -1
  179. package/legacy/styles/CssVarsProvider.js +10 -8
  180. package/legacy/styles/experimental_extendTheme.js +170 -19
  181. package/locale/index.d.ts +71 -71
  182. package/modern/Alert/Alert.js +19 -11
  183. package/modern/AppBar/AppBar.js +22 -5
  184. package/modern/Autocomplete/Autocomplete.js +11 -7
  185. package/modern/Avatar/Avatar.js +7 -4
  186. package/modern/Badge/Badge.js +2 -2
  187. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  188. package/modern/Chip/Chip.js +31 -30
  189. package/modern/Dialog/Dialog.js +11 -6
  190. package/modern/FilledInput/FilledInput.js +27 -12
  191. package/modern/Input/Input.js +1 -1
  192. package/modern/InputBase/InputBase.js +2 -2
  193. package/modern/LinearProgress/LinearProgress.js +6 -2
  194. package/modern/Modal/Modal.js +24 -7
  195. package/modern/OutlinedInput/OutlinedInput.js +40 -10
  196. package/modern/Select/Select.js +1 -1
  197. package/modern/Skeleton/Skeleton.js +7 -2
  198. package/modern/Slider/Slider.js +21 -21
  199. package/modern/SnackbarContent/SnackbarContent.js +3 -3
  200. package/modern/SpeedDialAction/SpeedDialAction.js +7 -7
  201. package/modern/StepConnector/StepConnector.js +14 -11
  202. package/modern/StepContent/StepContent.js +1 -1
  203. package/modern/Switch/Switch.js +11 -11
  204. package/modern/TableCell/TableCell.js +5 -5
  205. package/modern/Tabs/Tabs.js +16 -18
  206. package/modern/Tooltip/Tooltip.js +1 -1
  207. package/modern/index.js +1 -1
  208. package/modern/styles/CssVarsProvider.js +6 -6
  209. package/modern/styles/experimental_extendTheme.js +166 -20
  210. package/node/Alert/Alert.js +19 -11
  211. package/node/AppBar/AppBar.js +22 -5
  212. package/node/Autocomplete/Autocomplete.js +12 -8
  213. package/node/Avatar/Avatar.js +7 -4
  214. package/node/Badge/Badge.js +2 -2
  215. package/node/BottomNavigation/BottomNavigation.js +0 -0
  216. package/node/Chip/Chip.js +31 -30
  217. package/node/Dialog/Dialog.js +11 -6
  218. package/node/FilledInput/FilledInput.js +28 -13
  219. package/node/Input/Input.js +1 -1
  220. package/node/InputBase/InputBase.js +2 -2
  221. package/node/LinearProgress/LinearProgress.js +6 -2
  222. package/node/Modal/Modal.js +25 -8
  223. package/node/OutlinedInput/OutlinedInput.js +38 -10
  224. package/node/Select/Select.js +1 -1
  225. package/node/Skeleton/Skeleton.js +7 -2
  226. package/node/Slider/Slider.js +21 -21
  227. package/node/SnackbarContent/SnackbarContent.js +3 -3
  228. package/node/SpeedDialAction/SpeedDialAction.js +7 -7
  229. package/node/StepConnector/StepConnector.js +14 -11
  230. package/node/StepContent/StepContent.js +1 -1
  231. package/node/Switch/Switch.js +11 -11
  232. package/node/TableCell/TableCell.js +5 -5
  233. package/node/Tabs/Tabs.js +16 -18
  234. package/node/Tooltip/Tooltip.js +1 -1
  235. package/node/index.js +1 -1
  236. package/node/styles/CssVarsProvider.js +11 -6
  237. package/node/styles/experimental_extendTheme.js +167 -19
  238. package/package.json +7 -7
  239. package/styles/CssVarsProvider.d.ts +14 -28
  240. package/styles/CssVarsProvider.js +10 -6
  241. package/styles/createPalette.d.ts +0 -26
  242. package/styles/experimental_extendTheme.d.ts +238 -35
  243. package/styles/experimental_extendTheme.js +166 -20
  244. package/styles/index.d.ts +24 -1
  245. package/themeCssVarsAugmentation/index.d.ts +30 -0
  246. package/transitions/index.d.ts +1 -1
  247. package/transitions/transition.d.ts +13 -13
  248. package/transitions/utils.d.ts +23 -23
  249. package/umd/material-ui.development.js +954 -471
  250. package/umd/material-ui.production.min.js +27 -22
  251. package/useMediaQuery/useMediaQuery.d.ts +31 -31
  252. package/useTouchRipple/index.d.ts +1 -1
  253. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  254. package/utils/getScrollbarSize.d.ts +2 -2
  255. package/utils/ownerDocument.d.ts +2 -2
  256. package/utils/ownerWindow.d.ts +2 -2
  257. package/utils/setRef.d.ts +2 -2
@@ -1,12 +1,9 @@
1
1
  /* eslint-disable @typescript-eslint/naming-convention */
2
- import { ThemeOptions as SystemThemeOptions, Theme as SystemTheme } from '@mui/system';
3
2
  import { OverridableStringUnion } from '@mui/types';
4
- import { Mixins, MixinsOptions } from './createMixins';
3
+ import { ThemeOptions, Theme } from './createTheme';
5
4
  import { Palette, PaletteOptions } from './createPalette';
6
- import { Typography, TypographyOptions } from './createTypography';
7
5
  import { Shadows } from './shadows';
8
- import { Transitions, TransitionsOptions } from './createTransitions';
9
- import { ZIndex, ZIndexOptions } from './zIndex';
6
+ import { ZIndex } from './zIndex';
10
7
  import { Components } from './components';
11
8
 
12
9
  /**
@@ -35,8 +32,8 @@ export type ExtendedColorScheme = OverridableStringUnion<never, ColorSchemeOverr
35
32
  export type SupportedColorScheme = DefaultColorScheme | ExtendedColorScheme;
36
33
 
37
34
  export interface Opacity {
38
- placeholder: number;
39
- inputTouchBottomLine: number;
35
+ inputPlaceholder: number;
36
+ inputUnderline: number;
40
37
  }
41
38
 
42
39
  export type Overlays = [
@@ -67,45 +64,248 @@ export type Overlays = [
67
64
  string | undefined,
68
65
  ];
69
66
 
70
- export interface ThemeOptions extends Omit<SystemThemeOptions, 'zIndex'> {
71
- mixins?: MixinsOptions;
72
- components?: Components<BaseTheme>;
73
- colorSchemes?: Record<
74
- SupportedColorScheme,
75
- {
76
- palette?: PaletteOptions;
77
- opacity?: Partial<Opacity>;
78
- overlays?: Overlays;
79
- }
80
- >;
81
- shadows?: Shadows;
82
- transitions?: TransitionsOptions;
83
- typography?: TypographyOptions | ((palette: Palette) => TypographyOptions);
84
- zIndex?: ZIndexOptions;
85
- unstable_strictMode?: boolean;
67
+ export interface PaletteCommonChannel {
68
+ background: string;
69
+ backgroundChannel: string;
70
+ onBackground: string;
71
+ onBackgroundChannel: string;
72
+ }
73
+
74
+ export interface PaletteColorChannel {
75
+ mainChannel: string;
76
+ lightChannel: string;
77
+ darkChannel: string;
78
+ contrastTextChannel: string;
79
+ }
80
+
81
+ export interface PaletteActionChannel {
82
+ activeChannel: string;
83
+ selectedChannel: string;
84
+ }
85
+
86
+ export interface PaletteTextChannel {
87
+ primaryChannel: string;
88
+ secondaryChannel: string;
89
+ }
90
+
91
+ export interface PaletteAlert {
92
+ errorColor: string;
93
+ infoColor: string;
94
+ successColor: string;
95
+ warningColor: string;
96
+ errorFilledBg: string;
97
+ infoFilledBg: string;
98
+ successFilledBg: string;
99
+ warningFilledBg: string;
100
+ errorFilledColor: string;
101
+ infoFilledColor: string;
102
+ successFilledColor: string;
103
+ warningFilledColor: string;
104
+ errorStandardBg: string;
105
+ infoStandardBg: string;
106
+ successStandardBg: string;
107
+ warningStandardBg: string;
108
+ errorIconColor: string;
109
+ infoIconColor: string;
110
+ successIconColor: string;
111
+ warningIconColor: string;
112
+ }
113
+
114
+ export interface PaletteAppBar {
115
+ defaultBg: string;
116
+ darkBg: string;
117
+ darkColor: string;
118
+ }
119
+
120
+ export interface PaletteAvatar {
121
+ defaultBg: string;
122
+ }
123
+
124
+ export interface PaletteChip {
125
+ defaultBorder: string;
126
+ defaultAvatarColor: string;
127
+ defaultIconColor: string;
128
+ }
129
+
130
+ export interface PaletteFilledInput {
131
+ bg: string;
132
+ hoverBg: string;
133
+ disabledBg: string;
134
+ }
135
+
136
+ export interface PaletteLinearProgress {
137
+ primaryBg: string;
138
+ secondaryBg: string;
139
+ errorBg: string;
140
+ infoBg: string;
141
+ successBg: string;
142
+ warningBg: string;
143
+ }
144
+
145
+ export interface PaletteSkeleton {
146
+ bg: string;
147
+ }
148
+
149
+ export interface PaletteSlider {
150
+ primaryTrack: string;
151
+ secondaryTrack: string;
152
+ errorTrack: string;
153
+ infoTrack: string;
154
+ successTrack: string;
155
+ warningTrack: string;
156
+ }
157
+
158
+ export interface PaletteSnackbarContent {
159
+ bg: string;
160
+ color: string;
161
+ }
162
+
163
+ export interface PaletteSpeedDialAction {
164
+ fabHoverBg: string;
165
+ }
166
+
167
+ export interface PaletteStepConnector {
168
+ border: string;
169
+ }
170
+
171
+ export interface PaletteStepContent {
172
+ border: string;
173
+ }
174
+
175
+ export interface PaletteSwitch {
176
+ defaultColor: string;
177
+ defaultDisabledColor: string;
178
+ primaryDisabledColor: string;
179
+ secondaryDisabledColor: string;
180
+ errorDisabledColor: string;
181
+ infoDisabledColor: string;
182
+ successDisabledColor: string;
183
+ warningDisabledColor: string;
184
+ }
185
+
186
+ export interface PaletteTableCell {
187
+ border: string;
188
+ }
189
+
190
+ export interface PaletteTooltip {
191
+ bg: string;
192
+ }
193
+
194
+ // The Palette should be sync with `../themeCssVarsAugmentation/index.d.ts`
195
+ export interface ColorSystemOptions {
196
+ palette?: Omit<PaletteOptions, 'mode'> & {
197
+ common?: Partial<PaletteCommonChannel>;
198
+ primary?: Partial<PaletteColorChannel>;
199
+ secondary?: Partial<PaletteColorChannel>;
200
+ error?: Partial<PaletteColorChannel>;
201
+ info?: Partial<PaletteColorChannel>;
202
+ success?: Partial<PaletteColorChannel>;
203
+ text?: Partial<PaletteTextChannel>;
204
+ dividerChannel?: Partial<string>;
205
+ action?: Partial<PaletteActionChannel>;
206
+ Alert?: Partial<PaletteAlert>;
207
+ AppBar?: Partial<PaletteAppBar>;
208
+ Avatar?: Partial<PaletteAvatar>;
209
+ Chip?: Partial<PaletteChip>;
210
+ FilledInput?: Partial<PaletteFilledInput>;
211
+ LinearProgress?: Partial<PaletteLinearProgress>;
212
+ Skeleton?: Partial<PaletteSkeleton>;
213
+ Slider?: Partial<PaletteSlider>;
214
+ SnackbarContent?: Partial<PaletteSnackbarContent>;
215
+ SpeedDialAction?: Partial<PaletteSpeedDialAction>;
216
+ StepConnector?: Partial<PaletteStepConnector>;
217
+ StepContent?: Partial<PaletteStepContent>;
218
+ Switch?: Partial<PaletteSwitch>;
219
+ TableCell?: Partial<PaletteTableCell>;
220
+ Tooltip?: Partial<PaletteTooltip>;
221
+ };
222
+ opacity?: Partial<Opacity>;
223
+ overlays?: Overlays;
224
+ }
225
+
226
+ export interface CssVarsPalette {
227
+ colorScheme: SupportedColorScheme;
228
+ common: PaletteCommonChannel;
229
+ primary: PaletteColorChannel;
230
+ secondary: PaletteColorChannel;
231
+ error: PaletteColorChannel;
232
+ info: PaletteColorChannel;
233
+ success: PaletteColorChannel;
234
+ text: PaletteTextChannel;
235
+ dividerChannel: string;
236
+ action: PaletteActionChannel;
237
+ Alert: PaletteAlert;
238
+ AppBar: PaletteAppBar;
239
+ Avatar: PaletteAvatar;
240
+ Chip: PaletteChip;
241
+ FilledInput: PaletteFilledInput;
242
+ LinearProgress: PaletteLinearProgress;
243
+ Skeleton: PaletteSkeleton;
244
+ Slider: PaletteSlider;
245
+ SnackbarContent: PaletteSnackbarContent;
246
+ SpeedDialAction: PaletteSpeedDialAction;
247
+ StepConnector: PaletteStepConnector;
248
+ StepContent: PaletteStepContent;
249
+ Switch: PaletteSwitch;
250
+ TableCell: PaletteTableCell;
251
+ Tooltip: PaletteTooltip;
252
+ }
253
+
254
+ export interface ColorSystem {
255
+ palette: Palette & CssVarsPalette;
256
+ opacity: Opacity;
257
+ overlays: Overlays;
86
258
  }
87
259
 
88
- interface BaseTheme extends SystemTheme {
89
- mixins: Mixins;
90
- palette: Palette;
260
+ export interface CssVarsThemeOptions extends Omit<ThemeOptions, 'palette' | 'components'> {
261
+ /**
262
+ * Prefix of the generated CSS variables
263
+ * @default 'mui'
264
+ */
265
+ cssVarPrefix?: string;
266
+ /**
267
+ * Theme components
268
+ */
269
+ components?: Components<Omit<Theme, 'components' | 'palette'> & CssVarsTheme>;
270
+ /**
271
+ * Color schemes configuration
272
+ */
273
+ colorSchemes?: Partial<Record<SupportedColorScheme, ColorSystemOptions>>;
274
+ }
275
+
276
+ // should not include keys defined in `shouldSkipGeneratingVar` and have value typeof function
277
+ interface ThemeVars {
278
+ palette: Omit<
279
+ ColorSystem['palette'],
280
+ | 'colorScheme'
281
+ | 'mode'
282
+ | 'contrastThreshold'
283
+ | 'tonalOffset'
284
+ | 'getContrastText'
285
+ | 'augmentColor'
286
+ >;
91
287
  opacity: Opacity;
92
288
  overlays: Overlays;
93
289
  shadows: Shadows;
94
- transitions: Transitions;
95
- typography: Typography;
96
290
  zIndex: ZIndex;
97
- unstable_strictMode?: boolean;
98
- colorSchemes: Record<string, { palette: Palette }>;
291
+ shape: Theme['shape'];
99
292
  }
100
293
 
101
- // shut off automatic exporting for the `BaseTheme` above
294
+ // shut off automatic exporting for the `ThemeVars` above
102
295
  export {};
103
296
 
104
297
  /**
105
- * Our [TypeScript guide on theme customization](https://mui.com/material-ui/guides/typescript/#customization-of-theme) explains in detail how you would add custom properties.
298
+ * Theme properties generated by extendTheme and CssVarsProvider
106
299
  */
107
- export interface Theme extends BaseTheme {
108
- components?: Components<BaseTheme>;
300
+ export interface CssVarsTheme extends ColorSystem {
301
+ colorSchemes: Record<SupportedColorScheme, ColorSystem>;
302
+ cssVarPrefix: string;
303
+ vars: ThemeVars;
304
+ getCssVar: <CustomVar extends string = never>(
305
+ field: string | CustomVar,
306
+ ...vars: Array<string | CustomVar>
307
+ ) => string;
308
+ getColorSchemeSelector: (colorScheme: SupportedColorScheme) => string;
109
309
  }
110
310
 
111
311
  /**
@@ -114,4 +314,7 @@ export interface Theme extends BaseTheme {
114
314
  * @param args Deep merge the arguments with the about to be returned theme.
115
315
  * @returns A complete, ready-to-use theme object.
116
316
  */
117
- export default function experimental_extendTheme(options?: ThemeOptions, ...args: object[]): Theme;
317
+ export default function experimental_extendTheme(
318
+ options?: CssVarsThemeOptions,
319
+ ...args: object[]
320
+ ): Omit<Theme, 'palette'> & CssVarsTheme;
@@ -1,9 +1,9 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["colorSchemes"],
3
+ const _excluded = ["colorSchemes", "cssVarPrefix"],
4
4
  _excluded2 = ["palette"];
5
5
  import { deepmerge } from '@mui/utils';
6
- import { colorChannel } from '@mui/system';
6
+ import { colorChannel, alpha, darken, lighten, emphasize, unstable_createGetCssVar as systemCreateGetCssVar } 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,14 +14,31 @@ 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
+
30
+ export const createGetCssVar = (cssVarPrefix = 'mui') => systemCreateGetCssVar(cssVarPrefix);
17
31
  export default function extendTheme(options = {}, ...args) {
18
32
  var _colorSchemesInput$li, _colorSchemesInput$da, _colorSchemesInput$li2, _colorSchemesInput$li3, _colorSchemesInput$da2, _colorSchemesInput$da3;
19
33
 
20
34
  const {
21
- colorSchemes: colorSchemesInput = {}
35
+ colorSchemes: colorSchemesInput = {},
36
+ cssVarPrefix = 'mui'
22
37
  } = options,
23
38
  input = _objectWithoutPropertiesLoose(options, _excluded);
24
39
 
40
+ const getCssVar = createGetCssVar(cssVarPrefix);
41
+
25
42
  const _createThemeWithoutVa = createThemeWithoutVars(_extends({}, input, colorSchemesInput.light && {
26
43
  palette: (_colorSchemesInput$li = colorSchemesInput.light) == null ? void 0 : _colorSchemesInput$li.palette
27
44
  })),
@@ -39,20 +56,26 @@ export default function extendTheme(options = {}, ...args) {
39
56
  });
40
57
 
41
58
  let theme = _extends({}, muiTheme, {
59
+ cssVarPrefix,
60
+ getCssVar,
42
61
  colorSchemes: _extends({}, colorSchemesInput, {
43
62
  light: _extends({}, colorSchemesInput.light, {
44
63
  palette: lightPalette,
45
64
  opacity: _extends({
46
- placeholder: 0.42,
47
- inputTouchBottomLine: 0.42
65
+ inputPlaceholder: 0.42,
66
+ inputUnderline: 0.42,
67
+ switchTrackDisabled: 0.12,
68
+ switchTrack: 0.38
48
69
  }, (_colorSchemesInput$li2 = colorSchemesInput.light) == null ? void 0 : _colorSchemesInput$li2.opacity),
49
70
  overlays: ((_colorSchemesInput$li3 = colorSchemesInput.light) == null ? void 0 : _colorSchemesInput$li3.overlays) || []
50
71
  }),
51
72
  dark: _extends({}, colorSchemesInput.dark, {
52
73
  palette: darkPalette,
53
74
  opacity: _extends({
54
- placeholder: 0.5,
55
- inputTouchBottomLine: 0.7
75
+ inputPlaceholder: 0.5,
76
+ inputUnderline: 0.7,
77
+ switchTrackDisabled: 0.2,
78
+ switchTrack: 0.3
56
79
  }, (_colorSchemesInput$da2 = colorSchemesInput.dark) == null ? void 0 : _colorSchemesInput$da2.opacity),
57
80
  overlays: ((_colorSchemesInput$da3 = colorSchemesInput.dark) == null ? void 0 : _colorSchemesInput$da3.overlays) || defaultDarkOverlays
58
81
  })
@@ -62,23 +85,142 @@ export default function extendTheme(options = {}, ...args) {
62
85
  Object.keys(theme.colorSchemes).forEach(key => {
63
86
  const palette = theme.colorSchemes[key].palette; // attach black & white channels to common node
64
87
 
65
- if (key === 'dark') {
66
- palette.common.background = palette.common.background || '#000';
67
- palette.common.onBackground = palette.common.onBackground || '#fff';
88
+ if (key === 'light') {
89
+ setColor(palette.common, 'background', '#fff');
90
+ setColor(palette.common, 'onBackground', '#000');
68
91
  } else {
69
- palette.common.background = palette.common.background || '#fff';
70
- palette.common.onBackground = palette.common.onBackground || '#000';
71
- }
92
+ setColor(palette.common, 'background', '#000');
93
+ setColor(palette.common, 'onBackground', '#fff');
94
+ } // assign component variables
72
95
 
73
- palette.common.backgroundChannel = colorChannel(palette.common.background);
74
- palette.common.onBackgroundChannel = colorChannel(palette.common.onBackground);
75
- palette.dividerChannel = colorChannel(palette.divider); // special token for Tooltip
76
- // TODO: consider adding `main`, and `light` to palette.grey to make it consistent.
77
96
 
78
- if (!palette.grey.dark) {
79
- palette.grey.dark = palette.grey[700];
97
+ assignNode(palette, ['Alert', 'AppBar', 'Avatar', 'Chip', 'FilledInput', 'LinearProgress', 'Skeleton', 'Slider', 'SnackbarContent', 'SpeedDialAction', 'StepConnector', 'StepContent', 'Switch', 'TableCell', 'Tooltip']);
98
+
99
+ if (key === 'light') {
100
+ setColor(palette.Alert, 'errorColor', darken(palette.error.light, 0.6));
101
+ setColor(palette.Alert, 'infoColor', darken(palette.info.light, 0.6));
102
+ setColor(palette.Alert, 'successColor', darken(palette.success.light, 0.6));
103
+ setColor(palette.Alert, 'warningColor', darken(palette.warning.light, 0.6));
104
+ setColor(palette.Alert, 'errorFilledBg', getCssVar('palette-error-main'));
105
+ setColor(palette.Alert, 'infoFilledBg', getCssVar('palette-info-main'));
106
+ setColor(palette.Alert, 'successFilledBg', getCssVar('palette-success-main'));
107
+ setColor(palette.Alert, 'warningFilledBg', getCssVar('palette-warning-main'));
108
+ setColor(palette.Alert, 'errorFilledColor', lightPalette.getContrastText(palette.error.main));
109
+ setColor(palette.Alert, 'infoFilledColor', lightPalette.getContrastText(palette.info.main));
110
+ setColor(palette.Alert, 'successFilledColor', lightPalette.getContrastText(palette.success.main));
111
+ setColor(palette.Alert, 'warningFilledColor', lightPalette.getContrastText(palette.warning.main));
112
+ setColor(palette.Alert, 'errorStandardBg', lighten(palette.error.light, 0.9));
113
+ setColor(palette.Alert, 'infoStandardBg', lighten(palette.info.light, 0.9));
114
+ setColor(palette.Alert, 'successStandardBg', lighten(palette.success.light, 0.9));
115
+ setColor(palette.Alert, 'warningStandardBg', lighten(palette.warning.light, 0.9));
116
+ setColor(palette.Alert, 'errorIconColor', getCssVar('palette-error-light'));
117
+ setColor(palette.Alert, 'infoIconColor', getCssVar('palette-info-light'));
118
+ setColor(palette.Alert, 'successIconColor', getCssVar('palette-success-light'));
119
+ setColor(palette.Alert, 'warningIconColor', getCssVar('palette-warning-light'));
120
+ setColor(palette.AppBar, 'defaultBg', getCssVar('palette-grey-100'));
121
+ setColor(palette.Avatar, 'defaultBg', getCssVar('palette-grey-400'));
122
+ setColor(palette.Chip, 'defaultBorder', getCssVar('palette-grey-400'));
123
+ setColor(palette.Chip, 'defaultAvatarColor', getCssVar('palette-grey-700'));
124
+ setColor(palette.Chip, 'defaultIconColor', getCssVar('palette-grey-700'));
125
+ setColor(palette.FilledInput, 'bg', 'rgba(0, 0, 0, 0.06)');
126
+ setColor(palette.FilledInput, 'hoverBg', 'rgba(0, 0, 0, 0.09)');
127
+ setColor(palette.FilledInput, 'disabledBg', 'rgba(0, 0, 0, 0.12)');
128
+ setColor(palette.LinearProgress, 'primaryBg', lighten(palette.primary.main, 0.62));
129
+ setColor(palette.LinearProgress, 'secondaryBg', lighten(palette.secondary.main, 0.62));
130
+ setColor(palette.LinearProgress, 'errorBg', lighten(palette.error.main, 0.62));
131
+ setColor(palette.LinearProgress, 'infoBg', lighten(palette.info.main, 0.62));
132
+ setColor(palette.LinearProgress, 'successBg', lighten(palette.success.main, 0.62));
133
+ setColor(palette.LinearProgress, 'warningBg', lighten(palette.warning.main, 0.62));
134
+ setColor(palette.Skeleton, 'bg', `rgba(${getCssVar('palette-text-primaryChannel')} / 0.11)`);
135
+ setColor(palette.Slider, 'primaryTrack', lighten(palette.primary.main, 0.62));
136
+ setColor(palette.Slider, 'secondaryTrack', lighten(palette.secondary.main, 0.62));
137
+ setColor(palette.Slider, 'errorTrack', lighten(palette.error.main, 0.62));
138
+ setColor(palette.Slider, 'infoTrack', lighten(palette.info.main, 0.62));
139
+ setColor(palette.Slider, 'successTrack', lighten(palette.success.main, 0.62));
140
+ setColor(palette.Slider, 'warningTrack', lighten(palette.warning.main, 0.62));
141
+ const snackbarContentBackground = emphasize(palette.background.default, 0.8);
142
+ setColor(palette.SnackbarContent, 'bg', snackbarContentBackground);
143
+ setColor(palette.SnackbarContent, 'color', lightPalette.getContrastText(snackbarContentBackground));
144
+ setColor(palette.SpeedDialAction, 'fabHoverBg', emphasize(palette.background.paper, 0.15));
145
+ setColor(palette.StepConnector, 'border', getCssVar('palette-grey-400'));
146
+ setColor(palette.StepContent, 'border', getCssVar('palette-grey-400'));
147
+ setColor(palette.Switch, 'defaultColor', getCssVar('palette-common-white'));
148
+ setColor(palette.Switch, 'defaultDisabledColor', getCssVar('palette-grey-100'));
149
+ setColor(palette.Switch, 'primaryDisabledColor', lighten(palette.primary.main, 0.62));
150
+ setColor(palette.Switch, 'secondaryDisabledColor', lighten(palette.secondary.main, 0.62));
151
+ setColor(palette.Switch, 'errorDisabledColor', lighten(palette.error.main, 0.62));
152
+ setColor(palette.Switch, 'infoDisabledColor', lighten(palette.info.main, 0.62));
153
+ setColor(palette.Switch, 'successDisabledColor', lighten(palette.success.main, 0.62));
154
+ setColor(palette.Switch, 'warningDisabledColor', lighten(palette.warning.main, 0.62));
155
+ setColor(palette.TableCell, 'border', lighten(alpha(palette.divider, 1), 0.88));
156
+ setColor(palette.Tooltip, 'bg', alpha(palette.grey[700], 0.92));
157
+ } else {
158
+ setColor(palette.Alert, 'errorColor', lighten(palette.error.light, 0.6));
159
+ setColor(palette.Alert, 'infoColor', lighten(palette.info.light, 0.6));
160
+ setColor(palette.Alert, 'successColor', lighten(palette.success.light, 0.6));
161
+ setColor(palette.Alert, 'warningColor', lighten(palette.warning.light, 0.6));
162
+ setColor(palette.Alert, 'errorFilledBg', getCssVar('palette-error-dark'));
163
+ setColor(palette.Alert, 'infoFilledBg', getCssVar('palette-info-dark'));
164
+ setColor(palette.Alert, 'successFilledBg', getCssVar('palette-success-dark'));
165
+ setColor(palette.Alert, 'warningFilledBg', getCssVar('palette-warning-dark'));
166
+ setColor(palette.Alert, 'errorFilledColor', darkPalette.getContrastText(palette.error.dark));
167
+ setColor(palette.Alert, 'infoFilledColor', darkPalette.getContrastText(palette.info.dark));
168
+ setColor(palette.Alert, 'successFilledColor', darkPalette.getContrastText(palette.success.dark));
169
+ setColor(palette.Alert, 'warningFilledColor', darkPalette.getContrastText(palette.warning.dark));
170
+ setColor(palette.Alert, 'errorStandardBg', darken(palette.error.light, 0.9));
171
+ setColor(palette.Alert, 'infoStandardBg', darken(palette.info.light, 0.9));
172
+ setColor(palette.Alert, 'successStandardBg', darken(palette.success.light, 0.9));
173
+ setColor(palette.Alert, 'warningStandardBg', darken(palette.warning.light, 0.9));
174
+ setColor(palette.Alert, 'errorIconColor', getCssVar('palette-error-main'));
175
+ setColor(palette.Alert, 'infoIconColor', getCssVar('palette-info-main'));
176
+ setColor(palette.Alert, 'successIconColor', getCssVar('palette-success-main'));
177
+ setColor(palette.Alert, 'warningIconColor', getCssVar('palette-warning-main'));
178
+ setColor(palette.AppBar, 'defaultBg', getCssVar('palette-grey-900'));
179
+ setColor(palette.AppBar, 'darkBg', getCssVar('palette-background-paper')); // specific for dark mode
180
+
181
+ setColor(palette.AppBar, 'darkColor', getCssVar('palette-text-primary')); // specific for dark mode
182
+
183
+ setColor(palette.Avatar, 'defaultBg', getCssVar('palette-grey-600'));
184
+ setColor(palette.Chip, 'defaultBorder', getCssVar('palette-grey-700'));
185
+ setColor(palette.Chip, 'defaultAvatarColor', getCssVar('palette-grey-300'));
186
+ setColor(palette.Chip, 'defaultIconColor', getCssVar('palette-grey-300'));
187
+ setColor(palette.FilledInput, 'bg', 'rgba(255, 255, 255, 0.09)');
188
+ setColor(palette.FilledInput, 'hoverBg', 'rgba(255, 255, 255, 0.13)');
189
+ setColor(palette.FilledInput, 'disabledBg', 'rgba(255, 255, 255, 0.12)');
190
+ setColor(palette.LinearProgress, 'primaryBg', darken(palette.primary.main, 0.5));
191
+ setColor(palette.LinearProgress, 'secondaryBg', darken(palette.secondary.main, 0.5));
192
+ setColor(palette.LinearProgress, 'errorBg', darken(palette.error.main, 0.5));
193
+ setColor(palette.LinearProgress, 'infoBg', darken(palette.info.main, 0.5));
194
+ setColor(palette.LinearProgress, 'successBg', darken(palette.success.main, 0.5));
195
+ setColor(palette.LinearProgress, 'warningBg', darken(palette.warning.main, 0.5));
196
+ setColor(palette.Skeleton, 'bg', `rgba(${getCssVar('palette-text-primaryChannel')} / 0.13)`);
197
+ setColor(palette.Slider, 'primaryTrack', darken(palette.primary.main, 0.5));
198
+ setColor(palette.Slider, 'secondaryTrack', darken(palette.secondary.main, 0.5));
199
+ setColor(palette.Slider, 'errorTrack', darken(palette.error.main, 0.5));
200
+ setColor(palette.Slider, 'infoTrack', darken(palette.info.main, 0.5));
201
+ setColor(palette.Slider, 'successTrack', darken(palette.success.main, 0.5));
202
+ setColor(palette.Slider, 'warningTrack', darken(palette.warning.main, 0.5));
203
+ const snackbarContentBackground = emphasize(palette.background.default, 0.98);
204
+ setColor(palette.SnackbarContent, 'bg', snackbarContentBackground);
205
+ setColor(palette.SnackbarContent, 'color', darkPalette.getContrastText(snackbarContentBackground));
206
+ setColor(palette.SpeedDialAction, 'fabHoverBg', emphasize(palette.background.paper, 0.15));
207
+ setColor(palette.StepConnector, 'border', getCssVar('palette-grey-600'));
208
+ setColor(palette.StepContent, 'border', getCssVar('palette-grey-600'));
209
+ setColor(palette.Switch, 'defaultColor', getCssVar('palette-grey-300'));
210
+ setColor(palette.Switch, 'defaultDisabledColor', getCssVar('palette-grey-600'));
211
+ setColor(palette.Switch, 'primaryDisabledColor', darken(palette.primary.main, 0.55));
212
+ setColor(palette.Switch, 'secondaryDisabledColor', darken(palette.secondary.main, 0.55));
213
+ setColor(palette.Switch, 'errorDisabledColor', darken(palette.error.main, 0.55));
214
+ setColor(palette.Switch, 'infoDisabledColor', darken(palette.info.main, 0.55));
215
+ setColor(palette.Switch, 'successDisabledColor', darken(palette.success.main, 0.55));
216
+ setColor(palette.Switch, 'warningDisabledColor', darken(palette.warning.main, 0.55));
217
+ setColor(palette.TableCell, 'border', darken(alpha(palette.divider, 1), 0.68));
218
+ setColor(palette.Tooltip, 'bg', alpha(palette.grey[700], 0.92));
80
219
  }
81
220
 
221
+ palette.common.backgroundChannel = colorChannel(palette.common.background);
222
+ palette.common.onBackgroundChannel = colorChannel(palette.common.onBackground);
223
+ palette.dividerChannel = colorChannel(palette.divider);
82
224
  Object.keys(palette).forEach(color => {
83
225
  const colors = palette[color]; // Color palettes: primary, secondary, error, info, success, and warning
84
226
 
@@ -105,12 +247,16 @@ export default function extendTheme(options = {}, ...args) {
105
247
 
106
248
  if (colors.secondary) {
107
249
  palette[color].secondaryChannel = colorChannel(colors.secondary);
108
- } // Action colors: action.activeChannel
250
+ } // Action colors: action.active, action.selected
109
251
 
110
252
 
111
253
  if (colors.active) {
112
254
  palette[color].activeChannel = colorChannel(colors.active);
113
255
  }
256
+
257
+ if (colors.selected) {
258
+ palette[color].selectedChannel = colorChannel(colors.selected);
259
+ }
114
260
  });
115
261
  });
116
262
  theme = args.reduce((acc, argument) => deepmerge(acc, argument), theme);
package/styles/index.d.ts CHANGED
@@ -94,4 +94,27 @@ export { default as withTheme } from './withTheme';
94
94
  export * from './CssVarsProvider';
95
95
 
96
96
  export { default as experimental_extendTheme } from './experimental_extendTheme';
97
- export * from './experimental_extendTheme';
97
+ export type {
98
+ ColorSchemeOverrides,
99
+ SupportedColorScheme,
100
+ Opacity,
101
+ Overlays,
102
+ PaletteActionChannel,
103
+ PaletteAppBar,
104
+ PaletteAvatar,
105
+ PaletteChip,
106
+ PaletteColorChannel,
107
+ PaletteCommonChannel,
108
+ PaletteFilledInput,
109
+ PaletteLinearProgress,
110
+ PaletteSlider,
111
+ PaletteSnackbarContent,
112
+ PaletteStepConnector,
113
+ PaletteStepContent,
114
+ PaletteSwitch,
115
+ PaletteTableCell,
116
+ PaletteTextChannel,
117
+ PaletteTooltip,
118
+ CssVarsThemeOptions,
119
+ CssVarsTheme,
120
+ } from './experimental_extendTheme';
@@ -0,0 +1,30 @@
1
+ import type {
2
+ CssVarsTheme,
3
+ CssVarsPalette,
4
+ PaletteCommonChannel,
5
+ PaletteColorChannel,
6
+ PaletteTextChannel,
7
+ PaletteActionChannel,
8
+ } from '../styles/experimental_extendTheme';
9
+
10
+ /**
11
+ * Enhance the theme types to include new properties from the CssVarsProvider.
12
+ * The theme is typed with CSS variables in `styled`, `sx`, `useTheme`, etc.
13
+ */
14
+ declare module '@mui/material/styles' {
15
+ // The palette must be extended in each node.
16
+ interface Theme extends Omit<CssVarsTheme, 'palette'> {}
17
+
18
+ // The extended Palette should be in sync with `extendTheme`
19
+ interface Palette extends CssVarsPalette {}
20
+ }
21
+
22
+ declare module '@mui/material/styles/createPalette' {
23
+ interface CommonColors extends PaletteCommonChannel {}
24
+
25
+ interface PaletteColor extends PaletteColorChannel {}
26
+
27
+ interface TypeText extends PaletteTextChannel {}
28
+
29
+ interface TypeAction extends PaletteActionChannel {}
30
+ }
@@ -1 +1 @@
1
- export * from './transition';
1
+ export * from './transition';
@@ -1,13 +1,13 @@
1
- import { TransitionProps as _TransitionProps, TransitionActions } from 'react-transition-group/Transition';
2
- import * as React from 'react';
3
- export declare type TransitionHandlerKeys = 'onEnter' | 'onEntering' | 'onEntered' | 'onExit' | 'onExiting' | 'onExited';
4
- export declare type TransitionHandlerProps = Pick<_TransitionProps, TransitionHandlerKeys>;
5
- export interface EasingProps {
6
- easing: string | {
7
- enter?: string;
8
- exit?: string;
9
- };
10
- }
11
- export declare type TransitionKeys = 'in' | 'mountOnEnter' | 'unmountOnExit' | 'timeout' | 'easing' | 'addEndListener' | TransitionHandlerKeys;
12
- export interface TransitionProps extends TransitionActions, Partial<Pick<_TransitionProps & EasingProps, TransitionKeys>>, React.HTMLAttributes<HTMLElement> {
13
- }
1
+ import { TransitionProps as _TransitionProps, TransitionActions } from 'react-transition-group/Transition';
2
+ import * as React from 'react';
3
+ export declare type TransitionHandlerKeys = 'onEnter' | 'onEntering' | 'onEntered' | 'onExit' | 'onExiting' | 'onExited';
4
+ export declare type TransitionHandlerProps = Pick<_TransitionProps, TransitionHandlerKeys>;
5
+ export interface EasingProps {
6
+ easing: string | {
7
+ enter?: string;
8
+ exit?: string;
9
+ };
10
+ }
11
+ export declare type TransitionKeys = 'in' | 'mountOnEnter' | 'unmountOnExit' | 'timeout' | 'easing' | 'addEndListener' | TransitionHandlerKeys;
12
+ export interface TransitionProps extends TransitionActions, Partial<Pick<_TransitionProps & EasingProps, TransitionKeys>>, React.HTMLAttributes<HTMLElement> {
13
+ }