@mui/material 6.1.4 → 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.
@@ -533,7 +533,6 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
533
533
  const classes = useUtilityClasses(ownerState);
534
534
  const externalForwardedProps = {
535
535
  slots: {
536
- listbox: ListboxComponentProp,
537
536
  paper: PaperComponentProp,
538
537
  popper: PopperComponentProp,
539
538
  ...slots
@@ -546,7 +545,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
546
545
  }
547
546
  };
548
547
  const [ListboxSlot, listboxProps] = useSlot('listbox', {
549
- elementType: 'ul',
548
+ elementType: AutocompleteListbox,
550
549
  externalForwardedProps,
551
550
  ownerState,
552
551
  className: classes.listbox,
@@ -662,8 +661,12 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
662
661
  });
663
662
  let autocompletePopper = null;
664
663
  if (groupedOptions.length > 0) {
665
- autocompletePopper = renderAutocompletePopperChildren(/*#__PURE__*/_jsx(AutocompleteListbox, {
666
- as: ListboxSlot,
664
+ autocompletePopper = renderAutocompletePopperChildren(
665
+ /*#__PURE__*/
666
+ // TODO v7: remove `as` prop and move ListboxComponentProp to externalForwardedProps or remove ListboxComponentProp entirely
667
+ // https://github.com/mui/material-ui/pull/43994#issuecomment-2401945800
668
+ _jsx(ListboxSlot, {
669
+ as: ListboxComponentProp,
667
670
  ...listboxProps,
668
671
  children: groupedOptions.map((option, index) => {
669
672
  if (groupBy) {
@@ -710,7 +713,11 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
710
713
  ref: setAnchorEl,
711
714
  className: classes.inputRoot,
712
715
  startAdornment,
713
- onMouseDown: event => handleInputMouseDown(event),
716
+ onMouseDown: event => {
717
+ if (event.target === event.currentTarget) {
718
+ handleInputMouseDown(event);
719
+ }
720
+ },
714
721
  ...((hasClearIcon || hasPopupIcon) && {
715
722
  endAdornment: /*#__PURE__*/_jsxs(AutocompleteEndAdornment, {
716
723
  className: classes.endAdornment,
package/CHANGELOG.md CHANGED
@@ -1,5 +1,53 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 6.1.5
4
+
5
+ <!-- generated comparing v6.1.4..master -->
6
+
7
+ _Oct 22, 2024_
8
+
9
+ A big thanks to the 9 contributors who made this release possible.
10
+
11
+ ### `@mui/material@6.1.5`
12
+
13
+ - [Autocomplete] Fix bug with child chip button events propagating to parent (#43982) @snapwich
14
+ - [Autocomplete] Fix Autocomplete crashing if ownerState is used in styleOverrides (#43994) @sai6855
15
+ - [Checkbox] Fix disableRipple regression (#44099) @siriwatknp
16
+ - [Dialog] Add the aria-modal="true" by default (#44118) @mnajdova
17
+ - [IconButton] Fix disableRipple behavior when disableRipple is set in MuiButtonBase theme (#43714) @sai6855
18
+ - [pigment-css] Support project without enabling CSS variables (#44171) @siriwatknp
19
+ - Make the palette always return new light and dark object (#44059) @siriwatknp
20
+
21
+ ### `@mui/system@6.1.5`
22
+
23
+ - Add `defaultMode` to `InitColorSchemeScript` (#44139) @siriwatknp
24
+
25
+ ### `@mui/codemod@6.1.5`
26
+
27
+ - [Grid2] Add removal `zeroMinWidth` prop to codemod (#44178) @sai6855
28
+
29
+ ### Docs
30
+
31
+ - [material-ui][FormControlLabel] Don't use unintuitive label position on chec… (#44119) @mnajdova
32
+ - [material-ui][TextField] Dynamically modify the eye password button aria-label (#44122) @ChinoUkaegbu
33
+ - [icons] Run pnpm docs:mdicons:synonyms (#44098) @oliviertassinari
34
+ - [joy-ui] Update Overview copy to match Readme (#44136) @samuelsycamore
35
+ - Add CodeSandbox/Stackblitz to the rest of the templates (#43708) @siriwatknp
36
+ - Update Figma link to fix 301 (a7b7d9c) @oliviertassinari
37
+ - Link Toolpad from Core repo (#44111) @prakhargupta1
38
+ - Remove HighlightedCode max-width (#43731) @Janpot
39
+
40
+ ### Core
41
+
42
+ - [code-infra] Widen eslint file patterns (#44148) @Janpot
43
+ - [code-infra] Fix icon builder tests (#44143) @Janpot
44
+ - [code-infra] Fix dependabot vulnerabilities (#44124) @Janpot
45
+ - [core] Reference commits in changelog when no PR (#44115) @oliviertassinari
46
+ - [examples] Fix Pigment CSS Vite example (#44074) @oliviertassinari
47
+ - Fix fast-xml-parser vulnerability (#44121) @Janpot
48
+
49
+ All contributors of this release in alphabetical order: @ChinoUkaegbu, @Janpot, @mnajdova, @oliviertassinari, @prakhargupta1, @sai6855, @samuelsycamore, @siriwatknp, @snapwich
50
+
3
51
  ## v6.1.4
4
52
 
5
53
  <!-- generated comparing v6.1.3..master -->
@@ -15,6 +15,12 @@ export interface DialogProps extends StandardProps<ModalProps, 'children'> {
15
15
  * The id(s) of the element(s) that label the dialog.
16
16
  */
17
17
  'aria-labelledby'?: string;
18
+ /**
19
+ * Informs assistive technologies that the element is modal.
20
+ * It's added on the element with role="dialog".
21
+ * @default true
22
+ */
23
+ 'aria-modal'?: boolean | 'true' | 'false';
18
24
  /**
19
25
  * Dialog children, usually the included sub-components.
20
26
  */
package/Dialog/Dialog.js CHANGED
@@ -202,6 +202,7 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
202
202
  const {
203
203
  'aria-describedby': ariaDescribedby,
204
204
  'aria-labelledby': ariaLabelledbyProp,
205
+ 'aria-modal': ariaModal = true,
205
206
  BackdropComponent,
206
207
  BackdropProps,
207
208
  children,
@@ -296,6 +297,7 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
296
297
  role: "dialog",
297
298
  "aria-describedby": ariaDescribedby,
298
299
  "aria-labelledby": ariaLabelledby,
300
+ "aria-modal": ariaModal,
299
301
  ...PaperProps,
300
302
  className: clsx(classes.paper, PaperProps.className),
301
303
  ownerState: ownerState,
@@ -321,6 +323,12 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes /* remove-proptypes */
321
323
  * The id(s) of the element(s) that label the dialog.
322
324
  */
323
325
  'aria-labelledby': PropTypes.string,
326
+ /**
327
+ * Informs assistive technologies that the element is modal.
328
+ * It's added on the element with role="dialog".
329
+ * @default true
330
+ */
331
+ 'aria-modal': PropTypes.oneOfType([PropTypes.oneOf(['false', 'true']), PropTypes.bool]),
324
332
  /**
325
333
  * A backdrop component. This prop enables custom backdrop rendering.
326
334
  * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.1.4
2
+ * @mui/material v6.1.5
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -533,7 +533,6 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
533
533
  const classes = useUtilityClasses(ownerState);
534
534
  const externalForwardedProps = {
535
535
  slots: {
536
- listbox: ListboxComponentProp,
537
536
  paper: PaperComponentProp,
538
537
  popper: PopperComponentProp,
539
538
  ...slots
@@ -546,7 +545,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
546
545
  }
547
546
  };
548
547
  const [ListboxSlot, listboxProps] = useSlot('listbox', {
549
- elementType: 'ul',
548
+ elementType: AutocompleteListbox,
550
549
  externalForwardedProps,
551
550
  ownerState,
552
551
  className: classes.listbox,
@@ -662,8 +661,12 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
662
661
  });
663
662
  let autocompletePopper = null;
664
663
  if (groupedOptions.length > 0) {
665
- autocompletePopper = renderAutocompletePopperChildren(/*#__PURE__*/_jsx(AutocompleteListbox, {
666
- as: ListboxSlot,
664
+ autocompletePopper = renderAutocompletePopperChildren(
665
+ /*#__PURE__*/
666
+ // TODO v7: remove `as` prop and move ListboxComponentProp to externalForwardedProps or remove ListboxComponentProp entirely
667
+ // https://github.com/mui/material-ui/pull/43994#issuecomment-2401945800
668
+ _jsx(ListboxSlot, {
669
+ as: ListboxComponentProp,
667
670
  ...listboxProps,
668
671
  children: groupedOptions.map((option, index) => {
669
672
  if (groupBy) {
@@ -710,7 +713,11 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
710
713
  ref: setAnchorEl,
711
714
  className: classes.inputRoot,
712
715
  startAdornment,
713
- onMouseDown: event => handleInputMouseDown(event),
716
+ onMouseDown: event => {
717
+ if (event.target === event.currentTarget) {
718
+ handleInputMouseDown(event);
719
+ }
720
+ },
714
721
  ...((hasClearIcon || hasPopupIcon) && {
715
722
  endAdornment: /*#__PURE__*/_jsxs(AutocompleteEndAdornment, {
716
723
  className: classes.endAdornment,
@@ -202,6 +202,7 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
202
202
  const {
203
203
  'aria-describedby': ariaDescribedby,
204
204
  'aria-labelledby': ariaLabelledbyProp,
205
+ 'aria-modal': ariaModal = true,
205
206
  BackdropComponent,
206
207
  BackdropProps,
207
208
  children,
@@ -296,6 +297,7 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
296
297
  role: "dialog",
297
298
  "aria-describedby": ariaDescribedby,
298
299
  "aria-labelledby": ariaLabelledby,
300
+ "aria-modal": ariaModal,
299
301
  ...PaperProps,
300
302
  className: clsx(classes.paper, PaperProps.className),
301
303
  ownerState: ownerState,
@@ -321,6 +323,12 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes /* remove-proptypes */
321
323
  * The id(s) of the element(s) that label the dialog.
322
324
  */
323
325
  'aria-labelledby': PropTypes.string,
326
+ /**
327
+ * Informs assistive technologies that the element is modal.
328
+ * It's added on the element with role="dialog".
329
+ * @default true
330
+ */
331
+ 'aria-modal': PropTypes.oneOfType([PropTypes.oneOf(['false', 'true']), PropTypes.bool]),
324
332
  /**
325
333
  * A backdrop component. This prop enables custom backdrop rendering.
326
334
  * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.1.4
2
+ * @mui/material v6.1.5
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -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
@@ -1,6 +1,6 @@
1
- export const version = "6.1.4";
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("4");
4
+ export const patch = Number("5");
5
5
  export const prerelease = undefined;
6
6
  export default version;
@@ -545,7 +545,6 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
545
545
  const classes = useUtilityClasses(ownerState);
546
546
  const externalForwardedProps = {
547
547
  slots: {
548
- listbox: ListboxComponentProp,
549
548
  paper: PaperComponentProp,
550
549
  popper: PopperComponentProp,
551
550
  ...slots
@@ -558,7 +557,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
558
557
  }
559
558
  };
560
559
  const [ListboxSlot, listboxProps] = (0, _useSlot.default)('listbox', {
561
- elementType: 'ul',
560
+ elementType: AutocompleteListbox,
562
561
  externalForwardedProps,
563
562
  ownerState,
564
563
  className: classes.listbox,
@@ -674,8 +673,12 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
674
673
  });
675
674
  let autocompletePopper = null;
676
675
  if (groupedOptions.length > 0) {
677
- autocompletePopper = renderAutocompletePopperChildren(/*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompleteListbox, {
678
- as: ListboxSlot,
676
+ autocompletePopper = renderAutocompletePopperChildren(
677
+ /*#__PURE__*/
678
+ // TODO v7: remove `as` prop and move ListboxComponentProp to externalForwardedProps or remove ListboxComponentProp entirely
679
+ // https://github.com/mui/material-ui/pull/43994#issuecomment-2401945800
680
+ (0, _jsxRuntime.jsx)(ListboxSlot, {
681
+ as: ListboxComponentProp,
679
682
  ...listboxProps,
680
683
  children: groupedOptions.map((option, index) => {
681
684
  if (groupBy) {
@@ -722,7 +725,11 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
722
725
  ref: setAnchorEl,
723
726
  className: classes.inputRoot,
724
727
  startAdornment,
725
- onMouseDown: event => handleInputMouseDown(event),
728
+ onMouseDown: event => {
729
+ if (event.target === event.currentTarget) {
730
+ handleInputMouseDown(event);
731
+ }
732
+ },
726
733
  ...((hasClearIcon || hasPopupIcon) && {
727
734
  endAdornment: /*#__PURE__*/(0, _jsxRuntime.jsxs)(AutocompleteEndAdornment, {
728
735
  className: classes.endAdornment,
@@ -209,6 +209,7 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
209
209
  const {
210
210
  'aria-describedby': ariaDescribedby,
211
211
  'aria-labelledby': ariaLabelledbyProp,
212
+ 'aria-modal': ariaModal = true,
212
213
  BackdropComponent,
213
214
  BackdropProps,
214
215
  children,
@@ -303,6 +304,7 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
303
304
  role: "dialog",
304
305
  "aria-describedby": ariaDescribedby,
305
306
  "aria-labelledby": ariaLabelledby,
307
+ "aria-modal": ariaModal,
306
308
  ...PaperProps,
307
309
  className: (0, _clsx.default)(classes.paper, PaperProps.className),
308
310
  ownerState: ownerState,
@@ -328,6 +330,12 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes /* remove-proptypes */
328
330
  * The id(s) of the element(s) that label the dialog.
329
331
  */
330
332
  'aria-labelledby': _propTypes.default.string,
333
+ /**
334
+ * Informs assistive technologies that the element is modal.
335
+ * It's added on the element with role="dialog".
336
+ * @default true
337
+ */
338
+ 'aria-modal': _propTypes.default.oneOfType([_propTypes.default.oneOf(['false', 'true']), _propTypes.default.bool]),
331
339
  /**
332
340
  * A backdrop component. This prop enables custom backdrop rendering.
333
341
  * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.1.4
2
+ * @mui/material v6.1.5
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -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.4";
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("4");
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.4",
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.",
@@ -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.4",
39
- "@mui/system": "^6.1.4",
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.4"
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.4"
49
+ "@mui/material-pigment-css": "^6.1.5"
50
50
  },
51
51
  "peerDependenciesMeta": {
52
52
  "@types/react": {
@@ -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.4";
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("4");
4
+ export const patch = Number("5");
5
5
  export const prerelease = undefined;
6
6
  export default version;