@opensite/ui 2.8.7 → 2.8.9

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 (163) hide show
  1. package/dist/about-culture-tabs.cjs +174 -174
  2. package/dist/about-culture-tabs.js +174 -174
  3. package/dist/about-developer-profile.cjs +200 -200
  4. package/dist/about-developer-profile.js +198 -198
  5. package/dist/about-developer-story.cjs +142 -142
  6. package/dist/about-developer-story.js +142 -142
  7. package/dist/about-mission-dual-image.cjs +142 -142
  8. package/dist/about-mission-dual-image.js +142 -142
  9. package/dist/about-mission-features.cjs +142 -142
  10. package/dist/about-mission-features.js +142 -142
  11. package/dist/about-network-spotlight.cjs +142 -142
  12. package/dist/about-network-spotlight.js +142 -142
  13. package/dist/about-story-expertise.cjs +142 -142
  14. package/dist/about-story-expertise.js +142 -142
  15. package/dist/about-streamline-team.cjs +142 -142
  16. package/dist/about-streamline-team.js +142 -142
  17. package/dist/carousel-icon-sidebar.cjs +5 -4
  18. package/dist/carousel-icon-sidebar.js +5 -4
  19. package/dist/community-initiatives.cjs +142 -142
  20. package/dist/community-initiatives.js +142 -142
  21. package/dist/components.cjs +723 -1364
  22. package/dist/components.d.cts +0 -2
  23. package/dist/components.d.ts +0 -2
  24. package/dist/components.js +633 -1273
  25. package/dist/contact-map.cjs +14 -1069
  26. package/dist/contact-map.d.cts +13 -3
  27. package/dist/contact-map.d.ts +13 -3
  28. package/dist/contact-map.js +14 -1069
  29. package/dist/cta-feature-checklist.cjs +142 -142
  30. package/dist/cta-feature-checklist.js +142 -142
  31. package/dist/faq-numbered-grid.cjs +142 -142
  32. package/dist/faq-numbered-grid.js +142 -142
  33. package/dist/feature-animated-carousel.cjs +142 -142
  34. package/dist/feature-animated-carousel.js +142 -142
  35. package/dist/feature-bento-utilities.cjs +142 -142
  36. package/dist/feature-bento-utilities.js +142 -142
  37. package/dist/feature-capabilities-grid.cjs +142 -142
  38. package/dist/feature-capabilities-grid.js +142 -142
  39. package/dist/feature-category-image-cards.cjs +142 -142
  40. package/dist/feature-category-image-cards.js +142 -142
  41. package/dist/feature-icon-grid-bordered.cjs +142 -142
  42. package/dist/feature-icon-grid-bordered.js +142 -142
  43. package/dist/feature-icon-grid-muted.cjs +142 -142
  44. package/dist/feature-icon-grid-muted.js +142 -142
  45. package/dist/feature-numbered-cards.cjs +142 -142
  46. package/dist/feature-numbered-cards.js +142 -142
  47. package/dist/feature-three-column-values.cjs +142 -142
  48. package/dist/feature-three-column-values.js +142 -142
  49. package/dist/hero-ad-campaign-expert.cjs +142 -142
  50. package/dist/hero-ad-campaign-expert.js +142 -142
  51. package/dist/hero-adaptable-product-grid.cjs +142 -142
  52. package/dist/hero-adaptable-product-grid.js +142 -142
  53. package/dist/hero-agency-animated-images.cjs +142 -142
  54. package/dist/hero-agency-animated-images.js +142 -142
  55. package/dist/hero-announcement-badge.cjs +142 -142
  56. package/dist/hero-announcement-badge.js +142 -142
  57. package/dist/hero-badge-image-split.cjs +142 -142
  58. package/dist/hero-badge-image-split.js +142 -142
  59. package/dist/hero-business-carousel-dots.cjs +142 -142
  60. package/dist/hero-business-carousel-dots.js +142 -142
  61. package/dist/hero-business-operations-mosaic.cjs +142 -142
  62. package/dist/hero-business-operations-mosaic.js +142 -142
  63. package/dist/hero-conversation-intelligence.cjs +142 -142
  64. package/dist/hero-conversation-intelligence.js +142 -142
  65. package/dist/hero-creative-studio-stacked.cjs +142 -142
  66. package/dist/hero-creative-studio-stacked.js +142 -142
  67. package/dist/hero-crm-streamlined.cjs +142 -142
  68. package/dist/hero-crm-streamlined.js +142 -142
  69. package/dist/hero-customer-support-layered.cjs +142 -142
  70. package/dist/hero-customer-support-layered.js +142 -142
  71. package/dist/hero-design-showcase-logos.cjs +142 -142
  72. package/dist/hero-design-showcase-logos.js +142 -142
  73. package/dist/hero-design-system-3d.cjs +142 -142
  74. package/dist/hero-design-system-3d.js +142 -142
  75. package/dist/hero-developer-tools-code.cjs +142 -142
  76. package/dist/hero-developer-tools-code.js +142 -142
  77. package/dist/hero-digital-agency-fullscreen.cjs +142 -142
  78. package/dist/hero-digital-agency-fullscreen.js +142 -142
  79. package/dist/hero-ecommerce-product-showcase.cjs +174 -174
  80. package/dist/hero-ecommerce-product-showcase.js +174 -174
  81. package/dist/hero-event-registration.cjs +142 -142
  82. package/dist/hero-event-registration.js +142 -142
  83. package/dist/hero-fullscreen-background-image.cjs +142 -142
  84. package/dist/hero-fullscreen-background-image.js +142 -142
  85. package/dist/hero-gradient-avatars-rating.cjs +142 -142
  86. package/dist/hero-gradient-avatars-rating.js +142 -142
  87. package/dist/hero-gradient-client-focused.cjs +142 -142
  88. package/dist/hero-gradient-client-focused.js +142 -142
  89. package/dist/hero-hiring-animated-text.cjs +142 -142
  90. package/dist/hero-hiring-animated-text.js +142 -142
  91. package/dist/hero-image-left-content.cjs +142 -142
  92. package/dist/hero-image-left-content.js +142 -142
  93. package/dist/hero-innovation-image-grid.cjs +142 -142
  94. package/dist/hero-innovation-image-grid.js +142 -142
  95. package/dist/hero-mental-health-team.cjs +142 -142
  96. package/dist/hero-mental-health-team.js +142 -142
  97. package/dist/hero-minimal-centered-dark.cjs +174 -174
  98. package/dist/hero-minimal-centered-dark.js +174 -174
  99. package/dist/hero-presentation-platform-video.cjs +142 -142
  100. package/dist/hero-presentation-platform-video.js +142 -142
  101. package/dist/hero-product-showcase-floating.cjs +174 -174
  102. package/dist/hero-product-showcase-floating.js +174 -174
  103. package/dist/hero-shared-inbox-layered.cjs +142 -142
  104. package/dist/hero-shared-inbox-layered.js +142 -142
  105. package/dist/hero-software-growth-video-dialog.cjs +142 -142
  106. package/dist/hero-software-growth-video-dialog.js +142 -142
  107. package/dist/hero-spiral-pattern-cards.cjs +174 -174
  108. package/dist/hero-spiral-pattern-cards.js +174 -174
  109. package/dist/hero-split-geometric-shapes.cjs +142 -142
  110. package/dist/hero-split-geometric-shapes.js +142 -142
  111. package/dist/hero-startup-launch-cta.cjs +174 -174
  112. package/dist/hero-startup-launch-cta.js +174 -174
  113. package/dist/hero-stats-social-proof.cjs +174 -174
  114. package/dist/hero-stats-social-proof.js +174 -174
  115. package/dist/hero-task-timer-animated.cjs +142 -142
  116. package/dist/hero-task-timer-animated.js +142 -142
  117. package/dist/hero-testimonial-image-grid.cjs +142 -142
  118. package/dist/hero-testimonial-image-grid.js +142 -142
  119. package/dist/hero-therapy-testimonial-grid.cjs +142 -142
  120. package/dist/hero-therapy-testimonial-grid.js +142 -142
  121. package/dist/hero-ui-library-showcase.cjs +142 -142
  122. package/dist/hero-ui-library-showcase.js +142 -142
  123. package/dist/hero-video-background-dark.cjs +174 -174
  124. package/dist/hero-video-background-dark.js +174 -174
  125. package/dist/hero-video-dialog-gradient.cjs +142 -142
  126. package/dist/hero-video-dialog-gradient.js +142 -142
  127. package/dist/hero-video-overlay-stars.cjs +142 -142
  128. package/dist/hero-video-overlay-stars.js +142 -142
  129. package/dist/hero-welcome-asymmetric-images.cjs +142 -142
  130. package/dist/hero-welcome-asymmetric-images.js +142 -142
  131. package/dist/index.cjs +725 -1366
  132. package/dist/index.d.cts +0 -2
  133. package/dist/index.d.ts +0 -2
  134. package/dist/index.js +634 -1274
  135. package/dist/registry.cjs +2371 -2915
  136. package/dist/registry.js +1120 -1664
  137. package/dist/testimonials-large-quote.cjs +74 -43
  138. package/dist/testimonials-large-quote.d.cts +5 -1
  139. package/dist/testimonials-large-quote.d.ts +5 -1
  140. package/dist/testimonials-large-quote.js +74 -43
  141. package/dist/testimonials-logo-cards.cjs +8 -2
  142. package/dist/testimonials-logo-cards.js +8 -2
  143. package/dist/testimonials-masonry-grid.cjs +486 -69
  144. package/dist/testimonials-masonry-grid.d.cts +5 -1
  145. package/dist/testimonials-masonry-grid.d.ts +5 -1
  146. package/dist/testimonials-masonry-grid.js +483 -63
  147. package/dist/testimonials-mini-dividers.cjs +2 -3
  148. package/dist/testimonials-mini-dividers.js +2 -3
  149. package/dist/testimonials-minimal-numbered.cjs +5 -4
  150. package/dist/testimonials-minimal-numbered.js +5 -4
  151. package/dist/testimonials-parallax-number.cjs +5 -4
  152. package/dist/testimonials-parallax-number.js +5 -4
  153. package/dist/testimonials-scrolling-columns.cjs +7 -12
  154. package/dist/testimonials-scrolling-columns.js +7 -12
  155. package/dist/testimonials-stats-header.cjs +528 -87
  156. package/dist/testimonials-stats-header.d.cts +39 -3
  157. package/dist/testimonials-stats-header.d.ts +39 -3
  158. package/dist/testimonials-stats-header.js +523 -82
  159. package/package.json +4 -7
  160. package/dist/geo-map.cjs +0 -1103
  161. package/dist/geo-map.d.cts +0 -92
  162. package/dist/geo-map.d.ts +0 -92
  163. package/dist/geo-map.js +0 -1081
@@ -1,12 +1,13 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var React = require('react');
4
+ var React4 = require('react');
5
5
  var clsx = require('clsx');
6
6
  var tailwindMerge = require('tailwind-merge');
7
7
  var icon = require('@page-speed/icon');
8
8
  var jsxRuntime = require('react/jsx-runtime');
9
9
  var AvatarPrimitive = require('@radix-ui/react-avatar');
10
+ var classVarianceAuthority = require('class-variance-authority');
10
11
 
11
12
  function _interopNamespace(e) {
12
13
  if (e && e.__esModule) return e;
@@ -26,45 +27,15 @@ function _interopNamespace(e) {
26
27
  return Object.freeze(n);
27
28
  }
28
29
 
29
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
30
+ var React4__namespace = /*#__PURE__*/_interopNamespace(React4);
30
31
  var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
31
32
 
32
33
  // components/blocks/testimonials/testimonials-stats-header.tsx
33
34
  function cn(...inputs) {
34
35
  return tailwindMerge.twMerge(clsx.clsx(inputs));
35
36
  }
36
- function getNestedCardBg(parentBg, variant = "muted", options) {
37
- const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
38
- if (isDark) {
39
- switch (variant) {
40
- case "muted":
41
- return "bg-background";
42
- case "card":
43
- return "bg-card";
44
- case "accent":
45
- return "bg-accent";
46
- case "subtle":
47
- return "bg-background/50";
48
- }
49
- } else {
50
- switch (variant) {
51
- case "muted":
52
- return "bg-muted";
53
- case "card":
54
- return "bg-card";
55
- case "accent":
56
- return "bg-accent";
57
- case "subtle":
58
- return "bg-muted/50";
59
- }
60
- }
61
- }
62
- function getNestedCardTextColor(parentBg, options) {
63
- const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
64
- return isDark ? "text-foreground" : "";
65
- }
66
37
  var DEFAULT_ICON_API_KEY = "au382bi7fsh96w9h9xlrnat2jglx";
67
- var DynamicIcon = React__namespace.memo(function DynamicIcon2({
38
+ var DynamicIcon = React4__namespace.memo(function DynamicIcon2({
68
39
  apiKey,
69
40
  ...props
70
41
  }) {
@@ -148,7 +119,7 @@ var maxWidthStyles = {
148
119
  "4xl": "max-w-[1536px]",
149
120
  full: "max-w-full"
150
121
  };
151
- var Container = React__namespace.default.forwardRef(
122
+ var Container = React4__namespace.default.forwardRef(
152
123
  ({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
153
124
  const Component = as;
154
125
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -454,7 +425,7 @@ var spacingStyles = {
454
425
  };
455
426
  var predefinedSpacings = ["none", "sm", "md", "lg", "xl", "hero"];
456
427
  var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
457
- var Section = React__namespace.default.forwardRef(
428
+ var Section = React4__namespace.default.forwardRef(
458
429
  ({
459
430
  id,
460
431
  title,
@@ -515,6 +486,441 @@ var Section = React__namespace.default.forwardRef(
515
486
  }
516
487
  );
517
488
  Section.displayName = "Section";
489
+ var baseStyles = [
490
+ // Layout
491
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap shrink-0",
492
+ // Typography - using CSS variables with sensible defaults
493
+ "font-[var(--button-font-family,inherit)]",
494
+ "font-[var(--button-font-weight,500)]",
495
+ "tracking-[var(--button-letter-spacing,0)]",
496
+ "leading-[var(--button-line-height,1.25)]",
497
+ "[text-transform:var(--button-text-transform,none)]",
498
+ "text-sm",
499
+ // Border radius
500
+ "rounded-[var(--button-radius,var(--radius,0.375rem))]",
501
+ // Smooth transition - using [transition:...] to set full shorthand property (not just transition-property)
502
+ "[transition:var(--button-transition,all_250ms_cubic-bezier(0.4,0,0.2,1))]",
503
+ // Box shadow (master level) - using [box-shadow:...] for complex multi-value shadows
504
+ "[box-shadow:var(--button-shadow,none)]",
505
+ "hover:[box-shadow:var(--button-shadow-hover,var(--button-shadow,none))]",
506
+ // Disabled state
507
+ "disabled:pointer-events-none disabled:opacity-50",
508
+ // SVG handling
509
+ "[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
510
+ // Focus styles
511
+ "outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
512
+ // Invalid state
513
+ "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
514
+ ].join(" ");
515
+ var buttonVariants = classVarianceAuthority.cva(baseStyles, {
516
+ variants: {
517
+ variant: {
518
+ // Default (Primary) variant - full customization
519
+ default: [
520
+ "bg-[var(--button-default-bg,hsl(var(--primary)))]",
521
+ "text-[var(--button-default-fg,hsl(var(--primary-foreground)))]",
522
+ "border-[length:var(--button-default-border-width,0px)]",
523
+ "border-[color:var(--button-default-border,transparent)]",
524
+ "[box-shadow:var(--button-default-shadow,var(--button-shadow,none))]",
525
+ "hover:bg-[var(--button-default-hover-bg,hsl(var(--primary)/0.9))]",
526
+ "hover:text-[var(--button-default-hover-fg,var(--button-default-fg,hsl(var(--primary-foreground))))]",
527
+ "hover:border-[color:var(--button-default-hover-border,var(--button-default-border,transparent))]",
528
+ "hover:[box-shadow:var(--button-default-shadow-hover,var(--button-shadow-hover,var(--button-default-shadow,var(--button-shadow,none))))]"
529
+ ].join(" "),
530
+ // Destructive variant - full customization
531
+ destructive: [
532
+ "bg-[var(--button-destructive-bg,hsl(var(--destructive)))]",
533
+ "text-[var(--button-destructive-fg,white)]",
534
+ "border-[length:var(--button-destructive-border-width,0px)]",
535
+ "border-[color:var(--button-destructive-border,transparent)]",
536
+ "[box-shadow:var(--button-destructive-shadow,var(--button-shadow,none))]",
537
+ "hover:bg-[var(--button-destructive-hover-bg,hsl(var(--destructive)/0.9))]",
538
+ "hover:text-[var(--button-destructive-hover-fg,var(--button-destructive-fg,white))]",
539
+ "hover:border-[color:var(--button-destructive-hover-border,var(--button-destructive-border,transparent))]",
540
+ "hover:[box-shadow:var(--button-destructive-shadow-hover,var(--button-shadow-hover,var(--button-destructive-shadow,var(--button-shadow,none))))]",
541
+ "focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
542
+ "dark:bg-destructive/60"
543
+ ].join(" "),
544
+ // Outline variant - full customization with proper border handling
545
+ outline: [
546
+ "bg-[var(--button-outline-bg,hsl(var(--background)))]",
547
+ "text-[var(--button-outline-fg,inherit)]",
548
+ "border-[length:var(--button-outline-border-width,1px)]",
549
+ "border-[color:var(--button-outline-border,hsl(var(--border)))]",
550
+ "[box-shadow:var(--button-outline-shadow,var(--button-shadow,0_1px_2px_0_rgb(0_0_0/0.05)))]",
551
+ "hover:bg-[var(--button-outline-hover-bg,hsl(var(--accent)))]",
552
+ "hover:text-[var(--button-outline-hover-fg,hsl(var(--accent-foreground)))]",
553
+ "hover:border-[color:var(--button-outline-hover-border,var(--button-outline-border,hsl(var(--border))))]",
554
+ "hover:[box-shadow:var(--button-outline-shadow-hover,var(--button-shadow-hover,var(--button-outline-shadow,var(--button-shadow,none))))]",
555
+ "dark:bg-input/30 dark:border-input dark:hover:bg-input/50"
556
+ ].join(" "),
557
+ // Secondary variant - full customization
558
+ secondary: [
559
+ "bg-[var(--button-secondary-bg,hsl(var(--secondary)))]",
560
+ "text-[var(--button-secondary-fg,hsl(var(--secondary-foreground)))]",
561
+ "border-[length:var(--button-secondary-border-width,0px)]",
562
+ "border-[color:var(--button-secondary-border,transparent)]",
563
+ "[box-shadow:var(--button-secondary-shadow,var(--button-shadow,none))]",
564
+ "hover:bg-[var(--button-secondary-hover-bg,hsl(var(--secondary)/0.8))]",
565
+ "hover:text-[var(--button-secondary-hover-fg,var(--button-secondary-fg,hsl(var(--secondary-foreground))))]",
566
+ "hover:border-[color:var(--button-secondary-hover-border,var(--button-secondary-border,transparent))]",
567
+ "hover:[box-shadow:var(--button-secondary-shadow-hover,var(--button-shadow-hover,var(--button-secondary-shadow,var(--button-shadow,none))))]"
568
+ ].join(" "),
569
+ // Ghost variant - full customization
570
+ ghost: [
571
+ "bg-[var(--button-ghost-bg,transparent)]",
572
+ "text-[var(--button-ghost-fg,inherit)]",
573
+ "border-[length:var(--button-ghost-border-width,0px)]",
574
+ "border-[color:var(--button-ghost-border,transparent)]",
575
+ "[box-shadow:var(--button-ghost-shadow,var(--button-shadow,none))]",
576
+ "hover:bg-[var(--button-ghost-hover-bg,hsl(var(--accent)))]",
577
+ "hover:text-[var(--button-ghost-hover-fg,hsl(var(--accent-foreground)))]",
578
+ "hover:border-[color:var(--button-ghost-hover-border,var(--button-ghost-border,transparent))]",
579
+ "hover:[box-shadow:var(--button-ghost-shadow-hover,var(--button-shadow-hover,var(--button-ghost-shadow,var(--button-shadow,none))))]",
580
+ "dark:hover:bg-accent/50"
581
+ ].join(" "),
582
+ // Link variant - full customization
583
+ link: [
584
+ "bg-[var(--button-link-bg,transparent)]",
585
+ "text-[var(--button-link-fg,hsl(var(--primary)))]",
586
+ "border-[length:var(--button-link-border-width,0px)]",
587
+ "border-[color:var(--button-link-border,transparent)]",
588
+ "[box-shadow:var(--button-link-shadow,none)]",
589
+ "hover:bg-[var(--button-link-hover-bg,transparent)]",
590
+ "hover:text-[var(--button-link-hover-fg,var(--button-link-fg,hsl(var(--primary))))]",
591
+ "hover:[box-shadow:var(--button-link-shadow-hover,none)]",
592
+ "underline-offset-4 hover:underline"
593
+ ].join(" ")
594
+ },
595
+ size: {
596
+ default: [
597
+ "h-[var(--button-height-md,2.25rem)]",
598
+ "px-[var(--button-padding-x-md,1rem)]",
599
+ "py-[var(--button-padding-y-md,0.5rem)]",
600
+ "has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
601
+ ].join(" "),
602
+ sm: [
603
+ "h-[var(--button-height-sm,2rem)]",
604
+ "px-[var(--button-padding-x-sm,0.75rem)]",
605
+ "py-[var(--button-padding-y-sm,0.25rem)]",
606
+ "gap-1.5",
607
+ "has-[>svg]:px-[calc(var(--button-padding-x-sm,0.75rem)*0.83)]"
608
+ ].join(" "),
609
+ md: [
610
+ "h-[var(--button-height-md,2.25rem)]",
611
+ "px-[var(--button-padding-x-md,1rem)]",
612
+ "py-[var(--button-padding-y-md,0.5rem)]",
613
+ "has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
614
+ ].join(" "),
615
+ lg: [
616
+ "h-[var(--button-height-lg,2.5rem)]",
617
+ "px-[var(--button-padding-x-lg,1.5rem)]",
618
+ "py-[var(--button-padding-y-lg,0.5rem)]",
619
+ "has-[>svg]:px-[calc(var(--button-padding-x-lg,1.5rem)*0.67)]"
620
+ ].join(" "),
621
+ icon: "size-[var(--button-height-md,2.25rem)]",
622
+ "icon-sm": "size-[var(--button-height-sm,2rem)]",
623
+ "icon-lg": "size-[var(--button-height-lg,2.5rem)]"
624
+ }
625
+ },
626
+ defaultVariants: {
627
+ variant: "default",
628
+ size: "default"
629
+ }
630
+ });
631
+ function StarRating({
632
+ rating,
633
+ size = 18,
634
+ className
635
+ }) {
636
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex items-center gap-0.5", className), children: [1, 2, 3, 4, 5].map((star) => /* @__PURE__ */ jsxRuntime.jsx(
637
+ DynamicIcon,
638
+ {
639
+ name: "icon-park-solid/star",
640
+ size,
641
+ className: cn(
642
+ star <= rating ? "fill-primary text-primary" : "fill-muted text-muted"
643
+ )
644
+ },
645
+ star
646
+ )) });
647
+ }
648
+ function normalizePhoneNumber(input) {
649
+ const trimmed = input.trim();
650
+ if (trimmed.toLowerCase().startsWith("tel:")) {
651
+ return trimmed;
652
+ }
653
+ const match = trimmed.match(/^[\s\+\-\(\)]*(\d[\d\s\-\(\)\.]*\d)[\s\-]*(x|ext\.?|extension)?[\s\-]*(\d+)?$/i);
654
+ if (match) {
655
+ const mainNumber = match[1].replace(/[\s\-\(\)\.]/g, "");
656
+ const extension = match[3];
657
+ const normalized = mainNumber.length >= 10 && !trimmed.startsWith("+") ? `+${mainNumber}` : mainNumber;
658
+ const withExtension = extension ? `${normalized};ext=${extension}` : normalized;
659
+ return `tel:${withExtension}`;
660
+ }
661
+ const cleaned = trimmed.replace(/[\s\-\(\)\.]/g, "");
662
+ return `tel:${cleaned}`;
663
+ }
664
+ function normalizeEmail(input) {
665
+ const trimmed = input.trim();
666
+ if (trimmed.toLowerCase().startsWith("mailto:")) {
667
+ return trimmed;
668
+ }
669
+ return `mailto:${trimmed}`;
670
+ }
671
+ function isEmail(input) {
672
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
673
+ return emailRegex.test(input.trim());
674
+ }
675
+ function isPhoneNumber(input) {
676
+ const trimmed = input.trim();
677
+ if (trimmed.toLowerCase().startsWith("tel:")) {
678
+ return true;
679
+ }
680
+ const phoneRegex = /^[\s\+\-\(\)]*\d[\d\s\-\(\)\.]*\d[\s\-]*(x|ext\.?|extension)?[\s\-]*\d*$/i;
681
+ return phoneRegex.test(trimmed);
682
+ }
683
+ function isInternalUrl(href) {
684
+ if (typeof window === "undefined") {
685
+ return href.startsWith("/") && !href.startsWith("//");
686
+ }
687
+ const trimmed = href.trim();
688
+ if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
689
+ return true;
690
+ }
691
+ try {
692
+ const url = new URL(trimmed, window.location.href);
693
+ const currentOrigin = window.location.origin;
694
+ const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
695
+ return normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin);
696
+ } catch {
697
+ return false;
698
+ }
699
+ }
700
+ function toRelativePath(href) {
701
+ if (typeof window === "undefined") {
702
+ return href;
703
+ }
704
+ const trimmed = href.trim();
705
+ if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
706
+ return trimmed;
707
+ }
708
+ try {
709
+ const url = new URL(trimmed, window.location.href);
710
+ const currentOrigin = window.location.origin;
711
+ const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
712
+ if (normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin)) {
713
+ return url.pathname + url.search + url.hash;
714
+ }
715
+ } catch {
716
+ }
717
+ return trimmed;
718
+ }
719
+ function useNavigation({
720
+ href,
721
+ onClick
722
+ } = {}) {
723
+ const linkType = React4__namespace.useMemo(() => {
724
+ if (!href || href.trim() === "") {
725
+ return onClick ? "none" : "none";
726
+ }
727
+ const trimmed = href.trim();
728
+ if (trimmed.toLowerCase().startsWith("mailto:") || isEmail(trimmed)) {
729
+ return "mailto";
730
+ }
731
+ if (trimmed.toLowerCase().startsWith("tel:") || isPhoneNumber(trimmed)) {
732
+ return "tel";
733
+ }
734
+ if (isInternalUrl(trimmed)) {
735
+ return "internal";
736
+ }
737
+ try {
738
+ new URL(trimmed, typeof window !== "undefined" ? window.location.href : "http://localhost");
739
+ return "external";
740
+ } catch {
741
+ return "internal";
742
+ }
743
+ }, [href, onClick]);
744
+ const normalizedHref = React4__namespace.useMemo(() => {
745
+ if (!href || href.trim() === "") {
746
+ return void 0;
747
+ }
748
+ const trimmed = href.trim();
749
+ switch (linkType) {
750
+ case "tel":
751
+ return normalizePhoneNumber(trimmed);
752
+ case "mailto":
753
+ return normalizeEmail(trimmed);
754
+ case "internal":
755
+ return toRelativePath(trimmed);
756
+ case "external":
757
+ return trimmed;
758
+ default:
759
+ return trimmed;
760
+ }
761
+ }, [href, linkType]);
762
+ const target = React4__namespace.useMemo(() => {
763
+ switch (linkType) {
764
+ case "external":
765
+ return "_blank";
766
+ case "internal":
767
+ return "_self";
768
+ case "mailto":
769
+ case "tel":
770
+ return void 0;
771
+ default:
772
+ return void 0;
773
+ }
774
+ }, [linkType]);
775
+ const rel = React4__namespace.useMemo(() => {
776
+ if (linkType === "external") {
777
+ return "noopener noreferrer";
778
+ }
779
+ return void 0;
780
+ }, [linkType]);
781
+ const isExternal = linkType === "external";
782
+ const isInternal = linkType === "internal";
783
+ const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
784
+ const handleClick = React4__namespace.useCallback(
785
+ (event) => {
786
+ if (onClick) {
787
+ try {
788
+ onClick(event);
789
+ } catch (error) {
790
+ console.error("Error in user onClick handler:", error);
791
+ }
792
+ }
793
+ if (event.defaultPrevented) {
794
+ return;
795
+ }
796
+ if (shouldUseRouter && normalizedHref && event.button === 0 && // left-click only
797
+ !event.metaKey && !event.altKey && !event.ctrlKey && !event.shiftKey) {
798
+ if (typeof window !== "undefined") {
799
+ const handler = window.__opensiteNavigationHandler;
800
+ if (typeof handler === "function") {
801
+ try {
802
+ const handled = handler(normalizedHref, event.nativeEvent || event);
803
+ if (handled !== false) {
804
+ event.preventDefault();
805
+ }
806
+ } catch (error) {
807
+ console.error("Error in navigation handler:", error);
808
+ }
809
+ }
810
+ }
811
+ }
812
+ },
813
+ [onClick, shouldUseRouter, normalizedHref]
814
+ );
815
+ return {
816
+ linkType,
817
+ normalizedHref,
818
+ target,
819
+ rel,
820
+ isExternal,
821
+ isInternal,
822
+ shouldUseRouter,
823
+ handleClick
824
+ };
825
+ }
826
+ var Pressable = React4__namespace.forwardRef(
827
+ ({
828
+ children,
829
+ className,
830
+ href,
831
+ onClick,
832
+ variant,
833
+ size,
834
+ asButton = false,
835
+ fallbackComponentType = "span",
836
+ componentType,
837
+ "aria-label": ariaLabel,
838
+ "aria-describedby": ariaDescribedby,
839
+ id,
840
+ ...props
841
+ }, ref) => {
842
+ const navigation = useNavigation({ href, onClick });
843
+ const {
844
+ normalizedHref,
845
+ target,
846
+ rel,
847
+ linkType,
848
+ isInternal,
849
+ handleClick
850
+ } = navigation;
851
+ const shouldRenderLink = normalizedHref && linkType !== "none";
852
+ const shouldRenderButton = !shouldRenderLink && onClick;
853
+ const effectiveComponentType = componentType || (shouldRenderLink ? "a" : shouldRenderButton ? "button" : fallbackComponentType);
854
+ const finalComponentType = isInternal && shouldRenderLink ? "a" : effectiveComponentType;
855
+ const shouldApplyButtonStyles = asButton || variant || size;
856
+ const combinedClassName = cn(
857
+ shouldApplyButtonStyles && buttonVariants({ variant, size }),
858
+ className
859
+ );
860
+ const dataProps = Object.fromEntries(
861
+ Object.entries(props).filter(([key]) => key.startsWith("data-"))
862
+ );
863
+ const buttonDataAttributes = shouldApplyButtonStyles ? {
864
+ "data-slot": "button",
865
+ "data-variant": variant ?? "default",
866
+ "data-size": size ?? "default"
867
+ } : {};
868
+ const commonProps = {
869
+ className: combinedClassName,
870
+ onClick: handleClick,
871
+ "aria-label": ariaLabel,
872
+ "aria-describedby": ariaDescribedby,
873
+ id,
874
+ ...dataProps,
875
+ ...buttonDataAttributes
876
+ };
877
+ if (finalComponentType === "a" && shouldRenderLink) {
878
+ return /* @__PURE__ */ jsxRuntime.jsx(
879
+ "a",
880
+ {
881
+ ref,
882
+ href: normalizedHref,
883
+ target,
884
+ rel,
885
+ ...commonProps,
886
+ ...props,
887
+ children
888
+ }
889
+ );
890
+ }
891
+ if (finalComponentType === "button") {
892
+ return /* @__PURE__ */ jsxRuntime.jsx(
893
+ "button",
894
+ {
895
+ ref,
896
+ type: props.type || "button",
897
+ ...commonProps,
898
+ ...props,
899
+ children
900
+ }
901
+ );
902
+ }
903
+ if (finalComponentType === "div") {
904
+ return /* @__PURE__ */ jsxRuntime.jsx(
905
+ "div",
906
+ {
907
+ ref,
908
+ ...commonProps,
909
+ children
910
+ }
911
+ );
912
+ }
913
+ return /* @__PURE__ */ jsxRuntime.jsx(
914
+ "span",
915
+ {
916
+ ref,
917
+ ...commonProps,
918
+ children
919
+ }
920
+ );
921
+ }
922
+ );
923
+ Pressable.displayName = "Pressable";
518
924
  function TestimonialsStatsHeader({
519
925
  stats,
520
926
  statsSlot,
@@ -530,6 +936,7 @@ function TestimonialsStatsHeader({
530
936
  statItemClassName,
531
937
  testimonialsGridClassName,
532
938
  cardClassName,
939
+ statCardClassName,
533
940
  quoteClassName,
534
941
  authorClassName,
535
942
  background,
@@ -538,49 +945,59 @@ function TestimonialsStatsHeader({
538
945
  pattern,
539
946
  patternOpacity
540
947
  }) {
541
- const getAuthorName = React.useCallback((testimonial) => {
948
+ const getAuthorName = React4.useCallback((testimonial) => {
542
949
  if (typeof testimonial.author === "string") return testimonial.author;
543
950
  return "";
544
951
  }, []);
545
- const getAvatarSrc = React.useCallback(
952
+ const getAvatarSrc = React4.useCallback(
546
953
  (testimonial) => {
547
954
  return testimonial.avatarSrc || testimonial.avatar?.src;
548
955
  },
549
956
  []
550
957
  );
551
- const getInitials = React.useCallback((name) => {
958
+ const renderStatIcon = React4.useCallback((stat) => {
959
+ if (stat.iconSlot) return stat.iconSlot;
960
+ if (!stat.icon) return null;
961
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-6", children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: stat.icon, size: 32, className: stat.iconColor }) });
962
+ }, []);
963
+ const getInitials = React4.useCallback((name) => {
552
964
  return name.split(" ").map((n) => n[0]).join("");
553
965
  }, []);
554
- const renderedStats = React.useMemo(() => {
966
+ const renderedStats = React4.useMemo(() => {
555
967
  if (statsSlot) return statsSlot;
556
968
  if (!stats || stats.length === 0) return null;
557
969
  return /* @__PURE__ */ jsxRuntime.jsx(
558
970
  "div",
559
971
  {
560
972
  className: cn(
561
- "mb-12 grid grid-cols-2 gap-4 md:grid-cols-4",
973
+ "mb-12 grid gap-6 md:grid-cols-2 lg:grid-cols-3",
562
974
  statsGridClassName
563
975
  ),
564
- children: stats.map((stat, index) => /* @__PURE__ */ jsxRuntime.jsxs(
565
- "div",
976
+ children: stats.map((stat) => /* @__PURE__ */ jsxRuntime.jsx(
977
+ Card,
566
978
  {
567
979
  className: cn(
568
- "rounded-lg p-6 text-center",
569
- getNestedCardBg(background),
570
- getNestedCardTextColor(background),
571
- statItemClassName
980
+ "overflow-hidden border p-0",
981
+ stat.className,
982
+ statCardClassName
572
983
  ),
573
- children: [
574
- typeof stat.value === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-3xl font-bold text-primary md:text-4xl", children: stat.value }) : stat.value,
575
- typeof stat.label === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: stat.label }) : stat.label
576
- ]
984
+ children: /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "p-6 md:p-8", children: [
985
+ renderStatIcon(stat),
986
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-end", children: [
987
+ stat.prefix && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-1 mr-1 text-2xl font-bold", children: stat.prefix }),
988
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-4xl font-bold tracking-tight leading-tight md:text-5xl", children: stat.value }),
989
+ stat.suffix && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-1 ml-1 text-2xl font-bold", children: stat.suffix })
990
+ ] }),
991
+ stat.label && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-4 text-xl font-semibold", children: stat.label }),
992
+ stat.description && (typeof stat.description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "opacity-75", children: stat.description }) : stat.description)
993
+ ] })
577
994
  },
578
- index
995
+ stat.id
579
996
  ))
580
997
  }
581
998
  );
582
999
  }, [statsSlot, stats, statsGridClassName, statItemClassName]);
583
- const renderedTestimonials = React.useMemo(() => {
1000
+ const renderedTestimonials = React4.useMemo(() => {
584
1001
  if (testimonialsSlot) return testimonialsSlot;
585
1002
  if (!testimonials || testimonials.length === 0) return null;
586
1003
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -590,41 +1007,65 @@ function TestimonialsStatsHeader({
590
1007
  children: testimonials.map((testimonial, index) => {
591
1008
  const authorName = getAuthorName(testimonial);
592
1009
  const avatarSrc = getAvatarSrc(testimonial);
593
- return /* @__PURE__ */ jsxRuntime.jsx(Card, { className: cardClassName, children: /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "p-6", children: [
594
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-4 flex gap-1", children: [...Array(5)].map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
595
- DynamicIcon,
596
- {
597
- name: "lucide/star",
598
- size: 16,
599
- className: "fill-primary text-primary"
600
- },
601
- i
602
- )) }),
603
- testimonial.quote && (typeof testimonial.quote === "string" ? /* @__PURE__ */ jsxRuntime.jsxs(
604
- "p",
605
- {
606
- className: cn(
607
- "mb-6 text-sm leading-relaxed",
608
- quoteClassName
609
- ),
610
- children: [
611
- "\u201C",
612
- testimonial.quote,
613
- "\u201D"
614
- ]
615
- }
616
- ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mb-6", quoteClassName), children: testimonial.quote })),
617
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-3", authorClassName), children: [
618
- /* @__PURE__ */ jsxRuntime.jsxs(Avatar, { className: "size-10", children: [
619
- /* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src: avatarSrc, alt: authorName }),
620
- /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { children: getInitials(authorName) })
621
- ] }),
622
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
623
- testimonial.author && (typeof testimonial.author === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium", children: testimonial.author }) : testimonial.author),
624
- testimonial.role && (typeof testimonial.role === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: testimonial.role }) : testimonial.role)
625
- ] })
626
- ] })
627
- ] }) }, index);
1010
+ return /* @__PURE__ */ jsxRuntime.jsx(
1011
+ "div",
1012
+ {
1013
+ className: cn(
1014
+ "bg-card text-card-foreground flex flex-col gap-6 rounded-2xl border py-0 shadow-xl",
1015
+ cardClassName
1016
+ ),
1017
+ children: /* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "p-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-start gap-12 justify-between", children: [
1018
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-start gap-4", children: [
1019
+ /* @__PURE__ */ jsxRuntime.jsx(StarRating, { rating: 5, size: 20 }),
1020
+ testimonial.quote && (typeof testimonial.quote === "string" ? /* @__PURE__ */ jsxRuntime.jsxs(
1021
+ "p",
1022
+ {
1023
+ className: cn(
1024
+ "mb-6 text-sm leading-relaxed",
1025
+ quoteClassName
1026
+ ),
1027
+ children: [
1028
+ "\u201C",
1029
+ testimonial.quote,
1030
+ "\u201D"
1031
+ ]
1032
+ }
1033
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mb-6", quoteClassName), children: testimonial.quote }))
1034
+ ] }),
1035
+ /* @__PURE__ */ jsxRuntime.jsxs(
1036
+ "div",
1037
+ {
1038
+ className: cn("flex items-center gap-3", authorClassName),
1039
+ children: [
1040
+ /* @__PURE__ */ jsxRuntime.jsxs(Avatar, { className: "size-10", children: [
1041
+ /* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src: avatarSrc, alt: authorName }),
1042
+ /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { children: getInitials(authorName) })
1043
+ ] }),
1044
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
1045
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1046
+ testimonial.author && (typeof testimonial.author === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base font-medium", children: testimonial.author }) : testimonial.author),
1047
+ testimonial.role && (typeof testimonial.role === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm opacity-75", children: testimonial.role }) : testimonial.role)
1048
+ ] }),
1049
+ testimonial.linkConfig?.href && /* @__PURE__ */ jsxRuntime.jsx(
1050
+ Pressable,
1051
+ {
1052
+ href: testimonial.linkConfig.href,
1053
+ className: cn(
1054
+ "text-sm transition-all duration-300",
1055
+ "hover:underline hover:underline-offset-4",
1056
+ testimonial.linkConfig.className
1057
+ ),
1058
+ children: testimonial.linkConfig.label
1059
+ }
1060
+ )
1061
+ ] })
1062
+ ]
1063
+ }
1064
+ )
1065
+ ] }) })
1066
+ },
1067
+ index
1068
+ );
628
1069
  })
629
1070
  }
630
1071
  );