@theguild/components 9.3.0-alpha-20250122173213-4d2341aa8350e2c0195023d8f0a07fe585bd4ddf → 9.3.0-alpha-20250122214727-52fd01b0eaa2b794b8dd2948661ed2525cad940d

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.
@@ -3,10 +3,9 @@ export { ReactComponent as ArchDecoration, ReactComponent as ArchDecorationGradi
3
3
  import 'react';
4
4
  import 'nextra/icons';
5
5
 
6
- type DecorationIsolationProps = React.HTMLAttributes<HTMLDivElement>;
7
6
  /**
8
7
  * Decorations must be isolated, as clicking id links scrolls the container with overflow: hidden.
9
8
  */
10
- declare function DecorationIsolation(props: DecorationIsolationProps): react_jsx_runtime.JSX.Element;
9
+ declare function DecorationIsolation(props: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
11
10
 
12
- export { DecorationIsolation, type DecorationIsolationProps };
11
+ export { DecorationIsolation };
@@ -1,18 +1,19 @@
1
- import { ReactNode, FC } from 'react';
2
- export { HeroLogo } from './hero-logo.mjs';
3
- export { HeroDecorationFromLogo } from './hero-decoration-from-logo.mjs';
4
- import 'react/jsx-runtime';
5
- import '../decorations/index.mjs';
6
- import '../../logos/angular.mjs';
7
- import 'nextra/icons';
1
+ import { ReactElement, ReactNode, FC } from 'react';
8
2
 
9
3
  interface HeroProps {
10
4
  className?: string;
11
5
  heading: string;
12
6
  text: string;
13
7
  checkmarks: string[];
8
+ top?: {
9
+ logo: ReactElement<{
10
+ className?: string;
11
+ fill?: string;
12
+ }>;
13
+ } | {
14
+ children: ReactNode;
15
+ };
14
16
  children?: ReactNode;
15
- top?: ReactNode;
16
17
  }
17
18
  declare const Hero: FC<HeroProps>;
18
19
 
@@ -1,34 +1,112 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { cloneElement, useId } from "react";
2
3
  import { cn } from "../../cn";
3
4
  import { Heading } from "../heading";
4
5
  import { CheckIcon } from "../icons";
5
- import { HeroGradientDefs } from "./hero-gradient-defs";
6
- import { HeroLogo } from "./hero-logo";
7
- import { HeroDecorationFromLogo } from "./hero-decoration-from-logo";
8
6
  const Hero = (props) => {
7
+ const gradientWhiteId = useId();
8
+ const gradientWhiteId2 = useId();
9
+ const greenBgId = useId();
9
10
  return /* @__PURE__ */ jsxs(
10
11
  "div",
11
12
  {
12
13
  className: cn(
13
- "relative isolate flex max-w-[90rem] flex-col items-center justify-center gap-6 overflow-hidden rounded-3xl bg-blue-400 px-4 py-6 max-sm:mt-2 sm:py-12 md:gap-8 lg:py-24",
14
+ "relative isolate mx-4 flex max-w-[90rem] flex-col items-center justify-center gap-6 overflow-hidden rounded-3xl bg-blue-400 px-4 py-6 max-sm:mt-2 sm:py-12 md:mx-6 md:gap-8 lg:py-24",
14
15
  props.className
15
16
  ),
16
17
  children: [
17
- props.top,
18
+ /* @__PURE__ */ jsx("div", { className: "relative", children: props.top && ("logo" in props.top ? /* @__PURE__ */ jsxs(Fragment, { children: [
19
+ cloneElement(props.top.logo, {
20
+ fill: `url(#${gradientWhiteId})`,
21
+ className: cn(
22
+ "absolute inset-1/2 size-1/2 -translate-x-1/2 -translate-y-1/2",
23
+ props.top.logo.props.className
24
+ )
25
+ }),
26
+ /* @__PURE__ */ jsxs(
27
+ "svg",
28
+ {
29
+ width: "96",
30
+ height: "96",
31
+ viewBox: "0 0 96 96",
32
+ fill: "none",
33
+ xmlns: "http://www.w3.org/2000/svg",
34
+ children: [
35
+ /* @__PURE__ */ jsx("rect", { width: "96", height: "96", rx: "24", fill: `url(#${greenBgId})` }),
36
+ /* @__PURE__ */ jsx(
37
+ "rect",
38
+ {
39
+ x: "0.5",
40
+ y: "0.5",
41
+ width: "95",
42
+ height: "95",
43
+ rx: "23.5",
44
+ stroke: `url(#${gradientWhiteId})`
45
+ }
46
+ ),
47
+ /* @__PURE__ */ jsx("path", { d: "M57.0264 32.1652H48.9577L53.8032 27.3197L48.4855 22L43.1658 27.3197L48.0114 32.1652H39.9427C38.9042 32.1652 37.9069 32.5786 37.1721 33.3134L23 47.4855L28.3197 52.8052L45.715 35.4099C47.2452 33.8797 49.7258 33.8797 51.2561 35.4099L68.6513 52.8052L73.971 47.4855L59.797 33.3114C59.0622 32.5767 58.0649 32.1632 57.0264 32.1632V32.1652ZM48.4854 63.3623L43.1665 68.6811L48.4854 74L53.8042 68.6811L48.4854 63.3623ZM39.9446 52.8054H48.4855H48.4894H57.0303C58.0688 52.8054 59.0661 53.2188 59.8008 53.9536L63.89 58.0428L58.5704 63.3625L51.258 56.0501C49.7277 54.5198 47.2472 54.5198 45.7169 56.0501L38.4045 63.3625L33.0848 58.0428L37.174 53.9536C37.9088 53.2188 38.9061 52.8054 39.9446 52.8054Z" }),
48
+ /* @__PURE__ */ jsxs("defs", { children: [
49
+ /* @__PURE__ */ jsxs(
50
+ "linearGradient",
51
+ {
52
+ id: greenBgId,
53
+ x1: "0",
54
+ y1: "0",
55
+ x2: "96",
56
+ y2: "96",
57
+ gradientUnits: "userSpaceOnUse",
58
+ children: [
59
+ /* @__PURE__ */ jsx("stop", { stopColor: "#3B736A" }),
60
+ /* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#15433C" })
61
+ ]
62
+ }
63
+ ),
64
+ /* @__PURE__ */ jsxs(
65
+ "linearGradient",
66
+ {
67
+ id: gradientWhiteId,
68
+ x1: "0",
69
+ y1: "0",
70
+ x2: "96",
71
+ y2: "96",
72
+ gradientUnits: "userSpaceOnUse",
73
+ children: [
74
+ /* @__PURE__ */ jsx("stop", { stopColor: "white", stopOpacity: "0.8" }),
75
+ /* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "white", stopOpacity: "0.4" })
76
+ ]
77
+ }
78
+ ),
79
+ /* @__PURE__ */ jsxs(
80
+ "linearGradient",
81
+ {
82
+ id: gradientWhiteId2,
83
+ x1: "1",
84
+ y1: "2",
85
+ x2: "161",
86
+ y2: "171",
87
+ gradientUnits: "userSpaceOnUse",
88
+ children: [
89
+ /* @__PURE__ */ jsx("stop", { stopColor: "white", stopOpacity: "0.1" }),
90
+ /* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "white", stopOpacity: "0.5" })
91
+ ]
92
+ }
93
+ )
94
+ ] })
95
+ ]
96
+ }
97
+ )
98
+ ] }) : props.top.children) }),
18
99
  /* @__PURE__ */ jsx(Heading, { as: "h1", size: "xl", className: "mx-auto max-w-3xl text-balance text-center", children: props.heading }),
19
100
  /* @__PURE__ */ jsx("p", { className: "mx-auto w-[512px] max-w-[80%] text-center leading-6 text-green-800", children: props.text }),
20
101
  /* @__PURE__ */ jsx("ul", { className: "mx-auto flex list-none gap-x-6 gap-y-2 text-sm font-medium max-md:flex-col", children: props.checkmarks.map((text) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-2", children: [
21
102
  /* @__PURE__ */ jsx(CheckIcon, { className: "text-green-800" }),
22
103
  text
23
104
  ] }, text)) }),
24
- /* @__PURE__ */ jsx("div", { className: "flex w-full justify-center gap-2 px-0.5 max-sm:flex-col sm:gap-4", children: props.children }),
25
- /* @__PURE__ */ jsx(HeroGradientDefs, {})
105
+ /* @__PURE__ */ jsx("div", { className: "flex w-full justify-center gap-2 px-0.5 max-sm:flex-col sm:gap-4", children: props.children })
26
106
  ]
27
107
  }
28
108
  );
29
109
  };
30
110
  export {
31
- Hero,
32
- HeroDecorationFromLogo,
33
- HeroLogo
111
+ Hero
34
112
  };
@@ -20,7 +20,7 @@ export { HiveFooter } from './hive-footer/index.mjs';
20
20
  export { ToolsAndLibrariesCards } from './tools-and-libraries-cards/index.mjs';
21
21
  export { Hero } from './hero/index.mjs';
22
22
  export { AncillaryProductCard, MainProductCard, ProductCard, ProductCardProps } from './product-card/index.mjs';
23
- export { DecorationIsolation, DecorationIsolationProps } from './decorations/index.mjs';
23
+ export { DecorationIsolation } from './decorations/index.mjs';
24
24
  export { CallToAction, CallToActionProps } from './call-to-action.mjs';
25
25
  export { CookiesConsent, CookiesConsentProps } from './cookies-consent.mjs';
26
26
  export { Heading, HeadingProps } from './heading.mjs';
@@ -43,8 +43,6 @@ import 'next/image';
43
43
  import 'next/link';
44
44
  import 'react-player';
45
45
  import 'react/jsx-runtime';
46
- import './hero/hero-logo.mjs';
47
- import './hero/hero-decoration-from-logo.mjs';
48
46
  import '../products.mjs';
49
47
  import '@giscus/react';
50
48
  import './faq/attach-page-faq-schema.mjs';
package/dist/index.d.mts CHANGED
@@ -23,7 +23,7 @@ export { HiveFooter } from './components/hive-footer/index.mjs';
23
23
  export { ToolsAndLibrariesCards } from './components/tools-and-libraries-cards/index.mjs';
24
24
  export { Hero } from './components/hero/index.mjs';
25
25
  export { AncillaryProductCard, MainProductCard, ProductCard, ProductCardProps } from './components/product-card/index.mjs';
26
- export { DecorationIsolation, DecorationIsolationProps } from './components/decorations/index.mjs';
26
+ export { DecorationIsolation } from './components/decorations/index.mjs';
27
27
  export { CallToAction, CallToActionProps } from './components/call-to-action.mjs';
28
28
  export { CookiesConsent, CookiesConsentProps } from './components/cookies-consent.mjs';
29
29
  export { Heading, HeadingProps } from './components/heading.mjs';
@@ -49,8 +49,6 @@ import 'react';
49
49
  import 'url';
50
50
  import 'next/image';
51
51
  import 'react/jsx-runtime';
52
- import './components/hero/hero-logo.mjs';
53
- import './components/hero/hero-decoration-from-logo.mjs';
54
52
  import '@giscus/react';
55
53
  import './components/faq/attach-page-faq-schema.mjs';
56
54
  import 'next/link';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theguild/components",
3
- "version": "9.3.0-alpha-20250122173213-4d2341aa8350e2c0195023d8f0a07fe585bd4ddf",
3
+ "version": "9.3.0-alpha-20250122214727-52fd01b0eaa2b794b8dd2948661ed2525cad940d",
4
4
  "repository": {
5
5
  "url": "https://github.com/the-guild-org/docs",
6
6
  "directory": "packages/components"
@@ -1,12 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactElement } from 'react';
3
- import { DecorationIsolationProps } from '../decorations/index.mjs';
4
- import '../../logos/angular.mjs';
5
- import 'nextra/icons';
6
-
7
- interface HeroDecorationFromLogoProps extends DecorationIsolationProps {
8
- logo: ReactElement;
9
- }
10
- declare function HeroDecorationFromLogo({ logo, ...rest }: HeroDecorationFromLogoProps): react_jsx_runtime.JSX.Element;
11
-
12
- export { HeroDecorationFromLogo, type HeroDecorationFromLogoProps };
@@ -1,32 +0,0 @@
1
- import { jsxs } from "react/jsx-runtime";
2
- import { cloneElement } from "react";
3
- import { cn } from "../../cn";
4
- import { DecorationIsolation } from "../decorations";
5
- import { GRADIENT_WHITE_2_ID, GRADIENT_WHITE_ID } from "./hero-gradient-ids";
6
- function HeroDecorationFromLogo({ logo, ...rest }) {
7
- return /* @__PURE__ */ jsxs(DecorationIsolation, { ...rest, className: cn("-z-10", rest.className), children: [
8
- cloneElement(logo, {
9
- className: cn(
10
- "absolute stroke-white/10 max-lg:hidden",
11
- "-left-1/2 top-1/2 -translate-y-1/2"
12
- ),
13
- fill: `url(#${GRADIENT_WHITE_ID})`,
14
- strokeWidth: "0.1",
15
- width: "auto",
16
- height: "50%"
17
- }),
18
- cloneElement(logo, {
19
- className: cn(
20
- "absolute top-1/2 -translate-y-1/2 stroke-white/10",
21
- "-right-1/2 lg:-right-1/3",
22
- "h-2/3 lg:h-[calc(100%-5%)]"
23
- ),
24
- fill: `url(#${GRADIENT_WHITE_2_ID})`,
25
- strokeWidth: "0.1",
26
- width: "auto"
27
- })
28
- ] });
29
- }
30
- export {
31
- HeroDecorationFromLogo
32
- };
@@ -1,5 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- declare function HeroGradientDefs(): react_jsx_runtime.JSX.Element;
4
-
5
- export { HeroGradientDefs };
@@ -1,66 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { GRADIENT_GREEN_ID, GRADIENT_WHITE_2_ID, GRADIENT_WHITE_ID } from "./hero-gradient-ids";
3
- function HeroGradientDefs() {
4
- return /* @__PURE__ */ jsx(
5
- "svg",
6
- {
7
- width: "96",
8
- height: "96",
9
- viewBox: "0 0 96 96",
10
- fill: "none",
11
- xmlns: "http://www.w3.org/2000/svg",
12
- className: "pointer-events-none absolute",
13
- "aria-hidden": true,
14
- children: /* @__PURE__ */ jsxs("defs", { children: [
15
- /* @__PURE__ */ jsxs(
16
- "linearGradient",
17
- {
18
- id: GRADIENT_GREEN_ID,
19
- x1: "0",
20
- y1: "0",
21
- x2: "96",
22
- y2: "96",
23
- gradientUnits: "userSpaceOnUse",
24
- children: [
25
- /* @__PURE__ */ jsx("stop", { stopColor: "#3B736A" }),
26
- /* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#15433C" })
27
- ]
28
- }
29
- ),
30
- /* @__PURE__ */ jsxs(
31
- "linearGradient",
32
- {
33
- id: GRADIENT_WHITE_ID,
34
- x1: "0",
35
- y1: "0",
36
- x2: "96",
37
- y2: "96",
38
- gradientUnits: "userSpaceOnUse",
39
- children: [
40
- /* @__PURE__ */ jsx("stop", { stopColor: "white", stopOpacity: "0.8" }),
41
- /* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "white", stopOpacity: "0.4" })
42
- ]
43
- }
44
- ),
45
- /* @__PURE__ */ jsxs(
46
- "linearGradient",
47
- {
48
- id: GRADIENT_WHITE_2_ID,
49
- x1: "1",
50
- y1: "2",
51
- x2: "161",
52
- y2: "171",
53
- gradientUnits: "userSpaceOnUse",
54
- children: [
55
- /* @__PURE__ */ jsx("stop", { stopColor: "white", stopOpacity: "0.1" }),
56
- /* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "white", stopOpacity: "0.5" })
57
- ]
58
- }
59
- )
60
- ] })
61
- }
62
- );
63
- }
64
- export {
65
- HeroGradientDefs
66
- };
@@ -1,5 +0,0 @@
1
- declare const GRADIENT_WHITE_ID = "white-sgz9qg7vvt";
2
- declare const GRADIENT_WHITE_2_ID = "white-2-sgz9qg7vvt";
3
- declare const GRADIENT_GREEN_ID = "green-sgz9qg7vvt";
4
-
5
- export { GRADIENT_GREEN_ID, GRADIENT_WHITE_2_ID, GRADIENT_WHITE_ID };
@@ -1,9 +0,0 @@
1
- const nonce = "sgz9qg7vvt";
2
- const GRADIENT_WHITE_ID = `white-${nonce}`;
3
- const GRADIENT_WHITE_2_ID = `white-2-${nonce}`;
4
- const GRADIENT_GREEN_ID = `green-${nonce}`;
5
- export {
6
- GRADIENT_GREEN_ID,
7
- GRADIENT_WHITE_2_ID,
8
- GRADIENT_WHITE_ID
9
- };
@@ -1,12 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactElement } from 'react';
3
-
4
- interface HeroLogoProps extends React.HTMLAttributes<HTMLDivElement> {
5
- children: ReactElement<{
6
- fill?: string;
7
- className?: string;
8
- }>;
9
- }
10
- declare function HeroLogo({ children, className, ...rest }: HeroLogoProps): react_jsx_runtime.JSX.Element;
11
-
12
- export { HeroLogo, type HeroLogoProps };
@@ -1,83 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { cloneElement } from "react";
3
- import { cn } from "../../cn";
4
- import { GRADIENT_GREEN_ID, GRADIENT_WHITE_2_ID, GRADIENT_WHITE_ID } from "./hero-gradient-ids";
5
- function HeroLogo({ children, className, ...rest }) {
6
- return /* @__PURE__ */ jsxs("div", { className: cn("relative", className), ...rest, children: [
7
- cloneElement(children, {
8
- fill: `url(#${GRADIENT_WHITE_ID})`,
9
- className: cn(
10
- "absolute inset-1/2 size-1/2 -translate-x-1/2 -translate-y-1/2",
11
- children.props.className
12
- )
13
- }),
14
- /* @__PURE__ */ jsx(LogoBadgeBackground, {})
15
- ] });
16
- }
17
- function LogoBadgeBackground() {
18
- return /* @__PURE__ */ jsxs("svg", { width: "96", height: "96", viewBox: "0 0 96 96", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
19
- /* @__PURE__ */ jsx("rect", { width: "96", height: "96", rx: "24", fill: `url(#${GRADIENT_GREEN_ID})` }),
20
- /* @__PURE__ */ jsx(
21
- "rect",
22
- {
23
- x: "0.5",
24
- y: "0.5",
25
- width: "95",
26
- height: "95",
27
- rx: "23.5",
28
- stroke: `url(#${GRADIENT_WHITE_ID})`
29
- }
30
- ),
31
- /* @__PURE__ */ jsx("path", { d: "M57.0264 32.1652H48.9577L53.8032 27.3197L48.4855 22L43.1658 27.3197L48.0114 32.1652H39.9427C38.9042 32.1652 37.9069 32.5786 37.1721 33.3134L23 47.4855L28.3197 52.8052L45.715 35.4099C47.2452 33.8797 49.7258 33.8797 51.2561 35.4099L68.6513 52.8052L73.971 47.4855L59.797 33.3114C59.0622 32.5767 58.0649 32.1632 57.0264 32.1632V32.1652ZM48.4854 63.3623L43.1665 68.6811L48.4854 74L53.8042 68.6811L48.4854 63.3623ZM39.9446 52.8054H48.4855H48.4894H57.0303C58.0688 52.8054 59.0661 53.2188 59.8008 53.9536L63.89 58.0428L58.5704 63.3625L51.258 56.0501C49.7277 54.5198 47.2472 54.5198 45.7169 56.0501L38.4045 63.3625L33.0848 58.0428L37.174 53.9536C37.9088 53.2188 38.9061 52.8054 39.9446 52.8054Z" }),
32
- /* @__PURE__ */ jsxs("defs", { children: [
33
- /* @__PURE__ */ jsxs(
34
- "linearGradient",
35
- {
36
- id: GRADIENT_GREEN_ID,
37
- x1: "0",
38
- y1: "0",
39
- x2: "96",
40
- y2: "96",
41
- gradientUnits: "userSpaceOnUse",
42
- children: [
43
- /* @__PURE__ */ jsx("stop", { stopColor: "#3B736A" }),
44
- /* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#15433C" })
45
- ]
46
- }
47
- ),
48
- /* @__PURE__ */ jsxs(
49
- "linearGradient",
50
- {
51
- id: GRADIENT_WHITE_ID,
52
- x1: "0",
53
- y1: "0",
54
- x2: "96",
55
- y2: "96",
56
- gradientUnits: "userSpaceOnUse",
57
- children: [
58
- /* @__PURE__ */ jsx("stop", { stopColor: "white", stopOpacity: "0.8" }),
59
- /* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "white", stopOpacity: "0.4" })
60
- ]
61
- }
62
- ),
63
- /* @__PURE__ */ jsxs(
64
- "linearGradient",
65
- {
66
- id: GRADIENT_WHITE_2_ID,
67
- x1: "1",
68
- y1: "2",
69
- x2: "161",
70
- y2: "171",
71
- gradientUnits: "userSpaceOnUse",
72
- children: [
73
- /* @__PURE__ */ jsx("stop", { stopColor: "white", stopOpacity: "0.1" }),
74
- /* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "white", stopOpacity: "0.5" })
75
- ]
76
- }
77
- )
78
- ] })
79
- ] });
80
- }
81
- export {
82
- HeroLogo
83
- };