@mui/utils 5.14.10 → 5.14.11
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 +78 -0
- package/esm/isMuiElement.js +5 -1
- package/esm/useEnhancedEffect/useEnhancedEffect.js +8 -0
- package/index.js +1 -1
- package/isMuiElement.js +5 -1
- package/legacy/index.js +1 -1
- package/legacy/isMuiElement.js +5 -1
- package/legacy/useEnhancedEffect/useEnhancedEffect.js +8 -0
- package/modern/index.js +1 -1
- package/modern/isMuiElement.js +5 -1
- package/modern/useEnhancedEffect/useEnhancedEffect.js +8 -0
- package/package.json +1 -1
- package/useEnhancedEffect/useEnhancedEffect.d.ts +7 -0
- package/useEnhancedEffect/useEnhancedEffect.js +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,83 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 5.14.11
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.14.10..master -->
|
|
6
|
+
|
|
7
|
+
_Sep 26, 2023_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 23 contributors who made this release possible.
|
|
10
|
+
This release was mostly about 🐛 bug fixes and 📚 documentation improvements.
|
|
11
|
+
|
|
12
|
+
### `@mui/material@5.14.11`
|
|
13
|
+
|
|
14
|
+
- [Autocomplete] Re-export `AutocompleteValue` to make it available from path import (#38638) @vadimka123
|
|
15
|
+
- [Select][material-ui] Missing aria-multiselectable attribute on multiple Select component (#38855) @gitstart
|
|
16
|
+
- [l10n] labelDisplayedRows is added for trTR localization (#39056) @tebersefa
|
|
17
|
+
|
|
18
|
+
### `@mui/utils@5.14.11`
|
|
19
|
+
|
|
20
|
+
- Support RSC in `isMuiElement` util (#38129) @sai6855
|
|
21
|
+
|
|
22
|
+
### `@mui/base@5.0.0-beta.17`
|
|
23
|
+
|
|
24
|
+
- [NumberInput] Support adornments (#38900) @anle9650
|
|
25
|
+
- [Menu] Align external props handling for useMenu/MenuButton/MenuItem (#38946) @mj12albert
|
|
26
|
+
- [Select] Align external props handling (#39038) @mj12albert
|
|
27
|
+
- [TextareaAutosize] Simplify logic and add test (#38728) @oliviertassinari
|
|
28
|
+
|
|
29
|
+
### `@mui/joy@5.0.0-beta.8`
|
|
30
|
+
|
|
31
|
+
- [Button] Fix disabled button styling when component prop is provided (#38996) @sai6855
|
|
32
|
+
- [Drawer] Add missing `JoyDrawer` in theme components (#39074) @Studio384
|
|
33
|
+
|
|
34
|
+
### `@mui/material-next@6.0.0-alpha.103`
|
|
35
|
+
|
|
36
|
+
- [FormControl] Copy v5 FormControl (#39039) @mj12albert
|
|
37
|
+
|
|
38
|
+
### `@mui/lab@5.0.0-alpha.146`
|
|
39
|
+
|
|
40
|
+
- [TreeView] Fix JSDoc comments in TreeView and TreeItem (#38874) @jergason
|
|
41
|
+
|
|
42
|
+
### Docs
|
|
43
|
+
|
|
44
|
+
- Improve focus trap demo (#38985) @oliviertassinari
|
|
45
|
+
- Add Tailwind CSS + plain CSS demo on the Tabs page (#39000) @alisasanib
|
|
46
|
+
- Improve the default theme viewer design (#39049) @danilo-leal
|
|
47
|
+
- Add live demo with CssVarsProvider (#38792) @oliviertassinari
|
|
48
|
+
- Fix wrong hash on Card's page (#39151) @mnajdova
|
|
49
|
+
- Revise the Drawer page (#38988) @danilo-leal
|
|
50
|
+
- Simplify the button's loading indicator demo (#39082) @danilo-leal
|
|
51
|
+
- Fix the Templates link on the Overview page (#39086) @danilo-leal
|
|
52
|
+
- Refine the Sign in template (#38942) @zanivan
|
|
53
|
+
- Add `use-count-up` integration with the Circular Progress (#38952) @anon-phantom
|
|
54
|
+
|
|
55
|
+
### Core
|
|
56
|
+
|
|
57
|
+
- [blog] Add a company values blog post (#38802) @mikailaread
|
|
58
|
+
- [core] Downgrade lerna to 7.2.0 (#39149) @michaldudak
|
|
59
|
+
- [core] Simplify docs feedback interaction (#39075) @alexfauquette
|
|
60
|
+
- [core] Improve ref type definition (#38903) @oliviertassinari
|
|
61
|
+
- [core] Simplify career (#39112) @oliviertassinari
|
|
62
|
+
- [core] Update Babel types along with source packages (#39070) @michaldudak
|
|
63
|
+
- [core] Add a comment to explain `useEnhancedEffect` (#39035) @Janpot
|
|
64
|
+
- [docs-infra] Fix code removal in table of content (#39165) @alexfauquette
|
|
65
|
+
- [docs-infra] Improve callouts design (#39084) @danilo-leal
|
|
66
|
+
- [docs-infra] Fix key warning in Base UI Slider slots section (#38954) @ZeeshanTamboli
|
|
67
|
+
- [docs-infra] Fix error when redirecting to the root page (#38451) @maheshguntur
|
|
68
|
+
- [docs-infra] Open demo crash in the right repository (#39006) @oliviertassinari
|
|
69
|
+
- [test] Split the test package (#39061) @michaldudak
|
|
70
|
+
- [website] React Engineer - xCharts role (#38976) @DanailH
|
|
71
|
+
- [website] Improve the highlighter component colors (#39087) @danilo-leal
|
|
72
|
+
- [website] Fix Pricing page row hover (#39097) @danilo-leal
|
|
73
|
+
- [website] Fix typo with straight quote @oliviertassinari
|
|
74
|
+
- [website] Sync about page @oliviertassinari
|
|
75
|
+
- [website] Update the about page (#38733) @danilo-leal
|
|
76
|
+
- [website] Small fixes on the X marketing page (#38975) @flaviendelangle
|
|
77
|
+
- [website] Add stray design tweaks to the X page (#38589) @danilo-leal
|
|
78
|
+
|
|
79
|
+
All contributors of this release in alphabetical order: @alexfauquette, @alisasanib, @anle9650, @anon-phantom, @DanailH, @danilo-leal, @DiegoAndai, @flaviendelangle, @gitstart, @Janpot, @jergason, @maheshguntur, @michaldudak, @mikailaread, @mj12albert, @mnajdova, @oliviertassinari, @sai6855, @Studio384, @tebersefa, @vadimka123, @zanivan, @ZeeshanTamboli
|
|
80
|
+
|
|
3
81
|
## 5.14.10
|
|
4
82
|
|
|
5
83
|
<!-- generated comparing v5.14.9..master -->
|
package/esm/isMuiElement.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export default function isMuiElement(element, muiNames) {
|
|
3
|
-
|
|
3
|
+
var _muiName, _element$type;
|
|
4
|
+
return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName
|
|
5
|
+
// relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
|
|
6
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
7
|
+
(_muiName = element.type.muiName) != null ? _muiName : (_element$type = element.type) == null || (_element$type = _element$type._payload) == null || (_element$type = _element$type.value) == null ? void 0 : _element$type.muiName) !== -1;
|
|
4
8
|
}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.
|
|
7
|
+
* This is useful for effects that are only needed for client-side rendering but not for SSR.
|
|
8
|
+
*
|
|
9
|
+
* Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
|
|
10
|
+
* and confirm it doesn't apply to your use-case.
|
|
11
|
+
*/
|
|
4
12
|
const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
5
13
|
export default useEnhancedEffect;
|
package/index.js
CHANGED
package/isMuiElement.js
CHANGED
|
@@ -8,5 +8,9 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
8
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
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
10
|
function isMuiElement(element, muiNames) {
|
|
11
|
-
|
|
11
|
+
var _muiName, _element$type;
|
|
12
|
+
return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName
|
|
13
|
+
// relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
|
|
14
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
15
|
+
(_muiName = element.type.muiName) != null ? _muiName : (_element$type = element.type) == null || (_element$type = _element$type._payload) == null || (_element$type = _element$type.value) == null ? void 0 : _element$type.muiName) !== -1;
|
|
12
16
|
}
|
package/legacy/index.js
CHANGED
package/legacy/isMuiElement.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export default function isMuiElement(element, muiNames) {
|
|
3
|
-
|
|
3
|
+
var _muiName, _element$type;
|
|
4
|
+
return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName
|
|
5
|
+
// relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
|
|
6
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
7
|
+
(_muiName = element.type.muiName) != null ? _muiName : (_element$type = element.type) == null || (_element$type = _element$type._payload) == null || (_element$type = _element$type.value) == null ? void 0 : _element$type.muiName) !== -1;
|
|
4
8
|
}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.
|
|
7
|
+
* This is useful for effects that are only needed for client-side rendering but not for SSR.
|
|
8
|
+
*
|
|
9
|
+
* Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
|
|
10
|
+
* and confirm it doesn't apply to your use-case.
|
|
11
|
+
*/
|
|
4
12
|
var useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
5
13
|
export default useEnhancedEffect;
|
package/modern/index.js
CHANGED
package/modern/isMuiElement.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export default function isMuiElement(element, muiNames) {
|
|
3
|
-
return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf(
|
|
3
|
+
return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf(
|
|
4
|
+
// For server components `muiName` is avaialble in element.type._payload.value.muiName
|
|
5
|
+
// relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
|
|
6
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
7
|
+
element.type.muiName ?? element.type?._payload?.value?.muiName) !== -1;
|
|
4
8
|
}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.
|
|
7
|
+
* This is useful for effects that are only needed for client-side rendering but not for SSR.
|
|
8
|
+
*
|
|
9
|
+
* Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
|
|
10
|
+
* and confirm it doesn't apply to your use-case.
|
|
11
|
+
*/
|
|
4
12
|
const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
5
13
|
export default useEnhancedEffect;
|
package/package.json
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.
|
|
4
|
+
* This is useful for effects that are only needed for client-side rendering but not for SSR.
|
|
5
|
+
*
|
|
6
|
+
* Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
|
|
7
|
+
* and confirm it doesn't apply to your use-case.
|
|
8
|
+
*/
|
|
2
9
|
declare const useEnhancedEffect: typeof React.useLayoutEffect;
|
|
3
10
|
export default useEnhancedEffect;
|
|
@@ -8,6 +8,13 @@ exports.default = void 0;
|
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
9
|
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); }
|
|
10
10
|
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; }
|
|
11
|
+
/**
|
|
12
|
+
* A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.
|
|
13
|
+
* This is useful for effects that are only needed for client-side rendering but not for SSR.
|
|
14
|
+
*
|
|
15
|
+
* Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
|
|
16
|
+
* and confirm it doesn't apply to your use-case.
|
|
17
|
+
*/
|
|
11
18
|
const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
12
19
|
var _default = useEnhancedEffect;
|
|
13
20
|
exports.default = _default;
|