@mui/docs 6.0.0-alpha.6 → 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 +84 -2
- package/CodeCopy/CodeCopyButton.js +10 -19
- package/HighlightedCode/HighlightedCode.js +25 -25
- package/InfoCard/InfoCard.js +38 -39
- package/Link/Link.js +40 -38
- package/MarkdownElement/MarkdownElement.js +60 -61
- package/NProgressBar/NProgressBar.js +6 -7
- package/SectionTitle/SectionTitle.d.ts +7 -0
- package/SectionTitle/SectionTitle.js +30 -0
- package/SectionTitle/index.d.ts +1 -0
- package/SectionTitle/index.js +1 -0
- package/SectionTitle/package.json +6 -0
- package/branding/brandingTheme.js +392 -324
- package/node/CodeCopy/CodeCopyButton.js +10 -19
- 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 +61 -62
- package/node/NProgressBar/NProgressBar.js +6 -7
- package/node/SectionTitle/SectionTitle.js +38 -0
- package/node/SectionTitle/index.js +16 -0
- package/node/branding/brandingTheme.js +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 +3 -3
- 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,12 +1,94 @@
|
|
|
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
|
+
|
|
38
|
+
## v6.0.0-alpha.7
|
|
39
|
+
|
|
40
|
+
<!-- generated comparing v6.0.0-alpha.6..next -->
|
|
41
|
+
|
|
42
|
+
_May 16, 2024_
|
|
43
|
+
|
|
44
|
+
A big thanks to the 14 contributors who made this release possible.
|
|
45
|
+
|
|
46
|
+
### `@mui/material@6.0.0-alpha.7`
|
|
47
|
+
|
|
48
|
+
- ​<!-- 23 -->[Autocomplete] Deprecate `componentsProps` props (#42179) @lhilgert9
|
|
49
|
+
- ​<!-- 22 -->[Autocomplete] Improve design when there's a start adornment for small autocomplete (#41781) @TahaRhidouani
|
|
50
|
+
- ​<!-- 21 -->[Autocomplete] deprecate `*Component` and `*Props` for v6 (#41875) @lhilgert9
|
|
51
|
+
- ​<!-- 19 -->[CircularProgress] Deprecate composed classes (#42076) @sai6855
|
|
52
|
+
- ​<!-- 05 -->[ToggleButtonGroup] Add missing `selected` class in ToggleButtonGroupClasses type (#42243) @tarunrajput
|
|
53
|
+
|
|
54
|
+
### `@mui/codemod@6.0.0-alpha.6`
|
|
55
|
+
|
|
56
|
+
- ​<!-- 18 -->[Divider] Only apply codemod if light prop is present (#42098) @DiegoAndai
|
|
57
|
+
|
|
58
|
+
### Docs
|
|
59
|
+
|
|
60
|
+
- ​<!-- 13 -->Fix 301 to Figma @oliviertassinari
|
|
61
|
+
- ​<!-- 12 -->Fix use of deprecated React API (#42118) @oliviertassinari
|
|
62
|
+
- ​<!-- 11 -->Remove the Base notification (#42191) @danilo-leal
|
|
63
|
+
- ​<!-- 07 -->[material-ui] Improve descriptions for deprecated props (#42221) @aarongarciah
|
|
64
|
+
- ​<!-- 06 -->[material-ui] Fix typo in composition docs (#42195) @aarongarciah
|
|
65
|
+
|
|
66
|
+
### Core
|
|
67
|
+
|
|
68
|
+
- ​<!-- 20 -->[blog] Introducing Pigment CSS blog post (#42198) @samuelsycamore
|
|
69
|
+
- ​<!-- 17 -->[core] Remove confusing comment @oliviertassinari
|
|
70
|
+
- ​<!-- 16 -->[core] Match other repositories and convention @oliviertassinari
|
|
71
|
+
- ​<!-- 15 -->[core] Fix React 18.3 warnings about spreading keys in the Material UI `Autocomplete` component (#42099) @heath-freenome
|
|
72
|
+
- ​<!-- 14 -->[core] Remove unecessary quotes @oliviertassinari
|
|
73
|
+
- ​<!-- 10 -->[docs-infra] Share code for section title (#42236) @alexfauquette
|
|
74
|
+
- ​<!-- 09 -->[docs-infra] Limit the copy button to the visible code block (#42115) @danilo-leal
|
|
75
|
+
- ​<!-- 08 -->[docs-infra] Make select components with two capital letters (#42004) @alexfauquette
|
|
76
|
+
- ​<!-- 08 -->[docs-infra][toolpad] Fix Page title and SERP title mismatch (#41919) @bharatkashyap
|
|
77
|
+
- ​<!-- 05 -->[website] Add redirection for talk @oliviertassinari
|
|
78
|
+
- ​<!-- 04 -->[website] Adds Arthur Balduini team info (#42193) @arthurbalduini
|
|
79
|
+
- ​<!-- 03 -->[website] Update the role template file (#42192) @danilo-leal
|
|
80
|
+
- ​<!-- 02 -->[website] Update MUI X deps and migrate TreeView demos to v7 API (#42149) @noraleonte
|
|
81
|
+
- ​<!-- 01 -->[website] Fix pricing casing (#42178) @aarongarciah
|
|
82
|
+
|
|
83
|
+
All contributors of this release in alphabetical order: @aarongarciah, @alexfauquette, @arthurbalduini, @bharatkashyap, @danilo-leal, @DiegoAndai, @heath-freenome, @lhilgert9, @noraleonte, @oliviertassinari, @sai6855, @samuelsycamore, @TahaRhidouani, @tarunrajput
|
|
84
|
+
|
|
3
85
|
## v6.0.0-alpha.6
|
|
4
86
|
|
|
5
87
|
<!-- generated comparing v6.0.0-alpha.5..next -->
|
|
6
88
|
|
|
7
89
|
_May 8, 2024_
|
|
8
90
|
|
|
9
|
-
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.
|
|
10
92
|
|
|
11
93
|
### `@mui/material@6.0.0-alpha.6`
|
|
12
94
|
|
|
@@ -54,7 +136,7 @@ All contributors of this release in alphabetical order: @aarongarciah, @danilo-l
|
|
|
54
136
|
|
|
55
137
|
_May 1, 2024_
|
|
56
138
|
|
|
57
|
-
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.
|
|
58
140
|
|
|
59
141
|
### `@mui/material@6.0.0-alpha.5`
|
|
60
142
|
|
|
@@ -1,17 +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
|
-
import ContentCopyRoundedIcon from '@mui/icons-material/ContentCopyRounded';
|
|
7
|
-
import LibraryAddCheckRoundedIcon from '@mui/icons-material/LibraryAddCheckRounded';
|
|
8
3
|
import useClipboardCopy from './useClipboardCopy';
|
|
9
4
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
5
|
export function CodeCopyButton(props) {
|
|
11
6
|
const {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
code,
|
|
8
|
+
...other
|
|
9
|
+
} = props;
|
|
15
10
|
const {
|
|
16
11
|
copy,
|
|
17
12
|
isCopied
|
|
@@ -21,7 +16,8 @@ export function CodeCopyButton(props) {
|
|
|
21
16
|
const key = macOS ? '⌘' : 'Ctrl + ';
|
|
22
17
|
return /*#__PURE__*/_jsx("div", {
|
|
23
18
|
className: "MuiCode-copy-container",
|
|
24
|
-
children: /*#__PURE__*/_jsxs("button",
|
|
19
|
+
children: /*#__PURE__*/_jsxs("button", {
|
|
20
|
+
...other,
|
|
25
21
|
"aria-label": "Copy the code",
|
|
26
22
|
type: "button",
|
|
27
23
|
className: "MuiCode-copy",
|
|
@@ -29,22 +25,17 @@ export function CodeCopyButton(props) {
|
|
|
29
25
|
// event.stopPropagation();
|
|
30
26
|
await copy(code);
|
|
31
27
|
},
|
|
32
|
-
children: [isCopied ? /*#__PURE__*/
|
|
33
|
-
sx: {
|
|
34
|
-
fontSize: 18
|
|
35
|
-
}
|
|
36
|
-
}) : /*#__PURE__*/_jsx(ContentCopyRoundedIcon, {
|
|
37
|
-
sx: {
|
|
38
|
-
fontSize: 18
|
|
39
|
-
}
|
|
40
|
-
}), /*#__PURE__*/_jsxs("span", {
|
|
28
|
+
children: [isCopied ? 'Copied' : 'Copy', /*#__PURE__*/_jsxs("span", {
|
|
41
29
|
className: "MuiCode-copyKeypress",
|
|
30
|
+
style: {
|
|
31
|
+
opacity: isCopied ? 0 : 1
|
|
32
|
+
},
|
|
42
33
|
children: [_span || (_span = /*#__PURE__*/_jsx("span", {
|
|
43
34
|
children: "(or"
|
|
44
35
|
})), " ", key, "C", _span2 || (_span2 = /*#__PURE__*/_jsx("span", {
|
|
45
36
|
children: ")"
|
|
46
37
|
}))]
|
|
47
38
|
})]
|
|
48
|
-
})
|
|
39
|
+
})
|
|
49
40
|
});
|
|
50
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
|
});
|