@mui/docs 5.15.14 → 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.
Files changed (37) hide show
  1. package/CHANGELOG.md +209 -3
  2. package/InfoCard/InfoCard.d.ts +21 -0
  3. package/InfoCard/InfoCard.js +86 -0
  4. package/InfoCard/index.d.ts +1 -0
  5. package/InfoCard/index.js +1 -0
  6. package/InfoCard/package.json +6 -0
  7. package/Link/Link.js +1 -1
  8. package/NProgressBar/NProgressBar.js +3 -6
  9. package/README.md +6 -2
  10. package/branding/BrandingProvider.d.ts +9 -0
  11. package/branding/BrandingProvider.js +17 -0
  12. package/branding/brandingTheme.d.ts +152 -0
  13. package/branding/brandingTheme.js +1146 -0
  14. package/branding/index.d.ts +2 -0
  15. package/branding/index.js +2 -0
  16. package/branding/package.json +6 -0
  17. package/legacy/InfoCard/InfoCard.js +86 -0
  18. package/legacy/InfoCard/index.js +1 -0
  19. package/legacy/NProgressBar/NProgressBar.js +1 -2
  20. package/legacy/branding/BrandingProvider.js +17 -0
  21. package/legacy/branding/brandingTheme.js +1168 -0
  22. package/legacy/branding/index.js +2 -0
  23. package/node/DocsProvider/DocsProvider.js +1 -1
  24. package/node/InfoCard/InfoCard.js +96 -0
  25. package/node/InfoCard/index.js +16 -0
  26. package/node/Link/Link.js +1 -1
  27. package/node/NProgressBar/NProgressBar.js +1 -1
  28. package/node/branding/BrandingProvider.js +25 -0
  29. package/node/branding/brandingTheme.js +1157 -0
  30. package/node/branding/index.js +27 -0
  31. package/node/i18n/i18n.js +1 -1
  32. package/node/svgIcons/FileDownload.js +1 -1
  33. package/node/svgIcons/JavaScript.js +1 -1
  34. package/node/svgIcons/TypeScript.js +1 -1
  35. package/node/translations/translations.json +214 -0
  36. package/package.json +9 -8
  37. package/tsconfig.build.tsbuildinfo +1 -1
@@ -0,0 +1,2 @@
1
+ export * from './brandingTheme';
2
+ export * from './BrandingProvider';
@@ -0,0 +1,2 @@
1
+ export * from './brandingTheme';
2
+ export * from './BrandingProvider';
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "./index.js",
4
+ "main": "../node/branding/index.js",
5
+ "types": "./index.d.ts"
6
+ }
@@ -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';
@@ -8,8 +8,7 @@ import { NoSsr } from '@mui/base/NoSsr';
8
8
  import { exactProp } from '@mui/utils';
9
9
  import GlobalStyles from '@mui/material/GlobalStyles';
10
10
  import { keyframes } from '@mui/material/styles';
11
- import { jsx as _jsx } from "react/jsx-runtime";
12
- import { jsxs as _jsxs } from "react/jsx-runtime";
11
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
12
  NProgress.configure({
14
13
  barSelector: '.nprogress-bar',
15
14
  template: "\n <div class=\"nprogress-bar\">\n <div></div>\n <div></div>\n </div>\n "
@@ -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
+ }