@mui/docs 6.0.0-alpha.0 → 6.0.0-alpha.10

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 (106) hide show
  1. package/CHANGELOG.md +591 -6
  2. package/CodeCopy/CodeCopy.d.ts +20 -0
  3. package/CodeCopy/CodeCopy.js +172 -0
  4. package/CodeCopy/CodeCopyButton.d.ts +5 -0
  5. package/CodeCopy/CodeCopyButton.js +41 -0
  6. package/CodeCopy/index.d.ts +3 -0
  7. package/CodeCopy/index.js +3 -0
  8. package/CodeCopy/package.json +6 -0
  9. package/CodeCopy/useClipboardCopy.d.ts +4 -0
  10. package/CodeCopy/useClipboardCopy.js +21 -0
  11. package/ComponentLinkHeader/ComponentLinkHeader.d.ts +9 -0
  12. package/ComponentLinkHeader/ComponentLinkHeader.js +179 -0
  13. package/ComponentLinkHeader/index.d.ts +2 -0
  14. package/ComponentLinkHeader/index.js +2 -0
  15. package/ComponentLinkHeader/package.json +6 -0
  16. package/HighlightedCode/HighlightedCode.d.ts +14 -0
  17. package/HighlightedCode/HighlightedCode.js +68 -0
  18. package/HighlightedCode/index.d.ts +1 -0
  19. package/HighlightedCode/index.js +1 -0
  20. package/HighlightedCode/package.json +6 -0
  21. package/InfoCard/InfoCard.d.ts +20 -0
  22. package/InfoCard/InfoCard.js +87 -0
  23. package/InfoCard/index.d.ts +1 -0
  24. package/InfoCard/index.js +1 -0
  25. package/InfoCard/package.json +6 -0
  26. package/Link/Link.js +40 -38
  27. package/MarkdownElement/MarkdownElement.d.ts +6 -0
  28. package/MarkdownElement/MarkdownElement.js +825 -0
  29. package/MarkdownElement/index.d.ts +1 -0
  30. package/MarkdownElement/index.js +1 -0
  31. package/MarkdownElement/package.json +6 -0
  32. package/NProgressBar/NProgressBar.js +6 -7
  33. package/SectionTitle/SectionTitle.d.ts +7 -0
  34. package/SectionTitle/SectionTitle.js +30 -0
  35. package/SectionTitle/index.d.ts +1 -0
  36. package/SectionTitle/index.js +1 -0
  37. package/SectionTitle/package.json +6 -0
  38. package/branding/BrandingProvider.d.ts +9 -0
  39. package/branding/BrandingProvider.js +17 -0
  40. package/branding/brandingTheme.d.ts +152 -0
  41. package/branding/brandingTheme.js +1346 -0
  42. package/branding/index.d.ts +2 -0
  43. package/branding/index.js +2 -0
  44. package/branding/package.json +6 -0
  45. package/node/CodeCopy/CodeCopy.js +188 -0
  46. package/node/CodeCopy/CodeCopyButton.js +50 -0
  47. package/node/CodeCopy/index.js +40 -0
  48. package/node/CodeCopy/useClipboardCopy.js +30 -0
  49. package/node/ComponentLinkHeader/ComponentLinkHeader.js +189 -0
  50. package/node/ComponentLinkHeader/index.js +24 -0
  51. package/node/HighlightedCode/HighlightedCode.js +77 -0
  52. package/node/HighlightedCode/index.js +16 -0
  53. package/node/InfoCard/InfoCard.js +97 -0
  54. package/node/InfoCard/index.js +16 -0
  55. package/node/Link/Link.js +43 -40
  56. package/node/MarkdownElement/MarkdownElement.js +837 -0
  57. package/node/MarkdownElement/index.js +16 -0
  58. package/node/NProgressBar/NProgressBar.js +6 -7
  59. package/node/SectionTitle/SectionTitle.js +38 -0
  60. package/node/SectionTitle/index.js +16 -0
  61. package/node/branding/BrandingProvider.js +25 -0
  62. package/node/branding/brandingTheme.js +1357 -0
  63. package/node/branding/index.js +27 -0
  64. package/node/svgIcons/AdobeXDIcon.js +22 -0
  65. package/node/svgIcons/BundleSizeIcon.js +22 -0
  66. package/node/svgIcons/FigmaIcon.js +31 -0
  67. package/node/svgIcons/FileDownload.js +3 -3
  68. package/node/svgIcons/JavaScript.js +3 -3
  69. package/node/svgIcons/MaterialDesignIcon.js +27 -0
  70. package/node/svgIcons/SketchIcon.js +36 -0
  71. package/node/svgIcons/TypeScript.js +3 -3
  72. package/node/svgIcons/W3CIcon.js +24 -0
  73. package/node/translations/translations.json +216 -0
  74. package/package.json +11 -8
  75. package/svgIcons/AdobeXDIcon.d.ts +4 -0
  76. package/svgIcons/AdobeXDIcon.js +14 -0
  77. package/svgIcons/BundleSizeIcon.d.ts +4 -0
  78. package/svgIcons/BundleSizeIcon.js +14 -0
  79. package/svgIcons/FigmaIcon.d.ts +4 -0
  80. package/svgIcons/FigmaIcon.js +23 -0
  81. package/svgIcons/FileDownload.d.ts +7 -0
  82. package/svgIcons/FileDownload.js +3 -3
  83. package/svgIcons/JavaScript.d.ts +7 -0
  84. package/svgIcons/JavaScript.js +3 -3
  85. package/svgIcons/MaterialDesignIcon.d.ts +4 -0
  86. package/svgIcons/MaterialDesignIcon.js +19 -0
  87. package/svgIcons/SketchIcon.d.ts +4 -0
  88. package/svgIcons/SketchIcon.js +28 -0
  89. package/svgIcons/TypeScript.d.ts +7 -0
  90. package/svgIcons/TypeScript.js +3 -3
  91. package/svgIcons/W3CIcon.d.ts +4 -0
  92. package/svgIcons/W3CIcon.js +16 -0
  93. package/translations/translations.json +4 -2
  94. package/tsconfig.build.tsbuildinfo +1 -1
  95. package/legacy/DocsProvider/DocsProvider.js +0 -25
  96. package/legacy/DocsProvider/index.js +0 -1
  97. package/legacy/Link/Link.js +0 -101
  98. package/legacy/Link/index.js +0 -1
  99. package/legacy/NProgressBar/NProgressBar.js +0 -80
  100. package/legacy/NProgressBar/index.js +0 -1
  101. package/legacy/i18n/i18n.js +0 -105
  102. package/legacy/i18n/index.js +0 -1
  103. package/legacy/svgIcons/FileDownload.js +0 -14
  104. package/legacy/svgIcons/JavaScript.js +0 -14
  105. package/legacy/svgIcons/TypeScript.js +0 -14
  106. package/legacy/translations/index.js +0 -4
@@ -0,0 +1,825 @@
1
+ import * as React from 'react';
2
+ import clsx from 'clsx';
3
+ import { alpha, darken, styled } from '@mui/material/styles';
4
+ import { brandingDarkTheme as darkTheme, brandingLightTheme as lightTheme } from '../branding';
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ const Root = styled('div')(({
7
+ theme
8
+ }) => ({
9
+ ...lightTheme.typography.body1,
10
+ lineHeight: 1.6,
11
+ // Increased compared to the 1.5 default to make the docs easier to read.
12
+ color: `var(--muidocs-palette-text-primary, ${lightTheme.palette.text.primary})`,
13
+ '& :focus-visible': {
14
+ outline: `3px solid ${alpha(lightTheme.palette.primary[500], 0.5)}`,
15
+ outlineOffset: 2
16
+ },
17
+ '& strong': {
18
+ color: `var(--muidocs-palette-text-primary, ${lightTheme.palette.text.primary})`
19
+ },
20
+ wordBreak: 'break-word',
21
+ '& pre': {
22
+ lineHeight: 1.5,
23
+ // Developers like when the code is dense.
24
+ margin: theme.spacing(2, 'auto'),
25
+ padding: theme.spacing(2),
26
+ backgroundColor: 'hsl(210, 35%, 9%)',
27
+ // 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.
28
+ color: 'hsl(60, 30%, 96%)',
29
+ colorScheme: 'dark',
30
+ borderRadius: `var(--muidocs-shape-borderRadius, ${theme.shape?.borderRadius ?? lightTheme.shape.borderRadius}px)`,
31
+ border: '1px solid',
32
+ borderColor: `var(--muidocs-palette-primaryDark-700, ${lightTheme.palette.primaryDark[700]})`,
33
+ overflow: 'auto',
34
+ WebkitOverflowScrolling: 'touch',
35
+ fontSize: lightTheme.typography.pxToRem(13),
36
+ maxWidth: 'calc(100vw - 32px)',
37
+ maxHeight: '400px',
38
+ [lightTheme.breakpoints.up('md')]: {
39
+ maxWidth: 'calc(100vw - 32px - 16px)'
40
+ }
41
+ },
42
+ '& code': {
43
+ ...lightTheme.typography.body2,
44
+ fontFamily: lightTheme.typography.fontFamilyCode,
45
+ fontWeight: 400,
46
+ WebkitFontSmoothing: 'subpixel-antialiased'
47
+ },
48
+ '& pre > code': {
49
+ // Reset for Safari
50
+ // https://github.com/necolas/normalize.css/blob/master/normalize.css#L102
51
+ fontSize: 'inherit'
52
+ },
53
+ // inline code block
54
+ '& :not(pre) > code': {
55
+ padding: '2px 4px',
56
+ color: `var(--muidocs-palette-text-primary, ${lightTheme.palette.text.primary})`,
57
+ backgroundColor: `var(--muidocs-palette-grey-50, ${lightTheme.palette.grey[50]})`,
58
+ border: '1px solid',
59
+ borderColor: `var(--muidocs-palette-grey-200, ${lightTheme.palette.grey[200]})`,
60
+ borderRadius: 6,
61
+ fontSize: lightTheme.typography.pxToRem(13),
62
+ direction: 'ltr /*! @noflip */',
63
+ boxDecorationBreak: 'clone'
64
+ },
65
+ '& h1': {
66
+ ...lightTheme.typography.h3,
67
+ fontSize: lightTheme.typography.pxToRem(36),
68
+ fontFamily: `"General Sans", ${lightTheme.typography.fontFamilySystem}`,
69
+ margin: '10px 0',
70
+ color: `var(--muidocs-palette-primaryDark-900, ${lightTheme.palette.primaryDark[900]})`,
71
+ fontWeight: 600,
72
+ letterSpacing: -0.2
73
+ },
74
+ '& .description': {
75
+ ...lightTheme.typography.subtitle1,
76
+ fontWeight: 400,
77
+ margin: '0 0 24px'
78
+ },
79
+ '& .component-tabs': {
80
+ margin: '0 0 40px'
81
+ },
82
+ '& h2': {
83
+ ...lightTheme.typography.h5,
84
+ fontFamily: `"General Sans", ${lightTheme.typography.fontFamilySystem}`,
85
+ fontSize: theme.typography.pxToRem(26),
86
+ fontWeight: lightTheme.typography.fontWeightSemiBold,
87
+ color: `var(--muidocs-palette-grey-900, ${lightTheme.palette.grey[900]})`,
88
+ margin: '40px 0 4px'
89
+ },
90
+ '& h3': {
91
+ ...lightTheme.typography.h6,
92
+ fontFamily: `"General Sans", ${lightTheme.typography.fontFamilySystem}`,
93
+ fontSize: theme.typography.pxToRem(20),
94
+ fontWeight: lightTheme.typography.fontWeightSemiBold,
95
+ color: `var(--muidocs-palette-grey-900, ${lightTheme.palette.grey[900]})`,
96
+ margin: '24px 0 4px'
97
+ },
98
+ '& h4': {
99
+ ...lightTheme.typography.subtitle1,
100
+ fontFamily: `"General Sans", ${lightTheme.typography.fontFamilySystem}`,
101
+ fontWeight: lightTheme.typography.fontWeightSemiBold,
102
+ color: `var(--muidocs-palette-grey-900, ${lightTheme.palette.grey[900]})`,
103
+ margin: '20px 0 6px'
104
+ },
105
+ '& h5': {
106
+ ...lightTheme.typography.subtitle2,
107
+ fontFamily: `"General Sans", ${lightTheme.typography.fontFamilySystem}`,
108
+ fontWeight: lightTheme.typography.fontWeightSemiBold,
109
+ color: `var(--muidocs-palette-grey-900, ${lightTheme.palette.grey[900]})`,
110
+ margin: '20px 0 8px'
111
+ },
112
+ '& p': {
113
+ marginTop: 0,
114
+ marginBottom: 16,
115
+ color: `var(--muidocs-palette-grey-900, ${lightTheme.palette.grey[900]})`
116
+ },
117
+ '& ul, & ol': {
118
+ paddingLeft: 30,
119
+ marginTop: 0,
120
+ marginBottom: 16,
121
+ '& ul, & ol': {
122
+ marginBottom: 6
123
+ }
124
+ },
125
+ '& h1, & h2, & h3, & h4': {
126
+ display: 'flex',
127
+ alignItems: 'center',
128
+ gap: 6,
129
+ '& code': {
130
+ fontSize: 'inherit',
131
+ lineHeight: 'inherit',
132
+ // Remove scroll on small screens.
133
+ wordBreak: 'break-all'
134
+ },
135
+ '& .title-link-to-anchor': {
136
+ color: 'inherit',
137
+ textDecoration: 'none',
138
+ position: 'relative',
139
+ display: 'flex',
140
+ alignItems: 'center'
141
+ },
142
+ '& .anchor-icon': {
143
+ // To prevent the link to get the focus.
144
+ display: 'inline-flex',
145
+ alignItems: 'center',
146
+ visibility: 'hidden'
147
+ },
148
+ '& a:not(.title-link-to-anchor):hover': {
149
+ color: 'currentColor',
150
+ border: 'none',
151
+ boxShadow: '0 1px 0 0 currentColor',
152
+ textDecoration: 'none'
153
+ },
154
+ '& .anchor-icon, & .comment-link': {
155
+ padding: 0,
156
+ cursor: 'pointer',
157
+ alignItems: 'center',
158
+ justifyContent: 'center',
159
+ flexShrink: 0,
160
+ textAlign: 'center',
161
+ marginLeft: 8,
162
+ height: 26,
163
+ width: 26,
164
+ backgroundColor: `var(--muidocs-palette-primary-50, ${lightTheme.palette.grey[50]})`,
165
+ color: `var(--muidocs-palette-grey-600, ${lightTheme.palette.grey[600]})`,
166
+ border: '1px solid',
167
+ borderColor: `var(--muidocs-palette-divider, ${lightTheme.palette.divider})`,
168
+ borderRadius: 8,
169
+ '&:hover': {
170
+ backgroundColor: alpha(lightTheme.palette.primary[100], 0.4),
171
+ borderColor: `var(--muidocs-palette-primary-100, ${lightTheme.palette.primary[100]})`,
172
+ color: `var(--muidocs-palette-primary-main, ${lightTheme.palette.primary.main})`
173
+ },
174
+ '& svg': {
175
+ height: 14,
176
+ width: 14,
177
+ fill: 'currentColor',
178
+ pointerEvents: 'none',
179
+ verticalAlign: 'middle'
180
+ }
181
+ },
182
+ '&:hover .anchor-icon': {
183
+ visibility: 'visible'
184
+ },
185
+ '& .comment-link': {
186
+ display: 'none',
187
+ // So we can have the comment button opt-in.
188
+ marginLeft: 'auto',
189
+ transition: theme.transitions.create('opacity', {
190
+ duration: theme.transitions.duration.shortest
191
+ }),
192
+ '& svg': {
193
+ fill: 'currentColor',
194
+ marginRight: 1.5
195
+ }
196
+ }
197
+ },
198
+ '& h1 code, & h2 code, & h3 code': {
199
+ color: `var(--muidocs-palette-grey-900, ${lightTheme.palette.grey[900]})`
200
+ },
201
+ '& h1 code': {
202
+ fontWeight: lightTheme.typography.fontWeightSemiBold
203
+ },
204
+ '& h2 code': {
205
+ fontSize: lightTheme.typography.pxToRem(24),
206
+ fontWeight: lightTheme.typography.fontWeightSemiBold
207
+ },
208
+ '& h3 code': {
209
+ fontSize: lightTheme.typography.pxToRem(18)
210
+ },
211
+ '& table': {
212
+ // Trade display table for scroll overflow
213
+ display: 'block',
214
+ wordBreak: 'normal',
215
+ overflowX: 'auto',
216
+ WebkitOverflowScrolling: 'touch',
217
+ borderCollapse: 'collapse',
218
+ marginBottom: '20px',
219
+ borderSpacing: 0,
220
+ '& .prop-name, & .prop-type, & .prop-default, & .slot-name, & .slot-defaultClass, & .slot-default': {
221
+ fontWeight: 400,
222
+ fontFamily: lightTheme.typography.fontFamilyCode,
223
+ WebkitFontSmoothing: 'subpixel-antialiased',
224
+ fontSize: lightTheme.typography.pxToRem(13)
225
+ },
226
+ '& .required': {
227
+ color: '#006500'
228
+ },
229
+ '& .optional': {
230
+ color: '#45529f'
231
+ },
232
+ '& .prop-type, & .slot-defaultClass': {
233
+ color: '#932981'
234
+ },
235
+ '& .prop-default, & .slot-default': {
236
+ borderBottom: `1px dotted var(--muidocs-palette-divider, ${lightTheme.palette.divider})`
237
+ }
238
+ },
239
+ '& td': {
240
+ ...theme.typography.body2,
241
+ borderBottom: `1px solid var(--muidocs-palette-divider, ${lightTheme.palette.divider})`,
242
+ paddingRight: 20,
243
+ paddingTop: 16,
244
+ paddingBottom: 16,
245
+ color: `var(--muidocs-palette-text-secondary, ${lightTheme.palette.text.secondary})`
246
+ },
247
+ '& td code': {
248
+ lineHeight: 1.6
249
+ },
250
+ '& th': {
251
+ fontSize: theme.typography.pxToRem(14),
252
+ lineHeight: theme.typography.pxToRem(24),
253
+ fontWeight: 500,
254
+ color: `var(--muidocs-palette-text-primary, ${lightTheme.palette.text.primary})`,
255
+ whiteSpace: 'pre',
256
+ borderBottom: `1px solid var(--muidocs-palette-divider, ${lightTheme.palette.divider})`,
257
+ paddingRight: 20,
258
+ paddingTop: 12,
259
+ paddingBottom: 12
260
+ },
261
+ '& blockquote': {
262
+ position: 'relative',
263
+ padding: '0 16px',
264
+ margin: 0,
265
+ borderLeft: '1.5px solid',
266
+ borderColor: `var(--muidocs-palette-grey-200, ${lightTheme.palette.grey[200]})`,
267
+ '& p': {
268
+ fontSize: theme.typography.pxToRem(12.5),
269
+ fontFamily: lightTheme.typography.fontFamilyCode,
270
+ fontWeight: lightTheme.typography.fontWeightMedium,
271
+ lineHeight: theme.typography.pxToRem(24),
272
+ textIndent: 20
273
+ },
274
+ '&::before': {
275
+ position: 'absolute',
276
+ // eslint-disable-next-line material-ui/straight-quotes
277
+ content: '"“"',
278
+ color: `var(--muidocs-palette-grey-300, ${lightTheme.palette.grey[300]})`,
279
+ fontSize: '2.5rem',
280
+ top: 8,
281
+ marginLeft: -6,
282
+ lineHeight: 0.5
283
+ }
284
+ },
285
+ '& .MuiCallout-root': {
286
+ display: 'flex',
287
+ gap: 12,
288
+ padding: '16px',
289
+ margin: '16px 0',
290
+ border: '1px solid',
291
+ color: `var(--muidocs-palette-text-secondary, ${lightTheme.palette.text.secondary})`,
292
+ borderColor: `var(--muidocs-palette-grey-100, ${lightTheme.palette.grey[100]})`,
293
+ borderRadius: `var(--muidocs-shape-borderRadius, ${theme.shape?.borderRadius ?? lightTheme.shape.borderRadius}px)`,
294
+ '& > code': {
295
+ height: 'fit-content',
296
+ backgroundColor: `var(--muidocs-palette-grey-100, ${lightTheme.palette.grey[100]})`,
297
+ borderColor: `var(--muidocs-palette-grey-300, ${lightTheme.palette.grey[300]})`
298
+ },
299
+ '& .MuiCallout-content': {
300
+ minWidth: 0,
301
+ // Allows content to shrink. Useful when callout contains code block
302
+ flexGrow: 1,
303
+ '& > p:last-child, & > ul:last-child': {
304
+ // Avoid margin on last child
305
+ marginBottom: 0
306
+ },
307
+ '& .MuiCode-root': {
308
+ '& > pre': {
309
+ margin: 0,
310
+ marginTop: 4
311
+ }
312
+ },
313
+ '& > ul': {
314
+ // Because of the gap left by the icon, we visually need less padding
315
+ paddingLeft: 22
316
+ }
317
+ },
318
+ '& > svg': {
319
+ marginTop: 2,
320
+ width: 20,
321
+ height: 20,
322
+ flexShrink: 0
323
+ },
324
+ '& > ul, & > p': {
325
+ '&:last-child': {
326
+ margin: 0
327
+ }
328
+ },
329
+ '& ul, li, p': {
330
+ color: 'inherit'
331
+ },
332
+ '&.MuiCallout-error': {
333
+ color: `var(--muidocs-palette-error-900, ${lightTheme.palette.error[900]})`,
334
+ backgroundColor: `var(--muidocs-palette-error-50, ${lightTheme.palette.error[50]})`,
335
+ borderColor: `var(--muidocs-palette-error-100, ${lightTheme.palette.error[100]})`,
336
+ '& strong': {
337
+ color: `var(--muidocs-palette-error-800, ${lightTheme.palette.error[800]})`
338
+ },
339
+ '& > svg': {
340
+ fill: `var(--muidocs-palette-error-500, ${lightTheme.palette.error[600]})`
341
+ },
342
+ '& a': {
343
+ color: `var(--muidocs-palette-error-800, ${lightTheme.palette.error[800]})`,
344
+ textDecorationColor: alpha(lightTheme.palette.error.main, 0.4),
345
+ '&:hover': {
346
+ textDecorationColor: 'inherit'
347
+ }
348
+ }
349
+ },
350
+ '&.MuiCallout-info': {
351
+ color: `var(--muidocs-palette-grey-900, ${lightTheme.palette.grey[900]})`,
352
+ backgroundColor: `var(--muidocs-palette-grey-50, ${lightTheme.palette.grey[50]})`,
353
+ borderColor: `var(--muidocs-palette-grey-100, ${lightTheme.palette.grey[100]})`,
354
+ '& strong': {
355
+ color: `var(--muidocs-palette-primary-800, ${lightTheme.palette.primary[800]})`
356
+ },
357
+ '& > svg': {
358
+ fill: `var(--muidocs-palette-grey-600, ${lightTheme.palette.grey[600]})`
359
+ }
360
+ },
361
+ '&.MuiCallout-success': {
362
+ color: `var(--muidocs-palette-success-900, ${lightTheme.palette.success[900]})`,
363
+ backgroundColor: `var(--muidocs-palette-success-50, ${lightTheme.palette.success[50]})`,
364
+ borderColor: `var(--muidocs-palette-success-100, ${lightTheme.palette.success[100]})`,
365
+ '& strong': {
366
+ color: `var(--muidocs-palette-success-900, ${lightTheme.palette.success[900]})`
367
+ },
368
+ '& > svg': {
369
+ fill: `var(--muidocs-palette-success-600, ${lightTheme.palette.success[600]})`
370
+ },
371
+ '& a': {
372
+ color: `var(--muidocs-palette-success-900, ${lightTheme.palette.success[900]})`,
373
+ textDecorationColor: alpha(lightTheme.palette.success.main, 0.4),
374
+ '&:hover': {
375
+ textDecorationColor: 'inherit'
376
+ }
377
+ }
378
+ },
379
+ '&.MuiCallout-warning': {
380
+ color: `var(--muidocs-palette-grey-900, ${lightTheme.palette.grey[900]})`,
381
+ backgroundColor: alpha(lightTheme.palette.warning[50], 0.5),
382
+ borderColor: alpha(lightTheme.palette.warning[700], 0.15),
383
+ '& strong': {
384
+ color: `var(--muidocs-palette-warning-800, ${lightTheme.palette.warning[800]})`
385
+ },
386
+ '& > svg': {
387
+ fill: `var(--muidocs-palette-warning-600, ${lightTheme.palette.warning[600]})`
388
+ },
389
+ '& a': {
390
+ color: `var(--muidocs-palette-warning-800, ${lightTheme.palette.warning[800]})`,
391
+ textDecorationColor: alpha(lightTheme.palette.warning.main, 0.4),
392
+ '&:hover': {
393
+ textDecorationColor: 'inherit'
394
+ }
395
+ }
396
+ }
397
+ },
398
+ '& a[target="_blank"]::after': {
399
+ content: '""',
400
+ maskImage: `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' focusable='false' aria-hidden='true' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z'%3E%3C/path%3E%3C/svg%3E")`,
401
+ display: 'inline-flex',
402
+ width: '1em',
403
+ height: '1em',
404
+ color: 'inherit',
405
+ backgroundColor: 'currentColor',
406
+ transform: 'translate(0, 2px)',
407
+ transition: 'transform 0.3s cubic-bezier(0.1, 0.8, 0.3, 1)',
408
+ // bounce effect
409
+ opacity: 0.8
410
+ },
411
+ '& a[target="_blank"]:hover::after': {
412
+ opacity: 1,
413
+ transform: 'translate(1px, 0)'
414
+ },
415
+ '& a.remove-link-arrow::after': {
416
+ // Allows to remove link arrows for images
417
+ display: 'none'
418
+ },
419
+ '& .Ad-root a::after': {
420
+ // Remove link arrow for ads
421
+ display: 'none'
422
+ },
423
+ '& a:not(.title-link-to-anchor), & a:not(.title-link-to-anchor) code': {
424
+ // Style taken from the Link component
425
+ color: `var(--muidocs-palette-primary-600, ${lightTheme.palette.primary[600]})`,
426
+ fontWeight: theme.typography.fontWeightMedium,
427
+ textDecoration: 'underline',
428
+ textDecorationColor: alpha(lightTheme.palette.primary.main, 0.4),
429
+ '&:hover': {
430
+ textDecorationColor: 'inherit'
431
+ }
432
+ },
433
+ '& a code': {
434
+ color: darken(lightTheme.palette.primary.main, 0.04)
435
+ },
436
+ '& a:not(.title-link-to-anchor) code': {
437
+ color: darken(lightTheme.palette.primary.main, 0.2)
438
+ },
439
+ '& img, & video': {
440
+ // Use !important so that inline style on <img> or <video> can't win.
441
+ // This avoid horizontal overflows on mobile.
442
+ maxWidth: '100% !important',
443
+ // Avoid the image to be fixed height, so it can respect the aspect ratio.
444
+ height: 'auto'
445
+ },
446
+ '& img': {
447
+ // Avoid layout jump
448
+ display: 'inline-block',
449
+ // Avoid very sharp edges
450
+ borderRadius: 2
451
+ },
452
+ '& hr': {
453
+ height: 1,
454
+ margin: theme.spacing(5, 0),
455
+ border: 0,
456
+ flexShrink: 0,
457
+ backgroundColor: `var(--muidocs-palette-divider, ${lightTheme.palette.divider})`
458
+ },
459
+ '& kbd.key': {
460
+ padding: 6,
461
+ display: 'inline-block',
462
+ whiteSpace: 'nowrap',
463
+ margin: '0 1px',
464
+ fontFamily: lightTheme.typography.fontFamilyCode,
465
+ fontSize: lightTheme.typography.pxToRem(11),
466
+ color: `var(--muidocs-palette-text-primary, ${lightTheme.palette.text.primary})`,
467
+ lineHeight: '10px',
468
+ verticalAlign: 'middle',
469
+ borderRadius: 6,
470
+ border: `1px solid var(--muidocs-palette-grey-300, ${lightTheme.palette.grey[300]})`,
471
+ backgroundColor: `var(--muidocs-palette-grey-50, ${lightTheme.palette.grey[50]})`,
472
+ boxShadow: `inset 0 -2px 0 var(--muidocs-palette-grey-200, ${lightTheme.palette.grey[200]})`
473
+ },
474
+ '& details': {
475
+ width: '100%',
476
+ padding: theme.spacing(1),
477
+ marginBottom: theme.spacing(1.5),
478
+ border: '1px solid',
479
+ borderColor: `var(--muidocs-palette-divider, ${lightTheme.palette.divider})`,
480
+ borderRadius: `var(--muidocs-shape-borderRadius, ${theme.shape?.borderRadius ?? lightTheme.shape.borderRadius}px)`,
481
+ '& pre': {
482
+ marginTop: theme.spacing(1)
483
+ }
484
+ },
485
+ '& summary': {
486
+ cursor: 'pointer',
487
+ padding: theme.spacing(1),
488
+ borderRadius: 6,
489
+ listStyleType: 'none',
490
+ display: 'flex',
491
+ alignItems: 'center',
492
+ justifyContent: 'space-between',
493
+ transition: theme.transitions.create(['background'], {
494
+ duration: theme.transitions.duration.shortest
495
+ }),
496
+ ':after': {
497
+ content: '""',
498
+ maskImage: `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='M4 6L8 10L12 6' stroke='black' stroke-width='1.66667' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A")`,
499
+ display: 'inline-flex',
500
+ width: '1em',
501
+ height: '1em',
502
+ color: 'inherit',
503
+ backgroundColor: 'currentColor'
504
+ },
505
+ '&:hover': {
506
+ backgroundColor: `var(--muidocs-palette-grey-100, ${lightTheme.palette.grey[50]})`
507
+ }
508
+ },
509
+ '& details[open] > summary::after': {
510
+ content: '""',
511
+ maskImage: `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='M12 10L8 6L4 10' stroke='black' stroke-width='1.66667' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A")`
512
+ },
513
+ '& .MuiCode-root': {
514
+ direction: 'ltr /*! @noflip */',
515
+ position: 'relative',
516
+ // Font size reset to fix a bug with Safari 16.0 when letterSpacing is set
517
+ fontSize: 10,
518
+ '&:has(.MuiCode-title)': {
519
+ margin: theme.spacing(2, 'auto'),
520
+ border: `1px solid var(--muidocs-palette-primaryDark-700, ${lightTheme.palette.primaryDark[700]})`,
521
+ borderRadius: theme.shape.borderRadius,
522
+ overflow: 'clip',
523
+ '& .MuiCode-copy': {
524
+ top: '56px'
525
+ }
526
+ }
527
+ },
528
+ '& .MuiCode-copy-container': {
529
+ // This container is only used in demo and highlight code
530
+ position: 'sticky',
531
+ zIndex: 1,
532
+ top: 0
533
+ },
534
+ '& .MuiCode-copy': {
535
+ cursor: 'pointer',
536
+ position: 'absolute',
537
+ top: 12,
538
+ right: 12,
539
+ display: 'inline-flex',
540
+ flexDirection: 'row-reverse',
541
+ alignItems: 'center',
542
+ height: 24,
543
+ padding: theme.spacing(0.5),
544
+ paddingBottom: '5px',
545
+ // optical alignment
546
+ fontFamily: lightTheme.typography.fontFamily,
547
+ fontWeight: lightTheme.typography.fontWeightMedium,
548
+ fontSize: lightTheme.typography.pxToRem(12),
549
+ borderRadius: 6,
550
+ border: '1px solid',
551
+ borderColor: alpha(lightTheme.palette.primaryDark[600], 0.5),
552
+ backgroundColor: alpha(lightTheme.palette.primaryDark[800], 0.5),
553
+ color: `var(--muidocs-palette-grey-300, ${lightTheme.palette.grey[300]})`,
554
+ transition: theme.transitions.create(['background', 'borderColor', 'display'], {
555
+ duration: theme.transitions.duration.shortest
556
+ }),
557
+ '& .MuiCode-copied-label': {
558
+ display: 'none'
559
+ },
560
+ '&:hover, &:focus': {
561
+ borderColor: `var(--muidocs-palette-primaryDark-400, ${lightTheme.palette.primaryDark[400]})`,
562
+ backgroundColor: `var(--muidocs-palette-primaryDark-700, ${lightTheme.palette.primaryDark[700]})`,
563
+ color: '#FFF',
564
+ '& .MuiCode-copyKeypress': {
565
+ display: 'block',
566
+ // Approximate no hover capabilities with no keyboard
567
+ // https://github.com/w3c/csswg-drafts/issues/3871
568
+ '@media (any-hover: none)': {
569
+ display: 'none'
570
+ }
571
+ }
572
+ },
573
+ '& .MuiCode-copyKeypress': {
574
+ display: 'none',
575
+ position: 'absolute',
576
+ right: 34
577
+ },
578
+ '&[data-copied]': {
579
+ borderColor: `var(--muidocs-palette-primaryDark-400, ${lightTheme.palette.primaryDark[400]})`,
580
+ backgroundColor: `var(--muidocs-palette-primaryDark-700, ${lightTheme.palette.primaryDark[700]})`,
581
+ color: '#fff',
582
+ '& .MuiCode-copyKeypress': {
583
+ opacity: 0
584
+ },
585
+ '& .MuiCode-copy-label': {
586
+ display: 'none'
587
+ },
588
+ '& .MuiCode-copied-label': {
589
+ display: 'block'
590
+ }
591
+ }
592
+ },
593
+ '& .MuiCode-copyKeypress': {
594
+ pointerEvents: 'none',
595
+ userSelect: 'none',
596
+ marginRight: theme.spacing(1.2),
597
+ marginBottom: theme.spacing(0.2),
598
+ whiteSpace: 'nowrap',
599
+ opacity: 0.6
600
+ },
601
+ '& li': {
602
+ // tight lists https://spec.commonmark.org/0.30/#tight
603
+ marginBottom: 4,
604
+ '& pre': {
605
+ marginTop: theme.spacing(1)
606
+ },
607
+ // loose lists https://spec.commonmark.org/0.30/#loose
608
+ '& > p': {
609
+ marginBottom: theme.spacing(1)
610
+ }
611
+ },
612
+ '& .feature-list': {
613
+ padding: 0,
614
+ listStyle: 'none',
615
+ '& li': {
616
+ marginBottom: 6,
617
+ display: 'flex',
618
+ alignItems: 'center',
619
+ gap: 12,
620
+ '::before': {
621
+ content: `url('/static/branding/pricing/yes-light.svg')`,
622
+ width: '18px',
623
+ height: '18px'
624
+ }
625
+ }
626
+ },
627
+ '& .MuiCode-title': {
628
+ padding: theme.spacing(1.5),
629
+ display: 'flex',
630
+ alignItems: 'center',
631
+ gap: theme.spacing(1.5),
632
+ borderBottom: `1px solid var(--muidocs-palette-primaryDark-700, ${lightTheme.palette.primaryDark[700]})`,
633
+ backgroundColor: `var(--muidocs-palette-primaryDark-900, ${lightTheme.palette.primaryDark[900]})`,
634
+ fontFamily: theme.typography.fontFamilyCode,
635
+ fontSize: theme.typography.pxToRem(12),
636
+ fontWeight: theme.typography.fontWeightBold,
637
+ color: `var(--muidocs-palette-grey-200, ${lightTheme.palette.grey[200]})`,
638
+ '::before': {
639
+ 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");`,
640
+ width: '16px',
641
+ height: '16px'
642
+ },
643
+ '& + pre': {
644
+ margin: 0,
645
+ border: 'none',
646
+ borderRadius: 0
647
+ }
648
+ }
649
+ }), ({
650
+ theme
651
+ }) => ({
652
+ [`:where(${theme.vars ? '[data-mui-color-scheme="dark"]' : '.mode-dark'}) &`]: {
653
+ color: 'rgb(255, 255, 255)',
654
+ '& :not(pre) > code': {
655
+ // inline code block
656
+ color: `var(--muidocs-palette-text-primary, ${darkTheme.palette.text.primary})`,
657
+ borderColor: alpha(darkTheme.palette.primaryDark[600], 0.6),
658
+ backgroundColor: `var(--muidocs-palette-grey-900, ${darkTheme.palette.grey[900]})`
659
+ },
660
+ '& strong': {
661
+ color: `var(--muidocs-palette-grey-200, ${darkTheme.palette.grey[200]})`
662
+ },
663
+ '& hr': {
664
+ backgroundColor: `var(--muidocs-palette-divider, ${darkTheme.palette.divider})`
665
+ },
666
+ '& h1, & h2, & h3, & h4, & h5': {
667
+ color: `var(--muidocs-palette-grey-50, ${darkTheme.palette.grey[50]})`
668
+ },
669
+ '& p, & ul, & ol': {
670
+ color: `var(--muidocs-palette-grey-400, ${darkTheme.palette.grey[400]})`
671
+ },
672
+ '& h1, & h2, & h3, & h4': {
673
+ '&:hover .anchor-icon, & .comment-link': {
674
+ color: `var(--muidocs-palette-primary-300, ${darkTheme.palette.primaryDark[300]})`,
675
+ borderColor: `var(--muidocs-palette-divider, ${darkTheme.palette.divider})`,
676
+ backgroundColor: alpha(darkTheme.palette.primaryDark[700], 0.5),
677
+ '&:hover': {
678
+ borderColor: `var(--muidocs-palette-primary-900, ${darkTheme.palette.primary[900]})`,
679
+ backgroundColor: alpha(darkTheme.palette.primary[900], 0.6),
680
+ color: `var(--muidocs-palette-primary-100, ${darkTheme.palette.primary[100]})`
681
+ }
682
+ }
683
+ },
684
+ '& h1 code, & h2 code, & h3 code': {
685
+ color: `var(--muidocs-palette-grey-100, ${darkTheme.palette.grey[100]})`
686
+ },
687
+ '& table': {
688
+ '& .required': {
689
+ color: '#a5ffa5'
690
+ },
691
+ '& .optional': {
692
+ color: '#a5b3ff'
693
+ },
694
+ '& .prop-type, & .slot-defaultClass': {
695
+ color: '#ffb6ec'
696
+ },
697
+ '& .prop-default, & .slot-default': {
698
+ borderColor: `var(--muidocs-palette-divider, ${darkTheme.palette.divider})`
699
+ }
700
+ },
701
+ '& td': {
702
+ color: `var(--muidocs-palette-text-secondary, ${darkTheme.palette.text.secondary})`,
703
+ borderColor: `var(--muidocs-palette-divider, ${darkTheme.palette.divider})`
704
+ },
705
+ '& th': {
706
+ color: `var(--muidocs-palette-text-primary, ${darkTheme.palette.text.primary})`,
707
+ borderColor: `var(--muidocs-palette-divider, ${darkTheme.palette.divider})`
708
+ },
709
+ '& blockquote': {
710
+ borderColor: `var(--muidocs-palette-primaryDark-700, ${darkTheme.palette.primaryDark[700]})`,
711
+ '&::before': {
712
+ color: `var(--muidocs-palette-primaryDark-500, ${darkTheme.palette.primaryDark[500]})`
713
+ }
714
+ },
715
+ '& .MuiCallout-root': {
716
+ borderColor: `var(--muidocs-palette-primaryDark-700, ${darkTheme.palette.primaryDark[700]})`,
717
+ '& > code': {
718
+ height: 'fit-content',
719
+ backgroundColor: `var(--muidocs-palette-primaryDark-600, ${darkTheme.palette.primaryDark[600]})`,
720
+ borderColor: `var(--muidocs-palette-primaryDark-500, ${darkTheme.palette.primaryDark[500]})`
721
+ },
722
+ '&.MuiCallout-error': {
723
+ color: `var(--muidocs-palette-error-50, ${darkTheme.palette.error[50]})`,
724
+ backgroundColor: alpha(darkTheme.palette.error[700], 0.15),
725
+ borderColor: alpha(darkTheme.palette.error[400], 0.1),
726
+ '& strong': {
727
+ color: `var(--muidocs-palette-error-300, ${darkTheme.palette.error[300]})`
728
+ },
729
+ '& > svg': {
730
+ fill: `var(--muidocs-palette-error-500, ${darkTheme.palette.error[500]})`
731
+ },
732
+ '& a': {
733
+ color: `var(--muidocs-palette-error-200, ${darkTheme.palette.error[200]})`
734
+ }
735
+ },
736
+ '&.MuiCallout-info': {
737
+ color: `var(--muidocs-palette-grey-50, ${darkTheme.palette.grey[50]})`,
738
+ backgroundColor: alpha(darkTheme.palette.grey[700], 0.15),
739
+ borderColor: alpha(darkTheme.palette.grey[800], 0.5),
740
+ '& strong': {
741
+ color: `var(--muidocs-palette-primary-200, ${darkTheme.palette.primary[200]})`
742
+ },
743
+ '& > svg': {
744
+ fill: `var(--muidocs-palette-grey-400, ${darkTheme.palette.grey[400]})`
745
+ }
746
+ },
747
+ '&.MuiCallout-success': {
748
+ color: `var(--muidocs-palette-success-50, ${darkTheme.palette.success[50]})`,
749
+ backgroundColor: alpha(darkTheme.palette.success[700], 0.12),
750
+ borderColor: alpha(lightTheme.palette.success[400], 0.1),
751
+ '& strong': {
752
+ color: `var(--muidocs-palette-success-200, ${darkTheme.palette.success[200]})`
753
+ },
754
+ '& > svg': {
755
+ fill: `var(--muidocs-palette-success-500, ${darkTheme.palette.success[500]})`
756
+ },
757
+ '& a': {
758
+ color: `var(--muidocs-palette-success-100, ${darkTheme.palette.success[100]})`
759
+ }
760
+ },
761
+ '&.MuiCallout-warning': {
762
+ color: `var(--muidocs-palette-warning-50, ${darkTheme.palette.warning[50]})`,
763
+ backgroundColor: alpha(darkTheme.palette.warning[700], 0.12),
764
+ borderColor: alpha(darkTheme.palette.warning[400], 0.1),
765
+ '& strong': {
766
+ color: `var(--muidocs-palette-warning-200, ${darkTheme.palette.warning[200]})`
767
+ },
768
+ '& > svg': {
769
+ fill: `var(--muidocs-palette-warning-400, ${darkTheme.palette.warning[400]})`
770
+ },
771
+ '& a': {
772
+ color: `var(--muidocs-palette-warning-100, ${darkTheme.palette.warning[100]})`
773
+ }
774
+ }
775
+ },
776
+ '& a:not(.title-link-to-anchor), & a:not(.title-link-to-anchor) code': {
777
+ color: `var(--muidocs-palette-primary-300, ${darkTheme.palette.primary[300]})`
778
+ },
779
+ '& a:not(.title-link-to-anchor) code': {
780
+ color: `var(--muidocs-palette-primary-light, ${darkTheme.palette.primary.light})`
781
+ },
782
+ '& kbd.key': {
783
+ color: `var(--muidocs-palette-text-primary, ${darkTheme.palette.text.primary})`,
784
+ backgroundColor: `var(--muidocs-palette-primaryDark-800, ${darkTheme.palette.primaryDark[800]})`,
785
+ border: `1px solid var(--muidocs-palette-primaryDark-600, ${darkTheme.palette.primaryDark[600]})`,
786
+ boxShadow: `inset 0 -2px 0 var(--muidocs-palette-primaryDark-700, ${darkTheme.palette.primaryDark[700]})`
787
+ },
788
+ '& details': {
789
+ borderColor: `var(--muidocs-palette-divider, ${darkTheme.palette.divider})`
790
+ },
791
+ '& summary': {
792
+ '&:hover': {
793
+ backgroundColor: `var(--muidocs-palette-primaryDark-800, ${darkTheme.palette.primaryDark[800]})`
794
+ }
795
+ },
796
+ '& .feature-list': {
797
+ '& li': {
798
+ '::before': {
799
+ content: `url('/static/branding/pricing/yes-dark.svg')`
800
+ }
801
+ }
802
+ }
803
+ }
804
+ }));
805
+ export const MarkdownElement = /*#__PURE__*/React.forwardRef(function MarkdownElement(props, ref) {
806
+ const {
807
+ className,
808
+ renderedMarkdown,
809
+ ...other
810
+ } = props;
811
+ const more = {};
812
+ if (typeof renderedMarkdown === 'string') {
813
+ // workaround for https://github.com/facebook/react/issues/17170
814
+ // otherwise we could just set `dangerouslySetInnerHTML={undefined}`
815
+ more.dangerouslySetInnerHTML = {
816
+ __html: renderedMarkdown
817
+ };
818
+ }
819
+ return /*#__PURE__*/_jsx(Root, {
820
+ className: clsx('markdown-body', className),
821
+ ...more,
822
+ ...other,
823
+ ref: ref
824
+ });
825
+ });