@goldlabelapps/theme 3.2.0 → 3.5.6
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 +2 -2
- package/dist/components/RenderMarkdown.d.ts +7 -0
- package/dist/components/RenderMarkdown.js +123 -0
- package/dist/components/download/DownloadBanner.js +1 -8
- package/dist/components/footer/Footer.js +6 -3
- package/dist/components/footer/FooterWrapper.d.ts +7 -0
- package/dist/components/footer/FooterWrapper.js +15 -0
- package/dist/components/footer/NXContactColumn.d.ts +13 -0
- package/dist/components/footer/NXContactColumn.js +32 -0
- package/dist/components/footer/NXLiveApps.d.ts +22 -0
- package/dist/components/footer/NXLiveApps.js +87 -0
- package/dist/components/footer/NXSocialColumn.d.ts +14 -0
- package/dist/components/footer/NXSocialColumn.js +17 -0
- package/dist/components/footer/NXTagsColumn.d.ts +14 -0
- package/dist/components/footer/NXTagsColumn.js +31 -0
- package/dist/components/footer/index.d.ts +6 -0
- package/dist/components/footer/index.js +6 -0
- package/dist/components/hero/HeroSection.js +1 -1
- package/dist/components/hero/VideoModal.js +1 -2
- package/dist/components/index.d.ts +11 -3
- package/dist/components/index.js +11 -3
- package/dist/components/layouts/GuideBreadcrumbs.d.ts +14 -0
- package/dist/components/layouts/GuideBreadcrumbs.js +15 -0
- package/dist/components/layouts/MarkdownContent.js +6 -0
- package/dist/components/layouts/Standard.d.ts +10 -0
- package/dist/components/layouts/Standard.js +7 -0
- package/dist/components/navigation/DropdownMenu.js +1 -1
- package/dist/components/navigation/Header.js +3 -6
- package/dist/components/navigation/LayoutActions.d.ts +7 -0
- package/dist/components/navigation/LayoutActions.js +12 -0
- package/dist/components/navigation/LogoContextMenu.d.ts +0 -1
- package/dist/components/navigation/LogoContextMenu.js +1 -2
- package/dist/components/navigation/MarkdownMenu.d.ts +9 -0
- package/dist/components/navigation/MarkdownMenu.js +12 -0
- package/dist/components/navigation/MobileMenu.js +16 -7
- package/dist/components/navigation/ShareMenu.d.ts +1 -1
- package/dist/components/navigation/ShareMenu.js +1 -2
- package/dist/components/navigation/Waiting.d.ts +10 -0
- package/dist/components/navigation/Waiting.js +45 -0
- package/dist/components/search/HeroSearchBar.d.ts +16 -0
- package/dist/components/search/HeroSearchBar.js +38 -0
- package/dist/components/search/SearchDialog.d.ts +11 -0
- package/dist/components/search/SearchDialog.js +69 -0
- package/dist/components/search/SearchIconButton.d.ts +10 -0
- package/dist/components/search/SearchIconButton.js +10 -0
- package/dist/components/search/SearchResultsList.d.ts +13 -0
- package/dist/components/search/SearchResultsList.js +18 -0
- package/dist/components/search/index.d.ts +5 -0
- package/dist/components/search/index.js +5 -0
- package/dist/components/search/useSearch.d.ts +54 -0
- package/dist/components/search/useSearch.js +106 -0
- package/dist/components/shortcodes/PageLinkShortcode.d.ts +15 -0
- package/dist/components/shortcodes/PageLinkShortcode.js +51 -0
- package/dist/components/showcase/BlogSection.js +2 -2
- package/dist/components/showcase/FeatureExplorer.js +2 -2
- package/dist/components/showcase/FeaturedCard.d.ts +13 -0
- package/dist/components/showcase/FeaturedCard.js +6 -0
- package/dist/components/showcase/SolutionsSection.js +2 -2
- package/dist/components/showcase/StatementSection.js +1 -1
- package/dist/components/showcase/VideoSection.js +2 -2
- package/dist/components/ui/Bash.d.ts +16 -0
- package/dist/components/ui/Bash.js +30 -0
- package/dist/components/ui/Button.js +1 -1
- package/dist/components/ui/Card.d.ts +2 -1
- package/dist/components/ui/Card.js +29 -7
- package/dist/components/ui/ThemeToggle.d.ts +5 -1
- package/dist/components/ui/ThemeToggle.js +32 -2
- package/dist/components/video/VideoLayout.js +2 -2
- package/dist/context/ConfigContext.js +1 -1
- package/dist/context/ThemeContext.d.ts +4 -0
- package/dist/context/ThemeContext.js +23 -18
- package/dist/data/og-images.json +530 -0
- package/dist/design-system/components/DesignSystemProvider/DesignSystemProvider.js +4 -9
- package/dist/design-system/components/buttons/Button/Button.js +6 -3
- package/dist/design-system/components/buttons/IconButton/IconButton.js +6 -3
- package/dist/design-system/components/feedback/Alert/Alert.js +45 -7
- package/dist/design-system/components/feedback/Card/Card.d.ts +1 -1
- package/dist/design-system/components/feedback/Card/Card.js +15 -9
- package/dist/design-system/components/headings/Heading/Heading.js +2 -1
- package/dist/design-system/components/icons/SVGIcons/BlokeyIcon.d.ts +2 -1
- package/dist/design-system/components/icons/SVGIcons/BlokeyIcon.js +1 -1
- package/dist/design-system/components/icons/SVGIcons/ChromeIcon.d.ts +2 -1
- package/dist/design-system/components/icons/SVGIcons/ChromeIcon.js +1 -1
- package/dist/design-system/components/icons/SVGIcons/DesktopIcon.d.ts +2 -1
- package/dist/design-system/components/icons/SVGIcons/DesktopIcon.js +1 -1
- package/dist/design-system/components/icons/SVGIcons/EdgeIcon.d.ts +2 -1
- package/dist/design-system/components/icons/SVGIcons/EdgeIcon.js +1 -1
- package/dist/design-system/components/icons/SVGIcons/FallmanagerIcon.d.ts +2 -1
- package/dist/design-system/components/icons/SVGIcons/FirefoxIcon.d.ts +2 -1
- package/dist/design-system/components/icons/SVGIcons/FirefoxIcon.js +1 -1
- package/dist/design-system/components/icons/SVGIcons/FlickrIcon.d.ts +2 -1
- package/dist/design-system/components/icons/SVGIcons/FlickrIcon.js +1 -1
- package/dist/design-system/components/icons/SVGIcons/GatsbyIcon.d.ts +2 -1
- package/dist/design-system/components/icons/SVGIcons/GoldenticketIcon.d.ts +2 -1
- package/dist/design-system/components/icons/SVGIcons/GoldenticketIcon.js +1 -1
- package/dist/design-system/components/icons/SVGIcons/GoldlabelOutlined.d.ts +2 -1
- package/dist/design-system/components/icons/SVGIcons/GraphqlIcon.d.ts +2 -1
- package/dist/design-system/components/icons/SVGIcons/GraphqlIcon.js +1 -1
- package/dist/design-system/components/icons/SVGIcons/IphoneIcon.d.ts +2 -1
- package/dist/design-system/components/icons/SVGIcons/IphoneIcon.js +1 -1
- package/dist/design-system/components/icons/SVGIcons/LinuxIcon.d.ts +2 -1
- package/dist/design-system/components/icons/SVGIcons/LinuxIcon.js +1 -1
- package/dist/design-system/components/icons/SVGIcons/MacIcon.d.ts +2 -1
- package/dist/design-system/components/icons/SVGIcons/MacIcon.js +1 -1
- package/dist/design-system/components/icons/SVGIcons/MacromediaIcon.d.ts +2 -1
- package/dist/design-system/components/icons/SVGIcons/MacromediaIcon.js +1 -1
- package/dist/design-system/components/icons/SVGIcons/OliverIcon.d.ts +2 -1
- package/dist/design-system/components/icons/SVGIcons/OpenAIIcon.d.ts +2 -1
- package/dist/design-system/components/icons/SVGIcons/PingpongballIcon.d.ts +2 -1
- package/dist/design-system/components/icons/SVGIcons/SafariIcon.d.ts +2 -1
- package/dist/design-system/components/icons/SVGIcons/SafariIcon.js +1 -1
- package/dist/design-system/components/icons/SVGIcons/WindowsIcon.d.ts +2 -1
- package/dist/design-system/components/icons/SVGIcons/WindowsIcon.js +1 -1
- package/dist/design-system/components/icons/SVGIcons/WordpressIcon.d.ts +2 -1
- package/dist/design-system/components/icons/SVGIcons/WordpressIcon.js +1 -1
- package/dist/design-system/components/icons/SVGIcons/XboxIcon.d.ts +2 -1
- package/dist/design-system/components/icons/SVGIcons/XboxIcon.js +1 -1
- package/dist/design-system/components/images/FeaturedImage/FeaturedImage.d.ts +1 -1
- package/dist/design-system/components/images/FeaturedImage/FeaturedImage.js +73 -25
- package/dist/design-system/components/images/FeaturedImage/types.d.ts +1 -1
- package/dist/design-system/components/layout/Footer/Footer.js +1 -1
- package/dist/design-system/components/layout/index.d.ts +1 -0
- package/dist/design-system/components/layout/index.js +1 -0
- package/dist/design-system/components/navigation/SiteNav/SiteNav.js +1 -1
- package/dist/design-system/components/nxStyle.d.ts +39 -0
- package/dist/design-system/components/nxStyle.js +40 -14
- package/dist/design-system/types.d.ts +1 -0
- package/dist/design-system/types.js +1 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +2 -0
- package/dist/styles/globals.css +150 -3
- package/dist/styles/site-layout.css +1 -1
- package/dist/styles/theme.js +106 -7
- package/dist/styles/tokens.css +65 -0
- package/dist/types/index.d.ts +220 -0
- package/package.json +5 -2
- package/dist/components/guide/GuideLayout.d.ts +0 -8
- package/dist/components/guide/GuideLayout.js +0 -12
- package/dist/components/guide/MarkdownContent.js +0 -6
- /package/dist/components/{guide → layouts}/MarkdownContent.d.ts +0 -0
|
@@ -2,24 +2,83 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import ErrorOutlineRoundedIcon from '@mui/icons-material/ErrorOutlineRounded';
|
|
4
4
|
import { Box } from '@mui/material';
|
|
5
|
-
import { alpha } from '@mui/material/styles';
|
|
6
|
-
import { useState } from 'react';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
import { alpha, useTheme as useMuiTheme } from '@mui/material/styles';
|
|
6
|
+
import { useContext, useState } from 'react';
|
|
7
|
+
import { ThemeContext } from '../../../../context/ThemeContext';
|
|
8
|
+
import defaultOgManifest from '../../../../data/og-images.json';
|
|
9
|
+
function findOgImageItem(manifest, slug) {
|
|
10
|
+
if (!slug || !manifest?.items)
|
|
11
|
+
return undefined;
|
|
12
|
+
const lowerSlug = slug.trim().toLowerCase();
|
|
13
|
+
const directMatch = manifest.items.find((item) => item.id?.toLowerCase() === lowerSlug ||
|
|
14
|
+
item.category?.toLowerCase() === lowerSlug ||
|
|
15
|
+
item.name?.toLowerCase() === lowerSlug);
|
|
16
|
+
if (directMatch)
|
|
17
|
+
return directMatch;
|
|
18
|
+
const categorySegment = lowerSlug.split('/')[0];
|
|
19
|
+
if (categorySegment && categorySegment !== lowerSlug) {
|
|
20
|
+
return manifest.items.find((item) => item.id?.toLowerCase() === categorySegment ||
|
|
21
|
+
item.category?.toLowerCase() === categorySegment ||
|
|
22
|
+
item.name?.toLowerCase() === categorySegment);
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
export default function FeaturedImage({ image, slug = 'nx', alt, width = '100%', height, objectFit: propObjectFit, manifest = defaultOgManifest, borderRadius: propBorderRadius, flushTop = false, }) {
|
|
27
|
+
const themeContext = useContext(ThemeContext);
|
|
28
|
+
const muiTheme = useMuiTheme();
|
|
29
|
+
const activeTheme = themeContext ? themeContext.theme : (muiTheme?.palette?.mode ?? 'dark');
|
|
30
|
+
let resolvedSrc = image?.src;
|
|
31
|
+
let resolvedAlt = typeof alt === 'string' ? alt : (typeof image?.alt === 'string' ? image.alt : null);
|
|
32
|
+
let resolvedImageWidth = image?.width;
|
|
33
|
+
let resolvedImageHeight = image?.height;
|
|
34
|
+
const resolvedObjectFit = propObjectFit ?? image?.objectFit ?? 'cover';
|
|
35
|
+
const isUrlPath = (src) => Boolean(src && (src.startsWith('/') || src.startsWith('http://') || src.startsWith('https://') || src.startsWith('data:')));
|
|
36
|
+
const candidateSlug = !isUrlPath(resolvedSrc) && resolvedSrc ? resolvedSrc : slug;
|
|
37
|
+
if (!isUrlPath(resolvedSrc)) {
|
|
38
|
+
resolvedSrc = undefined;
|
|
39
|
+
}
|
|
40
|
+
if (!resolvedSrc && candidateSlug) {
|
|
41
|
+
const ogItem = findOgImageItem(manifest, candidateSlug);
|
|
42
|
+
if (ogItem?.versions) {
|
|
43
|
+
const version = ogItem.versions[activeTheme] ?? ogItem.versions.light ?? ogItem.versions.dark;
|
|
44
|
+
if (version) {
|
|
45
|
+
resolvedSrc = version.path;
|
|
46
|
+
if (resolvedAlt == null) {
|
|
47
|
+
resolvedAlt = ogItem.name ?? null;
|
|
48
|
+
}
|
|
49
|
+
if (resolvedImageWidth == null && version.dimensions?.width) {
|
|
50
|
+
resolvedImageWidth = version.dimensions.width;
|
|
51
|
+
}
|
|
52
|
+
if (resolvedImageHeight == null && version.dimensions?.height) {
|
|
53
|
+
resolvedImageHeight = version.dimensions.height;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (!resolvedSrc) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
const altText = typeof resolvedAlt === 'string' ? resolvedAlt : '';
|
|
11
62
|
const [status, setStatus] = useState('loaded');
|
|
12
|
-
const
|
|
13
|
-
const
|
|
63
|
+
const isWidthNumber = typeof resolvedImageWidth === 'number';
|
|
64
|
+
const isHeightNumber = typeof resolvedImageHeight === 'number';
|
|
65
|
+
const hasIntrinsicRatio = isWidthNumber &&
|
|
66
|
+
isHeightNumber &&
|
|
67
|
+
resolvedImageWidth > 0 &&
|
|
68
|
+
resolvedImageHeight > 0;
|
|
69
|
+
const resolvedPaddingTop = hasIntrinsicRatio && height == null
|
|
70
|
+
? `${(resolvedImageHeight / resolvedImageWidth) * 100}%`
|
|
71
|
+
: undefined;
|
|
14
72
|
const resolvedHeight = height ?? (hasIntrinsicRatio ? 0 : 220);
|
|
73
|
+
const defaultRadius = flushTop ? '1.5rem 1.5rem 0 0' : '3px';
|
|
15
74
|
return (_jsxs(Box, { sx: {
|
|
16
|
-
my: 2,
|
|
75
|
+
my: flushTop ? 0 : 2,
|
|
17
76
|
width: width ?? '100%',
|
|
18
77
|
height: resolvedHeight,
|
|
19
78
|
...(resolvedPaddingTop ? { paddingTop: resolvedPaddingTop } : {}),
|
|
20
79
|
overflow: 'hidden',
|
|
21
|
-
borderRadius:
|
|
22
|
-
bgcolor: '
|
|
80
|
+
borderRadius: propBorderRadius ?? defaultRadius,
|
|
81
|
+
bgcolor: 'transparent',
|
|
23
82
|
position: 'relative',
|
|
24
83
|
}, children: [status === 'error' ? (_jsxs(Box, { "data-testid": "featured-image-error", sx: {
|
|
25
84
|
position: 'absolute',
|
|
@@ -43,25 +102,14 @@ export default function FeaturedImage({ image, width = '100%', height, }) {
|
|
|
43
102
|
lineHeight: 1.35,
|
|
44
103
|
wordBreak: 'break-all',
|
|
45
104
|
boxShadow: '0 8px 24px rgba(0, 0, 0, 0.12)',
|
|
46
|
-
}, children:
|
|
105
|
+
}, children: resolvedSrc })] })) : null, _jsx(Box, { component: "img", src: resolvedSrc, alt: altText, suppressHydrationWarning: true, onLoad: () => setStatus('loaded'), onError: () => setStatus('error'), sx: {
|
|
47
106
|
position: 'absolute',
|
|
48
107
|
inset: 0,
|
|
49
108
|
width: '100%',
|
|
50
109
|
height: '100%',
|
|
51
110
|
display: 'block',
|
|
52
|
-
objectFit,
|
|
111
|
+
objectFit: resolvedObjectFit,
|
|
53
112
|
opacity: 1,
|
|
54
113
|
zIndex: 0,
|
|
55
|
-
} })
|
|
56
|
-
position: 'absolute',
|
|
57
|
-
left: 8,
|
|
58
|
-
bottom: 8,
|
|
59
|
-
px: 1,
|
|
60
|
-
py: 0.5,
|
|
61
|
-
borderRadius: '3px',
|
|
62
|
-
backgroundColor: (theme) => alpha(theme.palette.background.default, 0.82),
|
|
63
|
-
color: 'text.primary',
|
|
64
|
-
fontSize: '0.78rem',
|
|
65
|
-
lineHeight: 1.2,
|
|
66
|
-
}, children: _jsx(Box, { component: "span", sx: { display: 'block', fontWeight: 400 }, children: caption }) })) : null] }));
|
|
114
|
+
} })] }));
|
|
67
115
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { FeaturedImageData, FeaturedImageProps } from '../../../types';
|
|
1
|
+
export type { FeaturedImageData, FeaturedImageProps, OgImageItem, OgImagesManifest, OgImageVersion } from '../../../types';
|
|
@@ -5,7 +5,7 @@ import { AppBar, Box, Toolbar } from '@mui/material';
|
|
|
5
5
|
import Heading from '../../headings/Heading/Heading';
|
|
6
6
|
export default function Footer({ columns = [] }) {
|
|
7
7
|
const [isVisible, setIsVisible] = useState(false);
|
|
8
|
-
const [
|
|
8
|
+
const [_footerHeight, setFooterHeight] = useState(0);
|
|
9
9
|
const footerRef = useRef(null);
|
|
10
10
|
const visibleColumns = columns
|
|
11
11
|
.filter((column) => Boolean(column?.title && column?.href))
|
|
@@ -3,5 +3,6 @@ export { default as PageSection } from './PageSection/PageSection';
|
|
|
3
3
|
export { default as SectionTitle } from './SectionTitle/SectionTitle';
|
|
4
4
|
export { default as SiteFooter } from './Footer/Footer';
|
|
5
5
|
export { default as Header } from './Header/Header';
|
|
6
|
+
export { LayoutActions } from '../../../components/navigation/LayoutActions';
|
|
6
7
|
export { default as MenuDrawer } from './MenuDrawer/MenuDrawer';
|
|
7
8
|
export { default as SiteMain } from './Main/Main';
|
|
@@ -3,5 +3,6 @@ export { default as PageSection } from './PageSection/PageSection';
|
|
|
3
3
|
export { default as SectionTitle } from './SectionTitle/SectionTitle';
|
|
4
4
|
export { default as SiteFooter } from './Footer/Footer';
|
|
5
5
|
export { default as Header } from './Header/Header';
|
|
6
|
+
export { LayoutActions } from '../../../components/navigation/LayoutActions';
|
|
6
7
|
export { default as MenuDrawer } from './MenuDrawer/MenuDrawer';
|
|
7
8
|
export { default as SiteMain } from './Main/Main';
|
|
@@ -78,5 +78,5 @@ export default function SiteNav({ items, navigateTo }) {
|
|
|
78
78
|
const pathname = window.location.pathname;
|
|
79
79
|
setCurrentPath(pathname.endsWith('/') && pathname !== '/' ? pathname.slice(0, -1) : pathname);
|
|
80
80
|
}, []);
|
|
81
|
-
return renderNavItems(items, navigateTo, 0, 'nav', currentPath);
|
|
81
|
+
return renderNavItems(items ?? [], navigateTo, 0, 'nav', currentPath);
|
|
82
82
|
}
|
|
@@ -40,6 +40,19 @@ export declare const nxLightStyle: {
|
|
|
40
40
|
color: string;
|
|
41
41
|
transition: string;
|
|
42
42
|
};
|
|
43
|
+
code: {
|
|
44
|
+
backgroundColor: string;
|
|
45
|
+
color: string;
|
|
46
|
+
};
|
|
47
|
+
pre: {
|
|
48
|
+
backgroundColor: string;
|
|
49
|
+
color: string;
|
|
50
|
+
borderColor: string;
|
|
51
|
+
};
|
|
52
|
+
'pre code': {
|
|
53
|
+
backgroundColor: string;
|
|
54
|
+
color: string;
|
|
55
|
+
};
|
|
43
56
|
};
|
|
44
57
|
export declare const nxDarkStyle: {
|
|
45
58
|
':root': {
|
|
@@ -83,6 +96,19 @@ export declare const nxDarkStyle: {
|
|
|
83
96
|
color: string;
|
|
84
97
|
transition: string;
|
|
85
98
|
};
|
|
99
|
+
code: {
|
|
100
|
+
backgroundColor: string;
|
|
101
|
+
color: string;
|
|
102
|
+
};
|
|
103
|
+
pre: {
|
|
104
|
+
backgroundColor: string;
|
|
105
|
+
color: string;
|
|
106
|
+
borderColor: string;
|
|
107
|
+
};
|
|
108
|
+
'pre code': {
|
|
109
|
+
backgroundColor: string;
|
|
110
|
+
color: string;
|
|
111
|
+
};
|
|
86
112
|
};
|
|
87
113
|
export declare function getNxStyle(mode: 'light' | 'dark'): {
|
|
88
114
|
':root': {
|
|
@@ -126,4 +152,17 @@ export declare function getNxStyle(mode: 'light' | 'dark'): {
|
|
|
126
152
|
color: string;
|
|
127
153
|
transition: string;
|
|
128
154
|
};
|
|
155
|
+
code: {
|
|
156
|
+
backgroundColor: string;
|
|
157
|
+
color: string;
|
|
158
|
+
};
|
|
159
|
+
pre: {
|
|
160
|
+
backgroundColor: string;
|
|
161
|
+
color: string;
|
|
162
|
+
borderColor: string;
|
|
163
|
+
};
|
|
164
|
+
'pre code': {
|
|
165
|
+
backgroundColor: string;
|
|
166
|
+
color: string;
|
|
167
|
+
};
|
|
129
168
|
};
|
|
@@ -36,25 +36,38 @@ export const nxLightStyle = {
|
|
|
36
36
|
'--focus-ring': '#5A5A5A',
|
|
37
37
|
},
|
|
38
38
|
body: {
|
|
39
|
-
backgroundColor: '
|
|
39
|
+
backgroundColor: '#FFFFFF',
|
|
40
40
|
color: '#1E1E1E',
|
|
41
41
|
transition: 'background-color 0.2s ease',
|
|
42
42
|
},
|
|
43
|
+
code: {
|
|
44
|
+
backgroundColor: '#F1F5F9',
|
|
45
|
+
color: '#0F172A',
|
|
46
|
+
},
|
|
47
|
+
pre: {
|
|
48
|
+
backgroundColor: '#F8FAFC',
|
|
49
|
+
color: '#0F172A',
|
|
50
|
+
borderColor: '#E2E8F0',
|
|
51
|
+
},
|
|
52
|
+
'pre code': {
|
|
53
|
+
backgroundColor: 'transparent',
|
|
54
|
+
color: 'inherit',
|
|
55
|
+
},
|
|
43
56
|
};
|
|
44
57
|
export const nxDarkStyle = {
|
|
45
58
|
':root': {
|
|
46
|
-
'--nx-ink': '#
|
|
47
|
-
'--nx-ink-logo': '#
|
|
48
|
-
'--nx-dusty': '#
|
|
49
|
-
'--nx-body': '#
|
|
50
|
-
'--nx-sign': '#
|
|
51
|
-
'--nx-ash': '#
|
|
52
|
-
'--nx-muted': '#
|
|
53
|
-
'--nx-fog': '#
|
|
59
|
+
'--nx-ink': '#FFFFFF',
|
|
60
|
+
'--nx-ink-logo': '#FFFFFF',
|
|
61
|
+
'--nx-dusty': '#F8FAFC',
|
|
62
|
+
'--nx-body': '#F8FAFC',
|
|
63
|
+
'--nx-sign': '#F1F5F9',
|
|
64
|
+
'--nx-ash': '#E2E8F0',
|
|
65
|
+
'--nx-muted': '#CBD5E1',
|
|
66
|
+
'--nx-fog': '#CBD5E1',
|
|
54
67
|
'--nx-parchment': '#111111',
|
|
55
68
|
'--nx-paper': '#1C1C1C',
|
|
56
69
|
'--nx-oat': '#4A4A4A',
|
|
57
|
-
'--nx-clay': '#
|
|
70
|
+
'--nx-clay': '#38BDF8',
|
|
58
71
|
'--nx-line': 'rgba(255, 255, 255, 0.16)',
|
|
59
72
|
'--nx-line-soft': 'rgba(255, 255, 255, 0.10)',
|
|
60
73
|
'--nx-glass': 'rgba(28, 28, 28, 0.72)',
|
|
@@ -75,14 +88,27 @@ export const nxDarkStyle = {
|
|
|
75
88
|
'--surface-footer': '#1C1C1C',
|
|
76
89
|
'--border-input': 'rgba(255, 255, 255, 0.22)',
|
|
77
90
|
'--border-input-hover': 'rgba(255, 255, 255, 0.32)',
|
|
78
|
-
'--border-input-focus': '#
|
|
79
|
-
'--focus-ring': '#
|
|
91
|
+
'--border-input-focus': '#FFFFFF',
|
|
92
|
+
'--focus-ring': '#FFFFFF',
|
|
80
93
|
},
|
|
81
94
|
body: {
|
|
82
|
-
backgroundColor: '
|
|
83
|
-
color: '#
|
|
95
|
+
backgroundColor: '#111111',
|
|
96
|
+
color: '#F8FAFC',
|
|
84
97
|
transition: 'background-color 0.2s ease',
|
|
85
98
|
},
|
|
99
|
+
code: {
|
|
100
|
+
backgroundColor: '#1E293B',
|
|
101
|
+
color: '#F8FAFC',
|
|
102
|
+
},
|
|
103
|
+
pre: {
|
|
104
|
+
backgroundColor: '#0F172A',
|
|
105
|
+
color: '#FFFFFF',
|
|
106
|
+
borderColor: '#334155',
|
|
107
|
+
},
|
|
108
|
+
'pre code': {
|
|
109
|
+
backgroundColor: 'transparent',
|
|
110
|
+
color: 'inherit',
|
|
111
|
+
},
|
|
86
112
|
};
|
|
87
113
|
export function getNxStyle(mode) {
|
|
88
114
|
return mode === 'dark' ? nxDarkStyle : nxLightStyle;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../types';
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,9 @@ export * from "./types";
|
|
|
2
2
|
export * from "./lib/utils";
|
|
3
3
|
export * from "./context";
|
|
4
4
|
export * from "./components";
|
|
5
|
+
export type { ButtonProps } from "./components/ui/Button";
|
|
6
|
+
export type { CardProps } from "./components/ui/Card";
|
|
7
|
+
export type { BashProps, BashCommand } from "./components/ui/Bash";
|
|
5
8
|
export { default as DesignSystemProvider } from "./design-system/components/DesignSystemProvider/DesignSystemProvider";
|
|
6
9
|
export { default as Heading } from "./design-system/components/headings/Heading/Heading";
|
|
7
10
|
export { default as Logo } from "./design-system/components/brand/Logo/Logo";
|
|
@@ -12,9 +15,8 @@ export { default as ListItemText } from "./design-system/components/lists/ListIt
|
|
|
12
15
|
export { default as ListSubheader } from "./design-system/components/lists/ListSubheader/ListSubheader";
|
|
13
16
|
export { default as Alert } from "./design-system/components/feedback/Alert/Alert";
|
|
14
17
|
export { default as Field } from "./design-system/components/feedback/Field/Field";
|
|
15
|
-
export type { AlertProps } from "./design-system/components/feedback/Alert/types";
|
|
16
|
-
export type { FieldProps } from "./design-system/components/feedback/Field/types";
|
|
17
18
|
export { default as NxButton } from "./design-system/components/buttons/Button/Button";
|
|
19
|
+
export { Button } from "./components/ui/Button";
|
|
18
20
|
export { default as IconButton } from "./design-system/components/buttons/IconButton/IconButton";
|
|
19
21
|
export { default as Breadcrumb } from "./design-system/components/navigation/Breadcrumb/Breadcrumb";
|
|
20
22
|
export { default as Share } from "./design-system/components/navigation/Share/Share";
|
|
@@ -24,6 +26,6 @@ export { default as Swatch } from "./design-system/components/surfaces/Swatch/Sw
|
|
|
24
26
|
export { default as SwatchGroup } from "./design-system/components/surfaces/SwatchGroup/SwatchGroup";
|
|
25
27
|
export { default as Icon, ICON_NAMES } from "./design-system/components/icons/Icon/Icon";
|
|
26
28
|
export { DesktopOnly, MobileOnly, useIsMobile } from "./design-system/components/responsive/Viewport/Viewport";
|
|
29
|
+
export { Waiting, type WaitingProps } from "./components/navigation/Waiting";
|
|
27
30
|
export { createAppTheme } from "./styles/theme";
|
|
28
31
|
export type { IconName, IconProps } from "./design-system/components/icons/Icon/Icon";
|
|
29
|
-
export type { DesignSystemMode, DesignSystemProviderProps, DesignSystemThemeConfig } from "./design-system/types";
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,7 @@ export { default as ListSubheader } from "./design-system/components/lists/ListS
|
|
|
13
13
|
export { default as Alert } from "./design-system/components/feedback/Alert/Alert";
|
|
14
14
|
export { default as Field } from "./design-system/components/feedback/Field/Field";
|
|
15
15
|
export { default as NxButton } from "./design-system/components/buttons/Button/Button";
|
|
16
|
+
export { Button } from "./components/ui/Button";
|
|
16
17
|
export { default as IconButton } from "./design-system/components/buttons/IconButton/IconButton";
|
|
17
18
|
export { default as Breadcrumb } from "./design-system/components/navigation/Breadcrumb/Breadcrumb";
|
|
18
19
|
export { default as Share } from "./design-system/components/navigation/Share/Share";
|
|
@@ -22,4 +23,5 @@ export { default as Swatch } from "./design-system/components/surfaces/Swatch/Sw
|
|
|
22
23
|
export { default as SwatchGroup } from "./design-system/components/surfaces/SwatchGroup/SwatchGroup";
|
|
23
24
|
export { default as Icon, ICON_NAMES } from "./design-system/components/icons/Icon/Icon";
|
|
24
25
|
export { DesktopOnly, MobileOnly, useIsMobile } from "./design-system/components/responsive/Viewport/Viewport";
|
|
26
|
+
export { Waiting } from "./components/navigation/Waiting";
|
|
25
27
|
export { createAppTheme } from "./styles/theme";
|
package/dist/styles/globals.css
CHANGED
|
@@ -11,15 +11,92 @@
|
|
|
11
11
|
--primary-hover: #011f52;
|
|
12
12
|
--secondary: #0F172A;
|
|
13
13
|
--foreground: #0f172a;
|
|
14
|
-
--foreground-muted: #
|
|
14
|
+
--foreground-muted: #475569;
|
|
15
15
|
--card-bg: #ffffff;
|
|
16
16
|
--card-border: rgba(1, 40, 103, 0.1);
|
|
17
|
+
--surface-input: #ffffff;
|
|
18
|
+
--surface-input-border: #cbd5e1;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
+
:where(.dark, .dark *),
|
|
22
|
+
.dark,
|
|
23
|
+
[data-theme="dark"] {
|
|
24
|
+
--background: #0F172A;
|
|
25
|
+
--background-secondary: #1E293B;
|
|
26
|
+
--paper: #1E293B;
|
|
27
|
+
--primary: #ffffff;
|
|
28
|
+
--primary-hover: #38BDF8;
|
|
29
|
+
--secondary: #F8FAFC;
|
|
30
|
+
--foreground: #F8FAFC;
|
|
31
|
+
--foreground-muted: #CBD5E1;
|
|
32
|
+
--card-bg: #1E293B;
|
|
33
|
+
--card-border: rgba(255, 255, 255, 0.12);
|
|
34
|
+
--surface-input: #1E293B;
|
|
35
|
+
--surface-input-border: rgba(255, 255, 255, 0.22);
|
|
21
36
|
}
|
|
22
37
|
|
|
38
|
+
input[type="text"],
|
|
39
|
+
input[type="email"],
|
|
40
|
+
input[type="password"],
|
|
41
|
+
input[type="search"],
|
|
42
|
+
input[type="tel"],
|
|
43
|
+
input[type="url"],
|
|
44
|
+
input[type="number"],
|
|
45
|
+
input[type="date"],
|
|
46
|
+
input[type="datetime-local"],
|
|
47
|
+
input[type="month"],
|
|
48
|
+
input[type="time"],
|
|
49
|
+
input[type="week"],
|
|
50
|
+
textarea,
|
|
51
|
+
select {
|
|
52
|
+
background-color: var(--surface-input, #ffffff);
|
|
53
|
+
color: var(--foreground);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:where(.dark, .dark *) input[type="text"],
|
|
57
|
+
:where(.dark, .dark *) input[type="email"],
|
|
58
|
+
:where(.dark, .dark *) input[type="password"],
|
|
59
|
+
:where(.dark, .dark *) input[type="search"],
|
|
60
|
+
:where(.dark, .dark *) input[type="tel"],
|
|
61
|
+
:where(.dark, .dark *) input[type="url"],
|
|
62
|
+
:where(.dark, .dark *) input[type="number"],
|
|
63
|
+
:where(.dark, .dark *) input[type="date"],
|
|
64
|
+
:where(.dark, .dark *) input[type="datetime-local"],
|
|
65
|
+
:where(.dark, .dark *) input[type="month"],
|
|
66
|
+
:where(.dark, .dark *) input[type="time"],
|
|
67
|
+
:where(.dark, .dark *) input[type="week"],
|
|
68
|
+
:where(.dark, .dark *) textarea,
|
|
69
|
+
:where(.dark, .dark *) select,
|
|
70
|
+
.dark input[type="text"],
|
|
71
|
+
.dark input[type="email"],
|
|
72
|
+
.dark input[type="password"],
|
|
73
|
+
.dark input[type="search"],
|
|
74
|
+
.dark input[type="tel"],
|
|
75
|
+
.dark input[type="url"],
|
|
76
|
+
.dark input[type="number"],
|
|
77
|
+
.dark input[type="date"],
|
|
78
|
+
.dark input[type="datetime-local"],
|
|
79
|
+
.dark input[type="month"],
|
|
80
|
+
.dark input[type="time"],
|
|
81
|
+
.dark input[type="week"],
|
|
82
|
+
.dark textarea,
|
|
83
|
+
.dark select {
|
|
84
|
+
background-color: var(--surface-input, #1e293b);
|
|
85
|
+
color: var(--foreground);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
h1, h2, h3, h4, h5, h6,
|
|
89
|
+
:where(.dark, .dark *) h1,
|
|
90
|
+
:where(.dark, .dark *) h2,
|
|
91
|
+
:where(.dark, .dark *) h3,
|
|
92
|
+
:where(.dark, .dark *) h4,
|
|
93
|
+
:where(.dark, .dark *) h5,
|
|
94
|
+
:where(.dark, .dark *) h6 {
|
|
95
|
+
font-weight: 400 !important;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
23
100
|
html {
|
|
24
101
|
scroll-behavior: smooth;
|
|
25
102
|
color-scheme: light;
|
|
@@ -65,6 +142,43 @@
|
|
|
65
142
|
font-size: inherit;
|
|
66
143
|
}
|
|
67
144
|
|
|
145
|
+
:where(.dark, .dark *) code,
|
|
146
|
+
.dark code {
|
|
147
|
+
background-color: #1e293b;
|
|
148
|
+
color: #f1f5f9;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
:where(.dark, .dark *) pre,
|
|
152
|
+
.dark pre {
|
|
153
|
+
background-color: #0f172a;
|
|
154
|
+
color: #f8fafc;
|
|
155
|
+
border-color: #334155;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
:where(.dark, .dark *) pre code,
|
|
159
|
+
.dark pre code {
|
|
160
|
+
background-color: transparent;
|
|
161
|
+
color: inherit;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@media (prefers-color-scheme: dark) {
|
|
165
|
+
:root:not(.light) code {
|
|
166
|
+
background-color: #1e293b;
|
|
167
|
+
color: #f1f5f9;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
:root:not(.light) pre {
|
|
171
|
+
background-color: #0f172a;
|
|
172
|
+
color: #f8fafc;
|
|
173
|
+
border-color: #334155;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
:root:not(.light) pre code {
|
|
177
|
+
background-color: transparent;
|
|
178
|
+
color: inherit;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
68
182
|
::selection {
|
|
69
183
|
background-color: #012867;
|
|
70
184
|
color: #ffffff;
|
|
@@ -89,3 +203,36 @@
|
|
|
89
203
|
::-webkit-scrollbar-thumb:hover {
|
|
90
204
|
background: #94a3b8;
|
|
91
205
|
}
|
|
206
|
+
|
|
207
|
+
:where(.dark, .dark *) ::-webkit-scrollbar-track,
|
|
208
|
+
.dark ::-webkit-scrollbar-track,
|
|
209
|
+
.dark::-webkit-scrollbar-track {
|
|
210
|
+
background: #0f172a;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
:where(.dark, .dark *) ::-webkit-scrollbar-thumb,
|
|
214
|
+
.dark ::-webkit-scrollbar-thumb,
|
|
215
|
+
.dark::-webkit-scrollbar-thumb {
|
|
216
|
+
background: #334155;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
:where(.dark, .dark *) ::-webkit-scrollbar-thumb:hover,
|
|
220
|
+
.dark ::-webkit-scrollbar-thumb:hover,
|
|
221
|
+
.dark::-webkit-scrollbar-thumb:hover {
|
|
222
|
+
background: #475569;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
@media (prefers-color-scheme: dark) {
|
|
226
|
+
:root:not(.light) ::-webkit-scrollbar-track {
|
|
227
|
+
background: #0f172a;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
:root:not(.light) ::-webkit-scrollbar-thumb {
|
|
231
|
+
background: #334155;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
:root:not(.light) ::-webkit-scrollbar-thumb:hover {
|
|
235
|
+
background: #475569;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|