@mui/lab 6.0.0-alpha.0 → 6.0.0-alpha.2

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,131 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## v6.0.0-alpha.2
4
+
5
+ <!-- generated comparing v6.0.0-alpha.1..next -->
6
+
7
+ _Apr 9, 2024_
8
+
9
+ A big thanks to the 5 contributors who made this release possible.
10
+ This release was mostly about 🐛 bug fixes and 📚 documentation improvements.
11
+
12
+ ### `@mui/material@6.0.0-alpha.2`
13
+
14
+ - &#8203;<!-- 03 -->[typescript][Select] Fix `muiName` property TypeScript error (#41726) @EyaOuenniche
15
+ - &#8203;<!-- 04 -->[l10n] Fix typo in is-IS locale (#41810) @magnimarels
16
+
17
+ ### `@pigment-css/react@0.0.6`
18
+
19
+ - &#8203;<!-- 12 -->[core] Remove `muiName` during eval phase (#41811) @brijeshb42
20
+
21
+ ### `@pigment-css/nextjs-plugin@0.0.6`
22
+
23
+ - &#8203;<!-- 02 -->[nextjs] Handle file references passed through imports (#41817) @brijeshb42
24
+ - &#8203;<!-- 01 -->[nextjs] Allow usage of url() CSS function (#41758) @brijeshb42
25
+
26
+ ### Docs
27
+
28
+ - &#8203;<!-- 11 -->[docs] Fix 301 links @oliviertassinari
29
+ - &#8203;<!-- 06 -->[pigment-css][docs] Fix README typo (#41808) @aarongarciah
30
+ - &#8203;<!-- 05 -->[pigment-css][docs] Fix output on dynamic styles example (#41805) @aarongarciah
31
+ - &#8203;<!-- 07 -->[material-ui][docs] Fix Material 3 message typo (#41821) @aarongarciah
32
+ - &#8203;<!-- 08 -->[material-ui][docs] Add stray design tweaks to free templates (#41696) @zanivan
33
+
34
+ ### Core
35
+
36
+ - &#8203;<!-- 13 -->[core] Remove unused files (#41818) @mnajdova
37
+ - &#8203;<!-- 10 -->[docs-infra] Fix analytics about inline ads (#41474) (#41819) @alexfauquette
38
+ - &#8203;<!-- 08 -->[docs-infra] Fix drawer performances (#41807) @alexfauquette
39
+
40
+ All contributors of this release in alphabetical order: @aarongarciah, @alexfauquette, @brijeshb42, @EyaOuenniche, @oliviertassinari
41
+
42
+ ## v6.0.0-alpha.1
43
+
44
+ <!-- generated comparing v6.0.0-alpha.0..next -->
45
+
46
+ _Apr 5, 2024_
47
+
48
+ A big thanks to the 19 contributors who made this release possible. Here are some highlights ✨:
49
+
50
+ - 🔥 Converted 3 more Material UI components to use Pigment CSS. Current progress is 36%!
51
+ - 🚀 Added a spacing CSS variable to the Material UI and Joy UI themes.
52
+ - 💫 Added 3 redesigned free Material UI templates: [Sign-in](https://next.mui.com/material-ui/getting-started/templates/sign-in/), [Sign-in side](https://next.mui.com/material-ui/getting-started/templates/sign-in-side/), and [Sign-up](https://next.mui.com/material-ui/getting-started/templates/sign-up/).
53
+
54
+ ### `@mui/material@6.0.0-alpha.1`
55
+
56
+ - [AppBar] Convert to support CSS extraction (#41247) @mnajdova
57
+ - [Badge] Deprecate components and componentsProps (#41655) @skmanoj322
58
+ - [Button] Convert to support CSS extraction (#41378) @siriwatknp
59
+ - [ButtonGroup] Convert to support CSS extraction (#41666) @zanivan
60
+ - [RadioGroup] Apply classnames (#41610) @ZeeshanTamboli
61
+ - [Slider] Move palette styles to the bottom (#41676) @siriwatknp
62
+ - Add the `spacing` theme token (#40224) @siriwatknp
63
+
64
+ ### `@mui/system@6.0.0-alpha.1`
65
+
66
+ - Add the `spacing` theme token to be used in `theme.spacing()` (#40224) @siriwatknp
67
+
68
+ ### `@mui/codemod@6.0.0-alpha.1`
69
+
70
+ - [codemod] Setup v6 codemod structure (#41668) @DiegoAndai
71
+
72
+ ### `@mui/lab@6.0.0-alpha.1`
73
+
74
+ - [TabPanel] Add keepMounted prop to match Joy UI (#41651) @ppaskaris-plooto
75
+
76
+ ### `@mui/joy@5.0.0-beta.34`
77
+
78
+ - Add `spacing` theme token (#40224) @siriwatknp
79
+
80
+ ### `@pigment-css/react@0.0.5`
81
+
82
+ - Improve sx prop support (#41589) @brijeshb42
83
+ - Fix Emotion styled error (#41699) @siriwatknp
84
+ - Fix propTypes removal during eval stage (#41695) @brijeshb42
85
+ - Fix props forwarding (#41688) @siriwatknp
86
+ - Fix sx prop transformation on Box (#41705) @brijeshb42
87
+
88
+ ### `@pigment-css/vite-plugin@0.0.5`
89
+
90
+ - Use constant filename for pigment styles (#41667) @brijeshb42
91
+
92
+ ### `@pigment-css/nextjs-plugin@0.0.5`
93
+
94
+ - Add missing RTL implementation (#41751) @brijeshb42
95
+
96
+ ### Docs
97
+
98
+ - [pigment-css] Update README.md installation to use the next tag (#41649) @mnajdova
99
+ - [pigment-css] Add "Building design system components" guide with Pigment CSS (#41635) @siriwatknp
100
+ - Continue migration of Base UI to sperate repository @oliviertassinari
101
+ - Stick to one way to write IE 11 @oliviertassinari
102
+ - Fix typo in CONTRIBUTING.md (#41670) @adriancuadrado
103
+ - Drop IE 11 official support (#41611) @iammminzzy
104
+ - [material-ui] Fix typo on the Accordion page (#41687) @connorshea
105
+ - [pigment-css] Add small edits on the README (#41646) @danilo-leal
106
+ - [pigment-css] Edit the example app's README files (#41639) @danilo-leal
107
+
108
+ ### Core
109
+
110
+ - [code-infra] Move BrandingProvider/brandingTheme/InfoCard to @mui/docs (#41206) @Janpot
111
+ - [core] Automate cherry-pick of PRs from `next` -> `master` (#41741) @aarongarciah
112
+ - [core] Update the prettier script to use the next branch (#41637) @mnajdova
113
+ - [docs-infra] Skip loading source for non-editable modules (#41588) @bharatkashyap
114
+ - [docs-infra] Vale rule for M3 (#41737) @oliviertassinari
115
+ - [docs-infra] Allows to remove edit button (#41702) @alexfauquette
116
+ - [pigment-css][examples] Add example project with Remix (#41700) @brijeshb42
117
+ - [examples] Update MUI's packages to the next version (#41701) @mnajdova
118
+ - [material-ui] Refine the Sign-in and Sign-up templates (#41192) @zanivan
119
+ - [test] Add test to display options provided to the options prop even if loading is true. (#41675) @ZeeshanTamboli
120
+ - [blog] Refresh the design slightly (#41697) @danilo-leal
121
+ - [website] Use en-US over en-UK for career link @oliviertassinari
122
+ - [website] Add Aarón to About Us (#41736) @aarongarciah
123
+ - [website] Refine button design and other details (#41686) @danilo-leal
124
+ - [website] Improve job og image (#41672) @oliviertassinari
125
+ - [website] Page <title> should have no dots @oliviertassinari
126
+
127
+ All contributors of this release in alphabetical order: @aarongarciah, @adriancuadrado, @alexfauquette, @bharatkashyap, @brijeshb42, @connorshea, @danilo-leal, @DiegoAndai, @iammminzzy, @Janpot, @JCQuintas, @levigunz, @mnajdova, @oliviertassinari, @ppaskaris-plooto, @siriwatknp, @skmanoj322, @zanivan, @ZeeshanTamboli
128
+
3
129
  ## v6.0.0-alpha.0
4
130
 
5
131
  <!-- generated comparing v5.15.14..next -->
@@ -79,6 +205,46 @@ A big thanks to the 18 contributors who made this release possible. Here are som
79
205
 
80
206
  All contributors of this release in alphabetical order: @aacevski, @brijeshb42, @cherniavskii, @cipherlogs, @danilo-leal, @DiegoAndai, @harry-whorlow, @Janpot, @joserodolfofreitas, @michael-land, @michaldudak, @mnajdova, @nekoya, @sai6855, @siriwatknp, @StylesTrip, @zanivan, @ZeeshanTamboli
81
207
 
208
+ ## v5.15.15
209
+
210
+ <!-- generated comparing v5.15.14..master -->
211
+
212
+ _Apr 4, 2024_
213
+
214
+ A big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
215
+ This release was mostly about 🐛 bug fixes and 📚 documentation improvements.
216
+
217
+ ### `@mui/material@5.15.15`
218
+
219
+ - [Autocomplete] Display options provided to the `options` prop even if loading is true (#41677) @ZeeshanTamboli
220
+ - [RadioGroup] Apply classnames (#41681) @ZeeshanTamboli
221
+
222
+ ### `@mui/system@5.15.15`
223
+
224
+ - Fix typo to avoid infinite recursion in function call (#41678) @ZeeshanTamboli
225
+
226
+ ### Docs
227
+
228
+ - [material-ui][Slider] Remove `valueLabelFormat` from restricted values demo so that the tooltip thumb label displays the same as the value text (#41679) @ZeeshanTamboli
229
+ - [material-ui] Remove deleted page from the sidenav (#41594) @danilo-leal
230
+ - [material-ui] Fix typo in CSS theme variables customization (#41680) @ZeeshanTamboli
231
+ - Continue migration of Base UI to sperate repository @oliviertassinari
232
+ - Add notification for MUI X v7 blog post (#41587) (#41605) @cherniavskii
233
+ - Update the versions dropdown to show v6 (#41557) @mnajdova
234
+
235
+ ### Core
236
+
237
+ - [blog] Link to Romain's blog post in MUI X v7 announcement post (#41641) @cherniavskii
238
+ - [blog] Blog post with MUI X v7.0.0 annoucement (#41563) (#41604) @cherniavskii
239
+ - [blog] Add post about remote (#41565) @danilo-leal
240
+ - [core] Continue rename of Toolpad @oliviertassinari
241
+ - [docs-infra] Add Toolpad product/category IDs to types (#41551) @bharatkashyap
242
+ - [website] Add Aarón to About Us (#41747) @aarongarciah
243
+ - [website] Add stray design adjustments throughout the site (#41642) @mnajdova
244
+ - [website] Update pricing table (#41606) @cherniavskii
245
+
246
+ All contributors of this release in alphabetical order: @aarongarciah, @bharatkashyap, @cherniavskii, @danilo-leal, @mnajdova, @oliviertassinari, @ZeeshanTamboli
247
+
82
248
  ## v5.15.14
83
249
 
84
250
  <!-- generated comparing v5.15.13..master -->
@@ -893,7 +1059,7 @@ A big thanks to the 22 contributors who made this release possible. Here are som
893
1059
  - [material-ui] Revise the Alert demo page (#34892) @samuelsycamore
894
1060
  - [material-ui] Revise the Accordion page (#40284) @anle9650
895
1061
  - [material-ui] Add docs for complementary Card components (#40346) @anle9650
896
- - [material-ui] Add Material 3 components page (#40350) @DiegoAndai
1062
+ - [material-ui] Add Material Design 3 components page (#40350) @DiegoAndai
897
1063
  - Fix strange italic style @oliviertassinari
898
1064
  - Fix references to ESLint @oliviertassinari
899
1065
  - Fix 301 redirections @oliviertassinari
@@ -8001,7 +8167,7 @@ A big thanks to the 25 contributors who made this release possible. Here are som
8001
8167
 
8002
8168
  <a href="https://mui.com/components/tables/#unstyled-table"><img width="800" alt="unstyled table" src="https://user-images.githubusercontent.com/4512430/144862194-584356ef-7d9d-462c-a631-186a7e716193.png"></a>
8003
8169
 
8004
- You can follow our progress with unstyled components at https://github.com/mui/material-ui/issues/27170.
8170
+ You can follow our progress with unstyled components at https://github.com/mui/base-ui/issues/10.
8005
8171
 
8006
8172
  - 🎉 We have added an example of how to use MUI with [Remix](https://remix.run/) (#29952) @mnajdova
8007
8173
 
@@ -9471,7 +9637,7 @@ A big thanks to the 17 contributors who made this release possible. Here are som
9471
9637
 
9472
9638
  <a href="https://mui.com/components/switches/#unstyled"><img width="832" alt="switch" src="https://user-images.githubusercontent.com/3165635/125192249-236f8a80-e247-11eb-9df9-17d476379a32.png"></a>
9473
9639
 
9474
- You can follow our progress at https://github.com/mui/material-ui/issues/27170.
9640
+ You can follow our progress at https://github.com/mui/base-ui/issues/10.
9475
9641
 
9476
9642
  - 💄 We have updated the default `info` `success` `warning` color to be more accessible (#26817) @siriwatknp.
9477
9643
  You can find the new [default values](https://mui.com/material-ui/customization/palette/#default-values) in the documentation.
@@ -13057,7 +13223,7 @@ Here are some highlights ✨:
13057
13223
 
13058
13224
  1. `stable` (default, formerly `esm`) which targets a snapshot (on release) of `> 0.5%, last 2 versions, Firefox ESR, not dead, not IE 11"`
13059
13225
  2. `node` (formerly default) which targets a snapshot (on release) of `maintained node versions`
13060
- 3. `legacy` (new) which is `stable` + IE11
13226
+ 3. `legacy` (new) which is `stable` + IE 11
13061
13227
  4. `modern` (formerly `es`) which targets the last 1 version of evergreen browsers and active node (currently that is 14
13062
13228
 
13063
13229
  The change yields a 6% reduction in bundle size 📦 (Babel only).
@@ -22,6 +22,11 @@ export interface TabPanelProps extends StandardProps<React.HTMLAttributes<HTMLDi
22
22
  * no `value` was passed to `Tab`.
23
23
  */
24
24
  value: string;
25
+ /**
26
+ * Always keep the children in the DOM.
27
+ * @default false
28
+ */
29
+ keepMounted?: boolean;
25
30
  }
26
31
 
27
32
  /**
@@ -2,7 +2,7 @@
2
2
 
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
- const _excluded = ["children", "className", "value"];
5
+ const _excluded = ["children", "className", "value", "keepMounted"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import clsx from 'clsx';
@@ -13,10 +13,11 @@ import { getPanelId, getTabId, useTabContext } from '../TabContext';
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
14
  const useUtilityClasses = ownerState => {
15
15
  const {
16
- classes
16
+ classes,
17
+ hidden
17
18
  } = ownerState;
18
19
  const slots = {
19
- root: ['root']
20
+ root: ['root', hidden && 'hidden']
20
21
  };
21
22
  return composeClasses(slots, getTabPanelUtilityClass, classes);
22
23
  };
@@ -37,7 +38,8 @@ const TabPanel = /*#__PURE__*/React.forwardRef(function TabPanel(inProps, ref) {
37
38
  const {
38
39
  children,
39
40
  className,
40
- value
41
+ value,
42
+ keepMounted = false
41
43
  } = props,
42
44
  other = _objectWithoutPropertiesLoose(props, _excluded);
43
45
  const ownerState = _extends({}, props);
@@ -57,7 +59,7 @@ const TabPanel = /*#__PURE__*/React.forwardRef(function TabPanel(inProps, ref) {
57
59
  role: "tabpanel",
58
60
  ownerState: ownerState
59
61
  }, other, {
60
- children: value === context.value && children
62
+ children: (keepMounted || value === context.value) && children
61
63
  }));
62
64
  });
63
65
  process.env.NODE_ENV !== "production" ? TabPanel.propTypes /* remove-proptypes */ = {
@@ -77,6 +79,11 @@ process.env.NODE_ENV !== "production" ? TabPanel.propTypes /* remove-proptypes *
77
79
  * @ignore
78
80
  */
79
81
  className: PropTypes.string,
82
+ /**
83
+ * Always keep the children in the DOM.
84
+ * @default false
85
+ */
86
+ keepMounted: PropTypes.bool,
80
87
  /**
81
88
  * The system prop that allows defining system overrides as well as additional CSS styles.
82
89
  */
@@ -1,6 +1,8 @@
1
1
  export interface TabPanelClasses {
2
2
  /** Styles applied to the root element. */
3
3
  root: string;
4
+ /** State class applied to the root `div` element if `hidden={true}`. */
5
+ hidden: string;
4
6
  }
5
7
  export type TabPanelClassKey = keyof TabPanelClasses;
6
8
  export declare function getTabPanelUtilityClass(slot: string): string;
@@ -3,5 +3,5 @@ import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
3
3
  export function getTabPanelUtilityClass(slot) {
4
4
  return generateUtilityClass('MuiTabPanel', slot);
5
5
  }
6
- const tabPanelClasses = generateUtilityClasses('MuiTabPanel', ['root']);
6
+ const tabPanelClasses = generateUtilityClasses('MuiTabPanel', ['root', 'hidden']);
7
7
  export default tabPanelClasses;
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/lab v6.0.0-alpha.0
2
+ * @mui/lab v6.0.0-alpha.2
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -11,9 +11,10 @@ import { getTabPanelUtilityClass } from './tabPanelClasses';
11
11
  import { getPanelId, getTabId, useTabContext } from '../TabContext';
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  var useUtilityClasses = function useUtilityClasses(ownerState) {
14
- var classes = ownerState.classes;
14
+ var classes = ownerState.classes,
15
+ hidden = ownerState.hidden;
15
16
  var slots = {
16
- root: ['root']
17
+ root: ['root', hidden && 'hidden']
17
18
  };
18
19
  return composeClasses(slots, getTabPanelUtilityClass, classes);
19
20
  };
@@ -37,7 +38,9 @@ var TabPanel = /*#__PURE__*/React.forwardRef(function TabPanel(inProps, ref) {
37
38
  var children = props.children,
38
39
  className = props.className,
39
40
  value = props.value,
40
- other = _objectWithoutProperties(props, ["children", "className", "value"]);
41
+ _props$keepMounted = props.keepMounted,
42
+ keepMounted = _props$keepMounted === void 0 ? false : _props$keepMounted,
43
+ other = _objectWithoutProperties(props, ["children", "className", "value", "keepMounted"]);
41
44
  var ownerState = _extends({}, props);
42
45
  var classes = useUtilityClasses(ownerState);
43
46
  var context = useTabContext();
@@ -55,7 +58,7 @@ var TabPanel = /*#__PURE__*/React.forwardRef(function TabPanel(inProps, ref) {
55
58
  role: "tabpanel",
56
59
  ownerState: ownerState
57
60
  }, other, {
58
- children: value === context.value && children
61
+ children: (keepMounted || value === context.value) && children
59
62
  }));
60
63
  });
61
64
  process.env.NODE_ENV !== "production" ? TabPanel.propTypes /* remove-proptypes */ = {
@@ -75,6 +78,11 @@ process.env.NODE_ENV !== "production" ? TabPanel.propTypes /* remove-proptypes *
75
78
  * @ignore
76
79
  */
77
80
  className: PropTypes.string,
81
+ /**
82
+ * Always keep the children in the DOM.
83
+ * @default false
84
+ */
85
+ keepMounted: PropTypes.bool,
78
86
  /**
79
87
  * The system prop that allows defining system overrides as well as additional CSS styles.
80
88
  */
@@ -3,5 +3,5 @@ import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
3
3
  export function getTabPanelUtilityClass(slot) {
4
4
  return generateUtilityClass('MuiTabPanel', slot);
5
5
  }
6
- var tabPanelClasses = generateUtilityClasses('MuiTabPanel', ['root']);
6
+ var tabPanelClasses = generateUtilityClasses('MuiTabPanel', ['root', 'hidden']);
7
7
  export default tabPanelClasses;
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/lab v6.0.0-alpha.0
2
+ * @mui/lab v6.0.0-alpha.2
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -2,7 +2,7 @@
2
2
 
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
- const _excluded = ["children", "className", "value"];
5
+ const _excluded = ["children", "className", "value", "keepMounted"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import clsx from 'clsx';
@@ -13,10 +13,11 @@ import { getPanelId, getTabId, useTabContext } from '../TabContext';
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
14
  const useUtilityClasses = ownerState => {
15
15
  const {
16
- classes
16
+ classes,
17
+ hidden
17
18
  } = ownerState;
18
19
  const slots = {
19
- root: ['root']
20
+ root: ['root', hidden && 'hidden']
20
21
  };
21
22
  return composeClasses(slots, getTabPanelUtilityClass, classes);
22
23
  };
@@ -37,7 +38,8 @@ const TabPanel = /*#__PURE__*/React.forwardRef(function TabPanel(inProps, ref) {
37
38
  const {
38
39
  children,
39
40
  className,
40
- value
41
+ value,
42
+ keepMounted = false
41
43
  } = props,
42
44
  other = _objectWithoutPropertiesLoose(props, _excluded);
43
45
  const ownerState = _extends({}, props);
@@ -57,7 +59,7 @@ const TabPanel = /*#__PURE__*/React.forwardRef(function TabPanel(inProps, ref) {
57
59
  role: "tabpanel",
58
60
  ownerState: ownerState
59
61
  }, other, {
60
- children: value === context.value && children
62
+ children: (keepMounted || value === context.value) && children
61
63
  }));
62
64
  });
63
65
  process.env.NODE_ENV !== "production" ? TabPanel.propTypes /* remove-proptypes */ = {
@@ -77,6 +79,11 @@ process.env.NODE_ENV !== "production" ? TabPanel.propTypes /* remove-proptypes *
77
79
  * @ignore
78
80
  */
79
81
  className: PropTypes.string,
82
+ /**
83
+ * Always keep the children in the DOM.
84
+ * @default false
85
+ */
86
+ keepMounted: PropTypes.bool,
80
87
  /**
81
88
  * The system prop that allows defining system overrides as well as additional CSS styles.
82
89
  */
@@ -3,5 +3,5 @@ import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
3
3
  export function getTabPanelUtilityClass(slot) {
4
4
  return generateUtilityClass('MuiTabPanel', slot);
5
5
  }
6
- const tabPanelClasses = generateUtilityClasses('MuiTabPanel', ['root']);
6
+ const tabPanelClasses = generateUtilityClasses('MuiTabPanel', ['root', 'hidden']);
7
7
  export default tabPanelClasses;
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/lab v6.0.0-alpha.0
2
+ * @mui/lab v6.0.0-alpha.2
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -16,15 +16,16 @@ var _base = require("@mui/base");
16
16
  var _tabPanelClasses = require("./tabPanelClasses");
17
17
  var _TabContext = require("../TabContext");
18
18
  var _jsxRuntime = require("react/jsx-runtime");
19
- const _excluded = ["children", "className", "value"];
19
+ const _excluded = ["children", "className", "value", "keepMounted"];
20
20
  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); }
21
21
  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 && {}.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; }
22
22
  const useUtilityClasses = ownerState => {
23
23
  const {
24
- classes
24
+ classes,
25
+ hidden
25
26
  } = ownerState;
26
27
  const slots = {
27
- root: ['root']
28
+ root: ['root', hidden && 'hidden']
28
29
  };
29
30
  return (0, _base.unstable_composeClasses)(slots, _tabPanelClasses.getTabPanelUtilityClass, classes);
30
31
  };
@@ -45,7 +46,8 @@ const TabPanel = /*#__PURE__*/React.forwardRef(function TabPanel(inProps, ref) {
45
46
  const {
46
47
  children,
47
48
  className,
48
- value
49
+ value,
50
+ keepMounted = false
49
51
  } = props,
50
52
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
51
53
  const ownerState = (0, _extends2.default)({}, props);
@@ -65,7 +67,7 @@ const TabPanel = /*#__PURE__*/React.forwardRef(function TabPanel(inProps, ref) {
65
67
  role: "tabpanel",
66
68
  ownerState: ownerState
67
69
  }, other, {
68
- children: value === context.value && children
70
+ children: (keepMounted || value === context.value) && children
69
71
  }));
70
72
  });
71
73
  process.env.NODE_ENV !== "production" ? TabPanel.propTypes /* remove-proptypes */ = {
@@ -85,6 +87,11 @@ process.env.NODE_ENV !== "production" ? TabPanel.propTypes /* remove-proptypes *
85
87
  * @ignore
86
88
  */
87
89
  className: _propTypes.default.string,
90
+ /**
91
+ * Always keep the children in the DOM.
92
+ * @default false
93
+ */
94
+ keepMounted: _propTypes.default.bool,
88
95
  /**
89
96
  * The system prop that allows defining system overrides as well as additional CSS styles.
90
97
  */
@@ -11,5 +11,5 @@ var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generat
11
11
  function getTabPanelUtilityClass(slot) {
12
12
  return (0, _generateUtilityClass.default)('MuiTabPanel', slot);
13
13
  }
14
- const tabPanelClasses = (0, _generateUtilityClasses.default)('MuiTabPanel', ['root']);
14
+ const tabPanelClasses = (0, _generateUtilityClasses.default)('MuiTabPanel', ['root', 'hidden']);
15
15
  var _default = exports.default = tabPanelClasses;
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/lab v6.0.0-alpha.0
2
+ * @mui/lab v6.0.0-alpha.2
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/lab",
3
- "version": "6.0.0-alpha.0",
3
+ "version": "6.0.0-alpha.2",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "Laboratory for new MUI modules.",
@@ -28,13 +28,13 @@
28
28
  "url": "https://opencollective.com/mui-org"
29
29
  },
30
30
  "dependencies": {
31
- "@babel/runtime": "^7.23.9",
31
+ "@babel/runtime": "^7.24.4",
32
32
  "clsx": "^2.1.0",
33
33
  "prop-types": "^15.8.1",
34
- "@mui/base": "5.0.0-beta.41",
35
- "@mui/system": "^6.0.0-alpha.0",
36
- "@mui/utils": "^5.15.14",
37
- "@mui/types": "^7.2.14"
34
+ "@mui/types": "^7.2.14",
35
+ "@mui/utils": "^6.0.0-alpha.1",
36
+ "@mui/system": "^6.0.0-alpha.1",
37
+ "@mui/base": "5.0.0-beta.42"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@emotion/react": "^11.5.0",
@@ -42,7 +42,7 @@
42
42
  "@types/react": "^17.0.0 || ^18.0.0",
43
43
  "react": "^17.0.0 || ^18.0.0",
44
44
  "react-dom": "^17.0.0 || ^18.0.0",
45
- "@mui/material": "^6.0.0-alpha.0"
45
+ "@mui/material": "^6.0.0-alpha.2"
46
46
  },
47
47
  "peerDependenciesMeta": {
48
48
  "@types/react": {