@mui/docs 5.15.14 → 5.15.17

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