@mui/docs 6.0.0-alpha.7 → 6.0.0-alpha.8
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 +37 -2
- package/CodeCopy/CodeCopyButton.js +6 -8
- package/HighlightedCode/HighlightedCode.js +25 -25
- package/InfoCard/InfoCard.js +38 -39
- package/Link/Link.js +40 -38
- package/MarkdownElement/MarkdownElement.js +35 -28
- package/NProgressBar/NProgressBar.js +6 -7
- package/branding/brandingTheme.js +392 -324
- package/node/CodeCopy/CodeCopyButton.js +6 -8
- package/node/HighlightedCode/HighlightedCode.js +25 -25
- package/node/InfoCard/InfoCard.js +38 -39
- package/node/Link/Link.js +43 -40
- package/node/MarkdownElement/MarkdownElement.js +36 -29
- package/node/NProgressBar/NProgressBar.js +6 -7
- package/node/branding/brandingTheme.js +392 -324
- package/node/svgIcons/FileDownload.js +3 -3
- package/node/svgIcons/JavaScript.js +3 -3
- package/node/svgIcons/TypeScript.js +3 -3
- package/package.json +1 -1
- package/svgIcons/FileDownload.js +3 -3
- package/svgIcons/JavaScript.js +3 -3
- package/svgIcons/TypeScript.js +3 -3
- package/tsconfig.build.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## v6.0.0-alpha.8
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v6.0.0-alpha.7..next -->
|
|
6
|
+
|
|
7
|
+
_May 21, 2024_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 7 contributors who made this release possible.
|
|
10
|
+
This release was mostly about 🐛 bug fixes and 📚 documentation improvements.
|
|
11
|
+
|
|
12
|
+
### `@mui/material@6.0.0-alpha.7`
|
|
13
|
+
|
|
14
|
+
- ​<!-- 04 -->[material-ui] Filter only valid theme palette for generating styles (#42147) @siriwatknp
|
|
15
|
+
- ​<!-- 03 -->[material-ui] Remove UMD bundle (#42172) @ZeeshanTamboli
|
|
16
|
+
- ​<!-- 02 -->[material-ui][TextField] Deprecate `*Props` props (#42062) @DiegoAndai
|
|
17
|
+
|
|
18
|
+
### Docs
|
|
19
|
+
|
|
20
|
+
- ​<!-- 08 -->[docs] Remove Base UI from the README (#42307) @danilo-leal
|
|
21
|
+
- ​<!-- 07 -->[docs][material-ui] Fix typo in style interoperability with Tailwind CSS docs (#42279) @ZeeshanTamboli
|
|
22
|
+
- ​<!-- 06 -->[docs][material-ui] Add supported browsers section to migration guide (#42194) @DiegoAndai
|
|
23
|
+
- ​<!-- 05 -->[docs][material-ui][Pagination] Clarify pagination `page` prop API (#42220) @Mandar-Pandya
|
|
24
|
+
|
|
25
|
+
### Core
|
|
26
|
+
|
|
27
|
+
- ​<!-- 12 -->[blog] Update blog post OG image (#42270) @danilo-leal
|
|
28
|
+
- ​<!-- 11 -->[blog] Update Pigment CSS post (#42266) @danilo-leal
|
|
29
|
+
- ​<!-- 10 -->[docs] Remove LocalMonero (#42224) @oliviertassinari
|
|
30
|
+
- ​<!-- 08 -->[docs-infra] Fix keyboard navigation on page tabs (#42152) @danilo-leal
|
|
31
|
+
- ​<!-- 10 -->[code-infra] Remove raw-loader (#42275) @Janpot
|
|
32
|
+
- ​<!-- 09 -->[core] Remove outdated Babel plugins (#42140) @ZeeshanTamboli
|
|
33
|
+
- ​<!-- 12 -->[core] Fix a few more key spread issues (#42168) @oliviertassinari
|
|
34
|
+
- ​<!-- 01 -->[website] Avoid duplicate simple vs. rich (#42100) @oliviertassinari
|
|
35
|
+
|
|
36
|
+
All contributors of this release in alphabetical order: @danilo-leal, @DiegoAndai, @Janpot, @Mandar-Pandya, @oliviertassinari, @siriwatknp, @ZeeshanTamboli
|
|
37
|
+
|
|
3
38
|
## v6.0.0-alpha.7
|
|
4
39
|
|
|
5
40
|
<!-- generated comparing v6.0.0-alpha.6..next -->
|
|
@@ -53,7 +88,7 @@ All contributors of this release in alphabetical order: @aarongarciah, @alexfauq
|
|
|
53
88
|
|
|
54
89
|
_May 8, 2024_
|
|
55
90
|
|
|
56
|
-
A big thanks to the 10 contributors who made this release possible.
|
|
91
|
+
A big thanks to the 10 contributors who made this release possible.
|
|
57
92
|
|
|
58
93
|
### `@mui/material@6.0.0-alpha.6`
|
|
59
94
|
|
|
@@ -101,7 +136,7 @@ All contributors of this release in alphabetical order: @aarongarciah, @danilo-l
|
|
|
101
136
|
|
|
102
137
|
_May 1, 2024_
|
|
103
138
|
|
|
104
|
-
A big thanks to the 9 contributors who made this release possible.
|
|
139
|
+
A big thanks to the 9 contributors who made this release possible.
|
|
105
140
|
|
|
106
141
|
### `@mui/material@6.0.0-alpha.5`
|
|
107
142
|
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
1
|
var _span, _span2;
|
|
4
|
-
const _excluded = ["code"];
|
|
5
2
|
import * as React from 'react';
|
|
6
3
|
import useClipboardCopy from './useClipboardCopy';
|
|
7
4
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
5
|
export function CodeCopyButton(props) {
|
|
9
6
|
const {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
code,
|
|
8
|
+
...other
|
|
9
|
+
} = props;
|
|
13
10
|
const {
|
|
14
11
|
copy,
|
|
15
12
|
isCopied
|
|
@@ -19,7 +16,8 @@ export function CodeCopyButton(props) {
|
|
|
19
16
|
const key = macOS ? '⌘' : 'Ctrl + ';
|
|
20
17
|
return /*#__PURE__*/_jsx("div", {
|
|
21
18
|
className: "MuiCode-copy-container",
|
|
22
|
-
children: /*#__PURE__*/_jsxs("button",
|
|
19
|
+
children: /*#__PURE__*/_jsxs("button", {
|
|
20
|
+
...other,
|
|
23
21
|
"aria-label": "Copy the code",
|
|
24
22
|
type: "button",
|
|
25
23
|
className: "MuiCode-copy",
|
|
@@ -38,6 +36,6 @@ export function CodeCopyButton(props) {
|
|
|
38
36
|
children: ")"
|
|
39
37
|
}))]
|
|
40
38
|
})]
|
|
41
|
-
})
|
|
39
|
+
})
|
|
42
40
|
});
|
|
43
41
|
}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["copyButtonHidden", "copyButtonProps", "code", "language", "plainStyle", "parentComponent", "preComponent"];
|
|
4
1
|
import * as React from 'react';
|
|
5
2
|
import prism from '@mui/internal-markdown/prism';
|
|
6
3
|
import { NoSsr } from '@mui/base/NoSsr';
|
|
@@ -20,39 +17,42 @@ const Pre = styled('pre')(({
|
|
|
20
17
|
[theme.breakpoints.up('md')]: {
|
|
21
18
|
maxWidth: 'calc(100vw - 32px - 16px)'
|
|
22
19
|
},
|
|
23
|
-
'& code':
|
|
20
|
+
'& code': {
|
|
21
|
+
// Avoid layout jump after hydration (style injected by Prism)
|
|
22
|
+
...theme.typography.caption,
|
|
24
23
|
fontFamily: theme.typography.fontFamilyCode,
|
|
25
24
|
fontWeight: 400,
|
|
26
25
|
WebkitFontSmoothing: 'subpixel-antialiased'
|
|
27
26
|
// Reset for Safari
|
|
28
27
|
// https://github.com/necolas/normalize.css/blob/master/normalize.css#L102
|
|
29
|
-
}
|
|
28
|
+
}
|
|
30
29
|
}));
|
|
31
30
|
export const HighlightedCode = /*#__PURE__*/React.forwardRef(function HighlightedCode(props, ref) {
|
|
32
31
|
const {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
copyButtonHidden = false,
|
|
33
|
+
copyButtonProps,
|
|
34
|
+
code,
|
|
35
|
+
language,
|
|
36
|
+
plainStyle,
|
|
37
|
+
parentComponent: Component = plainStyle ? 'div' : MarkdownElement,
|
|
38
|
+
preComponent: PreComponent = plainStyle ? Pre : 'pre',
|
|
39
|
+
...other
|
|
40
|
+
} = props;
|
|
42
41
|
const renderedCode = React.useMemo(() => {
|
|
43
42
|
return prism(code.trim(), language);
|
|
44
43
|
}, [code, language]);
|
|
45
44
|
const handlers = useCodeCopy();
|
|
46
|
-
return /*#__PURE__*/_jsx(Component,
|
|
47
|
-
ref: ref
|
|
48
|
-
|
|
49
|
-
children: /*#__PURE__*/_jsxs("div",
|
|
50
|
-
className: "MuiCode-root"
|
|
51
|
-
|
|
45
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
46
|
+
ref: ref,
|
|
47
|
+
...other,
|
|
48
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
49
|
+
className: "MuiCode-root",
|
|
50
|
+
...handlers,
|
|
52
51
|
children: [copyButtonHidden ? null : /*#__PURE__*/_jsx(NoSsr, {
|
|
53
|
-
children: /*#__PURE__*/_jsx(CodeCopyButton,
|
|
54
|
-
code: code
|
|
55
|
-
|
|
52
|
+
children: /*#__PURE__*/_jsx(CodeCopyButton, {
|
|
53
|
+
code: code,
|
|
54
|
+
...copyButtonProps
|
|
55
|
+
})
|
|
56
56
|
}), /*#__PURE__*/_jsx(PreComponent, {
|
|
57
57
|
children: /*#__PURE__*/_jsx("code", {
|
|
58
58
|
className: `language-${language}`
|
|
@@ -63,6 +63,6 @@ export const HighlightedCode = /*#__PURE__*/React.forwardRef(function Highlighte
|
|
|
63
63
|
}
|
|
64
64
|
})
|
|
65
65
|
})]
|
|
66
|
-
})
|
|
67
|
-
})
|
|
66
|
+
})
|
|
67
|
+
});
|
|
68
68
|
});
|
package/InfoCard/InfoCard.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["classNameDescription", "classNameTitle", "description", "icon", "link", "svg", "title", "titleProps"];
|
|
4
1
|
import * as React from 'react';
|
|
5
2
|
import { alpha } from '@mui/material/styles';
|
|
6
3
|
import Box from '@mui/material/Box';
|
|
@@ -12,7 +9,7 @@ export function GlowingIconContainer({
|
|
|
12
9
|
icon
|
|
13
10
|
}) {
|
|
14
11
|
return /*#__PURE__*/_jsx(Box, {
|
|
15
|
-
sx: theme =>
|
|
12
|
+
sx: theme => ({
|
|
16
13
|
width: 36,
|
|
17
14
|
height: 36,
|
|
18
15
|
display: 'flex',
|
|
@@ -26,63 +23,65 @@ export function GlowingIconContainer({
|
|
|
26
23
|
boxShadow: `0px 0 0 2px ${alpha(theme.palette.primary[500], 0.1)}, 0px 2px 12px 0px rgba(234, 237, 241, 0.3) inset`,
|
|
27
24
|
'& .MuiSvgIcon-root': {
|
|
28
25
|
fontSize: theme.typography.pxToRem(18)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
},
|
|
27
|
+
...theme.applyDarkStyles({
|
|
28
|
+
borderColor: alpha(theme.palette.primary[400], 0.25),
|
|
29
|
+
bgcolor: alpha(theme.palette.primary[900], 0.2),
|
|
30
|
+
boxShadow: `0 0 0 2px ${alpha(theme.palette.primary[600], 0.1)}, 0px 2px 12px 0px rgba(0, 0, 0, 0.25) inset`
|
|
31
|
+
})
|
|
32
|
+
}),
|
|
35
33
|
children: icon
|
|
36
34
|
});
|
|
37
35
|
}
|
|
38
36
|
export function InfoCard(props) {
|
|
39
37
|
const {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return /*#__PURE__*/_jsxs(Paper,
|
|
38
|
+
classNameDescription,
|
|
39
|
+
classNameTitle,
|
|
40
|
+
description,
|
|
41
|
+
icon,
|
|
42
|
+
link,
|
|
43
|
+
svg,
|
|
44
|
+
title,
|
|
45
|
+
titleProps,
|
|
46
|
+
...other
|
|
47
|
+
} = props;
|
|
48
|
+
return /*#__PURE__*/_jsxs(Paper, {
|
|
51
49
|
variant: "outlined",
|
|
52
50
|
component: link ? Link : 'div',
|
|
53
|
-
href: link
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
sx: theme =>
|
|
51
|
+
href: link,
|
|
52
|
+
...(link ? {
|
|
53
|
+
noLinkStyle: true,
|
|
54
|
+
// Fix overloading with prefetch={false}, only prefetch on hover.
|
|
55
|
+
prefetch: false
|
|
56
|
+
} : {}),
|
|
57
|
+
sx: theme => ({
|
|
60
58
|
p: 2.5,
|
|
61
59
|
height: '100%',
|
|
62
|
-
background: `${(theme.vars || theme).palette.gradients.linearSubtle}`
|
|
63
|
-
}, theme.applyDarkStyles({
|
|
64
|
-
bgcolor: alpha(theme.palette.primaryDark[800], 0.25),
|
|
65
60
|
background: `${(theme.vars || theme).palette.gradients.linearSubtle}`,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
...theme.applyDarkStyles({
|
|
62
|
+
bgcolor: alpha(theme.palette.primaryDark[800], 0.25),
|
|
63
|
+
background: `${(theme.vars || theme).palette.gradients.linearSubtle}`,
|
|
64
|
+
borderColor: 'primaryDark.700'
|
|
65
|
+
})
|
|
66
|
+
}),
|
|
67
|
+
...other,
|
|
69
68
|
children: [svg && svg, icon && /*#__PURE__*/_jsx(GlowingIconContainer, {
|
|
70
69
|
icon: icon
|
|
71
|
-
}), /*#__PURE__*/_jsx(Typography,
|
|
70
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
72
71
|
fontWeight: "semiBold",
|
|
73
72
|
component: "h3",
|
|
74
73
|
color: "text.primary",
|
|
75
74
|
variant: "body2",
|
|
76
75
|
mt: icon ? 2 : 0,
|
|
77
76
|
mb: description ? 0.5 : 0,
|
|
78
|
-
className: classNameTitle
|
|
79
|
-
|
|
77
|
+
className: classNameTitle,
|
|
78
|
+
...titleProps,
|
|
80
79
|
children: title
|
|
81
|
-
})
|
|
80
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
82
81
|
variant: "body2",
|
|
83
82
|
color: "text.secondary",
|
|
84
83
|
className: classNameDescription,
|
|
85
84
|
children: description
|
|
86
85
|
})]
|
|
87
|
-
})
|
|
86
|
+
});
|
|
88
87
|
}
|
package/Link/Link.js
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["to", "linkAs", "replace", "scroll", "shallow", "prefetch", "legacyBehavior", "locale"],
|
|
4
|
-
_excluded2 = ["activeClassName", "as", "className", "href", "legacyBehavior", "linkAs", "locale", "noLinkStyle", "prefetch", "replace", "role", "scroll", "shallow"];
|
|
5
1
|
import * as React from 'react';
|
|
6
2
|
import clsx from 'clsx';
|
|
7
3
|
import { useRouter } from 'next/router';
|
|
@@ -24,16 +20,16 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
24
20
|
const Anchor = styled('a')({});
|
|
25
21
|
const NextLinkComposed = /*#__PURE__*/React.forwardRef(function NextLinkComposed(props, ref) {
|
|
26
22
|
const {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
to,
|
|
24
|
+
linkAs,
|
|
25
|
+
replace,
|
|
26
|
+
scroll,
|
|
27
|
+
shallow,
|
|
28
|
+
prefetch,
|
|
29
|
+
legacyBehavior = true,
|
|
30
|
+
locale,
|
|
31
|
+
...other
|
|
32
|
+
} = props;
|
|
37
33
|
return /*#__PURE__*/_jsx(NextLink, {
|
|
38
34
|
href: to,
|
|
39
35
|
prefetch: prefetch,
|
|
@@ -44,31 +40,33 @@ const NextLinkComposed = /*#__PURE__*/React.forwardRef(function NextLinkComposed
|
|
|
44
40
|
passHref: true,
|
|
45
41
|
locale: locale,
|
|
46
42
|
legacyBehavior: legacyBehavior,
|
|
47
|
-
children: /*#__PURE__*/_jsx(Anchor,
|
|
43
|
+
children: /*#__PURE__*/_jsx(Anchor, {
|
|
48
44
|
"data-no-markdown-link": "true",
|
|
49
|
-
ref: ref
|
|
50
|
-
|
|
45
|
+
ref: ref,
|
|
46
|
+
...other
|
|
47
|
+
})
|
|
51
48
|
});
|
|
52
49
|
});
|
|
53
50
|
// A styled version of the Next.js Pages Router Link component:
|
|
54
51
|
// https://nextjs.org/docs/pages/api-reference/components/link
|
|
55
52
|
export const Link = /*#__PURE__*/React.forwardRef(function Link(props, ref) {
|
|
56
53
|
const {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
other
|
|
54
|
+
activeClassName = 'active',
|
|
55
|
+
as,
|
|
56
|
+
className: classNameProps,
|
|
57
|
+
href,
|
|
58
|
+
legacyBehavior,
|
|
59
|
+
linkAs: linkAsProp,
|
|
60
|
+
locale,
|
|
61
|
+
noLinkStyle,
|
|
62
|
+
prefetch,
|
|
63
|
+
replace,
|
|
64
|
+
role,
|
|
65
|
+
// Link don't have roles.
|
|
66
|
+
scroll,
|
|
67
|
+
shallow,
|
|
68
|
+
...other
|
|
69
|
+
} = props;
|
|
72
70
|
const router = useRouter();
|
|
73
71
|
const pathname = typeof href === 'string' ? href : href?.pathname;
|
|
74
72
|
const routerPathname = router.pathname.replace('/[docsTab]', '');
|
|
@@ -93,14 +91,18 @@ export const Link = /*#__PURE__*/React.forwardRef(function Link(props, ref) {
|
|
|
93
91
|
locale
|
|
94
92
|
};
|
|
95
93
|
if (noLinkStyle) {
|
|
96
|
-
return /*#__PURE__*/_jsx(NextLinkComposed,
|
|
94
|
+
return /*#__PURE__*/_jsx(NextLinkComposed, {
|
|
97
95
|
className: className,
|
|
98
|
-
ref: ref
|
|
99
|
-
|
|
96
|
+
ref: ref,
|
|
97
|
+
...nextjsProps,
|
|
98
|
+
...other
|
|
99
|
+
});
|
|
100
100
|
}
|
|
101
|
-
return /*#__PURE__*/_jsx(MuiLink,
|
|
101
|
+
return /*#__PURE__*/_jsx(MuiLink, {
|
|
102
102
|
component: NextLinkComposed,
|
|
103
103
|
className: className,
|
|
104
|
-
ref: ref
|
|
105
|
-
|
|
104
|
+
ref: ref,
|
|
105
|
+
...nextjsProps,
|
|
106
|
+
...other
|
|
107
|
+
});
|
|
106
108
|
});
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["className", "renderedMarkdown"];
|
|
4
1
|
import * as React from 'react';
|
|
5
2
|
import clsx from 'clsx';
|
|
6
3
|
import { alpha, darken, styled } from '@mui/material/styles';
|
|
@@ -8,7 +5,8 @@ import { brandingDarkTheme as darkTheme, brandingLightTheme as lightTheme } from
|
|
|
8
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
6
|
const Root = styled('div')(({
|
|
10
7
|
theme
|
|
11
|
-
}) =>
|
|
8
|
+
}) => ({
|
|
9
|
+
...lightTheme.typography.body1,
|
|
12
10
|
lineHeight: 1.6,
|
|
13
11
|
// Increased compared to the 1.5 default to make the docs easier to read.
|
|
14
12
|
color: `var(--muidocs-palette-text-primary, ${lightTheme.palette.text.primary})`,
|
|
@@ -41,11 +39,12 @@ const Root = styled('div')(({
|
|
|
41
39
|
maxWidth: 'calc(100vw - 32px - 16px)'
|
|
42
40
|
}
|
|
43
41
|
},
|
|
44
|
-
'& code':
|
|
42
|
+
'& code': {
|
|
43
|
+
...lightTheme.typography.body2,
|
|
45
44
|
fontFamily: lightTheme.typography.fontFamilyCode,
|
|
46
45
|
fontWeight: 400,
|
|
47
46
|
WebkitFontSmoothing: 'subpixel-antialiased'
|
|
48
|
-
}
|
|
47
|
+
},
|
|
49
48
|
'& pre > code': {
|
|
50
49
|
// Reset for Safari
|
|
51
50
|
// https://github.com/necolas/normalize.css/blob/master/normalize.css#L102
|
|
@@ -63,47 +62,53 @@ const Root = styled('div')(({
|
|
|
63
62
|
direction: 'ltr /*! @noflip */',
|
|
64
63
|
boxDecorationBreak: 'clone'
|
|
65
64
|
},
|
|
66
|
-
'& h1':
|
|
65
|
+
'& h1': {
|
|
66
|
+
...lightTheme.typography.h3,
|
|
67
67
|
fontSize: lightTheme.typography.pxToRem(36),
|
|
68
68
|
fontFamily: `"General Sans", ${lightTheme.typography.fontFamilySystem}`,
|
|
69
69
|
margin: '10px 0',
|
|
70
70
|
color: `var(--muidocs-palette-primaryDark-900, ${lightTheme.palette.primaryDark[900]})`,
|
|
71
71
|
fontWeight: 600,
|
|
72
72
|
letterSpacing: -0.2
|
|
73
|
-
}
|
|
74
|
-
'& .description':
|
|
73
|
+
},
|
|
74
|
+
'& .description': {
|
|
75
|
+
...lightTheme.typography.subtitle1,
|
|
75
76
|
fontWeight: 400,
|
|
76
77
|
margin: '0 0 24px'
|
|
77
|
-
}
|
|
78
|
+
},
|
|
78
79
|
'& .component-tabs': {
|
|
79
80
|
margin: '0 0 40px'
|
|
80
81
|
},
|
|
81
|
-
'& h2':
|
|
82
|
+
'& h2': {
|
|
83
|
+
...lightTheme.typography.h5,
|
|
82
84
|
fontFamily: `"General Sans", ${lightTheme.typography.fontFamilySystem}`,
|
|
83
85
|
fontSize: theme.typography.pxToRem(26),
|
|
84
86
|
fontWeight: lightTheme.typography.fontWeightSemiBold,
|
|
85
87
|
color: `var(--muidocs-palette-grey-900, ${lightTheme.palette.grey[900]})`,
|
|
86
88
|
margin: '40px 0 4px'
|
|
87
|
-
}
|
|
88
|
-
'& h3':
|
|
89
|
+
},
|
|
90
|
+
'& h3': {
|
|
91
|
+
...lightTheme.typography.h6,
|
|
89
92
|
fontFamily: `"General Sans", ${lightTheme.typography.fontFamilySystem}`,
|
|
90
93
|
fontSize: theme.typography.pxToRem(20),
|
|
91
94
|
fontWeight: lightTheme.typography.fontWeightSemiBold,
|
|
92
95
|
color: `var(--muidocs-palette-grey-900, ${lightTheme.palette.grey[900]})`,
|
|
93
96
|
margin: '24px 0 4px'
|
|
94
|
-
}
|
|
95
|
-
'& h4':
|
|
97
|
+
},
|
|
98
|
+
'& h4': {
|
|
99
|
+
...lightTheme.typography.subtitle1,
|
|
96
100
|
fontFamily: `"General Sans", ${lightTheme.typography.fontFamilySystem}`,
|
|
97
101
|
fontWeight: lightTheme.typography.fontWeightSemiBold,
|
|
98
102
|
color: `var(--muidocs-palette-grey-900, ${lightTheme.palette.grey[900]})`,
|
|
99
103
|
margin: '20px 0 6px'
|
|
100
|
-
}
|
|
101
|
-
'& h5':
|
|
104
|
+
},
|
|
105
|
+
'& h5': {
|
|
106
|
+
...lightTheme.typography.subtitle2,
|
|
102
107
|
fontFamily: `"General Sans", ${lightTheme.typography.fontFamilySystem}`,
|
|
103
108
|
fontWeight: lightTheme.typography.fontWeightSemiBold,
|
|
104
109
|
color: `var(--muidocs-palette-grey-900, ${lightTheme.palette.grey[900]})`,
|
|
105
110
|
margin: '20px 0 8px'
|
|
106
|
-
}
|
|
111
|
+
},
|
|
107
112
|
'& p': {
|
|
108
113
|
marginTop: 0,
|
|
109
114
|
marginBottom: 16,
|
|
@@ -231,13 +236,14 @@ const Root = styled('div')(({
|
|
|
231
236
|
borderBottom: `1px dotted var(--muidocs-palette-divider, ${lightTheme.palette.divider})`
|
|
232
237
|
}
|
|
233
238
|
},
|
|
234
|
-
'& td':
|
|
239
|
+
'& td': {
|
|
240
|
+
...theme.typography.body2,
|
|
235
241
|
borderBottom: `1px solid var(--muidocs-palette-divider, ${lightTheme.palette.divider})`,
|
|
236
242
|
paddingRight: 20,
|
|
237
243
|
paddingTop: 16,
|
|
238
244
|
paddingBottom: 16,
|
|
239
245
|
color: `var(--muidocs-palette-text-secondary, ${lightTheme.palette.text.secondary})`
|
|
240
|
-
}
|
|
246
|
+
},
|
|
241
247
|
'& td code': {
|
|
242
248
|
lineHeight: 1.6
|
|
243
249
|
},
|
|
@@ -798,10 +804,10 @@ const Root = styled('div')(({
|
|
|
798
804
|
}));
|
|
799
805
|
export const MarkdownElement = /*#__PURE__*/React.forwardRef(function MarkdownElement(props, ref) {
|
|
800
806
|
const {
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
807
|
+
className,
|
|
808
|
+
renderedMarkdown,
|
|
809
|
+
...other
|
|
810
|
+
} = props;
|
|
805
811
|
const more = {};
|
|
806
812
|
if (typeof renderedMarkdown === 'string') {
|
|
807
813
|
// workaround for https://github.com/facebook/react/issues/17170
|
|
@@ -810,9 +816,10 @@ export const MarkdownElement = /*#__PURE__*/React.forwardRef(function MarkdownEl
|
|
|
810
816
|
__html: renderedMarkdown
|
|
811
817
|
};
|
|
812
818
|
}
|
|
813
|
-
return /*#__PURE__*/_jsx(Root,
|
|
814
|
-
className: clsx('markdown-body', className)
|
|
815
|
-
|
|
819
|
+
return /*#__PURE__*/_jsx(Root, {
|
|
820
|
+
className: clsx('markdown-body', className),
|
|
821
|
+
...more,
|
|
822
|
+
...other,
|
|
816
823
|
ref: ref
|
|
817
|
-
})
|
|
824
|
+
});
|
|
818
825
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import PropTypes from 'prop-types';
|
|
4
3
|
import NProgress from 'nprogress';
|
|
@@ -38,7 +37,7 @@ function NProgressBar(props) {
|
|
|
38
37
|
return /*#__PURE__*/_jsxs(NoSsr, {
|
|
39
38
|
children: [props.children, /*#__PURE__*/_jsx(GlobalStyles, {
|
|
40
39
|
styles: theme => ({
|
|
41
|
-
'#nprogress':
|
|
40
|
+
'#nprogress': {
|
|
42
41
|
direction: 'ltr',
|
|
43
42
|
pointerEvents: 'none',
|
|
44
43
|
position: 'fixed',
|
|
@@ -47,10 +46,10 @@ function NProgressBar(props) {
|
|
|
47
46
|
right: 0,
|
|
48
47
|
height: 2,
|
|
49
48
|
zIndex: (theme.vars || theme).zIndex.tooltip,
|
|
50
|
-
backgroundColor: (theme.vars || theme).palette.primary[200]
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
backgroundColor: (theme.vars || theme).palette.primary[200],
|
|
50
|
+
...theme.applyDarkStyles({
|
|
51
|
+
backgroundColor: (theme.vars || theme).palette.primary[700]
|
|
52
|
+
}),
|
|
54
53
|
'& .nprogress-bar': {
|
|
55
54
|
position: 'fixed',
|
|
56
55
|
backgroundColor: (theme.vars || theme).palette.primary.main,
|
|
@@ -79,7 +78,7 @@ function NProgressBar(props) {
|
|
|
79
78
|
right: -80,
|
|
80
79
|
clip: 'rect(-6px,90px,14px,-6px)'
|
|
81
80
|
}
|
|
82
|
-
}
|
|
81
|
+
}
|
|
83
82
|
})
|
|
84
83
|
})]
|
|
85
84
|
});
|