@mui/docs 6.0.0-dev.240424162023-9968b4889d → 6.0.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.
- package/Ad/Ad.d.ts +6 -0
- package/Ad/Ad.js +228 -0
- package/Ad/AdCarbon.d.ts +3 -0
- package/Ad/AdCarbon.js +120 -0
- package/Ad/AdDisplay.d.ts +16 -0
- package/Ad/AdDisplay.js +89 -0
- package/Ad/AdGuest.d.ts +10 -0
- package/Ad/AdGuest.js +29 -0
- package/Ad/AdInHouse.d.ts +5 -0
- package/Ad/AdInHouse.js +15 -0
- package/Ad/AdManager.d.ts +16 -0
- package/Ad/AdManager.js +36 -0
- package/Ad/AdProvider.d.ts +15 -0
- package/Ad/AdProvider.js +24 -0
- package/Ad/ad.styles.d.ts +4327 -0
- package/Ad/ad.styles.js +89 -0
- package/Ad/index.d.ts +5 -0
- package/Ad/index.js +7 -0
- package/Ad/package.json +6 -0
- package/CHANGELOG.md +1367 -22
- package/CodeCopy/CodeCopy.js +1 -1
- package/CodeCopy/CodeCopyButton.js +11 -20
- package/CodeCopy/index.js +3 -3
- package/CodeCopy/useClipboardCopy.js +1 -1
- package/ComponentLinkHeader/ComponentLinkHeader.d.ts +9 -0
- package/ComponentLinkHeader/ComponentLinkHeader.js +197 -0
- package/ComponentLinkHeader/index.d.ts +2 -0
- package/ComponentLinkHeader/index.js +2 -0
- package/ComponentLinkHeader/package.json +6 -0
- package/DocsProvider/DocsProvider.d.ts +3 -1
- package/DocsProvider/DocsProvider.js +10 -5
- package/DocsProvider/index.js +1 -1
- package/HighlightedCode/HighlightedCode.d.ts +3 -1
- package/HighlightedCode/HighlightedCode.js +50 -24
- package/HighlightedCode/index.js +1 -1
- package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.d.ts +29 -0
- package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.js +355 -0
- package/HighlightedCodeWithTabs/index.d.ts +2 -0
- package/HighlightedCodeWithTabs/index.js +2 -0
- package/HighlightedCodeWithTabs/package.json +6 -0
- package/InfoCard/InfoCard.d.ts +0 -1
- package/InfoCard/InfoCard.js +46 -45
- package/InfoCard/index.js +1 -1
- package/Link/Link.js +41 -41
- package/Link/index.js +1 -1
- package/MarkdownElement/MarkdownElement.d.ts +1 -0
- package/MarkdownElement/MarkdownElement.js +187 -165
- package/MarkdownElement/index.js +1 -1
- package/NProgressBar/NProgressBar.js +6 -7
- package/NProgressBar/index.js +1 -1
- package/README.md +2 -2
- package/SectionTitle/SectionTitle.d.ts +7 -0
- package/SectionTitle/SectionTitle.js +30 -0
- package/SectionTitle/index.d.ts +1 -0
- package/SectionTitle/index.js +1 -0
- package/SectionTitle/package.json +6 -0
- package/branding/BrandingProvider.d.ts +1 -1
- package/branding/BrandingProvider.js +1 -1
- package/branding/brandingTheme.d.ts +2 -2
- package/branding/brandingTheme.js +657 -369
- package/branding/index.js +2 -2
- package/i18n/i18n.d.ts +2 -1
- package/i18n/i18n.js +19 -9
- package/i18n/index.js +1 -1
- package/node/Ad/Ad.js +238 -0
- package/node/Ad/AdCarbon.js +130 -0
- package/node/Ad/AdDisplay.js +97 -0
- package/node/Ad/AdGuest.js +37 -0
- package/node/Ad/AdInHouse.js +24 -0
- package/node/Ad/AdManager.js +46 -0
- package/node/Ad/AdProvider.js +33 -0
- package/node/Ad/ad.styles.js +97 -0
- package/node/Ad/index.js +63 -0
- package/node/CodeCopy/CodeCopy.js +10 -16
- package/node/CodeCopy/CodeCopyButton.js +10 -19
- package/node/CodeCopy/useClipboardCopy.js +1 -1
- package/node/ComponentLinkHeader/ComponentLinkHeader.js +206 -0
- package/node/ComponentLinkHeader/index.js +24 -0
- package/node/DocsProvider/DocsProvider.js +9 -4
- package/node/HighlightedCode/HighlightedCode.js +48 -22
- package/node/HighlightedCodeWithTabs/HighlightedCodeWithTabs.js +365 -0
- package/node/HighlightedCodeWithTabs/index.js +24 -0
- package/node/InfoCard/InfoCard.js +45 -44
- package/node/Link/Link.js +43 -42
- package/node/MarkdownElement/MarkdownElement.js +642 -623
- package/node/NProgressBar/NProgressBar.js +6 -7
- package/node/SectionTitle/SectionTitle.js +38 -0
- package/node/SectionTitle/index.js +16 -0
- package/node/branding/brandingTheme.js +657 -369
- package/node/i18n/i18n.js +18 -8
- package/node/svgIcons/AdobeXDIcon.js +22 -0
- package/node/svgIcons/BundleSizeIcon.js +22 -0
- package/node/svgIcons/FigmaIcon.js +31 -0
- package/node/svgIcons/FileDownload.js +3 -3
- package/node/svgIcons/JavaScript.js +3 -3
- package/node/svgIcons/MaterialDesignIcon.js +27 -0
- package/node/svgIcons/SketchIcon.js +36 -0
- package/node/svgIcons/TypeScript.js +3 -3
- package/node/svgIcons/W3CIcon.js +24 -0
- package/node/translations/translations.json +9 -4
- package/node/utils/loadScript.js +15 -0
- package/package.json +12 -10
- package/svgIcons/AdobeXDIcon.d.ts +4 -0
- package/svgIcons/AdobeXDIcon.js +14 -0
- package/svgIcons/BundleSizeIcon.d.ts +4 -0
- package/svgIcons/BundleSizeIcon.js +14 -0
- package/svgIcons/FigmaIcon.d.ts +4 -0
- package/svgIcons/FigmaIcon.js +23 -0
- package/svgIcons/FileDownload.d.ts +7 -0
- package/svgIcons/FileDownload.js +3 -3
- package/svgIcons/JavaScript.d.ts +7 -0
- package/svgIcons/JavaScript.js +3 -3
- package/svgIcons/MaterialDesignIcon.d.ts +4 -0
- package/svgIcons/MaterialDesignIcon.js +19 -0
- package/svgIcons/SketchIcon.d.ts +4 -0
- package/svgIcons/SketchIcon.js +28 -0
- package/svgIcons/TypeScript.d.ts +7 -0
- package/svgIcons/TypeScript.js +3 -3
- package/svgIcons/W3CIcon.d.ts +4 -0
- package/svgIcons/W3CIcon.js +16 -0
- package/translations/index.js +1 -1
- package/translations/translations.json +9 -4
- package/tsconfig.build.tsbuildinfo +1 -1
- package/utils/loadScript.d.ts +1 -0
- package/utils/loadScript.js +9 -0
package/node/Link/Link.js
CHANGED
|
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.Link = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
8
|
var React = _interopRequireWildcard(require("react"));
|
|
11
9
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
12
10
|
var _router = require("next/router");
|
|
@@ -16,8 +14,8 @@ var _styles = require("@mui/material/styles");
|
|
|
16
14
|
var _i18n = require("../i18n");
|
|
17
15
|
var _DocsProvider = require("../DocsProvider");
|
|
18
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
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); }
|
|
18
|
+
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; }
|
|
21
19
|
/**
|
|
22
20
|
* File to keep in sync with:
|
|
23
21
|
*
|
|
@@ -25,22 +23,21 @@ const _excluded = ["to", "linkAs", "replace", "scroll", "shallow", "prefetch", "
|
|
|
25
23
|
* - /examples/material-ui-nextjs-pages-router/src/Link.js
|
|
26
24
|
* - /examples/material-ui-nextjs-pages-router-ts/src/Link.tsx
|
|
27
25
|
*/
|
|
26
|
+
|
|
28
27
|
// Add support for the sx prop for consistency with the other branches.
|
|
29
|
-
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); }
|
|
30
|
-
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; }
|
|
31
28
|
const Anchor = (0, _styles.styled)('a')({});
|
|
32
29
|
const NextLinkComposed = /*#__PURE__*/React.forwardRef(function NextLinkComposed(props, ref) {
|
|
33
30
|
const {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
31
|
+
to,
|
|
32
|
+
linkAs,
|
|
33
|
+
replace,
|
|
34
|
+
scroll,
|
|
35
|
+
shallow,
|
|
36
|
+
prefetch,
|
|
37
|
+
legacyBehavior = true,
|
|
38
|
+
locale,
|
|
39
|
+
...other
|
|
40
|
+
} = props;
|
|
44
41
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_link.default, {
|
|
45
42
|
href: to,
|
|
46
43
|
prefetch: prefetch,
|
|
@@ -51,33 +48,33 @@ const NextLinkComposed = /*#__PURE__*/React.forwardRef(function NextLinkComposed
|
|
|
51
48
|
passHref: true,
|
|
52
49
|
locale: locale,
|
|
53
50
|
legacyBehavior: legacyBehavior,
|
|
54
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Anchor,
|
|
51
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Anchor, {
|
|
55
52
|
"data-no-markdown-link": "true",
|
|
56
|
-
ref: ref
|
|
57
|
-
|
|
53
|
+
ref: ref,
|
|
54
|
+
...other
|
|
55
|
+
})
|
|
58
56
|
});
|
|
59
57
|
});
|
|
60
58
|
// A styled version of the Next.js Pages Router Link component:
|
|
61
59
|
// https://nextjs.org/docs/pages/api-reference/components/link
|
|
62
60
|
const Link = exports.Link = /*#__PURE__*/React.forwardRef(function Link(props, ref) {
|
|
63
61
|
const {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded2);
|
|
62
|
+
activeClassName = 'active',
|
|
63
|
+
as,
|
|
64
|
+
className: classNameProps,
|
|
65
|
+
href,
|
|
66
|
+
legacyBehavior,
|
|
67
|
+
linkAs: linkAsProp,
|
|
68
|
+
locale,
|
|
69
|
+
noLinkStyle,
|
|
70
|
+
prefetch,
|
|
71
|
+
replace,
|
|
72
|
+
scroll,
|
|
73
|
+
shallow,
|
|
74
|
+
...other
|
|
75
|
+
} = props;
|
|
79
76
|
const router = (0, _router.useRouter)();
|
|
80
|
-
const pathname = typeof href === 'string' ? href : href
|
|
77
|
+
const pathname = typeof href === 'string' ? href : href?.pathname;
|
|
81
78
|
const routerPathname = router.pathname.replace('/[docsTab]', '');
|
|
82
79
|
const shouldBeActive = routerPathname === pathname;
|
|
83
80
|
const className = (0, _clsx.default)(classNameProps, shouldBeActive && activeClassName);
|
|
@@ -86,7 +83,7 @@ const Link = exports.Link = /*#__PURE__*/React.forwardRef(function Link(props, r
|
|
|
86
83
|
LANGUAGES_IGNORE_PAGES
|
|
87
84
|
} = (0, _DocsProvider.useDocsConfig)();
|
|
88
85
|
let linkAs = linkAsProp || as || href;
|
|
89
|
-
if (userLanguage !== 'en' && pathname && pathname.
|
|
86
|
+
if (userLanguage !== 'en' && pathname && pathname.startsWith('/') && !LANGUAGES_IGNORE_PAGES(pathname) && !pathname.startsWith(`/${userLanguage}/`)) {
|
|
90
87
|
linkAs = `/${userLanguage}${linkAs}`;
|
|
91
88
|
}
|
|
92
89
|
const nextjsProps = {
|
|
@@ -100,14 +97,18 @@ const Link = exports.Link = /*#__PURE__*/React.forwardRef(function Link(props, r
|
|
|
100
97
|
locale
|
|
101
98
|
};
|
|
102
99
|
if (noLinkStyle) {
|
|
103
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(NextLinkComposed,
|
|
100
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(NextLinkComposed, {
|
|
104
101
|
className: className,
|
|
105
|
-
ref: ref
|
|
106
|
-
|
|
102
|
+
ref: ref,
|
|
103
|
+
...nextjsProps,
|
|
104
|
+
...other
|
|
105
|
+
});
|
|
107
106
|
}
|
|
108
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.default,
|
|
107
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.default, {
|
|
109
108
|
component: NextLinkComposed,
|
|
110
109
|
className: className,
|
|
111
|
-
ref: ref
|
|
112
|
-
|
|
110
|
+
ref: ref,
|
|
111
|
+
...nextjsProps,
|
|
112
|
+
...other
|
|
113
|
+
});
|
|
113
114
|
});
|