@mui/docs 9.0.0-alpha.2 → 9.0.0-alpha.3

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 (253) hide show
  1. package/Ad/Ad.js +33 -42
  2. package/Ad/AdCarbon.js +18 -27
  3. package/Ad/AdDisplay.js +22 -29
  4. package/Ad/AdGuest.js +8 -15
  5. package/Ad/AdInHouse.js +4 -11
  6. package/Ad/AdManager.js +8 -17
  7. package/Ad/AdProvider.js +5 -13
  8. package/Ad/ad.styles.js +5 -13
  9. package/Ad/index.js +6 -62
  10. package/AnalyticsProvider/AnalyticsProvider.d.ts +17 -0
  11. package/AnalyticsProvider/AnalyticsProvider.js +225 -0
  12. package/AnalyticsProvider/index.d.ts +1 -0
  13. package/AnalyticsProvider/index.js +1 -0
  14. package/CHANGELOG.md +37 -0
  15. package/CodeCopy/CodeCopy.js +10 -19
  16. package/CodeCopy/CodeCopyButton.js +9 -16
  17. package/CodeCopy/index.js +3 -40
  18. package/CodeCopy/useClipboardCopy.js +4 -12
  19. package/ComponentLinkHeader/ComponentLinkHeader.js +46 -54
  20. package/ComponentLinkHeader/index.js +2 -24
  21. package/DemoContext/DemoContext.d.ts +86 -0
  22. package/DemoContext/DemoContext.js +13 -0
  23. package/DemoContext/index.d.ts +2 -0
  24. package/DemoContext/index.js +1 -0
  25. package/DocsProvider/DocsProvider.js +9 -17
  26. package/DocsProvider/index.js +1 -16
  27. package/Document/Document.d.ts +16 -0
  28. package/Document/Document.js +147 -0
  29. package/Document/getInitialProps.d.ts +18 -0
  30. package/Document/getInitialProps.js +62 -0
  31. package/Document/index.d.ts +2 -0
  32. package/Document/index.js +2 -0
  33. package/GoogleAnalytics/GoogleAnalytics.d.ts +9 -0
  34. package/GoogleAnalytics/GoogleAnalytics.js +129 -0
  35. package/GoogleAnalytics/index.d.ts +1 -0
  36. package/GoogleAnalytics/index.js +1 -0
  37. package/HighlightedCode/HighlightedCode.js +18 -26
  38. package/HighlightedCode/index.js +1 -16
  39. package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.js +22 -31
  40. package/HighlightedCodeWithTabs/index.js +2 -24
  41. package/IconImage/IconImage.js +13 -21
  42. package/IconImage/index.js +1 -13
  43. package/InfoCard/InfoCard.js +20 -29
  44. package/InfoCard/index.js +1 -16
  45. package/Link/Link.js +17 -25
  46. package/Link/MarkdownLinks.d.ts +2 -0
  47. package/Link/MarkdownLinks.js +84 -0
  48. package/Link/SkipLink.d.ts +1 -0
  49. package/Link/SkipLink.js +66 -0
  50. package/Link/index.d.ts +3 -1
  51. package/Link/index.js +3 -16
  52. package/MarkdownElement/MarkdownElement.js +178 -186
  53. package/MarkdownElement/index.js +1 -16
  54. package/MuiPage/MuiPage.d.ts +67 -0
  55. package/MuiPage/MuiPage.js +1 -0
  56. package/MuiPage/index.d.ts +1 -0
  57. package/MuiPage/index.js +1 -0
  58. package/NextNProgressBar/NextNProgressBar.d.ts +1 -0
  59. package/NextNProgressBar/NextNProgressBar.js +44 -0
  60. package/NextNProgressBar/index.d.ts +1 -0
  61. package/NextNProgressBar/index.js +1 -0
  62. package/PageContext/PageContext.d.ts +31 -0
  63. package/PageContext/PageContext.js +6 -0
  64. package/PageContext/index.d.ts +2 -0
  65. package/PageContext/index.js +1 -0
  66. package/SectionHeadline/SectionHeadline.js +9 -17
  67. package/SectionHeadline/index.js +2 -25
  68. package/SectionTitle/SectionTitle.js +7 -13
  69. package/SectionTitle/index.js +1 -16
  70. package/StyledEngineProvider/StyledEngineProvider.d.ts +9 -0
  71. package/StyledEngineProvider/StyledEngineProvider.js +44 -0
  72. package/StyledEngineProvider/index.d.ts +1 -0
  73. package/StyledEngineProvider/index.js +1 -0
  74. package/ThemeContext/ThemeContext.js +26 -38
  75. package/ThemeContext/index.js +1 -42
  76. package/branding/BrandingCssVarsProvider.d.ts +23 -0
  77. package/branding/BrandingCssVarsProvider.js +170 -0
  78. package/branding/BrandingProvider.js +8 -15
  79. package/branding/brandingTheme.js +115 -126
  80. package/branding/index.d.ts +2 -1
  81. package/branding/index.js +3 -27
  82. package/codeStyling/codeStyling.d.ts +10 -0
  83. package/codeStyling/codeStyling.js +84 -0
  84. package/codeStyling/index.d.ts +1 -0
  85. package/codeStyling/index.js +1 -0
  86. package/codeVariant/codeVariant.d.ts +10 -0
  87. package/codeVariant/codeVariant.js +73 -0
  88. package/codeVariant/index.d.ts +1 -0
  89. package/codeVariant/index.js +1 -0
  90. package/constants/constants.d.ts +13 -0
  91. package/constants/constants.js +15 -0
  92. package/constants/index.d.ts +1 -0
  93. package/constants/index.js +1 -0
  94. package/createEmotionCache/createEmotionCache.d.ts +1 -0
  95. package/createEmotionCache/createEmotionCache.js +12 -0
  96. package/createEmotionCache/index.d.ts +1 -0
  97. package/createEmotionCache/index.js +1 -0
  98. package/findActivePage/findActivePage.d.ts +5 -0
  99. package/findActivePage/findActivePage.js +35 -0
  100. package/findActivePage/index.d.ts +1 -0
  101. package/findActivePage/index.js +1 -0
  102. package/getProductInfoFromUrl/getProductInfoFromUrl.d.ts +8 -0
  103. package/getProductInfoFromUrl/getProductInfoFromUrl.js +50 -0
  104. package/getProductInfoFromUrl/index.d.ts +2 -0
  105. package/getProductInfoFromUrl/index.js +1 -0
  106. package/globalSelector/globalSelector.d.ts +2 -0
  107. package/globalSelector/globalSelector.js +17 -0
  108. package/globalSelector/index.d.ts +1 -0
  109. package/globalSelector/index.js +1 -0
  110. package/helpers/helpers.d.ts +31 -0
  111. package/helpers/helpers.js +87 -0
  112. package/helpers/index.d.ts +2 -0
  113. package/helpers/index.js +1 -0
  114. package/i18n/i18n.js +17 -29
  115. package/i18n/index.js +1 -16
  116. package/mapApiPageTranslations/index.d.ts +1 -0
  117. package/mapApiPageTranslations/index.js +1 -0
  118. package/mapApiPageTranslations/mapApiPageTranslations.d.ts +11 -0
  119. package/mapApiPageTranslations/mapApiPageTranslations.js +46 -0
  120. package/nextFonts/index.js +8 -15
  121. package/package.json +231 -126
  122. package/svgIcons/BundleSizeIcon.js +5 -11
  123. package/svgIcons/FigmaIcon.js +8 -14
  124. package/svgIcons/FileDownload.js +5 -12
  125. package/svgIcons/JavaScript.js +5 -12
  126. package/svgIcons/MarkdownIcon.js +7 -14
  127. package/svgIcons/MaterialDesignIcon.js +6 -12
  128. package/svgIcons/SketchIcon.js +10 -16
  129. package/svgIcons/TypeScript.js +5 -12
  130. package/svgIcons/W3CIcon.js +6 -12
  131. package/translations/index.js +3 -10
  132. package/translations/translations.json +0 -1
  133. package/useLazyCSS/index.js +1 -13
  134. package/useLazyCSS/useLazyCSS.js +5 -11
  135. package/utils/index.d.ts +1 -0
  136. package/utils/index.js +2 -0
  137. package/utils/loadScript.js +1 -7
  138. package/Ad/Ad.d.mts +0 -5
  139. package/Ad/Ad.mjs +0 -226
  140. package/Ad/AdCarbon.d.mts +0 -2
  141. package/Ad/AdCarbon.mjs +0 -125
  142. package/Ad/AdDisplay.d.mts +0 -16
  143. package/Ad/AdDisplay.mjs +0 -86
  144. package/Ad/AdGuest.d.mts +0 -10
  145. package/Ad/AdGuest.mjs +0 -29
  146. package/Ad/AdInHouse.d.mts +0 -4
  147. package/Ad/AdInHouse.mjs +0 -14
  148. package/Ad/AdManager.d.mts +0 -19
  149. package/Ad/AdManager.mjs +0 -36
  150. package/Ad/AdProvider.d.mts +0 -15
  151. package/Ad/AdProvider.mjs +0 -24
  152. package/Ad/ad.styles.d.mts +0 -4512
  153. package/Ad/ad.styles.mjs +0 -91
  154. package/Ad/index.d.mts +0 -5
  155. package/Ad/index.mjs +0 -7
  156. package/CodeCopy/CodeCopy.d.mts +0 -22
  157. package/CodeCopy/CodeCopy.mjs +0 -172
  158. package/CodeCopy/CodeCopyButton.d.mts +0 -4
  159. package/CodeCopy/CodeCopyButton.mjs +0 -40
  160. package/CodeCopy/index.d.mts +0 -3
  161. package/CodeCopy/index.mjs +0 -3
  162. package/CodeCopy/useClipboardCopy.d.mts +0 -4
  163. package/CodeCopy/useClipboardCopy.mjs +0 -21
  164. package/ComponentLinkHeader/ComponentLinkHeader.d.mts +0 -8
  165. package/ComponentLinkHeader/ComponentLinkHeader.mjs +0 -197
  166. package/ComponentLinkHeader/index.d.mts +0 -2
  167. package/ComponentLinkHeader/index.mjs +0 -2
  168. package/DocsProvider/DocsProvider.d.mts +0 -24
  169. package/DocsProvider/DocsProvider.mjs +0 -31
  170. package/DocsProvider/index.d.mts +0 -1
  171. package/DocsProvider/index.mjs +0 -1
  172. package/HighlightedCode/HighlightedCode.d.mts +0 -14
  173. package/HighlightedCode/HighlightedCode.mjs +0 -67
  174. package/HighlightedCode/index.d.mts +0 -1
  175. package/HighlightedCode/index.mjs +0 -1
  176. package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.d.mts +0 -28
  177. package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.mjs +0 -362
  178. package/HighlightedCodeWithTabs/index.d.mts +0 -2
  179. package/HighlightedCodeWithTabs/index.mjs +0 -2
  180. package/IconImage/IconImage.d.mts +0 -11
  181. package/IconImage/IconImage.mjs +0 -83
  182. package/IconImage/index.d.mts +0 -1
  183. package/IconImage/index.mjs +0 -1
  184. package/InfoCard/InfoCard.d.mts +0 -22
  185. package/InfoCard/InfoCard.mjs +0 -87
  186. package/InfoCard/index.d.mts +0 -1
  187. package/InfoCard/index.mjs +0 -1
  188. package/Link/Link.d.mts +0 -25
  189. package/Link/Link.mjs +0 -75
  190. package/Link/index.d.mts +0 -1
  191. package/Link/index.mjs +0 -1
  192. package/MarkdownElement/MarkdownElement.d.mts +0 -7
  193. package/MarkdownElement/MarkdownElement.mjs +0 -847
  194. package/MarkdownElement/index.d.mts +0 -1
  195. package/MarkdownElement/index.mjs +0 -1
  196. package/NProgressBar/NProgressBar.d.mts +0 -6
  197. package/NProgressBar/NProgressBar.js +0 -98
  198. package/NProgressBar/index.d.mts +0 -2
  199. package/NProgressBar/index.d.ts +0 -2
  200. package/NProgressBar/index.js +0 -13
  201. package/NProgressBar/index.mjs +0 -1
  202. package/SectionHeadline/SectionHeadline.d.mts +0 -13
  203. package/SectionHeadline/SectionHeadline.mjs +0 -81
  204. package/SectionHeadline/index.d.mts +0 -2
  205. package/SectionHeadline/index.mjs +0 -2
  206. package/SectionTitle/SectionTitle.d.mts +0 -6
  207. package/SectionTitle/SectionTitle.mjs +0 -29
  208. package/SectionTitle/index.d.mts +0 -1
  209. package/SectionTitle/index.mjs +0 -1
  210. package/ThemeContext/ThemeContext.d.mts +0 -92
  211. package/ThemeContext/ThemeContext.mjs +0 -200
  212. package/ThemeContext/index.d.mts +0 -1
  213. package/ThemeContext/index.mjs +0 -1
  214. package/branding/BrandingProvider.d.mts +0 -9
  215. package/branding/BrandingProvider.mjs +0 -17
  216. package/branding/brandingTheme.d.mts +0 -147
  217. package/branding/brandingTheme.mjs +0 -1527
  218. package/branding/index.d.mts +0 -2
  219. package/branding/index.mjs +0 -2
  220. package/i18n/i18n.d.mts +0 -27
  221. package/i18n/i18n.mjs +0 -111
  222. package/i18n/index.d.mts +0 -1
  223. package/i18n/index.mjs +0 -1
  224. package/nextFonts/index.d.mts +0 -6
  225. package/nextFonts/index.mjs +0 -59
  226. package/svgIcons/BundleSizeIcon.d.mts +0 -4
  227. package/svgIcons/BundleSizeIcon.mjs +0 -13
  228. package/svgIcons/FigmaIcon.d.mts +0 -4
  229. package/svgIcons/FigmaIcon.mjs +0 -22
  230. package/svgIcons/FileDownload.d.mts +0 -6
  231. package/svgIcons/FileDownload.mjs +0 -13
  232. package/svgIcons/JavaScript.d.mts +0 -6
  233. package/svgIcons/JavaScript.mjs +0 -13
  234. package/svgIcons/MarkdownIcon.d.mts +0 -2
  235. package/svgIcons/MarkdownIcon.mjs +0 -22
  236. package/svgIcons/MaterialDesignIcon.d.mts +0 -4
  237. package/svgIcons/MaterialDesignIcon.mjs +0 -18
  238. package/svgIcons/SketchIcon.d.mts +0 -4
  239. package/svgIcons/SketchIcon.mjs +0 -27
  240. package/svgIcons/TypeScript.d.mts +0 -6
  241. package/svgIcons/TypeScript.mjs +0 -13
  242. package/svgIcons/W3CIcon.d.mts +0 -4
  243. package/svgIcons/W3CIcon.mjs +0 -15
  244. package/translations/index.d.mts +0 -3
  245. package/translations/index.mjs +0 -4
  246. package/useLazyCSS/index.d.mts +0 -1
  247. package/useLazyCSS/index.mjs +0 -1
  248. package/useLazyCSS/useLazyCSS.d.mts +0 -11
  249. package/useLazyCSS/useLazyCSS.mjs +0 -70
  250. package/utils/loadScript.d.mts +0 -1
  251. package/utils/loadScript.mjs +0 -7
  252. /package/{NProgressBar → NextNProgressBar}/NProgressBar.d.ts +0 -0
  253. /package/{NProgressBar/NProgressBar.mjs → NextNProgressBar/NProgressBar.js} +0 -0
@@ -0,0 +1,225 @@
1
+ var _CookieOutlinedIcon, _BrandingCssThemeProv;
2
+ import * as React from 'react';
3
+ import Button from '@mui/material/Button';
4
+ import Fade from '@mui/material/Fade';
5
+ import Paper from '@mui/material/Paper';
6
+ import Box from '@mui/material/Box';
7
+ import Stack from '@mui/material/Stack';
8
+ import Typography from '@mui/material/Typography';
9
+ import useLocalStorageState from '@mui/utils/useLocalStorageState';
10
+ import { alpha } from '@mui/system';
11
+ import Portal from '@mui/material/Portal';
12
+ import TrapFocus from '@mui/material/Unstable_TrapFocus';
13
+ import CookieOutlinedIcon from '@mui/icons-material/CookieOutlined';
14
+ import { BrandingCssThemeProvider } from "../branding/BrandingCssVarsProvider.js";
15
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
+ const COOKIE_CONSENT_KEY = 'docs-cookie-consent';
17
+ function getDoNotTrack() {
18
+ if (typeof window === 'undefined') {
19
+ return false;
20
+ }
21
+ // Check for Do Not Track (DNT)
22
+ return navigator.doNotTrack === '1' || window.doNotTrack === '1';
23
+ }
24
+
25
+ // DNT doesn't change during a session, so we can use a simple external store
26
+ const subscribeToNothing = () => () => {};
27
+ const getDoNotTrackSnapshot = () => getDoNotTrack();
28
+ const getDoNotTrackServerSnapshot = () => true; // Assume DNT until we know the actual value
29
+
30
+ function useDoNotTrack() {
31
+ return React.useSyncExternalStore(subscribeToNothing, getDoNotTrackSnapshot, getDoNotTrackServerSnapshot);
32
+ }
33
+ const AnalyticsContext = /*#__PURE__*/React.createContext({
34
+ consentStatus: null,
35
+ hasAnalyticsConsent: false,
36
+ needsConsent: false,
37
+ setAnalyticsConsent: () => {},
38
+ setEssentialOnly: () => {}
39
+ });
40
+ export function useAnalyticsConsent() {
41
+ return React.useContext(AnalyticsContext);
42
+ }
43
+ export function CookieConsentDialog() {
44
+ const {
45
+ needsConsent,
46
+ setAnalyticsConsent,
47
+ setEssentialOnly
48
+ } = useAnalyticsConsent();
49
+ const [show, setShow] = React.useState(false);
50
+ React.useEffect(() => {
51
+ if (needsConsent) {
52
+ // Double rAF to ensure the initial opacity: 0 state is painted before transitioning
53
+ const frame = requestAnimationFrame(() => {
54
+ requestAnimationFrame(() => {
55
+ setShow(true);
56
+ });
57
+ });
58
+ return () => cancelAnimationFrame(frame);
59
+ }
60
+ setShow(false);
61
+ return undefined;
62
+ }, [needsConsent]);
63
+ return /*#__PURE__*/_jsx(Portal, {
64
+ children: /*#__PURE__*/_jsx(TrapFocus, {
65
+ open: needsConsent,
66
+ disableAutoFocus: true,
67
+ disableEnforceFocus: true,
68
+ children: /*#__PURE__*/_jsx(Fade, {
69
+ in: show,
70
+ unmountOnExit: true,
71
+ children: /*#__PURE__*/_jsx(Paper, {
72
+ role: "dialog",
73
+ "aria-modal": "false",
74
+ "aria-labelledby": "cookie-consent-dialog-title",
75
+ "aria-describedby": "cookie-consent-dialog-description",
76
+ variant: "outlined",
77
+ tabIndex: -1,
78
+ sx: theme => ({
79
+ position: 'fixed',
80
+ bottom: 0,
81
+ right: 0,
82
+ p: 2,
83
+ m: 2,
84
+ maxWidth: 340,
85
+ pointerEvents: 'auto',
86
+ boxShadow: theme.shadows[2],
87
+ zIndex: theme.zIndex.snackbar,
88
+ ...(theme.applyDarkStyles ? theme.applyDarkStyles({
89
+ bgcolor: 'primaryDark.900'
90
+ }) : {
91
+ [theme.getColorSchemeSelector?.('dark') || '&.mode-dark']: {
92
+ bgcolor: 'primaryDark.900'
93
+ }
94
+ })
95
+ }),
96
+ children: /*#__PURE__*/_jsxs(Stack, {
97
+ direction: "column",
98
+ spacing: 3,
99
+ sx: {
100
+ justifyContent: 'flex-start'
101
+ },
102
+ children: [/*#__PURE__*/_jsxs(Stack, {
103
+ spacing: 1,
104
+ sx: {
105
+ flexShrink: 1,
106
+ alignSelf: {
107
+ xs: 'flex-start',
108
+ sm: 'center'
109
+ }
110
+ },
111
+ children: [/*#__PURE__*/_jsx(Box, {
112
+ sx: theme => ({
113
+ borderRadius: '50%',
114
+ bgcolor: alpha(theme.palette.primary.main, 0.1),
115
+ p: 1,
116
+ display: 'inline-block',
117
+ width: 40,
118
+ height: 40,
119
+ mb: -1,
120
+ alignSelf: {
121
+ xs: 'center',
122
+ sm: 'flex-start'
123
+ }
124
+ }),
125
+ children: _CookieOutlinedIcon || (_CookieOutlinedIcon = /*#__PURE__*/_jsx(CookieOutlinedIcon, {
126
+ color: "primary",
127
+ strokeWidth: 1.5
128
+ }))
129
+ }), /*#__PURE__*/_jsxs(Stack, {
130
+ spacing: 0.5,
131
+ children: [/*#__PURE__*/_jsx(Typography, {
132
+ variant: "subtitle2",
133
+ id: "cookie-consent-dialog-title",
134
+ textAlign: {
135
+ xs: 'center',
136
+ sm: 'start'
137
+ },
138
+ children: "Cookie Preferences"
139
+ }), /*#__PURE__*/_jsx(Typography, {
140
+ id: "cookie-consent-dialog-description",
141
+ variant: "body2",
142
+ textAlign: {
143
+ xs: 'center',
144
+ sm: 'start'
145
+ },
146
+ children: "We use cookies to understand site usage and improve our content. This includes third-party analytics."
147
+ })]
148
+ })]
149
+ }), /*#__PURE__*/_jsxs(Stack, {
150
+ direction: "row",
151
+ spacing: 1,
152
+ sx: {
153
+ justifyContent: 'flex-start'
154
+ },
155
+ children: [/*#__PURE__*/_jsx(Button, {
156
+ onClick: setAnalyticsConsent,
157
+ variant: "contained",
158
+ size: "small",
159
+ children: "Allow analytics"
160
+ }), /*#__PURE__*/_jsx(Button, {
161
+ onClick: setEssentialOnly,
162
+ size: "small",
163
+ children: "Essential only"
164
+ })]
165
+ })]
166
+ })
167
+ })
168
+ })
169
+ })
170
+ });
171
+ }
172
+ function updateGoogleConsent(hasAnalytics) {
173
+ if (typeof window !== 'undefined' && typeof window.gtag === 'function') {
174
+ window.gtag('consent', 'update', {
175
+ ad_storage: 'denied',
176
+ ad_user_data: 'denied',
177
+ ad_personalization: 'denied',
178
+ analytics_storage: hasAnalytics ? 'granted' : 'denied'
179
+ });
180
+
181
+ // Initialize Apollo when analytics consent is granted
182
+ const win = window;
183
+ if (hasAnalytics && typeof win.initApollo === 'function') {
184
+ win.initApollo();
185
+ }
186
+ }
187
+ }
188
+ export function AnalyticsProvider({
189
+ children
190
+ }) {
191
+ const [consentStatus, setConsentStatus] = useLocalStorageState(COOKIE_CONSENT_KEY, null);
192
+ const doNotTrack = useDoNotTrack();
193
+
194
+ // Respect Do Not Track - don't show dialog and treat as essential only
195
+ const needsConsent = consentStatus === null && !doNotTrack;
196
+
197
+ // Update Google consent when status changes or on mount if already set
198
+ React.useEffect(() => {
199
+ if (doNotTrack) {
200
+ // DNT is enabled - always deny analytics
201
+ updateGoogleConsent(false);
202
+ } else if (consentStatus !== null) {
203
+ updateGoogleConsent(consentStatus === 'analytics');
204
+ }
205
+ }, [consentStatus, doNotTrack]);
206
+ const setAnalyticsConsent = React.useCallback(() => {
207
+ setConsentStatus('analytics');
208
+ }, [setConsentStatus]);
209
+ const setEssentialOnly = React.useCallback(() => {
210
+ setConsentStatus('essential');
211
+ }, [setConsentStatus]);
212
+ const contextValue = React.useMemo(() => ({
213
+ consentStatus: doNotTrack ? 'essential' : consentStatus,
214
+ hasAnalyticsConsent: !doNotTrack && consentStatus === 'analytics',
215
+ needsConsent,
216
+ setAnalyticsConsent,
217
+ setEssentialOnly
218
+ }), [consentStatus, doNotTrack, needsConsent, setAnalyticsConsent, setEssentialOnly]);
219
+ return /*#__PURE__*/_jsxs(AnalyticsContext.Provider, {
220
+ value: contextValue,
221
+ children: [children, _BrandingCssThemeProv || (_BrandingCssThemeProv = /*#__PURE__*/_jsx(BrandingCssThemeProvider, {
222
+ children: /*#__PURE__*/_jsx(CookieConsentDialog, {})
223
+ }))]
224
+ });
225
+ }
@@ -0,0 +1 @@
1
+ export { AnalyticsProvider, useAnalyticsConsent, CookieConsentDialog } from "./AnalyticsProvider.js";
@@ -0,0 +1 @@
1
+ export { AnalyticsProvider, useAnalyticsConsent, CookieConsentDialog } from "./AnalyticsProvider.js";
package/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 9.0.0-alpha.3
4
+
5
+ <!-- generated comparing v9.0.0-alpha.2..master -->
6
+
7
+ _Mar 12, 2026_
8
+
9
+ A big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - 📖 A new [Menubar](https://mui.com/material-ui/react-menubar/) component page integrated with [Base UI](https://base-ui.com/react/components/menubar)
12
+ - ♿️ Improved the Roving TabIndex keyboard navigation for the Stepper, Tabs and MenuList components.
13
+
14
+ ### `@mui/material@9.0.0-alpha.3`
15
+
16
+ - [autocomplete] Add `root` slot (#47852) @GerardasB
17
+ - [autocomplete] Fix popup reopening on window focus regain with openOnFocus (#47790) @aman44444
18
+ - [autocomplete] Support full slots for clearIndicator and popupIndicator (#47891) @silviuaavram
19
+ - [material-ui] Partially revert "[material-ui] Clean up duplicated CSS rules (#47838)" (#47927) @sai6855
20
+ - [stepper][menulist][tabs] Improve accessibility (#47687) @silviuaavram
21
+
22
+ ### Docs
23
+
24
+ - [docs][codemod] Add v7 migration docs for deprecated Autocomplete APIs and Autocomplete codemod (#47945) @ZeeshanTamboli
25
+ - [docs] Update faq about vendor chunks (#47747) @Janpot
26
+ - [docs] Use direct palette vars in Tailwind v4 snippet (#47940) @Ahmad-Alaziz
27
+ - [docs][menubar] Add Menubar component page (#47616) @siriwatknp
28
+
29
+ ### Core
30
+
31
+ - [core] Fix the release prepare steps (#47951) @silviuaavram
32
+ - [core] Remove Joy UI code and docs (#47939) @mnajdova
33
+ - [code-infra] Add previously missed export of themeCssVarsAugmentation (#47918) @brijeshb42
34
+ - [docs-infra] Import font module for nextjs transpilation (#47935) @brijeshb42
35
+ - [docs-infra] Migrate simpler modules from docs to mui-docs (#47897) @brijeshb42
36
+ - [test] Fix detached anchorEl elements in tests (#47929) @Janpot
37
+
38
+ All contributors of this release in alphabetical order: @Ahmad-Alaziz, @aman44444, @brijeshb42, @GerardasB, @Janpot, @mnajdova, @sai6855, @silviuaavram, @siriwatknp, @ZeeshanTamboli
39
+
3
40
  ## 9.0.0-alpha.2
4
41
 
5
42
  <!-- generated comparing v9.0.0-alpha.1..master -->
@@ -1,17 +1,8 @@
1
- "use strict";
2
-
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.CodeCopyProvider = CodeCopyProvider;
9
- exports.useCodeCopy = useCodeCopy;
10
- var React = _interopRequireWildcard(require("react"));
11
- var _router = require("next/router");
12
- var _clipboardCopy = _interopRequireDefault(require("clipboard-copy"));
13
- var _jsxRuntime = require("react/jsx-runtime");
14
1
  var _InitCodeCopy;
2
+ import * as React from 'react';
3
+ import { useRouter } from 'next/router';
4
+ import clipboardCopy from 'clipboard-copy';
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
6
  const CodeBlockContext = /*#__PURE__*/React.createContext({
16
7
  current: null
17
8
  });
@@ -25,7 +16,7 @@ const CodeBlockContext = /*#__PURE__*/React.createContext({
25
16
  * <button className="MuiCode-copy">...</button>
26
17
  * </div>
27
18
  */
28
- function useCodeCopy() {
19
+ export function useCodeCopy() {
29
20
  const rootNode = React.useContext(CodeBlockContext);
30
21
  return {
31
22
  onMouseEnter: event => {
@@ -49,7 +40,7 @@ function useCodeCopy() {
49
40
  }
50
41
  function InitCodeCopy() {
51
42
  const rootNode = React.useContext(CodeBlockContext);
52
- const router = (0, _router.useRouter)();
43
+ const router = useRouter();
53
44
  React.useEffect(() => {
54
45
  let key = 'Ctrl + ';
55
46
  if (typeof window !== 'undefined') {
@@ -103,7 +94,7 @@ function InitCodeCopy() {
103
94
  }, 2000);
104
95
  try {
105
96
  if (pre.textContent) {
106
- await (0, _clipboardCopy.default)(pre.textContent);
97
+ await clipboardCopy(pre.textContent);
107
98
  }
108
99
  // eslint-disable-next-line no-empty
109
100
  } catch (error) {}
@@ -147,7 +138,7 @@ function hasNativeSelection(element) {
147
138
  * Place <CodeCopyProvider> at the page level. It will check the keydown event and try to initiate copy click if rootNode exist.
148
139
  * Any code block inside the tree can set the rootNode when mouse enter to leverage keyboard copy.
149
140
  */
150
- function CodeCopyProvider({
141
+ export function CodeCopyProvider({
151
142
  children
152
143
  }) {
153
144
  const rootNode = React.useRef(null);
@@ -174,8 +165,8 @@ function CodeCopyProvider({
174
165
  copyBtn.dataset.gaEventAction = initialEventAction; // reset the 'data-ga-event-action' back to initial
175
166
  });
176
167
  }, []);
177
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(CodeBlockContext.Provider, {
168
+ return /*#__PURE__*/_jsxs(CodeBlockContext.Provider, {
178
169
  value: rootNode,
179
- children: [_InitCodeCopy || (_InitCodeCopy = /*#__PURE__*/(0, _jsxRuntime.jsx)(InitCodeCopy, {})), children]
170
+ children: [_InitCodeCopy || (_InitCodeCopy = /*#__PURE__*/_jsx(InitCodeCopy, {})), children]
180
171
  });
181
172
  }
@@ -1,14 +1,7 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.CodeCopyButton = CodeCopyButton;
8
- var _useClipboardCopy = _interopRequireDefault(require("./useClipboardCopy"));
9
- var _jsxRuntime = require("react/jsx-runtime");
10
1
  var _span, _span2;
11
- function CodeCopyButton(props) {
2
+ import useClipboardCopy from "./useClipboardCopy.js";
3
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
+ export function CodeCopyButton(props) {
12
5
  const {
13
6
  code,
14
7
  ...other
@@ -16,13 +9,13 @@ function CodeCopyButton(props) {
16
9
  const {
17
10
  copy,
18
11
  isCopied
19
- } = (0, _useClipboardCopy.default)();
12
+ } = useClipboardCopy();
20
13
  // This component is designed to be wrapped in NoSsr
21
14
  const macOS = window.navigator.platform.toUpperCase().includes('MAC');
22
15
  const key = macOS ? '⌘' : 'Ctrl + ';
23
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
16
+ return /*#__PURE__*/_jsx("div", {
24
17
  className: "MuiCode-copy-container",
25
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
18
+ children: /*#__PURE__*/_jsxs("button", {
26
19
  ...other,
27
20
  "aria-label": "Copy the code",
28
21
  type: "button",
@@ -31,14 +24,14 @@ function CodeCopyButton(props) {
31
24
  // event.stopPropagation();
32
25
  await copy(code);
33
26
  },
34
- children: [isCopied ? 'Copied' : 'Copy', /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
27
+ children: [isCopied ? 'Copied' : 'Copy', /*#__PURE__*/_jsxs("span", {
35
28
  className: "MuiCode-copyKeypress",
36
29
  style: {
37
30
  opacity: isCopied ? 0 : 1
38
31
  },
39
- children: [_span || (_span = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
32
+ children: [_span || (_span = /*#__PURE__*/_jsx("span", {
40
33
  children: "(or"
41
- })), " ", key, "C", _span2 || (_span2 = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
34
+ })), " ", key, "C", _span2 || (_span2 = /*#__PURE__*/_jsx("span", {
42
35
  children: ")"
43
36
  }))]
44
37
  })]
package/CodeCopy/index.js CHANGED
@@ -1,40 +1,3 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- var _exportNames = {
8
- useClipboardCopy: true
9
- };
10
- Object.defineProperty(exports, "useClipboardCopy", {
11
- enumerable: true,
12
- get: function () {
13
- return _useClipboardCopy.default;
14
- }
15
- });
16
- var _CodeCopy = require("./CodeCopy");
17
- Object.keys(_CodeCopy).forEach(function (key) {
18
- if (key === "default" || key === "__esModule") return;
19
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
20
- if (key in exports && exports[key] === _CodeCopy[key]) return;
21
- Object.defineProperty(exports, key, {
22
- enumerable: true,
23
- get: function () {
24
- return _CodeCopy[key];
25
- }
26
- });
27
- });
28
- var _CodeCopyButton = require("./CodeCopyButton");
29
- Object.keys(_CodeCopyButton).forEach(function (key) {
30
- if (key === "default" || key === "__esModule") return;
31
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
32
- if (key in exports && exports[key] === _CodeCopyButton[key]) return;
33
- Object.defineProperty(exports, key, {
34
- enumerable: true,
35
- get: function () {
36
- return _CodeCopyButton[key];
37
- }
38
- });
39
- });
40
- var _useClipboardCopy = _interopRequireDefault(require("./useClipboardCopy"));
1
+ export * from "./CodeCopy.js";
2
+ export * from "./CodeCopyButton.js";
3
+ export { default as useClipboardCopy } from "./useClipboardCopy.js";
@@ -1,21 +1,13 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = useClipboardCopy;
9
- var React = _interopRequireWildcard(require("react"));
10
- var _clipboardCopy = _interopRequireDefault(require("clipboard-copy"));
11
- function useClipboardCopy() {
1
+ import * as React from 'react';
2
+ import clipboardCopy from 'clipboard-copy';
3
+ export default function useClipboardCopy() {
12
4
  const [isCopied, setIsCopied] = React.useState(false);
13
5
  const timeout = React.useRef(undefined);
14
6
  React.useEffect(() => () => {
15
7
  clearTimeout(timeout.current);
16
8
  }, []);
17
9
  const copy = async text => {
18
- await (0, _clipboardCopy.default)(text);
10
+ await clipboardCopy(text);
19
11
  setIsCopied(true);
20
12
  clearTimeout(timeout.current);
21
13
  timeout.current = setTimeout(() => {