@opensite/ui 2.0.6 → 2.0.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-adaptable-product-grid.cjs +1 -1
- package/dist/hero-adaptable-product-grid.js +1 -1
- package/dist/hero-agency-animated-images.cjs +795 -631
- package/dist/hero-agency-animated-images.d.cts +13 -9
- package/dist/hero-agency-animated-images.d.ts +13 -9
- package/dist/hero-agency-animated-images.js +794 -630
- package/dist/hero-business-carousel-dots.cjs +822 -911
- package/dist/hero-business-carousel-dots.d.cts +5 -1
- package/dist/hero-business-carousel-dots.d.ts +5 -1
- package/dist/hero-business-carousel-dots.js +824 -910
- package/dist/hero-coming-soon-countdown.cjs +267 -110
- package/dist/hero-coming-soon-countdown.d.cts +8 -11
- package/dist/hero-coming-soon-countdown.d.ts +8 -11
- package/dist/hero-coming-soon-countdown.js +268 -111
- package/dist/hero-conversation-intelligence.cjs +673 -639
- package/dist/hero-conversation-intelligence.js +663 -629
- package/dist/hero-creative-studio-stacked.cjs +899 -861
- package/dist/hero-creative-studio-stacked.d.cts +16 -15
- package/dist/hero-creative-studio-stacked.d.ts +16 -15
- package/dist/hero-creative-studio-stacked.js +897 -859
- package/dist/hero-customer-support-layered.cjs +89 -76
- package/dist/hero-customer-support-layered.js +89 -76
- package/dist/hero-developer-tools-code.cjs +721 -669
- package/dist/hero-developer-tools-code.d.cts +5 -1
- package/dist/hero-developer-tools-code.d.ts +5 -1
- package/dist/hero-developer-tools-code.js +719 -667
- package/dist/hero-digital-agency-fullscreen.cjs +722 -680
- package/dist/hero-digital-agency-fullscreen.d.cts +4 -20
- package/dist/hero-digital-agency-fullscreen.d.ts +4 -20
- package/dist/hero-digital-agency-fullscreen.js +722 -680
- package/dist/hero-ecommerce-product-showcase.cjs +892 -846
- package/dist/hero-ecommerce-product-showcase.js +889 -843
- package/dist/hero-enterprise-security.cjs +168 -132
- package/dist/hero-enterprise-security.d.cts +12 -19
- package/dist/hero-enterprise-security.d.ts +12 -19
- package/dist/hero-enterprise-security.js +168 -132
- package/dist/hero-event-registration.cjs +39 -39
- package/dist/hero-event-registration.js +39 -39
- package/dist/hero-fullscreen-background-image.cjs +3 -2
- package/dist/hero-fullscreen-background-image.js +3 -2
- package/dist/hero-fullscreen-logo-cta.cjs +4 -2
- package/dist/hero-fullscreen-logo-cta.js +4 -2
- package/dist/hero-innovation-image-grid.cjs +2 -2
- package/dist/hero-innovation-image-grid.js +2 -2
- package/dist/hero-mental-health-team.cjs +17 -17
- package/dist/hero-mental-health-team.d.cts +5 -5
- package/dist/hero-mental-health-team.d.ts +5 -5
- package/dist/hero-mental-health-team.js +17 -17
- package/dist/hero-mobile-app-download.cjs +2 -2
- package/dist/hero-mobile-app-download.js +2 -2
- package/dist/hero-newsletter-minimal.cjs +97 -57
- package/dist/hero-newsletter-minimal.d.cts +5 -1
- package/dist/hero-newsletter-minimal.d.ts +5 -1
- package/dist/hero-newsletter-minimal.js +97 -57
- package/dist/hero-shared-inbox-layered.cjs +522 -42
- package/dist/hero-shared-inbox-layered.d.cts +20 -4
- package/dist/hero-shared-inbox-layered.d.ts +20 -4
- package/dist/hero-shared-inbox-layered.js +505 -40
- package/dist/hero-startup-launch-cta.cjs +859 -816
- package/dist/hero-startup-launch-cta.d.cts +3 -2
- package/dist/hero-startup-launch-cta.d.ts +3 -2
- package/dist/hero-startup-launch-cta.js +858 -815
- package/dist/hero-therapy-testimonial-grid.cjs +1 -1
- package/dist/hero-therapy-testimonial-grid.js +1 -1
- package/dist/hero-video-dialog-gradient-BnCFFec0.d.ts +99 -0
- package/dist/hero-video-dialog-gradient-Dapebkzu.d.cts +99 -0
- package/dist/hero-video-dialog-gradient.cjs +24 -23
- package/dist/hero-video-dialog-gradient.d.cts +4 -94
- package/dist/hero-video-dialog-gradient.d.ts +4 -94
- package/dist/hero-video-dialog-gradient.js +24 -23
- package/dist/hero-welcome-asymmetric-images.cjs +652 -617
- package/dist/hero-welcome-asymmetric-images.d.cts +5 -1
- package/dist/hero-welcome-asymmetric-images.d.ts +5 -1
- package/dist/hero-welcome-asymmetric-images.js +651 -616
- package/dist/registry.cjs +1111 -848
- package/dist/registry.js +1111 -848
- package/package.json +1 -1
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var React = require('react');
|
|
5
|
+
var framerMotion = require('framer-motion');
|
|
5
6
|
var clsx = require('clsx');
|
|
6
7
|
var tailwindMerge = require('tailwind-merge');
|
|
7
8
|
var classVarianceAuthority = require('class-variance-authority');
|
|
8
9
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
10
|
var icon = require('@page-speed/icon');
|
|
11
|
+
var reactSlot = require('@radix-ui/react-slot');
|
|
12
|
+
var usePlatformFromUrl = require('@opensite/hooks/usePlatformFromUrl');
|
|
10
13
|
|
|
11
14
|
function _interopNamespace(e) {
|
|
12
15
|
if (e && e.__esModule) return e;
|
|
@@ -32,66 +35,6 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
|
32
35
|
function cn(...inputs) {
|
|
33
36
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
34
37
|
}
|
|
35
|
-
function getNestedCardBg(parentBg, variant = "muted", options) {
|
|
36
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
37
|
-
if (isDark) {
|
|
38
|
-
switch (variant) {
|
|
39
|
-
case "muted":
|
|
40
|
-
return "bg-background";
|
|
41
|
-
case "card":
|
|
42
|
-
return "bg-card";
|
|
43
|
-
case "accent":
|
|
44
|
-
return "bg-accent";
|
|
45
|
-
case "subtle":
|
|
46
|
-
return "bg-background/50";
|
|
47
|
-
}
|
|
48
|
-
} else {
|
|
49
|
-
switch (variant) {
|
|
50
|
-
case "muted":
|
|
51
|
-
return "bg-muted";
|
|
52
|
-
case "card":
|
|
53
|
-
return "bg-card";
|
|
54
|
-
case "accent":
|
|
55
|
-
return "bg-accent";
|
|
56
|
-
case "subtle":
|
|
57
|
-
return "bg-muted/50";
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
function getNestedCardTextColor(parentBg, options) {
|
|
62
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
63
|
-
return isDark ? "text-foreground" : "";
|
|
64
|
-
}
|
|
65
|
-
function getTextColor(parentBg, variant = "default", options) {
|
|
66
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
67
|
-
if (isDark) {
|
|
68
|
-
switch (variant) {
|
|
69
|
-
case "default":
|
|
70
|
-
return "text-foreground";
|
|
71
|
-
case "muted":
|
|
72
|
-
return "text-foreground/80";
|
|
73
|
-
case "subtle":
|
|
74
|
-
return "text-foreground/60";
|
|
75
|
-
case "accent":
|
|
76
|
-
return "text-accent-foreground";
|
|
77
|
-
}
|
|
78
|
-
} else {
|
|
79
|
-
switch (variant) {
|
|
80
|
-
case "default":
|
|
81
|
-
return "text-foreground";
|
|
82
|
-
case "muted":
|
|
83
|
-
return "text-muted-foreground";
|
|
84
|
-
case "subtle":
|
|
85
|
-
return "text-muted-foreground/70";
|
|
86
|
-
case "accent":
|
|
87
|
-
return "text-primary";
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
function getAccentColor(parentBg, options) {
|
|
92
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
93
|
-
return isDark ? "text-accent-foreground" : "text-primary";
|
|
94
|
-
}
|
|
95
38
|
function normalizePhoneNumber(input) {
|
|
96
39
|
const trimmed = input.trim();
|
|
97
40
|
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
@@ -905,12 +848,163 @@ var Section = React__namespace.default.forwardRef(
|
|
|
905
848
|
}
|
|
906
849
|
);
|
|
907
850
|
Section.displayName = "Section";
|
|
851
|
+
var badgeVariants = classVarianceAuthority.cva(
|
|
852
|
+
"inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
853
|
+
{
|
|
854
|
+
variants: {
|
|
855
|
+
variant: {
|
|
856
|
+
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
857
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
858
|
+
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
859
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
860
|
+
}
|
|
861
|
+
},
|
|
862
|
+
defaultVariants: {
|
|
863
|
+
variant: "default"
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
);
|
|
867
|
+
function Badge({
|
|
868
|
+
className,
|
|
869
|
+
variant,
|
|
870
|
+
asChild = false,
|
|
871
|
+
...props
|
|
872
|
+
}) {
|
|
873
|
+
const Comp = asChild ? reactSlot.Slot : "span";
|
|
874
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
875
|
+
Comp,
|
|
876
|
+
{
|
|
877
|
+
"data-slot": "badge",
|
|
878
|
+
className: cn(badgeVariants({ variant }), className),
|
|
879
|
+
...props
|
|
880
|
+
}
|
|
881
|
+
);
|
|
882
|
+
}
|
|
883
|
+
var platformIconMap = {
|
|
884
|
+
instagram: "cib/instagram",
|
|
885
|
+
linkedin: "cib/linkedin",
|
|
886
|
+
google: "cib/google",
|
|
887
|
+
facebook: "cib/facebook",
|
|
888
|
+
tiktok: "cib/tiktok",
|
|
889
|
+
youtube: "cib/youtube",
|
|
890
|
+
yelp: "cib/yelp",
|
|
891
|
+
spotify: "cib/spotify",
|
|
892
|
+
apple: "cib/apple",
|
|
893
|
+
x: "line-md/twitter-x-alt",
|
|
894
|
+
github: "cib/github",
|
|
895
|
+
snapchat: "cib/snapchat",
|
|
896
|
+
discord: "cib/discord",
|
|
897
|
+
dev: "simple-icons/devdotto",
|
|
898
|
+
substack: "simple-icons/substack",
|
|
899
|
+
reddit: "cib/reddit",
|
|
900
|
+
pinterest: "cib/pinterest",
|
|
901
|
+
threads: "simple-icons/threads",
|
|
902
|
+
twitch: "cib/twitch",
|
|
903
|
+
whatsapp: "cib/whatsapp",
|
|
904
|
+
telegram: "cib/telegram",
|
|
905
|
+
medium: "simple-icons/medium",
|
|
906
|
+
patreon: "cib/patreon",
|
|
907
|
+
onlyfans: "simple-icons/onlyfans",
|
|
908
|
+
eventbrite: "cib/eventbrite",
|
|
909
|
+
npmjs: "simple-icons/npm",
|
|
910
|
+
crates: "cib/rust",
|
|
911
|
+
rubygems: "cib/rubygems",
|
|
912
|
+
behance: "cib/behance",
|
|
913
|
+
dribbble: "cib/dribbble",
|
|
914
|
+
unknown: "icon-park-solid/circular-connection"
|
|
915
|
+
};
|
|
916
|
+
var SocialLinkIcon = React__namespace.forwardRef(
|
|
917
|
+
({
|
|
918
|
+
platformName,
|
|
919
|
+
label,
|
|
920
|
+
iconSize = 20,
|
|
921
|
+
iconColor,
|
|
922
|
+
href,
|
|
923
|
+
iconClassName,
|
|
924
|
+
className,
|
|
925
|
+
iconNameOverride,
|
|
926
|
+
...pressableProps
|
|
927
|
+
}, ref) => {
|
|
928
|
+
const platform = usePlatformFromUrl.usePlatformFromUrl(href);
|
|
929
|
+
const smartPlatformName = React__namespace.useMemo(() => {
|
|
930
|
+
return platform || platformName;
|
|
931
|
+
}, [platform, platformName]);
|
|
932
|
+
const iconName = React__namespace.useMemo(() => {
|
|
933
|
+
return iconNameOverride || platformIconMap[smartPlatformName];
|
|
934
|
+
}, [iconNameOverride, smartPlatformName]);
|
|
935
|
+
const accessibleLabel = React__namespace.useMemo(() => {
|
|
936
|
+
return label || platformName;
|
|
937
|
+
}, [label, platformName]);
|
|
938
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
939
|
+
Pressable,
|
|
940
|
+
{
|
|
941
|
+
ref,
|
|
942
|
+
href,
|
|
943
|
+
"aria-label": accessibleLabel,
|
|
944
|
+
className: cn(
|
|
945
|
+
"inline-flex items-center justify-center transition-colors",
|
|
946
|
+
className
|
|
947
|
+
),
|
|
948
|
+
...pressableProps,
|
|
949
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
950
|
+
DynamicIcon,
|
|
951
|
+
{
|
|
952
|
+
name: iconName,
|
|
953
|
+
size: iconSize,
|
|
954
|
+
color: iconColor,
|
|
955
|
+
className: iconClassName,
|
|
956
|
+
alt: accessibleLabel
|
|
957
|
+
}
|
|
958
|
+
)
|
|
959
|
+
}
|
|
960
|
+
);
|
|
961
|
+
}
|
|
962
|
+
);
|
|
963
|
+
SocialLinkIcon.displayName = "SocialLinkIcon";
|
|
964
|
+
var digitVariants = {
|
|
965
|
+
initial: { y: -20, opacity: 0 },
|
|
966
|
+
animate: {
|
|
967
|
+
y: 0,
|
|
968
|
+
opacity: 1,
|
|
969
|
+
transition: { type: "spring", stiffness: 300, damping: 25 }
|
|
970
|
+
},
|
|
971
|
+
exit: {
|
|
972
|
+
y: 20,
|
|
973
|
+
opacity: 0,
|
|
974
|
+
transition: { duration: 0.15 }
|
|
975
|
+
}
|
|
976
|
+
};
|
|
977
|
+
function CountdownDigit({ value, label }) {
|
|
978
|
+
const display = value.toString().padStart(2, "0");
|
|
979
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
|
|
980
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
981
|
+
"div",
|
|
982
|
+
{
|
|
983
|
+
className: cn(
|
|
984
|
+
"flex h-16 w-16 items-center justify-center overflow-hidden rounded-xl text-3xl font-bold md:h-24 md:w-24 md:text-5xl"
|
|
985
|
+
),
|
|
986
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "popLayout", initial: false, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
987
|
+
framerMotion.motion.span,
|
|
988
|
+
{
|
|
989
|
+
variants: digitVariants,
|
|
990
|
+
initial: "initial",
|
|
991
|
+
animate: "animate",
|
|
992
|
+
exit: "exit",
|
|
993
|
+
children: display
|
|
994
|
+
},
|
|
995
|
+
display
|
|
996
|
+
) })
|
|
997
|
+
}
|
|
998
|
+
),
|
|
999
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("mt-2 text-sm"), children: label })
|
|
1000
|
+
] });
|
|
1001
|
+
}
|
|
908
1002
|
function HeroComingSoonCountdown({
|
|
909
1003
|
badgeIcon,
|
|
910
1004
|
badgeText,
|
|
911
1005
|
heading,
|
|
912
1006
|
description,
|
|
913
|
-
|
|
1007
|
+
countdownDate,
|
|
914
1008
|
countdownSlot,
|
|
915
1009
|
emailPlaceholder = "Enter your email",
|
|
916
1010
|
submitAction,
|
|
@@ -918,11 +1012,12 @@ function HeroComingSoonCountdown({
|
|
|
918
1012
|
socialLinks,
|
|
919
1013
|
socialLinksSlot,
|
|
920
1014
|
background,
|
|
921
|
-
|
|
1015
|
+
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
1016
|
+
spacing = "xl",
|
|
922
1017
|
pattern,
|
|
923
1018
|
patternOpacity,
|
|
1019
|
+
patternClassName,
|
|
924
1020
|
className,
|
|
925
|
-
containerClassName,
|
|
926
1021
|
badgeClassName,
|
|
927
1022
|
headingClassName,
|
|
928
1023
|
descriptionClassName,
|
|
@@ -930,55 +1025,69 @@ function HeroComingSoonCountdown({
|
|
|
930
1025
|
formClassName,
|
|
931
1026
|
socialLinksClassName
|
|
932
1027
|
}) {
|
|
933
|
-
const
|
|
934
|
-
|
|
935
|
-
if (!
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
1028
|
+
const [timeLeft, setTimeLeft] = React.useState(null);
|
|
1029
|
+
const calculateTimeLeft = React.useCallback(() => {
|
|
1030
|
+
if (!countdownDate) return null;
|
|
1031
|
+
const now = Date.now();
|
|
1032
|
+
const target = countdownDate.getTime();
|
|
1033
|
+
const diff = target - now;
|
|
1034
|
+
if (diff <= 0) return null;
|
|
1035
|
+
return {
|
|
1036
|
+
days: Math.floor(diff / (1e3 * 60 * 60 * 24)),
|
|
1037
|
+
hours: Math.floor(diff % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)),
|
|
1038
|
+
minutes: Math.floor(diff % (1e3 * 60 * 60) / (1e3 * 60)),
|
|
1039
|
+
seconds: Math.floor(diff % (1e3 * 60) / 1e3)
|
|
1040
|
+
};
|
|
1041
|
+
}, [countdownDate]);
|
|
1042
|
+
React.useEffect(() => {
|
|
1043
|
+
setTimeLeft(calculateTimeLeft());
|
|
1044
|
+
if (!countdownDate) return;
|
|
1045
|
+
const timer = setInterval(() => {
|
|
1046
|
+
const remaining = calculateTimeLeft();
|
|
1047
|
+
setTimeLeft(remaining);
|
|
1048
|
+
if (!remaining) clearInterval(timer);
|
|
1049
|
+
}, 1e3);
|
|
1050
|
+
return () => clearInterval(timer);
|
|
1051
|
+
}, [countdownDate, calculateTimeLeft]);
|
|
1052
|
+
const showCountdown = countdownSlot || timeLeft;
|
|
945
1053
|
const renderForm = React.useMemo(() => {
|
|
946
1054
|
if (formSlot) return formSlot;
|
|
947
1055
|
if (!submitAction) return null;
|
|
948
|
-
const {
|
|
1056
|
+
const {
|
|
1057
|
+
label,
|
|
1058
|
+
icon,
|
|
1059
|
+
iconAfter,
|
|
1060
|
+
children,
|
|
1061
|
+
className: actionClassName,
|
|
1062
|
+
...pressableProps
|
|
1063
|
+
} = submitAction;
|
|
949
1064
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
950
1065
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
951
1066
|
Input,
|
|
952
1067
|
{
|
|
953
1068
|
type: "email",
|
|
954
1069
|
placeholder: emailPlaceholder,
|
|
955
|
-
className: cn("h-12 flex-1 border-border/50"
|
|
1070
|
+
className: cn("h-12 flex-1 border-border/50")
|
|
956
1071
|
}
|
|
957
1072
|
),
|
|
958
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
...pressableProps,
|
|
964
|
-
children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
965
|
-
icon,
|
|
966
|
-
label,
|
|
967
|
-
iconAfter
|
|
968
|
-
] })
|
|
969
|
-
}
|
|
970
|
-
)
|
|
1073
|
+
/* @__PURE__ */ jsxRuntime.jsx(Pressable, { asButton: true, className: actionClassName, ...pressableProps, children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1074
|
+
icon,
|
|
1075
|
+
label,
|
|
1076
|
+
iconAfter
|
|
1077
|
+
] }) })
|
|
971
1078
|
] });
|
|
972
1079
|
}, [formSlot, submitAction, emailPlaceholder]);
|
|
973
1080
|
const renderSocialLinks = React.useMemo(() => {
|
|
974
1081
|
if (socialLinksSlot) return socialLinksSlot;
|
|
975
1082
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
976
1083
|
return socialLinks.map((link, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
977
|
-
|
|
1084
|
+
SocialLinkIcon,
|
|
978
1085
|
{
|
|
979
1086
|
href: link.href,
|
|
980
|
-
className: cn(
|
|
981
|
-
|
|
1087
|
+
className: cn("hover:opacity-80", link.className),
|
|
1088
|
+
asButton: true,
|
|
1089
|
+
variant: "outline",
|
|
1090
|
+
size: "icon"
|
|
982
1091
|
},
|
|
983
1092
|
index
|
|
984
1093
|
));
|
|
@@ -986,25 +1095,73 @@ function HeroComingSoonCountdown({
|
|
|
986
1095
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
987
1096
|
Section,
|
|
988
1097
|
{
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
), children: [
|
|
1000
|
-
badgeIcon && /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: badgeIcon, size: 16, className: getAccentColor(background) }),
|
|
1098
|
+
background,
|
|
1099
|
+
spacing,
|
|
1100
|
+
pattern,
|
|
1101
|
+
patternOpacity,
|
|
1102
|
+
patternClassName,
|
|
1103
|
+
className,
|
|
1104
|
+
containerClassName,
|
|
1105
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-8 md:pt-0", children: [
|
|
1106
|
+
(badgeText || badgeIcon) && /* @__PURE__ */ jsxRuntime.jsxs(Badge, { className: cn("gap-2 px-4 py-2", badgeClassName), children: [
|
|
1107
|
+
badgeIcon && /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: badgeIcon, size: 16 }),
|
|
1001
1108
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: badgeText })
|
|
1002
1109
|
] }),
|
|
1003
|
-
heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1110
|
+
heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1111
|
+
"h1",
|
|
1112
|
+
{
|
|
1113
|
+
className: cn(
|
|
1114
|
+
"mt-8 max-w-3xl text-5xl font-bold tracking-tight md:text-6xl lg:text-7xl text-balance",
|
|
1115
|
+
headingClassName
|
|
1116
|
+
),
|
|
1117
|
+
children: heading
|
|
1118
|
+
}
|
|
1119
|
+
) : heading),
|
|
1120
|
+
description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1121
|
+
"p",
|
|
1122
|
+
{
|
|
1123
|
+
className: cn(
|
|
1124
|
+
"mt-6 max-w-xl text-lg md:text-xl text-balance",
|
|
1125
|
+
descriptionClassName
|
|
1126
|
+
),
|
|
1127
|
+
children: description
|
|
1128
|
+
}
|
|
1129
|
+
) : description),
|
|
1130
|
+
showCountdown && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1131
|
+
"div",
|
|
1132
|
+
{
|
|
1133
|
+
className: cn(
|
|
1134
|
+
"mt-12 grid grid-cols-4 gap-4 md:gap-8",
|
|
1135
|
+
countdownClassName
|
|
1136
|
+
),
|
|
1137
|
+
children: countdownSlot ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1138
|
+
/* @__PURE__ */ jsxRuntime.jsx(CountdownDigit, { value: timeLeft.days, label: "Days" }),
|
|
1139
|
+
/* @__PURE__ */ jsxRuntime.jsx(CountdownDigit, { value: timeLeft.hours, label: "Hours" }),
|
|
1140
|
+
/* @__PURE__ */ jsxRuntime.jsx(CountdownDigit, { value: timeLeft.minutes, label: "Minutes" }),
|
|
1141
|
+
/* @__PURE__ */ jsxRuntime.jsx(CountdownDigit, { value: timeLeft.seconds, label: "Seconds" })
|
|
1142
|
+
] })
|
|
1143
|
+
}
|
|
1144
|
+
),
|
|
1145
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1146
|
+
"div",
|
|
1147
|
+
{
|
|
1148
|
+
className: cn(
|
|
1149
|
+
"mt-12 flex w-full max-w-md flex-col gap-4 sm:flex-row",
|
|
1150
|
+
formClassName
|
|
1151
|
+
),
|
|
1152
|
+
children: renderForm
|
|
1153
|
+
}
|
|
1154
|
+
),
|
|
1155
|
+
(socialLinksSlot || socialLinks && socialLinks.length > 0) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1156
|
+
"div",
|
|
1157
|
+
{
|
|
1158
|
+
className: cn(
|
|
1159
|
+
"mt-16 flex items-center gap-6",
|
|
1160
|
+
socialLinksClassName
|
|
1161
|
+
),
|
|
1162
|
+
children: renderSocialLinks
|
|
1163
|
+
}
|
|
1164
|
+
)
|
|
1008
1165
|
] })
|
|
1009
1166
|
}
|
|
1010
1167
|
);
|
|
@@ -6,13 +6,6 @@ import 'class-variance-authority';
|
|
|
6
6
|
import './button-variants-lRElsmTc.cjs';
|
|
7
7
|
import 'class-variance-authority/types';
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
* Countdown item configuration
|
|
11
|
-
*/
|
|
12
|
-
interface CountdownItem {
|
|
13
|
-
value: string;
|
|
14
|
-
label: string;
|
|
15
|
-
}
|
|
16
9
|
interface HeroComingSoonCountdownProps {
|
|
17
10
|
/**
|
|
18
11
|
* Badge icon name (DynamicIcon format)
|
|
@@ -31,11 +24,11 @@ interface HeroComingSoonCountdownProps {
|
|
|
31
24
|
*/
|
|
32
25
|
description?: React.ReactNode;
|
|
33
26
|
/**
|
|
34
|
-
*
|
|
27
|
+
* Target date for the countdown. If in the past or not provided, countdown is hidden.
|
|
35
28
|
*/
|
|
36
|
-
|
|
29
|
+
countdownDate?: Date;
|
|
37
30
|
/**
|
|
38
|
-
* Custom slot for countdown (overrides
|
|
31
|
+
* Custom slot for countdown (overrides countdownDate)
|
|
39
32
|
*/
|
|
40
33
|
countdownSlot?: React.ReactNode;
|
|
41
34
|
/**
|
|
@@ -108,7 +101,11 @@ interface HeroComingSoonCountdownProps {
|
|
|
108
101
|
* Additional CSS classes for the social links container
|
|
109
102
|
*/
|
|
110
103
|
socialLinksClassName?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Additional CSS classes for the pattern overlay
|
|
106
|
+
*/
|
|
107
|
+
patternClassName?: string;
|
|
111
108
|
}
|
|
112
|
-
declare function HeroComingSoonCountdown({ badgeIcon, badgeText, heading, description,
|
|
109
|
+
declare function HeroComingSoonCountdown({ badgeIcon, badgeText, heading, description, countdownDate, countdownSlot, emailPlaceholder, submitAction, formSlot, socialLinks, socialLinksSlot, background, containerClassName, spacing, pattern, patternOpacity, patternClassName, className, badgeClassName, headingClassName, descriptionClassName, countdownClassName, formClassName, socialLinksClassName, }: HeroComingSoonCountdownProps): React.JSX.Element;
|
|
113
110
|
|
|
114
111
|
export { HeroComingSoonCountdown, type HeroComingSoonCountdownProps };
|
|
@@ -6,13 +6,6 @@ import 'class-variance-authority';
|
|
|
6
6
|
import './button-variants-lRElsmTc.js';
|
|
7
7
|
import 'class-variance-authority/types';
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
* Countdown item configuration
|
|
11
|
-
*/
|
|
12
|
-
interface CountdownItem {
|
|
13
|
-
value: string;
|
|
14
|
-
label: string;
|
|
15
|
-
}
|
|
16
9
|
interface HeroComingSoonCountdownProps {
|
|
17
10
|
/**
|
|
18
11
|
* Badge icon name (DynamicIcon format)
|
|
@@ -31,11 +24,11 @@ interface HeroComingSoonCountdownProps {
|
|
|
31
24
|
*/
|
|
32
25
|
description?: React.ReactNode;
|
|
33
26
|
/**
|
|
34
|
-
*
|
|
27
|
+
* Target date for the countdown. If in the past or not provided, countdown is hidden.
|
|
35
28
|
*/
|
|
36
|
-
|
|
29
|
+
countdownDate?: Date;
|
|
37
30
|
/**
|
|
38
|
-
* Custom slot for countdown (overrides
|
|
31
|
+
* Custom slot for countdown (overrides countdownDate)
|
|
39
32
|
*/
|
|
40
33
|
countdownSlot?: React.ReactNode;
|
|
41
34
|
/**
|
|
@@ -108,7 +101,11 @@ interface HeroComingSoonCountdownProps {
|
|
|
108
101
|
* Additional CSS classes for the social links container
|
|
109
102
|
*/
|
|
110
103
|
socialLinksClassName?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Additional CSS classes for the pattern overlay
|
|
106
|
+
*/
|
|
107
|
+
patternClassName?: string;
|
|
111
108
|
}
|
|
112
|
-
declare function HeroComingSoonCountdown({ badgeIcon, badgeText, heading, description,
|
|
109
|
+
declare function HeroComingSoonCountdown({ badgeIcon, badgeText, heading, description, countdownDate, countdownSlot, emailPlaceholder, submitAction, formSlot, socialLinks, socialLinksSlot, background, containerClassName, spacing, pattern, patternOpacity, patternClassName, className, badgeClassName, headingClassName, descriptionClassName, countdownClassName, formClassName, socialLinksClassName, }: HeroComingSoonCountdownProps): React.JSX.Element;
|
|
113
110
|
|
|
114
111
|
export { HeroComingSoonCountdown, type HeroComingSoonCountdownProps };
|