@opensite/ui 1.2.9 → 1.3.1
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/carousel-scale-focus.cjs +3 -2
- package/dist/carousel-scale-focus.d.cts +5 -1
- package/dist/carousel-scale-focus.d.ts +5 -1
- package/dist/carousel-scale-focus.js +3 -2
- package/dist/feature-badge-grid-six.cjs +88 -13
- package/dist/feature-badge-grid-six.d.cts +1 -1
- package/dist/feature-badge-grid-six.d.ts +1 -1
- package/dist/feature-badge-grid-six.js +88 -13
- package/dist/feature-capabilities-grid.cjs +5 -6
- package/dist/feature-capabilities-grid.js +5 -6
- package/dist/feature-category-image-cards.cjs +1 -1
- package/dist/feature-category-image-cards.d.cts +1 -1
- package/dist/feature-category-image-cards.d.ts +1 -1
- package/dist/feature-category-image-cards.js +1 -1
- package/dist/feature-checklist-image.cjs +5 -5
- package/dist/feature-checklist-image.js +5 -5
- package/dist/feature-icon-grid-accent.cjs +6 -6
- package/dist/feature-icon-grid-accent.js +6 -6
- package/dist/feature-icon-grid-bordered.cjs +5 -10
- package/dist/feature-icon-grid-bordered.d.cts +1 -1
- package/dist/feature-icon-grid-bordered.d.ts +1 -1
- package/dist/feature-icon-grid-bordered.js +5 -10
- package/dist/feature-icon-grid-muted.cjs +1 -1
- package/dist/feature-icon-grid-muted.js +1 -1
- package/dist/feature-icon-tabs-content.cjs +91 -109
- package/dist/feature-icon-tabs-content.js +91 -109
- package/dist/feature-image-cards-three-column.cjs +23 -17
- package/dist/feature-image-cards-three-column.d.cts +1 -1
- package/dist/feature-image-cards-three-column.d.ts +1 -1
- package/dist/feature-image-cards-three-column.js +23 -17
- package/dist/feature-numbered-cards.cjs +2 -2
- package/dist/feature-numbered-cards.js +2 -2
- package/dist/feature-pattern-grid-links.cjs +142 -29
- package/dist/feature-pattern-grid-links.d.cts +21 -1
- package/dist/feature-pattern-grid-links.d.ts +21 -1
- package/dist/feature-pattern-grid-links.js +142 -29
- package/dist/feature-tabbed-content-image.cjs +1 -1
- package/dist/feature-tabbed-content-image.d.cts +1 -1
- package/dist/feature-tabbed-content-image.d.ts +1 -1
- package/dist/feature-tabbed-content-image.js +1 -1
- package/dist/feature-three-column-values.cjs +474 -37
- package/dist/feature-three-column-values.d.cts +4 -0
- package/dist/feature-three-column-values.d.ts +4 -0
- package/dist/feature-three-column-values.js +474 -37
- package/dist/feature-utility-cards-grid.cjs +21 -5
- package/dist/feature-utility-cards-grid.js +21 -5
- package/dist/registry.cjs +449 -240
- package/dist/registry.js +449 -240
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ import React__default, { useMemo } from 'react';
|
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
import { cva } from 'class-variance-authority';
|
|
7
8
|
|
|
8
9
|
// components/blocks/features/feature-three-column-values.tsx
|
|
9
10
|
function cn(...inputs) {
|
|
@@ -489,19 +490,437 @@ var Section = React__default.forwardRef(
|
|
|
489
490
|
}
|
|
490
491
|
);
|
|
491
492
|
Section.displayName = "Section";
|
|
493
|
+
var baseStyles = [
|
|
494
|
+
// Layout
|
|
495
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap shrink-0",
|
|
496
|
+
// Typography - using CSS variables with sensible defaults
|
|
497
|
+
"font-[var(--button-font-family,inherit)]",
|
|
498
|
+
"font-[var(--button-font-weight,500)]",
|
|
499
|
+
"tracking-[var(--button-letter-spacing,0)]",
|
|
500
|
+
"leading-[var(--button-line-height,1.25)]",
|
|
501
|
+
"[text-transform:var(--button-text-transform,none)]",
|
|
502
|
+
"text-sm",
|
|
503
|
+
// Border radius
|
|
504
|
+
"rounded-[var(--button-radius,var(--radius,0.375rem))]",
|
|
505
|
+
// Smooth transition - using [transition:...] to set full shorthand property (not just transition-property)
|
|
506
|
+
"[transition:var(--button-transition,all_250ms_cubic-bezier(0.4,0,0.2,1))]",
|
|
507
|
+
// Box shadow (master level) - using [box-shadow:...] for complex multi-value shadows
|
|
508
|
+
"[box-shadow:var(--button-shadow,none)]",
|
|
509
|
+
"hover:[box-shadow:var(--button-shadow-hover,var(--button-shadow,none))]",
|
|
510
|
+
// Disabled state
|
|
511
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
512
|
+
// SVG handling
|
|
513
|
+
"[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
|
|
514
|
+
// Focus styles
|
|
515
|
+
"outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
516
|
+
// Invalid state
|
|
517
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
|
|
518
|
+
].join(" ");
|
|
519
|
+
var buttonVariants = cva(baseStyles, {
|
|
520
|
+
variants: {
|
|
521
|
+
variant: {
|
|
522
|
+
// Default (Primary) variant - full customization
|
|
523
|
+
default: [
|
|
524
|
+
"bg-[var(--button-default-bg,hsl(var(--primary)))]",
|
|
525
|
+
"text-[var(--button-default-fg,hsl(var(--primary-foreground)))]",
|
|
526
|
+
"border-[length:var(--button-default-border-width,0px)]",
|
|
527
|
+
"border-[color:var(--button-default-border,transparent)]",
|
|
528
|
+
"[box-shadow:var(--button-default-shadow,var(--button-shadow,none))]",
|
|
529
|
+
"hover:bg-[var(--button-default-hover-bg,hsl(var(--primary)/0.9))]",
|
|
530
|
+
"hover:text-[var(--button-default-hover-fg,var(--button-default-fg,hsl(var(--primary-foreground))))]",
|
|
531
|
+
"hover:border-[color:var(--button-default-hover-border,var(--button-default-border,transparent))]",
|
|
532
|
+
"hover:[box-shadow:var(--button-default-shadow-hover,var(--button-shadow-hover,var(--button-default-shadow,var(--button-shadow,none))))]"
|
|
533
|
+
].join(" "),
|
|
534
|
+
// Destructive variant - full customization
|
|
535
|
+
destructive: [
|
|
536
|
+
"bg-[var(--button-destructive-bg,hsl(var(--destructive)))]",
|
|
537
|
+
"text-[var(--button-destructive-fg,white)]",
|
|
538
|
+
"border-[length:var(--button-destructive-border-width,0px)]",
|
|
539
|
+
"border-[color:var(--button-destructive-border,transparent)]",
|
|
540
|
+
"[box-shadow:var(--button-destructive-shadow,var(--button-shadow,none))]",
|
|
541
|
+
"hover:bg-[var(--button-destructive-hover-bg,hsl(var(--destructive)/0.9))]",
|
|
542
|
+
"hover:text-[var(--button-destructive-hover-fg,var(--button-destructive-fg,white))]",
|
|
543
|
+
"hover:border-[color:var(--button-destructive-hover-border,var(--button-destructive-border,transparent))]",
|
|
544
|
+
"hover:[box-shadow:var(--button-destructive-shadow-hover,var(--button-shadow-hover,var(--button-destructive-shadow,var(--button-shadow,none))))]",
|
|
545
|
+
"focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
|
|
546
|
+
"dark:bg-destructive/60"
|
|
547
|
+
].join(" "),
|
|
548
|
+
// Outline variant - full customization with proper border handling
|
|
549
|
+
outline: [
|
|
550
|
+
"bg-[var(--button-outline-bg,hsl(var(--background)))]",
|
|
551
|
+
"text-[var(--button-outline-fg,inherit)]",
|
|
552
|
+
"border-[length:var(--button-outline-border-width,1px)]",
|
|
553
|
+
"border-[color:var(--button-outline-border,hsl(var(--border)))]",
|
|
554
|
+
"[box-shadow:var(--button-outline-shadow,var(--button-shadow,0_1px_2px_0_rgb(0_0_0/0.05)))]",
|
|
555
|
+
"hover:bg-[var(--button-outline-hover-bg,hsl(var(--accent)))]",
|
|
556
|
+
"hover:text-[var(--button-outline-hover-fg,hsl(var(--accent-foreground)))]",
|
|
557
|
+
"hover:border-[color:var(--button-outline-hover-border,var(--button-outline-border,hsl(var(--border))))]",
|
|
558
|
+
"hover:[box-shadow:var(--button-outline-shadow-hover,var(--button-shadow-hover,var(--button-outline-shadow,var(--button-shadow,none))))]",
|
|
559
|
+
"dark:bg-input/30 dark:border-input dark:hover:bg-input/50"
|
|
560
|
+
].join(" "),
|
|
561
|
+
// Secondary variant - full customization
|
|
562
|
+
secondary: [
|
|
563
|
+
"bg-[var(--button-secondary-bg,hsl(var(--secondary)))]",
|
|
564
|
+
"text-[var(--button-secondary-fg,hsl(var(--secondary-foreground)))]",
|
|
565
|
+
"border-[length:var(--button-secondary-border-width,0px)]",
|
|
566
|
+
"border-[color:var(--button-secondary-border,transparent)]",
|
|
567
|
+
"[box-shadow:var(--button-secondary-shadow,var(--button-shadow,none))]",
|
|
568
|
+
"hover:bg-[var(--button-secondary-hover-bg,hsl(var(--secondary)/0.8))]",
|
|
569
|
+
"hover:text-[var(--button-secondary-hover-fg,var(--button-secondary-fg,hsl(var(--secondary-foreground))))]",
|
|
570
|
+
"hover:border-[color:var(--button-secondary-hover-border,var(--button-secondary-border,transparent))]",
|
|
571
|
+
"hover:[box-shadow:var(--button-secondary-shadow-hover,var(--button-shadow-hover,var(--button-secondary-shadow,var(--button-shadow,none))))]"
|
|
572
|
+
].join(" "),
|
|
573
|
+
// Ghost variant - full customization
|
|
574
|
+
ghost: [
|
|
575
|
+
"bg-[var(--button-ghost-bg,transparent)]",
|
|
576
|
+
"text-[var(--button-ghost-fg,inherit)]",
|
|
577
|
+
"border-[length:var(--button-ghost-border-width,0px)]",
|
|
578
|
+
"border-[color:var(--button-ghost-border,transparent)]",
|
|
579
|
+
"[box-shadow:var(--button-ghost-shadow,var(--button-shadow,none))]",
|
|
580
|
+
"hover:bg-[var(--button-ghost-hover-bg,hsl(var(--accent)))]",
|
|
581
|
+
"hover:text-[var(--button-ghost-hover-fg,hsl(var(--accent-foreground)))]",
|
|
582
|
+
"hover:border-[color:var(--button-ghost-hover-border,var(--button-ghost-border,transparent))]",
|
|
583
|
+
"hover:[box-shadow:var(--button-ghost-shadow-hover,var(--button-shadow-hover,var(--button-ghost-shadow,var(--button-shadow,none))))]",
|
|
584
|
+
"dark:hover:bg-accent/50"
|
|
585
|
+
].join(" "),
|
|
586
|
+
// Link variant - full customization
|
|
587
|
+
link: [
|
|
588
|
+
"bg-[var(--button-link-bg,transparent)]",
|
|
589
|
+
"text-[var(--button-link-fg,hsl(var(--primary)))]",
|
|
590
|
+
"border-[length:var(--button-link-border-width,0px)]",
|
|
591
|
+
"border-[color:var(--button-link-border,transparent)]",
|
|
592
|
+
"[box-shadow:var(--button-link-shadow,none)]",
|
|
593
|
+
"hover:bg-[var(--button-link-hover-bg,transparent)]",
|
|
594
|
+
"hover:text-[var(--button-link-hover-fg,var(--button-link-fg,hsl(var(--primary))))]",
|
|
595
|
+
"hover:[box-shadow:var(--button-link-shadow-hover,none)]",
|
|
596
|
+
"underline-offset-4 hover:underline"
|
|
597
|
+
].join(" ")
|
|
598
|
+
},
|
|
599
|
+
size: {
|
|
600
|
+
default: [
|
|
601
|
+
"h-[var(--button-height-md,2.25rem)]",
|
|
602
|
+
"px-[var(--button-padding-x-md,1rem)]",
|
|
603
|
+
"py-[var(--button-padding-y-md,0.5rem)]",
|
|
604
|
+
"has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
|
|
605
|
+
].join(" "),
|
|
606
|
+
sm: [
|
|
607
|
+
"h-[var(--button-height-sm,2rem)]",
|
|
608
|
+
"px-[var(--button-padding-x-sm,0.75rem)]",
|
|
609
|
+
"py-[var(--button-padding-y-sm,0.25rem)]",
|
|
610
|
+
"gap-1.5",
|
|
611
|
+
"has-[>svg]:px-[calc(var(--button-padding-x-sm,0.75rem)*0.83)]"
|
|
612
|
+
].join(" "),
|
|
613
|
+
md: [
|
|
614
|
+
"h-[var(--button-height-md,2.25rem)]",
|
|
615
|
+
"px-[var(--button-padding-x-md,1rem)]",
|
|
616
|
+
"py-[var(--button-padding-y-md,0.5rem)]",
|
|
617
|
+
"has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
|
|
618
|
+
].join(" "),
|
|
619
|
+
lg: [
|
|
620
|
+
"h-[var(--button-height-lg,2.5rem)]",
|
|
621
|
+
"px-[var(--button-padding-x-lg,1.5rem)]",
|
|
622
|
+
"py-[var(--button-padding-y-lg,0.5rem)]",
|
|
623
|
+
"has-[>svg]:px-[calc(var(--button-padding-x-lg,1.5rem)*0.67)]"
|
|
624
|
+
].join(" "),
|
|
625
|
+
icon: "size-[var(--button-height-md,2.25rem)]",
|
|
626
|
+
"icon-sm": "size-[var(--button-height-sm,2rem)]",
|
|
627
|
+
"icon-lg": "size-[var(--button-height-lg,2.5rem)]"
|
|
628
|
+
}
|
|
629
|
+
},
|
|
630
|
+
defaultVariants: {
|
|
631
|
+
variant: "default",
|
|
632
|
+
size: "default"
|
|
633
|
+
}
|
|
634
|
+
});
|
|
635
|
+
function normalizePhoneNumber(input) {
|
|
636
|
+
const trimmed = input.trim();
|
|
637
|
+
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
638
|
+
return trimmed;
|
|
639
|
+
}
|
|
640
|
+
const match = trimmed.match(/^[\s\+\-\(\)]*(\d[\d\s\-\(\)\.]*\d)[\s\-]*(x|ext\.?|extension)?[\s\-]*(\d+)?$/i);
|
|
641
|
+
if (match) {
|
|
642
|
+
const mainNumber = match[1].replace(/[\s\-\(\)\.]/g, "");
|
|
643
|
+
const extension = match[3];
|
|
644
|
+
const normalized = mainNumber.length >= 10 && !trimmed.startsWith("+") ? `+${mainNumber}` : mainNumber;
|
|
645
|
+
const withExtension = extension ? `${normalized};ext=${extension}` : normalized;
|
|
646
|
+
return `tel:${withExtension}`;
|
|
647
|
+
}
|
|
648
|
+
const cleaned = trimmed.replace(/[\s\-\(\)\.]/g, "");
|
|
649
|
+
return `tel:${cleaned}`;
|
|
650
|
+
}
|
|
651
|
+
function normalizeEmail(input) {
|
|
652
|
+
const trimmed = input.trim();
|
|
653
|
+
if (trimmed.toLowerCase().startsWith("mailto:")) {
|
|
654
|
+
return trimmed;
|
|
655
|
+
}
|
|
656
|
+
return `mailto:${trimmed}`;
|
|
657
|
+
}
|
|
658
|
+
function isEmail(input) {
|
|
659
|
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
660
|
+
return emailRegex.test(input.trim());
|
|
661
|
+
}
|
|
662
|
+
function isPhoneNumber(input) {
|
|
663
|
+
const trimmed = input.trim();
|
|
664
|
+
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
665
|
+
return true;
|
|
666
|
+
}
|
|
667
|
+
const phoneRegex = /^[\s\+\-\(\)]*\d[\d\s\-\(\)\.]*\d[\s\-]*(x|ext\.?|extension)?[\s\-]*\d*$/i;
|
|
668
|
+
return phoneRegex.test(trimmed);
|
|
669
|
+
}
|
|
670
|
+
function isInternalUrl(href) {
|
|
671
|
+
if (typeof window === "undefined") {
|
|
672
|
+
return href.startsWith("/") && !href.startsWith("//");
|
|
673
|
+
}
|
|
674
|
+
const trimmed = href.trim();
|
|
675
|
+
if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
|
|
676
|
+
return true;
|
|
677
|
+
}
|
|
678
|
+
try {
|
|
679
|
+
const url = new URL(trimmed, window.location.href);
|
|
680
|
+
const currentOrigin = window.location.origin;
|
|
681
|
+
const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
|
|
682
|
+
return normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin);
|
|
683
|
+
} catch {
|
|
684
|
+
return false;
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
function toRelativePath(href) {
|
|
688
|
+
if (typeof window === "undefined") {
|
|
689
|
+
return href;
|
|
690
|
+
}
|
|
691
|
+
const trimmed = href.trim();
|
|
692
|
+
if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
|
|
693
|
+
return trimmed;
|
|
694
|
+
}
|
|
695
|
+
try {
|
|
696
|
+
const url = new URL(trimmed, window.location.href);
|
|
697
|
+
const currentOrigin = window.location.origin;
|
|
698
|
+
const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
|
|
699
|
+
if (normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin)) {
|
|
700
|
+
return url.pathname + url.search + url.hash;
|
|
701
|
+
}
|
|
702
|
+
} catch {
|
|
703
|
+
}
|
|
704
|
+
return trimmed;
|
|
705
|
+
}
|
|
706
|
+
function useNavigation({
|
|
707
|
+
href,
|
|
708
|
+
onClick
|
|
709
|
+
} = {}) {
|
|
710
|
+
const linkType = React.useMemo(() => {
|
|
711
|
+
if (!href || href.trim() === "") {
|
|
712
|
+
return onClick ? "none" : "none";
|
|
713
|
+
}
|
|
714
|
+
const trimmed = href.trim();
|
|
715
|
+
if (trimmed.toLowerCase().startsWith("mailto:") || isEmail(trimmed)) {
|
|
716
|
+
return "mailto";
|
|
717
|
+
}
|
|
718
|
+
if (trimmed.toLowerCase().startsWith("tel:") || isPhoneNumber(trimmed)) {
|
|
719
|
+
return "tel";
|
|
720
|
+
}
|
|
721
|
+
if (isInternalUrl(trimmed)) {
|
|
722
|
+
return "internal";
|
|
723
|
+
}
|
|
724
|
+
try {
|
|
725
|
+
new URL(trimmed, typeof window !== "undefined" ? window.location.href : "http://localhost");
|
|
726
|
+
return "external";
|
|
727
|
+
} catch {
|
|
728
|
+
return "internal";
|
|
729
|
+
}
|
|
730
|
+
}, [href, onClick]);
|
|
731
|
+
const normalizedHref = React.useMemo(() => {
|
|
732
|
+
if (!href || href.trim() === "") {
|
|
733
|
+
return void 0;
|
|
734
|
+
}
|
|
735
|
+
const trimmed = href.trim();
|
|
736
|
+
switch (linkType) {
|
|
737
|
+
case "tel":
|
|
738
|
+
return normalizePhoneNumber(trimmed);
|
|
739
|
+
case "mailto":
|
|
740
|
+
return normalizeEmail(trimmed);
|
|
741
|
+
case "internal":
|
|
742
|
+
return toRelativePath(trimmed);
|
|
743
|
+
case "external":
|
|
744
|
+
return trimmed;
|
|
745
|
+
default:
|
|
746
|
+
return trimmed;
|
|
747
|
+
}
|
|
748
|
+
}, [href, linkType]);
|
|
749
|
+
const target = React.useMemo(() => {
|
|
750
|
+
switch (linkType) {
|
|
751
|
+
case "external":
|
|
752
|
+
return "_blank";
|
|
753
|
+
case "internal":
|
|
754
|
+
return "_self";
|
|
755
|
+
case "mailto":
|
|
756
|
+
case "tel":
|
|
757
|
+
return void 0;
|
|
758
|
+
default:
|
|
759
|
+
return void 0;
|
|
760
|
+
}
|
|
761
|
+
}, [linkType]);
|
|
762
|
+
const rel = React.useMemo(() => {
|
|
763
|
+
if (linkType === "external") {
|
|
764
|
+
return "noopener noreferrer";
|
|
765
|
+
}
|
|
766
|
+
return void 0;
|
|
767
|
+
}, [linkType]);
|
|
768
|
+
const isExternal = linkType === "external";
|
|
769
|
+
const isInternal = linkType === "internal";
|
|
770
|
+
const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
|
|
771
|
+
const handleClick = React.useCallback(
|
|
772
|
+
(event) => {
|
|
773
|
+
if (onClick) {
|
|
774
|
+
try {
|
|
775
|
+
onClick(event);
|
|
776
|
+
} catch (error) {
|
|
777
|
+
console.error("Error in user onClick handler:", error);
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
if (event.defaultPrevented) {
|
|
781
|
+
return;
|
|
782
|
+
}
|
|
783
|
+
if (shouldUseRouter && normalizedHref && event.button === 0 && // left-click only
|
|
784
|
+
!event.metaKey && !event.altKey && !event.ctrlKey && !event.shiftKey) {
|
|
785
|
+
if (typeof window !== "undefined") {
|
|
786
|
+
const handler = window.__opensiteNavigationHandler;
|
|
787
|
+
if (typeof handler === "function") {
|
|
788
|
+
try {
|
|
789
|
+
const handled = handler(normalizedHref, event.nativeEvent || event);
|
|
790
|
+
if (handled !== false) {
|
|
791
|
+
event.preventDefault();
|
|
792
|
+
}
|
|
793
|
+
} catch (error) {
|
|
794
|
+
console.error("Error in navigation handler:", error);
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
},
|
|
800
|
+
[onClick, shouldUseRouter, normalizedHref]
|
|
801
|
+
);
|
|
802
|
+
return {
|
|
803
|
+
linkType,
|
|
804
|
+
normalizedHref,
|
|
805
|
+
target,
|
|
806
|
+
rel,
|
|
807
|
+
isExternal,
|
|
808
|
+
isInternal,
|
|
809
|
+
shouldUseRouter,
|
|
810
|
+
handleClick
|
|
811
|
+
};
|
|
812
|
+
}
|
|
813
|
+
var Pressable = React.forwardRef(
|
|
814
|
+
({
|
|
815
|
+
children,
|
|
816
|
+
className,
|
|
817
|
+
href,
|
|
818
|
+
onClick,
|
|
819
|
+
variant,
|
|
820
|
+
size,
|
|
821
|
+
asButton = false,
|
|
822
|
+
fallbackComponentType = "span",
|
|
823
|
+
componentType,
|
|
824
|
+
"aria-label": ariaLabel,
|
|
825
|
+
"aria-describedby": ariaDescribedby,
|
|
826
|
+
id,
|
|
827
|
+
...props
|
|
828
|
+
}, ref) => {
|
|
829
|
+
const navigation = useNavigation({ href, onClick });
|
|
830
|
+
const {
|
|
831
|
+
normalizedHref,
|
|
832
|
+
target,
|
|
833
|
+
rel,
|
|
834
|
+
linkType,
|
|
835
|
+
isInternal,
|
|
836
|
+
handleClick
|
|
837
|
+
} = navigation;
|
|
838
|
+
const shouldRenderLink = normalizedHref && linkType !== "none";
|
|
839
|
+
const shouldRenderButton = !shouldRenderLink && onClick;
|
|
840
|
+
const effectiveComponentType = componentType || (shouldRenderLink ? "a" : shouldRenderButton ? "button" : fallbackComponentType);
|
|
841
|
+
const finalComponentType = isInternal && shouldRenderLink ? "a" : effectiveComponentType;
|
|
842
|
+
const shouldApplyButtonStyles = asButton || variant || size;
|
|
843
|
+
const combinedClassName = cn(
|
|
844
|
+
shouldApplyButtonStyles && buttonVariants({ variant, size }),
|
|
845
|
+
className
|
|
846
|
+
);
|
|
847
|
+
const dataProps = Object.fromEntries(
|
|
848
|
+
Object.entries(props).filter(([key]) => key.startsWith("data-"))
|
|
849
|
+
);
|
|
850
|
+
const buttonDataAttributes = shouldApplyButtonStyles ? {
|
|
851
|
+
"data-slot": "button",
|
|
852
|
+
"data-variant": variant ?? "default",
|
|
853
|
+
"data-size": size ?? "default"
|
|
854
|
+
} : {};
|
|
855
|
+
const commonProps = {
|
|
856
|
+
className: combinedClassName,
|
|
857
|
+
onClick: handleClick,
|
|
858
|
+
"aria-label": ariaLabel,
|
|
859
|
+
"aria-describedby": ariaDescribedby,
|
|
860
|
+
id,
|
|
861
|
+
...dataProps,
|
|
862
|
+
...buttonDataAttributes
|
|
863
|
+
};
|
|
864
|
+
if (finalComponentType === "a" && shouldRenderLink) {
|
|
865
|
+
return /* @__PURE__ */ jsx(
|
|
866
|
+
"a",
|
|
867
|
+
{
|
|
868
|
+
ref,
|
|
869
|
+
href: normalizedHref,
|
|
870
|
+
target,
|
|
871
|
+
rel,
|
|
872
|
+
...commonProps,
|
|
873
|
+
...props,
|
|
874
|
+
children
|
|
875
|
+
}
|
|
876
|
+
);
|
|
877
|
+
}
|
|
878
|
+
if (finalComponentType === "button") {
|
|
879
|
+
return /* @__PURE__ */ jsx(
|
|
880
|
+
"button",
|
|
881
|
+
{
|
|
882
|
+
ref,
|
|
883
|
+
type: props.type || "button",
|
|
884
|
+
...commonProps,
|
|
885
|
+
...props,
|
|
886
|
+
children
|
|
887
|
+
}
|
|
888
|
+
);
|
|
889
|
+
}
|
|
890
|
+
if (finalComponentType === "div") {
|
|
891
|
+
return /* @__PURE__ */ jsx(
|
|
892
|
+
"div",
|
|
893
|
+
{
|
|
894
|
+
ref,
|
|
895
|
+
...commonProps,
|
|
896
|
+
children
|
|
897
|
+
}
|
|
898
|
+
);
|
|
899
|
+
}
|
|
900
|
+
return /* @__PURE__ */ jsx(
|
|
901
|
+
"span",
|
|
902
|
+
{
|
|
903
|
+
ref,
|
|
904
|
+
...commonProps,
|
|
905
|
+
children
|
|
906
|
+
}
|
|
907
|
+
);
|
|
908
|
+
}
|
|
909
|
+
);
|
|
910
|
+
Pressable.displayName = "Pressable";
|
|
492
911
|
function FeatureThreeColumnValues({
|
|
493
912
|
label,
|
|
494
913
|
title,
|
|
495
914
|
values,
|
|
496
915
|
valuesSlot,
|
|
497
916
|
className,
|
|
498
|
-
containerClassName,
|
|
917
|
+
containerClassName = "px-6 sm:px-6 md:px-6 lg:px-8",
|
|
499
918
|
labelClassName,
|
|
500
919
|
titleClassName,
|
|
501
920
|
gridClassName,
|
|
502
921
|
cardClassName,
|
|
503
922
|
background,
|
|
504
|
-
spacing = "py-
|
|
923
|
+
spacing = "py-12 md:py-32",
|
|
505
924
|
pattern,
|
|
506
925
|
patternOpacity,
|
|
507
926
|
patternClassName
|
|
@@ -521,38 +940,48 @@ function FeatureThreeColumnValues({
|
|
|
521
940
|
return values.map((value, index) => /* @__PURE__ */ jsxs(
|
|
522
941
|
"div",
|
|
523
942
|
{
|
|
524
|
-
className: cn(
|
|
943
|
+
className: cn(
|
|
944
|
+
"relative flex h-full flex-col justify-between gap-6 rounded-lg p-5 bg-card text-card-foreground shadow-lg border",
|
|
945
|
+
cardClassName,
|
|
946
|
+
value.className
|
|
947
|
+
),
|
|
525
948
|
children: [
|
|
526
949
|
(value.icon || value.iconName) && /* @__PURE__ */ jsx(
|
|
527
|
-
"
|
|
950
|
+
"div",
|
|
528
951
|
{
|
|
529
952
|
className: cn(
|
|
530
|
-
"
|
|
953
|
+
"flex size-fit p-3 items-center justify-center rounded-full border",
|
|
531
954
|
value.iconClassName
|
|
532
955
|
),
|
|
533
956
|
children: renderValueIcon(value)
|
|
534
957
|
}
|
|
535
958
|
),
|
|
536
|
-
|
|
537
|
-
"
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
959
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col justify-end gap-2", children: [
|
|
960
|
+
value.title && (typeof value.title === "string" ? /* @__PURE__ */ jsx(
|
|
961
|
+
Pressable,
|
|
962
|
+
{
|
|
963
|
+
href: value.href,
|
|
964
|
+
className: cn(
|
|
965
|
+
"font-medium md:mb-2 text-xl",
|
|
966
|
+
value.titleClassName
|
|
967
|
+
),
|
|
968
|
+
children: value.title
|
|
969
|
+
}
|
|
970
|
+
) : /* @__PURE__ */ jsx(
|
|
971
|
+
"div",
|
|
972
|
+
{
|
|
973
|
+
className: cn("mb-2 text-xl font-medium", value.titleClassName),
|
|
974
|
+
children: value.title
|
|
975
|
+
}
|
|
976
|
+
)),
|
|
977
|
+
value.description && (typeof value.description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("leading-7 ", value.descriptionClassName), children: value.description }) : /* @__PURE__ */ jsx("div", { className: cn("leading-7", value.descriptionClassName), children: value.description }))
|
|
978
|
+
] })
|
|
550
979
|
]
|
|
551
980
|
},
|
|
552
981
|
index
|
|
553
982
|
));
|
|
554
983
|
}, [valuesSlot, values, cardClassName, renderValueIcon]);
|
|
555
|
-
return /* @__PURE__ */
|
|
984
|
+
return /* @__PURE__ */ jsx(
|
|
556
985
|
Section,
|
|
557
986
|
{
|
|
558
987
|
background,
|
|
@@ -562,32 +991,40 @@ function FeatureThreeColumnValues({
|
|
|
562
991
|
patternClassName,
|
|
563
992
|
className,
|
|
564
993
|
containerClassName,
|
|
565
|
-
children: [
|
|
566
|
-
label
|
|
567
|
-
|
|
568
|
-
"
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
994
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col space-y-6 md:space-y-16", children: [
|
|
995
|
+
label || title ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col space-y-4", children: [
|
|
996
|
+
label && (typeof label === "string" ? /* @__PURE__ */ jsx("p", { className: cn("text-sm", labelClassName), children: label }) : /* @__PURE__ */ jsx("div", { className: cn("text-sm", labelClassName), children: label })),
|
|
997
|
+
title && (typeof title === "string" ? /* @__PURE__ */ jsx(
|
|
998
|
+
"h2",
|
|
999
|
+
{
|
|
1000
|
+
className: cn(
|
|
1001
|
+
"text-3xl font-medium lg:text-4xl",
|
|
1002
|
+
titleClassName
|
|
1003
|
+
),
|
|
1004
|
+
children: title
|
|
1005
|
+
}
|
|
1006
|
+
) : /* @__PURE__ */ jsx(
|
|
1007
|
+
"div",
|
|
1008
|
+
{
|
|
1009
|
+
className: cn(
|
|
1010
|
+
"text-3xl font-medium lg:text-4xl",
|
|
1011
|
+
titleClassName
|
|
1012
|
+
),
|
|
1013
|
+
children: title
|
|
1014
|
+
}
|
|
1015
|
+
))
|
|
1016
|
+
] }) : null,
|
|
580
1017
|
(valuesSlot || values && values.length > 0) && /* @__PURE__ */ jsx(
|
|
581
1018
|
"div",
|
|
582
1019
|
{
|
|
583
1020
|
className: cn(
|
|
584
|
-
"
|
|
1021
|
+
"grid gap-6 grid-cols-1 md:grid-cols-3",
|
|
585
1022
|
gridClassName
|
|
586
1023
|
),
|
|
587
1024
|
children: valuesContent
|
|
588
1025
|
}
|
|
589
1026
|
)
|
|
590
|
-
]
|
|
1027
|
+
] })
|
|
591
1028
|
}
|
|
592
1029
|
);
|
|
593
1030
|
}
|
|
@@ -997,7 +997,14 @@ function FeatureUtilityCardsGrid({
|
|
|
997
997
|
const renderLabelIcon = React.useMemo(() => {
|
|
998
998
|
if (labelIcon) return labelIcon;
|
|
999
999
|
if (labelIconName)
|
|
1000
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1000
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1001
|
+
DynamicIcon,
|
|
1002
|
+
{
|
|
1003
|
+
name: labelIconName,
|
|
1004
|
+
size: 20,
|
|
1005
|
+
className: getAccentColor(background)
|
|
1006
|
+
}
|
|
1007
|
+
);
|
|
1001
1008
|
return null;
|
|
1002
1009
|
}, [labelIcon, labelIconName, background]);
|
|
1003
1010
|
const learnMoreContent = React.useMemo(() => {
|
|
@@ -1094,10 +1101,19 @@ function FeatureUtilityCardsGrid({
|
|
|
1094
1101
|
headerClassName
|
|
1095
1102
|
),
|
|
1096
1103
|
children: [
|
|
1097
|
-
(label || labelIcon || labelIconName) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1104
|
+
(label || labelIcon || labelIconName) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1105
|
+
"div",
|
|
1106
|
+
{
|
|
1107
|
+
className: cn(
|
|
1108
|
+
"text-lg flex items-center gap-4",
|
|
1109
|
+
labelClassName
|
|
1110
|
+
),
|
|
1111
|
+
children: [
|
|
1112
|
+
renderLabelIcon,
|
|
1113
|
+
label && (typeof label === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { children: label }) : /* @__PURE__ */ jsxRuntime.jsx("div", { children: label }))
|
|
1114
|
+
]
|
|
1115
|
+
}
|
|
1116
|
+
),
|
|
1101
1117
|
learnMoreContent
|
|
1102
1118
|
]
|
|
1103
1119
|
}
|
|
@@ -975,7 +975,14 @@ function FeatureUtilityCardsGrid({
|
|
|
975
975
|
const renderLabelIcon = useMemo(() => {
|
|
976
976
|
if (labelIcon) return labelIcon;
|
|
977
977
|
if (labelIconName)
|
|
978
|
-
return /* @__PURE__ */ jsx(
|
|
978
|
+
return /* @__PURE__ */ jsx(
|
|
979
|
+
DynamicIcon,
|
|
980
|
+
{
|
|
981
|
+
name: labelIconName,
|
|
982
|
+
size: 20,
|
|
983
|
+
className: getAccentColor(background)
|
|
984
|
+
}
|
|
985
|
+
);
|
|
979
986
|
return null;
|
|
980
987
|
}, [labelIcon, labelIconName, background]);
|
|
981
988
|
const learnMoreContent = useMemo(() => {
|
|
@@ -1072,10 +1079,19 @@ function FeatureUtilityCardsGrid({
|
|
|
1072
1079
|
headerClassName
|
|
1073
1080
|
),
|
|
1074
1081
|
children: [
|
|
1075
|
-
(label || labelIcon || labelIconName) && /* @__PURE__ */ jsxs(
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1082
|
+
(label || labelIcon || labelIconName) && /* @__PURE__ */ jsxs(
|
|
1083
|
+
"div",
|
|
1084
|
+
{
|
|
1085
|
+
className: cn(
|
|
1086
|
+
"text-lg flex items-center gap-4",
|
|
1087
|
+
labelClassName
|
|
1088
|
+
),
|
|
1089
|
+
children: [
|
|
1090
|
+
renderLabelIcon,
|
|
1091
|
+
label && (typeof label === "string" ? /* @__PURE__ */ jsx("p", { children: label }) : /* @__PURE__ */ jsx("div", { children: label }))
|
|
1092
|
+
]
|
|
1093
|
+
}
|
|
1094
|
+
),
|
|
1079
1095
|
learnMoreContent
|
|
1080
1096
|
]
|
|
1081
1097
|
}
|