@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,30 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
exports.MarkdownElement = void 0;
|
|
9
|
-
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _clsx = _interopRequireDefault(require("clsx"));
|
|
11
|
-
var _styles = require("@mui/material/styles");
|
|
12
|
-
var _useForkRef = _interopRequireDefault(require("@mui/utils/useForkRef"));
|
|
13
|
-
var _branding = require("../branding");
|
|
14
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
const Root = (0, _styles.styled)('div')(({
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { alpha, darken, styled } from '@mui/material/styles';
|
|
4
|
+
import useForkRef from '@mui/utils/useForkRef';
|
|
5
|
+
import { brandingDarkTheme as darkTheme, brandingLightTheme as lightTheme } from "../branding/index.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
const Root = styled('div')(({
|
|
16
8
|
theme
|
|
17
9
|
}) => ({
|
|
18
|
-
...
|
|
10
|
+
...lightTheme.typography.body1,
|
|
19
11
|
lineHeight: 1.625,
|
|
20
12
|
// Rounds up to 26px-increased compared to the 1.5 default to make the docs easier to read.
|
|
21
|
-
color: `var(--muidocs-palette-text-primary, ${
|
|
13
|
+
color: `var(--muidocs-palette-text-primary, ${lightTheme.palette.text.primary})`,
|
|
22
14
|
'& :focus-visible': {
|
|
23
|
-
outline: `3px solid ${
|
|
15
|
+
outline: `3px solid ${alpha(lightTheme.palette.primary[500], 0.5)}`,
|
|
24
16
|
outlineOffset: 2
|
|
25
17
|
},
|
|
26
18
|
'& strong': {
|
|
27
|
-
color: `var(--muidocs-palette-text-primary, ${
|
|
19
|
+
color: `var(--muidocs-palette-text-primary, ${lightTheme.palette.text.primary})`
|
|
28
20
|
},
|
|
29
21
|
wordBreak: 'break-word',
|
|
30
22
|
'& pre': {
|
|
@@ -36,17 +28,17 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
36
28
|
// a special, one-off, color tailored for the code blocks using MUI's branding theme blue palette as the starting point. It has a less saturaded color but still maintaining a bit of the blue tint.
|
|
37
29
|
color: 'hsl(60, 30%, 96%)',
|
|
38
30
|
colorScheme: 'dark',
|
|
39
|
-
borderRadius: `var(--muidocs-shape-borderRadius, ${theme.shape?.borderRadius ??
|
|
31
|
+
borderRadius: `var(--muidocs-shape-borderRadius, ${theme.shape?.borderRadius ?? lightTheme.shape.borderRadius}px)`,
|
|
40
32
|
border: '1px solid',
|
|
41
|
-
borderColor: `var(--muidocs-palette-primaryDark-700, ${
|
|
33
|
+
borderColor: `var(--muidocs-palette-primaryDark-700, ${lightTheme.palette.primaryDark[700]})`,
|
|
42
34
|
overflow: 'auto',
|
|
43
35
|
WebkitOverflowScrolling: 'touch',
|
|
44
|
-
fontSize:
|
|
36
|
+
fontSize: lightTheme.typography.pxToRem(13),
|
|
45
37
|
maxHeight: '400px'
|
|
46
38
|
},
|
|
47
39
|
'& code': {
|
|
48
|
-
...
|
|
49
|
-
fontFamily:
|
|
40
|
+
...lightTheme.typography.body2,
|
|
41
|
+
fontFamily: lightTheme.typography.fontFamilyCode,
|
|
50
42
|
fontWeight: 400,
|
|
51
43
|
WebkitFontSmoothing: 'subpixel-antialiased'
|
|
52
44
|
},
|
|
@@ -58,26 +50,26 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
58
50
|
// inline code block
|
|
59
51
|
'& :not(pre) > code': {
|
|
60
52
|
padding: '2px 4px',
|
|
61
|
-
color: `var(--muidocs-palette-text-primary, ${
|
|
62
|
-
backgroundColor: `var(--muidocs-palette-grey-50, ${
|
|
53
|
+
color: `var(--muidocs-palette-text-primary, ${lightTheme.palette.text.primary})`,
|
|
54
|
+
backgroundColor: `var(--muidocs-palette-grey-50, ${lightTheme.palette.grey[50]})`,
|
|
63
55
|
border: '1px solid',
|
|
64
|
-
borderColor: `var(--muidocs-palette-grey-200, ${
|
|
56
|
+
borderColor: `var(--muidocs-palette-grey-200, ${lightTheme.palette.grey[200]})`,
|
|
65
57
|
borderRadius: 6,
|
|
66
|
-
fontSize:
|
|
58
|
+
fontSize: lightTheme.typography.pxToRem(13),
|
|
67
59
|
direction: 'ltr /*! @noflip */',
|
|
68
60
|
boxDecorationBreak: 'clone'
|
|
69
61
|
},
|
|
70
62
|
'& h1': {
|
|
71
|
-
...
|
|
72
|
-
fontSize:
|
|
73
|
-
fontFamily: `"General Sans", ${
|
|
63
|
+
...lightTheme.typography.h3,
|
|
64
|
+
fontSize: lightTheme.typography.pxToRem(36),
|
|
65
|
+
fontFamily: `"General Sans", ${lightTheme.typography.fontFamilySystem}`,
|
|
74
66
|
margin: '10px 0',
|
|
75
|
-
color: `var(--muidocs-palette-primaryDark-900, ${
|
|
67
|
+
color: `var(--muidocs-palette-primaryDark-900, ${lightTheme.palette.primaryDark[900]})`,
|
|
76
68
|
fontWeight: 600,
|
|
77
69
|
letterSpacing: -0.2
|
|
78
70
|
},
|
|
79
71
|
'& .description': {
|
|
80
|
-
...
|
|
72
|
+
...lightTheme.typography.subtitle1,
|
|
81
73
|
fontWeight: 400,
|
|
82
74
|
margin: '0 0 24px'
|
|
83
75
|
},
|
|
@@ -85,39 +77,39 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
85
77
|
margin: '0 0 40px'
|
|
86
78
|
},
|
|
87
79
|
'& h2': {
|
|
88
|
-
...
|
|
89
|
-
fontFamily: `"General Sans", ${
|
|
80
|
+
...lightTheme.typography.h5,
|
|
81
|
+
fontFamily: `"General Sans", ${lightTheme.typography.fontFamilySystem}`,
|
|
90
82
|
fontSize: theme.typography.pxToRem(26),
|
|
91
|
-
fontWeight:
|
|
92
|
-
color: `var(--muidocs-palette-grey-900, ${
|
|
83
|
+
fontWeight: lightTheme.typography.fontWeightSemiBold,
|
|
84
|
+
color: `var(--muidocs-palette-grey-900, ${lightTheme.palette.grey[900]})`,
|
|
93
85
|
margin: '40px 0 4px'
|
|
94
86
|
},
|
|
95
87
|
'& h3': {
|
|
96
|
-
...
|
|
97
|
-
fontFamily: `"General Sans", ${
|
|
88
|
+
...lightTheme.typography.h6,
|
|
89
|
+
fontFamily: `"General Sans", ${lightTheme.typography.fontFamilySystem}`,
|
|
98
90
|
fontSize: theme.typography.pxToRem(20),
|
|
99
|
-
fontWeight:
|
|
100
|
-
color: `var(--muidocs-palette-grey-900, ${
|
|
91
|
+
fontWeight: lightTheme.typography.fontWeightSemiBold,
|
|
92
|
+
color: `var(--muidocs-palette-grey-900, ${lightTheme.palette.grey[900]})`,
|
|
101
93
|
margin: '24px 0 4px'
|
|
102
94
|
},
|
|
103
95
|
'& h4': {
|
|
104
|
-
...
|
|
105
|
-
fontFamily: `"General Sans", ${
|
|
106
|
-
fontWeight:
|
|
107
|
-
color: `var(--muidocs-palette-grey-900, ${
|
|
96
|
+
...lightTheme.typography.subtitle1,
|
|
97
|
+
fontFamily: `"General Sans", ${lightTheme.typography.fontFamilySystem}`,
|
|
98
|
+
fontWeight: lightTheme.typography.fontWeightSemiBold,
|
|
99
|
+
color: `var(--muidocs-palette-grey-900, ${lightTheme.palette.grey[900]})`,
|
|
108
100
|
margin: '20px 0 6px'
|
|
109
101
|
},
|
|
110
102
|
'& h5': {
|
|
111
|
-
...
|
|
112
|
-
fontFamily: `"General Sans", ${
|
|
113
|
-
fontWeight:
|
|
114
|
-
color: `var(--muidocs-palette-grey-900, ${
|
|
103
|
+
...lightTheme.typography.subtitle2,
|
|
104
|
+
fontFamily: `"General Sans", ${lightTheme.typography.fontFamilySystem}`,
|
|
105
|
+
fontWeight: lightTheme.typography.fontWeightSemiBold,
|
|
106
|
+
color: `var(--muidocs-palette-grey-900, ${lightTheme.palette.grey[900]})`,
|
|
115
107
|
margin: '20px 0 8px'
|
|
116
108
|
},
|
|
117
109
|
'& p': {
|
|
118
110
|
marginTop: 0,
|
|
119
111
|
marginBottom: 16,
|
|
120
|
-
color: `var(--muidocs-palette-grey-900, ${
|
|
112
|
+
color: `var(--muidocs-palette-grey-900, ${lightTheme.palette.grey[900]})`
|
|
121
113
|
},
|
|
122
114
|
'& ul, & ol': {
|
|
123
115
|
paddingLeft: 30,
|
|
@@ -154,16 +146,16 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
154
146
|
},
|
|
155
147
|
'& a': {
|
|
156
148
|
// Style taken from the Link component
|
|
157
|
-
color: `var(--muidocs-palette-primary-600, ${
|
|
149
|
+
color: `var(--muidocs-palette-primary-600, ${lightTheme.palette.primary[600]})`,
|
|
158
150
|
fontWeight: theme.typography.fontWeightMedium,
|
|
159
151
|
textDecoration: 'underline',
|
|
160
|
-
textDecorationColor:
|
|
152
|
+
textDecorationColor: alpha(lightTheme.palette.primary.main, 0.4),
|
|
161
153
|
'&:hover': {
|
|
162
154
|
textDecorationColor: 'inherit'
|
|
163
155
|
}
|
|
164
156
|
},
|
|
165
157
|
'& a code': {
|
|
166
|
-
color:
|
|
158
|
+
color: darken(lightTheme.palette.primary.main, 0.2)
|
|
167
159
|
},
|
|
168
160
|
'& h1, & h2, & h3, & h4': {
|
|
169
161
|
display: 'flex',
|
|
@@ -199,7 +191,7 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
199
191
|
marginLeft: 8,
|
|
200
192
|
height: 26,
|
|
201
193
|
width: 26,
|
|
202
|
-
color: `var(--muidocs-palette-grey-600, ${
|
|
194
|
+
color: `var(--muidocs-palette-grey-600, ${lightTheme.palette.grey[600]})`,
|
|
203
195
|
backgroundColor: 'transparent',
|
|
204
196
|
border: '1px solid transparent',
|
|
205
197
|
borderRadius: 8,
|
|
@@ -207,9 +199,9 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
207
199
|
duration: theme.transitions.duration.shortest
|
|
208
200
|
}),
|
|
209
201
|
'&:hover': {
|
|
210
|
-
backgroundColor:
|
|
211
|
-
borderColor: `var(--muidocs-palette-primary-100, ${
|
|
212
|
-
color: `var(--muidocs-palette-primary-main, ${
|
|
202
|
+
backgroundColor: alpha(lightTheme.palette.primary[100], 0.4),
|
|
203
|
+
borderColor: `var(--muidocs-palette-primary-100, ${lightTheme.palette.primary[100]})`,
|
|
204
|
+
color: `var(--muidocs-palette-primary-main, ${lightTheme.palette.primary.main})`
|
|
213
205
|
},
|
|
214
206
|
'& svg': {
|
|
215
207
|
height: 14,
|
|
@@ -236,17 +228,17 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
236
228
|
}
|
|
237
229
|
},
|
|
238
230
|
'& h1 code, & h2 code, & h3 code': {
|
|
239
|
-
color: `var(--muidocs-palette-grey-900, ${
|
|
231
|
+
color: `var(--muidocs-palette-grey-900, ${lightTheme.palette.grey[900]})`
|
|
240
232
|
},
|
|
241
233
|
'& h1 code': {
|
|
242
|
-
fontWeight:
|
|
234
|
+
fontWeight: lightTheme.typography.fontWeightSemiBold
|
|
243
235
|
},
|
|
244
236
|
'& h2 code': {
|
|
245
|
-
fontSize:
|
|
246
|
-
fontWeight:
|
|
237
|
+
fontSize: lightTheme.typography.pxToRem(24),
|
|
238
|
+
fontWeight: lightTheme.typography.fontWeightSemiBold
|
|
247
239
|
},
|
|
248
240
|
'& h3 code': {
|
|
249
|
-
fontSize:
|
|
241
|
+
fontSize: lightTheme.typography.pxToRem(18)
|
|
250
242
|
},
|
|
251
243
|
'& table': {
|
|
252
244
|
// Trade display table for scroll overflow
|
|
@@ -259,9 +251,9 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
259
251
|
borderSpacing: 0,
|
|
260
252
|
'& .prop-name, & .prop-type, & .prop-default, & .slot-name, & .slot-defaultClass, & .slot-default': {
|
|
261
253
|
fontWeight: 400,
|
|
262
|
-
fontFamily:
|
|
254
|
+
fontFamily: lightTheme.typography.fontFamilyCode,
|
|
263
255
|
WebkitFontSmoothing: 'subpixel-antialiased',
|
|
264
|
-
fontSize:
|
|
256
|
+
fontSize: lightTheme.typography.pxToRem(13)
|
|
265
257
|
},
|
|
266
258
|
'& .required': {
|
|
267
259
|
color: '#006500'
|
|
@@ -273,16 +265,16 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
273
265
|
color: '#932981'
|
|
274
266
|
},
|
|
275
267
|
'& .prop-default, & .slot-default': {
|
|
276
|
-
borderBottom: `1px dotted var(--muidocs-palette-divider, ${
|
|
268
|
+
borderBottom: `1px dotted var(--muidocs-palette-divider, ${lightTheme.palette.divider})`
|
|
277
269
|
}
|
|
278
270
|
},
|
|
279
271
|
'& td': {
|
|
280
272
|
...theme.typography.body2,
|
|
281
|
-
borderBottom: `1px solid var(--muidocs-palette-divider, ${
|
|
273
|
+
borderBottom: `1px solid var(--muidocs-palette-divider, ${lightTheme.palette.divider})`,
|
|
282
274
|
paddingRight: 20,
|
|
283
275
|
paddingTop: 16,
|
|
284
276
|
paddingBottom: 16,
|
|
285
|
-
color: `var(--muidocs-palette-text-secondary, ${
|
|
277
|
+
color: `var(--muidocs-palette-text-secondary, ${lightTheme.palette.text.secondary})`
|
|
286
278
|
},
|
|
287
279
|
'& td code': {
|
|
288
280
|
lineHeight: 1.6
|
|
@@ -291,9 +283,9 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
291
283
|
fontSize: theme.typography.pxToRem(14),
|
|
292
284
|
lineHeight: theme.typography.pxToRem(24),
|
|
293
285
|
fontWeight: 500,
|
|
294
|
-
color: `var(--muidocs-palette-text-primary, ${
|
|
286
|
+
color: `var(--muidocs-palette-text-primary, ${lightTheme.palette.text.primary})`,
|
|
295
287
|
whiteSpace: 'pre',
|
|
296
|
-
borderBottom: `1px solid var(--muidocs-palette-divider, ${
|
|
288
|
+
borderBottom: `1px solid var(--muidocs-palette-divider, ${lightTheme.palette.divider})`,
|
|
297
289
|
paddingRight: 20,
|
|
298
290
|
paddingTop: 12,
|
|
299
291
|
paddingBottom: 12
|
|
@@ -303,11 +295,11 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
303
295
|
padding: '0 16px',
|
|
304
296
|
margin: 0,
|
|
305
297
|
borderLeft: '1.5px solid',
|
|
306
|
-
borderColor: `var(--muidocs-palette-grey-200, ${
|
|
298
|
+
borderColor: `var(--muidocs-palette-grey-200, ${lightTheme.palette.grey[200]})`,
|
|
307
299
|
'& p': {
|
|
308
300
|
fontSize: theme.typography.pxToRem(12.5),
|
|
309
|
-
fontFamily:
|
|
310
|
-
fontWeight:
|
|
301
|
+
fontFamily: lightTheme.typography.fontFamilyCode,
|
|
302
|
+
fontWeight: lightTheme.typography.fontWeightMedium,
|
|
311
303
|
lineHeight: theme.typography.pxToRem(24),
|
|
312
304
|
textIndent: 20
|
|
313
305
|
},
|
|
@@ -315,7 +307,7 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
315
307
|
position: 'absolute',
|
|
316
308
|
// eslint-disable-next-line mui/straight-quotes
|
|
317
309
|
content: '"“"',
|
|
318
|
-
color: `var(--muidocs-palette-grey-300, ${
|
|
310
|
+
color: `var(--muidocs-palette-grey-300, ${lightTheme.palette.grey[300]})`,
|
|
319
311
|
fontSize: '2.5rem',
|
|
320
312
|
top: 8,
|
|
321
313
|
marginLeft: -6,
|
|
@@ -328,9 +320,9 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
328
320
|
padding: '12px',
|
|
329
321
|
margin: '16px 0',
|
|
330
322
|
border: '1px solid',
|
|
331
|
-
color: `var(--muidocs-palette-text-secondary, ${
|
|
332
|
-
borderColor: `var(--muidocs-palette-grey-100, ${
|
|
333
|
-
borderRadius: `var(--muidocs-shape-borderRadius, ${theme.shape?.borderRadius ??
|
|
323
|
+
color: `var(--muidocs-palette-text-secondary, ${lightTheme.palette.text.secondary})`,
|
|
324
|
+
borderColor: `var(--muidocs-palette-grey-100, ${lightTheme.palette.grey[100]})`,
|
|
325
|
+
borderRadius: `var(--muidocs-shape-borderRadius, ${theme.shape?.borderRadius ?? lightTheme.shape.borderRadius}px)`,
|
|
334
326
|
'& .MuiCallout-content': {
|
|
335
327
|
minWidth: 0,
|
|
336
328
|
// Allows content to shrink. Useful when callout contains code block
|
|
@@ -338,8 +330,8 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
338
330
|
},
|
|
339
331
|
'& code': {
|
|
340
332
|
height: 'fit-content',
|
|
341
|
-
backgroundColor: `var(--muidocs-palette-grey-100, ${
|
|
342
|
-
borderColor: `var(--muidocs-palette-grey-300, ${
|
|
333
|
+
backgroundColor: `var(--muidocs-palette-grey-100, ${lightTheme.palette.grey[100]})`,
|
|
334
|
+
borderColor: `var(--muidocs-palette-grey-300, ${lightTheme.palette.grey[300]})`
|
|
343
335
|
},
|
|
344
336
|
'& p': {
|
|
345
337
|
marginBottom: '8px',
|
|
@@ -356,7 +348,7 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
356
348
|
'& pre': {
|
|
357
349
|
margin: '4px 0 0 0',
|
|
358
350
|
borderRadius: '12px 12px 6px 12px',
|
|
359
|
-
borderColor:
|
|
351
|
+
borderColor: alpha(lightTheme.palette.primaryDark[600], 0.6),
|
|
360
352
|
'& code': {
|
|
361
353
|
backgroundColor: 'transparent'
|
|
362
354
|
}
|
|
@@ -384,65 +376,65 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
384
376
|
color: 'inherit'
|
|
385
377
|
},
|
|
386
378
|
'&.MuiCallout-error': {
|
|
387
|
-
color: `var(--muidocs-palette-error-900, ${
|
|
388
|
-
backgroundColor: `var(--muidocs-palette-error-50, ${
|
|
389
|
-
borderColor: `var(--muidocs-palette-error-100, ${
|
|
379
|
+
color: `var(--muidocs-palette-error-900, ${lightTheme.palette.error[900]})`,
|
|
380
|
+
backgroundColor: `var(--muidocs-palette-error-50, ${lightTheme.palette.error[50]})`,
|
|
381
|
+
borderColor: `var(--muidocs-palette-error-100, ${lightTheme.palette.error[100]})`,
|
|
390
382
|
'& strong': {
|
|
391
|
-
color: `var(--muidocs-palette-error-800, ${
|
|
383
|
+
color: `var(--muidocs-palette-error-800, ${lightTheme.palette.error[800]})`
|
|
392
384
|
},
|
|
393
385
|
'& svg': {
|
|
394
|
-
fill: `var(--muidocs-palette-error-500, ${
|
|
386
|
+
fill: `var(--muidocs-palette-error-500, ${lightTheme.palette.error[600]})`
|
|
395
387
|
},
|
|
396
388
|
'& a': {
|
|
397
|
-
color: `var(--muidocs-palette-error-800, ${
|
|
398
|
-
textDecorationColor:
|
|
389
|
+
color: `var(--muidocs-palette-error-800, ${lightTheme.palette.error[800]})`,
|
|
390
|
+
textDecorationColor: alpha(lightTheme.palette.error.main, 0.4),
|
|
399
391
|
'&:hover': {
|
|
400
392
|
textDecorationColor: 'inherit'
|
|
401
393
|
}
|
|
402
394
|
}
|
|
403
395
|
},
|
|
404
396
|
'&.MuiCallout-info': {
|
|
405
|
-
color: `var(--muidocs-palette-grey-900, ${
|
|
406
|
-
backgroundColor: `var(--muidocs-palette-grey-50, ${
|
|
407
|
-
borderColor: `var(--muidocs-palette-grey-100, ${
|
|
397
|
+
color: `var(--muidocs-palette-grey-900, ${lightTheme.palette.grey[900]})`,
|
|
398
|
+
backgroundColor: `var(--muidocs-palette-grey-50, ${lightTheme.palette.grey[50]})`,
|
|
399
|
+
borderColor: `var(--muidocs-palette-grey-100, ${lightTheme.palette.grey[100]})`,
|
|
408
400
|
'& strong': {
|
|
409
|
-
color: `var(--muidocs-palette-primary-800, ${
|
|
401
|
+
color: `var(--muidocs-palette-primary-800, ${lightTheme.palette.primary[800]})`
|
|
410
402
|
},
|
|
411
403
|
'& svg': {
|
|
412
|
-
fill: `var(--muidocs-palette-grey-600, ${
|
|
404
|
+
fill: `var(--muidocs-palette-grey-600, ${lightTheme.palette.grey[600]})`
|
|
413
405
|
}
|
|
414
406
|
},
|
|
415
407
|
'&.MuiCallout-success': {
|
|
416
|
-
color: `var(--muidocs-palette-success-900, ${
|
|
417
|
-
backgroundColor: `var(--muidocs-palette-success-50, ${
|
|
418
|
-
borderColor: `var(--muidocs-palette-success-100, ${
|
|
408
|
+
color: `var(--muidocs-palette-success-900, ${lightTheme.palette.success[900]})`,
|
|
409
|
+
backgroundColor: `var(--muidocs-palette-success-50, ${lightTheme.palette.success[50]})`,
|
|
410
|
+
borderColor: `var(--muidocs-palette-success-100, ${lightTheme.palette.success[100]})`,
|
|
419
411
|
'& strong': {
|
|
420
|
-
color: `var(--muidocs-palette-success-900, ${
|
|
412
|
+
color: `var(--muidocs-palette-success-900, ${lightTheme.palette.success[900]})`
|
|
421
413
|
},
|
|
422
414
|
'& svg': {
|
|
423
|
-
fill: `var(--muidocs-palette-success-600, ${
|
|
415
|
+
fill: `var(--muidocs-palette-success-600, ${lightTheme.palette.success[600]})`
|
|
424
416
|
},
|
|
425
417
|
'& a': {
|
|
426
|
-
color: `var(--muidocs-palette-success-900, ${
|
|
427
|
-
textDecorationColor:
|
|
418
|
+
color: `var(--muidocs-palette-success-900, ${lightTheme.palette.success[900]})`,
|
|
419
|
+
textDecorationColor: alpha(lightTheme.palette.success.main, 0.4),
|
|
428
420
|
'&:hover': {
|
|
429
421
|
textDecorationColor: 'inherit'
|
|
430
422
|
}
|
|
431
423
|
}
|
|
432
424
|
},
|
|
433
425
|
'&.MuiCallout-warning': {
|
|
434
|
-
color: `var(--muidocs-palette-grey-900, ${
|
|
435
|
-
backgroundColor:
|
|
436
|
-
borderColor:
|
|
426
|
+
color: `var(--muidocs-palette-grey-900, ${lightTheme.palette.grey[900]})`,
|
|
427
|
+
backgroundColor: alpha(lightTheme.palette.warning[50], 0.5),
|
|
428
|
+
borderColor: alpha(lightTheme.palette.warning[700], 0.15),
|
|
437
429
|
'& strong': {
|
|
438
|
-
color: `var(--muidocs-palette-warning-800, ${
|
|
430
|
+
color: `var(--muidocs-palette-warning-800, ${lightTheme.palette.warning[800]})`
|
|
439
431
|
},
|
|
440
432
|
'& svg': {
|
|
441
|
-
fill: `var(--muidocs-palette-warning-600, ${
|
|
433
|
+
fill: `var(--muidocs-palette-warning-600, ${lightTheme.palette.warning[600]})`
|
|
442
434
|
},
|
|
443
435
|
'& a': {
|
|
444
|
-
color: `var(--muidocs-palette-warning-800, ${
|
|
445
|
-
textDecorationColor:
|
|
436
|
+
color: `var(--muidocs-palette-warning-800, ${lightTheme.palette.warning[800]})`,
|
|
437
|
+
textDecorationColor: alpha(lightTheme.palette.warning.main, 0.4),
|
|
446
438
|
'&:hover': {
|
|
447
439
|
textDecorationColor: 'inherit'
|
|
448
440
|
}
|
|
@@ -467,30 +459,30 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
467
459
|
margin: theme.spacing(5, 0),
|
|
468
460
|
border: 0,
|
|
469
461
|
flexShrink: 0,
|
|
470
|
-
backgroundColor: `var(--muidocs-palette-divider, ${
|
|
462
|
+
backgroundColor: `var(--muidocs-palette-divider, ${lightTheme.palette.divider})`
|
|
471
463
|
},
|
|
472
464
|
'& kbd.key': {
|
|
473
465
|
padding: 6,
|
|
474
466
|
display: 'inline-block',
|
|
475
467
|
whiteSpace: 'nowrap',
|
|
476
468
|
margin: '0 1px',
|
|
477
|
-
fontFamily:
|
|
478
|
-
fontSize:
|
|
479
|
-
color: `var(--muidocs-palette-text-primary, ${
|
|
469
|
+
fontFamily: lightTheme.typography.fontFamilyCode,
|
|
470
|
+
fontSize: lightTheme.typography.pxToRem(11),
|
|
471
|
+
color: `var(--muidocs-palette-text-primary, ${lightTheme.palette.text.primary})`,
|
|
480
472
|
lineHeight: '10px',
|
|
481
473
|
verticalAlign: 'middle',
|
|
482
474
|
borderRadius: 6,
|
|
483
|
-
border: `1px solid var(--muidocs-palette-grey-300, ${
|
|
484
|
-
backgroundColor: `var(--muidocs-palette-grey-50, ${
|
|
485
|
-
boxShadow: `inset 0 -2px 0 var(--muidocs-palette-grey-200, ${
|
|
475
|
+
border: `1px solid var(--muidocs-palette-grey-300, ${lightTheme.palette.grey[300]})`,
|
|
476
|
+
backgroundColor: `var(--muidocs-palette-grey-50, ${lightTheme.palette.grey[50]})`,
|
|
477
|
+
boxShadow: `inset 0 -2px 0 var(--muidocs-palette-grey-200, ${lightTheme.palette.grey[200]})`
|
|
486
478
|
},
|
|
487
479
|
'& details': {
|
|
488
480
|
width: '100%',
|
|
489
481
|
padding: theme.spacing(1),
|
|
490
482
|
marginBottom: theme.spacing(1.5),
|
|
491
483
|
border: '1px solid',
|
|
492
|
-
borderColor: `var(--muidocs-palette-divider, ${
|
|
493
|
-
borderRadius: `var(--muidocs-shape-borderRadius, ${theme.shape?.borderRadius ??
|
|
484
|
+
borderColor: `var(--muidocs-palette-divider, ${lightTheme.palette.divider})`,
|
|
485
|
+
borderRadius: `var(--muidocs-shape-borderRadius, ${theme.shape?.borderRadius ?? lightTheme.shape.borderRadius}px)`,
|
|
494
486
|
'& pre': {
|
|
495
487
|
marginTop: theme.spacing(1)
|
|
496
488
|
}
|
|
@@ -516,7 +508,7 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
516
508
|
backgroundColor: 'currentColor'
|
|
517
509
|
},
|
|
518
510
|
'&:hover': {
|
|
519
|
-
backgroundColor: `var(--muidocs-palette-grey-100, ${
|
|
511
|
+
backgroundColor: `var(--muidocs-palette-grey-100, ${lightTheme.palette.grey[50]})`
|
|
520
512
|
}
|
|
521
513
|
},
|
|
522
514
|
'& details[open] > summary::after': {
|
|
@@ -530,7 +522,7 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
530
522
|
fontSize: 10,
|
|
531
523
|
'&:has(.MuiCode-title)': {
|
|
532
524
|
margin: theme.spacing(2, 'auto'),
|
|
533
|
-
border: `1px solid var(--muidocs-palette-primaryDark-700, ${
|
|
525
|
+
border: `1px solid var(--muidocs-palette-primaryDark-700, ${lightTheme.palette.primaryDark[700]})`,
|
|
534
526
|
borderRadius: theme.shape.borderRadius,
|
|
535
527
|
overflow: 'clip',
|
|
536
528
|
'& .MuiCode-copy': {
|
|
@@ -555,14 +547,14 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
555
547
|
padding: theme.spacing(0.5),
|
|
556
548
|
paddingBottom: '5px',
|
|
557
549
|
// optical alignment
|
|
558
|
-
fontFamily:
|
|
559
|
-
fontWeight:
|
|
560
|
-
fontSize:
|
|
550
|
+
fontFamily: lightTheme.typography.fontFamily,
|
|
551
|
+
fontWeight: lightTheme.typography.fontWeightMedium,
|
|
552
|
+
fontSize: lightTheme.typography.pxToRem(12),
|
|
561
553
|
borderRadius: 6,
|
|
562
554
|
border: '1px solid',
|
|
563
|
-
borderColor:
|
|
564
|
-
backgroundColor:
|
|
565
|
-
color: `var(--muidocs-palette-grey-300, ${
|
|
555
|
+
borderColor: alpha(lightTheme.palette.primaryDark[600], 0.5),
|
|
556
|
+
backgroundColor: alpha(lightTheme.palette.primaryDark[800], 0.5),
|
|
557
|
+
color: `var(--muidocs-palette-grey-300, ${lightTheme.palette.grey[300]})`,
|
|
566
558
|
transition: theme.transitions.create(['background', 'borderColor', 'display'], {
|
|
567
559
|
duration: theme.transitions.duration.shortest
|
|
568
560
|
}),
|
|
@@ -573,8 +565,8 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
573
565
|
display: 'none'
|
|
574
566
|
},
|
|
575
567
|
'&:hover, &:focus': {
|
|
576
|
-
borderColor: `var(--muidocs-palette-primaryDark-400, ${
|
|
577
|
-
backgroundColor: `var(--muidocs-palette-primaryDark-700, ${
|
|
568
|
+
borderColor: `var(--muidocs-palette-primaryDark-400, ${lightTheme.palette.primaryDark[400]})`,
|
|
569
|
+
backgroundColor: `var(--muidocs-palette-primaryDark-700, ${lightTheme.palette.primaryDark[700]})`,
|
|
578
570
|
color: '#FFF',
|
|
579
571
|
'& .MuiCode-copyKeypress': {
|
|
580
572
|
display: 'block',
|
|
@@ -591,8 +583,8 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
591
583
|
right: 34
|
|
592
584
|
},
|
|
593
585
|
'&[data-copied]': {
|
|
594
|
-
borderColor: `var(--muidocs-palette-primaryDark-400, ${
|
|
595
|
-
backgroundColor: `var(--muidocs-palette-primaryDark-700, ${
|
|
586
|
+
borderColor: `var(--muidocs-palette-primaryDark-400, ${lightTheme.palette.primaryDark[400]})`,
|
|
587
|
+
backgroundColor: `var(--muidocs-palette-primaryDark-700, ${lightTheme.palette.primaryDark[700]})`,
|
|
596
588
|
color: '#fff',
|
|
597
589
|
'& .MuiCode-copyKeypress': {
|
|
598
590
|
opacity: 0
|
|
@@ -644,12 +636,12 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
644
636
|
display: 'flex',
|
|
645
637
|
alignItems: 'center',
|
|
646
638
|
gap: theme.spacing(1.5),
|
|
647
|
-
borderBottom: `1px solid var(--muidocs-palette-primaryDark-700, ${
|
|
648
|
-
backgroundColor: `var(--muidocs-palette-primaryDark-900, ${
|
|
639
|
+
borderBottom: `1px solid var(--muidocs-palette-primaryDark-700, ${lightTheme.palette.primaryDark[700]})`,
|
|
640
|
+
backgroundColor: `var(--muidocs-palette-primaryDark-900, ${lightTheme.palette.primaryDark[900]})`,
|
|
649
641
|
fontFamily: theme.typography.fontFamilyCode,
|
|
650
642
|
fontSize: theme.typography.pxToRem(12),
|
|
651
643
|
fontWeight: theme.typography.fontWeightBold,
|
|
652
|
-
color: `var(--muidocs-palette-grey-200, ${
|
|
644
|
+
color: `var(--muidocs-palette-grey-200, ${lightTheme.palette.grey[200]})`,
|
|
653
645
|
'::before': {
|
|
654
646
|
content: `url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.3333 3.99996H8L7.06 3.05996C6.80667 2.80663 6.46667 2.66663 6.11334 2.66663H2.66667C1.93334 2.66663 1.34 3.26663 1.34 3.99996L1.33334 12C1.33334 12.7333 1.93334 13.3333 2.66667 13.3333H13.3333C14.0667 13.3333 14.6667 12.7333 14.6667 12V5.33329C14.6667 4.59996 14.0667 3.99996 13.3333 3.99996ZM12.6667 12H3.33334C2.96667 12 2.66667 11.7 2.66667 11.3333V5.99996C2.66667 5.63329 2.96667 5.33329 3.33334 5.33329H12.6667C13.0333 5.33329 13.3333 5.63329 13.3333 5.99996V11.3333C13.3333 11.7 13.0333 12 12.6667 12Z' fill='%2399CCF3'/%3E%3C/svg%3E%0A");`,
|
|
655
647
|
width: '16px',
|
|
@@ -668,38 +660,38 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
668
660
|
color: 'rgb(255, 255, 255)',
|
|
669
661
|
'& :not(pre) > code': {
|
|
670
662
|
// inline code block
|
|
671
|
-
color: `var(--muidocs-palette-text-primary, ${
|
|
672
|
-
borderColor:
|
|
673
|
-
backgroundColor: `var(--muidocs-palette-grey-900, ${
|
|
663
|
+
color: `var(--muidocs-palette-text-primary, ${darkTheme.palette.text.primary})`,
|
|
664
|
+
borderColor: alpha(darkTheme.palette.primaryDark[600], 0.6),
|
|
665
|
+
backgroundColor: `var(--muidocs-palette-grey-900, ${darkTheme.palette.grey[900]})`
|
|
674
666
|
},
|
|
675
667
|
'& strong': {
|
|
676
|
-
color: `var(--muidocs-palette-grey-200, ${
|
|
668
|
+
color: `var(--muidocs-palette-grey-200, ${darkTheme.palette.grey[200]})`
|
|
677
669
|
},
|
|
678
670
|
'& hr': {
|
|
679
|
-
backgroundColor: `var(--muidocs-palette-divider, ${
|
|
671
|
+
backgroundColor: `var(--muidocs-palette-divider, ${darkTheme.palette.divider})`
|
|
680
672
|
},
|
|
681
673
|
'& a': {
|
|
682
|
-
color: `var(--muidocs-palette-primary-300, ${
|
|
674
|
+
color: `var(--muidocs-palette-primary-300, ${darkTheme.palette.primary[300]})`
|
|
683
675
|
},
|
|
684
676
|
'& a code': {
|
|
685
|
-
color: `var(--muidocs-palette-primary-light, ${
|
|
677
|
+
color: `var(--muidocs-palette-primary-light, ${darkTheme.palette.primary.light})`
|
|
686
678
|
},
|
|
687
679
|
'& h1, & h2, & h3, & h4, & h5': {
|
|
688
|
-
color: `var(--muidocs-palette-grey-50, ${
|
|
680
|
+
color: `var(--muidocs-palette-grey-50, ${darkTheme.palette.grey[50]})`,
|
|
689
681
|
'& .anchor-icon, & .comment-link': {
|
|
690
|
-
color: `var(--muidocs-palette-primary-300, ${
|
|
682
|
+
color: `var(--muidocs-palette-primary-300, ${darkTheme.palette.primaryDark[400]})`,
|
|
691
683
|
'&:hover': {
|
|
692
|
-
color: `var(--muidocs-palette-primary-100, ${
|
|
693
|
-
borderColor: `var(--muidocs-palette-primary-900, ${
|
|
694
|
-
backgroundColor:
|
|
684
|
+
color: `var(--muidocs-palette-primary-100, ${darkTheme.palette.primary[100]})`,
|
|
685
|
+
borderColor: `var(--muidocs-palette-primary-900, ${darkTheme.palette.primary[900]})`,
|
|
686
|
+
backgroundColor: alpha(darkTheme.palette.primary[900], 0.6)
|
|
695
687
|
}
|
|
696
688
|
}
|
|
697
689
|
},
|
|
698
690
|
'& p, & ul, & ol': {
|
|
699
|
-
color: `var(--muidocs-palette-grey-400, ${
|
|
691
|
+
color: `var(--muidocs-palette-grey-400, ${darkTheme.palette.grey[400]})`
|
|
700
692
|
},
|
|
701
693
|
'& h1 code, & h2 code, & h3 code': {
|
|
702
|
-
color: `var(--muidocs-palette-grey-100, ${
|
|
694
|
+
color: `var(--muidocs-palette-grey-100, ${darkTheme.palette.grey[100]})`
|
|
703
695
|
},
|
|
704
696
|
'& table': {
|
|
705
697
|
'& .required': {
|
|
@@ -712,95 +704,95 @@ const Root = (0, _styles.styled)('div')(({
|
|
|
712
704
|
color: '#ffb6ec'
|
|
713
705
|
},
|
|
714
706
|
'& .prop-default, & .slot-default': {
|
|
715
|
-
borderColor: `var(--muidocs-palette-divider, ${
|
|
707
|
+
borderColor: `var(--muidocs-palette-divider, ${darkTheme.palette.divider})`
|
|
716
708
|
}
|
|
717
709
|
},
|
|
718
710
|
'& td': {
|
|
719
|
-
color: `var(--muidocs-palette-text-secondary, ${
|
|
720
|
-
borderColor: `var(--muidocs-palette-divider, ${
|
|
711
|
+
color: `var(--muidocs-palette-text-secondary, ${darkTheme.palette.text.secondary})`,
|
|
712
|
+
borderColor: `var(--muidocs-palette-divider, ${darkTheme.palette.divider})`
|
|
721
713
|
},
|
|
722
714
|
'& th': {
|
|
723
|
-
color: `var(--muidocs-palette-text-primary, ${
|
|
724
|
-
borderColor: `var(--muidocs-palette-divider, ${
|
|
715
|
+
color: `var(--muidocs-palette-text-primary, ${darkTheme.palette.text.primary})`,
|
|
716
|
+
borderColor: `var(--muidocs-palette-divider, ${darkTheme.palette.divider})`
|
|
725
717
|
},
|
|
726
718
|
'& blockquote': {
|
|
727
|
-
borderColor: `var(--muidocs-palette-primaryDark-700, ${
|
|
719
|
+
borderColor: `var(--muidocs-palette-primaryDark-700, ${darkTheme.palette.primaryDark[700]})`,
|
|
728
720
|
'&::before': {
|
|
729
|
-
color: `var(--muidocs-palette-primaryDark-500, ${
|
|
721
|
+
color: `var(--muidocs-palette-primaryDark-500, ${darkTheme.palette.primaryDark[500]})`
|
|
730
722
|
}
|
|
731
723
|
},
|
|
732
724
|
'& .MuiCallout-root': {
|
|
733
|
-
borderColor: `var(--muidocs-palette-primaryDark-700, ${
|
|
725
|
+
borderColor: `var(--muidocs-palette-primaryDark-700, ${darkTheme.palette.primaryDark[700]})`,
|
|
734
726
|
'& code': {
|
|
735
|
-
backgroundColor: `var(--muidocs-palette-primaryDark-600, ${
|
|
736
|
-
borderColor: `var(--muidocs-palette-primaryDark-500, ${
|
|
727
|
+
backgroundColor: `var(--muidocs-palette-primaryDark-600, ${darkTheme.palette.primaryDark[600]})`,
|
|
728
|
+
borderColor: `var(--muidocs-palette-primaryDark-500, ${darkTheme.palette.primaryDark[500]})`
|
|
737
729
|
},
|
|
738
730
|
'&.MuiCallout-error': {
|
|
739
|
-
color: `var(--muidocs-palette-error-50, ${
|
|
740
|
-
backgroundColor:
|
|
741
|
-
borderColor:
|
|
731
|
+
color: `var(--muidocs-palette-error-50, ${darkTheme.palette.error[50]})`,
|
|
732
|
+
backgroundColor: alpha(darkTheme.palette.error[700], 0.15),
|
|
733
|
+
borderColor: alpha(darkTheme.palette.error[400], 0.1),
|
|
742
734
|
'& strong': {
|
|
743
|
-
color: `var(--muidocs-palette-error-300, ${
|
|
735
|
+
color: `var(--muidocs-palette-error-300, ${darkTheme.palette.error[300]})`
|
|
744
736
|
},
|
|
745
737
|
'& svg': {
|
|
746
|
-
fill: `var(--muidocs-palette-error-500, ${
|
|
738
|
+
fill: `var(--muidocs-palette-error-500, ${darkTheme.palette.error[500]})`
|
|
747
739
|
},
|
|
748
740
|
'& a': {
|
|
749
|
-
color: `var(--muidocs-palette-error-200, ${
|
|
741
|
+
color: `var(--muidocs-palette-error-200, ${darkTheme.palette.error[200]})`
|
|
750
742
|
}
|
|
751
743
|
},
|
|
752
744
|
'&.MuiCallout-info': {
|
|
753
|
-
color: `var(--muidocs-palette-grey-50, ${
|
|
754
|
-
backgroundColor:
|
|
755
|
-
borderColor:
|
|
745
|
+
color: `var(--muidocs-palette-grey-50, ${darkTheme.palette.grey[50]})`,
|
|
746
|
+
backgroundColor: alpha(darkTheme.palette.grey[700], 0.15),
|
|
747
|
+
borderColor: alpha(darkTheme.palette.grey[800], 0.5),
|
|
756
748
|
'& strong': {
|
|
757
|
-
color: `var(--muidocs-palette-primary-200, ${
|
|
749
|
+
color: `var(--muidocs-palette-primary-200, ${darkTheme.palette.primary[200]})`
|
|
758
750
|
},
|
|
759
751
|
'& svg': {
|
|
760
|
-
fill: `var(--muidocs-palette-grey-400, ${
|
|
752
|
+
fill: `var(--muidocs-palette-grey-400, ${darkTheme.palette.grey[400]})`
|
|
761
753
|
}
|
|
762
754
|
},
|
|
763
755
|
'&.MuiCallout-success': {
|
|
764
|
-
color: `var(--muidocs-palette-success-50, ${
|
|
765
|
-
backgroundColor:
|
|
766
|
-
borderColor:
|
|
756
|
+
color: `var(--muidocs-palette-success-50, ${darkTheme.palette.success[50]})`,
|
|
757
|
+
backgroundColor: alpha(darkTheme.palette.success[700], 0.12),
|
|
758
|
+
borderColor: alpha(lightTheme.palette.success[400], 0.1),
|
|
767
759
|
'& strong': {
|
|
768
|
-
color: `var(--muidocs-palette-success-200, ${
|
|
760
|
+
color: `var(--muidocs-palette-success-200, ${darkTheme.palette.success[200]})`
|
|
769
761
|
},
|
|
770
762
|
'& svg': {
|
|
771
|
-
fill: `var(--muidocs-palette-success-500, ${
|
|
763
|
+
fill: `var(--muidocs-palette-success-500, ${darkTheme.palette.success[500]})`
|
|
772
764
|
},
|
|
773
765
|
'& a': {
|
|
774
|
-
color: `var(--muidocs-palette-success-100, ${
|
|
766
|
+
color: `var(--muidocs-palette-success-100, ${darkTheme.palette.success[100]})`
|
|
775
767
|
}
|
|
776
768
|
},
|
|
777
769
|
'&.MuiCallout-warning': {
|
|
778
|
-
color: `var(--muidocs-palette-warning-50, ${
|
|
779
|
-
backgroundColor:
|
|
780
|
-
borderColor:
|
|
770
|
+
color: `var(--muidocs-palette-warning-50, ${darkTheme.palette.warning[50]})`,
|
|
771
|
+
backgroundColor: alpha(darkTheme.palette.warning[700], 0.12),
|
|
772
|
+
borderColor: alpha(darkTheme.palette.warning[400], 0.1),
|
|
781
773
|
'& strong': {
|
|
782
|
-
color: `var(--muidocs-palette-warning-200, ${
|
|
774
|
+
color: `var(--muidocs-palette-warning-200, ${darkTheme.palette.warning[200]})`
|
|
783
775
|
},
|
|
784
776
|
'& svg': {
|
|
785
|
-
fill: `var(--muidocs-palette-warning-400, ${
|
|
777
|
+
fill: `var(--muidocs-palette-warning-400, ${darkTheme.palette.warning[400]})`
|
|
786
778
|
},
|
|
787
779
|
'& a': {
|
|
788
|
-
color: `var(--muidocs-palette-warning-100, ${
|
|
780
|
+
color: `var(--muidocs-palette-warning-100, ${darkTheme.palette.warning[100]})`
|
|
789
781
|
}
|
|
790
782
|
}
|
|
791
783
|
},
|
|
792
784
|
'& kbd.key': {
|
|
793
|
-
color: `var(--muidocs-palette-text-primary, ${
|
|
794
|
-
backgroundColor: `var(--muidocs-palette-primaryDark-800, ${
|
|
795
|
-
border: `1px solid var(--muidocs-palette-primaryDark-600, ${
|
|
796
|
-
boxShadow: `inset 0 -2px 0 var(--muidocs-palette-primaryDark-700, ${
|
|
785
|
+
color: `var(--muidocs-palette-text-primary, ${darkTheme.palette.text.primary})`,
|
|
786
|
+
backgroundColor: `var(--muidocs-palette-primaryDark-800, ${darkTheme.palette.primaryDark[800]})`,
|
|
787
|
+
border: `1px solid var(--muidocs-palette-primaryDark-600, ${darkTheme.palette.primaryDark[600]})`,
|
|
788
|
+
boxShadow: `inset 0 -2px 0 var(--muidocs-palette-primaryDark-700, ${darkTheme.palette.primaryDark[700]})`
|
|
797
789
|
},
|
|
798
790
|
'& details': {
|
|
799
|
-
borderColor: `var(--muidocs-palette-divider, ${
|
|
791
|
+
borderColor: `var(--muidocs-palette-divider, ${darkTheme.palette.divider})`
|
|
800
792
|
},
|
|
801
793
|
'& summary': {
|
|
802
794
|
'&:hover': {
|
|
803
|
-
backgroundColor: `var(--muidocs-palette-primaryDark-800, ${
|
|
795
|
+
backgroundColor: `var(--muidocs-palette-primaryDark-800, ${darkTheme.palette.primaryDark[800]})`
|
|
804
796
|
}
|
|
805
797
|
},
|
|
806
798
|
'& .feature-list': {
|
|
@@ -822,14 +814,14 @@ function handleHeaderClick(event) {
|
|
|
822
814
|
event.preventDefault();
|
|
823
815
|
}
|
|
824
816
|
}
|
|
825
|
-
const MarkdownElement =
|
|
817
|
+
export const MarkdownElement = /*#__PURE__*/React.forwardRef(function MarkdownElement(props, ref) {
|
|
826
818
|
const {
|
|
827
819
|
className,
|
|
828
820
|
renderedMarkdown,
|
|
829
821
|
...other
|
|
830
822
|
} = props;
|
|
831
823
|
const rootRef = React.useRef(null);
|
|
832
|
-
const handleRef = (
|
|
824
|
+
const handleRef = useForkRef(rootRef, ref);
|
|
833
825
|
React.useEffect(() => {
|
|
834
826
|
const elements = rootRef.current.getElementsByClassName('title-link-to-anchor');
|
|
835
827
|
for (let i = 0; i < elements.length; i += 1) {
|
|
@@ -846,8 +838,8 @@ const MarkdownElement = exports.MarkdownElement = /*#__PURE__*/React.forwardRef(
|
|
|
846
838
|
__html: renderedMarkdown
|
|
847
839
|
};
|
|
848
840
|
}
|
|
849
|
-
return /*#__PURE__*/(
|
|
850
|
-
className: (
|
|
841
|
+
return /*#__PURE__*/_jsx(Root, {
|
|
842
|
+
className: clsx('markdown-body', className),
|
|
851
843
|
...more,
|
|
852
844
|
...other,
|
|
853
845
|
ref: handleRef
|