@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,48 +1,19 @@
1
1
  "use client";
2
- import * as React from 'react';
3
- import React__default, { useCallback, useMemo } from 'react';
2
+ import * as React4 from 'react';
3
+ import React4__default, { useCallback, useMemo } from 'react';
4
4
  import { clsx } from 'clsx';
5
5
  import { twMerge } from 'tailwind-merge';
6
6
  import { Icon } from '@page-speed/icon';
7
7
  import { jsx, jsxs } from 'react/jsx-runtime';
8
8
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
9
+ import { cva } from 'class-variance-authority';
9
10
 
10
11
  // components/blocks/testimonials/testimonials-stats-header.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
15
  var DEFAULT_ICON_API_KEY = "au382bi7fsh96w9h9xlrnat2jglx";
45
- var DynamicIcon = React.memo(function DynamicIcon2({
16
+ var DynamicIcon = React4.memo(function DynamicIcon2({
46
17
  apiKey,
47
18
  ...props
48
19
  }) {
@@ -126,7 +97,7 @@ var maxWidthStyles = {
126
97
  "4xl": "max-w-[1536px]",
127
98
  full: "max-w-full"
128
99
  };
129
- var Container = React__default.forwardRef(
100
+ var Container = React4__default.forwardRef(
130
101
  ({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
131
102
  const Component = as;
132
103
  return /* @__PURE__ */ jsx(
@@ -432,7 +403,7 @@ var spacingStyles = {
432
403
  };
433
404
  var predefinedSpacings = ["none", "sm", "md", "lg", "xl", "hero"];
434
405
  var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
435
- var Section = React__default.forwardRef(
406
+ var Section = React4__default.forwardRef(
436
407
  ({
437
408
  id,
438
409
  title,
@@ -493,6 +464,441 @@ var Section = React__default.forwardRef(
493
464
  }
494
465
  );
495
466
  Section.displayName = "Section";
467
+ var baseStyles = [
468
+ // Layout
469
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap shrink-0",
470
+ // Typography - using CSS variables with sensible defaults
471
+ "font-[var(--button-font-family,inherit)]",
472
+ "font-[var(--button-font-weight,500)]",
473
+ "tracking-[var(--button-letter-spacing,0)]",
474
+ "leading-[var(--button-line-height,1.25)]",
475
+ "[text-transform:var(--button-text-transform,none)]",
476
+ "text-sm",
477
+ // Border radius
478
+ "rounded-[var(--button-radius,var(--radius,0.375rem))]",
479
+ // Smooth transition - using [transition:...] to set full shorthand property (not just transition-property)
480
+ "[transition:var(--button-transition,all_250ms_cubic-bezier(0.4,0,0.2,1))]",
481
+ // Box shadow (master level) - using [box-shadow:...] for complex multi-value shadows
482
+ "[box-shadow:var(--button-shadow,none)]",
483
+ "hover:[box-shadow:var(--button-shadow-hover,var(--button-shadow,none))]",
484
+ // Disabled state
485
+ "disabled:pointer-events-none disabled:opacity-50",
486
+ // SVG handling
487
+ "[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
488
+ // Focus styles
489
+ "outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
490
+ // Invalid state
491
+ "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
492
+ ].join(" ");
493
+ var buttonVariants = cva(baseStyles, {
494
+ variants: {
495
+ variant: {
496
+ // Default (Primary) variant - full customization
497
+ default: [
498
+ "bg-[var(--button-default-bg,hsl(var(--primary)))]",
499
+ "text-[var(--button-default-fg,hsl(var(--primary-foreground)))]",
500
+ "border-[length:var(--button-default-border-width,0px)]",
501
+ "border-[color:var(--button-default-border,transparent)]",
502
+ "[box-shadow:var(--button-default-shadow,var(--button-shadow,none))]",
503
+ "hover:bg-[var(--button-default-hover-bg,hsl(var(--primary)/0.9))]",
504
+ "hover:text-[var(--button-default-hover-fg,var(--button-default-fg,hsl(var(--primary-foreground))))]",
505
+ "hover:border-[color:var(--button-default-hover-border,var(--button-default-border,transparent))]",
506
+ "hover:[box-shadow:var(--button-default-shadow-hover,var(--button-shadow-hover,var(--button-default-shadow,var(--button-shadow,none))))]"
507
+ ].join(" "),
508
+ // Destructive variant - full customization
509
+ destructive: [
510
+ "bg-[var(--button-destructive-bg,hsl(var(--destructive)))]",
511
+ "text-[var(--button-destructive-fg,white)]",
512
+ "border-[length:var(--button-destructive-border-width,0px)]",
513
+ "border-[color:var(--button-destructive-border,transparent)]",
514
+ "[box-shadow:var(--button-destructive-shadow,var(--button-shadow,none))]",
515
+ "hover:bg-[var(--button-destructive-hover-bg,hsl(var(--destructive)/0.9))]",
516
+ "hover:text-[var(--button-destructive-hover-fg,var(--button-destructive-fg,white))]",
517
+ "hover:border-[color:var(--button-destructive-hover-border,var(--button-destructive-border,transparent))]",
518
+ "hover:[box-shadow:var(--button-destructive-shadow-hover,var(--button-shadow-hover,var(--button-destructive-shadow,var(--button-shadow,none))))]",
519
+ "focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
520
+ "dark:bg-destructive/60"
521
+ ].join(" "),
522
+ // Outline variant - full customization with proper border handling
523
+ outline: [
524
+ "bg-[var(--button-outline-bg,hsl(var(--background)))]",
525
+ "text-[var(--button-outline-fg,inherit)]",
526
+ "border-[length:var(--button-outline-border-width,1px)]",
527
+ "border-[color:var(--button-outline-border,hsl(var(--border)))]",
528
+ "[box-shadow:var(--button-outline-shadow,var(--button-shadow,0_1px_2px_0_rgb(0_0_0/0.05)))]",
529
+ "hover:bg-[var(--button-outline-hover-bg,hsl(var(--accent)))]",
530
+ "hover:text-[var(--button-outline-hover-fg,hsl(var(--accent-foreground)))]",
531
+ "hover:border-[color:var(--button-outline-hover-border,var(--button-outline-border,hsl(var(--border))))]",
532
+ "hover:[box-shadow:var(--button-outline-shadow-hover,var(--button-shadow-hover,var(--button-outline-shadow,var(--button-shadow,none))))]",
533
+ "dark:bg-input/30 dark:border-input dark:hover:bg-input/50"
534
+ ].join(" "),
535
+ // Secondary variant - full customization
536
+ secondary: [
537
+ "bg-[var(--button-secondary-bg,hsl(var(--secondary)))]",
538
+ "text-[var(--button-secondary-fg,hsl(var(--secondary-foreground)))]",
539
+ "border-[length:var(--button-secondary-border-width,0px)]",
540
+ "border-[color:var(--button-secondary-border,transparent)]",
541
+ "[box-shadow:var(--button-secondary-shadow,var(--button-shadow,none))]",
542
+ "hover:bg-[var(--button-secondary-hover-bg,hsl(var(--secondary)/0.8))]",
543
+ "hover:text-[var(--button-secondary-hover-fg,var(--button-secondary-fg,hsl(var(--secondary-foreground))))]",
544
+ "hover:border-[color:var(--button-secondary-hover-border,var(--button-secondary-border,transparent))]",
545
+ "hover:[box-shadow:var(--button-secondary-shadow-hover,var(--button-shadow-hover,var(--button-secondary-shadow,var(--button-shadow,none))))]"
546
+ ].join(" "),
547
+ // Ghost variant - full customization
548
+ ghost: [
549
+ "bg-[var(--button-ghost-bg,transparent)]",
550
+ "text-[var(--button-ghost-fg,inherit)]",
551
+ "border-[length:var(--button-ghost-border-width,0px)]",
552
+ "border-[color:var(--button-ghost-border,transparent)]",
553
+ "[box-shadow:var(--button-ghost-shadow,var(--button-shadow,none))]",
554
+ "hover:bg-[var(--button-ghost-hover-bg,hsl(var(--accent)))]",
555
+ "hover:text-[var(--button-ghost-hover-fg,hsl(var(--accent-foreground)))]",
556
+ "hover:border-[color:var(--button-ghost-hover-border,var(--button-ghost-border,transparent))]",
557
+ "hover:[box-shadow:var(--button-ghost-shadow-hover,var(--button-shadow-hover,var(--button-ghost-shadow,var(--button-shadow,none))))]",
558
+ "dark:hover:bg-accent/50"
559
+ ].join(" "),
560
+ // Link variant - full customization
561
+ link: [
562
+ "bg-[var(--button-link-bg,transparent)]",
563
+ "text-[var(--button-link-fg,hsl(var(--primary)))]",
564
+ "border-[length:var(--button-link-border-width,0px)]",
565
+ "border-[color:var(--button-link-border,transparent)]",
566
+ "[box-shadow:var(--button-link-shadow,none)]",
567
+ "hover:bg-[var(--button-link-hover-bg,transparent)]",
568
+ "hover:text-[var(--button-link-hover-fg,var(--button-link-fg,hsl(var(--primary))))]",
569
+ "hover:[box-shadow:var(--button-link-shadow-hover,none)]",
570
+ "underline-offset-4 hover:underline"
571
+ ].join(" ")
572
+ },
573
+ size: {
574
+ default: [
575
+ "h-[var(--button-height-md,2.25rem)]",
576
+ "px-[var(--button-padding-x-md,1rem)]",
577
+ "py-[var(--button-padding-y-md,0.5rem)]",
578
+ "has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
579
+ ].join(" "),
580
+ sm: [
581
+ "h-[var(--button-height-sm,2rem)]",
582
+ "px-[var(--button-padding-x-sm,0.75rem)]",
583
+ "py-[var(--button-padding-y-sm,0.25rem)]",
584
+ "gap-1.5",
585
+ "has-[>svg]:px-[calc(var(--button-padding-x-sm,0.75rem)*0.83)]"
586
+ ].join(" "),
587
+ md: [
588
+ "h-[var(--button-height-md,2.25rem)]",
589
+ "px-[var(--button-padding-x-md,1rem)]",
590
+ "py-[var(--button-padding-y-md,0.5rem)]",
591
+ "has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
592
+ ].join(" "),
593
+ lg: [
594
+ "h-[var(--button-height-lg,2.5rem)]",
595
+ "px-[var(--button-padding-x-lg,1.5rem)]",
596
+ "py-[var(--button-padding-y-lg,0.5rem)]",
597
+ "has-[>svg]:px-[calc(var(--button-padding-x-lg,1.5rem)*0.67)]"
598
+ ].join(" "),
599
+ icon: "size-[var(--button-height-md,2.25rem)]",
600
+ "icon-sm": "size-[var(--button-height-sm,2rem)]",
601
+ "icon-lg": "size-[var(--button-height-lg,2.5rem)]"
602
+ }
603
+ },
604
+ defaultVariants: {
605
+ variant: "default",
606
+ size: "default"
607
+ }
608
+ });
609
+ function StarRating({
610
+ rating,
611
+ size = 18,
612
+ className
613
+ }) {
614
+ return /* @__PURE__ */ jsx("div", { className: cn("flex items-center gap-0.5", className), children: [1, 2, 3, 4, 5].map((star) => /* @__PURE__ */ jsx(
615
+ DynamicIcon,
616
+ {
617
+ name: "icon-park-solid/star",
618
+ size,
619
+ className: cn(
620
+ star <= rating ? "fill-primary text-primary" : "fill-muted text-muted"
621
+ )
622
+ },
623
+ star
624
+ )) });
625
+ }
626
+ function normalizePhoneNumber(input) {
627
+ const trimmed = input.trim();
628
+ if (trimmed.toLowerCase().startsWith("tel:")) {
629
+ return trimmed;
630
+ }
631
+ const match = trimmed.match(/^[\s\+\-\(\)]*(\d[\d\s\-\(\)\.]*\d)[\s\-]*(x|ext\.?|extension)?[\s\-]*(\d+)?$/i);
632
+ if (match) {
633
+ const mainNumber = match[1].replace(/[\s\-\(\)\.]/g, "");
634
+ const extension = match[3];
635
+ const normalized = mainNumber.length >= 10 && !trimmed.startsWith("+") ? `+${mainNumber}` : mainNumber;
636
+ const withExtension = extension ? `${normalized};ext=${extension}` : normalized;
637
+ return `tel:${withExtension}`;
638
+ }
639
+ const cleaned = trimmed.replace(/[\s\-\(\)\.]/g, "");
640
+ return `tel:${cleaned}`;
641
+ }
642
+ function normalizeEmail(input) {
643
+ const trimmed = input.trim();
644
+ if (trimmed.toLowerCase().startsWith("mailto:")) {
645
+ return trimmed;
646
+ }
647
+ return `mailto:${trimmed}`;
648
+ }
649
+ function isEmail(input) {
650
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
651
+ return emailRegex.test(input.trim());
652
+ }
653
+ function isPhoneNumber(input) {
654
+ const trimmed = input.trim();
655
+ if (trimmed.toLowerCase().startsWith("tel:")) {
656
+ return true;
657
+ }
658
+ const phoneRegex = /^[\s\+\-\(\)]*\d[\d\s\-\(\)\.]*\d[\s\-]*(x|ext\.?|extension)?[\s\-]*\d*$/i;
659
+ return phoneRegex.test(trimmed);
660
+ }
661
+ function isInternalUrl(href) {
662
+ if (typeof window === "undefined") {
663
+ return href.startsWith("/") && !href.startsWith("//");
664
+ }
665
+ const trimmed = href.trim();
666
+ if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
667
+ return true;
668
+ }
669
+ try {
670
+ const url = new URL(trimmed, window.location.href);
671
+ const currentOrigin = window.location.origin;
672
+ const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
673
+ return normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin);
674
+ } catch {
675
+ return false;
676
+ }
677
+ }
678
+ function toRelativePath(href) {
679
+ if (typeof window === "undefined") {
680
+ return href;
681
+ }
682
+ const trimmed = href.trim();
683
+ if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
684
+ return trimmed;
685
+ }
686
+ try {
687
+ const url = new URL(trimmed, window.location.href);
688
+ const currentOrigin = window.location.origin;
689
+ const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
690
+ if (normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin)) {
691
+ return url.pathname + url.search + url.hash;
692
+ }
693
+ } catch {
694
+ }
695
+ return trimmed;
696
+ }
697
+ function useNavigation({
698
+ href,
699
+ onClick
700
+ } = {}) {
701
+ const linkType = React4.useMemo(() => {
702
+ if (!href || href.trim() === "") {
703
+ return onClick ? "none" : "none";
704
+ }
705
+ const trimmed = href.trim();
706
+ if (trimmed.toLowerCase().startsWith("mailto:") || isEmail(trimmed)) {
707
+ return "mailto";
708
+ }
709
+ if (trimmed.toLowerCase().startsWith("tel:") || isPhoneNumber(trimmed)) {
710
+ return "tel";
711
+ }
712
+ if (isInternalUrl(trimmed)) {
713
+ return "internal";
714
+ }
715
+ try {
716
+ new URL(trimmed, typeof window !== "undefined" ? window.location.href : "http://localhost");
717
+ return "external";
718
+ } catch {
719
+ return "internal";
720
+ }
721
+ }, [href, onClick]);
722
+ const normalizedHref = React4.useMemo(() => {
723
+ if (!href || href.trim() === "") {
724
+ return void 0;
725
+ }
726
+ const trimmed = href.trim();
727
+ switch (linkType) {
728
+ case "tel":
729
+ return normalizePhoneNumber(trimmed);
730
+ case "mailto":
731
+ return normalizeEmail(trimmed);
732
+ case "internal":
733
+ return toRelativePath(trimmed);
734
+ case "external":
735
+ return trimmed;
736
+ default:
737
+ return trimmed;
738
+ }
739
+ }, [href, linkType]);
740
+ const target = React4.useMemo(() => {
741
+ switch (linkType) {
742
+ case "external":
743
+ return "_blank";
744
+ case "internal":
745
+ return "_self";
746
+ case "mailto":
747
+ case "tel":
748
+ return void 0;
749
+ default:
750
+ return void 0;
751
+ }
752
+ }, [linkType]);
753
+ const rel = React4.useMemo(() => {
754
+ if (linkType === "external") {
755
+ return "noopener noreferrer";
756
+ }
757
+ return void 0;
758
+ }, [linkType]);
759
+ const isExternal = linkType === "external";
760
+ const isInternal = linkType === "internal";
761
+ const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
762
+ const handleClick = React4.useCallback(
763
+ (event) => {
764
+ if (onClick) {
765
+ try {
766
+ onClick(event);
767
+ } catch (error) {
768
+ console.error("Error in user onClick handler:", error);
769
+ }
770
+ }
771
+ if (event.defaultPrevented) {
772
+ return;
773
+ }
774
+ if (shouldUseRouter && normalizedHref && event.button === 0 && // left-click only
775
+ !event.metaKey && !event.altKey && !event.ctrlKey && !event.shiftKey) {
776
+ if (typeof window !== "undefined") {
777
+ const handler = window.__opensiteNavigationHandler;
778
+ if (typeof handler === "function") {
779
+ try {
780
+ const handled = handler(normalizedHref, event.nativeEvent || event);
781
+ if (handled !== false) {
782
+ event.preventDefault();
783
+ }
784
+ } catch (error) {
785
+ console.error("Error in navigation handler:", error);
786
+ }
787
+ }
788
+ }
789
+ }
790
+ },
791
+ [onClick, shouldUseRouter, normalizedHref]
792
+ );
793
+ return {
794
+ linkType,
795
+ normalizedHref,
796
+ target,
797
+ rel,
798
+ isExternal,
799
+ isInternal,
800
+ shouldUseRouter,
801
+ handleClick
802
+ };
803
+ }
804
+ var Pressable = React4.forwardRef(
805
+ ({
806
+ children,
807
+ className,
808
+ href,
809
+ onClick,
810
+ variant,
811
+ size,
812
+ asButton = false,
813
+ fallbackComponentType = "span",
814
+ componentType,
815
+ "aria-label": ariaLabel,
816
+ "aria-describedby": ariaDescribedby,
817
+ id,
818
+ ...props
819
+ }, ref) => {
820
+ const navigation = useNavigation({ href, onClick });
821
+ const {
822
+ normalizedHref,
823
+ target,
824
+ rel,
825
+ linkType,
826
+ isInternal,
827
+ handleClick
828
+ } = navigation;
829
+ const shouldRenderLink = normalizedHref && linkType !== "none";
830
+ const shouldRenderButton = !shouldRenderLink && onClick;
831
+ const effectiveComponentType = componentType || (shouldRenderLink ? "a" : shouldRenderButton ? "button" : fallbackComponentType);
832
+ const finalComponentType = isInternal && shouldRenderLink ? "a" : effectiveComponentType;
833
+ const shouldApplyButtonStyles = asButton || variant || size;
834
+ const combinedClassName = cn(
835
+ shouldApplyButtonStyles && buttonVariants({ variant, size }),
836
+ className
837
+ );
838
+ const dataProps = Object.fromEntries(
839
+ Object.entries(props).filter(([key]) => key.startsWith("data-"))
840
+ );
841
+ const buttonDataAttributes = shouldApplyButtonStyles ? {
842
+ "data-slot": "button",
843
+ "data-variant": variant ?? "default",
844
+ "data-size": size ?? "default"
845
+ } : {};
846
+ const commonProps = {
847
+ className: combinedClassName,
848
+ onClick: handleClick,
849
+ "aria-label": ariaLabel,
850
+ "aria-describedby": ariaDescribedby,
851
+ id,
852
+ ...dataProps,
853
+ ...buttonDataAttributes
854
+ };
855
+ if (finalComponentType === "a" && shouldRenderLink) {
856
+ return /* @__PURE__ */ jsx(
857
+ "a",
858
+ {
859
+ ref,
860
+ href: normalizedHref,
861
+ target,
862
+ rel,
863
+ ...commonProps,
864
+ ...props,
865
+ children
866
+ }
867
+ );
868
+ }
869
+ if (finalComponentType === "button") {
870
+ return /* @__PURE__ */ jsx(
871
+ "button",
872
+ {
873
+ ref,
874
+ type: props.type || "button",
875
+ ...commonProps,
876
+ ...props,
877
+ children
878
+ }
879
+ );
880
+ }
881
+ if (finalComponentType === "div") {
882
+ return /* @__PURE__ */ jsx(
883
+ "div",
884
+ {
885
+ ref,
886
+ ...commonProps,
887
+ children
888
+ }
889
+ );
890
+ }
891
+ return /* @__PURE__ */ jsx(
892
+ "span",
893
+ {
894
+ ref,
895
+ ...commonProps,
896
+ children
897
+ }
898
+ );
899
+ }
900
+ );
901
+ Pressable.displayName = "Pressable";
496
902
  function TestimonialsStatsHeader({
497
903
  stats,
498
904
  statsSlot,
@@ -508,6 +914,7 @@ function TestimonialsStatsHeader({
508
914
  statItemClassName,
509
915
  testimonialsGridClassName,
510
916
  cardClassName,
917
+ statCardClassName,
511
918
  quoteClassName,
512
919
  authorClassName,
513
920
  background,
@@ -526,6 +933,11 @@ function TestimonialsStatsHeader({
526
933
  },
527
934
  []
528
935
  );
936
+ const renderStatIcon = useCallback((stat) => {
937
+ if (stat.iconSlot) return stat.iconSlot;
938
+ if (!stat.icon) return null;
939
+ return /* @__PURE__ */ jsx("div", { className: "mb-6", children: /* @__PURE__ */ jsx(DynamicIcon, { name: stat.icon, size: 32, className: stat.iconColor }) });
940
+ }, []);
529
941
  const getInitials = useCallback((name) => {
530
942
  return name.split(" ").map((n) => n[0]).join("");
531
943
  }, []);
@@ -536,24 +948,29 @@ function TestimonialsStatsHeader({
536
948
  "div",
537
949
  {
538
950
  className: cn(
539
- "mb-12 grid grid-cols-2 gap-4 md:grid-cols-4",
951
+ "mb-12 grid gap-6 md:grid-cols-2 lg:grid-cols-3",
540
952
  statsGridClassName
541
953
  ),
542
- children: stats.map((stat, index) => /* @__PURE__ */ jsxs(
543
- "div",
954
+ children: stats.map((stat) => /* @__PURE__ */ jsx(
955
+ Card,
544
956
  {
545
957
  className: cn(
546
- "rounded-lg p-6 text-center",
547
- getNestedCardBg(background),
548
- getNestedCardTextColor(background),
549
- statItemClassName
958
+ "overflow-hidden border p-0",
959
+ stat.className,
960
+ statCardClassName
550
961
  ),
551
- children: [
552
- typeof stat.value === "string" ? /* @__PURE__ */ jsx("p", { className: "text-3xl font-bold text-primary md:text-4xl", children: stat.value }) : stat.value,
553
- typeof stat.label === "string" ? /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: stat.label }) : stat.label
554
- ]
962
+ children: /* @__PURE__ */ jsxs(CardContent, { className: "p-6 md:p-8", children: [
963
+ renderStatIcon(stat),
964
+ /* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-end", children: [
965
+ stat.prefix && /* @__PURE__ */ jsx("span", { className: "mb-1 mr-1 text-2xl font-bold", children: stat.prefix }),
966
+ /* @__PURE__ */ jsx("h3", { className: "text-4xl font-bold tracking-tight leading-tight md:text-5xl", children: stat.value }),
967
+ stat.suffix && /* @__PURE__ */ jsx("span", { className: "mb-1 ml-1 text-2xl font-bold", children: stat.suffix })
968
+ ] }),
969
+ stat.label && /* @__PURE__ */ jsx("div", { className: "mb-4 text-xl font-semibold", children: stat.label }),
970
+ stat.description && (typeof stat.description === "string" ? /* @__PURE__ */ jsx("p", { className: "opacity-75", children: stat.description }) : stat.description)
971
+ ] })
555
972
  },
556
- index
973
+ stat.id
557
974
  ))
558
975
  }
559
976
  );
@@ -568,41 +985,65 @@ function TestimonialsStatsHeader({
568
985
  children: testimonials.map((testimonial, index) => {
569
986
  const authorName = getAuthorName(testimonial);
570
987
  const avatarSrc = getAvatarSrc(testimonial);
571
- return /* @__PURE__ */ jsx(Card, { className: cardClassName, children: /* @__PURE__ */ jsxs(CardContent, { className: "p-6", children: [
572
- /* @__PURE__ */ jsx("div", { className: "mb-4 flex gap-1", children: [...Array(5)].map((_, i) => /* @__PURE__ */ jsx(
573
- DynamicIcon,
574
- {
575
- name: "lucide/star",
576
- size: 16,
577
- className: "fill-primary text-primary"
578
- },
579
- i
580
- )) }),
581
- testimonial.quote && (typeof testimonial.quote === "string" ? /* @__PURE__ */ jsxs(
582
- "p",
583
- {
584
- className: cn(
585
- "mb-6 text-sm leading-relaxed",
586
- quoteClassName
587
- ),
588
- children: [
589
- "\u201C",
590
- testimonial.quote,
591
- "\u201D"
592
- ]
593
- }
594
- ) : /* @__PURE__ */ jsx("div", { className: cn("mb-6", quoteClassName), children: testimonial.quote })),
595
- /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-3", authorClassName), children: [
596
- /* @__PURE__ */ jsxs(Avatar, { className: "size-10", children: [
597
- /* @__PURE__ */ jsx(AvatarImage, { src: avatarSrc, alt: authorName }),
598
- /* @__PURE__ */ jsx(AvatarFallback, { children: getInitials(authorName) })
599
- ] }),
600
- /* @__PURE__ */ jsxs("div", { children: [
601
- testimonial.author && (typeof testimonial.author === "string" ? /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: testimonial.author }) : testimonial.author),
602
- testimonial.role && (typeof testimonial.role === "string" ? /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: testimonial.role }) : testimonial.role)
603
- ] })
604
- ] })
605
- ] }) }, index);
988
+ return /* @__PURE__ */ jsx(
989
+ "div",
990
+ {
991
+ className: cn(
992
+ "bg-card text-card-foreground flex flex-col gap-6 rounded-2xl border py-0 shadow-xl",
993
+ cardClassName
994
+ ),
995
+ children: /* @__PURE__ */ jsx(CardContent, { className: "p-6", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-start gap-12 justify-between", children: [
996
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-start gap-4", children: [
997
+ /* @__PURE__ */ jsx(StarRating, { rating: 5, size: 20 }),
998
+ testimonial.quote && (typeof testimonial.quote === "string" ? /* @__PURE__ */ jsxs(
999
+ "p",
1000
+ {
1001
+ className: cn(
1002
+ "mb-6 text-sm leading-relaxed",
1003
+ quoteClassName
1004
+ ),
1005
+ children: [
1006
+ "\u201C",
1007
+ testimonial.quote,
1008
+ "\u201D"
1009
+ ]
1010
+ }
1011
+ ) : /* @__PURE__ */ jsx("div", { className: cn("mb-6", quoteClassName), children: testimonial.quote }))
1012
+ ] }),
1013
+ /* @__PURE__ */ jsxs(
1014
+ "div",
1015
+ {
1016
+ className: cn("flex items-center gap-3", authorClassName),
1017
+ children: [
1018
+ /* @__PURE__ */ jsxs(Avatar, { className: "size-10", children: [
1019
+ /* @__PURE__ */ jsx(AvatarImage, { src: avatarSrc, alt: authorName }),
1020
+ /* @__PURE__ */ jsx(AvatarFallback, { children: getInitials(authorName) })
1021
+ ] }),
1022
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
1023
+ /* @__PURE__ */ jsxs("div", { children: [
1024
+ testimonial.author && (typeof testimonial.author === "string" ? /* @__PURE__ */ jsx("p", { className: "text-base font-medium", children: testimonial.author }) : testimonial.author),
1025
+ testimonial.role && (typeof testimonial.role === "string" ? /* @__PURE__ */ jsx("p", { className: "text-sm opacity-75", children: testimonial.role }) : testimonial.role)
1026
+ ] }),
1027
+ testimonial.linkConfig?.href && /* @__PURE__ */ jsx(
1028
+ Pressable,
1029
+ {
1030
+ href: testimonial.linkConfig.href,
1031
+ className: cn(
1032
+ "text-sm transition-all duration-300",
1033
+ "hover:underline hover:underline-offset-4",
1034
+ testimonial.linkConfig.className
1035
+ ),
1036
+ children: testimonial.linkConfig.label
1037
+ }
1038
+ )
1039
+ ] })
1040
+ ]
1041
+ }
1042
+ )
1043
+ ] }) })
1044
+ },
1045
+ index
1046
+ );
606
1047
  })
607
1048
  }
608
1049
  );