@theguild/components 9.2.0-alpha-20250121195137-9d86406d5fb26aecdea804524f4eaa66f51ff603 → 9.2.0-alpha-20250121201855-4665b7b7379ce16ff723f516a6d331ab85ae8056
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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { createContext, useContext, useEffect, useId, useRef, useState } from "react";
|
|
4
|
+
import NextLink from "next/link";
|
|
4
5
|
import { cn } from "../cn";
|
|
5
6
|
const DropdownContext = createContext(null);
|
|
6
7
|
function useDropdownContext() {
|
|
@@ -118,7 +119,7 @@ function DropdownContent({ children, className, ...props }) {
|
|
|
118
119
|
}
|
|
119
120
|
function DropdownItem({ children, onClick, className, href, ...props }) {
|
|
120
121
|
if (href) {
|
|
121
|
-
return /* @__PURE__ */ jsx(
|
|
122
|
+
return /* @__PURE__ */ jsx(NextLink, { role: "menuitem", href, className, onClick, ...props, children });
|
|
122
123
|
}
|
|
123
124
|
return /* @__PURE__ */ jsx(
|
|
124
125
|
"button",
|
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactElement, ReactNode, FC } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
interface HeroProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
heading: string;
|
|
6
6
|
text: string;
|
|
7
7
|
checkmarks: string[];
|
|
8
|
-
|
|
8
|
+
top?: {
|
|
9
|
+
logo: ReactElement<{
|
|
10
|
+
className?: string;
|
|
11
|
+
fill?: string;
|
|
12
|
+
}>;
|
|
13
|
+
} | {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
};
|
|
9
16
|
children?: ReactNode;
|
|
10
|
-
|
|
11
|
-
|
|
17
|
+
}
|
|
18
|
+
declare const Hero: FC<HeroProps>;
|
|
12
19
|
|
|
13
|
-
export { Hero };
|
|
20
|
+
export { Hero, type HeroProps };
|
|
@@ -1,35 +1,12 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cloneElement, useId } from "react";
|
|
3
3
|
import { cn } from "../../cn";
|
|
4
|
-
import { DecorationIsolation } from "../decorations";
|
|
5
4
|
import { Heading } from "../heading";
|
|
6
5
|
import { CheckIcon } from "../icons";
|
|
7
6
|
const Hero = (props) => {
|
|
8
7
|
const gradientWhiteId = useId();
|
|
9
8
|
const gradientWhiteId2 = useId();
|
|
10
9
|
const greenBgId = useId();
|
|
11
|
-
const decorations = props.decorations === void 0 ? props.logo && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12
|
-
cloneElement(props.logo, {
|
|
13
|
-
className: cn(
|
|
14
|
-
"absolute stroke-white/10 max-lg:hidden",
|
|
15
|
-
"-left-1/2 top-1/2 -translate-y-1/2"
|
|
16
|
-
),
|
|
17
|
-
fill: `url(#${gradientWhiteId2})`,
|
|
18
|
-
strokeWidth: "0.1",
|
|
19
|
-
width: "auto",
|
|
20
|
-
height: "50%"
|
|
21
|
-
}),
|
|
22
|
-
cloneElement(props.logo, {
|
|
23
|
-
className: cn(
|
|
24
|
-
"absolute top-1/2 -translate-y-1/2 stroke-white/10",
|
|
25
|
-
"-right-1/2 lg:-right-1/3",
|
|
26
|
-
"h-2/3 lg:h-[calc(100%-5%)]"
|
|
27
|
-
),
|
|
28
|
-
fill: `url(#${gradientWhiteId2})`,
|
|
29
|
-
strokeWidth: "0.1",
|
|
30
|
-
width: "auto"
|
|
31
|
-
})
|
|
32
|
-
] }) : props.decorations;
|
|
33
10
|
return /* @__PURE__ */ jsxs(
|
|
34
11
|
"div",
|
|
35
12
|
{
|
|
@@ -38,11 +15,13 @@ const Hero = (props) => {
|
|
|
38
15
|
props.className
|
|
39
16
|
),
|
|
40
17
|
children: [
|
|
41
|
-
/* @__PURE__ */ jsx(
|
|
42
|
-
|
|
43
|
-
cloneElement(props.logo, {
|
|
18
|
+
/* @__PURE__ */ jsx("div", { className: "relative", children: props.top && ("logo" in props.top ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
19
|
+
cloneElement(props.top.logo, {
|
|
44
20
|
fill: `url(#${gradientWhiteId})`,
|
|
45
|
-
className:
|
|
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
|
+
)
|
|
46
25
|
}),
|
|
47
26
|
/* @__PURE__ */ jsxs(
|
|
48
27
|
"svg",
|
|
@@ -116,7 +95,7 @@ const Hero = (props) => {
|
|
|
116
95
|
]
|
|
117
96
|
}
|
|
118
97
|
)
|
|
119
|
-
] }),
|
|
98
|
+
] }) : props.top.children) }),
|
|
120
99
|
/* @__PURE__ */ jsx(Heading, { as: "h1", size: "xl", className: "mx-auto max-w-3xl text-balance text-center", children: props.heading }),
|
|
121
100
|
/* @__PURE__ */ jsx("p", { className: "mx-auto w-[512px] max-w-[80%] text-center leading-6 text-green-800", children: props.text }),
|
|
122
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: [
|
|
@@ -68,10 +68,7 @@ function HiveNavigation({
|
|
|
68
68
|
"div",
|
|
69
69
|
{
|
|
70
70
|
ref: containerRef,
|
|
71
|
-
className:
|
|
72
|
-
"sticky top-0 z-20 border-b border-beige-400/[var(--border-opacity)] bg-[rgb(var(--nextra-bg))] px-6 py-4 text-green-1000 transition-[border-color] duration-500 md:mb-[7px] md:mt-2 dark:border-neutral-700/[var(--border-opacity)] dark:text-neutral-200",
|
|
73
|
-
WIDTH_STYLE
|
|
74
|
-
),
|
|
71
|
+
className: "sticky top-0 z-20 border-b border-beige-400/[var(--border-opacity)] bg-[rgb(var(--nextra-bg))] px-6 py-4 text-green-1000 transition-[border-color] duration-500 md:mb-[7px] md:mt-2 dark:border-neutral-700/[var(--border-opacity)] dark:text-neutral-200",
|
|
75
72
|
style: { "--border-opacity": 0 },
|
|
76
73
|
children: [
|
|
77
74
|
/* @__PURE__ */ jsx(
|
|
@@ -87,52 +84,59 @@ function HiveNavigation({
|
|
|
87
84
|
logo,
|
|
88
85
|
/* @__PURE__ */ jsx(HamburgerButton, {})
|
|
89
86
|
] }),
|
|
90
|
-
/* @__PURE__ */ jsxs(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
87
|
+
/* @__PURE__ */ jsxs(
|
|
88
|
+
NavigationMenu,
|
|
89
|
+
{
|
|
90
|
+
className: cn("mx-auto hidden md:flex", WIDTH_STYLE, className),
|
|
91
|
+
delayDuration: 0,
|
|
92
|
+
children: [
|
|
93
|
+
logo,
|
|
94
|
+
/* @__PURE__ */ jsxs(NavigationMenuList, { className: "ml-4 bg-white dark:bg-transparent [@media(min-width:1180px)]:ml-16", children: [
|
|
95
|
+
/* @__PURE__ */ jsxs(NavigationMenuItem, { children: [
|
|
96
|
+
/* @__PURE__ */ jsx(NavigationMenuTrigger, { children: "Products" }),
|
|
97
|
+
/* @__PURE__ */ jsx(NavigationMenuContent, { children: /* @__PURE__ */ jsx(ProductsMenu, { productName }) })
|
|
98
|
+
] }),
|
|
99
|
+
/* @__PURE__ */ jsxs(NavigationMenuItem, { children: [
|
|
100
|
+
/* @__PURE__ */ jsx(NavigationMenuTrigger, { children: "Developer" }),
|
|
101
|
+
/* @__PURE__ */ jsx(NavigationMenuContent, { children: /* @__PURE__ */ jsx(DeveloperMenu, { developerMenu }) })
|
|
102
|
+
] }),
|
|
103
|
+
!ENTERPRISE_MENU_HIDDEN && /* @__PURE__ */ jsxs(NavigationMenuItem, { children: [
|
|
104
|
+
/* @__PURE__ */ jsx(NavigationMenuTrigger, { children: "Enterprise" }),
|
|
105
|
+
/* @__PURE__ */ jsx(NavigationMenuContent, { children: /* @__PURE__ */ jsx(EnterpriseMenu, {}) })
|
|
106
|
+
] }),
|
|
107
|
+
/* @__PURE__ */ jsxs(NavigationMenuItem, { children: [
|
|
108
|
+
/* @__PURE__ */ jsx(NavigationMenuTrigger, { children: "Company" }),
|
|
109
|
+
/* @__PURE__ */ jsx(NavigationMenuContent, { children: /* @__PURE__ */ jsx(CompanyMenu, { children: companyMenuChildren }) })
|
|
110
|
+
] }),
|
|
111
|
+
navLinks.map(({ href, children: children2 }, i) => /* @__PURE__ */ jsx(NavigationMenuItem, { className: "flex", children: /* @__PURE__ */ jsx(NavigationMenuLink, { href, className: "font-medium", children: children2 }) }, i))
|
|
112
|
+
] }),
|
|
113
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
114
|
+
children,
|
|
115
|
+
search,
|
|
116
|
+
/* @__PURE__ */ jsxs(
|
|
117
|
+
CallToAction,
|
|
118
|
+
{
|
|
119
|
+
className: "ml-4 max-lg:hidden",
|
|
120
|
+
variant: "tertiary",
|
|
121
|
+
href: `${siteOrigin}/contact`,
|
|
122
|
+
target: "_blank",
|
|
123
|
+
rel: "noopener noreferrer",
|
|
124
|
+
onClick: (event) => {
|
|
125
|
+
if (window.$crisp) {
|
|
126
|
+
window.$crisp.push(["do", "chat:open"]);
|
|
127
|
+
event.preventDefault();
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
children: [
|
|
131
|
+
"Contact ",
|
|
132
|
+
/* @__PURE__ */ jsx("span", { className: "hidden xl:contents", children: "us" })
|
|
133
|
+
]
|
|
126
134
|
}
|
|
127
|
-
|
|
128
|
-
children:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
),
|
|
134
|
-
productName === "Hive" ? /* @__PURE__ */ jsx(CallToAction, { variant: "primary", href: "https://app.graphql-hive.com/", className: "ml-4", children: "Sign in" }) : /* @__PURE__ */ jsx(CallToAction, { variant: "primary", href: "/docs", className: "ml-4", children: "Docs" })
|
|
135
|
-
] })
|
|
135
|
+
),
|
|
136
|
+
productName === "Hive" ? /* @__PURE__ */ jsx(CallToAction, { variant: "primary", href: "https://app.graphql-hive.com/", className: "ml-4", children: "Sign in" }) : /* @__PURE__ */ jsx(CallToAction, { variant: "primary", href: "/docs", className: "ml-4", children: "Docs" })
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
)
|
|
136
140
|
]
|
|
137
141
|
}
|
|
138
142
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theguild/components",
|
|
3
|
-
"version": "9.2.0-alpha-
|
|
3
|
+
"version": "9.2.0-alpha-20250121201855-4665b7b7379ce16ff723f516a6d331ab85ae8056",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "https://github.com/the-guild-org/docs",
|
|
6
6
|
"directory": "packages/components"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@giscus/react": "3.1.0",
|
|
48
|
-
"@next/bundle-analyzer": "15.1.
|
|
48
|
+
"@next/bundle-analyzer": "15.1.5",
|
|
49
49
|
"@radix-ui/react-accordion": "^1.2.2",
|
|
50
50
|
"@radix-ui/react-icons": "^1.3.2",
|
|
51
51
|
"@radix-ui/react-navigation-menu": "^1.2.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"dedent": "1.5.3",
|
|
71
71
|
"esbuild-plugin-svgr": "^3.0.0",
|
|
72
72
|
"graphql": "16.10.0",
|
|
73
|
-
"next": "15.1.
|
|
73
|
+
"next": "15.1.5",
|
|
74
74
|
"react": "18.3.1",
|
|
75
75
|
"react-dom": "18.3.1",
|
|
76
76
|
"unified": "^11.0.3",
|