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

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 (261) 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/CHANGELOG.md +191 -0
  11. package/CodeCopy/CodeCopy.js +10 -19
  12. package/CodeCopy/CodeCopyButton.js +9 -16
  13. package/CodeCopy/index.js +3 -40
  14. package/CodeCopy/useClipboardCopy.js +4 -12
  15. package/ComponentLinkHeader/ComponentLinkHeader.js +46 -54
  16. package/ComponentLinkHeader/index.js +2 -24
  17. package/DemoContext/DemoContext.d.ts +86 -0
  18. package/DemoContext/DemoContext.js +13 -0
  19. package/DemoContext/index.d.ts +2 -0
  20. package/DemoContext/index.js +1 -0
  21. package/DocsApp/AnalyticsProvider.d.ts +17 -0
  22. package/DocsApp/AnalyticsProvider.js +225 -0
  23. package/DocsApp/DocsApp.d.ts +79 -0
  24. package/DocsApp/DocsApp.js +105 -0
  25. package/DocsApp/GoogleAnalytics.d.ts +9 -0
  26. package/DocsApp/GoogleAnalytics.js +129 -0
  27. package/DocsApp/StyledEngineProvider.d.ts +8 -0
  28. package/DocsApp/StyledEngineProvider.js +38 -0
  29. package/DocsApp/consoleBanner.d.ts +1 -0
  30. package/DocsApp/consoleBanner.js +19 -0
  31. package/DocsApp/createEmotionCache.d.ts +1 -0
  32. package/DocsApp/createEmotionCache.js +12 -0
  33. package/DocsApp/createGetInitialProps.d.ts +30 -0
  34. package/DocsApp/createGetInitialProps.js +29 -0
  35. package/DocsApp/index.d.ts +5 -0
  36. package/DocsApp/index.js +4 -0
  37. package/DocsApp/loadDependencies.d.ts +1 -0
  38. package/DocsApp/loadDependencies.js +11 -0
  39. package/DocsApp/reportWebVitals.d.ts +13 -0
  40. package/DocsApp/reportWebVitals.js +24 -0
  41. package/DocsApp/serviceWorker.d.ts +1 -0
  42. package/DocsApp/serviceWorker.js +61 -0
  43. package/DocsProvider/DocsProvider.js +9 -17
  44. package/DocsProvider/index.js +1 -16
  45. package/Document/Document.d.ts +16 -0
  46. package/Document/Document.js +147 -0
  47. package/Document/getInitialProps.d.ts +18 -0
  48. package/Document/getInitialProps.js +62 -0
  49. package/Document/index.d.ts +2 -0
  50. package/Document/index.js +2 -0
  51. package/HighlightedCode/HighlightedCode.js +18 -26
  52. package/HighlightedCode/index.js +1 -16
  53. package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.js +22 -31
  54. package/HighlightedCodeWithTabs/index.js +2 -24
  55. package/IconImage/IconImage.js +13 -21
  56. package/IconImage/index.js +1 -13
  57. package/InfoCard/InfoCard.js +20 -29
  58. package/InfoCard/index.js +1 -16
  59. package/Link/Link.js +17 -25
  60. package/Link/MarkdownLinks.d.ts +2 -0
  61. package/Link/MarkdownLinks.js +84 -0
  62. package/Link/SkipLink.d.ts +1 -0
  63. package/Link/SkipLink.js +66 -0
  64. package/Link/index.d.ts +3 -1
  65. package/Link/index.js +3 -16
  66. package/MarkdownElement/MarkdownElement.js +178 -186
  67. package/MarkdownElement/index.js +1 -16
  68. package/MuiPage/MuiPage.d.ts +67 -0
  69. package/MuiPage/MuiPage.js +1 -0
  70. package/MuiPage/index.d.ts +1 -0
  71. package/MuiPage/index.js +1 -0
  72. package/NextNProgressBar/NextNProgressBar.d.ts +1 -0
  73. package/NextNProgressBar/NextNProgressBar.js +44 -0
  74. package/NextNProgressBar/index.d.ts +1 -0
  75. package/NextNProgressBar/index.js +1 -0
  76. package/PageContext/PageContext.d.ts +32 -0
  77. package/PageContext/PageContext.js +6 -0
  78. package/PageContext/index.d.ts +2 -0
  79. package/PageContext/index.js +1 -0
  80. package/SectionHeadline/SectionHeadline.js +9 -17
  81. package/SectionHeadline/index.js +2 -25
  82. package/SectionTitle/SectionTitle.js +7 -13
  83. package/SectionTitle/index.js +1 -16
  84. package/ThemeContext/ThemeContext.js +26 -38
  85. package/ThemeContext/index.js +1 -42
  86. package/branding/BrandingCssVarsProvider.d.ts +27 -0
  87. package/branding/BrandingCssVarsProvider.js +170 -0
  88. package/branding/BrandingProvider.js +8 -15
  89. package/branding/brandingTheme.js +184 -188
  90. package/branding/index.d.ts +2 -1
  91. package/branding/index.js +3 -27
  92. package/codeStyling/codeStyling.d.ts +7 -0
  93. package/codeStyling/codeStyling.js +80 -0
  94. package/codeStyling/index.d.ts +1 -0
  95. package/codeStyling/index.js +1 -0
  96. package/codeVariant/codeVariant.d.ts +7 -0
  97. package/codeVariant/codeVariant.js +69 -0
  98. package/codeVariant/index.d.ts +1 -0
  99. package/codeVariant/index.js +1 -0
  100. package/constants/constants.d.ts +13 -0
  101. package/constants/constants.js +15 -0
  102. package/constants/index.d.ts +1 -0
  103. package/constants/index.js +1 -0
  104. package/findActivePage/findActivePage.d.ts +5 -0
  105. package/findActivePage/findActivePage.js +35 -0
  106. package/findActivePage/index.d.ts +1 -0
  107. package/findActivePage/index.js +1 -0
  108. package/getProductInfoFromUrl/getProductInfoFromUrl.d.ts +8 -0
  109. package/getProductInfoFromUrl/getProductInfoFromUrl.js +50 -0
  110. package/getProductInfoFromUrl/index.d.ts +2 -0
  111. package/getProductInfoFromUrl/index.js +1 -0
  112. package/globalSelector/globalSelector.d.ts +2 -0
  113. package/globalSelector/globalSelector.js +17 -0
  114. package/globalSelector/index.d.ts +1 -0
  115. package/globalSelector/index.js +1 -0
  116. package/helpers/helpers.d.ts +31 -0
  117. package/helpers/helpers.js +87 -0
  118. package/helpers/index.d.ts +2 -0
  119. package/helpers/index.js +1 -0
  120. package/i18n/i18n.js +17 -29
  121. package/i18n/index.js +1 -16
  122. package/mapApiPageTranslations/index.d.ts +1 -0
  123. package/mapApiPageTranslations/index.js +1 -0
  124. package/mapApiPageTranslations/mapApiPageTranslations.d.ts +11 -0
  125. package/mapApiPageTranslations/mapApiPageTranslations.js +46 -0
  126. package/nextFonts/index.js +8 -15
  127. package/package.json +217 -132
  128. package/svgIcons/BundleSizeIcon.js +5 -11
  129. package/svgIcons/FigmaIcon.js +8 -14
  130. package/svgIcons/FileDownload.js +5 -12
  131. package/svgIcons/JavaScript.js +5 -12
  132. package/svgIcons/MarkdownIcon.js +7 -14
  133. package/svgIcons/MaterialDesignIcon.js +6 -12
  134. package/svgIcons/SketchIcon.js +10 -16
  135. package/svgIcons/TypeScript.js +5 -12
  136. package/svgIcons/W3CIcon.js +6 -12
  137. package/translations/index.js +3 -10
  138. package/translations/translations.json +0 -1
  139. package/useLazyCSS/index.js +1 -13
  140. package/useLazyCSS/useLazyCSS.js +5 -11
  141. package/utils/index.d.ts +1 -0
  142. package/utils/index.js +2 -0
  143. package/utils/loadScript.js +1 -7
  144. package/webpack/index.d.ts +17 -0
  145. package/webpack/index.js +1 -0
  146. package/Ad/Ad.d.mts +0 -5
  147. package/Ad/Ad.mjs +0 -226
  148. package/Ad/AdCarbon.d.mts +0 -2
  149. package/Ad/AdCarbon.mjs +0 -125
  150. package/Ad/AdDisplay.d.mts +0 -16
  151. package/Ad/AdDisplay.mjs +0 -86
  152. package/Ad/AdGuest.d.mts +0 -10
  153. package/Ad/AdGuest.mjs +0 -29
  154. package/Ad/AdInHouse.d.mts +0 -4
  155. package/Ad/AdInHouse.mjs +0 -14
  156. package/Ad/AdManager.d.mts +0 -19
  157. package/Ad/AdManager.mjs +0 -36
  158. package/Ad/AdProvider.d.mts +0 -15
  159. package/Ad/AdProvider.mjs +0 -24
  160. package/Ad/ad.styles.d.mts +0 -4512
  161. package/Ad/ad.styles.mjs +0 -91
  162. package/Ad/index.d.mts +0 -5
  163. package/Ad/index.mjs +0 -7
  164. package/CodeCopy/CodeCopy.d.mts +0 -22
  165. package/CodeCopy/CodeCopy.mjs +0 -172
  166. package/CodeCopy/CodeCopyButton.d.mts +0 -4
  167. package/CodeCopy/CodeCopyButton.mjs +0 -40
  168. package/CodeCopy/index.d.mts +0 -3
  169. package/CodeCopy/index.mjs +0 -3
  170. package/CodeCopy/useClipboardCopy.d.mts +0 -4
  171. package/CodeCopy/useClipboardCopy.mjs +0 -21
  172. package/ComponentLinkHeader/ComponentLinkHeader.d.mts +0 -8
  173. package/ComponentLinkHeader/ComponentLinkHeader.mjs +0 -197
  174. package/ComponentLinkHeader/index.d.mts +0 -2
  175. package/ComponentLinkHeader/index.mjs +0 -2
  176. package/DocsProvider/DocsProvider.d.mts +0 -24
  177. package/DocsProvider/DocsProvider.mjs +0 -31
  178. package/DocsProvider/index.d.mts +0 -1
  179. package/DocsProvider/index.mjs +0 -1
  180. package/HighlightedCode/HighlightedCode.d.mts +0 -14
  181. package/HighlightedCode/HighlightedCode.mjs +0 -67
  182. package/HighlightedCode/index.d.mts +0 -1
  183. package/HighlightedCode/index.mjs +0 -1
  184. package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.d.mts +0 -28
  185. package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.mjs +0 -362
  186. package/HighlightedCodeWithTabs/index.d.mts +0 -2
  187. package/HighlightedCodeWithTabs/index.mjs +0 -2
  188. package/IconImage/IconImage.d.mts +0 -11
  189. package/IconImage/IconImage.mjs +0 -83
  190. package/IconImage/index.d.mts +0 -1
  191. package/IconImage/index.mjs +0 -1
  192. package/InfoCard/InfoCard.d.mts +0 -22
  193. package/InfoCard/InfoCard.mjs +0 -87
  194. package/InfoCard/index.d.mts +0 -1
  195. package/InfoCard/index.mjs +0 -1
  196. package/Link/Link.d.mts +0 -25
  197. package/Link/Link.mjs +0 -75
  198. package/Link/index.d.mts +0 -1
  199. package/Link/index.mjs +0 -1
  200. package/MarkdownElement/MarkdownElement.d.mts +0 -7
  201. package/MarkdownElement/MarkdownElement.mjs +0 -847
  202. package/MarkdownElement/index.d.mts +0 -1
  203. package/MarkdownElement/index.mjs +0 -1
  204. package/NProgressBar/NProgressBar.d.mts +0 -6
  205. package/NProgressBar/NProgressBar.js +0 -98
  206. package/NProgressBar/index.d.mts +0 -2
  207. package/NProgressBar/index.d.ts +0 -2
  208. package/NProgressBar/index.js +0 -13
  209. package/NProgressBar/index.mjs +0 -1
  210. package/SectionHeadline/SectionHeadline.d.mts +0 -13
  211. package/SectionHeadline/SectionHeadline.mjs +0 -81
  212. package/SectionHeadline/index.d.mts +0 -2
  213. package/SectionHeadline/index.mjs +0 -2
  214. package/SectionTitle/SectionTitle.d.mts +0 -6
  215. package/SectionTitle/SectionTitle.mjs +0 -29
  216. package/SectionTitle/index.d.mts +0 -1
  217. package/SectionTitle/index.mjs +0 -1
  218. package/ThemeContext/ThemeContext.d.mts +0 -92
  219. package/ThemeContext/ThemeContext.mjs +0 -200
  220. package/ThemeContext/index.d.mts +0 -1
  221. package/ThemeContext/index.mjs +0 -1
  222. package/branding/BrandingProvider.d.mts +0 -9
  223. package/branding/BrandingProvider.mjs +0 -17
  224. package/branding/brandingTheme.d.mts +0 -147
  225. package/branding/brandingTheme.mjs +0 -1527
  226. package/branding/index.d.mts +0 -2
  227. package/branding/index.mjs +0 -2
  228. package/i18n/i18n.d.mts +0 -27
  229. package/i18n/i18n.mjs +0 -111
  230. package/i18n/index.d.mts +0 -1
  231. package/i18n/index.mjs +0 -1
  232. package/nextFonts/index.d.mts +0 -6
  233. package/nextFonts/index.mjs +0 -59
  234. package/svgIcons/BundleSizeIcon.d.mts +0 -4
  235. package/svgIcons/BundleSizeIcon.mjs +0 -13
  236. package/svgIcons/FigmaIcon.d.mts +0 -4
  237. package/svgIcons/FigmaIcon.mjs +0 -22
  238. package/svgIcons/FileDownload.d.mts +0 -6
  239. package/svgIcons/FileDownload.mjs +0 -13
  240. package/svgIcons/JavaScript.d.mts +0 -6
  241. package/svgIcons/JavaScript.mjs +0 -13
  242. package/svgIcons/MarkdownIcon.d.mts +0 -2
  243. package/svgIcons/MarkdownIcon.mjs +0 -22
  244. package/svgIcons/MaterialDesignIcon.d.mts +0 -4
  245. package/svgIcons/MaterialDesignIcon.mjs +0 -18
  246. package/svgIcons/SketchIcon.d.mts +0 -4
  247. package/svgIcons/SketchIcon.mjs +0 -27
  248. package/svgIcons/TypeScript.d.mts +0 -6
  249. package/svgIcons/TypeScript.mjs +0 -13
  250. package/svgIcons/W3CIcon.d.mts +0 -4
  251. package/svgIcons/W3CIcon.mjs +0 -15
  252. package/translations/index.d.mts +0 -3
  253. package/translations/index.mjs +0 -4
  254. package/useLazyCSS/index.d.mts +0 -1
  255. package/useLazyCSS/index.mjs +0 -1
  256. package/useLazyCSS/useLazyCSS.d.mts +0 -11
  257. package/useLazyCSS/useLazyCSS.mjs +0 -70
  258. package/utils/loadScript.d.mts +0 -1
  259. package/utils/loadScript.mjs +0 -7
  260. /package/{NProgressBar → NextNProgressBar}/NProgressBar.d.ts +0 -0
  261. /package/{NProgressBar/NProgressBar.mjs → NextNProgressBar/NProgressBar.js} +0 -0
@@ -1,27 +1,21 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _utils = require("@mui/material/utils");
8
- var _jsxRuntime = require("react/jsx-runtime");
9
- var _default = exports.default = (0, _utils.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
1
+ import { createSvgIcon } from '@mui/material/utils';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ export default createSvgIcon(/*#__PURE__*/_jsxs("g", {
10
4
  fillRule: "nonzero",
11
5
  fill: "none",
12
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
6
+ children: [/*#__PURE__*/_jsx("path", {
13
7
  d: "M8 24a4 4 0 004-4v-4H8a4 4 0 000 8z",
14
8
  fill: "#0ACF83"
15
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
9
+ }), /*#__PURE__*/_jsx("path", {
16
10
  d: "M4 12a4 4 0 014-4h4v8H8a4 4 0 01-4-4z",
17
11
  fill: "#A259FF"
18
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
12
+ }), /*#__PURE__*/_jsx("path", {
19
13
  d: "M4 4a4 4 0 014-4h4v8H8a4 4 0 01-4-4z",
20
14
  fill: "#F24E1E"
21
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
15
+ }), /*#__PURE__*/_jsx("path", {
22
16
  d: "M12 0h4a4 4 0 010 8h-4V0z",
23
17
  fill: "#FF7262"
24
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
18
+ }), /*#__PURE__*/_jsx("path", {
25
19
  d: "M20 12a4 4 0 11-8 0 4 4 0 018 0z",
26
20
  fill: "#1ABCFE"
27
21
  })]
@@ -1,20 +1,13 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _SvgIcon = _interopRequireDefault(require("@mui/material/SvgIcon"));
9
- var _jsxRuntime = require("react/jsx-runtime");
10
1
  var _path;
2
+ import SvgIcon from '@mui/material/SvgIcon';
3
+ import { jsx as _jsx } from "react/jsx-runtime";
11
4
  function FileDownload(props) {
12
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SvgIcon.default, {
5
+ return /*#__PURE__*/_jsx(SvgIcon, {
13
6
  ...props,
14
- children: _path || (_path = /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
7
+ children: _path || (_path = /*#__PURE__*/_jsx("path", {
15
8
  d: "M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"
16
9
  }))
17
10
  });
18
11
  }
19
12
  FileDownload.muiName = 'SvgIcon';
20
- var _default = exports.default = FileDownload;
13
+ export default FileDownload;
@@ -1,20 +1,13 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _SvgIcon = _interopRequireDefault(require("@mui/material/SvgIcon"));
9
- var _jsxRuntime = require("react/jsx-runtime");
10
1
  var _path;
2
+ import SvgIcon from '@mui/material/SvgIcon';
3
+ import { jsx as _jsx } from "react/jsx-runtime";
11
4
  function JavaScript(props) {
12
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SvgIcon.default, {
5
+ return /*#__PURE__*/_jsx(SvgIcon, {
13
6
  ...props,
14
- children: _path || (_path = /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
7
+ children: _path || (_path = /*#__PURE__*/_jsx("path", {
15
8
  d: "M3,3H21V21H3V3M7.73,18.04C8.13,18.89 8.92,19.59 10.27,19.59C11.77,19.59 12.8,18.79 12.8,17.04V11.26H11.1V17C11.1,17.86 10.75,18.08 10.2,18.08C9.62,18.08 9.38,17.68 9.11,17.21L7.73,18.04M13.71,17.86C14.21,18.84 15.22,19.59 16.8,19.59C18.4,19.59 19.6,18.76 19.6,17.23C19.6,15.82 18.79,15.19 17.35,14.57L16.93,14.39C16.2,14.08 15.89,13.87 15.89,13.37C15.89,12.96 16.2,12.64 16.7,12.64C17.18,12.64 17.5,12.85 17.79,13.37L19.1,12.5C18.55,11.54 17.77,11.17 16.7,11.17C15.19,11.17 14.22,12.13 14.22,13.4C14.22,14.78 15.03,15.43 16.25,15.95L16.67,16.13C17.45,16.47 17.91,16.68 17.91,17.26C17.91,17.74 17.46,18.09 16.76,18.09C15.93,18.09 15.45,17.66 15.09,17.06L13.71,17.86Z"
16
9
  }))
17
10
  });
18
11
  }
19
12
  JavaScript.muiName = 'SvgIcon';
20
- var _default = exports.default = JavaScript;
13
+ export default JavaScript;
@@ -1,26 +1,19 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = MarkdownIcon;
8
- var _SvgIcon = _interopRequireDefault(require("@mui/material/SvgIcon"));
9
- var _jsxRuntime = require("react/jsx-runtime");
10
1
  var _svg;
11
- function MarkdownIcon(props) {
12
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SvgIcon.default, {
2
+ import SvgIcon from '@mui/material/SvgIcon';
3
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
+ export default function MarkdownIcon(props) {
5
+ return /*#__PURE__*/_jsx(SvgIcon, {
13
6
  ...props,
14
- children: _svg || (_svg = /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
7
+ children: _svg || (_svg = /*#__PURE__*/_jsxs("svg", {
15
8
  width: "16",
16
9
  height: "16",
17
10
  viewBox: "0 0 24 24",
18
11
  fill: "none",
19
12
  xmlns: "http://www.w3.org/2000/svg",
20
13
  "aria-hidden": "true",
21
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("title", {
14
+ children: [/*#__PURE__*/_jsx("title", {
22
15
  children: "Markdown"
23
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
16
+ }), /*#__PURE__*/_jsx("path", {
24
17
  d: "M22.269 19.385H1.731a1.73 1.73 0 0 1-1.73-1.73V6.345a1.73 1.73 0 0 1 1.73-1.73h20.538a1.73 1.73 0 0 1 1.73 1.73v11.308a1.73 1.73 0 0 1-1.73 1.731zm-16.5-3.462v-4.5l2.308 2.885 2.307-2.885v4.5h2.308V8.078h-2.308l-2.307 2.885-2.308-2.885H3.461v7.847zM21.231 12h-2.308V8.077h-2.307V12h-2.308l3.461 4.039z",
25
18
  fill: "currentColor"
26
19
  })]
@@ -1,23 +1,17 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _utils = require("@mui/material/utils");
8
- var _jsxRuntime = require("react/jsx-runtime");
9
- var _default = exports.default = (0, _utils.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
1
+ import { createSvgIcon } from '@mui/material/utils';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ export default createSvgIcon(/*#__PURE__*/_jsxs("g", {
10
4
  fill: "none",
11
5
  fillRule: "evenodd",
12
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
6
+ children: [/*#__PURE__*/_jsx("circle", {
13
7
  fill: "#737373",
14
8
  cx: "12",
15
9
  cy: "12",
16
10
  r: "12"
17
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
11
+ }), /*#__PURE__*/_jsx("path", {
18
12
  fill: "#BDBDBD",
19
13
  d: "M4 4h16v16H4z"
20
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
14
+ }), /*#__PURE__*/_jsx("path", {
21
15
  fill: "#FFF",
22
16
  d: "M12 20l8-16H4z"
23
17
  })]
@@ -1,31 +1,25 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _utils = require("@mui/material/utils");
8
- var _jsxRuntime = require("react/jsx-runtime");
9
- var _default = exports.default = (0, _utils.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
1
+ import { createSvgIcon } from '@mui/material/utils';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ export default createSvgIcon(/*#__PURE__*/_jsxs("g", {
10
4
  fillRule: "nonzero",
11
5
  fill: "none",
12
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
6
+ children: [/*#__PURE__*/_jsx("path", {
13
7
  fill: "#FDB300",
14
8
  d: "M5.24 2.7L12 2l6.76.7L24 9.48 12 23 0 9.49z"
15
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
9
+ }), /*#__PURE__*/_jsx("path", {
16
10
  fill: "#EA6C00",
17
11
  d: "M4.85 9l7.13 14L0 9zM19.1 9l-7.12 14L23.95 9z"
18
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
12
+ }), /*#__PURE__*/_jsx("path", {
19
13
  fill: "#FDAD00",
20
14
  d: "M4.85 9H19.1l-7.12 14z"
21
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
22
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
15
+ }), /*#__PURE__*/_jsxs("g", {
16
+ children: [/*#__PURE__*/_jsx("path", {
23
17
  fill: "#FDD231",
24
18
  d: "M11.98 2l-6.75.65-.38 6.34zM11.98 2l6.75.65.37 6.34z"
25
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
19
+ }), /*#__PURE__*/_jsx("path", {
26
20
  fill: "#FDAD00",
27
21
  d: "M23.95 9l-5.22-6.35.37 6.34zM0 9l5.23-6.35-.38 6.34z"
28
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
22
+ }), /*#__PURE__*/_jsx("path", {
29
23
  fill: "#FEEEB7",
30
24
  d: "M11.98 2L4.85 9H19.1z"
31
25
  })]
@@ -1,20 +1,13 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _SvgIcon = _interopRequireDefault(require("@mui/material/SvgIcon"));
9
- var _jsxRuntime = require("react/jsx-runtime");
10
1
  var _path;
2
+ import SvgIcon from '@mui/material/SvgIcon';
3
+ import { jsx as _jsx } from "react/jsx-runtime";
11
4
  function TypeScript(props) {
12
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SvgIcon.default, {
5
+ return /*#__PURE__*/_jsx(SvgIcon, {
13
6
  ...props,
14
- children: _path || (_path = /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
7
+ children: _path || (_path = /*#__PURE__*/_jsx("path", {
15
8
  d: "M3,3H21V21H3V3M13.71,17.86C14.21,18.84 15.22,19.59 16.8,19.59C18.4,19.59 19.6,18.76 19.6,17.23C19.6,15.82 18.79,15.19 17.35,14.57L16.93,14.39C16.2,14.08 15.89,13.87 15.89,13.37C15.89,12.96 16.2,12.64 16.7,12.64C17.18,12.64 17.5,12.85 17.79,13.37L19.1,12.5C18.55,11.54 17.77,11.17 16.7,11.17C15.19,11.17 14.22,12.13 14.22,13.4C14.22,14.78 15.03,15.43 16.25,15.95L16.67,16.13C17.45,16.47 17.91,16.68 17.91,17.26C17.91,17.74 17.46,18.09 16.76,18.09C15.93,18.09 15.45,17.66 15.09,17.06L13.71,17.86M13,11.25H8V12.75H9.5V20H11.25V12.75H13V11.25Z"
16
9
  }))
17
10
  });
18
11
  }
19
12
  TypeScript.muiName = 'SvgIcon';
20
- var _default = exports.default = TypeScript;
13
+ export default TypeScript;
@@ -1,20 +1,14 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _utils = require("@mui/material/utils");
8
- var _jsxRuntime = require("react/jsx-runtime");
9
- var _default = exports.default = (0, _utils.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
1
+ import { createSvgIcon } from '@mui/material/utils';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ export default createSvgIcon(/*#__PURE__*/_jsxs("g", {
10
4
  fillRule: "nonzero",
11
5
  fill: "none",
12
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
6
+ children: [/*#__PURE__*/_jsx("path", {
13
7
  d: "M6.92 6.1l2.33 7.99 2.32-8h6.3v.8l-2.37 4.14c.83.27 1.46.76 1.89 1.47.43.71.64 1.55.64 2.51 0 1.2-.31 2.2-.94 3a2.93 2.93 0 01-2.42 1.22 2.9 2.9 0 01-1.96-.72 4.25 4.25 0 01-1.23-1.96l1.31-.55c.2.5.45.9.76 1.18.32.28.69.43 1.12.43.44 0 .82-.26 1.13-.76.31-.51.47-1.12.47-1.84 0-.79-.17-1.4-.5-1.83-.38-.5-.99-.76-1.81-.76h-.64v-.78l2.24-3.92h-2.7l-.16.26-3.3 11.25h-.15l-2.4-8.14-2.41 8.14h-.16L.43 6.1H2.1l2.33 7.99L6 8.71 5.24 6.1h1.68z",
14
8
  fill: "#005A9C"
15
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
9
+ }), /*#__PURE__*/_jsx("g", {
16
10
  fill: "currentColor",
17
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
11
+ children: /*#__PURE__*/_jsx("path", {
18
12
  d: "M23.52 6.25l.28 1.62-.98 1.8s-.38-.76-1.01-1.19c-.53-.35-.87-.43-1.41-.33-.7.14-1.48.93-1.82 1.9-.41 1.18-.42 1.74-.43 2.26a4.9 4.9 0 00.11 1.33s-.6-1.06-.59-2.61c0-1.1.19-2.11.72-3.1.47-.87 1.17-1.4 1.8-1.45.63-.07 1.14.23 1.53.55.42.33.83 1.07.83 1.07l.97-1.85zM23.64 15.4s-.43.75-.7 1.04c-.27.28-.76.79-1.36 1.04-.6.25-.91.3-1.5.25a3.03 3.03 0 01-1.34-.52 5.08 5.08 0 01-1.67-2.04s.24.75.39 1.07c.09.18.36.74.74 1.23a3.5 3.5 0 002.1 1.42c1.04.18 1.76-.27 1.94-.38a5.32 5.32 0 001.4-1.43c.1-.14.25-.43.25-.43l-.25-1.25z"
19
13
  })
20
14
  })]
@@ -1,11 +1,4 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _translations = _interopRequireDefault(require("./translations.json"));
9
- var _default = exports.default = {
10
- en: _translations.default
1
+ import en from "./translations.json";
2
+ export default {
3
+ en
11
4
  };
@@ -53,7 +53,6 @@
53
53
  "spreadHint": "Props of the {{spreadHintElement}} component are also available.",
54
54
  "state": "STATE",
55
55
  "styleOverrides": "The name <code>{{componentStyles.name}}</code> can be used when providing <a href={{defaultPropsLink}}>default props</a> or <a href={{styleOverridesLink}}>style overrides</a> in the theme.",
56
- "slotDescription": "To learn how to customize the slot, check out the <a href={{slotGuideLink}}>Overriding component structure</a> guide.",
57
56
  "slotName": "Slot name",
58
57
  "source-code": "Source code",
59
58
  "type": "Type",
@@ -1,13 +1 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- Object.defineProperty(exports, "default", {
8
- enumerable: true,
9
- get: function () {
10
- return _useLazyCSS.default;
11
- }
12
- });
13
- var _useLazyCSS = _interopRequireDefault(require("./useLazyCSS"));
1
+ export { default } from "./useLazyCSS.js";
@@ -1,12 +1,6 @@
1
- "use strict";
1
+ import * as React from 'react';
2
+ import { loadCSS } from 'fg-loadcss';
2
3
 
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = useLazyCSS;
8
- var React = _interopRequireWildcard(require("react"));
9
- var _fgLoadcss = require("fg-loadcss");
10
4
  /**
11
5
  * Enhanced lazy CSS loader that wraps CSS in a layer using fetch to avoid CORS issues
12
6
  * @param {string} href - URL of the CSS file to load
@@ -15,11 +9,11 @@ var _fgLoadcss = require("fg-loadcss");
15
9
  * @param {string} options.layer - Optional CSS layer name to wrap the CSS in
16
10
  * @returns {() => void} cleanup function
17
11
  */
18
- function useLazyCSS(href, before, options = {}) {
12
+ export default function useLazyCSS(href, before, options = {}) {
19
13
  React.useEffect(() => {
20
14
  // If no layer is specified, add style and clean it on unmount
21
15
  if (!options.layer) {
22
- const link = (0, _fgLoadcss.loadCSS)(href, document.querySelector(before));
16
+ const link = loadCSS(href, document.querySelector(before));
23
17
  return () => {
24
18
  link.parentElement?.removeChild(link);
25
19
  };
@@ -58,7 +52,7 @@ function useLazyCSS(href, before, options = {}) {
58
52
  }
59
53
 
60
54
  // Fall back to regular link element if fetch fails
61
- styleElement = (0, _fgLoadcss.loadCSS)(href, document.querySelector(before));
55
+ styleElement = loadCSS(href, document.querySelector(before));
62
56
  }
63
57
  });
64
58
 
@@ -0,0 +1 @@
1
+ export { default as loadScript } from "./loadScript.js";
package/utils/index.js ADDED
@@ -0,0 +1,2 @@
1
+ // eslint-disable-next-line import/prefer-default-export
2
+ export { default as loadScript } from "./loadScript.js";
@@ -1,10 +1,4 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = loadScript;
7
- function loadScript(src, position) {
1
+ export default function loadScript(src, position) {
8
2
  const script = document.createElement('script');
9
3
  script.setAttribute('async', '');
10
4
  script.src = src;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Type declarations for webpack's require.context() API.
3
+ *
4
+ * Usage: import '@mui/docs/webpack' in a .d.ts or at the top of a file,
5
+ * or add to tsconfig "types".
6
+ */
7
+ export interface WebpackRequireContext {
8
+ (req: string): string;
9
+ keys: () => string[];
10
+ }
11
+ declare global {
12
+ namespace NodeJS {
13
+ interface Require {
14
+ context(directory: string, useSubdirectories?: boolean, regExp?: RegExp, mode?: string): WebpackRequireContext;
15
+ }
16
+ }
17
+ }
@@ -0,0 +1 @@
1
+ export {};
package/Ad/Ad.d.mts DELETED
@@ -1,5 +0,0 @@
1
- export declare const AD_MARGIN_TOP = 3;
2
- export declare const AD_MARGIN_BOTTOM = 3;
3
- export declare const AD_HEIGHT = 126;
4
- export declare const AD_HEIGHT_MOBILE: number;
5
- export declare function Ad(): import("react/jsx-runtime").JSX.Element;
package/Ad/Ad.mjs DELETED
@@ -1,226 +0,0 @@
1
- var _span, _PleaseDisableAdblock, _AdCarbon;
2
- import * as React from 'react';
3
- import Typography from '@mui/material/Typography';
4
- import Box from '@mui/material/Box';
5
- import Paper from '@mui/material/Paper';
6
- import { useTranslate } from "../i18n/index.mjs";
7
- import AdCarbon from "./AdCarbon.mjs";
8
- import AdInHouse from "./AdInHouse.mjs";
9
- import { AdContext, adShape } from "./AdManager.mjs";
10
- import { useAdConfig } from "./AdProvider.mjs";
11
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
- function PleaseDisableAdblock() {
13
- const t = useTranslate();
14
- return /*#__PURE__*/_jsxs(Paper, {
15
- component: "span",
16
- elevation: 0,
17
- sx: {
18
- display: 'block',
19
- p: 1.5,
20
- border: '2px solid',
21
- borderColor: 'primary.main'
22
- },
23
- children: [/*#__PURE__*/_jsx(Typography, {
24
- variant: "body2",
25
- component: "span",
26
- gutterBottom: true,
27
- sx: {
28
- display: 'block'
29
- },
30
- children: t('likeMui')
31
- }), /*#__PURE__*/_jsx(Typography, {
32
- variant: "body2",
33
- component: "span",
34
- gutterBottom: true,
35
- sx: {
36
- display: 'block'
37
- },
38
- children: t('adblock')
39
- }), /*#__PURE__*/_jsxs(Typography, {
40
- variant: "body2",
41
- component: "span",
42
- sx: {
43
- display: 'block'
44
- },
45
- children: [t('thanks'), ' ', /*#__PURE__*/_jsx("span", {
46
- role: "img",
47
- "aria-label": t('emojiLove'),
48
- children: "\u2764\uFE0F"
49
- })]
50
- })]
51
- });
52
- }
53
- const disableAd = process.env.NODE_ENV !== 'production' && process.env.ENABLE_AD_IN_DEV_MODE !== 'true';
54
- const inHouseAds = [{
55
- name: 'templates',
56
- link: 'https://mui.com/store/?utm_source=docs&utm_medium=referral&utm_campaign=in-house-templates',
57
- img: '/static/ads-in-house/themes-2.jpg',
58
- descriptionHeader: 'Premium Templates',
59
- description: 'Start your project with the best templates for admins, dashboards, and more.'
60
- }, {
61
- name: 'themes',
62
- link: 'https://mui.com/store/?utm_source=docs&utm_medium=referral&utm_campaign=in-house-themes',
63
- img: '/static/ads-in-house/themes.png',
64
- descriptionHeader: 'Premium Themes',
65
- description: 'Kickstart your application development with a ready-made theme.'
66
- }, {
67
- name: 'tidelift',
68
- link: 'https://tidelift.com/',
69
- img: '/static/ads-in-house/tidelift.png',
70
- descriptionHeader: 'MUI for enterprise',
71
- description: 'Save time and reduce risk. Managed open source — backed by maintainers.'
72
- }, {
73
- name: 'figma',
74
- link: 'https://mui.com/store/items/figma-react/?utm_source=docs&utm_medium=referral&utm_campaign=in-house-figma',
75
- img: '/static/ads-in-house/figma.png',
76
- descriptionHeader: 'For Figma',
77
- description: 'A large UI kit with over 600 handcrafted Material UI, MUI X, Joy UI components 🎨.'
78
- }];
79
- class AdErrorBoundary extends React.Component {
80
- state = {
81
- didError: false
82
- };
83
- static getDerivedStateFromError() {
84
- return {
85
- didError: true
86
- };
87
- }
88
- componentDidCatch() {
89
- // send explicit `'null'`
90
- const eventLabel = String(this.props.eventLabel);
91
- // TODO: Use proper error monitoring service (for example Sentry) instead
92
-
93
- window.gtag('event', 'ad', {
94
- eventAction: 'crash',
95
- eventLabel
96
- });
97
- }
98
- render() {
99
- const {
100
- didError
101
- } = this.state;
102
- const {
103
- children
104
- } = this.props;
105
- if (didError) {
106
- return null;
107
- }
108
- return children;
109
- }
110
- }
111
- export const AD_MARGIN_TOP = 3;
112
- export const AD_MARGIN_BOTTOM = 3;
113
- export const AD_HEIGHT = 126;
114
- // Add more height on mobile as the text tends to wrap beyond the image height.
115
- export const AD_HEIGHT_MOBILE = 126 + 16;
116
-
117
- // https://stackoverflow.com/a/20084661
118
- function isBot() {
119
- return /bot|googlebot|crawler|spider|robot|crawling/i.test(navigator.userAgent);
120
- }
121
- export function Ad() {
122
- const [adblock, setAdblock] = React.useState(null);
123
- const [carbonOut, setCarbonOut] = React.useState(null);
124
- const {
125
- current: randomAdblock
126
- } = React.useRef(Math.random());
127
- const {
128
- current: randomInHouse
129
- } = React.useRef(Math.random());
130
- let children;
131
- let label;
132
- // Hide the content to google bot to avoid its indexation.
133
- if (typeof window !== 'undefined' && isBot() || disableAd) {
134
- children = _span || (_span = /*#__PURE__*/_jsx("span", {}));
135
- } else if (adblock) {
136
- if (randomAdblock < 0.2) {
137
- children = _PleaseDisableAdblock || (_PleaseDisableAdblock = /*#__PURE__*/_jsx(PleaseDisableAdblock, {}));
138
- label = 'in-house-adblock';
139
- } else {
140
- children = /*#__PURE__*/_jsx(AdInHouse, {
141
- ad: inHouseAds[Math.floor(inHouseAds.length * randomInHouse)]
142
- });
143
- label = 'in-house';
144
- }
145
- } else if (carbonOut) {
146
- children = /*#__PURE__*/_jsx(AdInHouse, {
147
- ad: inHouseAds[Math.floor(inHouseAds.length * randomInHouse)]
148
- });
149
- label = 'in-house-carbon';
150
- } else {
151
- children = _AdCarbon || (_AdCarbon = /*#__PURE__*/_jsx(AdCarbon, {}));
152
- label = 'carbon';
153
- }
154
- const ad = React.useContext(AdContext);
155
- const eventLabel = label ? `${label}-${ad.placement}-${adShape}` : null;
156
- const timerAdblock = React.useRef(undefined);
157
- const checkAdblock = React.useCallback((attempt = 1) => {
158
- if (document.querySelector('.ea-placement') || document.querySelector('#carbonads') || document.querySelector('.carbonads') || carbonOut) {
159
- if (document.querySelector('#carbonads a') && document.querySelector('#carbonads a')?.getAttribute('href') === 'https://material-ui-next.com/discover-more/backers') {
160
- setCarbonOut(true);
161
- }
162
- setAdblock(false);
163
- return;
164
- }
165
- if (attempt < 30) {
166
- timerAdblock.current = setTimeout(() => {
167
- checkAdblock(attempt + 1);
168
- }, 500);
169
- }
170
- if (attempt > 6) {
171
- setAdblock(true);
172
- }
173
- }, [carbonOut]);
174
- React.useEffect(() => {
175
- if (disableAd) {
176
- return undefined;
177
- }
178
- checkAdblock();
179
- return () => {
180
- clearTimeout(timerAdblock.current);
181
- };
182
- }, [checkAdblock]);
183
- const {
184
- GADisplayRatio
185
- } = useAdConfig();
186
- React.useEffect(() => {
187
- // Avoid an exceed on the Google Analytics quotas.
188
- if (Math.random() > (GADisplayRatio ?? 0.1) || !eventLabel) {
189
- return undefined;
190
- }
191
- const delay = setTimeout(() => {
192
- window.gtag('event', 'ad', {
193
- eventAction: 'display',
194
- eventLabel
195
- });
196
- }, 2500);
197
- return () => {
198
- clearTimeout(delay);
199
- };
200
- }, [GADisplayRatio, eventLabel]);
201
- return /*#__PURE__*/_jsx(Box, {
202
- component: "span",
203
- sx: theme => ({
204
- position: 'relative',
205
- display: 'block',
206
- mt: AD_MARGIN_TOP,
207
- mb: AD_MARGIN_BOTTOM,
208
- minHeight: AD_HEIGHT_MOBILE,
209
- [theme.breakpoints.up('sm')]: {
210
- minHeight: AD_HEIGHT
211
- },
212
- ...(adShape === 'image' && {}),
213
- ...(adShape === 'inline' && {
214
- display: 'flex',
215
- alignItems: 'flex-end'
216
- })
217
- }),
218
- "data-ga-event-category": "ad",
219
- "data-ga-event-action": "click",
220
- "data-ga-event-label": eventLabel,
221
- children: /*#__PURE__*/_jsx(AdErrorBoundary, {
222
- eventLabel: eventLabel,
223
- children: children
224
- })
225
- });
226
- }
package/Ad/AdCarbon.d.mts DELETED
@@ -1,2 +0,0 @@
1
- export declare function AdCarbonInline(): import("react/jsx-runtime").JSX.Element;
2
- export default function AdCarbon(): import("react/jsx-runtime").JSX.Element;