@mui/material 7.3.3 → 7.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 7.3.4
4
+
5
+ <!-- generated comparing v7.3.3..master -->
6
+
7
+ _Oct 2, 2025_
8
+
9
+ A big thanks to the 3 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ Small update to revert a change that broke the `<Tabs>` component. Also publishing a beta version of `@mui/lab` which was accidentally published as a stable release.
12
+
13
+ ### `@mui/material@7.3.4`
14
+
15
+ - [Tabs] Revert "Fix not scrolling to correct tab after refresh when auto scrollable (#46869)" (#47014) @ZeeshanTamboli
16
+
17
+ ### Docs
18
+
19
+ - Sort package manager automatically (#46897) @Janpot
20
+
21
+ ### Core
22
+
23
+ - Bring @mui/lab back to unstable version (#47012) @Janpot
24
+ - Fix `ThemeOptions` and `createTheme*` cyclic dependency (#47007) @siriwatknp
25
+
26
+ All contributors of this release in alphabetical order: @Janpot, @siriwatknp, @ZeeshanTamboli
27
+
3
28
  ## 7.3.3
4
29
 
5
30
  <!-- generated comparing v7.3.2..master -->
package/Tabs/Tabs.js CHANGED
@@ -645,11 +645,6 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
645
645
  }
646
646
  return undefined;
647
647
  }, [scrollable, scrollButtons, updateScrollObserver, childrenProp?.length]);
648
- React.useEffect(() => {
649
- if (scrollable && scrollButtons === 'auto' && (displayEndScroll || displayStartScroll)) {
650
- scrollSelectedIntoView(true);
651
- }
652
- }, [displayEndScroll, displayStartScroll, scrollable, scrollButtons, scrollSelectedIntoView]);
653
648
  React.useEffect(() => {
654
649
  setMounted(true);
655
650
  }, []);
package/esm/Tabs/Tabs.js CHANGED
@@ -638,11 +638,6 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
638
638
  }
639
639
  return undefined;
640
640
  }, [scrollable, scrollButtons, updateScrollObserver, childrenProp?.length]);
641
- React.useEffect(() => {
642
- if (scrollable && scrollButtons === 'auto' && (displayEndScroll || displayStartScroll)) {
643
- scrollSelectedIntoView(true);
644
- }
645
- }, [displayEndScroll, displayStartScroll, scrollable, scrollButtons, scrollSelectedIntoView]);
646
641
  React.useEffect(() => {
647
642
  setMounted(true);
648
643
  }, []);
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v7.3.3
2
+ * @mui/material v7.3.4
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -1,14 +1,22 @@
1
+ import { PaletteOptions } from "./createPalette.js";
2
+ import { ColorSystemOptions } from "./createThemeFoundation.js";
1
3
  import { CssVarsThemeOptions } from "./createThemeWithVars.js";
2
- import { Theme, ThemeOptions } from "./createThemeNoVars.js";
3
- export type { ThemeOptions, Theme, CssThemeVariables } from "./createThemeNoVars.js";
4
+ import { Theme, CssThemeVariables } from "./createThemeNoVars.js";
5
+ export type { Theme, CssThemeVariables } from "./createThemeNoVars.js";
6
+ type CssVarsOptions = CssThemeVariables extends {
7
+ enabled: true;
8
+ } ? ColorSystemOptions : {};
9
+ type CssVarsConfigList = 'colorSchemeSelector' | 'rootSelector' | 'disableCssColorScheme' | 'cssVarPrefix' | 'shouldSkipGeneratingVar' | 'nativeColor';
10
+ export interface ThemeOptions extends CssVarsOptions, Omit<CssVarsThemeOptions, CssVarsConfigList> {
11
+ cssVariables?: boolean | Pick<CssVarsThemeOptions, CssVarsConfigList>;
12
+ palette?: PaletteOptions;
13
+ }
4
14
  /**
5
15
  * Generate a theme base on the options received.
6
16
  * @param options Takes an incomplete theme object and adds the missing parts.
7
17
  * @param args Deep merge the arguments with the about to be returned theme.
8
18
  * @returns A complete, ready-to-use theme object.
9
19
  */
10
- export default function createTheme(options?: Omit<ThemeOptions, 'components'> & Pick<CssVarsThemeOptions, 'defaultColorScheme' | 'colorSchemes' | 'components'> & {
11
- cssVariables?: boolean | Pick<CssVarsThemeOptions, 'colorSchemeSelector' | 'rootSelector' | 'disableCssColorScheme' | 'cssVarPrefix' | 'shouldSkipGeneratingVar' | 'nativeColor'>;
12
- },
20
+ export default function createTheme(options?: ThemeOptions,
13
21
  // cast type to skip module augmentation test
14
22
  ...args: object[]): Theme;
@@ -0,0 +1,277 @@
1
+ import { OverridableStringUnion } from '@mui/types';
2
+ import { SxConfig, SxProps, CSSObject, ApplyStyles, Theme as SystemTheme } from '@mui/system';
3
+ import { ExtractTypographyTokens } from '@mui/system/cssVars';
4
+ import { Palette, PaletteOptions } from "./createPalette.js";
5
+ import { Shadows } from "./shadows.js";
6
+ import { Transitions } from "./createTransitions.js";
7
+ import { Mixins } from "./createMixins.js";
8
+ import { TypographyVariants } from "./createTypography.js";
9
+ import { ZIndex } from "./zIndex.js";
10
+ /**
11
+ * default MD color-schemes
12
+ */
13
+ export type DefaultColorScheme = 'light' | 'dark';
14
+ /**
15
+ * The application can add more color-scheme by extending this interface via module augmentation
16
+ *
17
+ * Ex.
18
+ * declare module @mui/material/styles {
19
+ * interface ColorSchemeOverrides {
20
+ * foo: true;
21
+ * }
22
+ * }
23
+ *
24
+ * // SupportedColorScheme = 'light' | 'dark' | 'foo';
25
+ */
26
+ export interface ColorSchemeOverrides {}
27
+ export type ExtendedColorScheme = OverridableStringUnion<never, ColorSchemeOverrides>;
28
+ /**
29
+ * All color-schemes that the application has
30
+ */
31
+ export type SupportedColorScheme = DefaultColorScheme | ExtendedColorScheme;
32
+ export interface Opacity {
33
+ inputPlaceholder: number;
34
+ inputUnderline: number;
35
+ switchTrackDisabled: number;
36
+ switchTrack: number;
37
+ }
38
+ export type Overlays = [string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined];
39
+ export interface PaletteBackgroundChannel {
40
+ defaultChannel: string;
41
+ paperChannel: string;
42
+ }
43
+ export interface PaletteCommonChannel {
44
+ background: string;
45
+ backgroundChannel: string;
46
+ onBackground: string;
47
+ onBackgroundChannel: string;
48
+ }
49
+ export interface PaletteColorChannel {
50
+ mainChannel: string;
51
+ lightChannel: string;
52
+ darkChannel: string;
53
+ contrastTextChannel: string;
54
+ }
55
+ export interface PaletteActionChannel {
56
+ activeChannel: string;
57
+ selectedChannel: string;
58
+ }
59
+ export interface PaletteTextChannel {
60
+ primaryChannel: string;
61
+ secondaryChannel: string;
62
+ }
63
+ export interface PaletteAlert {
64
+ errorColor: string;
65
+ infoColor: string;
66
+ successColor: string;
67
+ warningColor: string;
68
+ errorFilledBg: string;
69
+ infoFilledBg: string;
70
+ successFilledBg: string;
71
+ warningFilledBg: string;
72
+ errorFilledColor: string;
73
+ infoFilledColor: string;
74
+ successFilledColor: string;
75
+ warningFilledColor: string;
76
+ errorStandardBg: string;
77
+ infoStandardBg: string;
78
+ successStandardBg: string;
79
+ warningStandardBg: string;
80
+ errorIconColor: string;
81
+ infoIconColor: string;
82
+ successIconColor: string;
83
+ warningIconColor: string;
84
+ }
85
+ export interface PaletteAppBar {
86
+ defaultBg: string;
87
+ darkBg: string;
88
+ darkColor: string;
89
+ }
90
+ export interface PaletteAvatar {
91
+ defaultBg: string;
92
+ }
93
+ export interface PaletteButton {
94
+ inheritContainedBg: string;
95
+ inheritContainedHoverBg: string;
96
+ }
97
+ export interface PaletteChip {
98
+ defaultBorder: string;
99
+ defaultAvatarColor: string;
100
+ defaultIconColor: string;
101
+ }
102
+ export interface PaletteFilledInput {
103
+ bg: string;
104
+ hoverBg: string;
105
+ disabledBg: string;
106
+ }
107
+ export interface PaletteLinearProgress {
108
+ primaryBg: string;
109
+ secondaryBg: string;
110
+ errorBg: string;
111
+ infoBg: string;
112
+ successBg: string;
113
+ warningBg: string;
114
+ }
115
+ export interface PaletteSkeleton {
116
+ bg: string;
117
+ }
118
+ export interface PaletteSlider {
119
+ primaryTrack: string;
120
+ secondaryTrack: string;
121
+ errorTrack: string;
122
+ infoTrack: string;
123
+ successTrack: string;
124
+ warningTrack: string;
125
+ }
126
+ export interface PaletteSnackbarContent {
127
+ bg: string;
128
+ color: string;
129
+ }
130
+ export interface PaletteSpeedDialAction {
131
+ fabHoverBg: string;
132
+ }
133
+ export interface PaletteStepConnector {
134
+ border: string;
135
+ }
136
+ export interface PaletteStepContent {
137
+ border: string;
138
+ }
139
+ export interface PaletteSwitch {
140
+ defaultColor: string;
141
+ defaultDisabledColor: string;
142
+ primaryDisabledColor: string;
143
+ secondaryDisabledColor: string;
144
+ errorDisabledColor: string;
145
+ infoDisabledColor: string;
146
+ successDisabledColor: string;
147
+ warningDisabledColor: string;
148
+ }
149
+ export interface PaletteTableCell {
150
+ border: string;
151
+ }
152
+ export interface PaletteTooltip {
153
+ bg: string;
154
+ }
155
+ export interface ColorSystemOptions {
156
+ palette?: PaletteOptions & {
157
+ background?: Partial<PaletteBackgroundChannel>;
158
+ common?: Partial<PaletteCommonChannel>;
159
+ primary?: Partial<PaletteColorChannel>;
160
+ secondary?: Partial<PaletteColorChannel>;
161
+ error?: Partial<PaletteColorChannel>;
162
+ info?: Partial<PaletteColorChannel>;
163
+ success?: Partial<PaletteColorChannel>;
164
+ text?: Partial<PaletteTextChannel>;
165
+ dividerChannel?: Partial<string>;
166
+ action?: Partial<PaletteActionChannel>;
167
+ Alert?: Partial<PaletteAlert>;
168
+ AppBar?: Partial<PaletteAppBar>;
169
+ Avatar?: Partial<PaletteAvatar>;
170
+ Button?: Partial<PaletteButton>;
171
+ Chip?: Partial<PaletteChip>;
172
+ FilledInput?: Partial<PaletteFilledInput>;
173
+ LinearProgress?: Partial<PaletteLinearProgress>;
174
+ Skeleton?: Partial<PaletteSkeleton>;
175
+ Slider?: Partial<PaletteSlider>;
176
+ SnackbarContent?: Partial<PaletteSnackbarContent>;
177
+ SpeedDialAction?: Partial<PaletteSpeedDialAction>;
178
+ StepConnector?: Partial<PaletteStepConnector>;
179
+ StepContent?: Partial<PaletteStepContent>;
180
+ Switch?: Partial<PaletteSwitch>;
181
+ TableCell?: Partial<PaletteTableCell>;
182
+ Tooltip?: Partial<PaletteTooltip>;
183
+ };
184
+ opacity?: Partial<Opacity>;
185
+ overlays?: Overlays;
186
+ }
187
+ export interface CssVarsPalette {
188
+ common: PaletteCommonChannel;
189
+ primary: PaletteColorChannel;
190
+ secondary: PaletteColorChannel;
191
+ error: PaletteColorChannel;
192
+ info: PaletteColorChannel;
193
+ success: PaletteColorChannel;
194
+ warning: PaletteColorChannel;
195
+ text: PaletteTextChannel;
196
+ background: PaletteBackgroundChannel;
197
+ dividerChannel: string;
198
+ action: PaletteActionChannel;
199
+ Alert: PaletteAlert;
200
+ AppBar: PaletteAppBar;
201
+ Avatar: PaletteAvatar;
202
+ Button: PaletteButton;
203
+ Chip: PaletteChip;
204
+ FilledInput: PaletteFilledInput;
205
+ LinearProgress: PaletteLinearProgress;
206
+ Skeleton: PaletteSkeleton;
207
+ Slider: PaletteSlider;
208
+ SnackbarContent: PaletteSnackbarContent;
209
+ SpeedDialAction: PaletteSpeedDialAction;
210
+ StepConnector: PaletteStepConnector;
211
+ StepContent: PaletteStepContent;
212
+ Switch: PaletteSwitch;
213
+ TableCell: PaletteTableCell;
214
+ Tooltip: PaletteTooltip;
215
+ }
216
+ export interface ColorSystem {
217
+ palette: Palette & CssVarsPalette;
218
+ opacity: Opacity;
219
+ overlays: Overlays;
220
+ }
221
+ export interface ThemeVars {
222
+ font: ExtractTypographyTokens<TypographyVariants>;
223
+ palette: Omit<ColorSystem['palette'], 'colorScheme' | 'mode' | 'contrastThreshold' | 'tonalOffset' | 'getContrastText' | 'augmentColor'>;
224
+ opacity: Opacity;
225
+ overlays: Overlays;
226
+ shadows: Shadows;
227
+ shape: SystemTheme['shape'];
228
+ spacing: string;
229
+ zIndex: ZIndex;
230
+ }
231
+ type Split<T, K extends keyof T = keyof T> = K extends string | number ? { [k in K]: Exclude<T[K], undefined> } : never;
232
+ type ConcatDeep<T> = T extends Record<string | number, infer V> ? keyof T extends string | number ? V extends string | number ? keyof T : keyof V extends string | number ? `${keyof T}-${ConcatDeep<Split<V>>}` : never : never : never;
233
+ /**
234
+ * Does not work for these cases:
235
+ * - { borderRadius: string | number } // the value can't be a union
236
+ * - { shadows: [string, string, ..., string] } // the value can't be an array
237
+ */
238
+ type NormalizeVars<T> = ConcatDeep<Split<T>>;
239
+ export {};
240
+ export interface ThemeCssVarOverrides {}
241
+ export type ThemeCssVar = OverridableStringUnion<NormalizeVars<Omit<ThemeVars, 'overlays' | 'shadows' | 'shape'>> | 'shape-borderRadius' | 'shadows-0' | 'shadows-1' | 'shadows-2' | 'shadows-3' | 'shadows-4' | 'shadows-5' | 'shadows-6' | 'shadows-7' | 'shadows-8' | 'shadows-9' | 'shadows-10' | 'shadows-11' | 'shadows-12' | 'shadows-13' | 'shadows-14' | 'shadows-15' | 'shadows-16' | 'shadows-17' | 'shadows-18' | 'shadows-19' | 'shadows-20' | 'shadows-21' | 'shadows-22' | 'shadows-23' | 'shadows-24' | 'overlays-0' | 'overlays-1' | 'overlays-2' | 'overlays-3' | 'overlays-4' | 'overlays-5' | 'overlays-6' | 'overlays-7' | 'overlays-8' | 'overlays-9' | 'overlays-10' | 'overlays-11' | 'overlays-12' | 'overlays-13' | 'overlays-14' | 'overlays-15' | 'overlays-16' | 'overlays-17' | 'overlays-18' | 'overlays-19' | 'overlays-20' | 'overlays-21' | 'overlays-22' | 'overlays-23' | 'overlays-24', ThemeCssVarOverrides>;
242
+ /**
243
+ * Theme properties generated by extendTheme and CssVarsProvider
244
+ */
245
+ export interface CssVarsTheme extends ColorSystem {
246
+ colorSchemes: Partial<Record<SupportedColorScheme, ColorSystem>>;
247
+ rootSelector: string;
248
+ colorSchemeSelector: 'media' | 'class' | 'data' | string;
249
+ cssVarPrefix: string;
250
+ defaultColorScheme: SupportedColorScheme;
251
+ vars: ThemeVars;
252
+ getCssVar: (field: ThemeCssVar, ...vars: ThemeCssVar[]) => string;
253
+ getColorSchemeSelector: (colorScheme: SupportedColorScheme) => string;
254
+ generateThemeVars: () => ThemeVars;
255
+ generateStyleSheets: () => Array<Record<string, any>>;
256
+ generateSpacing: () => SystemTheme['spacing'];
257
+ spacing: SystemTheme['spacing'];
258
+ breakpoints: SystemTheme['breakpoints'];
259
+ shape: SystemTheme['shape'];
260
+ typography: TypographyVariants;
261
+ transitions: Transitions;
262
+ shadows: Shadows;
263
+ mixins: Mixins;
264
+ zIndex: ZIndex;
265
+ direction: SystemTheme['direction'];
266
+ /**
267
+ * A function to determine if the key, value should be attached as CSS Variable
268
+ * `keys` is an array that represents the object path keys.
269
+ * Ex, if the theme is { foo: { bar: 'var(--test)' } }
270
+ * then, keys = ['foo', 'bar']
271
+ * value = 'var(--test)'
272
+ */
273
+ shouldSkipGeneratingVar: (keys: string[], value: string | number) => boolean;
274
+ unstable_sxConfig: SxConfig;
275
+ unstable_sx: (props: SxProps<CssVarsTheme>) => CSSObject;
276
+ applyStyles: ApplyStyles<SupportedColorScheme>;
277
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * default MD color-schemes
3
+ */
4
+
5
+ /**
6
+ * The application can add more color-scheme by extending this interface via module augmentation
7
+ *
8
+ * Ex.
9
+ * declare module @mui/material/styles {
10
+ * interface ColorSchemeOverrides {
11
+ * foo: true;
12
+ * }
13
+ * }
14
+ *
15
+ * // SupportedColorScheme = 'light' | 'dark' | 'foo';
16
+ */
17
+
18
+ /**
19
+ * All color-schemes that the application has
20
+ */
21
+
22
+ // The Palette should be sync with `../themeCssVarsAugmentation/index.d.ts`
23
+
24
+ // should not include keys defined in `shouldSkipGeneratingVar` and have value typeof function
25
+
26
+ /**
27
+ * Does not work for these cases:
28
+ * - { borderRadius: string | number } // the value can't be a union
29
+ * - { shadows: [string, string, ..., string] } // the value can't be an array
30
+ */
31
+
32
+ // shut off automatic exporting for the Generics above
33
+ export {};
34
+
35
+ /**
36
+ * Theme properties generated by extendTheme and CssVarsProvider
37
+ */
@@ -6,7 +6,7 @@ import { Shadows } from "./shadows.js";
6
6
  import { Transitions, TransitionsOptions } from "./createTransitions.js";
7
7
  import { ZIndex, ZIndexOptions } from "./zIndex.js";
8
8
  import { Components } from "./components.js";
9
- import { CssVarsTheme, CssVarsPalette, ColorSystemOptions } from "./createThemeWithVars.js";
9
+ import { CssVarsTheme, CssVarsPalette, ColorSystemOptions } from "./createThemeFoundation.js";
10
10
 
11
11
  /**
12
12
  * To disable custom properties, use module augmentation