@mui/docs 6.0.0-dev.240424162023-9968b4889d → 6.0.0

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.
Files changed (125) hide show
  1. package/Ad/Ad.d.ts +6 -0
  2. package/Ad/Ad.js +228 -0
  3. package/Ad/AdCarbon.d.ts +3 -0
  4. package/Ad/AdCarbon.js +120 -0
  5. package/Ad/AdDisplay.d.ts +16 -0
  6. package/Ad/AdDisplay.js +89 -0
  7. package/Ad/AdGuest.d.ts +10 -0
  8. package/Ad/AdGuest.js +29 -0
  9. package/Ad/AdInHouse.d.ts +5 -0
  10. package/Ad/AdInHouse.js +15 -0
  11. package/Ad/AdManager.d.ts +16 -0
  12. package/Ad/AdManager.js +36 -0
  13. package/Ad/AdProvider.d.ts +15 -0
  14. package/Ad/AdProvider.js +24 -0
  15. package/Ad/ad.styles.d.ts +4327 -0
  16. package/Ad/ad.styles.js +89 -0
  17. package/Ad/index.d.ts +5 -0
  18. package/Ad/index.js +7 -0
  19. package/Ad/package.json +6 -0
  20. package/CHANGELOG.md +1367 -22
  21. package/CodeCopy/CodeCopy.js +1 -1
  22. package/CodeCopy/CodeCopyButton.js +11 -20
  23. package/CodeCopy/index.js +3 -3
  24. package/CodeCopy/useClipboardCopy.js +1 -1
  25. package/ComponentLinkHeader/ComponentLinkHeader.d.ts +9 -0
  26. package/ComponentLinkHeader/ComponentLinkHeader.js +197 -0
  27. package/ComponentLinkHeader/index.d.ts +2 -0
  28. package/ComponentLinkHeader/index.js +2 -0
  29. package/ComponentLinkHeader/package.json +6 -0
  30. package/DocsProvider/DocsProvider.d.ts +3 -1
  31. package/DocsProvider/DocsProvider.js +10 -5
  32. package/DocsProvider/index.js +1 -1
  33. package/HighlightedCode/HighlightedCode.d.ts +3 -1
  34. package/HighlightedCode/HighlightedCode.js +50 -24
  35. package/HighlightedCode/index.js +1 -1
  36. package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.d.ts +29 -0
  37. package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.js +355 -0
  38. package/HighlightedCodeWithTabs/index.d.ts +2 -0
  39. package/HighlightedCodeWithTabs/index.js +2 -0
  40. package/HighlightedCodeWithTabs/package.json +6 -0
  41. package/InfoCard/InfoCard.d.ts +0 -1
  42. package/InfoCard/InfoCard.js +46 -45
  43. package/InfoCard/index.js +1 -1
  44. package/Link/Link.js +41 -41
  45. package/Link/index.js +1 -1
  46. package/MarkdownElement/MarkdownElement.d.ts +1 -0
  47. package/MarkdownElement/MarkdownElement.js +187 -165
  48. package/MarkdownElement/index.js +1 -1
  49. package/NProgressBar/NProgressBar.js +6 -7
  50. package/NProgressBar/index.js +1 -1
  51. package/README.md +2 -2
  52. package/SectionTitle/SectionTitle.d.ts +7 -0
  53. package/SectionTitle/SectionTitle.js +30 -0
  54. package/SectionTitle/index.d.ts +1 -0
  55. package/SectionTitle/index.js +1 -0
  56. package/SectionTitle/package.json +6 -0
  57. package/branding/BrandingProvider.d.ts +1 -1
  58. package/branding/BrandingProvider.js +1 -1
  59. package/branding/brandingTheme.d.ts +2 -2
  60. package/branding/brandingTheme.js +657 -369
  61. package/branding/index.js +2 -2
  62. package/i18n/i18n.d.ts +2 -1
  63. package/i18n/i18n.js +19 -9
  64. package/i18n/index.js +1 -1
  65. package/node/Ad/Ad.js +238 -0
  66. package/node/Ad/AdCarbon.js +130 -0
  67. package/node/Ad/AdDisplay.js +97 -0
  68. package/node/Ad/AdGuest.js +37 -0
  69. package/node/Ad/AdInHouse.js +24 -0
  70. package/node/Ad/AdManager.js +46 -0
  71. package/node/Ad/AdProvider.js +33 -0
  72. package/node/Ad/ad.styles.js +97 -0
  73. package/node/Ad/index.js +63 -0
  74. package/node/CodeCopy/CodeCopy.js +10 -16
  75. package/node/CodeCopy/CodeCopyButton.js +10 -19
  76. package/node/CodeCopy/useClipboardCopy.js +1 -1
  77. package/node/ComponentLinkHeader/ComponentLinkHeader.js +206 -0
  78. package/node/ComponentLinkHeader/index.js +24 -0
  79. package/node/DocsProvider/DocsProvider.js +9 -4
  80. package/node/HighlightedCode/HighlightedCode.js +48 -22
  81. package/node/HighlightedCodeWithTabs/HighlightedCodeWithTabs.js +365 -0
  82. package/node/HighlightedCodeWithTabs/index.js +24 -0
  83. package/node/InfoCard/InfoCard.js +45 -44
  84. package/node/Link/Link.js +43 -42
  85. package/node/MarkdownElement/MarkdownElement.js +642 -623
  86. package/node/NProgressBar/NProgressBar.js +6 -7
  87. package/node/SectionTitle/SectionTitle.js +38 -0
  88. package/node/SectionTitle/index.js +16 -0
  89. package/node/branding/brandingTheme.js +657 -369
  90. package/node/i18n/i18n.js +18 -8
  91. package/node/svgIcons/AdobeXDIcon.js +22 -0
  92. package/node/svgIcons/BundleSizeIcon.js +22 -0
  93. package/node/svgIcons/FigmaIcon.js +31 -0
  94. package/node/svgIcons/FileDownload.js +3 -3
  95. package/node/svgIcons/JavaScript.js +3 -3
  96. package/node/svgIcons/MaterialDesignIcon.js +27 -0
  97. package/node/svgIcons/SketchIcon.js +36 -0
  98. package/node/svgIcons/TypeScript.js +3 -3
  99. package/node/svgIcons/W3CIcon.js +24 -0
  100. package/node/translations/translations.json +9 -4
  101. package/node/utils/loadScript.js +15 -0
  102. package/package.json +12 -10
  103. package/svgIcons/AdobeXDIcon.d.ts +4 -0
  104. package/svgIcons/AdobeXDIcon.js +14 -0
  105. package/svgIcons/BundleSizeIcon.d.ts +4 -0
  106. package/svgIcons/BundleSizeIcon.js +14 -0
  107. package/svgIcons/FigmaIcon.d.ts +4 -0
  108. package/svgIcons/FigmaIcon.js +23 -0
  109. package/svgIcons/FileDownload.d.ts +7 -0
  110. package/svgIcons/FileDownload.js +3 -3
  111. package/svgIcons/JavaScript.d.ts +7 -0
  112. package/svgIcons/JavaScript.js +3 -3
  113. package/svgIcons/MaterialDesignIcon.d.ts +4 -0
  114. package/svgIcons/MaterialDesignIcon.js +19 -0
  115. package/svgIcons/SketchIcon.d.ts +4 -0
  116. package/svgIcons/SketchIcon.js +28 -0
  117. package/svgIcons/TypeScript.d.ts +7 -0
  118. package/svgIcons/TypeScript.js +3 -3
  119. package/svgIcons/W3CIcon.d.ts +4 -0
  120. package/svgIcons/W3CIcon.js +16 -0
  121. package/translations/index.js +1 -1
  122. package/translations/translations.json +9 -4
  123. package/tsconfig.build.tsbuildinfo +1 -1
  124. package/utils/loadScript.d.ts +1 -0
  125. package/utils/loadScript.js +9 -0
@@ -0,0 +1,355 @@
1
+ import * as React from 'react';
2
+ import { styled, alpha } from '@mui/material/styles';
3
+ import { Tabs } from '@mui/base/Tabs';
4
+ import { TabsList as TabsListBase } from '@mui/base/TabsList';
5
+ import { TabPanel as TabPanelBase } from '@mui/base/TabPanel';
6
+ import { Tab as TabBase } from '@mui/base/Tab';
7
+ import useLocalStorageState from '@mui/utils/useLocalStorageState';
8
+ import { HighlightedCode } from "../HighlightedCode/index.js";
9
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
+ export const CodeTabList = styled(TabsListBase)(({
11
+ theme
12
+ }) => ({
13
+ display: 'flex',
14
+ gap: theme.spacing(0.5),
15
+ borderLeft: '1px solid',
16
+ borderRight: '1px solid',
17
+ overflowX: 'auto',
18
+ ...theme.applyDarkStyles({
19
+ backgroundColor: alpha(theme.palette.primaryDark[800], 0.2)
20
+ }),
21
+ variants: [{
22
+ props: ({
23
+ ownerState
24
+ }) => ownerState?.contained,
25
+ style: {
26
+ padding: theme.spacing(1.5, 1)
27
+ }
28
+ }, {
29
+ props: ({
30
+ ownerState
31
+ }) => !ownerState?.contained,
32
+ style: {
33
+ padding: theme.spacing(1)
34
+ }
35
+ }, {
36
+ props: ({
37
+ ownerState
38
+ }) => ownerState?.contained,
39
+ style: {
40
+ borderTop: 'none'
41
+ }
42
+ }, {
43
+ props: ({
44
+ ownerState
45
+ }) => !ownerState?.contained,
46
+ style: {
47
+ borderTop: '1px solid'
48
+ }
49
+ }, {
50
+ props: ({
51
+ ownerState
52
+ }) => ownerState?.contained,
53
+ style: {
54
+ borderBottom: 'none'
55
+ }
56
+ }, {
57
+ props: ({
58
+ ownerState
59
+ }) => !ownerState?.contained,
60
+ style: {
61
+ borderBottom: '1px solid'
62
+ }
63
+ }, {
64
+ props: ({
65
+ ownerState
66
+ }) => ownerState?.contained,
67
+ style: {
68
+ borderTopLeftRadius: 0
69
+ }
70
+ }, {
71
+ props: ({
72
+ ownerState
73
+ }) => !ownerState?.contained,
74
+ style: {
75
+ borderTopLeftRadius: (theme.vars || theme).shape.borderRadius
76
+ }
77
+ }, {
78
+ props: ({
79
+ ownerState
80
+ }) => ownerState?.contained,
81
+ style: {
82
+ borderTopRightRadius: 0
83
+ }
84
+ }, {
85
+ props: ({
86
+ ownerState
87
+ }) => !ownerState?.contained,
88
+ style: {
89
+ borderTopRightRadius: (theme.vars || theme).shape.borderRadius
90
+ }
91
+ }, {
92
+ props: ({
93
+ ownerState
94
+ }) => ownerState?.contained,
95
+ style: {
96
+ borderColor: (theme.vars || theme).palette.divider
97
+ }
98
+ }, {
99
+ props: ({
100
+ ownerState
101
+ }) => !ownerState?.contained,
102
+ style: {
103
+ borderColor: (theme.vars || theme).palette.primaryDark[700]
104
+ }
105
+ }, {
106
+ props: ({
107
+ ownerState
108
+ }) => ownerState?.contained,
109
+ style: {
110
+ backgroundColor: alpha(theme.palette.grey[50], 0.2)
111
+ }
112
+ }, {
113
+ props: ({
114
+ ownerState
115
+ }) => !ownerState?.contained,
116
+ style: {
117
+ backgroundColor: (theme.vars || theme).palette.primaryDark[900]
118
+ }
119
+ }]
120
+ }));
121
+ export const CodeTabPanel = styled(TabPanelBase)({
122
+ '& pre': {
123
+ borderTopLeftRadius: 0,
124
+ borderTopRightRadius: 0,
125
+ '& code': {}
126
+ },
127
+ variants: [{
128
+ props: ({
129
+ ownerState
130
+ }) => ownerState?.contained,
131
+ style: {
132
+ marginTop: -1
133
+ }
134
+ }, {
135
+ props: ({
136
+ ownerState
137
+ }) => !ownerState?.contained,
138
+ style: {
139
+ marginTop: 0
140
+ }
141
+ }, {
142
+ props: ({
143
+ ownerState
144
+ }) => ownerState?.contained,
145
+ style: {
146
+ '& pre': {
147
+ marginTop: 0
148
+ }
149
+ }
150
+ }, {
151
+ props: ({
152
+ ownerState
153
+ }) => !ownerState?.contained,
154
+ style: {
155
+ '& pre': {
156
+ marginTop: -1
157
+ }
158
+ }
159
+ }, {
160
+ props: ({
161
+ ownerState
162
+ }) => ownerState.mounted,
163
+ style: {
164
+ '& pre': {
165
+ '& code': {
166
+ opacity: 1
167
+ }
168
+ }
169
+ }
170
+ }, {
171
+ props: ({
172
+ ownerState
173
+ }) => !ownerState.mounted,
174
+ style: {
175
+ '& pre': {
176
+ '& code': {
177
+ opacity: 0
178
+ }
179
+ }
180
+ }
181
+ }]
182
+ });
183
+ export const CodeTab = styled(TabBase)(({
184
+ theme
185
+ }) => ({
186
+ variants: [{
187
+ props: ({
188
+ ownerState
189
+ }) => ownerState?.contained,
190
+ style: {
191
+ border: '1px solid transparent',
192
+ fontSize: theme.typography.pxToRem(13)
193
+ }
194
+ }, {
195
+ props: ({
196
+ ownerState
197
+ }) => !ownerState?.contained,
198
+ style: {
199
+ border: 'none',
200
+ fontSize: theme.typography.pxToRem(12)
201
+ }
202
+ }, {
203
+ props: ({
204
+ ownerState
205
+ }) => ownerState?.contained,
206
+ style: {
207
+ color: (theme.vars || theme).palette.text.tertiary
208
+ }
209
+ }, {
210
+ props: ({
211
+ ownerState
212
+ }) => !ownerState?.contained,
213
+ style: {
214
+ color: (theme.vars || theme).palette.grey[500]
215
+ }
216
+ }, {
217
+ props: ({
218
+ ownerState
219
+ }) => ownerState?.contained,
220
+ style: {
221
+ fontFamily: theme.typography.fontFamily
222
+ }
223
+ }, {
224
+ props: ({
225
+ ownerState
226
+ }) => !ownerState?.contained,
227
+ style: {
228
+ fontFamily: theme.typography.fontFamilyCode
229
+ }
230
+ }, {
231
+ props: ({
232
+ ownerState
233
+ }) => ownerState?.contained,
234
+ style: {
235
+ fontWeight: theme.typography.fontWeightMedium
236
+ }
237
+ }, {
238
+ props: ({
239
+ ownerState
240
+ }) => !ownerState?.contained,
241
+ style: {
242
+ fontWeight: theme.typography.fontWeightBold
243
+ }
244
+ }, {
245
+ props: ({
246
+ ownerState
247
+ }) => ownerState?.contained,
248
+ style: {
249
+ transition: 'background, color, 100ms ease'
250
+ }
251
+ }, {
252
+ props: ({
253
+ ownerState
254
+ }) => !ownerState?.contained,
255
+ style: {
256
+ transition: 'unset'
257
+ }
258
+ }, {
259
+ props: ({
260
+ ownerState
261
+ }) => !ownerState?.contained,
262
+ style: {
263
+ '&:hover': {
264
+ backgroundColor: alpha(theme.palette.primaryDark[500], 0.5),
265
+ color: (theme.vars || theme).palette.grey[400]
266
+ }
267
+ }
268
+ }, {
269
+ props: ({
270
+ ownerState
271
+ }) => !ownerState?.contained && ownerState.mounted,
272
+ style: {
273
+ '&.base--selected': {
274
+ color: '#FFF',
275
+ '&::after': {
276
+ content: "''",
277
+ position: 'absolute',
278
+ left: 0,
279
+ bottom: '-8px',
280
+ height: 2,
281
+ width: '100%',
282
+ bgcolor: (theme.vars || theme).palette.primary.light
283
+ }
284
+ }
285
+ }
286
+ }],
287
+ ...theme.unstable_sx({
288
+ flex: '0 0 auto',
289
+ height: 26,
290
+ p: '2px 8px',
291
+ bgcolor: 'transparent',
292
+ lineHeight: 1.2,
293
+ outline: 'none',
294
+ minWidth: 45,
295
+ cursor: 'pointer',
296
+ borderRadius: 99,
297
+ position: 'relative',
298
+ '&:hover': {
299
+ backgroundColor: (theme.vars || theme).palette.divider
300
+ },
301
+ '&:focus-visible': {
302
+ outline: '3px solid',
303
+ outlineOffset: '1px',
304
+ outlineColor: (theme.vars || theme).palette.primary.light
305
+ }
306
+ })
307
+ }));
308
+ export function HighlightedCodeWithTabs(props) {
309
+ const {
310
+ tabs,
311
+ storageKey
312
+ } = props;
313
+ const availableTabs = React.useMemo(() => tabs.map(({
314
+ tab
315
+ }) => tab), [tabs]);
316
+ const [activeTab, setActiveTab] = useLocalStorageState(storageKey ?? null, availableTabs[0]);
317
+ // During hydration, activeTab is null, default to first value.
318
+ const defaultizedActiveTab = activeTab ?? availableTabs[0];
319
+ const [mounted, setMounted] = React.useState(false);
320
+ React.useEffect(() => {
321
+ setMounted(true);
322
+ }, []);
323
+ const handleChange = (event, newValue) => {
324
+ setActiveTab(newValue);
325
+ };
326
+ const ownerState = {
327
+ mounted
328
+ };
329
+ return /*#__PURE__*/_jsxs(Tabs, {
330
+ selectionFollowsFocus: true,
331
+ value: defaultizedActiveTab,
332
+ onChange: handleChange,
333
+ children: [/*#__PURE__*/_jsx(CodeTabList, {
334
+ ownerState: ownerState,
335
+ children: tabs.map(({
336
+ tab
337
+ }) => /*#__PURE__*/_jsx(CodeTab, {
338
+ ownerState: ownerState,
339
+ value: tab,
340
+ children: tab
341
+ }, tab))
342
+ }), tabs.map(({
343
+ tab,
344
+ language,
345
+ code
346
+ }) => /*#__PURE__*/_jsx(CodeTabPanel, {
347
+ ownerState: ownerState,
348
+ value: tab,
349
+ children: /*#__PURE__*/_jsx(HighlightedCode, {
350
+ language: language || 'bash',
351
+ code: typeof code === 'function' ? code(tab) : code
352
+ })
353
+ }, tab))]
354
+ });
355
+ }
@@ -0,0 +1,2 @@
1
+ export * from './HighlightedCodeWithTabs';
2
+ export { HighlightedCodeWithTabs as default } from './HighlightedCodeWithTabs';
@@ -0,0 +1,2 @@
1
+ export * from "./HighlightedCodeWithTabs.js";
2
+ export { HighlightedCodeWithTabs as default } from "./HighlightedCodeWithTabs.js";
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "./index.js",
4
+ "main": "../node/HighlightedCodeWithTabs/index.js",
5
+ "types": "./index.d.ts"
6
+ }
@@ -8,7 +8,6 @@ export declare function GlowingIconContainer({ icon }: GlowingIconContainerProps
8
8
  interface InfoCardProps {
9
9
  classNameDescription?: string;
10
10
  classNameTitle?: string;
11
- dense?: boolean;
12
11
  description?: string;
13
12
  icon?: React.ReactNode;
14
13
  link?: string;
@@ -1,20 +1,17 @@
1
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
- import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["classNameDescription", "classNameTitle", "dense", "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';
7
4
  import Paper from '@mui/material/Paper';
8
5
  import Typography from '@mui/material/Typography';
9
- import { Link } from '../Link';
6
+ import { Link } from "../Link/index.js";
10
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
8
  export function GlowingIconContainer({
12
9
  icon
13
10
  }) {
14
11
  return /*#__PURE__*/_jsx(Box, {
15
- sx: theme => _extends({
16
- width: 40,
17
- height: 40,
12
+ sx: theme => ({
13
+ width: 36,
14
+ height: 36,
18
15
  display: 'flex',
19
16
  justifyContent: 'center',
20
17
  alignItems: 'center',
@@ -23,64 +20,68 @@ export function GlowingIconContainer({
23
20
  border: '1px solid',
24
21
  borderColor: 'primary.200',
25
22
  bgcolor: 'primary.50',
26
- boxShadow: `0px 0 0 2px ${alpha(theme.palette.primary[500], 0.1)}, 0px 2px 12px 0px rgba(234, 237, 241, 0.3) inset`
27
- }, theme.applyDarkStyles({
28
- borderColor: alpha(theme.palette.primary[400], 0.25),
29
- bgcolor: alpha(theme.palette.primary[900], 0.4),
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
- })),
23
+ boxShadow: `0px 0 0 2px ${alpha(theme.palette.primary[500], 0.1)}, 0px 2px 12px 0px rgba(234, 237, 241, 0.3) inset`,
24
+ '& .MuiSvgIcon-root': {
25
+ fontSize: theme.typography.pxToRem(18)
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
+ }),
32
33
  children: icon
33
34
  });
34
35
  }
35
36
  export function InfoCard(props) {
36
37
  const {
37
- classNameDescription,
38
- classNameTitle,
39
- dense,
40
- description,
41
- icon,
42
- link,
43
- svg,
44
- title,
45
- titleProps
46
- } = props,
47
- other = _objectWithoutPropertiesLoose(props, _excluded);
48
- return /*#__PURE__*/_jsxs(Paper, _extends({
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, {
49
49
  variant: "outlined",
50
50
  component: link ? Link : 'div',
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 => _extends({
58
- p: dense ? 2.5 : 3.5,
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 => ({
58
+ p: 2.5,
59
59
  height: '100%',
60
- background: `${(theme.vars || theme).palette.gradients.linearSubtle}`
61
- }, theme.applyDarkStyles({
62
- bgcolor: alpha(theme.palette.primaryDark[800], 0.25),
63
60
  background: `${(theme.vars || theme).palette.gradients.linearSubtle}`,
64
- borderColor: 'primaryDark.700'
65
- }))
66
- }, other, {
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,
67
68
  children: [svg && svg, icon && /*#__PURE__*/_jsx(GlowingIconContainer, {
68
69
  icon: icon
69
- }), /*#__PURE__*/_jsx(Typography, _extends({
70
- fontWeight: "bold",
70
+ }), /*#__PURE__*/_jsx(Typography, {
71
+ fontWeight: "semiBold",
71
72
  component: "h3",
72
73
  color: "text.primary",
73
74
  variant: "body2",
74
75
  mt: icon ? 2 : 0,
75
76
  mb: description ? 0.5 : 0,
76
- className: classNameTitle
77
- }, titleProps, {
77
+ className: classNameTitle,
78
+ ...titleProps,
78
79
  children: title
79
- })), /*#__PURE__*/_jsx(Typography, {
80
+ }), /*#__PURE__*/_jsx(Typography, {
80
81
  variant: "body2",
81
82
  color: "text.secondary",
82
83
  className: classNameDescription,
83
84
  children: description
84
85
  })]
85
- }));
86
+ });
86
87
  }
package/InfoCard/index.js CHANGED
@@ -1 +1 @@
1
- export * from './InfoCard';
1
+ export * from "./InfoCard.js";
package/Link/Link.js CHANGED
@@ -1,15 +1,11 @@
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';
8
4
  import NextLink from 'next/link';
9
5
  import MuiLink from '@mui/material/Link';
10
6
  import { styled } from '@mui/material/styles';
11
- import { useUserLanguage } from '../i18n';
12
- import { useDocsConfig } from '../DocsProvider';
7
+ import { useUserLanguage } from "../i18n/index.js";
8
+ import { useDocsConfig } from "../DocsProvider/index.js";
13
9
 
14
10
  /**
15
11
  * File to keep in sync with:
@@ -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
- to,
28
- linkAs,
29
- replace,
30
- scroll,
31
- shallow,
32
- prefetch,
33
- legacyBehavior = true,
34
- locale
35
- } = props,
36
- other = _objectWithoutPropertiesLoose(props, _excluded);
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,31 @@ const NextLinkComposed = /*#__PURE__*/React.forwardRef(function NextLinkComposed
44
40
  passHref: true,
45
41
  locale: locale,
46
42
  legacyBehavior: legacyBehavior,
47
- children: /*#__PURE__*/_jsx(Anchor, _extends({
43
+ children: /*#__PURE__*/_jsx(Anchor, {
48
44
  "data-no-markdown-link": "true",
49
- ref: ref
50
- }, other))
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
- activeClassName = 'active',
58
- as,
59
- className: classNameProps,
60
- href,
61
- legacyBehavior,
62
- linkAs: linkAsProp,
63
- locale,
64
- noLinkStyle,
65
- prefetch,
66
- replace,
67
- // Link don't have roles.
68
- scroll,
69
- shallow
70
- } = props,
71
- other = _objectWithoutPropertiesLoose(props, _excluded2);
54
+ activeClassName = 'active',
55
+ as,
56
+ className: classNameProps,
57
+ href,
58
+ legacyBehavior,
59
+ linkAs: linkAsProp,
60
+ locale,
61
+ noLinkStyle,
62
+ prefetch,
63
+ replace,
64
+ scroll,
65
+ shallow,
66
+ ...other
67
+ } = props;
72
68
  const router = useRouter();
73
69
  const pathname = typeof href === 'string' ? href : href?.pathname;
74
70
  const routerPathname = router.pathname.replace('/[docsTab]', '');
@@ -79,7 +75,7 @@ export const Link = /*#__PURE__*/React.forwardRef(function Link(props, ref) {
79
75
  LANGUAGES_IGNORE_PAGES
80
76
  } = useDocsConfig();
81
77
  let linkAs = linkAsProp || as || href;
82
- if (userLanguage !== 'en' && pathname && pathname.indexOf('/') === 0 && !LANGUAGES_IGNORE_PAGES(pathname) && !pathname.startsWith(`/${userLanguage}/`)) {
78
+ if (userLanguage !== 'en' && pathname && pathname.startsWith('/') && !LANGUAGES_IGNORE_PAGES(pathname) && !pathname.startsWith(`/${userLanguage}/`)) {
83
79
  linkAs = `/${userLanguage}${linkAs}`;
84
80
  }
85
81
  const nextjsProps = {
@@ -93,14 +89,18 @@ export const Link = /*#__PURE__*/React.forwardRef(function Link(props, ref) {
93
89
  locale
94
90
  };
95
91
  if (noLinkStyle) {
96
- return /*#__PURE__*/_jsx(NextLinkComposed, _extends({
92
+ return /*#__PURE__*/_jsx(NextLinkComposed, {
97
93
  className: className,
98
- ref: ref
99
- }, nextjsProps, other));
94
+ ref: ref,
95
+ ...nextjsProps,
96
+ ...other
97
+ });
100
98
  }
101
- return /*#__PURE__*/_jsx(MuiLink, _extends({
99
+ return /*#__PURE__*/_jsx(MuiLink, {
102
100
  component: NextLinkComposed,
103
101
  className: className,
104
- ref: ref
105
- }, nextjsProps, other));
102
+ ref: ref,
103
+ ...nextjsProps,
104
+ ...other
105
+ });
106
106
  });
package/Link/index.js CHANGED
@@ -1 +1 @@
1
- export * from './Link';
1
+ export * from "./Link.js";
@@ -2,5 +2,6 @@ import * as React from 'react';
2
2
  export interface MarkdownElementProps {
3
3
  className?: string;
4
4
  renderedMarkdown?: string;
5
+ children?: React.ReactNode;
5
6
  }
6
7
  export declare const MarkdownElement: React.ForwardRefExoticComponent<MarkdownElementProps & React.RefAttributes<HTMLDivElement>>;