@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as React6 from 'react';
|
|
3
|
+
import React6__default from 'react';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { cva } from 'class-variance-authority';
|
|
@@ -96,7 +96,7 @@ function useNavigation({
|
|
|
96
96
|
href,
|
|
97
97
|
onClick
|
|
98
98
|
} = {}) {
|
|
99
|
-
const linkType =
|
|
99
|
+
const linkType = React6.useMemo(() => {
|
|
100
100
|
if (!href || href.trim() === "") {
|
|
101
101
|
return onClick ? "none" : "none";
|
|
102
102
|
}
|
|
@@ -117,7 +117,7 @@ function useNavigation({
|
|
|
117
117
|
return "internal";
|
|
118
118
|
}
|
|
119
119
|
}, [href, onClick]);
|
|
120
|
-
const normalizedHref =
|
|
120
|
+
const normalizedHref = React6.useMemo(() => {
|
|
121
121
|
if (!href || href.trim() === "") {
|
|
122
122
|
return void 0;
|
|
123
123
|
}
|
|
@@ -135,7 +135,7 @@ function useNavigation({
|
|
|
135
135
|
return trimmed;
|
|
136
136
|
}
|
|
137
137
|
}, [href, linkType]);
|
|
138
|
-
const target =
|
|
138
|
+
const target = React6.useMemo(() => {
|
|
139
139
|
switch (linkType) {
|
|
140
140
|
case "external":
|
|
141
141
|
return "_blank";
|
|
@@ -148,7 +148,7 @@ function useNavigation({
|
|
|
148
148
|
return void 0;
|
|
149
149
|
}
|
|
150
150
|
}, [linkType]);
|
|
151
|
-
const rel =
|
|
151
|
+
const rel = React6.useMemo(() => {
|
|
152
152
|
if (linkType === "external") {
|
|
153
153
|
return "noopener noreferrer";
|
|
154
154
|
}
|
|
@@ -157,7 +157,7 @@ function useNavigation({
|
|
|
157
157
|
const isExternal = linkType === "external";
|
|
158
158
|
const isInternal = linkType === "internal";
|
|
159
159
|
const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
|
|
160
|
-
const handleClick =
|
|
160
|
+
const handleClick = React6.useCallback(
|
|
161
161
|
(event) => {
|
|
162
162
|
if (onClick) {
|
|
163
163
|
try {
|
|
@@ -341,7 +341,7 @@ var buttonVariants = cva(baseStyles, {
|
|
|
341
341
|
size: "default"
|
|
342
342
|
}
|
|
343
343
|
});
|
|
344
|
-
var Pressable =
|
|
344
|
+
var Pressable = React6.forwardRef(
|
|
345
345
|
({
|
|
346
346
|
children,
|
|
347
347
|
className,
|
|
@@ -447,10 +447,10 @@ function DynamicIcon({
|
|
|
447
447
|
className,
|
|
448
448
|
alt
|
|
449
449
|
}) {
|
|
450
|
-
const [svgContent, setSvgContent] =
|
|
451
|
-
const [isLoading, setIsLoading] =
|
|
452
|
-
const [error, setError] =
|
|
453
|
-
const { url, iconName } =
|
|
450
|
+
const [svgContent, setSvgContent] = React6.useState(null);
|
|
451
|
+
const [isLoading, setIsLoading] = React6.useState(true);
|
|
452
|
+
const [error, setError] = React6.useState(null);
|
|
453
|
+
const { url, iconName } = React6.useMemo(() => {
|
|
454
454
|
const separator = name.includes("/") ? "/" : ":";
|
|
455
455
|
const [prefix, iconName2] = name.split(separator);
|
|
456
456
|
const baseUrl = `https://icons.opensite.ai/api/icon/${prefix}/${iconName2}?format=svg&width=${size}&height=${size}`;
|
|
@@ -459,7 +459,7 @@ function DynamicIcon({
|
|
|
459
459
|
iconName: iconName2
|
|
460
460
|
};
|
|
461
461
|
}, [name, size]);
|
|
462
|
-
|
|
462
|
+
React6.useEffect(() => {
|
|
463
463
|
let isMounted = true;
|
|
464
464
|
const fetchSvg = async () => {
|
|
465
465
|
const cached = svgCache.get(url);
|
|
@@ -553,7 +553,7 @@ var maxWidthStyles = {
|
|
|
553
553
|
"4xl": "max-w-[1536px]",
|
|
554
554
|
full: "max-w-full"
|
|
555
555
|
};
|
|
556
|
-
var Container =
|
|
556
|
+
var Container = React6__default.forwardRef(
|
|
557
557
|
({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
|
|
558
558
|
const Component = as;
|
|
559
559
|
return /* @__PURE__ */ jsx(
|
|
@@ -858,7 +858,7 @@ var spacingStyles = {
|
|
|
858
858
|
};
|
|
859
859
|
var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
|
|
860
860
|
var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
|
|
861
|
-
var Section =
|
|
861
|
+
var Section = React6__default.forwardRef(
|
|
862
862
|
({
|
|
863
863
|
id,
|
|
864
864
|
title,
|
|
@@ -926,7 +926,7 @@ function CarouselPortfolioHero({
|
|
|
926
926
|
actionsSlot,
|
|
927
927
|
autoPlayInterval = 5e3,
|
|
928
928
|
className,
|
|
929
|
-
containerClassName,
|
|
929
|
+
containerClassName = "mx-auto w-full p-0 px-0 sm:px-0 lg:px-0 max-w-full relative z-10 h-full flex flex-col justify-center",
|
|
930
930
|
contentClassName,
|
|
931
931
|
tagClassName,
|
|
932
932
|
titleClassName,
|
|
@@ -941,24 +941,46 @@ function CarouselPortfolioHero({
|
|
|
941
941
|
patternOpacity,
|
|
942
942
|
slideMediaBrightness = "50"
|
|
943
943
|
}) {
|
|
944
|
-
const [currentIndex, setCurrentIndex] =
|
|
945
|
-
const
|
|
944
|
+
const [currentIndex, setCurrentIndex] = React6.useState(0);
|
|
945
|
+
const intervalRef = React6.useRef(null);
|
|
946
|
+
const resetInterval = React6.useCallback(() => {
|
|
947
|
+
if (intervalRef.current) {
|
|
948
|
+
clearInterval(intervalRef.current);
|
|
949
|
+
}
|
|
950
|
+
intervalRef.current = setInterval(() => {
|
|
951
|
+
setCurrentIndex((prevIndex) => (prevIndex + 1) % (slides?.length ?? 1));
|
|
952
|
+
}, autoPlayInterval);
|
|
953
|
+
}, [autoPlayInterval, slides?.length]);
|
|
954
|
+
const goToNext = React6.useCallback(() => {
|
|
946
955
|
setCurrentIndex((prevIndex) => (prevIndex + 1) % (slides?.length ?? 1));
|
|
947
|
-
|
|
948
|
-
|
|
956
|
+
resetInterval();
|
|
957
|
+
}, [slides?.length, resetInterval]);
|
|
958
|
+
const goToPrev = React6.useCallback(() => {
|
|
949
959
|
setCurrentIndex(
|
|
950
960
|
(prevIndex) => (prevIndex - 1 + (slides?.length ?? 1)) % (slides?.length ?? 1)
|
|
951
961
|
);
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
962
|
+
resetInterval();
|
|
963
|
+
}, [slides?.length, resetInterval]);
|
|
964
|
+
React6.useEffect(() => {
|
|
965
|
+
resetInterval();
|
|
966
|
+
return () => {
|
|
967
|
+
if (intervalRef.current) {
|
|
968
|
+
clearInterval(intervalRef.current);
|
|
969
|
+
}
|
|
970
|
+
};
|
|
971
|
+
}, [resetInterval]);
|
|
957
972
|
const renderActions = () => {
|
|
958
973
|
if (actionsSlot) return actionsSlot;
|
|
959
974
|
if (!actions || actions.length === 0) return null;
|
|
960
975
|
return actions.map((action, index) => {
|
|
961
|
-
const {
|
|
976
|
+
const {
|
|
977
|
+
label,
|
|
978
|
+
icon,
|
|
979
|
+
iconAfter,
|
|
980
|
+
children,
|
|
981
|
+
className: actionClassName,
|
|
982
|
+
...pressableProps
|
|
983
|
+
} = action;
|
|
962
984
|
return /* @__PURE__ */ jsx(
|
|
963
985
|
Pressable,
|
|
964
986
|
{
|
|
@@ -984,6 +1006,7 @@ function CarouselPortfolioHero({
|
|
|
984
1006
|
className: cn("relative h-screen w-full overflow-hidden", className),
|
|
985
1007
|
pattern,
|
|
986
1008
|
patternOpacity,
|
|
1009
|
+
containerClassName,
|
|
987
1010
|
children: [
|
|
988
1011
|
slidesSlot ? slidesSlot : slides?.map((slide, index) => /* @__PURE__ */ jsx(
|
|
989
1012
|
"div",
|
|
@@ -1009,43 +1032,99 @@ function CarouselPortfolioHero({
|
|
|
1009
1032
|
},
|
|
1010
1033
|
slide.id
|
|
1011
1034
|
)),
|
|
1012
|
-
/* @__PURE__ */ jsx(
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
/* @__PURE__ */ jsxs("div", { className: cn("
|
|
1019
|
-
/* @__PURE__ */ jsx(
|
|
1020
|
-
|
|
1035
|
+
/* @__PURE__ */ jsx(
|
|
1036
|
+
"div",
|
|
1037
|
+
{
|
|
1038
|
+
className: cn(
|
|
1039
|
+
"relative z-10 flex h-full w-full flex-col justify-end px-6 pb-16 text-white md:px-8 lg:px-12"
|
|
1040
|
+
),
|
|
1041
|
+
children: /* @__PURE__ */ jsx("div", { className: "relative", children: /* @__PURE__ */ jsxs("div", { className: cn("max-w-4xl", contentClassName), children: [
|
|
1042
|
+
currentSlide?.tag && /* @__PURE__ */ jsx("div", { className: "mb-4", children: typeof currentSlide.tag === "string" ? /* @__PURE__ */ jsx(
|
|
1043
|
+
"span",
|
|
1021
1044
|
{
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
children: /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/chevron-left", size: 20 })
|
|
1045
|
+
className: cn(
|
|
1046
|
+
"inline-block rounded-full bg-primary px-3 py-1 text-sm font-medium",
|
|
1047
|
+
tagClassName
|
|
1048
|
+
),
|
|
1049
|
+
children: currentSlide.tag
|
|
1028
1050
|
}
|
|
1029
|
-
),
|
|
1030
|
-
/* @__PURE__ */ jsx(
|
|
1031
|
-
|
|
1051
|
+
) : /* @__PURE__ */ jsx("div", { className: tagClassName, children: currentSlide.tag }) }),
|
|
1052
|
+
currentSlide?.title && (typeof currentSlide.title === "string" ? /* @__PURE__ */ jsx(
|
|
1053
|
+
"h1",
|
|
1032
1054
|
{
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
children: /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/chevron-right", size: 20 })
|
|
1055
|
+
className: cn(
|
|
1056
|
+
"text-4xl font-bold sm:text-5xl md:text-6xl text-balance text-shadow",
|
|
1057
|
+
titleClassName
|
|
1058
|
+
),
|
|
1059
|
+
children: currentSlide.title
|
|
1039
1060
|
}
|
|
1040
|
-
),
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1061
|
+
) : /* @__PURE__ */ jsx("div", { className: titleClassName, children: currentSlide.title })),
|
|
1062
|
+
currentSlide?.description && (typeof currentSlide.description === "string" ? /* @__PURE__ */ jsx(
|
|
1063
|
+
"p",
|
|
1064
|
+
{
|
|
1065
|
+
className: cn(
|
|
1066
|
+
"mt-4 text-lg text-white/80 sm:text-xl md:max-w-2xl text-balance text-shadow",
|
|
1067
|
+
descriptionClassName
|
|
1068
|
+
),
|
|
1069
|
+
children: currentSlide.description
|
|
1070
|
+
}
|
|
1071
|
+
) : /* @__PURE__ */ jsx("div", { className: descriptionClassName, children: currentSlide.description })),
|
|
1072
|
+
/* @__PURE__ */ jsxs(
|
|
1073
|
+
"div",
|
|
1074
|
+
{
|
|
1075
|
+
className: cn("mt-8 flex items-center gap-4", actionsClassName),
|
|
1076
|
+
children: [
|
|
1077
|
+
renderActions(),
|
|
1078
|
+
/* @__PURE__ */ jsxs(
|
|
1079
|
+
"div",
|
|
1080
|
+
{
|
|
1081
|
+
className: cn(
|
|
1082
|
+
"ml-auto flex items-center gap-2",
|
|
1083
|
+
navigationClassName
|
|
1084
|
+
),
|
|
1085
|
+
children: [
|
|
1086
|
+
/* @__PURE__ */ jsx(
|
|
1087
|
+
Pressable,
|
|
1088
|
+
{
|
|
1089
|
+
variant: "outline",
|
|
1090
|
+
size: "icon",
|
|
1091
|
+
className: "rounded-full border-white/40 bg-black/30 text-white hover:bg-black/50 hover:text-white",
|
|
1092
|
+
onClick: goToPrev,
|
|
1093
|
+
asButton: true,
|
|
1094
|
+
children: /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/chevron-left", size: 20 })
|
|
1095
|
+
}
|
|
1096
|
+
),
|
|
1097
|
+
/* @__PURE__ */ jsx(
|
|
1098
|
+
Pressable,
|
|
1099
|
+
{
|
|
1100
|
+
variant: "outline",
|
|
1101
|
+
size: "icon",
|
|
1102
|
+
className: "rounded-full border-white/40 bg-black/30 text-white hover:bg-black/50 hover:text-white",
|
|
1103
|
+
onClick: goToNext,
|
|
1104
|
+
asButton: true,
|
|
1105
|
+
children: /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/chevron-right", size: 20 })
|
|
1106
|
+
}
|
|
1107
|
+
),
|
|
1108
|
+
/* @__PURE__ */ jsxs(
|
|
1109
|
+
"div",
|
|
1110
|
+
{
|
|
1111
|
+
className: cn("ml-3 text-sm text-white/80", counterClassName),
|
|
1112
|
+
children: [
|
|
1113
|
+
currentIndex + 1,
|
|
1114
|
+
" / ",
|
|
1115
|
+
slides?.length ?? 0
|
|
1116
|
+
]
|
|
1117
|
+
}
|
|
1118
|
+
)
|
|
1119
|
+
]
|
|
1120
|
+
}
|
|
1121
|
+
)
|
|
1122
|
+
]
|
|
1123
|
+
}
|
|
1124
|
+
)
|
|
1125
|
+
] }) })
|
|
1126
|
+
}
|
|
1127
|
+
)
|
|
1049
1128
|
]
|
|
1050
1129
|
}
|
|
1051
1130
|
);
|
|
@@ -950,8 +950,8 @@ function CarouselProductFeatureShowcase({
|
|
|
950
950
|
actionsClassName,
|
|
951
951
|
indicatorsClassName,
|
|
952
952
|
optixFlowConfig,
|
|
953
|
-
background
|
|
954
|
-
spacing
|
|
953
|
+
background,
|
|
954
|
+
spacing,
|
|
955
955
|
pattern,
|
|
956
956
|
patternOpacity
|
|
957
957
|
}) {
|
|
@@ -995,7 +995,14 @@ function CarouselProductFeatureShowcase({
|
|
|
995
995
|
if (actionsSlot) return actionsSlot;
|
|
996
996
|
if (!actions || actions.length === 0) return null;
|
|
997
997
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-8 flex flex-wrap gap-3", children: actions.map((action, index) => {
|
|
998
|
-
const {
|
|
998
|
+
const {
|
|
999
|
+
label,
|
|
1000
|
+
icon,
|
|
1001
|
+
iconAfter,
|
|
1002
|
+
children,
|
|
1003
|
+
className: actionClassName,
|
|
1004
|
+
...pressableProps
|
|
1005
|
+
} = action;
|
|
999
1006
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1000
1007
|
Pressable,
|
|
1001
1008
|
{
|
|
@@ -1020,105 +1027,151 @@ function CarouselProductFeatureShowcase({
|
|
|
1020
1027
|
className: cn(className),
|
|
1021
1028
|
pattern,
|
|
1022
1029
|
patternOpacity,
|
|
1023
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("
|
|
1030
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", containerClassName), children: [
|
|
1024
1031
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mb-12 text-center", headerClassName), children: [
|
|
1025
|
-
heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
framerMotion.motion.div,
|
|
1032
|
-
{
|
|
1033
|
-
custom: direction,
|
|
1034
|
-
variants: slideVariants,
|
|
1035
|
-
initial: "enter",
|
|
1036
|
-
animate: "center",
|
|
1037
|
-
exit: "exit",
|
|
1038
|
-
transition: { duration: 0.3, ease: "easeInOut" },
|
|
1039
|
-
className: cn("absolute inset-0", activeFeature?.imageClassName),
|
|
1040
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1041
|
-
img.Img,
|
|
1042
|
-
{
|
|
1043
|
-
src: currentImage,
|
|
1044
|
-
alt: typeof activeFeature?.title === "string" ? activeFeature.title : `Feature ${activeIndex + 1}`,
|
|
1045
|
-
className: "h-full w-full object-cover",
|
|
1046
|
-
optixFlowConfig
|
|
1047
|
-
}
|
|
1048
|
-
)
|
|
1049
|
-
},
|
|
1050
|
-
`${activeIndex}-${activeColorIndex}`
|
|
1051
|
-
) }),
|
|
1052
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("absolute bottom-4 right-4 flex gap-2", navigationClassName), children: [
|
|
1053
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1054
|
-
Pressable,
|
|
1055
|
-
{
|
|
1056
|
-
onClick: goToPrev,
|
|
1057
|
-
asButton: true,
|
|
1058
|
-
variant: "outline",
|
|
1059
|
-
size: "icon",
|
|
1060
|
-
className: "flex h-10 w-10 items-center justify-center rounded-full border-border bg-background/90 text-foreground backdrop-blur-sm hover:bg-background",
|
|
1061
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/chevron-left", size: 20 })
|
|
1062
|
-
}
|
|
1032
|
+
heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1033
|
+
"h2",
|
|
1034
|
+
{
|
|
1035
|
+
className: cn(
|
|
1036
|
+
"text-3xl font-bold tracking-tight md:text-4xl lg:text-5xl",
|
|
1037
|
+
headingClassName
|
|
1063
1038
|
),
|
|
1064
|
-
|
|
1065
|
-
|
|
1039
|
+
children: heading
|
|
1040
|
+
}
|
|
1041
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: headingClassName, children: heading })),
|
|
1042
|
+
subheading && (typeof subheading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1043
|
+
"p",
|
|
1044
|
+
{
|
|
1045
|
+
className: cn(
|
|
1046
|
+
"mt-4 text-lg text-muted-foreground",
|
|
1047
|
+
subheadingClassName
|
|
1048
|
+
),
|
|
1049
|
+
children: subheading
|
|
1050
|
+
}
|
|
1051
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: subheadingClassName, children: subheading }))
|
|
1052
|
+
] }),
|
|
1053
|
+
featuresSlot ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: contentClassName, children: featuresSlot }) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1054
|
+
"div",
|
|
1055
|
+
{
|
|
1056
|
+
className: cn(
|
|
1057
|
+
"grid gap-8 lg:grid-cols-2 lg:gap-12",
|
|
1058
|
+
contentClassName
|
|
1059
|
+
),
|
|
1060
|
+
children: [
|
|
1061
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1062
|
+
"div",
|
|
1066
1063
|
{
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
)
|
|
1075
|
-
] })
|
|
1076
|
-
] }),
|
|
1077
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col justify-center", children: [
|
|
1078
|
-
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1079
|
-
framerMotion.motion.div,
|
|
1080
|
-
{
|
|
1081
|
-
initial: { opacity: 0, y: 20 },
|
|
1082
|
-
animate: { opacity: 1, y: 0 },
|
|
1083
|
-
exit: { opacity: 0, y: -20 },
|
|
1084
|
-
transition: { duration: 0.3 },
|
|
1085
|
-
children: [
|
|
1086
|
-
activeFeature?.title && (typeof activeFeature.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-2xl font-semibold md:text-3xl", children: activeFeature.title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { children: activeFeature.title })),
|
|
1087
|
-
activeFeature?.description && (typeof activeFeature.description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-4 text-lg text-muted-foreground", children: activeFeature.description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4", children: activeFeature.description })),
|
|
1088
|
-
activeFeature?.colors && activeFeature.colors.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mt-6", colorSelectorClassName), children: [
|
|
1089
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-3 text-sm font-medium", children: "Available Colors" }),
|
|
1090
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-3", children: activeFeature.colors.map((color, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1091
|
-
"button",
|
|
1064
|
+
className: cn(
|
|
1065
|
+
"relative aspect-square overflow-hidden rounded-2xl bg-muted lg:aspect-4/3 shadow-lg",
|
|
1066
|
+
imageClassName
|
|
1067
|
+
),
|
|
1068
|
+
children: [
|
|
1069
|
+
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { initial: false, custom: direction, mode: "wait", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1070
|
+
framerMotion.motion.div,
|
|
1092
1071
|
{
|
|
1093
|
-
|
|
1072
|
+
custom: direction,
|
|
1073
|
+
variants: slideVariants,
|
|
1074
|
+
initial: "enter",
|
|
1075
|
+
animate: "center",
|
|
1076
|
+
exit: "exit",
|
|
1077
|
+
transition: { duration: 0.3, ease: "easeInOut" },
|
|
1094
1078
|
className: cn(
|
|
1095
|
-
"
|
|
1096
|
-
|
|
1079
|
+
"absolute inset-0",
|
|
1080
|
+
activeFeature?.imageClassName
|
|
1097
1081
|
),
|
|
1098
|
-
|
|
1099
|
-
|
|
1082
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1083
|
+
img.Img,
|
|
1084
|
+
{
|
|
1085
|
+
src: currentImage,
|
|
1086
|
+
alt: typeof activeFeature?.title === "string" ? activeFeature.title : `Feature ${activeIndex + 1}`,
|
|
1087
|
+
className: "h-full w-full object-cover",
|
|
1088
|
+
optixFlowConfig
|
|
1089
|
+
}
|
|
1090
|
+
)
|
|
1100
1091
|
},
|
|
1101
|
-
|
|
1102
|
-
)
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1092
|
+
`${activeIndex}-${activeColorIndex}`
|
|
1093
|
+
) }),
|
|
1094
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1095
|
+
"div",
|
|
1096
|
+
{
|
|
1097
|
+
className: cn(
|
|
1098
|
+
"absolute bottom-4 right-4 flex gap-2",
|
|
1099
|
+
navigationClassName
|
|
1100
|
+
),
|
|
1101
|
+
children: [
|
|
1102
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1103
|
+
Pressable,
|
|
1104
|
+
{
|
|
1105
|
+
onClick: goToPrev,
|
|
1106
|
+
asButton: true,
|
|
1107
|
+
variant: "outline",
|
|
1108
|
+
size: "icon",
|
|
1109
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/chevron-left", size: 20 })
|
|
1110
|
+
}
|
|
1111
|
+
),
|
|
1112
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1113
|
+
Pressable,
|
|
1114
|
+
{
|
|
1115
|
+
onClick: goToNext,
|
|
1116
|
+
asButton: true,
|
|
1117
|
+
variant: "outline",
|
|
1118
|
+
size: "icon",
|
|
1119
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/chevron-right", size: 20 })
|
|
1120
|
+
}
|
|
1121
|
+
)
|
|
1122
|
+
]
|
|
1123
|
+
}
|
|
1124
|
+
)
|
|
1125
|
+
]
|
|
1126
|
+
}
|
|
1127
|
+
),
|
|
1128
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col justify-center", children: [
|
|
1129
|
+
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1130
|
+
framerMotion.motion.div,
|
|
1131
|
+
{
|
|
1132
|
+
initial: { opacity: 0, y: 20 },
|
|
1133
|
+
animate: { opacity: 1, y: 0 },
|
|
1134
|
+
exit: { opacity: 0, y: -20 },
|
|
1135
|
+
transition: { duration: 0.3 },
|
|
1136
|
+
children: [
|
|
1137
|
+
activeFeature?.title && (typeof activeFeature.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-2xl font-semibold md:text-3xl", children: activeFeature.title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { children: activeFeature.title })),
|
|
1138
|
+
activeFeature?.description && (typeof activeFeature.description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-4 text-lg text-muted-foreground", children: activeFeature.description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4", children: activeFeature.description })),
|
|
1139
|
+
activeFeature?.colors && activeFeature.colors.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mt-6", colorSelectorClassName), children: [
|
|
1140
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-3 text-sm font-medium", children: "Available Colors" }),
|
|
1141
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-3", children: activeFeature.colors.map((color, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1142
|
+
"button",
|
|
1143
|
+
{
|
|
1144
|
+
onClick: () => setActiveColorIndex(index),
|
|
1145
|
+
className: cn(
|
|
1146
|
+
"h-8 w-8 rounded-full border-2 transition-all",
|
|
1147
|
+
activeColorIndex === index ? "border-primary ring-2 ring-primary ring-offset-2" : "border-transparent hover:border-muted-foreground"
|
|
1148
|
+
),
|
|
1149
|
+
style: { backgroundColor: color.value },
|
|
1150
|
+
title: color.name
|
|
1151
|
+
},
|
|
1152
|
+
color.name
|
|
1153
|
+
)) })
|
|
1154
|
+
] }),
|
|
1155
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: actionsClassName, children: renderActions() })
|
|
1156
|
+
]
|
|
1157
|
+
},
|
|
1158
|
+
activeIndex
|
|
1159
|
+
) }),
|
|
1160
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-8 flex gap-2", indicatorsClassName), children: features?.map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1161
|
+
"button",
|
|
1162
|
+
{
|
|
1163
|
+
onClick: () => goToSlide(index),
|
|
1164
|
+
className: cn(
|
|
1165
|
+
"h-2 rounded-full transition-all",
|
|
1166
|
+
activeIndex === index ? "w-8 bg-primary" : "w-2 bg-muted-foreground/30 hover:bg-muted-foreground/50"
|
|
1167
|
+
)
|
|
1168
|
+
},
|
|
1169
|
+
index
|
|
1170
|
+
)) })
|
|
1171
|
+
] })
|
|
1172
|
+
]
|
|
1173
|
+
}
|
|
1174
|
+
)
|
|
1122
1175
|
] })
|
|
1123
1176
|
}
|
|
1124
1177
|
);
|