@mui/utils 5.14.11 → 5.14.12
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 +81 -0
- package/ClassNameGenerator/ClassNameGenerator.js +1 -2
- package/elementAcceptingRef.js +1 -2
- package/elementTypeAcceptingRef.js +1 -2
- package/esm/getValidReactChildren.js +11 -0
- package/esm/index.js +1 -0
- package/getValidReactChildren.d.ts +8 -0
- package/getValidReactChildren.js +18 -0
- package/index.d.ts +1 -0
- package/index.js +9 -1
- package/integerPropType.js +1 -2
- package/legacy/getValidReactChildren.js +13 -0
- package/legacy/index.js +2 -1
- package/modern/getValidReactChildren.js +11 -0
- package/modern/index.js +2 -1
- package/package.json +3 -3
- package/ponyfillGlobal/ponyfillGlobal.js +1 -2
- package/refType.js +1 -2
- package/useEnhancedEffect/useEnhancedEffect.js +1 -2
- package/useEventCallback/useEventCallback.js +1 -2
- package/usePreviousProps.js +1 -2
- package/visuallyHidden.js +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,86 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 5.14.12
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.14.11..master -->
|
|
6
|
+
|
|
7
|
+
_Oct 3, 2023_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 17 contributors who made this release possible. Here are some highlights ✨:
|
|
10
|
+
|
|
11
|
+
- 🎨 Introduced color inversion utilities to Joy UI (#38916) @siriwatknp
|
|
12
|
+
- 🚀 Added Chip and related TextField components to Material You @DiegoAndai, @mj12albert
|
|
13
|
+
|
|
14
|
+
### `@mui/material@5.14.12`
|
|
15
|
+
|
|
16
|
+
- [DialogActions] Apply margin-left when children is not of `button` type (#39189) @sai6855
|
|
17
|
+
- [Select] Improve a11y by adding combobox role and aria-controls attribute (#38785) @xulingzhihou
|
|
18
|
+
- [Select] Fix MenuProps slotProps forwarding (#39177) @DiegoAndai
|
|
19
|
+
- [TextField] Polish types in Textfield demo (#39140) @sai6855
|
|
20
|
+
- [ButtonGroup] Fix rendering with conditional elements (#38989) @ZeeshanTamboli
|
|
21
|
+
|
|
22
|
+
### `@mui/system@5.14.12`
|
|
23
|
+
|
|
24
|
+
- [system] Add support for `variants` in the styled() util (#39073) @mnajdova
|
|
25
|
+
- [Box] Add missing logical spacing property types (#39169) @Semigradsky
|
|
26
|
+
|
|
27
|
+
### `@mui/base@5.0.0-beta.18`
|
|
28
|
+
|
|
29
|
+
- [useSlider] Align externalProps handling (#38854) @mj12albert
|
|
30
|
+
- [useTabs] Align external props handling for useTab/useTabPanel/useTabsList (#39037) @mj12albert
|
|
31
|
+
- [test] Fix import paths in useTab tests (#39291) @mj12albert
|
|
32
|
+
|
|
33
|
+
### `@mui/material-next@6.0.0-alpha.104`
|
|
34
|
+
|
|
35
|
+
- [Chip] Add Material You Chip component (#38927) @DiegoAndai
|
|
36
|
+
- [Divider] Copy v5 Divider (#39197) @mj12albert
|
|
37
|
+
- [FilledInput] Copy v5 FilledInput (#39040) @mj12albert
|
|
38
|
+
- [FormControl] Add FormControl component (#39032) @mj12albert
|
|
39
|
+
- [Select] Copy Select files from v5 (#39188) @DiegoAndai
|
|
40
|
+
- [TextField] Copy v5 TextField's inner components (#39166) @mj12albert
|
|
41
|
+
|
|
42
|
+
### `@mui/joy@5.0.0-beta.9`
|
|
43
|
+
|
|
44
|
+
- Introduce color inversion utilities (#38916) @siriwatknp
|
|
45
|
+
- Replace margin with `gap` property (#39147) @siriwatknp
|
|
46
|
+
- [CssBaseline] use Joy `GlobalStyles` (#39278) @siriwatknp
|
|
47
|
+
- [Drawer] Apply content styles from theme to content slot (#39199) @sai6855
|
|
48
|
+
- [List] Add gap and missing active styles (#39146) @siriwatknp
|
|
49
|
+
- [Switch] Slight adjustments to the design (#39276) @danilo-leal
|
|
50
|
+
|
|
51
|
+
### Docs
|
|
52
|
+
|
|
53
|
+
- [docs] Update Autocomplete demo for React 18 (#39162) @oliviertassinari
|
|
54
|
+
- [docs-infra] Tweak feedback footer section design (#36556) @danilo-leal
|
|
55
|
+
- [docs-infra] Improve code syntax highlight (#39181) @oliviertassinari
|
|
56
|
+
- [docs][base] Add Tailwind CSS + plain CSS demo on the TextArea page (#39046) @alisasanib
|
|
57
|
+
- [docs][base-ui] Fix style for root div of multiline input (#39182) @ttlpta
|
|
58
|
+
- [docs][base-ui] Improve Select's country select demo (#38983) @oliviertassinari
|
|
59
|
+
- [docs][joy-ui] Add scrollable tabs example (#39260) @siriwatknp
|
|
60
|
+
- [docs][joy-ui] Match `Autocomplete` github label demo to actual github label dropdown (#39228) @sai6855
|
|
61
|
+
- [docs][joy-ui] Refine the Rental dashboard template (#39059) @zanivan
|
|
62
|
+
- [docs][joy-ui] Removed incomplete sentence in the Aspect Ratio page (#39227) @Erik-McKelvey
|
|
63
|
+
- [docs][joy-ui] Fix typo in the Accordion page (#39226) @Erik-McKelvey
|
|
64
|
+
- [docs][joy-ui] Update and standardize template Sidemenus (#39271) @zanivan
|
|
65
|
+
- [docs][joy-ui] Add a roadmap page (#39163) @danilo-leal
|
|
66
|
+
- [docs][material-ui] Replace `Box` with `Stack` in applicable demos (#39174) @sai6855
|
|
67
|
+
- [docs][material-ui] Add small polish to the Templates page (#39224) @danilo-leal
|
|
68
|
+
- [docs][material-ui] Small revision to the Icons page (#38840) @danilo-leal
|
|
69
|
+
|
|
70
|
+
### Core
|
|
71
|
+
|
|
72
|
+
- Add next lint config to eslint (#39183) @Janpot
|
|
73
|
+
- [core] Update eslint rules (#39178) @romgrk
|
|
74
|
+
- [core] Fix Greg GitHub slug @oliviertassinari
|
|
75
|
+
- [core] Priority Support casing normalization @oliviertassinari
|
|
76
|
+
- [website] Add Heat map in pricing page (#39269) @oliviertassinari
|
|
77
|
+
- [website] Update `React Engineer - xCharts` Ashby link (#39172) @DanailH
|
|
78
|
+
- [website] Add Charts to the pricing table (#38680) @alexfauquette
|
|
79
|
+
- [website] Polish career experience @oliviertassinari
|
|
80
|
+
- [website] Simplify the Core products file (#39194) @danilo-leal
|
|
81
|
+
|
|
82
|
+
All contributors of this release in alphabetical order: @alexfauquette, @brijeshb42, @DanailH, @danilo-leal, @DiegoAndai, @Erik-McKelvey, @Janpot, @mj12albert, @mnajdova, @oliviertassinari, @romgrk, @sai6855, @Semigradsky, @siriwatknp, @xulingzhihou, @zanivan, @ZeeshanTamboli
|
|
83
|
+
|
|
3
84
|
## 5.14.11
|
|
4
85
|
|
|
5
86
|
<!-- generated comparing v5.14.10..master -->
|
package/elementAcceptingRef.js
CHANGED
|
@@ -46,5 +46,4 @@ function acceptingRef(props, propName, componentName, location, propFullName) {
|
|
|
46
46
|
}
|
|
47
47
|
const elementAcceptingRef = (0, _chainPropTypes.default)(_propTypes.default.element, acceptingRef);
|
|
48
48
|
elementAcceptingRef.isRequired = (0, _chainPropTypes.default)(_propTypes.default.element.isRequired, acceptingRef);
|
|
49
|
-
var _default = elementAcceptingRef;
|
|
50
|
-
exports.default = _default;
|
|
49
|
+
var _default = exports.default = elementAcceptingRef;
|
|
@@ -44,5 +44,4 @@ function elementTypeAcceptingRef(props, propName, componentName, location, propF
|
|
|
44
44
|
}
|
|
45
45
|
return null;
|
|
46
46
|
}
|
|
47
|
-
var _default = (0, _chainPropTypes.default)(_propTypes.default.elementType, elementTypeAcceptingRef);
|
|
48
|
-
exports.default = _default;
|
|
47
|
+
var _default = exports.default = (0, _chainPropTypes.default)(_propTypes.default.elementType, elementTypeAcceptingRef);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Gets only the valid children of a component,
|
|
5
|
+
* and ignores any nullish or falsy child.
|
|
6
|
+
*
|
|
7
|
+
* @param children the children
|
|
8
|
+
*/
|
|
9
|
+
export default function getValidReactChildren(children) {
|
|
10
|
+
return React.Children.toArray(children).filter(child => /*#__PURE__*/React.isValidElement(child));
|
|
11
|
+
}
|
package/esm/index.js
CHANGED
|
@@ -30,6 +30,7 @@ export { default as unstable_useIsFocusVisible } from './useIsFocusVisible';
|
|
|
30
30
|
export { default as unstable_getScrollbarSize } from './getScrollbarSize';
|
|
31
31
|
export { detectScrollType as unstable_detectScrollType, getNormalizedScrollLeft as unstable_getNormalizedScrollLeft } from './scrollLeft';
|
|
32
32
|
export { default as usePreviousProps } from './usePreviousProps';
|
|
33
|
+
export { default as getValidReactChildren } from './getValidReactChildren';
|
|
33
34
|
export { default as visuallyHidden } from './visuallyHidden';
|
|
34
35
|
export { default as integerPropType } from './integerPropType';
|
|
35
36
|
export { default as internal_resolveProps } from './resolveProps';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Gets only the valid children of a component,
|
|
4
|
+
* and ignores any nullish or falsy child.
|
|
5
|
+
*
|
|
6
|
+
* @param children the children
|
|
7
|
+
*/
|
|
8
|
+
export default function getValidReactChildren(children: React.ReactNode): React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = getValidReactChildren;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
9
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
10
|
+
/**
|
|
11
|
+
* Gets only the valid children of a component,
|
|
12
|
+
* and ignores any nullish or falsy child.
|
|
13
|
+
*
|
|
14
|
+
* @param children the children
|
|
15
|
+
*/
|
|
16
|
+
function getValidReactChildren(children) {
|
|
17
|
+
return React.Children.toArray(children).filter(child => /*#__PURE__*/React.isValidElement(child));
|
|
18
|
+
}
|
package/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export { default as unstable_useIsFocusVisible } from './useIsFocusVisible';
|
|
|
28
28
|
export { default as unstable_getScrollbarSize } from './getScrollbarSize';
|
|
29
29
|
export { detectScrollType as unstable_detectScrollType, getNormalizedScrollLeft as unstable_getNormalizedScrollLeft, } from './scrollLeft';
|
|
30
30
|
export { default as usePreviousProps } from './usePreviousProps';
|
|
31
|
+
export { default as getValidReactChildren } from './getValidReactChildren';
|
|
31
32
|
export { default as visuallyHidden } from './visuallyHidden';
|
|
32
33
|
export { default as integerPropType } from './integerPropType';
|
|
33
34
|
export { default as internal_resolveProps } from './resolveProps';
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/utils v5.14.
|
|
2
|
+
* @mui/utils v5.14.12
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -44,6 +44,7 @@ var _exportNames = {
|
|
|
44
44
|
unstable_detectScrollType: true,
|
|
45
45
|
unstable_getNormalizedScrollLeft: true,
|
|
46
46
|
usePreviousProps: true,
|
|
47
|
+
getValidReactChildren: true,
|
|
47
48
|
visuallyHidden: true,
|
|
48
49
|
integerPropType: true,
|
|
49
50
|
internal_resolveProps: true,
|
|
@@ -100,6 +101,12 @@ Object.defineProperty(exports, "getDisplayName", {
|
|
|
100
101
|
return _getDisplayName.default;
|
|
101
102
|
}
|
|
102
103
|
});
|
|
104
|
+
Object.defineProperty(exports, "getValidReactChildren", {
|
|
105
|
+
enumerable: true,
|
|
106
|
+
get: function () {
|
|
107
|
+
return _getValidReactChildren.default;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
103
110
|
Object.defineProperty(exports, "integerPropType", {
|
|
104
111
|
enumerable: true,
|
|
105
112
|
get: function () {
|
|
@@ -309,6 +316,7 @@ var _useIsFocusVisible = _interopRequireDefault(require("./useIsFocusVisible"));
|
|
|
309
316
|
var _getScrollbarSize = _interopRequireDefault(require("./getScrollbarSize"));
|
|
310
317
|
var _scrollLeft = require("./scrollLeft");
|
|
311
318
|
var _usePreviousProps = _interopRequireDefault(require("./usePreviousProps"));
|
|
319
|
+
var _getValidReactChildren = _interopRequireDefault(require("./getValidReactChildren"));
|
|
312
320
|
var _visuallyHidden = _interopRequireDefault(require("./visuallyHidden"));
|
|
313
321
|
var _integerPropType = _interopRequireDefault(require("./integerPropType"));
|
|
314
322
|
var _resolveProps = _interopRequireDefault(require("./resolveProps"));
|
package/integerPropType.js
CHANGED
|
@@ -55,5 +55,4 @@ function validatorNoop() {
|
|
|
55
55
|
}
|
|
56
56
|
validator.isRequired = requiredInteger;
|
|
57
57
|
validatorNoop.isRequired = validatorNoop;
|
|
58
|
-
var _default = process.env.NODE_ENV === 'production' ? validatorNoop : validator;
|
|
59
|
-
exports.default = _default;
|
|
58
|
+
var _default = exports.default = process.env.NODE_ENV === 'production' ? validatorNoop : validator;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Gets only the valid children of a component,
|
|
5
|
+
* and ignores any nullish or falsy child.
|
|
6
|
+
*
|
|
7
|
+
* @param children the children
|
|
8
|
+
*/
|
|
9
|
+
export default function getValidReactChildren(children) {
|
|
10
|
+
return React.Children.toArray(children).filter(function (child) {
|
|
11
|
+
return /*#__PURE__*/React.isValidElement(child);
|
|
12
|
+
});
|
|
13
|
+
}
|
package/legacy/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/utils v5.14.
|
|
2
|
+
* @mui/utils v5.14.12
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -37,6 +37,7 @@ export { default as unstable_useIsFocusVisible } from './useIsFocusVisible';
|
|
|
37
37
|
export { default as unstable_getScrollbarSize } from './getScrollbarSize';
|
|
38
38
|
export { detectScrollType as unstable_detectScrollType, getNormalizedScrollLeft as unstable_getNormalizedScrollLeft } from './scrollLeft';
|
|
39
39
|
export { default as usePreviousProps } from './usePreviousProps';
|
|
40
|
+
export { default as getValidReactChildren } from './getValidReactChildren';
|
|
40
41
|
export { default as visuallyHidden } from './visuallyHidden';
|
|
41
42
|
export { default as integerPropType } from './integerPropType';
|
|
42
43
|
export { default as internal_resolveProps } from './resolveProps';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Gets only the valid children of a component,
|
|
5
|
+
* and ignores any nullish or falsy child.
|
|
6
|
+
*
|
|
7
|
+
* @param children the children
|
|
8
|
+
*/
|
|
9
|
+
export default function getValidReactChildren(children) {
|
|
10
|
+
return React.Children.toArray(children).filter(child => /*#__PURE__*/React.isValidElement(child));
|
|
11
|
+
}
|
package/modern/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/utils v5.14.
|
|
2
|
+
* @mui/utils v5.14.12
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -37,6 +37,7 @@ export { default as unstable_useIsFocusVisible } from './useIsFocusVisible';
|
|
|
37
37
|
export { default as unstable_getScrollbarSize } from './getScrollbarSize';
|
|
38
38
|
export { detectScrollType as unstable_detectScrollType, getNormalizedScrollLeft as unstable_getNormalizedScrollLeft } from './scrollLeft';
|
|
39
39
|
export { default as usePreviousProps } from './usePreviousProps';
|
|
40
|
+
export { default as getValidReactChildren } from './getValidReactChildren';
|
|
40
41
|
export { default as visuallyHidden } from './visuallyHidden';
|
|
41
42
|
export { default as integerPropType } from './integerPropType';
|
|
42
43
|
export { default as internal_resolveProps } from './resolveProps';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/utils",
|
|
3
|
-
"version": "5.14.
|
|
3
|
+
"version": "5.14.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "Utility functions for React components.",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"url": "https://opencollective.com/mui"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@babel/runtime": "^7.
|
|
30
|
-
"@types/prop-types": "^15.7.
|
|
29
|
+
"@babel/runtime": "^7.23.1",
|
|
30
|
+
"@types/prop-types": "^15.7.7",
|
|
31
31
|
"prop-types": "^15.8.1",
|
|
32
32
|
"react-is": "^18.2.0"
|
|
33
33
|
},
|
|
@@ -6,5 +6,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
9
|
-
var _default = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
|
|
10
|
-
exports.default = _default;
|
|
9
|
+
var _default = exports.default = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
|
package/refType.js
CHANGED
|
@@ -7,5 +7,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
const refType = _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]);
|
|
10
|
-
var _default = refType;
|
|
11
|
-
exports.default = _default;
|
|
10
|
+
var _default = exports.default = refType;
|
|
@@ -16,5 +16,4 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
16
16
|
* and confirm it doesn't apply to your use-case.
|
|
17
17
|
*/
|
|
18
18
|
const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
19
|
-
var _default = useEnhancedEffect;
|
|
20
|
-
exports.default = _default;
|
|
19
|
+
var _default = exports.default = useEnhancedEffect;
|
package/usePreviousProps.js
CHANGED
package/visuallyHidden.js
CHANGED