@opensite/ui 2.0.8 → 2.1.0

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.
Files changed (43) hide show
  1. package/dist/hero-agency-animated-images.cjs +4 -4
  2. package/dist/hero-agency-animated-images.js +4 -4
  3. package/dist/hero-business-carousel-dots.cjs +46 -36
  4. package/dist/hero-business-carousel-dots.js +46 -36
  5. package/dist/hero-coming-soon-countdown.cjs +93 -54
  6. package/dist/hero-coming-soon-countdown.d.cts +31 -6
  7. package/dist/hero-coming-soon-countdown.d.ts +31 -6
  8. package/dist/hero-coming-soon-countdown.js +93 -54
  9. package/dist/hero-creative-studio-stacked.cjs +9 -6
  10. package/dist/hero-creative-studio-stacked.d.cts +5 -1
  11. package/dist/hero-creative-studio-stacked.d.ts +5 -1
  12. package/dist/hero-creative-studio-stacked.js +9 -6
  13. package/dist/hero-customer-support-layered.cjs +1 -1
  14. package/dist/hero-customer-support-layered.js +1 -1
  15. package/dist/hero-developer-tools-code.cjs +2 -2
  16. package/dist/hero-developer-tools-code.js +2 -2
  17. package/dist/hero-digital-agency-fullscreen.cjs +14 -12
  18. package/dist/hero-digital-agency-fullscreen.d.cts +1 -1
  19. package/dist/hero-digital-agency-fullscreen.d.ts +1 -1
  20. package/dist/hero-digital-agency-fullscreen.js +14 -12
  21. package/dist/hero-ecommerce-product-showcase.cjs +76 -57
  22. package/dist/hero-ecommerce-product-showcase.js +76 -57
  23. package/dist/hero-enterprise-security.cjs +81 -60
  24. package/dist/hero-enterprise-security.js +81 -60
  25. package/dist/hero-event-registration.cjs +43 -10
  26. package/dist/hero-event-registration.js +43 -10
  27. package/dist/hero-hiring-animated-text.cjs +661 -639
  28. package/dist/hero-hiring-animated-text.d.cts +1 -9
  29. package/dist/hero-hiring-animated-text.d.ts +1 -9
  30. package/dist/hero-hiring-animated-text.js +657 -635
  31. package/dist/hero-saas-dashboard-preview.cjs +88 -46
  32. package/dist/hero-saas-dashboard-preview.d.cts +34 -19
  33. package/dist/hero-saas-dashboard-preview.d.ts +34 -19
  34. package/dist/hero-saas-dashboard-preview.js +89 -47
  35. package/dist/hero-split-image-newsletter.cjs +91 -49
  36. package/dist/hero-split-image-newsletter.d.cts +33 -18
  37. package/dist/hero-split-image-newsletter.d.ts +33 -18
  38. package/dist/hero-split-image-newsletter.js +92 -50
  39. package/dist/hero-startup-launch-cta.cjs +2 -2
  40. package/dist/hero-startup-launch-cta.js +2 -2
  41. package/dist/registry.cjs +556 -345
  42. package/dist/registry.js +556 -345
  43. package/package.json +1 -1
@@ -1024,12 +1024,12 @@ function HeroAgencyAnimatedImages({
1024
1024
  patternOpacity,
1025
1025
  className,
1026
1026
  containerClassName,
1027
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pt-10 md:pt-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid w-full grid-cols-1 items-center justify-between gap-14 lg:grid-cols-2", children: [
1027
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pt-10 md:pt-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid w-full gap-12 md:gap-20 grid-cols-1 lg:grid-cols-2", children: [
1028
1028
  /* @__PURE__ */ jsxRuntime.jsxs(
1029
1029
  "div",
1030
1030
  {
1031
1031
  className: cn(
1032
- "flex w-full max-w-125 flex-col gap-8 md:gap-14 lg:max-w-full",
1032
+ "flex w-full flex-col gap-4 items-start",
1033
1033
  contentClassName
1034
1034
  ),
1035
1035
  children: [
@@ -1037,12 +1037,12 @@ function HeroAgencyAnimatedImages({
1037
1037
  "h1",
1038
1038
  {
1039
1039
  className: cn(
1040
- "text-5xl md:text-6xl lg:text-7xl xl:text-[5rem] text-left text-pretty",
1040
+ "text-4xl md:text-5xl lg:text-7xl xl:text-[5rem] font-bold text-left text-pretty",
1041
1041
  headingClassName
1042
1042
  ),
1043
1043
  children: heading
1044
1044
  }
1045
- ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: headingClassName, children: heading })),
1045
+ ) : heading),
1046
1046
  description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
1047
1047
  "p",
1048
1048
  {
@@ -1002,12 +1002,12 @@ function HeroAgencyAnimatedImages({
1002
1002
  patternOpacity,
1003
1003
  className,
1004
1004
  containerClassName,
1005
- children: /* @__PURE__ */ jsx("div", { className: "pt-10 md:pt-0", children: /* @__PURE__ */ jsxs("div", { className: "grid w-full grid-cols-1 items-center justify-between gap-14 lg:grid-cols-2", children: [
1005
+ children: /* @__PURE__ */ jsx("div", { className: "pt-10 md:pt-0", children: /* @__PURE__ */ jsxs("div", { className: "grid w-full gap-12 md:gap-20 grid-cols-1 lg:grid-cols-2", children: [
1006
1006
  /* @__PURE__ */ jsxs(
1007
1007
  "div",
1008
1008
  {
1009
1009
  className: cn(
1010
- "flex w-full max-w-125 flex-col gap-8 md:gap-14 lg:max-w-full",
1010
+ "flex w-full flex-col gap-4 items-start",
1011
1011
  contentClassName
1012
1012
  ),
1013
1013
  children: [
@@ -1015,12 +1015,12 @@ function HeroAgencyAnimatedImages({
1015
1015
  "h1",
1016
1016
  {
1017
1017
  className: cn(
1018
- "text-5xl md:text-6xl lg:text-7xl xl:text-[5rem] text-left text-pretty",
1018
+ "text-4xl md:text-5xl lg:text-7xl xl:text-[5rem] font-bold text-left text-pretty",
1019
1019
  headingClassName
1020
1020
  ),
1021
1021
  children: heading
1022
1022
  }
1023
- ) : /* @__PURE__ */ jsx("div", { className: headingClassName, children: heading })),
1023
+ ) : heading),
1024
1024
  description && (typeof description === "string" ? /* @__PURE__ */ jsx(
1025
1025
  "p",
1026
1026
  {
@@ -927,11 +927,11 @@ var fadeVariants = {
927
927
  initial: { opacity: 0 },
928
928
  animate: {
929
929
  opacity: 1,
930
- transition: { duration: 0.8, ease: [0.4, 0, 0.2, 1] }
930
+ transition: { duration: 1, ease: [0.4, 0, 0.2, 1] }
931
931
  },
932
932
  exit: {
933
933
  opacity: 0,
934
- transition: { duration: 0.8, ease: [0.4, 0, 0.2, 1] }
934
+ transition: { duration: 1, ease: [0.4, 0, 0.2, 1] }
935
935
  }
936
936
  };
937
937
  function HeroBusinessCarouselDots({
@@ -965,7 +965,7 @@ function HeroBusinessCarouselDots({
965
965
  if (imageCount <= 1) return;
966
966
  timerRef.current = setInterval(() => {
967
967
  setCurrentIndex((prev) => (prev + 1) % imageCount);
968
- }, 4e3);
968
+ }, 7e3);
969
969
  }, [imageCount]);
970
970
  React3.useEffect(() => {
971
971
  startTimer();
@@ -985,42 +985,52 @@ function HeroBusinessCarouselDots({
985
985
  className: cn("overflow-hidden", className),
986
986
  containerClassName,
987
987
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-8 md:pt-0", children: [
988
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mx-auto max-w-5xl text-center", contentClassName), children: [
989
- badge && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: badgeVariant, className: badgeClassName, children: badge }),
990
- heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
991
- "h1",
992
- {
993
- className: cn(
994
- "mt-6 text-4xl font-bold md:text-6xl text-balance",
995
- headingClassName
996
- ),
997
- children: heading
998
- }
999
- ) : heading),
1000
- description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
1001
- "p",
1002
- {
1003
- className: cn(
1004
- "mt-5 text-lg md:text-xl lg:px-32 text-balance",
1005
- descriptionClassName
1006
- ),
1007
- children: description
1008
- }
1009
- ) : description),
1010
- /* @__PURE__ */ jsxRuntime.jsx(
1011
- BlockActions,
1012
- {
1013
- actions,
1014
- actionsSlot,
1015
- actionsClassName
1016
- }
1017
- )
1018
- ] }),
1019
988
  /* @__PURE__ */ jsxRuntime.jsxs(
1020
989
  "div",
1021
990
  {
1022
991
  className: cn(
1023
- "relative mx-4 mt-10 md:mx-10 md:mt-16",
992
+ "mx-auto max-w-full md:max-w-5xl text-center flex flex-col items-center px-4",
993
+ contentClassName
994
+ ),
995
+ children: [
996
+ badge && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: badgeVariant, className: badgeClassName, children: badge }),
997
+ heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
998
+ "h1",
999
+ {
1000
+ className: cn(
1001
+ "mt-6 text-4xl font-bold md:text-6xl text-balance",
1002
+ headingClassName
1003
+ ),
1004
+ children: heading
1005
+ }
1006
+ ) : heading),
1007
+ description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
1008
+ "p",
1009
+ {
1010
+ className: cn(
1011
+ "mt-5 text-lg md:text-xl lg:px-32 text-balance",
1012
+ descriptionClassName
1013
+ ),
1014
+ children: description
1015
+ }
1016
+ ) : description),
1017
+ /* @__PURE__ */ jsxRuntime.jsx(
1018
+ BlockActions,
1019
+ {
1020
+ actions,
1021
+ actionsSlot,
1022
+ actionsClassName,
1023
+ mobileConfig: { width: "full", position: "center" }
1024
+ }
1025
+ )
1026
+ ]
1027
+ }
1028
+ ),
1029
+ /* @__PURE__ */ jsxRuntime.jsxs(
1030
+ "div",
1031
+ {
1032
+ className: cn(
1033
+ "relative mx-4 mt-18 md:mx-10 md:mt-32",
1024
1034
  carouselClassName
1025
1035
  ),
1026
1036
  children: [
@@ -1028,7 +1038,7 @@ function HeroBusinessCarouselDots({
1028
1038
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-0 -right-4 -left-4 z-10 h-px bg-[linear-gradient(to_right,transparent,hsl(var(--border))_4%,hsl(var(--border))_96%,transparent)] md:-right-20 md:-left-20" }),
1029
1039
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -top-10 left-0 z-10 h-[calc(100%+80px)] w-px bg-[linear-gradient(to_bottom,transparent,hsl(var(--border))_4%,hsl(var(--border))_96%,transparent)] md:-top-20 md:h-[calc(100%+160px)]" }),
1030
1040
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -top-10 right-0 z-10 h-[calc(100%+80px)] w-px bg-[linear-gradient(to_bottom,transparent,hsl(var(--border))_4%,hsl(var(--border))_96%,transparent)] md:-top-20 md:h-[calc(100%+160px)]" }),
1031
- carouselSlot ? carouselSlot : activeImage ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative aspect-video w-full overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", initial: false, children: /* @__PURE__ */ jsxRuntime.jsx(
1041
+ carouselSlot ? carouselSlot : activeImage ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative aspect-video w-full overflow-hidden ", children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { initial: false, children: /* @__PURE__ */ jsxRuntime.jsx(
1032
1042
  framerMotion.motion.div,
1033
1043
  {
1034
1044
  variants: fadeVariants,
@@ -906,11 +906,11 @@ var fadeVariants = {
906
906
  initial: { opacity: 0 },
907
907
  animate: {
908
908
  opacity: 1,
909
- transition: { duration: 0.8, ease: [0.4, 0, 0.2, 1] }
909
+ transition: { duration: 1, ease: [0.4, 0, 0.2, 1] }
910
910
  },
911
911
  exit: {
912
912
  opacity: 0,
913
- transition: { duration: 0.8, ease: [0.4, 0, 0.2, 1] }
913
+ transition: { duration: 1, ease: [0.4, 0, 0.2, 1] }
914
914
  }
915
915
  };
916
916
  function HeroBusinessCarouselDots({
@@ -944,7 +944,7 @@ function HeroBusinessCarouselDots({
944
944
  if (imageCount <= 1) return;
945
945
  timerRef.current = setInterval(() => {
946
946
  setCurrentIndex((prev) => (prev + 1) % imageCount);
947
- }, 4e3);
947
+ }, 7e3);
948
948
  }, [imageCount]);
949
949
  useEffect(() => {
950
950
  startTimer();
@@ -964,42 +964,52 @@ function HeroBusinessCarouselDots({
964
964
  className: cn("overflow-hidden", className),
965
965
  containerClassName,
966
966
  children: /* @__PURE__ */ jsxs("div", { className: "pt-8 md:pt-0", children: [
967
- /* @__PURE__ */ jsxs("div", { className: cn("mx-auto max-w-5xl text-center", contentClassName), children: [
968
- badge && /* @__PURE__ */ jsx(Badge, { variant: badgeVariant, className: badgeClassName, children: badge }),
969
- heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
970
- "h1",
971
- {
972
- className: cn(
973
- "mt-6 text-4xl font-bold md:text-6xl text-balance",
974
- headingClassName
975
- ),
976
- children: heading
977
- }
978
- ) : heading),
979
- description && (typeof description === "string" ? /* @__PURE__ */ jsx(
980
- "p",
981
- {
982
- className: cn(
983
- "mt-5 text-lg md:text-xl lg:px-32 text-balance",
984
- descriptionClassName
985
- ),
986
- children: description
987
- }
988
- ) : description),
989
- /* @__PURE__ */ jsx(
990
- BlockActions,
991
- {
992
- actions,
993
- actionsSlot,
994
- actionsClassName
995
- }
996
- )
997
- ] }),
998
967
  /* @__PURE__ */ jsxs(
999
968
  "div",
1000
969
  {
1001
970
  className: cn(
1002
- "relative mx-4 mt-10 md:mx-10 md:mt-16",
971
+ "mx-auto max-w-full md:max-w-5xl text-center flex flex-col items-center px-4",
972
+ contentClassName
973
+ ),
974
+ children: [
975
+ badge && /* @__PURE__ */ jsx(Badge, { variant: badgeVariant, className: badgeClassName, children: badge }),
976
+ heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
977
+ "h1",
978
+ {
979
+ className: cn(
980
+ "mt-6 text-4xl font-bold md:text-6xl text-balance",
981
+ headingClassName
982
+ ),
983
+ children: heading
984
+ }
985
+ ) : heading),
986
+ description && (typeof description === "string" ? /* @__PURE__ */ jsx(
987
+ "p",
988
+ {
989
+ className: cn(
990
+ "mt-5 text-lg md:text-xl lg:px-32 text-balance",
991
+ descriptionClassName
992
+ ),
993
+ children: description
994
+ }
995
+ ) : description),
996
+ /* @__PURE__ */ jsx(
997
+ BlockActions,
998
+ {
999
+ actions,
1000
+ actionsSlot,
1001
+ actionsClassName,
1002
+ mobileConfig: { width: "full", position: "center" }
1003
+ }
1004
+ )
1005
+ ]
1006
+ }
1007
+ ),
1008
+ /* @__PURE__ */ jsxs(
1009
+ "div",
1010
+ {
1011
+ className: cn(
1012
+ "relative mx-4 mt-18 md:mx-10 md:mt-32",
1003
1013
  carouselClassName
1004
1014
  ),
1005
1015
  children: [
@@ -1007,7 +1017,7 @@ function HeroBusinessCarouselDots({
1007
1017
  /* @__PURE__ */ jsx("div", { className: "absolute bottom-0 -right-4 -left-4 z-10 h-px bg-[linear-gradient(to_right,transparent,hsl(var(--border))_4%,hsl(var(--border))_96%,transparent)] md:-right-20 md:-left-20" }),
1008
1018
  /* @__PURE__ */ jsx("div", { className: "absolute -top-10 left-0 z-10 h-[calc(100%+80px)] w-px bg-[linear-gradient(to_bottom,transparent,hsl(var(--border))_4%,hsl(var(--border))_96%,transparent)] md:-top-20 md:h-[calc(100%+160px)]" }),
1009
1019
  /* @__PURE__ */ jsx("div", { className: "absolute -top-10 right-0 z-10 h-[calc(100%+80px)] w-px bg-[linear-gradient(to_bottom,transparent,hsl(var(--border))_4%,hsl(var(--border))_96%,transparent)] md:-top-20 md:h-[calc(100%+160px)]" }),
1010
- carouselSlot ? carouselSlot : activeImage ? /* @__PURE__ */ jsx("div", { className: "relative aspect-video w-full overflow-hidden", children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", initial: false, children: /* @__PURE__ */ jsx(
1020
+ carouselSlot ? carouselSlot : activeImage ? /* @__PURE__ */ jsx("div", { className: "relative aspect-video w-full overflow-hidden ", children: /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: /* @__PURE__ */ jsx(
1011
1021
  motion.div,
1012
1022
  {
1013
1023
  variants: fadeVariants,
@@ -10,6 +10,8 @@ var jsxRuntime = require('react/jsx-runtime');
10
10
  var icon = require('@page-speed/icon');
11
11
  var reactSlot = require('@radix-ui/react-slot');
12
12
  var usePlatformFromUrl = require('@opensite/hooks/usePlatformFromUrl');
13
+ var forms = require('@page-speed/forms');
14
+ var integration = require('@page-speed/forms/integration');
13
15
 
14
16
  function _interopNamespace(e) {
15
17
  if (e && e.__esModule) return e;
@@ -457,22 +459,6 @@ var DEFAULT_ICON_API_KEY = "au382bi7fsh96w9h9xlrnat2jglx";
457
459
  function DynamicIcon({ apiKey, ...props }) {
458
460
  return /* @__PURE__ */ jsxRuntime.jsx(icon.Icon, { ...props, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
459
461
  }
460
- function Input({ className, type, ...props }) {
461
- return /* @__PURE__ */ jsxRuntime.jsx(
462
- "input",
463
- {
464
- type,
465
- "data-slot": "input",
466
- className: cn(
467
- "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
468
- "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
469
- "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
470
- className
471
- ),
472
- ...props
473
- }
474
- );
475
- }
476
462
  var maxWidthStyles = {
477
463
  sm: "max-w-screen-sm",
478
464
  md: "max-w-screen-md",
@@ -961,6 +947,16 @@ var SocialLinkIcon = React__namespace.forwardRef(
961
947
  }
962
948
  );
963
949
  SocialLinkIcon.displayName = "SocialLinkIcon";
950
+ var DEFAULT_FORM_FIELDS = [
951
+ {
952
+ name: "email",
953
+ type: "email",
954
+ label: "Email Address",
955
+ placeholder: "Enter your email",
956
+ required: true,
957
+ columnSpan: 12
958
+ }
959
+ ];
964
960
  var digitVariants = {
965
961
  initial: { y: -20, opacity: 0 },
966
962
  animate: {
@@ -976,7 +972,7 @@ var digitVariants = {
976
972
  };
977
973
  function CountdownDigit({ value, label }) {
978
974
  const display = value.toString().padStart(2, "0");
979
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
975
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center bg-card pt-2 pb-6 px-2 text-card-foreground rounded-xl md:rounded-2xl shadow-xl", children: [
980
976
  /* @__PURE__ */ jsxRuntime.jsx(
981
977
  "div",
982
978
  {
@@ -996,7 +992,7 @@ function CountdownDigit({ value, label }) {
996
992
  ) })
997
993
  }
998
994
  ),
999
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("mt-2 text-sm"), children: label })
995
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("mt-2 text-xs md:text-sm"), children: label })
1000
996
  ] });
1001
997
  }
1002
998
  function HeroComingSoonCountdown({
@@ -1006,8 +1002,14 @@ function HeroComingSoonCountdown({
1006
1002
  description,
1007
1003
  countdownDate,
1008
1004
  countdownSlot,
1009
- emailPlaceholder = "Enter your email",
1010
- submitAction,
1005
+ formFields = DEFAULT_FORM_FIELDS,
1006
+ formConfig,
1007
+ onSubmit,
1008
+ onSuccess,
1009
+ onError,
1010
+ successMessage,
1011
+ buttonAction,
1012
+ helperText,
1011
1013
  formSlot,
1012
1014
  socialLinks,
1013
1015
  socialLinksSlot,
@@ -1026,6 +1028,18 @@ function HeroComingSoonCountdown({
1026
1028
  socialLinksClassName
1027
1029
  }) {
1028
1030
  const [timeLeft, setTimeLeft] = React.useState(null);
1031
+ const { uploadTokens, uploadProgress, isUploading, uploadFiles, removeFile, resetUpload } = integration.useFileUpload({ onError });
1032
+ const { form, submissionError, formMethod, resetSubmissionState } = integration.useContactForm({
1033
+ formFields,
1034
+ formConfig,
1035
+ onSubmit,
1036
+ onSuccess: (data) => {
1037
+ resetUpload();
1038
+ onSuccess?.(data);
1039
+ },
1040
+ onError,
1041
+ uploadTokens
1042
+ });
1029
1043
  const calculateTimeLeft = React.useCallback(() => {
1030
1044
  if (!countdownDate) return null;
1031
1045
  const now = Date.now();
@@ -1052,31 +1066,59 @@ function HeroComingSoonCountdown({
1052
1066
  const showCountdown = countdownSlot || timeLeft;
1053
1067
  const renderForm = React.useMemo(() => {
1054
1068
  if (formSlot) return formSlot;
1055
- if (!submitAction) return null;
1056
- const {
1057
- label,
1058
- icon,
1059
- iconAfter,
1060
- children,
1061
- className: actionClassName,
1062
- ...pressableProps
1063
- } = submitAction;
1064
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1065
- /* @__PURE__ */ jsxRuntime.jsx(
1066
- Input,
1067
- {
1068
- type: "email",
1069
- placeholder: emailPlaceholder,
1070
- className: cn("h-12 flex-1 border-border/50")
1071
- }
1072
- ),
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
- ] }) })
1078
- ] });
1079
- }, [formSlot, submitAction, emailPlaceholder]);
1069
+ const defaultButtonAction = {
1070
+ label: "Notify Me",
1071
+ variant: "default",
1072
+ className: "h-12"
1073
+ };
1074
+ const action = buttonAction || defaultButtonAction;
1075
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1076
+ forms.Form,
1077
+ {
1078
+ form,
1079
+ notificationConfig: {
1080
+ submissionError,
1081
+ successMessage
1082
+ },
1083
+ formConfig: {
1084
+ endpoint: formConfig?.endpoint,
1085
+ method: formMethod,
1086
+ submissionConfig: formConfig?.submissionConfig
1087
+ },
1088
+ onNewSubmission: () => {
1089
+ resetUpload();
1090
+ resetSubmissionState();
1091
+ },
1092
+ children: [
1093
+ formFields.map((field) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
1094
+ integration.DynamicFormField,
1095
+ {
1096
+ field,
1097
+ uploadProgress,
1098
+ onFileUpload: uploadFiles,
1099
+ onFileRemove: removeFile,
1100
+ isUploading
1101
+ }
1102
+ ) }, field.name)),
1103
+ /* @__PURE__ */ jsxRuntime.jsxs(
1104
+ Pressable,
1105
+ {
1106
+ onClick: form.handleSubmit,
1107
+ asButton: true,
1108
+ variant: action.variant,
1109
+ className: cn("h-12", action.className),
1110
+ disabled: form.isSubmitting,
1111
+ children: [
1112
+ action.label,
1113
+ action.iconAfter
1114
+ ]
1115
+ }
1116
+ ),
1117
+ helperText && (typeof helperText === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-sm mt-2 text-center"), children: helperText }) : helperText)
1118
+ ]
1119
+ }
1120
+ );
1121
+ }, [formSlot, formFields, form, formConfig, formMethod, buttonAction, uploadProgress, uploadFiles, removeFile, isUploading, submissionError, successMessage, helperText, resetUpload, resetSubmissionState]);
1080
1122
  const renderSocialLinks = React.useMemo(() => {
1081
1123
  if (socialLinksSlot) return socialLinksSlot;
1082
1124
  if (!socialLinks || socialLinks.length === 0) return null;
@@ -1102,7 +1144,7 @@ function HeroComingSoonCountdown({
1102
1144
  patternClassName,
1103
1145
  className,
1104
1146
  containerClassName,
1105
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-8 md:pt-0", children: [
1147
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-6 py-8 md:px-12 md:py-12 lg:py-16 lg:px-16 rounded-2xl flex flex-col items-center text-center bg-muted gap-4 md:gap-8", children: [
1106
1148
  (badgeText || badgeIcon) && /* @__PURE__ */ jsxRuntime.jsxs(Badge, { className: cn("gap-2 px-4 py-2", badgeClassName), children: [
1107
1149
  badgeIcon && /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: badgeIcon, size: 16 }),
1108
1150
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: badgeText })
@@ -1111,7 +1153,7 @@ function HeroComingSoonCountdown({
1111
1153
  "h1",
1112
1154
  {
1113
1155
  className: cn(
1114
- "mt-8 max-w-3xl text-5xl font-bold tracking-tight md:text-6xl lg:text-7xl text-balance",
1156
+ "max-w-full md:max-w-lg text-5xl font-bold tracking-tight md:text-6xl lg:text-7xl text-balance",
1115
1157
  headingClassName
1116
1158
  ),
1117
1159
  children: heading
@@ -1121,7 +1163,7 @@ function HeroComingSoonCountdown({
1121
1163
  "p",
1122
1164
  {
1123
1165
  className: cn(
1124
- "mt-6 max-w-xl text-lg md:text-xl text-balance",
1166
+ "max-w-full md:max-w-md text-lg md:text-xl text-balance",
1125
1167
  descriptionClassName
1126
1168
  ),
1127
1169
  children: description
@@ -1131,7 +1173,7 @@ function HeroComingSoonCountdown({
1131
1173
  "div",
1132
1174
  {
1133
1175
  className: cn(
1134
- "mt-12 grid grid-cols-4 gap-4 md:gap-8",
1176
+ "py-8 grid grid-cols-4 gap-2 md:gap-4 lg:gap-8",
1135
1177
  countdownClassName
1136
1178
  ),
1137
1179
  children: countdownSlot ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -1146,7 +1188,7 @@ function HeroComingSoonCountdown({
1146
1188
  "div",
1147
1189
  {
1148
1190
  className: cn(
1149
- "mt-12 flex w-full max-w-md flex-col gap-4 sm:flex-row",
1191
+ "flex w-full max-w-md flex-col gap-4 sm:flex-row",
1150
1192
  formClassName
1151
1193
  ),
1152
1194
  children: renderForm
@@ -1155,10 +1197,7 @@ function HeroComingSoonCountdown({
1155
1197
  (socialLinksSlot || socialLinks && socialLinks.length > 0) && /* @__PURE__ */ jsxRuntime.jsx(
1156
1198
  "div",
1157
1199
  {
1158
- className: cn(
1159
- "mt-16 flex items-center gap-6",
1160
- socialLinksClassName
1161
- ),
1200
+ className: cn("mt-8 flex items-center gap-6", socialLinksClassName),
1162
1201
  children: renderSocialLinks
1163
1202
  }
1164
1203
  )
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { f as SectionBackground, g as SectionSpacing, t as PatternName } from './community-initiatives-Bz_A5vLU.cjs';
3
+ import { FormFieldConfig, PageSpeedFormConfig } from '@page-speed/forms/integration';
3
4
  import { A as ActionConfig, a as SocialLinkItem } from './blocks-Cohq4eio.cjs';
4
5
  import 'react/jsx-runtime';
5
6
  import 'class-variance-authority';
@@ -32,15 +33,39 @@ interface HeroComingSoonCountdownProps {
32
33
  */
33
34
  countdownSlot?: React.ReactNode;
34
35
  /**
35
- * Email input placeholder text
36
+ * Form field configuration
36
37
  */
37
- emailPlaceholder?: string;
38
+ formFields?: FormFieldConfig[];
38
39
  /**
39
- * Submit button action configuration
40
+ * Form configuration for submission
40
41
  */
41
- submitAction?: ActionConfig;
42
+ formConfig?: PageSpeedFormConfig;
42
43
  /**
43
- * Custom slot for the form (overrides email input and submit)
44
+ * Custom submit handler
45
+ */
46
+ onSubmit?: (values: Record<string, any>) => void | Promise<void>;
47
+ /**
48
+ * Success callback
49
+ */
50
+ onSuccess?: (data: unknown) => void;
51
+ /**
52
+ * Error callback
53
+ */
54
+ onError?: (error: Error) => void;
55
+ /**
56
+ * Success message to display
57
+ */
58
+ successMessage?: React.ReactNode;
59
+ /**
60
+ * Submit button configuration
61
+ */
62
+ buttonAction?: ActionConfig;
63
+ /**
64
+ * Helper text below form
65
+ */
66
+ helperText?: React.ReactNode;
67
+ /**
68
+ * Custom slot for the form (overrides form props)
44
69
  */
45
70
  formSlot?: React.ReactNode;
46
71
  /**
@@ -106,6 +131,6 @@ interface HeroComingSoonCountdownProps {
106
131
  */
107
132
  patternClassName?: string;
108
133
  }
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;
134
+ declare function HeroComingSoonCountdown({ badgeIcon, badgeText, heading, description, countdownDate, countdownSlot, formFields, formConfig, onSubmit, onSuccess, onError, successMessage, buttonAction, helperText, formSlot, socialLinks, socialLinksSlot, background, containerClassName, spacing, pattern, patternOpacity, patternClassName, className, badgeClassName, headingClassName, descriptionClassName, countdownClassName, formClassName, socialLinksClassName, }: HeroComingSoonCountdownProps): React.JSX.Element;
110
135
 
111
136
  export { HeroComingSoonCountdown, type HeroComingSoonCountdownProps };
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { f as SectionBackground, g as SectionSpacing, t as PatternName } from './community-initiatives-Bi_ClKrO.js';
3
+ import { FormFieldConfig, PageSpeedFormConfig } from '@page-speed/forms/integration';
3
4
  import { A as ActionConfig, a as SocialLinkItem } from './blocks-k17uluAz.js';
4
5
  import 'react/jsx-runtime';
5
6
  import 'class-variance-authority';
@@ -32,15 +33,39 @@ interface HeroComingSoonCountdownProps {
32
33
  */
33
34
  countdownSlot?: React.ReactNode;
34
35
  /**
35
- * Email input placeholder text
36
+ * Form field configuration
36
37
  */
37
- emailPlaceholder?: string;
38
+ formFields?: FormFieldConfig[];
38
39
  /**
39
- * Submit button action configuration
40
+ * Form configuration for submission
40
41
  */
41
- submitAction?: ActionConfig;
42
+ formConfig?: PageSpeedFormConfig;
42
43
  /**
43
- * Custom slot for the form (overrides email input and submit)
44
+ * Custom submit handler
45
+ */
46
+ onSubmit?: (values: Record<string, any>) => void | Promise<void>;
47
+ /**
48
+ * Success callback
49
+ */
50
+ onSuccess?: (data: unknown) => void;
51
+ /**
52
+ * Error callback
53
+ */
54
+ onError?: (error: Error) => void;
55
+ /**
56
+ * Success message to display
57
+ */
58
+ successMessage?: React.ReactNode;
59
+ /**
60
+ * Submit button configuration
61
+ */
62
+ buttonAction?: ActionConfig;
63
+ /**
64
+ * Helper text below form
65
+ */
66
+ helperText?: React.ReactNode;
67
+ /**
68
+ * Custom slot for the form (overrides form props)
44
69
  */
45
70
  formSlot?: React.ReactNode;
46
71
  /**
@@ -106,6 +131,6 @@ interface HeroComingSoonCountdownProps {
106
131
  */
107
132
  patternClassName?: string;
108
133
  }
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;
134
+ declare function HeroComingSoonCountdown({ badgeIcon, badgeText, heading, description, countdownDate, countdownSlot, formFields, formConfig, onSubmit, onSuccess, onError, successMessage, buttonAction, helperText, formSlot, socialLinks, socialLinksSlot, background, containerClassName, spacing, pattern, patternOpacity, patternClassName, className, badgeClassName, headingClassName, descriptionClassName, countdownClassName, formClassName, socialLinksClassName, }: HeroComingSoonCountdownProps): React.JSX.Element;
110
135
 
111
136
  export { HeroComingSoonCountdown, type HeroComingSoonCountdownProps };