@opensite/ui 1.8.2 → 1.8.4

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 (171) hide show
  1. package/dist/about-story-gallery.cjs +3 -30
  2. package/dist/about-story-gallery.d.cts +1 -1
  3. package/dist/about-story-gallery.d.ts +1 -1
  4. package/dist/about-story-gallery.js +3 -30
  5. package/dist/components.d.cts +1 -1
  6. package/dist/components.d.ts +1 -1
  7. package/dist/contact-callback.cjs +526 -273
  8. package/dist/contact-callback.d.cts +39 -59
  9. package/dist/contact-callback.d.ts +39 -59
  10. package/dist/contact-callback.js +528 -274
  11. package/dist/contact-card.cjs +459 -183
  12. package/dist/contact-card.d.cts +26 -49
  13. package/dist/contact-card.d.ts +26 -49
  14. package/dist/contact-card.js +461 -183
  15. package/dist/contact-careers.cjs +614 -510
  16. package/dist/contact-careers.d.cts +32 -55
  17. package/dist/contact-careers.d.ts +32 -55
  18. package/dist/contact-careers.js +616 -510
  19. package/dist/contact-catering.cjs +507 -501
  20. package/dist/contact-catering.d.cts +27 -61
  21. package/dist/contact-catering.d.ts +27 -61
  22. package/dist/contact-catering.js +509 -500
  23. package/dist/contact-consultation.cjs +484 -253
  24. package/dist/contact-consultation.d.cts +29 -56
  25. package/dist/contact-consultation.d.ts +29 -56
  26. package/dist/contact-consultation.js +486 -253
  27. package/dist/contact-dark.cjs +296 -296
  28. package/dist/contact-dark.d.cts +1 -1
  29. package/dist/contact-dark.d.ts +1 -1
  30. package/dist/contact-dark.js +297 -296
  31. package/dist/contact-demo.d.cts +1 -1
  32. package/dist/contact-demo.d.ts +1 -1
  33. package/dist/contact-emergency.d.cts +1 -1
  34. package/dist/contact-emergency.d.ts +1 -1
  35. package/dist/contact-event.d.cts +1 -1
  36. package/dist/contact-event.d.ts +1 -1
  37. package/dist/contact-faq.cjs +247 -250
  38. package/dist/contact-faq.d.cts +1 -1
  39. package/dist/contact-faq.d.ts +1 -1
  40. package/dist/contact-faq.js +248 -250
  41. package/dist/contact-feedback.d.cts +1 -1
  42. package/dist/contact-feedback.d.ts +1 -1
  43. package/dist/contact-fitness.d.cts +1 -1
  44. package/dist/contact-fitness.d.ts +1 -1
  45. package/dist/contact-guest.d.cts +1 -1
  46. package/dist/contact-guest.d.ts +1 -1
  47. package/dist/contact-image.d.cts +1 -1
  48. package/dist/contact-image.d.ts +1 -1
  49. package/dist/contact-insurance.d.cts +1 -1
  50. package/dist/contact-insurance.d.ts +1 -1
  51. package/dist/contact-interview.d.cts +1 -1
  52. package/dist/contact-interview.d.ts +1 -1
  53. package/dist/contact-locations.d.cts +1 -1
  54. package/dist/contact-locations.d.ts +1 -1
  55. package/dist/contact-maintenance.d.cts +1 -1
  56. package/dist/contact-maintenance.d.ts +1 -1
  57. package/dist/contact-map.d.cts +1 -1
  58. package/dist/contact-map.d.ts +1 -1
  59. package/dist/contact-minimal.d.cts +1 -1
  60. package/dist/contact-minimal.d.ts +1 -1
  61. package/dist/contact-moving.d.cts +1 -1
  62. package/dist/contact-moving.d.ts +1 -1
  63. package/dist/contact-multistep.d.cts +1 -1
  64. package/dist/contact-multistep.d.ts +1 -1
  65. package/dist/contact-partnership.d.cts +1 -1
  66. package/dist/contact-partnership.d.ts +1 -1
  67. package/dist/contact-photography.cjs +247 -250
  68. package/dist/contact-photography.d.cts +1 -1
  69. package/dist/contact-photography.d.ts +1 -1
  70. package/dist/contact-photography.js +248 -250
  71. package/dist/contact-press.d.cts +1 -1
  72. package/dist/contact-press.d.ts +1 -1
  73. package/dist/contact-quote.d.cts +1 -1
  74. package/dist/contact-quote.d.ts +1 -1
  75. package/dist/contact-referral.d.cts +1 -1
  76. package/dist/contact-referral.d.ts +1 -1
  77. package/dist/contact-report.d.cts +1 -1
  78. package/dist/contact-report.d.ts +1 -1
  79. package/dist/contact-reservation.d.cts +1 -1
  80. package/dist/contact-reservation.d.ts +1 -1
  81. package/dist/contact-retreat.d.cts +1 -1
  82. package/dist/contact-retreat.d.ts +1 -1
  83. package/dist/contact-rsvp.d.cts +1 -1
  84. package/dist/contact-rsvp.d.ts +1 -1
  85. package/dist/contact-sales.d.cts +1 -1
  86. package/dist/contact-sales.d.ts +1 -1
  87. package/dist/contact-schedule.d.cts +1 -1
  88. package/dist/contact-schedule.d.ts +1 -1
  89. package/dist/contact-sponsorship.d.cts +1 -1
  90. package/dist/contact-sponsorship.d.ts +1 -1
  91. package/dist/contact-support.d.cts +1 -1
  92. package/dist/contact-support.d.ts +1 -1
  93. package/dist/contact-tenant.d.cts +1 -1
  94. package/dist/contact-tenant.d.ts +1 -1
  95. package/dist/contact-vendor.d.cts +1 -1
  96. package/dist/contact-vendor.d.ts +1 -1
  97. package/dist/contact-volunteer.d.cts +1 -1
  98. package/dist/contact-volunteer.d.ts +1 -1
  99. package/dist/contact-warranty.d.cts +1 -1
  100. package/dist/contact-warranty.d.ts +1 -1
  101. package/dist/contact-wedding.d.cts +1 -1
  102. package/dist/contact-wedding.d.ts +1 -1
  103. package/dist/cta-app-download-newsletter.d.cts +1 -1
  104. package/dist/cta-app-download-newsletter.d.ts +1 -1
  105. package/dist/cta-newsletter-features.d.cts +1 -1
  106. package/dist/cta-newsletter-features.d.ts +1 -1
  107. package/dist/footer-accordion-social.d.cts +1 -1
  108. package/dist/footer-accordion-social.d.ts +1 -1
  109. package/dist/footer-newsletter-contact.d.cts +1 -1
  110. package/dist/footer-newsletter-contact.d.ts +1 -1
  111. package/dist/footer-newsletter-minimal.d.cts +1 -1
  112. package/dist/footer-newsletter-minimal.d.ts +1 -1
  113. package/dist/footer-split-image-accordion.d.cts +1 -1
  114. package/dist/footer-split-image-accordion.d.ts +1 -1
  115. package/dist/{forms-nGgHUTBw.d.cts → forms-CStlFhnh.d.cts} +41 -0
  116. package/dist/{forms-nGgHUTBw.d.ts → forms-CStlFhnh.d.ts} +41 -0
  117. package/dist/hero-conversation-intelligence.cjs +1 -2
  118. package/dist/hero-conversation-intelligence.d.cts +1 -5
  119. package/dist/hero-conversation-intelligence.d.ts +1 -5
  120. package/dist/hero-conversation-intelligence.js +1 -2
  121. package/dist/hero-conversion-video-play.cjs +2 -2
  122. package/dist/hero-conversion-video-play.js +2 -2
  123. package/dist/hero-design-system-3d.cjs +162 -82
  124. package/dist/hero-design-system-3d.js +162 -82
  125. package/dist/hero-ecommerce-product-showcase.cjs +103 -81
  126. package/dist/hero-ecommerce-product-showcase.d.cts +5 -1
  127. package/dist/hero-ecommerce-product-showcase.d.ts +5 -1
  128. package/dist/hero-ecommerce-product-showcase.js +103 -81
  129. package/dist/hero-floating-images.cjs +1 -1
  130. package/dist/hero-floating-images.js +1 -1
  131. package/dist/hero-hiring-animated-text.cjs +4 -4
  132. package/dist/hero-hiring-animated-text.js +4 -4
  133. package/dist/hero-minimal-centered-dark.cjs +111 -82
  134. package/dist/hero-minimal-centered-dark.d.cts +1 -1
  135. package/dist/hero-minimal-centered-dark.d.ts +1 -1
  136. package/dist/hero-minimal-centered-dark.js +111 -82
  137. package/dist/hero-mobile-app-download.cjs +1 -1
  138. package/dist/hero-mobile-app-download.js +1 -1
  139. package/dist/hero-overlay-cta-grid.cjs +1 -1
  140. package/dist/hero-overlay-cta-grid.js +1 -1
  141. package/dist/hero-spiral-pattern-cards.cjs +1 -1
  142. package/dist/hero-spiral-pattern-cards.js +1 -1
  143. package/dist/hero-startup-launch-cta.cjs +1 -1
  144. package/dist/hero-startup-launch-cta.js +1 -1
  145. package/dist/hero-stats-social-proof.cjs +106 -90
  146. package/dist/hero-stats-social-proof.js +106 -90
  147. package/dist/hero-testimonial-image-grid.cjs +1 -1
  148. package/dist/hero-testimonial-image-grid.js +1 -1
  149. package/dist/hero-therapy-testimonial-grid.cjs +1 -1
  150. package/dist/hero-therapy-testimonial-grid.js +1 -1
  151. package/dist/hero-ui-library-showcase.cjs +63 -15
  152. package/dist/hero-ui-library-showcase.d.cts +5 -1
  153. package/dist/hero-ui-library-showcase.d.ts +5 -1
  154. package/dist/hero-ui-library-showcase.js +63 -15
  155. package/dist/index.cjs +44 -6
  156. package/dist/index.d.cts +3 -2
  157. package/dist/index.d.ts +3 -2
  158. package/dist/index.js +44 -6
  159. package/dist/link-page-newsletter-social.d.cts +1 -1
  160. package/dist/link-page-newsletter-social.d.ts +1 -1
  161. package/dist/offer-modal-membership-image.d.cts +1 -1
  162. package/dist/offer-modal-membership-image.d.ts +1 -1
  163. package/dist/offer-modal-newsletter-discount.d.cts +1 -1
  164. package/dist/offer-modal-newsletter-discount.d.ts +1 -1
  165. package/dist/offer-modal-sheet-newsletter.d.cts +1 -1
  166. package/dist/offer-modal-sheet-newsletter.d.ts +1 -1
  167. package/dist/registry.cjs +14465 -14767
  168. package/dist/registry.js +12664 -12966
  169. package/dist/resource-list-hero-filter.d.cts +1 -1
  170. package/dist/resource-list-hero-filter.d.ts +1 -1
  171. package/package.json +3 -3
@@ -7,6 +7,7 @@ var tailwindMerge = require('tailwind-merge');
7
7
  var classVarianceAuthority = require('class-variance-authority');
8
8
  var jsxRuntime = require('react/jsx-runtime');
9
9
  var img = require('@page-speed/img');
10
+ var reactSlot = require('@radix-ui/react-slot');
10
11
 
11
12
  function _interopNamespace(e) {
12
13
  if (e && e.__esModule) return e;
@@ -32,66 +33,6 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
32
33
  function cn(...inputs) {
33
34
  return tailwindMerge.twMerge(clsx.clsx(inputs));
34
35
  }
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
36
  function normalizePhoneNumber(input) {
96
37
  const trimmed = input.trim();
97
38
  if (trimmed.toLowerCase().startsWith("tel:")) {
@@ -885,6 +826,38 @@ var Section = React__namespace.default.forwardRef(
885
826
  }
886
827
  );
887
828
  Section.displayName = "Section";
829
+ var badgeVariants = classVarianceAuthority.cva(
830
+ "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",
831
+ {
832
+ variants: {
833
+ variant: {
834
+ default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
835
+ secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
836
+ 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",
837
+ outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
838
+ }
839
+ },
840
+ defaultVariants: {
841
+ variant: "default"
842
+ }
843
+ }
844
+ );
845
+ function Badge({
846
+ className,
847
+ variant,
848
+ asChild = false,
849
+ ...props
850
+ }) {
851
+ const Comp = asChild ? reactSlot.Slot : "span";
852
+ return /* @__PURE__ */ jsxRuntime.jsx(
853
+ Comp,
854
+ {
855
+ "data-slot": "badge",
856
+ className: cn(badgeVariants({ variant }), className),
857
+ ...props
858
+ }
859
+ );
860
+ }
888
861
  function HeroStatsSocialProof({
889
862
  badge,
890
863
  badgeIcon,
@@ -895,15 +868,15 @@ function HeroStatsSocialProof({
895
868
  stats,
896
869
  statsSlot,
897
870
  imageSrc,
898
- imageAlt = "Platform dashboard",
871
+ imageAlt,
899
872
  statusCard,
900
873
  statusCardSlot,
901
874
  background,
902
- spacing,
875
+ spacing = "pt-28 pb-8 md:pt-32 md:pb-32",
903
876
  pattern,
904
877
  patternOpacity,
905
878
  className,
906
- containerClassName,
879
+ containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
907
880
  contentClassName,
908
881
  badgeClassName,
909
882
  headingClassName,
@@ -917,7 +890,14 @@ function HeroStatsSocialProof({
917
890
  if (actionsSlot) return actionsSlot;
918
891
  if (!actions || actions.length === 0) return null;
919
892
  return actions.map((action, index) => {
920
- const { label, icon, iconAfter, children, className: actionClassName, ...pressableProps } = action;
893
+ const {
894
+ label,
895
+ icon,
896
+ iconAfter,
897
+ children,
898
+ className: actionClassName,
899
+ ...pressableProps
900
+ } = action;
921
901
  return /* @__PURE__ */ jsxRuntime.jsx(
922
902
  Pressable,
923
903
  {
@@ -939,23 +919,25 @@ function HeroStatsSocialProof({
939
919
  if (!stats || stats.length === 0) return null;
940
920
  return stats.map((stat, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: stat.className, children: [
941
921
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-3xl font-bold ", children: stat.value }),
942
- stat.label && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("text-sm", getTextColor(background, "muted")), children: stat.label })
922
+ stat.label && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm", children: stat.label })
943
923
  ] }, index));
944
924
  }, [statsSlot, stats]);
945
925
  const renderStatusCard = React.useMemo(() => {
946
926
  if (statusCardSlot) return statusCardSlot;
947
927
  if (!statusCard) return null;
948
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
949
- "absolute -bottom-6 -left-6 rounded-xl p-4 shadow-lg",
950
- getNestedCardBg(background, "card"),
951
- getNestedCardTextColor(background)
952
- ), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
953
- statusCard.icon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-success/10", children: statusCard.icon }),
954
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
955
- statusCard.title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold ", children: statusCard.title }),
956
- statusCard.subtitle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("text-sm", getTextColor(background, "muted")), children: statusCard.subtitle })
957
- ] })
958
- ] }) });
928
+ return /* @__PURE__ */ jsxRuntime.jsx(
929
+ "div",
930
+ {
931
+ className: cn("absolute -bottom-6 -left-6 rounded-xl p-4 shadow-lg"),
932
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
933
+ statusCard.icon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-primary text-primary-foreground", children: statusCard.icon }),
934
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
935
+ statusCard.title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold ", children: statusCard.title }),
936
+ statusCard.subtitle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm", children: statusCard.subtitle })
937
+ ] })
938
+ ] })
939
+ }
940
+ );
959
941
  }, [statusCardSlot, statusCard]);
960
942
  return /* @__PURE__ */ jsxRuntime.jsx(
961
943
  Section,
@@ -964,28 +946,62 @@ function HeroStatsSocialProof({
964
946
  spacing,
965
947
  pattern,
966
948
  patternOpacity,
967
- className: cn(className),
968
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("container", containerClassName), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid items-center gap-12 lg:grid-cols-2 lg:gap-20", children: [
949
+ className,
950
+ containerClassName,
951
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid items-center gap-12 lg:grid-cols-2 lg:gap-20", children: [
969
952
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-8", contentClassName), children: [
970
- badge && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("inline-flex w-fit items-center gap-2 rounded-full px-4 py-2 text-sm font-medium", `${getAccentColor(background)}/10`, getAccentColor(background), badgeClassName), children: [
953
+ badge && /* @__PURE__ */ jsxRuntime.jsxs(Badge, { className: cn("px-4 py-2 text-sm", badgeClassName), children: [
971
954
  badgeIcon,
972
955
  typeof badge === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { children: badge }) : badge
973
956
  ] }),
974
- heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h1", { className: cn("text-4xl font-bold tracking-tight md:text-5xl lg:text-6xl", headingClassName), children: heading }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: headingClassName, children: heading })),
975
- description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-lg", getTextColor(background, "muted"), descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: descriptionClassName, children: description })),
976
- (actionsSlot || actions && actions.length > 0) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col gap-4 sm:flex-row", actionsClassName), children: renderActions }),
977
- (statsSlot || stats && stats.length > 0) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("grid grid-cols-3 gap-8 pt-8 border-t border-border", statsClassName), children: renderStats })
957
+ heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
958
+ "h1",
959
+ {
960
+ className: cn(
961
+ "text-4xl font-bold tracking-tight md:text-5xl lg:text-6xl text-balance",
962
+ headingClassName
963
+ ),
964
+ children: heading
965
+ }
966
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: headingClassName, children: heading })),
967
+ description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-lg text-balance", descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: descriptionClassName, children: description })),
968
+ (actionsSlot || actions && actions.length > 0) && /* @__PURE__ */ jsxRuntime.jsx(
969
+ "div",
970
+ {
971
+ className: cn(
972
+ "flex flex-col gap-4 sm:flex-row",
973
+ actionsClassName
974
+ ),
975
+ children: renderActions
976
+ }
977
+ ),
978
+ (statsSlot || stats && stats.length > 0) && /* @__PURE__ */ jsxRuntime.jsx(
979
+ "div",
980
+ {
981
+ className: cn("grid grid-cols-3 gap-8 pt-8", statsClassName),
982
+ children: renderStats
983
+ }
984
+ )
978
985
  ] }),
979
986
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
980
- imageSrc && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("aspect-square overflow-hidden rounded-2xl", getNestedCardBg(background), imageClassName), children: /* @__PURE__ */ jsxRuntime.jsx(
981
- img.Img,
987
+ imageSrc && /* @__PURE__ */ jsxRuntime.jsx(
988
+ "div",
982
989
  {
983
- src: imageSrc,
984
- alt: imageAlt,
985
- className: "h-full w-full object-cover",
986
- optixFlowConfig
990
+ className: cn(
991
+ "aspect-square overflow-hidden rounded-2xl shadow-2xl",
992
+ imageClassName
993
+ ),
994
+ children: /* @__PURE__ */ jsxRuntime.jsx(
995
+ img.Img,
996
+ {
997
+ src: imageSrc,
998
+ alt: imageAlt,
999
+ className: "h-full w-full object-cover",
1000
+ optixFlowConfig
1001
+ }
1002
+ )
987
1003
  }
988
- ) }),
1004
+ ),
989
1005
  renderStatusCard
990
1006
  ] })
991
1007
  ] }) })
@@ -6,71 +6,12 @@ import { twMerge } from 'tailwind-merge';
6
6
  import { cva } from 'class-variance-authority';
7
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
8
  import { Img } from '@page-speed/img';
9
+ import { Slot } from '@radix-ui/react-slot';
9
10
 
10
11
  // components/blocks/hero/hero-stats-social-proof.tsx
11
12
  function cn(...inputs) {
12
13
  return twMerge(clsx(inputs));
13
14
  }
14
- function getNestedCardBg(parentBg, variant = "muted", options) {
15
- const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
16
- if (isDark) {
17
- switch (variant) {
18
- case "muted":
19
- return "bg-background";
20
- case "card":
21
- return "bg-card";
22
- case "accent":
23
- return "bg-accent";
24
- case "subtle":
25
- return "bg-background/50";
26
- }
27
- } else {
28
- switch (variant) {
29
- case "muted":
30
- return "bg-muted";
31
- case "card":
32
- return "bg-card";
33
- case "accent":
34
- return "bg-accent";
35
- case "subtle":
36
- return "bg-muted/50";
37
- }
38
- }
39
- }
40
- function getNestedCardTextColor(parentBg, options) {
41
- const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
42
- return isDark ? "text-foreground" : "";
43
- }
44
- function getTextColor(parentBg, variant = "default", options) {
45
- const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
46
- if (isDark) {
47
- switch (variant) {
48
- case "default":
49
- return "text-foreground";
50
- case "muted":
51
- return "text-foreground/80";
52
- case "subtle":
53
- return "text-foreground/60";
54
- case "accent":
55
- return "text-accent-foreground";
56
- }
57
- } else {
58
- switch (variant) {
59
- case "default":
60
- return "text-foreground";
61
- case "muted":
62
- return "text-muted-foreground";
63
- case "subtle":
64
- return "text-muted-foreground/70";
65
- case "accent":
66
- return "text-primary";
67
- }
68
- }
69
- }
70
- function getAccentColor(parentBg, options) {
71
- const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
72
- return isDark ? "text-accent-foreground" : "text-primary";
73
- }
74
15
  function normalizePhoneNumber(input) {
75
16
  const trimmed = input.trim();
76
17
  if (trimmed.toLowerCase().startsWith("tel:")) {
@@ -864,6 +805,38 @@ var Section = React__default.forwardRef(
864
805
  }
865
806
  );
866
807
  Section.displayName = "Section";
808
+ var badgeVariants = cva(
809
+ "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",
810
+ {
811
+ variants: {
812
+ variant: {
813
+ default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
814
+ secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
815
+ 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",
816
+ outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
817
+ }
818
+ },
819
+ defaultVariants: {
820
+ variant: "default"
821
+ }
822
+ }
823
+ );
824
+ function Badge({
825
+ className,
826
+ variant,
827
+ asChild = false,
828
+ ...props
829
+ }) {
830
+ const Comp = asChild ? Slot : "span";
831
+ return /* @__PURE__ */ jsx(
832
+ Comp,
833
+ {
834
+ "data-slot": "badge",
835
+ className: cn(badgeVariants({ variant }), className),
836
+ ...props
837
+ }
838
+ );
839
+ }
867
840
  function HeroStatsSocialProof({
868
841
  badge,
869
842
  badgeIcon,
@@ -874,15 +847,15 @@ function HeroStatsSocialProof({
874
847
  stats,
875
848
  statsSlot,
876
849
  imageSrc,
877
- imageAlt = "Platform dashboard",
850
+ imageAlt,
878
851
  statusCard,
879
852
  statusCardSlot,
880
853
  background,
881
- spacing,
854
+ spacing = "pt-28 pb-8 md:pt-32 md:pb-32",
882
855
  pattern,
883
856
  patternOpacity,
884
857
  className,
885
- containerClassName,
858
+ containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
886
859
  contentClassName,
887
860
  badgeClassName,
888
861
  headingClassName,
@@ -896,7 +869,14 @@ function HeroStatsSocialProof({
896
869
  if (actionsSlot) return actionsSlot;
897
870
  if (!actions || actions.length === 0) return null;
898
871
  return actions.map((action, index) => {
899
- const { label, icon, iconAfter, children, className: actionClassName, ...pressableProps } = action;
872
+ const {
873
+ label,
874
+ icon,
875
+ iconAfter,
876
+ children,
877
+ className: actionClassName,
878
+ ...pressableProps
879
+ } = action;
900
880
  return /* @__PURE__ */ jsx(
901
881
  Pressable,
902
882
  {
@@ -918,23 +898,25 @@ function HeroStatsSocialProof({
918
898
  if (!stats || stats.length === 0) return null;
919
899
  return stats.map((stat, index) => /* @__PURE__ */ jsxs("div", { className: stat.className, children: [
920
900
  /* @__PURE__ */ jsx("div", { className: "text-3xl font-bold ", children: stat.value }),
921
- stat.label && /* @__PURE__ */ jsx("div", { className: cn("text-sm", getTextColor(background, "muted")), children: stat.label })
901
+ stat.label && /* @__PURE__ */ jsx("div", { className: "text-sm", children: stat.label })
922
902
  ] }, index));
923
903
  }, [statsSlot, stats]);
924
904
  const renderStatusCard = useMemo(() => {
925
905
  if (statusCardSlot) return statusCardSlot;
926
906
  if (!statusCard) return null;
927
- return /* @__PURE__ */ jsx("div", { className: cn(
928
- "absolute -bottom-6 -left-6 rounded-xl p-4 shadow-lg",
929
- getNestedCardBg(background, "card"),
930
- getNestedCardTextColor(background)
931
- ), children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
932
- statusCard.icon && /* @__PURE__ */ jsx("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-success/10", children: statusCard.icon }),
933
- /* @__PURE__ */ jsxs("div", { children: [
934
- statusCard.title && /* @__PURE__ */ jsx("div", { className: "font-semibold ", children: statusCard.title }),
935
- statusCard.subtitle && /* @__PURE__ */ jsx("div", { className: cn("text-sm", getTextColor(background, "muted")), children: statusCard.subtitle })
936
- ] })
937
- ] }) });
907
+ return /* @__PURE__ */ jsx(
908
+ "div",
909
+ {
910
+ className: cn("absolute -bottom-6 -left-6 rounded-xl p-4 shadow-lg"),
911
+ children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
912
+ statusCard.icon && /* @__PURE__ */ jsx("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-primary text-primary-foreground", children: statusCard.icon }),
913
+ /* @__PURE__ */ jsxs("div", { children: [
914
+ statusCard.title && /* @__PURE__ */ jsx("div", { className: "font-semibold ", children: statusCard.title }),
915
+ statusCard.subtitle && /* @__PURE__ */ jsx("div", { className: "text-sm", children: statusCard.subtitle })
916
+ ] })
917
+ ] })
918
+ }
919
+ );
938
920
  }, [statusCardSlot, statusCard]);
939
921
  return /* @__PURE__ */ jsx(
940
922
  Section,
@@ -943,28 +925,62 @@ function HeroStatsSocialProof({
943
925
  spacing,
944
926
  pattern,
945
927
  patternOpacity,
946
- className: cn(className),
947
- children: /* @__PURE__ */ jsx("div", { className: cn("container", containerClassName), children: /* @__PURE__ */ jsxs("div", { className: "grid items-center gap-12 lg:grid-cols-2 lg:gap-20", children: [
928
+ className,
929
+ containerClassName,
930
+ children: /* @__PURE__ */ jsx("div", { className: "relative", children: /* @__PURE__ */ jsxs("div", { className: "grid items-center gap-12 lg:grid-cols-2 lg:gap-20", children: [
948
931
  /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-8", contentClassName), children: [
949
- badge && /* @__PURE__ */ jsxs("div", { className: cn("inline-flex w-fit items-center gap-2 rounded-full px-4 py-2 text-sm font-medium", `${getAccentColor(background)}/10`, getAccentColor(background), badgeClassName), children: [
932
+ badge && /* @__PURE__ */ jsxs(Badge, { className: cn("px-4 py-2 text-sm", badgeClassName), children: [
950
933
  badgeIcon,
951
934
  typeof badge === "string" ? /* @__PURE__ */ jsx("span", { children: badge }) : badge
952
935
  ] }),
953
- heading && (typeof heading === "string" ? /* @__PURE__ */ jsx("h1", { className: cn("text-4xl font-bold tracking-tight md:text-5xl lg:text-6xl", headingClassName), children: heading }) : /* @__PURE__ */ jsx("div", { className: headingClassName, children: heading })),
954
- description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("text-lg", getTextColor(background, "muted"), descriptionClassName), children: description }) : /* @__PURE__ */ jsx("div", { className: descriptionClassName, children: description })),
955
- (actionsSlot || actions && actions.length > 0) && /* @__PURE__ */ jsx("div", { className: cn("flex flex-col gap-4 sm:flex-row", actionsClassName), children: renderActions }),
956
- (statsSlot || stats && stats.length > 0) && /* @__PURE__ */ jsx("div", { className: cn("grid grid-cols-3 gap-8 pt-8 border-t border-border", statsClassName), children: renderStats })
936
+ heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
937
+ "h1",
938
+ {
939
+ className: cn(
940
+ "text-4xl font-bold tracking-tight md:text-5xl lg:text-6xl text-balance",
941
+ headingClassName
942
+ ),
943
+ children: heading
944
+ }
945
+ ) : /* @__PURE__ */ jsx("div", { className: headingClassName, children: heading })),
946
+ description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("text-lg text-balance", descriptionClassName), children: description }) : /* @__PURE__ */ jsx("div", { className: descriptionClassName, children: description })),
947
+ (actionsSlot || actions && actions.length > 0) && /* @__PURE__ */ jsx(
948
+ "div",
949
+ {
950
+ className: cn(
951
+ "flex flex-col gap-4 sm:flex-row",
952
+ actionsClassName
953
+ ),
954
+ children: renderActions
955
+ }
956
+ ),
957
+ (statsSlot || stats && stats.length > 0) && /* @__PURE__ */ jsx(
958
+ "div",
959
+ {
960
+ className: cn("grid grid-cols-3 gap-8 pt-8", statsClassName),
961
+ children: renderStats
962
+ }
963
+ )
957
964
  ] }),
958
965
  /* @__PURE__ */ jsxs("div", { className: "relative", children: [
959
- imageSrc && /* @__PURE__ */ jsx("div", { className: cn("aspect-square overflow-hidden rounded-2xl", getNestedCardBg(background), imageClassName), children: /* @__PURE__ */ jsx(
960
- Img,
966
+ imageSrc && /* @__PURE__ */ jsx(
967
+ "div",
961
968
  {
962
- src: imageSrc,
963
- alt: imageAlt,
964
- className: "h-full w-full object-cover",
965
- optixFlowConfig
969
+ className: cn(
970
+ "aspect-square overflow-hidden rounded-2xl shadow-2xl",
971
+ imageClassName
972
+ ),
973
+ children: /* @__PURE__ */ jsx(
974
+ Img,
975
+ {
976
+ src: imageSrc,
977
+ alt: imageAlt,
978
+ className: "h-full w-full object-cover",
979
+ optixFlowConfig
980
+ }
981
+ )
966
982
  }
967
- ) }),
983
+ ),
968
984
  renderStatusCard
969
985
  ] })
970
986
  ] }) })
@@ -889,7 +889,7 @@ function HeroTestimonialImageGrid({
889
889
  gridImages,
890
890
  imagesSlot,
891
891
  background,
892
- spacing = "py-32 md:py-32",
892
+ spacing = "pt-28 pb-8 md:pt-32 md:pb-32",
893
893
  pattern,
894
894
  patternOpacity,
895
895
  className,
@@ -866,7 +866,7 @@ function HeroTestimonialImageGrid({
866
866
  gridImages,
867
867
  imagesSlot,
868
868
  background,
869
- spacing = "py-32 md:py-32",
869
+ spacing = "pt-28 pb-8 md:pt-32 md:pb-32",
870
870
  pattern,
871
871
  patternOpacity,
872
872
  className,
@@ -889,7 +889,7 @@ function HeroTherapyTestimonialGrid({
889
889
  optixFlowConfig
890
890
  }
891
891
  ) }),
892
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full w-full flex-col gap-2 justify-center", children: [
892
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full w-full flex-col gap-2 justify-start", children: [
893
893
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-lg font-medium ", children: [
894
894
  '"',
895
895
  testimonial.quote,
@@ -868,7 +868,7 @@ function HeroTherapyTestimonialGrid({
868
868
  optixFlowConfig
869
869
  }
870
870
  ) }),
871
- /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full flex-col gap-2 justify-center", children: [
871
+ /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full flex-col gap-2 justify-start", children: [
872
872
  /* @__PURE__ */ jsxs("p", { className: "text-lg font-medium ", children: [
873
873
  '"',
874
874
  testimonial.quote,