@opensite/ui 2.3.9 → 2.4.1
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/about-mission-dual-image.cjs +2 -2
- package/dist/about-mission-dual-image.js +2 -2
- package/dist/about-streamline-team.cjs +3 -2
- package/dist/about-streamline-team.js +3 -2
- package/dist/feature-animated-carousel.cjs +94 -55
- package/dist/feature-animated-carousel.js +88 -49
- package/dist/feature-image-cards-three-column.cjs +172 -80
- package/dist/feature-image-cards-three-column.d.cts +17 -28
- package/dist/feature-image-cards-three-column.d.ts +17 -28
- package/dist/feature-image-cards-three-column.js +172 -80
- package/dist/registry.cjs +185 -117
- package/dist/registry.js +185 -117
- package/package.json +1 -1
|
@@ -919,7 +919,7 @@ function AboutMissionDualImage({
|
|
|
919
919
|
if (!primaryHeading || !secondaryContent) {
|
|
920
920
|
return null;
|
|
921
921
|
}
|
|
922
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-start gap-
|
|
922
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-start gap-2 md:gap-4", children: [
|
|
923
923
|
primaryHeading && (typeof primaryHeading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
924
924
|
"h2",
|
|
925
925
|
{
|
|
@@ -930,7 +930,7 @@ function AboutMissionDualImage({
|
|
|
930
930
|
children: primaryHeading
|
|
931
931
|
}
|
|
932
932
|
) : primaryHeading),
|
|
933
|
-
secondaryContent && (typeof secondaryContent === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("
|
|
933
|
+
secondaryContent && (typeof secondaryContent === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-base md:text-lg", secondaryClassname), children: secondaryContent }) : secondaryContent)
|
|
934
934
|
] });
|
|
935
935
|
},
|
|
936
936
|
[]
|
|
@@ -898,7 +898,7 @@ function AboutMissionDualImage({
|
|
|
898
898
|
if (!primaryHeading || !secondaryContent) {
|
|
899
899
|
return null;
|
|
900
900
|
}
|
|
901
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-start gap-
|
|
901
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-start gap-2 md:gap-4", children: [
|
|
902
902
|
primaryHeading && (typeof primaryHeading === "string" ? /* @__PURE__ */ jsx(
|
|
903
903
|
"h2",
|
|
904
904
|
{
|
|
@@ -909,7 +909,7 @@ function AboutMissionDualImage({
|
|
|
909
909
|
children: primaryHeading
|
|
910
910
|
}
|
|
911
911
|
) : primaryHeading),
|
|
912
|
-
secondaryContent && (typeof secondaryContent === "string" ? /* @__PURE__ */ jsx("p", { className: cn("
|
|
912
|
+
secondaryContent && (typeof secondaryContent === "string" ? /* @__PURE__ */ jsx("p", { className: cn("text-base md:text-lg", secondaryClassname), children: secondaryContent }) : secondaryContent)
|
|
913
913
|
] });
|
|
914
914
|
},
|
|
915
915
|
[]
|
|
@@ -979,7 +979,7 @@ function AboutStreamlineTeam({
|
|
|
979
979
|
}
|
|
980
980
|
)
|
|
981
981
|
] }),
|
|
982
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pl-0 md:pl-8", children: [
|
|
982
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pl-0 md:pl-8 lg:pl-16", children: [
|
|
983
983
|
title && (typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
984
984
|
"h1",
|
|
985
985
|
{
|
|
@@ -1030,7 +1030,8 @@ function AboutStreamlineTeam({
|
|
|
1030
1030
|
{
|
|
1031
1031
|
actions,
|
|
1032
1032
|
actionsSlot,
|
|
1033
|
-
actionsClassName
|
|
1033
|
+
actionsClassName,
|
|
1034
|
+
verticalSpacing: "mt-4 md:mt-0"
|
|
1034
1035
|
}
|
|
1035
1036
|
)
|
|
1036
1037
|
]
|
|
@@ -958,7 +958,7 @@ function AboutStreamlineTeam({
|
|
|
958
958
|
}
|
|
959
959
|
)
|
|
960
960
|
] }),
|
|
961
|
-
/* @__PURE__ */ jsxs("div", { className: "pl-0 md:pl-8", children: [
|
|
961
|
+
/* @__PURE__ */ jsxs("div", { className: "pl-0 md:pl-8 lg:pl-16", children: [
|
|
962
962
|
title && (typeof title === "string" ? /* @__PURE__ */ jsx(
|
|
963
963
|
"h1",
|
|
964
964
|
{
|
|
@@ -1009,7 +1009,8 @@ function AboutStreamlineTeam({
|
|
|
1009
1009
|
{
|
|
1010
1010
|
actions,
|
|
1011
1011
|
actionsSlot,
|
|
1012
|
-
actionsClassName
|
|
1012
|
+
actionsClassName,
|
|
1013
|
+
verticalSpacing: "mt-4 md:mt-0"
|
|
1013
1014
|
}
|
|
1014
1015
|
)
|
|
1015
1016
|
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var React7 = require('react');
|
|
5
5
|
var framerMotion = require('framer-motion');
|
|
6
6
|
var clsx = require('clsx');
|
|
7
7
|
var tailwindMerge = require('tailwind-merge');
|
|
@@ -28,7 +28,7 @@ function _interopNamespace(e) {
|
|
|
28
28
|
return Object.freeze(n);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var React7__namespace = /*#__PURE__*/_interopNamespace(React7);
|
|
32
32
|
|
|
33
33
|
// components/blocks/features/feature-animated-carousel.tsx
|
|
34
34
|
function cn(...inputs) {
|
|
@@ -47,7 +47,7 @@ var maxWidthStyles = {
|
|
|
47
47
|
"4xl": "max-w-[1536px]",
|
|
48
48
|
full: "max-w-full"
|
|
49
49
|
};
|
|
50
|
-
var Container =
|
|
50
|
+
var Container = React7__namespace.default.forwardRef(
|
|
51
51
|
({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
|
|
52
52
|
const Component = as;
|
|
53
53
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -352,7 +352,7 @@ var spacingStyles = {
|
|
|
352
352
|
};
|
|
353
353
|
var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
|
|
354
354
|
var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
|
|
355
|
-
var Section =
|
|
355
|
+
var Section = React7__namespace.default.forwardRef(
|
|
356
356
|
({
|
|
357
357
|
id,
|
|
358
358
|
title,
|
|
@@ -630,7 +630,7 @@ function useNavigation({
|
|
|
630
630
|
href,
|
|
631
631
|
onClick
|
|
632
632
|
} = {}) {
|
|
633
|
-
const linkType =
|
|
633
|
+
const linkType = React7__namespace.useMemo(() => {
|
|
634
634
|
if (!href || href.trim() === "") {
|
|
635
635
|
return onClick ? "none" : "none";
|
|
636
636
|
}
|
|
@@ -651,7 +651,7 @@ function useNavigation({
|
|
|
651
651
|
return "internal";
|
|
652
652
|
}
|
|
653
653
|
}, [href, onClick]);
|
|
654
|
-
const normalizedHref =
|
|
654
|
+
const normalizedHref = React7__namespace.useMemo(() => {
|
|
655
655
|
if (!href || href.trim() === "") {
|
|
656
656
|
return void 0;
|
|
657
657
|
}
|
|
@@ -669,7 +669,7 @@ function useNavigation({
|
|
|
669
669
|
return trimmed;
|
|
670
670
|
}
|
|
671
671
|
}, [href, linkType]);
|
|
672
|
-
const target =
|
|
672
|
+
const target = React7__namespace.useMemo(() => {
|
|
673
673
|
switch (linkType) {
|
|
674
674
|
case "external":
|
|
675
675
|
return "_blank";
|
|
@@ -682,7 +682,7 @@ function useNavigation({
|
|
|
682
682
|
return void 0;
|
|
683
683
|
}
|
|
684
684
|
}, [linkType]);
|
|
685
|
-
const rel =
|
|
685
|
+
const rel = React7__namespace.useMemo(() => {
|
|
686
686
|
if (linkType === "external") {
|
|
687
687
|
return "noopener noreferrer";
|
|
688
688
|
}
|
|
@@ -691,7 +691,7 @@ function useNavigation({
|
|
|
691
691
|
const isExternal = linkType === "external";
|
|
692
692
|
const isInternal = linkType === "internal";
|
|
693
693
|
const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
|
|
694
|
-
const handleClick =
|
|
694
|
+
const handleClick = React7__namespace.useCallback(
|
|
695
695
|
(event) => {
|
|
696
696
|
if (onClick) {
|
|
697
697
|
try {
|
|
@@ -733,7 +733,7 @@ function useNavigation({
|
|
|
733
733
|
handleClick
|
|
734
734
|
};
|
|
735
735
|
}
|
|
736
|
-
var Pressable =
|
|
736
|
+
var Pressable = React7__namespace.forwardRef(
|
|
737
737
|
({
|
|
738
738
|
children,
|
|
739
739
|
className,
|
|
@@ -831,7 +831,39 @@ var Pressable = React5__namespace.forwardRef(
|
|
|
831
831
|
}
|
|
832
832
|
);
|
|
833
833
|
Pressable.displayName = "Pressable";
|
|
834
|
-
|
|
834
|
+
function TextInner({ as, className, children, ...props }, ref) {
|
|
835
|
+
const Component = as || "span";
|
|
836
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Component, { ref, className: cn(className), ...props, children });
|
|
837
|
+
}
|
|
838
|
+
var Text = React7__namespace.forwardRef(TextInner);
|
|
839
|
+
Text.displayName = "Text";
|
|
840
|
+
function isContentTextItem(item) {
|
|
841
|
+
return item !== null && typeof item === "object" && !React7__namespace.isValidElement(item) && "_type" in item && item._type === "text";
|
|
842
|
+
}
|
|
843
|
+
var ContentGroup = React7__namespace.forwardRef(
|
|
844
|
+
({ items, className, children, ...props }, ref) => {
|
|
845
|
+
const hasContent = items && items.length > 0;
|
|
846
|
+
if (!hasContent) {
|
|
847
|
+
return null;
|
|
848
|
+
}
|
|
849
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn(className), ...props, children: [
|
|
850
|
+
items.map((item, idx) => {
|
|
851
|
+
if (isContentTextItem(item)) {
|
|
852
|
+
const { _type, ...textProps } = item;
|
|
853
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Text, { ...textProps }, idx);
|
|
854
|
+
}
|
|
855
|
+
const reactNode = item;
|
|
856
|
+
if (React7__namespace.isValidElement(reactNode)) {
|
|
857
|
+
return React7__namespace.cloneElement(reactNode, { key: reactNode.key ?? idx });
|
|
858
|
+
}
|
|
859
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React7__namespace.Fragment, { children: reactNode }, idx);
|
|
860
|
+
}),
|
|
861
|
+
children
|
|
862
|
+
] });
|
|
863
|
+
}
|
|
864
|
+
);
|
|
865
|
+
ContentGroup.displayName = "ContentGroup";
|
|
866
|
+
var Controls = React7__namespace.memo(
|
|
835
867
|
({
|
|
836
868
|
handleNext,
|
|
837
869
|
handlePrevious,
|
|
@@ -862,9 +894,9 @@ var Controls = React5__namespace.memo(
|
|
|
862
894
|
] });
|
|
863
895
|
}
|
|
864
896
|
);
|
|
865
|
-
var FeatureCard =
|
|
897
|
+
var FeatureCard = React7__namespace.memo(
|
|
866
898
|
({ feature, isActive, onClick }) => {
|
|
867
|
-
const variants =
|
|
899
|
+
const variants = React7.useMemo(
|
|
868
900
|
() => ({
|
|
869
901
|
initial: {
|
|
870
902
|
opacity: 0
|
|
@@ -970,7 +1002,7 @@ var FeatureCard = React5__namespace.memo(
|
|
|
970
1002
|
) });
|
|
971
1003
|
}
|
|
972
1004
|
);
|
|
973
|
-
var FeaturesDesktop =
|
|
1005
|
+
var FeaturesDesktop = React7__namespace.memo(
|
|
974
1006
|
({
|
|
975
1007
|
features,
|
|
976
1008
|
handleNext,
|
|
@@ -1004,7 +1036,7 @@ var FeaturesDesktop = React5__namespace.memo(
|
|
|
1004
1036
|
] });
|
|
1005
1037
|
}
|
|
1006
1038
|
);
|
|
1007
|
-
var FeaturesMobile =
|
|
1039
|
+
var FeaturesMobile = React7__namespace.memo(
|
|
1008
1040
|
({
|
|
1009
1041
|
features,
|
|
1010
1042
|
handleNext,
|
|
@@ -1014,7 +1046,7 @@ var FeaturesMobile = React5__namespace.memo(
|
|
|
1014
1046
|
isPreviousDisabled,
|
|
1015
1047
|
isNextDisabled
|
|
1016
1048
|
}) => {
|
|
1017
|
-
const variants =
|
|
1049
|
+
const variants = React7.useMemo(
|
|
1018
1050
|
() => ({
|
|
1019
1051
|
enter: (direction2) => ({
|
|
1020
1052
|
x: direction2 > 0 ? 100 : -100,
|
|
@@ -1095,21 +1127,21 @@ function FeatureAnimatedCarousel({
|
|
|
1095
1127
|
spacing = "py-12 md:py-32",
|
|
1096
1128
|
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8"
|
|
1097
1129
|
}) {
|
|
1098
|
-
const [activeIndex, setActiveIndex] =
|
|
1099
|
-
const [direction, setDirection] =
|
|
1100
|
-
const handleNext =
|
|
1130
|
+
const [activeIndex, setActiveIndex] = React7__namespace.useState(0);
|
|
1131
|
+
const [direction, setDirection] = React7__namespace.useState(1);
|
|
1132
|
+
const handleNext = React7.useCallback(() => {
|
|
1101
1133
|
if (features && activeIndex < features.length - 1) {
|
|
1102
1134
|
setDirection(1);
|
|
1103
1135
|
setActiveIndex(activeIndex + 1);
|
|
1104
1136
|
}
|
|
1105
1137
|
}, [activeIndex, features]);
|
|
1106
|
-
const handlePrevious =
|
|
1138
|
+
const handlePrevious = React7.useCallback(() => {
|
|
1107
1139
|
if (activeIndex > 0) {
|
|
1108
1140
|
setDirection(-1);
|
|
1109
1141
|
setActiveIndex(activeIndex - 1);
|
|
1110
1142
|
}
|
|
1111
1143
|
}, [activeIndex]);
|
|
1112
|
-
const handleFeatureClick =
|
|
1144
|
+
const handleFeatureClick = React7.useCallback(
|
|
1113
1145
|
(index) => {
|
|
1114
1146
|
setDirection(index > activeIndex ? 1 : -1);
|
|
1115
1147
|
setActiveIndex(index);
|
|
@@ -1118,7 +1150,7 @@ function FeatureAnimatedCarousel({
|
|
|
1118
1150
|
);
|
|
1119
1151
|
const isPreviousDisabled = activeIndex === 0;
|
|
1120
1152
|
const isNextDisabled = !features || activeIndex === features.length - 1;
|
|
1121
|
-
const imageVariants =
|
|
1153
|
+
const imageVariants = React7.useMemo(
|
|
1122
1154
|
() => ({
|
|
1123
1155
|
enter: (direction2) => ({
|
|
1124
1156
|
x: direction2 > 0 ? 300 : -300,
|
|
@@ -1158,6 +1190,40 @@ function FeatureAnimatedCarousel({
|
|
|
1158
1190
|
);
|
|
1159
1191
|
}
|
|
1160
1192
|
const currentFeature = features[activeIndex];
|
|
1193
|
+
const contentItems = React7.useMemo(() => {
|
|
1194
|
+
const items = [];
|
|
1195
|
+
if (title) {
|
|
1196
|
+
if (typeof title === "string") {
|
|
1197
|
+
items.push({
|
|
1198
|
+
_type: "text",
|
|
1199
|
+
as: "h2",
|
|
1200
|
+
className: cn(
|
|
1201
|
+
"text-3xl font-semibold text-balance md:text-4xl lg:text-5xl max-w-full md:max-w-md",
|
|
1202
|
+
title
|
|
1203
|
+
),
|
|
1204
|
+
children: title
|
|
1205
|
+
});
|
|
1206
|
+
} else {
|
|
1207
|
+
items.push(title);
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
if (description) {
|
|
1211
|
+
if (typeof description === "string") {
|
|
1212
|
+
items.push({
|
|
1213
|
+
_type: "text",
|
|
1214
|
+
as: "p",
|
|
1215
|
+
className: cn(
|
|
1216
|
+
"text-xl max-w-full md:max-w-md text-balance",
|
|
1217
|
+
descriptionClassName
|
|
1218
|
+
),
|
|
1219
|
+
children: description
|
|
1220
|
+
});
|
|
1221
|
+
} else {
|
|
1222
|
+
items.push(description);
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
return items;
|
|
1226
|
+
}, [title, titleClassName, description, descriptionClassName]);
|
|
1161
1227
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1162
1228
|
Section,
|
|
1163
1229
|
{
|
|
@@ -1169,43 +1235,16 @@ function FeatureAnimatedCarousel({
|
|
|
1169
1235
|
className,
|
|
1170
1236
|
containerClassName,
|
|
1171
1237
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col space-y-6 md:space-y-16", children: [
|
|
1172
|
-
|
|
1173
|
-
|
|
1238
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1239
|
+
ContentGroup,
|
|
1174
1240
|
{
|
|
1241
|
+
items: contentItems,
|
|
1175
1242
|
className: cn(
|
|
1176
|
-
"flex flex-col gap-
|
|
1243
|
+
"flex flex-col gap-2 text-left items-start",
|
|
1177
1244
|
headerClassName
|
|
1178
|
-
)
|
|
1179
|
-
children: [
|
|
1180
|
-
title && (typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1181
|
-
"h2",
|
|
1182
|
-
{
|
|
1183
|
-
className: cn(
|
|
1184
|
-
"text-xl font-semibold text-balance md:text-2xl lg:text-3xl max-w-lg md:max-w-md",
|
|
1185
|
-
titleClassName
|
|
1186
|
-
),
|
|
1187
|
-
children: title
|
|
1188
|
-
}
|
|
1189
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1190
|
-
"div",
|
|
1191
|
-
{
|
|
1192
|
-
className: cn(
|
|
1193
|
-
"text-xl font-semibold text-balance md:text-2xl lg:text-3xl max-w-lg md:max-w-md",
|
|
1194
|
-
titleClassName
|
|
1195
|
-
),
|
|
1196
|
-
children: title
|
|
1197
|
-
}
|
|
1198
|
-
)),
|
|
1199
|
-
description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("max-w-lg md:max-w-md", descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1200
|
-
"div",
|
|
1201
|
-
{
|
|
1202
|
-
className: cn("max-w-lg md:max-w-md", descriptionClassName),
|
|
1203
|
-
children: description
|
|
1204
|
-
}
|
|
1205
|
-
))
|
|
1206
|
-
]
|
|
1245
|
+
)
|
|
1207
1246
|
}
|
|
1208
|
-
)
|
|
1247
|
+
),
|
|
1209
1248
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1210
1249
|
"div",
|
|
1211
1250
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as React7 from 'react';
|
|
3
|
+
import React7__default, { useMemo, useCallback } from 'react';
|
|
4
4
|
import { AnimatePresence, motion } from 'framer-motion';
|
|
5
5
|
import { clsx } from 'clsx';
|
|
6
6
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -26,7 +26,7 @@ var maxWidthStyles = {
|
|
|
26
26
|
"4xl": "max-w-[1536px]",
|
|
27
27
|
full: "max-w-full"
|
|
28
28
|
};
|
|
29
|
-
var Container =
|
|
29
|
+
var Container = React7__default.forwardRef(
|
|
30
30
|
({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
|
|
31
31
|
const Component = as;
|
|
32
32
|
return /* @__PURE__ */ jsx(
|
|
@@ -331,7 +331,7 @@ var spacingStyles = {
|
|
|
331
331
|
};
|
|
332
332
|
var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
|
|
333
333
|
var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
|
|
334
|
-
var Section =
|
|
334
|
+
var Section = React7__default.forwardRef(
|
|
335
335
|
({
|
|
336
336
|
id,
|
|
337
337
|
title,
|
|
@@ -609,7 +609,7 @@ function useNavigation({
|
|
|
609
609
|
href,
|
|
610
610
|
onClick
|
|
611
611
|
} = {}) {
|
|
612
|
-
const linkType =
|
|
612
|
+
const linkType = React7.useMemo(() => {
|
|
613
613
|
if (!href || href.trim() === "") {
|
|
614
614
|
return onClick ? "none" : "none";
|
|
615
615
|
}
|
|
@@ -630,7 +630,7 @@ function useNavigation({
|
|
|
630
630
|
return "internal";
|
|
631
631
|
}
|
|
632
632
|
}, [href, onClick]);
|
|
633
|
-
const normalizedHref =
|
|
633
|
+
const normalizedHref = React7.useMemo(() => {
|
|
634
634
|
if (!href || href.trim() === "") {
|
|
635
635
|
return void 0;
|
|
636
636
|
}
|
|
@@ -648,7 +648,7 @@ function useNavigation({
|
|
|
648
648
|
return trimmed;
|
|
649
649
|
}
|
|
650
650
|
}, [href, linkType]);
|
|
651
|
-
const target =
|
|
651
|
+
const target = React7.useMemo(() => {
|
|
652
652
|
switch (linkType) {
|
|
653
653
|
case "external":
|
|
654
654
|
return "_blank";
|
|
@@ -661,7 +661,7 @@ function useNavigation({
|
|
|
661
661
|
return void 0;
|
|
662
662
|
}
|
|
663
663
|
}, [linkType]);
|
|
664
|
-
const rel =
|
|
664
|
+
const rel = React7.useMemo(() => {
|
|
665
665
|
if (linkType === "external") {
|
|
666
666
|
return "noopener noreferrer";
|
|
667
667
|
}
|
|
@@ -670,7 +670,7 @@ function useNavigation({
|
|
|
670
670
|
const isExternal = linkType === "external";
|
|
671
671
|
const isInternal = linkType === "internal";
|
|
672
672
|
const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
|
|
673
|
-
const handleClick =
|
|
673
|
+
const handleClick = React7.useCallback(
|
|
674
674
|
(event) => {
|
|
675
675
|
if (onClick) {
|
|
676
676
|
try {
|
|
@@ -712,7 +712,7 @@ function useNavigation({
|
|
|
712
712
|
handleClick
|
|
713
713
|
};
|
|
714
714
|
}
|
|
715
|
-
var Pressable =
|
|
715
|
+
var Pressable = React7.forwardRef(
|
|
716
716
|
({
|
|
717
717
|
children,
|
|
718
718
|
className,
|
|
@@ -810,7 +810,39 @@ var Pressable = React5.forwardRef(
|
|
|
810
810
|
}
|
|
811
811
|
);
|
|
812
812
|
Pressable.displayName = "Pressable";
|
|
813
|
-
|
|
813
|
+
function TextInner({ as, className, children, ...props }, ref) {
|
|
814
|
+
const Component = as || "span";
|
|
815
|
+
return /* @__PURE__ */ jsx(Component, { ref, className: cn(className), ...props, children });
|
|
816
|
+
}
|
|
817
|
+
var Text = React7.forwardRef(TextInner);
|
|
818
|
+
Text.displayName = "Text";
|
|
819
|
+
function isContentTextItem(item) {
|
|
820
|
+
return item !== null && typeof item === "object" && !React7.isValidElement(item) && "_type" in item && item._type === "text";
|
|
821
|
+
}
|
|
822
|
+
var ContentGroup = React7.forwardRef(
|
|
823
|
+
({ items, className, children, ...props }, ref) => {
|
|
824
|
+
const hasContent = items && items.length > 0;
|
|
825
|
+
if (!hasContent) {
|
|
826
|
+
return null;
|
|
827
|
+
}
|
|
828
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: cn(className), ...props, children: [
|
|
829
|
+
items.map((item, idx) => {
|
|
830
|
+
if (isContentTextItem(item)) {
|
|
831
|
+
const { _type, ...textProps } = item;
|
|
832
|
+
return /* @__PURE__ */ jsx(Text, { ...textProps }, idx);
|
|
833
|
+
}
|
|
834
|
+
const reactNode = item;
|
|
835
|
+
if (React7.isValidElement(reactNode)) {
|
|
836
|
+
return React7.cloneElement(reactNode, { key: reactNode.key ?? idx });
|
|
837
|
+
}
|
|
838
|
+
return /* @__PURE__ */ jsx(React7.Fragment, { children: reactNode }, idx);
|
|
839
|
+
}),
|
|
840
|
+
children
|
|
841
|
+
] });
|
|
842
|
+
}
|
|
843
|
+
);
|
|
844
|
+
ContentGroup.displayName = "ContentGroup";
|
|
845
|
+
var Controls = React7.memo(
|
|
814
846
|
({
|
|
815
847
|
handleNext,
|
|
816
848
|
handlePrevious,
|
|
@@ -841,7 +873,7 @@ var Controls = React5.memo(
|
|
|
841
873
|
] });
|
|
842
874
|
}
|
|
843
875
|
);
|
|
844
|
-
var FeatureCard =
|
|
876
|
+
var FeatureCard = React7.memo(
|
|
845
877
|
({ feature, isActive, onClick }) => {
|
|
846
878
|
const variants = useMemo(
|
|
847
879
|
() => ({
|
|
@@ -949,7 +981,7 @@ var FeatureCard = React5.memo(
|
|
|
949
981
|
) });
|
|
950
982
|
}
|
|
951
983
|
);
|
|
952
|
-
var FeaturesDesktop =
|
|
984
|
+
var FeaturesDesktop = React7.memo(
|
|
953
985
|
({
|
|
954
986
|
features,
|
|
955
987
|
handleNext,
|
|
@@ -983,7 +1015,7 @@ var FeaturesDesktop = React5.memo(
|
|
|
983
1015
|
] });
|
|
984
1016
|
}
|
|
985
1017
|
);
|
|
986
|
-
var FeaturesMobile =
|
|
1018
|
+
var FeaturesMobile = React7.memo(
|
|
987
1019
|
({
|
|
988
1020
|
features,
|
|
989
1021
|
handleNext,
|
|
@@ -1074,8 +1106,8 @@ function FeatureAnimatedCarousel({
|
|
|
1074
1106
|
spacing = "py-12 md:py-32",
|
|
1075
1107
|
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8"
|
|
1076
1108
|
}) {
|
|
1077
|
-
const [activeIndex, setActiveIndex] =
|
|
1078
|
-
const [direction, setDirection] =
|
|
1109
|
+
const [activeIndex, setActiveIndex] = React7.useState(0);
|
|
1110
|
+
const [direction, setDirection] = React7.useState(1);
|
|
1079
1111
|
const handleNext = useCallback(() => {
|
|
1080
1112
|
if (features && activeIndex < features.length - 1) {
|
|
1081
1113
|
setDirection(1);
|
|
@@ -1137,6 +1169,40 @@ function FeatureAnimatedCarousel({
|
|
|
1137
1169
|
);
|
|
1138
1170
|
}
|
|
1139
1171
|
const currentFeature = features[activeIndex];
|
|
1172
|
+
const contentItems = useMemo(() => {
|
|
1173
|
+
const items = [];
|
|
1174
|
+
if (title) {
|
|
1175
|
+
if (typeof title === "string") {
|
|
1176
|
+
items.push({
|
|
1177
|
+
_type: "text",
|
|
1178
|
+
as: "h2",
|
|
1179
|
+
className: cn(
|
|
1180
|
+
"text-3xl font-semibold text-balance md:text-4xl lg:text-5xl max-w-full md:max-w-md",
|
|
1181
|
+
title
|
|
1182
|
+
),
|
|
1183
|
+
children: title
|
|
1184
|
+
});
|
|
1185
|
+
} else {
|
|
1186
|
+
items.push(title);
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
if (description) {
|
|
1190
|
+
if (typeof description === "string") {
|
|
1191
|
+
items.push({
|
|
1192
|
+
_type: "text",
|
|
1193
|
+
as: "p",
|
|
1194
|
+
className: cn(
|
|
1195
|
+
"text-xl max-w-full md:max-w-md text-balance",
|
|
1196
|
+
descriptionClassName
|
|
1197
|
+
),
|
|
1198
|
+
children: description
|
|
1199
|
+
});
|
|
1200
|
+
} else {
|
|
1201
|
+
items.push(description);
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
return items;
|
|
1205
|
+
}, [title, titleClassName, description, descriptionClassName]);
|
|
1140
1206
|
return /* @__PURE__ */ jsx(
|
|
1141
1207
|
Section,
|
|
1142
1208
|
{
|
|
@@ -1148,43 +1214,16 @@ function FeatureAnimatedCarousel({
|
|
|
1148
1214
|
className,
|
|
1149
1215
|
containerClassName,
|
|
1150
1216
|
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col space-y-6 md:space-y-16", children: [
|
|
1151
|
-
|
|
1152
|
-
|
|
1217
|
+
/* @__PURE__ */ jsx(
|
|
1218
|
+
ContentGroup,
|
|
1153
1219
|
{
|
|
1220
|
+
items: contentItems,
|
|
1154
1221
|
className: cn(
|
|
1155
|
-
"flex flex-col gap-
|
|
1222
|
+
"flex flex-col gap-2 text-left items-start",
|
|
1156
1223
|
headerClassName
|
|
1157
|
-
)
|
|
1158
|
-
children: [
|
|
1159
|
-
title && (typeof title === "string" ? /* @__PURE__ */ jsx(
|
|
1160
|
-
"h2",
|
|
1161
|
-
{
|
|
1162
|
-
className: cn(
|
|
1163
|
-
"text-xl font-semibold text-balance md:text-2xl lg:text-3xl max-w-lg md:max-w-md",
|
|
1164
|
-
titleClassName
|
|
1165
|
-
),
|
|
1166
|
-
children: title
|
|
1167
|
-
}
|
|
1168
|
-
) : /* @__PURE__ */ jsx(
|
|
1169
|
-
"div",
|
|
1170
|
-
{
|
|
1171
|
-
className: cn(
|
|
1172
|
-
"text-xl font-semibold text-balance md:text-2xl lg:text-3xl max-w-lg md:max-w-md",
|
|
1173
|
-
titleClassName
|
|
1174
|
-
),
|
|
1175
|
-
children: title
|
|
1176
|
-
}
|
|
1177
|
-
)),
|
|
1178
|
-
description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("max-w-lg md:max-w-md", descriptionClassName), children: description }) : /* @__PURE__ */ jsx(
|
|
1179
|
-
"div",
|
|
1180
|
-
{
|
|
1181
|
-
className: cn("max-w-lg md:max-w-md", descriptionClassName),
|
|
1182
|
-
children: description
|
|
1183
|
-
}
|
|
1184
|
-
))
|
|
1185
|
-
]
|
|
1224
|
+
)
|
|
1186
1225
|
}
|
|
1187
|
-
)
|
|
1226
|
+
),
|
|
1188
1227
|
/* @__PURE__ */ jsxs(
|
|
1189
1228
|
"div",
|
|
1190
1229
|
{
|