@mui/utils 5.14.11 → 5.14.13

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,5 +1,152 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.14.13
4
+
5
+ <!-- generated comparing v5.14.12..master -->
6
+
7
+ _Oct 10, 2023_
8
+
9
+ A big thanks to the 22 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - 🚀 Added support for `styled-components` v6 (#39042) @mnajdova
12
+
13
+ ### `@mui/material@5.14.13`
14
+
15
+ - [Checkbox] Fix checkbox hover bg with extendTheme (#39319) @brijeshb42
16
+ - [Chip] Outlined Chip variant is wider than the Filled counterpart (#39342) @chirag3003
17
+ - [Select] Add notice about select's a11y improvement on v5.14.12 changelog (#39310) @DiegoAndai
18
+ - [Typography] Color prop check for primitive type (#39071) @DarhkVoyd
19
+ - [Pagination] Fix background color on hover and keyboard focus when using CSS theme variables (#39220) @ValkonX33
20
+ - [Popper] Add missing `styleOverrides` Popper type in theme (#39154) @axelbostrom
21
+ - [Slider] Support all default palette colors in TypeScript (#39058) @gugudwt
22
+
23
+ ### `@mui/base@5.0.0-beta.19`
24
+
25
+ - [Menu] Add the anchor prop (#39297) @michaldudak
26
+
27
+ ### `@mui/material-next@6.0.0-alpha.105`
28
+
29
+ - [Menu] Copy v5 Menu components (#39301) @mnajdova
30
+
31
+ ### `@mui/joy@5.0.0-beta.10`
32
+
33
+ - [Autocomplete] Add `type=button` to clear button (#39263) @brijeshb42
34
+ - [Button] Fix the text wrap issue (#38696) @atharva3333
35
+ - [Drawer] Apply color inversion to content slot instead (#39312) @siriwatknp
36
+ - [Switch] Fix missing class name (#39327) @Bestwebdesign
37
+
38
+ ### `@mui/styled-engine-sc@6.0.0-alpha.1`
39
+
40
+ - &#8203;<!-- 03 -->[system] Add support for `styled-components` v6 (#39042) @mnajdova
41
+
42
+ ### Docs
43
+
44
+ - [joy-ui] Adjust the templates page card design (#39369) @danilo-leal
45
+ - Rename the Data Grid "Quick filter" to "Search" (#37724) @alexfauquette
46
+ - Remove obsolete translations (#39221) @mbrookes
47
+ - Update link to add custom color in palette (#39359) @ZeeshanTamboli
48
+ - Denser code demo @oliviertassinari
49
+ - Set up MD3 experiments pages (#39323) @mj12albert
50
+ - [Drawer] Fix right anchored persistent drawer intercepts click when it is closed (#39318) @ZeeshanTamboli
51
+ - [joy-ui] Revise the Color Inversion page (#39306) @danilo-leal
52
+ - [joy-ui] Remove redundant `error` prop from input validation demo (#39280) @sai6855
53
+ - [material-ui] Rename themed components doc, fix typos (#39368) @samuelsycamore
54
+ - [material-ui] Adjust the Material You Chip section (#39325) @danilo-leal
55
+ - [system] Add documentation on how to augment custom theme types for the `sx` prop callback (#39259) @3xp10it3r
56
+ - [joy-ui][Input] Add debounce input demo (#39300) @sai6855
57
+
58
+ ### Core
59
+
60
+ - [docs-infra] Improve the open diamond sponsor spot callout (#39332) @danilo-leal
61
+ - [docs-infra] Fix Code Sandbox download issue (#39317) @ARJ2160
62
+ - [docs-infra] Remove overflow: hidden for demo gradient bg (#39225) @oliviertassinari
63
+ - [website] Fix footer responsiveness (#39355) @danilo-leal
64
+ - [website] Host Figma redirections in the store for now @oliviertassinari
65
+
66
+ All contributors of this release in alphabetical order: @3xp10it3r, @alexfauquette, @ARJ2160, @atharva3333, @axelbostrom, @Bestwebdesign, @brijeshb42, @chirag3003, @danilo-leal, @DarhkVoyd, @DiegoAndai, @gugudwt, @mbrookes, @michaldudak, @mj12albert, @mnajdova, @oliviertassinari, @sai6855, @samuelsycamore, @siriwatknp, @ValkonX33, @ZeeshanTamboli
67
+
68
+ ## 5.14.12
69
+
70
+ <!-- generated comparing v5.14.11..master -->
71
+
72
+ _Oct 3, 2023_
73
+
74
+ A big thanks to the 17 contributors who made this release possible. Here are some highlights ✨:
75
+
76
+ - 🎨 Introduced color inversion utilities to Joy UI (#38916) @siriwatknp
77
+ - 🚀 Added Chip and related TextField components to Material You @DiegoAndai, @mj12albert
78
+ - 🏗️ Improve the Select's component a11y by adding the combobox role and aria-controls attribute (#38785) @xulingzhihou. If your tests require selecting the trigger element by the "button" role, then you'll have to change it to use the "combobox" role instead
79
+
80
+ ### `@mui/material@5.14.12`
81
+
82
+ - [DialogActions] Apply margin-left when children is not of `button` type (#39189) @sai6855
83
+ - [Select] Improve a11y by adding combobox role and aria-controls attribute (#38785) @xulingzhihou
84
+ - [Select] Fix MenuProps slotProps forwarding (#39177) @DiegoAndai
85
+ - [TextField] Polish types in Textfield demo (#39140) @sai6855
86
+ - [ButtonGroup] Fix rendering with conditional elements (#38989) @ZeeshanTamboli
87
+
88
+ ### `@mui/system@5.14.12`
89
+
90
+ - [system] Add support for `variants` in the styled() util (#39073) @mnajdova
91
+ - [Box] Add missing logical spacing property types (#39169) @Semigradsky
92
+
93
+ ### `@mui/base@5.0.0-beta.18`
94
+
95
+ - [useSlider] Align externalProps handling (#38854) @mj12albert
96
+ - [useTabs] Align external props handling for useTab/useTabPanel/useTabsList (#39037) @mj12albert
97
+ - [test] Fix import paths in useTab tests (#39291) @mj12albert
98
+
99
+ ### `@mui/material-next@6.0.0-alpha.104`
100
+
101
+ - [Chip] Add Material You Chip component (#38927) @DiegoAndai
102
+ - [Divider] Copy v5 Divider (#39197) @mj12albert
103
+ - [FilledInput] Copy v5 FilledInput (#39040) @mj12albert
104
+ - [FormControl] Add FormControl component (#39032) @mj12albert
105
+ - [Select] Copy Select files from v5 (#39188) @DiegoAndai
106
+ - [TextField] Copy v5 TextField's inner components (#39166) @mj12albert
107
+
108
+ ### `@mui/joy@5.0.0-beta.9`
109
+
110
+ - Introduce color inversion utilities (#38916) @siriwatknp
111
+ - Replace margin with `gap` property (#39147) @siriwatknp
112
+ - [CssBaseline] use Joy `GlobalStyles` (#39278) @siriwatknp
113
+ - [Drawer] Apply content styles from theme to content slot (#39199) @sai6855
114
+ - [List] Add gap and missing active styles (#39146) @siriwatknp
115
+ - [Switch] Slight adjustments to the design (#39276) @danilo-leal
116
+
117
+ ### Docs
118
+
119
+ - [docs] Update Autocomplete demo for React 18 (#39162) @oliviertassinari
120
+ - [docs-infra] Tweak feedback footer section design (#36556) @danilo-leal
121
+ - [docs-infra] Improve code syntax highlight (#39181) @oliviertassinari
122
+ - [docs][base] Add Tailwind CSS + plain CSS demo on the TextArea page (#39046) @alisasanib
123
+ - [docs][base-ui] Fix style for root div of multiline input (#39182) @ttlpta
124
+ - [docs][base-ui] Improve Select's country select demo (#38983) @oliviertassinari
125
+ - [docs][joy-ui] Add scrollable tabs example (#39260) @siriwatknp
126
+ - [docs][joy-ui] Match `Autocomplete` github label demo to actual github label dropdown (#39228) @sai6855
127
+ - [docs][joy-ui] Refine the Rental dashboard template (#39059) @zanivan
128
+ - [docs][joy-ui] Removed incomplete sentence in the Aspect Ratio page (#39227) @Erik-McKelvey
129
+ - [docs][joy-ui] Fix typo in the Accordion page (#39226) @Erik-McKelvey
130
+ - [docs][joy-ui] Update and standardize template Sidemenus (#39271) @zanivan
131
+ - [docs][joy-ui] Add a roadmap page (#39163) @danilo-leal
132
+ - [docs][material-ui] Replace `Box` with `Stack` in applicable demos (#39174) @sai6855
133
+ - [docs][material-ui] Add small polish to the Templates page (#39224) @danilo-leal
134
+ - [docs][material-ui] Small revision to the Icons page (#38840) @danilo-leal
135
+
136
+ ### Core
137
+
138
+ - Add next lint config to eslint (#39183) @Janpot
139
+ - [core] Update eslint rules (#39178) @romgrk
140
+ - [core] Fix Greg GitHub slug @oliviertassinari
141
+ - [core] Priority Support casing normalization @oliviertassinari
142
+ - [website] Add Heat map in pricing page (#39269) @oliviertassinari
143
+ - [website] Update `React Engineer - xCharts` Ashby link (#39172) @DanailH
144
+ - [website] Add Charts to the pricing table (#38680) @alexfauquette
145
+ - [website] Polish career experience @oliviertassinari
146
+ - [website] Simplify the Core products file (#39194) @danilo-leal
147
+
148
+ 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
149
+
3
150
  ## 5.14.11
4
151
 
5
152
  <!-- generated comparing v5.14.10..master -->
@@ -20,5 +20,4 @@ const createClassNameGenerator = () => {
20
20
  };
21
21
  };
22
22
  const ClassNameGenerator = createClassNameGenerator();
23
- var _default = ClassNameGenerator;
24
- exports.default = _default;
23
+ var _default = exports.default = ClassNameGenerator;
@@ -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.11
2
+ * @mui/utils v5.14.13
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"));
@@ -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.11
2
+ * @mui/utils v5.14.13
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.11
2
+ * @mui/utils v5.14.13
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.11",
3
+ "version": "5.14.13",
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.22.15",
30
- "@types/prop-types": "^15.7.5",
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;
@@ -25,5 +25,4 @@ function useEventCallback(fn) {
25
25
  // tslint:disable-next-line:ban-comma-operator
26
26
  (0, ref.current)(...args), []);
27
27
  }
28
- var _default = useEventCallback;
29
- exports.default = _default;
28
+ var _default = exports.default = useEventCallback;
@@ -15,5 +15,4 @@ const usePreviousProps = value => {
15
15
  });
16
16
  return ref.current;
17
17
  };
18
- var _default = usePreviousProps;
19
- exports.default = _default;
18
+ var _default = exports.default = usePreviousProps;
package/visuallyHidden.js CHANGED
@@ -15,5 +15,4 @@ const visuallyHidden = {
15
15
  whiteSpace: 'nowrap',
16
16
  width: '1px'
17
17
  };
18
- var _default = visuallyHidden;
19
- exports.default = _default;
18
+ var _default = exports.default = visuallyHidden;