@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,362 @@
1
+ import * as React from 'react';
2
+ import { styled, alpha } from '@mui/material/styles';
3
+ import { Tabs } from '@mui/base/Tabs';
4
+ import { TabsList as TabsListBase } from '@mui/base/TabsList';
5
+ import { TabPanel as TabPanelBase } from '@mui/base/TabPanel';
6
+ import { Tab as TabBase } from '@mui/base/Tab';
7
+ import useLocalStorageState from '@mui/utils/useLocalStorageState';
8
+ import { HighlightedCode } from "../HighlightedCode/index.js";
9
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
+ const PACKAGE_MANAGER_ORDER = new Map(['npm', 'pnpm', 'yarn'].map((manager, index) => [manager, index]));
11
+ export const CodeTabList = styled(TabsListBase)(({
12
+ theme
13
+ }) => ({
14
+ display: 'flex',
15
+ gap: theme.spacing(0.5),
16
+ borderLeft: '1px solid',
17
+ borderRight: '1px solid',
18
+ overflowX: 'auto',
19
+ ...theme.applyDarkStyles({
20
+ backgroundColor: alpha(theme.palette.primaryDark[800], 0.2)
21
+ }),
22
+ variants: [{
23
+ props: ({
24
+ ownerState
25
+ }) => ownerState?.contained,
26
+ style: {
27
+ padding: theme.spacing(1.5, 1)
28
+ }
29
+ }, {
30
+ props: ({
31
+ ownerState
32
+ }) => !ownerState?.contained,
33
+ style: {
34
+ padding: theme.spacing(1)
35
+ }
36
+ }, {
37
+ props: ({
38
+ ownerState
39
+ }) => ownerState?.contained,
40
+ style: {
41
+ borderTop: 'none'
42
+ }
43
+ }, {
44
+ props: ({
45
+ ownerState
46
+ }) => !ownerState?.contained,
47
+ style: {
48
+ borderTop: '1px solid'
49
+ }
50
+ }, {
51
+ props: ({
52
+ ownerState
53
+ }) => ownerState?.contained,
54
+ style: {
55
+ borderBottom: 'none'
56
+ }
57
+ }, {
58
+ props: ({
59
+ ownerState
60
+ }) => !ownerState?.contained,
61
+ style: {
62
+ borderBottom: '1px solid'
63
+ }
64
+ }, {
65
+ props: ({
66
+ ownerState
67
+ }) => ownerState?.contained,
68
+ style: {
69
+ borderTopLeftRadius: 0
70
+ }
71
+ }, {
72
+ props: ({
73
+ ownerState
74
+ }) => !ownerState?.contained,
75
+ style: {
76
+ borderTopLeftRadius: (theme.vars || theme).shape.borderRadius
77
+ }
78
+ }, {
79
+ props: ({
80
+ ownerState
81
+ }) => ownerState?.contained,
82
+ style: {
83
+ borderTopRightRadius: 0
84
+ }
85
+ }, {
86
+ props: ({
87
+ ownerState
88
+ }) => !ownerState?.contained,
89
+ style: {
90
+ borderTopRightRadius: (theme.vars || theme).shape.borderRadius
91
+ }
92
+ }, {
93
+ props: ({
94
+ ownerState
95
+ }) => ownerState?.contained,
96
+ style: {
97
+ borderColor: (theme.vars || theme).palette.divider
98
+ }
99
+ }, {
100
+ props: ({
101
+ ownerState
102
+ }) => !ownerState?.contained,
103
+ style: {
104
+ borderColor: (theme.vars || theme).palette.primaryDark[700]
105
+ }
106
+ }, {
107
+ props: ({
108
+ ownerState
109
+ }) => ownerState?.contained,
110
+ style: {
111
+ backgroundColor: alpha(theme.palette.grey[50], 0.2)
112
+ }
113
+ }, {
114
+ props: ({
115
+ ownerState
116
+ }) => !ownerState?.contained,
117
+ style: {
118
+ backgroundColor: (theme.vars || theme).palette.primaryDark[900]
119
+ }
120
+ }]
121
+ }));
122
+ export const CodeTabPanel = styled(TabPanelBase)({
123
+ '& pre': {
124
+ borderTopLeftRadius: 0,
125
+ borderTopRightRadius: 0,
126
+ '& code': {}
127
+ },
128
+ variants: [{
129
+ props: ({
130
+ ownerState
131
+ }) => ownerState?.contained,
132
+ style: {
133
+ marginTop: -1
134
+ }
135
+ }, {
136
+ props: ({
137
+ ownerState
138
+ }) => !ownerState?.contained,
139
+ style: {
140
+ marginTop: 0
141
+ }
142
+ }, {
143
+ props: ({
144
+ ownerState
145
+ }) => ownerState?.contained,
146
+ style: {
147
+ '& pre': {
148
+ marginTop: 0
149
+ }
150
+ }
151
+ }, {
152
+ props: ({
153
+ ownerState
154
+ }) => !ownerState?.contained,
155
+ style: {
156
+ '& pre': {
157
+ marginTop: -1
158
+ }
159
+ }
160
+ }, {
161
+ props: ({
162
+ ownerState
163
+ }) => ownerState.mounted,
164
+ style: {
165
+ '& pre': {
166
+ '& code': {
167
+ opacity: 1
168
+ }
169
+ }
170
+ }
171
+ }, {
172
+ props: ({
173
+ ownerState
174
+ }) => !ownerState.mounted,
175
+ style: {
176
+ '& pre': {
177
+ '& code': {
178
+ opacity: 0
179
+ }
180
+ }
181
+ }
182
+ }]
183
+ });
184
+ export const CodeTab = styled(TabBase)(({
185
+ theme
186
+ }) => ({
187
+ variants: [{
188
+ props: ({
189
+ ownerState
190
+ }) => ownerState?.contained,
191
+ style: {
192
+ border: '1px solid transparent',
193
+ fontSize: theme.typography.pxToRem(13)
194
+ }
195
+ }, {
196
+ props: ({
197
+ ownerState
198
+ }) => !ownerState?.contained,
199
+ style: {
200
+ border: 'none',
201
+ fontSize: theme.typography.pxToRem(12)
202
+ }
203
+ }, {
204
+ props: ({
205
+ ownerState
206
+ }) => ownerState?.contained,
207
+ style: {
208
+ color: (theme.vars || theme).palette.text.tertiary
209
+ }
210
+ }, {
211
+ props: ({
212
+ ownerState
213
+ }) => !ownerState?.contained,
214
+ style: {
215
+ color: (theme.vars || theme).palette.grey[500]
216
+ }
217
+ }, {
218
+ props: ({
219
+ ownerState
220
+ }) => ownerState?.contained,
221
+ style: {
222
+ fontFamily: theme.typography.fontFamily
223
+ }
224
+ }, {
225
+ props: ({
226
+ ownerState
227
+ }) => !ownerState?.contained,
228
+ style: {
229
+ fontFamily: theme.typography.fontFamilyCode
230
+ }
231
+ }, {
232
+ props: ({
233
+ ownerState
234
+ }) => ownerState?.contained,
235
+ style: {
236
+ fontWeight: theme.typography.fontWeightMedium
237
+ }
238
+ }, {
239
+ props: ({
240
+ ownerState
241
+ }) => !ownerState?.contained,
242
+ style: {
243
+ fontWeight: theme.typography.fontWeightBold
244
+ }
245
+ }, {
246
+ props: ({
247
+ ownerState
248
+ }) => ownerState?.contained,
249
+ style: {
250
+ transition: 'background, color, 100ms ease'
251
+ }
252
+ }, {
253
+ props: ({
254
+ ownerState
255
+ }) => !ownerState?.contained,
256
+ style: {
257
+ transition: 'unset'
258
+ }
259
+ }, {
260
+ props: ({
261
+ ownerState
262
+ }) => !ownerState?.contained,
263
+ style: {
264
+ '&:hover': {
265
+ backgroundColor: alpha(theme.palette.primaryDark[500], 0.5),
266
+ color: (theme.vars || theme).palette.grey[400]
267
+ }
268
+ }
269
+ }, {
270
+ props: ({
271
+ ownerState
272
+ }) => !ownerState?.contained && ownerState.mounted,
273
+ style: {
274
+ '&.base--selected': {
275
+ color: '#FFF',
276
+ '&::after': {
277
+ content: "''",
278
+ position: 'absolute',
279
+ left: 0,
280
+ bottom: '-8px',
281
+ height: 2,
282
+ width: '100%',
283
+ bgcolor: (theme.vars || theme).palette.primary.light
284
+ }
285
+ }
286
+ }
287
+ }],
288
+ ...theme.unstable_sx({
289
+ flex: '0 0 auto',
290
+ height: 26,
291
+ p: '2px 8px',
292
+ bgcolor: 'transparent',
293
+ lineHeight: 1.2,
294
+ outline: 'none',
295
+ minWidth: 45,
296
+ cursor: 'pointer',
297
+ borderRadius: 99,
298
+ position: 'relative',
299
+ '&:hover': {
300
+ backgroundColor: (theme.vars || theme).palette.divider
301
+ },
302
+ '&:focus-visible': {
303
+ outline: '3px solid',
304
+ outlineOffset: '1px',
305
+ outlineColor: (theme.vars || theme).palette.primary.light
306
+ }
307
+ })
308
+ }));
309
+ export function HighlightedCodeWithTabs(props) {
310
+ const {
311
+ tabs,
312
+ storageKey
313
+ } = props;
314
+ const availableTabs = React.useMemo(() => {
315
+ const result = tabs.map(({
316
+ tab
317
+ }) => tab);
318
+ if (storageKey === 'package-manager') {
319
+ result.sort((a, b) => (PACKAGE_MANAGER_ORDER.get(a) ?? Infinity) - (PACKAGE_MANAGER_ORDER.get(b) ?? Infinity));
320
+ }
321
+ return result;
322
+ }, [storageKey, tabs]);
323
+ const [activeTab, setActiveTab] = useLocalStorageState(storageKey ?? null, availableTabs[0]);
324
+ // During hydration, activeTab is null, default to first value.
325
+ const defaultizedActiveTab = activeTab ?? availableTabs[0];
326
+ const [mounted, setMounted] = React.useState(false);
327
+ React.useEffect(() => {
328
+ setMounted(true);
329
+ }, []);
330
+ const handleChange = (event, newValue) => {
331
+ setActiveTab(newValue);
332
+ };
333
+ const ownerState = {
334
+ mounted
335
+ };
336
+ return /*#__PURE__*/_jsxs(Tabs, {
337
+ selectionFollowsFocus: true,
338
+ value: defaultizedActiveTab,
339
+ onChange: handleChange,
340
+ children: [/*#__PURE__*/_jsx(CodeTabList, {
341
+ ownerState: ownerState,
342
+ children: tabs.map(({
343
+ tab
344
+ }) => /*#__PURE__*/_jsx(CodeTab, {
345
+ ownerState: ownerState,
346
+ value: tab,
347
+ children: tab
348
+ }, tab))
349
+ }), tabs.map(({
350
+ tab,
351
+ language,
352
+ code
353
+ }) => /*#__PURE__*/_jsx(CodeTabPanel, {
354
+ ownerState: ownerState,
355
+ value: tab,
356
+ children: /*#__PURE__*/_jsx(HighlightedCode, {
357
+ language: language || 'bash',
358
+ code: typeof code === 'function' ? code(tab) : code
359
+ })
360
+ }, tab))]
361
+ });
362
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./HighlightedCodeWithTabs.js";
2
+ export { HighlightedCodeWithTabs as default } from "./HighlightedCodeWithTabs.js";
@@ -0,0 +1,2 @@
1
+ export * from "./HighlightedCodeWithTabs.js";
2
+ export { HighlightedCodeWithTabs as default } from "./HighlightedCodeWithTabs.js";
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ import { Theme } from '@mui/material/styles';
3
+ import { SxProps } from '@mui/system';
4
+ export type IconImageProps = {
5
+ name: 'product-core' | 'product-advanced' | 'product-toolpad' | 'product-templates' | 'product-designkits' | 'pricing/x-plan-pro' | 'pricing/x-plan-premium' | 'pricing/x-plan-community' | 'pricing/yes' | 'pricing/no' | 'pricing/time' | 'companies/spotify' | 'companies/amazon' | 'companies/nasa' | 'companies/netflix' | 'companies/unity' | 'companies/shutterstock' | 'companies/southwest' | 'companies/siemens' | 'companies/deloitte' | 'companies/apple' | 'companies/twitter' | 'companies/salesforce' | 'companies/verizon' | 'companies/atandt' | 'companies/patreon' | 'companies/ebay' | 'companies/samsung' | 'companies/volvo' | 'companies/tesla' | string;
6
+ height?: number;
7
+ mode?: '' | 'light' | 'dark';
8
+ sx?: SxProps<Theme>;
9
+ width?: number;
10
+ } & Omit<React.JSX.IntrinsicElements['img'], 'ref'>;
11
+ export default function IconImage(props: IconImageProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,83 @@
1
+ import * as React from 'react';
2
+ import { styled } from '@mui/material/styles';
3
+ import Box from '@mui/material/Box';
4
+ import { ThemeOptionsContext } from "../ThemeContext/index.js";
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ const Img = styled('img')({
7
+ display: 'inline-block',
8
+ verticalAlign: 'bottom'
9
+ });
10
+ let neverHydrated = true;
11
+ export default function IconImage(props) {
12
+ const {
13
+ height: heightProp,
14
+ name,
15
+ width: widthProp,
16
+ mode: modeProp,
17
+ ...other
18
+ } = props;
19
+ const themeOptions = React.useContext(ThemeOptionsContext);
20
+ const [firstRender, setFirstRender] = React.useState(true);
21
+ React.useEffect(() => {
22
+ setFirstRender(false);
23
+ neverHydrated = false;
24
+ }, []);
25
+ let defaultWidth;
26
+ let defaultHeight;
27
+ const mode = modeProp ?? themeOptions.paletteMode;
28
+ if (name.startsWith('product-')) {
29
+ defaultWidth = 36;
30
+ defaultHeight = 36;
31
+ } else if (name.startsWith('pricing/x-plan-')) {
32
+ defaultWidth = 17;
33
+ defaultHeight = 20;
34
+ } else if (['pricing/yes', 'pricing/no', 'pricing/time'].includes(name)) {
35
+ defaultWidth = 18;
36
+ defaultHeight = 18;
37
+ }
38
+ const width = widthProp ?? defaultWidth;
39
+ const height = heightProp ?? defaultHeight;
40
+
41
+ // First time render with a theme depend image
42
+ if (firstRender && neverHydrated && mode !== '') {
43
+ if (other.loading === 'eager') {
44
+ return /*#__PURE__*/_jsxs(React.Fragment, {
45
+ children: [/*#__PURE__*/_jsx(Img, {
46
+ className: "only-light-mode-v2",
47
+ src: `/static/branding/${name}-light.svg`,
48
+ alt: "",
49
+ width: width,
50
+ height: height,
51
+ ...other,
52
+ loading: "lazy"
53
+ }), /*#__PURE__*/_jsx(Img, {
54
+ className: "only-dark-mode-v2",
55
+ src: `/static/branding/${name}-dark.svg`,
56
+ alt: "",
57
+ width: width,
58
+ height: height,
59
+ ...other,
60
+ loading: "lazy"
61
+ })]
62
+ });
63
+ }
64
+
65
+ // Prevent hydration mismatch between the light and dark mode image source.
66
+ return /*#__PURE__*/_jsx(Box, {
67
+ component: "span",
68
+ sx: {
69
+ width,
70
+ height,
71
+ display: 'inline-block'
72
+ }
73
+ });
74
+ }
75
+ return /*#__PURE__*/_jsx(Img, {
76
+ src: `/static/branding/${name}${mode ? `-${mode}` : ''}.svg`,
77
+ alt: "",
78
+ loading: "lazy",
79
+ width: width,
80
+ height: height,
81
+ ...other
82
+ });
83
+ }
@@ -0,0 +1 @@
1
+ export { default, type IconImageProps } from "./IconImage.js";
@@ -0,0 +1 @@
1
+ export { default } from "./IconImage.js";
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+ import { TypographyProps } from '@mui/material/Typography';
3
+ import { LinkProps } from "../Link/index.js";
4
+ interface GlowingIconContainerProps {
5
+ icon: React.ReactNode;
6
+ }
7
+ export declare function GlowingIconContainer({
8
+ icon
9
+ }: GlowingIconContainerProps): import("react/jsx-runtime").JSX.Element;
10
+ interface InfoCardProps {
11
+ classNameDescription?: string;
12
+ classNameTitle?: string;
13
+ description?: string;
14
+ icon?: React.ReactNode;
15
+ link?: string;
16
+ prefetch?: LinkProps['prefetch'];
17
+ svg?: React.ReactNode;
18
+ title: string;
19
+ titleProps?: TypographyProps;
20
+ }
21
+ export declare function InfoCard(props: InfoCardProps): import("react/jsx-runtime").JSX.Element;
22
+ export {};
@@ -0,0 +1,91 @@
1
+ import * as React from 'react';
2
+ import { alpha } from '@mui/material/styles';
3
+ import Box from '@mui/material/Box';
4
+ import Paper from '@mui/material/Paper';
5
+ import Typography from '@mui/material/Typography';
6
+ import { Link } from "../Link/index.js";
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ export function GlowingIconContainer({
9
+ icon
10
+ }) {
11
+ return /*#__PURE__*/_jsx(Box, {
12
+ sx: theme => ({
13
+ width: 36,
14
+ height: 36,
15
+ display: 'flex',
16
+ justifyContent: 'center',
17
+ alignItems: 'center',
18
+ flexShrink: 0,
19
+ borderRadius: 1,
20
+ border: '1px solid',
21
+ borderColor: 'primary.200',
22
+ bgcolor: 'primary.50',
23
+ boxShadow: `0px 0 0 2px ${alpha(theme.palette.primary[500], 0.1)}, 0px 2px 12px 0px rgba(234, 237, 241, 0.3) inset`,
24
+ '& .MuiSvgIcon-root': {
25
+ fontSize: theme.typography.pxToRem(18)
26
+ },
27
+ ...theme.applyDarkStyles({
28
+ borderColor: alpha(theme.palette.primary[400], 0.25),
29
+ bgcolor: alpha(theme.palette.primary[900], 0.2),
30
+ boxShadow: `0 0 0 2px ${alpha(theme.palette.primary[600], 0.1)}, 0px 2px 12px 0px rgba(0, 0, 0, 0.25) inset`
31
+ })
32
+ }),
33
+ children: icon
34
+ });
35
+ }
36
+ export function InfoCard(props) {
37
+ const {
38
+ classNameDescription,
39
+ classNameTitle,
40
+ description,
41
+ icon,
42
+ link,
43
+ svg,
44
+ title,
45
+ titleProps,
46
+ ...other
47
+ } = props;
48
+ return /*#__PURE__*/_jsxs(Paper, {
49
+ variant: "outlined",
50
+ component: link ? Link : 'div',
51
+ href: link,
52
+ ...(link ? {
53
+ noLinkStyle: true,
54
+ // Fix overloading with prefetch={false}, only prefetch on hover.
55
+ prefetch: false
56
+ } : {}),
57
+ sx: theme => ({
58
+ p: 2.5,
59
+ height: '100%',
60
+ background: `${(theme.vars || theme).palette.gradients.linearSubtle}`,
61
+ ...theme.applyDarkStyles({
62
+ bgcolor: alpha(theme.palette.primaryDark[800], 0.25),
63
+ background: `${(theme.vars || theme).palette.gradients.linearSubtle}`,
64
+ borderColor: 'primaryDark.700'
65
+ })
66
+ }),
67
+ ...other,
68
+ children: [svg && svg, icon && /*#__PURE__*/_jsx(GlowingIconContainer, {
69
+ icon: icon
70
+ }), /*#__PURE__*/_jsx(Typography, {
71
+ component: "h3",
72
+ variant: "body2",
73
+ className: classNameTitle,
74
+ ...titleProps,
75
+ sx: [{
76
+ fontWeight: 'semiBold',
77
+ color: 'text.primary',
78
+ mt: icon ? 2 : 0,
79
+ mb: description ? 0.5 : 0
80
+ }, ...(Array.isArray(titleProps?.sx) ? titleProps.sx : [titleProps?.sx])],
81
+ children: title
82
+ }), /*#__PURE__*/_jsx(Typography, {
83
+ variant: "body2",
84
+ sx: {
85
+ color: 'text.secondary'
86
+ },
87
+ className: classNameDescription,
88
+ children: description
89
+ })]
90
+ });
91
+ }
@@ -0,0 +1 @@
1
+ export * from "./InfoCard.js";
@@ -0,0 +1 @@
1
+ export * from "./InfoCard.js";
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 Call-Em-All
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/Link/Link.d.ts ADDED
@@ -0,0 +1,25 @@
1
+ import * as React from 'react';
2
+ import { LinkProps as NextLinkProps } from 'next/link';
3
+ import { LinkProps as MuiLinkProps } from '@mui/material/Link';
4
+ /**
5
+ * File to keep in sync with:
6
+ *
7
+ * - /packages/mui-docs/src/Link/Link.tsx
8
+ * - /examples/material-ui-nextjs-pages-router/src/Link.js
9
+ * - /examples/material-ui-nextjs-pages-router-ts/src/Link.tsx
10
+ * - /examples/material-ui-nextjs-ts-v4-v5-migration/src/Link.tsx
11
+ */
12
+ interface NextLinkComposedProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>, Omit<NextLinkProps, 'href' | 'as' | 'passHref' | 'onMouseEnter' | 'onClick' | 'onTouchStart'> {
13
+ to: NextLinkProps['href'];
14
+ linkAs?: NextLinkProps['as'];
15
+ }
16
+ export declare const NextLinkComposed: React.ForwardRefExoticComponent<NextLinkComposedProps & React.RefAttributes<HTMLAnchorElement>>;
17
+ export type LinkProps = {
18
+ activeClassName?: string;
19
+ as?: NextLinkProps['as'];
20
+ href: NextLinkProps['href'];
21
+ linkAs?: NextLinkProps['as'];
22
+ noLinkStyle?: boolean;
23
+ } & Omit<NextLinkComposedProps, 'to' | 'linkAs' | 'href'> & Omit<MuiLinkProps, 'href'>;
24
+ export declare const Link: React.ForwardRefExoticComponent<Omit<LinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
25
+ export {};