@theguild/components 9.2.0-alpha-20250121194517-4eee7cf80606d4e9cc5f9602bdd6001647ba5fb4 → 9.2.0-alpha-20250121195137-9d86406d5fb26aecdea804524f4eaa66f51ff603
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,7 +1,6 @@
|
|
|
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";
|
|
5
4
|
import { cn } from "../cn";
|
|
6
5
|
const DropdownContext = createContext(null);
|
|
7
6
|
function useDropdownContext() {
|
|
@@ -119,7 +118,7 @@ function DropdownContent({ children, className, ...props }) {
|
|
|
119
118
|
}
|
|
120
119
|
function DropdownItem({ children, onClick, className, href, ...props }) {
|
|
121
120
|
if (href) {
|
|
122
|
-
return /* @__PURE__ */ jsx(
|
|
121
|
+
return /* @__PURE__ */ jsx("a", { role: "menuitem", href, className, onClick, ...props, children });
|
|
123
122
|
}
|
|
124
123
|
return /* @__PURE__ */ jsx(
|
|
125
124
|
"button",
|
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
import { ReactElement,
|
|
1
|
+
import { FC, ReactElement, ComponentProps, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
declare const Hero: FC<{
|
|
4
4
|
className?: string;
|
|
5
5
|
heading: string;
|
|
6
6
|
text: string;
|
|
7
7
|
checkmarks: string[];
|
|
8
|
-
|
|
9
|
-
logo: ReactElement<{
|
|
10
|
-
className?: string;
|
|
11
|
-
fill?: string;
|
|
12
|
-
}>;
|
|
13
|
-
} | {
|
|
14
|
-
children: ReactNode;
|
|
15
|
-
};
|
|
8
|
+
logo?: ReactElement<ComponentProps<'svg'>>;
|
|
16
9
|
children?: ReactNode;
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
decorations?: ReactElement;
|
|
11
|
+
}>;
|
|
19
12
|
|
|
20
|
-
export { Hero
|
|
13
|
+
export { Hero };
|
|
@@ -1,12 +1,35 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
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";
|
|
4
5
|
import { Heading } from "../heading";
|
|
5
6
|
import { CheckIcon } from "../icons";
|
|
6
7
|
const Hero = (props) => {
|
|
7
8
|
const gradientWhiteId = useId();
|
|
8
9
|
const gradientWhiteId2 = useId();
|
|
9
10
|
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;
|
|
10
33
|
return /* @__PURE__ */ jsxs(
|
|
11
34
|
"div",
|
|
12
35
|
{
|
|
@@ -15,14 +38,12 @@ const Hero = (props) => {
|
|
|
15
38
|
props.className
|
|
16
39
|
),
|
|
17
40
|
children: [
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
|
|
41
|
+
/* @__PURE__ */ jsx(DecorationIsolation, { className: "-z-10", children: decorations }),
|
|
42
|
+
props.logo && /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
43
|
+
cloneElement(props.logo, {
|
|
20
44
|
fill: `url(#${gradientWhiteId})`,
|
|
21
|
-
className:
|
|
22
|
-
|
|
23
|
-
props.top.logo.props.className
|
|
24
|
-
)
|
|
25
|
-
}) : props.top.children),
|
|
45
|
+
className: "absolute inset-1/2 -translate-x-1/2 -translate-y-1/2 size-1/2"
|
|
46
|
+
}),
|
|
26
47
|
/* @__PURE__ */ jsxs(
|
|
27
48
|
"svg",
|
|
28
49
|
{
|
|
@@ -68,7 +68,10 @@ function HiveNavigation({
|
|
|
68
68
|
"div",
|
|
69
69
|
{
|
|
70
70
|
ref: containerRef,
|
|
71
|
-
className:
|
|
71
|
+
className: cn(
|
|
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
|
+
),
|
|
72
75
|
style: { "--border-opacity": 0 },
|
|
73
76
|
children: [
|
|
74
77
|
/* @__PURE__ */ jsx(
|
|
@@ -84,59 +87,52 @@ function HiveNavigation({
|
|
|
84
87
|
logo,
|
|
85
88
|
/* @__PURE__ */ jsx(HamburgerButton, {})
|
|
86
89
|
] }),
|
|
87
|
-
/* @__PURE__ */ jsxs(
|
|
88
|
-
|
|
89
|
-
{
|
|
90
|
-
|
|
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
|
-
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
|
-
]
|
|
90
|
+
/* @__PURE__ */ jsxs(NavigationMenu, { className: cn("mx-auto hidden md:flex", className), delayDuration: 0, children: [
|
|
91
|
+
logo,
|
|
92
|
+
/* @__PURE__ */ jsxs(NavigationMenuList, { className: "ml-4 bg-white dark:bg-transparent [@media(min-width:1180px)]:ml-16", children: [
|
|
93
|
+
/* @__PURE__ */ jsxs(NavigationMenuItem, { children: [
|
|
94
|
+
/* @__PURE__ */ jsx(NavigationMenuTrigger, { children: "Products" }),
|
|
95
|
+
/* @__PURE__ */ jsx(NavigationMenuContent, { children: /* @__PURE__ */ jsx(ProductsMenu, { productName }) })
|
|
96
|
+
] }),
|
|
97
|
+
/* @__PURE__ */ jsxs(NavigationMenuItem, { children: [
|
|
98
|
+
/* @__PURE__ */ jsx(NavigationMenuTrigger, { children: "Developer" }),
|
|
99
|
+
/* @__PURE__ */ jsx(NavigationMenuContent, { children: /* @__PURE__ */ jsx(DeveloperMenu, { developerMenu }) })
|
|
100
|
+
] }),
|
|
101
|
+
!ENTERPRISE_MENU_HIDDEN && /* @__PURE__ */ jsxs(NavigationMenuItem, { children: [
|
|
102
|
+
/* @__PURE__ */ jsx(NavigationMenuTrigger, { children: "Enterprise" }),
|
|
103
|
+
/* @__PURE__ */ jsx(NavigationMenuContent, { children: /* @__PURE__ */ jsx(EnterpriseMenu, {}) })
|
|
104
|
+
] }),
|
|
105
|
+
/* @__PURE__ */ jsxs(NavigationMenuItem, { children: [
|
|
106
|
+
/* @__PURE__ */ jsx(NavigationMenuTrigger, { children: "Company" }),
|
|
107
|
+
/* @__PURE__ */ jsx(NavigationMenuContent, { children: /* @__PURE__ */ jsx(CompanyMenu, { children: companyMenuChildren }) })
|
|
108
|
+
] }),
|
|
109
|
+
navLinks.map(({ href, children: children2 }, i) => /* @__PURE__ */ jsx(NavigationMenuItem, { className: "flex", children: /* @__PURE__ */ jsx(NavigationMenuLink, { href, className: "font-medium", children: children2 }) }, i))
|
|
110
|
+
] }),
|
|
111
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
112
|
+
children,
|
|
113
|
+
search,
|
|
114
|
+
/* @__PURE__ */ jsxs(
|
|
115
|
+
CallToAction,
|
|
116
|
+
{
|
|
117
|
+
className: "ml-4 max-lg:hidden",
|
|
118
|
+
variant: "tertiary",
|
|
119
|
+
href: `${siteOrigin}/contact`,
|
|
120
|
+
target: "_blank",
|
|
121
|
+
rel: "noopener noreferrer",
|
|
122
|
+
onClick: (event) => {
|
|
123
|
+
if (window.$crisp) {
|
|
124
|
+
window.$crisp.push(["do", "chat:open"]);
|
|
125
|
+
event.preventDefault();
|
|
134
126
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
127
|
+
},
|
|
128
|
+
children: [
|
|
129
|
+
"Contact ",
|
|
130
|
+
/* @__PURE__ */ jsx("span", { className: "hidden xl:contents", children: "us" })
|
|
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
|
+
] })
|
|
140
136
|
]
|
|
141
137
|
}
|
|
142
138
|
);
|
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-20250121195137-9d86406d5fb26aecdea804524f4eaa66f51ff603",
|
|
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.4",
|
|
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.4",
|
|
74
74
|
"react": "18.3.1",
|
|
75
75
|
"react-dom": "18.3.1",
|
|
76
76
|
"unified": "^11.0.3",
|