@datalayer/design 1.0.10 → 1.0.12

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.
@@ -25,10 +25,13 @@ export { SvgEventsHero } from './SvgEventsHero';
25
25
  export { SvgStarsHero } from './SvgStarsHero';
26
26
  export { SvgSpitfire } from './SvgSpitfire';
27
27
  export { SvgBlackSnake } from './SvgBlackSnake';
28
+ export { SvgKingKong } from './SvgKingKong';
29
+ export { SvgKingKong2 } from './SvgKingKong2';
28
30
  export { SvgLinesLogo } from './SvgLinesLogo';
29
31
  export { SvgOrganizationsAtScale } from './SvgOrganizationsAtScale';
30
32
  export { SvgIndividualsAndTeams } from './SvgIndividualsAndTeams';
31
33
  export { SvgAgentsHero } from './SvgAgentsHero';
34
+ export { SvgHorizonHero } from './SvgHorizonHero';
32
35
  export { SvgLibraryHero } from './SvgLibraryHero';
33
36
  export { SvgEarthHero } from './SvgEarthHero';
34
37
  export { SvgDaytonaStartupGrid } from './SvgDaytonaStartupGrid';
@@ -67,5 +70,6 @@ export { SvgTermsHero } from './SvgTermsHero';
67
70
  export { SvgNotFound } from './SvgNotFound';
68
71
  export { SvgUnauthorized } from './SvgUnauthorized';
69
72
  export { SvgOg } from './SvgOg';
73
+ export { SvgPoppy1_0 } from './SvgPoppy1_0';
70
74
  export { SvgOgStacked } from './SvgOgStacked';
71
75
  export { SvgLightHouse } from './SvgLightHouse';
package/lib/svg/index.js CHANGED
@@ -30,10 +30,13 @@ export { SvgEventsHero } from './SvgEventsHero';
30
30
  export { SvgStarsHero } from './SvgStarsHero';
31
31
  export { SvgSpitfire } from './SvgSpitfire';
32
32
  export { SvgBlackSnake } from './SvgBlackSnake';
33
+ export { SvgKingKong } from './SvgKingKong';
34
+ export { SvgKingKong2 } from './SvgKingKong2';
33
35
  export { SvgLinesLogo } from './SvgLinesLogo';
34
36
  export { SvgOrganizationsAtScale } from './SvgOrganizationsAtScale';
35
37
  export { SvgIndividualsAndTeams } from './SvgIndividualsAndTeams';
36
38
  export { SvgAgentsHero } from './SvgAgentsHero';
39
+ export { SvgHorizonHero } from './SvgHorizonHero';
37
40
  export { SvgLibraryHero } from './SvgLibraryHero';
38
41
  export { SvgEarthHero } from './SvgEarthHero';
39
42
  export { SvgDaytonaStartupGrid } from './SvgDaytonaStartupGrid';
@@ -66,5 +69,6 @@ export { SvgTermsHero } from './SvgTermsHero';
66
69
  export { SvgNotFound } from './SvgNotFound';
67
70
  export { SvgUnauthorized } from './SvgUnauthorized';
68
71
  export { SvgOg } from './SvgOg';
72
+ export { SvgPoppy1_0 } from './SvgPoppy1_0';
69
73
  export { SvgOgStacked } from './SvgOgStacked';
70
74
  export { SvgLightHouse } from './SvgLightHouse';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datalayer/design",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "license": "CC-BY-4.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -28,11 +28,10 @@
28
28
  "watch:lib": "npm run copy:svg-assets && tsc -w"
29
29
  },
30
30
  "dependencies": {
31
- "@datalayer/icons-all": "^0.0.1",
32
31
  "@datalayer/icons-react": "^1.0.0",
33
- "@datalayer/primer-addons": "^1.0.23",
32
+ "@datalayer/primer-addons": "^1.0.48",
34
33
  "@primer/css": "^21.5.1",
35
- "@primer/octicons-react": "^19.35.0",
34
+ "@primer/octicons-react": "^19.42.0",
36
35
  "@primer/primitives": "^10.7.0",
37
36
  "@primer/react": "^37.31.0",
38
37
  "@types/gif.js": "^0.2.5",
@@ -1,38 +0,0 @@
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>): React.JSX.Element;
25
- type FootnoteProps = BaseProps<HTMLElement>;
26
- declare function Footnotes({ children, className }: PropsWithChildren<FootnoteProps>): React.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>>) => React.JSX.Element;
37
- };
38
- export {};
@@ -1,162 +0,0 @@
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
- // React 19 types element props as `unknown`; these footnotes are Text
63
- // elements whose own props are spread last as an escape hatch.
64
- if (!React.isValidElement(child)) {
65
- return child;
66
- }
67
- if (child.type && child.type === Text) {
68
- return React.cloneElement(child, {
69
- as: 'p',
70
- variant: 'muted',
71
- size: 200,
72
- className: clsx(styles['Footer__terms-item'], child.props.className),
73
- ...child.props, // allow overrides for escape hatch
74
- });
75
- }
76
- });
77
- return (_jsx("section", { className: styles.Footer__container, children: _jsx("div", { className: clsx(styles.Footer__terms, className), children: styledChildren }) }));
78
- }
79
- function SocialLogomarks({ socialLinks, logoHref }) {
80
- const { colorMode } = useTheme();
81
- const socialLinkData = [
82
- {
83
- name: 'bluesky',
84
- fullName: 'Bluesky',
85
- url: 'https://bsky.app/profile/datalayer.ai',
86
- icon: 'https://assets.datalayer.tech/logos-social-grey/bluesky.svg',
87
- iconWidth: 24,
88
- iconHeight: 24
89
- },
90
- {
91
- name: 'github',
92
- fullName: 'GitHub',
93
- url: 'https://github.com/datalayer',
94
- icon: 'https://assets.datalayer.tech/logos-social-grey/github.svg',
95
- iconWidth: 20,
96
- iconHeight: 20
97
- },
98
- {
99
- name: 'linkedin',
100
- fullName: 'LinkedIn',
101
- url: 'https://www.linkedin.com/company/datalayer',
102
- icon: 'https://assets.datalayer.tech/logos-social-grey/linkedin.svg',
103
- iconWidth: 19,
104
- iconHeight: 18
105
- },
106
- {
107
- name: 'youtube',
108
- fullName: 'YouTube',
109
- url: 'https://www.youtube.com/@datalayer',
110
- icon: 'https://assets.datalayer.tech/logos-social-grey/youtube.svg',
111
- iconWidth: 23,
112
- iconHeight: 16
113
- },
114
- /*
115
- {
116
- name: 'facebook',
117
- fullName: 'Facebook',
118
- url: 'https://www.facebook.com/GitHub',
119
- icon: 'https://github.githubassets.com/images/modules/site/icons/footer/facebook.svg',
120
- iconWidth: 18,
121
- iconHeight: 18
122
- },
123
- {
124
- name: 'twitch',
125
- fullName: 'Twitch',
126
- url: 'https://www.twitch.tv/github',
127
- icon: 'https://github.githubassets.com/images/modules/site/icons/footer/twitch.svg',
128
- iconWidth: 18,
129
- iconHeight: 18
130
- },
131
- {
132
- name: 'tiktok',
133
- fullName: 'TikTok',
134
- url: 'https://www.tiktok.com/@github',
135
- icon: 'https://github.githubassets.com/images/modules/site/icons/footer/tiktok.svg',
136
- iconWidth: 18,
137
- iconHeight: 18
138
- }
139
- */
140
- ];
141
- const renderLink = (link) => {
142
- 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));
143
- };
144
- 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) => {
145
- if (socialLinks && !socialLinks.includes(link.name)) {
146
- return null;
147
- }
148
- return renderLink(link);
149
- }) })) : (_jsx(_Fragment, {}))] }) }) }));
150
- }
151
- const Link = ({ as, children, ...rest }) => {
152
- const Component = as || 'a';
153
- 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 }) }));
154
- };
155
- /**
156
- * Use MinimalFooter to render a global footer on all GitHub pages.
157
- * @see https://primer.style/brand/components/MinimalFooter
158
- */
159
- export const MinimalFooter = Object.assign(Root, {
160
- Footnotes,
161
- Link
162
- });
@@ -1,33 +0,0 @@
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
- }) => React.JSX.Element;
10
- type RedlineBackgroundProps = {
11
- height?: number;
12
- hasBorder?: boolean;
13
- };
14
- export declare function RedlineBackground({ height, hasBorder, ...rest }: PropsWithChildren<RedlineBackgroundProps>): React.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 {};
@@ -1,19 +0,0 @@
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
- }
@@ -1 +0,0 @@
1
- export * from './MinimalFooter';
@@ -1 +0,0 @@
1
- export * from './MinimalFooter';