@mui/docs 6.0.0-alpha.0 → 6.0.0-alpha.10
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 +591 -6
- package/CodeCopy/CodeCopy.d.ts +20 -0
- package/CodeCopy/CodeCopy.js +172 -0
- package/CodeCopy/CodeCopyButton.d.ts +5 -0
- package/CodeCopy/CodeCopyButton.js +41 -0
- package/CodeCopy/index.d.ts +3 -0
- package/CodeCopy/index.js +3 -0
- package/CodeCopy/package.json +6 -0
- package/CodeCopy/useClipboardCopy.d.ts +4 -0
- package/CodeCopy/useClipboardCopy.js +21 -0
- package/ComponentLinkHeader/ComponentLinkHeader.d.ts +9 -0
- package/ComponentLinkHeader/ComponentLinkHeader.js +179 -0
- package/ComponentLinkHeader/index.d.ts +2 -0
- package/ComponentLinkHeader/index.js +2 -0
- package/ComponentLinkHeader/package.json +6 -0
- package/HighlightedCode/HighlightedCode.d.ts +14 -0
- package/HighlightedCode/HighlightedCode.js +68 -0
- package/HighlightedCode/index.d.ts +1 -0
- package/HighlightedCode/index.js +1 -0
- package/HighlightedCode/package.json +6 -0
- package/InfoCard/InfoCard.d.ts +20 -0
- package/InfoCard/InfoCard.js +87 -0
- package/InfoCard/index.d.ts +1 -0
- package/InfoCard/index.js +1 -0
- package/InfoCard/package.json +6 -0
- package/Link/Link.js +40 -38
- package/MarkdownElement/MarkdownElement.d.ts +6 -0
- package/MarkdownElement/MarkdownElement.js +825 -0
- package/MarkdownElement/index.d.ts +1 -0
- package/MarkdownElement/index.js +1 -0
- package/MarkdownElement/package.json +6 -0
- package/NProgressBar/NProgressBar.js +6 -7
- 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 +9 -0
- package/branding/BrandingProvider.js +17 -0
- package/branding/brandingTheme.d.ts +152 -0
- package/branding/brandingTheme.js +1346 -0
- package/branding/index.d.ts +2 -0
- package/branding/index.js +2 -0
- package/branding/package.json +6 -0
- package/node/CodeCopy/CodeCopy.js +188 -0
- package/node/CodeCopy/CodeCopyButton.js +50 -0
- package/node/CodeCopy/index.js +40 -0
- package/node/CodeCopy/useClipboardCopy.js +30 -0
- package/node/ComponentLinkHeader/ComponentLinkHeader.js +189 -0
- package/node/ComponentLinkHeader/index.js +24 -0
- package/node/HighlightedCode/HighlightedCode.js +77 -0
- package/node/HighlightedCode/index.js +16 -0
- package/node/InfoCard/InfoCard.js +97 -0
- package/node/InfoCard/index.js +16 -0
- package/node/Link/Link.js +43 -40
- package/node/MarkdownElement/MarkdownElement.js +837 -0
- package/node/MarkdownElement/index.js +16 -0
- package/node/NProgressBar/NProgressBar.js +6 -7
- package/node/SectionTitle/SectionTitle.js +38 -0
- package/node/SectionTitle/index.js +16 -0
- package/node/branding/BrandingProvider.js +25 -0
- package/node/branding/brandingTheme.js +1357 -0
- package/node/branding/index.js +27 -0
- 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 +216 -0
- package/package.json +11 -8
- 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/translations.json +4 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/legacy/DocsProvider/DocsProvider.js +0 -25
- package/legacy/DocsProvider/index.js +0 -1
- package/legacy/Link/Link.js +0 -101
- package/legacy/Link/index.js +0 -1
- package/legacy/NProgressBar/NProgressBar.js +0 -80
- package/legacy/NProgressBar/index.js +0 -1
- package/legacy/i18n/i18n.js +0 -105
- package/legacy/i18n/index.js +0 -1
- package/legacy/svgIcons/FileDownload.js +0 -14
- package/legacy/svgIcons/JavaScript.js +0 -14
- package/legacy/svgIcons/TypeScript.js +0 -14
- package/legacy/translations/index.js +0 -4
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.GlowingIconContainer = GlowingIconContainer;
|
|
8
|
+
exports.InfoCard = InfoCard;
|
|
9
|
+
var React = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _styles = require("@mui/material/styles");
|
|
11
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
12
|
+
var _Paper = _interopRequireDefault(require("@mui/material/Paper"));
|
|
13
|
+
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
14
|
+
var _Link = require("../Link");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
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); }
|
|
17
|
+
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; }
|
|
18
|
+
function GlowingIconContainer({
|
|
19
|
+
icon
|
|
20
|
+
}) {
|
|
21
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
22
|
+
sx: theme => ({
|
|
23
|
+
width: 36,
|
|
24
|
+
height: 36,
|
|
25
|
+
display: 'flex',
|
|
26
|
+
justifyContent: 'center',
|
|
27
|
+
alignItems: 'center',
|
|
28
|
+
flexShrink: 0,
|
|
29
|
+
borderRadius: 1,
|
|
30
|
+
border: '1px solid',
|
|
31
|
+
borderColor: 'primary.200',
|
|
32
|
+
bgcolor: 'primary.50',
|
|
33
|
+
boxShadow: `0px 0 0 2px ${(0, _styles.alpha)(theme.palette.primary[500], 0.1)}, 0px 2px 12px 0px rgba(234, 237, 241, 0.3) inset`,
|
|
34
|
+
'& .MuiSvgIcon-root': {
|
|
35
|
+
fontSize: theme.typography.pxToRem(18)
|
|
36
|
+
},
|
|
37
|
+
...theme.applyDarkStyles({
|
|
38
|
+
borderColor: (0, _styles.alpha)(theme.palette.primary[400], 0.25),
|
|
39
|
+
bgcolor: (0, _styles.alpha)(theme.palette.primary[900], 0.2),
|
|
40
|
+
boxShadow: `0 0 0 2px ${(0, _styles.alpha)(theme.palette.primary[600], 0.1)}, 0px 2px 12px 0px rgba(0, 0, 0, 0.25) inset`
|
|
41
|
+
})
|
|
42
|
+
}),
|
|
43
|
+
children: icon
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function InfoCard(props) {
|
|
47
|
+
const {
|
|
48
|
+
classNameDescription,
|
|
49
|
+
classNameTitle,
|
|
50
|
+
description,
|
|
51
|
+
icon,
|
|
52
|
+
link,
|
|
53
|
+
svg,
|
|
54
|
+
title,
|
|
55
|
+
titleProps,
|
|
56
|
+
...other
|
|
57
|
+
} = props;
|
|
58
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Paper.default, {
|
|
59
|
+
variant: "outlined",
|
|
60
|
+
component: link ? _Link.Link : 'div',
|
|
61
|
+
href: link,
|
|
62
|
+
...(link ? {
|
|
63
|
+
noLinkStyle: true,
|
|
64
|
+
// Fix overloading with prefetch={false}, only prefetch on hover.
|
|
65
|
+
prefetch: false
|
|
66
|
+
} : {}),
|
|
67
|
+
sx: theme => ({
|
|
68
|
+
p: 2.5,
|
|
69
|
+
height: '100%',
|
|
70
|
+
background: `${(theme.vars || theme).palette.gradients.linearSubtle}`,
|
|
71
|
+
...theme.applyDarkStyles({
|
|
72
|
+
bgcolor: (0, _styles.alpha)(theme.palette.primaryDark[800], 0.25),
|
|
73
|
+
background: `${(theme.vars || theme).palette.gradients.linearSubtle}`,
|
|
74
|
+
borderColor: 'primaryDark.700'
|
|
75
|
+
})
|
|
76
|
+
}),
|
|
77
|
+
...other,
|
|
78
|
+
children: [svg && svg, icon && /*#__PURE__*/(0, _jsxRuntime.jsx)(GlowingIconContainer, {
|
|
79
|
+
icon: icon
|
|
80
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
81
|
+
fontWeight: "semiBold",
|
|
82
|
+
component: "h3",
|
|
83
|
+
color: "text.primary",
|
|
84
|
+
variant: "body2",
|
|
85
|
+
mt: icon ? 2 : 0,
|
|
86
|
+
mb: description ? 0.5 : 0,
|
|
87
|
+
className: classNameTitle,
|
|
88
|
+
...titleProps,
|
|
89
|
+
children: title
|
|
90
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
91
|
+
variant: "body2",
|
|
92
|
+
color: "text.secondary",
|
|
93
|
+
className: classNameDescription,
|
|
94
|
+
children: description
|
|
95
|
+
})]
|
|
96
|
+
});
|
|
97
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _InfoCard = require("./InfoCard");
|
|
7
|
+
Object.keys(_InfoCard).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _InfoCard[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _InfoCard[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
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,31 +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
|
|
62
|
+
activeClassName = 'active',
|
|
63
|
+
as,
|
|
64
|
+
className: classNameProps,
|
|
65
|
+
href,
|
|
66
|
+
legacyBehavior,
|
|
67
|
+
linkAs: linkAsProp,
|
|
68
|
+
locale,
|
|
69
|
+
noLinkStyle,
|
|
70
|
+
prefetch,
|
|
71
|
+
replace,
|
|
72
|
+
role,
|
|
73
|
+
// Link don't have roles.
|
|
74
|
+
scroll,
|
|
75
|
+
shallow,
|
|
76
|
+
...other
|
|
77
|
+
} = props;
|
|
79
78
|
const router = (0, _router.useRouter)();
|
|
80
79
|
const pathname = typeof href === 'string' ? href : href == null ? void 0 : href.pathname;
|
|
81
80
|
const routerPathname = router.pathname.replace('/[docsTab]', '');
|
|
@@ -100,14 +99,18 @@ const Link = exports.Link = /*#__PURE__*/React.forwardRef(function Link(props, r
|
|
|
100
99
|
locale
|
|
101
100
|
};
|
|
102
101
|
if (noLinkStyle) {
|
|
103
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(NextLinkComposed,
|
|
102
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(NextLinkComposed, {
|
|
104
103
|
className: className,
|
|
105
|
-
ref: ref
|
|
106
|
-
|
|
104
|
+
ref: ref,
|
|
105
|
+
...nextjsProps,
|
|
106
|
+
...other
|
|
107
|
+
});
|
|
107
108
|
}
|
|
108
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.default,
|
|
109
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.default, {
|
|
109
110
|
component: NextLinkComposed,
|
|
110
111
|
className: className,
|
|
111
|
-
ref: ref
|
|
112
|
-
|
|
112
|
+
ref: ref,
|
|
113
|
+
...nextjsProps,
|
|
114
|
+
...other
|
|
115
|
+
});
|
|
113
116
|
});
|