@mui/docs 6.0.0-alpha.0 → 6.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +129 -2
- package/InfoCard/InfoCard.d.ts +21 -0
- package/InfoCard/InfoCard.js +86 -0
- package/InfoCard/index.d.ts +1 -0
- package/InfoCard/index.js +1 -0
- package/InfoCard/package.json +6 -0
- package/branding/BrandingProvider.d.ts +9 -0
- package/branding/BrandingProvider.js +17 -0
- package/branding/brandingTheme.d.ts +152 -0
- package/branding/brandingTheme.js +1146 -0
- package/branding/index.d.ts +2 -0
- package/branding/index.js +2 -0
- package/branding/package.json +6 -0
- package/legacy/InfoCard/InfoCard.js +86 -0
- package/legacy/InfoCard/index.js +1 -0
- package/legacy/branding/BrandingProvider.js +17 -0
- package/legacy/branding/brandingTheme.js +1168 -0
- package/legacy/branding/index.js +2 -0
- package/node/InfoCard/InfoCard.js +96 -0
- package/node/InfoCard/index.js +16 -0
- package/node/branding/BrandingProvider.js +25 -0
- package/node/branding/brandingTheme.js +1157 -0
- package/node/branding/index.js +27 -0
- package/node/translations/translations.json +214 -0
- package/package.json +9 -8
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.GlowingIconContainer = GlowingIconContainer;
|
|
8
|
+
exports.InfoCard = InfoCard;
|
|
9
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _styles = require("@mui/material/styles");
|
|
13
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
14
|
+
var _Paper = _interopRequireDefault(require("@mui/material/Paper"));
|
|
15
|
+
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
16
|
+
var _Link = require("../Link");
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
+
const _excluded = ["classNameDescription", "classNameTitle", "dense", "description", "icon", "link", "svg", "title", "titleProps"];
|
|
19
|
+
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
|
+
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
|
+
function GlowingIconContainer({
|
|
22
|
+
icon
|
|
23
|
+
}) {
|
|
24
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
25
|
+
sx: theme => (0, _extends2.default)({
|
|
26
|
+
width: 40,
|
|
27
|
+
height: 40,
|
|
28
|
+
display: 'flex',
|
|
29
|
+
justifyContent: 'center',
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
flexShrink: 0,
|
|
32
|
+
borderRadius: 1,
|
|
33
|
+
border: '1px solid',
|
|
34
|
+
borderColor: 'primary.200',
|
|
35
|
+
bgcolor: 'primary.50',
|
|
36
|
+
boxShadow: `0px 1px 6px 0px ${(0, _styles.alpha)(theme.palette.primary[500], 0.2)}, 0px 2px 12px 0px rgba(234, 237, 241, 0.3) inset`
|
|
37
|
+
}, theme.applyDarkStyles({
|
|
38
|
+
borderColor: (0, _styles.alpha)(theme.palette.primary[400], 0.25),
|
|
39
|
+
bgcolor: (0, _styles.alpha)(theme.palette.primary[900], 0.25),
|
|
40
|
+
boxShadow: `0 2px 6px 0 ${(0, _styles.alpha)(theme.palette.primary[600], 0.3)}, 0px 2px 12px 0px rgba(0, 0, 0, 0.25) inset`
|
|
41
|
+
})),
|
|
42
|
+
children: icon
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function InfoCard(props) {
|
|
46
|
+
const {
|
|
47
|
+
classNameDescription,
|
|
48
|
+
classNameTitle,
|
|
49
|
+
dense,
|
|
50
|
+
description,
|
|
51
|
+
icon,
|
|
52
|
+
link,
|
|
53
|
+
svg,
|
|
54
|
+
title,
|
|
55
|
+
titleProps
|
|
56
|
+
} = props,
|
|
57
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
58
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Paper.default, (0, _extends2.default)({
|
|
59
|
+
variant: "outlined",
|
|
60
|
+
component: link ? _Link.Link : 'div',
|
|
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 => (0, _extends2.default)({
|
|
68
|
+
p: dense ? 2.5 : 3.5,
|
|
69
|
+
height: '100%',
|
|
70
|
+
background: `${(theme.vars || theme).palette.gradients.linearSubtle}`
|
|
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
|
+
}, other, {
|
|
77
|
+
children: [svg && svg, icon && /*#__PURE__*/(0, _jsxRuntime.jsx)(GlowingIconContainer, {
|
|
78
|
+
icon: icon
|
|
79
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, (0, _extends2.default)({
|
|
80
|
+
fontWeight: "bold",
|
|
81
|
+
component: "h3",
|
|
82
|
+
color: "text.primary",
|
|
83
|
+
variant: "body2",
|
|
84
|
+
mt: icon ? 2 : 0,
|
|
85
|
+
mb: description ? 0.5 : 0,
|
|
86
|
+
className: classNameTitle
|
|
87
|
+
}, titleProps, {
|
|
88
|
+
children: title
|
|
89
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
90
|
+
variant: "body2",
|
|
91
|
+
color: "text.secondary",
|
|
92
|
+
className: classNameDescription,
|
|
93
|
+
children: description
|
|
94
|
+
})]
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _InfoCard = require("./InfoCard");
|
|
7
|
+
Object.keys(_InfoCard).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _InfoCard[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _InfoCard[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BrandingProvider = BrandingProvider;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _styles = require("@mui/material/styles");
|
|
9
|
+
var _brandingTheme = require("./brandingTheme");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
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); }
|
|
12
|
+
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; }
|
|
13
|
+
function BrandingProvider(props) {
|
|
14
|
+
const {
|
|
15
|
+
children,
|
|
16
|
+
mode: modeProp
|
|
17
|
+
} = props;
|
|
18
|
+
const upperTheme = (0, _styles.useTheme)();
|
|
19
|
+
const mode = modeProp || upperTheme.palette.mode;
|
|
20
|
+
const theme = mode === 'dark' ? _brandingTheme.brandingDarkTheme : _brandingTheme.brandingLightTheme;
|
|
21
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.ThemeProvider, {
|
|
22
|
+
theme: modeProp ? () => theme : theme,
|
|
23
|
+
children: children
|
|
24
|
+
});
|
|
25
|
+
}
|