@mui/docs 7.3.3 → 7.3.4

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,30 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 7.3.4
4
+
5
+ <!-- generated comparing v7.3.3..master -->
6
+
7
+ _Oct 2, 2025_
8
+
9
+ A big thanks to the 3 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ Small update to revert a change that broke the `<Tabs>` component. Also publishing a beta version of `@mui/lab` which was accidentally published as a stable release.
12
+
13
+ ### `@mui/material@7.3.4`
14
+
15
+ - [Tabs] Revert "Fix not scrolling to correct tab after refresh when auto scrollable (#46869)" (#47014) @ZeeshanTamboli
16
+
17
+ ### Docs
18
+
19
+ - Sort package manager automatically (#46897) @Janpot
20
+
21
+ ### Core
22
+
23
+ - Bring @mui/lab back to unstable version (#47012) @Janpot
24
+ - Fix `ThemeOptions` and `createTheme*` cyclic dependency (#47007) @siriwatknp
25
+
26
+ All contributors of this release in alphabetical order: @Janpot, @siriwatknp, @ZeeshanTamboli
27
+
3
28
  ## 7.3.3
4
29
 
5
30
  <!-- generated comparing v7.3.2..master -->
@@ -16,6 +16,7 @@ var _Tab = require("@mui/base/Tab");
16
16
  var _useLocalStorageState = _interopRequireDefault(require("@mui/utils/useLocalStorageState"));
17
17
  var _HighlightedCode = require("../HighlightedCode");
18
18
  var _jsxRuntime = require("react/jsx-runtime");
19
+ const PACKAGE_MANAGER_ORDER = new Map(['npm', 'pnpm', 'yarn'].map((manager, index) => [manager, index]));
19
20
  const CodeTabList = exports.CodeTabList = (0, _styles.styled)(_TabsList.TabsList)(({
20
21
  theme
21
22
  }) => ({
@@ -319,9 +320,15 @@ function HighlightedCodeWithTabs(props) {
319
320
  tabs,
320
321
  storageKey
321
322
  } = props;
322
- const availableTabs = React.useMemo(() => tabs.map(({
323
- tab
324
- }) => tab), [tabs]);
323
+ const availableTabs = React.useMemo(() => {
324
+ const result = tabs.map(({
325
+ tab
326
+ }) => tab);
327
+ if (storageKey === 'package-manager') {
328
+ result.sort((a, b) => (PACKAGE_MANAGER_ORDER.get(a) ?? Infinity) - (PACKAGE_MANAGER_ORDER.get(b) ?? Infinity));
329
+ }
330
+ return result;
331
+ }, [storageKey, tabs]);
325
332
  const [activeTab, setActiveTab] = (0, _useLocalStorageState.default)(storageKey ?? null, availableTabs[0]);
326
333
  // During hydration, activeTab is null, default to first value.
327
334
  const defaultizedActiveTab = activeTab ?? availableTabs[0];
@@ -7,6 +7,7 @@ import { Tab as TabBase } from '@mui/base/Tab';
7
7
  import useLocalStorageState from '@mui/utils/useLocalStorageState';
8
8
  import { HighlightedCode } from "../HighlightedCode/index.js";
9
9
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
+ const PACKAGE_MANAGER_ORDER = new Map(['npm', 'pnpm', 'yarn'].map((manager, index) => [manager, index]));
10
11
  export const CodeTabList = styled(TabsListBase)(({
11
12
  theme
12
13
  }) => ({
@@ -310,9 +311,15 @@ export function HighlightedCodeWithTabs(props) {
310
311
  tabs,
311
312
  storageKey
312
313
  } = props;
313
- const availableTabs = React.useMemo(() => tabs.map(({
314
- tab
315
- }) => tab), [tabs]);
314
+ const availableTabs = React.useMemo(() => {
315
+ const result = tabs.map(({
316
+ tab
317
+ }) => tab);
318
+ if (storageKey === 'package-manager') {
319
+ result.sort((a, b) => (PACKAGE_MANAGER_ORDER.get(a) ?? Infinity) - (PACKAGE_MANAGER_ORDER.get(b) ?? Infinity));
320
+ }
321
+ return result;
322
+ }, [storageKey, tabs]);
316
323
  const [activeTab, setActiveTab] = useLocalStorageState(storageKey ?? null, availableTabs[0]);
317
324
  // During hydration, activeTab is null, default to first value.
318
325
  const defaultizedActiveTab = activeTab ?? availableTabs[0];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/docs",
3
- "version": "7.3.3",
3
+ "version": "7.3.4",
4
4
  "author": "MUI Team",
5
5
  "description": "MUI Docs - Documentation building blocks.",
6
6
  "keywords": [