@mui/docs 7.0.1 → 7.1.0

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.
Files changed (59) hide show
  1. package/Ad/Ad.js +1 -1
  2. package/CHANGELOG.md +157 -0
  3. package/Link/Link.d.ts +3 -0
  4. package/Link/Link.js +7 -27
  5. package/NProgressBar/NProgressBar.js +2 -2
  6. package/esm/Ad/Ad.js +1 -1
  7. package/esm/Link/Link.d.ts +3 -0
  8. package/esm/Link/Link.js +6 -26
  9. package/esm/NProgressBar/NProgressBar.js +1 -1
  10. package/esm/i18n/i18n.js +1 -1
  11. package/i18n/i18n.js +2 -2
  12. package/package.json +5 -13
  13. package/modern/Ad/Ad.d.ts +0 -6
  14. package/modern/Ad/AdCarbon.d.ts +0 -3
  15. package/modern/Ad/AdDisplay.d.ts +0 -16
  16. package/modern/Ad/AdGuest.d.ts +0 -10
  17. package/modern/Ad/AdInHouse.d.ts +0 -5
  18. package/modern/Ad/AdManager.d.ts +0 -19
  19. package/modern/Ad/AdProvider.d.ts +0 -15
  20. package/modern/Ad/ad.styles.d.ts +0 -4329
  21. package/modern/Ad/index.d.ts +0 -5
  22. package/modern/CodeCopy/CodeCopy.d.ts +0 -22
  23. package/modern/CodeCopy/CodeCopyButton.d.ts +0 -5
  24. package/modern/CodeCopy/index.d.ts +0 -3
  25. package/modern/CodeCopy/useClipboardCopy.d.ts +0 -4
  26. package/modern/ComponentLinkHeader/ComponentLinkHeader.d.ts +0 -9
  27. package/modern/ComponentLinkHeader/index.d.ts +0 -2
  28. package/modern/DocsProvider/DocsProvider.d.ts +0 -24
  29. package/modern/DocsProvider/index.d.ts +0 -1
  30. package/modern/HighlightedCode/HighlightedCode.d.ts +0 -14
  31. package/modern/HighlightedCode/index.d.ts +0 -1
  32. package/modern/HighlightedCodeWithTabs/HighlightedCodeWithTabs.d.ts +0 -29
  33. package/modern/HighlightedCodeWithTabs/index.d.ts +0 -2
  34. package/modern/InfoCard/InfoCard.d.ts +0 -22
  35. package/modern/InfoCard/index.d.ts +0 -1
  36. package/modern/Link/Link.d.ts +0 -22
  37. package/modern/Link/index.d.ts +0 -1
  38. package/modern/MarkdownElement/MarkdownElement.d.ts +0 -7
  39. package/modern/MarkdownElement/index.d.ts +0 -1
  40. package/modern/NProgressBar/NProgressBar.d.ts +0 -6
  41. package/modern/NProgressBar/index.d.ts +0 -2
  42. package/modern/SectionTitle/SectionTitle.d.ts +0 -7
  43. package/modern/SectionTitle/index.d.ts +0 -1
  44. package/modern/branding/BrandingProvider.d.ts +0 -9
  45. package/modern/branding/brandingTheme.d.ts +0 -147
  46. package/modern/branding/index.d.ts +0 -2
  47. package/modern/i18n/i18n.d.ts +0 -27
  48. package/modern/i18n/index.d.ts +0 -1
  49. package/modern/svgIcons/BundleSizeIcon.d.ts +0 -4
  50. package/modern/svgIcons/FigmaIcon.d.ts +0 -4
  51. package/modern/svgIcons/FileDownload.d.ts +0 -7
  52. package/modern/svgIcons/JavaScript.d.ts +0 -7
  53. package/modern/svgIcons/MaterialDesignIcon.d.ts +0 -4
  54. package/modern/svgIcons/SketchIcon.d.ts +0 -4
  55. package/modern/svgIcons/TypeScript.d.ts +0 -7
  56. package/modern/svgIcons/W3CIcon.d.ts +0 -4
  57. package/modern/translations/index.d.ts +0 -3
  58. package/modern/utils/loadScript.d.ts +0 -1
  59. package/tsconfig.build.tsbuildinfo +0 -1
package/Ad/Ad.js CHANGED
@@ -77,7 +77,7 @@ const inHouseAds = [{
77
77
  description: '<b>Premium Themes</b>. Kickstart your application development with a ready-made theme.'
78
78
  }, {
79
79
  name: 'tidelift',
80
- link: 'https://tidelift.com/subscription/pkg/npm-material-ui?utm_source=npm-material-ui&utm_medium=referral&utm_campaign=enterprise&utm_content=ad',
80
+ link: 'https://tidelift.com/?utm_source=npm-material-ui&utm_medium=referral&utm_campaign=enterprise&utm_content=ad',
81
81
  img: '/static/ads-in-house/tidelift.png',
82
82
  description: '<b>MUI for enterprise</b>. Save time and reduce risk. Managed open source — backed by maintainers.'
83
83
  }, {
package/CHANGELOG.md CHANGED
@@ -1,5 +1,162 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 7.1.0
4
+
5
+ <!-- generated comparing v7.0.2..master -->
6
+
7
+ _May 6, 2025_
8
+
9
+ A big thanks to the 21 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - 🎉 Material UI now works with **Tailwind CSS v4**! Check out the [setup guide](https://mui.com/material-ui/integrations/tailwindcss/tailwindcss-v4/).
12
+
13
+ ### `@mui/material@7.1.0`
14
+
15
+ - [InputBase] Text cursor jumps several lines up when inserting text fragment with new line at the end (#45246) @yermartee
16
+ - [OutlinedInput] Add missing `notchedOutline` slot (#45917) @siriwatknp
17
+ - [Snackbar] Skip default `onClickAway` behavior when `defaultMuiPrevented` is provided (#45629) @sai6855
18
+ - [Avatar] Fix img slot types and add missing slots (#45483) @siriwatknp
19
+ - [Badge] Replace useSlotProps with useSlot hook (#45871) @sai6855
20
+ - [BottomNavigationAction] Add slots and slotProps (#45776) @sai6855
21
+ - [CardActionArea] Add slots and slotProps (#45866) @sai6855
22
+ - [useMediaQuery] Add warning and docs for using `useMediaQuery('print')` (#44790) @good-jinu
23
+ - Remove unnecessary clsx usages (#46084) @sai6855
24
+ - Corrected generic type definition in `SelectChangeEvent` (#45941) @SuyashShukla0007
25
+ - Fix theme object changes between renders (#45863) @siriwatknp
26
+
27
+ ### `@mui/material-nextjs@7.1.0`
28
+
29
+ - Add option to enable CSS layers for pages router (#45596) @siriwatknp
30
+ - Do not wrap `@layer` order rules in App Router (#45864) @Nayeem-XTREME
31
+
32
+ ### `@mui/system@7.1.0`
33
+
34
+ - Fix `@mui/system` types organization (#45860) @Janpot
35
+
36
+ ### `@mui/styled-engine@7.1.0`
37
+
38
+ - Infer `ownerState` from props in `styled` (#46083) @siriwatknp
39
+ - Fix style overrides variants type (#45478) @siriwatknp
40
+
41
+ ### Docs
42
+
43
+ - [Avatar] Add avatar upload demo (#45986) @Demianeen
44
+ - [Dialog] Remove deprecated props usage in demos (#45923) @sai6855
45
+ - [Menu] Update `paper` slot JSDoc default from `Paper` to `PopoverPaper` (#45722) @andreachiera
46
+ - [examples] Remove create-react-app usages (#45426) @CodeLeom
47
+ - Add `AccordionSummary` to the v5 breaking change migration (#45947) @siriwatknp
48
+ - Update CSS variable usage in migration guide for Pigment CSS (#46033) @sai6855
49
+ - Fix docs API dark mode color (#46086) @alexfauquette
50
+ - Add a guide for extending Material UI classes in Tailwind CSS (#46039) @siriwatknp
51
+ - Add `InitColorSchemeScript` docs and API (#45927) @siriwatknp
52
+ - Add Tailwind CSS v4 integration guide (#45906) @siriwatknp
53
+ - Fix 301 links to the system v6 (#45931) @oliviertassinari
54
+ - Add notification for MUI X v8 announcement (#45942) @joserodolfofreitas
55
+ - Fix som 301 redirections (ae84b35) @oliviertassinari
56
+ - Fix some 301 redirections (057384e) @oliviertassinari
57
+ - Fix logo is not centered on small screens (#45920) @crabsim
58
+ - Fix line break typo (a2a62d5) @oliviertassinari
59
+ - Fix markdown typo in templates.md (#45914) @scyzoryck
60
+ - Add Next.js App Router guide for custom classnames (#45852) @siriwatknp
61
+
62
+ ### Core
63
+
64
+ - [code-infra] Give a stable name to dev tool app (3889ded) @oliviertassinari
65
+ - [code-infra] Normalize author package in org (8135638) @oliviertassinari
66
+ - [code-infra] Correct some manually curated .d.ts files (#46054) @Janpot
67
+ - [code-infra] Align deps versions (#46048) @Janpot
68
+ - [code-infra] Fix dynamic import in imports resolver (#46046) @Janpot
69
+ - [code-infra] Eliminate `@mui/utils` deep imports (#46004) @Janpot
70
+ - [code-infra] Expand renovate.json for react types (#45935) @Janpot
71
+ - [code-infra] Make Argos upload script reusable (#45883) @Janpot
72
+ - [code-infra] Disallow redundant window prefixes for globals (#45880) @Janpot
73
+ - [code-infra] Remove type generation of modern build (#45912) @Janpot
74
+ - [code-infra] Clean up bundle size checker (#45622) @Janpot
75
+ - [code-infra] Fix `StrictMode` effects not being called twice in React 19 tests (#45812) @bernardobelchior
76
+ - [code-infra] Convert `@mui/utils` to typescript (#45671) @Janpot
77
+ - [docs-infra] Improve export into sandbox package.json (#46044) @oliviertassinari
78
+ - [docs-infra] Update feedback Node.js to v22 (#46064) @oliviertassinari
79
+ - [docs-infra] Normalize netlify.toml in org (b101d5c) @oliviertassinari
80
+ - [docs-infra] Uniformize Vale between repositories (0f79796) @oliviertassinari
81
+ - [docs-infra] Fix Vale no longer working (#46029) @oliviertassinari
82
+ - [docs-infra] Remove demo styling switch (#45926) @Janpot
83
+ - [docs-infra] StackBlitz WebContainer demos (#45924) @Janpot
84
+ - [docs-infra] Fix feedback management (#45872) @alexfauquette
85
+ - [test] Replace `playwright` with `@playwright/test` (#45998) @ZeeshanTamboli
86
+ - Fix internal version duplication (#46051) @oliviertassinari
87
+ - Avoid the need for `@mui/material/themeCssVarsAugmentation` (#46053) @Janpot
88
+ - Add security label to dependabot PRs (0a5c027) @oliviertassinari
89
+ - Remove unecessary versions (#46034) @oliviertassinari
90
+ - Remove redundant overrides resolver (#45970) @romgrk
91
+ - Fix duplicate branch reference (#45915) @oliviertassinari
92
+ - Fix outdated <link rel="shortcut icon" (#45916) @oliviertassinari
93
+ - Fix redirection chains (#45930) @oliviertassinari
94
+ - Run pnpm docs:sync-team (beee09f) @oliviertassinari
95
+ - Add `pkg.pr.new` publishing (#42984) @Aslemammad
96
+ - Remove @mui/base from the master branch (#45857) @mnajdova
97
+
98
+ All contributors of this release in alphabetical order: @alexfauquette, @andreachiera, @Aslemammad, @bernardobelchior, @CodeLeom, @crabsim, @Demianeen, @good-jinu, @Janpot, @joserodolfofreitas, @mnajdova, @Nayeem-XTREME, @oliviertassinari, @renovate[bot], @romgrk, @sai6855, @scyzoryck, @siriwatknp, @SuyashShukla0007, @yermartee, @ZeeshanTamboli
99
+
100
+ ## 7.0.2
101
+
102
+ _Apr 9, 2025_
103
+
104
+ A big thanks to the 12 contributors who made this release possible.
105
+
106
+ ### `@mui/material@7.0.2`
107
+
108
+ - [Autocomplete] Add ability to render custom single value (#45387) @ZeeshanTamboli
109
+ - [Autocomplete] Prevent shrink animation in controlled Autocomplete when initial `value` is provided (#45734) @imadx
110
+ - [AvatarGroup] Fix `spacing` prop ignoring value `0` (#45799) @Kartik-Murthy
111
+ - [Dialog] Deprecate composed classes (#45418) @sai6855
112
+
113
+ ### `@mui/material-nextjs@7.0.2`
114
+
115
+ - Fix nonce issues (#45794) @Janpot
116
+ - Add warnings to nextjs router integration (#45778) @Janpot
117
+
118
+ ### `@mui/styled-engine@7.0.2`
119
+
120
+ - Added caching to `StyledEngineProvider` to improve performance for running tests with Jest (#45846) @siriwatknp
121
+
122
+ ### Core
123
+
124
+ - [blog] Improve upvote video (0646444) @oliviertassinari
125
+ - [code-infra] Remove webpack aliases (#45841) @Janpot
126
+ - [code-infra] Remove .tsbuildinfo from build folder (#45727) @Janpot
127
+ - [code-infra] Stabilize theme viewer screenshot tests (#45768) @Janpot
128
+ - [code-infra] Remove modern bundles (#45808) @Janpot
129
+ - Update buildTypes script to optionally remove css imports (#45835) @brijeshb42
130
+ - Allow repo to be accepted as an argument for releaseTag (#45801) @brijeshb42
131
+ - Update scripts to support base-ui (#45784) @brijeshb42
132
+ - Sync scorecards.yml across codebase (4de5076) @oliviertassinari
133
+ - Remove baseUrl and skipLibCheck (#45806) @Janpot
134
+ - [docs-infra] Fix redirect styles pages (#45848) @siriwatknp
135
+ - [docs-infra] Remove false-positive Vale rules (#45843) @oliviertassinari
136
+ - [docs-infra] Make sure Next.js can find package.json through its aliases (#45840) @Janpot
137
+ - [docs-infra] Fix Next.js brand name coverage (6915f8d) @oliviertassinari
138
+ - [docs-infra] Fix layout shift between MIT and commercial pages (#45760) @oliviertassinari
139
+ - [docs-infra] Non breaking space for ESM (#45758) @oliviertassinari
140
+ - [support-infra] Remove dead 'workflow_call:' (#45736) @oliviertassinari
141
+ - [utils] Support cleanup callbacks in useForkRef (#45621) @DiegoAndai
142
+
143
+ ### Docs
144
+
145
+ - Fix pigment vite integration example (#44746) @brijeshb42
146
+ - Update migration instructions and codemod references for deprecated APIs (#45793) @sai6855
147
+ - Add TanStack Router routing example (#44930) @vetledv
148
+ - Fix layout shifting in icons page (#45779) @sai6855
149
+ - Fix migration instructions (#45762) @oliviertassinari
150
+ - Fix wrong TypeScript support version (#45761) @oliviertassinari
151
+ - Fix link to mui-joy/src/styles/components.d.ts (#45763) @oliviertassinari
152
+ - Fix 301 link (ae94c40) @oliviertassinari
153
+ - Fix 301 links (abd8f63) @oliviertassinari
154
+ - Fix 301 redirection (c7658de) @oliviertassinari
155
+ - [nextjs] Migrate from deprecated "legacyBehavior" prop (#44871) @oliviertassinari
156
+ - [nextjs] Document CSP for Next.js Pages Router (#45798) @Grohden
157
+
158
+ All contributors of this release in alphabetical order: @brijeshb42, @DiegoAndai, @Grohden, @imadx, @Janpot, @Kartik-Murthy, @oliviertassinari, @renovate[bot], @sai6855, @siriwatknp, @vetledv, @ZeeshanTamboli
159
+
3
160
  ## 7.0.1
4
161
 
5
162
  <!-- generated comparing v7.0.0..master -->
package/Link/Link.d.ts CHANGED
@@ -4,13 +4,16 @@ import { LinkProps as MuiLinkProps } from '@mui/material/Link';
4
4
  /**
5
5
  * File to keep in sync with:
6
6
  *
7
+ * - /packages/mui-docs/src/Link/Link.tsx
7
8
  * - /examples/material-ui-nextjs-pages-router/src/Link.js
8
9
  * - /examples/material-ui-nextjs-pages-router-ts/src/Link.tsx
10
+ * - /examples/material-ui-nextjs-ts-v4-v5-migration/src/Link.tsx
9
11
  */
10
12
  interface NextLinkComposedProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>, Omit<NextLinkProps, 'href' | 'as' | 'passHref' | 'onMouseEnter' | 'onClick' | 'onTouchStart'> {
11
13
  to: NextLinkProps['href'];
12
14
  linkAs?: NextLinkProps['as'];
13
15
  }
16
+ export declare const NextLinkComposed: React.ForwardRefExoticComponent<NextLinkComposedProps & React.RefAttributes<HTMLAnchorElement>>;
14
17
  export type LinkProps = {
15
18
  activeClassName?: string;
16
19
  as?: NextLinkProps['as'];
package/Link/Link.js CHANGED
@@ -5,7 +5,7 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.Link = void 0;
8
+ exports.NextLinkComposed = exports.Link = void 0;
9
9
  var React = _interopRequireWildcard(require("react"));
10
10
  var _clsx = _interopRequireDefault(require("clsx"));
11
11
  var _router = require("next/router");
@@ -17,36 +17,27 @@ var _jsxRuntime = require("react/jsx-runtime");
17
17
  /**
18
18
  * File to keep in sync with:
19
19
  *
20
+ * - /packages/mui-docs/src/Link/Link.tsx
20
21
  * - /examples/material-ui-nextjs-pages-router/src/Link.js
21
22
  * - /examples/material-ui-nextjs-pages-router-ts/src/Link.tsx
23
+ * - /examples/material-ui-nextjs-ts-v4-v5-migration/src/Link.tsx
22
24
  */
23
25
 
24
- const NextLinkComposed = /*#__PURE__*/React.forwardRef(function NextLinkComposed(props, ref) {
26
+ const NextLinkComposed = exports.NextLinkComposed = /*#__PURE__*/React.forwardRef(function NextLinkComposed(props, ref) {
25
27
  const {
26
28
  to,
27
29
  linkAs,
28
- replace,
29
- scroll,
30
- shallow,
31
- prefetch,
32
- locale,
33
30
  ...other
34
31
  } = props;
35
32
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_link.default, {
36
33
  href: to,
37
- prefetch: prefetch,
38
34
  as: linkAs,
39
- replace: replace,
40
- scroll: scroll,
41
- shallow: shallow,
42
- passHref: true,
43
- locale: locale,
44
35
  "data-no-markdown-link": "true",
45
36
  ref: ref,
46
37
  ...other
47
38
  });
48
39
  });
49
- // A styled version of the Next.js Pages Router Link component:
40
+ // A styled version of the Next.js Link component:
50
41
  // https://nextjs.org/docs/pages/api-reference/components/link
51
42
  const Link = exports.Link = /*#__PURE__*/React.forwardRef(function Link(props, ref) {
52
43
  const {
@@ -55,19 +46,13 @@ const Link = exports.Link = /*#__PURE__*/React.forwardRef(function Link(props, r
55
46
  className: classNameProps,
56
47
  href,
57
48
  linkAs: linkAsProp,
58
- locale,
59
49
  noLinkStyle,
60
- prefetch,
61
- replace,
62
- scroll,
63
- shallow,
64
50
  ...other
65
51
  } = props;
66
52
  const router = (0, _router.useRouter)();
67
53
  const pathname = typeof href === 'string' ? href : href?.pathname;
68
54
  const routerPathname = router.pathname.replace('/[docsTab]', '');
69
- const shouldBeActive = routerPathname === pathname;
70
- const className = (0, _clsx.default)(classNameProps, shouldBeActive && activeClassName);
55
+ const className = (0, _clsx.default)(classNameProps, routerPathname === pathname && activeClassName);
71
56
  const userLanguage = (0, _i18n.useUserLanguage)();
72
57
  const {
73
58
  LANGUAGES_IGNORE_PAGES
@@ -78,12 +63,7 @@ const Link = exports.Link = /*#__PURE__*/React.forwardRef(function Link(props, r
78
63
  }
79
64
  const nextjsProps = {
80
65
  to: href,
81
- linkAs,
82
- replace,
83
- scroll,
84
- shallow,
85
- prefetch,
86
- locale
66
+ linkAs
87
67
  };
88
68
  if (noLinkStyle) {
89
69
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(NextLinkComposed, {
@@ -10,7 +10,7 @@ var React = _interopRequireWildcard(require("react"));
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
  var _nprogress = _interopRequireDefault(require("nprogress"));
12
12
  var _NoSsr = require("@mui/base/NoSsr");
13
- var _utils = require("@mui/utils");
13
+ var _exactProp = _interopRequireDefault(require("@mui/utils/exactProp"));
14
14
  var _GlobalStyles = _interopRequireDefault(require("@mui/material/GlobalStyles"));
15
15
  var _styles = require("@mui/material/styles");
16
16
  var _jsxRuntime = require("react/jsx-runtime");
@@ -95,6 +95,6 @@ process.env.NODE_ENV !== "production" ? NProgressBar.propTypes = {
95
95
  children: _propTypes.default.node
96
96
  } : void 0;
97
97
  if (process.env.NODE_ENV !== 'production') {
98
- process.env.NODE_ENV !== "production" ? NProgressBar.propTypes = (0, _utils.exactProp)(NProgressBar.propTypes) : void 0;
98
+ process.env.NODE_ENV !== "production" ? NProgressBar.propTypes = (0, _exactProp.default)(NProgressBar.propTypes) : void 0;
99
99
  }
100
100
  var _default = exports.default = NProgressBar;
package/esm/Ad/Ad.js CHANGED
@@ -68,7 +68,7 @@ const inHouseAds = [{
68
68
  description: '<b>Premium Themes</b>. Kickstart your application development with a ready-made theme.'
69
69
  }, {
70
70
  name: 'tidelift',
71
- link: 'https://tidelift.com/subscription/pkg/npm-material-ui?utm_source=npm-material-ui&utm_medium=referral&utm_campaign=enterprise&utm_content=ad',
71
+ link: 'https://tidelift.com/?utm_source=npm-material-ui&utm_medium=referral&utm_campaign=enterprise&utm_content=ad',
72
72
  img: '/static/ads-in-house/tidelift.png',
73
73
  description: '<b>MUI for enterprise</b>. Save time and reduce risk. Managed open source — backed by maintainers.'
74
74
  }, {
@@ -4,13 +4,16 @@ import { LinkProps as MuiLinkProps } from '@mui/material/Link';
4
4
  /**
5
5
  * File to keep in sync with:
6
6
  *
7
+ * - /packages/mui-docs/src/Link/Link.tsx
7
8
  * - /examples/material-ui-nextjs-pages-router/src/Link.js
8
9
  * - /examples/material-ui-nextjs-pages-router-ts/src/Link.tsx
10
+ * - /examples/material-ui-nextjs-ts-v4-v5-migration/src/Link.tsx
9
11
  */
10
12
  interface NextLinkComposedProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>, Omit<NextLinkProps, 'href' | 'as' | 'passHref' | 'onMouseEnter' | 'onClick' | 'onTouchStart'> {
11
13
  to: NextLinkProps['href'];
12
14
  linkAs?: NextLinkProps['as'];
13
15
  }
16
+ export declare const NextLinkComposed: React.ForwardRefExoticComponent<NextLinkComposedProps & React.RefAttributes<HTMLAnchorElement>>;
14
17
  export type LinkProps = {
15
18
  activeClassName?: string;
16
19
  as?: NextLinkProps['as'];
package/esm/Link/Link.js CHANGED
@@ -9,36 +9,27 @@ import { useDocsConfig } from "../DocsProvider/index.js";
9
9
  /**
10
10
  * File to keep in sync with:
11
11
  *
12
+ * - /packages/mui-docs/src/Link/Link.tsx
12
13
  * - /examples/material-ui-nextjs-pages-router/src/Link.js
13
14
  * - /examples/material-ui-nextjs-pages-router-ts/src/Link.tsx
15
+ * - /examples/material-ui-nextjs-ts-v4-v5-migration/src/Link.tsx
14
16
  */
15
17
  import { jsx as _jsx } from "react/jsx-runtime";
16
- const NextLinkComposed = /*#__PURE__*/React.forwardRef(function NextLinkComposed(props, ref) {
18
+ export const NextLinkComposed = /*#__PURE__*/React.forwardRef(function NextLinkComposed(props, ref) {
17
19
  const {
18
20
  to,
19
21
  linkAs,
20
- replace,
21
- scroll,
22
- shallow,
23
- prefetch,
24
- locale,
25
22
  ...other
26
23
  } = props;
27
24
  return /*#__PURE__*/_jsx(NextLink, {
28
25
  href: to,
29
- prefetch: prefetch,
30
26
  as: linkAs,
31
- replace: replace,
32
- scroll: scroll,
33
- shallow: shallow,
34
- passHref: true,
35
- locale: locale,
36
27
  "data-no-markdown-link": "true",
37
28
  ref: ref,
38
29
  ...other
39
30
  });
40
31
  });
41
- // A styled version of the Next.js Pages Router Link component:
32
+ // A styled version of the Next.js Link component:
42
33
  // https://nextjs.org/docs/pages/api-reference/components/link
43
34
  export const Link = /*#__PURE__*/React.forwardRef(function Link(props, ref) {
44
35
  const {
@@ -47,19 +38,13 @@ export const Link = /*#__PURE__*/React.forwardRef(function Link(props, ref) {
47
38
  className: classNameProps,
48
39
  href,
49
40
  linkAs: linkAsProp,
50
- locale,
51
41
  noLinkStyle,
52
- prefetch,
53
- replace,
54
- scroll,
55
- shallow,
56
42
  ...other
57
43
  } = props;
58
44
  const router = useRouter();
59
45
  const pathname = typeof href === 'string' ? href : href?.pathname;
60
46
  const routerPathname = router.pathname.replace('/[docsTab]', '');
61
- const shouldBeActive = routerPathname === pathname;
62
- const className = clsx(classNameProps, shouldBeActive && activeClassName);
47
+ const className = clsx(classNameProps, routerPathname === pathname && activeClassName);
63
48
  const userLanguage = useUserLanguage();
64
49
  const {
65
50
  LANGUAGES_IGNORE_PAGES
@@ -70,12 +55,7 @@ export const Link = /*#__PURE__*/React.forwardRef(function Link(props, ref) {
70
55
  }
71
56
  const nextjsProps = {
72
57
  to: href,
73
- linkAs,
74
- replace,
75
- scroll,
76
- shallow,
77
- prefetch,
78
- locale
58
+ linkAs
79
59
  };
80
60
  if (noLinkStyle) {
81
61
  return /*#__PURE__*/_jsx(NextLinkComposed, {
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import NProgress from 'nprogress';
4
4
  import { NoSsr } from '@mui/base/NoSsr';
5
- import { exactProp } from '@mui/utils';
5
+ import exactProp from '@mui/utils/exactProp';
6
6
  import GlobalStyles from '@mui/material/GlobalStyles';
7
7
  import { keyframes } from '@mui/material/styles';
8
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
package/esm/i18n/i18n.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { deepmerge } from '@mui/utils';
3
+ import deepmerge from '@mui/utils/deepmerge';
4
4
  import defaultTranslations from "../translations/index.js";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  const TranslationsContext = /*#__PURE__*/React.createContext(defaultTranslations);
package/i18n/i18n.js CHANGED
@@ -12,7 +12,7 @@ exports.useTranslate = useTranslate;
12
12
  exports.useUserLanguage = useUserLanguage;
13
13
  var React = _interopRequireWildcard(require("react"));
14
14
  var _propTypes = _interopRequireDefault(require("prop-types"));
15
- var _utils = require("@mui/utils");
15
+ var _deepmerge = _interopRequireDefault(require("@mui/utils/deepmerge"));
16
16
  var _translations = _interopRequireDefault(require("../translations"));
17
17
  var _jsxRuntime = require("react/jsx-runtime");
18
18
  const TranslationsContext = /*#__PURE__*/React.createContext(_translations.default);
@@ -21,7 +21,7 @@ function TranslationsProvider({
21
21
  children
22
22
  }) {
23
23
  const currentTranslations = React.useContext(TranslationsContext);
24
- const mergedTranslations = React.useMemo(() => (0, _utils.deepmerge)(currentTranslations, translations), [currentTranslations, translations]);
24
+ const mergedTranslations = React.useMemo(() => (0, _deepmerge.default)(currentTranslations, translations), [currentTranslations, translations]);
25
25
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(TranslationsContext.Provider, {
26
26
  value: mergedTranslations,
27
27
  children: children
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "@mui/docs",
3
- "version": "7.0.1",
4
- "private": false,
3
+ "version": "7.1.0",
5
4
  "author": "MUI Team",
6
5
  "description": "MUI Docs - Documentation building blocks.",
7
6
  "main": "./index.js",
@@ -23,12 +22,12 @@
23
22
  },
24
23
  "homepage": "https://github.com/mui/material-ui/tree/master/packages/mui-docs",
25
24
  "dependencies": {
26
- "@babel/runtime": "^7.26.10",
25
+ "@babel/runtime": "^7.27.1",
27
26
  "clipboard-copy": "^4.0.1",
28
27
  "clsx": "^2.1.1",
29
28
  "nprogress": "^0.2.0",
30
29
  "prop-types": "^15.8.1",
31
- "@mui/internal-markdown": "^2.0.3"
30
+ "@mui/internal-markdown": "^2.0.5"
32
31
  },
33
32
  "peerDependencies": {
34
33
  "@mui/base": "*",
@@ -36,7 +35,7 @@
36
35
  "@mui/material": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^7.0.0-beta",
37
36
  "@mui/system": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^7.0.0-beta",
38
37
  "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
39
- "chai": "^4.4.1",
38
+ "chai": "^4.5.0",
40
39
  "csstype": "^3.1.3",
41
40
  "next": "^13.5.1 || ^14 || ^15.0.0",
42
41
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0"
@@ -53,6 +52,7 @@
53
52
  "engines": {
54
53
  "node": ">=14.0.0"
55
54
  },
55
+ "private": false,
56
56
  "module": "./esm/index.js",
57
57
  "exports": {
58
58
  "./package.json": "./package.json",
@@ -64,10 +64,6 @@
64
64
  "import": {
65
65
  "types": "./esm/index.d.ts",
66
66
  "default": "./esm/index.js"
67
- },
68
- "mui-modern": {
69
- "types": "./modern/index.d.ts",
70
- "default": "./modern/index.js"
71
67
  }
72
68
  },
73
69
  "./*": {
@@ -78,10 +74,6 @@
78
74
  "import": {
79
75
  "types": "./esm/*/index.d.ts",
80
76
  "default": "./esm/*/index.js"
81
- },
82
- "mui-modern": {
83
- "types": "./modern/*/index.d.ts",
84
- "default": "./modern/*/index.js"
85
77
  }
86
78
  },
87
79
  "./esm": null,
package/modern/Ad/Ad.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- export declare const AD_MARGIN_TOP = 3;
3
- export declare const AD_MARGIN_BOTTOM = 3;
4
- export declare const AD_HEIGHT = 126;
5
- export declare const AD_HEIGHT_MOBILE: number;
6
- export declare function Ad(): React.JSX.Element;
@@ -1,3 +0,0 @@
1
- import * as React from 'react';
2
- export declare function AdCarbonInline(): React.JSX.Element;
3
- export default function AdCarbon(): React.JSX.Element;
@@ -1,16 +0,0 @@
1
- import * as React from 'react';
2
- export interface AdParameters {
3
- name: string;
4
- link: string;
5
- img?: string;
6
- description: string;
7
- poweredby: string;
8
- label: string;
9
- }
10
- interface AdDisplayProps {
11
- ad: AdParameters;
12
- className?: string;
13
- shape?: 'auto' | 'inline' | 'image';
14
- }
15
- export default function AdDisplay(props: AdDisplayProps): React.JSX.Element;
16
- export {};
@@ -1,10 +0,0 @@
1
- import * as React from 'react';
2
- export interface AdGuestProps {
3
- /**
4
- * The querySelector use to target the element which will include the ad.
5
- */
6
- classSelector?: string;
7
- children?: React.ReactNode | undefined;
8
- }
9
- declare function AdGuest(props: AdGuestProps): React.JSX.Element | null;
10
- export { AdGuest };
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- import { AdParameters } from "./AdDisplay.js";
3
- export default function AdInHouse(props: {
4
- ad: Omit<AdParameters, 'poweredby' | 'label'>;
5
- }): React.JSX.Element;
@@ -1,19 +0,0 @@
1
- import * as React from 'react';
2
- type AdPortal = {
3
- placement: 'body-top';
4
- element: Element | null;
5
- };
6
- interface AdManagerProps {
7
- /**
8
- * The querySelector use to target the element which will include the ad.
9
- */
10
- classSelector?: string;
11
- children?: React.ReactNode | undefined;
12
- }
13
- export declare const AdContext: React.Context<AdPortal>;
14
- export declare const adShape: string;
15
- export declare function AdManager({
16
- classSelector,
17
- children
18
- }: AdManagerProps): React.JSX.Element;
19
- export {};
@@ -1,15 +0,0 @@
1
- import * as React from 'react';
2
- export interface AdConfig {
3
- /**
4
- * The ratio of "ad display" event sent to Google Analytics.
5
- * Used to avoid an exceed on the Google Analytics quotas.
6
- * @default 0.1
7
- */
8
- GADisplayRatio: number;
9
- }
10
- export interface AdProviderProps {
11
- children: React.ReactNode;
12
- config?: Partial<AdConfig>;
13
- }
14
- export declare function AdProvider(props: AdProviderProps): React.JSX.Element;
15
- export declare function useAdConfig(): AdConfig;