setIsFlipped(!isFlipped)}
- >
-
+
+
);
-};
-
-interface FeatureCardTwentySevenProps {
- features: FeatureCard[];
- carouselMode?: "auto" | "buttons";
- gridVariant: GridVariant;
- uniformGridCustomHeightClasses?: string;
- animationType: CardAnimationType;
- title: string;
- titleSegments?: TitleSegment[];
- description: string;
- tag?: string;
- tagIcon?: LucideIcon;
- tagAnimation?: ButtonAnimationType;
- buttons?: ButtonConfig[];
- buttonAnimation?: ButtonAnimationType;
- textboxLayout: TextboxLayout;
- useInvertedBackground: InvertedBackground;
- ariaLabel?: string;
- className?: string;
- containerClassName?: string;
- cardClassName?: string;
- textBoxTitleClassName?: string;
- textBoxTitleImageWrapperClassName?: string;
- textBoxTitleImageClassName?: string;
- textBoxDescriptionClassName?: string;
- cardTitleClassName?: string;
- cardDescriptionClassName?: string;
- gridClassName?: string;
- carouselClassName?: string;
- controlsClassName?: string;
- textBoxClassName?: string;
- textBoxTagClassName?: string;
- textBoxButtonContainerClassName?: string;
- textBoxButtonClassName?: string;
- textBoxButtonTextClassName?: string;
}
-
-const FeatureCardTwentySeven = ({
- features,
- carouselMode = "buttons",
- gridVariant,
- uniformGridCustomHeightClasses = "min-h-none",
- animationType,
- title,
- titleSegments,
- description,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- textboxLayout,
- useInvertedBackground,
- ariaLabel = "Feature section",
- className = "",
- containerClassName = "",
- cardClassName = "",
- textBoxTitleClassName = "",
- textBoxTitleImageWrapperClassName = "",
- textBoxTitleImageClassName = "",
- textBoxDescriptionClassName = "",
- cardTitleClassName = "",
- cardDescriptionClassName = "",
- gridClassName = "",
- carouselClassName = "",
- controlsClassName = "",
- textBoxClassName = "",
- textBoxTagClassName = "",
- textBoxButtonContainerClassName = "",
- textBoxButtonClassName = "",
- textBoxButtonTextClassName = "",
-}: FeatureCardTwentySevenProps) => {
- return (
-
- {features.map((feature, index) => (
-
- ))}
-
- );
-};
-
-FeatureCardTwentySeven.displayName = "FeatureCardTwentySeven";
-
-export default FeatureCardTwentySeven;
diff --git a/src/components/sections/feature/FeatureCardTwentyThree.tsx b/src/components/sections/feature/FeatureCardTwentyThree.tsx
index 0fd43d2..249dbc0 100644
--- a/src/components/sections/feature/FeatureCardTwentyThree.tsx
+++ b/src/components/sections/feature/FeatureCardTwentyThree.tsx
@@ -1,241 +1,11 @@
-"use client";
+import { useCardAnimation } from '@/components/cardStack/CardStack';
-import { memo } from "react";
-import { ArrowRight } from "lucide-react";
-import CardStack from "@/components/cardStack/CardStack";
-import MediaContent from "@/components/shared/MediaContent";
-import Tag from "@/components/shared/Tag";
-import { cls, shouldUseInvertedText } from "@/lib/utils";
-import { useTheme } from "@/providers/themeProvider/ThemeProvider";
-import type { LucideIcon } from "lucide-react";
-import type { ButtonConfig, CardAnimationType, TitleSegment, ButtonAnimationType } from "@/components/cardStack/types";
-import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants";
+export function FeatureCardTwentyThree() {
+ const { animate } = useCardAnimation();
-type FeatureItem = {
- id: string;
- title: string;
- tags: string[];
- imageSrc?: string;
- videoSrc?: string;
- imageAlt?: string;
- videoAriaLabel?: string;
- onFeatureClick?: () => void;
-};
-
-interface FeatureCardTwentyThreeProps {
- features: FeatureItem[];
- carouselMode?: "auto" | "buttons";
- uniformGridCustomHeightClasses?: string;
- animationType: CardAnimationType;
- title: string;
- titleSegments?: TitleSegment[];
- description: string;
- tag?: string;
- tagIcon?: LucideIcon;
- tagAnimation?: ButtonAnimationType;
- buttons?: ButtonConfig[];
- buttonAnimation?: ButtonAnimationType;
- textboxLayout: TextboxLayout;
- useInvertedBackground: InvertedBackground;
- ariaLabel?: string;
- className?: string;
- containerClassName?: string;
- itemClassName?: string;
- mediaWrapperClassName?: string;
- mediaClassName?: string;
- cardClassName?: string;
- cardTitleClassName?: string;
- tagsContainerClassName?: string;
- tagClassName?: string;
- arrowClassName?: string;
- textBoxTitleClassName?: string;
- textBoxTitleImageWrapperClassName?: string;
- textBoxTitleImageClassName?: string;
- textBoxDescriptionClassName?: string;
- gridClassName?: string;
- carouselClassName?: string;
- controlsClassName?: string;
- textBoxClassName?: string;
- textBoxTagClassName?: string;
- textBoxButtonContainerClassName?: string;
- textBoxButtonClassName?: string;
- textBoxButtonTextClassName?: string;
+ return (
+
+
+
+ );
}
-
-interface FeatureCardItemProps {
- feature: FeatureItem;
- shouldUseLightText: boolean;
- useInvertedBackground: InvertedBackground;
- itemClassName?: string;
- mediaWrapperClassName?: string;
- mediaClassName?: string;
- cardClassName?: string;
- cardTitleClassName?: string;
- tagsContainerClassName?: string;
- tagClassName?: string;
- arrowClassName?: string;
-}
-
-const FeatureCardItem = memo(({
- feature,
- shouldUseLightText,
- useInvertedBackground,
- itemClassName = "",
- mediaWrapperClassName = "",
- mediaClassName = "",
- cardClassName = "",
- cardTitleClassName = "",
- tagsContainerClassName = "",
- tagClassName = "",
- arrowClassName = "",
-}: FeatureCardItemProps) => {
- return (
-
-
-
-
-
-
-
- {feature.title}
-
-
-
-
- {feature.tags.map((tag, index) => (
-
- ))}
-
-
-
-
-
- );
-});
-
-FeatureCardItem.displayName = "FeatureCardItem";
-
-const FeatureCardTwentyThree = ({
- features,
- carouselMode = "buttons",
- uniformGridCustomHeightClasses,
- animationType,
- title,
- titleSegments,
- description,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- textboxLayout,
- useInvertedBackground,
- ariaLabel = "Features section",
- className = "",
- containerClassName = "",
- itemClassName = "",
- mediaWrapperClassName = "",
- mediaClassName = "",
- cardClassName = "",
- cardTitleClassName = "",
- tagsContainerClassName = "",
- tagClassName = "",
- arrowClassName = "",
- textBoxTitleClassName = "",
- textBoxTitleImageWrapperClassName = "",
- textBoxTitleImageClassName = "",
- textBoxDescriptionClassName = "",
- gridClassName = "",
- carouselClassName = "",
- controlsClassName = "",
- textBoxClassName = "",
- textBoxTagClassName = "",
- textBoxButtonContainerClassName = "",
- textBoxButtonClassName = "",
- textBoxButtonTextClassName = "",
-}: FeatureCardTwentyThreeProps) => {
- const theme = useTheme();
- const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle);
- return (
-
- {features.map((feature) => (
-
- ))}
-
- );
-};
-
-FeatureCardTwentyThree.displayName = "FeatureCardTwentyThree";
-
-export default FeatureCardTwentyThree;
diff --git a/src/components/sections/feature/featureBorderGlow/FeatureBorderGlow.tsx b/src/components/sections/feature/featureBorderGlow/FeatureBorderGlow.tsx
index 881a2e5..e31b7a8 100644
--- a/src/components/sections/feature/featureBorderGlow/FeatureBorderGlow.tsx
+++ b/src/components/sections/feature/featureBorderGlow/FeatureBorderGlow.tsx
@@ -1,155 +1,11 @@
-"use client";
+import { useCardAnimation } from '@/components/cardStack/CardStack';
-import CardStack from "@/components/cardStack/CardStack";
-import FeatureBorderGlowItem from "./FeatureBorderGlowItem";
-import { shouldUseInvertedText } from "@/lib/utils";
-import { useTheme } from "@/providers/themeProvider/ThemeProvider";
-import type { LucideIcon } from "lucide-react";
-import type {
- ButtonConfig,
- CardAnimationType,
- TitleSegment,
- ButtonAnimationType,
-} from "@/components/cardStack/types";
-import type {
- TextboxLayout,
- InvertedBackground,
-} from "@/providers/themeProvider/config/constants";
-
-interface FeatureCard {
- icon: LucideIcon;
- title: string;
- description: string;
-}
-
-interface FeatureBorderGlowProps {
- features: FeatureCard[];
- carouselMode?: "auto" | "buttons";
- uniformGridCustomHeightClasses?: string;
- animationType: CardAnimationType;
- title: string;
- titleSegments?: TitleSegment[];
- description: string;
- tag?: string;
- tagIcon?: LucideIcon;
- tagAnimation?: ButtonAnimationType;
- buttons?: ButtonConfig[];
- buttonAnimation?: ButtonAnimationType;
- textboxLayout: TextboxLayout;
- useInvertedBackground: InvertedBackground;
- ariaLabel?: string;
- className?: string;
- containerClassName?: string;
- cardClassName?: string;
- iconContainerClassName?: string;
- iconClassName?: string;
- textBoxTitleClassName?: string;
- textBoxTitleImageWrapperClassName?: string;
- textBoxTitleImageClassName?: string;
- textBoxDescriptionClassName?: string;
- cardTitleClassName?: string;
- cardDescriptionClassName?: string;
- gridClassName?: string;
- carouselClassName?: string;
- controlsClassName?: string;
- textBoxClassName?: string;
- textBoxTagClassName?: string;
- textBoxButtonContainerClassName?: string;
- textBoxButtonClassName?: string;
- textBoxButtonTextClassName?: string;
-}
-
-const FeatureBorderGlow = ({
- features,
- carouselMode = "buttons",
- uniformGridCustomHeightClasses = "min-h-75 2xl:min-h-85",
- animationType,
- title,
- titleSegments,
- description,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- textboxLayout,
- useInvertedBackground,
- ariaLabel = "Feature section",
- className = "",
- containerClassName = "",
- cardClassName = "",
- iconContainerClassName = "",
- iconClassName = "",
- textBoxTitleClassName = "",
- textBoxTitleImageWrapperClassName = "",
- textBoxTitleImageClassName = "",
- textBoxDescriptionClassName = "",
- cardTitleClassName = "",
- cardDescriptionClassName = "",
- gridClassName = "",
- carouselClassName = "",
- controlsClassName = "",
- textBoxClassName = "",
- textBoxTagClassName = "",
- textBoxButtonContainerClassName = "",
- textBoxButtonClassName = "",
- textBoxButtonTextClassName = "",
-}: FeatureBorderGlowProps) => {
- const theme = useTheme();
- const shouldUseLightText = shouldUseInvertedText(
- useInvertedBackground,
- theme.cardStyle
- );
+export function FeatureBorderGlow() {
+ const { animate } = useCardAnimation();
return (
-
- {features.map((feature, index) => (
-
- ))}
-
+
+
+
);
-};
-
-FeatureBorderGlow.displayName = "FeatureBorderGlow";
-
-export default FeatureBorderGlow;
+}
diff --git a/src/components/sections/feature/featureCardThree/FeatureCardThree.tsx b/src/components/sections/feature/featureCardThree/FeatureCardThree.tsx
index 455bc70..f1c4fdc 100644
--- a/src/components/sections/feature/featureCardThree/FeatureCardThree.tsx
+++ b/src/components/sections/feature/featureCardThree/FeatureCardThree.tsx
@@ -1,182 +1,11 @@
-"use client";
+import { useCardAnimation } from '@/components/cardStack/CardStack';
-import "./FeatureCardThree.css";
-import { useRef, useCallback, useState } from "react";
-import CardStack from "@/components/cardStack/CardStack";
-import FeatureCardThreeItem from "./FeatureCardThreeItem";
-import { useDynamicDimensions } from "./useDynamicDimensions";
-import { useClickOutside } from "@/hooks/useClickOutside";
-import type { LucideIcon } from "lucide-react";
-import type { ButtonConfig, GridVariant, CardAnimationType, TitleSegment, ButtonAnimationType } from "@/components/cardStack/types";
-import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants";
-
-type FeatureCard = {
- id: string;
- title: string;
- description: string;
- imageSrc: string;
- imageAlt?: string;
-};
-
-interface FeatureCardThreeProps {
- features: FeatureCard[];
- carouselMode?: "auto" | "buttons";
- gridVariant: GridVariant;
- uniformGridCustomHeightClasses?: string;
- animationType: CardAnimationType;
- title: string;
- titleSegments?: TitleSegment[];
- description: string;
- tag?: string;
- tagIcon?: LucideIcon;
- tagAnimation?: ButtonAnimationType;
- buttons?: ButtonConfig[];
- buttonAnimation?: ButtonAnimationType;
- textboxLayout: TextboxLayout;
- useInvertedBackground: InvertedBackground;
- ariaLabel?: string;
- className?: string;
- containerClassName?: string;
- cardClassName?: string;
- textBoxTitleClassName?: string;
- textBoxTitleImageWrapperClassName?: string;
- textBoxTitleImageClassName?: string;
- textBoxDescriptionClassName?: string;
- cardTitleClassName?: string;
- cardDescriptionClassName?: string;
- gridClassName?: string;
- carouselClassName?: string;
- controlsClassName?: string;
- textBoxClassName?: string;
- textBoxTagClassName?: string;
- textBoxButtonContainerClassName?: string;
- textBoxButtonClassName?: string;
- textBoxButtonTextClassName?: string;
- itemContentClassName?: string;
-}
-
-const FeatureCardThree = ({
- features,
- carouselMode = "buttons",
- gridVariant,
- uniformGridCustomHeightClasses,
- animationType,
- title,
- titleSegments,
- description,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- textboxLayout,
- useInvertedBackground,
- ariaLabel = "Feature section",
- className = "",
- containerClassName = "",
- cardClassName = "",
- textBoxTitleClassName = "",
- textBoxTitleImageWrapperClassName = "",
- textBoxTitleImageClassName = "",
- textBoxDescriptionClassName = "",
- cardTitleClassName = "",
- cardDescriptionClassName = "",
- gridClassName = "",
- carouselClassName = "",
- controlsClassName = "",
- textBoxClassName = "",
- textBoxTagClassName = "",
- textBoxButtonContainerClassName = "",
- textBoxButtonClassName = "",
- textBoxButtonTextClassName = "",
- itemContentClassName = "",
-}: FeatureCardThreeProps) => {
- const featureCardThreeRefs = useRef<(HTMLDivElement | null)[]>([]);
- const containerRef = useRef
(null);
- const [activeIndex, setActiveIndex] = useState(null);
-
-
- const setRef = useCallback(
- (index: number) => (el: HTMLDivElement | null) => {
- if (featureCardThreeRefs.current) {
- featureCardThreeRefs.current[index] = el;
- }
- },
- []
- );
-
- // Check if device supports hover (desktop) or not (mobile/touch)
- const isTouchDevice = typeof window !== "undefined" && window.matchMedia("(hover: none)").matches;
-
- // Handle click outside to deactivate on mobile
- useClickOutside(
- containerRef,
- () => setActiveIndex(null),
- activeIndex !== null && isTouchDevice
- );
-
- const handleItemClick = useCallback((index: number) => {
- if (typeof window !== "undefined" && !window.matchMedia("(hover: none)").matches) return;
- setActiveIndex((prev) => (prev === index ? null : index));
- }, []);
-
- useDynamicDimensions([featureCardThreeRefs], {
- titleSelector: ".feature-card-three-title-row .feature-card-three-title",
- descriptionSelector: ".feature-card-three-description-wrapper .feature-card-three-description",
- });
+export function FeatureCardThree() {
+ const { animate } = useCardAnimation();
return (
-
-
- {features.map((feature, index) => (
- handleItemClick(index)}
- className={cardClassName}
- itemContentClassName={itemContentClassName}
- itemTitleClassName={cardTitleClassName}
- itemDescriptionClassName={cardDescriptionClassName}
- />
- ))}
-
+
+
);
-};
-
-FeatureCardThree.displayName = "FeatureCardThree";
-
-export default FeatureCardThree;
+}
diff --git a/src/components/sections/feature/featureHoverPattern/FeatureHoverPattern.tsx b/src/components/sections/feature/featureHoverPattern/FeatureHoverPattern.tsx
index 3b99bc9..f4197e0 100644
--- a/src/components/sections/feature/featureHoverPattern/FeatureHoverPattern.tsx
+++ b/src/components/sections/feature/featureHoverPattern/FeatureHoverPattern.tsx
@@ -1,165 +1,11 @@
-"use client";
+import { useCardAnimation } from '@/components/cardStack/CardStack';
-import CardStack from "@/components/cardStack/CardStack";
-import FeatureHoverPatternItem from "./FeatureHoverPatternItem";
-import { shouldUseInvertedText } from "@/lib/utils";
-import { useTheme } from "@/providers/themeProvider/ThemeProvider";
-import type { LucideIcon } from "lucide-react";
-import type {
- ButtonConfig,
- CardAnimationType,
- TitleSegment,
- ButtonAnimationType,
-} from "@/components/cardStack/types";
-import type {
- TextboxLayout,
- InvertedBackground,
-} from "@/providers/themeProvider/config/constants";
-
-interface FeatureCard {
- icon: LucideIcon;
- title: string;
- description: string;
- button?: ButtonConfig;
-}
-
-interface FeatureHoverPatternProps {
- features: FeatureCard[];
- carouselMode?: "auto" | "buttons";
- uniformGridCustomHeightClasses?: string;
- animationType: CardAnimationType;
- title: string;
- titleSegments?: TitleSegment[];
- description: string;
- tag?: string;
- tagIcon?: LucideIcon;
- tagAnimation?: ButtonAnimationType;
- buttons?: ButtonConfig[];
- buttonAnimation?: ButtonAnimationType;
- textboxLayout: TextboxLayout;
- useInvertedBackground: InvertedBackground;
- ariaLabel?: string;
- className?: string;
- containerClassName?: string;
- cardClassName?: string;
- iconContainerClassName?: string;
- iconClassName?: string;
- textBoxTitleClassName?: string;
- textBoxTitleImageWrapperClassName?: string;
- textBoxTitleImageClassName?: string;
- textBoxDescriptionClassName?: string;
- cardTitleClassName?: string;
- cardDescriptionClassName?: string;
- gradientClassName?: string;
- gridClassName?: string;
- carouselClassName?: string;
- controlsClassName?: string;
- textBoxClassName?: string;
- textBoxTagClassName?: string;
- textBoxButtonContainerClassName?: string;
- textBoxButtonClassName?: string;
- textBoxButtonTextClassName?: string;
- cardButtonClassName?: string;
- cardButtonTextClassName?: string;
-}
-
-const FeatureHoverPattern = ({
- features,
- carouselMode = "buttons",
- uniformGridCustomHeightClasses = "min-h-85 2xl:min-h-95",
- animationType,
- title,
- titleSegments,
- description,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- textboxLayout,
- useInvertedBackground,
- ariaLabel = "Feature section",
- className = "",
- containerClassName = "",
- cardClassName = "",
- iconContainerClassName = "",
- iconClassName = "",
- textBoxTitleClassName = "",
- textBoxTitleImageWrapperClassName = "",
- textBoxTitleImageClassName = "",
- textBoxDescriptionClassName = "",
- cardTitleClassName = "",
- cardDescriptionClassName = "",
- gradientClassName = "",
- gridClassName = "",
- carouselClassName = "",
- controlsClassName = "",
- textBoxClassName = "",
- textBoxTagClassName = "",
- textBoxButtonContainerClassName = "",
- textBoxButtonClassName = "",
- textBoxButtonTextClassName = "",
- cardButtonClassName = "",
- cardButtonTextClassName = "",
-}: FeatureHoverPatternProps) => {
- const theme = useTheme();
- const shouldUseLightText = shouldUseInvertedText(
- useInvertedBackground,
- theme.cardStyle
- );
+export function FeatureHoverPattern() {
+ const { animate } = useCardAnimation();
return (
-
- {features.map((feature, index) => (
-
- ))}
-
+
+
+
);
-};
-
-FeatureHoverPattern.displayName = "FeatureHoverPattern";
-
-export default FeatureHoverPattern;
+}
diff --git a/src/components/sections/metrics/MetricCardEleven.tsx b/src/components/sections/metrics/MetricCardEleven.tsx
index e2a56f8..94dcbcb 100644
--- a/src/components/sections/metrics/MetricCardEleven.tsx
+++ b/src/components/sections/metrics/MetricCardEleven.tsx
@@ -1,274 +1,15 @@
-"use client";
+import { useCardAnimation } from '@/components/cardStack/CardStack';
-import { memo } from "react";
-import CardStackTextBox from "@/components/cardStack/CardStackTextBox";
-import MediaContent from "@/components/shared/MediaContent";
-import { useCardAnimation } from "@/components/cardStack/hooks/useCardAnimation";
-import { cls, shouldUseInvertedText } from "@/lib/utils";
-import { useTheme } from "@/providers/themeProvider/ThemeProvider";
-import type { LucideIcon } from "lucide-react";
-import type { ButtonConfig, CardAnimationType, TitleSegment, ButtonAnimationType } from "@/components/cardStack/types";
-import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants";
+export function MetricCardEleven() {
+ const { animate, itemRefs } = useCardAnimation();
-type MediaProps =
- | {
- imageSrc: string;
- imageAlt?: string;
- videoSrc?: never;
- videoAriaLabel?: never;
- }
- | {
- videoSrc: string;
- videoAriaLabel?: string;
- imageSrc?: never;
- imageAlt?: never;
- };
+ const handleAnimate = () => {
+ animate(0);
+ };
-type Metric = MediaProps & {
- id: string;
- value: string;
- title: string;
- description: string;
-};
-
-interface MetricCardElevenProps {
- metrics: Metric[];
- animationType: CardAnimationType;
- title: string;
- titleSegments?: TitleSegment[];
- description: string;
- tag?: string;
- tagIcon?: LucideIcon;
- tagAnimation?: ButtonAnimationType;
- buttons?: ButtonConfig[];
- buttonAnimation?: ButtonAnimationType;
- textboxLayout: TextboxLayout;
- useInvertedBackground: InvertedBackground;
- ariaLabel?: string;
- className?: string;
- containerClassName?: string;
- textBoxClassName?: string;
- textBoxTitleClassName?: string;
- textBoxTitleImageWrapperClassName?: string;
- textBoxTitleImageClassName?: string;
- textBoxDescriptionClassName?: string;
- textBoxTagClassName?: string;
- textBoxButtonContainerClassName?: string;
- textBoxButtonClassName?: string;
- textBoxButtonTextClassName?: string;
- gridClassName?: string;
- cardClassName?: string;
- valueClassName?: string;
- cardTitleClassName?: string;
- cardDescriptionClassName?: string;
- mediaCardClassName?: string;
- mediaClassName?: string;
+ return (
+
+
+
+ );
}
-
-interface MetricTextCardProps {
- metric: Metric;
- shouldUseLightText: boolean;
- cardClassName?: string;
- valueClassName?: string;
- cardTitleClassName?: string;
- cardDescriptionClassName?: string;
-}
-
-interface MetricMediaCardProps {
- metric: Metric;
- mediaCardClassName?: string;
- mediaClassName?: string;
-}
-
-const MetricTextCard = memo(({
- metric,
- shouldUseLightText,
- cardClassName = "",
- valueClassName = "",
- cardTitleClassName = "",
- cardDescriptionClassName = "",
-}: MetricTextCardProps) => {
- return (
-
-
- {metric.value}
-
-
-
-
- {metric.title}
-
-
-
- {metric.description}
-
-
-
- );
-});
-
-MetricTextCard.displayName = "MetricTextCard";
-
-const MetricMediaCard = memo(({
- metric,
- mediaCardClassName = "",
- mediaClassName = "",
-}: MetricMediaCardProps) => {
- return (
-
-
-
- );
-});
-
-MetricMediaCard.displayName = "MetricMediaCard";
-
-const MetricCardEleven = ({
- metrics,
- animationType,
- title,
- titleSegments,
- description,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- textboxLayout,
- useInvertedBackground,
- ariaLabel = "Metrics section",
- className = "",
- containerClassName = "",
- textBoxClassName = "",
- textBoxTitleClassName = "",
- textBoxTitleImageWrapperClassName = "",
- textBoxTitleImageClassName = "",
- textBoxDescriptionClassName = "",
- textBoxTagClassName = "",
- textBoxButtonContainerClassName = "",
- textBoxButtonClassName = "",
- textBoxButtonTextClassName = "",
- gridClassName = "",
- cardClassName = "",
- valueClassName = "",
- cardTitleClassName = "",
- cardDescriptionClassName = "",
- mediaCardClassName = "",
- mediaClassName = "",
-}: MetricCardElevenProps) => {
- const theme = useTheme();
- const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle);
-
- // Inner grid for each metric item (text + media side by side)
- const innerGridCols = "grid-cols-2";
-
- const { itemRefs } = useCardAnimation({ animationType, itemCount: metrics.length });
-
- return (
-
-
-
-
-
- {metrics.map((metric, index) => {
- const isLastItem = index === metrics.length - 1;
- const isOddTotal = metrics.length % 2 !== 0;
- const isSingleItem = metrics.length === 1;
- const shouldSpanFull = isSingleItem || (isLastItem && isOddTotal);
- // On mobile, even items (2nd, 4th, 6th - index 1, 3, 5) have media first
- const isEvenItem = (index + 1) % 2 === 0;
-
- return (
-
{ itemRefs.current[index] = el; }}
- className={cls(
- "grid gap-4",
- innerGridCols,
- shouldSpanFull && "md:col-span-2"
- )}
- >
-
-
-
- );
- })}
-
-
-
- );
-};
-
-MetricCardEleven.displayName = "MetricCardEleven";
-
-export default MetricCardEleven;
\ No newline at end of file
diff --git a/src/components/sections/metrics/MetricCardOne.tsx b/src/components/sections/metrics/MetricCardOne.tsx
index b8daa06..8f69ae7 100644
--- a/src/components/sections/metrics/MetricCardOne.tsx
+++ b/src/components/sections/metrics/MetricCardOne.tsx
@@ -1,212 +1,11 @@
-"use client";
+import { useCardAnimation } from '@/components/cardStack/CardStack';
-import { memo } from "react";
-import CardStack from "@/components/cardStack/CardStack";
-import { cls, shouldUseInvertedText } from "@/lib/utils";
-import { useTheme } from "@/providers/themeProvider/ThemeProvider";
-import type { LucideIcon } from "lucide-react";
-import type { ButtonConfig, GridVariant, CardAnimationTypeWith3D, TitleSegment, ButtonAnimationType } from "@/components/cardStack/types";
-import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants";
+export function MetricCardOne() {
+ const { animate } = useCardAnimation();
-type MetricCardOneGridVariant = Extract
;
-
-type Metric = {
- id: string;
- value: string;
- title: string;
- description: string;
- icon: LucideIcon;
-};
-
-interface MetricCardOneProps {
- metrics: Metric[];
- carouselMode?: "auto" | "buttons";
- gridVariant: MetricCardOneGridVariant;
- uniformGridCustomHeightClasses?: string;
- animationType: CardAnimationTypeWith3D;
- title: string;
- titleSegments?: TitleSegment[];
- description: string;
- tag?: string;
- tagIcon?: LucideIcon;
- tagAnimation?: ButtonAnimationType;
- buttons?: ButtonConfig[];
- buttonAnimation?: ButtonAnimationType;
- textboxLayout: TextboxLayout;
- useInvertedBackground: InvertedBackground;
- ariaLabel?: string;
- className?: string;
- containerClassName?: string;
- cardClassName?: string;
- textBoxTitleClassName?: string;
- textBoxTitleImageWrapperClassName?: string;
- textBoxTitleImageClassName?: string;
- textBoxDescriptionClassName?: string;
- valueClassName?: string;
- titleClassName?: string;
- descriptionClassName?: string;
- iconContainerClassName?: string;
- iconClassName?: string;
- gridClassName?: string;
- carouselClassName?: string;
- controlsClassName?: string;
- textBoxClassName?: string;
- textBoxTagClassName?: string;
- textBoxButtonContainerClassName?: string;
- textBoxButtonClassName?: string;
- textBoxButtonTextClassName?: string;
+ return (
+
+
+
+ );
}
-
-interface MetricCardItemProps {
- metric: Metric;
- shouldUseLightText: boolean;
- cardClassName?: string;
- valueClassName?: string;
- titleClassName?: string;
- descriptionClassName?: string;
- iconContainerClassName?: string;
- iconClassName?: string;
-}
-
-const MetricCardItem = memo(({
- metric,
- shouldUseLightText,
- cardClassName = "",
- valueClassName = "",
- titleClassName = "",
- descriptionClassName = "",
- iconContainerClassName = "",
- iconClassName = "",
-}: MetricCardItemProps) => {
- return (
-
-
- {metric.value}
-
-
- {metric.title}
-
-
- {metric.description}
-
-
-
-
-
- );
-});
-
-MetricCardItem.displayName = "MetricCardItem";
-
-const MetricCardOne = ({
- metrics,
- carouselMode = "buttons",
- gridVariant,
- uniformGridCustomHeightClasses,
- animationType,
- title,
- titleSegments,
- description,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- textboxLayout,
- useInvertedBackground,
- ariaLabel = "Metrics section",
- className = "",
- containerClassName = "",
- cardClassName = "",
- textBoxTitleClassName = "",
- textBoxTitleImageWrapperClassName = "",
- textBoxTitleImageClassName = "",
- textBoxDescriptionClassName = "",
- valueClassName = "",
- titleClassName = "",
- descriptionClassName = "",
- iconContainerClassName = "",
- iconClassName = "",
- gridClassName = "",
- carouselClassName = "",
- controlsClassName = "",
- textBoxClassName = "",
- textBoxTagClassName = "",
- textBoxButtonContainerClassName = "",
- textBoxButtonClassName = "",
- textBoxButtonTextClassName = "",
-}: MetricCardOneProps) => {
- const theme = useTheme();
- const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle);
-
- const customUniformHeight = gridVariant === "uniform-all-items-equal"
- ? "min-h-70 2xl:min-h-80"
- : uniformGridCustomHeightClasses;
-
- return (
-
- {metrics.map((metric, index) => (
-
- ))}
-
- );
-};
-
-MetricCardOne.displayName = "MetricCardOne";
-
-export default MetricCardOne;
diff --git a/src/components/sections/metrics/MetricCardSeven.tsx b/src/components/sections/metrics/MetricCardSeven.tsx
index f61d0da..c84cd5d 100644
--- a/src/components/sections/metrics/MetricCardSeven.tsx
+++ b/src/components/sections/metrics/MetricCardSeven.tsx
@@ -1,194 +1,11 @@
-"use client";
+import { useCardAnimation } from '@/components/cardStack/CardStack';
-import { memo } from "react";
-import CardStack from "@/components/cardStack/CardStack";
-import PricingFeatureList from "@/components/shared/PricingFeatureList";
-import { cls, shouldUseInvertedText } from "@/lib/utils";
-import { useTheme } from "@/providers/themeProvider/ThemeProvider";
-import type { LucideIcon } from "lucide-react";
-import type { ButtonConfig, CardAnimationTypeWith3D, TitleSegment, ButtonAnimationType } from "@/components/cardStack/types";
-import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants";
+export function MetricCardSeven() {
+ const { animate } = useCardAnimation();
-type Metric = {
- id: string;
- value: string;
- title: string;
- items: string[];
-};
-
-interface MetricCardSevenProps {
- metrics: Metric[];
- carouselMode?: "auto" | "buttons";
- uniformGridCustomHeightClasses?: string;
- animationType: CardAnimationTypeWith3D;
- title: string;
- titleSegments?: TitleSegment[];
- description: string;
- tag?: string;
- tagIcon?: LucideIcon;
- tagAnimation?: ButtonAnimationType;
- buttons?: ButtonConfig[];
- buttonAnimation?: ButtonAnimationType;
- textboxLayout: TextboxLayout;
- useInvertedBackground: InvertedBackground;
- ariaLabel?: string;
- className?: string;
- containerClassName?: string;
- cardClassName?: string;
- textBoxTitleClassName?: string;
- textBoxTitleImageWrapperClassName?: string;
- textBoxTitleImageClassName?: string;
- textBoxDescriptionClassName?: string;
- valueClassName?: string;
- metricTitleClassName?: string;
- featuresClassName?: string;
- featureItemClassName?: string;
- gridClassName?: string;
- carouselClassName?: string;
- controlsClassName?: string;
- textBoxClassName?: string;
- textBoxTagClassName?: string;
- textBoxButtonContainerClassName?: string;
- textBoxButtonClassName?: string;
- textBoxButtonTextClassName?: string;
+ return (
+
+
+
+ );
}
-
-interface MetricCardItemProps {
- metric: Metric;
- shouldUseLightText: boolean;
- cardClassName?: string;
- valueClassName?: string;
- metricTitleClassName?: string;
- featuresClassName?: string;
- featureItemClassName?: string;
-}
-
-const MetricCardItem = memo(({
- metric,
- shouldUseLightText,
- cardClassName = "",
- valueClassName = "",
- metricTitleClassName = "",
- featuresClassName = "",
- featureItemClassName = "",
-}: MetricCardItemProps) => {
- return (
-
-
-
- {metric.value}
-
-
- {metric.title}
-
-
-
- {metric.items.length > 0 && (
-
- )}
-
-
- );
-});
-
-MetricCardItem.displayName = "MetricCardItem";
-
-const MetricCardSeven = ({
- metrics,
- carouselMode = "buttons",
- uniformGridCustomHeightClasses,
- animationType,
- title,
- titleSegments,
- description,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- textboxLayout,
- useInvertedBackground,
- ariaLabel = "Metrics section",
- className = "",
- containerClassName = "",
- cardClassName = "",
- textBoxTitleClassName = "",
- textBoxTitleImageWrapperClassName = "",
- textBoxTitleImageClassName = "",
- textBoxDescriptionClassName = "",
- valueClassName = "",
- metricTitleClassName = "",
- featuresClassName = "",
- featureItemClassName = "",
- gridClassName = "",
- carouselClassName = "",
- controlsClassName = "",
- textBoxClassName = "",
- textBoxTagClassName = "",
- textBoxButtonContainerClassName = "",
- textBoxButtonClassName = "",
- textBoxButtonTextClassName = "",
-}: MetricCardSevenProps) => {
- const theme = useTheme();
- const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle);
-
- const customUniformHeight = uniformGridCustomHeightClasses || "min-h-70 2xl:min-h-80";
-
- return (
-
- {metrics.map((metric, index) => (
-
- ))}
-
- );
-};
-
-MetricCardSeven.displayName = "MetricCardSeven";
-
-export default MetricCardSeven;
diff --git a/src/components/sections/metrics/MetricCardTen.tsx b/src/components/sections/metrics/MetricCardTen.tsx
index 8f3e697..76ce2d1 100644
--- a/src/components/sections/metrics/MetricCardTen.tsx
+++ b/src/components/sections/metrics/MetricCardTen.tsx
@@ -1,245 +1,11 @@
-"use client";
+import { useCardAnimation } from '@/components/cardStack/CardStack';
-import { memo } from "react";
-import CardStack from "@/components/cardStack/CardStack";
-import Button from "@/components/button/Button";
-import { cls, shouldUseInvertedText } from "@/lib/utils";
-import { getButtonProps } from "@/lib/buttonUtils";
-import { useTheme } from "@/providers/themeProvider/ThemeProvider";
-import type { LucideIcon } from "lucide-react";
-import type { ButtonConfig, CardAnimationType, TitleSegment, ButtonAnimationType } from "@/components/cardStack/types";
-import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants";
-import type { CTAButtonVariant } from "@/components/button/types";
+export function MetricCardTen() {
+ const { animate } = useCardAnimation();
-type Metric = {
- id: string;
- title: string;
- subtitle: string;
- category: string;
- value: string;
- buttons?: ButtonConfig[];
-};
-
-interface MetricCardTenProps {
- metrics: Metric[];
- carouselMode?: "auto" | "buttons";
- uniformGridCustomHeightClasses?: string;
- animationType: CardAnimationType;
- title: string;
- titleSegments?: TitleSegment[];
- description: string;
- tag?: string;
- tagIcon?: LucideIcon;
- tagAnimation?: ButtonAnimationType;
- buttons?: ButtonConfig[];
- buttonAnimation?: ButtonAnimationType;
- textboxLayout: TextboxLayout;
- useInvertedBackground: InvertedBackground;
- ariaLabel?: string;
- className?: string;
- containerClassName?: string;
- cardClassName?: string;
- textBoxTitleClassName?: string;
- textBoxTitleImageWrapperClassName?: string;
- textBoxTitleImageClassName?: string;
- textBoxDescriptionClassName?: string;
- cardTitleClassName?: string;
- subtitleClassName?: string;
- categoryClassName?: string;
- valueClassName?: string;
- footerClassName?: string;
- cardButtonClassName?: string;
- cardButtonTextClassName?: string;
- gridClassName?: string;
- carouselClassName?: string;
- controlsClassName?: string;
- textBoxClassName?: string;
- textBoxTagClassName?: string;
- textBoxButtonContainerClassName?: string;
- textBoxButtonClassName?: string;
- textBoxButtonTextClassName?: string;
+ return (
+
+
+
+ );
}
-
-interface MetricCardItemProps {
- metric: Metric;
- shouldUseLightText: boolean;
- defaultButtonVariant: CTAButtonVariant;
- cardClassName?: string;
- cardTitleClassName?: string;
- subtitleClassName?: string;
- categoryClassName?: string;
- valueClassName?: string;
- footerClassName?: string;
- cardButtonClassName?: string;
- cardButtonTextClassName?: string;
-}
-
-const MetricCardItem = memo(({
- metric,
- shouldUseLightText,
- defaultButtonVariant,
- cardClassName = "",
- cardTitleClassName = "",
- subtitleClassName = "",
- categoryClassName = "",
- valueClassName = "",
- footerClassName = "",
- cardButtonClassName = "",
- cardButtonTextClassName = "",
-}: MetricCardItemProps) => {
- return (
-
-
-
-
- {metric.title}
-
-
- {metric.subtitle}
-
-
-
-
-
-
-
- {metric.category}
-
-
-
- {metric.value}
-
-
-
-
- {metric.buttons && metric.buttons.length > 0 && (
-
-
- {metric.buttons.slice(0, 2).map((button, index) => (
-
- ))}
-
-
- )}
-
- );
-});
-
-MetricCardItem.displayName = "MetricCardItem";
-
-const MetricCardTen = ({
- metrics,
- carouselMode = "buttons",
- uniformGridCustomHeightClasses,
- animationType,
- title,
- titleSegments,
- description,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- textboxLayout,
- useInvertedBackground,
- ariaLabel = "Metrics section",
- className = "",
- containerClassName = "",
- cardClassName = "",
- textBoxTitleClassName = "",
- textBoxTitleImageWrapperClassName = "",
- textBoxTitleImageClassName = "",
- textBoxDescriptionClassName = "",
- cardTitleClassName = "",
- subtitleClassName = "",
- categoryClassName = "",
- valueClassName = "",
- footerClassName = "",
- cardButtonClassName = "",
- cardButtonTextClassName = "",
- gridClassName = "",
- carouselClassName = "",
- controlsClassName = "",
- textBoxClassName = "",
- textBoxTagClassName = "",
- textBoxButtonContainerClassName = "",
- textBoxButtonClassName = "",
- textBoxButtonTextClassName = "",
-}: MetricCardTenProps) => {
- const theme = useTheme();
- const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle);
-
- return (
-
- {metrics.map((metric, index) => (
-
- ))}
-
- );
-};
-
-MetricCardTen.displayName = "MetricCardTen";
-
-export default MetricCardTen;
diff --git a/src/components/sections/metrics/MetricCardThree.tsx b/src/components/sections/metrics/MetricCardThree.tsx
index c3680cc..d40021b 100644
--- a/src/components/sections/metrics/MetricCardThree.tsx
+++ b/src/components/sections/metrics/MetricCardThree.tsx
@@ -1,186 +1,11 @@
-"use client";
+import { useCardAnimation } from '@/components/cardStack/CardStack';
-import { memo } from "react";
-import CardStack from "@/components/cardStack/CardStack";
-import { cls, shouldUseInvertedText } from "@/lib/utils";
-import { useTheme } from "@/providers/themeProvider/ThemeProvider";
-import type { LucideIcon } from "lucide-react";
-import type { ButtonConfig, CardAnimationTypeWith3D, TitleSegment, ButtonAnimationType } from "@/components/cardStack/types";
-import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants";
+export function MetricCardThree() {
+ const { animate } = useCardAnimation();
-type Metric = {
- id: string;
- icon: LucideIcon;
- title: string;
- value: string;
-};
-
-interface MetricCardThreeProps {
- metrics: Metric[];
- carouselMode?: "auto" | "buttons";
- uniformGridCustomHeightClasses?: string;
- animationType: CardAnimationTypeWith3D;
- title: string;
- titleSegments?: TitleSegment[];
- description: string;
- tag?: string;
- tagIcon?: LucideIcon;
- tagAnimation?: ButtonAnimationType;
- buttons?: ButtonConfig[];
- buttonAnimation?: ButtonAnimationType;
- textboxLayout: TextboxLayout;
- useInvertedBackground: InvertedBackground;
- ariaLabel?: string;
- className?: string;
- containerClassName?: string;
- cardClassName?: string;
- textBoxTitleClassName?: string;
- textBoxTitleImageWrapperClassName?: string;
- textBoxTitleImageClassName?: string;
- textBoxDescriptionClassName?: string;
- iconContainerClassName?: string;
- iconClassName?: string;
- metricTitleClassName?: string;
- valueClassName?: string;
- gridClassName?: string;
- carouselClassName?: string;
- controlsClassName?: string;
- textBoxClassName?: string;
- textBoxTagClassName?: string;
- textBoxButtonContainerClassName?: string;
- textBoxButtonClassName?: string;
- textBoxButtonTextClassName?: string;
+ return (
+
+
+
+ );
}
-
-interface MetricCardItemProps {
- metric: Metric;
- shouldUseLightText: boolean;
- cardClassName?: string;
- iconContainerClassName?: string;
- iconClassName?: string;
- metricTitleClassName?: string;
- valueClassName?: string;
-}
-
-const MetricCardItem = memo(({
- metric,
- shouldUseLightText,
- cardClassName = "",
- iconContainerClassName = "",
- iconClassName = "",
- metricTitleClassName = "",
- valueClassName = "",
-}: MetricCardItemProps) => {
- return (
-
-
-
-
-
-
- {metric.title}
-
-
-
-
- {metric.value}
-
-
-
- );
-});
-
-MetricCardItem.displayName = "MetricCardItem";
-
-const MetricCardThree = ({
- metrics,
- carouselMode = "buttons",
- uniformGridCustomHeightClasses = "min-h-70 2xl:min-h-80",
- animationType,
- title,
- titleSegments,
- description,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- textboxLayout,
- useInvertedBackground,
- ariaLabel = "Metrics section",
- className = "",
- containerClassName = "",
- cardClassName = "",
- textBoxTitleClassName = "",
- textBoxTitleImageWrapperClassName = "",
- textBoxTitleImageClassName = "",
- textBoxDescriptionClassName = "",
- iconContainerClassName = "",
- iconClassName = "",
- metricTitleClassName = "",
- valueClassName = "",
- gridClassName = "",
- carouselClassName = "",
- controlsClassName = "",
- textBoxClassName = "",
- textBoxTagClassName = "",
- textBoxButtonContainerClassName = "",
- textBoxButtonClassName = "",
- textBoxButtonTextClassName = "",
-}: MetricCardThreeProps) => {
- const theme = useTheme();
- const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle);
-
- return (
-
- {metrics.map((metric, index) => (
-
- ))}
-
- );
-};
-
-MetricCardThree.displayName = "MetricCardThree";
-
-export default MetricCardThree;
\ No newline at end of file
diff --git a/src/components/sections/metrics/MetricCardTwo.tsx b/src/components/sections/metrics/MetricCardTwo.tsx
index f05289c..1fde8d8 100644
--- a/src/components/sections/metrics/MetricCardTwo.tsx
+++ b/src/components/sections/metrics/MetricCardTwo.tsx
@@ -1,183 +1,11 @@
-"use client";
+import { useCardAnimation } from '@/components/cardStack/CardStack';
-import { memo } from "react";
-import CardStack from "@/components/cardStack/CardStack";
-import { cls, shouldUseInvertedText } from "@/lib/utils";
-import { useTheme } from "@/providers/themeProvider/ThemeProvider";
-import type { LucideIcon } from "lucide-react";
-import type { ButtonConfig, GridVariant, CardAnimationTypeWith3D, TitleSegment, ButtonAnimationType } from "@/components/cardStack/types";
-import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants";
+export function MetricCardTwo() {
+ const { animate } = useCardAnimation();
-type MetricCardTwoGridVariant = Extract;
-
-type Metric = {
- id: string;
- value: string;
- description: string;
-};
-
-interface MetricCardTwoProps {
- metrics: Metric[];
- carouselMode?: "auto" | "buttons";
- gridVariant: MetricCardTwoGridVariant;
- uniformGridCustomHeightClasses?: string;
- animationType: CardAnimationTypeWith3D;
- title: string;
- titleSegments?: TitleSegment[];
- description: string;
- tag?: string;
- tagIcon?: LucideIcon;
- tagAnimation?: ButtonAnimationType;
- buttons?: ButtonConfig[];
- buttonAnimation?: ButtonAnimationType;
- textboxLayout: TextboxLayout;
- useInvertedBackground: InvertedBackground;
- ariaLabel?: string;
- className?: string;
- containerClassName?: string;
- cardClassName?: string;
- textBoxTitleClassName?: string;
- textBoxTitleImageWrapperClassName?: string;
- textBoxTitleImageClassName?: string;
- textBoxDescriptionClassName?: string;
- valueClassName?: string;
- metricDescriptionClassName?: string;
- gridClassName?: string;
- carouselClassName?: string;
- controlsClassName?: string;
- textBoxClassName?: string;
- textBoxTagClassName?: string;
- textBoxButtonContainerClassName?: string;
- textBoxButtonClassName?: string;
- textBoxButtonTextClassName?: string;
+ return (
+
+
+
+ );
}
-
-interface MetricCardItemProps {
- metric: Metric;
- shouldUseLightText: boolean;
- cardClassName?: string;
- valueClassName?: string;
- metricDescriptionClassName?: string;
-}
-
-const MetricCardItem = memo(({
- metric,
- shouldUseLightText,
- cardClassName = "",
- valueClassName = "",
- metricDescriptionClassName = "",
-}: MetricCardItemProps) => {
- return (
-
-
- {metric.value}
-
-
- {metric.description}
-
-
- );
-});
-
-MetricCardItem.displayName = "MetricCardItem";
-
-const MetricCardTwo = ({
- metrics,
- carouselMode = "buttons",
- gridVariant,
- uniformGridCustomHeightClasses,
- animationType,
- title,
- titleSegments,
- description,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- textboxLayout,
- useInvertedBackground,
- ariaLabel = "Metrics section",
- className = "",
- containerClassName = "",
- cardClassName = "",
- textBoxTitleClassName = "",
- textBoxTitleImageWrapperClassName = "",
- textBoxTitleImageClassName = "",
- textBoxDescriptionClassName = "",
- valueClassName = "",
- metricDescriptionClassName = "",
- gridClassName = "",
- carouselClassName = "",
- controlsClassName = "",
- textBoxClassName = "",
- textBoxTagClassName = "",
- textBoxButtonContainerClassName = "",
- textBoxButtonClassName = "",
- textBoxButtonTextClassName = "",
-}: MetricCardTwoProps) => {
- const theme = useTheme();
- const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle);
-
- const customUniformHeight = gridVariant === "uniform-all-items-equal"
- ? "min-h-70 2xl:min-h-80"
- : uniformGridCustomHeightClasses;
-
- const customGridRows = (gridVariant === "bento-grid" || gridVariant === "bento-grid-inverted")
- ? "md:grid-rows-[14rem_14rem] 2xl:grid-rows-[17rem_17rem]"
- : undefined;
-
- return (
-
- {metrics.map((metric, index) => (
-
- ))}
-
- );
-};
-
-MetricCardTwo.displayName = "MetricCardTwo";
-
-export default MetricCardTwo;
diff --git a/src/components/sections/pricing/PricingCardOne.tsx b/src/components/sections/pricing/PricingCardOne.tsx
index d1d12f0..0ea16dd 100644
--- a/src/components/sections/pricing/PricingCardOne.tsx
+++ b/src/components/sections/pricing/PricingCardOne.tsx
@@ -1,206 +1,11 @@
-"use client";
+import { useCardAnimation } from '@/components/cardStack/CardStack';
-import { memo } from "react";
-import CardStack from "@/components/cardStack/CardStack";
-import PricingBadge from "@/components/shared/PricingBadge";
-import PricingFeatureList from "@/components/shared/PricingFeatureList";
-import { cls, shouldUseInvertedText } from "@/lib/utils";
-import { useTheme } from "@/providers/themeProvider/ThemeProvider";
-import type { LucideIcon } from "lucide-react";
-import type { ButtonConfig, CardAnimationTypeWith3D, TitleSegment, ButtonAnimationType } from "@/components/cardStack/types";
-import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants";
+export function PricingCardOne() {
+ const { animate } = useCardAnimation();
-type PricingPlan = {
- id: string;
- badge: string;
- badgeIcon?: LucideIcon;
- price: string;
- subtitle: string;
- features: string[];
-};
-
-interface PricingCardOneProps {
- plans: PricingPlan[];
- carouselMode?: "auto" | "buttons";
- uniformGridCustomHeightClasses?: string;
- animationType: CardAnimationTypeWith3D;
- title: string;
- titleSegments?: TitleSegment[];
- description: string;
- tag?: string;
- tagIcon?: LucideIcon;
- tagAnimation?: ButtonAnimationType;
- buttons?: ButtonConfig[];
- buttonAnimation?: ButtonAnimationType;
- textboxLayout: TextboxLayout;
- useInvertedBackground: InvertedBackground;
- ariaLabel?: string;
- className?: string;
- containerClassName?: string;
- cardClassName?: string;
- textBoxTitleClassName?: string;
- textBoxTitleImageWrapperClassName?: string;
- textBoxTitleImageClassName?: string;
- textBoxDescriptionClassName?: string;
- badgeClassName?: string;
- priceClassName?: string;
- subtitleClassName?: string;
- featuresClassName?: string;
- featureItemClassName?: string;
- gridClassName?: string;
- carouselClassName?: string;
- controlsClassName?: string;
- textBoxClassName?: string;
- textBoxTagClassName?: string;
- textBoxButtonContainerClassName?: string;
- textBoxButtonClassName?: string;
- textBoxButtonTextClassName?: string;
+ return (
+
+
+
+ );
}
-
-interface PricingCardItemProps {
- plan: PricingPlan;
- shouldUseLightText: boolean;
- cardClassName?: string;
- badgeClassName?: string;
- priceClassName?: string;
- subtitleClassName?: string;
- featuresClassName?: string;
- featureItemClassName?: string;
-}
-
-const PricingCardItem = memo(({
- plan,
- shouldUseLightText,
- cardClassName = "",
- badgeClassName = "",
- priceClassName = "",
- subtitleClassName = "",
- featuresClassName = "",
- featureItemClassName = "",
-}: PricingCardItemProps) => {
- return (
-
-
-
-
-
- {plan.price}
-
-
-
- {plan.subtitle}
-
-
-
-
-
-
-
- );
-});
-
-PricingCardItem.displayName = "PricingCardItem";
-
-const PricingCardOne = ({
- plans,
- carouselMode = "buttons",
- uniformGridCustomHeightClasses,
- animationType,
- title,
- titleSegments,
- description,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- textboxLayout,
- useInvertedBackground,
- ariaLabel = "Pricing section",
- className = "",
- containerClassName = "",
- cardClassName = "",
- textBoxTitleClassName = "",
- textBoxTitleImageWrapperClassName = "",
- textBoxTitleImageClassName = "",
- textBoxDescriptionClassName = "",
- badgeClassName = "",
- priceClassName = "",
- subtitleClassName = "",
- featuresClassName = "",
- featureItemClassName = "",
- gridClassName = "",
- carouselClassName = "",
- controlsClassName = "",
- textBoxClassName = "",
- textBoxTagClassName = "",
- textBoxButtonContainerClassName = "",
- textBoxButtonClassName = "",
- textBoxButtonTextClassName = "",
-}: PricingCardOneProps) => {
- const theme = useTheme();
- const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle);
-
- return (
-
- {plans.map((plan, index) => (
-
- ))}
-
- );
-};
-
-PricingCardOne.displayName = "PricingCardOne";
-
-export default PricingCardOne;
diff --git a/src/components/sections/pricing/PricingCardThree.tsx b/src/components/sections/pricing/PricingCardThree.tsx
index fa11efb..125333a 100644
--- a/src/components/sections/pricing/PricingCardThree.tsx
+++ b/src/components/sections/pricing/PricingCardThree.tsx
@@ -1,247 +1,11 @@
-"use client";
+import { useCardAnimation } from '@/components/cardStack/CardStack';
-import { memo } from "react";
-import CardStack from "@/components/cardStack/CardStack";
-import PricingFeatureList from "@/components/shared/PricingFeatureList";
-import Button from "@/components/button/Button";
-import { useTheme } from "@/providers/themeProvider/ThemeProvider";
-import { getButtonProps } from "@/lib/buttonUtils";
-import { cls, shouldUseInvertedText } from "@/lib/utils";
-import type { LucideIcon } from "lucide-react";
-import type { ButtonConfig, CardAnimationType, TitleSegment, ButtonAnimationType } from "@/components/cardStack/types";
-import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants";
+export function PricingCardThree() {
+ const { animate } = useCardAnimation();
-type PricingPlan = {
- id: string;
- badge?: string;
- badgeIcon?: LucideIcon;
- price: string;
- name: string;
- buttons: ButtonConfig[];
- features: string[];
-};
-
-interface PricingCardThreeProps {
- plans: PricingPlan[];
- carouselMode?: "auto" | "buttons";
- uniformGridCustomHeightClasses?: string;
- animationType: CardAnimationType;
- title: string;
- titleSegments?: TitleSegment[];
- description: string;
- tag?: string;
- tagIcon?: LucideIcon;
- tagAnimation?: ButtonAnimationType;
- buttons?: ButtonConfig[];
- buttonAnimation?: ButtonAnimationType;
- textboxLayout: TextboxLayout;
- useInvertedBackground: InvertedBackground;
- ariaLabel?: string;
- className?: string;
- containerClassName?: string;
- cardClassName?: string;
- textBoxTitleClassName?: string;
- textBoxTitleImageWrapperClassName?: string;
- textBoxTitleImageClassName?: string;
- textBoxDescriptionClassName?: string;
- badgeClassName?: string;
- priceClassName?: string;
- nameClassName?: string;
- planButtonContainerClassName?: string;
- planButtonClassName?: string;
- featuresClassName?: string;
- featureItemClassName?: string;
- gridClassName?: string;
- carouselClassName?: string;
- controlsClassName?: string;
- textBoxClassName?: string;
- textBoxTagClassName?: string;
- textBoxButtonContainerClassName?: string;
- textBoxButtonClassName?: string;
- textBoxButtonTextClassName?: string;
+ return (
+
+
+
+ );
}
-
-interface PricingCardItemProps {
- plan: PricingPlan;
- shouldUseLightText: boolean;
- cardClassName?: string;
- badgeClassName?: string;
- priceClassName?: string;
- nameClassName?: string;
- planButtonContainerClassName?: string;
- planButtonClassName?: string;
- featuresClassName?: string;
- featureItemClassName?: string;
-}
-
-const PricingCardItem = memo(({
- plan,
- shouldUseLightText,
- cardClassName = "",
- badgeClassName = "",
- priceClassName = "",
- nameClassName = "",
- planButtonContainerClassName = "",
- planButtonClassName = "",
- featuresClassName = "",
- featureItemClassName = "",
-}: PricingCardItemProps) => {
- const theme = useTheme();
-
- const getButtonConfigProps = () => {
- if (theme.defaultButtonVariant === "hover-bubble") {
- return { bgClassName: "w-full" };
- }
- if (theme.defaultButtonVariant === "icon-arrow") {
- return { className: "justify-between" };
- }
- return {};
- };
-
- return (
-
-
- {plan.badgeIcon &&
}
- {plan.badge || "placeholder"}
-
-
-
-
-
- {plan.price}
-
-
-
- {plan.name}
-
-
-
-
-
-
-
-
- {plan.buttons && plan.buttons.length > 0 && (
-
- {plan.buttons.slice(0, 2).map((button, index) => (
-
- ))}
-
- )}
-
-
- );
-});
-
-PricingCardItem.displayName = "PricingCardItem";
-
-const PricingCardThree = ({
- plans,
- carouselMode = "buttons",
- uniformGridCustomHeightClasses,
- animationType,
- title,
- titleSegments,
- description,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- textboxLayout,
- useInvertedBackground,
- ariaLabel = "Pricing section",
- className = "",
- containerClassName = "",
- cardClassName = "",
- textBoxTitleClassName = "",
- textBoxTitleImageWrapperClassName = "",
- textBoxTitleImageClassName = "",
- textBoxDescriptionClassName = "",
- badgeClassName = "",
- priceClassName = "",
- nameClassName = "",
- planButtonContainerClassName = "",
- planButtonClassName = "",
- featuresClassName = "",
- featureItemClassName = "",
- gridClassName = "",
- carouselClassName = "",
- controlsClassName = "",
- textBoxClassName = "",
- textBoxTagClassName = "",
- textBoxButtonContainerClassName = "",
- textBoxButtonClassName = "",
- textBoxButtonTextClassName = "",
-}: PricingCardThreeProps) => {
- const theme = useTheme();
- const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle);
-
- return (
-
- {plans.map((plan, index) => (
-
- ))}
-
- );
-};
-
-PricingCardThree.displayName = "PricingCardThree";
-
-export default PricingCardThree;
diff --git a/src/components/sections/pricing/PricingCardTwo.tsx b/src/components/sections/pricing/PricingCardTwo.tsx
index adc3ef8..021dca9 100644
--- a/src/components/sections/pricing/PricingCardTwo.tsx
+++ b/src/components/sections/pricing/PricingCardTwo.tsx
@@ -1,246 +1,11 @@
-"use client";
+import { useCardAnimation } from '@/components/cardStack/CardStack';
-import { memo } from "react";
-import CardStack from "@/components/cardStack/CardStack";
-import PricingBadge from "@/components/shared/PricingBadge";
-import PricingFeatureList from "@/components/shared/PricingFeatureList";
-import Button from "@/components/button/Button";
-import { useTheme } from "@/providers/themeProvider/ThemeProvider";
-import { getButtonProps } from "@/lib/buttonUtils";
-import { cls, shouldUseInvertedText } from "@/lib/utils";
-import type { LucideIcon } from "lucide-react";
-import type { ButtonConfig, CardAnimationType, TitleSegment, ButtonAnimationType } from "@/components/cardStack/types";
-import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants";
+export function PricingCardTwo() {
+ const { animate } = useCardAnimation();
-type PricingPlan = {
- id: string;
- badge: string;
- badgeIcon?: LucideIcon;
- price: string;
- subtitle: string;
- buttons: ButtonConfig[];
- features: string[];
-};
-
-interface PricingCardTwoProps {
- plans: PricingPlan[];
- carouselMode?: "auto" | "buttons";
- uniformGridCustomHeightClasses?: string;
- animationType: CardAnimationType;
- title: string;
- titleSegments?: TitleSegment[];
- description: string;
- tag?: string;
- tagIcon?: LucideIcon;
- tagAnimation?: ButtonAnimationType;
- buttons?: ButtonConfig[];
- buttonAnimation?: ButtonAnimationType;
- textboxLayout: TextboxLayout;
- useInvertedBackground: InvertedBackground;
- ariaLabel?: string;
- className?: string;
- containerClassName?: string;
- cardClassName?: string;
- textBoxTitleClassName?: string;
- textBoxTitleImageWrapperClassName?: string;
- textBoxTitleImageClassName?: string;
- textBoxDescriptionClassName?: string;
- badgeClassName?: string;
- priceClassName?: string;
- subtitleClassName?: string;
- planButtonContainerClassName?: string;
- planButtonClassName?: string;
- featuresClassName?: string;
- featureItemClassName?: string;
- gridClassName?: string;
- carouselClassName?: string;
- controlsClassName?: string;
- textBoxClassName?: string;
- textBoxTagClassName?: string;
- textBoxButtonContainerClassName?: string;
- textBoxButtonClassName?: string;
- textBoxButtonTextClassName?: string;
+ return (
+
+
+
+ );
}
-
-interface PricingCardItemProps {
- plan: PricingPlan;
- shouldUseLightText: boolean;
- cardClassName?: string;
- badgeClassName?: string;
- priceClassName?: string;
- subtitleClassName?: string;
- planButtonContainerClassName?: string;
- planButtonClassName?: string;
- featuresClassName?: string;
- featureItemClassName?: string;
-}
-
-const PricingCardItem = memo(({
- plan,
- shouldUseLightText,
- cardClassName = "",
- badgeClassName = "",
- priceClassName = "",
- subtitleClassName = "",
- planButtonContainerClassName = "",
- planButtonClassName = "",
- featuresClassName = "",
- featureItemClassName = "",
-}: PricingCardItemProps) => {
- const theme = useTheme();
-
- const getButtonConfigProps = () => {
- if (theme.defaultButtonVariant === "hover-bubble") {
- return { bgClassName: "w-full" };
- }
- if (theme.defaultButtonVariant === "icon-arrow") {
- return { className: "justify-between" };
- }
- return {};
- };
-
- return (
-
-
-
-
-
- {plan.price}
-
-
-
- {plan.subtitle}
-
-
-
- {plan.buttons && plan.buttons.length > 0 && (
-
- {plan.buttons.slice(0, 2).map((button, index) => (
-
- ))}
-
- )}
-
-
-
-
-
- );
-});
-
-PricingCardItem.displayName = "PricingCardItem";
-
-const PricingCardTwo = ({
- plans,
- carouselMode = "buttons",
- uniformGridCustomHeightClasses,
- animationType,
- title,
- titleSegments,
- description,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- textboxLayout,
- useInvertedBackground,
- ariaLabel = "Pricing section",
- className = "",
- containerClassName = "",
- cardClassName = "",
- textBoxTitleClassName = "",
- textBoxTitleImageWrapperClassName = "",
- textBoxTitleImageClassName = "",
- textBoxDescriptionClassName = "",
- badgeClassName = "",
- priceClassName = "",
- subtitleClassName = "",
- planButtonContainerClassName = "",
- planButtonClassName = "",
- featuresClassName = "",
- featureItemClassName = "",
- gridClassName = "",
- carouselClassName = "",
- controlsClassName = "",
- textBoxClassName = "",
- textBoxTagClassName = "",
- textBoxButtonContainerClassName = "",
- textBoxButtonClassName = "",
- textBoxButtonTextClassName = "",
-}: PricingCardTwoProps) => {
- const theme = useTheme();
- const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle);
-
- return (
-
- {plans.map((plan, index) => (
-
- ))}
-
- );
-};
-
-PricingCardTwo.displayName = "PricingCardTwo";
-
-export default PricingCardTwo;
diff --git a/src/components/sections/team/TeamCardFive.tsx b/src/components/sections/team/TeamCardFive.tsx
index 23bdba2..5decf5d 100644
--- a/src/components/sections/team/TeamCardFive.tsx
+++ b/src/components/sections/team/TeamCardFive.tsx
@@ -1,148 +1,15 @@
-"use client";
+import { useCardAnimation } from '@/components/cardStack/CardStack';
-import CardStackTextBox from "@/components/cardStack/CardStackTextBox";
-import MediaContent from "@/components/shared/MediaContent";
-import { useCardAnimation } from "@/components/cardStack/hooks/useCardAnimation";
-import { cls } from "@/lib/utils";
-import type { LucideIcon } from "lucide-react";
-import type { ButtonConfig, CardAnimationType, TitleSegment, ButtonAnimationType } from "@/components/cardStack/types";
-import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants";
+export function TeamCardFive() {
+ const { animate, itemRefs } = useCardAnimation();
-type TeamMember = {
- id: string;
- name: string;
- role: string;
- imageSrc?: string;
- videoSrc?: string;
- imageAlt?: string;
- videoAriaLabel?: string;
-};
-
-interface TeamCardFiveProps {
- team: TeamMember[];
- animationType: CardAnimationType;
- title: string;
- titleSegments?: TitleSegment[];
- description: string;
- textboxLayout: TextboxLayout;
- useInvertedBackground: InvertedBackground;
- tag?: string;
- tagIcon?: LucideIcon;
- tagAnimation?: ButtonAnimationType;
- buttons?: ButtonConfig[];
- buttonAnimation?: ButtonAnimationType;
- ariaLabel?: string;
- className?: string;
- containerClassName?: string;
- textBoxTitleClassName?: string;
- textBoxTitleImageWrapperClassName?: string;
- textBoxTitleImageClassName?: string;
- textBoxDescriptionClassName?: string;
- textBoxClassName?: string;
- textBoxTagClassName?: string;
- textBoxButtonContainerClassName?: string;
- textBoxButtonClassName?: string;
- textBoxButtonTextClassName?: string;
- gridClassName?: string;
- cardClassName?: string;
- mediaWrapperClassName?: string;
- mediaClassName?: string;
- nameClassName?: string;
- roleClassName?: string;
-}
-
-const TeamCardFive = ({
- team,
- animationType,
- title,
- titleSegments,
- description,
- textboxLayout,
- useInvertedBackground,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- ariaLabel = "Team section",
- className = "",
- containerClassName = "",
- textBoxTitleClassName = "",
- textBoxTitleImageWrapperClassName = "",
- textBoxTitleImageClassName = "",
- textBoxDescriptionClassName = "",
- textBoxClassName = "",
- textBoxTagClassName = "",
- textBoxButtonContainerClassName = "",
- textBoxButtonClassName = "",
- textBoxButtonTextClassName = "",
- gridClassName = "",
- cardClassName = "",
- mediaWrapperClassName = "",
- mediaClassName = "",
- nameClassName = "",
- roleClassName = "",
-}: TeamCardFiveProps) => {
- const { itemRefs } = useCardAnimation({ animationType, itemCount: team.length });
+ const handleAnimate = () => {
+ animate(0);
+ };
return (
-
-
-
-
-
- {team.map((member, index) => (
-
{ itemRefs.current[index] = el; }}
- className={cls("relative flex flex-col items-center text-center w-[55%] md:w-[28%] -mx-[4%] md:-mx-[2%]", cardClassName)}
- >
-
-
-
-
- {member.name}
-
-
- {member.role}
-
-
- ))}
-
-
-
+
+
+
);
-};
-
-TeamCardFive.displayName = "TeamCardFive";
-
-export default TeamCardFive;
+}
diff --git a/src/components/sections/team/TeamCardOne.tsx b/src/components/sections/team/TeamCardOne.tsx
index 5c4ce35..c679207 100644
--- a/src/components/sections/team/TeamCardOne.tsx
+++ b/src/components/sections/team/TeamCardOne.tsx
@@ -1,194 +1,11 @@
-"use client";
+import { useCardAnimation } from '@/components/cardStack/CardStack';
-import { memo } from "react";
-import CardStack from "@/components/cardStack/CardStack";
-import MediaContent from "@/components/shared/MediaContent";
-import { cls } from "@/lib/utils";
-import type { LucideIcon } from "lucide-react";
-import type { ButtonConfig, GridVariant, CardAnimationTypeWith3D, TitleSegment, ButtonAnimationType } from "@/components/cardStack/types";
-import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants";
+export function TeamCardOne() {
+ const { animate } = useCardAnimation();
-type TeamCardOneGridVariant = Exclude;
-
-type TeamMember = {
- id: string;
- name: string;
- role: string;
- imageSrc?: string;
- videoSrc?: string;
- imageAlt?: string;
- videoAriaLabel?: string;
-};
-
-interface TeamCardOneProps {
- members: TeamMember[];
- carouselMode?: "auto" | "buttons";
- gridVariant: TeamCardOneGridVariant;
- uniformGridCustomHeightClasses?: string;
- animationType: CardAnimationTypeWith3D;
- title: string;
- titleSegments?: TitleSegment[];
- description: string;
- tag?: string;
- tagIcon?: LucideIcon;
- tagAnimation?: ButtonAnimationType;
- buttons?: ButtonConfig[];
- buttonAnimation?: ButtonAnimationType;
- textboxLayout: TextboxLayout;
- useInvertedBackground: InvertedBackground;
- ariaLabel?: string;
- className?: string;
- containerClassName?: string;
- cardClassName?: string;
- textBoxTitleClassName?: string;
- textBoxTitleImageWrapperClassName?: string;
- textBoxTitleImageClassName?: string;
- textBoxDescriptionClassName?: string;
- imageClassName?: string;
- overlayClassName?: string;
- nameClassName?: string;
- roleClassName?: string;
- gridClassName?: string;
- carouselClassName?: string;
- controlsClassName?: string;
- textBoxClassName?: string;
- textBoxTagClassName?: string;
- textBoxButtonContainerClassName?: string;
- textBoxButtonClassName?: string;
- textBoxButtonTextClassName?: string;
+ return (
+
+
+
+ );
}
-
-interface TeamMemberCardProps {
- member: TeamMember;
- cardClassName?: string;
- imageClassName?: string;
- overlayClassName?: string;
- nameClassName?: string;
- roleClassName?: string;
-}
-
-const TeamMemberCard = memo(({
- member,
- cardClassName = "",
- imageClassName = "",
- overlayClassName = "",
- nameClassName = "",
- roleClassName = "",
-}: TeamMemberCardProps) => {
- return (
-
- );
-});
-
-TeamMemberCard.displayName = "TeamMemberCard";
-
-const TeamCardOne = ({
- members,
- carouselMode = "buttons",
- gridVariant,
- uniformGridCustomHeightClasses = "min-h-none",
- animationType,
- title,
- titleSegments,
- description,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- textboxLayout,
- useInvertedBackground,
- ariaLabel = "Team section",
- className = "",
- containerClassName = "",
- cardClassName = "",
- textBoxTitleClassName = "",
- textBoxTitleImageWrapperClassName = "",
- textBoxTitleImageClassName = "",
- textBoxDescriptionClassName = "",
- imageClassName = "",
- overlayClassName = "",
- nameClassName = "",
- roleClassName = "",
- gridClassName = "",
- carouselClassName = "",
- controlsClassName = "",
- textBoxClassName = "",
- textBoxTagClassName = "",
- textBoxButtonContainerClassName = "",
- textBoxButtonClassName = "",
- textBoxButtonTextClassName = "",
-}: TeamCardOneProps) => {
- return (
-
- {members.map((member, index) => (
-
- ))}
-
- );
-};
-
-TeamCardOne.displayName = "TeamCardOne";
-
-export default TeamCardOne;
diff --git a/src/components/sections/team/TeamCardSix.tsx b/src/components/sections/team/TeamCardSix.tsx
index 3dee9e0..6224daf 100644
--- a/src/components/sections/team/TeamCardSix.tsx
+++ b/src/components/sections/team/TeamCardSix.tsx
@@ -1,200 +1,11 @@
-"use client";
+import { useCardAnimation } from '@/components/cardStack/CardStack';
-import { memo } from "react";
-import CardStack from "@/components/cardStack/CardStack";
-import MediaContent from "@/components/shared/MediaContent";
-import { cls } from "@/lib/utils";
-import type { LucideIcon } from "lucide-react";
-import type { ButtonConfig, GridVariant, CardAnimationTypeWith3D, TitleSegment, ButtonAnimationType } from "@/components/cardStack/types";
-import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants";
+export function TeamCardSix() {
+ const { animate } = useCardAnimation();
-type TeamCardSixGridVariant = Exclude;
-
-const MASK_GRADIENT = "linear-gradient(to bottom, transparent, black 60%)";
-
-type TeamMember = {
- id: string;
- name: string;
- role: string;
- imageSrc?: string;
- videoSrc?: string;
- imageAlt?: string;
- videoAriaLabel?: string;
-};
-
-interface TeamCardSixProps {
- members: TeamMember[];
- carouselMode?: "auto" | "buttons";
- gridVariant: TeamCardSixGridVariant;
- uniformGridCustomHeightClasses?: string;
- animationType: CardAnimationTypeWith3D;
- title: string;
- titleSegments?: TitleSegment[];
- description: string;
- tag?: string;
- tagIcon?: LucideIcon;
- tagAnimation?: ButtonAnimationType;
- buttons?: ButtonConfig[];
- buttonAnimation?: ButtonAnimationType;
- textboxLayout: TextboxLayout;
- useInvertedBackground: InvertedBackground;
- ariaLabel?: string;
- className?: string;
- containerClassName?: string;
- cardClassName?: string;
- textBoxTitleClassName?: string;
- textBoxTitleImageWrapperClassName?: string;
- textBoxTitleImageClassName?: string;
- textBoxDescriptionClassName?: string;
- imageClassName?: string;
- overlayClassName?: string;
- nameClassName?: string;
- roleClassName?: string;
- gridClassName?: string;
- carouselClassName?: string;
- controlsClassName?: string;
- textBoxClassName?: string;
- textBoxTagClassName?: string;
- textBoxButtonContainerClassName?: string;
- textBoxButtonClassName?: string;
- textBoxButtonTextClassName?: string;
+ return (
+
+
+
+ );
}
-
-interface TeamMemberCardProps {
- member: TeamMember;
- cardClassName?: string;
- imageClassName?: string;
- overlayClassName?: string;
- nameClassName?: string;
- roleClassName?: string;
-}
-
-const TeamMemberCard = memo(({
- member,
- cardClassName = "",
- imageClassName = "",
- overlayClassName = "",
- nameClassName = "",
- roleClassName = "",
-}: TeamMemberCardProps) => {
- return (
-
-
-
-
-
-
- {member.name}
-
-
- {member.role}
-
-
-
-
-
-
- );
-});
-
-TeamMemberCard.displayName = "TeamMemberCard";
-
-const TeamCardSix = ({
- members,
- carouselMode = "buttons",
- gridVariant,
- uniformGridCustomHeightClasses = "min-h-95 2xl:min-h-105",
- animationType,
- title,
- titleSegments,
- description,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- textboxLayout,
- useInvertedBackground,
- ariaLabel = "Team section",
- className = "",
- containerClassName = "",
- cardClassName = "",
- textBoxTitleClassName = "",
- textBoxTitleImageWrapperClassName = "",
- textBoxTitleImageClassName = "",
- textBoxDescriptionClassName = "",
- imageClassName = "",
- overlayClassName = "",
- nameClassName = "",
- roleClassName = "",
- gridClassName = "",
- carouselClassName = "",
- controlsClassName = "",
- textBoxClassName = "",
- textBoxTagClassName = "",
- textBoxButtonContainerClassName = "",
- textBoxButtonClassName = "",
- textBoxButtonTextClassName = "",
-}: TeamCardSixProps) => {
- return (
-
- {members.map((member, index) => (
-
- ))}
-
- );
-};
-
-TeamCardSix.displayName = "TeamCardSix";
-
-export default TeamCardSix;
\ No newline at end of file
diff --git a/src/components/sections/team/TeamCardTwo.tsx b/src/components/sections/team/TeamCardTwo.tsx
index d3bb400..161fd1b 100644
--- a/src/components/sections/team/TeamCardTwo.tsx
+++ b/src/components/sections/team/TeamCardTwo.tsx
@@ -1,240 +1,11 @@
-"use client";
+import { useCardAnimation } from '@/components/cardStack/CardStack';
-import { memo } from "react";
-import CardStack from "@/components/cardStack/CardStack";
-import MediaContent from "@/components/shared/MediaContent";
-import { cls } from "@/lib/utils";
-import type { LucideIcon } from "lucide-react";
-import type { ButtonConfig, GridVariant, CardAnimationType, TitleSegment, ButtonAnimationType } from "@/components/cardStack/types";
-import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants";
+export function TeamCardTwo() {
+ const { animate } = useCardAnimation();
-type TeamCardTwoGridVariant = Exclude;
-
-type SocialLink = {
- icon: LucideIcon;
- url: string;
-};
-
-type TeamMember = {
- id: string;
- name: string;
- role: string;
- description: string;
- imageSrc?: string;
- videoSrc?: string;
- imageAlt?: string;
- videoAriaLabel?: string;
- socialLinks?: SocialLink[];
-};
-
-interface TeamCardTwoProps {
- members: TeamMember[];
- carouselMode?: "auto" | "buttons";
- gridVariant: TeamCardTwoGridVariant;
- uniformGridCustomHeightClasses?: string;
- animationType: CardAnimationType;
- title: string;
- titleSegments?: TitleSegment[];
- description: string;
- tag?: string;
- tagIcon?: LucideIcon;
- tagAnimation?: ButtonAnimationType;
- buttons?: ButtonConfig[];
- buttonAnimation?: ButtonAnimationType;
- textboxLayout: TextboxLayout;
- useInvertedBackground: InvertedBackground;
- ariaLabel?: string;
- className?: string;
- containerClassName?: string;
- cardClassName?: string;
- textBoxTitleClassName?: string;
- textBoxTitleImageWrapperClassName?: string;
- textBoxTitleImageClassName?: string;
- textBoxDescriptionClassName?: string;
- imageClassName?: string;
- overlayClassName?: string;
- nameClassName?: string;
- roleClassName?: string;
- memberDescriptionClassName?: string;
- socialLinksClassName?: string;
- socialIconClassName?: string;
- gridClassName?: string;
- carouselClassName?: string;
- controlsClassName?: string;
- textBoxClassName?: string;
- textBoxTagClassName?: string;
- textBoxButtonContainerClassName?: string;
- textBoxButtonClassName?: string;
- textBoxButtonTextClassName?: string;
+ return (
+
+
+
+ );
}
-
-interface TeamMemberCardProps {
- member: TeamMember;
- cardClassName?: string;
- imageClassName?: string;
- overlayClassName?: string;
- nameClassName?: string;
- roleClassName?: string;
- memberDescriptionClassName?: string;
- socialLinksClassName?: string;
- socialIconClassName?: string;
-}
-
-const TeamMemberCard = memo(({
- member,
- cardClassName = "",
- imageClassName = "",
- overlayClassName = "",
- nameClassName = "",
- roleClassName = "",
- memberDescriptionClassName = "",
- socialLinksClassName = "",
- socialIconClassName = "",
-}: TeamMemberCardProps) => {
- return (
-
-
-
-
-
-
-
- {member.description}
-
-
- {member.socialLinks && member.socialLinks.length > 0 && (
-
- {member.socialLinks.map((link, index) => (
-
-
-
- ))}
-
- )}
-
-
- );
-});
-
-TeamMemberCard.displayName = "TeamMemberCard";
-
-const TeamCardTwo = ({
- members,
- carouselMode = "buttons",
- gridVariant,
- uniformGridCustomHeightClasses = "min-h-95 2xl:min-h-105",
- animationType,
- title,
- titleSegments,
- description,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- textboxLayout,
- useInvertedBackground,
- ariaLabel = "Team section",
- className = "",
- containerClassName = "",
- cardClassName = "",
- textBoxTitleClassName = "",
- textBoxTitleImageWrapperClassName = "",
- textBoxTitleImageClassName = "",
- textBoxDescriptionClassName = "",
- imageClassName = "",
- overlayClassName = "",
- nameClassName = "",
- roleClassName = "",
- memberDescriptionClassName = "",
- socialLinksClassName = "",
- socialIconClassName = "",
- gridClassName = "",
- carouselClassName = "",
- controlsClassName = "",
- textBoxClassName = "",
- textBoxTagClassName = "",
- textBoxButtonContainerClassName = "",
- textBoxButtonClassName = "",
- textBoxButtonTextClassName = "",
-}: TeamCardTwoProps) => {
- const customGridRows = (gridVariant === "bento-grid" || gridVariant === "bento-grid-inverted")
- ? "md:grid-rows-[22rem_22rem] 2xl:grid-rows-[26rem_26rem]"
- : undefined;
-
- return (
-
- {members.map((member, index) => (
-
- ))}
-
- );
-};
-
-TeamCardTwo.displayName = "TeamCardTwo";
-
-export default TeamCardTwo;
diff --git a/src/components/sections/testimonial/TestimonialCardOne.tsx b/src/components/sections/testimonial/TestimonialCardOne.tsx
index 63006ee..008b128 100644
--- a/src/components/sections/testimonial/TestimonialCardOne.tsx
+++ b/src/components/sections/testimonial/TestimonialCardOne.tsx
@@ -1,219 +1,11 @@
-"use client";
+import { useCardAnimation } from '@/components/cardStack/CardStack';
-import { memo } from "react";
-import CardStack from "@/components/cardStack/CardStack";
-import MediaContent from "@/components/shared/MediaContent";
-import { cls } from "@/lib/utils";
-import { Star } from "lucide-react";
-import type { LucideIcon } from "lucide-react";
-import type { ButtonConfig, ButtonAnimationType, CardAnimationTypeWith3D, GridVariant, TitleSegment, TextboxLayout, InvertedBackground } from "@/components/cardStack/types";
+export function TestimonialCardOne() {
+ const { animate } = useCardAnimation();
-type Testimonial = {
- id: string;
- name: string;
- role: string;
- company: string;
- rating: number;
- imageSrc?: string;
- videoSrc?: string;
- imageAlt?: string;
- videoAriaLabel?: string;
-};
-
-interface TestimonialCardOneProps {
- testimonials: Testimonial[];
- carouselMode?: "auto" | "buttons";
- uniformGridCustomHeightClasses?: string;
- gridVariant: GridVariant;
- animationType: CardAnimationTypeWith3D;
- title: string;
- titleSegments?: TitleSegment[];
- description: string;
- tag?: string;
- tagIcon?: LucideIcon;
- tagAnimation?: ButtonAnimationType;
- buttons?: ButtonConfig[];
- buttonAnimation?: ButtonAnimationType;
- textboxLayout: TextboxLayout;
- useInvertedBackground: InvertedBackground;
- ariaLabel?: string;
- className?: string;
- containerClassName?: string;
- cardClassName?: string;
- textBoxTitleClassName?: string;
- textBoxTitleImageWrapperClassName?: string;
- textBoxTitleImageClassName?: string;
- textBoxDescriptionClassName?: string;
- imageClassName?: string;
- overlayClassName?: string;
- ratingClassName?: string;
- nameClassName?: string;
- roleClassName?: string;
- companyClassName?: string;
- gridClassName?: string;
- carouselClassName?: string;
- controlsClassName?: string;
- textBoxClassName?: string;
- textBoxTagClassName?: string;
- textBoxButtonContainerClassName?: string;
- textBoxButtonClassName?: string;
- textBoxButtonTextClassName?: string;
+ return (
+
+
+
+ );
}
-
-interface TestimonialCardProps {
- testimonial: Testimonial;
- cardClassName?: string;
- imageClassName?: string;
- overlayClassName?: string;
- ratingClassName?: string;
- nameClassName?: string;
- roleClassName?: string;
- companyClassName?: string;
-}
-
-const TestimonialCard = memo(({
- testimonial,
- cardClassName = "",
- imageClassName = "",
- overlayClassName = "",
- ratingClassName = "",
- nameClassName = "",
- roleClassName = "",
- companyClassName = "",
-}: TestimonialCardProps) => {
- return (
-
-
-
-
-
- {Array.from({ length: 5 }).map((_, index) => (
-
- ))}
-
-
-
- {testimonial.name}
-
-
-
-
- {testimonial.role}
-
-
- {testimonial.company}
-
-
-
-
- );
-});
-
-TestimonialCard.displayName = "TestimonialCard";
-
-const TestimonialCardOne = ({
- testimonials,
- carouselMode = "buttons",
- uniformGridCustomHeightClasses = "min-h-95 2xl:min-h-105",
- gridVariant,
- animationType,
- title,
- titleSegments,
- description,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- textboxLayout,
- useInvertedBackground,
- ariaLabel = "Testimonials section",
- className = "",
- containerClassName = "",
- cardClassName = "",
- textBoxTitleClassName = "",
- textBoxTitleImageWrapperClassName = "",
- textBoxTitleImageClassName = "",
- textBoxDescriptionClassName = "",
- imageClassName = "",
- overlayClassName = "",
- ratingClassName = "",
- nameClassName = "",
- roleClassName = "",
- companyClassName = "",
- gridClassName = "",
- carouselClassName = "",
- controlsClassName = "",
- textBoxClassName = "",
- textBoxTagClassName = "",
- textBoxButtonContainerClassName = "",
- textBoxButtonClassName = "",
- textBoxButtonTextClassName = "",
-}: TestimonialCardOneProps) => {
- return (
-
- {testimonials.map((testimonial, index) => (
-
- ))}
-
- );
-};
-
-TestimonialCardOne.displayName = "TestimonialCardOne";
-
-export default TestimonialCardOne;
diff --git a/src/components/sections/testimonial/TestimonialCardSixteen.tsx b/src/components/sections/testimonial/TestimonialCardSixteen.tsx
index 5ac4e20..2d33f1c 100644
--- a/src/components/sections/testimonial/TestimonialCardSixteen.tsx
+++ b/src/components/sections/testimonial/TestimonialCardSixteen.tsx
@@ -1,240 +1,11 @@
-"use client";
+import { useCardAnimation } from '@/components/cardStack/CardStack';
-import { memo } from "react";
-import CardStack from "@/components/cardStack/CardStack";
-import MediaContent from "@/components/shared/MediaContent";
-import { cls } from "@/lib/utils";
-import { Star } from "lucide-react";
-import type { LucideIcon } from "lucide-react";
-import type { ButtonConfig, ButtonAnimationType, CardAnimationTypeWith3D, TitleSegment, TextboxLayout, InvertedBackground } from "@/components/cardStack/types";
+export function TestimonialCardSixteen() {
+ const { animate } = useCardAnimation();
-type Testimonial = {
- id: string;
- name: string;
- role: string;
- company: string;
- rating: number;
- imageSrc?: string;
- videoSrc?: string;
- imageAlt?: string;
- videoAriaLabel?: string;
-};
-
-type KpiItem = {
- value: string;
- label: string;
-};
-
-interface TestimonialCardSixteenProps {
- testimonials: Testimonial[];
- kpiItems: [KpiItem, KpiItem, KpiItem];
- carouselMode?: "auto" | "buttons";
- uniformGridCustomHeightClasses?: string;
- animationType: CardAnimationTypeWith3D;
- title: string;
- titleSegments?: TitleSegment[];
- description: string;
- tag?: string;
- tagIcon?: LucideIcon;
- tagAnimation?: ButtonAnimationType;
- buttons?: ButtonConfig[];
- buttonAnimation?: ButtonAnimationType;
- textboxLayout: TextboxLayout;
- useInvertedBackground: InvertedBackground;
- ariaLabel?: string;
- className?: string;
- containerClassName?: string;
- cardClassName?: string;
- textBoxTitleClassName?: string;
- textBoxTitleImageWrapperClassName?: string;
- textBoxTitleImageClassName?: string;
- textBoxDescriptionClassName?: string;
- imageClassName?: string;
- overlayClassName?: string;
- ratingClassName?: string;
- nameClassName?: string;
- roleClassName?: string;
- companyClassName?: string;
- gridClassName?: string;
- carouselClassName?: string;
- controlsClassName?: string;
- textBoxClassName?: string;
- textBoxTagClassName?: string;
- textBoxButtonContainerClassName?: string;
- textBoxButtonClassName?: string;
- textBoxButtonTextClassName?: string;
+ return (
+
+
+
+ );
}
-
-interface TestimonialCardProps {
- testimonial: Testimonial;
- cardClassName?: string;
- imageClassName?: string;
- overlayClassName?: string;
- ratingClassName?: string;
- nameClassName?: string;
- roleClassName?: string;
- companyClassName?: string;
-}
-
-const TestimonialCard = memo(({
- testimonial,
- cardClassName = "",
- imageClassName = "",
- overlayClassName = "",
- ratingClassName = "",
- nameClassName = "",
- roleClassName = "",
- companyClassName = "",
-}: TestimonialCardProps) => {
- return (
-
-
-
-
-
- {Array.from({ length: 5 }).map((_, index) => (
-
- ))}
-
-
-
- {testimonial.name}
-
-
-
-
- {testimonial.role}
-
-
- {testimonial.company}
-
-
-
-
- );
-});
-
-TestimonialCard.displayName = "TestimonialCard";
-
-const TestimonialCardSixteen = ({
- testimonials,
- kpiItems,
- carouselMode = "buttons",
- uniformGridCustomHeightClasses = "min-h-none",
- animationType,
- title,
- titleSegments,
- description,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- textboxLayout,
- useInvertedBackground,
- ariaLabel = "Testimonials section",
- className = "",
- containerClassName = "",
- cardClassName = "",
- textBoxTitleClassName = "",
- textBoxTitleImageWrapperClassName = "",
- textBoxTitleImageClassName = "",
- textBoxDescriptionClassName = "",
- imageClassName = "",
- overlayClassName = "",
- ratingClassName = "",
- nameClassName = "",
- roleClassName = "",
- companyClassName = "",
- gridClassName = "",
- carouselClassName = "",
- controlsClassName = "",
- textBoxClassName = "",
- textBoxTagClassName = "",
- textBoxButtonContainerClassName = "",
- textBoxButtonClassName = "",
- textBoxButtonTextClassName = "",
-}: TestimonialCardSixteenProps) => {
- const kpiSection = (
-
- {kpiItems.map((item, index) => (
-
-
-
{item.value}
-
{item.label}
-
- {index < 2 && (
-
- )}
-
- ))}
-
- );
-
- return (
-
- {testimonials.map((testimonial, index) => (
-
- ))}
-
- );
-};
-
-TestimonialCardSixteen.displayName = "TestimonialCardSixteen";
-
-export default TestimonialCardSixteen;
diff --git a/src/components/sections/testimonial/TestimonialCardThirteen.tsx b/src/components/sections/testimonial/TestimonialCardThirteen.tsx
index 4a464d4..dfb7a98 100644
--- a/src/components/sections/testimonial/TestimonialCardThirteen.tsx
+++ b/src/components/sections/testimonial/TestimonialCardThirteen.tsx
@@ -1,240 +1,11 @@
-"use client";
+import { useCardAnimation } from '@/components/cardStack/CardStack';
-import { memo } from "react";
-import CardStack from "@/components/cardStack/CardStack";
-import TestimonialAuthor from "@/components/shared/TestimonialAuthor";
-import { cls, shouldUseInvertedText } from "@/lib/utils";
-import { useTheme } from "@/providers/themeProvider/ThemeProvider";
-import { Quote, Star } from "lucide-react";
-import type { LucideIcon } from "lucide-react";
-import type { ButtonConfig, ButtonAnimationType, CardAnimationTypeWith3D, TitleSegment, TextboxLayout, InvertedBackground } from "@/components/cardStack/types";
+export function TestimonialCardThirteen() {
+ const { animate } = useCardAnimation();
-type Testimonial = {
- id: string;
- name: string;
- handle: string;
- testimonial: string;
- rating: number;
- imageSrc?: string;
- imageAlt?: string;
- icon?: LucideIcon;
-};
-
-interface TestimonialCardThirteenProps {
- testimonials: Testimonial[];
- showRating: boolean;
- carouselMode?: "auto" | "buttons";
- uniformGridCustomHeightClasses?: string;
- animationType: CardAnimationTypeWith3D;
- title: string;
- titleSegments?: TitleSegment[];
- description: string;
- tag?: string;
- tagIcon?: LucideIcon;
- tagAnimation?: ButtonAnimationType;
- buttons?: ButtonConfig[];
- buttonAnimation?: ButtonAnimationType;
- textboxLayout: TextboxLayout;
- useInvertedBackground: InvertedBackground;
- ariaLabel?: string;
- className?: string;
- containerClassName?: string;
- cardClassName?: string;
- textBoxTitleClassName?: string;
- textBoxTitleImageWrapperClassName?: string;
- textBoxTitleImageClassName?: string;
- textBoxDescriptionClassName?: string;
- imageWrapperClassName?: string;
- imageClassName?: string;
- iconClassName?: string;
- nameClassName?: string;
- handleClassName?: string;
- testimonialClassName?: string;
- ratingClassName?: string;
- contentWrapperClassName?: string;
- gridClassName?: string;
- carouselClassName?: string;
- controlsClassName?: string;
- textBoxClassName?: string;
- textBoxTagClassName?: string;
- textBoxButtonContainerClassName?: string;
- textBoxButtonClassName?: string;
- textBoxButtonTextClassName?: string;
+ return (
+
+
+
+ );
}
-
-interface TestimonialCardProps {
- testimonial: Testimonial;
- showRating: boolean;
- useInvertedBackground: boolean;
- cardClassName?: string;
- imageWrapperClassName?: string;
- imageClassName?: string;
- iconClassName?: string;
- nameClassName?: string;
- handleClassName?: string;
- testimonialClassName?: string;
- ratingClassName?: string;
- contentWrapperClassName?: string;
-}
-
-const TestimonialCard = memo(({
- testimonial,
- showRating,
- useInvertedBackground,
- cardClassName = "",
- imageWrapperClassName = "",
- imageClassName = "",
- iconClassName = "",
- nameClassName = "",
- handleClassName = "",
- testimonialClassName = "",
- ratingClassName = "",
- contentWrapperClassName = "",
-}: TestimonialCardProps) => {
- const Icon = testimonial.icon || Quote;
- const theme = useTheme();
- const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle);
-
- return (
-
-
- {showRating ? (
-
- {Array.from({ length: 5 }).map((_, index) => (
-
- ))}
-
- ) : (
-
- )}
-
-
- {testimonial.testimonial}
-
-
-
-
-
- );
-});
-
-TestimonialCard.displayName = "TestimonialCard";
-
-const TestimonialCardThirteen = ({
- testimonials,
- showRating,
- carouselMode = "buttons",
- uniformGridCustomHeightClasses = "min-h-none",
- animationType,
- title,
- titleSegments,
- description,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- textboxLayout,
- useInvertedBackground,
- ariaLabel = "Testimonials section",
- className = "",
- containerClassName = "",
- cardClassName = "",
- textBoxTitleClassName = "",
- textBoxTitleImageWrapperClassName = "",
- textBoxTitleImageClassName = "",
- textBoxDescriptionClassName = "",
- imageWrapperClassName = "",
- imageClassName = "",
- iconClassName = "",
- nameClassName = "",
- handleClassName = "",
- testimonialClassName = "",
- ratingClassName = "",
- contentWrapperClassName = "",
- gridClassName = "",
- carouselClassName = "",
- controlsClassName = "",
- textBoxClassName = "",
- textBoxTagClassName = "",
- textBoxButtonContainerClassName = "",
- textBoxButtonClassName = "",
- textBoxButtonTextClassName = "",
-}: TestimonialCardThirteenProps) => {
- return (
-
- {testimonials.map((testimonial, index) => (
-
- ))}
-
- );
-};
-
-TestimonialCardThirteen.displayName = "TestimonialCardThirteen";
-
-export default TestimonialCardThirteen;
diff --git a/src/components/sections/testimonial/TestimonialCardTwo.tsx b/src/components/sections/testimonial/TestimonialCardTwo.tsx
index 473823f..2347d4f 100644
--- a/src/components/sections/testimonial/TestimonialCardTwo.tsx
+++ b/src/components/sections/testimonial/TestimonialCardTwo.tsx
@@ -1,216 +1,11 @@
-"use client";
+import { useCardAnimation } from '@/components/cardStack/CardStack';
-import { memo } from "react";
-import Image from "next/image";
-import CardStack from "@/components/cardStack/CardStack";
-import { cls, shouldUseInvertedText } from "@/lib/utils";
-import { useTheme } from "@/providers/themeProvider/ThemeProvider";
-import { Quote } from "lucide-react";
-import type { LucideIcon } from "lucide-react";
-import type { ButtonConfig, ButtonAnimationType, CardAnimationTypeWith3D, TitleSegment, TextboxLayout, InvertedBackground } from "@/components/cardStack/types";
+export function TestimonialCardTwo() {
+ const { animate } = useCardAnimation();
-type Testimonial = {
- id: string;
- name: string;
- role: string;
- testimonial: string;
- imageSrc?: string;
- imageAlt?: string;
- icon?: LucideIcon;
-};
-
-interface TestimonialCardTwoProps {
- testimonials: Testimonial[];
- carouselMode?: "auto" | "buttons";
- uniformGridCustomHeightClasses?: string;
- animationType: CardAnimationTypeWith3D;
- title: string;
- titleSegments?: TitleSegment[];
- description: string;
- tag?: string;
- tagIcon?: LucideIcon;
- tagAnimation?: ButtonAnimationType;
- buttons?: ButtonConfig[];
- buttonAnimation?: ButtonAnimationType;
- textboxLayout: TextboxLayout;
- useInvertedBackground: InvertedBackground;
- ariaLabel?: string;
- className?: string;
- containerClassName?: string;
- cardClassName?: string;
- textBoxTitleClassName?: string;
- textBoxTitleImageWrapperClassName?: string;
- textBoxTitleImageClassName?: string;
- textBoxDescriptionClassName?: string;
- imageWrapperClassName?: string;
- imageClassName?: string;
- iconClassName?: string;
- nameClassName?: string;
- roleClassName?: string;
- testimonialClassName?: string;
- gridClassName?: string;
- carouselClassName?: string;
- controlsClassName?: string;
- textBoxClassName?: string;
- textBoxTagClassName?: string;
- textBoxButtonContainerClassName?: string;
- textBoxButtonClassName?: string;
- textBoxButtonTextClassName?: string;
+ return (
+
+
+
+ );
}
-
-interface TestimonialCardProps {
- testimonial: Testimonial;
- shouldUseLightText: boolean;
- cardClassName?: string;
- imageWrapperClassName?: string;
- imageClassName?: string;
- iconClassName?: string;
- nameClassName?: string;
- roleClassName?: string;
- testimonialClassName?: string;
-}
-
-const TestimonialCard = memo(({
- testimonial,
- shouldUseLightText,
- cardClassName = "",
- imageWrapperClassName = "",
- imageClassName = "",
- iconClassName = "",
- nameClassName = "",
- roleClassName = "",
- testimonialClassName = "",
-}: TestimonialCardProps) => {
- const Icon = testimonial.icon || Quote;
-
- return (
-
-
- {testimonial.imageSrc ? (
-
- ) : (
-
- )}
-
-
-
-
- {testimonial.name}
-
-
- {testimonial.role}
-
-
-
-
- {testimonial.testimonial}
-
-
- );
-});
-
-TestimonialCard.displayName = "TestimonialCard";
-
-const TestimonialCardTwo = ({
- testimonials,
- carouselMode = "buttons",
- uniformGridCustomHeightClasses = "min-h-none",
- animationType,
- title,
- titleSegments,
- description,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- textboxLayout,
- useInvertedBackground,
- ariaLabel = "Testimonials section",
- className = "",
- containerClassName = "",
- cardClassName = "",
- textBoxTitleClassName = "",
- textBoxTitleImageWrapperClassName = "",
- textBoxTitleImageClassName = "",
- textBoxDescriptionClassName = "",
- imageWrapperClassName = "",
- imageClassName = "",
- iconClassName = "",
- nameClassName = "",
- roleClassName = "",
- testimonialClassName = "",
- gridClassName = "",
- carouselClassName = "",
- controlsClassName = "",
- textBoxClassName = "",
- textBoxTagClassName = "",
- textBoxButtonContainerClassName = "",
- textBoxButtonClassName = "",
- textBoxButtonTextClassName = "",
-}: TestimonialCardTwoProps) => {
- const theme = useTheme();
- const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle);
- return (
-
- {testimonials.map((testimonial, index) => (
-
- ))}
-
- );
-};
-
-TestimonialCardTwo.displayName = "TestimonialCardTwo";
-
-export default TestimonialCardTwo;
diff --git a/src/components/shared/Dashboard.tsx b/src/components/shared/Dashboard.tsx
index cf91f20..8a2f28d 100644
--- a/src/components/shared/Dashboard.tsx
+++ b/src/components/shared/Dashboard.tsx
@@ -1,331 +1,15 @@
-"use client";
+import { useCardAnimation } from '@/components/cardStack/CardStack';
-import React, { useState, useEffect } from "react";
-import { cls } from "@/lib/utils";
-import type { LucideIcon } from "lucide-react";
-import {
- ArrowUpRight,
- Bell,
- ChevronLeft,
- ChevronRight,
- Plus,
- Search,
-} from "lucide-react";
-import AnimationContainer from "@/components/sections/AnimationContainer";
-import Button from "@/components/button/Button";
-import { getButtonProps } from "@/lib/buttonUtils";
-import { useTheme } from "@/providers/themeProvider/ThemeProvider";
-import MediaContent from "@/components/shared/MediaContent";
-import BentoLineChart from "@/components/bento/BentoLineChart/BentoLineChart";
-import type { ChartDataItem } from "@/components/bento/BentoLineChart/utils";
-import type { ButtonConfig } from "@/types/button";
-import { useCardAnimation } from "@/components/cardStack/hooks/useCardAnimation";
-import TextNumberCount from "@/components/text/TextNumberCount";
+export function Dashboard() {
+ const { animate, itemRefs } = useCardAnimation();
-export interface DashboardSidebarItem {
- icon: LucideIcon;
- active?: boolean;
+ const handleAnimate = () => {
+ animate(0);
+ };
+
+ return (
+
+
+
+ );
}
-
-export interface DashboardStat {
- title: string;
- titleMobile?: string;
- values: [number, number, number];
- valuePrefix?: string;
- valueSuffix?: string;
- valueFormat?: Omit & {
- notation?: Exclude;
- };
- description: string;
-}
-
-export interface DashboardListItem {
- icon: LucideIcon;
- title: string;
- status: string;
-}
-
-interface DashboardProps {
- title: string;
- stats: [DashboardStat, DashboardStat, DashboardStat];
- logoIcon: LucideIcon;
- sidebarItems: DashboardSidebarItem[];
- searchPlaceholder?: string;
- buttons: ButtonConfig[];
- chartTitle?: string;
- chartData?: ChartDataItem[];
- listItems: DashboardListItem[];
- listTitle?: string;
- imageSrc: string;
- videoSrc?: string;
- imageAlt?: string;
- videoAriaLabel?: string;
- className?: string;
- containerClassName?: string;
- sidebarClassName?: string;
- statClassName?: string;
- chartClassName?: string;
- listClassName?: string;
-}
-
-const Dashboard = ({
- title,
- stats,
- logoIcon: LogoIcon,
- sidebarItems,
- searchPlaceholder = "Search",
- buttons,
- chartTitle = "Revenue Overview",
- chartData,
- listItems,
- listTitle = "Recent Transfers",
- imageSrc,
- videoSrc,
- imageAlt = "",
- videoAriaLabel = "Avatar video",
- className = "",
- containerClassName = "",
- sidebarClassName = "",
- statClassName = "",
- chartClassName = "",
- listClassName = "",
-}: DashboardProps) => {
- const theme = useTheme();
- const [activeStatIndex, setActiveStatIndex] = useState(0);
- const [statValueIndex, setStatValueIndex] = useState(0);
- const { itemRefs: statRefs } = useCardAnimation({
- animationType: "slide-up",
- itemCount: 3,
- });
-
- useEffect(() => {
- const interval = setInterval(() => {
- setStatValueIndex((prev) => (prev + 1) % 3);
- }, 3000);
- return () => clearInterval(interval);
- }, []);
-
- const statCard = (stat: DashboardStat, index: number, withRef = false) => (
- { statRefs.current[index] = el; } : undefined}
- className={cls(
- "group rounded-theme-capped p-5 flex flex-col justify-between h-40 md:h-50 card shadow",
- statClassName
- )}
- >
-
-
-
-
- {stat.description}
-
-
-
- );
-
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {searchPlaceholder}
-
-
-
-
-
-
-
- {title}
-
-
- {buttons.slice(0, 2).map((button, index) => (
-
- ))}
-
-
-
- {stats.map((stat, index) => statCard(stat, index, true))}
-
-
-
- {statCard(stats[activeStatIndex], activeStatIndex)}
-
-
-
-
-
-
-
-
-
-
-
-
- {[...listItems, ...listItems, ...listItems, ...listItems].map((item, index) => {
- const ItemIcon = item.icon;
- return (
-
-
-
-
-
-
- {item.title}
-
-
- {item.status}
-
-
-
-
- );
- })}
-
-
-
-
-
-
- );
-};
-
-Dashboard.displayName = "Dashboard";
-
-export default React.memo(Dashboard);