@m13v/seo-components 0.16.2 → 0.16.3
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.
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ interface AnimatedBeamProps {
|
|
|
15
15
|
/** Right side nodes (destinations) */
|
|
16
16
|
to: BeamNode[];
|
|
17
17
|
title?: string;
|
|
18
|
-
/** Accent hex color for the hub fill and beam glow.
|
|
18
|
+
/** Accent hex color for the hub fill and beam glow. If omitted, reads the consumer's --seo-accent CSS variable (falling back to teal #14b8a6). */
|
|
19
19
|
accentColor?: string;
|
|
20
20
|
className?: string;
|
|
21
21
|
}
|
|
@@ -31,9 +31,10 @@ export function AnimatedBeam({
|
|
|
31
31
|
hub,
|
|
32
32
|
to,
|
|
33
33
|
title,
|
|
34
|
-
accentColor
|
|
34
|
+
accentColor,
|
|
35
35
|
className = "",
|
|
36
36
|
}: AnimatedBeamProps) {
|
|
37
|
+
const fillColor = accentColor ?? "var(--seo-accent, #14b8a6)";
|
|
37
38
|
const width = 720;
|
|
38
39
|
const height = 380;
|
|
39
40
|
const centerX = width / 2;
|
|
@@ -62,9 +63,9 @@ export function AnimatedBeam({
|
|
|
62
63
|
>
|
|
63
64
|
<defs>
|
|
64
65
|
<linearGradient id="beam-gradient" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
65
|
-
<stop offset="0%"
|
|
66
|
-
<stop offset="50%"
|
|
67
|
-
<stop offset="100%"
|
|
66
|
+
<stop offset="0%" style={{ stopColor: fillColor, stopOpacity: 0 }} />
|
|
67
|
+
<stop offset="50%" style={{ stopColor: fillColor, stopOpacity: 1 }} />
|
|
68
|
+
<stop offset="100%" style={{ stopColor: fillColor, stopOpacity: 0 }} />
|
|
68
69
|
</linearGradient>
|
|
69
70
|
<filter id="glow">
|
|
70
71
|
<feGaussianBlur stdDeviation="3" result="blur" />
|
|
@@ -185,7 +186,7 @@ export function AnimatedBeam({
|
|
|
185
186
|
width="144"
|
|
186
187
|
height="72"
|
|
187
188
|
rx="36"
|
|
188
|
-
|
|
189
|
+
style={{ fill: fillColor }}
|
|
189
190
|
filter="url(#glow)"
|
|
190
191
|
/>
|
|
191
192
|
<rect
|
|
@@ -81,7 +81,11 @@ export function IntegrationsGrid({
|
|
|
81
81
|
) : (
|
|
82
82
|
<div
|
|
83
83
|
className="flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-md text-sm font-semibold text-white"
|
|
84
|
-
style={{
|
|
84
|
+
style={{
|
|
85
|
+
background:
|
|
86
|
+
it.accent ||
|
|
87
|
+
"linear-gradient(135deg, var(--seo-accent, #14b8a6), var(--seo-accent-2, #22d3ee))",
|
|
88
|
+
}}
|
|
85
89
|
aria-hidden="true"
|
|
86
90
|
>
|
|
87
91
|
{initial}
|
|
@@ -24,14 +24,15 @@ import React from "react";
|
|
|
24
24
|
* </ShineBorder>
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
|
-
type TColorProp =
|
|
27
|
+
type TColorProp = string | string[];
|
|
28
28
|
|
|
29
29
|
interface ShineBorderProps {
|
|
30
30
|
borderRadius?: number;
|
|
31
31
|
borderWidth?: number;
|
|
32
32
|
duration?: number;
|
|
33
|
-
/**
|
|
34
|
-
*
|
|
33
|
+
/** Color(s) for the shine gradient. Accepts any CSS color or a CSS custom
|
|
34
|
+
* property (e.g. `var(--seo-accent)`). Defaults to the consumer's
|
|
35
|
+
* `--seo-accent` value, falling back to teal (#14b8a6). */
|
|
35
36
|
color?: TColorProp;
|
|
36
37
|
className?: string;
|
|
37
38
|
children: React.ReactNode;
|
|
@@ -41,10 +42,11 @@ export function ShineBorder({
|
|
|
41
42
|
borderRadius = 8,
|
|
42
43
|
borderWidth = 1,
|
|
43
44
|
duration = 14,
|
|
44
|
-
color
|
|
45
|
+
color,
|
|
45
46
|
className,
|
|
46
47
|
children,
|
|
47
48
|
}: ShineBorderProps) {
|
|
49
|
+
const resolvedColor = color ?? "var(--seo-accent, #14b8a6)";
|
|
48
50
|
const outerBase =
|
|
49
51
|
"relative grid min-h-[60px] w-fit min-w-[300px] place-items-center bg-white dark:bg-zinc-900 p-3 text-zinc-900 dark:text-zinc-100";
|
|
50
52
|
const outerClass = className
|
|
@@ -71,7 +73,7 @@ export function ShineBorder({
|
|
|
71
73
|
"--mask-linear-gradient":
|
|
72
74
|
"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",
|
|
73
75
|
"--background-radial-gradient": `radial-gradient(transparent,transparent, ${
|
|
74
|
-
Array.isArray(
|
|
76
|
+
Array.isArray(resolvedColor) ? resolvedColor.join(",") : resolvedColor
|
|
75
77
|
},transparent,transparent)`,
|
|
76
78
|
} as React.CSSProperties
|
|
77
79
|
}
|