@mui/material 5.15.8 → 5.15.10
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/Autocomplete/Autocomplete.js +6 -9
- package/Avatar/Avatar.d.ts +23 -1
- package/Avatar/Avatar.js +37 -10
- package/CHANGELOG.md +86 -0
- package/Divider/Divider.d.ts +1 -1
- package/Divider/Divider.js +1 -1
- package/TableRow/TableRow.d.ts +1 -1
- package/TableRow/TableRow.js +1 -1
- package/TextField/TextField.d.ts +2 -2
- package/index.js +1 -1
- package/legacy/Autocomplete/Autocomplete.js +5 -5
- package/legacy/Avatar/Avatar.js +43 -10
- package/legacy/Divider/Divider.js +1 -1
- package/legacy/TableRow/TableRow.js +1 -1
- package/legacy/index.js +1 -1
- package/modern/Autocomplete/Autocomplete.js +6 -9
- package/modern/Avatar/Avatar.js +37 -10
- package/modern/Divider/Divider.js +1 -1
- package/modern/TableRow/TableRow.js +1 -1
- package/modern/index.js +1 -1
- package/node/Autocomplete/Autocomplete.js +7 -10
- package/node/Avatar/Avatar.js +37 -10
- package/node/Divider/Divider.js +1 -1
- package/node/TableRow/TableRow.js +1 -1
- package/node/index.js +1 -1
- package/package.json +7 -8
- package/styles/experimental_extendTheme.d.ts +9 -8
- package/umd/material-ui.development.js +48 -18
- package/umd/material-ui.production.min.js +2 -2
|
@@ -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
|
|
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
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
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) => {
|
package/node/Avatar/Avatar.js
CHANGED
|
@@ -16,8 +16,9 @@ var _styled = _interopRequireDefault(require("../styles/styled"));
|
|
|
16
16
|
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
17
17
|
var _Person = _interopRequireDefault(require("../internal/svg-icons/Person"));
|
|
18
18
|
var _avatarClasses = require("./avatarClasses");
|
|
19
|
+
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
19
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
const _excluded = ["alt", "children", "className", "component", "imgProps", "sizes", "src", "srcSet", "variant"];
|
|
21
|
+
const _excluded = ["alt", "children", "className", "component", "slots", "slotProps", "imgProps", "sizes", "src", "srcSet", "variant"];
|
|
21
22
|
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); }
|
|
22
23
|
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; }
|
|
23
24
|
const useUtilityClasses = ownerState => {
|
|
@@ -158,6 +159,8 @@ const Avatar = /*#__PURE__*/React.forwardRef(function Avatar(inProps, ref) {
|
|
|
158
159
|
children: childrenProp,
|
|
159
160
|
className,
|
|
160
161
|
component = 'div',
|
|
162
|
+
slots = {},
|
|
163
|
+
slotProps = {},
|
|
161
164
|
imgProps,
|
|
162
165
|
sizes,
|
|
163
166
|
src,
|
|
@@ -180,16 +183,25 @@ const Avatar = /*#__PURE__*/React.forwardRef(function Avatar(inProps, ref) {
|
|
|
180
183
|
variant
|
|
181
184
|
});
|
|
182
185
|
const classes = useUtilityClasses(ownerState);
|
|
186
|
+
const [ImgSlot, imgSlotProps] = (0, _useSlot.default)('img', {
|
|
187
|
+
className: classes.img,
|
|
188
|
+
elementType: AvatarImg,
|
|
189
|
+
externalForwardedProps: {
|
|
190
|
+
slots,
|
|
191
|
+
slotProps: {
|
|
192
|
+
img: (0, _extends2.default)({}, imgProps, slotProps.img)
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
additionalProps: {
|
|
196
|
+
alt,
|
|
197
|
+
src,
|
|
198
|
+
srcSet,
|
|
199
|
+
sizes
|
|
200
|
+
},
|
|
201
|
+
ownerState
|
|
202
|
+
});
|
|
183
203
|
if (hasImgNotFailing) {
|
|
184
|
-
children = /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
185
|
-
alt: alt,
|
|
186
|
-
srcSet: srcSet,
|
|
187
|
-
src: src,
|
|
188
|
-
sizes: sizes,
|
|
189
|
-
ownerState: ownerState,
|
|
190
|
-
className: classes.img
|
|
191
|
-
}, imgProps));
|
|
192
|
-
|
|
204
|
+
children = /*#__PURE__*/(0, _jsxRuntime.jsx)(ImgSlot, (0, _extends2.default)({}, imgSlotProps));
|
|
193
205
|
// We only render valid children, non valid children are rendered with a fallback
|
|
194
206
|
// We consider that invalid children are all falsy values, except 0, which is valid.
|
|
195
207
|
} else if (!!childrenProp || childrenProp === 0) {
|
|
@@ -242,12 +254,27 @@ process.env.NODE_ENV !== "production" ? Avatar.propTypes /* remove-proptypes */
|
|
|
242
254
|
/**
|
|
243
255
|
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attributes) applied to the `img` element if the component is used to display an image.
|
|
244
256
|
* It can be used to listen for the loading error event.
|
|
257
|
+
* @deprecated Use `slotProps.img` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
245
258
|
*/
|
|
246
259
|
imgProps: _propTypes.default.object,
|
|
247
260
|
/**
|
|
248
261
|
* The `sizes` attribute for the `img` element.
|
|
249
262
|
*/
|
|
250
263
|
sizes: _propTypes.default.string,
|
|
264
|
+
/**
|
|
265
|
+
* The props used for each slot inside.
|
|
266
|
+
* @default {}
|
|
267
|
+
*/
|
|
268
|
+
slotProps: _propTypes.default.shape({
|
|
269
|
+
img: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
|
|
270
|
+
}),
|
|
271
|
+
/**
|
|
272
|
+
* The components used for each slot inside.
|
|
273
|
+
* @default {}
|
|
274
|
+
*/
|
|
275
|
+
slots: _propTypes.default.shape({
|
|
276
|
+
img: _propTypes.default.elementType
|
|
277
|
+
}),
|
|
251
278
|
/**
|
|
252
279
|
* The `src` attribute for the `img` element.
|
|
253
280
|
*/
|
package/node/Divider/Divider.js
CHANGED
|
@@ -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={{
|
|
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
|
/**
|
|
@@ -101,7 +101,7 @@ process.env.NODE_ENV !== "production" ? TableRow.propTypes /* remove-proptypes *
|
|
|
101
101
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
102
102
|
// └─────────────────────────────────────────────────────────────────────┘
|
|
103
103
|
/**
|
|
104
|
-
* Should be valid
|
|
104
|
+
* Should be valid `<tr>` children such as `TableCell`.
|
|
105
105
|
*/
|
|
106
106
|
children: _propTypes.default.node,
|
|
107
107
|
/**
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "5.15.
|
|
3
|
+
"version": "5.15.10",
|
|
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.
|
|
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/
|
|
37
|
+
"@mui/core-downloads-tracker": "^5.15.10",
|
|
38
|
+
"@mui/system": "^5.15.9",
|
|
39
|
+
"@mui/utils": "^5.15.9",
|
|
38
40
|
"@mui/types": "^7.2.13",
|
|
39
|
-
"@mui/
|
|
40
|
-
"@mui/utils": "^5.15.8",
|
|
41
|
-
"@mui/system": "^5.15.8"
|
|
41
|
+
"@mui/base": "5.0.0-beta.36"
|
|
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> =
|
|
324
|
-
|
|
325
|
-
?
|
|
326
|
-
?
|
|
327
|
-
|
|
328
|
-
|
|
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.
|
|
2
|
+
* @mui/material v5.15.10
|
|
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
|
-
|
|
23274
|
-
|
|
23275
|
-
|
|
23276
|
-
|
|
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) {
|
|
@@ -23975,13 +23974,17 @@
|
|
|
23975
23974
|
className = props.className,
|
|
23976
23975
|
_props$component = props.component,
|
|
23977
23976
|
component = _props$component === void 0 ? 'div' : _props$component,
|
|
23977
|
+
_props$slots = props.slots,
|
|
23978
|
+
slots = _props$slots === void 0 ? {} : _props$slots,
|
|
23979
|
+
_props$slotProps = props.slotProps,
|
|
23980
|
+
slotProps = _props$slotProps === void 0 ? {} : _props$slotProps,
|
|
23978
23981
|
imgProps = props.imgProps,
|
|
23979
23982
|
sizes = props.sizes,
|
|
23980
23983
|
src = props.src,
|
|
23981
23984
|
srcSet = props.srcSet,
|
|
23982
23985
|
_props$variant = props.variant,
|
|
23983
23986
|
variant = _props$variant === void 0 ? 'circular' : _props$variant,
|
|
23984
|
-
other = _objectWithoutProperties(props, ["alt", "children", "className", "component", "imgProps", "sizes", "src", "srcSet", "variant"]);
|
|
23987
|
+
other = _objectWithoutProperties(props, ["alt", "children", "className", "component", "slots", "slotProps", "imgProps", "sizes", "src", "srcSet", "variant"]);
|
|
23985
23988
|
var children = null;
|
|
23986
23989
|
|
|
23987
23990
|
// Use a hook instead of onError on the img element to support server-side rendering.
|
|
@@ -23997,16 +24000,28 @@
|
|
|
23997
24000
|
variant: variant
|
|
23998
24001
|
});
|
|
23999
24002
|
var classes = useUtilityClasses$1w(ownerState);
|
|
24003
|
+
var _useSlot = useSlot('img', {
|
|
24004
|
+
className: classes.img,
|
|
24005
|
+
elementType: AvatarImg,
|
|
24006
|
+
externalForwardedProps: {
|
|
24007
|
+
slots: slots,
|
|
24008
|
+
slotProps: {
|
|
24009
|
+
img: _extends({}, imgProps, slotProps.img)
|
|
24010
|
+
}
|
|
24011
|
+
},
|
|
24012
|
+
additionalProps: {
|
|
24013
|
+
alt: alt,
|
|
24014
|
+
src: src,
|
|
24015
|
+
srcSet: srcSet,
|
|
24016
|
+
sizes: sizes
|
|
24017
|
+
},
|
|
24018
|
+
ownerState: ownerState
|
|
24019
|
+
}),
|
|
24020
|
+
_useSlot2 = _slicedToArray(_useSlot, 2),
|
|
24021
|
+
ImgSlot = _useSlot2[0],
|
|
24022
|
+
imgSlotProps = _useSlot2[1];
|
|
24000
24023
|
if (hasImgNotFailing) {
|
|
24001
|
-
children = /*#__PURE__*/jsxRuntime_1(
|
|
24002
|
-
alt: alt,
|
|
24003
|
-
srcSet: srcSet,
|
|
24004
|
-
src: src,
|
|
24005
|
-
sizes: sizes,
|
|
24006
|
-
ownerState: ownerState,
|
|
24007
|
-
className: classes.img
|
|
24008
|
-
}, imgProps));
|
|
24009
|
-
|
|
24024
|
+
children = /*#__PURE__*/jsxRuntime_1(ImgSlot, _extends({}, imgSlotProps));
|
|
24010
24025
|
// We only render valid children, non valid children are rendered with a fallback
|
|
24011
24026
|
// We consider that invalid children are all falsy values, except 0, which is valid.
|
|
24012
24027
|
} else if (!!childrenProp || childrenProp === 0) {
|
|
@@ -24059,12 +24074,27 @@
|
|
|
24059
24074
|
/**
|
|
24060
24075
|
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attributes) applied to the `img` element if the component is used to display an image.
|
|
24061
24076
|
* It can be used to listen for the loading error event.
|
|
24077
|
+
* @deprecated Use `slotProps.img` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
24062
24078
|
*/
|
|
24063
24079
|
imgProps: PropTypes.object,
|
|
24064
24080
|
/**
|
|
24065
24081
|
* The `sizes` attribute for the `img` element.
|
|
24066
24082
|
*/
|
|
24067
24083
|
sizes: PropTypes.string,
|
|
24084
|
+
/**
|
|
24085
|
+
* The props used for each slot inside.
|
|
24086
|
+
* @default {}
|
|
24087
|
+
*/
|
|
24088
|
+
slotProps: PropTypes.shape({
|
|
24089
|
+
img: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
24090
|
+
}),
|
|
24091
|
+
/**
|
|
24092
|
+
* The components used for each slot inside.
|
|
24093
|
+
* @default {}
|
|
24094
|
+
*/
|
|
24095
|
+
slots: PropTypes.shape({
|
|
24096
|
+
img: PropTypes.elementType
|
|
24097
|
+
}),
|
|
24068
24098
|
/**
|
|
24069
24099
|
* The `src` attribute for the `img` element.
|
|
24070
24100
|
*/
|
|
@@ -29213,7 +29243,7 @@
|
|
|
29213
29243
|
/**
|
|
29214
29244
|
* If `true`, the divider will have a lighter color.
|
|
29215
29245
|
* @default false
|
|
29216
|
-
* @deprecated Use <Divider sx={{
|
|
29246
|
+
* @deprecated Use <Divider sx={{ opacity: 0.6 }} /> (or any opacity or color) instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
|
|
29217
29247
|
*/
|
|
29218
29248
|
light: PropTypes.bool,
|
|
29219
29249
|
/**
|
|
@@ -48113,7 +48143,7 @@
|
|
|
48113
48143
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
48114
48144
|
// └─────────────────────────────────────────────────────────────────────┘
|
|
48115
48145
|
/**
|
|
48116
|
-
* Should be valid
|
|
48146
|
+
* Should be valid `<tr>` children such as `TableCell`.
|
|
48117
48147
|
*/
|
|
48118
48148
|
children: PropTypes.node,
|
|
48119
48149
|
/**
|