@bayonai/mui-design 0.1.0
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/README.md +56 -0
- package/dist/cjs/client.js +20 -0
- package/dist/cjs/components/BayonFlowVisual.js +82 -0
- package/dist/cjs/components/IconTooltipButton.js +43 -0
- package/dist/cjs/components/panels.js +85 -0
- package/dist/cjs/index.js +25 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/providers/BayonThemeProvider.js +74 -0
- package/dist/cjs/styles/pageStyles.js +96 -0
- package/dist/cjs/theme/components.js +63 -0
- package/dist/cjs/theme/createBayonTheme.js +24 -0
- package/dist/cjs/theme/palette.js +109 -0
- package/dist/cjs/theme/shadows.js +21 -0
- package/dist/cjs/theme/types.js +2 -0
- package/dist/cjs/theme/typography.js +58 -0
- package/dist/cjs/utils/createBayonEmotionCache.js +21 -0
- package/dist/esm/client.js +4 -0
- package/dist/esm/components/BayonFlowVisual.js +79 -0
- package/dist/esm/components/IconTooltipButton.js +7 -0
- package/dist/esm/components/panels.js +72 -0
- package/dist/esm/index.js +9 -0
- package/dist/esm/providers/BayonThemeProvider.js +35 -0
- package/dist/esm/styles/pageStyles.js +93 -0
- package/dist/esm/theme/components.js +60 -0
- package/dist/esm/theme/createBayonTheme.js +20 -0
- package/dist/esm/theme/palette.js +106 -0
- package/dist/esm/theme/shadows.js +18 -0
- package/dist/esm/theme/types.js +1 -0
- package/dist/esm/theme/typography.js +55 -0
- package/dist/esm/utils/createBayonEmotionCache.js +15 -0
- package/dist/types/client.d.ts +3 -0
- package/dist/types/components/BayonFlowVisual.d.ts +12 -0
- package/dist/types/components/IconTooltipButton.d.ts +9 -0
- package/dist/types/components/panels.d.ts +36 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/providers/BayonThemeProvider.d.ts +10 -0
- package/dist/types/styles/pageStyles.d.ts +15 -0
- package/dist/types/theme/components.d.ts +2 -0
- package/dist/types/theme/createBayonTheme.d.ts +4 -0
- package/dist/types/theme/palette.d.ts +146 -0
- package/dist/types/theme/shadows.d.ts +2 -0
- package/dist/types/theme/types.d.ts +47 -0
- package/dist/types/theme/typography.d.ts +2 -0
- package/dist/types/utils/createBayonEmotionCache.d.ts +1 -0
- package/package.json +46 -0
package/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# @bayonai/mui-design
|
|
2
|
+
|
|
3
|
+
Shared Bayon AI Material UI design package for React websites.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @bayonai/mui-design @mui/material @mui/icons-material @emotion/react @emotion/styled @emotion/cache react react-dom
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Provider
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { BayonThemeProvider } from '@bayonai/mui-design/client';
|
|
15
|
+
|
|
16
|
+
export function App({ children }: { children: React.ReactNode }) {
|
|
17
|
+
return <BayonThemeProvider>{children}</BayonThemeProvider>;
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Theme And Styles
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
import {
|
|
25
|
+
bayonDarkTheme,
|
|
26
|
+
BayonAccentPanel,
|
|
27
|
+
BayonCtaPanel,
|
|
28
|
+
mutedTextSx,
|
|
29
|
+
tealButtonSx,
|
|
30
|
+
} from '@bayonai/mui-design';
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Use the exported theme tokens and `sx` recipes as the single source of truth for Bayon surfaces, panels, buttons, and page shells.
|
|
34
|
+
|
|
35
|
+
## Special Boxes
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
<BayonAccentPanel hover sx={{ p: 4 }}>
|
|
39
|
+
Shared accent panel content
|
|
40
|
+
</BayonAccentPanel>
|
|
41
|
+
|
|
42
|
+
<BayonCtaPanel sx={{ p: { xs: 3, md: 5 } }}>
|
|
43
|
+
Shared CTA content
|
|
44
|
+
</BayonCtaPanel>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Icon Buttons
|
|
48
|
+
|
|
49
|
+
```tsx
|
|
50
|
+
import SearchIcon from '@mui/icons-material/Search';
|
|
51
|
+
import { IconTooltipButton } from '@bayonai/mui-design/client';
|
|
52
|
+
|
|
53
|
+
<IconTooltipButton label="Search">
|
|
54
|
+
<SearchIcon />
|
|
55
|
+
</IconTooltipButton>
|
|
56
|
+
```
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
__exportStar(require("./components/IconTooltipButton"), exports);
|
|
19
|
+
__exportStar(require("./components/BayonFlowVisual"), exports);
|
|
20
|
+
__exportStar(require("./providers/BayonThemeProvider"), exports);
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BayonFlowVisual = BayonFlowVisual;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("@emotion/react");
|
|
6
|
+
const material_1 = require("@mui/material");
|
|
7
|
+
const drift = (0, react_1.keyframes) `
|
|
8
|
+
0% { transform: translate3d(0, 0, 0); }
|
|
9
|
+
50% { transform: translate3d(0, -10px, 0); }
|
|
10
|
+
100% { transform: translate3d(0, 0, 0); }
|
|
11
|
+
`;
|
|
12
|
+
const flow = (0, react_1.keyframes) `
|
|
13
|
+
0% { transform: translateX(-36%); opacity: 0.28; }
|
|
14
|
+
50% { opacity: 0.8; }
|
|
15
|
+
100% { transform: translateX(36%); opacity: 0.28; }
|
|
16
|
+
`;
|
|
17
|
+
const tilePulse = (0, react_1.keyframes) `
|
|
18
|
+
0%, 100% { transform: scale(1); filter: brightness(1); }
|
|
19
|
+
50% { transform: scale(1.04); filter: brightness(1.18); }
|
|
20
|
+
`;
|
|
21
|
+
function mergeSx(...items) {
|
|
22
|
+
return items.filter(Boolean);
|
|
23
|
+
}
|
|
24
|
+
const defaultItems = [
|
|
25
|
+
{ label: 'Prompt', value: 'Design brief', color: '#2DD4BF' },
|
|
26
|
+
{ label: 'Model', value: 'Context map', color: '#60A5FA' },
|
|
27
|
+
{ label: 'Build', value: 'App surface', color: '#FDE047' },
|
|
28
|
+
{ label: 'Ship', value: 'Live product', color: '#FF6B6B' },
|
|
29
|
+
];
|
|
30
|
+
function BayonFlowVisual({ items = defaultItems, caption = 'idea -> AI system design -> production app', sx, ...props }) {
|
|
31
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { "aria-hidden": "true", sx: mergeSx({
|
|
32
|
+
minHeight: { xs: 320, md: 520 },
|
|
33
|
+
border: '1px solid rgba(248, 250, 252, 0.22)',
|
|
34
|
+
borderRadius: 2,
|
|
35
|
+
bgcolor: 'rgba(15, 23, 42, 0.78)',
|
|
36
|
+
boxShadow: '0 34px 110px rgba(2, 6, 23, 0.48), inset 0 1px 0 rgba(248, 250, 252, 0.12)',
|
|
37
|
+
p: { xs: 3, md: 4 },
|
|
38
|
+
display: 'grid',
|
|
39
|
+
gridTemplateRows: 'auto 1fr auto',
|
|
40
|
+
gap: 3,
|
|
41
|
+
animation: `${drift} 8s ease-in-out infinite`,
|
|
42
|
+
position: 'relative',
|
|
43
|
+
overflow: 'hidden',
|
|
44
|
+
'@media (prefers-reduced-motion: reduce)': {
|
|
45
|
+
animation: 'none',
|
|
46
|
+
},
|
|
47
|
+
}, sx), ...props, children: [(0, jsx_runtime_1.jsx)(material_1.Stack, { direction: "row", spacing: 1.2, children: ['#2DD4BF', '#FF6B6B', '#FDE047'].map((color) => ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { width: 10, height: 10, borderRadius: '50%', bgcolor: color } }, color))) }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
48
|
+
display: 'grid',
|
|
49
|
+
gridTemplateColumns: '1fr 1.1fr',
|
|
50
|
+
gridTemplateRows: '1fr 1fr',
|
|
51
|
+
gap: 2,
|
|
52
|
+
position: 'relative',
|
|
53
|
+
'&::before': {
|
|
54
|
+
content: '""',
|
|
55
|
+
position: 'absolute',
|
|
56
|
+
left: '10%',
|
|
57
|
+
right: '10%',
|
|
58
|
+
top: '50%',
|
|
59
|
+
height: 2,
|
|
60
|
+
background: 'linear-gradient(90deg, transparent, #2DD4BF, #FDE047, #FF6B6B, transparent)',
|
|
61
|
+
animation: `${flow} 5s ease-in-out infinite`,
|
|
62
|
+
},
|
|
63
|
+
'@media (prefers-reduced-motion: reduce)': {
|
|
64
|
+
'&::before': {
|
|
65
|
+
animation: 'none',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
}, children: items.map((item, index) => ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
69
|
+
borderRadius: 2,
|
|
70
|
+
border: '1px solid rgba(248, 250, 252, 0.16)',
|
|
71
|
+
bgcolor: index === 2 ? 'rgba(253, 224, 71, 0.12)' : 'rgba(248, 250, 252, 0.08)',
|
|
72
|
+
p: 2.5,
|
|
73
|
+
display: 'flex',
|
|
74
|
+
flexDirection: 'column',
|
|
75
|
+
justifyContent: 'space-between',
|
|
76
|
+
minHeight: 128,
|
|
77
|
+
animation: `${tilePulse} ${5 + index}s ease-in-out infinite`,
|
|
78
|
+
'@media (prefers-reduced-motion: reduce)': {
|
|
79
|
+
animation: 'none',
|
|
80
|
+
},
|
|
81
|
+
}, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { color: item.color, fontWeight: 800, fontSize: '0.8rem', textTransform: 'uppercase' }, children: item.label }), (0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { color: '#F8FAFC', fontWeight: 700, fontSize: { xs: '1rem', md: '1.18rem' } }, children: item.value })] }, `${String(item.label)}-${index}`))) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { color: 'rgba(248, 250, 252, 0.72)', fontSize: '0.95rem' }, children: caption })] }));
|
|
82
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.IconTooltipButton = void 0;
|
|
38
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
39
|
+
const React = __importStar(require("react"));
|
|
40
|
+
const material_1 = require("@mui/material");
|
|
41
|
+
exports.IconTooltipButton = React.forwardRef(function IconTooltipButton({ label, tooltipProps, children, ...props }, ref) {
|
|
42
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: label, ...tooltipProps, children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { ref: ref, "aria-label": label, ...props, children: children }) }));
|
|
43
|
+
});
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BayonPageShell = BayonPageShell;
|
|
4
|
+
exports.BayonGradientHero = BayonGradientHero;
|
|
5
|
+
exports.BayonDarkPanel = BayonDarkPanel;
|
|
6
|
+
exports.BayonAccentPanel = BayonAccentPanel;
|
|
7
|
+
exports.BayonCtaPanel = BayonCtaPanel;
|
|
8
|
+
exports.BayonContentBox = BayonContentBox;
|
|
9
|
+
exports.BayonMethodBox = BayonMethodBox;
|
|
10
|
+
exports.BayonProjectCard = BayonProjectCard;
|
|
11
|
+
exports.BayonPillarCard = BayonPillarCard;
|
|
12
|
+
exports.BayonTechChip = BayonTechChip;
|
|
13
|
+
exports.BayonPanelStack = BayonPanelStack;
|
|
14
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
15
|
+
const material_1 = require("@mui/material");
|
|
16
|
+
const pageStyles_1 = require("../styles/pageStyles");
|
|
17
|
+
function mergeSx(...items) {
|
|
18
|
+
return items.filter(Boolean);
|
|
19
|
+
}
|
|
20
|
+
function BayonPageShell({ sx, ...props }) {
|
|
21
|
+
return (0, jsx_runtime_1.jsx)(material_1.Box, { sx: mergeSx(pageStyles_1.pageShellSx, sx), ...props });
|
|
22
|
+
}
|
|
23
|
+
function BayonGradientHero({ sx, ...props }) {
|
|
24
|
+
return (0, jsx_runtime_1.jsx)(material_1.Box, { component: "section", sx: mergeSx(pageStyles_1.gradientHeroSx, sx), ...props });
|
|
25
|
+
}
|
|
26
|
+
function BayonDarkPanel({ hover = false, sx, ...props }) {
|
|
27
|
+
return (0, jsx_runtime_1.jsx)(material_1.Box, { sx: mergeSx(pageStyles_1.darkPanelSx, hover ? pageStyles_1.darkPanelHoverSx : undefined, sx), ...props });
|
|
28
|
+
}
|
|
29
|
+
function BayonAccentPanel({ hover = false, sx, ...props }) {
|
|
30
|
+
return (0, jsx_runtime_1.jsx)(material_1.Box, { sx: mergeSx(pageStyles_1.accentPanelSx, hover ? pageStyles_1.darkPanelHoverSx : undefined, sx), ...props });
|
|
31
|
+
}
|
|
32
|
+
function BayonCtaPanel({ sx, ...props }) {
|
|
33
|
+
return (0, jsx_runtime_1.jsx)(material_1.Box, { sx: mergeSx(pageStyles_1.darkCtaSx, sx), ...props });
|
|
34
|
+
}
|
|
35
|
+
function BayonContentBox({ sx, ...props }) {
|
|
36
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: mergeSx({
|
|
37
|
+
p: { xs: 3, md: 4 },
|
|
38
|
+
border: '1px solid rgba(248, 250, 252, 0.14)',
|
|
39
|
+
borderRadius: 2,
|
|
40
|
+
bgcolor: 'rgba(248, 250, 252, 0.06)',
|
|
41
|
+
}, sx), ...props }));
|
|
42
|
+
}
|
|
43
|
+
function BayonMethodBox({ accentColor = '#2DD4BF', sx, ...props }) {
|
|
44
|
+
return ((0, jsx_runtime_1.jsx)(BayonCtaPanel, { sx: mergeSx({
|
|
45
|
+
p: 3,
|
|
46
|
+
borderLeft: `3px solid ${accentColor}`,
|
|
47
|
+
}, sx), ...props }));
|
|
48
|
+
}
|
|
49
|
+
function BayonProjectCard({ category, status, title, body, actions, children, hover = true, sx, ...props }) {
|
|
50
|
+
return ((0, jsx_runtime_1.jsxs)(BayonAccentPanel, { hover: hover, sx: mergeSx({
|
|
51
|
+
p: 4,
|
|
52
|
+
minHeight: 290,
|
|
53
|
+
display: 'flex',
|
|
54
|
+
flexDirection: 'column',
|
|
55
|
+
}, sx), ...props, children: [category && ((0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { color: '#2DD4BF', fontWeight: 800, fontSize: '0.82rem', textTransform: 'uppercase', mb: 1.5 }, children: category })), title && ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h5", sx: { color: '#FFFFFF', mb: 2 }, children: title })), body && (0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { color: 'rgba(248, 250, 252, 0.74)', lineHeight: 1.75, mb: 3 }, children: body }), children, status && (0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { color: '#FDE047', fontWeight: 700, mt: 'auto' }, children: status }), actions] }));
|
|
56
|
+
}
|
|
57
|
+
function BayonPillarCard({ accentColor = '#2DD4BF', eyebrow, title, body, actions, children, sx, ...props }) {
|
|
58
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: mergeSx({
|
|
59
|
+
p: { xs: 3, md: 5 },
|
|
60
|
+
border: '1px solid rgba(248, 250, 252, 0.14)',
|
|
61
|
+
borderRadius: 2,
|
|
62
|
+
bgcolor: 'rgba(248, 250, 252, 0.06)',
|
|
63
|
+
boxShadow: '0 28px 80px rgba(2, 6, 23, 0.24)',
|
|
64
|
+
transition: 'transform 180ms ease, border-color 180ms ease',
|
|
65
|
+
'&:hover': {
|
|
66
|
+
transform: 'translateY(-5px)',
|
|
67
|
+
borderColor: accentColor,
|
|
68
|
+
},
|
|
69
|
+
}, sx), ...props, children: [eyebrow && ((0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { color: accentColor, fontSize: '0.82rem', fontWeight: 800, textTransform: 'uppercase', mb: 1.5 }, children: eyebrow })), title && ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h3", sx: { color: '#FFFFFF', mb: 2 }, children: title })), body && (0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { color: 'rgba(248, 250, 252, 0.74)', lineHeight: 1.75 }, children: body }), children, actions] }));
|
|
70
|
+
}
|
|
71
|
+
function BayonTechChip({ label, children, sx, ...props }) {
|
|
72
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: mergeSx({
|
|
73
|
+
px: 1.5,
|
|
74
|
+
py: 0.75,
|
|
75
|
+
borderRadius: 1,
|
|
76
|
+
bgcolor: 'rgba(45, 212, 191, 0.12)',
|
|
77
|
+
color: '#A7F3D0',
|
|
78
|
+
border: '1px solid rgba(45, 212, 191, 0.24)',
|
|
79
|
+
fontSize: '0.9rem',
|
|
80
|
+
fontWeight: 600,
|
|
81
|
+
}, sx), ...props, children: label !== null && label !== void 0 ? label : children }));
|
|
82
|
+
}
|
|
83
|
+
function BayonPanelStack({ sx, ...props }) {
|
|
84
|
+
return (0, jsx_runtime_1.jsx)(material_1.Stack, { spacing: 3, sx: sx, ...props });
|
|
85
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./components/panels"), exports);
|
|
18
|
+
__exportStar(require("./styles/pageStyles"), exports);
|
|
19
|
+
__exportStar(require("./theme/components"), exports);
|
|
20
|
+
__exportStar(require("./theme/createBayonTheme"), exports);
|
|
21
|
+
__exportStar(require("./theme/palette"), exports);
|
|
22
|
+
__exportStar(require("./theme/shadows"), exports);
|
|
23
|
+
__exportStar(require("./theme/typography"), exports);
|
|
24
|
+
__exportStar(require("./theme/types"), exports);
|
|
25
|
+
__exportStar(require("./utils/createBayonEmotionCache"), exports);
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.BayonThemeProvider = BayonThemeProvider;
|
|
41
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
42
|
+
const React = __importStar(require("react"));
|
|
43
|
+
const react_1 = require("@emotion/react");
|
|
44
|
+
const material_1 = require("@mui/material");
|
|
45
|
+
const CssBaseline_1 = __importDefault(require("@mui/material/CssBaseline"));
|
|
46
|
+
const styles_1 = require("@mui/material/styles");
|
|
47
|
+
const createBayonTheme_1 = require("../theme/createBayonTheme");
|
|
48
|
+
const createBayonEmotionCache_1 = require("../utils/createBayonEmotionCache");
|
|
49
|
+
const clientSideEmotionCache = (0, createBayonEmotionCache_1.createBayonEmotionCache)();
|
|
50
|
+
class BayonThemeErrorBoundary extends React.Component {
|
|
51
|
+
constructor(props) {
|
|
52
|
+
super(props);
|
|
53
|
+
this.state = { hasError: false };
|
|
54
|
+
}
|
|
55
|
+
static getDerivedStateFromError() {
|
|
56
|
+
return { hasError: true };
|
|
57
|
+
}
|
|
58
|
+
componentDidCatch(error, errorInfo) {
|
|
59
|
+
console.error('Bayon theme error:', error, errorInfo);
|
|
60
|
+
}
|
|
61
|
+
render() {
|
|
62
|
+
if (this.state.hasError) {
|
|
63
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Box, { display: "flex", justifyContent: "center", alignItems: "center", minHeight: "100vh", bgcolor: "background.default", children: (0, jsx_runtime_1.jsxs)(material_1.Box, { textAlign: "center", children: [(0, jsx_runtime_1.jsx)("h1", { children: "Something went wrong with the theme." }), (0, jsx_runtime_1.jsx)("p", { children: "Please try refreshing the page or contact support if the problem persists." })] }) }));
|
|
64
|
+
}
|
|
65
|
+
return this.props.children;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function BayonThemeProvider({ children, emotionCache = clientSideEmotionCache, theme = createBayonTheme_1.bayonDarkTheme, enableErrorBoundary = true, }) {
|
|
69
|
+
React.useEffect(() => {
|
|
70
|
+
document.documentElement.setAttribute('data-theme', 'dark');
|
|
71
|
+
}, []);
|
|
72
|
+
const content = enableErrorBoundary ? ((0, jsx_runtime_1.jsx)(BayonThemeErrorBoundary, { children: children })) : (children);
|
|
73
|
+
return ((0, jsx_runtime_1.jsx)(react_1.CacheProvider, { value: emotionCache, children: (0, jsx_runtime_1.jsxs)(styles_1.ThemeProvider, { theme: theme, children: [(0, jsx_runtime_1.jsx)(CssBaseline_1.default, { enableColorScheme: true }), content] }) }));
|
|
74
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.outlineButtonSx = exports.tealButtonSx = exports.mutedTextSx = exports.eyebrowSx = exports.darkCtaSx = exports.darkPanelHoverSx = exports.accentPanelSx = exports.darkPanelSx = exports.heroBodySx = exports.heroTitleSx = exports.heroStackSx = exports.heroContainerSx = exports.gradientHeroSx = exports.pageShellSx = void 0;
|
|
4
|
+
const palette_1 = require("../theme/palette");
|
|
5
|
+
exports.pageShellSx = {
|
|
6
|
+
bgcolor: palette_1.bayonAccent.night,
|
|
7
|
+
color: palette_1.bayonAccent.foreground,
|
|
8
|
+
};
|
|
9
|
+
exports.gradientHeroSx = {
|
|
10
|
+
bgcolor: palette_1.bayonAccent.night,
|
|
11
|
+
color: palette_1.bayonAccent.foreground,
|
|
12
|
+
py: { xs: 8, md: 11 },
|
|
13
|
+
position: 'relative',
|
|
14
|
+
overflow: 'hidden',
|
|
15
|
+
'&::before': {
|
|
16
|
+
content: '""',
|
|
17
|
+
position: 'absolute',
|
|
18
|
+
inset: 0,
|
|
19
|
+
background: 'linear-gradient(120deg, rgba(45, 212, 191, 0.2), transparent 34%), linear-gradient(55deg, transparent 48%, rgba(253, 224, 71, 0.14), transparent 70%), linear-gradient(150deg, transparent 40%, rgba(255, 107, 107, 0.16))',
|
|
20
|
+
pointerEvents: 'none',
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
exports.heroContainerSx = {
|
|
24
|
+
position: 'relative',
|
|
25
|
+
};
|
|
26
|
+
exports.heroStackSx = {
|
|
27
|
+
maxWidth: 880,
|
|
28
|
+
position: 'relative',
|
|
29
|
+
};
|
|
30
|
+
exports.heroTitleSx = {
|
|
31
|
+
color: '#FFFFFF',
|
|
32
|
+
fontSize: { xs: '2.75rem', md: '4.75rem' },
|
|
33
|
+
lineHeight: 1,
|
|
34
|
+
};
|
|
35
|
+
exports.heroBodySx = {
|
|
36
|
+
color: 'rgba(248, 250, 252, 0.78)',
|
|
37
|
+
fontSize: { xs: '1.1rem', md: '1.3rem' },
|
|
38
|
+
lineHeight: 1.65,
|
|
39
|
+
};
|
|
40
|
+
exports.darkPanelSx = {
|
|
41
|
+
bgcolor: 'rgba(248, 250, 252, 0.06)',
|
|
42
|
+
border: '1px solid rgba(248, 250, 252, 0.14)',
|
|
43
|
+
borderRadius: 2,
|
|
44
|
+
boxShadow: '0 28px 80px rgba(2, 6, 23, 0.24)',
|
|
45
|
+
};
|
|
46
|
+
exports.accentPanelSx = {
|
|
47
|
+
...exports.darkPanelSx,
|
|
48
|
+
position: 'relative',
|
|
49
|
+
overflow: 'hidden',
|
|
50
|
+
'&::before': {
|
|
51
|
+
content: '""',
|
|
52
|
+
position: 'absolute',
|
|
53
|
+
left: 0,
|
|
54
|
+
top: 0,
|
|
55
|
+
bottom: 0,
|
|
56
|
+
width: 6,
|
|
57
|
+
background: 'linear-gradient(180deg, #2DD4BF, #60A5FA 38%, #FDE047 68%, #FF6B6B)',
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
exports.darkPanelHoverSx = {
|
|
61
|
+
transition: 'transform 180ms ease, border-color 180ms ease, background-color 180ms ease',
|
|
62
|
+
'&:hover': {
|
|
63
|
+
transform: 'translateY(-5px)',
|
|
64
|
+
borderColor: 'rgba(45, 212, 191, 0.65)',
|
|
65
|
+
bgcolor: 'rgba(248, 250, 252, 0.08)',
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
exports.darkCtaSx = {
|
|
69
|
+
bgcolor: palette_1.bayonAccent.panel,
|
|
70
|
+
color: palette_1.bayonAccent.foreground,
|
|
71
|
+
border: '1px solid rgba(248, 250, 252, 0.14)',
|
|
72
|
+
borderRadius: 2,
|
|
73
|
+
};
|
|
74
|
+
exports.eyebrowSx = {
|
|
75
|
+
color: palette_1.bayonAccent.teal,
|
|
76
|
+
fontSize: '0.82rem',
|
|
77
|
+
fontWeight: 800,
|
|
78
|
+
textTransform: 'uppercase',
|
|
79
|
+
};
|
|
80
|
+
exports.mutedTextSx = {
|
|
81
|
+
color: 'rgba(248, 250, 252, 0.74)',
|
|
82
|
+
lineHeight: 1.75,
|
|
83
|
+
};
|
|
84
|
+
exports.tealButtonSx = {
|
|
85
|
+
bgcolor: palette_1.bayonAccent.teal,
|
|
86
|
+
color: palette_1.bayonAccent.ink,
|
|
87
|
+
'&:hover': { bgcolor: palette_1.bayonAccent.tealLight },
|
|
88
|
+
};
|
|
89
|
+
exports.outlineButtonSx = {
|
|
90
|
+
borderColor: 'rgba(248, 250, 252, 0.28)',
|
|
91
|
+
color: palette_1.bayonAccent.foreground,
|
|
92
|
+
'&:hover': {
|
|
93
|
+
borderColor: palette_1.bayonAccent.teal,
|
|
94
|
+
bgcolor: 'rgba(45, 212, 191, 0.1)',
|
|
95
|
+
},
|
|
96
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bayonComponents = void 0;
|
|
4
|
+
const shadows_1 = require("./shadows");
|
|
5
|
+
exports.bayonComponents = {
|
|
6
|
+
MuiButtonBase: {
|
|
7
|
+
defaultProps: {
|
|
8
|
+
disableRipple: true,
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
MuiButton: {
|
|
12
|
+
styleOverrides: {
|
|
13
|
+
root: {
|
|
14
|
+
borderRadius: 8,
|
|
15
|
+
padding: '8px 22px',
|
|
16
|
+
fontWeight: 600,
|
|
17
|
+
textTransform: 'none',
|
|
18
|
+
boxShadow: 'none',
|
|
19
|
+
'&:hover': {
|
|
20
|
+
boxShadow: 'none',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
sizeLarge: {
|
|
24
|
+
padding: '10px 24px',
|
|
25
|
+
fontSize: '1rem',
|
|
26
|
+
},
|
|
27
|
+
sizeSmall: {
|
|
28
|
+
padding: '6px 16px',
|
|
29
|
+
fontSize: '0.875rem',
|
|
30
|
+
},
|
|
31
|
+
contained: {
|
|
32
|
+
boxShadow: 'none',
|
|
33
|
+
'&:hover': {
|
|
34
|
+
boxShadow: 'none',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
MuiCard: {
|
|
40
|
+
styleOverrides: {
|
|
41
|
+
root: {
|
|
42
|
+
borderRadius: 16,
|
|
43
|
+
boxShadow: shadows_1.bayonShadows.z8,
|
|
44
|
+
'&:hover': {
|
|
45
|
+
boxShadow: shadows_1.bayonShadows.z16,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
MuiTextField: {
|
|
51
|
+
defaultProps: {
|
|
52
|
+
fullWidth: true,
|
|
53
|
+
variant: 'outlined',
|
|
54
|
+
},
|
|
55
|
+
styleOverrides: {
|
|
56
|
+
root: {
|
|
57
|
+
'& .MuiOutlinedInput-root': {
|
|
58
|
+
borderRadius: 8,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bayonDarkTheme = exports.bayonTheme = void 0;
|
|
4
|
+
exports.createBayonTheme = createBayonTheme;
|
|
5
|
+
const styles_1 = require("@mui/material/styles");
|
|
6
|
+
const components_1 = require("./components");
|
|
7
|
+
const palette_1 = require("./palette");
|
|
8
|
+
const shadows_1 = require("./shadows");
|
|
9
|
+
const typography_1 = require("./typography");
|
|
10
|
+
function createBayonTheme(options = {}) {
|
|
11
|
+
const { mode = 'light', overrides = {} } = options;
|
|
12
|
+
const baseTheme = {
|
|
13
|
+
palette: mode === 'dark' ? palette_1.bayonDarkPalette : palette_1.bayonPalette,
|
|
14
|
+
shape: {
|
|
15
|
+
borderRadius: 8,
|
|
16
|
+
},
|
|
17
|
+
typography: typography_1.bayonTypography,
|
|
18
|
+
components: components_1.bayonComponents,
|
|
19
|
+
customShadows: shadows_1.bayonShadows,
|
|
20
|
+
};
|
|
21
|
+
return (0, styles_1.responsiveFontSizes)((0, styles_1.createTheme)(baseTheme, overrides));
|
|
22
|
+
}
|
|
23
|
+
exports.bayonTheme = createBayonTheme();
|
|
24
|
+
exports.bayonDarkTheme = createBayonTheme({ mode: 'dark' });
|