@goldlabelapps/theme 1.0.1 → 3.2.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/dist/context/ConfigContext.js +6 -6
- package/dist/design-system/components/DesignSystemProvider/DesignSystemProvider.d.ts +2 -0
- package/dist/design-system/components/DesignSystemProvider/DesignSystemProvider.js +29 -0
- package/dist/design-system/components/DesignSystemProvider/types.d.ts +1 -0
- package/dist/design-system/components/DesignSystemProvider/types.js +1 -0
- package/dist/design-system/components/brand/Logo/Logo.d.ts +2 -0
- package/dist/design-system/components/brand/Logo/Logo.js +35 -0
- package/dist/design-system/components/brand/Logo/types.d.ts +1 -0
- package/dist/design-system/components/brand/Logo/types.js +1 -0
- package/dist/design-system/components/buttons/Button/Button.d.ts +2 -0
- package/dist/design-system/components/buttons/Button/Button.js +135 -0
- package/dist/design-system/components/buttons/Button/types.d.ts +1 -0
- package/dist/design-system/components/buttons/Button/types.js +1 -0
- package/dist/design-system/components/buttons/IconButton/IconButton.d.ts +2 -0
- package/dist/design-system/components/buttons/IconButton/IconButton.js +129 -0
- package/dist/design-system/components/buttons/IconButton/types.d.ts +1 -0
- package/dist/design-system/components/buttons/IconButton/types.js +1 -0
- package/dist/design-system/components/feedback/Alert/Alert.d.ts +2 -0
- package/dist/design-system/components/feedback/Alert/Alert.js +12 -0
- package/dist/design-system/components/feedback/Alert/types.d.ts +1 -0
- package/dist/design-system/components/feedback/Alert/types.js +1 -0
- package/dist/design-system/components/feedback/Card/Card.d.ts +2 -0
- package/dist/design-system/components/feedback/Card/Card.js +46 -0
- package/dist/design-system/components/feedback/Card/types.d.ts +1 -0
- package/dist/design-system/components/feedback/Card/types.js +1 -0
- package/dist/design-system/components/feedback/Field/Field.d.ts +2 -0
- package/dist/design-system/components/feedback/Field/Field.js +6 -0
- package/dist/design-system/components/feedback/Field/types.d.ts +1 -0
- package/dist/design-system/components/feedback/Field/types.js +1 -0
- package/dist/design-system/components/feedback/index.d.ts +6 -0
- package/dist/design-system/components/feedback/index.js +3 -0
- package/dist/design-system/components/headings/Heading/Heading.d.ts +3 -0
- package/dist/design-system/components/headings/Heading/Heading.js +66 -0
- package/dist/design-system/components/headings/Heading/types.d.ts +1 -0
- package/dist/design-system/components/headings/Heading/types.js +1 -0
- package/dist/design-system/components/icons/Icon/Icon.d.ts +10 -0
- package/dist/design-system/components/icons/Icon/Icon.js +421 -0
- package/dist/design-system/components/icons/Icon/types.d.ts +7 -0
- package/dist/design-system/components/icons/Icon/types.js +1 -0
- package/dist/design-system/components/icons/SVGIcons/BlokeyIcon.d.ts +2 -0
- package/dist/design-system/components/icons/SVGIcons/BlokeyIcon.js +7 -0
- package/dist/design-system/components/icons/SVGIcons/ChromeIcon.d.ts +2 -0
- package/dist/design-system/components/icons/SVGIcons/ChromeIcon.js +7 -0
- package/dist/design-system/components/icons/SVGIcons/DesktopIcon.d.ts +2 -0
- package/dist/design-system/components/icons/SVGIcons/DesktopIcon.js +7 -0
- package/dist/design-system/components/icons/SVGIcons/EdgeIcon.d.ts +2 -0
- package/dist/design-system/components/icons/SVGIcons/EdgeIcon.js +7 -0
- package/dist/design-system/components/icons/SVGIcons/FallmanagerIcon.d.ts +2 -0
- package/dist/design-system/components/icons/SVGIcons/FallmanagerIcon.js +8 -0
- package/dist/design-system/components/icons/SVGIcons/FirefoxIcon.d.ts +2 -0
- package/dist/design-system/components/icons/SVGIcons/FirefoxIcon.js +7 -0
- package/dist/design-system/components/icons/SVGIcons/FlickrIcon.d.ts +2 -0
- package/dist/design-system/components/icons/SVGIcons/FlickrIcon.js +9 -0
- package/dist/design-system/components/icons/SVGIcons/GatsbyIcon.d.ts +2 -0
- package/dist/design-system/components/icons/SVGIcons/GatsbyIcon.js +8 -0
- package/dist/design-system/components/icons/SVGIcons/GoldenticketIcon.d.ts +2 -0
- package/dist/design-system/components/icons/SVGIcons/GoldenticketIcon.js +7 -0
- package/dist/design-system/components/icons/SVGIcons/GoldlabelOutlined.d.ts +2 -0
- package/dist/design-system/components/icons/SVGIcons/GoldlabelOutlined.js +7 -0
- package/dist/design-system/components/icons/SVGIcons/GraphqlIcon.d.ts +2 -0
- package/dist/design-system/components/icons/SVGIcons/GraphqlIcon.js +7 -0
- package/dist/design-system/components/icons/SVGIcons/IphoneIcon.d.ts +2 -0
- package/dist/design-system/components/icons/SVGIcons/IphoneIcon.js +7 -0
- package/dist/design-system/components/icons/SVGIcons/LinuxIcon.d.ts +2 -0
- package/dist/design-system/components/icons/SVGIcons/LinuxIcon.js +7 -0
- package/dist/design-system/components/icons/SVGIcons/MacIcon.d.ts +2 -0
- package/dist/design-system/components/icons/SVGIcons/MacIcon.js +7 -0
- package/dist/design-system/components/icons/SVGIcons/MacromediaIcon.d.ts +3 -0
- package/dist/design-system/components/icons/SVGIcons/MacromediaIcon.js +8 -0
- package/dist/design-system/components/icons/SVGIcons/OliverIcon.d.ts +2 -0
- package/dist/design-system/components/icons/SVGIcons/OliverIcon.js +5 -0
- package/dist/design-system/components/icons/SVGIcons/OpenAIIcon.d.ts +2 -0
- package/dist/design-system/components/icons/SVGIcons/OpenAIIcon.js +6 -0
- package/dist/design-system/components/icons/SVGIcons/PingpongballIcon.d.ts +2 -0
- package/dist/design-system/components/icons/SVGIcons/PingpongballIcon.js +8 -0
- package/dist/design-system/components/icons/SVGIcons/SafariIcon.d.ts +2 -0
- package/dist/design-system/components/icons/SVGIcons/SafariIcon.js +7 -0
- package/dist/design-system/components/icons/SVGIcons/WindowsIcon.d.ts +2 -0
- package/dist/design-system/components/icons/SVGIcons/WindowsIcon.js +7 -0
- package/dist/design-system/components/icons/SVGIcons/WordpressIcon.d.ts +2 -0
- package/dist/design-system/components/icons/SVGIcons/WordpressIcon.js +7 -0
- package/dist/design-system/components/icons/SVGIcons/XboxIcon.d.ts +2 -0
- package/dist/design-system/components/icons/SVGIcons/XboxIcon.js +7 -0
- package/dist/design-system/components/icons/index.d.ts +2 -0
- package/dist/design-system/components/icons/index.js +1 -0
- package/dist/design-system/components/images/FeaturedImage/FeaturedImage.d.ts +2 -0
- package/dist/design-system/components/images/FeaturedImage/FeaturedImage.js +67 -0
- package/dist/design-system/components/images/FeaturedImage/types.d.ts +1 -0
- package/dist/design-system/components/images/FeaturedImage/types.js +1 -0
- package/dist/design-system/components/layout/AppShell/AppShell.d.ts +2 -0
- package/dist/design-system/components/layout/AppShell/AppShell.js +6 -0
- package/dist/design-system/components/layout/AppShell/types.d.ts +1 -0
- package/dist/design-system/components/layout/AppShell/types.js +1 -0
- package/dist/design-system/components/layout/Footer/Footer.d.ts +2 -0
- package/dist/design-system/components/layout/Footer/Footer.js +106 -0
- package/dist/design-system/components/layout/Footer/types.d.ts +1 -0
- package/dist/design-system/components/layout/Footer/types.js +1 -0
- package/dist/design-system/components/layout/Header/Header.d.ts +2 -0
- package/dist/design-system/components/layout/Header/Header.js +6 -0
- package/dist/design-system/components/layout/Header/types.d.ts +1 -0
- package/dist/design-system/components/layout/Header/types.js +1 -0
- package/dist/design-system/components/layout/Main/Main.d.ts +2 -0
- package/dist/design-system/components/layout/Main/Main.js +4 -0
- package/dist/design-system/components/layout/Main/types.d.ts +1 -0
- package/dist/design-system/components/layout/Main/types.js +1 -0
- package/dist/design-system/components/layout/MenuDrawer/MenuDrawer.d.ts +2 -0
- package/dist/design-system/components/layout/MenuDrawer/MenuDrawer.js +31 -0
- package/dist/design-system/components/layout/MenuDrawer/types.d.ts +1 -0
- package/dist/design-system/components/layout/MenuDrawer/types.js +1 -0
- package/dist/design-system/components/layout/PageSection/PageSection.d.ts +2 -0
- package/dist/design-system/components/layout/PageSection/PageSection.js +6 -0
- package/dist/design-system/components/layout/PageSection/types.d.ts +1 -0
- package/dist/design-system/components/layout/PageSection/types.js +1 -0
- package/dist/design-system/components/layout/SectionTitle/SectionTitle.d.ts +2 -0
- package/dist/design-system/components/layout/SectionTitle/SectionTitle.js +6 -0
- package/dist/design-system/components/layout/SectionTitle/types.d.ts +1 -0
- package/dist/design-system/components/layout/SectionTitle/types.js +1 -0
- package/dist/design-system/components/layout/index.d.ts +7 -0
- package/dist/design-system/components/layout/index.js +7 -0
- package/dist/design-system/components/lists/List/List.d.ts +2 -0
- package/dist/design-system/components/lists/List/List.js +6 -0
- package/dist/design-system/components/lists/List/types.d.ts +2 -0
- package/dist/design-system/components/lists/List/types.js +1 -0
- package/dist/design-system/components/lists/ListItem/ListItem.d.ts +2 -0
- package/dist/design-system/components/lists/ListItem/ListItem.js +6 -0
- package/dist/design-system/components/lists/ListItem/types.d.ts +2 -0
- package/dist/design-system/components/lists/ListItem/types.js +1 -0
- package/dist/design-system/components/lists/ListItemButton/ListItemButton.d.ts +2 -0
- package/dist/design-system/components/lists/ListItemButton/ListItemButton.js +6 -0
- package/dist/design-system/components/lists/ListItemButton/types.d.ts +2 -0
- package/dist/design-system/components/lists/ListItemButton/types.js +1 -0
- package/dist/design-system/components/lists/ListItemText/ListItemText.d.ts +2 -0
- package/dist/design-system/components/lists/ListItemText/ListItemText.js +6 -0
- package/dist/design-system/components/lists/ListItemText/types.d.ts +2 -0
- package/dist/design-system/components/lists/ListItemText/types.js +1 -0
- package/dist/design-system/components/lists/ListSubheader/ListSubheader.d.ts +2 -0
- package/dist/design-system/components/lists/ListSubheader/ListSubheader.js +6 -0
- package/dist/design-system/components/lists/ListSubheader/types.d.ts +2 -0
- package/dist/design-system/components/lists/ListSubheader/types.js +1 -0
- package/dist/design-system/components/navigation/Breadcrumb/Breadcrumb.d.ts +2 -0
- package/dist/design-system/components/navigation/Breadcrumb/Breadcrumb.js +18 -0
- package/dist/design-system/components/navigation/Breadcrumb/types.d.ts +1 -0
- package/dist/design-system/components/navigation/Breadcrumb/types.js +1 -0
- package/dist/design-system/components/navigation/Share/Share.d.ts +3 -0
- package/dist/design-system/components/navigation/Share/Share.js +156 -0
- package/dist/design-system/components/navigation/Share/types.d.ts +1 -0
- package/dist/design-system/components/navigation/Share/types.js +1 -0
- package/dist/design-system/components/navigation/SiteNav/SiteNav.d.ts +3 -0
- package/dist/design-system/components/navigation/SiteNav/SiteNav.js +82 -0
- package/dist/design-system/components/navigation/SiteNav/types.d.ts +1 -0
- package/dist/design-system/components/navigation/SiteNav/types.js +1 -0
- package/dist/design-system/components/nxStyle.d.ts +129 -0
- package/dist/design-system/components/nxStyle.js +89 -0
- package/dist/design-system/components/responsive/Viewport/Viewport.d.ts +4 -0
- package/dist/design-system/components/responsive/Viewport/Viewport.js +32 -0
- package/dist/design-system/components/responsive/Viewport/types.d.ts +1 -0
- package/dist/design-system/components/responsive/Viewport/types.js +1 -0
- package/dist/design-system/components/surfaces/Swatch/Swatch.d.ts +2 -0
- package/dist/design-system/components/surfaces/Swatch/Swatch.js +19 -0
- package/dist/design-system/components/surfaces/Swatch/types.d.ts +1 -0
- package/dist/design-system/components/surfaces/Swatch/types.js +1 -0
- package/dist/design-system/components/surfaces/SwatchGroup/SwatchGroup.d.ts +2 -0
- package/dist/design-system/components/surfaces/SwatchGroup/SwatchGroup.js +12 -0
- package/dist/design-system/components/surfaces/SwatchGroup/types.d.ts +1 -0
- package/dist/design-system/components/surfaces/SwatchGroup/types.js +1 -0
- package/dist/design-system/index.d.ts +23 -0
- package/dist/design-system/index.js +22 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +21 -0
- package/dist/styles/site-layout.css +354 -0
- package/dist/styles/theme.d.ts +3 -0
- package/dist/styles/theme.js +120 -0
- package/dist/styles/tokens.css +109 -0
- package/package.json +19 -1
|
@@ -3,7 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { createContext, useContext, useMemo } from "react";
|
|
4
4
|
export const defaultConfig = {
|
|
5
5
|
metadata: {
|
|
6
|
-
title: "
|
|
6
|
+
title: "NX° Template",
|
|
7
7
|
description: "Modular full-stack web application",
|
|
8
8
|
siteUrl: "https://goldlabel.pro",
|
|
9
9
|
twitterHandle: "@goldlabelapps",
|
|
@@ -12,7 +12,7 @@ export const defaultConfig = {
|
|
|
12
12
|
themeColor: "#012867",
|
|
13
13
|
},
|
|
14
14
|
brand: {
|
|
15
|
-
name: "
|
|
15
|
+
name: "NX°",
|
|
16
16
|
tagline: "Modern full-stack application template",
|
|
17
17
|
logoType: "svg",
|
|
18
18
|
logoSrc: "/svg/nx.svg",
|
|
@@ -25,8 +25,8 @@ export const defaultConfig = {
|
|
|
25
25
|
},
|
|
26
26
|
pwa: {
|
|
27
27
|
enabled: true,
|
|
28
|
-
name: "
|
|
29
|
-
shortName: "
|
|
28
|
+
name: "NX° Template",
|
|
29
|
+
shortName: "NX°",
|
|
30
30
|
description: "Modern full-stack application template",
|
|
31
31
|
startUrl: "/",
|
|
32
32
|
scope: "/",
|
|
@@ -40,7 +40,7 @@ export const defaultConfig = {
|
|
|
40
40
|
},
|
|
41
41
|
navigation: {
|
|
42
42
|
links: [],
|
|
43
|
-
primaryCta: { label: "Get Started", href: "#" },
|
|
43
|
+
primaryCta: { label: "Get Started with NX°", href: "#" },
|
|
44
44
|
},
|
|
45
45
|
hero: {
|
|
46
46
|
headline: "Modern Full-Stack Application",
|
|
@@ -98,7 +98,7 @@ export const defaultConfig = {
|
|
|
98
98
|
brandName: "Goldlabel",
|
|
99
99
|
columns: [],
|
|
100
100
|
bottomLinks: [],
|
|
101
|
-
copyright: "© 2026 Goldlabel Apps
|
|
101
|
+
copyright: "© 2026 Goldlabel Apps Ltd",
|
|
102
102
|
},
|
|
103
103
|
};
|
|
104
104
|
const ConfigContext = createContext(defaultConfig);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo } from 'react';
|
|
4
|
+
import { CssBaseline, GlobalStyles, ThemeProvider } from '@mui/material';
|
|
5
|
+
import { createAppTheme } from '../../../styles/theme';
|
|
6
|
+
import { getNxStyle } from '../nxStyle';
|
|
7
|
+
function resolveInitialMode(mode) {
|
|
8
|
+
if (mode) {
|
|
9
|
+
return mode;
|
|
10
|
+
}
|
|
11
|
+
if (typeof window !== 'undefined' && typeof window.matchMedia === 'function') {
|
|
12
|
+
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
13
|
+
}
|
|
14
|
+
return 'light';
|
|
15
|
+
}
|
|
16
|
+
export default function DesignSystemProvider({ children, mode, themeConfig }) {
|
|
17
|
+
const resolvedMode = useMemo(() => resolveInitialMode(mode), [mode]);
|
|
18
|
+
const theme = createAppTheme(resolvedMode, themeConfig);
|
|
19
|
+
const style = getNxStyle(resolvedMode);
|
|
20
|
+
return (_jsxs(ThemeProvider, { theme: theme, children: [_jsx(CssBaseline, {}), _jsx(GlobalStyles, { styles: {
|
|
21
|
+
...style,
|
|
22
|
+
body: {
|
|
23
|
+
...style.body,
|
|
24
|
+
backgroundColor: 'transparent',
|
|
25
|
+
color: theme.palette.text.primary,
|
|
26
|
+
transition: 'background-color 0.2s ease',
|
|
27
|
+
},
|
|
28
|
+
} }), children] }));
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { DesignSystemMode, DesignSystemProviderProps, DesignSystemThemeConfig } from '../../types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Box } from '@mui/material';
|
|
4
|
+
import { useTheme } from '@mui/material/styles';
|
|
5
|
+
import Heading from '../../headings/Heading/Heading';
|
|
6
|
+
import Icon from '../../icons/Icon/Icon';
|
|
7
|
+
export default function Logo({ name = 'NX°', children, subtitle, icon = "pingpong", favicon = false, faceColor, smileColor, iconSize = 30, }) {
|
|
8
|
+
const theme = useTheme();
|
|
9
|
+
const faceFill = faceColor ?? theme.palette.primary.main;
|
|
10
|
+
const smileFill = smileColor ?? '#fff';
|
|
11
|
+
const text = children ?? name;
|
|
12
|
+
const hasText = !favicon && text !== undefined && text !== null && text !== '';
|
|
13
|
+
const showTextBlock = !favicon && (hasText || Boolean(subtitle));
|
|
14
|
+
return (_jsxs(Box, { sx: {
|
|
15
|
+
display: 'inline-flex',
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
gap: 1.25,
|
|
18
|
+
color: 'text.primary'
|
|
19
|
+
}, children: [_jsx(Box, { "aria-hidden": "true", sx: {
|
|
20
|
+
width: iconSize,
|
|
21
|
+
height: iconSize,
|
|
22
|
+
marginRight: 0.5,
|
|
23
|
+
display: 'inline-flex',
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
justifyContent: 'center',
|
|
26
|
+
color: 'primary.main',
|
|
27
|
+
lineHeight: 0
|
|
28
|
+
}, children: icon ? (_jsx(Box, { sx: { display: 'inline-flex', alignItems: 'center', justifyContent: 'center' }, children: _jsx(Icon, { icon: icon, color: "secondary", size: iconSize }) })) : (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: iconSize, height: iconSize, role: "img", "aria-label": "NX Favicon", children: _jsx("g", { stroke: "none", fill: "none", fillRule: "evenodd", children: _jsxs("g", { children: [_jsx("rect", { fillOpacity: "0", x: "0", y: "0", width: "24", height: "24" }), _jsxs("g", { transform: "translate(1, 1)", fillRule: "nonzero", children: [_jsx("path", { d: "M11.9316955,0.00778516743 C18.2793961,0.234625 23.2318292,5.339499 22.9916183,11.4103978 C22.7565183,17.4812966 17.4207699,22.2190224 11.0730694,21.9921826 C4.72536881,21.7653428 -0.227064254,16.6604688 0.00803576687,10.58957 C0.248246659,4.51867123 5.58399495,-0.218565786 11.9316955,0.00778516743 Z", fill: faceFill }), _jsx("path", { d: "M8,12 C12.6203742,21.9973959 20,13.9133228 20,13.9133228 C14.7209979,15.4126605 8,12 8,12 Z", fill: smileFill })] })] }) }) })) }), showTextBlock ? (_jsx(Box, { sx: {
|
|
29
|
+
display: 'flex',
|
|
30
|
+
flexDirection: 'column',
|
|
31
|
+
alignItems: 'flex-start',
|
|
32
|
+
}, children: hasText ? (_jsx(Heading, { variant: "h2", style: {
|
|
33
|
+
marginTop: 3,
|
|
34
|
+
}, children: text })) : null })) : null] }));
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { LogoProps } from '../../../types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Button as MuiButton } from '@mui/material';
|
|
4
|
+
import { useTheme } from '@mui/material/styles';
|
|
5
|
+
const SIZE_STYLES = {
|
|
6
|
+
sm: {
|
|
7
|
+
minHeight: 36,
|
|
8
|
+
px: 1.5,
|
|
9
|
+
py: 0.75,
|
|
10
|
+
fontSize: '0.9rem',
|
|
11
|
+
},
|
|
12
|
+
md: {
|
|
13
|
+
minHeight: 42,
|
|
14
|
+
px: 2,
|
|
15
|
+
py: 0.9,
|
|
16
|
+
fontSize: '0.96rem',
|
|
17
|
+
},
|
|
18
|
+
lg: {
|
|
19
|
+
minHeight: 48,
|
|
20
|
+
px: 2.5,
|
|
21
|
+
py: 1,
|
|
22
|
+
fontSize: '1rem',
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
const VARIANT_MAP = {
|
|
26
|
+
solid: 'contained',
|
|
27
|
+
outline: 'outlined',
|
|
28
|
+
ghost: 'text',
|
|
29
|
+
text: 'text',
|
|
30
|
+
};
|
|
31
|
+
function getToneStyles(tone, variant, theme) {
|
|
32
|
+
const styleVariant = variant === 'text' ? 'ghost' : variant;
|
|
33
|
+
const palette = theme.palette;
|
|
34
|
+
const tones = {
|
|
35
|
+
primary: {
|
|
36
|
+
solid: {
|
|
37
|
+
bgcolor: palette.primary.main,
|
|
38
|
+
color: palette.primary.contrastText || palette.common.white,
|
|
39
|
+
'&:hover': {
|
|
40
|
+
bgcolor: palette.primary.dark,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
outline: {
|
|
44
|
+
color: palette.primary.main,
|
|
45
|
+
borderColor: `${palette.primary.main}38`,
|
|
46
|
+
backgroundColor: `${palette.primary.main}0A`,
|
|
47
|
+
'&:hover': {
|
|
48
|
+
borderColor: palette.primary.main,
|
|
49
|
+
backgroundColor: `${palette.primary.main}14`,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
ghost: {
|
|
53
|
+
color: palette.primary.main,
|
|
54
|
+
boxShadow: 'none',
|
|
55
|
+
'&:hover': {
|
|
56
|
+
backgroundColor: `${palette.primary.main}14`,
|
|
57
|
+
boxShadow: 'none',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
neutral: {
|
|
62
|
+
solid: {
|
|
63
|
+
bgcolor: palette.text.primary,
|
|
64
|
+
color: palette.background.paper,
|
|
65
|
+
'&:hover': {
|
|
66
|
+
bgcolor: palette.text.secondary,
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
outline: {
|
|
70
|
+
color: palette.text.primary,
|
|
71
|
+
borderColor: `${palette.text.primary}38`,
|
|
72
|
+
backgroundColor: `${palette.text.primary}0A`,
|
|
73
|
+
'&:hover': {
|
|
74
|
+
borderColor: `${palette.text.primary}61`,
|
|
75
|
+
backgroundColor: `${palette.text.primary}14`,
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
ghost: {
|
|
79
|
+
color: palette.text.primary,
|
|
80
|
+
boxShadow: 'none',
|
|
81
|
+
'&:hover': {
|
|
82
|
+
backgroundColor: `${palette.text.primary}14`,
|
|
83
|
+
boxShadow: 'none',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
danger: {
|
|
88
|
+
solid: {
|
|
89
|
+
bgcolor: palette.error.main,
|
|
90
|
+
color: palette.error.contrastText,
|
|
91
|
+
'&:hover': {
|
|
92
|
+
bgcolor: palette.error.dark,
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
outline: {
|
|
96
|
+
color: palette.error.main,
|
|
97
|
+
borderColor: `${palette.error.main}38`,
|
|
98
|
+
backgroundColor: `${palette.error.main}0A`,
|
|
99
|
+
'&:hover': {
|
|
100
|
+
borderColor: palette.error.main,
|
|
101
|
+
backgroundColor: `${palette.error.main}14`,
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
ghost: {
|
|
105
|
+
color: palette.error.main,
|
|
106
|
+
boxShadow: 'none',
|
|
107
|
+
'&:hover': {
|
|
108
|
+
backgroundColor: `${palette.error.main}14`,
|
|
109
|
+
boxShadow: 'none',
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
return tones[tone][styleVariant];
|
|
115
|
+
}
|
|
116
|
+
export default function Button({ children, variant = 'solid', tone = 'primary', size = 'md', fullWidth = false, disabled = false, href, onClick, startIcon, endIcon, type = 'button', ariaLabel, className, sx, }) {
|
|
117
|
+
const theme = useTheme();
|
|
118
|
+
const mergedSx = {
|
|
119
|
+
borderRadius: '3px',
|
|
120
|
+
fontWeight: 400,
|
|
121
|
+
lineHeight: 1,
|
|
122
|
+
letterSpacing: '0.02em',
|
|
123
|
+
textTransform: 'none',
|
|
124
|
+
alignSelf: 'flex-start',
|
|
125
|
+
width: fullWidth ? '100%' : 'auto',
|
|
126
|
+
boxShadow: variant === 'ghost' || variant === 'text' ? 'none' : undefined,
|
|
127
|
+
'&.Mui-disabled': {
|
|
128
|
+
opacity: 0.55,
|
|
129
|
+
},
|
|
130
|
+
...SIZE_STYLES[size],
|
|
131
|
+
...getToneStyles(tone, variant, theme),
|
|
132
|
+
};
|
|
133
|
+
const composedSx = Array.isArray(sx) ? [mergedSx, ...sx] : sx ? [mergedSx, sx] : mergedSx;
|
|
134
|
+
return (_jsx(MuiButton, { variant: VARIANT_MAP[variant], disableElevation: true, fullWidth: fullWidth, disabled: disabled, href: href, onClick: onClick, startIcon: startIcon, endIcon: endIcon, type: type, "aria-label": ariaLabel, className: className, sx: composedSx, children: children }));
|
|
135
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ButtonProps, ButtonSize, ButtonTone, ButtonVariant } from '../../../types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { IconButton as MuiIconButton } from '@mui/material';
|
|
4
|
+
import { useTheme } from '@mui/material/styles';
|
|
5
|
+
const SIZE_STYLES = {
|
|
6
|
+
sm: {
|
|
7
|
+
width: 36,
|
|
8
|
+
height: 36,
|
|
9
|
+
},
|
|
10
|
+
md: {
|
|
11
|
+
width: 42,
|
|
12
|
+
height: 42,
|
|
13
|
+
},
|
|
14
|
+
lg: {
|
|
15
|
+
width: 48,
|
|
16
|
+
height: 48,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
const VARIANT_MAP = {
|
|
20
|
+
solid: 'contained',
|
|
21
|
+
outline: 'outlined',
|
|
22
|
+
ghost: 'text',
|
|
23
|
+
text: 'text',
|
|
24
|
+
};
|
|
25
|
+
function getToneStyles(tone, variant, theme) {
|
|
26
|
+
const styleVariant = variant === 'text' ? 'ghost' : variant;
|
|
27
|
+
const palette = theme.palette;
|
|
28
|
+
const toneColors = {
|
|
29
|
+
primary: {
|
|
30
|
+
solid: {
|
|
31
|
+
bgcolor: palette.primary.main,
|
|
32
|
+
color: palette.primary.contrastText || palette.common.white,
|
|
33
|
+
'&:hover': {
|
|
34
|
+
bgcolor: palette.primary.dark,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
outline: {
|
|
38
|
+
color: palette.primary.main,
|
|
39
|
+
borderColor: `${palette.primary.main}38`,
|
|
40
|
+
backgroundColor: `${palette.primary.main}0A`,
|
|
41
|
+
'&:hover': {
|
|
42
|
+
borderColor: palette.primary.main,
|
|
43
|
+
backgroundColor: `${palette.primary.main}14`,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
ghost: {
|
|
47
|
+
color: palette.primary.main,
|
|
48
|
+
boxShadow: 'none',
|
|
49
|
+
'&:hover': {
|
|
50
|
+
backgroundColor: `${palette.primary.main}14`,
|
|
51
|
+
boxShadow: 'none',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
neutral: {
|
|
56
|
+
solid: {
|
|
57
|
+
bgcolor: palette.text.primary,
|
|
58
|
+
color: palette.background.paper,
|
|
59
|
+
'&:hover': {
|
|
60
|
+
bgcolor: palette.text.secondary,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
outline: {
|
|
64
|
+
color: palette.text.primary,
|
|
65
|
+
borderColor: `${palette.text.primary}38`,
|
|
66
|
+
backgroundColor: `${palette.text.primary}0A`,
|
|
67
|
+
'&:hover': {
|
|
68
|
+
borderColor: `${palette.text.primary}61`,
|
|
69
|
+
backgroundColor: `${palette.text.primary}14`,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
ghost: {
|
|
73
|
+
color: palette.text.primary,
|
|
74
|
+
boxShadow: 'none',
|
|
75
|
+
'&:hover': {
|
|
76
|
+
backgroundColor: `${palette.text.primary}14`,
|
|
77
|
+
boxShadow: 'none',
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
danger: {
|
|
82
|
+
solid: {
|
|
83
|
+
bgcolor: palette.error.main,
|
|
84
|
+
color: palette.error.contrastText,
|
|
85
|
+
'&:hover': {
|
|
86
|
+
bgcolor: palette.error.dark,
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
outline: {
|
|
90
|
+
color: palette.error.main,
|
|
91
|
+
borderColor: `${palette.error.main}38`,
|
|
92
|
+
backgroundColor: `${palette.error.main}0A`,
|
|
93
|
+
'&:hover': {
|
|
94
|
+
borderColor: palette.error.main,
|
|
95
|
+
backgroundColor: `${palette.error.main}14`,
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
ghost: {
|
|
99
|
+
color: palette.error.main,
|
|
100
|
+
boxShadow: 'none',
|
|
101
|
+
'&:hover': {
|
|
102
|
+
backgroundColor: `${palette.error.main}14`,
|
|
103
|
+
boxShadow: 'none',
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
return toneColors[tone][styleVariant];
|
|
109
|
+
}
|
|
110
|
+
export default function IconButton({ icon, variant = 'ghost', tone = 'primary', size = 'md', disabled = false, href, onClick, type = 'button', ariaLabel, className, color, sx, ...rest }) {
|
|
111
|
+
const theme = useTheme();
|
|
112
|
+
const muiColor = color ?? (tone === 'danger' ? 'error' : tone === 'primary' ? 'primary' : 'inherit');
|
|
113
|
+
const mergedSx = {
|
|
114
|
+
borderRadius: '3px',
|
|
115
|
+
alignSelf: 'flex-start',
|
|
116
|
+
border: VARIANT_MAP[variant] === 'outlined' ? '1px solid' : undefined,
|
|
117
|
+
boxShadow: variant === 'ghost' || variant === 'text' ? 'none' : undefined,
|
|
118
|
+
'&.Mui-disabled': {
|
|
119
|
+
opacity: 0.55,
|
|
120
|
+
},
|
|
121
|
+
...SIZE_STYLES[size],
|
|
122
|
+
...getToneStyles(tone, variant, theme),
|
|
123
|
+
};
|
|
124
|
+
const composedSx = Array.isArray(sx) ? [mergedSx, ...sx] : sx ? [mergedSx, sx] : mergedSx;
|
|
125
|
+
if (href) {
|
|
126
|
+
return (_jsx(MuiIconButton, { component: 'a', href: href, disabled: disabled, onClick: onClick, "aria-label": ariaLabel, className: className, color: muiColor, sx: composedSx, ...rest, children: icon }));
|
|
127
|
+
}
|
|
128
|
+
return (_jsx(MuiIconButton, { disabled: disabled, onClick: onClick, type: type, "aria-label": ariaLabel, className: className, color: muiColor, sx: composedSx, ...rest, children: icon }));
|
|
129
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ButtonSize, ButtonTone, ButtonVariant, IconButtonProps } from '../../../types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Box, Button as MuiButton, Typography } from '@mui/material';
|
|
4
|
+
export default function Alert({ children, title, severity = 'info', dismissible = false }) {
|
|
5
|
+
const tone = {
|
|
6
|
+
info: { border: 'rgba(168, 146, 122, 0.3)', bg: 'rgba(168, 146, 122, 0.14)' },
|
|
7
|
+
success: { border: 'rgba(47, 143, 70, 0.32)', bg: 'rgba(47, 143, 70, 0.12)' },
|
|
8
|
+
warning: { border: 'rgba(160, 98, 17, 0.28)', bg: 'rgba(160, 98, 17, 0.1)' },
|
|
9
|
+
error: { border: 'rgba(192, 59, 43, 0.32)', bg: 'rgba(192, 59, 43, 0.1)' }
|
|
10
|
+
}[severity];
|
|
11
|
+
return (_jsxs(Box, { sx: { border: `1px solid ${tone.border}`, borderLeft: '4px solid', borderColor: 'primary.main', borderRadius: '3px', bgcolor: tone.bg, p: 2.25, display: 'flex', alignItems: 'flex-start', justifyContent: 'space-between', gap: 2 }, children: [_jsxs(Box, { children: [title && _jsx(Typography, { variant: "subtitle2", sx: { mb: 0.5, fontWeight: 400 }, children: title }), _jsx(Typography, { variant: "body2", color: "text.secondary", children: children })] }), dismissible && _jsx(MuiButton, { size: "small", variant: "text", children: "Dismiss" })] }));
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { AlertProps } from '../../../types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Box } from '@mui/material';
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
export default function Card({ children, padding = 'md', variant = 'paper', hoverLift = false }) {
|
|
6
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
7
|
+
const pad = { sm: 2, md: 3, lg: 4 }[padding] ?? 3;
|
|
8
|
+
const styling = {
|
|
9
|
+
paper: {
|
|
10
|
+
bgcolor: 'background.paper',
|
|
11
|
+
border: '1px solid rgba(40, 34, 28, 0.12)',
|
|
12
|
+
boxShadow: '0 12px 40px rgba(40, 34, 28, 0.12)',
|
|
13
|
+
},
|
|
14
|
+
glass: {
|
|
15
|
+
bgcolor: 'rgba(255, 255, 255, 0.44)',
|
|
16
|
+
border: '1px solid rgba(255, 255, 255, 0.72)',
|
|
17
|
+
boxShadow: '0 26px 60px -12px rgba(40, 34, 28, 0.2)',
|
|
18
|
+
backdropFilter: 'blur(18px)',
|
|
19
|
+
WebkitBackdropFilter: 'blur(18px)',
|
|
20
|
+
},
|
|
21
|
+
tile: {
|
|
22
|
+
bgcolor: 'rgba(255, 255, 255, 0.7)',
|
|
23
|
+
border: '1px solid rgba(255, 255, 255, 0.6)',
|
|
24
|
+
boxShadow: '0 12px 24px rgba(40, 34, 28, 0.08)',
|
|
25
|
+
backdropFilter: 'blur(12px)',
|
|
26
|
+
WebkitBackdropFilter: 'blur(12px)',
|
|
27
|
+
},
|
|
28
|
+
ink: {
|
|
29
|
+
bgcolor: '#1F1F1F',
|
|
30
|
+
border: '1px solid transparent',
|
|
31
|
+
boxShadow: '0 12px 40px rgba(40, 34, 28, 0.12)',
|
|
32
|
+
},
|
|
33
|
+
}[variant];
|
|
34
|
+
return (_jsx(Box, { onMouseEnter: () => hoverLift && setIsHovered(true), onMouseLeave: () => hoverLift && setIsHovered(false), sx: {
|
|
35
|
+
borderRadius: '3px',
|
|
36
|
+
p: pad,
|
|
37
|
+
transition: 'transform 220ms ease, box-shadow 220ms ease, background-color 220ms ease',
|
|
38
|
+
...(isHovered && hoverLift
|
|
39
|
+
? {
|
|
40
|
+
transform: 'translateY(-6px)',
|
|
41
|
+
boxShadow: '0 28px 66px rgba(40, 34, 28, 0.22)',
|
|
42
|
+
}
|
|
43
|
+
: {}),
|
|
44
|
+
...styling,
|
|
45
|
+
}, children: children }));
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { CardProps } from '../../../types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Stack, TextField, Typography } from '@mui/material';
|
|
4
|
+
export default function Field({ label, hint, error, ...textFieldProps }) {
|
|
5
|
+
return (_jsxs(Stack, { spacing: 0.75, children: [label && _jsx(Typography, { variant: "overline", sx: { color: 'text.secondary', letterSpacing: '0.14em' }, children: label }), _jsx(TextField, { size: "small", ...textFieldProps, error: Boolean(error), helperText: error || hint })] }));
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { FieldProps } from '../../../types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as Alert } from './Alert/Alert';
|
|
2
|
+
export { default as Card } from './Card/Card';
|
|
3
|
+
export { default as Field } from './Field/Field';
|
|
4
|
+
export type { AlertProps } from './Alert/types';
|
|
5
|
+
export type { CardProps } from './Card/types';
|
|
6
|
+
export type { FieldProps } from './Field/types';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Typography } from '@mui/material';
|
|
4
|
+
const headingVariantStyles = {
|
|
5
|
+
label: {
|
|
6
|
+
fontSize: '0.875rem',
|
|
7
|
+
letterSpacing: '0.22em',
|
|
8
|
+
textTransform: 'uppercase',
|
|
9
|
+
lineHeight: 1.2,
|
|
10
|
+
},
|
|
11
|
+
h1: {
|
|
12
|
+
fontSize: '2rem',
|
|
13
|
+
letterSpacing: '-0.01em',
|
|
14
|
+
textTransform: 'none',
|
|
15
|
+
lineHeight: 1.15,
|
|
16
|
+
},
|
|
17
|
+
h2: {
|
|
18
|
+
fontSize: '1.625rem',
|
|
19
|
+
letterSpacing: '-0.005em',
|
|
20
|
+
textTransform: 'none',
|
|
21
|
+
lineHeight: 1.2,
|
|
22
|
+
},
|
|
23
|
+
h3: {
|
|
24
|
+
fontSize: '1.35rem',
|
|
25
|
+
letterSpacing: '0',
|
|
26
|
+
textTransform: 'none',
|
|
27
|
+
lineHeight: 1.25,
|
|
28
|
+
},
|
|
29
|
+
h4: {
|
|
30
|
+
fontSize: '1.125rem',
|
|
31
|
+
letterSpacing: '0.005em',
|
|
32
|
+
textTransform: 'none',
|
|
33
|
+
lineHeight: 1.3,
|
|
34
|
+
},
|
|
35
|
+
h5: {
|
|
36
|
+
fontSize: '1rem',
|
|
37
|
+
letterSpacing: '0.01em',
|
|
38
|
+
textTransform: 'none',
|
|
39
|
+
lineHeight: 1.35,
|
|
40
|
+
},
|
|
41
|
+
h6: {
|
|
42
|
+
fontSize: '0.9375rem',
|
|
43
|
+
letterSpacing: '0.015em',
|
|
44
|
+
textTransform: 'none',
|
|
45
|
+
lineHeight: 1.35,
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
function Heading({ children, tone, as = 'span', variant, style, sx, ...rest }) {
|
|
49
|
+
const resolvedTone = tone === 'clay' ? 'primary' : tone === 'ink' ? 'secondary' : (tone ?? 'secondary');
|
|
50
|
+
const { fontWeight: _fontWeight, ...safeStyle } = style ?? {};
|
|
51
|
+
const inferredVariant = as === 'h1' || as === 'h2' || as === 'h3' || as === 'h4' || as === 'h5' || as === 'h6' ? as : 'label';
|
|
52
|
+
const resolvedVariant = variant ?? inferredVariant;
|
|
53
|
+
return (_jsx(Typography, { component: as, sx: [
|
|
54
|
+
{
|
|
55
|
+
display: as === 'span' ? 'inline-flex' : 'block',
|
|
56
|
+
alignItems: 'center',
|
|
57
|
+
gap: 1,
|
|
58
|
+
fontFamily: 'var(--font-title)',
|
|
59
|
+
...headingVariantStyles[resolvedVariant],
|
|
60
|
+
color: resolvedTone === 'primary' ? 'primary.main' : 'secondary.main',
|
|
61
|
+
fontWeight: 400
|
|
62
|
+
},
|
|
63
|
+
...(Array.isArray(sx) ? sx : sx ? [sx] : [])
|
|
64
|
+
], style: safeStyle, ...rest, children: children }));
|
|
65
|
+
}
|
|
66
|
+
export default Heading;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { HeadingProps, HeadingTone, HeadingVariant } from '../../../types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { SvgIconProps } from '@mui/material/SvgIcon';
|
|
3
|
+
import type { IconProps as LocalIconProps } from './types';
|
|
4
|
+
type IconComponent = React.ComponentType<SvgIconProps>;
|
|
5
|
+
declare const ICON_COMPONENTS: Record<string, IconComponent>;
|
|
6
|
+
export type IconName = keyof typeof ICON_COMPONENTS;
|
|
7
|
+
export declare const ICON_NAMES: IconName[];
|
|
8
|
+
export type IconProps = LocalIconProps;
|
|
9
|
+
export default function Icon({ icon, color, size }: IconProps): React.JSX.Element;
|
|
10
|
+
export {};
|