@mui/internal-core-docs 0.0.1 → 9.0.0-canary.1

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