@opensite/ui 1.6.7 → 1.6.8
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/dist/hero-architecture-fullscreen.cjs +7 -54
- package/dist/hero-architecture-fullscreen.js +7 -54
- package/dist/hero-badge-shadow-overlay.cjs +42 -45
- package/dist/hero-badge-shadow-overlay.d.cts +14 -2
- package/dist/hero-badge-shadow-overlay.d.ts +14 -2
- package/dist/hero-badge-shadow-overlay.js +42 -45
- package/dist/hero-billing-platform-logos.cjs +5 -9
- package/dist/hero-billing-platform-logos.d.cts +1 -5
- package/dist/hero-billing-platform-logos.d.ts +1 -5
- package/dist/hero-billing-platform-logos.js +5 -9
- package/dist/hero-centered-gradient-cta.cjs +12 -68
- package/dist/hero-centered-gradient-cta.js +12 -68
- package/dist/hero-conversion-video-play.cjs +13 -64
- package/dist/hero-conversion-video-play.js +13 -64
- package/dist/hero-customer-support-layered.cjs +1 -1
- package/dist/hero-customer-support-layered.js +1 -1
- package/dist/hero-dashed-border-features.cjs +8 -71
- package/dist/hero-dashed-border-features.js +8 -71
- package/dist/hero-design-showcase-logos.cjs +7 -32
- package/dist/hero-design-showcase-logos.js +7 -32
- package/dist/hero-floating-images.cjs +1 -1
- package/dist/hero-floating-images.js +1 -1
- package/dist/hero-grid-pattern-solutions.cjs +7 -66
- package/dist/hero-grid-pattern-solutions.js +7 -66
- package/dist/hero-hiring-animated-text.cjs +10 -5
- package/dist/hero-hiring-animated-text.js +10 -5
- package/dist/hero-marketplace-scattered-images.cjs +7 -32
- package/dist/hero-marketplace-scattered-images.js +7 -32
- package/dist/hero-mentorship-video-split.cjs +11 -14
- package/dist/hero-mentorship-video-split.js +11 -14
- package/dist/hero-mobile-app-download.cjs +2 -2
- package/dist/hero-mobile-app-download.d.cts +1 -1
- package/dist/hero-mobile-app-download.d.ts +1 -1
- package/dist/hero-mobile-app-download.js +2 -2
- package/dist/hero-premium-split-avatars.cjs +11 -9
- package/dist/hero-premium-split-avatars.d.cts +5 -1
- package/dist/hero-premium-split-avatars.d.ts +5 -1
- package/dist/hero-premium-split-avatars.js +11 -9
- package/dist/hero-presentation-platform-video.cjs +12 -9
- package/dist/hero-presentation-platform-video.d.cts +5 -1
- package/dist/hero-presentation-platform-video.d.ts +5 -1
- package/dist/hero-presentation-platform-video.js +12 -9
- package/dist/hero-productivity-launcher-video.cjs +11 -35
- package/dist/hero-productivity-launcher-video.js +11 -35
- package/dist/hero-spiral-pattern-cards.cjs +49 -92
- package/dist/hero-spiral-pattern-cards.d.cts +20 -3
- package/dist/hero-spiral-pattern-cards.d.ts +20 -3
- package/dist/hero-spiral-pattern-cards.js +49 -92
- package/dist/hero-split-spiral-shapes.cjs +43 -90
- package/dist/hero-split-spiral-shapes.d.cts +17 -4
- package/dist/hero-split-spiral-shapes.d.ts +17 -4
- package/dist/hero-split-spiral-shapes.js +43 -90
- package/dist/hero-startup-launch-cta.cjs +2 -2
- package/dist/hero-startup-launch-cta.js +2 -2
- package/dist/hero-task-timer-animated.cjs +64 -156
- package/dist/hero-task-timer-animated.d.cts +13 -1
- package/dist/hero-task-timer-animated.d.ts +13 -1
- package/dist/hero-task-timer-animated.js +64 -156
- package/dist/hero-testimonial-image-grid.cjs +10 -38
- package/dist/hero-testimonial-image-grid.js +10 -38
- package/dist/hero-therapy-testimonial-grid.cjs +11 -40
- package/dist/hero-therapy-testimonial-grid.js +11 -40
- package/dist/hero-video-background-dark.cjs +10 -34
- package/dist/hero-video-background-dark.d.cts +5 -1
- package/dist/hero-video-background-dark.d.ts +5 -1
- package/dist/hero-video-background-dark.js +10 -34
- package/dist/registry.cjs +353 -302
- package/dist/registry.js +353 -302
- package/package.json +1 -1
|
@@ -10,32 +10,6 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
10
10
|
function cn(...inputs) {
|
|
11
11
|
return twMerge(clsx(inputs));
|
|
12
12
|
}
|
|
13
|
-
function getTextColor(parentBg, variant = "default", options) {
|
|
14
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
15
|
-
if (isDark) {
|
|
16
|
-
switch (variant) {
|
|
17
|
-
case "default":
|
|
18
|
-
return "text-foreground";
|
|
19
|
-
case "muted":
|
|
20
|
-
return "text-foreground/80";
|
|
21
|
-
case "subtle":
|
|
22
|
-
return "text-foreground/60";
|
|
23
|
-
case "accent":
|
|
24
|
-
return "text-accent-foreground";
|
|
25
|
-
}
|
|
26
|
-
} else {
|
|
27
|
-
switch (variant) {
|
|
28
|
-
case "default":
|
|
29
|
-
return "text-foreground";
|
|
30
|
-
case "muted":
|
|
31
|
-
return "text-muted-foreground";
|
|
32
|
-
case "subtle":
|
|
33
|
-
return "text-muted-foreground/70";
|
|
34
|
-
case "accent":
|
|
35
|
-
return "text-primary";
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
13
|
function normalizePhoneNumber(input) {
|
|
40
14
|
const trimmed = input.trim();
|
|
41
15
|
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
@@ -946,7 +920,7 @@ function HeroProductivityLauncherVideo({
|
|
|
946
920
|
videoSrc,
|
|
947
921
|
videoSlot,
|
|
948
922
|
background,
|
|
949
|
-
spacing,
|
|
923
|
+
spacing = "py-32 md:py-32",
|
|
950
924
|
pattern,
|
|
951
925
|
patternOpacity,
|
|
952
926
|
className,
|
|
@@ -978,7 +952,7 @@ function HeroProductivityLauncherVideo({
|
|
|
978
952
|
const renderVersionInfo = useMemo(() => {
|
|
979
953
|
if (versionInfoSlot) return versionInfoSlot;
|
|
980
954
|
if (!versionInfo) return null;
|
|
981
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
955
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex gap-6 text-xs text-muted-foreground", children: [
|
|
982
956
|
versionInfo.version && /* @__PURE__ */ jsx("span", { children: versionInfo.version }),
|
|
983
957
|
versionInfo.osRequirement && /* @__PURE__ */ jsx("span", { className: "relative before:absolute before:-left-3 before:content-['|']", children: versionInfo.osRequirement }),
|
|
984
958
|
versionInfo.installMethod && /* @__PURE__ */ jsx("span", { className: "relative before:absolute before:-left-3 before:content-['|']", children: /* @__PURE__ */ jsx("button", { onClick: versionInfo.installAction, children: versionInfo.installMethod }) })
|
|
@@ -994,7 +968,7 @@ function HeroProductivityLauncherVideo({
|
|
|
994
968
|
className: "group relative mt-10 flex h-8 items-center gap-3 overflow-hidden rounded-full border border-border/50 bg-background px-3 py-1 text-sm font-medium",
|
|
995
969
|
children: [
|
|
996
970
|
secondaryCta.primaryText && /* @__PURE__ */ jsx("span", { children: secondaryCta.primaryText }),
|
|
997
|
-
secondaryCta.secondaryText && /* @__PURE__ */ jsxs("span", { className:
|
|
971
|
+
secondaryCta.secondaryText && /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1 text-muted-foreground", children: [
|
|
998
972
|
/* @__PURE__ */ jsx("span", { children: secondaryCta.secondaryText }),
|
|
999
973
|
/* @__PURE__ */ jsx(
|
|
1000
974
|
DynamicIcon,
|
|
@@ -1026,15 +1000,17 @@ function HeroProductivityLauncherVideo({
|
|
|
1026
1000
|
return /* @__PURE__ */ jsxs(
|
|
1027
1001
|
Section,
|
|
1028
1002
|
{
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1003
|
+
background,
|
|
1004
|
+
spacing,
|
|
1005
|
+
pattern,
|
|
1006
|
+
patternOpacity,
|
|
1007
|
+
className: cn("relative flex items-center justify-center dark overflow-hidden bg-background py-12 font-sans md:py-20", className),
|
|
1008
|
+
containerClassName: "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
1033
1009
|
children: [
|
|
1034
|
-
/* @__PURE__ */ jsx("div", { className: cn("relative z-20
|
|
1010
|
+
/* @__PURE__ */ jsx("div", { className: cn("relative z-20 max-w-204.5", contentClassName), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
|
|
1035
1011
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-8 px-4 pt-52 pb-32 md:pb-52", children: [
|
|
1036
1012
|
/* @__PURE__ */ jsx("div", { className: "max-w-100 sm:max-w-135", children: heading && (typeof heading === "string" ? /* @__PURE__ */ jsx("h1", { className: cn("text-center text-4xl leading-tight font-semibold [text-shadow:0_4px_4px_rgba(0,0,0,0.15)] sm:text-5xl md:text-[4rem]", headingClassName), children: heading }) : /* @__PURE__ */ jsx("h1", { className: cn("text-center text-4xl leading-tight font-semibold [text-shadow:0_4px_4px_rgba(0,0,0,0.15)] sm:text-5xl md:text-[4rem]", headingClassName), children: heading })) }),
|
|
1037
|
-
/* @__PURE__ */ jsx("div", { className: "max-w-90 md:max-w-full", children: description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("text-center text-sm leading-normal tracking-tight text-balance [text-shadow:0_4px_4px_rgba(0,0,0,0.25)] md:text-lg",
|
|
1013
|
+
/* @__PURE__ */ jsx("div", { className: "max-w-90 md:max-w-full", children: description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("text-center text-sm leading-normal tracking-tight text-balance text-muted-foreground [text-shadow:0_4px_4px_rgba(0,0,0,0.25)] md:text-lg", descriptionClassName), children: description }) : /* @__PURE__ */ jsx("div", { className: descriptionClassName, children: description })) })
|
|
1038
1014
|
] }),
|
|
1039
1015
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", children: [
|
|
1040
1016
|
renderActions,
|
|
@@ -6,6 +6,7 @@ var clsx = require('clsx');
|
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var classVarianceAuthority = require('class-variance-authority');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
var img = require('@page-speed/img');
|
|
9
10
|
|
|
10
11
|
function _interopNamespace(e) {
|
|
11
12
|
if (e && e.__esModule) return e;
|
|
@@ -31,58 +32,6 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
|
31
32
|
function cn(...inputs) {
|
|
32
33
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
33
34
|
}
|
|
34
|
-
function getNestedCardBg(parentBg, variant = "muted", options) {
|
|
35
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
36
|
-
if (isDark) {
|
|
37
|
-
switch (variant) {
|
|
38
|
-
case "muted":
|
|
39
|
-
return "bg-background";
|
|
40
|
-
case "card":
|
|
41
|
-
return "bg-card";
|
|
42
|
-
case "accent":
|
|
43
|
-
return "bg-accent";
|
|
44
|
-
case "subtle":
|
|
45
|
-
return "bg-background/50";
|
|
46
|
-
}
|
|
47
|
-
} else {
|
|
48
|
-
switch (variant) {
|
|
49
|
-
case "muted":
|
|
50
|
-
return "bg-muted";
|
|
51
|
-
case "card":
|
|
52
|
-
return "bg-card";
|
|
53
|
-
case "accent":
|
|
54
|
-
return "bg-accent";
|
|
55
|
-
case "subtle":
|
|
56
|
-
return "bg-muted/50";
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
function getTextColor(parentBg, variant = "default", options) {
|
|
61
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
62
|
-
if (isDark) {
|
|
63
|
-
switch (variant) {
|
|
64
|
-
case "default":
|
|
65
|
-
return "text-foreground";
|
|
66
|
-
case "muted":
|
|
67
|
-
return "text-foreground/80";
|
|
68
|
-
case "subtle":
|
|
69
|
-
return "text-foreground/60";
|
|
70
|
-
case "accent":
|
|
71
|
-
return "text-accent-foreground";
|
|
72
|
-
}
|
|
73
|
-
} else {
|
|
74
|
-
switch (variant) {
|
|
75
|
-
case "default":
|
|
76
|
-
return "text-foreground";
|
|
77
|
-
case "muted":
|
|
78
|
-
return "text-muted-foreground";
|
|
79
|
-
case "subtle":
|
|
80
|
-
return "text-muted-foreground/70";
|
|
81
|
-
case "accent":
|
|
82
|
-
return "text-primary";
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
35
|
function normalizePhoneNumber(input) {
|
|
87
36
|
const trimmed = input.trim();
|
|
88
37
|
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
@@ -882,14 +831,18 @@ function HeroSpiralPatternCards({
|
|
|
882
831
|
description,
|
|
883
832
|
actions,
|
|
884
833
|
actionsSlot,
|
|
834
|
+
images,
|
|
835
|
+
imagesSlot,
|
|
836
|
+
optixFlowConfig,
|
|
885
837
|
background,
|
|
886
|
-
spacing,
|
|
838
|
+
spacing = "py-32 md:py-32",
|
|
887
839
|
pattern,
|
|
888
840
|
patternOpacity,
|
|
889
841
|
className,
|
|
890
|
-
containerClassName,
|
|
842
|
+
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
891
843
|
headingClassName,
|
|
892
|
-
descriptionClassName
|
|
844
|
+
descriptionClassName,
|
|
845
|
+
imagesClassName
|
|
893
846
|
}) {
|
|
894
847
|
const renderActions = React.useMemo(() => {
|
|
895
848
|
if (actionsSlot) return actionsSlot;
|
|
@@ -912,53 +865,57 @@ function HeroSpiralPatternCards({
|
|
|
912
865
|
);
|
|
913
866
|
}) });
|
|
914
867
|
}, [actionsSlot, actions]);
|
|
915
|
-
|
|
868
|
+
const renderImages = React.useMemo(() => {
|
|
869
|
+
if (imagesSlot) return imagesSlot;
|
|
870
|
+
if (!images || images.length === 0) return null;
|
|
871
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-16 flex flex-col items-center justify-center lg:mt-32", imagesClassName), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative mx-auto aspect-square w-[95%] max-w-125 sm:w-full", children: [
|
|
872
|
+
images[0] && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 z-5 m-auto flex aspect-29/36 w-4/5 max-w-[16rem] translate-x-[-75%] translate-y-[10%] scale-[0.85] rotate-[-15deg] justify-center overflow-hidden rounded-lg border border-border opacity-60 md:w-85 md:max-w-85", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
873
|
+
img.Img,
|
|
874
|
+
{
|
|
875
|
+
src: images[0].src,
|
|
876
|
+
alt: images[0].alt,
|
|
877
|
+
className: cn("h-full w-full object-cover", images[0].className),
|
|
878
|
+
optixFlowConfig
|
|
879
|
+
}
|
|
880
|
+
) }),
|
|
881
|
+
images[1] && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 z-10 m-auto flex aspect-29/36 w-4/5 max-w-[16rem] translate-x-[-40%] translate-y-[5%] scale-[0.9] rotate-[-7deg] justify-center overflow-hidden rounded-lg border border-border opacity-80 md:w-85 md:max-w-85", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
882
|
+
img.Img,
|
|
883
|
+
{
|
|
884
|
+
src: images[1].src,
|
|
885
|
+
alt: images[1].alt,
|
|
886
|
+
className: cn("h-full w-full object-cover", images[1].className),
|
|
887
|
+
optixFlowConfig
|
|
888
|
+
}
|
|
889
|
+
) }),
|
|
890
|
+
images[2] && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 z-20 m-auto flex aspect-29/36 w-4/5 max-w-[16rem] justify-center overflow-hidden rounded-lg border border-border md:w-85 md:max-w-85", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
891
|
+
img.Img,
|
|
892
|
+
{
|
|
893
|
+
src: images[2].src,
|
|
894
|
+
alt: images[2].alt,
|
|
895
|
+
className: cn("h-full w-full object-cover", images[2].className),
|
|
896
|
+
optixFlowConfig
|
|
897
|
+
}
|
|
898
|
+
) })
|
|
899
|
+
] }) });
|
|
900
|
+
}, [imagesSlot, images, imagesClassName, optixFlowConfig]);
|
|
901
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
916
902
|
Section,
|
|
917
903
|
{
|
|
918
904
|
background,
|
|
919
905
|
spacing,
|
|
920
906
|
pattern,
|
|
921
907
|
patternOpacity,
|
|
922
|
-
className: cn(className),
|
|
923
|
-
|
|
924
|
-
|
|
908
|
+
className: cn("relative flex items-center justify-center", className),
|
|
909
|
+
containerClassName,
|
|
910
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
911
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center text-center", children: [
|
|
925
912
|
badgeText && (typeof badgeText === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs uppercase", children: badgeText }) : badgeText),
|
|
926
913
|
heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h1", { className: cn("my-3 text-2xl font-bold text-pretty sm:text-4xl md:my-6 lg:text-5xl", headingClassName), children: heading }) : /* @__PURE__ */ jsxRuntime.jsx("h1", { className: cn("my-3 text-2xl font-bold text-pretty sm:text-4xl md:my-6 lg:text-5xl", headingClassName), children: heading })),
|
|
927
|
-
description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("mb-6 max-w-xl md:mb-12 lg:text-xl
|
|
914
|
+
description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("mb-6 max-w-xl md:mb-12 lg:text-xl text-muted-foreground", descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: descriptionClassName, children: description })),
|
|
928
915
|
renderActions
|
|
929
916
|
] }),
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
"svg",
|
|
933
|
-
{
|
|
934
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
935
|
-
version: "1.1",
|
|
936
|
-
viewBox: "0 0 800 800",
|
|
937
|
-
className: cn("h-full w-full opacity-20", getTextColor(background, "muted")),
|
|
938
|
-
children: Array.from(Array(4e3).keys()).map((dot, index, array) => {
|
|
939
|
-
const angle = 0.2 * index;
|
|
940
|
-
const scalar = 300 + index * (100 / array.length);
|
|
941
|
-
const x = Math.round(Math.cos(angle) * scalar);
|
|
942
|
-
const y = Math.round(Math.sin(angle) * scalar);
|
|
943
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
944
|
-
"circle",
|
|
945
|
-
{
|
|
946
|
-
r: 1,
|
|
947
|
-
cx: 400 + x,
|
|
948
|
-
cy: 400 + y,
|
|
949
|
-
fill: "currentColor",
|
|
950
|
-
opacity: (array.length - index) / array.length
|
|
951
|
-
},
|
|
952
|
-
index
|
|
953
|
-
);
|
|
954
|
-
})
|
|
955
|
-
}
|
|
956
|
-
) }),
|
|
957
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("absolute inset-0 z-5 m-auto flex aspect-29/36 w-4/5 max-w-[16rem] translate-x-[-75%] translate-y-[10%] scale-[0.85] rotate-[-15deg] justify-center rounded-lg border border-border opacity-60 md:w-85 md:max-w-85", getNestedCardBg(background, "accent")) }),
|
|
958
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("absolute inset-0 z-10 m-auto flex aspect-29/36 w-4/5 max-w-[16rem] translate-x-[-40%] translate-y-[5%] scale-[0.9] rotate-[-7deg] justify-center rounded-lg border border-border opacity-80 md:w-85 md:max-w-85", getNestedCardBg(background, "accent")) }),
|
|
959
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("absolute inset-0 z-20 m-auto flex aspect-29/36 w-4/5 max-w-[16rem] justify-center rounded-lg border border-border md:w-85 md:max-w-85", getNestedCardBg(background, "accent")) })
|
|
960
|
-
] }) })
|
|
961
|
-
]
|
|
917
|
+
renderImages
|
|
918
|
+
] })
|
|
962
919
|
}
|
|
963
920
|
);
|
|
964
921
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { f as SectionBackground, g as SectionSpacing, t as PatternName } from './community-initiatives-r_NhxVet.cjs';
|
|
3
|
-
import { A as ActionConfig } from './blocks-DP3Vofl4.cjs';
|
|
3
|
+
import { A as ActionConfig, I as ImageItem, O as OptixFlowConfig } from './blocks-DP3Vofl4.cjs';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import 'class-variance-authority';
|
|
6
6
|
import './button-variants-CdNtNOuP.cjs';
|
|
@@ -26,7 +26,20 @@ interface HeroSpiralPatternCardsProps {
|
|
|
26
26
|
/**
|
|
27
27
|
* Custom slot for rendering actions (overrides actions array)
|
|
28
28
|
*/
|
|
29
|
-
actionsSlot?: React.ReactNode;
|
|
29
|
+
actionsSlot?: React.ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* Array of images to display (expects 3 images for stacked card effect)
|
|
32
|
+
*/
|
|
33
|
+
images?: ImageItem[];
|
|
34
|
+
/**
|
|
35
|
+
* Custom slot for rendering images (overrides images array)
|
|
36
|
+
*/
|
|
37
|
+
imagesSlot?: React.ReactNode;
|
|
38
|
+
/**
|
|
39
|
+
* OptixFlow image optimization configuration
|
|
40
|
+
*/
|
|
41
|
+
optixFlowConfig?: OptixFlowConfig;
|
|
42
|
+
/**
|
|
30
43
|
* Background style for the section
|
|
31
44
|
*/
|
|
32
45
|
background?: SectionBackground;
|
|
@@ -58,7 +71,11 @@ interface HeroSpiralPatternCardsProps {
|
|
|
58
71
|
* Additional CSS classes for the description
|
|
59
72
|
*/
|
|
60
73
|
descriptionClassName?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Additional CSS classes for the images container
|
|
76
|
+
*/
|
|
77
|
+
imagesClassName?: string;
|
|
61
78
|
}
|
|
62
|
-
declare function HeroSpiralPatternCards({ badgeText, heading, description, actions, actionsSlot, background, spacing, pattern, patternOpacity, className, containerClassName, headingClassName, descriptionClassName, }: HeroSpiralPatternCardsProps): React.JSX.Element;
|
|
79
|
+
declare function HeroSpiralPatternCards({ badgeText, heading, description, actions, actionsSlot, images, imagesSlot, optixFlowConfig, background, spacing, pattern, patternOpacity, className, containerClassName, headingClassName, descriptionClassName, imagesClassName, }: HeroSpiralPatternCardsProps): React.JSX.Element;
|
|
63
80
|
|
|
64
81
|
export { HeroSpiralPatternCards, type HeroSpiralPatternCardsProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { f as SectionBackground, g as SectionSpacing, t as PatternName } from './community-initiatives-DmVsuoHE.js';
|
|
3
|
-
import { A as ActionConfig } from './blocks-XLPGq8A5.js';
|
|
3
|
+
import { A as ActionConfig, I as ImageItem, O as OptixFlowConfig } from './blocks-XLPGq8A5.js';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import 'class-variance-authority';
|
|
6
6
|
import './button-variants-CdNtNOuP.js';
|
|
@@ -26,7 +26,20 @@ interface HeroSpiralPatternCardsProps {
|
|
|
26
26
|
/**
|
|
27
27
|
* Custom slot for rendering actions (overrides actions array)
|
|
28
28
|
*/
|
|
29
|
-
actionsSlot?: React.ReactNode;
|
|
29
|
+
actionsSlot?: React.ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* Array of images to display (expects 3 images for stacked card effect)
|
|
32
|
+
*/
|
|
33
|
+
images?: ImageItem[];
|
|
34
|
+
/**
|
|
35
|
+
* Custom slot for rendering images (overrides images array)
|
|
36
|
+
*/
|
|
37
|
+
imagesSlot?: React.ReactNode;
|
|
38
|
+
/**
|
|
39
|
+
* OptixFlow image optimization configuration
|
|
40
|
+
*/
|
|
41
|
+
optixFlowConfig?: OptixFlowConfig;
|
|
42
|
+
/**
|
|
30
43
|
* Background style for the section
|
|
31
44
|
*/
|
|
32
45
|
background?: SectionBackground;
|
|
@@ -58,7 +71,11 @@ interface HeroSpiralPatternCardsProps {
|
|
|
58
71
|
* Additional CSS classes for the description
|
|
59
72
|
*/
|
|
60
73
|
descriptionClassName?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Additional CSS classes for the images container
|
|
76
|
+
*/
|
|
77
|
+
imagesClassName?: string;
|
|
61
78
|
}
|
|
62
|
-
declare function HeroSpiralPatternCards({ badgeText, heading, description, actions, actionsSlot, background, spacing, pattern, patternOpacity, className, containerClassName, headingClassName, descriptionClassName, }: HeroSpiralPatternCardsProps): React.JSX.Element;
|
|
79
|
+
declare function HeroSpiralPatternCards({ badgeText, heading, description, actions, actionsSlot, images, imagesSlot, optixFlowConfig, background, spacing, pattern, patternOpacity, className, containerClassName, headingClassName, descriptionClassName, imagesClassName, }: HeroSpiralPatternCardsProps): React.JSX.Element;
|
|
63
80
|
|
|
64
81
|
export { HeroSpiralPatternCards, type HeroSpiralPatternCardsProps };
|
|
@@ -5,63 +5,12 @@ import { clsx } from 'clsx';
|
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { cva } from 'class-variance-authority';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
|
+
import { Img } from '@page-speed/img';
|
|
8
9
|
|
|
9
10
|
// components/blocks/hero/hero-spiral-pattern-cards.tsx
|
|
10
11
|
function cn(...inputs) {
|
|
11
12
|
return twMerge(clsx(inputs));
|
|
12
13
|
}
|
|
13
|
-
function getNestedCardBg(parentBg, variant = "muted", options) {
|
|
14
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
15
|
-
if (isDark) {
|
|
16
|
-
switch (variant) {
|
|
17
|
-
case "muted":
|
|
18
|
-
return "bg-background";
|
|
19
|
-
case "card":
|
|
20
|
-
return "bg-card";
|
|
21
|
-
case "accent":
|
|
22
|
-
return "bg-accent";
|
|
23
|
-
case "subtle":
|
|
24
|
-
return "bg-background/50";
|
|
25
|
-
}
|
|
26
|
-
} else {
|
|
27
|
-
switch (variant) {
|
|
28
|
-
case "muted":
|
|
29
|
-
return "bg-muted";
|
|
30
|
-
case "card":
|
|
31
|
-
return "bg-card";
|
|
32
|
-
case "accent":
|
|
33
|
-
return "bg-accent";
|
|
34
|
-
case "subtle":
|
|
35
|
-
return "bg-muted/50";
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
function getTextColor(parentBg, variant = "default", options) {
|
|
40
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
41
|
-
if (isDark) {
|
|
42
|
-
switch (variant) {
|
|
43
|
-
case "default":
|
|
44
|
-
return "text-foreground";
|
|
45
|
-
case "muted":
|
|
46
|
-
return "text-foreground/80";
|
|
47
|
-
case "subtle":
|
|
48
|
-
return "text-foreground/60";
|
|
49
|
-
case "accent":
|
|
50
|
-
return "text-accent-foreground";
|
|
51
|
-
}
|
|
52
|
-
} else {
|
|
53
|
-
switch (variant) {
|
|
54
|
-
case "default":
|
|
55
|
-
return "text-foreground";
|
|
56
|
-
case "muted":
|
|
57
|
-
return "text-muted-foreground";
|
|
58
|
-
case "subtle":
|
|
59
|
-
return "text-muted-foreground/70";
|
|
60
|
-
case "accent":
|
|
61
|
-
return "text-primary";
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
14
|
function normalizePhoneNumber(input) {
|
|
66
15
|
const trimmed = input.trim();
|
|
67
16
|
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
@@ -861,14 +810,18 @@ function HeroSpiralPatternCards({
|
|
|
861
810
|
description,
|
|
862
811
|
actions,
|
|
863
812
|
actionsSlot,
|
|
813
|
+
images,
|
|
814
|
+
imagesSlot,
|
|
815
|
+
optixFlowConfig,
|
|
864
816
|
background,
|
|
865
|
-
spacing,
|
|
817
|
+
spacing = "py-32 md:py-32",
|
|
866
818
|
pattern,
|
|
867
819
|
patternOpacity,
|
|
868
820
|
className,
|
|
869
|
-
containerClassName,
|
|
821
|
+
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
870
822
|
headingClassName,
|
|
871
|
-
descriptionClassName
|
|
823
|
+
descriptionClassName,
|
|
824
|
+
imagesClassName
|
|
872
825
|
}) {
|
|
873
826
|
const renderActions = useMemo(() => {
|
|
874
827
|
if (actionsSlot) return actionsSlot;
|
|
@@ -891,53 +844,57 @@ function HeroSpiralPatternCards({
|
|
|
891
844
|
);
|
|
892
845
|
}) });
|
|
893
846
|
}, [actionsSlot, actions]);
|
|
894
|
-
|
|
847
|
+
const renderImages = useMemo(() => {
|
|
848
|
+
if (imagesSlot) return imagesSlot;
|
|
849
|
+
if (!images || images.length === 0) return null;
|
|
850
|
+
return /* @__PURE__ */ jsx("div", { className: cn("mt-16 flex flex-col items-center justify-center lg:mt-32", imagesClassName), children: /* @__PURE__ */ jsxs("div", { className: "relative mx-auto aspect-square w-[95%] max-w-125 sm:w-full", children: [
|
|
851
|
+
images[0] && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 z-5 m-auto flex aspect-29/36 w-4/5 max-w-[16rem] translate-x-[-75%] translate-y-[10%] scale-[0.85] rotate-[-15deg] justify-center overflow-hidden rounded-lg border border-border opacity-60 md:w-85 md:max-w-85", children: /* @__PURE__ */ jsx(
|
|
852
|
+
Img,
|
|
853
|
+
{
|
|
854
|
+
src: images[0].src,
|
|
855
|
+
alt: images[0].alt,
|
|
856
|
+
className: cn("h-full w-full object-cover", images[0].className),
|
|
857
|
+
optixFlowConfig
|
|
858
|
+
}
|
|
859
|
+
) }),
|
|
860
|
+
images[1] && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 z-10 m-auto flex aspect-29/36 w-4/5 max-w-[16rem] translate-x-[-40%] translate-y-[5%] scale-[0.9] rotate-[-7deg] justify-center overflow-hidden rounded-lg border border-border opacity-80 md:w-85 md:max-w-85", children: /* @__PURE__ */ jsx(
|
|
861
|
+
Img,
|
|
862
|
+
{
|
|
863
|
+
src: images[1].src,
|
|
864
|
+
alt: images[1].alt,
|
|
865
|
+
className: cn("h-full w-full object-cover", images[1].className),
|
|
866
|
+
optixFlowConfig
|
|
867
|
+
}
|
|
868
|
+
) }),
|
|
869
|
+
images[2] && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 z-20 m-auto flex aspect-29/36 w-4/5 max-w-[16rem] justify-center overflow-hidden rounded-lg border border-border md:w-85 md:max-w-85", children: /* @__PURE__ */ jsx(
|
|
870
|
+
Img,
|
|
871
|
+
{
|
|
872
|
+
src: images[2].src,
|
|
873
|
+
alt: images[2].alt,
|
|
874
|
+
className: cn("h-full w-full object-cover", images[2].className),
|
|
875
|
+
optixFlowConfig
|
|
876
|
+
}
|
|
877
|
+
) })
|
|
878
|
+
] }) });
|
|
879
|
+
}, [imagesSlot, images, imagesClassName, optixFlowConfig]);
|
|
880
|
+
return /* @__PURE__ */ jsx(
|
|
895
881
|
Section,
|
|
896
882
|
{
|
|
897
883
|
background,
|
|
898
884
|
spacing,
|
|
899
885
|
pattern,
|
|
900
886
|
patternOpacity,
|
|
901
|
-
className: cn(className),
|
|
902
|
-
|
|
903
|
-
|
|
887
|
+
className: cn("relative flex items-center justify-center", className),
|
|
888
|
+
containerClassName,
|
|
889
|
+
children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
890
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center text-center", children: [
|
|
904
891
|
badgeText && (typeof badgeText === "string" ? /* @__PURE__ */ jsx("p", { className: "text-xs uppercase", children: badgeText }) : badgeText),
|
|
905
892
|
heading && (typeof heading === "string" ? /* @__PURE__ */ jsx("h1", { className: cn("my-3 text-2xl font-bold text-pretty sm:text-4xl md:my-6 lg:text-5xl", headingClassName), children: heading }) : /* @__PURE__ */ jsx("h1", { className: cn("my-3 text-2xl font-bold text-pretty sm:text-4xl md:my-6 lg:text-5xl", headingClassName), children: heading })),
|
|
906
|
-
description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("mb-6 max-w-xl md:mb-12 lg:text-xl
|
|
893
|
+
description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("mb-6 max-w-xl md:mb-12 lg:text-xl text-muted-foreground", descriptionClassName), children: description }) : /* @__PURE__ */ jsx("div", { className: descriptionClassName, children: description })),
|
|
907
894
|
renderActions
|
|
908
895
|
] }),
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
"svg",
|
|
912
|
-
{
|
|
913
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
914
|
-
version: "1.1",
|
|
915
|
-
viewBox: "0 0 800 800",
|
|
916
|
-
className: cn("h-full w-full opacity-20", getTextColor(background, "muted")),
|
|
917
|
-
children: Array.from(Array(4e3).keys()).map((dot, index, array) => {
|
|
918
|
-
const angle = 0.2 * index;
|
|
919
|
-
const scalar = 300 + index * (100 / array.length);
|
|
920
|
-
const x = Math.round(Math.cos(angle) * scalar);
|
|
921
|
-
const y = Math.round(Math.sin(angle) * scalar);
|
|
922
|
-
return /* @__PURE__ */ jsx(
|
|
923
|
-
"circle",
|
|
924
|
-
{
|
|
925
|
-
r: 1,
|
|
926
|
-
cx: 400 + x,
|
|
927
|
-
cy: 400 + y,
|
|
928
|
-
fill: "currentColor",
|
|
929
|
-
opacity: (array.length - index) / array.length
|
|
930
|
-
},
|
|
931
|
-
index
|
|
932
|
-
);
|
|
933
|
-
})
|
|
934
|
-
}
|
|
935
|
-
) }),
|
|
936
|
-
/* @__PURE__ */ jsx("div", { className: cn("absolute inset-0 z-5 m-auto flex aspect-29/36 w-4/5 max-w-[16rem] translate-x-[-75%] translate-y-[10%] scale-[0.85] rotate-[-15deg] justify-center rounded-lg border border-border opacity-60 md:w-85 md:max-w-85", getNestedCardBg(background, "accent")) }),
|
|
937
|
-
/* @__PURE__ */ jsx("div", { className: cn("absolute inset-0 z-10 m-auto flex aspect-29/36 w-4/5 max-w-[16rem] translate-x-[-40%] translate-y-[5%] scale-[0.9] rotate-[-7deg] justify-center rounded-lg border border-border opacity-80 md:w-85 md:max-w-85", getNestedCardBg(background, "accent")) }),
|
|
938
|
-
/* @__PURE__ */ jsx("div", { className: cn("absolute inset-0 z-20 m-auto flex aspect-29/36 w-4/5 max-w-[16rem] justify-center rounded-lg border border-border md:w-85 md:max-w-85", getNestedCardBg(background, "accent")) })
|
|
939
|
-
] }) })
|
|
940
|
-
]
|
|
896
|
+
renderImages
|
|
897
|
+
] })
|
|
941
898
|
}
|
|
942
899
|
);
|
|
943
900
|
}
|