@mui/docs 6.0.0-alpha.1 → 6.0.0-alpha.11

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 (99) hide show
  1. package/CHANGELOG.md +538 -4
  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 +0 -1
  22. package/InfoCard/InfoCard.js +45 -44
  23. package/Link/Link.js +40 -38
  24. package/MarkdownElement/MarkdownElement.d.ts +6 -0
  25. package/MarkdownElement/MarkdownElement.js +847 -0
  26. package/MarkdownElement/index.d.ts +1 -0
  27. package/MarkdownElement/index.js +1 -0
  28. package/MarkdownElement/package.json +6 -0
  29. package/NProgressBar/NProgressBar.js +6 -7
  30. package/SectionTitle/SectionTitle.d.ts +7 -0
  31. package/SectionTitle/SectionTitle.js +30 -0
  32. package/SectionTitle/index.d.ts +1 -0
  33. package/SectionTitle/index.js +1 -0
  34. package/SectionTitle/package.json +6 -0
  35. package/branding/brandingTheme.js +569 -369
  36. package/node/CodeCopy/CodeCopy.js +188 -0
  37. package/node/CodeCopy/CodeCopyButton.js +50 -0
  38. package/node/CodeCopy/index.js +40 -0
  39. package/node/CodeCopy/useClipboardCopy.js +30 -0
  40. package/node/ComponentLinkHeader/ComponentLinkHeader.js +189 -0
  41. package/node/ComponentLinkHeader/index.js +24 -0
  42. package/node/HighlightedCode/HighlightedCode.js +77 -0
  43. package/node/HighlightedCode/index.js +16 -0
  44. package/node/InfoCard/InfoCard.js +45 -44
  45. package/node/Link/Link.js +43 -40
  46. package/node/MarkdownElement/MarkdownElement.js +859 -0
  47. package/node/MarkdownElement/index.js +16 -0
  48. package/node/NProgressBar/NProgressBar.js +6 -7
  49. package/node/SectionTitle/SectionTitle.js +38 -0
  50. package/node/SectionTitle/index.js +16 -0
  51. package/node/branding/brandingTheme.js +569 -369
  52. package/node/svgIcons/AdobeXDIcon.js +22 -0
  53. package/node/svgIcons/BundleSizeIcon.js +22 -0
  54. package/node/svgIcons/FigmaIcon.js +31 -0
  55. package/node/svgIcons/FileDownload.js +3 -3
  56. package/node/svgIcons/JavaScript.js +3 -3
  57. package/node/svgIcons/MaterialDesignIcon.js +27 -0
  58. package/node/svgIcons/SketchIcon.js +36 -0
  59. package/node/svgIcons/TypeScript.js +3 -3
  60. package/node/svgIcons/W3CIcon.js +24 -0
  61. package/node/translations/translations.json +4 -2
  62. package/package.json +6 -4
  63. package/svgIcons/AdobeXDIcon.d.ts +4 -0
  64. package/svgIcons/AdobeXDIcon.js +14 -0
  65. package/svgIcons/BundleSizeIcon.d.ts +4 -0
  66. package/svgIcons/BundleSizeIcon.js +14 -0
  67. package/svgIcons/FigmaIcon.d.ts +4 -0
  68. package/svgIcons/FigmaIcon.js +23 -0
  69. package/svgIcons/FileDownload.d.ts +7 -0
  70. package/svgIcons/FileDownload.js +3 -3
  71. package/svgIcons/JavaScript.d.ts +7 -0
  72. package/svgIcons/JavaScript.js +3 -3
  73. package/svgIcons/MaterialDesignIcon.d.ts +4 -0
  74. package/svgIcons/MaterialDesignIcon.js +19 -0
  75. package/svgIcons/SketchIcon.d.ts +4 -0
  76. package/svgIcons/SketchIcon.js +28 -0
  77. package/svgIcons/TypeScript.d.ts +7 -0
  78. package/svgIcons/TypeScript.js +3 -3
  79. package/svgIcons/W3CIcon.d.ts +4 -0
  80. package/svgIcons/W3CIcon.js +16 -0
  81. package/translations/translations.json +4 -2
  82. package/tsconfig.build.tsbuildinfo +1 -1
  83. package/legacy/DocsProvider/DocsProvider.js +0 -25
  84. package/legacy/DocsProvider/index.js +0 -1
  85. package/legacy/InfoCard/InfoCard.js +0 -86
  86. package/legacy/InfoCard/index.js +0 -1
  87. package/legacy/Link/Link.js +0 -101
  88. package/legacy/Link/index.js +0 -1
  89. package/legacy/NProgressBar/NProgressBar.js +0 -80
  90. package/legacy/NProgressBar/index.js +0 -1
  91. package/legacy/branding/BrandingProvider.js +0 -17
  92. package/legacy/branding/brandingTheme.js +0 -1168
  93. package/legacy/branding/index.js +0 -2
  94. package/legacy/i18n/i18n.js +0 -105
  95. package/legacy/i18n/index.js +0 -1
  96. package/legacy/svgIcons/FileDownload.js +0 -14
  97. package/legacy/svgIcons/JavaScript.js +0 -14
  98. package/legacy/svgIcons/TypeScript.js +0 -14
  99. package/legacy/translations/index.js +0 -4
@@ -0,0 +1,859 @@
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 React = _interopRequireWildcard(require("react"));
9
+ var _clsx = _interopRequireDefault(require("clsx"));
10
+ var _styles = require("@mui/material/styles");
11
+ var _useForkRef = _interopRequireDefault(require("@mui/utils/useForkRef"));
12
+ var _branding = require("../branding");
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
+ 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); }
15
+ 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; }
16
+ const Root = (0, _styles.styled)('div')(({
17
+ theme
18
+ }) => {
19
+ var _theme$shape$borderRa, _theme$shape, _theme$shape$borderRa2, _theme$shape2, _theme$shape$borderRa3, _theme$shape3;
20
+ return {
21
+ ..._branding.brandingLightTheme.typography.body1,
22
+ lineHeight: 1.6,
23
+ // Increased compared to the 1.5 default to make the docs easier to read.
24
+ color: `var(--muidocs-palette-text-primary, ${_branding.brandingLightTheme.palette.text.primary})`,
25
+ '& :focus-visible': {
26
+ outline: `3px solid ${(0, _styles.alpha)(_branding.brandingLightTheme.palette.primary[500], 0.5)}`,
27
+ outlineOffset: 2
28
+ },
29
+ '& strong': {
30
+ color: `var(--muidocs-palette-text-primary, ${_branding.brandingLightTheme.palette.text.primary})`
31
+ },
32
+ wordBreak: 'break-word',
33
+ '& pre': {
34
+ lineHeight: 1.5,
35
+ // Developers like when the code is dense.
36
+ margin: theme.spacing(2, 'auto'),
37
+ padding: theme.spacing(2),
38
+ backgroundColor: 'hsl(210, 35%, 9%)',
39
+ // 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.
40
+ color: 'hsl(60, 30%, 96%)',
41
+ colorScheme: 'dark',
42
+ 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)`,
43
+ border: '1px solid',
44
+ borderColor: `var(--muidocs-palette-primaryDark-700, ${_branding.brandingLightTheme.palette.primaryDark[700]})`,
45
+ overflow: 'auto',
46
+ WebkitOverflowScrolling: 'touch',
47
+ fontSize: _branding.brandingLightTheme.typography.pxToRem(13),
48
+ maxWidth: 'calc(100vw - 32px)',
49
+ maxHeight: '400px',
50
+ [_branding.brandingLightTheme.breakpoints.up('md')]: {
51
+ maxWidth: 'calc(100vw - 32px - 16px)'
52
+ }
53
+ },
54
+ '& code': {
55
+ ..._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': {
78
+ ..._branding.brandingLightTheme.typography.h3,
79
+ fontSize: _branding.brandingLightTheme.typography.pxToRem(36),
80
+ fontFamily: `"General Sans", ${_branding.brandingLightTheme.typography.fontFamilySystem}`,
81
+ margin: '10px 0',
82
+ color: `var(--muidocs-palette-primaryDark-900, ${_branding.brandingLightTheme.palette.primaryDark[900]})`,
83
+ fontWeight: 600,
84
+ letterSpacing: -0.2
85
+ },
86
+ '& .description': {
87
+ ..._branding.brandingLightTheme.typography.subtitle1,
88
+ fontWeight: 400,
89
+ margin: '0 0 24px'
90
+ },
91
+ '& .component-tabs': {
92
+ margin: '0 0 40px'
93
+ },
94
+ '& h2': {
95
+ ..._branding.brandingLightTheme.typography.h5,
96
+ fontFamily: `"General Sans", ${_branding.brandingLightTheme.typography.fontFamilySystem}`,
97
+ fontSize: theme.typography.pxToRem(26),
98
+ fontWeight: _branding.brandingLightTheme.typography.fontWeightSemiBold,
99
+ color: `var(--muidocs-palette-grey-900, ${_branding.brandingLightTheme.palette.grey[900]})`,
100
+ margin: '40px 0 4px'
101
+ },
102
+ '& h3': {
103
+ ..._branding.brandingLightTheme.typography.h6,
104
+ fontFamily: `"General Sans", ${_branding.brandingLightTheme.typography.fontFamilySystem}`,
105
+ fontSize: theme.typography.pxToRem(20),
106
+ fontWeight: _branding.brandingLightTheme.typography.fontWeightSemiBold,
107
+ color: `var(--muidocs-palette-grey-900, ${_branding.brandingLightTheme.palette.grey[900]})`,
108
+ margin: '24px 0 4px'
109
+ },
110
+ '& h4': {
111
+ ..._branding.brandingLightTheme.typography.subtitle1,
112
+ fontFamily: `"General Sans", ${_branding.brandingLightTheme.typography.fontFamilySystem}`,
113
+ fontWeight: _branding.brandingLightTheme.typography.fontWeightSemiBold,
114
+ color: `var(--muidocs-palette-grey-900, ${_branding.brandingLightTheme.palette.grey[900]})`,
115
+ margin: '20px 0 6px'
116
+ },
117
+ '& h5': {
118
+ ..._branding.brandingLightTheme.typography.subtitle2,
119
+ fontFamily: `"General Sans", ${_branding.brandingLightTheme.typography.fontFamilySystem}`,
120
+ fontWeight: _branding.brandingLightTheme.typography.fontWeightSemiBold,
121
+ color: `var(--muidocs-palette-grey-900, ${_branding.brandingLightTheme.palette.grey[900]})`,
122
+ margin: '20px 0 8px'
123
+ },
124
+ '& p': {
125
+ marginTop: 0,
126
+ marginBottom: 16,
127
+ color: `var(--muidocs-palette-grey-900, ${_branding.brandingLightTheme.palette.grey[900]})`
128
+ },
129
+ '& ul, & ol': {
130
+ paddingLeft: 30,
131
+ marginTop: 0,
132
+ marginBottom: 16,
133
+ '& ul, & ol': {
134
+ marginBottom: 6
135
+ }
136
+ },
137
+ '& h1, & h2, & h3, & h4': {
138
+ display: 'flex',
139
+ alignItems: 'center',
140
+ gap: 6,
141
+ '& code': {
142
+ fontSize: 'inherit',
143
+ lineHeight: 'inherit',
144
+ // Remove scroll on small screens.
145
+ wordBreak: 'break-all'
146
+ },
147
+ '& .title-link-to-anchor': {
148
+ color: 'inherit',
149
+ textDecoration: 'none',
150
+ position: 'relative',
151
+ display: 'flex',
152
+ alignItems: 'center',
153
+ userSelect: 'text'
154
+ },
155
+ '& .anchor-icon': {
156
+ // To prevent the link to get the focus.
157
+ display: 'inline-flex',
158
+ alignItems: 'center',
159
+ visibility: 'hidden'
160
+ },
161
+ '& a:not(.title-link-to-anchor):hover': {
162
+ color: 'currentColor',
163
+ border: 'none',
164
+ boxShadow: '0 1px 0 0 currentColor',
165
+ textDecoration: 'none'
166
+ },
167
+ '& .anchor-icon, & .comment-link': {
168
+ padding: 0,
169
+ cursor: 'pointer',
170
+ alignItems: 'center',
171
+ justifyContent: 'center',
172
+ flexShrink: 0,
173
+ textAlign: 'center',
174
+ marginLeft: 8,
175
+ height: 26,
176
+ width: 26,
177
+ backgroundColor: `var(--muidocs-palette-primary-50, ${_branding.brandingLightTheme.palette.grey[50]})`,
178
+ color: `var(--muidocs-palette-grey-600, ${_branding.brandingLightTheme.palette.grey[600]})`,
179
+ border: '1px solid',
180
+ borderColor: `var(--muidocs-palette-divider, ${_branding.brandingLightTheme.palette.divider})`,
181
+ borderRadius: 8,
182
+ '&:hover': {
183
+ backgroundColor: (0, _styles.alpha)(_branding.brandingLightTheme.palette.primary[100], 0.4),
184
+ borderColor: `var(--muidocs-palette-primary-100, ${_branding.brandingLightTheme.palette.primary[100]})`,
185
+ color: `var(--muidocs-palette-primary-main, ${_branding.brandingLightTheme.palette.primary.main})`
186
+ },
187
+ '& svg': {
188
+ height: 14,
189
+ width: 14,
190
+ fill: 'currentColor',
191
+ pointerEvents: 'none',
192
+ verticalAlign: 'middle'
193
+ }
194
+ },
195
+ '&:hover .anchor-icon': {
196
+ visibility: 'visible'
197
+ },
198
+ '& .comment-link': {
199
+ display: 'none',
200
+ // So we can have the comment button opt-in.
201
+ marginLeft: 'auto',
202
+ transition: theme.transitions.create('opacity', {
203
+ duration: theme.transitions.duration.shortest
204
+ }),
205
+ '& svg': {
206
+ fill: 'currentColor',
207
+ marginRight: 1.5
208
+ }
209
+ }
210
+ },
211
+ '& h1 code, & h2 code, & h3 code': {
212
+ color: `var(--muidocs-palette-grey-900, ${_branding.brandingLightTheme.palette.grey[900]})`
213
+ },
214
+ '& h1 code': {
215
+ fontWeight: _branding.brandingLightTheme.typography.fontWeightSemiBold
216
+ },
217
+ '& h2 code': {
218
+ fontSize: _branding.brandingLightTheme.typography.pxToRem(24),
219
+ fontWeight: _branding.brandingLightTheme.typography.fontWeightSemiBold
220
+ },
221
+ '& h3 code': {
222
+ fontSize: _branding.brandingLightTheme.typography.pxToRem(18)
223
+ },
224
+ '& table': {
225
+ // Trade display table for scroll overflow
226
+ display: 'block',
227
+ wordBreak: 'normal',
228
+ overflowX: 'auto',
229
+ WebkitOverflowScrolling: 'touch',
230
+ borderCollapse: 'collapse',
231
+ marginBottom: '20px',
232
+ borderSpacing: 0,
233
+ '& .prop-name, & .prop-type, & .prop-default, & .slot-name, & .slot-defaultClass, & .slot-default': {
234
+ fontWeight: 400,
235
+ fontFamily: _branding.brandingLightTheme.typography.fontFamilyCode,
236
+ WebkitFontSmoothing: 'subpixel-antialiased',
237
+ fontSize: _branding.brandingLightTheme.typography.pxToRem(13)
238
+ },
239
+ '& .required': {
240
+ color: '#006500'
241
+ },
242
+ '& .optional': {
243
+ color: '#45529f'
244
+ },
245
+ '& .prop-type, & .slot-defaultClass': {
246
+ color: '#932981'
247
+ },
248
+ '& .prop-default, & .slot-default': {
249
+ borderBottom: `1px dotted var(--muidocs-palette-divider, ${_branding.brandingLightTheme.palette.divider})`
250
+ }
251
+ },
252
+ '& td': {
253
+ ...theme.typography.body2,
254
+ borderBottom: `1px solid var(--muidocs-palette-divider, ${_branding.brandingLightTheme.palette.divider})`,
255
+ paddingRight: 20,
256
+ paddingTop: 16,
257
+ paddingBottom: 16,
258
+ color: `var(--muidocs-palette-text-secondary, ${_branding.brandingLightTheme.palette.text.secondary})`
259
+ },
260
+ '& td code': {
261
+ lineHeight: 1.6
262
+ },
263
+ '& th': {
264
+ fontSize: theme.typography.pxToRem(14),
265
+ lineHeight: theme.typography.pxToRem(24),
266
+ fontWeight: 500,
267
+ color: `var(--muidocs-palette-text-primary, ${_branding.brandingLightTheme.palette.text.primary})`,
268
+ whiteSpace: 'pre',
269
+ borderBottom: `1px solid var(--muidocs-palette-divider, ${_branding.brandingLightTheme.palette.divider})`,
270
+ paddingRight: 20,
271
+ paddingTop: 12,
272
+ paddingBottom: 12
273
+ },
274
+ '& blockquote': {
275
+ position: 'relative',
276
+ padding: '0 16px',
277
+ margin: 0,
278
+ borderLeft: '1.5px solid',
279
+ borderColor: `var(--muidocs-palette-grey-200, ${_branding.brandingLightTheme.palette.grey[200]})`,
280
+ '& p': {
281
+ fontSize: theme.typography.pxToRem(12.5),
282
+ fontFamily: _branding.brandingLightTheme.typography.fontFamilyCode,
283
+ fontWeight: _branding.brandingLightTheme.typography.fontWeightMedium,
284
+ lineHeight: theme.typography.pxToRem(24),
285
+ textIndent: 20
286
+ },
287
+ '&::before': {
288
+ position: 'absolute',
289
+ // eslint-disable-next-line material-ui/straight-quotes
290
+ content: '"“"',
291
+ color: `var(--muidocs-palette-grey-300, ${_branding.brandingLightTheme.palette.grey[300]})`,
292
+ fontSize: '2.5rem',
293
+ top: 8,
294
+ marginLeft: -6,
295
+ lineHeight: 0.5
296
+ }
297
+ },
298
+ '& .MuiCallout-root': {
299
+ display: 'flex',
300
+ gap: 12,
301
+ padding: '16px',
302
+ margin: '16px 0',
303
+ border: '1px solid',
304
+ color: `var(--muidocs-palette-text-secondary, ${_branding.brandingLightTheme.palette.text.secondary})`,
305
+ borderColor: `var(--muidocs-palette-grey-100, ${_branding.brandingLightTheme.palette.grey[100]})`,
306
+ 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)`,
307
+ '& > code': {
308
+ height: 'fit-content',
309
+ backgroundColor: `var(--muidocs-palette-grey-100, ${_branding.brandingLightTheme.palette.grey[100]})`,
310
+ borderColor: `var(--muidocs-palette-grey-300, ${_branding.brandingLightTheme.palette.grey[300]})`
311
+ },
312
+ '& .MuiCallout-content': {
313
+ minWidth: 0,
314
+ // Allows content to shrink. Useful when callout contains code block
315
+ flexGrow: 1,
316
+ '& > p:last-child, & > ul:last-child': {
317
+ // Avoid margin on last child
318
+ marginBottom: 0
319
+ },
320
+ '& .MuiCode-root': {
321
+ '& > pre': {
322
+ margin: 0,
323
+ marginTop: 4
324
+ }
325
+ },
326
+ '& > ul': {
327
+ // Because of the gap left by the icon, we visually need less padding
328
+ paddingLeft: 22
329
+ }
330
+ },
331
+ '& > svg': {
332
+ marginTop: 2,
333
+ width: 20,
334
+ height: 20,
335
+ flexShrink: 0
336
+ },
337
+ '& > ul, & > p': {
338
+ '&:last-child': {
339
+ margin: 0
340
+ }
341
+ },
342
+ '& ul, li, p': {
343
+ color: 'inherit'
344
+ },
345
+ '&.MuiCallout-error': {
346
+ color: `var(--muidocs-palette-error-900, ${_branding.brandingLightTheme.palette.error[900]})`,
347
+ backgroundColor: `var(--muidocs-palette-error-50, ${_branding.brandingLightTheme.palette.error[50]})`,
348
+ borderColor: `var(--muidocs-palette-error-100, ${_branding.brandingLightTheme.palette.error[100]})`,
349
+ '& strong': {
350
+ color: `var(--muidocs-palette-error-800, ${_branding.brandingLightTheme.palette.error[800]})`
351
+ },
352
+ '& > svg': {
353
+ fill: `var(--muidocs-palette-error-500, ${_branding.brandingLightTheme.palette.error[600]})`
354
+ },
355
+ '& a': {
356
+ color: `var(--muidocs-palette-error-800, ${_branding.brandingLightTheme.palette.error[800]})`,
357
+ textDecorationColor: (0, _styles.alpha)(_branding.brandingLightTheme.palette.error.main, 0.4),
358
+ '&:hover': {
359
+ textDecorationColor: 'inherit'
360
+ }
361
+ }
362
+ },
363
+ '&.MuiCallout-info': {
364
+ color: `var(--muidocs-palette-grey-900, ${_branding.brandingLightTheme.palette.grey[900]})`,
365
+ backgroundColor: `var(--muidocs-palette-grey-50, ${_branding.brandingLightTheme.palette.grey[50]})`,
366
+ borderColor: `var(--muidocs-palette-grey-100, ${_branding.brandingLightTheme.palette.grey[100]})`,
367
+ '& strong': {
368
+ color: `var(--muidocs-palette-primary-800, ${_branding.brandingLightTheme.palette.primary[800]})`
369
+ },
370
+ '& > svg': {
371
+ fill: `var(--muidocs-palette-grey-600, ${_branding.brandingLightTheme.palette.grey[600]})`
372
+ }
373
+ },
374
+ '&.MuiCallout-success': {
375
+ color: `var(--muidocs-palette-success-900, ${_branding.brandingLightTheme.palette.success[900]})`,
376
+ backgroundColor: `var(--muidocs-palette-success-50, ${_branding.brandingLightTheme.palette.success[50]})`,
377
+ borderColor: `var(--muidocs-palette-success-100, ${_branding.brandingLightTheme.palette.success[100]})`,
378
+ '& strong': {
379
+ color: `var(--muidocs-palette-success-900, ${_branding.brandingLightTheme.palette.success[900]})`
380
+ },
381
+ '& > svg': {
382
+ fill: `var(--muidocs-palette-success-600, ${_branding.brandingLightTheme.palette.success[600]})`
383
+ },
384
+ '& a': {
385
+ color: `var(--muidocs-palette-success-900, ${_branding.brandingLightTheme.palette.success[900]})`,
386
+ textDecorationColor: (0, _styles.alpha)(_branding.brandingLightTheme.palette.success.main, 0.4),
387
+ '&:hover': {
388
+ textDecorationColor: 'inherit'
389
+ }
390
+ }
391
+ },
392
+ '&.MuiCallout-warning': {
393
+ color: `var(--muidocs-palette-grey-900, ${_branding.brandingLightTheme.palette.grey[900]})`,
394
+ backgroundColor: (0, _styles.alpha)(_branding.brandingLightTheme.palette.warning[50], 0.5),
395
+ borderColor: (0, _styles.alpha)(_branding.brandingLightTheme.palette.warning[700], 0.15),
396
+ '& strong': {
397
+ color: `var(--muidocs-palette-warning-800, ${_branding.brandingLightTheme.palette.warning[800]})`
398
+ },
399
+ '& > svg': {
400
+ fill: `var(--muidocs-palette-warning-600, ${_branding.brandingLightTheme.palette.warning[600]})`
401
+ },
402
+ '& a': {
403
+ color: `var(--muidocs-palette-warning-800, ${_branding.brandingLightTheme.palette.warning[800]})`,
404
+ textDecorationColor: (0, _styles.alpha)(_branding.brandingLightTheme.palette.warning.main, 0.4),
405
+ '&:hover': {
406
+ textDecorationColor: 'inherit'
407
+ }
408
+ }
409
+ }
410
+ },
411
+ '& a[target="_blank"]::after': {
412
+ content: '""',
413
+ 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")`,
414
+ display: 'inline-flex',
415
+ width: '1em',
416
+ height: '1em',
417
+ color: 'inherit',
418
+ backgroundColor: 'currentColor',
419
+ transform: 'translate(0, 2px)',
420
+ transition: 'transform 0.3s cubic-bezier(0.1, 0.8, 0.3, 1)',
421
+ // bounce effect
422
+ opacity: 0.8
423
+ },
424
+ '& a[target="_blank"]:hover::after': {
425
+ opacity: 1,
426
+ transform: 'translate(1px, 0)'
427
+ },
428
+ '& a.remove-link-arrow::after': {
429
+ // Allows to remove link arrows for images
430
+ display: 'none'
431
+ },
432
+ '& .Ad-root a::after': {
433
+ // Remove link arrow for ads
434
+ display: 'none'
435
+ },
436
+ '& a:not(.title-link-to-anchor), & a:not(.title-link-to-anchor) code': {
437
+ // Style taken from the Link component
438
+ color: `var(--muidocs-palette-primary-600, ${_branding.brandingLightTheme.palette.primary[600]})`,
439
+ fontWeight: theme.typography.fontWeightMedium,
440
+ textDecoration: 'underline',
441
+ textDecorationColor: (0, _styles.alpha)(_branding.brandingLightTheme.palette.primary.main, 0.4),
442
+ '&:hover': {
443
+ textDecorationColor: 'inherit'
444
+ }
445
+ },
446
+ '& a code': {
447
+ color: (0, _styles.darken)(_branding.brandingLightTheme.palette.primary.main, 0.04)
448
+ },
449
+ '& a:not(.title-link-to-anchor) code': {
450
+ color: (0, _styles.darken)(_branding.brandingLightTheme.palette.primary.main, 0.2)
451
+ },
452
+ '& img, & video': {
453
+ // Use !important so that inline style on <img> or <video> can't win.
454
+ // This avoid horizontal overflows on mobile.
455
+ maxWidth: '100% !important',
456
+ // Avoid the image to be fixed height, so it can respect the aspect ratio.
457
+ height: 'auto'
458
+ },
459
+ '& img': {
460
+ // Avoid layout jump
461
+ display: 'inline-block',
462
+ // Avoid very sharp edges
463
+ borderRadius: 2
464
+ },
465
+ '& hr': {
466
+ height: 1,
467
+ margin: theme.spacing(5, 0),
468
+ border: 0,
469
+ flexShrink: 0,
470
+ backgroundColor: `var(--muidocs-palette-divider, ${_branding.brandingLightTheme.palette.divider})`
471
+ },
472
+ '& kbd.key': {
473
+ padding: 6,
474
+ display: 'inline-block',
475
+ whiteSpace: 'nowrap',
476
+ margin: '0 1px',
477
+ fontFamily: _branding.brandingLightTheme.typography.fontFamilyCode,
478
+ fontSize: _branding.brandingLightTheme.typography.pxToRem(11),
479
+ color: `var(--muidocs-palette-text-primary, ${_branding.brandingLightTheme.palette.text.primary})`,
480
+ lineHeight: '10px',
481
+ verticalAlign: 'middle',
482
+ borderRadius: 6,
483
+ border: `1px solid var(--muidocs-palette-grey-300, ${_branding.brandingLightTheme.palette.grey[300]})`,
484
+ backgroundColor: `var(--muidocs-palette-grey-50, ${_branding.brandingLightTheme.palette.grey[50]})`,
485
+ boxShadow: `inset 0 -2px 0 var(--muidocs-palette-grey-200, ${_branding.brandingLightTheme.palette.grey[200]})`
486
+ },
487
+ '& details': {
488
+ width: '100%',
489
+ padding: theme.spacing(1),
490
+ marginBottom: theme.spacing(1.5),
491
+ border: '1px solid',
492
+ borderColor: `var(--muidocs-palette-divider, ${_branding.brandingLightTheme.palette.divider})`,
493
+ 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)`,
494
+ '& pre': {
495
+ marginTop: theme.spacing(1)
496
+ }
497
+ },
498
+ '& summary': {
499
+ cursor: 'pointer',
500
+ padding: theme.spacing(1),
501
+ borderRadius: 6,
502
+ listStyleType: 'none',
503
+ display: 'flex',
504
+ alignItems: 'center',
505
+ justifyContent: 'space-between',
506
+ transition: theme.transitions.create(['background'], {
507
+ duration: theme.transitions.duration.shortest
508
+ }),
509
+ ':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='M4 6L8 10L12 6' stroke='black' stroke-width='1.66667' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A")`,
512
+ display: 'inline-flex',
513
+ width: '1em',
514
+ height: '1em',
515
+ color: 'inherit',
516
+ backgroundColor: 'currentColor'
517
+ },
518
+ '&:hover': {
519
+ backgroundColor: `var(--muidocs-palette-grey-100, ${_branding.brandingLightTheme.palette.grey[50]})`
520
+ }
521
+ },
522
+ '& details[open] > summary::after': {
523
+ content: '""',
524
+ 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")`
525
+ },
526
+ '& .MuiCode-root': {
527
+ direction: 'ltr /*! @noflip */',
528
+ position: 'relative',
529
+ // Font size reset to fix a bug with Safari 16.0 when letterSpacing is set
530
+ fontSize: 10,
531
+ '&:has(.MuiCode-title)': {
532
+ margin: theme.spacing(2, 'auto'),
533
+ border: `1px solid var(--muidocs-palette-primaryDark-700, ${_branding.brandingLightTheme.palette.primaryDark[700]})`,
534
+ borderRadius: theme.shape.borderRadius,
535
+ overflow: 'clip',
536
+ '& .MuiCode-copy': {
537
+ top: '56px'
538
+ }
539
+ }
540
+ },
541
+ '& .MuiCode-copy-container': {
542
+ // This container is only used in demo and highlight code
543
+ position: 'sticky',
544
+ zIndex: 1,
545
+ top: 0
546
+ },
547
+ '& .MuiCode-copy': {
548
+ cursor: 'pointer',
549
+ position: 'absolute',
550
+ top: 12,
551
+ right: 12,
552
+ display: 'inline-flex',
553
+ flexDirection: 'row-reverse',
554
+ alignItems: 'center',
555
+ height: 24,
556
+ padding: theme.spacing(0.5),
557
+ paddingBottom: '5px',
558
+ // optical alignment
559
+ fontFamily: _branding.brandingLightTheme.typography.fontFamily,
560
+ fontWeight: _branding.brandingLightTheme.typography.fontWeightMedium,
561
+ fontSize: _branding.brandingLightTheme.typography.pxToRem(12),
562
+ borderRadius: 6,
563
+ border: '1px solid',
564
+ borderColor: (0, _styles.alpha)(_branding.brandingLightTheme.palette.primaryDark[600], 0.5),
565
+ backgroundColor: (0, _styles.alpha)(_branding.brandingLightTheme.palette.primaryDark[800], 0.5),
566
+ color: `var(--muidocs-palette-grey-300, ${_branding.brandingLightTheme.palette.grey[300]})`,
567
+ transition: theme.transitions.create(['background', 'borderColor', 'display'], {
568
+ duration: theme.transitions.duration.shortest
569
+ }),
570
+ '& .MuiCode-copied-label': {
571
+ display: 'none'
572
+ },
573
+ '&:hover, &:focus': {
574
+ borderColor: `var(--muidocs-palette-primaryDark-400, ${_branding.brandingLightTheme.palette.primaryDark[400]})`,
575
+ backgroundColor: `var(--muidocs-palette-primaryDark-700, ${_branding.brandingLightTheme.palette.primaryDark[700]})`,
576
+ color: '#FFF',
577
+ '& .MuiCode-copyKeypress': {
578
+ display: 'block',
579
+ // Approximate no hover capabilities with no keyboard
580
+ // https://github.com/w3c/csswg-drafts/issues/3871
581
+ '@media (any-hover: none)': {
582
+ display: 'none'
583
+ }
584
+ }
585
+ },
586
+ '& .MuiCode-copyKeypress': {
587
+ display: 'none',
588
+ position: 'absolute',
589
+ right: 34
590
+ },
591
+ '&[data-copied]': {
592
+ borderColor: `var(--muidocs-palette-primaryDark-400, ${_branding.brandingLightTheme.palette.primaryDark[400]})`,
593
+ backgroundColor: `var(--muidocs-palette-primaryDark-700, ${_branding.brandingLightTheme.palette.primaryDark[700]})`,
594
+ color: '#fff',
595
+ '& .MuiCode-copyKeypress': {
596
+ opacity: 0
597
+ },
598
+ '& .MuiCode-copy-label': {
599
+ display: 'none'
600
+ },
601
+ '& .MuiCode-copied-label': {
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
+ function handleHeaderClick(event) {
820
+ const selection = document.getSelection();
821
+ if (selection === null) {
822
+ return;
823
+ }
824
+ if (selection.type === 'Range') {
825
+ // Disable the <a> behavior to be able to select text.
826
+ event.preventDefault();
827
+ }
828
+ }
829
+ const MarkdownElement = exports.MarkdownElement = /*#__PURE__*/React.forwardRef(function MarkdownElement(props, ref) {
830
+ const {
831
+ className,
832
+ renderedMarkdown,
833
+ ...other
834
+ } = props;
835
+ const rootRef = React.useRef(null);
836
+ const handleRef = (0, _useForkRef.default)(rootRef, ref);
837
+ React.useEffect(() => {
838
+ const elements = rootRef.current.getElementsByClassName('title-link-to-anchor');
839
+ for (let i = 0; i < elements.length; i += 1) {
840
+ // More reliable than `-webkit-user-drag` (https://caniuse.com/webkit-user-drag)
841
+ elements[i].setAttribute('draggable', 'false');
842
+ elements[i].addEventListener('click', handleHeaderClick);
843
+ }
844
+ }, []);
845
+ const more = {};
846
+ if (typeof renderedMarkdown === 'string') {
847
+ // workaround for https://github.com/facebook/react/issues/17170
848
+ // otherwise we could just set `dangerouslySetInnerHTML={undefined}`
849
+ more.dangerouslySetInnerHTML = {
850
+ __html: renderedMarkdown
851
+ };
852
+ }
853
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, {
854
+ className: (0, _clsx.default)('markdown-body', className),
855
+ ...more,
856
+ ...other,
857
+ ref: handleRef
858
+ });
859
+ });