@opensite/ui 2.0.6 → 2.0.8
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.
- package/dist/hero-adaptable-product-grid.cjs +1 -1
- package/dist/hero-adaptable-product-grid.js +1 -1
- package/dist/hero-agency-animated-images.cjs +795 -631
- package/dist/hero-agency-animated-images.d.cts +13 -9
- package/dist/hero-agency-animated-images.d.ts +13 -9
- package/dist/hero-agency-animated-images.js +794 -630
- package/dist/hero-business-carousel-dots.cjs +822 -911
- package/dist/hero-business-carousel-dots.d.cts +5 -1
- package/dist/hero-business-carousel-dots.d.ts +5 -1
- package/dist/hero-business-carousel-dots.js +824 -910
- package/dist/hero-coming-soon-countdown.cjs +267 -110
- package/dist/hero-coming-soon-countdown.d.cts +8 -11
- package/dist/hero-coming-soon-countdown.d.ts +8 -11
- package/dist/hero-coming-soon-countdown.js +268 -111
- package/dist/hero-conversation-intelligence.cjs +673 -639
- package/dist/hero-conversation-intelligence.js +663 -629
- package/dist/hero-creative-studio-stacked.cjs +899 -861
- package/dist/hero-creative-studio-stacked.d.cts +16 -15
- package/dist/hero-creative-studio-stacked.d.ts +16 -15
- package/dist/hero-creative-studio-stacked.js +897 -859
- package/dist/hero-customer-support-layered.cjs +89 -76
- package/dist/hero-customer-support-layered.js +89 -76
- package/dist/hero-developer-tools-code.cjs +721 -669
- package/dist/hero-developer-tools-code.d.cts +5 -1
- package/dist/hero-developer-tools-code.d.ts +5 -1
- package/dist/hero-developer-tools-code.js +719 -667
- package/dist/hero-digital-agency-fullscreen.cjs +722 -680
- package/dist/hero-digital-agency-fullscreen.d.cts +4 -20
- package/dist/hero-digital-agency-fullscreen.d.ts +4 -20
- package/dist/hero-digital-agency-fullscreen.js +722 -680
- package/dist/hero-ecommerce-product-showcase.cjs +892 -846
- package/dist/hero-ecommerce-product-showcase.js +889 -843
- package/dist/hero-enterprise-security.cjs +168 -132
- package/dist/hero-enterprise-security.d.cts +12 -19
- package/dist/hero-enterprise-security.d.ts +12 -19
- package/dist/hero-enterprise-security.js +168 -132
- package/dist/hero-event-registration.cjs +39 -39
- package/dist/hero-event-registration.js +39 -39
- package/dist/hero-fullscreen-background-image.cjs +3 -2
- package/dist/hero-fullscreen-background-image.js +3 -2
- package/dist/hero-fullscreen-logo-cta.cjs +4 -2
- package/dist/hero-fullscreen-logo-cta.js +4 -2
- package/dist/hero-innovation-image-grid.cjs +2 -2
- package/dist/hero-innovation-image-grid.js +2 -2
- package/dist/hero-mental-health-team.cjs +17 -17
- package/dist/hero-mental-health-team.d.cts +5 -5
- package/dist/hero-mental-health-team.d.ts +5 -5
- package/dist/hero-mental-health-team.js +17 -17
- package/dist/hero-mobile-app-download.cjs +2 -2
- package/dist/hero-mobile-app-download.js +2 -2
- package/dist/hero-newsletter-minimal.cjs +97 -57
- package/dist/hero-newsletter-minimal.d.cts +5 -1
- package/dist/hero-newsletter-minimal.d.ts +5 -1
- package/dist/hero-newsletter-minimal.js +97 -57
- package/dist/hero-shared-inbox-layered.cjs +522 -42
- package/dist/hero-shared-inbox-layered.d.cts +20 -4
- package/dist/hero-shared-inbox-layered.d.ts +20 -4
- package/dist/hero-shared-inbox-layered.js +505 -40
- package/dist/hero-startup-launch-cta.cjs +859 -816
- package/dist/hero-startup-launch-cta.d.cts +3 -2
- package/dist/hero-startup-launch-cta.d.ts +3 -2
- package/dist/hero-startup-launch-cta.js +858 -815
- package/dist/hero-therapy-testimonial-grid.cjs +1 -1
- package/dist/hero-therapy-testimonial-grid.js +1 -1
- package/dist/hero-video-dialog-gradient-BnCFFec0.d.ts +99 -0
- package/dist/hero-video-dialog-gradient-Dapebkzu.d.cts +99 -0
- package/dist/hero-video-dialog-gradient.cjs +24 -23
- package/dist/hero-video-dialog-gradient.d.cts +4 -94
- package/dist/hero-video-dialog-gradient.d.ts +4 -94
- package/dist/hero-video-dialog-gradient.js +24 -23
- package/dist/hero-welcome-asymmetric-images.cjs +652 -617
- package/dist/hero-welcome-asymmetric-images.d.cts +5 -1
- package/dist/hero-welcome-asymmetric-images.d.ts +5 -1
- package/dist/hero-welcome-asymmetric-images.js +651 -616
- package/dist/registry.cjs +1111 -848
- package/dist/registry.js +1111 -848
- package/package.json +1 -1
|
@@ -1,17 +1,32 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var React3 = require('react');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var img = require('@page-speed/img');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
-
var reactSlot = require('@radix-ui/react-slot');
|
|
10
9
|
var classVarianceAuthority = require('class-variance-authority');
|
|
11
10
|
|
|
12
|
-
function
|
|
11
|
+
function _interopNamespace(e) {
|
|
12
|
+
if (e && e.__esModule) return e;
|
|
13
|
+
var n = Object.create(null);
|
|
14
|
+
if (e) {
|
|
15
|
+
Object.keys(e).forEach(function (k) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return e[k]; }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
n.default = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
|
+
}
|
|
13
28
|
|
|
14
|
-
var
|
|
29
|
+
var React3__namespace = /*#__PURE__*/_interopNamespace(React3);
|
|
15
30
|
|
|
16
31
|
// components/blocks/hero/hero-shared-inbox-layered.tsx
|
|
17
32
|
function cn(...inputs) {
|
|
@@ -26,7 +41,7 @@ var maxWidthStyles = {
|
|
|
26
41
|
"4xl": "max-w-[1536px]",
|
|
27
42
|
full: "max-w-full"
|
|
28
43
|
};
|
|
29
|
-
var Container =
|
|
44
|
+
var Container = React3__namespace.default.forwardRef(
|
|
30
45
|
({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
|
|
31
46
|
const Component = as;
|
|
32
47
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -331,7 +346,7 @@ var spacingStyles = {
|
|
|
331
346
|
};
|
|
332
347
|
var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
|
|
333
348
|
var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
|
|
334
|
-
var Section =
|
|
349
|
+
var Section = React3__namespace.default.forwardRef(
|
|
335
350
|
({
|
|
336
351
|
id,
|
|
337
352
|
title,
|
|
@@ -392,47 +407,501 @@ var Section = React__default.default.forwardRef(
|
|
|
392
407
|
}
|
|
393
408
|
);
|
|
394
409
|
Section.displayName = "Section";
|
|
395
|
-
var
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
410
|
+
var baseStyles = [
|
|
411
|
+
// Layout
|
|
412
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap shrink-0",
|
|
413
|
+
// Typography - using CSS variables with sensible defaults
|
|
414
|
+
"font-[var(--button-font-family,inherit)]",
|
|
415
|
+
"font-[var(--button-font-weight,500)]",
|
|
416
|
+
"tracking-[var(--button-letter-spacing,0)]",
|
|
417
|
+
"leading-[var(--button-line-height,1.25)]",
|
|
418
|
+
"[text-transform:var(--button-text-transform,none)]",
|
|
419
|
+
"text-sm",
|
|
420
|
+
// Border radius
|
|
421
|
+
"rounded-[var(--button-radius,var(--radius,0.375rem))]",
|
|
422
|
+
// Smooth transition - using [transition:...] to set full shorthand property (not just transition-property)
|
|
423
|
+
"[transition:var(--button-transition,all_250ms_cubic-bezier(0.4,0,0.2,1))]",
|
|
424
|
+
// Box shadow (master level) - using [box-shadow:...] for complex multi-value shadows
|
|
425
|
+
"[box-shadow:var(--button-shadow,none)]",
|
|
426
|
+
"hover:[box-shadow:var(--button-shadow-hover,var(--button-shadow,none))]",
|
|
427
|
+
// Disabled state
|
|
428
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
429
|
+
// SVG handling
|
|
430
|
+
"[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
|
|
431
|
+
// Focus styles
|
|
432
|
+
"outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
433
|
+
// Invalid state
|
|
434
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
|
|
435
|
+
].join(" ");
|
|
436
|
+
var buttonVariants = classVarianceAuthority.cva(baseStyles, {
|
|
437
|
+
variants: {
|
|
438
|
+
variant: {
|
|
439
|
+
// Default (Primary) variant - full customization
|
|
440
|
+
default: [
|
|
441
|
+
"bg-[var(--button-default-bg,hsl(var(--primary)))]",
|
|
442
|
+
"text-[var(--button-default-fg,hsl(var(--primary-foreground)))]",
|
|
443
|
+
"border-[length:var(--button-default-border-width,0px)]",
|
|
444
|
+
"border-[color:var(--button-default-border,transparent)]",
|
|
445
|
+
"[box-shadow:var(--button-default-shadow,var(--button-shadow,none))]",
|
|
446
|
+
"hover:bg-[var(--button-default-hover-bg,hsl(var(--primary)/0.9))]",
|
|
447
|
+
"hover:text-[var(--button-default-hover-fg,var(--button-default-fg,hsl(var(--primary-foreground))))]",
|
|
448
|
+
"hover:border-[color:var(--button-default-hover-border,var(--button-default-border,transparent))]",
|
|
449
|
+
"hover:[box-shadow:var(--button-default-shadow-hover,var(--button-shadow-hover,var(--button-default-shadow,var(--button-shadow,none))))]"
|
|
450
|
+
].join(" "),
|
|
451
|
+
// Destructive variant - full customization
|
|
452
|
+
destructive: [
|
|
453
|
+
"bg-[var(--button-destructive-bg,hsl(var(--destructive)))]",
|
|
454
|
+
"text-[var(--button-destructive-fg,white)]",
|
|
455
|
+
"border-[length:var(--button-destructive-border-width,0px)]",
|
|
456
|
+
"border-[color:var(--button-destructive-border,transparent)]",
|
|
457
|
+
"[box-shadow:var(--button-destructive-shadow,var(--button-shadow,none))]",
|
|
458
|
+
"hover:bg-[var(--button-destructive-hover-bg,hsl(var(--destructive)/0.9))]",
|
|
459
|
+
"hover:text-[var(--button-destructive-hover-fg,var(--button-destructive-fg,white))]",
|
|
460
|
+
"hover:border-[color:var(--button-destructive-hover-border,var(--button-destructive-border,transparent))]",
|
|
461
|
+
"hover:[box-shadow:var(--button-destructive-shadow-hover,var(--button-shadow-hover,var(--button-destructive-shadow,var(--button-shadow,none))))]",
|
|
462
|
+
"focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
|
|
463
|
+
"dark:bg-destructive/60"
|
|
464
|
+
].join(" "),
|
|
465
|
+
// Outline variant - full customization with proper border handling
|
|
466
|
+
outline: [
|
|
467
|
+
"bg-[var(--button-outline-bg,hsl(var(--background)))]",
|
|
468
|
+
"text-[var(--button-outline-fg,inherit)]",
|
|
469
|
+
"border-[length:var(--button-outline-border-width,1px)]",
|
|
470
|
+
"border-[color:var(--button-outline-border,hsl(var(--border)))]",
|
|
471
|
+
"[box-shadow:var(--button-outline-shadow,var(--button-shadow,0_1px_2px_0_rgb(0_0_0/0.05)))]",
|
|
472
|
+
"hover:bg-[var(--button-outline-hover-bg,hsl(var(--accent)))]",
|
|
473
|
+
"hover:text-[var(--button-outline-hover-fg,hsl(var(--accent-foreground)))]",
|
|
474
|
+
"hover:border-[color:var(--button-outline-hover-border,var(--button-outline-border,hsl(var(--border))))]",
|
|
475
|
+
"hover:[box-shadow:var(--button-outline-shadow-hover,var(--button-shadow-hover,var(--button-outline-shadow,var(--button-shadow,none))))]",
|
|
476
|
+
"dark:bg-input/30 dark:border-input dark:hover:bg-input/50"
|
|
477
|
+
].join(" "),
|
|
478
|
+
// Secondary variant - full customization
|
|
479
|
+
secondary: [
|
|
480
|
+
"bg-[var(--button-secondary-bg,hsl(var(--secondary)))]",
|
|
481
|
+
"text-[var(--button-secondary-fg,hsl(var(--secondary-foreground)))]",
|
|
482
|
+
"border-[length:var(--button-secondary-border-width,0px)]",
|
|
483
|
+
"border-[color:var(--button-secondary-border,transparent)]",
|
|
484
|
+
"[box-shadow:var(--button-secondary-shadow,var(--button-shadow,none))]",
|
|
485
|
+
"hover:bg-[var(--button-secondary-hover-bg,hsl(var(--secondary)/0.8))]",
|
|
486
|
+
"hover:text-[var(--button-secondary-hover-fg,var(--button-secondary-fg,hsl(var(--secondary-foreground))))]",
|
|
487
|
+
"hover:border-[color:var(--button-secondary-hover-border,var(--button-secondary-border,transparent))]",
|
|
488
|
+
"hover:[box-shadow:var(--button-secondary-shadow-hover,var(--button-shadow-hover,var(--button-secondary-shadow,var(--button-shadow,none))))]"
|
|
489
|
+
].join(" "),
|
|
490
|
+
// Ghost variant - full customization
|
|
491
|
+
ghost: [
|
|
492
|
+
"bg-[var(--button-ghost-bg,transparent)]",
|
|
493
|
+
"text-[var(--button-ghost-fg,inherit)]",
|
|
494
|
+
"border-[length:var(--button-ghost-border-width,0px)]",
|
|
495
|
+
"border-[color:var(--button-ghost-border,transparent)]",
|
|
496
|
+
"[box-shadow:var(--button-ghost-shadow,var(--button-shadow,none))]",
|
|
497
|
+
"hover:bg-[var(--button-ghost-hover-bg,hsl(var(--accent)))]",
|
|
498
|
+
"hover:text-[var(--button-ghost-hover-fg,hsl(var(--accent-foreground)))]",
|
|
499
|
+
"hover:border-[color:var(--button-ghost-hover-border,var(--button-ghost-border,transparent))]",
|
|
500
|
+
"hover:[box-shadow:var(--button-ghost-shadow-hover,var(--button-shadow-hover,var(--button-ghost-shadow,var(--button-shadow,none))))]",
|
|
501
|
+
"dark:hover:bg-accent/50"
|
|
502
|
+
].join(" "),
|
|
503
|
+
// Link variant - full customization
|
|
504
|
+
link: [
|
|
505
|
+
"bg-[var(--button-link-bg,transparent)]",
|
|
506
|
+
"text-[var(--button-link-fg,hsl(var(--primary)))]",
|
|
507
|
+
"border-[length:var(--button-link-border-width,0px)]",
|
|
508
|
+
"border-[color:var(--button-link-border,transparent)]",
|
|
509
|
+
"[box-shadow:var(--button-link-shadow,none)]",
|
|
510
|
+
"hover:bg-[var(--button-link-hover-bg,transparent)]",
|
|
511
|
+
"hover:text-[var(--button-link-hover-fg,var(--button-link-fg,hsl(var(--primary))))]",
|
|
512
|
+
"hover:[box-shadow:var(--button-link-shadow-hover,none)]",
|
|
513
|
+
"underline-offset-4 hover:underline"
|
|
514
|
+
].join(" ")
|
|
515
|
+
},
|
|
516
|
+
size: {
|
|
517
|
+
default: [
|
|
518
|
+
"h-[var(--button-height-md,2.25rem)]",
|
|
519
|
+
"px-[var(--button-padding-x-md,1rem)]",
|
|
520
|
+
"py-[var(--button-padding-y-md,0.5rem)]",
|
|
521
|
+
"has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
|
|
522
|
+
].join(" "),
|
|
523
|
+
sm: [
|
|
524
|
+
"h-[var(--button-height-sm,2rem)]",
|
|
525
|
+
"px-[var(--button-padding-x-sm,0.75rem)]",
|
|
526
|
+
"py-[var(--button-padding-y-sm,0.25rem)]",
|
|
527
|
+
"gap-1.5",
|
|
528
|
+
"has-[>svg]:px-[calc(var(--button-padding-x-sm,0.75rem)*0.83)]"
|
|
529
|
+
].join(" "),
|
|
530
|
+
md: [
|
|
531
|
+
"h-[var(--button-height-md,2.25rem)]",
|
|
532
|
+
"px-[var(--button-padding-x-md,1rem)]",
|
|
533
|
+
"py-[var(--button-padding-y-md,0.5rem)]",
|
|
534
|
+
"has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
|
|
535
|
+
].join(" "),
|
|
536
|
+
lg: [
|
|
537
|
+
"h-[var(--button-height-lg,2.5rem)]",
|
|
538
|
+
"px-[var(--button-padding-x-lg,1.5rem)]",
|
|
539
|
+
"py-[var(--button-padding-y-lg,0.5rem)]",
|
|
540
|
+
"has-[>svg]:px-[calc(var(--button-padding-x-lg,1.5rem)*0.67)]"
|
|
541
|
+
].join(" "),
|
|
542
|
+
icon: "size-[var(--button-height-md,2.25rem)]",
|
|
543
|
+
"icon-sm": "size-[var(--button-height-sm,2rem)]",
|
|
544
|
+
"icon-lg": "size-[var(--button-height-lg,2.5rem)]"
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
defaultVariants: {
|
|
548
|
+
variant: "default",
|
|
549
|
+
size: "default"
|
|
550
|
+
}
|
|
551
|
+
});
|
|
552
|
+
function normalizePhoneNumber(input) {
|
|
553
|
+
const trimmed = input.trim();
|
|
554
|
+
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
555
|
+
return trimmed;
|
|
556
|
+
}
|
|
557
|
+
const match = trimmed.match(/^[\s\+\-\(\)]*(\d[\d\s\-\(\)\.]*\d)[\s\-]*(x|ext\.?|extension)?[\s\-]*(\d+)?$/i);
|
|
558
|
+
if (match) {
|
|
559
|
+
const mainNumber = match[1].replace(/[\s\-\(\)\.]/g, "");
|
|
560
|
+
const extension = match[3];
|
|
561
|
+
const normalized = mainNumber.length >= 10 && !trimmed.startsWith("+") ? `+${mainNumber}` : mainNumber;
|
|
562
|
+
const withExtension = extension ? `${normalized};ext=${extension}` : normalized;
|
|
563
|
+
return `tel:${withExtension}`;
|
|
564
|
+
}
|
|
565
|
+
const cleaned = trimmed.replace(/[\s\-\(\)\.]/g, "");
|
|
566
|
+
return `tel:${cleaned}`;
|
|
567
|
+
}
|
|
568
|
+
function normalizeEmail(input) {
|
|
569
|
+
const trimmed = input.trim();
|
|
570
|
+
if (trimmed.toLowerCase().startsWith("mailto:")) {
|
|
571
|
+
return trimmed;
|
|
572
|
+
}
|
|
573
|
+
return `mailto:${trimmed}`;
|
|
574
|
+
}
|
|
575
|
+
function isEmail(input) {
|
|
576
|
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
577
|
+
return emailRegex.test(input.trim());
|
|
578
|
+
}
|
|
579
|
+
function isPhoneNumber(input) {
|
|
580
|
+
const trimmed = input.trim();
|
|
581
|
+
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
582
|
+
return true;
|
|
583
|
+
}
|
|
584
|
+
const phoneRegex = /^[\s\+\-\(\)]*\d[\d\s\-\(\)\.]*\d[\s\-]*(x|ext\.?|extension)?[\s\-]*\d*$/i;
|
|
585
|
+
return phoneRegex.test(trimmed);
|
|
586
|
+
}
|
|
587
|
+
function isInternalUrl(href) {
|
|
588
|
+
if (typeof window === "undefined") {
|
|
589
|
+
return href.startsWith("/") && !href.startsWith("//");
|
|
590
|
+
}
|
|
591
|
+
const trimmed = href.trim();
|
|
592
|
+
if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
|
|
593
|
+
return true;
|
|
594
|
+
}
|
|
595
|
+
try {
|
|
596
|
+
const url = new URL(trimmed, window.location.href);
|
|
597
|
+
const currentOrigin = window.location.origin;
|
|
598
|
+
const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
|
|
599
|
+
return normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin);
|
|
600
|
+
} catch {
|
|
601
|
+
return false;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
function toRelativePath(href) {
|
|
605
|
+
if (typeof window === "undefined") {
|
|
606
|
+
return href;
|
|
607
|
+
}
|
|
608
|
+
const trimmed = href.trim();
|
|
609
|
+
if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
|
|
610
|
+
return trimmed;
|
|
611
|
+
}
|
|
612
|
+
try {
|
|
613
|
+
const url = new URL(trimmed, window.location.href);
|
|
614
|
+
const currentOrigin = window.location.origin;
|
|
615
|
+
const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
|
|
616
|
+
if (normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin)) {
|
|
617
|
+
return url.pathname + url.search + url.hash;
|
|
618
|
+
}
|
|
619
|
+
} catch {
|
|
620
|
+
}
|
|
621
|
+
return trimmed;
|
|
622
|
+
}
|
|
623
|
+
function useNavigation({
|
|
624
|
+
href,
|
|
625
|
+
onClick
|
|
626
|
+
} = {}) {
|
|
627
|
+
const linkType = React3__namespace.useMemo(() => {
|
|
628
|
+
if (!href || href.trim() === "") {
|
|
629
|
+
return onClick ? "none" : "none";
|
|
630
|
+
}
|
|
631
|
+
const trimmed = href.trim();
|
|
632
|
+
if (trimmed.toLowerCase().startsWith("mailto:") || isEmail(trimmed)) {
|
|
633
|
+
return "mailto";
|
|
634
|
+
}
|
|
635
|
+
if (trimmed.toLowerCase().startsWith("tel:") || isPhoneNumber(trimmed)) {
|
|
636
|
+
return "tel";
|
|
637
|
+
}
|
|
638
|
+
if (isInternalUrl(trimmed)) {
|
|
639
|
+
return "internal";
|
|
640
|
+
}
|
|
641
|
+
try {
|
|
642
|
+
new URL(trimmed, typeof window !== "undefined" ? window.location.href : "http://localhost");
|
|
643
|
+
return "external";
|
|
644
|
+
} catch {
|
|
645
|
+
return "internal";
|
|
646
|
+
}
|
|
647
|
+
}, [href, onClick]);
|
|
648
|
+
const normalizedHref = React3__namespace.useMemo(() => {
|
|
649
|
+
if (!href || href.trim() === "") {
|
|
650
|
+
return void 0;
|
|
651
|
+
}
|
|
652
|
+
const trimmed = href.trim();
|
|
653
|
+
switch (linkType) {
|
|
654
|
+
case "tel":
|
|
655
|
+
return normalizePhoneNumber(trimmed);
|
|
656
|
+
case "mailto":
|
|
657
|
+
return normalizeEmail(trimmed);
|
|
658
|
+
case "internal":
|
|
659
|
+
return toRelativePath(trimmed);
|
|
660
|
+
case "external":
|
|
661
|
+
return trimmed;
|
|
662
|
+
default:
|
|
663
|
+
return trimmed;
|
|
664
|
+
}
|
|
665
|
+
}, [href, linkType]);
|
|
666
|
+
const target = React3__namespace.useMemo(() => {
|
|
667
|
+
switch (linkType) {
|
|
668
|
+
case "external":
|
|
669
|
+
return "_blank";
|
|
670
|
+
case "internal":
|
|
671
|
+
return "_self";
|
|
672
|
+
case "mailto":
|
|
673
|
+
case "tel":
|
|
674
|
+
return void 0;
|
|
675
|
+
default:
|
|
676
|
+
return void 0;
|
|
677
|
+
}
|
|
678
|
+
}, [linkType]);
|
|
679
|
+
const rel = React3__namespace.useMemo(() => {
|
|
680
|
+
if (linkType === "external") {
|
|
681
|
+
return "noopener noreferrer";
|
|
682
|
+
}
|
|
683
|
+
return void 0;
|
|
684
|
+
}, [linkType]);
|
|
685
|
+
const isExternal = linkType === "external";
|
|
686
|
+
const isInternal = linkType === "internal";
|
|
687
|
+
const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
|
|
688
|
+
const handleClick = React3__namespace.useCallback(
|
|
689
|
+
(event) => {
|
|
690
|
+
if (onClick) {
|
|
691
|
+
try {
|
|
692
|
+
onClick(event);
|
|
693
|
+
} catch (error) {
|
|
694
|
+
console.error("Error in user onClick handler:", error);
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
if (event.defaultPrevented) {
|
|
698
|
+
return;
|
|
699
|
+
}
|
|
700
|
+
if (shouldUseRouter && normalizedHref && event.button === 0 && // left-click only
|
|
701
|
+
!event.metaKey && !event.altKey && !event.ctrlKey && !event.shiftKey) {
|
|
702
|
+
if (typeof window !== "undefined") {
|
|
703
|
+
const handler = window.__opensiteNavigationHandler;
|
|
704
|
+
if (typeof handler === "function") {
|
|
705
|
+
try {
|
|
706
|
+
const handled = handler(normalizedHref, event.nativeEvent || event);
|
|
707
|
+
if (handled !== false) {
|
|
708
|
+
event.preventDefault();
|
|
709
|
+
}
|
|
710
|
+
} catch (error) {
|
|
711
|
+
console.error("Error in navigation handler:", error);
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
404
715
|
}
|
|
405
716
|
},
|
|
406
|
-
|
|
407
|
-
|
|
717
|
+
[onClick, shouldUseRouter, normalizedHref]
|
|
718
|
+
);
|
|
719
|
+
return {
|
|
720
|
+
linkType,
|
|
721
|
+
normalizedHref,
|
|
722
|
+
target,
|
|
723
|
+
rel,
|
|
724
|
+
isExternal,
|
|
725
|
+
isInternal,
|
|
726
|
+
shouldUseRouter,
|
|
727
|
+
handleClick
|
|
728
|
+
};
|
|
729
|
+
}
|
|
730
|
+
var Pressable = React3__namespace.forwardRef(
|
|
731
|
+
({
|
|
732
|
+
children,
|
|
733
|
+
className,
|
|
734
|
+
href,
|
|
735
|
+
onClick,
|
|
736
|
+
variant,
|
|
737
|
+
size,
|
|
738
|
+
asButton = false,
|
|
739
|
+
fallbackComponentType = "span",
|
|
740
|
+
componentType,
|
|
741
|
+
"aria-label": ariaLabel,
|
|
742
|
+
"aria-describedby": ariaDescribedby,
|
|
743
|
+
id,
|
|
744
|
+
...props
|
|
745
|
+
}, ref) => {
|
|
746
|
+
const navigation = useNavigation({ href, onClick });
|
|
747
|
+
const {
|
|
748
|
+
normalizedHref,
|
|
749
|
+
target,
|
|
750
|
+
rel,
|
|
751
|
+
linkType,
|
|
752
|
+
isInternal,
|
|
753
|
+
handleClick
|
|
754
|
+
} = navigation;
|
|
755
|
+
const shouldRenderLink = normalizedHref && linkType !== "none";
|
|
756
|
+
const shouldRenderButton = !shouldRenderLink && onClick;
|
|
757
|
+
const effectiveComponentType = componentType || (shouldRenderLink ? "a" : shouldRenderButton ? "button" : fallbackComponentType);
|
|
758
|
+
const finalComponentType = isInternal && shouldRenderLink ? "a" : effectiveComponentType;
|
|
759
|
+
const shouldApplyButtonStyles = asButton || variant || size;
|
|
760
|
+
const combinedClassName = cn(
|
|
761
|
+
shouldApplyButtonStyles && buttonVariants({ variant, size }),
|
|
762
|
+
className
|
|
763
|
+
);
|
|
764
|
+
const dataProps = Object.fromEntries(
|
|
765
|
+
Object.entries(props).filter(([key]) => key.startsWith("data-"))
|
|
766
|
+
);
|
|
767
|
+
const buttonDataAttributes = shouldApplyButtonStyles ? {
|
|
768
|
+
"data-slot": "button",
|
|
769
|
+
"data-variant": variant ?? "default",
|
|
770
|
+
"data-size": size ?? "default"
|
|
771
|
+
} : {};
|
|
772
|
+
const commonProps = {
|
|
773
|
+
className: combinedClassName,
|
|
774
|
+
onClick: handleClick,
|
|
775
|
+
"aria-label": ariaLabel,
|
|
776
|
+
"aria-describedby": ariaDescribedby,
|
|
777
|
+
id,
|
|
778
|
+
...dataProps,
|
|
779
|
+
...buttonDataAttributes
|
|
780
|
+
};
|
|
781
|
+
if (finalComponentType === "a" && shouldRenderLink) {
|
|
782
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
783
|
+
"a",
|
|
784
|
+
{
|
|
785
|
+
ref,
|
|
786
|
+
href: normalizedHref,
|
|
787
|
+
target,
|
|
788
|
+
rel,
|
|
789
|
+
...commonProps,
|
|
790
|
+
...props,
|
|
791
|
+
children
|
|
792
|
+
}
|
|
793
|
+
);
|
|
794
|
+
}
|
|
795
|
+
if (finalComponentType === "button") {
|
|
796
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
797
|
+
"button",
|
|
798
|
+
{
|
|
799
|
+
ref,
|
|
800
|
+
type: props.type || "button",
|
|
801
|
+
...commonProps,
|
|
802
|
+
...props,
|
|
803
|
+
children
|
|
804
|
+
}
|
|
805
|
+
);
|
|
806
|
+
}
|
|
807
|
+
if (finalComponentType === "div") {
|
|
808
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
809
|
+
"div",
|
|
810
|
+
{
|
|
811
|
+
ref,
|
|
812
|
+
...commonProps,
|
|
813
|
+
children
|
|
814
|
+
}
|
|
815
|
+
);
|
|
408
816
|
}
|
|
817
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
818
|
+
"span",
|
|
819
|
+
{
|
|
820
|
+
ref,
|
|
821
|
+
...commonProps,
|
|
822
|
+
children
|
|
823
|
+
}
|
|
824
|
+
);
|
|
409
825
|
}
|
|
410
826
|
);
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
827
|
+
Pressable.displayName = "Pressable";
|
|
828
|
+
var MOBILE_CLASSES = {
|
|
829
|
+
"fit-left": "items-start md:items-center",
|
|
830
|
+
"fit-center": "items-center",
|
|
831
|
+
"fit-right": "items-end md:items-center",
|
|
832
|
+
"full-left": "items-stretch md:items-center",
|
|
833
|
+
"full-center": "items-stretch md:items-center",
|
|
834
|
+
"full-right": "items-stretch md:items-center"
|
|
835
|
+
};
|
|
836
|
+
function BlockActions({
|
|
837
|
+
mobileConfig,
|
|
838
|
+
actionsClassName,
|
|
839
|
+
verticalSpacing = "mt-4 md:mt-8",
|
|
840
|
+
actions,
|
|
841
|
+
actionsSlot
|
|
416
842
|
}) {
|
|
417
|
-
const
|
|
843
|
+
const width = mobileConfig?.width ?? "full";
|
|
844
|
+
const position = mobileConfig?.position ?? "center";
|
|
845
|
+
const mobileLayoutClass = MOBILE_CLASSES[`${width}-${position}`];
|
|
846
|
+
if (actionsSlot) {
|
|
847
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { children: actionsSlot });
|
|
848
|
+
} else if (actions && actions?.length > 0) {
|
|
849
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
850
|
+
"div",
|
|
851
|
+
{
|
|
852
|
+
className: cn(
|
|
853
|
+
"flex flex-col md:flex-row flex-wrap gap-4",
|
|
854
|
+
mobileLayoutClass,
|
|
855
|
+
actionsClassName,
|
|
856
|
+
verticalSpacing
|
|
857
|
+
),
|
|
858
|
+
children: actions.map((action, index) => /* @__PURE__ */ jsxRuntime.jsx(ActionComponent, { action }, index))
|
|
859
|
+
}
|
|
860
|
+
);
|
|
861
|
+
} else {
|
|
862
|
+
return null;
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
function ActionComponent({ action }) {
|
|
866
|
+
const {
|
|
867
|
+
label,
|
|
868
|
+
icon,
|
|
869
|
+
iconAfter,
|
|
870
|
+
children,
|
|
871
|
+
href,
|
|
872
|
+
onClick,
|
|
873
|
+
className: actionClassName,
|
|
874
|
+
...pressableProps
|
|
875
|
+
} = action;
|
|
418
876
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
419
|
-
|
|
877
|
+
Pressable,
|
|
420
878
|
{
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
879
|
+
href,
|
|
880
|
+
onClick,
|
|
881
|
+
asButton: action.asButton ?? true,
|
|
882
|
+
className: actionClassName,
|
|
883
|
+
...pressableProps,
|
|
884
|
+
children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
885
|
+
icon,
|
|
886
|
+
label,
|
|
887
|
+
iconAfter
|
|
888
|
+
] })
|
|
424
889
|
}
|
|
425
890
|
);
|
|
426
891
|
}
|
|
427
892
|
function HeroSharedInboxLayered({
|
|
428
|
-
|
|
893
|
+
eyebrow,
|
|
894
|
+
eyebrowClassName,
|
|
429
895
|
heading,
|
|
430
896
|
description,
|
|
431
897
|
layeredImages,
|
|
432
898
|
layeredImagesSlot,
|
|
433
899
|
background,
|
|
900
|
+
actions,
|
|
901
|
+
actionsSlot,
|
|
902
|
+
actionsClassName,
|
|
434
903
|
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
435
|
-
spacing = "
|
|
904
|
+
spacing = "xl",
|
|
436
905
|
pattern,
|
|
437
906
|
patternOpacity,
|
|
438
907
|
className,
|
|
@@ -443,7 +912,7 @@ function HeroSharedInboxLayered({
|
|
|
443
912
|
optixFlowConfig,
|
|
444
913
|
patternClassName
|
|
445
914
|
}) {
|
|
446
|
-
const renderLayeredImages =
|
|
915
|
+
const renderLayeredImages = React3.useMemo(() => {
|
|
447
916
|
if (layeredImagesSlot) return layeredImagesSlot;
|
|
448
917
|
if (!layeredImages) return null;
|
|
449
918
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -492,7 +961,7 @@ function HeroSharedInboxLayered({
|
|
|
492
961
|
patternClassName,
|
|
493
962
|
className,
|
|
494
963
|
containerClassName,
|
|
495
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "
|
|
964
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pt-8 md:pt-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 items-center gap-4 md:gap-20 md:grid-cols-2", children: [
|
|
496
965
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
497
966
|
"div",
|
|
498
967
|
{
|
|
@@ -501,33 +970,44 @@ function HeroSharedInboxLayered({
|
|
|
501
970
|
contentClassName
|
|
502
971
|
),
|
|
503
972
|
children: [
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
"h1",
|
|
973
|
+
eyebrow && (typeof eyebrow === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
974
|
+
"div",
|
|
507
975
|
{
|
|
508
976
|
className: cn(
|
|
509
|
-
"
|
|
510
|
-
|
|
977
|
+
"font-light tracking-widest text-sm md:text-md uppercase",
|
|
978
|
+
eyebrowClassName
|
|
511
979
|
),
|
|
512
|
-
children:
|
|
980
|
+
children: eyebrow
|
|
513
981
|
}
|
|
514
|
-
) :
|
|
982
|
+
) : eyebrow),
|
|
983
|
+
heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
515
984
|
"h1",
|
|
516
985
|
{
|
|
517
986
|
className: cn(
|
|
518
|
-
"text-
|
|
987
|
+
"text-4xl font-semibold text-balance md:text-7xl",
|
|
519
988
|
headingClassName
|
|
520
989
|
),
|
|
521
990
|
children: heading
|
|
522
991
|
}
|
|
523
|
-
)),
|
|
992
|
+
) : heading),
|
|
524
993
|
description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
525
994
|
"p",
|
|
526
995
|
{
|
|
527
|
-
className: cn(
|
|
996
|
+
className: cn(
|
|
997
|
+
"max-w-full md:max-w-[70%] text-lg md:text-xl font-normal text-balance",
|
|
998
|
+
descriptionClassName
|
|
999
|
+
),
|
|
528
1000
|
children: description
|
|
529
1001
|
}
|
|
530
|
-
) :
|
|
1002
|
+
) : description),
|
|
1003
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1004
|
+
BlockActions,
|
|
1005
|
+
{
|
|
1006
|
+
actions,
|
|
1007
|
+
actionsSlot,
|
|
1008
|
+
actionsClassName
|
|
1009
|
+
}
|
|
1010
|
+
)
|
|
531
1011
|
]
|
|
532
1012
|
}
|
|
533
1013
|
),
|