@opensite/ui 0.7.2 → 0.7.4
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 +32 -32
- package/dist/carousel-animated-sections.d.cts +4 -3
- package/dist/carousel-animated-sections.d.ts +4 -3
- package/dist/carousel-animated-sections.js +32 -32
- package/dist/carousel-feature-badge.cjs +59 -18
- package/dist/carousel-feature-badge.d.cts +10 -2
- package/dist/carousel-feature-badge.d.ts +10 -2
- package/dist/carousel-feature-badge.js +59 -18
- package/dist/carousel-fullscreen-scroll-fx.cjs +106 -33
- package/dist/carousel-fullscreen-scroll-fx.d.cts +10 -2
- package/dist/carousel-fullscreen-scroll-fx.d.ts +10 -2
- package/dist/carousel-fullscreen-scroll-fx.js +106 -33
- package/dist/registry.cjs +212 -98
- package/dist/registry.js +212 -98
- package/package.json +1 -1
|
@@ -931,13 +931,23 @@ var Section = React6__namespace.default.forwardRef(
|
|
|
931
931
|
}
|
|
932
932
|
);
|
|
933
933
|
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
|
+
};
|
|
934
944
|
function CarouselAnimatedSections({
|
|
935
945
|
sections,
|
|
936
946
|
sectionsSlot,
|
|
937
947
|
actionsSlot,
|
|
938
948
|
actions,
|
|
939
949
|
className,
|
|
940
|
-
containerClassName = "h-full",
|
|
950
|
+
containerClassName = "h-full flex flex-col justify-center",
|
|
941
951
|
contentClassName,
|
|
942
952
|
subtitleClassName,
|
|
943
953
|
titleClassName,
|
|
@@ -946,7 +956,7 @@ function CarouselAnimatedSections({
|
|
|
946
956
|
navigationClassName,
|
|
947
957
|
arrowsClassName,
|
|
948
958
|
counterClassName,
|
|
949
|
-
|
|
959
|
+
slideMediaBrightness = "50",
|
|
950
960
|
optixFlowConfig,
|
|
951
961
|
background = "dark",
|
|
952
962
|
spacing = "py-0",
|
|
@@ -1001,7 +1011,7 @@ function CarouselAnimatedSections({
|
|
|
1001
1011
|
})
|
|
1002
1012
|
};
|
|
1003
1013
|
const currentSection = sections?.[currentIndex];
|
|
1004
|
-
const
|
|
1014
|
+
const actionElements = React6__namespace.useMemo(() => {
|
|
1005
1015
|
if (actionsSlot) return actionsSlot;
|
|
1006
1016
|
if (actions && actions.length > 0) {
|
|
1007
1017
|
return actions.map((action, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1011,11 +1021,8 @@ function CarouselAnimatedSections({
|
|
|
1011
1021
|
onClick: action.onClick,
|
|
1012
1022
|
asButton: true,
|
|
1013
1023
|
variant: action.variant,
|
|
1014
|
-
size: action.size
|
|
1015
|
-
className: cn(
|
|
1016
|
-
"bg-white text-black hover:bg-white/90",
|
|
1017
|
-
action.className
|
|
1018
|
-
),
|
|
1024
|
+
size: action.size,
|
|
1025
|
+
className: cn(action.className),
|
|
1019
1026
|
children: [
|
|
1020
1027
|
action.label,
|
|
1021
1028
|
action.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2", children: action.icon }),
|
|
@@ -1026,7 +1033,7 @@ function CarouselAnimatedSections({
|
|
|
1026
1033
|
));
|
|
1027
1034
|
}
|
|
1028
1035
|
return null;
|
|
1029
|
-
};
|
|
1036
|
+
}, [actionsSlot, actions]);
|
|
1030
1037
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1031
1038
|
Section,
|
|
1032
1039
|
{
|
|
@@ -1038,7 +1045,7 @@ function CarouselAnimatedSections({
|
|
|
1038
1045
|
containerMaxWidth,
|
|
1039
1046
|
containerClassName,
|
|
1040
1047
|
children: [
|
|
1041
|
-
sectionsSlot ? sectionsSlot : currentSection ? /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { initial: false, custom: direction, mode: "wait", children: /* @__PURE__ */ jsxRuntime.
|
|
1048
|
+
sectionsSlot ? sectionsSlot : currentSection ? /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { initial: false, custom: direction, mode: "wait", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1042
1049
|
framerMotion.motion.div,
|
|
1043
1050
|
{
|
|
1044
1051
|
custom: direction,
|
|
@@ -1049,26 +1056,19 @@ function CarouselAnimatedSections({
|
|
|
1049
1056
|
transition: { duration: 0.6, ease: [0.4, 0, 0.2, 1] },
|
|
1050
1057
|
onAnimationComplete: () => setIsAnimating(false),
|
|
1051
1058
|
className: cn("absolute inset-0", currentSection?.className),
|
|
1052
|
-
children:
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1066
|
-
"div",
|
|
1067
|
-
{
|
|
1068
|
-
className: cn("absolute inset-0 bg-black/50", overlayClassName)
|
|
1069
|
-
}
|
|
1070
|
-
)
|
|
1071
|
-
]
|
|
1059
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1060
|
+
img.Img,
|
|
1061
|
+
{
|
|
1062
|
+
src: currentSection?.image,
|
|
1063
|
+
alt: typeof currentSection?.title === "string" ? currentSection?.title : `Section ${currentSection?.id}`,
|
|
1064
|
+
className: cn(
|
|
1065
|
+
"h-full w-full object-cover",
|
|
1066
|
+
BRIGHTNESS_CLASS_MAP[slideMediaBrightness],
|
|
1067
|
+
currentSection?.imageClassName
|
|
1068
|
+
),
|
|
1069
|
+
optixFlowConfig
|
|
1070
|
+
}
|
|
1071
|
+
)
|
|
1072
1072
|
},
|
|
1073
1073
|
currentIndex
|
|
1074
1074
|
) }) : null,
|
|
@@ -1086,7 +1086,7 @@ function CarouselAnimatedSections({
|
|
|
1086
1086
|
animate: { opacity: 1, y: 0 },
|
|
1087
1087
|
exit: { opacity: 0, y: -40 },
|
|
1088
1088
|
transition: { duration: 0.4, delay: 0.2 },
|
|
1089
|
-
className: "max-w-2xl text-white",
|
|
1089
|
+
className: "max-w-2xl text-white text-shadow",
|
|
1090
1090
|
children: [
|
|
1091
1091
|
currentSection?.subtitle && (typeof currentSection?.subtitle === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1092
1092
|
"p",
|
|
@@ -1118,7 +1118,7 @@ function CarouselAnimatedSections({
|
|
|
1118
1118
|
children: currentSection?.description
|
|
1119
1119
|
}
|
|
1120
1120
|
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mb-8", descriptionClassName), children: currentSection?.description })),
|
|
1121
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: actionsClassName, children:
|
|
1121
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: actionsClassName, children: actionElements || currentSection?.ctaText && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1122
1122
|
Pressable,
|
|
1123
1123
|
{
|
|
1124
1124
|
href: currentSection?.ctaHref,
|
|
@@ -121,9 +121,10 @@ interface CarouselAnimatedSectionsProps {
|
|
|
121
121
|
*/
|
|
122
122
|
counterClassName?: string;
|
|
123
123
|
/**
|
|
124
|
-
*
|
|
124
|
+
* Granular control of brightness for slide media
|
|
125
|
+
* Values 10-40 use arbitrary Tailwind values for finer control on bright images
|
|
125
126
|
*/
|
|
126
|
-
|
|
127
|
+
slideMediaBrightness?: "10" | "20" | "25" | "30" | "40" | "50" | "75" | "100";
|
|
127
128
|
/**
|
|
128
129
|
* OptixFlow image optimization configuration
|
|
129
130
|
*/
|
|
@@ -149,6 +150,6 @@ interface CarouselAnimatedSectionsProps {
|
|
|
149
150
|
*/
|
|
150
151
|
containerMaxWidth?: ContainerMaxWidth;
|
|
151
152
|
}
|
|
152
|
-
declare function CarouselAnimatedSections({ sections, sectionsSlot, actionsSlot, actions, className, containerClassName, contentClassName, subtitleClassName, titleClassName, descriptionClassName, actionsClassName, navigationClassName, arrowsClassName, counterClassName,
|
|
153
|
+
declare function CarouselAnimatedSections({ sections, sectionsSlot, actionsSlot, actions, className, containerClassName, contentClassName, subtitleClassName, titleClassName, descriptionClassName, actionsClassName, navigationClassName, arrowsClassName, counterClassName, slideMediaBrightness, optixFlowConfig, background, spacing, containerMaxWidth, pattern, patternOpacity, }: CarouselAnimatedSectionsProps): React.JSX.Element;
|
|
153
154
|
|
|
154
155
|
export { type AnimatedSection, CarouselAnimatedSections, type CarouselAnimatedSectionsProps };
|
|
@@ -121,9 +121,10 @@ interface CarouselAnimatedSectionsProps {
|
|
|
121
121
|
*/
|
|
122
122
|
counterClassName?: string;
|
|
123
123
|
/**
|
|
124
|
-
*
|
|
124
|
+
* Granular control of brightness for slide media
|
|
125
|
+
* Values 10-40 use arbitrary Tailwind values for finer control on bright images
|
|
125
126
|
*/
|
|
126
|
-
|
|
127
|
+
slideMediaBrightness?: "10" | "20" | "25" | "30" | "40" | "50" | "75" | "100";
|
|
127
128
|
/**
|
|
128
129
|
* OptixFlow image optimization configuration
|
|
129
130
|
*/
|
|
@@ -149,6 +150,6 @@ interface CarouselAnimatedSectionsProps {
|
|
|
149
150
|
*/
|
|
150
151
|
containerMaxWidth?: ContainerMaxWidth;
|
|
151
152
|
}
|
|
152
|
-
declare function CarouselAnimatedSections({ sections, sectionsSlot, actionsSlot, actions, className, containerClassName, contentClassName, subtitleClassName, titleClassName, descriptionClassName, actionsClassName, navigationClassName, arrowsClassName, counterClassName,
|
|
153
|
+
declare function CarouselAnimatedSections({ sections, sectionsSlot, actionsSlot, actions, className, containerClassName, contentClassName, subtitleClassName, titleClassName, descriptionClassName, actionsClassName, navigationClassName, arrowsClassName, counterClassName, slideMediaBrightness, optixFlowConfig, background, spacing, containerMaxWidth, pattern, patternOpacity, }: CarouselAnimatedSectionsProps): React.JSX.Element;
|
|
153
154
|
|
|
154
155
|
export { type AnimatedSection, CarouselAnimatedSections, type CarouselAnimatedSectionsProps };
|
|
@@ -910,13 +910,23 @@ var Section = React6__default.forwardRef(
|
|
|
910
910
|
}
|
|
911
911
|
);
|
|
912
912
|
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
|
+
};
|
|
913
923
|
function CarouselAnimatedSections({
|
|
914
924
|
sections,
|
|
915
925
|
sectionsSlot,
|
|
916
926
|
actionsSlot,
|
|
917
927
|
actions,
|
|
918
928
|
className,
|
|
919
|
-
containerClassName = "h-full",
|
|
929
|
+
containerClassName = "h-full flex flex-col justify-center",
|
|
920
930
|
contentClassName,
|
|
921
931
|
subtitleClassName,
|
|
922
932
|
titleClassName,
|
|
@@ -925,7 +935,7 @@ function CarouselAnimatedSections({
|
|
|
925
935
|
navigationClassName,
|
|
926
936
|
arrowsClassName,
|
|
927
937
|
counterClassName,
|
|
928
|
-
|
|
938
|
+
slideMediaBrightness = "50",
|
|
929
939
|
optixFlowConfig,
|
|
930
940
|
background = "dark",
|
|
931
941
|
spacing = "py-0",
|
|
@@ -980,7 +990,7 @@ function CarouselAnimatedSections({
|
|
|
980
990
|
})
|
|
981
991
|
};
|
|
982
992
|
const currentSection = sections?.[currentIndex];
|
|
983
|
-
const
|
|
993
|
+
const actionElements = React6.useMemo(() => {
|
|
984
994
|
if (actionsSlot) return actionsSlot;
|
|
985
995
|
if (actions && actions.length > 0) {
|
|
986
996
|
return actions.map((action, index) => /* @__PURE__ */ jsxs(
|
|
@@ -990,11 +1000,8 @@ function CarouselAnimatedSections({
|
|
|
990
1000
|
onClick: action.onClick,
|
|
991
1001
|
asButton: true,
|
|
992
1002
|
variant: action.variant,
|
|
993
|
-
size: action.size
|
|
994
|
-
className: cn(
|
|
995
|
-
"bg-white text-black hover:bg-white/90",
|
|
996
|
-
action.className
|
|
997
|
-
),
|
|
1003
|
+
size: action.size,
|
|
1004
|
+
className: cn(action.className),
|
|
998
1005
|
children: [
|
|
999
1006
|
action.label,
|
|
1000
1007
|
action.icon && /* @__PURE__ */ jsx("span", { className: "ml-2", children: action.icon }),
|
|
@@ -1005,7 +1012,7 @@ function CarouselAnimatedSections({
|
|
|
1005
1012
|
));
|
|
1006
1013
|
}
|
|
1007
1014
|
return null;
|
|
1008
|
-
};
|
|
1015
|
+
}, [actionsSlot, actions]);
|
|
1009
1016
|
return /* @__PURE__ */ jsxs(
|
|
1010
1017
|
Section,
|
|
1011
1018
|
{
|
|
@@ -1017,7 +1024,7 @@ function CarouselAnimatedSections({
|
|
|
1017
1024
|
containerMaxWidth,
|
|
1018
1025
|
containerClassName,
|
|
1019
1026
|
children: [
|
|
1020
|
-
sectionsSlot ? sectionsSlot : currentSection ? /* @__PURE__ */ jsx(AnimatePresence, { initial: false, custom: direction, mode: "wait", children: /* @__PURE__ */
|
|
1027
|
+
sectionsSlot ? sectionsSlot : currentSection ? /* @__PURE__ */ jsx(AnimatePresence, { initial: false, custom: direction, mode: "wait", children: /* @__PURE__ */ jsx(
|
|
1021
1028
|
motion.div,
|
|
1022
1029
|
{
|
|
1023
1030
|
custom: direction,
|
|
@@ -1028,26 +1035,19 @@ function CarouselAnimatedSections({
|
|
|
1028
1035
|
transition: { duration: 0.6, ease: [0.4, 0, 0.2, 1] },
|
|
1029
1036
|
onAnimationComplete: () => setIsAnimating(false),
|
|
1030
1037
|
className: cn("absolute inset-0", currentSection?.className),
|
|
1031
|
-
children:
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
/* @__PURE__ */ jsx(
|
|
1045
|
-
"div",
|
|
1046
|
-
{
|
|
1047
|
-
className: cn("absolute inset-0 bg-black/50", overlayClassName)
|
|
1048
|
-
}
|
|
1049
|
-
)
|
|
1050
|
-
]
|
|
1038
|
+
children: /* @__PURE__ */ jsx(
|
|
1039
|
+
Img,
|
|
1040
|
+
{
|
|
1041
|
+
src: currentSection?.image,
|
|
1042
|
+
alt: typeof currentSection?.title === "string" ? currentSection?.title : `Section ${currentSection?.id}`,
|
|
1043
|
+
className: cn(
|
|
1044
|
+
"h-full w-full object-cover",
|
|
1045
|
+
BRIGHTNESS_CLASS_MAP[slideMediaBrightness],
|
|
1046
|
+
currentSection?.imageClassName
|
|
1047
|
+
),
|
|
1048
|
+
optixFlowConfig
|
|
1049
|
+
}
|
|
1050
|
+
)
|
|
1051
1051
|
},
|
|
1052
1052
|
currentIndex
|
|
1053
1053
|
) }) : null,
|
|
@@ -1065,7 +1065,7 @@ function CarouselAnimatedSections({
|
|
|
1065
1065
|
animate: { opacity: 1, y: 0 },
|
|
1066
1066
|
exit: { opacity: 0, y: -40 },
|
|
1067
1067
|
transition: { duration: 0.4, delay: 0.2 },
|
|
1068
|
-
className: "max-w-2xl text-white",
|
|
1068
|
+
className: "max-w-2xl text-white text-shadow",
|
|
1069
1069
|
children: [
|
|
1070
1070
|
currentSection?.subtitle && (typeof currentSection?.subtitle === "string" ? /* @__PURE__ */ jsx(
|
|
1071
1071
|
"p",
|
|
@@ -1097,7 +1097,7 @@ function CarouselAnimatedSections({
|
|
|
1097
1097
|
children: currentSection?.description
|
|
1098
1098
|
}
|
|
1099
1099
|
) : /* @__PURE__ */ jsx("div", { className: cn("mb-8", descriptionClassName), children: currentSection?.description })),
|
|
1100
|
-
/* @__PURE__ */ jsx("div", { className: actionsClassName, children:
|
|
1100
|
+
/* @__PURE__ */ jsx("div", { className: actionsClassName, children: actionElements || currentSection?.ctaText && /* @__PURE__ */ jsxs(
|
|
1101
1101
|
Pressable,
|
|
1102
1102
|
{
|
|
1103
1103
|
href: currentSection?.ctaHref,
|
|
@@ -1154,6 +1154,11 @@ var Section = React4__namespace.default.forwardRef(
|
|
|
1154
1154
|
}
|
|
1155
1155
|
);
|
|
1156
1156
|
Section.displayName = "Section";
|
|
1157
|
+
var SLIDE_LAYOUT_ASPECT_MAP = {
|
|
1158
|
+
horizontal: "aspect-video",
|
|
1159
|
+
vertical: "aspect-[9/16]",
|
|
1160
|
+
square: "aspect-square"
|
|
1161
|
+
};
|
|
1157
1162
|
function CarouselFeatureBadge({
|
|
1158
1163
|
badge,
|
|
1159
1164
|
heading,
|
|
@@ -1169,23 +1174,34 @@ function CarouselFeatureBadge({
|
|
|
1169
1174
|
carouselClassName,
|
|
1170
1175
|
carouselItemClassName,
|
|
1171
1176
|
optixFlowConfig,
|
|
1172
|
-
background
|
|
1173
|
-
spacing
|
|
1177
|
+
background,
|
|
1178
|
+
spacing,
|
|
1174
1179
|
pattern,
|
|
1175
|
-
patternOpacity
|
|
1180
|
+
patternOpacity,
|
|
1181
|
+
slideLayoutVariant = "square",
|
|
1182
|
+
containerMaxWidth = "2xl"
|
|
1176
1183
|
}) {
|
|
1177
1184
|
const renderCarouselItems = () => {
|
|
1178
1185
|
if (itemsSlot) return itemsSlot;
|
|
1179
1186
|
if (!items || items.length === 0) return null;
|
|
1180
|
-
return items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(CarouselItem, { className: carouselItemClassName, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1181
|
-
|
|
1187
|
+
return items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(CarouselItem, { className: carouselItemClassName, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1188
|
+
"div",
|
|
1182
1189
|
{
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1190
|
+
className: cn(
|
|
1191
|
+
"flex items-center justify-center overflow-hidden rounded-2xl",
|
|
1192
|
+
SLIDE_LAYOUT_ASPECT_MAP[slideLayoutVariant]
|
|
1193
|
+
),
|
|
1194
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1195
|
+
img.Img,
|
|
1196
|
+
{
|
|
1197
|
+
src: item.src,
|
|
1198
|
+
alt: item.alt,
|
|
1199
|
+
className: cn("h-full w-full object-cover", item.className),
|
|
1200
|
+
optixFlowConfig
|
|
1201
|
+
}
|
|
1202
|
+
)
|
|
1187
1203
|
}
|
|
1188
|
-
) }
|
|
1204
|
+
) }, index));
|
|
1189
1205
|
};
|
|
1190
1206
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1191
1207
|
Section,
|
|
@@ -1195,14 +1211,39 @@ function CarouselFeatureBadge({
|
|
|
1195
1211
|
className: cn(className),
|
|
1196
1212
|
pattern,
|
|
1197
1213
|
patternOpacity,
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1214
|
+
containerMaxWidth,
|
|
1215
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mx-auto", containerClassName), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 items-end justify-end gap-6 md:gap-20 lg:grid-cols-2", children: [
|
|
1216
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1217
|
+
"div",
|
|
1218
|
+
{
|
|
1219
|
+
className: cn("flex flex-col items-start gap-4", contentClassName),
|
|
1220
|
+
children: [
|
|
1221
|
+
badge && /* @__PURE__ */ jsxRuntime.jsx("div", { className: badgeClassName, children: typeof badge === "string" ? /* @__PURE__ */ jsxRuntime.jsx(Badge, { children: badge }) : badge }),
|
|
1222
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1223
|
+
heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1224
|
+
"h2",
|
|
1225
|
+
{
|
|
1226
|
+
className: cn(
|
|
1227
|
+
"text-left text-xl font-semibold md:text-3xl lg:max-w-xl lg:text-4xl",
|
|
1228
|
+
headingClassName
|
|
1229
|
+
),
|
|
1230
|
+
children: heading
|
|
1231
|
+
}
|
|
1232
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: headingClassName, children: heading })),
|
|
1233
|
+
description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1234
|
+
"p",
|
|
1235
|
+
{
|
|
1236
|
+
className: cn(
|
|
1237
|
+
"max-w-xl text-left text-lg leading-snug lg:max-w-sm",
|
|
1238
|
+
descriptionClassName
|
|
1239
|
+
),
|
|
1240
|
+
children: description
|
|
1241
|
+
}
|
|
1242
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: descriptionClassName, children: description }))
|
|
1243
|
+
] })
|
|
1244
|
+
]
|
|
1245
|
+
}
|
|
1246
|
+
),
|
|
1206
1247
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-full max-w-full px-6", carouselClassName), children: /* @__PURE__ */ jsxRuntime.jsxs(Carousel, { children: [
|
|
1207
1248
|
/* @__PURE__ */ jsxRuntime.jsx(CarouselContent, { children: renderCarouselItems() }),
|
|
1208
1249
|
/* @__PURE__ */ jsxRuntime.jsx(CarouselPrevious, {}),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { P as PatternName } from './pattern-background-a7gKHzHy.cjs';
|
|
3
|
-
import { f as SectionBackground, g as SectionSpacing } from './community-initiatives-Sm_ZSgyv.cjs';
|
|
3
|
+
import { f as SectionBackground, g as SectionSpacing, e as ContainerMaxWidth } from './community-initiatives-Sm_ZSgyv.cjs';
|
|
4
4
|
import { I as ImageItem, O as OptixFlowConfig } from './blocks-Cohq4eio.cjs';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import 'class-variance-authority';
|
|
@@ -21,6 +21,10 @@ import 'class-variance-authority/types';
|
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
23
|
interface CarouselFeatureBadgeProps {
|
|
24
|
+
/**
|
|
25
|
+
* Variant of the slide layout
|
|
26
|
+
*/
|
|
27
|
+
slideLayoutVariant?: "horizontal" | "vertical" | "square";
|
|
24
28
|
/**
|
|
25
29
|
* Badge/eyebrow content above heading
|
|
26
30
|
*/
|
|
@@ -93,7 +97,11 @@ interface CarouselFeatureBadgeProps {
|
|
|
93
97
|
* Pattern overlay opacity (0-1)
|
|
94
98
|
*/
|
|
95
99
|
patternOpacity?: number;
|
|
100
|
+
/**
|
|
101
|
+
* Optional max width for the content container
|
|
102
|
+
*/
|
|
103
|
+
containerMaxWidth?: ContainerMaxWidth;
|
|
96
104
|
}
|
|
97
|
-
declare function CarouselFeatureBadge({ badge, heading, description, items, itemsSlot, className, containerClassName, contentClassName, badgeClassName, headingClassName, descriptionClassName, carouselClassName, carouselItemClassName, optixFlowConfig, background, spacing, pattern, patternOpacity, }: CarouselFeatureBadgeProps): React.JSX.Element;
|
|
105
|
+
declare function CarouselFeatureBadge({ badge, heading, description, items, itemsSlot, className, containerClassName, contentClassName, badgeClassName, headingClassName, descriptionClassName, carouselClassName, carouselItemClassName, optixFlowConfig, background, spacing, pattern, patternOpacity, slideLayoutVariant, containerMaxWidth, }: CarouselFeatureBadgeProps): React.JSX.Element;
|
|
98
106
|
|
|
99
107
|
export { CarouselFeatureBadge, type CarouselFeatureBadgeProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { P as PatternName } from './pattern-background-a7gKHzHy.js';
|
|
3
|
-
import { f as SectionBackground, g as SectionSpacing } from './community-initiatives-BeWIIjA4.js';
|
|
3
|
+
import { f as SectionBackground, g as SectionSpacing, e as ContainerMaxWidth } from './community-initiatives-BeWIIjA4.js';
|
|
4
4
|
import { I as ImageItem, O as OptixFlowConfig } from './blocks-k17uluAz.js';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import 'class-variance-authority';
|
|
@@ -21,6 +21,10 @@ import 'class-variance-authority/types';
|
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
23
|
interface CarouselFeatureBadgeProps {
|
|
24
|
+
/**
|
|
25
|
+
* Variant of the slide layout
|
|
26
|
+
*/
|
|
27
|
+
slideLayoutVariant?: "horizontal" | "vertical" | "square";
|
|
24
28
|
/**
|
|
25
29
|
* Badge/eyebrow content above heading
|
|
26
30
|
*/
|
|
@@ -93,7 +97,11 @@ interface CarouselFeatureBadgeProps {
|
|
|
93
97
|
* Pattern overlay opacity (0-1)
|
|
94
98
|
*/
|
|
95
99
|
patternOpacity?: number;
|
|
100
|
+
/**
|
|
101
|
+
* Optional max width for the content container
|
|
102
|
+
*/
|
|
103
|
+
containerMaxWidth?: ContainerMaxWidth;
|
|
96
104
|
}
|
|
97
|
-
declare function CarouselFeatureBadge({ badge, heading, description, items, itemsSlot, className, containerClassName, contentClassName, badgeClassName, headingClassName, descriptionClassName, carouselClassName, carouselItemClassName, optixFlowConfig, background, spacing, pattern, patternOpacity, }: CarouselFeatureBadgeProps): React.JSX.Element;
|
|
105
|
+
declare function CarouselFeatureBadge({ badge, heading, description, items, itemsSlot, className, containerClassName, contentClassName, badgeClassName, headingClassName, descriptionClassName, carouselClassName, carouselItemClassName, optixFlowConfig, background, spacing, pattern, patternOpacity, slideLayoutVariant, containerMaxWidth, }: CarouselFeatureBadgeProps): React.JSX.Element;
|
|
98
106
|
|
|
99
107
|
export { CarouselFeatureBadge, type CarouselFeatureBadgeProps };
|
|
@@ -1130,6 +1130,11 @@ var Section = React4__default.forwardRef(
|
|
|
1130
1130
|
}
|
|
1131
1131
|
);
|
|
1132
1132
|
Section.displayName = "Section";
|
|
1133
|
+
var SLIDE_LAYOUT_ASPECT_MAP = {
|
|
1134
|
+
horizontal: "aspect-video",
|
|
1135
|
+
vertical: "aspect-[9/16]",
|
|
1136
|
+
square: "aspect-square"
|
|
1137
|
+
};
|
|
1133
1138
|
function CarouselFeatureBadge({
|
|
1134
1139
|
badge,
|
|
1135
1140
|
heading,
|
|
@@ -1145,23 +1150,34 @@ function CarouselFeatureBadge({
|
|
|
1145
1150
|
carouselClassName,
|
|
1146
1151
|
carouselItemClassName,
|
|
1147
1152
|
optixFlowConfig,
|
|
1148
|
-
background
|
|
1149
|
-
spacing
|
|
1153
|
+
background,
|
|
1154
|
+
spacing,
|
|
1150
1155
|
pattern,
|
|
1151
|
-
patternOpacity
|
|
1156
|
+
patternOpacity,
|
|
1157
|
+
slideLayoutVariant = "square",
|
|
1158
|
+
containerMaxWidth = "2xl"
|
|
1152
1159
|
}) {
|
|
1153
1160
|
const renderCarouselItems = () => {
|
|
1154
1161
|
if (itemsSlot) return itemsSlot;
|
|
1155
1162
|
if (!items || items.length === 0) return null;
|
|
1156
|
-
return items.map((item, index) => /* @__PURE__ */ jsx(CarouselItem, { className: carouselItemClassName, children: /* @__PURE__ */ jsx(
|
|
1157
|
-
|
|
1163
|
+
return items.map((item, index) => /* @__PURE__ */ jsx(CarouselItem, { className: carouselItemClassName, children: /* @__PURE__ */ jsx(
|
|
1164
|
+
"div",
|
|
1158
1165
|
{
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1166
|
+
className: cn(
|
|
1167
|
+
"flex items-center justify-center overflow-hidden rounded-2xl",
|
|
1168
|
+
SLIDE_LAYOUT_ASPECT_MAP[slideLayoutVariant]
|
|
1169
|
+
),
|
|
1170
|
+
children: /* @__PURE__ */ jsx(
|
|
1171
|
+
Img,
|
|
1172
|
+
{
|
|
1173
|
+
src: item.src,
|
|
1174
|
+
alt: item.alt,
|
|
1175
|
+
className: cn("h-full w-full object-cover", item.className),
|
|
1176
|
+
optixFlowConfig
|
|
1177
|
+
}
|
|
1178
|
+
)
|
|
1163
1179
|
}
|
|
1164
|
-
) }
|
|
1180
|
+
) }, index));
|
|
1165
1181
|
};
|
|
1166
1182
|
return /* @__PURE__ */ jsx(
|
|
1167
1183
|
Section,
|
|
@@ -1171,14 +1187,39 @@ function CarouselFeatureBadge({
|
|
|
1171
1187
|
className: cn(className),
|
|
1172
1188
|
pattern,
|
|
1173
1189
|
patternOpacity,
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1190
|
+
containerMaxWidth,
|
|
1191
|
+
children: /* @__PURE__ */ jsx("div", { className: cn("mx-auto", containerClassName), children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 items-end justify-end gap-6 md:gap-20 lg:grid-cols-2", children: [
|
|
1192
|
+
/* @__PURE__ */ jsxs(
|
|
1193
|
+
"div",
|
|
1194
|
+
{
|
|
1195
|
+
className: cn("flex flex-col items-start gap-4", contentClassName),
|
|
1196
|
+
children: [
|
|
1197
|
+
badge && /* @__PURE__ */ jsx("div", { className: badgeClassName, children: typeof badge === "string" ? /* @__PURE__ */ jsx(Badge, { children: badge }) : badge }),
|
|
1198
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1199
|
+
heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
|
|
1200
|
+
"h2",
|
|
1201
|
+
{
|
|
1202
|
+
className: cn(
|
|
1203
|
+
"text-left text-xl font-semibold md:text-3xl lg:max-w-xl lg:text-4xl",
|
|
1204
|
+
headingClassName
|
|
1205
|
+
),
|
|
1206
|
+
children: heading
|
|
1207
|
+
}
|
|
1208
|
+
) : /* @__PURE__ */ jsx("div", { className: headingClassName, children: heading })),
|
|
1209
|
+
description && (typeof description === "string" ? /* @__PURE__ */ jsx(
|
|
1210
|
+
"p",
|
|
1211
|
+
{
|
|
1212
|
+
className: cn(
|
|
1213
|
+
"max-w-xl text-left text-lg leading-snug lg:max-w-sm",
|
|
1214
|
+
descriptionClassName
|
|
1215
|
+
),
|
|
1216
|
+
children: description
|
|
1217
|
+
}
|
|
1218
|
+
) : /* @__PURE__ */ jsx("div", { className: descriptionClassName, children: description }))
|
|
1219
|
+
] })
|
|
1220
|
+
]
|
|
1221
|
+
}
|
|
1222
|
+
),
|
|
1182
1223
|
/* @__PURE__ */ jsx("div", { className: cn("w-full max-w-full px-6", carouselClassName), children: /* @__PURE__ */ jsxs(Carousel, { children: [
|
|
1183
1224
|
/* @__PURE__ */ jsx(CarouselContent, { children: renderCarouselItems() }),
|
|
1184
1225
|
/* @__PURE__ */ jsx(CarouselPrevious, {}),
|