@theguild/components 9.2.0-alpha-20250121193245-c4f05f0ceae984ceb1a111c137e3852efddcab95 → 9.2.0-alpha-20250121194041-edcf00152e21881e8e2ac98bbc3c33e8d8e5ec81

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,12 +1,20 @@
1
- import { FC, ReactElement, ComponentProps, ReactNode } from 'react';
1
+ import { ReactElement, ReactNode, FC } from 'react';
2
2
 
3
- declare const Hero: FC<{
3
+ interface HeroProps {
4
4
  className?: string;
5
5
  heading: string;
6
6
  text: string;
7
7
  checkmarks: string[];
8
- logo: ReactElement<ComponentProps<'svg'>>;
8
+ top?: {
9
+ logo: ReactElement<{
10
+ className?: string;
11
+ fill?: string;
12
+ }>;
13
+ } | {
14
+ children: ReactNode;
15
+ };
9
16
  children?: ReactNode;
10
- }>;
17
+ }
18
+ declare const Hero: FC<HeroProps>;
11
19
 
12
- export { Hero };
20
+ export { Hero, type HeroProps };
@@ -1,7 +1,6 @@
1
1
  import { 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) => {
@@ -16,33 +15,14 @@ const Hero = (props) => {
16
15
  props.className
17
16
  ),
18
17
  children: [
19
- /* @__PURE__ */ jsxs(DecorationIsolation, { className: "-z-10", children: [
20
- cloneElement(props.logo, {
21
- className: cn(
22
- "absolute stroke-white/10 max-lg:hidden",
23
- "-left-1/2 top-1/2 -translate-y-1/2"
24
- ),
25
- fill: `url(#${gradientWhiteId2})`,
26
- strokeWidth: "0.1",
27
- width: "auto",
28
- height: "50%"
29
- }),
30
- cloneElement(props.logo, {
31
- className: cn(
32
- "absolute top-1/2 -translate-y-1/2 stroke-white/10",
33
- "-right-1/2 lg:-right-1/3",
34
- "h-2/3 lg:h-[calc(100%-5%)]"
35
- ),
36
- fill: `url(#${gradientWhiteId2})`,
37
- strokeWidth: "0.1",
38
- width: "auto"
39
- })
40
- ] }),
41
18
  /* @__PURE__ */ jsxs("div", { className: "relative", children: [
42
- cloneElement(props.logo, {
19
+ props.top && ("logo" in props.top ? cloneElement(props.top.logo, {
43
20
  fill: `url(#${gradientWhiteId})`,
44
- className: "absolute inset-1/2 -translate-x-1/2 -translate-y-1/2 size-1/2"
45
- }),
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
+ }) : props.top.children),
46
26
  /* @__PURE__ */ jsxs(
47
27
  "svg",
48
28
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theguild/components",
3
- "version": "9.2.0-alpha-20250121193245-c4f05f0ceae984ceb1a111c137e3852efddcab95",
3
+ "version": "9.2.0-alpha-20250121194041-edcf00152e21881e8e2ac98bbc3c33e8d8e5ec81",
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.5",
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.5",
73
+ "next": "15.1.4",
74
74
  "react": "18.3.1",
75
75
  "react-dom": "18.3.1",
76
76
  "unified": "^11.0.3",