@mui/docs 6.0.0-alpha.3 → 6.0.0-alpha.5

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