@mui/material 5.15.7 → 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.
@@ -430,6 +430,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
430
430
  const handleRef = useForkRef(children.ref, focusVisibleRef, setChildNode, ref);
431
431
 
432
432
  // There is no point in displaying an empty tooltip.
433
+ // So we exclude all falsy values, except 0, which is valid.
433
434
  if (!title && title !== 0) {
434
435
  open = false;
435
436
  }
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.15.7
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
@@ -284,13 +284,13 @@ process.env.NODE_ENV !== "production" ? Accordion.propTypes /* remove-proptypes
284
284
  /**
285
285
  * The component used for the transition.
286
286
  * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
287
- * @deprecated Use `slots.transition` instead. This prop will be removed in v7.
287
+ * @deprecated Use `slots.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
288
288
  */
289
289
  TransitionComponent: _propTypes.default.elementType,
290
290
  /**
291
291
  * Props applied to the transition element.
292
292
  * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.
293
- * @deprecated Use `slotProps.transition` instead. This prop will be removed in v7.
293
+ * @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
294
294
  */
295
295
  TransitionProps: _propTypes.default.object
296
296
  } : void 0;
@@ -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) => {
@@ -189,7 +189,10 @@ const Avatar = /*#__PURE__*/React.forwardRef(function Avatar(inProps, ref) {
189
189
  ownerState: ownerState,
190
190
  className: classes.img
191
191
  }, imgProps));
192
- } else if (childrenProp != null && childrenProp !== '' && typeof childrenProp !== 'boolean') {
192
+
193
+ // We only render valid children, non valid children are rendered with a fallback
194
+ // We consider that invalid children are all falsy values, except 0, which is valid.
195
+ } else if (!!childrenProp || childrenProp === 0) {
193
196
  children = childrenProp;
194
197
  } else if (hasImg && alt) {
195
198
  children = alt[0];
@@ -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
  /**
@@ -23,7 +23,7 @@ var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
23
23
  var _SliderValueLabel = _interopRequireDefault(require("./SliderValueLabel"));
24
24
  var _sliderClasses = _interopRequireWildcard(require("./sliderClasses"));
25
25
  var _jsxRuntime = require("react/jsx-runtime");
26
- const _excluded = ["aria-label", "aria-valuetext", "aria-labelledby", "component", "components", "componentsProps", "color", "classes", "className", "disableSwap", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "orientation", "size", "step", "scale", "slotProps", "slots", "tabIndex", "track", "value", "valueLabelDisplay", "valueLabelFormat"];
26
+ const _excluded = ["aria-label", "aria-valuetext", "aria-labelledby", "component", "components", "componentsProps", "color", "classes", "className", "disableSwap", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "orientation", "shiftStep", "size", "step", "scale", "slotProps", "slots", "tabIndex", "track", "value", "valueLabelDisplay", "valueLabelFormat"];
27
27
  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); }
28
28
  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; }
29
29
  function Identity(x) {
@@ -398,6 +398,7 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
398
398
  max = 100,
399
399
  min = 0,
400
400
  orientation = 'horizontal',
401
+ shiftStep = 10,
401
402
  size = 'medium',
402
403
  step = 1,
403
404
  scale = Identity,
@@ -420,6 +421,7 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
420
421
  color,
421
422
  size,
422
423
  step,
424
+ shiftStep,
423
425
  scale,
424
426
  track,
425
427
  valueLabelDisplay,
@@ -764,6 +766,11 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
764
766
  * }
765
767
  */
766
768
  scale: _propTypes.default.func,
769
+ /**
770
+ * The granularity with which the slider can step through values when using Page Up/Page Down or Shift + Arrow Up/Arrow Down.
771
+ * @default 10
772
+ */
773
+ shiftStep: _propTypes.default.number,
767
774
  /**
768
775
  * The size of the slider.
769
776
  * @default 'medium'
@@ -439,6 +439,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
439
439
  const handleRef = (0, _useForkRef.default)(children.ref, focusVisibleRef, setChildNode, ref);
440
440
 
441
441
  // There is no point in displaying an empty tooltip.
442
+ // So we exclude all falsy values, except 0, which is valid.
442
443
  if (!title && title !== 0) {
443
444
  open = false;
444
445
  }
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.15.7
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.7",
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,15 +30,15 @@
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.34",
38
37
  "@mui/types": "^7.2.13",
39
- "@mui/core-downloads-tracker": "^5.15.7",
40
- "@mui/system": "^5.15.7",
41
- "@mui/utils": "^5.15.7"
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",
@@ -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,4 +1,4 @@
1
- import { CSSObject, CSSInterpolation } from '@mui/system';
1
+ import { CSSObject, CSSInterpolation, Interpolation } from '@mui/system';
2
2
  import { PopperClassKey } from '@mui/base/Popper';
3
3
  import { ComponentsPropsList } from './props';
4
4
  import { AccordionActionsClassKey } from '../AccordionActions';
@@ -122,14 +122,18 @@ export type OverridesStyleRules<
122
122
  Theme = unknown,
123
123
  > = Record<
124
124
  ClassKey,
125
- | CSSInterpolation
126
- | ((
127
- // Record<string, unknown> is for other props that the slot receive internally
128
- // Documenting all ownerStates could be a huge work, let's wait until we have a real needs from developers.
129
- props: (ComponentName extends keyof ComponentsPropsList
130
- ? { ownerState: ComponentsPropsList[ComponentName] & Record<string, unknown> }
131
- : {}) & { theme: Theme } & Record<string, unknown>,
132
- ) => CSSInterpolation)
125
+ Interpolation<
126
+ // Record<string, unknown> is for other props that the slot receive internally
127
+ // Documenting all ownerStates could be a huge work, let's wait until we have a real needs from developers.
128
+ (ComponentName extends keyof ComponentsPropsList
129
+ ? ComponentsPropsList[ComponentName] &
130
+ Record<string, unknown> & {
131
+ ownerState: ComponentsPropsList[ComponentName] & Record<string, unknown>;
132
+ }
133
+ : {}) & {
134
+ theme: Theme;
135
+ } & Record<string, unknown>
136
+ >
133
137
  >;
134
138
 
135
139
  export type ComponentsOverrides<Theme = unknown> = {