@mui/docs 6.0.0-beta.5 → 6.0.0-beta.6

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/Ad/Ad.js CHANGED
@@ -154,7 +154,7 @@ export function Ad() {
154
154
  }
155
155
  const ad = React.useContext(AdContext);
156
156
  const eventLabel = label ? `${label}-${ad.placement}-${adShape}` : null;
157
- const timerAdblock = React.useRef();
157
+ const timerAdblock = React.useRef(undefined);
158
158
  const checkAdblock = React.useCallback((attempt = 1) => {
159
159
  if (document.querySelector('.ea-placement') || document.querySelector('#carbonads') || document.querySelector('.carbonads') || carbonOut) {
160
160
  if (document.querySelector('#carbonads a') && document.querySelector('#carbonads a')?.getAttribute('href') === 'https://material-ui-next.com/discover-more/backers') {
package/CHANGELOG.md CHANGED
@@ -1,5 +1,73 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 6.0.0-beta.6
4
+
5
+ <!-- generated comparing v6.0.0-beta.5..next -->
6
+
7
+ _Aug 16, 2024_
8
+
9
+ A big thanks to the 18 contributors who made this release possible.
10
+
11
+ ### `@mui/material@6.0.0-beta.6`
12
+
13
+ - [Autocomplete] Improve the `options` prop description (#41591) @pluvio72
14
+ - [Autocomplete] Remove autocomplete warning regarding value not equal to option (#43314) @ZeeshanTamboli
15
+ - [Divider] Add aria-orientation (#43241) @aarongarciah
16
+ - [IconButton] Fix hover background color behavior (#43271) @mnajdova
17
+ - [TypeScript] Refactor types so they're compatible with upcoming React 19 (#43276) @DiegoAndai
18
+ - [Typography] Replace dot notation color value to work with Pigment CSS (#43288) @siriwatknp
19
+ - [pigment-css] Fix `getSelector` prefers-color-scheme to be object (#43237) @siriwatknp
20
+ - Remove `display="block"` usage to work with Pigment CSS (#43307) @siriwatknp
21
+
22
+ ### `@mui/codemod@6.0.0-beta.6`
23
+
24
+ - [codemod] Skip sx spread transformation (#43291) @siriwatknp
25
+
26
+ ### `@mui/styles@6.0.0-beta.6`
27
+
28
+ - [styles] Fix issues reported by eslint-plugin-react-compiler (#43118) @jlewins
29
+
30
+ ### Docs
31
+
32
+ - [material-ui] Audit and copyedit the v6 migration doc (#43073) @samuelsycamore
33
+ - [material-ui] Fix Material Icon search lag and other improvements (#41330) @anle9650
34
+ - [material-ui][Popover] Fix description and title of hover interaction section (#43290) @ZeeshanTamboli
35
+ - [material-ui] Refine and unify custom template themes (#43220) @zanivan
36
+ - [joy-ui] Fix data grid redirection (#43247) @sai6855
37
+ - [mui-system] Add import statement in docs (#43223) @sai6855
38
+ - Update babel config (#43286) @romgrk
39
+ - Fix outdated references to Materal UI version (#43321) @oliviertassinari
40
+ - Polish migration git diff experience @oliviertassinari
41
+ - Update LTS to match format (#43212) @oliviertassinari
42
+ - Fix Pigment CSS migration content (#43217) @siriwatknp
43
+
44
+ ### Core
45
+
46
+ - [code-infra] Remove `userEvent` export from `@mui/internal-test-utils` (#43313) @LukasTy
47
+ - [code-infra] Remove unnecessary alias (#43320) @Janpot
48
+ - [code-infra] Fix utils bundle size entrypoint (#43304) @Janpot
49
+ - [core] missing and incorrect scripts (#43209) @Jay-Karia
50
+ - [core] Set Node 14 as minimum version in all browserslist envs (#43326) @aarongarciah
51
+ - [core] Add React 19 as peer dependency (#43216) @aarongarciah
52
+ - [core] Pin `eslint-plugin-jsx-a11y` version to 6.7.1 (#43292) @Janpot
53
+ - [core] Update supported Node.js version to 14 (#43315) @Janpot
54
+ - [core] Use fs instead of fs-extra in script utils (#43234) @DiegoAndai
55
+ - [core] Refactor system theme props (#43120) @romgrk
56
+ - [docs-infra] Fix some TS issues for X docs (#43285) @Janpot
57
+ - [docs-infra] Move API pages to TS (#43199) @alexfauquette
58
+ - [docs-infra] Fix broken sandboxes with relative module imports (#42767) @bharatkashyap
59
+ - [docs-infra] Simplify API sections typing (#43128) @alexfauquette
60
+ - [examples] Fix import (#43316) @aarongarciah
61
+ - [examples] Add material-ui-pigment-css for Next.js and Vite (#43065) @siriwatknp
62
+ - [examples] Replace wrong import with `@mui/material/styles` (#43236) @siriwatknp
63
+ - [useMediaQuery] Adapt test implementation for React 19 (#43269) @aarongarciah
64
+ - [test] Update `matchMedia` mocks (#43240) @cherniavskii
65
+ - [test] Remove unnecessary ref param (#43282) @aarongarciah
66
+ - [website] Update showcase to include Toolpad Core (#43226) @bharatkashyap
67
+ - [website] Replace React.MutableRefObject with React.RefObject (#43284) @aarongarciah
68
+
69
+ All contributors of this release in alphabetical order: @aarongarciah, @alexfauquette, @anle9650, @bharatkashyap, @cherniavskii, @DiegoAndai, @Janpot, @Jay-Karia, @jlewins, @mnajdova, @oliviertassinari, @pluvio72, @renovate[bot], @romgrk, @sai6855, @samuelsycamore, @siriwatknp, @ZeeshanTamboli
70
+
3
71
  ## 6.0.0-beta.5
4
72
 
5
73
  <!-- generated comparing v6.0.0-beta.4..next -->
@@ -1842,6 +1910,7 @@ This release was mostly about 🐛 bug fixes and 📚 documentation improvements
1842
1910
  - [core] Fix TypeScript spelling in changelog @oliviertassinari
1843
1911
  - [core] Fix small detail in the autocomplete demo @oliviertassinari
1844
1912
  - [core] Increase node memory limit on Netlify build (#41111) @michaldudak
1913
+ - [core] Fix Netlify build cache issue (#43281) @LukasTy
1845
1914
  - [core][Tooltip] Remove incorrect code comment (#41179) @ZeeshanTamboli
1846
1915
  - [core] Fix missing context display names (#41168) @oliviertassinari
1847
1916
  - [core][base-ui] Remove `@mui/base` dev dependency from Base UI workspace (#41216) @ZeeshanTamboli
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import clipboardCopy from 'clipboard-copy';
3
3
  export default function useClipboardCopy() {
4
4
  const [isCopied, setIsCopied] = React.useState(false);
5
- const timeout = React.useRef();
5
+ const timeout = React.useRef(undefined);
6
6
  React.useEffect(() => () => {
7
7
  clearTimeout(timeout.current);
8
8
  }, []);
package/node/Ad/Ad.js CHANGED
@@ -164,11 +164,10 @@ function Ad() {
164
164
  }
165
165
  const ad = React.useContext(_AdManager.AdContext);
166
166
  const eventLabel = label ? `${label}-${ad.placement}-${_AdManager.adShape}` : null;
167
- const timerAdblock = React.useRef();
167
+ const timerAdblock = React.useRef(undefined);
168
168
  const checkAdblock = React.useCallback((attempt = 1) => {
169
169
  if (document.querySelector('.ea-placement') || document.querySelector('#carbonads') || document.querySelector('.carbonads') || carbonOut) {
170
- var _document$querySelect;
171
- if (document.querySelector('#carbonads a') && ((_document$querySelect = document.querySelector('#carbonads a')) == null ? void 0 : _document$querySelect.getAttribute('href')) === 'https://material-ui-next.com/discover-more/backers') {
170
+ if (document.querySelector('#carbonads a') && document.querySelector('#carbonads a')?.getAttribute('href') === 'https://material-ui-next.com/discover-more/backers') {
172
171
  setCarbonOut(true);
173
172
  }
174
173
  setAdblock(false);
@@ -197,7 +196,7 @@ function Ad() {
197
196
  } = (0, _AdProvider.useAdConfig)();
198
197
  React.useEffect(() => {
199
198
  // Avoid an exceed on the Google Analytics quotas.
200
- if (Math.random() > (GADisplayRatio != null ? GADisplayRatio : 0.1) || !eventLabel) {
199
+ if (Math.random() > (GADisplayRatio ?? 0.1) || !eventLabel) {
201
200
  return undefined;
202
201
  }
203
202
  const delay = setTimeout(() => {
@@ -51,7 +51,7 @@ function AdDisplay(props) {
51
51
  } = (0, _AdProvider.useAdConfig)();
52
52
  React.useEffect(() => {
53
53
  // Avoid an exceed on the Google Analytics quotas.
54
- if (Math.random() > (GADisplayRatio != null ? GADisplayRatio : 0.1) || !ad.label) {
54
+ if (Math.random() > (GADisplayRatio ?? 0.1) || !ad.label) {
55
55
  return;
56
56
  }
57
57
  window.gtag('event', 'ad', {
@@ -34,8 +34,7 @@ function useCodeCopy() {
34
34
  },
35
35
  onMouseLeave: event => {
36
36
  if (rootNode.current === event.currentTarget) {
37
- var _rootNode$current$que;
38
- (_rootNode$current$que = rootNode.current.querySelector('.MuiCode-copy')) == null || _rootNode$current$que.blur();
37
+ rootNode.current.querySelector('.MuiCode-copy')?.blur();
39
38
  rootNode.current = null;
40
39
  }
41
40
  },
@@ -71,8 +70,7 @@ function InitCodeCopy() {
71
70
  listeners.push(() => elm.removeEventListener('mouseenter', handleMouseEnter));
72
71
  const handleMouseLeave = () => {
73
72
  if (rootNode.current === elm) {
74
- var _rootNode$current$que2;
75
- (_rootNode$current$que2 = rootNode.current.querySelector('.MuiCode-copy')) == null || _rootNode$current$que2.blur();
73
+ rootNode.current.querySelector('.MuiCode-copy')?.blur();
76
74
  rootNode.current = null;
77
75
  }
78
76
  };
@@ -93,16 +91,14 @@ function InitCodeCopy() {
93
91
  elm.addEventListener('focusout', handleFocusout);
94
92
  listeners.push(() => elm.removeEventListener('focusout', handleFocusout));
95
93
  async function handleClick(event) {
96
- var _event$currentTarget, _textNode$textContent;
97
94
  const trigger = event.currentTarget;
98
- const pre = (_event$currentTarget = event.currentTarget) == null ? void 0 : _event$currentTarget.previousElementSibling;
95
+ const pre = event.currentTarget?.previousElementSibling;
99
96
  const textNode = trigger.childNodes[0];
100
- textNode.nodeValue = ((_textNode$textContent = textNode.textContent) == null ? void 0 : _textNode$textContent.replace('Copy', 'Copied')) || null;
97
+ textNode.nodeValue = textNode.textContent?.replace('Copy', 'Copied') || null;
101
98
  trigger.dataset.copied = 'true';
102
99
  setTimeout(() => {
103
100
  if (trigger) {
104
- var _textNode$textContent2;
105
- textNode.nodeValue = ((_textNode$textContent2 = textNode.textContent) == null ? void 0 : _textNode$textContent2.replace('Copied', 'Copy')) || null;
101
+ textNode.nodeValue = textNode.textContent?.replace('Copied', 'Copy') || null;
106
102
  delete trigger.dataset.copied;
107
103
  }
108
104
  }, 2000);
@@ -115,13 +111,12 @@ function InitCodeCopy() {
115
111
  }
116
112
  const btn = elm.querySelector('.MuiCode-copy');
117
113
  if (btn) {
118
- var _btn$querySelector, _keyNode$textContent;
119
- const keyNode = (_btn$querySelector = btn.querySelector('.MuiCode-copyKeypress')) == null ? void 0 : _btn$querySelector.childNodes[1];
114
+ const keyNode = btn.querySelector('.MuiCode-copyKeypress')?.childNodes[1];
120
115
  if (!keyNode) {
121
116
  // skip the logic if the btn is not generated from the markdown.
122
117
  return;
123
118
  }
124
- keyNode.textContent = (keyNode == null || (_keyNode$textContent = keyNode.textContent) == null ? void 0 : _keyNode$textContent.replace('$key', key)) || null;
119
+ keyNode.textContent = keyNode?.textContent?.replace('$key', key) || null;
125
120
  btn.addEventListener('click', handleClick);
126
121
  listeners.push(() => btn.removeEventListener('click', handleClick));
127
122
  }
@@ -137,8 +132,7 @@ function InitCodeCopy() {
137
132
  return null;
138
133
  }
139
134
  function hasNativeSelection(element) {
140
- var _window$getSelection;
141
- if ((_window$getSelection = window.getSelection()) != null && _window$getSelection.toString()) {
135
+ if (window.getSelection()?.toString()) {
142
136
  return true;
143
137
  }
144
138
 
@@ -176,7 +170,7 @@ function CodeCopyProvider({
176
170
  const copyBtn = rootNode.current.querySelector('.MuiCode-copy');
177
171
  const initialEventAction = copyBtn.getAttribute('data-ga-event-action');
178
172
  // update the 'data-ga-event-action' on the button to track keyboard interaction
179
- copyBtn.dataset.gaEventAction = (initialEventAction == null ? void 0 : initialEventAction.replace('click', 'keyboard')) || 'copy-keyboard';
173
+ copyBtn.dataset.gaEventAction = initialEventAction?.replace('click', 'keyboard') || 'copy-keyboard';
180
174
  copyBtn.click(); // let the GA setup in GoogleAnalytics.js do the job
181
175
  copyBtn.dataset.gaEventAction = initialEventAction; // reset the 'data-ga-event-action' back to initial
182
176
  });
@@ -11,7 +11,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
11
11
  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; }
12
12
  function useClipboardCopy() {
13
13
  const [isCopied, setIsCopied] = React.useState(false);
14
- const timeout = React.useRef();
14
+ const timeout = React.useRef(undefined);
15
15
  React.useEffect(() => () => {
16
16
  clearTimeout(timeout.current);
17
17
  }, []);
@@ -48,7 +48,6 @@ const defaultPackageNames = {
48
48
  system: '@mui/system'
49
49
  };
50
50
  function ComponentLinkHeader(props) {
51
- var _ref, _headers$packageName;
52
51
  const {
53
52
  markdown: {
54
53
  headers
@@ -56,7 +55,7 @@ function ComponentLinkHeader(props) {
56
55
  design
57
56
  } = props;
58
57
  const t = (0, _i18n.useTranslate)();
59
- const packageName = (_ref = (_headers$packageName = headers.packageName) != null ? _headers$packageName : defaultPackageNames[headers.productId]) != null ? _ref : '@mui/material';
58
+ const packageName = headers.packageName ?? defaultPackageNames[headers.productId] ?? '@mui/material';
60
59
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, {
61
60
  children: [headers.githubLabel ? /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
62
61
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, {
@@ -31,98 +31,98 @@ const CodeTabList = exports.CodeTabList = (0, _styles.styled)(_TabsList.TabsList
31
31
  variants: [{
32
32
  props: ({
33
33
  ownerState
34
- }) => ownerState == null ? void 0 : ownerState.contained,
34
+ }) => ownerState?.contained,
35
35
  style: {
36
36
  padding: theme.spacing(1.5, 1)
37
37
  }
38
38
  }, {
39
39
  props: ({
40
40
  ownerState
41
- }) => !(ownerState != null && ownerState.contained),
41
+ }) => !ownerState?.contained,
42
42
  style: {
43
43
  padding: theme.spacing(1)
44
44
  }
45
45
  }, {
46
46
  props: ({
47
47
  ownerState
48
- }) => ownerState == null ? void 0 : ownerState.contained,
48
+ }) => ownerState?.contained,
49
49
  style: {
50
50
  borderTop: 'none'
51
51
  }
52
52
  }, {
53
53
  props: ({
54
54
  ownerState
55
- }) => !(ownerState != null && ownerState.contained),
55
+ }) => !ownerState?.contained,
56
56
  style: {
57
57
  borderTop: '1px solid'
58
58
  }
59
59
  }, {
60
60
  props: ({
61
61
  ownerState
62
- }) => ownerState == null ? void 0 : ownerState.contained,
62
+ }) => ownerState?.contained,
63
63
  style: {
64
64
  borderBottom: 'none'
65
65
  }
66
66
  }, {
67
67
  props: ({
68
68
  ownerState
69
- }) => !(ownerState != null && ownerState.contained),
69
+ }) => !ownerState?.contained,
70
70
  style: {
71
71
  borderBottom: '1px solid'
72
72
  }
73
73
  }, {
74
74
  props: ({
75
75
  ownerState
76
- }) => ownerState == null ? void 0 : ownerState.contained,
76
+ }) => ownerState?.contained,
77
77
  style: {
78
78
  borderTopLeftRadius: 0
79
79
  }
80
80
  }, {
81
81
  props: ({
82
82
  ownerState
83
- }) => !(ownerState != null && ownerState.contained),
83
+ }) => !ownerState?.contained,
84
84
  style: {
85
85
  borderTopLeftRadius: (theme.vars || theme).shape.borderRadius
86
86
  }
87
87
  }, {
88
88
  props: ({
89
89
  ownerState
90
- }) => ownerState == null ? void 0 : ownerState.contained,
90
+ }) => ownerState?.contained,
91
91
  style: {
92
92
  borderTopRightRadius: 0
93
93
  }
94
94
  }, {
95
95
  props: ({
96
96
  ownerState
97
- }) => !(ownerState != null && ownerState.contained),
97
+ }) => !ownerState?.contained,
98
98
  style: {
99
99
  borderTopRightRadius: (theme.vars || theme).shape.borderRadius
100
100
  }
101
101
  }, {
102
102
  props: ({
103
103
  ownerState
104
- }) => ownerState == null ? void 0 : ownerState.contained,
104
+ }) => ownerState?.contained,
105
105
  style: {
106
106
  borderColor: (theme.vars || theme).palette.divider
107
107
  }
108
108
  }, {
109
109
  props: ({
110
110
  ownerState
111
- }) => !(ownerState != null && ownerState.contained),
111
+ }) => !ownerState?.contained,
112
112
  style: {
113
113
  borderColor: (theme.vars || theme).palette.primaryDark[700]
114
114
  }
115
115
  }, {
116
116
  props: ({
117
117
  ownerState
118
- }) => ownerState == null ? void 0 : ownerState.contained,
118
+ }) => ownerState?.contained,
119
119
  style: {
120
120
  backgroundColor: (0, _styles.alpha)(theme.palette.grey[50], 0.2)
121
121
  }
122
122
  }, {
123
123
  props: ({
124
124
  ownerState
125
- }) => !(ownerState != null && ownerState.contained),
125
+ }) => !ownerState?.contained,
126
126
  style: {
127
127
  backgroundColor: (theme.vars || theme).palette.primaryDark[900]
128
128
  }
@@ -137,21 +137,21 @@ const CodeTabPanel = exports.CodeTabPanel = (0, _styles.styled)(_TabPanel.TabPan
137
137
  variants: [{
138
138
  props: ({
139
139
  ownerState
140
- }) => ownerState == null ? void 0 : ownerState.contained,
140
+ }) => ownerState?.contained,
141
141
  style: {
142
142
  marginTop: -1
143
143
  }
144
144
  }, {
145
145
  props: ({
146
146
  ownerState
147
- }) => !(ownerState != null && ownerState.contained),
147
+ }) => !ownerState?.contained,
148
148
  style: {
149
149
  marginTop: 0
150
150
  }
151
151
  }, {
152
152
  props: ({
153
153
  ownerState
154
- }) => ownerState == null ? void 0 : ownerState.contained,
154
+ }) => ownerState?.contained,
155
155
  style: {
156
156
  '& pre': {
157
157
  marginTop: 0
@@ -160,7 +160,7 @@ const CodeTabPanel = exports.CodeTabPanel = (0, _styles.styled)(_TabPanel.TabPan
160
160
  }, {
161
161
  props: ({
162
162
  ownerState
163
- }) => !(ownerState != null && ownerState.contained),
163
+ }) => !ownerState?.contained,
164
164
  style: {
165
165
  '& pre': {
166
166
  marginTop: -1
@@ -196,7 +196,7 @@ const CodeTab = exports.CodeTab = (0, _styles.styled)(_Tab.Tab)(({
196
196
  variants: [{
197
197
  props: ({
198
198
  ownerState
199
- }) => ownerState == null ? void 0 : ownerState.contained,
199
+ }) => ownerState?.contained,
200
200
  style: {
201
201
  border: '1px solid transparent',
202
202
  fontSize: theme.typography.pxToRem(13)
@@ -204,7 +204,7 @@ const CodeTab = exports.CodeTab = (0, _styles.styled)(_Tab.Tab)(({
204
204
  }, {
205
205
  props: ({
206
206
  ownerState
207
- }) => !(ownerState != null && ownerState.contained),
207
+ }) => !ownerState?.contained,
208
208
  style: {
209
209
  border: 'none',
210
210
  fontSize: theme.typography.pxToRem(12)
@@ -212,63 +212,63 @@ const CodeTab = exports.CodeTab = (0, _styles.styled)(_Tab.Tab)(({
212
212
  }, {
213
213
  props: ({
214
214
  ownerState
215
- }) => ownerState == null ? void 0 : ownerState.contained,
215
+ }) => ownerState?.contained,
216
216
  style: {
217
217
  color: (theme.vars || theme).palette.text.tertiary
218
218
  }
219
219
  }, {
220
220
  props: ({
221
221
  ownerState
222
- }) => !(ownerState != null && ownerState.contained),
222
+ }) => !ownerState?.contained,
223
223
  style: {
224
224
  color: (theme.vars || theme).palette.grey[500]
225
225
  }
226
226
  }, {
227
227
  props: ({
228
228
  ownerState
229
- }) => ownerState == null ? void 0 : ownerState.contained,
229
+ }) => ownerState?.contained,
230
230
  style: {
231
231
  fontFamily: theme.typography.fontFamily
232
232
  }
233
233
  }, {
234
234
  props: ({
235
235
  ownerState
236
- }) => !(ownerState != null && ownerState.contained),
236
+ }) => !ownerState?.contained,
237
237
  style: {
238
238
  fontFamily: theme.typography.fontFamilyCode
239
239
  }
240
240
  }, {
241
241
  props: ({
242
242
  ownerState
243
- }) => ownerState == null ? void 0 : ownerState.contained,
243
+ }) => ownerState?.contained,
244
244
  style: {
245
245
  fontWeight: theme.typography.fontWeightMedium
246
246
  }
247
247
  }, {
248
248
  props: ({
249
249
  ownerState
250
- }) => !(ownerState != null && ownerState.contained),
250
+ }) => !ownerState?.contained,
251
251
  style: {
252
252
  fontWeight: theme.typography.fontWeightBold
253
253
  }
254
254
  }, {
255
255
  props: ({
256
256
  ownerState
257
- }) => ownerState == null ? void 0 : ownerState.contained,
257
+ }) => ownerState?.contained,
258
258
  style: {
259
259
  transition: 'background, color, 100ms ease'
260
260
  }
261
261
  }, {
262
262
  props: ({
263
263
  ownerState
264
- }) => !(ownerState != null && ownerState.contained),
264
+ }) => !ownerState?.contained,
265
265
  style: {
266
266
  transition: 'unset'
267
267
  }
268
268
  }, {
269
269
  props: ({
270
270
  ownerState
271
- }) => !(ownerState != null && ownerState.contained),
271
+ }) => !ownerState?.contained,
272
272
  style: {
273
273
  '&:hover': {
274
274
  backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[500], 0.5),
@@ -278,7 +278,7 @@ const CodeTab = exports.CodeTab = (0, _styles.styled)(_Tab.Tab)(({
278
278
  }, {
279
279
  props: ({
280
280
  ownerState
281
- }) => !(ownerState != null && ownerState.contained) && ownerState.mounted,
281
+ }) => !ownerState?.contained && ownerState.mounted,
282
282
  style: {
283
283
  '&.base--selected': {
284
284
  color: '#FFF',
@@ -323,9 +323,9 @@ function HighlightedCodeWithTabs(props) {
323
323
  const availableTabs = React.useMemo(() => tabs.map(({
324
324
  tab
325
325
  }) => tab), [tabs]);
326
- const [activeTab, setActiveTab] = (0, _useLocalStorageState.default)(storageKey != null ? storageKey : null, availableTabs[0]);
326
+ const [activeTab, setActiveTab] = (0, _useLocalStorageState.default)(storageKey ?? null, availableTabs[0]);
327
327
  // During hydration, activeTab is null, default to first value.
328
- const defaultizedActiveTab = activeTab != null ? activeTab : availableTabs[0];
328
+ const defaultizedActiveTab = activeTab ?? availableTabs[0];
329
329
  const [mounted, setMounted] = React.useState(false);
330
330
  React.useEffect(() => {
331
331
  setMounted(true);
package/node/Link/Link.js CHANGED
@@ -74,7 +74,7 @@ const Link = exports.Link = /*#__PURE__*/React.forwardRef(function Link(props, r
74
74
  ...other
75
75
  } = props;
76
76
  const router = (0, _router.useRouter)();
77
- const pathname = typeof href === 'string' ? href : href == null ? void 0 : href.pathname;
77
+ const pathname = typeof href === 'string' ? href : href?.pathname;
78
78
  const routerPathname = router.pathname.replace('/[docsTab]', '');
79
79
  const shouldBeActive = routerPathname === pathname;
80
80
  const className = (0, _clsx.default)(classNameProps, shouldBeActive && activeClassName);