@mui/material 5.15.8 → 5.15.9

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.
@@ -4,8 +4,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
4
4
  import _extends from "@babel/runtime/helpers/esm/extends";
5
5
  var _ClearIcon, _ArrowDropDownIcon;
6
6
  const _excluded = ["autoComplete", "autoHighlight", "autoSelect", "blurOnSelect", "ChipProps", "className", "clearIcon", "clearOnBlur", "clearOnEscape", "clearText", "closeText", "componentsProps", "defaultValue", "disableClearable", "disableCloseOnSelect", "disabled", "disabledItemsFocusable", "disableListWrap", "disablePortal", "filterOptions", "filterSelectedOptions", "forcePopupIcon", "freeSolo", "fullWidth", "getLimitTagsText", "getOptionDisabled", "getOptionKey", "getOptionLabel", "isOptionEqualToValue", "groupBy", "handleHomeEndKeys", "id", "includeInputInList", "inputValue", "limitTags", "ListboxComponent", "ListboxProps", "loading", "loadingText", "multiple", "noOptionsText", "onChange", "onClose", "onHighlightChange", "onInputChange", "onOpen", "open", "openOnFocus", "openText", "options", "PaperComponent", "PopperComponent", "popupIcon", "readOnly", "renderGroup", "renderInput", "renderOption", "renderTags", "selectOnFocus", "size", "slotProps", "value"],
7
- _excluded2 = ["ref"],
8
- _excluded3 = ["key"];
7
+ _excluded2 = ["ref"];
9
8
  import * as React from 'react';
10
9
  import PropTypes from 'prop-types';
11
10
  import clsx from 'clsx';
@@ -30,6 +29,7 @@ import capitalize from '../utils/capitalize';
30
29
  import useForkRef from '../utils/useForkRef';
31
30
  import { jsx as _jsx } from "react/jsx-runtime";
32
31
  import { jsxs as _jsxs } from "react/jsx-runtime";
32
+ import { createElement as _createElement } from "react";
33
33
  const useUtilityClasses = ownerState => {
34
34
  const {
35
35
  classes,
@@ -528,13 +528,10 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
528
528
  }, params.key);
529
529
  const renderGroup = renderGroupProp || defaultRenderGroup;
530
530
  const defaultRenderOption = (props2, option) => {
531
- const {
532
- key
533
- } = props2,
534
- otherProps = _objectWithoutPropertiesLoose(props2, _excluded3);
535
- return /*#__PURE__*/_jsx("li", _extends({}, otherProps, {
536
- children: getOptionLabel(option)
537
- }), key);
531
+ // Need to clearly apply key because of https://github.com/vercel/next.js/issues/55642
532
+ return /*#__PURE__*/_createElement("li", _extends({}, props2, {
533
+ key: props2.key
534
+ }), getOptionLabel(option));
538
535
  };
539
536
  const renderOption = renderOptionProp || defaultRenderOption;
540
537
  const renderListOption = (option, index) => {
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## v5.15.9<!-- generated comparing v5.15.8..master -->
4
+
5
+ _Feb 8, 2024_
6
+
7
+ A big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
8
+
9
+ - 🐛 A critical fix to remove non-published library usage in `@mui/material` peerDependencies.
10
+
11
+ ### `@mui/material@5.15.9`
12
+
13
+ - &#8203;<!-- 11 -->[autocomplete] Avoid spread operator (#40968) @oliviertassinari
14
+ - &#8203;<!-- 05 -->[material] Remove zero-runtime from peer dep (#41003) @brijeshb42
15
+
16
+ ### `@mui/base@5.0.0-beta.36`
17
+
18
+ - &#8203;<!-- 10 -->[base-ui] Update props using Array to ReadonlyArray type (#40754) @RaghavenderSingh
19
+
20
+ ### `@mui/system@5.15.9`
21
+
22
+ - &#8203;<!-- 02 -->[system] use `ReadonlyArray` for CSS related types (#40972) @siriwatknp
23
+ - &#8203;<!-- 01 -->[zero] Migrate to use wyw-in-js instead of linaria (#40866) @brijeshb42
24
+
25
+ ### Docs
26
+
27
+ - &#8203;<!-- 06 -->[docs] Polish codemod git diff format @oliviertassinari
28
+ - &#8203;<!-- 05 -->[material-ui][docs] Migrating from deprecated apis follow up (#40981) @DiegoAndai
29
+
30
+ ### Core
31
+
32
+ - &#8203;<!-- 09 -->[code-infra] Move next config to ESM (#40869) @Janpot
33
+ - &#8203;<!-- 08 -->[code-infra] Update prettier (#40772) @Janpot
34
+ - &#8203;<!-- 07 -->[code-infra] Add codemod for `light` prop removal (#40947) @sai6855
35
+
36
+ All contributors of this release in alphabetical order: @brijeshb42, @DiegoAndai, @Janpot, @oliviertassinari, @RaghavenderSingh, @sai6855, @siriwatknp
37
+
3
38
  ## v5.15.8<!-- generated comparing v5.15.7..master -->
4
39
 
5
40
  _Feb 6, 2024_
@@ -30,7 +30,7 @@ export interface DividerOwnProps {
30
30
  /**
31
31
  * If `true`, the divider will have a lighter color.
32
32
  * @default false
33
- * @deprecated Use <Divider sx={{ bgcolor: '#eee' }} /> (or any color) instead.
33
+ * @deprecated Use <Divider sx={{ opacity: 0.6 }} /> (or any opacity or color) instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
34
34
  */
35
35
  light?: boolean;
36
36
  /**
@@ -221,7 +221,7 @@ process.env.NODE_ENV !== "production" ? Divider.propTypes /* remove-proptypes */
221
221
  /**
222
222
  * If `true`, the divider will have a lighter color.
223
223
  * @default false
224
- * @deprecated Use <Divider sx={{ bgcolor: '#eee' }} /> (or any color) instead.
224
+ * @deprecated Use <Divider sx={{ opacity: 0.6 }} /> (or any opacity or color) instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
225
225
  */
226
226
  light: PropTypes.bool,
227
227
  /**
@@ -232,8 +232,8 @@ export type TextFieldProps<Variant extends TextFieldVariants = TextFieldVariants
232
232
  Variant extends 'filled'
233
233
  ? FilledTextFieldProps
234
234
  : Variant extends 'standard'
235
- ? StandardTextFieldProps
236
- : OutlinedTextFieldProps;
235
+ ? StandardTextFieldProps
236
+ : OutlinedTextFieldProps;
237
237
 
238
238
  /**
239
239
  * The `TextField` is a convenience wrapper for the most common cases (80%).
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.15.8
2
+ * @mui/material v5.15.9
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -28,6 +28,7 @@ import capitalize from '../utils/capitalize';
28
28
  import useForkRef from '../utils/useForkRef';
29
29
  import { jsx as _jsx } from "react/jsx-runtime";
30
30
  import { jsxs as _jsxs } from "react/jsx-runtime";
31
+ import { createElement as _createElement } from "react";
31
32
  var useUtilityClasses = function useUtilityClasses(ownerState) {
32
33
  var classes = ownerState.classes,
33
34
  disablePortal = ownerState.disablePortal,
@@ -539,11 +540,10 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
539
540
  };
540
541
  var renderGroup = renderGroupProp || defaultRenderGroup;
541
542
  var defaultRenderOption = function defaultRenderOption(props2, option) {
542
- var key = props2.key,
543
- otherProps = _objectWithoutProperties(props2, ["key"]);
544
- return /*#__PURE__*/_jsx("li", _extends({}, otherProps, {
545
- children: getOptionLabel(option)
546
- }), key);
543
+ // Need to clearly apply key because of https://github.com/vercel/next.js/issues/55642
544
+ return /*#__PURE__*/_createElement("li", _extends({}, props2, {
545
+ key: props2.key
546
+ }), getOptionLabel(option));
547
547
  };
548
548
  var renderOption = renderOptionProp || defaultRenderOption;
549
549
  var renderListOption = function renderListOption(option, index) {
@@ -226,7 +226,7 @@ process.env.NODE_ENV !== "production" ? Divider.propTypes /* remove-proptypes */
226
226
  /**
227
227
  * If `true`, the divider will have a lighter color.
228
228
  * @default false
229
- * @deprecated Use <Divider sx={{ bgcolor: '#eee' }} /> (or any color) instead.
229
+ * @deprecated Use <Divider sx={{ opacity: 0.6 }} /> (or any opacity or color) instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
230
230
  */
231
231
  light: PropTypes.bool,
232
232
  /**
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.15.8
2
+ * @mui/material v5.15.9
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -4,8 +4,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
4
4
  import _extends from "@babel/runtime/helpers/esm/extends";
5
5
  var _ClearIcon, _ArrowDropDownIcon;
6
6
  const _excluded = ["autoComplete", "autoHighlight", "autoSelect", "blurOnSelect", "ChipProps", "className", "clearIcon", "clearOnBlur", "clearOnEscape", "clearText", "closeText", "componentsProps", "defaultValue", "disableClearable", "disableCloseOnSelect", "disabled", "disabledItemsFocusable", "disableListWrap", "disablePortal", "filterOptions", "filterSelectedOptions", "forcePopupIcon", "freeSolo", "fullWidth", "getLimitTagsText", "getOptionDisabled", "getOptionKey", "getOptionLabel", "isOptionEqualToValue", "groupBy", "handleHomeEndKeys", "id", "includeInputInList", "inputValue", "limitTags", "ListboxComponent", "ListboxProps", "loading", "loadingText", "multiple", "noOptionsText", "onChange", "onClose", "onHighlightChange", "onInputChange", "onOpen", "open", "openOnFocus", "openText", "options", "PaperComponent", "PopperComponent", "popupIcon", "readOnly", "renderGroup", "renderInput", "renderOption", "renderTags", "selectOnFocus", "size", "slotProps", "value"],
7
- _excluded2 = ["ref"],
8
- _excluded3 = ["key"];
7
+ _excluded2 = ["ref"];
9
8
  import * as React from 'react';
10
9
  import PropTypes from 'prop-types';
11
10
  import clsx from 'clsx';
@@ -30,6 +29,7 @@ import capitalize from '../utils/capitalize';
30
29
  import useForkRef from '../utils/useForkRef';
31
30
  import { jsx as _jsx } from "react/jsx-runtime";
32
31
  import { jsxs as _jsxs } from "react/jsx-runtime";
32
+ import { createElement as _createElement } from "react";
33
33
  const useUtilityClasses = ownerState => {
34
34
  const {
35
35
  classes,
@@ -524,13 +524,10 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
524
524
  }, params.key);
525
525
  const renderGroup = renderGroupProp || defaultRenderGroup;
526
526
  const defaultRenderOption = (props2, option) => {
527
- const {
528
- key
529
- } = props2,
530
- otherProps = _objectWithoutPropertiesLoose(props2, _excluded3);
531
- return /*#__PURE__*/_jsx("li", _extends({}, otherProps, {
532
- children: getOptionLabel(option)
533
- }), key);
527
+ // Need to clearly apply key because of https://github.com/vercel/next.js/issues/55642
528
+ return /*#__PURE__*/_createElement("li", _extends({}, props2, {
529
+ key: props2.key
530
+ }), getOptionLabel(option));
534
531
  };
535
532
  const renderOption = renderOptionProp || defaultRenderOption;
536
533
  const renderListOption = (option, index) => {
@@ -221,7 +221,7 @@ process.env.NODE_ENV !== "production" ? Divider.propTypes /* remove-proptypes */
221
221
  /**
222
222
  * If `true`, the divider will have a lighter color.
223
223
  * @default false
224
- * @deprecated Use <Divider sx={{ bgcolor: '#eee' }} /> (or any color) instead.
224
+ * @deprecated Use <Divider sx={{ opacity: 0.6 }} /> (or any opacity or color) instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
225
225
  */
226
226
  light: PropTypes.bool,
227
227
  /**
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.15.8
2
+ * @mui/material v5.15.9
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -14,7 +14,8 @@ Object.defineProperty(exports, "createFilterOptions", {
14
14
  exports.default = void 0;
15
15
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
16
16
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
17
- var React = _interopRequireWildcard(require("react"));
17
+ var _react = _interopRequireWildcard(require("react"));
18
+ var React = _react;
18
19
  var _propTypes = _interopRequireDefault(require("prop-types"));
19
20
  var _clsx = _interopRequireDefault(require("clsx"));
20
21
  var _utils = require("@mui/utils");
@@ -39,8 +40,7 @@ var _useForkRef = _interopRequireDefault(require("../utils/useForkRef"));
39
40
  var _jsxRuntime = require("react/jsx-runtime");
40
41
  var _ClearIcon, _ArrowDropDownIcon;
41
42
  const _excluded = ["autoComplete", "autoHighlight", "autoSelect", "blurOnSelect", "ChipProps", "className", "clearIcon", "clearOnBlur", "clearOnEscape", "clearText", "closeText", "componentsProps", "defaultValue", "disableClearable", "disableCloseOnSelect", "disabled", "disabledItemsFocusable", "disableListWrap", "disablePortal", "filterOptions", "filterSelectedOptions", "forcePopupIcon", "freeSolo", "fullWidth", "getLimitTagsText", "getOptionDisabled", "getOptionKey", "getOptionLabel", "isOptionEqualToValue", "groupBy", "handleHomeEndKeys", "id", "includeInputInList", "inputValue", "limitTags", "ListboxComponent", "ListboxProps", "loading", "loadingText", "multiple", "noOptionsText", "onChange", "onClose", "onHighlightChange", "onInputChange", "onOpen", "open", "openOnFocus", "openText", "options", "PaperComponent", "PopperComponent", "popupIcon", "readOnly", "renderGroup", "renderInput", "renderOption", "renderTags", "selectOnFocus", "size", "slotProps", "value"],
42
- _excluded2 = ["ref"],
43
- _excluded3 = ["key"];
43
+ _excluded2 = ["ref"];
44
44
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
45
45
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
46
46
  const useUtilityClasses = ownerState => {
@@ -540,13 +540,10 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
540
540
  }, params.key);
541
541
  const renderGroup = renderGroupProp || defaultRenderGroup;
542
542
  const defaultRenderOption = (props2, option) => {
543
- const {
544
- key
545
- } = props2,
546
- otherProps = (0, _objectWithoutPropertiesLoose2.default)(props2, _excluded3);
547
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("li", (0, _extends2.default)({}, otherProps, {
548
- children: getOptionLabel(option)
549
- }), key);
543
+ // Need to clearly apply key because of https://github.com/vercel/next.js/issues/55642
544
+ return /*#__PURE__*/(0, _react.createElement)("li", (0, _extends2.default)({}, props2, {
545
+ key: props2.key
546
+ }), getOptionLabel(option));
550
547
  };
551
548
  const renderOption = renderOptionProp || defaultRenderOption;
552
549
  const renderListOption = (option, index) => {
@@ -229,7 +229,7 @@ process.env.NODE_ENV !== "production" ? Divider.propTypes /* remove-proptypes */
229
229
  /**
230
230
  * If `true`, the divider will have a lighter color.
231
231
  * @default false
232
- * @deprecated Use <Divider sx={{ bgcolor: '#eee' }} /> (or any color) instead.
232
+ * @deprecated Use <Divider sx={{ opacity: 0.6 }} /> (or any opacity or color) instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
233
233
  */
234
234
  light: _propTypes.default.bool,
235
235
  /**
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.15.8
2
+ * @mui/material v5.15.9
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/material",
3
- "version": "5.15.8",
3
+ "version": "5.15.9",
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.",
@@ -30,23 +30,22 @@
30
30
  "@babel/runtime": "^7.23.9",
31
31
  "@types/react-transition-group": "^4.4.10",
32
32
  "clsx": "^2.1.0",
33
- "csstype": "^3.1.2",
33
+ "csstype": "^3.1.3",
34
34
  "prop-types": "^15.8.1",
35
35
  "react-is": "^18.2.0",
36
36
  "react-transition-group": "^4.4.5",
37
- "@mui/base": "5.0.0-beta.35",
38
37
  "@mui/types": "^7.2.13",
39
- "@mui/core-downloads-tracker": "^5.15.8",
40
- "@mui/utils": "^5.15.8",
41
- "@mui/system": "^5.15.8"
38
+ "@mui/base": "5.0.0-beta.36",
39
+ "@mui/utils": "^5.15.9",
40
+ "@mui/system": "^5.15.9",
41
+ "@mui/core-downloads-tracker": "^5.15.9"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@emotion/react": "^11.5.0",
45
45
  "@emotion/styled": "^11.3.0",
46
46
  "@types/react": "^17.0.0 || ^18.0.0",
47
47
  "react": "^17.0.0 || ^18.0.0",
48
- "react-dom": "^17.0.0 || ^18.0.0",
49
- "@mui/zero-runtime": "^0.0.1"
48
+ "react-dom": "^17.0.0 || ^18.0.0"
50
49
  },
51
50
  "peerDependenciesMeta": {
52
51
  "@types/react": {
@@ -320,15 +320,16 @@ type Split<T, K extends keyof T = keyof T> = K extends string | number
320
320
  ? { [k in K]: Exclude<T[K], undefined> }
321
321
  : never;
322
322
 
323
- type ConcatDeep<T> = T extends Record<string | number, infer V>
324
- ? keyof T extends string | number
325
- ? V extends string | number
326
- ? keyof T
327
- : keyof V extends string | number
328
- ? `${keyof T}-${ConcatDeep<Split<V>>}`
323
+ type ConcatDeep<T> =
324
+ T extends Record<string | number, infer V>
325
+ ? keyof T extends string | number
326
+ ? V extends string | number
327
+ ? keyof T
328
+ : keyof V extends string | number
329
+ ? `${keyof T}-${ConcatDeep<Split<V>>}`
330
+ : never
329
331
  : never
330
- : never
331
- : never;
332
+ : never;
332
333
 
333
334
  /**
334
335
  * Does not work for these cases:
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.15.8
2
+ * @mui/material v5.15.9
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -23270,11 +23270,10 @@
23270
23270
  };
23271
23271
  var renderGroup = renderGroupProp || defaultRenderGroup;
23272
23272
  var defaultRenderOption = function defaultRenderOption(props2, option) {
23273
- var key = props2.key,
23274
- otherProps = _objectWithoutProperties(props2, ["key"]);
23275
- return /*#__PURE__*/jsxRuntime_1("li", _extends({}, otherProps, {
23276
- children: getOptionLabel(option)
23277
- }), key);
23273
+ // Need to clearly apply key because of https://github.com/vercel/next.js/issues/55642
23274
+ return /*#__PURE__*/React.createElement("li", _extends({}, props2, {
23275
+ key: props2.key
23276
+ }), getOptionLabel(option));
23278
23277
  };
23279
23278
  var renderOption = renderOptionProp || defaultRenderOption;
23280
23279
  var renderListOption = function renderListOption(option, index) {
@@ -29213,7 +29212,7 @@
29213
29212
  /**
29214
29213
  * If `true`, the divider will have a lighter color.
29215
29214
  * @default false
29216
- * @deprecated Use <Divider sx={{ bgcolor: '#eee' }} /> (or any color) instead.
29215
+ * @deprecated Use <Divider sx={{ opacity: 0.6 }} /> (or any opacity or color) instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
29217
29216
  */
29218
29217
  light: PropTypes.bool,
29219
29218
  /**