@datalayer/design 1.0.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/LICENSE +23 -0
- package/README.md +5 -0
- package/lib/App.d.ts +2 -0
- package/lib/App.js +25 -0
- package/lib/DatalayerIcons.d.ts +2 -0
- package/lib/DatalayerIcons.js +169 -0
- package/lib/footer/MinimalFooter.d.ts +38 -0
- package/lib/footer/MinimalFooter.js +160 -0
- package/lib/footer/component-helpers.d.ts +33 -0
- package/lib/footer/component-helpers.js +19 -0
- package/lib/footer/index.d.ts +1 -0
- package/lib/footer/index.js +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/layout/SiteLayout.d.ts +2 -0
- package/lib/layout/SiteLayout.js +89 -0
- package/lib/main.d.ts +1 -0
- package/lib/main.js +10 -0
- package/lib/pages/HomePage.d.ts +2 -0
- package/lib/pages/HomePage.js +50 -0
- package/lib/pages/IconsPage.d.ts +2 -0
- package/lib/pages/IconsPage.js +8 -0
- package/lib/pages/SvgPage.d.ts +2 -0
- package/lib/pages/SvgPage.js +592 -0
- package/lib/svg/SvgAboutHero.d.ts +26 -0
- package/lib/svg/SvgAboutHero.js +76 -0
- package/lib/svg/SvgAgentRuntimes.d.ts +7 -0
- package/lib/svg/SvgAgentRuntimes.js +26 -0
- package/lib/svg/SvgAgentsHero.d.ts +13 -0
- package/lib/svg/SvgAgentsHero.js +55 -0
- package/lib/svg/SvgAgentsHomeHero.d.ts +4 -0
- package/lib/svg/SvgAgentsHomeHero.js +194 -0
- package/lib/svg/SvgBlackSnake.d.ts +5 -0
- package/lib/svg/SvgBlackSnake.js +76 -0
- package/lib/svg/SvgBlogHero.d.ts +7 -0
- package/lib/svg/SvgBlogHero.js +18 -0
- package/lib/svg/SvgCareersHero.d.ts +23 -0
- package/lib/svg/SvgCareersHero.js +97 -0
- package/lib/svg/SvgCellArtifact.d.ts +8 -0
- package/lib/svg/SvgCellArtifact.js +15 -0
- package/lib/svg/SvgChangelogHero.d.ts +23 -0
- package/lib/svg/SvgChangelogHero.js +128 -0
- package/lib/svg/SvgCommunityHero.d.ts +5 -0
- package/lib/svg/SvgCommunityHero.js +170 -0
- package/lib/svg/SvgContactHero.d.ts +11 -0
- package/lib/svg/SvgContactHero.js +19 -0
- package/lib/svg/SvgDataset.d.ts +5 -0
- package/lib/svg/SvgDataset.js +13 -0
- package/lib/svg/SvgDiscord.d.ts +12 -0
- package/lib/svg/SvgDiscord.js +20 -0
- package/lib/svg/SvgDocumentArtifact.d.ts +8 -0
- package/lib/svg/SvgDocumentArtifact.js +15 -0
- package/lib/svg/SvgEarthHero.d.ts +8 -0
- package/lib/svg/SvgEarthHero.js +23 -0
- package/lib/svg/SvgEventsHero.d.ts +16 -0
- package/lib/svg/SvgEventsHero.js +42 -0
- package/lib/svg/SvgFastA2ADonation.d.ts +5 -0
- package/lib/svg/SvgFastA2ADonation.js +13 -0
- package/lib/svg/SvgIndividualsAndTeams.d.ts +11 -0
- package/lib/svg/SvgIndividualsAndTeams.js +26 -0
- package/lib/svg/SvgIntegrationsHero.d.ts +22 -0
- package/lib/svg/SvgIntegrationsHero.js +67 -0
- package/lib/svg/SvgInvites.d.ts +11 -0
- package/lib/svg/SvgInvites.js +19 -0
- package/lib/svg/SvgJoin.d.ts +19 -0
- package/lib/svg/SvgJoin.js +95 -0
- package/lib/svg/SvgJoinConfirm.d.ts +16 -0
- package/lib/svg/SvgJoinConfirm.js +34 -0
- package/lib/svg/SvgJupyterEmbed.d.ts +7 -0
- package/lib/svg/SvgJupyterEmbed.js +15 -0
- package/lib/svg/SvgJupyterMcp.d.ts +16 -0
- package/lib/svg/SvgJupyterMcp.js +27 -0
- package/lib/svg/SvgLines.d.ts +16 -0
- package/lib/svg/SvgLines.js +28 -0
- package/lib/svg/SvgLinesLogo.d.ts +10 -0
- package/lib/svg/SvgLinesLogo.js +59 -0
- package/lib/svg/SvgLoginHero.d.ts +12 -0
- package/lib/svg/SvgLoginHero.js +23 -0
- package/lib/svg/SvgNotFound.d.ts +12 -0
- package/lib/svg/SvgNotFound.js +23 -0
- package/lib/svg/SvgNotebookArtifact.d.ts +8 -0
- package/lib/svg/SvgNotebookArtifact.js +15 -0
- package/lib/svg/SvgOrganizationsAtScale.d.ts +11 -0
- package/lib/svg/SvgOrganizationsAtScale.js +19 -0
- package/lib/svg/SvgPixel1.d.ts +5 -0
- package/lib/svg/SvgPixel1.js +85 -0
- package/lib/svg/SvgPixel2.d.ts +5 -0
- package/lib/svg/SvgPixel2.js +71 -0
- package/lib/svg/SvgPricingHero.d.ts +11 -0
- package/lib/svg/SvgPricingHero.js +19 -0
- package/lib/svg/SvgPrivacyHero.d.ts +11 -0
- package/lib/svg/SvgPrivacyHero.js +22 -0
- package/lib/svg/SvgPublication.d.ts +5 -0
- package/lib/svg/SvgPublication.js +13 -0
- package/lib/svg/SvgRadar.d.ts +8 -0
- package/lib/svg/SvgRadar.js +92 -0
- package/lib/svg/SvgResearchHero.d.ts +17 -0
- package/lib/svg/SvgResearchHero.js +61 -0
- package/lib/svg/SvgSpitfire.d.ts +11 -0
- package/lib/svg/SvgSpitfire.js +79 -0
- package/lib/svg/SvgStarsHero.d.ts +15 -0
- package/lib/svg/SvgStarsHero.js +50 -0
- package/lib/svg/SvgTermsHero.d.ts +11 -0
- package/lib/svg/SvgTermsHero.js +22 -0
- package/lib/svg/SvgTutorialsHero.d.ts +16 -0
- package/lib/svg/SvgTutorialsHero.js +27 -0
- package/lib/svg/SvgUnauthorized.d.ts +12 -0
- package/lib/svg/SvgUnauthorized.js +23 -0
- package/lib/svg/SvgUsecasesHero.d.ts +16 -0
- package/lib/svg/SvgUsecasesHero.js +46 -0
- package/lib/svg/SvgVSCodeExtension.d.ts +7 -0
- package/lib/svg/SvgVSCodeExtension.js +15 -0
- package/lib/svg/gallery.d.ts +2 -0
- package/lib/svg/gallery.js +49 -0
- package/lib/svg/images/datalayer-1.2.0-black-snake.svg +1 -0
- package/lib/svg/images/datalayer-1.3.0-spitfire.svg +1 -0
- package/lib/svg/index.d.ts +45 -0
- package/lib/svg/index.js +50 -0
- package/package.json +50 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Copyright (c) 2021-2023 Datalayer, Inc.
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
Contains source code taken from https://github.com/tailwindlabs/heroicons under MIT License
|
package/README.md
ADDED
package/lib/App.d.ts
ADDED
package/lib/App.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
import { BaseStyles } from '@primer/react';
|
|
4
|
+
import { ThemedProvider, useThemeStore } from '@datalayer/primer-addons';
|
|
5
|
+
import { BrowserRouter, Navigate, Route, Routes } from 'react-router-dom';
|
|
6
|
+
import { SiteLayout } from './layout/SiteLayout';
|
|
7
|
+
import { HomePage } from './pages/HomePage';
|
|
8
|
+
import { IconsPage } from './pages/IconsPage';
|
|
9
|
+
import { SvgPage } from './pages/SvgPage';
|
|
10
|
+
export function App() {
|
|
11
|
+
// Apply default theme/colormode (earth + system/auto) when no persisted
|
|
12
|
+
// value exists in localStorage. The store persists under 'datalayer-theme'.
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
if (typeof window === 'undefined')
|
|
15
|
+
return;
|
|
16
|
+
const persisted = window.localStorage.getItem('datalayer-theme');
|
|
17
|
+
if (persisted)
|
|
18
|
+
return;
|
|
19
|
+
const { setTheme, setColorMode } = useThemeStore.getState();
|
|
20
|
+
setTheme('earth');
|
|
21
|
+
setColorMode('auto');
|
|
22
|
+
}, []);
|
|
23
|
+
return (_jsx(ThemedProvider, { useStore: useThemeStore, children: _jsx(BaseStyles, { children: _jsx(BrowserRouter, { children: _jsx(Routes, { children: _jsxs(Route, { element: _jsx(SiteLayout, {}), children: [_jsx(Route, { path: "/", element: _jsx(HomePage, {}) }), _jsx(Route, { path: "/icons", element: _jsx(IconsPage, {}) }), _jsx(Route, { path: "/svg", element: _jsx(SvgPage, {}) }), _jsx(Route, { path: "/svg/:name", element: _jsx(SvgPage, {}) }), _jsx(Route, { path: "*", element: _jsx(Navigate, { to: "/", replace: true }) })] }) }) }) }) }));
|
|
24
|
+
}
|
|
25
|
+
export default App;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect, useRef } from 'react';
|
|
3
|
+
import { ThemeProvider, BaseStyles, IconButton, Text, Box, Link, TextInput, Tooltip, Flash, Heading, Button, } from '@primer/react';
|
|
4
|
+
import { SearchIcon } from '@primer/octicons-react';
|
|
5
|
+
import { useColorPalette, useThemeStore, getColorPalette, } from '@datalayer/primer-addons';
|
|
6
|
+
import { toPng, toSvg } from 'html-to-image';
|
|
7
|
+
import styled from 'styled-components';
|
|
8
|
+
import * as dataIcons from '@datalayer/icons-react';
|
|
9
|
+
import * as eggsIcons from '@datalayer/icons-react/eggs';
|
|
10
|
+
const SpanStyle = styled.span `
|
|
11
|
+
span {
|
|
12
|
+
margin-right: 25px;
|
|
13
|
+
},
|
|
14
|
+
`;
|
|
15
|
+
const BorderStyle = styled.span `
|
|
16
|
+
svg {
|
|
17
|
+
border-color: black;
|
|
18
|
+
border: 1px dashed;
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
const IconLine = (props) => {
|
|
22
|
+
const { name, icon } = props;
|
|
23
|
+
const palette = useColorPalette();
|
|
24
|
+
const { theme } = useThemeStore();
|
|
25
|
+
const inversePreviewMode = palette.isLight ? 'night' : 'day';
|
|
26
|
+
const inversePalette = getColorPalette(theme, palette.isLight ? 'dark' : 'light');
|
|
27
|
+
const refColored = useRef(null);
|
|
28
|
+
const refDayColoredStyled = useRef(null);
|
|
29
|
+
const refNightColredStyled = useRef(null);
|
|
30
|
+
const refDayStyled = useRef(null);
|
|
31
|
+
const refNightStyled = useRef(null);
|
|
32
|
+
const downloadPNG = (e, ref, type) => {
|
|
33
|
+
e.preventDefault();
|
|
34
|
+
if (ref.current === null) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
toPng(ref.current, { cacheBust: true, width: 1000, height: 1000 })
|
|
38
|
+
.then((dataUrl) => {
|
|
39
|
+
const link = document.createElement('a');
|
|
40
|
+
link.download = `${name}_${type}.png`;
|
|
41
|
+
link.href = dataUrl;
|
|
42
|
+
link.click();
|
|
43
|
+
})
|
|
44
|
+
.catch((err) => {
|
|
45
|
+
console.log(err);
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
const downloadSVG = (e, ref) => {
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
if (ref.current === null) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
toSvg(ref.current, { cacheBust: true, })
|
|
54
|
+
.then((dataUrl) => {
|
|
55
|
+
const link = document.createElement('a');
|
|
56
|
+
link.download = `${name}.svg`;
|
|
57
|
+
link.href = dataUrl;
|
|
58
|
+
link.click();
|
|
59
|
+
})
|
|
60
|
+
.catch((err) => {
|
|
61
|
+
console.log(err);
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
const IconComponent = icon;
|
|
65
|
+
const StyledIcon = () => _jsx(IconComponent, {});
|
|
66
|
+
const ColoredStyledIcon = () => _jsx(IconComponent, { colored: true });
|
|
67
|
+
const iconLine = (_jsxs(Box, { alignItems: "center", justifyContent: "space-between", children: [_jsx(SpanStyle, { children: _jsx("span", { children: _jsx(IconComponent, { colored: true, size: "large", ref: refColored }) }) }), _jsx(BorderStyle, { children: _jsx(SpanStyle, { children: _jsx("span", { children: _jsx(IconComponent, { colored: true, size: "large" }) }) }) }), _jsx(BorderStyle, { children: _jsx(SpanStyle, { children: _jsx("span", { children: _jsx(IconComponent, { size: "large" }) }) }) }), _jsx(BorderStyle, { children: _jsx(Box, { sx: { display: 'inline-flex', mr: '25px' }, children: _jsx(ThemeProvider, { colorMode: inversePreviewMode, children: _jsx(BaseStyles, { style: { display: 'inline-flex' }, children: _jsx(Box, { as: "span", sx: {
|
|
68
|
+
display: 'inline-flex',
|
|
69
|
+
alignItems: 'center',
|
|
70
|
+
justifyContent: 'center',
|
|
71
|
+
p: 1,
|
|
72
|
+
borderRadius: 2,
|
|
73
|
+
backgroundColor: inversePalette.bg,
|
|
74
|
+
border: '1px solid',
|
|
75
|
+
borderColor: inversePalette.primary,
|
|
76
|
+
'--datalayer-icon-fg': inversePalette.primary,
|
|
77
|
+
}, children: _jsx(IconComponent, { colored: true, size: "large", inverseColormode: inversePreviewMode === 'night' ? 'dark' : 'light' }) }) }) }) }) }), _jsx(ThemeProvider, { colorMode: "day", children: _jsx(IconButton, { "aria-labelledby": "", size: "medium", sx: { marginRight: '15px' }, icon: ColoredStyledIcon, ref: refDayColoredStyled, onClick: (e) => downloadPNG(e, refDayColoredStyled, 'day_colored') }) }), _jsx(ThemeProvider, { colorMode: "night", children: _jsx(IconButton, { "aria-labelledby": "", size: "medium", sx: { marginRight: '15px' }, icon: ColoredStyledIcon, ref: refNightColredStyled, onClick: (e) => downloadPNG(e, refNightColredStyled, 'night_colored') }) }), _jsx(ThemeProvider, { colorMode: "day", children: _jsx(IconButton, { "aria-labelledby": "", size: "medium", sx: { marginRight: '15px' }, icon: StyledIcon, ref: refDayStyled, onClick: (e) => downloadPNG(e, refDayStyled, 'day') }) }), _jsx(ThemeProvider, { colorMode: "night", children: _jsx(IconButton, { "aria-labelledby": "", size: "medium", sx: { marginRight: '15px' }, icon: StyledIcon, ref: refNightStyled, onClick: (e) => downloadPNG(e, refNightStyled, 'night') }) }), _jsxs(BorderStyle, { children: [_jsx(SpanStyle, { children: _jsx("span", { children: ColoredStyledIcon() }) }), _jsx(SpanStyle, { children: _jsx("span", { children: StyledIcon() }) })] }), _jsx(SpanStyle, { children: _jsx(Link, { href: "", title: "Download PNG", onClick: (e) => downloadPNG(e, refColored, 'plain'), children: _jsx("span", { children: "PNG" }) }) }), _jsx(SpanStyle, { children: _jsx(Link, { href: "", title: "Download SVG", onClick: (e) => downloadSVG(e, refColored), children: _jsx("span", { children: "SVG" }) }) }), _jsx(SpanStyle, { children: _jsx("span", { children: name }) }), _jsx(Box, { m: 3 })] }));
|
|
78
|
+
return iconLine;
|
|
79
|
+
};
|
|
80
|
+
const IconSummary = (props) => {
|
|
81
|
+
const { name, icon } = props;
|
|
82
|
+
const IconComponent = icon;
|
|
83
|
+
const SummaryIcon = () => (_jsx(IconComponent, { colored: true, size: "medium" }));
|
|
84
|
+
return (_jsx(Box, { mr: 1, children: _jsx(Tooltip, { "aria-label": name, text: name, children: _jsx(IconButton, { "aria-label": name, icon: SummaryIcon, variant: "invisible", size: "small", sx: {
|
|
85
|
+
border: '1px solid',
|
|
86
|
+
borderColor: 'border.default',
|
|
87
|
+
borderRadius: 2,
|
|
88
|
+
} }) }) }));
|
|
89
|
+
};
|
|
90
|
+
const SummaryIcons = (props) => {
|
|
91
|
+
const { names, icons } = props;
|
|
92
|
+
return (_jsx(_Fragment, { children: _jsx(Box, { sx: { display: 'flex' }, children: names.map((name) => {
|
|
93
|
+
return _jsx(IconSummary, { name: name, icon: icons[name] }, name);
|
|
94
|
+
}) }) }));
|
|
95
|
+
};
|
|
96
|
+
const DetailledIcons = (props) => {
|
|
97
|
+
const { names, icons } = props;
|
|
98
|
+
return (_jsx(_Fragment, { children: names.map((name) => {
|
|
99
|
+
return _jsx(IconLine, { name: name, icon: icons[name] }, name);
|
|
100
|
+
}) }));
|
|
101
|
+
};
|
|
102
|
+
const DatalayerIcons = () => {
|
|
103
|
+
const palette = useColorPalette();
|
|
104
|
+
const [filter, setFilter] = useState('');
|
|
105
|
+
// const [debouncedFilter, setDebouncedFilter] = useState('');
|
|
106
|
+
const [icons, setIcons] = useState(dataIcons);
|
|
107
|
+
const [names, setNames] = useState(Object.keys(dataIcons));
|
|
108
|
+
useEffect(() => {
|
|
109
|
+
const queryParams = new URLSearchParams(window.location.search);
|
|
110
|
+
const q = queryParams.get("q");
|
|
111
|
+
q ? setFilter(q) : setFilter('');
|
|
112
|
+
// q ? setDebouncedFilter(q) : setDebouncedFilter('');
|
|
113
|
+
const eggs = queryParams.get("eggs");
|
|
114
|
+
if (eggs !== null) {
|
|
115
|
+
setIcons(eggsIcons);
|
|
116
|
+
setNames(Object.keys(eggsIcons));
|
|
117
|
+
}
|
|
118
|
+
}, []);
|
|
119
|
+
const changeUrl = (title, url) => {
|
|
120
|
+
const obj = {
|
|
121
|
+
Title: title,
|
|
122
|
+
Url: url,
|
|
123
|
+
};
|
|
124
|
+
history.pushState(obj, obj.Title, obj.Url);
|
|
125
|
+
};
|
|
126
|
+
const filterIcons = (filter) => {
|
|
127
|
+
if (filter === '') {
|
|
128
|
+
setNames(Object.keys(icons));
|
|
129
|
+
changeUrl(document.title, window.location.protocol + "//" + window.location.host);
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
const f = filter.toLocaleLowerCase();
|
|
133
|
+
const filteredNames = Object.keys(icons).filter((name => name.toLowerCase().includes(f)));
|
|
134
|
+
setNames(filteredNames);
|
|
135
|
+
changeUrl(document.title, window.location.protocol + "//" + window.location.host + "?q=" + f);
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
const handleFilterChange = (event) => {
|
|
139
|
+
setFilter(event.target.value);
|
|
140
|
+
filterIcons(event.target.value);
|
|
141
|
+
};
|
|
142
|
+
useEffect(() => {
|
|
143
|
+
if (filter)
|
|
144
|
+
filterIcons(filter);
|
|
145
|
+
}, [filter]);
|
|
146
|
+
/*
|
|
147
|
+
const [_, __] = useDebounce(
|
|
148
|
+
() => {
|
|
149
|
+
setDebouncedFilter(filter);
|
|
150
|
+
filterIcons();
|
|
151
|
+
},
|
|
152
|
+
0,
|
|
153
|
+
[filter]
|
|
154
|
+
);
|
|
155
|
+
*/
|
|
156
|
+
return (_jsx(_Fragment, { children: _jsxs(Box, { sx: {
|
|
157
|
+
maxWidth: 1200,
|
|
158
|
+
mx: 'auto',
|
|
159
|
+
p: 4,
|
|
160
|
+
'--datalayer-icon-fg': palette.primary,
|
|
161
|
+
}, children: [_jsx(Box, { sx: { display: 'flex', alignItems: 'flex-start', justifyContent: 'space-between', gap: 3, flexWrap: 'wrap' }, children: _jsxs(Box, { children: [_jsx(Heading, { as: "h1", sx: { m: 0, mb: 2, fontSize: 5 }, children: "React icons for data products" }), _jsxs(Text, { sx: { color: 'fg.muted' }, children: ["\u2630 \uD83C\uDF89 ", Object.keys(icons).length, " curated icons for data product design."] })] }) }), _jsxs(Flash, { variant: "warning", sx: { mt: 3 }, children: ["Some icons may not be 100% compatible with existing design guidelines. Please open an issue on", ' ', _jsx(Link, { href: "https://github.com/datalayer/icons/issues", target: "_blank", children: "github.com/datalayer/icons/issues" }), "."] }), _jsxs(Box, { mt: 3, mb: 3, children: [_jsxs(Text, { as: "p", sx: { m: 0 }, children: ["Click on PNG or SVG to download an icon. Filter by name to inspect a single icon. Sources are in the", ' ', _jsx(Link, { href: "https://github.com/datalayer/icons", target: "_blank", children: "datalayer/icons repository" }), "."] }), _jsx(Text, { as: "p", sx: { mt: 2, mb: 0, color: 'fg.muted' }, children: "Preview columns configuration: (1) themed colored icon, (2) themed colored icon with border, (3) themed plain icon, (4) themed previewed in inverse colormode." }), _jsxs(Text, { as: "p", sx: { mt: 1, mb: 0, color: 'fg.muted' }, children: ["Open", ' ', _jsx(Link, { href: "https://github.com/datalayer/icons/blob/main/README.md", target: "_blank", children: "code example" }), ' ', "for a concrete usage snippet."] })] }), _jsxs(Box, { sx: { display: 'flex', gap: 2, alignItems: 'center', flexWrap: 'wrap', mb: 3 }, children: [_jsx(Box, { sx: { flex: '1 1 340px', minWidth: 260 }, children: _jsx(TextInput, { block: true, value: filter, leadingVisual: SearchIcon, placeholder: "Search icons", autoFocus: true, onChange: handleFilterChange, sx: {
|
|
162
|
+
border: '1px solid',
|
|
163
|
+
borderColor: 'border.default',
|
|
164
|
+
} }) }), _jsx(Button, { onClick: () => filterIcons(filter), children: "Apply" })] }), (filter === '') ?
|
|
165
|
+
_jsx(DetailledIcons, { names: names, icons: icons })
|
|
166
|
+
:
|
|
167
|
+
_jsx(SummaryIcons, { names: names, icons: icons })] }) }));
|
|
168
|
+
};
|
|
169
|
+
export default DatalayerIcons;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
import { BaseProps } from './component-helpers';
|
|
3
|
+
/**
|
|
4
|
+
* Design tokens
|
|
5
|
+
*/
|
|
6
|
+
import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/footer/colors-with-modes.css';
|
|
7
|
+
export declare const MinimalFooterSocialLinks: readonly ["twitter", "github", "linkedin"];
|
|
8
|
+
type SocialLinks = typeof MinimalFooterSocialLinks[number];
|
|
9
|
+
export type MinimalFooterProps = {
|
|
10
|
+
/**
|
|
11
|
+
* An array of social links to be displayed in the footer.
|
|
12
|
+
*/
|
|
13
|
+
socialLinks?: SocialLinks[] | false;
|
|
14
|
+
/**
|
|
15
|
+
* The href for the GitHub logo.
|
|
16
|
+
*/
|
|
17
|
+
logoHref?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The copyright statement to be displayed in the footer.
|
|
20
|
+
* If not provided, the copyright statement will be the default GitHub copyright statement.
|
|
21
|
+
*/
|
|
22
|
+
copyrightStatement?: string | React.ReactElement;
|
|
23
|
+
} & BaseProps<HTMLElement>;
|
|
24
|
+
declare function Root({ className, children, copyrightStatement, logoHref, socialLinks, ...rest }: PropsWithChildren<MinimalFooterProps>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
type FootnoteProps = BaseProps<HTMLElement>;
|
|
26
|
+
declare function Footnotes({ children, className }: PropsWithChildren<FootnoteProps>): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
type LinkProps<C extends React.ElementType> = BaseProps<C> & {
|
|
28
|
+
as?: 'a' | 'button';
|
|
29
|
+
} & Omit<React.ComponentPropsWithoutRef<C>, keyof C>;
|
|
30
|
+
/**
|
|
31
|
+
* Use MinimalFooter to render a global footer on all GitHub pages.
|
|
32
|
+
* @see https://primer.style/brand/components/MinimalFooter
|
|
33
|
+
*/
|
|
34
|
+
export declare const MinimalFooter: typeof Root & {
|
|
35
|
+
Footnotes: typeof Footnotes;
|
|
36
|
+
Link: <C extends React.ElementType = "a">({ as, children, ...rest }: PropsWithChildren<LinkProps<C>>) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
};
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { DatalayerGreenIcon } from '@datalayer/icons-react';
|
|
5
|
+
import { Stack, Text, useTheme } from '@primer/react-brand';
|
|
6
|
+
/**
|
|
7
|
+
* Design tokens
|
|
8
|
+
*/
|
|
9
|
+
import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/footer/colors-with-modes.css';
|
|
10
|
+
/**
|
|
11
|
+
* Main Stylesheet (as a CSS Module)
|
|
12
|
+
*/
|
|
13
|
+
import styles from './MinimalFooter.module.css';
|
|
14
|
+
export const MinimalFooterSocialLinks = [
|
|
15
|
+
'twitter',
|
|
16
|
+
'github',
|
|
17
|
+
'linkedin',
|
|
18
|
+
// 'youtube',
|
|
19
|
+
// 'facebook',
|
|
20
|
+
// 'twitch',
|
|
21
|
+
// 'tiktok'
|
|
22
|
+
];
|
|
23
|
+
function Root({ className, children, copyrightStatement, logoHref = 'https://datalayer.io', socialLinks, ...rest }) {
|
|
24
|
+
// find Footer.Footnotes children
|
|
25
|
+
const footerFootnoteChild = () => {
|
|
26
|
+
const footnotes = React.Children.toArray(children).find(child => {
|
|
27
|
+
if (!React.isValidElement(child)) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
if (child.type && child.type === Footnotes) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
return footnotes;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Renders a maximum of 5 links.
|
|
38
|
+
* If more than 5 links are required, we should encourage usage of Footer instead.
|
|
39
|
+
*/
|
|
40
|
+
const LinkChildren = React.Children.toArray(children)
|
|
41
|
+
.filter(child => {
|
|
42
|
+
// if not valid element
|
|
43
|
+
if (React.isValidElement(child)) {
|
|
44
|
+
if (child.type === Link) {
|
|
45
|
+
return child;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
.slice(0, 5);
|
|
50
|
+
const currentYear = new Date().getFullYear();
|
|
51
|
+
return (_jsxs("footer", { className: clsx(styles.Footer, className), ...rest, children: [footerFootnoteChild(), _jsx(SocialLogomarks, { socialLinks: socialLinks, logoHref: logoHref }), _jsx("section", { children: _jsx("div", { className: styles['Footer__legal-and-links'], children: _jsx("div", { className: styles['Footer__container'], children: _jsxs(Stack, { direction: { narrow: 'vertical', regular: 'horizontal' }, gap: "normal", padding: "none", justifyContent: "space-between", children: [_jsx(Stack, { padding: "none", gap: "condensed", justifyContent: {
|
|
52
|
+
narrow: 'center',
|
|
53
|
+
regular: 'flex-end'
|
|
54
|
+
}, direction: {
|
|
55
|
+
narrow: 'vertical',
|
|
56
|
+
regular: 'horizontal'
|
|
57
|
+
}, className: styles['Footer__links'], children: _jsx(_Fragment, { children: LinkChildren }) }), _jsx(Text, { as: "p", size: "300", variant: "muted", className: styles['Footer__copyright'], children: copyrightStatement ? copyrightStatement : `\u00A9 ${currentYear} Datalayer, Inc. All rights reserved.` })] }) }) }) })] }));
|
|
58
|
+
}
|
|
59
|
+
function Footnotes({ children, className }) {
|
|
60
|
+
const styledChildren = React.Children.map(children, child => {
|
|
61
|
+
// if not valid element
|
|
62
|
+
if (!React.isValidElement(child)) {
|
|
63
|
+
return child;
|
|
64
|
+
}
|
|
65
|
+
if (child.type && child.type === Text) {
|
|
66
|
+
return React.cloneElement(child, {
|
|
67
|
+
as: 'p',
|
|
68
|
+
variant: 'muted',
|
|
69
|
+
size: 200,
|
|
70
|
+
className: clsx(styles['Footer__terms-item'], child.props.className),
|
|
71
|
+
...child.props // allow overrides for escape hatch
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
return (_jsx("section", { className: styles.Footer__container, children: _jsx("div", { className: clsx(styles.Footer__terms, className), children: styledChildren }) }));
|
|
76
|
+
}
|
|
77
|
+
function SocialLogomarks({ socialLinks, logoHref }) {
|
|
78
|
+
const { colorMode } = useTheme();
|
|
79
|
+
const socialLinkData = [
|
|
80
|
+
{
|
|
81
|
+
name: 'bluesky',
|
|
82
|
+
fullName: 'Bluesky',
|
|
83
|
+
url: 'https://bsky.app/profile/datalayer.ai',
|
|
84
|
+
icon: 'https://assets.datalayer.tech/logos-social-grey/bluesky.svg',
|
|
85
|
+
iconWidth: 24,
|
|
86
|
+
iconHeight: 24
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'github',
|
|
90
|
+
fullName: 'GitHub',
|
|
91
|
+
url: 'https://github.com/datalayer',
|
|
92
|
+
icon: 'https://assets.datalayer.tech/logos-social-grey/github.svg',
|
|
93
|
+
iconWidth: 20,
|
|
94
|
+
iconHeight: 20
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: 'linkedin',
|
|
98
|
+
fullName: 'LinkedIn',
|
|
99
|
+
url: 'https://www.linkedin.com/company/datalayer',
|
|
100
|
+
icon: 'https://assets.datalayer.tech/logos-social-grey/linkedin.svg',
|
|
101
|
+
iconWidth: 19,
|
|
102
|
+
iconHeight: 18
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: 'youtube',
|
|
106
|
+
fullName: 'YouTube',
|
|
107
|
+
url: 'https://www.youtube.com/@datalayer',
|
|
108
|
+
icon: 'https://assets.datalayer.tech/logos-social-grey/youtube.svg',
|
|
109
|
+
iconWidth: 23,
|
|
110
|
+
iconHeight: 16
|
|
111
|
+
},
|
|
112
|
+
/*
|
|
113
|
+
{
|
|
114
|
+
name: 'facebook',
|
|
115
|
+
fullName: 'Facebook',
|
|
116
|
+
url: 'https://www.facebook.com/GitHub',
|
|
117
|
+
icon: 'https://github.githubassets.com/images/modules/site/icons/footer/facebook.svg',
|
|
118
|
+
iconWidth: 18,
|
|
119
|
+
iconHeight: 18
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: 'twitch',
|
|
123
|
+
fullName: 'Twitch',
|
|
124
|
+
url: 'https://www.twitch.tv/github',
|
|
125
|
+
icon: 'https://github.githubassets.com/images/modules/site/icons/footer/twitch.svg',
|
|
126
|
+
iconWidth: 18,
|
|
127
|
+
iconHeight: 18
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: 'tiktok',
|
|
131
|
+
fullName: 'TikTok',
|
|
132
|
+
url: 'https://www.tiktok.com/@github',
|
|
133
|
+
icon: 'https://github.githubassets.com/images/modules/site/icons/footer/tiktok.svg',
|
|
134
|
+
iconWidth: 18,
|
|
135
|
+
iconHeight: 18
|
|
136
|
+
}
|
|
137
|
+
*/
|
|
138
|
+
];
|
|
139
|
+
const renderLink = (link) => {
|
|
140
|
+
return (_jsx("li", { children: _jsxs("a", { href: link.url, "data-analytics-event": `{"category":"Footer","action":"go to ${link.fullName}","label":"text:${link.name}"}`, children: [_jsx("img", { className: styles['Footer__social-icon'], src: link.icon, height: link.iconHeight, width: link.iconWidth, loading: "lazy", decoding: "async", alt: "" }), _jsxs("span", { className: "visually-hidden", children: ["GitHub on ", link.fullName] })] }) }, link.name));
|
|
141
|
+
};
|
|
142
|
+
return (_jsx("section", { className: clsx(styles['Footer__logomarks']), children: _jsx("div", { className: styles['Footer__container'], children: _jsxs(Stack, { alignItems: "center", direction: { narrow: 'vertical', regular: 'horizontal' }, gap: "normal", padding: "none", justifyContent: "space-between", children: [_jsx("div", { children: _jsx("a", { href: logoHref, "aria-label": "Go to Datalayer homepage", children: _jsx(DatalayerGreenIcon, { size: "medium", colored: true }) }) }), socialLinks !== false ? (_jsx("ul", { className: styles['Footer__social-links'], children: socialLinkData.map((link) => {
|
|
143
|
+
if (socialLinks && !socialLinks.includes(link.name)) {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
return renderLink(link);
|
|
147
|
+
}) })) : (_jsx(_Fragment, {}))] }) }) }));
|
|
148
|
+
}
|
|
149
|
+
const Link = ({ as, children, ...rest }) => {
|
|
150
|
+
const Component = as || 'a';
|
|
151
|
+
return (_jsx(Component, { className: styles['Footer__link'], "data-analytics-event": rest['href'] ? `{"category":"Footer","action":"go to ${rest['href']}","label":"text:${children}"}` : undefined, ...rest, children: _jsx(Text, { variant: "muted", size: "300", children: children }) }));
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* Use MinimalFooter to render a global footer on all GitHub pages.
|
|
155
|
+
* @see https://primer.style/brand/components/MinimalFooter
|
|
156
|
+
*/
|
|
157
|
+
export const MinimalFooter = Object.assign(Root, {
|
|
158
|
+
Footnotes,
|
|
159
|
+
Link
|
|
160
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { Ref, PropsWithChildren } from 'react';
|
|
2
|
+
import { AnimateProps } from '@primer/react-brand';
|
|
3
|
+
/**
|
|
4
|
+
* Layout
|
|
5
|
+
*/
|
|
6
|
+
export declare const Container: ({ children, style }: {
|
|
7
|
+
children: React.ReactElement[] | React.ReactElement;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
type RedlineBackgroundProps = {
|
|
11
|
+
height?: number;
|
|
12
|
+
hasBorder?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare function RedlineBackground({ height, hasBorder, ...rest }: PropsWithChildren<RedlineBackgroundProps>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
/**
|
|
16
|
+
* Base Types
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Component helper type to be extended by component types, e.g.:
|
|
20
|
+
* type CustomComponentProps = BaseProps<HTMLDivElement> & { ... }
|
|
21
|
+
*
|
|
22
|
+
* Example use:
|
|
23
|
+
* const CustomComponent = forwardRef<HTMLDivElement, CustomComponentProps>(({className, ...props}, ref) => { ... })
|
|
24
|
+
* // OR:
|
|
25
|
+
* const CustomComponent = forwardRef(({className: CustomComponentProps, ...props}, ref: Ref<HTMLDivElement>) => { ... })
|
|
26
|
+
*/
|
|
27
|
+
export type BaseProps<T> = {
|
|
28
|
+
className?: string;
|
|
29
|
+
id?: string;
|
|
30
|
+
ref?: Ref<T>;
|
|
31
|
+
animate?: AnimateProps;
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Layout
|
|
4
|
+
*/
|
|
5
|
+
export const Container = ({ children, style }) => _jsx("div", { style: { maxWidth: 1024, margin: '0 auto', ...style }, children: children });
|
|
6
|
+
export function RedlineBackground({ height, hasBorder = true, ...rest }) {
|
|
7
|
+
return (_jsx("div", { style: {
|
|
8
|
+
display: 'flex',
|
|
9
|
+
overflow: 'hidden',
|
|
10
|
+
border: hasBorder ? '1px solid var(--base-color-scale-red-2)' : undefined,
|
|
11
|
+
backgroundImage: 'linear-gradient(45deg, var(--base-color-scale-red-0) 12.5%, hsla(var(--base-color-scale-red-2-hsl) / 50%) 12.5%, hsla(var(--base-color-scale-red-2-hsl) / 50%) 50%, var(--base-color-scale-red-0) 50%, var(--base-color-scale-red-0) 62.5%, hsla(var(--base-color-scale-red-2-hsl) / 50%) 62.5%, hsla(var(--base-color-scale-red-2-hsl) / 50%) 100%)',
|
|
12
|
+
backgroundSize: '5.66px 5.66px',
|
|
13
|
+
WebkitBoxPack: 'center',
|
|
14
|
+
justifyContent: 'center',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
width: '100%',
|
|
17
|
+
height
|
|
18
|
+
}, ...rest }));
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MinimalFooter';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MinimalFooter';
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './svg';
|
package/lib/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './svg';
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { Box, Link, Text } from '@primer/react';
|
|
4
|
+
import { AppearanceControlsWithStore, useThemeStore } from '@datalayer/primer-addons';
|
|
5
|
+
import { DatalayerLogoText } from '@datalayer/primer-addons';
|
|
6
|
+
import { Link as RouterLink, Outlet, useLocation, useSearchParams } from 'react-router-dom';
|
|
7
|
+
const NAV_ITEMS = [
|
|
8
|
+
{ to: '/svg', label: 'SVG' },
|
|
9
|
+
{ to: '/icons', label: 'Icons' },
|
|
10
|
+
];
|
|
11
|
+
export function SiteLayout() {
|
|
12
|
+
const location = useLocation();
|
|
13
|
+
const [searchParams] = useSearchParams();
|
|
14
|
+
const { colorMode, theme } = useThemeStore();
|
|
15
|
+
const [logoSize, setLogoSize] = useState(26);
|
|
16
|
+
// Sync ?theme=...&colormode=... URL params into the theme store so the
|
|
17
|
+
// appearance is fully controllable from the URL (handy for screenshots and
|
|
18
|
+
// sharing styled pages).
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
const themeParam = searchParams.get('theme');
|
|
21
|
+
const colorModeParam = searchParams.get('colormode') ?? searchParams.get('colorMode');
|
|
22
|
+
const { setTheme, setColorMode } = useThemeStore.getState();
|
|
23
|
+
if (themeParam) {
|
|
24
|
+
setTheme(themeParam);
|
|
25
|
+
}
|
|
26
|
+
if (colorModeParam) {
|
|
27
|
+
const normalized = colorModeParam.toLowerCase();
|
|
28
|
+
// Map common synonyms (night -> dark, day -> light, system -> auto).
|
|
29
|
+
const map = {
|
|
30
|
+
night: 'dark',
|
|
31
|
+
dark: 'dark',
|
|
32
|
+
day: 'light',
|
|
33
|
+
light: 'light',
|
|
34
|
+
system: 'auto',
|
|
35
|
+
auto: 'auto',
|
|
36
|
+
};
|
|
37
|
+
const resolved = map[normalized];
|
|
38
|
+
if (resolved) {
|
|
39
|
+
setColorMode(resolved);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}, [searchParams]);
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
const applyLogoSize = () => {
|
|
45
|
+
const width = window.innerWidth;
|
|
46
|
+
if (width < 544) {
|
|
47
|
+
setLogoSize(20);
|
|
48
|
+
}
|
|
49
|
+
else if (width < 768) {
|
|
50
|
+
setLogoSize(22);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
setLogoSize(26);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
applyLogoSize();
|
|
57
|
+
window.addEventListener('resize', applyLogoSize);
|
|
58
|
+
return () => {
|
|
59
|
+
window.removeEventListener('resize', applyLogoSize);
|
|
60
|
+
};
|
|
61
|
+
}, []);
|
|
62
|
+
return (_jsxs(Box, { sx: { minHeight: '100vh', display: 'flex', flexDirection: 'column', bg: 'canvas.default' }, children: [_jsx(Box, { as: "header", sx: {
|
|
63
|
+
borderBottom: '1px solid',
|
|
64
|
+
borderColor: 'border.default',
|
|
65
|
+
px: 4,
|
|
66
|
+
py: 3,
|
|
67
|
+
position: 'sticky',
|
|
68
|
+
top: 0,
|
|
69
|
+
bg: 'canvas.default',
|
|
70
|
+
zIndex: 10,
|
|
71
|
+
}, children: _jsxs(Box, { sx: { maxWidth: 1200, mx: 'auto', display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 3, flexWrap: 'wrap' }, children: [_jsx(Box, { sx: { display: 'flex', alignItems: 'center', minHeight: 28 }, children: _jsx(Link, { as: RouterLink, to: "/", "aria-label": "Go to home", sx: {
|
|
72
|
+
display: 'inline-flex',
|
|
73
|
+
alignItems: 'center',
|
|
74
|
+
textDecoration: 'none',
|
|
75
|
+
':hover': { textDecoration: 'none' },
|
|
76
|
+
}, children: _jsx(DatalayerLogoText, { size: logoSize, variant: theme, colorMode: colorMode }) }) }), _jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 3, flexWrap: 'wrap' }, children: [_jsx(Box, { as: "nav", sx: { display: 'flex', gap: 2 }, children: NAV_ITEMS.map((item) => {
|
|
77
|
+
const active = location.pathname === item.to || (item.to !== '/' && location.pathname.startsWith(item.to));
|
|
78
|
+
return (_jsx(Link, { as: RouterLink, to: item.to, sx: {
|
|
79
|
+
color: active ? 'accent.fg' : 'fg.default',
|
|
80
|
+
textDecoration: 'none',
|
|
81
|
+
fontWeight: active ? 600 : 400,
|
|
82
|
+
px: 2,
|
|
83
|
+
py: 1,
|
|
84
|
+
borderRadius: 2,
|
|
85
|
+
':hover': { bg: 'canvas.subtle' },
|
|
86
|
+
}, children: item.label }, item.to));
|
|
87
|
+
}) }), _jsx(AppearanceControlsWithStore, { useStore: useThemeStore })] })] }) }), _jsx(Box, { as: "main", sx: { flex: 1 }, children: _jsx(Outlet, {}) }), _jsx(Box, { as: "footer", sx: { borderTop: '1px solid', borderColor: 'border.default', px: 4, py: 4, bg: 'canvas.subtle' }, children: _jsxs(Box, { sx: { maxWidth: 1200, mx: 'auto', display: 'flex', justifyContent: 'space-between', gap: 3, flexWrap: 'wrap' }, children: [_jsx(Text, { sx: { color: 'fg.muted', fontSize: 1 }, children: "Datalayer Design" }), _jsxs(Box, { sx: { display: 'flex', gap: 3 }, children: [_jsx(Link, { href: "https://datalayer.ai", target: "_blank", children: "Datalayer" }), _jsx(Link, { href: "https://datalayer.ai/docs", target: "_blank", children: "Docs" }), _jsx(Link, { href: "https://github.com/datalayer", target: "_blank", children: "GitHub" })] })] }) })] }));
|
|
88
|
+
}
|
|
89
|
+
export default SiteLayout;
|
package/lib/main.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/main.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { StrictMode } from 'react';
|
|
3
|
+
import { createRoot } from 'react-dom/client';
|
|
4
|
+
import { setupPrimerPortals } from '@datalayer/primer-addons/lib/utils/Portals';
|
|
5
|
+
import App from './App';
|
|
6
|
+
setupPrimerPortals();
|
|
7
|
+
const div = document.createElement('div');
|
|
8
|
+
document.body.appendChild(div);
|
|
9
|
+
const root = createRoot(div);
|
|
10
|
+
root.render(_jsx(StrictMode, { children: _jsx(App, {}) }));
|