@mui/docs 9.0.0-alpha.2 → 9.0.0-alpha.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/Ad/Ad.js +33 -42
- package/Ad/AdCarbon.js +18 -27
- package/Ad/AdDisplay.js +22 -29
- package/Ad/AdGuest.js +8 -15
- package/Ad/AdInHouse.js +4 -11
- package/Ad/AdManager.js +8 -17
- package/Ad/AdProvider.js +5 -13
- package/Ad/ad.styles.js +5 -13
- package/Ad/index.js +6 -62
- package/CHANGELOG.md +191 -0
- package/CodeCopy/CodeCopy.js +10 -19
- package/CodeCopy/CodeCopyButton.js +9 -16
- package/CodeCopy/index.js +3 -40
- package/CodeCopy/useClipboardCopy.js +4 -12
- package/ComponentLinkHeader/ComponentLinkHeader.js +46 -54
- package/ComponentLinkHeader/index.js +2 -24
- package/DemoContext/DemoContext.d.ts +86 -0
- package/DemoContext/DemoContext.js +13 -0
- package/DemoContext/index.d.ts +2 -0
- package/DemoContext/index.js +1 -0
- package/DocsApp/AnalyticsProvider.d.ts +17 -0
- package/DocsApp/AnalyticsProvider.js +225 -0
- package/DocsApp/DocsApp.d.ts +79 -0
- package/DocsApp/DocsApp.js +105 -0
- package/DocsApp/GoogleAnalytics.d.ts +9 -0
- package/DocsApp/GoogleAnalytics.js +129 -0
- package/DocsApp/StyledEngineProvider.d.ts +8 -0
- package/DocsApp/StyledEngineProvider.js +38 -0
- package/DocsApp/consoleBanner.d.ts +1 -0
- package/DocsApp/consoleBanner.js +19 -0
- package/DocsApp/createEmotionCache.d.ts +1 -0
- package/DocsApp/createEmotionCache.js +12 -0
- package/DocsApp/createGetInitialProps.d.ts +30 -0
- package/DocsApp/createGetInitialProps.js +29 -0
- package/DocsApp/index.d.ts +5 -0
- package/DocsApp/index.js +4 -0
- package/DocsApp/loadDependencies.d.ts +1 -0
- package/DocsApp/loadDependencies.js +11 -0
- package/DocsApp/reportWebVitals.d.ts +13 -0
- package/DocsApp/reportWebVitals.js +24 -0
- package/DocsApp/serviceWorker.d.ts +1 -0
- package/DocsApp/serviceWorker.js +61 -0
- package/DocsProvider/DocsProvider.js +9 -17
- package/DocsProvider/index.js +1 -16
- package/Document/Document.d.ts +16 -0
- package/Document/Document.js +147 -0
- package/Document/getInitialProps.d.ts +18 -0
- package/Document/getInitialProps.js +62 -0
- package/Document/index.d.ts +2 -0
- package/Document/index.js +2 -0
- package/HighlightedCode/HighlightedCode.js +18 -26
- package/HighlightedCode/index.js +1 -16
- package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.js +22 -31
- package/HighlightedCodeWithTabs/index.js +2 -24
- package/IconImage/IconImage.js +13 -21
- package/IconImage/index.js +1 -13
- package/InfoCard/InfoCard.js +20 -29
- package/InfoCard/index.js +1 -16
- package/Link/Link.js +17 -25
- package/Link/MarkdownLinks.d.ts +2 -0
- package/Link/MarkdownLinks.js +84 -0
- package/Link/SkipLink.d.ts +1 -0
- package/Link/SkipLink.js +66 -0
- package/Link/index.d.ts +3 -1
- package/Link/index.js +3 -16
- package/MarkdownElement/MarkdownElement.js +178 -186
- package/MarkdownElement/index.js +1 -16
- package/MuiPage/MuiPage.d.ts +67 -0
- package/MuiPage/MuiPage.js +1 -0
- package/MuiPage/index.d.ts +1 -0
- package/MuiPage/index.js +1 -0
- package/NextNProgressBar/NextNProgressBar.d.ts +1 -0
- package/NextNProgressBar/NextNProgressBar.js +44 -0
- package/NextNProgressBar/index.d.ts +1 -0
- package/NextNProgressBar/index.js +1 -0
- package/PageContext/PageContext.d.ts +32 -0
- package/PageContext/PageContext.js +6 -0
- package/PageContext/index.d.ts +2 -0
- package/PageContext/index.js +1 -0
- package/SectionHeadline/SectionHeadline.js +9 -17
- package/SectionHeadline/index.js +2 -25
- package/SectionTitle/SectionTitle.js +7 -13
- package/SectionTitle/index.js +1 -16
- package/ThemeContext/ThemeContext.js +26 -38
- package/ThemeContext/index.js +1 -42
- package/branding/BrandingCssVarsProvider.d.ts +27 -0
- package/branding/BrandingCssVarsProvider.js +170 -0
- package/branding/BrandingProvider.js +8 -15
- package/branding/brandingTheme.js +184 -188
- package/branding/index.d.ts +2 -1
- package/branding/index.js +3 -27
- package/codeStyling/codeStyling.d.ts +7 -0
- package/codeStyling/codeStyling.js +80 -0
- package/codeStyling/index.d.ts +1 -0
- package/codeStyling/index.js +1 -0
- package/codeVariant/codeVariant.d.ts +7 -0
- package/codeVariant/codeVariant.js +69 -0
- package/codeVariant/index.d.ts +1 -0
- package/codeVariant/index.js +1 -0
- package/constants/constants.d.ts +13 -0
- package/constants/constants.js +15 -0
- package/constants/index.d.ts +1 -0
- package/constants/index.js +1 -0
- package/findActivePage/findActivePage.d.ts +5 -0
- package/findActivePage/findActivePage.js +35 -0
- package/findActivePage/index.d.ts +1 -0
- package/findActivePage/index.js +1 -0
- package/getProductInfoFromUrl/getProductInfoFromUrl.d.ts +8 -0
- package/getProductInfoFromUrl/getProductInfoFromUrl.js +50 -0
- package/getProductInfoFromUrl/index.d.ts +2 -0
- package/getProductInfoFromUrl/index.js +1 -0
- package/globalSelector/globalSelector.d.ts +2 -0
- package/globalSelector/globalSelector.js +17 -0
- package/globalSelector/index.d.ts +1 -0
- package/globalSelector/index.js +1 -0
- package/helpers/helpers.d.ts +31 -0
- package/helpers/helpers.js +87 -0
- package/helpers/index.d.ts +2 -0
- package/helpers/index.js +1 -0
- package/i18n/i18n.js +17 -29
- package/i18n/index.js +1 -16
- package/mapApiPageTranslations/index.d.ts +1 -0
- package/mapApiPageTranslations/index.js +1 -0
- package/mapApiPageTranslations/mapApiPageTranslations.d.ts +11 -0
- package/mapApiPageTranslations/mapApiPageTranslations.js +46 -0
- package/nextFonts/index.js +8 -15
- package/package.json +217 -132
- package/svgIcons/BundleSizeIcon.js +5 -11
- package/svgIcons/FigmaIcon.js +8 -14
- package/svgIcons/FileDownload.js +5 -12
- package/svgIcons/JavaScript.js +5 -12
- package/svgIcons/MarkdownIcon.js +7 -14
- package/svgIcons/MaterialDesignIcon.js +6 -12
- package/svgIcons/SketchIcon.js +10 -16
- package/svgIcons/TypeScript.js +5 -12
- package/svgIcons/W3CIcon.js +6 -12
- package/translations/index.js +3 -10
- package/translations/translations.json +0 -1
- package/useLazyCSS/index.js +1 -13
- package/useLazyCSS/useLazyCSS.js +5 -11
- package/utils/index.d.ts +1 -0
- package/utils/index.js +2 -0
- package/utils/loadScript.js +1 -7
- package/webpack/index.d.ts +17 -0
- package/webpack/index.js +1 -0
- package/Ad/Ad.d.mts +0 -5
- package/Ad/Ad.mjs +0 -226
- package/Ad/AdCarbon.d.mts +0 -2
- package/Ad/AdCarbon.mjs +0 -125
- package/Ad/AdDisplay.d.mts +0 -16
- package/Ad/AdDisplay.mjs +0 -86
- package/Ad/AdGuest.d.mts +0 -10
- package/Ad/AdGuest.mjs +0 -29
- package/Ad/AdInHouse.d.mts +0 -4
- package/Ad/AdInHouse.mjs +0 -14
- package/Ad/AdManager.d.mts +0 -19
- package/Ad/AdManager.mjs +0 -36
- package/Ad/AdProvider.d.mts +0 -15
- package/Ad/AdProvider.mjs +0 -24
- package/Ad/ad.styles.d.mts +0 -4512
- package/Ad/ad.styles.mjs +0 -91
- package/Ad/index.d.mts +0 -5
- package/Ad/index.mjs +0 -7
- package/CodeCopy/CodeCopy.d.mts +0 -22
- package/CodeCopy/CodeCopy.mjs +0 -172
- package/CodeCopy/CodeCopyButton.d.mts +0 -4
- package/CodeCopy/CodeCopyButton.mjs +0 -40
- package/CodeCopy/index.d.mts +0 -3
- package/CodeCopy/index.mjs +0 -3
- package/CodeCopy/useClipboardCopy.d.mts +0 -4
- package/CodeCopy/useClipboardCopy.mjs +0 -21
- package/ComponentLinkHeader/ComponentLinkHeader.d.mts +0 -8
- package/ComponentLinkHeader/ComponentLinkHeader.mjs +0 -197
- package/ComponentLinkHeader/index.d.mts +0 -2
- package/ComponentLinkHeader/index.mjs +0 -2
- package/DocsProvider/DocsProvider.d.mts +0 -24
- package/DocsProvider/DocsProvider.mjs +0 -31
- package/DocsProvider/index.d.mts +0 -1
- package/DocsProvider/index.mjs +0 -1
- package/HighlightedCode/HighlightedCode.d.mts +0 -14
- package/HighlightedCode/HighlightedCode.mjs +0 -67
- package/HighlightedCode/index.d.mts +0 -1
- package/HighlightedCode/index.mjs +0 -1
- package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.d.mts +0 -28
- package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.mjs +0 -362
- package/HighlightedCodeWithTabs/index.d.mts +0 -2
- package/HighlightedCodeWithTabs/index.mjs +0 -2
- package/IconImage/IconImage.d.mts +0 -11
- package/IconImage/IconImage.mjs +0 -83
- package/IconImage/index.d.mts +0 -1
- package/IconImage/index.mjs +0 -1
- package/InfoCard/InfoCard.d.mts +0 -22
- package/InfoCard/InfoCard.mjs +0 -87
- package/InfoCard/index.d.mts +0 -1
- package/InfoCard/index.mjs +0 -1
- package/Link/Link.d.mts +0 -25
- package/Link/Link.mjs +0 -75
- package/Link/index.d.mts +0 -1
- package/Link/index.mjs +0 -1
- package/MarkdownElement/MarkdownElement.d.mts +0 -7
- package/MarkdownElement/MarkdownElement.mjs +0 -847
- package/MarkdownElement/index.d.mts +0 -1
- package/MarkdownElement/index.mjs +0 -1
- package/NProgressBar/NProgressBar.d.mts +0 -6
- package/NProgressBar/NProgressBar.js +0 -98
- package/NProgressBar/index.d.mts +0 -2
- package/NProgressBar/index.d.ts +0 -2
- package/NProgressBar/index.js +0 -13
- package/NProgressBar/index.mjs +0 -1
- package/SectionHeadline/SectionHeadline.d.mts +0 -13
- package/SectionHeadline/SectionHeadline.mjs +0 -81
- package/SectionHeadline/index.d.mts +0 -2
- package/SectionHeadline/index.mjs +0 -2
- package/SectionTitle/SectionTitle.d.mts +0 -6
- package/SectionTitle/SectionTitle.mjs +0 -29
- package/SectionTitle/index.d.mts +0 -1
- package/SectionTitle/index.mjs +0 -1
- package/ThemeContext/ThemeContext.d.mts +0 -92
- package/ThemeContext/ThemeContext.mjs +0 -200
- package/ThemeContext/index.d.mts +0 -1
- package/ThemeContext/index.mjs +0 -1
- package/branding/BrandingProvider.d.mts +0 -9
- package/branding/BrandingProvider.mjs +0 -17
- package/branding/brandingTheme.d.mts +0 -147
- package/branding/brandingTheme.mjs +0 -1527
- package/branding/index.d.mts +0 -2
- package/branding/index.mjs +0 -2
- package/i18n/i18n.d.mts +0 -27
- package/i18n/i18n.mjs +0 -111
- package/i18n/index.d.mts +0 -1
- package/i18n/index.mjs +0 -1
- package/nextFonts/index.d.mts +0 -6
- package/nextFonts/index.mjs +0 -59
- package/svgIcons/BundleSizeIcon.d.mts +0 -4
- package/svgIcons/BundleSizeIcon.mjs +0 -13
- package/svgIcons/FigmaIcon.d.mts +0 -4
- package/svgIcons/FigmaIcon.mjs +0 -22
- package/svgIcons/FileDownload.d.mts +0 -6
- package/svgIcons/FileDownload.mjs +0 -13
- package/svgIcons/JavaScript.d.mts +0 -6
- package/svgIcons/JavaScript.mjs +0 -13
- package/svgIcons/MarkdownIcon.d.mts +0 -2
- package/svgIcons/MarkdownIcon.mjs +0 -22
- package/svgIcons/MaterialDesignIcon.d.mts +0 -4
- package/svgIcons/MaterialDesignIcon.mjs +0 -18
- package/svgIcons/SketchIcon.d.mts +0 -4
- package/svgIcons/SketchIcon.mjs +0 -27
- package/svgIcons/TypeScript.d.mts +0 -6
- package/svgIcons/TypeScript.mjs +0 -13
- package/svgIcons/W3CIcon.d.mts +0 -4
- package/svgIcons/W3CIcon.mjs +0 -15
- package/translations/index.d.mts +0 -3
- package/translations/index.mjs +0 -4
- package/useLazyCSS/index.d.mts +0 -1
- package/useLazyCSS/index.mjs +0 -1
- package/useLazyCSS/useLazyCSS.d.mts +0 -11
- package/useLazyCSS/useLazyCSS.mjs +0 -70
- package/utils/loadScript.d.mts +0 -1
- package/utils/loadScript.mjs +0 -7
- /package/{NProgressBar → NextNProgressBar}/NProgressBar.d.ts +0 -0
- /package/{NProgressBar/NProgressBar.mjs → NextNProgressBar/NProgressBar.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./MarkdownElement.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./MarkdownElement.mjs";
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var _nprogress = _interopRequireDefault(require("nprogress"));
|
|
10
|
-
var _NoSsr = require("@mui/base/NoSsr");
|
|
11
|
-
var _exactProp = _interopRequireDefault(require("@mui/utils/exactProp"));
|
|
12
|
-
var _GlobalStyles = _interopRequireDefault(require("@mui/material/GlobalStyles"));
|
|
13
|
-
var _styles = require("@mui/material/styles");
|
|
14
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
_nprogress.default.configure({
|
|
16
|
-
barSelector: '.nprogress-bar',
|
|
17
|
-
template: `
|
|
18
|
-
<div class="nprogress-bar">
|
|
19
|
-
<div></div>
|
|
20
|
-
<div></div>
|
|
21
|
-
</div>
|
|
22
|
-
`
|
|
23
|
-
});
|
|
24
|
-
const muiNProgressPulse = (0, _styles.keyframes)`
|
|
25
|
-
30% {
|
|
26
|
-
opacity: 0.6;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
60% {
|
|
30
|
-
opacity: 0;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
to {
|
|
34
|
-
opacity: 0.6;
|
|
35
|
-
}
|
|
36
|
-
`;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Elegant and ready-to-use wrapper on top of https://github.com/rstacruz/nprogress/.
|
|
40
|
-
* The implementation is highly inspired by the YouTube one.
|
|
41
|
-
*/
|
|
42
|
-
function NProgressBar(props) {
|
|
43
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_NoSsr.NoSsr, {
|
|
44
|
-
children: [props.children, /*#__PURE__*/(0, _jsxRuntime.jsx)(_GlobalStyles.default, {
|
|
45
|
-
styles: theme => ({
|
|
46
|
-
'#nprogress': {
|
|
47
|
-
direction: 'ltr',
|
|
48
|
-
pointerEvents: 'none',
|
|
49
|
-
position: 'fixed',
|
|
50
|
-
top: 0,
|
|
51
|
-
left: 0,
|
|
52
|
-
right: 0,
|
|
53
|
-
height: 2,
|
|
54
|
-
zIndex: (theme.vars || theme).zIndex.tooltip,
|
|
55
|
-
backgroundColor: (theme.vars || theme).palette.primary[200],
|
|
56
|
-
...theme.applyStyles('dark', {
|
|
57
|
-
backgroundColor: (theme.vars || theme).palette.primary[700]
|
|
58
|
-
}),
|
|
59
|
-
'& .nprogress-bar': {
|
|
60
|
-
position: 'fixed',
|
|
61
|
-
backgroundColor: (theme.vars || theme).palette.primary.main,
|
|
62
|
-
top: 0,
|
|
63
|
-
left: 0,
|
|
64
|
-
right: 0,
|
|
65
|
-
height: 2
|
|
66
|
-
},
|
|
67
|
-
'& .nprogress-bar > div': {
|
|
68
|
-
position: 'absolute',
|
|
69
|
-
top: 0,
|
|
70
|
-
height: 2,
|
|
71
|
-
boxShadow: `${(theme.vars || theme).palette.primary.main} 1px 0 6px 1px`,
|
|
72
|
-
borderRadius: '100%',
|
|
73
|
-
animation: `${muiNProgressPulse} 2s ease-out 0s infinite`
|
|
74
|
-
},
|
|
75
|
-
'& .nprogress-bar > div:first-of-type': {
|
|
76
|
-
opacity: 0.6,
|
|
77
|
-
width: 20,
|
|
78
|
-
right: 0,
|
|
79
|
-
clip: 'rect(-6px,22px,14px,10px)'
|
|
80
|
-
},
|
|
81
|
-
'& .nprogress-bar > div:last-of-type': {
|
|
82
|
-
opacity: 0.6,
|
|
83
|
-
width: 180,
|
|
84
|
-
right: -80,
|
|
85
|
-
clip: 'rect(-6px,90px,14px,-6px)'
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
})
|
|
89
|
-
})]
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
process.env.NODE_ENV !== "production" ? NProgressBar.propTypes = {
|
|
93
|
-
children: _propTypes.default.node
|
|
94
|
-
} : void 0;
|
|
95
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
96
|
-
process.env.NODE_ENV !== "production" ? NProgressBar.propTypes = (0, _exactProp.default)(NProgressBar.propTypes) : void 0;
|
|
97
|
-
}
|
|
98
|
-
var _default = exports.default = NProgressBar;
|
package/NProgressBar/index.d.mts
DELETED
package/NProgressBar/index.d.ts
DELETED
package/NProgressBar/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
Object.defineProperty(exports, "default", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () {
|
|
10
|
-
return _NProgressBar.default;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
var _NProgressBar = _interopRequireDefault(require("./NProgressBar"));
|
package/NProgressBar/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./NProgressBar.mjs";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface SectionHeadlineProps {
|
|
3
|
-
alwaysCenter?: boolean;
|
|
4
|
-
description?: React.ReactNode;
|
|
5
|
-
id?: string;
|
|
6
|
-
/**
|
|
7
|
-
* For using with dark background.
|
|
8
|
-
*/
|
|
9
|
-
inverted?: boolean;
|
|
10
|
-
overline?: React.ReactNode;
|
|
11
|
-
title: string | React.ReactElement<React.HTMLAttributes<HTMLElement>>;
|
|
12
|
-
}
|
|
13
|
-
export default function SectionHeadline(props: SectionHeadlineProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import Box from '@mui/material/Box';
|
|
3
|
-
import Typography from '@mui/material/Typography';
|
|
4
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
-
export default function SectionHeadline(props) {
|
|
6
|
-
const {
|
|
7
|
-
alwaysCenter = false,
|
|
8
|
-
description,
|
|
9
|
-
id,
|
|
10
|
-
inverted = false,
|
|
11
|
-
overline,
|
|
12
|
-
title
|
|
13
|
-
} = props;
|
|
14
|
-
return /*#__PURE__*/_jsxs(Box, {
|
|
15
|
-
sx: {
|
|
16
|
-
m: alwaysCenter ? 'auto' : null
|
|
17
|
-
},
|
|
18
|
-
children: [overline && /*#__PURE__*/_jsx(Typography, {
|
|
19
|
-
id: id,
|
|
20
|
-
component: "h2",
|
|
21
|
-
variant: "body2",
|
|
22
|
-
sx: {
|
|
23
|
-
fontWeight: 'bold',
|
|
24
|
-
color: 'primary.main',
|
|
25
|
-
mb: 1,
|
|
26
|
-
...(alwaysCenter && {
|
|
27
|
-
textAlign: 'center'
|
|
28
|
-
})
|
|
29
|
-
},
|
|
30
|
-
children: overline
|
|
31
|
-
}), typeof title === 'string' ? /*#__PURE__*/_jsx(Typography, {
|
|
32
|
-
variant: "h2",
|
|
33
|
-
sx: theme => ({
|
|
34
|
-
maxWidth: 500,
|
|
35
|
-
...(inverted ? {
|
|
36
|
-
color: '#fff'
|
|
37
|
-
} : {
|
|
38
|
-
color: 'primaryDark.900',
|
|
39
|
-
...theme.applyDarkStyles({
|
|
40
|
-
color: 'grey.100'
|
|
41
|
-
})
|
|
42
|
-
}),
|
|
43
|
-
...(alwaysCenter && {
|
|
44
|
-
textAlign: 'center',
|
|
45
|
-
maxWidth: '100%'
|
|
46
|
-
})
|
|
47
|
-
}),
|
|
48
|
-
children: title
|
|
49
|
-
}) : (/*#__PURE__*/React.cloneElement(title, {
|
|
50
|
-
style: {
|
|
51
|
-
maxWidth: 500,
|
|
52
|
-
...(alwaysCenter && {
|
|
53
|
-
maxWidth: '100%',
|
|
54
|
-
textAlign: 'center'
|
|
55
|
-
}),
|
|
56
|
-
...(inverted && {
|
|
57
|
-
color: '#fff'
|
|
58
|
-
})
|
|
59
|
-
}
|
|
60
|
-
})), description && /*#__PURE__*/_jsx(Typography, {
|
|
61
|
-
sx: theme => ({
|
|
62
|
-
mt: 1,
|
|
63
|
-
mb: 3,
|
|
64
|
-
maxWidth: 500,
|
|
65
|
-
...(inverted ? {
|
|
66
|
-
color: 'grey.400'
|
|
67
|
-
} : {
|
|
68
|
-
color: 'grey.800',
|
|
69
|
-
...theme.applyDarkStyles({
|
|
70
|
-
color: 'grey.500'
|
|
71
|
-
})
|
|
72
|
-
}),
|
|
73
|
-
...(alwaysCenter && {
|
|
74
|
-
textAlign: 'center',
|
|
75
|
-
mx: 'auto'
|
|
76
|
-
})
|
|
77
|
-
}),
|
|
78
|
-
children: description
|
|
79
|
-
})]
|
|
80
|
-
});
|
|
81
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
var _span;
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
export function SectionTitle(props) {
|
|
4
|
-
const {
|
|
5
|
-
title,
|
|
6
|
-
hash,
|
|
7
|
-
level: Level = 'h2'
|
|
8
|
-
} = props;
|
|
9
|
-
return /*#__PURE__*/_jsx(Level, {
|
|
10
|
-
id: hash,
|
|
11
|
-
style: {
|
|
12
|
-
flexGrow: 1
|
|
13
|
-
},
|
|
14
|
-
children: /*#__PURE__*/_jsxs("a", {
|
|
15
|
-
"aria-labelledby": hash,
|
|
16
|
-
className: "title-link-to-anchor",
|
|
17
|
-
href: `#${hash}`,
|
|
18
|
-
tabIndex: -1,
|
|
19
|
-
children: [title, _span || (_span = /*#__PURE__*/_jsx("span", {
|
|
20
|
-
className: "anchor-icon",
|
|
21
|
-
children: /*#__PURE__*/_jsx("svg", {
|
|
22
|
-
children: /*#__PURE__*/_jsx("use", {
|
|
23
|
-
xlinkHref: "#anchor-link-icon"
|
|
24
|
-
})
|
|
25
|
-
})
|
|
26
|
-
}))]
|
|
27
|
-
})
|
|
28
|
-
});
|
|
29
|
-
}
|
package/SectionTitle/index.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./SectionTitle.mjs";
|
package/SectionTitle/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./SectionTitle.mjs";
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
export declare const highDensity: {
|
|
4
|
-
components: {
|
|
5
|
-
MuiButton: {
|
|
6
|
-
defaultProps: {
|
|
7
|
-
size: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
MuiFilledInput: {
|
|
11
|
-
defaultProps: {
|
|
12
|
-
margin: string;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
MuiFormControl: {
|
|
16
|
-
defaultProps: {
|
|
17
|
-
margin: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
MuiFormHelperText: {
|
|
21
|
-
defaultProps: {
|
|
22
|
-
margin: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
MuiIconButton: {
|
|
26
|
-
defaultProps: {
|
|
27
|
-
size: string;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
MuiInputBase: {
|
|
31
|
-
defaultProps: {
|
|
32
|
-
margin: string;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
MuiInputLabel: {
|
|
36
|
-
defaultProps: {
|
|
37
|
-
margin: string;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
MuiListItem: {
|
|
41
|
-
defaultProps: {
|
|
42
|
-
dense: boolean;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
MuiOutlinedInput: {
|
|
46
|
-
defaultProps: {
|
|
47
|
-
margin: string;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
MuiFab: {
|
|
51
|
-
defaultProps: {
|
|
52
|
-
size: string;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
MuiTable: {
|
|
56
|
-
defaultProps: {
|
|
57
|
-
size: string;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
MuiTextField: {
|
|
61
|
-
defaultProps: {
|
|
62
|
-
margin: string;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
MuiToolbar: {
|
|
66
|
-
defaultProps: {
|
|
67
|
-
variant: string;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
export declare const DispatchContext: React.Context<React.ActionDispatch<any>>;
|
|
73
|
-
export declare const ThemeOptionsContext: React.Context<{
|
|
74
|
-
dense: boolean;
|
|
75
|
-
direction: "ltr" | "rtl";
|
|
76
|
-
paletteMode: "light" | "dark";
|
|
77
|
-
}>;
|
|
78
|
-
export declare function ThemeProvider(props: React.PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
79
|
-
export declare namespace ThemeProvider {
|
|
80
|
-
var propTypes: {
|
|
81
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* @returns {(nextOptions: Partial<typeof themeInitialOptions>) => void}
|
|
86
|
-
*/
|
|
87
|
-
export declare function useChangeTheme(): (options: any) => void;
|
|
88
|
-
export declare function useColorSchemeShim(): {
|
|
89
|
-
mode: string | null;
|
|
90
|
-
systemMode: string;
|
|
91
|
-
setMode: React.Dispatch<React.SetStateAction<string | null>>;
|
|
92
|
-
};
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { createTheme as createMdTheme } from '@mui/material/styles';
|
|
4
|
-
import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/material/utils';
|
|
5
|
-
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
6
|
-
import useLocalStorageState from '@mui/utils/useLocalStorageState';
|
|
7
|
-
import useLazyCSS from "../useLazyCSS/index.mjs";
|
|
8
|
-
import { getMetaThemeColor } from "../branding/index.mjs";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
const themeInitialOptions = {
|
|
11
|
-
dense: false,
|
|
12
|
-
direction: 'ltr',
|
|
13
|
-
paletteMode: 'light'
|
|
14
|
-
};
|
|
15
|
-
export const highDensity = {
|
|
16
|
-
components: {
|
|
17
|
-
MuiButton: {
|
|
18
|
-
defaultProps: {
|
|
19
|
-
size: 'small'
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
MuiFilledInput: {
|
|
23
|
-
defaultProps: {
|
|
24
|
-
margin: 'dense'
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
MuiFormControl: {
|
|
28
|
-
defaultProps: {
|
|
29
|
-
margin: 'dense'
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
MuiFormHelperText: {
|
|
33
|
-
defaultProps: {
|
|
34
|
-
margin: 'dense'
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
MuiIconButton: {
|
|
38
|
-
defaultProps: {
|
|
39
|
-
size: 'small'
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
MuiInputBase: {
|
|
43
|
-
defaultProps: {
|
|
44
|
-
margin: 'dense'
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
MuiInputLabel: {
|
|
48
|
-
defaultProps: {
|
|
49
|
-
margin: 'dense'
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
MuiListItem: {
|
|
53
|
-
defaultProps: {
|
|
54
|
-
dense: true
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
MuiOutlinedInput: {
|
|
58
|
-
defaultProps: {
|
|
59
|
-
margin: 'dense'
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
MuiFab: {
|
|
63
|
-
defaultProps: {
|
|
64
|
-
size: 'small'
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
MuiTable: {
|
|
68
|
-
defaultProps: {
|
|
69
|
-
size: 'small'
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
MuiTextField: {
|
|
73
|
-
defaultProps: {
|
|
74
|
-
margin: 'dense'
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
MuiToolbar: {
|
|
78
|
-
defaultProps: {
|
|
79
|
-
variant: 'dense'
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
export const DispatchContext = /*#__PURE__*/React.createContext(() => {
|
|
85
|
-
throw new Error('Forgot to wrap component in `ThemeProvider`');
|
|
86
|
-
});
|
|
87
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
88
|
-
DispatchContext.displayName = 'ThemeDispatchContext';
|
|
89
|
-
}
|
|
90
|
-
export const ThemeOptionsContext = /*#__PURE__*/React.createContext(themeInitialOptions);
|
|
91
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
92
|
-
ThemeOptionsContext.displayName = 'ThemeOptionsContext';
|
|
93
|
-
}
|
|
94
|
-
export function ThemeProvider(props) {
|
|
95
|
-
const {
|
|
96
|
-
children
|
|
97
|
-
} = props;
|
|
98
|
-
const [themeOptions, dispatch] = React.useReducer((state, action) => {
|
|
99
|
-
switch (action.type) {
|
|
100
|
-
case 'SET_DENSE':
|
|
101
|
-
return {
|
|
102
|
-
...state,
|
|
103
|
-
dense: action.payload
|
|
104
|
-
};
|
|
105
|
-
case 'RESET_DENSITY':
|
|
106
|
-
return {
|
|
107
|
-
...state,
|
|
108
|
-
dense: themeInitialOptions.dense
|
|
109
|
-
};
|
|
110
|
-
case 'CHANGE':
|
|
111
|
-
// No value changed
|
|
112
|
-
if ((!action.payload.paletteMode || action.payload.paletteMode === state.paletteMode) && (!action.payload.direction || action.payload.direction === state.direction)) {
|
|
113
|
-
return state;
|
|
114
|
-
}
|
|
115
|
-
return {
|
|
116
|
-
...state,
|
|
117
|
-
paletteMode: action.payload.paletteMode || state.paletteMode,
|
|
118
|
-
direction: action.payload.direction || state.direction
|
|
119
|
-
};
|
|
120
|
-
default:
|
|
121
|
-
throw new Error(`Unrecognized type ${action.type}`);
|
|
122
|
-
}
|
|
123
|
-
}, themeInitialOptions);
|
|
124
|
-
const {
|
|
125
|
-
direction,
|
|
126
|
-
paletteMode
|
|
127
|
-
} = themeOptions;
|
|
128
|
-
useLazyCSS('/static/styles/prism-okaidia.css', '#prismjs');
|
|
129
|
-
|
|
130
|
-
// TODO replace with useColorScheme once all pages support css vars
|
|
131
|
-
const {
|
|
132
|
-
mode,
|
|
133
|
-
systemMode
|
|
134
|
-
} = useColorSchemeShim();
|
|
135
|
-
const calculatedMode = mode === 'system' ? systemMode : mode;
|
|
136
|
-
useEnhancedEffect(() => {
|
|
137
|
-
dispatch({
|
|
138
|
-
type: 'CHANGE',
|
|
139
|
-
payload: {
|
|
140
|
-
paletteMode: calculatedMode
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
}, [calculatedMode]);
|
|
144
|
-
useEnhancedEffect(() => {
|
|
145
|
-
document.body.setAttribute('dir', direction);
|
|
146
|
-
}, [direction]);
|
|
147
|
-
useEnhancedEffect(() => {
|
|
148
|
-
// To support light and dark mode images in the docs
|
|
149
|
-
if (paletteMode === 'dark') {
|
|
150
|
-
document.body.classList.remove('mode-light');
|
|
151
|
-
document.body.classList.add('mode-dark');
|
|
152
|
-
} else {
|
|
153
|
-
document.body.classList.remove('mode-dark');
|
|
154
|
-
document.body.classList.add('mode-light');
|
|
155
|
-
}
|
|
156
|
-
const metas = document.querySelectorAll('meta[name="theme-color"]');
|
|
157
|
-
metas.forEach(meta => {
|
|
158
|
-
meta.setAttribute('content', getMetaThemeColor(paletteMode));
|
|
159
|
-
});
|
|
160
|
-
}, [paletteMode]);
|
|
161
|
-
React.useEffect(() => {
|
|
162
|
-
// Expose the theme as a global variable so people can play with it.
|
|
163
|
-
window.createTheme = createMdTheme;
|
|
164
|
-
}, []);
|
|
165
|
-
return /*#__PURE__*/_jsx(ThemeOptionsContext.Provider, {
|
|
166
|
-
value: themeOptions,
|
|
167
|
-
children: /*#__PURE__*/_jsx(DispatchContext.Provider, {
|
|
168
|
-
value: dispatch,
|
|
169
|
-
children: children
|
|
170
|
-
})
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
process.env.NODE_ENV !== "production" ? ThemeProvider.propTypes = {
|
|
174
|
-
children: PropTypes.node
|
|
175
|
-
} : void 0;
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* @returns {(nextOptions: Partial<typeof themeInitialOptions>) => void}
|
|
179
|
-
*/
|
|
180
|
-
export function useChangeTheme() {
|
|
181
|
-
const dispatch = React.useContext(DispatchContext);
|
|
182
|
-
return React.useCallback(options => dispatch({
|
|
183
|
-
type: 'CHANGE',
|
|
184
|
-
payload: options
|
|
185
|
-
}), [dispatch]);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
// TODO: remove once all pages support css vars and replace call sites with useColorScheme()
|
|
189
|
-
export function useColorSchemeShim() {
|
|
190
|
-
const [mode, setMode] = useLocalStorageState('mui-mode', 'system');
|
|
191
|
-
const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)', {
|
|
192
|
-
noSsr: true
|
|
193
|
-
});
|
|
194
|
-
const systemMode = prefersDarkMode ? 'dark' : 'light';
|
|
195
|
-
return {
|
|
196
|
-
mode,
|
|
197
|
-
systemMode,
|
|
198
|
-
setMode
|
|
199
|
-
};
|
|
200
|
-
}
|
package/ThemeContext/index.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ThemeProvider, ThemeOptionsContext, DispatchContext, highDensity, useChangeTheme, useColorSchemeShim } from "./ThemeContext.mjs";
|
package/ThemeContext/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ThemeProvider, ThemeOptionsContext, DispatchContext, highDensity, useChangeTheme, useColorSchemeShim } from "./ThemeContext.mjs";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface BrandingProviderProps {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
/**
|
|
5
|
-
* If not `undefined`, the provider is considered nesting and does not render NextNProgressBar & CssBaseline
|
|
6
|
-
*/
|
|
7
|
-
mode?: 'light' | 'dark';
|
|
8
|
-
}
|
|
9
|
-
export declare function BrandingProvider(props: BrandingProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ThemeProvider, useTheme } from '@mui/material/styles';
|
|
3
|
-
import { brandingDarkTheme, brandingLightTheme } from "./brandingTheme.mjs";
|
|
4
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
export function BrandingProvider(props) {
|
|
6
|
-
const {
|
|
7
|
-
children,
|
|
8
|
-
mode: modeProp
|
|
9
|
-
} = props;
|
|
10
|
-
const upperTheme = useTheme();
|
|
11
|
-
const mode = modeProp || upperTheme.palette.mode;
|
|
12
|
-
const theme = mode === 'dark' ? brandingDarkTheme : brandingLightTheme;
|
|
13
|
-
return /*#__PURE__*/_jsx(ThemeProvider, {
|
|
14
|
-
theme: modeProp ? () => theme : theme,
|
|
15
|
-
children: children
|
|
16
|
-
});
|
|
17
|
-
}
|