@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,86 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { alpha } from '@mui/material/styles';
|
|
5
|
+
import Box from '@mui/material/Box';
|
|
6
|
+
import Paper from '@mui/material/Paper';
|
|
7
|
+
import Typography from '@mui/material/Typography';
|
|
8
|
+
import { Link } from '../Link';
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
export function GlowingIconContainer(_ref) {
|
|
11
|
+
var icon = _ref.icon;
|
|
12
|
+
return /*#__PURE__*/_jsx(Box, {
|
|
13
|
+
sx: function sx(theme) {
|
|
14
|
+
return _extends({
|
|
15
|
+
width: 40,
|
|
16
|
+
height: 40,
|
|
17
|
+
display: 'flex',
|
|
18
|
+
justifyContent: 'center',
|
|
19
|
+
alignItems: 'center',
|
|
20
|
+
flexShrink: 0,
|
|
21
|
+
borderRadius: 1,
|
|
22
|
+
border: '1px solid',
|
|
23
|
+
borderColor: 'primary.200',
|
|
24
|
+
bgcolor: 'primary.50',
|
|
25
|
+
boxShadow: "0px 1px 6px 0px ".concat(alpha(theme.palette.primary[500], 0.2), ", 0px 2px 12px 0px rgba(234, 237, 241, 0.3) inset")
|
|
26
|
+
}, theme.applyDarkStyles({
|
|
27
|
+
borderColor: alpha(theme.palette.primary[400], 0.25),
|
|
28
|
+
bgcolor: alpha(theme.palette.primary[900], 0.25),
|
|
29
|
+
boxShadow: "0 2px 6px 0 ".concat(alpha(theme.palette.primary[600], 0.3), ", 0px 2px 12px 0px rgba(0, 0, 0, 0.25) inset")
|
|
30
|
+
}));
|
|
31
|
+
},
|
|
32
|
+
children: icon
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
export function InfoCard(props) {
|
|
36
|
+
var classNameDescription = props.classNameDescription,
|
|
37
|
+
classNameTitle = props.classNameTitle,
|
|
38
|
+
dense = props.dense,
|
|
39
|
+
description = props.description,
|
|
40
|
+
icon = props.icon,
|
|
41
|
+
link = props.link,
|
|
42
|
+
svg = props.svg,
|
|
43
|
+
title = props.title,
|
|
44
|
+
titleProps = props.titleProps,
|
|
45
|
+
other = _objectWithoutProperties(props, ["classNameDescription", "classNameTitle", "dense", "description", "icon", "link", "svg", "title", "titleProps"]);
|
|
46
|
+
return /*#__PURE__*/_jsxs(Paper, _extends({
|
|
47
|
+
variant: "outlined",
|
|
48
|
+
component: link ? Link : 'div',
|
|
49
|
+
href: link
|
|
50
|
+
}, link ? {
|
|
51
|
+
noLinkStyle: true,
|
|
52
|
+
// Fix overloading with prefetch={false}, only prefetch on hover.
|
|
53
|
+
prefetch: false
|
|
54
|
+
} : {}, {
|
|
55
|
+
sx: function sx(theme) {
|
|
56
|
+
return _extends({
|
|
57
|
+
p: dense ? 2.5 : 3.5,
|
|
58
|
+
height: '100%',
|
|
59
|
+
background: "".concat((theme.vars || theme).palette.gradients.linearSubtle)
|
|
60
|
+
}, theme.applyDarkStyles({
|
|
61
|
+
bgcolor: alpha(theme.palette.primaryDark[800], 0.25),
|
|
62
|
+
background: "".concat((theme.vars || theme).palette.gradients.linearSubtle),
|
|
63
|
+
borderColor: 'primaryDark.700'
|
|
64
|
+
}));
|
|
65
|
+
}
|
|
66
|
+
}, other, {
|
|
67
|
+
children: [svg && svg, icon && /*#__PURE__*/_jsx(GlowingIconContainer, {
|
|
68
|
+
icon: icon
|
|
69
|
+
}), /*#__PURE__*/_jsx(Typography, _extends({
|
|
70
|
+
fontWeight: "bold",
|
|
71
|
+
component: "h3",
|
|
72
|
+
color: "text.primary",
|
|
73
|
+
variant: "body2",
|
|
74
|
+
mt: icon ? 2 : 0,
|
|
75
|
+
mb: description ? 0.5 : 0,
|
|
76
|
+
className: classNameTitle
|
|
77
|
+
}, titleProps, {
|
|
78
|
+
children: title
|
|
79
|
+
})), /*#__PURE__*/_jsx(Typography, {
|
|
80
|
+
variant: "body2",
|
|
81
|
+
color: "text.secondary",
|
|
82
|
+
className: classNameDescription,
|
|
83
|
+
children: description
|
|
84
|
+
})]
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './InfoCard';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ThemeProvider, useTheme } from '@mui/material/styles';
|
|
3
|
+
import { brandingDarkTheme, brandingLightTheme } from './brandingTheme';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
export function BrandingProvider(props) {
|
|
6
|
+
var children = props.children,
|
|
7
|
+
modeProp = props.mode;
|
|
8
|
+
var upperTheme = useTheme();
|
|
9
|
+
var mode = modeProp || upperTheme.palette.mode;
|
|
10
|
+
var theme = mode === 'dark' ? brandingDarkTheme : brandingLightTheme;
|
|
11
|
+
return /*#__PURE__*/_jsx(ThemeProvider, {
|
|
12
|
+
theme: modeProp ? function () {
|
|
13
|
+
return theme;
|
|
14
|
+
} : theme,
|
|
15
|
+
children: children
|
|
16
|
+
});
|
|
17
|
+
}
|