@theguild/components 9.2.0-alpha-20250121185028-bbc679e613c82498fe385309c2bd6c2b2f149572 → 9.2.0-alpha-20250121190721-c607fa0bade4d6669adb4e4b354d0b1bf3fa0bfd
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",
|
|
@@ -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
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DetailedHTMLProps, HtmlHTMLAttributes, FC } from 'react';
|
|
2
2
|
|
|
3
3
|
interface BodyProps extends DetailedHTMLProps<HtmlHTMLAttributes<HTMLBodyElement>, HTMLBodyElement> {
|
|
4
|
-
lightOnlyPages
|
|
4
|
+
lightOnlyPages?: string[];
|
|
5
5
|
}
|
|
6
6
|
declare const Body: FC<BodyProps>;
|
|
7
7
|
|
|
@@ -4,18 +4,8 @@ import { usePathname } from "next/navigation";
|
|
|
4
4
|
import { cn } from "../cn";
|
|
5
5
|
const Body = ({ lightOnlyPages, children, className, ...rest }) => {
|
|
6
6
|
const pathname = usePathname();
|
|
7
|
-
const isLightOnlyPage = lightOnlyPages
|
|
8
|
-
return /* @__PURE__ */ jsx(
|
|
9
|
-
"body",
|
|
10
|
-
{
|
|
11
|
-
className: cn(
|
|
12
|
-
className,
|
|
13
|
-
isLightOnlyPage && "light text-green-1000 [&_#h-navmenu-container]:max-w-[1392px]"
|
|
14
|
-
),
|
|
15
|
-
...rest,
|
|
16
|
-
children
|
|
17
|
-
}
|
|
18
|
-
);
|
|
7
|
+
const isLightOnlyPage = lightOnlyPages?.includes(pathname);
|
|
8
|
+
return /* @__PURE__ */ jsx("body", { className: cn(className, isLightOnlyPage && "light text-green-1000"), ...rest, children });
|
|
19
9
|
};
|
|
20
10
|
export {
|
|
21
11
|
Body
|
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-20250121190721-c607fa0bade4d6669adb4e4b354d0b1bf3fa0bfd",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "https://github.com/the-guild-org/docs",
|
|
6
6
|
"directory": "packages/components"
|