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

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