@opensite/ui 0.7.5 → 0.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/carousel-animated-sections.cjs +10 -10
- package/dist/carousel-animated-sections.js +10 -10
- package/dist/carousel-fullscreen-scroll-fx.cjs +15 -13
- package/dist/carousel-fullscreen-scroll-fx.js +15 -13
- package/dist/carousel-multi-step-showcase.cjs +182 -105
- package/dist/carousel-multi-step-showcase.js +182 -105
- package/dist/carousel-progress-slider.cjs +38 -16
- package/dist/carousel-progress-slider.d.cts +9 -1
- package/dist/carousel-progress-slider.d.ts +9 -1
- package/dist/carousel-progress-slider.js +38 -16
- package/dist/registry.cjs +245 -144
- package/dist/registry.js +245 -144
- package/dist/utils.cjs +11 -0
- package/dist/utils.d.cts +6 -1
- package/dist/utils.d.ts +6 -1
- package/dist/utils.js +11 -1
- package/package.json +1 -1
|
@@ -33,6 +33,16 @@ var React6__namespace = /*#__PURE__*/_interopNamespace(React6);
|
|
|
33
33
|
function cn(...inputs) {
|
|
34
34
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
35
35
|
}
|
|
36
|
+
var BRIGHTNESS_CLASS_MAP = {
|
|
37
|
+
"10": "brightness-[.1]",
|
|
38
|
+
"20": "brightness-[.2]",
|
|
39
|
+
"25": "brightness-[.25]",
|
|
40
|
+
"30": "brightness-[.3]",
|
|
41
|
+
"40": "brightness-[.4]",
|
|
42
|
+
"50": "brightness-50",
|
|
43
|
+
"75": "brightness-75",
|
|
44
|
+
"100": "brightness-100"
|
|
45
|
+
};
|
|
36
46
|
function normalizePhoneNumber(input) {
|
|
37
47
|
const trimmed = input.trim();
|
|
38
48
|
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
@@ -931,16 +941,6 @@ var Section = React6__namespace.default.forwardRef(
|
|
|
931
941
|
}
|
|
932
942
|
);
|
|
933
943
|
Section.displayName = "Section";
|
|
934
|
-
var BRIGHTNESS_CLASS_MAP = {
|
|
935
|
-
"10": "brightness-[.1]",
|
|
936
|
-
"20": "brightness-[.2]",
|
|
937
|
-
"25": "brightness-[.25]",
|
|
938
|
-
"30": "brightness-[.3]",
|
|
939
|
-
"40": "brightness-[.4]",
|
|
940
|
-
"50": "brightness-50",
|
|
941
|
-
"75": "brightness-75",
|
|
942
|
-
"100": "brightness-100"
|
|
943
|
-
};
|
|
944
944
|
function CarouselAnimatedSections({
|
|
945
945
|
sections,
|
|
946
946
|
sectionsSlot,
|
|
@@ -12,6 +12,16 @@ import { Img } from '@page-speed/img';
|
|
|
12
12
|
function cn(...inputs) {
|
|
13
13
|
return twMerge(clsx(inputs));
|
|
14
14
|
}
|
|
15
|
+
var BRIGHTNESS_CLASS_MAP = {
|
|
16
|
+
"10": "brightness-[.1]",
|
|
17
|
+
"20": "brightness-[.2]",
|
|
18
|
+
"25": "brightness-[.25]",
|
|
19
|
+
"30": "brightness-[.3]",
|
|
20
|
+
"40": "brightness-[.4]",
|
|
21
|
+
"50": "brightness-50",
|
|
22
|
+
"75": "brightness-75",
|
|
23
|
+
"100": "brightness-100"
|
|
24
|
+
};
|
|
15
25
|
function normalizePhoneNumber(input) {
|
|
16
26
|
const trimmed = input.trim();
|
|
17
27
|
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
@@ -910,16 +920,6 @@ var Section = React6__default.forwardRef(
|
|
|
910
920
|
}
|
|
911
921
|
);
|
|
912
922
|
Section.displayName = "Section";
|
|
913
|
-
var BRIGHTNESS_CLASS_MAP = {
|
|
914
|
-
"10": "brightness-[.1]",
|
|
915
|
-
"20": "brightness-[.2]",
|
|
916
|
-
"25": "brightness-[.25]",
|
|
917
|
-
"30": "brightness-[.3]",
|
|
918
|
-
"40": "brightness-[.4]",
|
|
919
|
-
"50": "brightness-50",
|
|
920
|
-
"75": "brightness-75",
|
|
921
|
-
"100": "brightness-100"
|
|
922
|
-
};
|
|
923
923
|
function CarouselAnimatedSections({
|
|
924
924
|
sections,
|
|
925
925
|
sectionsSlot,
|
|
@@ -829,7 +829,7 @@ function CarouselFullscreenScrollFx({
|
|
|
829
829
|
slides,
|
|
830
830
|
slidesSlot,
|
|
831
831
|
className,
|
|
832
|
-
containerClassName = "h-full flex flex-col justify-center",
|
|
832
|
+
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",
|
|
833
833
|
navigationClassName,
|
|
834
834
|
contentClassName,
|
|
835
835
|
subtitleClassName,
|
|
@@ -851,9 +851,9 @@ function CarouselFullscreenScrollFx({
|
|
|
851
851
|
const scrollContainer = scrollContainerRef.current;
|
|
852
852
|
if (!scrollContainer || !slides?.length) return;
|
|
853
853
|
const handleScroll = () => {
|
|
854
|
-
const
|
|
855
|
-
const
|
|
856
|
-
const newIndex = Math.round(
|
|
854
|
+
const scrollTop = scrollContainer.scrollTop;
|
|
855
|
+
const slideHeight = scrollContainer.clientHeight;
|
|
856
|
+
const newIndex = Math.round(scrollTop / slideHeight);
|
|
857
857
|
setActiveIndex(newIndex);
|
|
858
858
|
};
|
|
859
859
|
scrollContainer.addEventListener("scroll", handleScroll);
|
|
@@ -862,14 +862,14 @@ function CarouselFullscreenScrollFx({
|
|
|
862
862
|
const scrollToSlide = React5__namespace.useCallback((index) => {
|
|
863
863
|
const scrollContainer = scrollContainerRef.current;
|
|
864
864
|
if (!scrollContainer) return;
|
|
865
|
-
const
|
|
865
|
+
const slideHeight = scrollContainer.clientHeight;
|
|
866
866
|
if (typeof scrollContainer.scrollTo === "function") {
|
|
867
867
|
scrollContainer.scrollTo({
|
|
868
|
-
|
|
868
|
+
top: slideHeight * index,
|
|
869
869
|
behavior: "smooth"
|
|
870
870
|
});
|
|
871
871
|
} else {
|
|
872
|
-
scrollContainer.
|
|
872
|
+
scrollContainer.scrollTop = slideHeight * index;
|
|
873
873
|
}
|
|
874
874
|
}, []);
|
|
875
875
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -882,7 +882,7 @@ function CarouselFullscreenScrollFx({
|
|
|
882
882
|
pattern,
|
|
883
883
|
patternOpacity,
|
|
884
884
|
containerMaxWidth,
|
|
885
|
-
containerClassName
|
|
885
|
+
containerClassName,
|
|
886
886
|
children: [
|
|
887
887
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
888
888
|
"div",
|
|
@@ -909,7 +909,7 @@ function CarouselFullscreenScrollFx({
|
|
|
909
909
|
"div",
|
|
910
910
|
{
|
|
911
911
|
ref: scrollContainerRef,
|
|
912
|
-
className: "flex h-screen snap-
|
|
912
|
+
className: "flex h-screen flex-col snap-y snap-mandatory overflow-x-hidden overflow-y-auto scroll-smooth",
|
|
913
913
|
style: { scrollbarWidth: "none", msOverflowStyle: "none" },
|
|
914
914
|
children: slidesSlot ? slidesSlot : slides?.map((slide, index) => {
|
|
915
915
|
const renderActions = React5__namespace.useMemo(() => {
|
|
@@ -945,7 +945,7 @@ function CarouselFullscreenScrollFx({
|
|
|
945
945
|
{
|
|
946
946
|
id: `fullscreen-${slide.id}`,
|
|
947
947
|
className: cn(
|
|
948
|
-
"relative flex h-screen min-w-full snap-start items-center justify-center overflow-hidden",
|
|
948
|
+
"relative flex h-screen min-h-screen w-full snap-start items-center justify-center overflow-hidden",
|
|
949
949
|
slide.className
|
|
950
950
|
),
|
|
951
951
|
children: [
|
|
@@ -976,7 +976,7 @@ function CarouselFullscreenScrollFx({
|
|
|
976
976
|
"div",
|
|
977
977
|
{
|
|
978
978
|
className: cn(
|
|
979
|
-
"relative z-10 mx-auto max-w-4xl md:max-w-
|
|
979
|
+
"relative z-10 mx-auto max-w-4xl md:max-w-xl px-6 text-center text-shadow",
|
|
980
980
|
contentClassName
|
|
981
981
|
),
|
|
982
982
|
children: [
|
|
@@ -1015,12 +1015,14 @@ function CarouselFullscreenScrollFx({
|
|
|
1015
1015
|
}
|
|
1016
1016
|
),
|
|
1017
1017
|
index < (slides?.length ?? 0) - 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1018
|
-
"
|
|
1018
|
+
"button",
|
|
1019
1019
|
{
|
|
1020
|
+
onClick: () => scrollToSlide(index + 1),
|
|
1020
1021
|
className: cn(
|
|
1021
|
-
"absolute bottom-8 left-1/2 -translate-x-1/2",
|
|
1022
|
+
"absolute bottom-8 left-1/2 -translate-x-1/2 cursor-pointer transition-opacity hover:opacity-80 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50 focus-visible:ring-offset-2 focus-visible:ring-offset-black rounded-lg p-2",
|
|
1022
1023
|
scrollIndicatorClassName
|
|
1023
1024
|
),
|
|
1025
|
+
"aria-label": "Scroll to next slide",
|
|
1024
1026
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-2", children: [
|
|
1025
1027
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs uppercase tracking-widest text-white/50", children: "Scroll" }),
|
|
1026
1028
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-12 w-px animate-pulse bg-linear-to-b from-white/50 to-transparent" })
|
|
@@ -808,7 +808,7 @@ function CarouselFullscreenScrollFx({
|
|
|
808
808
|
slides,
|
|
809
809
|
slidesSlot,
|
|
810
810
|
className,
|
|
811
|
-
containerClassName = "h-full flex flex-col justify-center",
|
|
811
|
+
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",
|
|
812
812
|
navigationClassName,
|
|
813
813
|
contentClassName,
|
|
814
814
|
subtitleClassName,
|
|
@@ -830,9 +830,9 @@ function CarouselFullscreenScrollFx({
|
|
|
830
830
|
const scrollContainer = scrollContainerRef.current;
|
|
831
831
|
if (!scrollContainer || !slides?.length) return;
|
|
832
832
|
const handleScroll = () => {
|
|
833
|
-
const
|
|
834
|
-
const
|
|
835
|
-
const newIndex = Math.round(
|
|
833
|
+
const scrollTop = scrollContainer.scrollTop;
|
|
834
|
+
const slideHeight = scrollContainer.clientHeight;
|
|
835
|
+
const newIndex = Math.round(scrollTop / slideHeight);
|
|
836
836
|
setActiveIndex(newIndex);
|
|
837
837
|
};
|
|
838
838
|
scrollContainer.addEventListener("scroll", handleScroll);
|
|
@@ -841,14 +841,14 @@ function CarouselFullscreenScrollFx({
|
|
|
841
841
|
const scrollToSlide = React5.useCallback((index) => {
|
|
842
842
|
const scrollContainer = scrollContainerRef.current;
|
|
843
843
|
if (!scrollContainer) return;
|
|
844
|
-
const
|
|
844
|
+
const slideHeight = scrollContainer.clientHeight;
|
|
845
845
|
if (typeof scrollContainer.scrollTo === "function") {
|
|
846
846
|
scrollContainer.scrollTo({
|
|
847
|
-
|
|
847
|
+
top: slideHeight * index,
|
|
848
848
|
behavior: "smooth"
|
|
849
849
|
});
|
|
850
850
|
} else {
|
|
851
|
-
scrollContainer.
|
|
851
|
+
scrollContainer.scrollTop = slideHeight * index;
|
|
852
852
|
}
|
|
853
853
|
}, []);
|
|
854
854
|
return /* @__PURE__ */ jsxs(
|
|
@@ -861,7 +861,7 @@ function CarouselFullscreenScrollFx({
|
|
|
861
861
|
pattern,
|
|
862
862
|
patternOpacity,
|
|
863
863
|
containerMaxWidth,
|
|
864
|
-
containerClassName
|
|
864
|
+
containerClassName,
|
|
865
865
|
children: [
|
|
866
866
|
/* @__PURE__ */ jsx(
|
|
867
867
|
"div",
|
|
@@ -888,7 +888,7 @@ function CarouselFullscreenScrollFx({
|
|
|
888
888
|
"div",
|
|
889
889
|
{
|
|
890
890
|
ref: scrollContainerRef,
|
|
891
|
-
className: "flex h-screen snap-
|
|
891
|
+
className: "flex h-screen flex-col snap-y snap-mandatory overflow-x-hidden overflow-y-auto scroll-smooth",
|
|
892
892
|
style: { scrollbarWidth: "none", msOverflowStyle: "none" },
|
|
893
893
|
children: slidesSlot ? slidesSlot : slides?.map((slide, index) => {
|
|
894
894
|
const renderActions = React5.useMemo(() => {
|
|
@@ -924,7 +924,7 @@ function CarouselFullscreenScrollFx({
|
|
|
924
924
|
{
|
|
925
925
|
id: `fullscreen-${slide.id}`,
|
|
926
926
|
className: cn(
|
|
927
|
-
"relative flex h-screen min-w-full snap-start items-center justify-center overflow-hidden",
|
|
927
|
+
"relative flex h-screen min-h-screen w-full snap-start items-center justify-center overflow-hidden",
|
|
928
928
|
slide.className
|
|
929
929
|
),
|
|
930
930
|
children: [
|
|
@@ -955,7 +955,7 @@ function CarouselFullscreenScrollFx({
|
|
|
955
955
|
"div",
|
|
956
956
|
{
|
|
957
957
|
className: cn(
|
|
958
|
-
"relative z-10 mx-auto max-w-4xl md:max-w-
|
|
958
|
+
"relative z-10 mx-auto max-w-4xl md:max-w-xl px-6 text-center text-shadow",
|
|
959
959
|
contentClassName
|
|
960
960
|
),
|
|
961
961
|
children: [
|
|
@@ -994,12 +994,14 @@ function CarouselFullscreenScrollFx({
|
|
|
994
994
|
}
|
|
995
995
|
),
|
|
996
996
|
index < (slides?.length ?? 0) - 1 && /* @__PURE__ */ jsx(
|
|
997
|
-
"
|
|
997
|
+
"button",
|
|
998
998
|
{
|
|
999
|
+
onClick: () => scrollToSlide(index + 1),
|
|
999
1000
|
className: cn(
|
|
1000
|
-
"absolute bottom-8 left-1/2 -translate-x-1/2",
|
|
1001
|
+
"absolute bottom-8 left-1/2 -translate-x-1/2 cursor-pointer transition-opacity hover:opacity-80 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50 focus-visible:ring-offset-2 focus-visible:ring-offset-black rounded-lg p-2",
|
|
1001
1002
|
scrollIndicatorClassName
|
|
1002
1003
|
),
|
|
1004
|
+
"aria-label": "Scroll to next slide",
|
|
1003
1005
|
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
|
|
1004
1006
|
/* @__PURE__ */ jsx("span", { className: "text-xs uppercase tracking-widest text-white/50", children: "Scroll" }),
|
|
1005
1007
|
/* @__PURE__ */ jsx("div", { className: "h-12 w-px animate-pulse bg-linear-to-b from-white/50 to-transparent" })
|
|
@@ -976,7 +976,14 @@ function CarouselMultiStepShowcase({
|
|
|
976
976
|
if (actionsSlot) return actionsSlot;
|
|
977
977
|
if (!actions || actions.length === 0) return null;
|
|
978
978
|
return actions.map((action, index) => {
|
|
979
|
-
const {
|
|
979
|
+
const {
|
|
980
|
+
label,
|
|
981
|
+
icon,
|
|
982
|
+
iconAfter,
|
|
983
|
+
children,
|
|
984
|
+
className: actionClassName,
|
|
985
|
+
...pressableProps
|
|
986
|
+
} = action;
|
|
980
987
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
981
988
|
Pressable,
|
|
982
989
|
{
|
|
@@ -986,7 +993,14 @@ function CarouselMultiStepShowcase({
|
|
|
986
993
|
children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
987
994
|
icon,
|
|
988
995
|
label,
|
|
989
|
-
iconAfter ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
996
|
+
iconAfter ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
997
|
+
DynamicIcon,
|
|
998
|
+
{
|
|
999
|
+
name: "lucide/arrow-right",
|
|
1000
|
+
size: 16,
|
|
1001
|
+
className: "ml-2"
|
|
1002
|
+
}
|
|
1003
|
+
)
|
|
990
1004
|
] })
|
|
991
1005
|
},
|
|
992
1006
|
index
|
|
@@ -1020,124 +1034,187 @@ function CarouselMultiStepShowcase({
|
|
|
1020
1034
|
patternOpacity,
|
|
1021
1035
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("container mx-auto px-4", containerClassName), children: [
|
|
1022
1036
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mb-12 text-center", headerClassName), children: [
|
|
1023
|
-
heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1024
|
-
|
|
1037
|
+
heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1038
|
+
"h2",
|
|
1039
|
+
{
|
|
1040
|
+
className: cn(
|
|
1041
|
+
"text-3xl font-bold tracking-tight md:text-4xl lg:text-5xl",
|
|
1042
|
+
headingClassName
|
|
1043
|
+
),
|
|
1044
|
+
children: heading
|
|
1045
|
+
}
|
|
1046
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: headingClassName, children: heading })),
|
|
1047
|
+
subheading && (typeof subheading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1048
|
+
"p",
|
|
1049
|
+
{
|
|
1050
|
+
className: cn(
|
|
1051
|
+
"mt-4 text-lg text-muted-foreground",
|
|
1052
|
+
subheadingClassName
|
|
1053
|
+
),
|
|
1054
|
+
children: subheading
|
|
1055
|
+
}
|
|
1056
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: subheadingClassName, children: subheading }))
|
|
1025
1057
|
] }),
|
|
1026
|
-
stepsSlot ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: stepNavigationClassName, children: stepsSlot }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1027
|
-
"
|
|
1058
|
+
stepsSlot ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: stepNavigationClassName, children: stepsSlot }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1059
|
+
"div",
|
|
1060
|
+
{
|
|
1061
|
+
className: cn(
|
|
1062
|
+
"mb-8 flex flex-wrap justify-center gap-2",
|
|
1063
|
+
stepNavigationClassName
|
|
1064
|
+
),
|
|
1065
|
+
children: steps?.map((step, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1066
|
+
"button",
|
|
1067
|
+
{
|
|
1068
|
+
onClick: () => goToStep(index),
|
|
1069
|
+
className: cn(
|
|
1070
|
+
"flex items-center gap-2 rounded-full px-4 py-2 text-sm font-medium transition-all",
|
|
1071
|
+
activeStep === index ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-muted/80",
|
|
1072
|
+
step.className
|
|
1073
|
+
),
|
|
1074
|
+
children: [
|
|
1075
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1076
|
+
"span",
|
|
1077
|
+
{
|
|
1078
|
+
className: cn(
|
|
1079
|
+
"flex h-6 w-6 items-center justify-center rounded-full text-xs",
|
|
1080
|
+
activeStep === index ? "bg-primary-foreground text-primary" : "bg-background"
|
|
1081
|
+
),
|
|
1082
|
+
children: step.step
|
|
1083
|
+
}
|
|
1084
|
+
),
|
|
1085
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: typeof step.title === "string" ? step.title.split(":")[0] : step.title })
|
|
1086
|
+
]
|
|
1087
|
+
},
|
|
1088
|
+
step.id
|
|
1089
|
+
))
|
|
1090
|
+
}
|
|
1091
|
+
),
|
|
1092
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1093
|
+
"div",
|
|
1028
1094
|
{
|
|
1029
|
-
onClick: () => goToStep(index),
|
|
1030
1095
|
className: cn(
|
|
1031
|
-
"
|
|
1032
|
-
|
|
1033
|
-
|
|
1096
|
+
"mx-auto mb-12 h-1 max-w-2xl overflow-hidden rounded-full bg-muted",
|
|
1097
|
+
progressClassName
|
|
1098
|
+
),
|
|
1099
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1100
|
+
framerMotion.motion.div,
|
|
1101
|
+
{
|
|
1102
|
+
className: "h-full bg-primary",
|
|
1103
|
+
initial: { width: 0 },
|
|
1104
|
+
animate: {
|
|
1105
|
+
width: `${(activeStep + 1) / (steps?.length ?? 1) * 100}%`
|
|
1106
|
+
},
|
|
1107
|
+
transition: { duration: 0.3 }
|
|
1108
|
+
}
|
|
1109
|
+
)
|
|
1110
|
+
}
|
|
1111
|
+
),
|
|
1112
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1113
|
+
"div",
|
|
1114
|
+
{
|
|
1115
|
+
className: cn(
|
|
1116
|
+
"grid gap-8 lg:grid-cols-2 lg:gap-12",
|
|
1117
|
+
contentClassName
|
|
1034
1118
|
),
|
|
1035
1119
|
children: [
|
|
1036
1120
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1037
|
-
"
|
|
1121
|
+
"div",
|
|
1038
1122
|
{
|
|
1039
1123
|
className: cn(
|
|
1040
|
-
"
|
|
1041
|
-
|
|
1124
|
+
"relative aspect-video overflow-hidden rounded-xl bg-muted",
|
|
1125
|
+
imageClassName
|
|
1042
1126
|
),
|
|
1043
|
-
children:
|
|
1127
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { initial: false, custom: direction, mode: "wait", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1128
|
+
framerMotion.motion.div,
|
|
1129
|
+
{
|
|
1130
|
+
custom: direction,
|
|
1131
|
+
variants: slideVariants,
|
|
1132
|
+
initial: "enter",
|
|
1133
|
+
animate: "center",
|
|
1134
|
+
exit: "exit",
|
|
1135
|
+
transition: { duration: 0.3, ease: "easeInOut" },
|
|
1136
|
+
className: cn(
|
|
1137
|
+
"absolute inset-0",
|
|
1138
|
+
steps?.[activeStep]?.imageClassName
|
|
1139
|
+
),
|
|
1140
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1141
|
+
img.Img,
|
|
1142
|
+
{
|
|
1143
|
+
src: steps?.[activeStep]?.image,
|
|
1144
|
+
alt: typeof steps?.[activeStep]?.title === "string" ? steps[activeStep].title : `Step ${activeStep + 1}`,
|
|
1145
|
+
className: "h-full w-full object-cover",
|
|
1146
|
+
optixFlowConfig
|
|
1147
|
+
}
|
|
1148
|
+
)
|
|
1149
|
+
},
|
|
1150
|
+
activeStep
|
|
1151
|
+
) })
|
|
1044
1152
|
}
|
|
1045
1153
|
),
|
|
1046
|
-
/* @__PURE__ */ jsxRuntime.jsx("
|
|
1047
|
-
|
|
1048
|
-
},
|
|
1049
|
-
step.id
|
|
1050
|
-
)) }),
|
|
1051
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mx-auto mb-12 h-1 max-w-2xl overflow-hidden rounded-full bg-muted", progressClassName), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1052
|
-
framerMotion.motion.div,
|
|
1053
|
-
{
|
|
1054
|
-
className: "h-full bg-primary",
|
|
1055
|
-
initial: { width: 0 },
|
|
1056
|
-
animate: {
|
|
1057
|
-
width: `${(activeStep + 1) / (steps?.length ?? 1) * 100}%`
|
|
1058
|
-
},
|
|
1059
|
-
transition: { duration: 0.3 }
|
|
1060
|
-
}
|
|
1061
|
-
) }),
|
|
1062
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("grid gap-8 lg:grid-cols-2 lg:gap-12", contentClassName), children: [
|
|
1063
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("relative aspect-video overflow-hidden rounded-xl bg-muted", imageClassName), children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { initial: false, custom: direction, mode: "wait", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1064
|
-
framerMotion.motion.div,
|
|
1065
|
-
{
|
|
1066
|
-
custom: direction,
|
|
1067
|
-
variants: slideVariants,
|
|
1068
|
-
initial: "enter",
|
|
1069
|
-
animate: "center",
|
|
1070
|
-
exit: "exit",
|
|
1071
|
-
transition: { duration: 0.3, ease: "easeInOut" },
|
|
1072
|
-
className: cn("absolute inset-0", steps?.[activeStep]?.imageClassName),
|
|
1073
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1074
|
-
img.Img,
|
|
1154
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1155
|
+
framerMotion.motion.div,
|
|
1075
1156
|
{
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
children: [
|
|
1093
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4 inline-flex items-center gap-2 rounded-full bg-primary/10 px-3 py-1 text-sm font-medium text-primary", children: [
|
|
1094
|
-
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/check-circle", size: 16 }),
|
|
1095
|
-
"Step ",
|
|
1096
|
-
steps?.[activeStep]?.step,
|
|
1097
|
-
" of ",
|
|
1098
|
-
steps?.length ?? 0
|
|
1099
|
-
] }),
|
|
1100
|
-
steps?.[activeStep]?.title && (typeof steps[activeStep].title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-2xl font-semibold md:text-3xl", children: steps[activeStep].title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { children: steps[activeStep].title })),
|
|
1101
|
-
steps?.[activeStep]?.description && (typeof steps[activeStep].description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-4 text-lg text-muted-foreground", children: steps[activeStep].description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4", children: steps[activeStep].description })),
|
|
1102
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mt-8 flex gap-4", actionsClassName), children: [
|
|
1103
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1104
|
-
Pressable,
|
|
1105
|
-
{
|
|
1106
|
-
onClick: goToPrev,
|
|
1107
|
-
asButton: true,
|
|
1108
|
-
variant: "outline",
|
|
1109
|
-
disabled: activeStep === 0,
|
|
1110
|
-
className: "disabled:opacity-50",
|
|
1111
|
-
children: [
|
|
1112
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1113
|
-
DynamicIcon,
|
|
1114
|
-
{
|
|
1115
|
-
name: "lucide/arrow-left",
|
|
1116
|
-
size: 16,
|
|
1117
|
-
className: "mr-2"
|
|
1118
|
-
}
|
|
1119
|
-
),
|
|
1120
|
-
"Previous"
|
|
1121
|
-
]
|
|
1122
|
-
}
|
|
1123
|
-
),
|
|
1124
|
-
activeStep < (steps?.length ?? 0) - 1 ? /* @__PURE__ */ jsxRuntime.jsxs(Pressable, { onClick: goToNext, asButton: true, children: [
|
|
1125
|
-
"Next",
|
|
1126
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1127
|
-
DynamicIcon,
|
|
1157
|
+
initial: { opacity: 0, y: 20 },
|
|
1158
|
+
animate: { opacity: 1, y: 0 },
|
|
1159
|
+
exit: { opacity: 0, y: -20 },
|
|
1160
|
+
transition: { duration: 0.3 },
|
|
1161
|
+
children: [
|
|
1162
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4 inline-flex items-center gap-2 rounded-full bg-primary/10 px-3 py-1 text-sm font-medium text-primary", children: [
|
|
1163
|
+
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/check-circle", size: 16 }),
|
|
1164
|
+
"Step ",
|
|
1165
|
+
steps?.[activeStep]?.step,
|
|
1166
|
+
" of ",
|
|
1167
|
+
steps?.length ?? 0
|
|
1168
|
+
] }),
|
|
1169
|
+
steps?.[activeStep]?.title && (typeof steps[activeStep].title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-2xl font-semibold md:text-3xl", children: steps[activeStep].title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { children: steps[activeStep].title })),
|
|
1170
|
+
steps?.[activeStep]?.description && (typeof steps[activeStep].description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-4 text-lg text-muted-foreground", children: steps[activeStep].description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4", children: steps[activeStep].description })),
|
|
1171
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1172
|
+
"div",
|
|
1128
1173
|
{
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1174
|
+
className: cn("mt-8 flex gap-3 flex-wrap", actionsClassName),
|
|
1175
|
+
children: [
|
|
1176
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1177
|
+
Pressable,
|
|
1178
|
+
{
|
|
1179
|
+
onClick: goToPrev,
|
|
1180
|
+
asButton: true,
|
|
1181
|
+
variant: "outline",
|
|
1182
|
+
disabled: activeStep === 0,
|
|
1183
|
+
className: "disabled:opacity-50",
|
|
1184
|
+
children: [
|
|
1185
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1186
|
+
DynamicIcon,
|
|
1187
|
+
{
|
|
1188
|
+
name: "lucide/arrow-left",
|
|
1189
|
+
size: 16,
|
|
1190
|
+
className: "mr-2"
|
|
1191
|
+
}
|
|
1192
|
+
),
|
|
1193
|
+
"Previous"
|
|
1194
|
+
]
|
|
1195
|
+
}
|
|
1196
|
+
),
|
|
1197
|
+
activeStep < (steps?.length ?? 0) - 1 ? /* @__PURE__ */ jsxRuntime.jsxs(Pressable, { onClick: goToNext, asButton: true, children: [
|
|
1198
|
+
"Next",
|
|
1199
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1200
|
+
DynamicIcon,
|
|
1201
|
+
{
|
|
1202
|
+
name: "lucide/arrow-right",
|
|
1203
|
+
size: 16,
|
|
1204
|
+
className: "ml-2"
|
|
1205
|
+
}
|
|
1206
|
+
)
|
|
1207
|
+
] }) : (actionsSlot || actions && actions.length > 0) && renderActions()
|
|
1208
|
+
]
|
|
1132
1209
|
}
|
|
1133
1210
|
)
|
|
1134
|
-
]
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1211
|
+
]
|
|
1212
|
+
},
|
|
1213
|
+
activeStep
|
|
1214
|
+
) }) })
|
|
1215
|
+
]
|
|
1216
|
+
}
|
|
1217
|
+
)
|
|
1141
1218
|
] })
|
|
1142
1219
|
}
|
|
1143
1220
|
);
|