@opensite/ui 2.0.5 → 2.0.7

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 (75) hide show
  1. package/dist/hero-adaptable-product-grid.cjs +11 -8
  2. package/dist/hero-adaptable-product-grid.d.cts +1 -1
  3. package/dist/hero-adaptable-product-grid.d.ts +1 -1
  4. package/dist/hero-adaptable-product-grid.js +11 -8
  5. package/dist/hero-business-operations-mosaic.cjs +542 -22
  6. package/dist/hero-business-operations-mosaic.d.cts +20 -8
  7. package/dist/hero-business-operations-mosaic.d.ts +20 -8
  8. package/dist/hero-business-operations-mosaic.js +542 -19
  9. package/dist/hero-centered-gradient-cta.cjs +3 -3
  10. package/dist/hero-centered-gradient-cta.js +3 -3
  11. package/dist/hero-community-survey-cta.cjs +3 -2
  12. package/dist/hero-community-survey-cta.js +3 -2
  13. package/dist/hero-conversion-video-play.cjs +1 -1
  14. package/dist/hero-conversion-video-play.js +1 -1
  15. package/dist/hero-crm-streamlined.cjs +4 -4
  16. package/dist/hero-crm-streamlined.js +4 -4
  17. package/dist/hero-design-showcase-logos.cjs +4 -1
  18. package/dist/hero-design-showcase-logos.js +4 -1
  19. package/dist/hero-design-system-3d.cjs +1 -1
  20. package/dist/hero-design-system-3d.js +1 -1
  21. package/dist/hero-feature-cards-grid.cjs +2 -2
  22. package/dist/hero-feature-cards-grid.js +2 -2
  23. package/dist/hero-fullscreen-background-image.cjs +4 -3
  24. package/dist/hero-fullscreen-background-image.js +4 -3
  25. package/dist/hero-fullscreen-logo-cta.cjs +7 -5
  26. package/dist/hero-fullscreen-logo-cta.js +7 -5
  27. package/dist/hero-gradient-avatars-rating.cjs +3 -3
  28. package/dist/hero-gradient-avatars-rating.js +3 -3
  29. package/dist/hero-gradient-client-focused.cjs +2 -2
  30. package/dist/hero-gradient-client-focused.js +2 -2
  31. package/dist/hero-grid-pattern-solutions.cjs +2 -2
  32. package/dist/hero-grid-pattern-solutions.d.cts +1 -1
  33. package/dist/hero-grid-pattern-solutions.d.ts +1 -1
  34. package/dist/hero-grid-pattern-solutions.js +2 -2
  35. package/dist/hero-innovation-image-grid.cjs +48 -42
  36. package/dist/hero-innovation-image-grid.js +48 -42
  37. package/dist/hero-mental-health-team.cjs +633 -89
  38. package/dist/hero-mental-health-team.d.cts +26 -6
  39. package/dist/hero-mental-health-team.d.ts +26 -6
  40. package/dist/hero-mental-health-team.js +614 -85
  41. package/dist/hero-minimal-centered-dark.cjs +841 -807
  42. package/dist/hero-minimal-centered-dark.d.cts +1 -1
  43. package/dist/hero-minimal-centered-dark.d.ts +1 -1
  44. package/dist/hero-minimal-centered-dark.js +840 -806
  45. package/dist/hero-presentation-platform-video.cjs +8 -2
  46. package/dist/hero-presentation-platform-video.js +8 -2
  47. package/dist/hero-product-showcase-floating.cjs +715 -612
  48. package/dist/hero-product-showcase-floating.d.cts +5 -1
  49. package/dist/hero-product-showcase-floating.d.ts +5 -1
  50. package/dist/hero-product-showcase-floating.js +712 -609
  51. package/dist/hero-saas-dashboard-preview.cjs +82 -107
  52. package/dist/hero-saas-dashboard-preview.d.cts +1 -1
  53. package/dist/hero-saas-dashboard-preview.d.ts +1 -1
  54. package/dist/hero-saas-dashboard-preview.js +82 -107
  55. package/dist/hero-software-growth-video-dialog.cjs +5 -5
  56. package/dist/hero-software-growth-video-dialog.js +5 -5
  57. package/dist/hero-split-image-newsletter.cjs +41 -32
  58. package/dist/hero-split-image-newsletter.js +41 -32
  59. package/dist/hero-stats-social-proof.cjs +1 -1
  60. package/dist/hero-stats-social-proof.js +1 -1
  61. package/dist/hero-testimonial-image-grid.cjs +2 -2
  62. package/dist/hero-testimonial-image-grid.js +2 -2
  63. package/dist/hero-therapy-testimonial-grid.cjs +682 -638
  64. package/dist/hero-therapy-testimonial-grid.d.cts +5 -1
  65. package/dist/hero-therapy-testimonial-grid.d.ts +5 -1
  66. package/dist/hero-therapy-testimonial-grid.js +671 -627
  67. package/dist/hero-ui-library-showcase.cjs +51 -42
  68. package/dist/hero-ui-library-showcase.js +51 -42
  69. package/dist/hero-video-dialog-gradient.cjs +2 -2
  70. package/dist/hero-video-dialog-gradient.js +2 -2
  71. package/dist/hero-video-overlay-stars.cjs +7 -15
  72. package/dist/hero-video-overlay-stars.js +7 -15
  73. package/dist/registry.cjs +608 -438
  74. package/dist/registry.js +608 -438
  75. package/package.json +1 -1
@@ -1,44 +1,16 @@
1
1
  "use client";
2
- import React, { useMemo } from 'react';
2
+ import * as React3 from 'react';
3
+ import React3__default, { useMemo } from 'react';
3
4
  import { clsx } from 'clsx';
4
5
  import { twMerge } from 'tailwind-merge';
5
6
  import { Img } from '@page-speed/img';
6
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
+ import { cva } from 'class-variance-authority';
7
9
 
8
10
  // components/blocks/hero/hero-mental-health-team.tsx
9
11
  function cn(...inputs) {
10
12
  return twMerge(clsx(inputs));
11
13
  }
12
- function getNestedCardBg(parentBg, variant = "muted", options) {
13
- const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
14
- if (isDark) {
15
- switch (variant) {
16
- case "muted":
17
- return "bg-background";
18
- case "card":
19
- return "bg-card";
20
- case "accent":
21
- return "bg-accent";
22
- case "subtle":
23
- return "bg-background/50";
24
- }
25
- } else {
26
- switch (variant) {
27
- case "muted":
28
- return "bg-muted";
29
- case "card":
30
- return "bg-card";
31
- case "accent":
32
- return "bg-accent";
33
- case "subtle":
34
- return "bg-muted/50";
35
- }
36
- }
37
- }
38
- function getNestedCardTextColor(parentBg, options) {
39
- const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
40
- return isDark ? "text-foreground" : "";
41
- }
42
14
  var maxWidthStyles = {
43
15
  sm: "max-w-screen-sm",
44
16
  md: "max-w-screen-md",
@@ -48,7 +20,7 @@ var maxWidthStyles = {
48
20
  "4xl": "max-w-[1536px]",
49
21
  full: "max-w-full"
50
22
  };
51
- var Container = React.forwardRef(
23
+ var Container = React3__default.forwardRef(
52
24
  ({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
53
25
  const Component = as;
54
26
  return /* @__PURE__ */ jsx(
@@ -353,7 +325,7 @@ var spacingStyles = {
353
325
  };
354
326
  var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
355
327
  var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
356
- var Section = React.forwardRef(
328
+ var Section = React3__default.forwardRef(
357
329
  ({
358
330
  id,
359
331
  title,
@@ -414,77 +386,573 @@ var Section = React.forwardRef(
414
386
  }
415
387
  );
416
388
  Section.displayName = "Section";
389
+ var baseStyles = [
390
+ // Layout
391
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap shrink-0",
392
+ // Typography - using CSS variables with sensible defaults
393
+ "font-[var(--button-font-family,inherit)]",
394
+ "font-[var(--button-font-weight,500)]",
395
+ "tracking-[var(--button-letter-spacing,0)]",
396
+ "leading-[var(--button-line-height,1.25)]",
397
+ "[text-transform:var(--button-text-transform,none)]",
398
+ "text-sm",
399
+ // Border radius
400
+ "rounded-[var(--button-radius,var(--radius,0.375rem))]",
401
+ // Smooth transition - using [transition:...] to set full shorthand property (not just transition-property)
402
+ "[transition:var(--button-transition,all_250ms_cubic-bezier(0.4,0,0.2,1))]",
403
+ // Box shadow (master level) - using [box-shadow:...] for complex multi-value shadows
404
+ "[box-shadow:var(--button-shadow,none)]",
405
+ "hover:[box-shadow:var(--button-shadow-hover,var(--button-shadow,none))]",
406
+ // Disabled state
407
+ "disabled:pointer-events-none disabled:opacity-50",
408
+ // SVG handling
409
+ "[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
410
+ // Focus styles
411
+ "outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
412
+ // Invalid state
413
+ "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
414
+ ].join(" ");
415
+ var buttonVariants = cva(baseStyles, {
416
+ variants: {
417
+ variant: {
418
+ // Default (Primary) variant - full customization
419
+ default: [
420
+ "bg-[var(--button-default-bg,hsl(var(--primary)))]",
421
+ "text-[var(--button-default-fg,hsl(var(--primary-foreground)))]",
422
+ "border-[length:var(--button-default-border-width,0px)]",
423
+ "border-[color:var(--button-default-border,transparent)]",
424
+ "[box-shadow:var(--button-default-shadow,var(--button-shadow,none))]",
425
+ "hover:bg-[var(--button-default-hover-bg,hsl(var(--primary)/0.9))]",
426
+ "hover:text-[var(--button-default-hover-fg,var(--button-default-fg,hsl(var(--primary-foreground))))]",
427
+ "hover:border-[color:var(--button-default-hover-border,var(--button-default-border,transparent))]",
428
+ "hover:[box-shadow:var(--button-default-shadow-hover,var(--button-shadow-hover,var(--button-default-shadow,var(--button-shadow,none))))]"
429
+ ].join(" "),
430
+ // Destructive variant - full customization
431
+ destructive: [
432
+ "bg-[var(--button-destructive-bg,hsl(var(--destructive)))]",
433
+ "text-[var(--button-destructive-fg,white)]",
434
+ "border-[length:var(--button-destructive-border-width,0px)]",
435
+ "border-[color:var(--button-destructive-border,transparent)]",
436
+ "[box-shadow:var(--button-destructive-shadow,var(--button-shadow,none))]",
437
+ "hover:bg-[var(--button-destructive-hover-bg,hsl(var(--destructive)/0.9))]",
438
+ "hover:text-[var(--button-destructive-hover-fg,var(--button-destructive-fg,white))]",
439
+ "hover:border-[color:var(--button-destructive-hover-border,var(--button-destructive-border,transparent))]",
440
+ "hover:[box-shadow:var(--button-destructive-shadow-hover,var(--button-shadow-hover,var(--button-destructive-shadow,var(--button-shadow,none))))]",
441
+ "focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
442
+ "dark:bg-destructive/60"
443
+ ].join(" "),
444
+ // Outline variant - full customization with proper border handling
445
+ outline: [
446
+ "bg-[var(--button-outline-bg,hsl(var(--background)))]",
447
+ "text-[var(--button-outline-fg,inherit)]",
448
+ "border-[length:var(--button-outline-border-width,1px)]",
449
+ "border-[color:var(--button-outline-border,hsl(var(--border)))]",
450
+ "[box-shadow:var(--button-outline-shadow,var(--button-shadow,0_1px_2px_0_rgb(0_0_0/0.05)))]",
451
+ "hover:bg-[var(--button-outline-hover-bg,hsl(var(--accent)))]",
452
+ "hover:text-[var(--button-outline-hover-fg,hsl(var(--accent-foreground)))]",
453
+ "hover:border-[color:var(--button-outline-hover-border,var(--button-outline-border,hsl(var(--border))))]",
454
+ "hover:[box-shadow:var(--button-outline-shadow-hover,var(--button-shadow-hover,var(--button-outline-shadow,var(--button-shadow,none))))]",
455
+ "dark:bg-input/30 dark:border-input dark:hover:bg-input/50"
456
+ ].join(" "),
457
+ // Secondary variant - full customization
458
+ secondary: [
459
+ "bg-[var(--button-secondary-bg,hsl(var(--secondary)))]",
460
+ "text-[var(--button-secondary-fg,hsl(var(--secondary-foreground)))]",
461
+ "border-[length:var(--button-secondary-border-width,0px)]",
462
+ "border-[color:var(--button-secondary-border,transparent)]",
463
+ "[box-shadow:var(--button-secondary-shadow,var(--button-shadow,none))]",
464
+ "hover:bg-[var(--button-secondary-hover-bg,hsl(var(--secondary)/0.8))]",
465
+ "hover:text-[var(--button-secondary-hover-fg,var(--button-secondary-fg,hsl(var(--secondary-foreground))))]",
466
+ "hover:border-[color:var(--button-secondary-hover-border,var(--button-secondary-border,transparent))]",
467
+ "hover:[box-shadow:var(--button-secondary-shadow-hover,var(--button-shadow-hover,var(--button-secondary-shadow,var(--button-shadow,none))))]"
468
+ ].join(" "),
469
+ // Ghost variant - full customization
470
+ ghost: [
471
+ "bg-[var(--button-ghost-bg,transparent)]",
472
+ "text-[var(--button-ghost-fg,inherit)]",
473
+ "border-[length:var(--button-ghost-border-width,0px)]",
474
+ "border-[color:var(--button-ghost-border,transparent)]",
475
+ "[box-shadow:var(--button-ghost-shadow,var(--button-shadow,none))]",
476
+ "hover:bg-[var(--button-ghost-hover-bg,hsl(var(--accent)))]",
477
+ "hover:text-[var(--button-ghost-hover-fg,hsl(var(--accent-foreground)))]",
478
+ "hover:border-[color:var(--button-ghost-hover-border,var(--button-ghost-border,transparent))]",
479
+ "hover:[box-shadow:var(--button-ghost-shadow-hover,var(--button-shadow-hover,var(--button-ghost-shadow,var(--button-shadow,none))))]",
480
+ "dark:hover:bg-accent/50"
481
+ ].join(" "),
482
+ // Link variant - full customization
483
+ link: [
484
+ "bg-[var(--button-link-bg,transparent)]",
485
+ "text-[var(--button-link-fg,hsl(var(--primary)))]",
486
+ "border-[length:var(--button-link-border-width,0px)]",
487
+ "border-[color:var(--button-link-border,transparent)]",
488
+ "[box-shadow:var(--button-link-shadow,none)]",
489
+ "hover:bg-[var(--button-link-hover-bg,transparent)]",
490
+ "hover:text-[var(--button-link-hover-fg,var(--button-link-fg,hsl(var(--primary))))]",
491
+ "hover:[box-shadow:var(--button-link-shadow-hover,none)]",
492
+ "underline-offset-4 hover:underline"
493
+ ].join(" ")
494
+ },
495
+ size: {
496
+ default: [
497
+ "h-[var(--button-height-md,2.25rem)]",
498
+ "px-[var(--button-padding-x-md,1rem)]",
499
+ "py-[var(--button-padding-y-md,0.5rem)]",
500
+ "has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
501
+ ].join(" "),
502
+ sm: [
503
+ "h-[var(--button-height-sm,2rem)]",
504
+ "px-[var(--button-padding-x-sm,0.75rem)]",
505
+ "py-[var(--button-padding-y-sm,0.25rem)]",
506
+ "gap-1.5",
507
+ "has-[>svg]:px-[calc(var(--button-padding-x-sm,0.75rem)*0.83)]"
508
+ ].join(" "),
509
+ md: [
510
+ "h-[var(--button-height-md,2.25rem)]",
511
+ "px-[var(--button-padding-x-md,1rem)]",
512
+ "py-[var(--button-padding-y-md,0.5rem)]",
513
+ "has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
514
+ ].join(" "),
515
+ lg: [
516
+ "h-[var(--button-height-lg,2.5rem)]",
517
+ "px-[var(--button-padding-x-lg,1.5rem)]",
518
+ "py-[var(--button-padding-y-lg,0.5rem)]",
519
+ "has-[>svg]:px-[calc(var(--button-padding-x-lg,1.5rem)*0.67)]"
520
+ ].join(" "),
521
+ icon: "size-[var(--button-height-md,2.25rem)]",
522
+ "icon-sm": "size-[var(--button-height-sm,2rem)]",
523
+ "icon-lg": "size-[var(--button-height-lg,2.5rem)]"
524
+ }
525
+ },
526
+ defaultVariants: {
527
+ variant: "default",
528
+ size: "default"
529
+ }
530
+ });
531
+ function normalizePhoneNumber(input) {
532
+ const trimmed = input.trim();
533
+ if (trimmed.toLowerCase().startsWith("tel:")) {
534
+ return trimmed;
535
+ }
536
+ const match = trimmed.match(/^[\s\+\-\(\)]*(\d[\d\s\-\(\)\.]*\d)[\s\-]*(x|ext\.?|extension)?[\s\-]*(\d+)?$/i);
537
+ if (match) {
538
+ const mainNumber = match[1].replace(/[\s\-\(\)\.]/g, "");
539
+ const extension = match[3];
540
+ const normalized = mainNumber.length >= 10 && !trimmed.startsWith("+") ? `+${mainNumber}` : mainNumber;
541
+ const withExtension = extension ? `${normalized};ext=${extension}` : normalized;
542
+ return `tel:${withExtension}`;
543
+ }
544
+ const cleaned = trimmed.replace(/[\s\-\(\)\.]/g, "");
545
+ return `tel:${cleaned}`;
546
+ }
547
+ function normalizeEmail(input) {
548
+ const trimmed = input.trim();
549
+ if (trimmed.toLowerCase().startsWith("mailto:")) {
550
+ return trimmed;
551
+ }
552
+ return `mailto:${trimmed}`;
553
+ }
554
+ function isEmail(input) {
555
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
556
+ return emailRegex.test(input.trim());
557
+ }
558
+ function isPhoneNumber(input) {
559
+ const trimmed = input.trim();
560
+ if (trimmed.toLowerCase().startsWith("tel:")) {
561
+ return true;
562
+ }
563
+ const phoneRegex = /^[\s\+\-\(\)]*\d[\d\s\-\(\)\.]*\d[\s\-]*(x|ext\.?|extension)?[\s\-]*\d*$/i;
564
+ return phoneRegex.test(trimmed);
565
+ }
566
+ function isInternalUrl(href) {
567
+ if (typeof window === "undefined") {
568
+ return href.startsWith("/") && !href.startsWith("//");
569
+ }
570
+ const trimmed = href.trim();
571
+ if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
572
+ return true;
573
+ }
574
+ try {
575
+ const url = new URL(trimmed, window.location.href);
576
+ const currentOrigin = window.location.origin;
577
+ const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
578
+ return normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin);
579
+ } catch {
580
+ return false;
581
+ }
582
+ }
583
+ function toRelativePath(href) {
584
+ if (typeof window === "undefined") {
585
+ return href;
586
+ }
587
+ const trimmed = href.trim();
588
+ if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
589
+ return trimmed;
590
+ }
591
+ try {
592
+ const url = new URL(trimmed, window.location.href);
593
+ const currentOrigin = window.location.origin;
594
+ const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
595
+ if (normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin)) {
596
+ return url.pathname + url.search + url.hash;
597
+ }
598
+ } catch {
599
+ }
600
+ return trimmed;
601
+ }
602
+ function useNavigation({
603
+ href,
604
+ onClick
605
+ } = {}) {
606
+ const linkType = React3.useMemo(() => {
607
+ if (!href || href.trim() === "") {
608
+ return onClick ? "none" : "none";
609
+ }
610
+ const trimmed = href.trim();
611
+ if (trimmed.toLowerCase().startsWith("mailto:") || isEmail(trimmed)) {
612
+ return "mailto";
613
+ }
614
+ if (trimmed.toLowerCase().startsWith("tel:") || isPhoneNumber(trimmed)) {
615
+ return "tel";
616
+ }
617
+ if (isInternalUrl(trimmed)) {
618
+ return "internal";
619
+ }
620
+ try {
621
+ new URL(trimmed, typeof window !== "undefined" ? window.location.href : "http://localhost");
622
+ return "external";
623
+ } catch {
624
+ return "internal";
625
+ }
626
+ }, [href, onClick]);
627
+ const normalizedHref = React3.useMemo(() => {
628
+ if (!href || href.trim() === "") {
629
+ return void 0;
630
+ }
631
+ const trimmed = href.trim();
632
+ switch (linkType) {
633
+ case "tel":
634
+ return normalizePhoneNumber(trimmed);
635
+ case "mailto":
636
+ return normalizeEmail(trimmed);
637
+ case "internal":
638
+ return toRelativePath(trimmed);
639
+ case "external":
640
+ return trimmed;
641
+ default:
642
+ return trimmed;
643
+ }
644
+ }, [href, linkType]);
645
+ const target = React3.useMemo(() => {
646
+ switch (linkType) {
647
+ case "external":
648
+ return "_blank";
649
+ case "internal":
650
+ return "_self";
651
+ case "mailto":
652
+ case "tel":
653
+ return void 0;
654
+ default:
655
+ return void 0;
656
+ }
657
+ }, [linkType]);
658
+ const rel = React3.useMemo(() => {
659
+ if (linkType === "external") {
660
+ return "noopener noreferrer";
661
+ }
662
+ return void 0;
663
+ }, [linkType]);
664
+ const isExternal = linkType === "external";
665
+ const isInternal = linkType === "internal";
666
+ const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
667
+ const handleClick = React3.useCallback(
668
+ (event) => {
669
+ if (onClick) {
670
+ try {
671
+ onClick(event);
672
+ } catch (error) {
673
+ console.error("Error in user onClick handler:", error);
674
+ }
675
+ }
676
+ if (event.defaultPrevented) {
677
+ return;
678
+ }
679
+ if (shouldUseRouter && normalizedHref && event.button === 0 && // left-click only
680
+ !event.metaKey && !event.altKey && !event.ctrlKey && !event.shiftKey) {
681
+ if (typeof window !== "undefined") {
682
+ const handler = window.__opensiteNavigationHandler;
683
+ if (typeof handler === "function") {
684
+ try {
685
+ const handled = handler(normalizedHref, event.nativeEvent || event);
686
+ if (handled !== false) {
687
+ event.preventDefault();
688
+ }
689
+ } catch (error) {
690
+ console.error("Error in navigation handler:", error);
691
+ }
692
+ }
693
+ }
694
+ }
695
+ },
696
+ [onClick, shouldUseRouter, normalizedHref]
697
+ );
698
+ return {
699
+ linkType,
700
+ normalizedHref,
701
+ target,
702
+ rel,
703
+ isExternal,
704
+ isInternal,
705
+ shouldUseRouter,
706
+ handleClick
707
+ };
708
+ }
709
+ var Pressable = React3.forwardRef(
710
+ ({
711
+ children,
712
+ className,
713
+ href,
714
+ onClick,
715
+ variant,
716
+ size,
717
+ asButton = false,
718
+ fallbackComponentType = "span",
719
+ componentType,
720
+ "aria-label": ariaLabel,
721
+ "aria-describedby": ariaDescribedby,
722
+ id,
723
+ ...props
724
+ }, ref) => {
725
+ const navigation = useNavigation({ href, onClick });
726
+ const {
727
+ normalizedHref,
728
+ target,
729
+ rel,
730
+ linkType,
731
+ isInternal,
732
+ handleClick
733
+ } = navigation;
734
+ const shouldRenderLink = normalizedHref && linkType !== "none";
735
+ const shouldRenderButton = !shouldRenderLink && onClick;
736
+ const effectiveComponentType = componentType || (shouldRenderLink ? "a" : shouldRenderButton ? "button" : fallbackComponentType);
737
+ const finalComponentType = isInternal && shouldRenderLink ? "a" : effectiveComponentType;
738
+ const shouldApplyButtonStyles = asButton || variant || size;
739
+ const combinedClassName = cn(
740
+ shouldApplyButtonStyles && buttonVariants({ variant, size }),
741
+ className
742
+ );
743
+ const dataProps = Object.fromEntries(
744
+ Object.entries(props).filter(([key]) => key.startsWith("data-"))
745
+ );
746
+ const buttonDataAttributes = shouldApplyButtonStyles ? {
747
+ "data-slot": "button",
748
+ "data-variant": variant ?? "default",
749
+ "data-size": size ?? "default"
750
+ } : {};
751
+ const commonProps = {
752
+ className: combinedClassName,
753
+ onClick: handleClick,
754
+ "aria-label": ariaLabel,
755
+ "aria-describedby": ariaDescribedby,
756
+ id,
757
+ ...dataProps,
758
+ ...buttonDataAttributes
759
+ };
760
+ if (finalComponentType === "a" && shouldRenderLink) {
761
+ return /* @__PURE__ */ jsx(
762
+ "a",
763
+ {
764
+ ref,
765
+ href: normalizedHref,
766
+ target,
767
+ rel,
768
+ ...commonProps,
769
+ ...props,
770
+ children
771
+ }
772
+ );
773
+ }
774
+ if (finalComponentType === "button") {
775
+ return /* @__PURE__ */ jsx(
776
+ "button",
777
+ {
778
+ ref,
779
+ type: props.type || "button",
780
+ ...commonProps,
781
+ ...props,
782
+ children
783
+ }
784
+ );
785
+ }
786
+ if (finalComponentType === "div") {
787
+ return /* @__PURE__ */ jsx(
788
+ "div",
789
+ {
790
+ ref,
791
+ ...commonProps,
792
+ children
793
+ }
794
+ );
795
+ }
796
+ return /* @__PURE__ */ jsx(
797
+ "span",
798
+ {
799
+ ref,
800
+ ...commonProps,
801
+ children
802
+ }
803
+ );
804
+ }
805
+ );
806
+ Pressable.displayName = "Pressable";
807
+ var MOBILE_CLASSES = {
808
+ "fit-left": "items-start md:items-center",
809
+ "fit-center": "items-center",
810
+ "fit-right": "items-end md:items-center",
811
+ "full-left": "items-stretch md:items-center",
812
+ "full-center": "items-stretch md:items-center",
813
+ "full-right": "items-stretch md:items-center"
814
+ };
815
+ function BlockActions({
816
+ mobileConfig,
817
+ actionsClassName,
818
+ verticalSpacing = "mt-4 md:mt-8",
819
+ actions,
820
+ actionsSlot
821
+ }) {
822
+ const width = mobileConfig?.width ?? "full";
823
+ const position = mobileConfig?.position ?? "center";
824
+ const mobileLayoutClass = MOBILE_CLASSES[`${width}-${position}`];
825
+ if (actionsSlot) {
826
+ return /* @__PURE__ */ jsx("div", { children: actionsSlot });
827
+ } else if (actions && actions?.length > 0) {
828
+ return /* @__PURE__ */ jsx(
829
+ "div",
830
+ {
831
+ className: cn(
832
+ "flex flex-col md:flex-row flex-wrap gap-4",
833
+ mobileLayoutClass,
834
+ actionsClassName,
835
+ verticalSpacing
836
+ ),
837
+ children: actions.map((action, index) => /* @__PURE__ */ jsx(ActionComponent, { action }, index))
838
+ }
839
+ );
840
+ } else {
841
+ return null;
842
+ }
843
+ }
844
+ function ActionComponent({ action }) {
845
+ const {
846
+ label,
847
+ icon,
848
+ iconAfter,
849
+ children,
850
+ href,
851
+ onClick,
852
+ className: actionClassName,
853
+ ...pressableProps
854
+ } = action;
855
+ return /* @__PURE__ */ jsx(
856
+ Pressable,
857
+ {
858
+ href,
859
+ onClick,
860
+ asButton: action.asButton ?? true,
861
+ className: actionClassName,
862
+ ...pressableProps,
863
+ children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
864
+ icon,
865
+ label,
866
+ iconAfter
867
+ ] })
868
+ }
869
+ );
870
+ }
417
871
  function HeroMentalHealthTeam({
418
- subtitle,
872
+ description,
873
+ descriptionClassName,
874
+ actions,
875
+ actionsSlot,
876
+ actionsClassName,
419
877
  heading,
420
- teamImages,
421
- teamImagesSlot,
878
+ smallImages,
879
+ smallImagesSlot,
422
880
  testimonial,
423
881
  testimonialSlot,
424
882
  featureImage,
425
883
  featureImageSlot,
426
884
  background,
427
- spacing,
885
+ spacing = "xl",
428
886
  pattern,
429
887
  patternOpacity,
430
888
  className,
431
- containerClassName,
889
+ containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
432
890
  headerClassName,
433
891
  headingClassName,
434
892
  gridClassName,
435
893
  optixFlowConfig
436
894
  }) {
437
- const renderTeamImages = useMemo(() => {
438
- if (teamImagesSlot) return teamImagesSlot;
439
- if (!teamImages || teamImages.length === 0) return null;
895
+ const renderSmallImages = useMemo(() => {
896
+ if (smallImagesSlot) return smallImagesSlot;
897
+ if (!smallImages || smallImages.length === 0) return null;
440
898
  return /* @__PURE__ */ jsxs(Fragment, { children: [
441
- teamImages[0] && /* @__PURE__ */ jsx("div", { className: "col-[1/2] row-[1/2] w-full", children: /* @__PURE__ */ jsx("div", { className: "h-full max-h-77.5 w-full overflow-hidden rounded-2xl", children: /* @__PURE__ */ jsx(
899
+ smallImages[0] && /* @__PURE__ */ jsx("div", { className: "col-[1/2] row-[1/2] w-full", children: /* @__PURE__ */ jsx("div", { className: "h-full max-h-77.5 w-full overflow-hidden rounded-2xl", children: /* @__PURE__ */ jsx(
442
900
  Img,
443
901
  {
444
- src: teamImages[0].src,
445
- alt: teamImages[0].alt,
446
- className: cn("block h-full w-full object-cover object-center", teamImages[0].className),
902
+ src: smallImages[0].src,
903
+ alt: smallImages[0].alt,
904
+ className: cn(
905
+ "block h-full w-full object-cover object-center",
906
+ smallImages[0].className
907
+ ),
447
908
  optixFlowConfig
448
909
  }
449
910
  ) }) }),
450
- teamImages[1] && /* @__PURE__ */ jsx("div", { className: "col-[2/3] row-[1/2] w-full md:col-[2/3] md:row-[1/2]", children: /* @__PURE__ */ jsx("div", { className: "h-full max-h-77.5 w-full overflow-hidden rounded-2xl", children: /* @__PURE__ */ jsx(
911
+ smallImages[1] && /* @__PURE__ */ jsx("div", { className: "col-[2/3] row-[1/2] w-full md:col-[2/3] md:row-[1/2]", children: /* @__PURE__ */ jsx("div", { className: "h-full max-h-77.5 w-full overflow-hidden rounded-2xl", children: /* @__PURE__ */ jsx(
451
912
  Img,
452
913
  {
453
- src: teamImages[1].src,
454
- alt: teamImages[1].alt,
455
- className: cn("block h-full w-full object-cover object-center", teamImages[1].className),
914
+ src: smallImages[1].src,
915
+ alt: smallImages[1].alt,
916
+ className: cn(
917
+ "block h-full w-full object-cover object-center",
918
+ smallImages[1].className
919
+ ),
456
920
  optixFlowConfig
457
921
  }
458
922
  ) }) })
459
923
  ] });
460
- }, [teamImagesSlot, teamImages, optixFlowConfig]);
924
+ }, [smallImagesSlot, smallImages, optixFlowConfig]);
461
925
  const renderTestimonial = useMemo(() => {
462
926
  if (testimonialSlot) return testimonialSlot;
463
927
  if (!testimonial) return null;
464
928
  const avatarSrc = testimonial.avatarSrc ?? testimonial.avatar?.src;
465
- return /* @__PURE__ */ jsx("div", { className: "col-[1/3] row-[3/4] w-full md:col-[1/3] md:row-[2/3]", children: /* @__PURE__ */ jsxs("div", { className: cn(
466
- "flex h-full min-h-37.5 flex-col gap-3 overflow-hidden rounded-3xl p-5 px-5 md:flex-row md:items-center md:gap-7 md:py-8",
467
- getNestedCardBg(background),
468
- getNestedCardTextColor(background)
469
- ), children: [
470
- avatarSrc && /* @__PURE__ */ jsx("div", { className: "h-20 w-20 shrink-0 overflow-hidden rounded-xl md:h-30 md:w-30", children: /* @__PURE__ */ jsx(
471
- Img,
472
- {
473
- src: avatarSrc,
474
- alt: testimonial.avatar?.alt ?? "",
475
- className: "h-full w-full object-cover object-center",
476
- optixFlowConfig
477
- }
478
- ) }),
479
- /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full flex-col justify-between gap-2", children: [
480
- /* @__PURE__ */ jsxs("p", { className: "text-lg font-medium ", children: [
481
- '"',
482
- testimonial.quote,
483
- '"'
484
- ] }),
485
- /* @__PURE__ */ jsx("p", { className: "", children: testimonial.author })
486
- ] })
487
- ] }) });
929
+ return /* @__PURE__ */ jsx("div", { className: "col-[1/3] row-[3/4] w-full md:col-[1/3] md:row-[2/3]", children: /* @__PURE__ */ jsxs(
930
+ "div",
931
+ {
932
+ className: cn(
933
+ "flex h-full min-h-37.5 flex-col gap-3 overflow-hidden rounded-3xl p-5 px-5 md:flex-row md:items-center md:gap-7 md:py-8 bg-muted"
934
+ ),
935
+ children: [
936
+ avatarSrc && /* @__PURE__ */ jsx("div", { className: "h-20 w-20 shrink-0 overflow-hidden rounded-xl md:h-30 md:w-30", children: /* @__PURE__ */ jsx(
937
+ Img,
938
+ {
939
+ src: avatarSrc,
940
+ alt: testimonial.avatar?.alt ?? "",
941
+ className: "h-full w-full object-cover object-center",
942
+ optixFlowConfig
943
+ }
944
+ ) }),
945
+ /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full flex-col justify-between gap-2 text-muted-foreground", children: [
946
+ /* @__PURE__ */ jsxs("p", { className: "text-lg font-medium", children: [
947
+ '"',
948
+ testimonial.quote,
949
+ '"'
950
+ ] }),
951
+ /* @__PURE__ */ jsx("p", { className: "", children: testimonial.author })
952
+ ] })
953
+ ]
954
+ }
955
+ ) });
488
956
  }, [testimonialSlot, testimonial, optixFlowConfig]);
489
957
  const renderFeatureImage = useMemo(() => {
490
958
  if (featureImageSlot) return featureImageSlot;
@@ -494,7 +962,10 @@ function HeroMentalHealthTeam({
494
962
  {
495
963
  src: featureImage.src,
496
964
  alt: featureImage.alt,
497
- className: cn("block h-full w-full object-cover object-center", featureImage.className),
965
+ className: cn(
966
+ "block h-full w-full object-cover object-center",
967
+ featureImage.className
968
+ ),
498
969
  optixFlowConfig
499
970
  }
500
971
  ) }) });
@@ -502,17 +973,75 @@ function HeroMentalHealthTeam({
502
973
  return /* @__PURE__ */ jsx(
503
974
  Section,
504
975
  {
505
- className: cn("dark bg-background py-12 font-sans md:py-20", className),
506
- children: /* @__PURE__ */ jsxs("div", { className: cn("container", containerClassName), children: [
507
- /* @__PURE__ */ jsxs("div", { className: cn("mx-auto mb-24 flex max-w-[900px] flex-col items-center gap-3", headerClassName), children: [
508
- subtitle && (typeof subtitle === "string" ? /* @__PURE__ */ jsx("p", { className: "text-center ", children: subtitle }) : subtitle),
509
- heading && (typeof heading === "string" ? /* @__PURE__ */ jsx("h1", { className: cn("text-center text-4xl leading-tight font-medium sm:text-5xl md:text-6xl", headingClassName), children: heading }) : /* @__PURE__ */ jsx("h1", { className: cn("text-center text-4xl leading-tight font-medium sm:text-5xl md:text-6xl", headingClassName), children: heading }))
510
- ] }),
511
- /* @__PURE__ */ jsxs("div", { className: cn("grid w-full max-w-332.5 auto-cols-auto grid-cols-2 grid-rows-[auto_auto] justify-center gap-5 md:grid-cols-[repeat(4,1fr)]", gridClassName), children: [
512
- renderTeamImages,
513
- renderTestimonial,
514
- renderFeatureImage
515
- ] })
976
+ background,
977
+ spacing,
978
+ pattern,
979
+ patternOpacity,
980
+ className,
981
+ containerClassName,
982
+ children: /* @__PURE__ */ jsxs("div", { className: "pt-10 md:pt-0", children: [
983
+ /* @__PURE__ */ jsxs(
984
+ "div",
985
+ {
986
+ className: cn(
987
+ "mx-auto mb-16 flex max-w-[900px] flex-col items-center gap-6",
988
+ headerClassName
989
+ ),
990
+ children: [
991
+ heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
992
+ "h1",
993
+ {
994
+ className: cn(
995
+ "text-center text-4xl leading-tight font-medium sm:text-5xl md:text-6xl text-balance",
996
+ headingClassName
997
+ ),
998
+ children: heading
999
+ }
1000
+ ) : /* @__PURE__ */ jsx(
1001
+ "h1",
1002
+ {
1003
+ className: cn(
1004
+ "text-center text-4xl leading-tight font-medium sm:text-5xl md:text-6xl text-balance",
1005
+ headingClassName
1006
+ ),
1007
+ children: heading
1008
+ }
1009
+ )),
1010
+ description && (typeof description === "string" ? /* @__PURE__ */ jsx(
1011
+ "p",
1012
+ {
1013
+ className: cn(
1014
+ "text-center text-lg md:text-xl text-balance",
1015
+ descriptionClassName
1016
+ ),
1017
+ children: description
1018
+ }
1019
+ ) : /* @__PURE__ */ jsx("div", { className: descriptionClassName, children: description })),
1020
+ /* @__PURE__ */ jsx(
1021
+ BlockActions,
1022
+ {
1023
+ actions,
1024
+ actionsSlot,
1025
+ actionsClassName
1026
+ }
1027
+ )
1028
+ ]
1029
+ }
1030
+ ),
1031
+ /* @__PURE__ */ jsxs(
1032
+ "div",
1033
+ {
1034
+ className: cn(
1035
+ "grid w-full max-w-332.5 auto-cols-auto grid-cols-2 grid-rows-[auto_auto] justify-center gap-5 md:grid-cols-[repeat(4,1fr)]",
1036
+ gridClassName
1037
+ ),
1038
+ children: [
1039
+ renderSmallImages,
1040
+ renderTestimonial,
1041
+ renderFeatureImage
1042
+ ]
1043
+ }
1044
+ )
516
1045
  ] })
517
1046
  }
518
1047
  );