@opensite/ui 0.8.4 → 0.8.6
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/article-breadcrumb-social.cjs +57 -73
- package/dist/article-breadcrumb-social.d.cts +2 -24
- package/dist/article-breadcrumb-social.d.ts +2 -24
- package/dist/article-breadcrumb-social.js +57 -73
- package/dist/article-compact-toc.cjs +1 -1
- package/dist/article-compact-toc.js +1 -1
- package/dist/article-sidebar-sticky.cjs +73 -26
- package/dist/article-sidebar-sticky.js +73 -26
- package/dist/blog-horizontal-timeline.cjs +7 -4
- package/dist/blog-horizontal-timeline.js +7 -4
- package/dist/faq-badge-support.cjs +18 -5
- package/dist/faq-badge-support.js +18 -5
- package/dist/faq-bordered-badge.cjs +23 -7
- package/dist/faq-bordered-badge.js +23 -7
- package/dist/faq-card-categories.cjs +20 -4
- package/dist/faq-card-categories.js +20 -4
- package/dist/faq-categorized-sections.cjs +19 -4
- package/dist/faq-categorized-sections.js +19 -4
- package/dist/faq-centered-accordion.cjs +18 -5
- package/dist/faq-centered-accordion.js +18 -5
- package/dist/faq-gradient-categories.cjs +19 -4
- package/dist/faq-gradient-categories.js +19 -4
- package/dist/faq-icon-benefits.cjs +11 -2
- package/dist/faq-icon-benefits.js +11 -2
- package/dist/faq-muted-cards.cjs +19 -6
- package/dist/faq-muted-cards.js +19 -6
- package/dist/faq-numbered-grid.cjs +11 -3
- package/dist/faq-numbered-grid.js +11 -3
- package/dist/faq-numbered-list.cjs +11 -3
- package/dist/faq-numbered-list.js +11 -3
- package/dist/faq-profile-sidebar.cjs +57 -20
- package/dist/faq-profile-sidebar.js +57 -20
- package/dist/faq-rounded-cards.cjs +26 -19
- package/dist/faq-rounded-cards.js +26 -19
- package/dist/faq-sidebar-navigation.cjs +48 -28
- package/dist/faq-sidebar-navigation.js +48 -28
- package/dist/faq-simple-accordion.cjs +17 -4
- package/dist/faq-simple-accordion.js +17 -4
- package/dist/faq-split-help.cjs +25 -6
- package/dist/faq-split-help.js +25 -6
- package/dist/faq-split-hero.cjs +604 -0
- package/dist/faq-split-hero.d.cts +116 -0
- package/dist/faq-split-hero.d.ts +116 -0
- package/dist/faq-split-hero.js +582 -0
- package/dist/faq-static-list.cjs +9 -2
- package/dist/faq-static-list.js +9 -2
- package/dist/feature-accordion-image.cjs +8 -2
- package/dist/feature-accordion-image.js +8 -2
- package/dist/feature-badge-grid-six.cjs +1 -1
- package/dist/feature-badge-grid-six.js +1 -1
- package/dist/feature-card-grid-linked.cjs +92 -22
- package/dist/feature-card-grid-linked.js +92 -22
- package/dist/feature-carousel-progress.cjs +1 -1
- package/dist/feature-carousel-progress.js +1 -1
- package/dist/feature-checklist-image.cjs +88 -15
- package/dist/feature-checklist-image.js +88 -15
- package/dist/feature-checklist-three-column.cjs +1 -1
- package/dist/feature-checklist-three-column.js +1 -1
- package/dist/feature-icon-grid-accent.cjs +50 -8
- package/dist/feature-icon-grid-accent.js +50 -8
- package/dist/feature-icon-grid-bordered.cjs +84 -14
- package/dist/feature-icon-grid-bordered.js +84 -14
- package/dist/feature-icon-tabs-content.cjs +217 -84
- package/dist/feature-icon-tabs-content.js +217 -84
- package/dist/feature-image-overlay-badge.cjs +106 -33
- package/dist/feature-image-overlay-badge.js +106 -33
- package/dist/feature-numbered-cards.cjs +154 -35
- package/dist/feature-numbered-cards.js +154 -35
- package/dist/feature-showcase.cjs +66 -71
- package/dist/feature-showcase.d.cts +1 -5
- package/dist/feature-showcase.d.ts +1 -5
- package/dist/feature-showcase.js +67 -72
- package/dist/feature-split-image-reverse.cjs +84 -15
- package/dist/feature-split-image-reverse.js +84 -15
- package/dist/feature-split-image.cjs +87 -15
- package/dist/feature-split-image.js +87 -15
- package/dist/feature-stats-highlight.cjs +50 -13
- package/dist/feature-stats-highlight.js +50 -13
- package/dist/feature-tabbed-content-image.cjs +198 -72
- package/dist/feature-tabbed-content-image.js +198 -72
- package/dist/feature-three-column-values.cjs +67 -14
- package/dist/feature-three-column-values.js +67 -14
- package/dist/feature-utility-cards-grid.cjs +83 -36
- package/dist/feature-utility-cards-grid.js +83 -36
- package/dist/navbar-animated-preview.cjs +8 -2
- package/dist/navbar-animated-preview.js +8 -2
- package/dist/navbar-centered-menu.cjs +8 -2
- package/dist/navbar-centered-menu.js +8 -2
- package/dist/navbar-dark-icons.cjs +8 -2
- package/dist/navbar-dark-icons.js +8 -2
- package/dist/navbar-dropdown-menu.cjs +8 -2
- package/dist/navbar-dropdown-menu.js +8 -2
- package/dist/navbar-education-platform.cjs +8 -2
- package/dist/navbar-education-platform.js +8 -2
- package/dist/navbar-enterprise-mega.cjs +8 -2
- package/dist/navbar-enterprise-mega.js +8 -2
- package/dist/navbar-feature-grid.cjs +8 -2
- package/dist/navbar-feature-grid.js +8 -2
- package/dist/navbar-multi-column-groups.cjs +8 -2
- package/dist/navbar-multi-column-groups.js +8 -2
- package/dist/navbar-platform-resources.cjs +8 -2
- package/dist/navbar-platform-resources.js +8 -2
- package/dist/navbar-sidebar-mobile.cjs +8 -2
- package/dist/navbar-sidebar-mobile.js +8 -2
- package/dist/registry.cjs +1873 -680
- package/dist/registry.js +1873 -680
- package/package.json +1 -1
|
@@ -1062,63 +1062,49 @@ function CarouselItem({ className, ...props }) {
|
|
|
1062
1062
|
}
|
|
1063
1063
|
);
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1065
|
+
function CarouselPagination({
|
|
1066
|
+
onPrevious,
|
|
1067
|
+
onNext,
|
|
1068
|
+
canScrollPrevious = true,
|
|
1069
|
+
canScrollNext = true,
|
|
1070
|
+
iconSize = 24,
|
|
1066
1071
|
className,
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1073
|
-
Pressable,
|
|
1074
|
-
{
|
|
1075
|
-
"data-slot": "carousel-previous",
|
|
1076
|
-
variant,
|
|
1077
|
-
size,
|
|
1078
|
-
className: cn(
|
|
1079
|
-
"absolute size-8 rounded-full",
|
|
1080
|
-
orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
1081
|
-
className
|
|
1082
|
-
),
|
|
1083
|
-
disabled: !canScrollPrev,
|
|
1084
|
-
onClick: scrollPrev,
|
|
1085
|
-
asButton: true,
|
|
1086
|
-
...props,
|
|
1087
|
-
children: [
|
|
1088
|
-
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/arrow-left" }),
|
|
1089
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Previous slide" })
|
|
1090
|
-
]
|
|
1091
|
-
}
|
|
1092
|
-
);
|
|
1093
|
-
}
|
|
1094
|
-
function CarouselNext({
|
|
1095
|
-
className,
|
|
1096
|
-
variant = "default",
|
|
1097
|
-
size = "icon",
|
|
1098
|
-
...props
|
|
1072
|
+
buttonClassName,
|
|
1073
|
+
previousIcon = "lucide/arrow-left",
|
|
1074
|
+
nextIcon = "lucide/arrow-right",
|
|
1075
|
+
previousAriaLabel = "Previous",
|
|
1076
|
+
nextAriaLabel = "Next"
|
|
1099
1077
|
}) {
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1078
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex justify-end gap-2", className), children: [
|
|
1079
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1080
|
+
Pressable,
|
|
1081
|
+
{
|
|
1082
|
+
onClick: onPrevious,
|
|
1083
|
+
disabled: !canScrollPrevious,
|
|
1084
|
+
"aria-label": previousAriaLabel,
|
|
1085
|
+
asButton: true,
|
|
1086
|
+
className: cn(
|
|
1087
|
+
"relative z-40 flex h-10 w-10 items-center justify-center rounded-full disabled:opacity-50",
|
|
1088
|
+
buttonClassName
|
|
1089
|
+
),
|
|
1090
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: previousIcon, size: iconSize })
|
|
1091
|
+
}
|
|
1092
|
+
),
|
|
1093
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1094
|
+
Pressable,
|
|
1095
|
+
{
|
|
1096
|
+
onClick: onNext,
|
|
1097
|
+
disabled: !canScrollNext,
|
|
1098
|
+
"aria-label": nextAriaLabel,
|
|
1099
|
+
asButton: true,
|
|
1100
|
+
className: cn(
|
|
1101
|
+
"relative z-40 flex h-10 w-10 items-center justify-center rounded-full disabled:opacity-50",
|
|
1102
|
+
buttonClassName
|
|
1103
|
+
),
|
|
1104
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: nextIcon, size: iconSize })
|
|
1105
|
+
}
|
|
1106
|
+
)
|
|
1107
|
+
] });
|
|
1122
1108
|
}
|
|
1123
1109
|
function FeatureShowcase({
|
|
1124
1110
|
items,
|
|
@@ -1128,7 +1114,6 @@ function FeatureShowcase({
|
|
|
1128
1114
|
slideClassName,
|
|
1129
1115
|
contentClassName,
|
|
1130
1116
|
mediaClassName,
|
|
1131
|
-
arrowClassName,
|
|
1132
1117
|
equalizeOnMobile,
|
|
1133
1118
|
stretchMediaOnMobile,
|
|
1134
1119
|
background,
|
|
@@ -1137,10 +1122,21 @@ function FeatureShowcase({
|
|
|
1137
1122
|
patternOpacity,
|
|
1138
1123
|
patternClassName
|
|
1139
1124
|
}) {
|
|
1140
|
-
const
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
)
|
|
1125
|
+
const [api, setApi] = React6__namespace.useState();
|
|
1126
|
+
const [canScrollPrevious, setCanScrollPrevious] = React6__namespace.useState(false);
|
|
1127
|
+
const [canScrollNext, setCanScrollNext] = React6__namespace.useState(false);
|
|
1128
|
+
React6__namespace.useEffect(() => {
|
|
1129
|
+
if (!api) return;
|
|
1130
|
+
const updateScrollState = () => {
|
|
1131
|
+
setCanScrollPrevious(api.canScrollPrev());
|
|
1132
|
+
setCanScrollNext(api.canScrollNext());
|
|
1133
|
+
};
|
|
1134
|
+
updateScrollState();
|
|
1135
|
+
api.on("select", updateScrollState);
|
|
1136
|
+
return () => {
|
|
1137
|
+
api.off("select", updateScrollState);
|
|
1138
|
+
};
|
|
1139
|
+
}, [api]);
|
|
1144
1140
|
const [mobileSlideHeight, setMobileSlideHeight] = React6.useState(
|
|
1145
1141
|
null
|
|
1146
1142
|
);
|
|
@@ -1183,7 +1179,7 @@ function FeatureShowcase({
|
|
|
1183
1179
|
}, [equalizeOnMobile, items]);
|
|
1184
1180
|
const carouselContent = React6.useMemo(() => {
|
|
1185
1181
|
if (!items || items.length === 0) return null;
|
|
1186
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Carousel, { className: carouselClassName, children: [
|
|
1182
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Carousel, { className: carouselClassName, setApi, children: [
|
|
1187
1183
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pb-18 md:pb-24", children: /* @__PURE__ */ jsxRuntime.jsx(CarouselContent, { className: "ease-in", children: items.map((item, itemIndex) => /* @__PURE__ */ jsxRuntime.jsx(CarouselItem, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1188
1184
|
"div",
|
|
1189
1185
|
{
|
|
@@ -1212,15 +1208,13 @@ function FeatureShowcase({
|
|
|
1212
1208
|
}
|
|
1213
1209
|
) }, `slide-${itemIndex}`)) }) }),
|
|
1214
1210
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1215
|
-
|
|
1216
|
-
{
|
|
1217
|
-
className: cn(baseArrowClassName, "right-16", arrowClassName)
|
|
1218
|
-
}
|
|
1219
|
-
),
|
|
1220
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1221
|
-
CarouselNext,
|
|
1211
|
+
CarouselPagination,
|
|
1222
1212
|
{
|
|
1223
|
-
|
|
1213
|
+
onPrevious: () => api?.scrollPrev(),
|
|
1214
|
+
onNext: () => api?.scrollNext(),
|
|
1215
|
+
canScrollPrevious,
|
|
1216
|
+
canScrollNext,
|
|
1217
|
+
className: "absolute bottom-4 right-0 md:bottom-6"
|
|
1224
1218
|
}
|
|
1225
1219
|
)
|
|
1226
1220
|
] });
|
|
@@ -1233,8 +1227,9 @@ function FeatureShowcase({
|
|
|
1233
1227
|
contentClassName,
|
|
1234
1228
|
mediaWrapperClassName,
|
|
1235
1229
|
mediaClassName,
|
|
1236
|
-
|
|
1237
|
-
|
|
1230
|
+
api,
|
|
1231
|
+
canScrollPrevious,
|
|
1232
|
+
canScrollNext
|
|
1238
1233
|
]);
|
|
1239
1234
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1240
1235
|
Section,
|
|
@@ -47,10 +47,6 @@ interface FeatureShowcaseProps {
|
|
|
47
47
|
* Additional CSS classes for the media area
|
|
48
48
|
*/
|
|
49
49
|
mediaClassName?: string;
|
|
50
|
-
/**
|
|
51
|
-
* Additional CSS classes for navigation arrows
|
|
52
|
-
*/
|
|
53
|
-
arrowClassName?: string;
|
|
54
50
|
/**
|
|
55
51
|
* Whether to equalize slide heights on mobile
|
|
56
52
|
*/
|
|
@@ -103,6 +99,6 @@ interface FeatureShowcaseProps {
|
|
|
103
99
|
* />
|
|
104
100
|
* ```
|
|
105
101
|
*/
|
|
106
|
-
declare function FeatureShowcase({ items, children, className, carouselClassName, slideClassName, contentClassName, mediaClassName,
|
|
102
|
+
declare function FeatureShowcase({ items, children, className, carouselClassName, slideClassName, contentClassName, mediaClassName, equalizeOnMobile, stretchMediaOnMobile, background, spacing, pattern, patternOpacity, patternClassName, }: FeatureShowcaseProps): react_jsx_runtime.JSX.Element;
|
|
107
103
|
|
|
108
104
|
export { FeatureShowcase };
|
|
@@ -47,10 +47,6 @@ interface FeatureShowcaseProps {
|
|
|
47
47
|
* Additional CSS classes for the media area
|
|
48
48
|
*/
|
|
49
49
|
mediaClassName?: string;
|
|
50
|
-
/**
|
|
51
|
-
* Additional CSS classes for navigation arrows
|
|
52
|
-
*/
|
|
53
|
-
arrowClassName?: string;
|
|
54
50
|
/**
|
|
55
51
|
* Whether to equalize slide heights on mobile
|
|
56
52
|
*/
|
|
@@ -103,6 +99,6 @@ interface FeatureShowcaseProps {
|
|
|
103
99
|
* />
|
|
104
100
|
* ```
|
|
105
101
|
*/
|
|
106
|
-
declare function FeatureShowcase({ items, children, className, carouselClassName, slideClassName, contentClassName, mediaClassName,
|
|
102
|
+
declare function FeatureShowcase({ items, children, className, carouselClassName, slideClassName, contentClassName, mediaClassName, equalizeOnMobile, stretchMediaOnMobile, background, spacing, pattern, patternOpacity, patternClassName, }: FeatureShowcaseProps): react_jsx_runtime.JSX.Element;
|
|
107
103
|
|
|
108
104
|
export { FeatureShowcase };
|
package/dist/feature-showcase.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as React6 from 'react';
|
|
3
|
-
import React6__default, {
|
|
3
|
+
import React6__default, { useState, useRef, useMemo, useEffect } from 'react';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
@@ -1038,63 +1038,49 @@ function CarouselItem({ className, ...props }) {
|
|
|
1038
1038
|
}
|
|
1039
1039
|
);
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1041
|
+
function CarouselPagination({
|
|
1042
|
+
onPrevious,
|
|
1043
|
+
onNext,
|
|
1044
|
+
canScrollPrevious = true,
|
|
1045
|
+
canScrollNext = true,
|
|
1046
|
+
iconSize = 24,
|
|
1042
1047
|
className,
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
return /* @__PURE__ */ jsxs(
|
|
1049
|
-
Pressable,
|
|
1050
|
-
{
|
|
1051
|
-
"data-slot": "carousel-previous",
|
|
1052
|
-
variant,
|
|
1053
|
-
size,
|
|
1054
|
-
className: cn(
|
|
1055
|
-
"absolute size-8 rounded-full",
|
|
1056
|
-
orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
1057
|
-
className
|
|
1058
|
-
),
|
|
1059
|
-
disabled: !canScrollPrev,
|
|
1060
|
-
onClick: scrollPrev,
|
|
1061
|
-
asButton: true,
|
|
1062
|
-
...props,
|
|
1063
|
-
children: [
|
|
1064
|
-
/* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/arrow-left" }),
|
|
1065
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Previous slide" })
|
|
1066
|
-
]
|
|
1067
|
-
}
|
|
1068
|
-
);
|
|
1069
|
-
}
|
|
1070
|
-
function CarouselNext({
|
|
1071
|
-
className,
|
|
1072
|
-
variant = "default",
|
|
1073
|
-
size = "icon",
|
|
1074
|
-
...props
|
|
1048
|
+
buttonClassName,
|
|
1049
|
+
previousIcon = "lucide/arrow-left",
|
|
1050
|
+
nextIcon = "lucide/arrow-right",
|
|
1051
|
+
previousAriaLabel = "Previous",
|
|
1052
|
+
nextAriaLabel = "Next"
|
|
1075
1053
|
}) {
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1054
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex justify-end gap-2", className), children: [
|
|
1055
|
+
/* @__PURE__ */ jsx(
|
|
1056
|
+
Pressable,
|
|
1057
|
+
{
|
|
1058
|
+
onClick: onPrevious,
|
|
1059
|
+
disabled: !canScrollPrevious,
|
|
1060
|
+
"aria-label": previousAriaLabel,
|
|
1061
|
+
asButton: true,
|
|
1062
|
+
className: cn(
|
|
1063
|
+
"relative z-40 flex h-10 w-10 items-center justify-center rounded-full disabled:opacity-50",
|
|
1064
|
+
buttonClassName
|
|
1065
|
+
),
|
|
1066
|
+
children: /* @__PURE__ */ jsx(DynamicIcon, { name: previousIcon, size: iconSize })
|
|
1067
|
+
}
|
|
1068
|
+
),
|
|
1069
|
+
/* @__PURE__ */ jsx(
|
|
1070
|
+
Pressable,
|
|
1071
|
+
{
|
|
1072
|
+
onClick: onNext,
|
|
1073
|
+
disabled: !canScrollNext,
|
|
1074
|
+
"aria-label": nextAriaLabel,
|
|
1075
|
+
asButton: true,
|
|
1076
|
+
className: cn(
|
|
1077
|
+
"relative z-40 flex h-10 w-10 items-center justify-center rounded-full disabled:opacity-50",
|
|
1078
|
+
buttonClassName
|
|
1079
|
+
),
|
|
1080
|
+
children: /* @__PURE__ */ jsx(DynamicIcon, { name: nextIcon, size: iconSize })
|
|
1081
|
+
}
|
|
1082
|
+
)
|
|
1083
|
+
] });
|
|
1098
1084
|
}
|
|
1099
1085
|
function FeatureShowcase({
|
|
1100
1086
|
items,
|
|
@@ -1104,7 +1090,6 @@ function FeatureShowcase({
|
|
|
1104
1090
|
slideClassName,
|
|
1105
1091
|
contentClassName,
|
|
1106
1092
|
mediaClassName,
|
|
1107
|
-
arrowClassName,
|
|
1108
1093
|
equalizeOnMobile,
|
|
1109
1094
|
stretchMediaOnMobile,
|
|
1110
1095
|
background,
|
|
@@ -1113,10 +1098,21 @@ function FeatureShowcase({
|
|
|
1113
1098
|
patternOpacity,
|
|
1114
1099
|
patternClassName
|
|
1115
1100
|
}) {
|
|
1116
|
-
const
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
)
|
|
1101
|
+
const [api, setApi] = React6.useState();
|
|
1102
|
+
const [canScrollPrevious, setCanScrollPrevious] = React6.useState(false);
|
|
1103
|
+
const [canScrollNext, setCanScrollNext] = React6.useState(false);
|
|
1104
|
+
React6.useEffect(() => {
|
|
1105
|
+
if (!api) return;
|
|
1106
|
+
const updateScrollState = () => {
|
|
1107
|
+
setCanScrollPrevious(api.canScrollPrev());
|
|
1108
|
+
setCanScrollNext(api.canScrollNext());
|
|
1109
|
+
};
|
|
1110
|
+
updateScrollState();
|
|
1111
|
+
api.on("select", updateScrollState);
|
|
1112
|
+
return () => {
|
|
1113
|
+
api.off("select", updateScrollState);
|
|
1114
|
+
};
|
|
1115
|
+
}, [api]);
|
|
1120
1116
|
const [mobileSlideHeight, setMobileSlideHeight] = useState(
|
|
1121
1117
|
null
|
|
1122
1118
|
);
|
|
@@ -1159,7 +1155,7 @@ function FeatureShowcase({
|
|
|
1159
1155
|
}, [equalizeOnMobile, items]);
|
|
1160
1156
|
const carouselContent = useMemo(() => {
|
|
1161
1157
|
if (!items || items.length === 0) return null;
|
|
1162
|
-
return /* @__PURE__ */ jsxs(Carousel, { className: carouselClassName, children: [
|
|
1158
|
+
return /* @__PURE__ */ jsxs(Carousel, { className: carouselClassName, setApi, children: [
|
|
1163
1159
|
/* @__PURE__ */ jsx("div", { className: "pb-18 md:pb-24", children: /* @__PURE__ */ jsx(CarouselContent, { className: "ease-in", children: items.map((item, itemIndex) => /* @__PURE__ */ jsx(CarouselItem, { children: /* @__PURE__ */ jsxs(
|
|
1164
1160
|
"div",
|
|
1165
1161
|
{
|
|
@@ -1188,15 +1184,13 @@ function FeatureShowcase({
|
|
|
1188
1184
|
}
|
|
1189
1185
|
) }, `slide-${itemIndex}`)) }) }),
|
|
1190
1186
|
/* @__PURE__ */ jsx(
|
|
1191
|
-
|
|
1192
|
-
{
|
|
1193
|
-
className: cn(baseArrowClassName, "right-16", arrowClassName)
|
|
1194
|
-
}
|
|
1195
|
-
),
|
|
1196
|
-
/* @__PURE__ */ jsx(
|
|
1197
|
-
CarouselNext,
|
|
1187
|
+
CarouselPagination,
|
|
1198
1188
|
{
|
|
1199
|
-
|
|
1189
|
+
onPrevious: () => api?.scrollPrev(),
|
|
1190
|
+
onNext: () => api?.scrollNext(),
|
|
1191
|
+
canScrollPrevious,
|
|
1192
|
+
canScrollNext,
|
|
1193
|
+
className: "absolute bottom-4 right-0 md:bottom-6"
|
|
1200
1194
|
}
|
|
1201
1195
|
)
|
|
1202
1196
|
] });
|
|
@@ -1209,8 +1203,9 @@ function FeatureShowcase({
|
|
|
1209
1203
|
contentClassName,
|
|
1210
1204
|
mediaWrapperClassName,
|
|
1211
1205
|
mediaClassName,
|
|
1212
|
-
|
|
1213
|
-
|
|
1206
|
+
api,
|
|
1207
|
+
canScrollPrevious,
|
|
1208
|
+
canScrollNext
|
|
1214
1209
|
]);
|
|
1215
1210
|
return /* @__PURE__ */ jsxs(
|
|
1216
1211
|
Section,
|
|
@@ -843,7 +843,7 @@ function FeatureSplitImageReverse({
|
|
|
843
843
|
actionsClassName,
|
|
844
844
|
optixFlowConfig,
|
|
845
845
|
background,
|
|
846
|
-
spacing,
|
|
846
|
+
spacing = "py-6 md:py-32",
|
|
847
847
|
pattern,
|
|
848
848
|
patternOpacity,
|
|
849
849
|
patternClassName
|
|
@@ -860,11 +860,20 @@ function FeatureSplitImageReverse({
|
|
|
860
860
|
className: actionClassName,
|
|
861
861
|
...pressableProps
|
|
862
862
|
} = action;
|
|
863
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
863
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
864
|
+
Pressable,
|
|
865
|
+
{
|
|
866
|
+
className: actionClassName,
|
|
867
|
+
asButton: true,
|
|
868
|
+
...pressableProps,
|
|
869
|
+
children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
870
|
+
icon,
|
|
871
|
+
label,
|
|
872
|
+
iconAfter
|
|
873
|
+
] })
|
|
874
|
+
},
|
|
875
|
+
index
|
|
876
|
+
);
|
|
868
877
|
});
|
|
869
878
|
}, [actionsSlot, actions]);
|
|
870
879
|
const imageContent = React.useMemo(() => {
|
|
@@ -875,7 +884,10 @@ function FeatureSplitImageReverse({
|
|
|
875
884
|
{
|
|
876
885
|
src: imageSrc,
|
|
877
886
|
alt: imageAlt || "",
|
|
878
|
-
className: cn(
|
|
887
|
+
className: cn(
|
|
888
|
+
"max-h-96 w-full rounded-md object-cover",
|
|
889
|
+
imageClassName
|
|
890
|
+
),
|
|
879
891
|
loading: "lazy",
|
|
880
892
|
optixFlowConfig
|
|
881
893
|
}
|
|
@@ -891,14 +903,71 @@ function FeatureSplitImageReverse({
|
|
|
891
903
|
patternClassName,
|
|
892
904
|
className,
|
|
893
905
|
containerClassName,
|
|
894
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
906
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
907
|
+
"div",
|
|
908
|
+
{
|
|
909
|
+
className: cn(
|
|
910
|
+
"grid items-center gap-8 md:gap-16 lg:grid-cols-2",
|
|
911
|
+
gridClassName
|
|
912
|
+
),
|
|
913
|
+
children: [
|
|
914
|
+
imageContent,
|
|
915
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
916
|
+
"div",
|
|
917
|
+
{
|
|
918
|
+
className: cn(
|
|
919
|
+
"flex flex-col items-center text-center lg:items-start lg:text-left",
|
|
920
|
+
contentClassName
|
|
921
|
+
),
|
|
922
|
+
children: [
|
|
923
|
+
title && (typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
924
|
+
"h2",
|
|
925
|
+
{
|
|
926
|
+
className: cn(
|
|
927
|
+
"my-6 mt-0 text-4xl font-semibold text-balance lg:text-5xl",
|
|
928
|
+
titleClassName
|
|
929
|
+
),
|
|
930
|
+
children: title
|
|
931
|
+
}
|
|
932
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
933
|
+
"div",
|
|
934
|
+
{
|
|
935
|
+
className: cn(
|
|
936
|
+
"my-6 mt-0 text-4xl font-semibold text-balance lg:text-5xl",
|
|
937
|
+
titleClassName
|
|
938
|
+
),
|
|
939
|
+
children: title
|
|
940
|
+
}
|
|
941
|
+
)),
|
|
942
|
+
description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
943
|
+
"p",
|
|
944
|
+
{
|
|
945
|
+
className: cn("mb-8 max-w-xl lg:text-lg", descriptionClassName),
|
|
946
|
+
children: description
|
|
947
|
+
}
|
|
948
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
949
|
+
"div",
|
|
950
|
+
{
|
|
951
|
+
className: cn("mb-8 max-w-xl lg:text-lg", descriptionClassName),
|
|
952
|
+
children: description
|
|
953
|
+
}
|
|
954
|
+
)),
|
|
955
|
+
(actionsSlot || actions && actions.length > 0) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
956
|
+
"div",
|
|
957
|
+
{
|
|
958
|
+
className: cn(
|
|
959
|
+
"flex w-full flex-col justify-center gap-2 sm:flex-row lg:justify-start",
|
|
960
|
+
actionsClassName
|
|
961
|
+
),
|
|
962
|
+
children: actionsContent
|
|
963
|
+
}
|
|
964
|
+
)
|
|
965
|
+
]
|
|
966
|
+
}
|
|
967
|
+
)
|
|
968
|
+
]
|
|
969
|
+
}
|
|
970
|
+
)
|
|
902
971
|
}
|
|
903
972
|
);
|
|
904
973
|
}
|
|
@@ -822,7 +822,7 @@ function FeatureSplitImageReverse({
|
|
|
822
822
|
actionsClassName,
|
|
823
823
|
optixFlowConfig,
|
|
824
824
|
background,
|
|
825
|
-
spacing,
|
|
825
|
+
spacing = "py-6 md:py-32",
|
|
826
826
|
pattern,
|
|
827
827
|
patternOpacity,
|
|
828
828
|
patternClassName
|
|
@@ -839,11 +839,20 @@ function FeatureSplitImageReverse({
|
|
|
839
839
|
className: actionClassName,
|
|
840
840
|
...pressableProps
|
|
841
841
|
} = action;
|
|
842
|
-
return /* @__PURE__ */ jsx(
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
842
|
+
return /* @__PURE__ */ jsx(
|
|
843
|
+
Pressable,
|
|
844
|
+
{
|
|
845
|
+
className: actionClassName,
|
|
846
|
+
asButton: true,
|
|
847
|
+
...pressableProps,
|
|
848
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
849
|
+
icon,
|
|
850
|
+
label,
|
|
851
|
+
iconAfter
|
|
852
|
+
] })
|
|
853
|
+
},
|
|
854
|
+
index
|
|
855
|
+
);
|
|
847
856
|
});
|
|
848
857
|
}, [actionsSlot, actions]);
|
|
849
858
|
const imageContent = useMemo(() => {
|
|
@@ -854,7 +863,10 @@ function FeatureSplitImageReverse({
|
|
|
854
863
|
{
|
|
855
864
|
src: imageSrc,
|
|
856
865
|
alt: imageAlt || "",
|
|
857
|
-
className: cn(
|
|
866
|
+
className: cn(
|
|
867
|
+
"max-h-96 w-full rounded-md object-cover",
|
|
868
|
+
imageClassName
|
|
869
|
+
),
|
|
858
870
|
loading: "lazy",
|
|
859
871
|
optixFlowConfig
|
|
860
872
|
}
|
|
@@ -870,14 +882,71 @@ function FeatureSplitImageReverse({
|
|
|
870
882
|
patternClassName,
|
|
871
883
|
className,
|
|
872
884
|
containerClassName,
|
|
873
|
-
children: /* @__PURE__ */ jsxs(
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
885
|
+
children: /* @__PURE__ */ jsxs(
|
|
886
|
+
"div",
|
|
887
|
+
{
|
|
888
|
+
className: cn(
|
|
889
|
+
"grid items-center gap-8 md:gap-16 lg:grid-cols-2",
|
|
890
|
+
gridClassName
|
|
891
|
+
),
|
|
892
|
+
children: [
|
|
893
|
+
imageContent,
|
|
894
|
+
/* @__PURE__ */ jsxs(
|
|
895
|
+
"div",
|
|
896
|
+
{
|
|
897
|
+
className: cn(
|
|
898
|
+
"flex flex-col items-center text-center lg:items-start lg:text-left",
|
|
899
|
+
contentClassName
|
|
900
|
+
),
|
|
901
|
+
children: [
|
|
902
|
+
title && (typeof title === "string" ? /* @__PURE__ */ jsx(
|
|
903
|
+
"h2",
|
|
904
|
+
{
|
|
905
|
+
className: cn(
|
|
906
|
+
"my-6 mt-0 text-4xl font-semibold text-balance lg:text-5xl",
|
|
907
|
+
titleClassName
|
|
908
|
+
),
|
|
909
|
+
children: title
|
|
910
|
+
}
|
|
911
|
+
) : /* @__PURE__ */ jsx(
|
|
912
|
+
"div",
|
|
913
|
+
{
|
|
914
|
+
className: cn(
|
|
915
|
+
"my-6 mt-0 text-4xl font-semibold text-balance lg:text-5xl",
|
|
916
|
+
titleClassName
|
|
917
|
+
),
|
|
918
|
+
children: title
|
|
919
|
+
}
|
|
920
|
+
)),
|
|
921
|
+
description && (typeof description === "string" ? /* @__PURE__ */ jsx(
|
|
922
|
+
"p",
|
|
923
|
+
{
|
|
924
|
+
className: cn("mb-8 max-w-xl lg:text-lg", descriptionClassName),
|
|
925
|
+
children: description
|
|
926
|
+
}
|
|
927
|
+
) : /* @__PURE__ */ jsx(
|
|
928
|
+
"div",
|
|
929
|
+
{
|
|
930
|
+
className: cn("mb-8 max-w-xl lg:text-lg", descriptionClassName),
|
|
931
|
+
children: description
|
|
932
|
+
}
|
|
933
|
+
)),
|
|
934
|
+
(actionsSlot || actions && actions.length > 0) && /* @__PURE__ */ jsx(
|
|
935
|
+
"div",
|
|
936
|
+
{
|
|
937
|
+
className: cn(
|
|
938
|
+
"flex w-full flex-col justify-center gap-2 sm:flex-row lg:justify-start",
|
|
939
|
+
actionsClassName
|
|
940
|
+
),
|
|
941
|
+
children: actionsContent
|
|
942
|
+
}
|
|
943
|
+
)
|
|
944
|
+
]
|
|
945
|
+
}
|
|
946
|
+
)
|
|
947
|
+
]
|
|
948
|
+
}
|
|
949
|
+
)
|
|
881
950
|
}
|
|
882
951
|
);
|
|
883
952
|
}
|