@mui/material 6.1.3 → 6.1.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.
@@ -18,6 +18,7 @@ var _createTypography = _interopRequireDefault(require("./createTypography"));
18
18
  var _shadows = _interopRequireDefault(require("./shadows"));
19
19
  var _createTransitions = _interopRequireDefault(require("./createTransitions"));
20
20
  var _zIndex = _interopRequireDefault(require("./zIndex"));
21
+ var _stringifyTheme = require("./stringifyTheme");
21
22
  function createThemeNoVars(options = {}, ...args) {
22
23
  const {
23
24
  breakpoints: breakpointsInput,
@@ -87,6 +88,8 @@ function createThemeNoVars(options = {}, ...args) {
87
88
  theme: this
88
89
  });
89
90
  };
91
+ muiTheme.toRuntimeSource = _stringifyTheme.stringifyTheme; // for Pigment CSS integration
92
+
90
93
  return muiTheme;
91
94
  }
92
95
  let warnedOnce = false;
@@ -844,7 +844,6 @@ function useAutocomplete(props) {
844
844
  const handleInputMouseDown = event => {
845
845
  if (!disabledProp && (inputValue === '' || !open)) {
846
846
  handlePopupIndicator(event);
847
- event.stopPropagation();
848
847
  }
849
848
  };
850
849
  let dirty = freeSolo && inputValue.length > 0;
@@ -921,8 +920,7 @@ function useAutocomplete(props) {
921
920
  getPopupIndicatorProps: () => ({
922
921
  tabIndex: -1,
923
922
  type: 'button',
924
- onClick: handlePopupIndicator,
925
- onMouseDown: event => event.stopPropagation()
923
+ onClick: handlePopupIndicator
926
924
  }),
927
925
  getTagProps: ({
928
926
  index
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.version = exports.prerelease = exports.patch = exports.minor = exports.major = exports.default = void 0;
7
- const version = exports.version = "6.1.3";
7
+ const version = exports.version = "6.1.5";
8
8
  const major = exports.major = Number("6");
9
9
  const minor = exports.minor = Number("1");
10
- const patch = exports.patch = Number("3");
10
+ const patch = exports.patch = Number("5");
11
11
  const prerelease = exports.prerelease = undefined;
12
12
  var _default = exports.default = version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/material",
3
- "version": "6.1.3",
3
+ "version": "6.1.5",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "Material UI is an open-source React component library that implements Google's Material Design. It's comprehensive and can be used in production out of the box.",
@@ -27,7 +27,7 @@
27
27
  "url": "https://opencollective.com/mui-org"
28
28
  },
29
29
  "dependencies": {
30
- "@babel/runtime": "^7.25.6",
30
+ "@babel/runtime": "^7.25.7",
31
31
  "@popperjs/core": "^2.11.8",
32
32
  "@types/react-transition-group": "^4.4.11",
33
33
  "clsx": "^2.1.1",
@@ -35,10 +35,10 @@
35
35
  "prop-types": "^15.8.1",
36
36
  "react-is": "^18.3.1",
37
37
  "react-transition-group": "^4.4.5",
38
- "@mui/core-downloads-tracker": "^6.1.3",
39
- "@mui/system": "^6.1.3",
38
+ "@mui/core-downloads-tracker": "^6.1.5",
39
+ "@mui/system": "^6.1.5",
40
40
  "@mui/types": "^7.2.18",
41
- "@mui/utils": "^6.1.3"
41
+ "@mui/utils": "^6.1.5"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@emotion/react": "^11.5.0",
@@ -46,7 +46,7 @@
46
46
  "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
47
47
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0",
48
48
  "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
49
- "@mui/material-pigment-css": "^6.1.3"
49
+ "@mui/material-pigment-css": "^6.1.5"
50
50
  },
51
51
  "peerDependenciesMeta": {
52
52
  "@types/react": {
@@ -9,70 +9,76 @@ import orange from "../colors/orange.js";
9
9
  import blue from "../colors/blue.js";
10
10
  import lightBlue from "../colors/lightBlue.js";
11
11
  import green from "../colors/green.js";
12
- export const light = {
13
- // The colors used to style the text.
14
- text: {
15
- // The most important text.
16
- primary: 'rgba(0, 0, 0, 0.87)',
17
- // Secondary text.
18
- secondary: 'rgba(0, 0, 0, 0.6)',
19
- // Disabled text have even lower visual prominence.
20
- disabled: 'rgba(0, 0, 0, 0.38)'
21
- },
22
- // The color used to divide different elements.
23
- divider: 'rgba(0, 0, 0, 0.12)',
24
- // The background colors used to style the surfaces.
25
- // Consistency between these values is important.
26
- background: {
27
- paper: common.white,
28
- default: common.white
29
- },
30
- // The colors used to style the action elements.
31
- action: {
32
- // The color of an active action like an icon button.
33
- active: 'rgba(0, 0, 0, 0.54)',
34
- // The color of an hovered action.
35
- hover: 'rgba(0, 0, 0, 0.04)',
36
- hoverOpacity: 0.04,
37
- // The color of a selected action.
38
- selected: 'rgba(0, 0, 0, 0.08)',
39
- selectedOpacity: 0.08,
40
- // The color of a disabled action.
41
- disabled: 'rgba(0, 0, 0, 0.26)',
42
- // The background color of a disabled action.
43
- disabledBackground: 'rgba(0, 0, 0, 0.12)',
44
- disabledOpacity: 0.38,
45
- focus: 'rgba(0, 0, 0, 0.12)',
46
- focusOpacity: 0.12,
47
- activatedOpacity: 0.12
48
- }
49
- };
50
- export const dark = {
51
- text: {
52
- primary: common.white,
53
- secondary: 'rgba(255, 255, 255, 0.7)',
54
- disabled: 'rgba(255, 255, 255, 0.5)',
55
- icon: 'rgba(255, 255, 255, 0.5)'
56
- },
57
- divider: 'rgba(255, 255, 255, 0.12)',
58
- background: {
59
- paper: '#121212',
60
- default: '#121212'
61
- },
62
- action: {
63
- active: common.white,
64
- hover: 'rgba(255, 255, 255, 0.08)',
65
- hoverOpacity: 0.08,
66
- selected: 'rgba(255, 255, 255, 0.16)',
67
- selectedOpacity: 0.16,
68
- disabled: 'rgba(255, 255, 255, 0.3)',
69
- disabledBackground: 'rgba(255, 255, 255, 0.12)',
70
- disabledOpacity: 0.38,
71
- focus: 'rgba(255, 255, 255, 0.12)',
72
- focusOpacity: 0.12,
73
- activatedOpacity: 0.24
74
- }
75
- };
12
+ function getLight() {
13
+ return {
14
+ // The colors used to style the text.
15
+ text: {
16
+ // The most important text.
17
+ primary: 'rgba(0, 0, 0, 0.87)',
18
+ // Secondary text.
19
+ secondary: 'rgba(0, 0, 0, 0.6)',
20
+ // Disabled text have even lower visual prominence.
21
+ disabled: 'rgba(0, 0, 0, 0.38)'
22
+ },
23
+ // The color used to divide different elements.
24
+ divider: 'rgba(0, 0, 0, 0.12)',
25
+ // The background colors used to style the surfaces.
26
+ // Consistency between these values is important.
27
+ background: {
28
+ paper: common.white,
29
+ default: common.white
30
+ },
31
+ // The colors used to style the action elements.
32
+ action: {
33
+ // The color of an active action like an icon button.
34
+ active: 'rgba(0, 0, 0, 0.54)',
35
+ // The color of an hovered action.
36
+ hover: 'rgba(0, 0, 0, 0.04)',
37
+ hoverOpacity: 0.04,
38
+ // The color of a selected action.
39
+ selected: 'rgba(0, 0, 0, 0.08)',
40
+ selectedOpacity: 0.08,
41
+ // The color of a disabled action.
42
+ disabled: 'rgba(0, 0, 0, 0.26)',
43
+ // The background color of a disabled action.
44
+ disabledBackground: 'rgba(0, 0, 0, 0.12)',
45
+ disabledOpacity: 0.38,
46
+ focus: 'rgba(0, 0, 0, 0.12)',
47
+ focusOpacity: 0.12,
48
+ activatedOpacity: 0.12
49
+ }
50
+ };
51
+ }
52
+ export const light = getLight();
53
+ function getDark() {
54
+ return {
55
+ text: {
56
+ primary: common.white,
57
+ secondary: 'rgba(255, 255, 255, 0.7)',
58
+ disabled: 'rgba(255, 255, 255, 0.5)',
59
+ icon: 'rgba(255, 255, 255, 0.5)'
60
+ },
61
+ divider: 'rgba(255, 255, 255, 0.12)',
62
+ background: {
63
+ paper: '#121212',
64
+ default: '#121212'
65
+ },
66
+ action: {
67
+ active: common.white,
68
+ hover: 'rgba(255, 255, 255, 0.08)',
69
+ hoverOpacity: 0.08,
70
+ selected: 'rgba(255, 255, 255, 0.16)',
71
+ selectedOpacity: 0.16,
72
+ disabled: 'rgba(255, 255, 255, 0.3)',
73
+ disabledBackground: 'rgba(255, 255, 255, 0.12)',
74
+ disabledOpacity: 0.38,
75
+ focus: 'rgba(255, 255, 255, 0.12)',
76
+ focusOpacity: 0.12,
77
+ activatedOpacity: 0.24
78
+ }
79
+ };
80
+ }
81
+ export const dark = getDark();
76
82
  function addLightOrDark(intent, direction, shade, tonalOffset) {
77
83
  const tonalOffsetLight = tonalOffset.light || tonalOffset;
78
84
  const tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;
@@ -224,12 +230,14 @@ export default function createPalette(palette) {
224
230
  }
225
231
  return color;
226
232
  };
227
- const modes = {
228
- dark,
229
- light
230
- };
233
+ let modeHydrated;
234
+ if (mode === 'light') {
235
+ modeHydrated = getLight();
236
+ } else if (mode === 'dark') {
237
+ modeHydrated = getDark();
238
+ }
231
239
  if (process.env.NODE_ENV !== 'production') {
232
- if (!modes[mode]) {
240
+ if (!modeHydrated) {
233
241
  console.error(`MUI: The palette mode \`${mode}\` is not supported.`);
234
242
  }
235
243
  }
@@ -288,7 +296,7 @@ export default function createPalette(palette) {
288
296
  // E.g., shift from Red 500 to Red 300 or Red 700.
289
297
  tonalOffset,
290
298
  // The light and dark mode object.
291
- ...modes[mode]
299
+ ...modeHydrated
292
300
  }, other);
293
301
  return paletteOutput;
294
302
  }
@@ -9,6 +9,7 @@ import createTypography from "./createTypography.js";
9
9
  import shadows from "./shadows.js";
10
10
  import createTransitions from "./createTransitions.js";
11
11
  import zIndex from "./zIndex.js";
12
+ import { stringifyTheme } from "./stringifyTheme.js";
12
13
  function createThemeNoVars(options = {}, ...args) {
13
14
  const {
14
15
  breakpoints: breakpointsInput,
@@ -78,6 +79,8 @@ function createThemeNoVars(options = {}, ...args) {
78
79
  theme: this
79
80
  });
80
81
  };
82
+ muiTheme.toRuntimeSource = stringifyTheme; // for Pigment CSS integration
83
+
81
84
  return muiTheme;
82
85
  }
83
86
  let warnedOnce = false;
@@ -838,7 +838,6 @@ function useAutocomplete(props) {
838
838
  const handleInputMouseDown = event => {
839
839
  if (!disabledProp && (inputValue === '' || !open)) {
840
840
  handlePopupIndicator(event);
841
- event.stopPropagation();
842
841
  }
843
842
  };
844
843
  let dirty = freeSolo && inputValue.length > 0;
@@ -915,8 +914,7 @@ function useAutocomplete(props) {
915
914
  getPopupIndicatorProps: () => ({
916
915
  tabIndex: -1,
917
916
  type: 'button',
918
- onClick: handlePopupIndicator,
919
- onMouseDown: event => event.stopPropagation()
917
+ onClick: handlePopupIndicator
920
918
  }),
921
919
  getTagProps: ({
922
920
  index
package/version/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export const version = "6.1.3";
1
+ export const version = "6.1.5";
2
2
  export const major = Number("6");
3
3
  export const minor = Number("1");
4
- export const patch = Number("3");
4
+ export const patch = Number("5");
5
5
  export const prerelease = undefined;
6
6
  export default version;