@opensite/ui 0.8.1 → 0.8.2
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-horizontal-cards.cjs +8 -6
- package/dist/carousel-horizontal-cards.js +8 -6
- package/dist/carousel-image-hero.cjs +85 -160
- package/dist/carousel-image-hero.d.cts +1 -5
- package/dist/carousel-image-hero.d.ts +1 -5
- package/dist/carousel-image-hero.js +85 -160
- package/dist/carousel-portfolio-hero.cjs +138 -59
- package/dist/carousel-portfolio-hero.js +138 -59
- package/dist/carousel-product-feature-showcase.cjs +148 -95
- package/dist/carousel-product-feature-showcase.js +148 -95
- package/dist/carousel-progress-slider.cjs +13 -9
- package/dist/carousel-progress-slider.js +13 -9
- package/dist/carousel-scrolling-feature-showcase.cjs +105 -54
- package/dist/carousel-scrolling-feature-showcase.js +105 -54
- package/dist/feature-accordion-image.cjs +9 -8
- package/dist/feature-accordion-image.js +9 -8
- package/dist/feature-animated-carousel.cjs +65 -49
- package/dist/feature-animated-carousel.js +65 -49
- package/dist/feature-badge-grid-six.cjs +20 -17
- package/dist/feature-badge-grid-six.js +21 -18
- package/dist/feature-bento-image-grid.cjs +12 -8
- package/dist/feature-bento-image-grid.js +12 -8
- package/dist/feature-bento-utilities.cjs +9 -5
- package/dist/feature-bento-utilities.js +9 -5
- package/dist/feature-capabilities-grid.cjs +41 -38
- package/dist/feature-capabilities-grid.js +41 -38
- package/dist/feature-card-grid-linked.cjs +18 -18
- package/dist/feature-card-grid-linked.js +19 -19
- package/dist/feature-carousel-progress.cjs +3 -3
- package/dist/feature-carousel-progress.js +4 -4
- package/dist/feature-category-image-cards.cjs +3 -3
- package/dist/feature-category-image-cards.js +4 -4
- package/dist/feature-checklist-image.cjs +2 -2
- package/dist/feature-checklist-image.js +2 -2
- package/dist/feature-checklist-three-column.cjs +6 -6
- package/dist/feature-checklist-three-column.js +7 -7
- package/dist/feature-icon-grid-accent.cjs +2 -2
- package/dist/feature-icon-grid-accent.js +2 -2
- package/dist/feature-icon-grid-bordered.cjs +29 -31
- package/dist/feature-icon-grid-bordered.d.cts +9 -9
- package/dist/feature-icon-grid-bordered.d.ts +9 -9
- package/dist/feature-icon-grid-bordered.js +30 -32
- package/dist/feature-icon-grid-muted.cjs +6 -6
- package/dist/feature-icon-grid-muted.d.cts +9 -9
- package/dist/feature-icon-grid-muted.d.ts +9 -9
- package/dist/feature-icon-grid-muted.js +7 -7
- package/dist/feature-icon-tabs-content.cjs +8 -8
- package/dist/feature-icon-tabs-content.d.cts +13 -13
- package/dist/feature-icon-tabs-content.d.ts +13 -13
- package/dist/feature-icon-tabs-content.js +9 -9
- package/dist/feature-image-cards-three-column.cjs +26 -27
- package/dist/feature-image-cards-three-column.js +27 -28
- package/dist/feature-image-overlay-badge.cjs +23 -21
- package/dist/feature-image-overlay-badge.js +24 -22
- package/dist/feature-integration-cards.cjs +19 -18
- package/dist/feature-integration-cards.js +20 -19
- package/dist/feature-numbered-cards.cjs +2 -2
- package/dist/feature-numbered-cards.js +3 -3
- package/dist/feature-pattern-grid-links.cjs +26 -29
- package/dist/feature-pattern-grid-links.d.cts +1 -5
- package/dist/feature-pattern-grid-links.d.ts +1 -5
- package/dist/feature-pattern-grid-links.js +27 -30
- package/dist/feature-showcase.cjs +441 -40
- package/dist/feature-showcase.d.cts +62 -5
- package/dist/feature-showcase.d.ts +62 -5
- package/dist/feature-showcase.js +438 -37
- package/dist/feature-split-image-reverse.cjs +15 -36
- package/dist/feature-split-image-reverse.js +16 -37
- package/dist/feature-split-image.cjs +15 -36
- package/dist/feature-split-image.js +16 -37
- package/dist/feature-stats-highlight.cjs +20 -32
- package/dist/feature-stats-highlight.js +21 -33
- package/dist/feature-tabbed-content-image.cjs +11 -6
- package/dist/feature-tabbed-content-image.js +11 -6
- package/dist/feature-three-column-values.cjs +6 -6
- package/dist/feature-three-column-values.js +6 -6
- package/dist/feature-utility-cards-grid.cjs +17 -15
- package/dist/feature-utility-cards-grid.js +18 -16
- package/dist/navbar-tabbed-sections.cjs +23 -16
- package/dist/navbar-tabbed-sections.js +23 -16
- package/dist/registry.cjs +941 -708
- package/dist/registry.js +943 -710
- package/package.json +1 -1
|
@@ -401,8 +401,8 @@ function CarouselScrollingFeatureShowcase({
|
|
|
401
401
|
featuresClassName,
|
|
402
402
|
numberBadgeClassName,
|
|
403
403
|
optixFlowConfig,
|
|
404
|
-
background
|
|
405
|
-
spacing = "
|
|
404
|
+
background,
|
|
405
|
+
spacing = "md",
|
|
406
406
|
pattern,
|
|
407
407
|
patternOpacity
|
|
408
408
|
}) {
|
|
@@ -452,62 +452,113 @@ function CarouselScrollingFeatureShowcase({
|
|
|
452
452
|
patternOpacity,
|
|
453
453
|
children: /* @__PURE__ */ jsxs("div", { className: cn("container mx-auto px-4", containerClassName), children: [
|
|
454
454
|
/* @__PURE__ */ jsxs("div", { className: cn("mb-12 text-center", headerClassName), children: [
|
|
455
|
-
heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
|
|
456
|
-
|
|
457
|
-
] }),
|
|
458
|
-
/* @__PURE__ */ jsxs("div", { className: cn("grid gap-8 lg:grid-cols-2 lg:gap-12", contentClassName), children: [
|
|
459
|
-
/* @__PURE__ */ jsx("div", { className: "hidden lg:block", children: /* @__PURE__ */ jsx("div", { className: "sticky top-24", children: /* @__PURE__ */ jsx("div", { className: cn("aspect-video overflow-hidden rounded-xl bg-muted", imageClassName), children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: activeFeatureData && /* @__PURE__ */ jsx(
|
|
460
|
-
motion.div,
|
|
455
|
+
heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
|
|
456
|
+
"h2",
|
|
461
457
|
{
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
alt: typeof activeFeatureData.title === "string" ? activeFeatureData.title : `Feature ${activeFeatureData.id}`,
|
|
472
|
-
className: cn("h-full w-full object-cover", activeFeatureData.imageClassName),
|
|
473
|
-
optixFlowConfig
|
|
474
|
-
}
|
|
475
|
-
)
|
|
476
|
-
},
|
|
477
|
-
activeFeatureData.id
|
|
478
|
-
) }) }) }) }),
|
|
479
|
-
/* @__PURE__ */ jsx("div", { className: cn("space-y-24 lg:space-y-32", featuresClassName), children: featuresSlot ? featuresSlot : features?.map((feature, index) => /* @__PURE__ */ jsxs(
|
|
480
|
-
"div",
|
|
458
|
+
className: cn(
|
|
459
|
+
"text-3xl font-bold tracking-tight md:text-4xl",
|
|
460
|
+
headingClassName
|
|
461
|
+
),
|
|
462
|
+
children: heading
|
|
463
|
+
}
|
|
464
|
+
) : /* @__PURE__ */ jsx("div", { className: headingClassName, children: heading })),
|
|
465
|
+
subheading && (typeof subheading === "string" ? /* @__PURE__ */ jsx(
|
|
466
|
+
"p",
|
|
481
467
|
{
|
|
482
|
-
ref: setFeatureRef(feature.id),
|
|
483
|
-
"data-feature-id": feature.id,
|
|
484
468
|
className: cn(
|
|
485
|
-
"
|
|
486
|
-
|
|
487
|
-
feature.className
|
|
469
|
+
"mt-4 text-lg text-muted-foreground",
|
|
470
|
+
subheadingClassName
|
|
488
471
|
),
|
|
489
|
-
children:
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
472
|
+
children: subheading
|
|
473
|
+
}
|
|
474
|
+
) : /* @__PURE__ */ jsx("div", { className: cn("mt-4", subheadingClassName), children: subheading }))
|
|
475
|
+
] }),
|
|
476
|
+
/* @__PURE__ */ jsxs(
|
|
477
|
+
"div",
|
|
478
|
+
{
|
|
479
|
+
className: cn(
|
|
480
|
+
"grid gap-8 lg:grid-cols-2 lg:gap-12",
|
|
481
|
+
contentClassName
|
|
482
|
+
),
|
|
483
|
+
children: [
|
|
484
|
+
/* @__PURE__ */ jsx("div", { className: "hidden lg:block", children: /* @__PURE__ */ jsx("div", { className: "sticky top-24", children: /* @__PURE__ */ jsx(
|
|
485
|
+
"div",
|
|
486
|
+
{
|
|
487
|
+
className: cn(
|
|
488
|
+
"aspect-video overflow-hidden rounded-xl bg-muted",
|
|
489
|
+
imageClassName
|
|
490
|
+
),
|
|
491
|
+
children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: activeFeatureData && /* @__PURE__ */ jsx(
|
|
492
|
+
motion.div,
|
|
493
|
+
{
|
|
494
|
+
initial: { opacity: 0 },
|
|
495
|
+
animate: { opacity: 1 },
|
|
496
|
+
exit: { opacity: 0 },
|
|
497
|
+
transition: { duration: 0.3 },
|
|
498
|
+
className: "h-full w-full",
|
|
499
|
+
children: /* @__PURE__ */ jsx(
|
|
500
|
+
Img,
|
|
501
|
+
{
|
|
502
|
+
src: activeFeatureData.image,
|
|
503
|
+
alt: typeof activeFeatureData.title === "string" ? activeFeatureData.title : `Feature ${activeFeatureData.id}`,
|
|
504
|
+
className: cn(
|
|
505
|
+
"h-full w-full object-cover",
|
|
506
|
+
activeFeatureData.imageClassName
|
|
507
|
+
),
|
|
508
|
+
optixFlowConfig
|
|
509
|
+
}
|
|
510
|
+
)
|
|
511
|
+
},
|
|
512
|
+
activeFeatureData.id
|
|
513
|
+
) })
|
|
514
|
+
}
|
|
515
|
+
) }) }),
|
|
516
|
+
/* @__PURE__ */ jsx("div", { className: cn("space-y-24 lg:space-y-32", featuresClassName), children: featuresSlot ? featuresSlot : features?.map((feature, index) => /* @__PURE__ */ jsxs(
|
|
517
|
+
"div",
|
|
518
|
+
{
|
|
519
|
+
ref: setFeatureRef(feature.id),
|
|
520
|
+
"data-feature-id": feature.id,
|
|
521
|
+
className: cn(
|
|
522
|
+
"scroll-mt-24 transition-opacity duration-300",
|
|
523
|
+
activeFeature === feature.id ? "opacity-100" : "opacity-50",
|
|
524
|
+
feature.className
|
|
525
|
+
),
|
|
526
|
+
children: [
|
|
527
|
+
/* @__PURE__ */ jsx("div", { className: "mb-6 lg:hidden", children: /* @__PURE__ */ jsx("div", { className: "aspect-video overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx(
|
|
528
|
+
Img,
|
|
529
|
+
{
|
|
530
|
+
src: feature.image,
|
|
531
|
+
alt: typeof feature.title === "string" ? feature.title : `Feature ${feature.id}`,
|
|
532
|
+
className: cn(
|
|
533
|
+
"h-full w-full object-cover",
|
|
534
|
+
feature.imageClassName
|
|
535
|
+
),
|
|
536
|
+
optixFlowConfig
|
|
537
|
+
}
|
|
538
|
+
) }) }),
|
|
539
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-4", children: [
|
|
540
|
+
/* @__PURE__ */ jsx(
|
|
541
|
+
"div",
|
|
542
|
+
{
|
|
543
|
+
className: cn(
|
|
544
|
+
"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-primary text-primary-foreground",
|
|
545
|
+
numberBadgeClassName
|
|
546
|
+
),
|
|
547
|
+
children: index + 1
|
|
548
|
+
}
|
|
549
|
+
),
|
|
550
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
551
|
+
feature.title && (typeof feature.title === "string" ? /* @__PURE__ */ jsx("h3", { className: "text-2xl font-semibold", children: feature.title }) : /* @__PURE__ */ jsx("div", { children: feature.title })),
|
|
552
|
+
feature.description && (typeof feature.description === "string" ? /* @__PURE__ */ jsx("p", { className: "mt-4 text-lg text-muted-foreground", children: feature.description }) : /* @__PURE__ */ jsx("div", { className: "mt-4", children: feature.description }))
|
|
553
|
+
] })
|
|
554
|
+
] })
|
|
555
|
+
]
|
|
556
|
+
},
|
|
557
|
+
feature.id
|
|
558
|
+
)) })
|
|
559
|
+
]
|
|
560
|
+
}
|
|
561
|
+
)
|
|
511
562
|
] })
|
|
512
563
|
}
|
|
513
564
|
);
|
|
@@ -572,7 +572,7 @@ function FeatureAccordionImage({
|
|
|
572
572
|
description,
|
|
573
573
|
items,
|
|
574
574
|
itemsSlot,
|
|
575
|
-
defaultValue
|
|
575
|
+
defaultValue,
|
|
576
576
|
className,
|
|
577
577
|
containerClassName,
|
|
578
578
|
headerClassName,
|
|
@@ -589,24 +589,25 @@ function FeatureAccordionImage({
|
|
|
589
589
|
patternOpacity,
|
|
590
590
|
patternClassName
|
|
591
591
|
}) {
|
|
592
|
-
const [activeItem, setActiveItem] = React__namespace.useState(defaultValue);
|
|
592
|
+
const [activeItem, setActiveItem] = React__namespace.useState(defaultValue || "item-0");
|
|
593
593
|
const activeIndex = parseInt(activeItem.replace("item-", ""), 10) || 0;
|
|
594
594
|
const currentImage = items?.[activeIndex] || items?.[0];
|
|
595
595
|
const accordionItemsContent = React.useMemo(() => {
|
|
596
596
|
if (itemsSlot) return itemsSlot;
|
|
597
597
|
if (!items || items.length === 0) return null;
|
|
598
598
|
return items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(AccordionItem, { value: `item-${index}`, className: item.className, children: [
|
|
599
|
-
/* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: cn("text-left text-lg font-medium", item.triggerClassName), children: item.title }),
|
|
600
|
-
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: cn("text-muted-foreground", item.contentClassName), children: item.content })
|
|
599
|
+
item.title && /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: cn("text-left text-lg font-medium", item.triggerClassName), children: item.title }),
|
|
600
|
+
item.content && /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: cn("text-muted-foreground", item.contentClassName), children: item.content })
|
|
601
601
|
] }, index));
|
|
602
602
|
}, [itemsSlot, items]);
|
|
603
603
|
const imageContent = React.useMemo(() => {
|
|
604
604
|
if (currentImage?.imageSlot) return currentImage.imageSlot;
|
|
605
|
+
if (!currentImage?.imageSrc) return null;
|
|
605
606
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
606
607
|
img.Img,
|
|
607
608
|
{
|
|
608
|
-
src: currentImage
|
|
609
|
-
alt: currentImage
|
|
609
|
+
src: currentImage.imageSrc,
|
|
610
|
+
alt: currentImage.imageAlt || "",
|
|
610
611
|
className: cn("h-full w-full object-cover transition-opacity duration-300", imageClassName),
|
|
611
612
|
loading: "lazy",
|
|
612
613
|
optixFlowConfig
|
|
@@ -624,11 +625,11 @@ function FeatureAccordionImage({
|
|
|
624
625
|
className,
|
|
625
626
|
containerClassName,
|
|
626
627
|
children: [
|
|
627
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mb-12 text-center", headerClassName), children: [
|
|
628
|
+
(title || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mb-12 text-center", headerClassName), children: [
|
|
628
629
|
title && (typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: cn("text-3xl font-semibold md:text-4xl lg:text-5xl", titleClassName), children: title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("text-3xl font-semibold md:text-4xl lg:text-5xl", titleClassName), children: title })),
|
|
629
630
|
description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("mt-4 text-muted-foreground lg:text-lg", descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-4 text-muted-foreground lg:text-lg", descriptionClassName), children: description }))
|
|
630
631
|
] }),
|
|
631
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("grid gap-10 lg:grid-cols-2 lg:gap-16", gridClassName), children: [
|
|
632
|
+
(itemsSlot || items && items.length > 0) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("grid gap-10 lg:grid-cols-2 lg:gap-16", gridClassName), children: [
|
|
632
633
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
633
634
|
Accordion,
|
|
634
635
|
{
|
|
@@ -550,7 +550,7 @@ function FeatureAccordionImage({
|
|
|
550
550
|
description,
|
|
551
551
|
items,
|
|
552
552
|
itemsSlot,
|
|
553
|
-
defaultValue
|
|
553
|
+
defaultValue,
|
|
554
554
|
className,
|
|
555
555
|
containerClassName,
|
|
556
556
|
headerClassName,
|
|
@@ -567,24 +567,25 @@ function FeatureAccordionImage({
|
|
|
567
567
|
patternOpacity,
|
|
568
568
|
patternClassName
|
|
569
569
|
}) {
|
|
570
|
-
const [activeItem, setActiveItem] = React.useState(defaultValue);
|
|
570
|
+
const [activeItem, setActiveItem] = React.useState(defaultValue || "item-0");
|
|
571
571
|
const activeIndex = parseInt(activeItem.replace("item-", ""), 10) || 0;
|
|
572
572
|
const currentImage = items?.[activeIndex] || items?.[0];
|
|
573
573
|
const accordionItemsContent = useMemo(() => {
|
|
574
574
|
if (itemsSlot) return itemsSlot;
|
|
575
575
|
if (!items || items.length === 0) return null;
|
|
576
576
|
return items.map((item, index) => /* @__PURE__ */ jsxs(AccordionItem, { value: `item-${index}`, className: item.className, children: [
|
|
577
|
-
/* @__PURE__ */ jsx(AccordionTrigger, { className: cn("text-left text-lg font-medium", item.triggerClassName), children: item.title }),
|
|
578
|
-
/* @__PURE__ */ jsx(AccordionContent, { className: cn("text-muted-foreground", item.contentClassName), children: item.content })
|
|
577
|
+
item.title && /* @__PURE__ */ jsx(AccordionTrigger, { className: cn("text-left text-lg font-medium", item.triggerClassName), children: item.title }),
|
|
578
|
+
item.content && /* @__PURE__ */ jsx(AccordionContent, { className: cn("text-muted-foreground", item.contentClassName), children: item.content })
|
|
579
579
|
] }, index));
|
|
580
580
|
}, [itemsSlot, items]);
|
|
581
581
|
const imageContent = useMemo(() => {
|
|
582
582
|
if (currentImage?.imageSlot) return currentImage.imageSlot;
|
|
583
|
+
if (!currentImage?.imageSrc) return null;
|
|
583
584
|
return /* @__PURE__ */ jsx(
|
|
584
585
|
Img,
|
|
585
586
|
{
|
|
586
|
-
src: currentImage
|
|
587
|
-
alt: currentImage
|
|
587
|
+
src: currentImage.imageSrc,
|
|
588
|
+
alt: currentImage.imageAlt || "",
|
|
588
589
|
className: cn("h-full w-full object-cover transition-opacity duration-300", imageClassName),
|
|
589
590
|
loading: "lazy",
|
|
590
591
|
optixFlowConfig
|
|
@@ -602,11 +603,11 @@ function FeatureAccordionImage({
|
|
|
602
603
|
className,
|
|
603
604
|
containerClassName,
|
|
604
605
|
children: [
|
|
605
|
-
/* @__PURE__ */ jsxs("div", { className: cn("mb-12 text-center", headerClassName), children: [
|
|
606
|
+
(title || description) && /* @__PURE__ */ jsxs("div", { className: cn("mb-12 text-center", headerClassName), children: [
|
|
606
607
|
title && (typeof title === "string" ? /* @__PURE__ */ jsx("h2", { className: cn("text-3xl font-semibold md:text-4xl lg:text-5xl", titleClassName), children: title }) : /* @__PURE__ */ jsx("div", { className: cn("text-3xl font-semibold md:text-4xl lg:text-5xl", titleClassName), children: title })),
|
|
607
608
|
description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("mt-4 text-muted-foreground lg:text-lg", descriptionClassName), children: description }) : /* @__PURE__ */ jsx("div", { className: cn("mt-4 text-muted-foreground lg:text-lg", descriptionClassName), children: description }))
|
|
608
609
|
] }),
|
|
609
|
-
/* @__PURE__ */ jsxs("div", { className: cn("grid gap-10 lg:grid-cols-2 lg:gap-16", gridClassName), children: [
|
|
610
|
+
(itemsSlot || items && items.length > 0) && /* @__PURE__ */ jsxs("div", { className: cn("grid gap-10 lg:grid-cols-2 lg:gap-16", gridClassName), children: [
|
|
610
611
|
/* @__PURE__ */ jsx(
|
|
611
612
|
Accordion,
|
|
612
613
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var React4 = require('react');
|
|
5
5
|
var framerMotion = require('framer-motion');
|
|
6
6
|
var clsx = require('clsx');
|
|
7
7
|
var tailwindMerge = require('tailwind-merge');
|
|
@@ -26,7 +26,7 @@ function _interopNamespace(e) {
|
|
|
26
26
|
return Object.freeze(n);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var React4__namespace = /*#__PURE__*/_interopNamespace(React4);
|
|
30
30
|
|
|
31
31
|
// components/blocks/features/feature-animated-carousel.tsx
|
|
32
32
|
function cn(...inputs) {
|
|
@@ -40,10 +40,10 @@ function DynamicIcon({
|
|
|
40
40
|
className,
|
|
41
41
|
alt
|
|
42
42
|
}) {
|
|
43
|
-
const [svgContent, setSvgContent] =
|
|
44
|
-
const [isLoading, setIsLoading] =
|
|
45
|
-
const [error, setError] =
|
|
46
|
-
const { url, iconName } =
|
|
43
|
+
const [svgContent, setSvgContent] = React4__namespace.useState(null);
|
|
44
|
+
const [isLoading, setIsLoading] = React4__namespace.useState(true);
|
|
45
|
+
const [error, setError] = React4__namespace.useState(null);
|
|
46
|
+
const { url, iconName } = React4__namespace.useMemo(() => {
|
|
47
47
|
const separator = name.includes("/") ? "/" : ":";
|
|
48
48
|
const [prefix, iconName2] = name.split(separator);
|
|
49
49
|
const baseUrl = `https://icons.opensite.ai/api/icon/${prefix}/${iconName2}?format=svg&width=${size}&height=${size}`;
|
|
@@ -52,7 +52,7 @@ function DynamicIcon({
|
|
|
52
52
|
iconName: iconName2
|
|
53
53
|
};
|
|
54
54
|
}, [name, size]);
|
|
55
|
-
|
|
55
|
+
React4__namespace.useEffect(() => {
|
|
56
56
|
let isMounted = true;
|
|
57
57
|
const fetchSvg = async () => {
|
|
58
58
|
const cached = svgCache.get(url);
|
|
@@ -146,7 +146,7 @@ var maxWidthStyles = {
|
|
|
146
146
|
"4xl": "max-w-[1536px]",
|
|
147
147
|
full: "max-w-full"
|
|
148
148
|
};
|
|
149
|
-
var Container =
|
|
149
|
+
var Container = React4__namespace.default.forwardRef(
|
|
150
150
|
({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
|
|
151
151
|
const Component = as;
|
|
152
152
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -451,7 +451,7 @@ var spacingStyles = {
|
|
|
451
451
|
};
|
|
452
452
|
var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
|
|
453
453
|
var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
|
|
454
|
-
var Section =
|
|
454
|
+
var Section = React4__namespace.default.forwardRef(
|
|
455
455
|
({
|
|
456
456
|
id,
|
|
457
457
|
title,
|
|
@@ -512,7 +512,7 @@ var Section = React__namespace.default.forwardRef(
|
|
|
512
512
|
}
|
|
513
513
|
);
|
|
514
514
|
Section.displayName = "Section";
|
|
515
|
-
var Controls = ({
|
|
515
|
+
var Controls = React4__namespace.memo(({
|
|
516
516
|
handleNext,
|
|
517
517
|
handlePrevious,
|
|
518
518
|
isPreviousDisabled,
|
|
@@ -540,9 +540,9 @@ var Controls = ({
|
|
|
540
540
|
}
|
|
541
541
|
)
|
|
542
542
|
] });
|
|
543
|
-
};
|
|
544
|
-
var FeatureCard = ({ feature, isActive, onClick }) => {
|
|
545
|
-
const variants = {
|
|
543
|
+
});
|
|
544
|
+
var FeatureCard = React4__namespace.memo(({ feature, isActive, onClick }) => {
|
|
545
|
+
const variants = React4.useMemo(() => ({
|
|
546
546
|
initial: {
|
|
547
547
|
opacity: 0
|
|
548
548
|
},
|
|
@@ -552,7 +552,7 @@ var FeatureCard = ({ feature, isActive, onClick }) => {
|
|
|
552
552
|
exit: {
|
|
553
553
|
opacity: 0
|
|
554
554
|
}
|
|
555
|
-
};
|
|
555
|
+
}), []);
|
|
556
556
|
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "popLayout", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
557
557
|
framerMotion.motion.div,
|
|
558
558
|
{
|
|
@@ -582,13 +582,13 @@ var FeatureCard = ({ feature, isActive, onClick }) => {
|
|
|
582
582
|
ease: "easeOut"
|
|
583
583
|
},
|
|
584
584
|
className: "p-6 text-sm md:p-8 md:text-base",
|
|
585
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
|
|
586
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-semibold", children: [
|
|
585
|
+
children: (feature.title || feature.description) && /* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
|
|
586
|
+
feature.title && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-semibold", children: [
|
|
587
587
|
feature.title,
|
|
588
588
|
"."
|
|
589
589
|
] }),
|
|
590
|
-
" ",
|
|
591
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: feature.description })
|
|
590
|
+
feature.title && feature.description && " ",
|
|
591
|
+
feature.description && /* @__PURE__ */ jsxRuntime.jsx("span", { children: feature.description })
|
|
592
592
|
] })
|
|
593
593
|
},
|
|
594
594
|
`feature-description-active-${feature.title}`
|
|
@@ -622,15 +622,15 @@ var FeatureCard = ({ feature, isActive, onClick }) => {
|
|
|
622
622
|
className: "shrink-0"
|
|
623
623
|
}
|
|
624
624
|
),
|
|
625
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "shrink-0 font-semibold", children: feature.title })
|
|
625
|
+
feature.title && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "shrink-0 font-semibold", children: feature.title })
|
|
626
626
|
]
|
|
627
627
|
},
|
|
628
628
|
`feature-description-inactive-${feature.title}`
|
|
629
629
|
)
|
|
630
630
|
}
|
|
631
631
|
) });
|
|
632
|
-
};
|
|
633
|
-
var FeaturesDesktop = ({
|
|
632
|
+
});
|
|
633
|
+
var FeaturesDesktop = React4__namespace.memo(({
|
|
634
634
|
features,
|
|
635
635
|
handleNext,
|
|
636
636
|
handlePrevious,
|
|
@@ -661,8 +661,8 @@ var FeaturesDesktop = ({
|
|
|
661
661
|
);
|
|
662
662
|
}) })
|
|
663
663
|
] });
|
|
664
|
-
};
|
|
665
|
-
var FeaturesMobile = ({
|
|
664
|
+
});
|
|
665
|
+
var FeaturesMobile = React4__namespace.memo(({
|
|
666
666
|
features,
|
|
667
667
|
handleNext,
|
|
668
668
|
handlePrevious,
|
|
@@ -671,7 +671,7 @@ var FeaturesMobile = ({
|
|
|
671
671
|
isPreviousDisabled,
|
|
672
672
|
isNextDisabled
|
|
673
673
|
}) => {
|
|
674
|
-
const variants = {
|
|
674
|
+
const variants = React4.useMemo(() => ({
|
|
675
675
|
enter: (direction2) => ({
|
|
676
676
|
x: direction2 > 0 ? 100 : -100,
|
|
677
677
|
opacity: 0
|
|
@@ -684,7 +684,8 @@ var FeaturesMobile = ({
|
|
|
684
684
|
x: direction2 < 0 ? 100 : -100,
|
|
685
685
|
opacity: 0
|
|
686
686
|
})
|
|
687
|
-
};
|
|
687
|
+
}), []);
|
|
688
|
+
const currentFeature = features[activeIndex];
|
|
688
689
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative z-10 flex flex-col items-center gap-6 md:hidden", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-center justify-between gap-4", children: [
|
|
689
690
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
690
691
|
"button",
|
|
@@ -709,13 +710,13 @@ var FeaturesMobile = ({
|
|
|
709
710
|
opacity: { duration: 0.2 }
|
|
710
711
|
},
|
|
711
712
|
className: "absolute inset-0 flex items-center justify-center rounded-3xl bg-background p-4",
|
|
712
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-center text-sm", children: [
|
|
713
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-semibold", children: [
|
|
714
|
-
|
|
713
|
+
children: (currentFeature?.title || currentFeature?.description) && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-center text-sm", children: [
|
|
714
|
+
currentFeature.title && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-semibold", children: [
|
|
715
|
+
currentFeature.title,
|
|
715
716
|
"."
|
|
716
717
|
] }),
|
|
717
|
-
" ",
|
|
718
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children:
|
|
718
|
+
currentFeature.title && currentFeature.description && " ",
|
|
719
|
+
currentFeature.description && /* @__PURE__ */ jsxRuntime.jsx("span", { children: currentFeature.description })
|
|
719
720
|
] })
|
|
720
721
|
},
|
|
721
722
|
activeIndex
|
|
@@ -731,9 +732,9 @@ var FeaturesMobile = ({
|
|
|
731
732
|
}
|
|
732
733
|
)
|
|
733
734
|
] }) });
|
|
734
|
-
};
|
|
735
|
+
});
|
|
735
736
|
function FeatureAnimatedCarousel({
|
|
736
|
-
features
|
|
737
|
+
features,
|
|
737
738
|
className,
|
|
738
739
|
optixFlowConfig,
|
|
739
740
|
background,
|
|
@@ -742,27 +743,27 @@ function FeatureAnimatedCarousel({
|
|
|
742
743
|
patternOpacity,
|
|
743
744
|
patternClassName
|
|
744
745
|
}) {
|
|
745
|
-
const [activeIndex, setActiveIndex] =
|
|
746
|
-
const [direction, setDirection] =
|
|
747
|
-
const handleNext = () => {
|
|
748
|
-
if (activeIndex < features.length - 1) {
|
|
746
|
+
const [activeIndex, setActiveIndex] = React4__namespace.useState(0);
|
|
747
|
+
const [direction, setDirection] = React4__namespace.useState(1);
|
|
748
|
+
const handleNext = React4.useCallback(() => {
|
|
749
|
+
if (features && activeIndex < features.length - 1) {
|
|
749
750
|
setDirection(1);
|
|
750
751
|
setActiveIndex(activeIndex + 1);
|
|
751
752
|
}
|
|
752
|
-
};
|
|
753
|
-
const handlePrevious = () => {
|
|
753
|
+
}, [activeIndex, features]);
|
|
754
|
+
const handlePrevious = React4.useCallback(() => {
|
|
754
755
|
if (activeIndex > 0) {
|
|
755
756
|
setDirection(-1);
|
|
756
757
|
setActiveIndex(activeIndex - 1);
|
|
757
758
|
}
|
|
758
|
-
};
|
|
759
|
-
const handleFeatureClick = (index) => {
|
|
759
|
+
}, [activeIndex]);
|
|
760
|
+
const handleFeatureClick = React4.useCallback((index) => {
|
|
760
761
|
setDirection(index > activeIndex ? 1 : -1);
|
|
761
762
|
setActiveIndex(index);
|
|
762
|
-
};
|
|
763
|
+
}, [activeIndex]);
|
|
763
764
|
const isPreviousDisabled = activeIndex === 0;
|
|
764
|
-
const isNextDisabled = activeIndex === features.length - 1;
|
|
765
|
-
const imageVariants = {
|
|
765
|
+
const isNextDisabled = !features || activeIndex === features.length - 1;
|
|
766
|
+
const imageVariants = React4.useMemo(() => ({
|
|
766
767
|
enter: (direction2) => ({
|
|
767
768
|
x: direction2 > 0 ? 300 : -300,
|
|
768
769
|
opacity: 0
|
|
@@ -775,7 +776,22 @@ function FeatureAnimatedCarousel({
|
|
|
775
776
|
x: direction2 < 0 ? 300 : -300,
|
|
776
777
|
opacity: 0
|
|
777
778
|
})
|
|
778
|
-
};
|
|
779
|
+
}), []);
|
|
780
|
+
if (!features || features.length === 0) {
|
|
781
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
782
|
+
Section,
|
|
783
|
+
{
|
|
784
|
+
background,
|
|
785
|
+
spacing,
|
|
786
|
+
pattern,
|
|
787
|
+
patternOpacity,
|
|
788
|
+
patternClassName,
|
|
789
|
+
className,
|
|
790
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex min-h-[500px] flex-col-reverse gap-8 overflow-hidden rounded-3xl bg-muted p-6 md:flex-row md:items-center md:p-12 lg:min-h-[600px]" })
|
|
791
|
+
}
|
|
792
|
+
);
|
|
793
|
+
}
|
|
794
|
+
const currentFeature = features[activeIndex];
|
|
779
795
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
780
796
|
Section,
|
|
781
797
|
{
|
|
@@ -786,7 +802,7 @@ function FeatureAnimatedCarousel({
|
|
|
786
802
|
patternClassName,
|
|
787
803
|
className,
|
|
788
804
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex min-h-[500px] flex-col-reverse gap-8 overflow-hidden rounded-3xl bg-muted p-6 md:flex-row md:items-center md:p-12 lg:min-h-[600px]", children: [
|
|
789
|
-
|
|
805
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
790
806
|
FeaturesDesktop,
|
|
791
807
|
{
|
|
792
808
|
features,
|
|
@@ -798,7 +814,7 @@ function FeatureAnimatedCarousel({
|
|
|
798
814
|
isNextDisabled
|
|
799
815
|
}
|
|
800
816
|
),
|
|
801
|
-
|
|
817
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
802
818
|
FeaturesMobile,
|
|
803
819
|
{
|
|
804
820
|
features,
|
|
@@ -810,7 +826,7 @@ function FeatureAnimatedCarousel({
|
|
|
810
826
|
isNextDisabled
|
|
811
827
|
}
|
|
812
828
|
),
|
|
813
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex-1 overflow-hidden rounded-2xl md:absolute md:right-8 md:top-8 md:bottom-8 md:w-1/2", children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", custom: direction, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
829
|
+
currentFeature?.image && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex-1 overflow-hidden rounded-2xl md:absolute md:right-8 md:top-8 md:bottom-8 md:w-1/2", children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", custom: direction, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
814
830
|
framerMotion.motion.div,
|
|
815
831
|
{
|
|
816
832
|
custom: direction,
|
|
@@ -826,8 +842,8 @@ function FeatureAnimatedCarousel({
|
|
|
826
842
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
827
843
|
img.Img,
|
|
828
844
|
{
|
|
829
|
-
src:
|
|
830
|
-
alt:
|
|
845
|
+
src: currentFeature.image,
|
|
846
|
+
alt: currentFeature.imageAlt || (typeof currentFeature.title === "string" ? currentFeature.title : "Feature image"),
|
|
831
847
|
className: "h-full w-full object-cover",
|
|
832
848
|
optixFlowConfig
|
|
833
849
|
}
|