@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
package/Link/Link.js CHANGED
@@ -1,19 +1,11 @@
1
- "use strict";
1
+ import * as React from 'react';
2
+ import clsx from 'clsx';
3
+ import { useRouter } from 'next/router';
4
+ import NextLink from 'next/link';
5
+ import MuiLink from '@mui/material/Link';
6
+ import { useUserLanguage } from "../i18n/index.js";
7
+ import { useDocsConfig } from "../DocsProvider/index.js";
2
8
 
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.NextLinkComposed = exports.Link = void 0;
9
- var React = _interopRequireWildcard(require("react"));
10
- var _clsx = _interopRequireDefault(require("clsx"));
11
- var _router = require("next/router");
12
- var _link = _interopRequireDefault(require("next/link"));
13
- var _Link = _interopRequireDefault(require("@mui/material/Link"));
14
- var _i18n = require("../i18n");
15
- var _DocsProvider = require("../DocsProvider");
16
- var _jsxRuntime = require("react/jsx-runtime");
17
9
  /**
18
10
  * File to keep in sync with:
19
11
  *
@@ -22,14 +14,14 @@ var _jsxRuntime = require("react/jsx-runtime");
22
14
  * - /examples/material-ui-nextjs-pages-router-ts/src/Link.tsx
23
15
  * - /examples/material-ui-nextjs-ts-v4-v5-migration/src/Link.tsx
24
16
  */
25
-
26
- const NextLinkComposed = exports.NextLinkComposed = /*#__PURE__*/React.forwardRef(function NextLinkComposed(props, ref) {
17
+ import { jsx as _jsx } from "react/jsx-runtime";
18
+ export const NextLinkComposed = /*#__PURE__*/React.forwardRef(function NextLinkComposed(props, ref) {
27
19
  const {
28
20
  to,
29
21
  linkAs,
30
22
  ...other
31
23
  } = props;
32
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_link.default, {
24
+ return /*#__PURE__*/_jsx(NextLink, {
33
25
  href: to,
34
26
  as: linkAs,
35
27
  "data-no-markdown-link": "true",
@@ -39,7 +31,7 @@ const NextLinkComposed = exports.NextLinkComposed = /*#__PURE__*/React.forwardRe
39
31
  });
40
32
  // A styled version of the Next.js Link component:
41
33
  // https://nextjs.org/docs/pages/api-reference/components/link
42
- const Link = exports.Link = /*#__PURE__*/React.forwardRef(function Link(props, ref) {
34
+ export const Link = /*#__PURE__*/React.forwardRef(function Link(props, ref) {
43
35
  const {
44
36
  activeClassName = 'active',
45
37
  as,
@@ -49,14 +41,14 @@ const Link = exports.Link = /*#__PURE__*/React.forwardRef(function Link(props, r
49
41
  noLinkStyle,
50
42
  ...other
51
43
  } = props;
52
- const router = (0, _router.useRouter)();
44
+ const router = useRouter();
53
45
  const pathname = typeof href === 'string' ? href : href?.pathname;
54
46
  const routerPathname = router.pathname.replace('/[docsTab]', '');
55
- const className = (0, _clsx.default)(classNameProps, routerPathname === pathname && activeClassName);
56
- const userLanguage = (0, _i18n.useUserLanguage)();
47
+ const className = clsx(classNameProps, routerPathname === pathname && activeClassName);
48
+ const userLanguage = useUserLanguage();
57
49
  const {
58
50
  LANGUAGES_IGNORE_PAGES
59
- } = (0, _DocsProvider.useDocsConfig)();
51
+ } = useDocsConfig();
60
52
  let linkAs = linkAsProp || as || href;
61
53
  if (userLanguage !== 'en' && pathname && pathname.startsWith('/') && !LANGUAGES_IGNORE_PAGES(pathname) && !pathname.startsWith(`/${userLanguage}/`)) {
62
54
  linkAs = `/${userLanguage}${linkAs}`;
@@ -66,14 +58,14 @@ const Link = exports.Link = /*#__PURE__*/React.forwardRef(function Link(props, r
66
58
  linkAs
67
59
  };
68
60
  if (noLinkStyle) {
69
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(NextLinkComposed, {
61
+ return /*#__PURE__*/_jsx(NextLinkComposed, {
70
62
  className: className,
71
63
  ref: ref,
72
64
  ...nextjsProps,
73
65
  ...other
74
66
  });
75
67
  }
76
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.default, {
68
+ return /*#__PURE__*/_jsx(MuiLink, {
77
69
  component: NextLinkComposed,
78
70
  className: className,
79
71
  ref: ref,
@@ -0,0 +1,2 @@
1
+ export declare function samePageLinkNavigation(event: MouseEvent): boolean;
2
+ export declare function MarkdownLinks(): null;
@@ -0,0 +1,84 @@
1
+ import * as React from 'react';
2
+ import Router from 'next/router';
3
+ import { pathnameToLanguage } from "../helpers/helpers.js";
4
+ export function samePageLinkNavigation(event) {
5
+ if (event.defaultPrevented || event.button !== 0 ||
6
+ // ignore everything but left-click
7
+ event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) {
8
+ return true;
9
+ }
10
+ return false;
11
+ }
12
+ function isLink(event) {
13
+ let activeElement = event.target;
14
+ while (activeElement?.nodeType === Node.ELEMENT_NODE && activeElement.nodeName !== 'A') {
15
+ activeElement = activeElement.parentElement;
16
+ }
17
+
18
+ // Ignore non internal link clicks.
19
+ // Absolute URLs can be internal, we delegate this to Next.js's router
20
+ if (activeElement === null || activeElement.nodeName !== 'A' || activeElement.getAttribute('target') === '_blank' || activeElement.getAttribute('data-no-markdown-link') === 'true') {
21
+ return null;
22
+ }
23
+ return activeElement;
24
+ }
25
+
26
+ /**
27
+ * @param {MouseEvent} event
28
+ */
29
+ function handleClick(event) {
30
+ // Ignore click events meant for native link handling, for example open in new tab
31
+ if (samePageLinkNavigation(event)) {
32
+ return;
33
+ }
34
+ const activeElement = isLink(event);
35
+ if (activeElement === null) {
36
+ return;
37
+ }
38
+ event.preventDefault();
39
+ const as = activeElement.getAttribute('href');
40
+ if (as === null) {
41
+ return;
42
+ }
43
+ const canonicalPathname = pathnameToLanguage(as).canonicalPathname;
44
+ Router.push(canonicalPathname, as);
45
+ }
46
+
47
+ /**
48
+ * Source copied from https://github.com/vercel/next.js/blob/ebc4eaaa2564b4283711646079d68e430496c88b/packages/next/src/client/link.tsx
49
+ */
50
+ function handleMouseOver(event) {
51
+ const activeElement = isLink(event);
52
+ if (activeElement === null) {
53
+ return;
54
+ }
55
+ const as = activeElement.getAttribute('href');
56
+ if (as === null) {
57
+ return;
58
+ }
59
+ const canonicalPathname = pathnameToLanguage(as).canonicalPathname;
60
+ const prefetchPromise = Router.prefetch(canonicalPathname, as, {
61
+ priority: true
62
+ });
63
+ // Prefetch the JSON page if asked (only in the client)
64
+ // We need to handle a prefetch error here since we may be
65
+ // loading with priority which can reject but we don't
66
+ // want to force navigation since this is only a prefetch
67
+ Promise.resolve(prefetchPromise).catch(err => {
68
+ if (process.env.NODE_ENV !== 'production') {
69
+ // rethrow to show invalid URL errors
70
+ throw err;
71
+ }
72
+ });
73
+ }
74
+ export function MarkdownLinks() {
75
+ React.useEffect(() => {
76
+ document.addEventListener('click', handleClick);
77
+ document.addEventListener('mouseover', handleMouseOver);
78
+ return () => {
79
+ document.removeEventListener('click', handleClick);
80
+ document.removeEventListener('mouseover', handleMouseOver);
81
+ };
82
+ }, []);
83
+ return null;
84
+ }
@@ -0,0 +1 @@
1
+ export declare function SkipLink(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,66 @@
1
+ import MuiLink from '@mui/material/Link';
2
+ import { styled } from '@mui/material/styles';
3
+ import { useTranslate } from '@mui/docs/i18n';
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ const StyledLink = styled(MuiLink)(({
6
+ theme
7
+ }) => ({
8
+ position: 'fixed',
9
+ padding: theme.spacing(1, 2),
10
+ backgroundColor: (theme.vars || theme).palette.primary[50],
11
+ border: '1px solid',
12
+ borderColor: (theme.vars || theme).palette.primary[100],
13
+ color: (theme.vars || theme).palette.primary[600],
14
+ outlineOffset: 5,
15
+ outlineColor: (theme.vars || theme).palette.primary[300],
16
+ borderRadius: theme.shape.borderRadius,
17
+ left: theme.spacing(2),
18
+ zIndex: theme.zIndex.tooltip + 1,
19
+ top: theme.spacing(-10),
20
+ transition: theme.transitions.create('top', {
21
+ easing: theme.transitions.easing.easeIn,
22
+ duration: theme.transitions.duration.leavingScreen
23
+ }),
24
+ '&:hover': {
25
+ backgroundColor: (theme.vars || theme).palette.primary[100],
26
+ color: (theme.vars || theme).palette.primary[700]
27
+ },
28
+ '&:focus': {
29
+ top: theme.spacing(2),
30
+ transition: theme.transitions.create('top', {
31
+ easing: theme.transitions.easing.easeOut,
32
+ duration: theme.transitions.duration.enteringScreen
33
+ })
34
+ },
35
+ '@media (prefers-reduced-motion: reduce)': {
36
+ transition: theme.transitions.create('opacity'),
37
+ opacity: 0,
38
+ '&:focus': {
39
+ top: theme.spacing(2),
40
+ opacity: 1,
41
+ transition: theme.transitions.create('opacity')
42
+ }
43
+ },
44
+ '@media print': {
45
+ display: 'none'
46
+ },
47
+ ...theme.applyDarkStyles({
48
+ backgroundColor: (theme.vars || theme).palette.primaryDark[600],
49
+ borderColor: (theme.vars || theme).palette.primaryDark[400],
50
+ color: (theme.vars || theme).palette.grey[100],
51
+ outlineColor: (theme.vars || theme).palette.primary[500],
52
+ '&:hover': {
53
+ backgroundColor: (theme.vars || theme).palette.primaryDark[500],
54
+ color: (theme.vars || theme).palette.grey[50]
55
+ }
56
+ })
57
+ }));
58
+
59
+ // eslint-disable-next-line import/prefer-default-export
60
+ export function SkipLink() {
61
+ const t = useTranslate();
62
+ return /*#__PURE__*/_jsx(StyledLink, {
63
+ href: "#main-content",
64
+ children: t('appFrame.skipToContent')
65
+ });
66
+ }
package/Link/index.d.ts CHANGED
@@ -1 +1,3 @@
1
- export * from "./Link.js";
1
+ export * from "./Link.js";
2
+ export * from "./MarkdownLinks.js";
3
+ export * from "./SkipLink.js";
package/Link/index.js CHANGED
@@ -1,16 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _Link = require("./Link");
7
- Object.keys(_Link).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _Link[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function () {
13
- return _Link[key];
14
- }
15
- });
16
- });
1
+ export * from "./Link.js";
2
+ export * from "./MarkdownLinks.js";
3
+ export * from "./SkipLink.js";