@mui/docs 6.0.0-alpha.7 → 6.0.0-alpha.9

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.
@@ -5,20 +5,17 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.CodeCopyButton = CodeCopyButton;
8
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
- var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
10
8
  var React = _interopRequireWildcard(require("react"));
11
9
  var _useClipboardCopy = _interopRequireDefault(require("./useClipboardCopy"));
12
10
  var _jsxRuntime = require("react/jsx-runtime");
13
11
  var _span, _span2;
14
- const _excluded = ["code"];
15
12
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
16
13
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
14
  function CodeCopyButton(props) {
18
15
  const {
19
- code
20
- } = props,
21
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
16
+ code,
17
+ ...other
18
+ } = props;
22
19
  const {
23
20
  copy,
24
21
  isCopied
@@ -28,7 +25,8 @@ function CodeCopyButton(props) {
28
25
  const key = macOS ? '⌘' : 'Ctrl + ';
29
26
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
30
27
  className: "MuiCode-copy-container",
31
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", (0, _extends2.default)({}, other, {
28
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
29
+ ...other,
32
30
  "aria-label": "Copy the code",
33
31
  type: "button",
34
32
  className: "MuiCode-copy",
@@ -47,6 +45,6 @@ function CodeCopyButton(props) {
47
45
  children: ")"
48
46
  }))]
49
47
  })]
50
- }))
48
+ })
51
49
  });
52
50
  }
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.HighlightedCode = void 0;
8
- var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
9
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
8
  var React = _interopRequireWildcard(require("react"));
11
9
  var _prism = _interopRequireDefault(require("@mui/internal-markdown/prism"));
12
10
  var _NoSsr = require("@mui/base/NoSsr");
@@ -14,7 +12,6 @@ var _styles = require("@mui/material/styles");
14
12
  var _CodeCopy = require("../CodeCopy");
15
13
  var _MarkdownElement = require("../MarkdownElement");
16
14
  var _jsxRuntime = require("react/jsx-runtime");
17
- const _excluded = ["copyButtonHidden", "copyButtonProps", "code", "language", "plainStyle", "parentComponent", "preComponent"];
18
15
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
19
16
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
20
17
  const Pre = (0, _styles.styled)('pre')(({
@@ -29,39 +26,42 @@ const Pre = (0, _styles.styled)('pre')(({
29
26
  [theme.breakpoints.up('md')]: {
30
27
  maxWidth: 'calc(100vw - 32px - 16px)'
31
28
  },
32
- '& code': (0, _extends2.default)({}, theme.typography.caption, {
29
+ '& code': {
30
+ // Avoid layout jump after hydration (style injected by Prism)
31
+ ...theme.typography.caption,
33
32
  fontFamily: theme.typography.fontFamilyCode,
34
33
  fontWeight: 400,
35
34
  WebkitFontSmoothing: 'subpixel-antialiased'
36
35
  // Reset for Safari
37
36
  // https://github.com/necolas/normalize.css/blob/master/normalize.css#L102
38
- })
37
+ }
39
38
  }));
40
39
  const HighlightedCode = exports.HighlightedCode = /*#__PURE__*/React.forwardRef(function HighlightedCode(props, ref) {
41
40
  const {
42
- copyButtonHidden = false,
43
- copyButtonProps,
44
- code,
45
- language,
46
- plainStyle,
47
- parentComponent: Component = plainStyle ? 'div' : _MarkdownElement.MarkdownElement,
48
- preComponent: PreComponent = plainStyle ? Pre : 'pre'
49
- } = props,
50
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
41
+ copyButtonHidden = false,
42
+ copyButtonProps,
43
+ code,
44
+ language,
45
+ plainStyle,
46
+ parentComponent: Component = plainStyle ? 'div' : _MarkdownElement.MarkdownElement,
47
+ preComponent: PreComponent = plainStyle ? Pre : 'pre',
48
+ ...other
49
+ } = props;
51
50
  const renderedCode = React.useMemo(() => {
52
51
  return (0, _prism.default)(code.trim(), language);
53
52
  }, [code, language]);
54
53
  const handlers = (0, _CodeCopy.useCodeCopy)();
55
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, (0, _extends2.default)({
56
- ref: ref
57
- }, other, {
58
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _extends2.default)({
59
- className: "MuiCode-root"
60
- }, handlers, {
54
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
55
+ ref: ref,
56
+ ...other,
57
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
58
+ className: "MuiCode-root",
59
+ ...handlers,
61
60
  children: [copyButtonHidden ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_NoSsr.NoSsr, {
62
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CodeCopy.CodeCopyButton, (0, _extends2.default)({
63
- code: code
64
- }, copyButtonProps))
61
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CodeCopy.CodeCopyButton, {
62
+ code: code,
63
+ ...copyButtonProps
64
+ })
65
65
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(PreComponent, {
66
66
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("code", {
67
67
  className: `language-${language}`
@@ -72,6 +72,6 @@ const HighlightedCode = exports.HighlightedCode = /*#__PURE__*/React.forwardRef(
72
72
  }
73
73
  })
74
74
  })]
75
- }))
76
- }));
75
+ })
76
+ });
77
77
  });
@@ -6,8 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.GlowingIconContainer = GlowingIconContainer;
8
8
  exports.InfoCard = InfoCard;
9
- var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
10
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
9
  var React = _interopRequireWildcard(require("react"));
12
10
  var _styles = require("@mui/material/styles");
13
11
  var _Box = _interopRequireDefault(require("@mui/material/Box"));
@@ -15,14 +13,13 @@ var _Paper = _interopRequireDefault(require("@mui/material/Paper"));
15
13
  var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
16
14
  var _Link = require("../Link");
17
15
  var _jsxRuntime = require("react/jsx-runtime");
18
- const _excluded = ["classNameDescription", "classNameTitle", "description", "icon", "link", "svg", "title", "titleProps"];
19
16
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
20
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
21
18
  function GlowingIconContainer({
22
19
  icon
23
20
  }) {
24
21
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
25
- sx: theme => (0, _extends2.default)({
22
+ sx: theme => ({
26
23
  width: 36,
27
24
  height: 36,
28
25
  display: 'flex',
@@ -36,63 +33,65 @@ function GlowingIconContainer({
36
33
  boxShadow: `0px 0 0 2px ${(0, _styles.alpha)(theme.palette.primary[500], 0.1)}, 0px 2px 12px 0px rgba(234, 237, 241, 0.3) inset`,
37
34
  '& .MuiSvgIcon-root': {
38
35
  fontSize: theme.typography.pxToRem(18)
39
- }
40
- }, theme.applyDarkStyles({
41
- borderColor: (0, _styles.alpha)(theme.palette.primary[400], 0.25),
42
- bgcolor: (0, _styles.alpha)(theme.palette.primary[900], 0.2),
43
- boxShadow: `0 0 0 2px ${(0, _styles.alpha)(theme.palette.primary[600], 0.1)}, 0px 2px 12px 0px rgba(0, 0, 0, 0.25) inset`
44
- })),
36
+ },
37
+ ...theme.applyDarkStyles({
38
+ borderColor: (0, _styles.alpha)(theme.palette.primary[400], 0.25),
39
+ bgcolor: (0, _styles.alpha)(theme.palette.primary[900], 0.2),
40
+ boxShadow: `0 0 0 2px ${(0, _styles.alpha)(theme.palette.primary[600], 0.1)}, 0px 2px 12px 0px rgba(0, 0, 0, 0.25) inset`
41
+ })
42
+ }),
45
43
  children: icon
46
44
  });
47
45
  }
48
46
  function InfoCard(props) {
49
47
  const {
50
- classNameDescription,
51
- classNameTitle,
52
- description,
53
- icon,
54
- link,
55
- svg,
56
- title,
57
- titleProps
58
- } = props,
59
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
60
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Paper.default, (0, _extends2.default)({
48
+ classNameDescription,
49
+ classNameTitle,
50
+ description,
51
+ icon,
52
+ link,
53
+ svg,
54
+ title,
55
+ titleProps,
56
+ ...other
57
+ } = props;
58
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Paper.default, {
61
59
  variant: "outlined",
62
60
  component: link ? _Link.Link : 'div',
63
- href: link
64
- }, link ? {
65
- noLinkStyle: true,
66
- // Fix overloading with prefetch={false}, only prefetch on hover.
67
- prefetch: false
68
- } : {}, {
69
- sx: theme => (0, _extends2.default)({
61
+ href: link,
62
+ ...(link ? {
63
+ noLinkStyle: true,
64
+ // Fix overloading with prefetch={false}, only prefetch on hover.
65
+ prefetch: false
66
+ } : {}),
67
+ sx: theme => ({
70
68
  p: 2.5,
71
69
  height: '100%',
72
- background: `${(theme.vars || theme).palette.gradients.linearSubtle}`
73
- }, theme.applyDarkStyles({
74
- bgcolor: (0, _styles.alpha)(theme.palette.primaryDark[800], 0.25),
75
70
  background: `${(theme.vars || theme).palette.gradients.linearSubtle}`,
76
- borderColor: 'primaryDark.700'
77
- }))
78
- }, other, {
71
+ ...theme.applyDarkStyles({
72
+ bgcolor: (0, _styles.alpha)(theme.palette.primaryDark[800], 0.25),
73
+ background: `${(theme.vars || theme).palette.gradients.linearSubtle}`,
74
+ borderColor: 'primaryDark.700'
75
+ })
76
+ }),
77
+ ...other,
79
78
  children: [svg && svg, icon && /*#__PURE__*/(0, _jsxRuntime.jsx)(GlowingIconContainer, {
80
79
  icon: icon
81
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, (0, _extends2.default)({
80
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
82
81
  fontWeight: "semiBold",
83
82
  component: "h3",
84
83
  color: "text.primary",
85
84
  variant: "body2",
86
85
  mt: icon ? 2 : 0,
87
86
  mb: description ? 0.5 : 0,
88
- className: classNameTitle
89
- }, titleProps, {
87
+ className: classNameTitle,
88
+ ...titleProps,
90
89
  children: title
91
- })), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
90
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
92
91
  variant: "body2",
93
92
  color: "text.secondary",
94
93
  className: classNameDescription,
95
94
  children: description
96
95
  })]
97
- }));
96
+ });
98
97
  }
package/node/Link/Link.js CHANGED
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.Link = void 0;
8
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
- var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
10
8
  var React = _interopRequireWildcard(require("react"));
11
9
  var _clsx = _interopRequireDefault(require("clsx"));
12
10
  var _router = require("next/router");
@@ -16,8 +14,8 @@ var _styles = require("@mui/material/styles");
16
14
  var _i18n = require("../i18n");
17
15
  var _DocsProvider = require("../DocsProvider");
18
16
  var _jsxRuntime = require("react/jsx-runtime");
19
- const _excluded = ["to", "linkAs", "replace", "scroll", "shallow", "prefetch", "legacyBehavior", "locale"],
20
- _excluded2 = ["activeClassName", "as", "className", "href", "legacyBehavior", "linkAs", "locale", "noLinkStyle", "prefetch", "replace", "role", "scroll", "shallow"];
17
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
18
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
21
19
  /**
22
20
  * File to keep in sync with:
23
21
  *
@@ -25,22 +23,21 @@ const _excluded = ["to", "linkAs", "replace", "scroll", "shallow", "prefetch", "
25
23
  * - /examples/material-ui-nextjs-pages-router/src/Link.js
26
24
  * - /examples/material-ui-nextjs-pages-router-ts/src/Link.tsx
27
25
  */
26
+
28
27
  // Add support for the sx prop for consistency with the other branches.
29
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
30
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
31
28
  const Anchor = (0, _styles.styled)('a')({});
32
29
  const NextLinkComposed = /*#__PURE__*/React.forwardRef(function NextLinkComposed(props, ref) {
33
30
  const {
34
- to,
35
- linkAs,
36
- replace,
37
- scroll,
38
- shallow,
39
- prefetch,
40
- legacyBehavior = true,
41
- locale
42
- } = props,
43
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
31
+ to,
32
+ linkAs,
33
+ replace,
34
+ scroll,
35
+ shallow,
36
+ prefetch,
37
+ legacyBehavior = true,
38
+ locale,
39
+ ...other
40
+ } = props;
44
41
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_link.default, {
45
42
  href: to,
46
43
  prefetch: prefetch,
@@ -51,31 +48,33 @@ const NextLinkComposed = /*#__PURE__*/React.forwardRef(function NextLinkComposed
51
48
  passHref: true,
52
49
  locale: locale,
53
50
  legacyBehavior: legacyBehavior,
54
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Anchor, (0, _extends2.default)({
51
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Anchor, {
55
52
  "data-no-markdown-link": "true",
56
- ref: ref
57
- }, other))
53
+ ref: ref,
54
+ ...other
55
+ })
58
56
  });
59
57
  });
60
58
  // A styled version of the Next.js Pages Router Link component:
61
59
  // https://nextjs.org/docs/pages/api-reference/components/link
62
60
  const Link = exports.Link = /*#__PURE__*/React.forwardRef(function Link(props, ref) {
63
61
  const {
64
- activeClassName = 'active',
65
- as,
66
- className: classNameProps,
67
- href,
68
- legacyBehavior,
69
- linkAs: linkAsProp,
70
- locale,
71
- noLinkStyle,
72
- prefetch,
73
- replace,
74
- // Link don't have roles.
75
- scroll,
76
- shallow
77
- } = props,
78
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded2);
62
+ activeClassName = 'active',
63
+ as,
64
+ className: classNameProps,
65
+ href,
66
+ legacyBehavior,
67
+ linkAs: linkAsProp,
68
+ locale,
69
+ noLinkStyle,
70
+ prefetch,
71
+ replace,
72
+ role,
73
+ // Link don't have roles.
74
+ scroll,
75
+ shallow,
76
+ ...other
77
+ } = props;
79
78
  const router = (0, _router.useRouter)();
80
79
  const pathname = typeof href === 'string' ? href : href == null ? void 0 : href.pathname;
81
80
  const routerPathname = router.pathname.replace('/[docsTab]', '');
@@ -100,14 +99,18 @@ const Link = exports.Link = /*#__PURE__*/React.forwardRef(function Link(props, r
100
99
  locale
101
100
  };
102
101
  if (noLinkStyle) {
103
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(NextLinkComposed, (0, _extends2.default)({
102
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(NextLinkComposed, {
104
103
  className: className,
105
- ref: ref
106
- }, nextjsProps, other));
104
+ ref: ref,
105
+ ...nextjsProps,
106
+ ...other
107
+ });
107
108
  }
108
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.default, (0, _extends2.default)({
109
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.default, {
109
110
  component: NextLinkComposed,
110
111
  className: className,
111
- ref: ref
112
- }, nextjsProps, other));
112
+ ref: ref,
113
+ ...nextjsProps,
114
+ ...other
115
+ });
113
116
  });
@@ -5,21 +5,19 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.MarkdownElement = void 0;
8
- var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
9
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
8
  var React = _interopRequireWildcard(require("react"));
11
9
  var _clsx = _interopRequireDefault(require("clsx"));
12
10
  var _styles = require("@mui/material/styles");
13
11
  var _branding = require("../branding");
14
12
  var _jsxRuntime = require("react/jsx-runtime");
15
- const _excluded = ["className", "renderedMarkdown"];
16
13
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
17
14
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
15
  const Root = (0, _styles.styled)('div')(({
19
16
  theme
20
17
  }) => {
21
18
  var _theme$shape$borderRa, _theme$shape, _theme$shape$borderRa2, _theme$shape2, _theme$shape$borderRa3, _theme$shape3;
22
- return (0, _extends2.default)({}, _branding.brandingLightTheme.typography.body1, {
19
+ return {
20
+ ..._branding.brandingLightTheme.typography.body1,
23
21
  lineHeight: 1.6,
24
22
  // Increased compared to the 1.5 default to make the docs easier to read.
25
23
  color: `var(--muidocs-palette-text-primary, ${_branding.brandingLightTheme.palette.text.primary})`,
@@ -52,11 +50,12 @@ const Root = (0, _styles.styled)('div')(({
52
50
  maxWidth: 'calc(100vw - 32px - 16px)'
53
51
  }
54
52
  },
55
- '& code': (0, _extends2.default)({}, _branding.brandingLightTheme.typography.body2, {
53
+ '& code': {
54
+ ..._branding.brandingLightTheme.typography.body2,
56
55
  fontFamily: _branding.brandingLightTheme.typography.fontFamilyCode,
57
56
  fontWeight: 400,
58
57
  WebkitFontSmoothing: 'subpixel-antialiased'
59
- }),
58
+ },
60
59
  '& pre > code': {
61
60
  // Reset for Safari
62
61
  // https://github.com/necolas/normalize.css/blob/master/normalize.css#L102
@@ -74,47 +73,53 @@ const Root = (0, _styles.styled)('div')(({
74
73
  direction: 'ltr /*! @noflip */',
75
74
  boxDecorationBreak: 'clone'
76
75
  },
77
- '& h1': (0, _extends2.default)({}, _branding.brandingLightTheme.typography.h3, {
76
+ '& h1': {
77
+ ..._branding.brandingLightTheme.typography.h3,
78
78
  fontSize: _branding.brandingLightTheme.typography.pxToRem(36),
79
79
  fontFamily: `"General Sans", ${_branding.brandingLightTheme.typography.fontFamilySystem}`,
80
80
  margin: '10px 0',
81
81
  color: `var(--muidocs-palette-primaryDark-900, ${_branding.brandingLightTheme.palette.primaryDark[900]})`,
82
82
  fontWeight: 600,
83
83
  letterSpacing: -0.2
84
- }),
85
- '& .description': (0, _extends2.default)({}, _branding.brandingLightTheme.typography.subtitle1, {
84
+ },
85
+ '& .description': {
86
+ ..._branding.brandingLightTheme.typography.subtitle1,
86
87
  fontWeight: 400,
87
88
  margin: '0 0 24px'
88
- }),
89
+ },
89
90
  '& .component-tabs': {
90
91
  margin: '0 0 40px'
91
92
  },
92
- '& h2': (0, _extends2.default)({}, _branding.brandingLightTheme.typography.h5, {
93
+ '& h2': {
94
+ ..._branding.brandingLightTheme.typography.h5,
93
95
  fontFamily: `"General Sans", ${_branding.brandingLightTheme.typography.fontFamilySystem}`,
94
96
  fontSize: theme.typography.pxToRem(26),
95
97
  fontWeight: _branding.brandingLightTheme.typography.fontWeightSemiBold,
96
98
  color: `var(--muidocs-palette-grey-900, ${_branding.brandingLightTheme.palette.grey[900]})`,
97
99
  margin: '40px 0 4px'
98
- }),
99
- '& h3': (0, _extends2.default)({}, _branding.brandingLightTheme.typography.h6, {
100
+ },
101
+ '& h3': {
102
+ ..._branding.brandingLightTheme.typography.h6,
100
103
  fontFamily: `"General Sans", ${_branding.brandingLightTheme.typography.fontFamilySystem}`,
101
104
  fontSize: theme.typography.pxToRem(20),
102
105
  fontWeight: _branding.brandingLightTheme.typography.fontWeightSemiBold,
103
106
  color: `var(--muidocs-palette-grey-900, ${_branding.brandingLightTheme.palette.grey[900]})`,
104
107
  margin: '24px 0 4px'
105
- }),
106
- '& h4': (0, _extends2.default)({}, _branding.brandingLightTheme.typography.subtitle1, {
108
+ },
109
+ '& h4': {
110
+ ..._branding.brandingLightTheme.typography.subtitle1,
107
111
  fontFamily: `"General Sans", ${_branding.brandingLightTheme.typography.fontFamilySystem}`,
108
112
  fontWeight: _branding.brandingLightTheme.typography.fontWeightSemiBold,
109
113
  color: `var(--muidocs-palette-grey-900, ${_branding.brandingLightTheme.palette.grey[900]})`,
110
114
  margin: '20px 0 6px'
111
- }),
112
- '& h5': (0, _extends2.default)({}, _branding.brandingLightTheme.typography.subtitle2, {
115
+ },
116
+ '& h5': {
117
+ ..._branding.brandingLightTheme.typography.subtitle2,
113
118
  fontFamily: `"General Sans", ${_branding.brandingLightTheme.typography.fontFamilySystem}`,
114
119
  fontWeight: _branding.brandingLightTheme.typography.fontWeightSemiBold,
115
120
  color: `var(--muidocs-palette-grey-900, ${_branding.brandingLightTheme.palette.grey[900]})`,
116
121
  margin: '20px 0 8px'
117
- }),
122
+ },
118
123
  '& p': {
119
124
  marginTop: 0,
120
125
  marginBottom: 16,
@@ -242,13 +247,14 @@ const Root = (0, _styles.styled)('div')(({
242
247
  borderBottom: `1px dotted var(--muidocs-palette-divider, ${_branding.brandingLightTheme.palette.divider})`
243
248
  }
244
249
  },
245
- '& td': (0, _extends2.default)({}, theme.typography.body2, {
250
+ '& td': {
251
+ ...theme.typography.body2,
246
252
  borderBottom: `1px solid var(--muidocs-palette-divider, ${_branding.brandingLightTheme.palette.divider})`,
247
253
  paddingRight: 20,
248
254
  paddingTop: 16,
249
255
  paddingBottom: 16,
250
256
  color: `var(--muidocs-palette-text-secondary, ${_branding.brandingLightTheme.palette.text.secondary})`
251
- }),
257
+ },
252
258
  '& td code': {
253
259
  lineHeight: 1.6
254
260
  },
@@ -651,7 +657,7 @@ const Root = (0, _styles.styled)('div')(({
651
657
  borderRadius: 0
652
658
  }
653
659
  }
654
- });
660
+ };
655
661
  }, ({
656
662
  theme
657
663
  }) => ({
@@ -810,10 +816,10 @@ const Root = (0, _styles.styled)('div')(({
810
816
  }));
811
817
  const MarkdownElement = exports.MarkdownElement = /*#__PURE__*/React.forwardRef(function MarkdownElement(props, ref) {
812
818
  const {
813
- className,
814
- renderedMarkdown
815
- } = props,
816
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
819
+ className,
820
+ renderedMarkdown,
821
+ ...other
822
+ } = props;
817
823
  const more = {};
818
824
  if (typeof renderedMarkdown === 'string') {
819
825
  // workaround for https://github.com/facebook/react/issues/17170
@@ -822,9 +828,10 @@ const MarkdownElement = exports.MarkdownElement = /*#__PURE__*/React.forwardRef(
822
828
  __html: renderedMarkdown
823
829
  };
824
830
  }
825
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, (0, _extends2.default)({
826
- className: (0, _clsx.default)('markdown-body', className)
827
- }, more, other, {
831
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, {
832
+ className: (0, _clsx.default)('markdown-body', className),
833
+ ...more,
834
+ ...other,
828
835
  ref: ref
829
- }));
836
+ });
830
837
  });
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
8
  var React = _interopRequireWildcard(require("react"));
10
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
10
  var _nprogress = _interopRequireDefault(require("nprogress"));
@@ -47,7 +46,7 @@ function NProgressBar(props) {
47
46
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_NoSsr.NoSsr, {
48
47
  children: [props.children, /*#__PURE__*/(0, _jsxRuntime.jsx)(_GlobalStyles.default, {
49
48
  styles: theme => ({
50
- '#nprogress': (0, _extends2.default)({
49
+ '#nprogress': {
51
50
  direction: 'ltr',
52
51
  pointerEvents: 'none',
53
52
  position: 'fixed',
@@ -56,10 +55,10 @@ function NProgressBar(props) {
56
55
  right: 0,
57
56
  height: 2,
58
57
  zIndex: (theme.vars || theme).zIndex.tooltip,
59
- backgroundColor: (theme.vars || theme).palette.primary[200]
60
- }, theme.applyDarkStyles({
61
- backgroundColor: (theme.vars || theme).palette.primary[700]
62
- }), {
58
+ backgroundColor: (theme.vars || theme).palette.primary[200],
59
+ ...theme.applyDarkStyles({
60
+ backgroundColor: (theme.vars || theme).palette.primary[700]
61
+ }),
63
62
  '& .nprogress-bar': {
64
63
  position: 'fixed',
65
64
  backgroundColor: (theme.vars || theme).palette.primary.main,
@@ -88,7 +87,7 @@ function NProgressBar(props) {
88
87
  right: -80,
89
88
  clip: 'rect(-6px,90px,14px,-6px)'
90
89
  }
91
- })
90
+ }
92
91
  })
93
92
  })]
94
93
  });