@mui/material 6.1.6 → 6.1.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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,60 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
- ## 6.1.6
3
+ ## v6.1.7
4
+
5
+ <!-- generated comparing v6.1.6..master -->
6
+
7
+ _Nov 13, 2024_
8
+
9
+ A big thanks to the 13 contributors who made this release possible.
10
+ This release includes fixes as well as documentation improvements.
11
+
12
+ ### `@mui/material@6.1.7`
13
+
14
+ - Fix default props theme scoping (#44340) @siriwatknp
15
+ - Support theme scoping in `useMediaQuery` (#44339) @siriwatknp
16
+ - [Grid] Fix regression spacing prop with string value (#44376) @siriwatknp
17
+
18
+ ### `@mui/styled-engine-sc@6.1.7`
19
+
20
+ - Fix missing `@types/hoist-non-react-statics` causing `styled` returns any (#44397) @megos
21
+
22
+ ### Docs
23
+
24
+ - Replace 'Experimental APIs - Toolpad' with 'Toolpad (Beta)' (#44388) @prakhargupta1
25
+ - Fix Pigment CSS install (#44353) @oliviertassinari
26
+ - Fix dashboard menu warning (#44317) @siriwatknp
27
+ - Add runtime theme section for Material Pigment CSS (#44137) @siriwatknp
28
+ - Add hash to `key` to remove noise from console (#44289) @sai6855
29
+ - Revise Example Projects and Related Projects pages (#44191) @samuelsycamore
30
+ - [material-ui] Fix typo in typography theme set up for templates (#44338) @navedqb
31
+ - [material-ui] Add StackBlitz/CodeSandbox buttons to template cards (#44253) @zanivan
32
+ - [material-ui] Fix Sign-in/Sign-up templates layout (#44281) @zanivan
33
+ - [material-ui] Remove noise in template (#44260) @oliviertassinari
34
+ - [material-ui][Rating] Add uncontrolled example to Basic Rating demo (#44386) @sai6855
35
+ - [material-ui][TextField] Replace InputProps with slotProps.input in demo (#44288) @sai6855
36
+
37
+ ### Core
38
+
39
+ - [blog] Follow media asset guidelines (#44374) @oliviertassinari
40
+ - [code-infra] Changes for test util to work in `vitest` (#43625) @JCQuintas
41
+ - Remove old marked JS options (#44375) @ZeeshanTamboli
42
+ - Fix webpack capitalization (#44352) @oliviertassinari
43
+ - Fix Next.js link 404 (710cd95) @oliviertassinari
44
+ - Update Gold sponsoring backlinks (#44316) @oliviertassinari
45
+ - Fix tools-public.mui.com redirection (9196fa5) @oliviertassinari
46
+ - Remove blank AlertTitle test file (#44282) @ZeeshanTamboli
47
+ - [docs-infra] Fix ad in RTL (#44345) @oliviertassinari
48
+ - [docs-infra] Enforce punctuation on descriptions (#44292) @oliviertassinari
49
+ - [docs-infra] Add CodeSandbox and StackBlitz to vale vocab (6db477a) @oliviertassinari
50
+ - [docs-infra] Fix correct spelling of VS Code (#44277) @oliviertassinari
51
+ - [docs-infra] Add a `rawDescriptions` option (#44390) @vladmoroz
52
+ - [examples] Add missing `clsx` dependency (#43526) @Janpot
53
+ - [infra] Fix @renovate[bot] appearing in changelog (#44275) @mnajdova
54
+
55
+ All contributors of this release in alphabetical order: @Janpot, @JCQuintas, @megos, @mnajdova, @navedqb, @oliviertassinari, @prakhargupta1, @sai6855, @samuelsycamore, @siriwatknp, @vladmoroz, @zanivan, @ZeeshanTamboli
56
+
57
+ ## v6.1.6
4
58
 
5
59
  <!-- generated comparing v6.1.5..master -->
6
60
 
@@ -52,7 +106,7 @@ A big thanks to the 13 contributors who made this release possible.
52
106
 
53
107
  All contributors of this release in alphabetical order: @aarongarciah, @blackcow1987, @DiegoAndai, @jimmycallin, @joshkel, @mnajdova, @navedqb, @nphmuller, @o-alexandrov, @oliviertassinari, @prakhargupta1, @sai6855, @siriwatknp
54
108
 
55
- ## 6.1.5
109
+ ## v6.1.5
56
110
 
57
111
  <!-- generated comparing v6.1.4..master -->
58
112
 
@@ -84,7 +138,7 @@ A big thanks to the 9 contributors who made this release possible.
84
138
  - [material-ui][TextField] Dynamically modify the eye password button aria-label (#44122) @ChinoUkaegbu
85
139
  - [icons] Run pnpm docs:mdicons:synonyms (#44098) @oliviertassinari
86
140
  - [joy-ui] Update Overview copy to match Readme (#44136) @samuelsycamore
87
- - Add CodeSandbox/Stackblitz to the rest of the templates (#43708) @siriwatknp
141
+ - Add CodeSandbox/StackBlitz to the rest of the templates (#43708) @siriwatknp
88
142
  - Update Figma link to fix 301 (a7b7d9c) @oliviertassinari
89
143
  - Link Toolpad from Core repo (#44111) @prakhargupta1
90
144
  - Remove HighlightedCode max-width (#43731) @Janpot
@@ -254,7 +308,7 @@ A big thanks to the 13 contributors who made this release possible.
254
308
  - Uniformity in version range @oliviertassinari
255
309
  - Replace `toBeAriaHidden` matcher with `toBeInaccessible` in tests (#43870) @ZeeshanTamboli
256
310
  - [docs-infra] Strengthen CSP (#43711) @oliviertassinari
257
- - [docs-infra] Open Codesandbox demo with fontsize=12 (#43860) @siriwatknp
311
+ - [docs-infra] Open CodeSandbox demo with fontsize=12 (#43860) @siriwatknp
258
312
  - [icons] Reduce Material Icon page size (#43911) @oliviertassinari
259
313
  - [test] Point Istanbul to correct URL (#43935) @sai6855
260
314
  - [test] Sync React.version parse logic with codebase (#43820) @oliviertassinari
package/Grid/Grid.js CHANGED
@@ -167,7 +167,7 @@ export function generateRowGap({
167
167
  const themeSpacing = theme.spacing(propValue);
168
168
  if (themeSpacing !== '0px') {
169
169
  return {
170
- marginTop: theme.spacing(-propValue),
170
+ marginTop: `-${themeSpacing}`,
171
171
  [`& > .${gridClasses.item}`]: {
172
172
  paddingTop: themeSpacing
173
173
  }
@@ -212,7 +212,7 @@ export function generateColumnGap({
212
212
  }, columnSpacingValues, (propValue, breakpoint) => {
213
213
  const themeSpacing = theme.spacing(propValue);
214
214
  if (themeSpacing !== '0px') {
215
- const negativeValue = theme.spacing(-propValue);
215
+ const negativeValue = `-${themeSpacing}`;
216
216
  return {
217
217
  width: `calc(100% + ${themeSpacing})`,
218
218
  marginLeft: negativeValue,
@@ -1,8 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { SxProps } from '@mui/system';
3
3
  import { OverridableStringUnion } from '@mui/types';
4
- import { InternalStandardProps as StandardProps, Theme } from '..';
4
+ import { Theme } from '..';
5
5
  import { RatingClasses } from './ratingClasses';
6
+ import { OverridableComponent, OverrideProps } from '../OverridableComponent';
6
7
 
7
8
  export interface IconContainerProps extends React.HTMLAttributes<HTMLSpanElement> {
8
9
  value: number;
@@ -10,8 +11,7 @@ export interface IconContainerProps extends React.HTMLAttributes<HTMLSpanElement
10
11
 
11
12
  export interface RatingPropsSizeOverrides {}
12
13
 
13
- export interface RatingProps
14
- extends StandardProps<React.HTMLAttributes<HTMLSpanElement>, 'children' | 'onChange'> {
14
+ export interface RatingOwnProps {
15
15
  /**
16
16
  * Override or extend the styles applied to the component.
17
17
  */
@@ -114,6 +114,14 @@ export interface RatingProps
114
114
  value?: number | null;
115
115
  }
116
116
 
117
+ export type RatingTypeMap<
118
+ AdditionalProps = {},
119
+ RootComponent extends React.ElementType = 'span',
120
+ > = {
121
+ props: AdditionalProps & RatingOwnProps;
122
+ defaultComponent: RootComponent;
123
+ };
124
+
117
125
  /**
118
126
  *
119
127
  * Demos:
@@ -124,4 +132,13 @@ export interface RatingProps
124
132
  *
125
133
  * - [Rating API](https://mui.com/material-ui/api/rating/)
126
134
  */
127
- export default function Rating(props: RatingProps): React.JSX.Element;
135
+ declare const Rating: OverridableComponent<RatingTypeMap>;
136
+
137
+ export type RatingProps<
138
+ RootComponent extends React.ElementType = RatingTypeMap['defaultComponent'],
139
+ AdditionalProps = {},
140
+ > = OverrideProps<RatingTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
141
+ component?: React.ElementType;
142
+ };
143
+
144
+ export default Rating;
package/Rating/Rating.js CHANGED
@@ -317,6 +317,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
317
317
  props: inProps
318
318
  });
319
319
  const {
320
+ component = 'span',
320
321
  className,
321
322
  defaultValue = null,
322
323
  disabled = false,
@@ -457,6 +458,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
457
458
  const [emptyValueFocused, setEmptyValueFocused] = React.useState(false);
458
459
  const ownerState = {
459
460
  ...props,
461
+ component,
460
462
  defaultValue,
461
463
  disabled,
462
464
  emptyIcon,
@@ -473,6 +475,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
473
475
  };
474
476
  const classes = useUtilityClasses(ownerState);
475
477
  return /*#__PURE__*/_jsxs(RatingRoot, {
478
+ as: component,
476
479
  ref: handleRef,
477
480
  onMouseMove: handleMouseMove,
478
481
  onMouseLeave: handleMouseLeave,
@@ -558,6 +561,10 @@ process.env.NODE_ENV !== "production" ? Rating.propTypes /* remove-proptypes */
558
561
  // │ These PropTypes are generated from the TypeScript type definitions. │
559
562
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
560
563
  // └─────────────────────────────────────────────────────────────────────┘
564
+ /**
565
+ * @ignore
566
+ */
567
+ children: PropTypes.node,
561
568
  /**
562
569
  * Override or extend the styles applied to the component.
563
570
  */
@@ -566,6 +573,11 @@ process.env.NODE_ENV !== "production" ? Rating.propTypes /* remove-proptypes */
566
573
  * @ignore
567
574
  */
568
575
  className: PropTypes.string,
576
+ /**
577
+ * The component used for the root node.
578
+ * Either a string to use a HTML element or a component.
579
+ */
580
+ component: PropTypes.elementType,
569
581
  /**
570
582
  * The default value. Use when the component is not controlled.
571
583
  * @default null
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.1.6
2
+ * @mui/material v6.1.7
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -167,7 +167,7 @@ export function generateRowGap({
167
167
  const themeSpacing = theme.spacing(propValue);
168
168
  if (themeSpacing !== '0px') {
169
169
  return {
170
- marginTop: theme.spacing(-propValue),
170
+ marginTop: `-${themeSpacing}`,
171
171
  [`& > .${gridClasses.item}`]: {
172
172
  paddingTop: themeSpacing
173
173
  }
@@ -212,7 +212,7 @@ export function generateColumnGap({
212
212
  }, columnSpacingValues, (propValue, breakpoint) => {
213
213
  const themeSpacing = theme.spacing(propValue);
214
214
  if (themeSpacing !== '0px') {
215
- const negativeValue = theme.spacing(-propValue);
215
+ const negativeValue = `-${themeSpacing}`;
216
216
  return {
217
217
  width: `calc(100% + ${themeSpacing})`,
218
218
  marginLeft: negativeValue,
@@ -317,6 +317,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
317
317
  props: inProps
318
318
  });
319
319
  const {
320
+ component = 'span',
320
321
  className,
321
322
  defaultValue = null,
322
323
  disabled = false,
@@ -457,6 +458,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
457
458
  const [emptyValueFocused, setEmptyValueFocused] = React.useState(false);
458
459
  const ownerState = {
459
460
  ...props,
461
+ component,
460
462
  defaultValue,
461
463
  disabled,
462
464
  emptyIcon,
@@ -473,6 +475,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
473
475
  };
474
476
  const classes = useUtilityClasses(ownerState);
475
477
  return /*#__PURE__*/_jsxs(RatingRoot, {
478
+ as: component,
476
479
  ref: handleRef,
477
480
  onMouseMove: handleMouseMove,
478
481
  onMouseLeave: handleMouseLeave,
@@ -558,6 +561,10 @@ process.env.NODE_ENV !== "production" ? Rating.propTypes /* remove-proptypes */
558
561
  // │ These PropTypes are generated from the TypeScript type definitions. │
559
562
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
560
563
  // └─────────────────────────────────────────────────────────────────────┘
564
+ /**
565
+ * @ignore
566
+ */
567
+ children: PropTypes.node,
561
568
  /**
562
569
  * Override or extend the styles applied to the component.
563
570
  */
@@ -566,6 +573,11 @@ process.env.NODE_ENV !== "production" ? Rating.propTypes /* remove-proptypes */
566
573
  * @ignore
567
574
  */
568
575
  className: PropTypes.string,
576
+ /**
577
+ * The component used for the root node.
578
+ * Either a string to use a HTML element or a component.
579
+ */
580
+ component: PropTypes.elementType,
569
581
  /**
570
582
  * The default value. Use when the component is not controlled.
571
583
  * @default null
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.1.6
2
+ * @mui/material v6.1.7
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -1 +1,6 @@
1
- export { default } from '@mui/system/useMediaQuery';
1
+ import { unstable_createUseMediaQuery } from '@mui/system/useMediaQuery';
2
+ import THEME_ID from "../styles/identifier.js";
3
+ const useMediaQuery = unstable_createUseMediaQuery({
4
+ themeId: THEME_ID
5
+ });
6
+ export default useMediaQuery;
@@ -1,6 +1,6 @@
1
- export const version = "6.1.6";
1
+ export const version = "6.1.7";
2
2
  export const major = Number("6");
3
3
  export const minor = Number("1");
4
- export const patch = Number("6");
4
+ export const patch = Number("7");
5
5
  export const prerelease = undefined;
6
6
  export default version;
package/node/Grid/Grid.js CHANGED
@@ -180,7 +180,7 @@ function generateRowGap({
180
180
  const themeSpacing = theme.spacing(propValue);
181
181
  if (themeSpacing !== '0px') {
182
182
  return {
183
- marginTop: theme.spacing(-propValue),
183
+ marginTop: `-${themeSpacing}`,
184
184
  [`& > .${_gridClasses.default.item}`]: {
185
185
  paddingTop: themeSpacing
186
186
  }
@@ -225,7 +225,7 @@ function generateColumnGap({
225
225
  }, columnSpacingValues, (propValue, breakpoint) => {
226
226
  const themeSpacing = theme.spacing(propValue);
227
227
  if (themeSpacing !== '0px') {
228
- const negativeValue = theme.spacing(-propValue);
228
+ const negativeValue = `-${themeSpacing}`;
229
229
  return {
230
230
  width: `calc(100% + ${themeSpacing})`,
231
231
  marginLeft: negativeValue,
@@ -324,6 +324,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
324
324
  props: inProps
325
325
  });
326
326
  const {
327
+ component = 'span',
327
328
  className,
328
329
  defaultValue = null,
329
330
  disabled = false,
@@ -464,6 +465,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
464
465
  const [emptyValueFocused, setEmptyValueFocused] = React.useState(false);
465
466
  const ownerState = {
466
467
  ...props,
468
+ component,
467
469
  defaultValue,
468
470
  disabled,
469
471
  emptyIcon,
@@ -480,6 +482,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
480
482
  };
481
483
  const classes = useUtilityClasses(ownerState);
482
484
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(RatingRoot, {
485
+ as: component,
483
486
  ref: handleRef,
484
487
  onMouseMove: handleMouseMove,
485
488
  onMouseLeave: handleMouseLeave,
@@ -565,6 +568,10 @@ process.env.NODE_ENV !== "production" ? Rating.propTypes /* remove-proptypes */
565
568
  // │ These PropTypes are generated from the TypeScript type definitions. │
566
569
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
567
570
  // └─────────────────────────────────────────────────────────────────────┘
571
+ /**
572
+ * @ignore
573
+ */
574
+ children: _propTypes.default.node,
568
575
  /**
569
576
  * Override or extend the styles applied to the component.
570
577
  */
@@ -573,6 +580,11 @@ process.env.NODE_ENV !== "production" ? Rating.propTypes /* remove-proptypes */
573
580
  * @ignore
574
581
  */
575
582
  className: _propTypes.default.string,
583
+ /**
584
+ * The component used for the root node.
585
+ * Either a string to use a HTML element or a component.
586
+ */
587
+ component: _propTypes.default.elementType,
576
588
  /**
577
589
  * The default value. Use when the component is not controlled.
578
590
  * @default null
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.1.6
2
+ * @mui/material v6.1.7
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -4,10 +4,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- Object.defineProperty(exports, "default", {
8
- enumerable: true,
9
- get: function () {
10
- return _useMediaQuery.default;
11
- }
7
+ exports.default = void 0;
8
+ var _useMediaQuery = require("@mui/system/useMediaQuery");
9
+ var _identifier = _interopRequireDefault(require("../styles/identifier"));
10
+ const useMediaQuery = (0, _useMediaQuery.unstable_createUseMediaQuery)({
11
+ themeId: _identifier.default
12
12
  });
13
- var _useMediaQuery = _interopRequireDefault(require("@mui/system/useMediaQuery"));
13
+ var _default = exports.default = useMediaQuery;
@@ -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.6";
7
+ const version = exports.version = "6.1.7";
8
8
  const major = exports.major = Number("6");
9
9
  const minor = exports.minor = Number("1");
10
- const patch = exports.patch = Number("6");
10
+ const patch = exports.patch = Number("7");
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.6",
3
+ "version": "6.1.7",
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/system": "^6.1.6",
38
+ "@mui/core-downloads-tracker": "^6.1.7",
39
+ "@mui/system": "^6.1.7",
39
40
  "@mui/types": "^7.2.19",
40
- "@mui/core-downloads-tracker": "^6.1.6",
41
- "@mui/utils": "^6.1.6"
41
+ "@mui/utils": "^6.1.7"
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.6"
49
+ "@mui/material-pigment-css": "^6.1.7"
50
50
  },
51
51
  "peerDependenciesMeta": {
52
52
  "@types/react": {
@@ -1,2 +1,11 @@
1
- export { default } from '@mui/system/useMediaQuery';
1
+ import { UseMediaQueryOptions } from '@mui/system/useMediaQuery';
2
+ import { Theme } from '../styles/createTheme';
3
+
2
4
  export * from '@mui/system/useMediaQuery';
5
+
6
+ declare function useMediaQuery(
7
+ queryInput: string | ((theme: Theme) => string),
8
+ options?: UseMediaQueryOptions,
9
+ ): boolean;
10
+
11
+ export default useMediaQuery;
@@ -1 +1,6 @@
1
- export { default } from '@mui/system/useMediaQuery';
1
+ import { unstable_createUseMediaQuery } from '@mui/system/useMediaQuery';
2
+ import THEME_ID from "../styles/identifier.js";
3
+ const useMediaQuery = unstable_createUseMediaQuery({
4
+ themeId: THEME_ID
5
+ });
6
+ export default useMediaQuery;
package/version/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export const version = "6.1.6";
1
+ export const version = "6.1.7";
2
2
  export const major = Number("6");
3
3
  export const minor = Number("1");
4
- export const patch = Number("6");
4
+ export const patch = Number("7");
5
5
  export const prerelease = undefined;
6
6
  export default version;