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

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