@opensite/ui 0.8.1 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/carousel-horizontal-cards.cjs +8 -6
- package/dist/carousel-horizontal-cards.js +8 -6
- package/dist/carousel-image-hero.cjs +85 -160
- package/dist/carousel-image-hero.d.cts +1 -5
- package/dist/carousel-image-hero.d.ts +1 -5
- package/dist/carousel-image-hero.js +85 -160
- package/dist/carousel-portfolio-hero.cjs +138 -59
- package/dist/carousel-portfolio-hero.js +138 -59
- package/dist/carousel-product-feature-showcase.cjs +148 -95
- package/dist/carousel-product-feature-showcase.js +148 -95
- package/dist/carousel-progress-slider.cjs +13 -9
- package/dist/carousel-progress-slider.js +13 -9
- package/dist/carousel-scrolling-feature-showcase.cjs +105 -54
- package/dist/carousel-scrolling-feature-showcase.js +105 -54
- package/dist/feature-accordion-image.cjs +9 -8
- package/dist/feature-accordion-image.js +9 -8
- package/dist/feature-animated-carousel.cjs +65 -49
- package/dist/feature-animated-carousel.js +65 -49
- package/dist/feature-badge-grid-six.cjs +20 -17
- package/dist/feature-badge-grid-six.js +21 -18
- package/dist/feature-bento-image-grid.cjs +12 -8
- package/dist/feature-bento-image-grid.js +12 -8
- package/dist/feature-bento-utilities.cjs +9 -5
- package/dist/feature-bento-utilities.js +9 -5
- package/dist/feature-capabilities-grid.cjs +41 -38
- package/dist/feature-capabilities-grid.js +41 -38
- package/dist/feature-card-grid-linked.cjs +18 -18
- package/dist/feature-card-grid-linked.js +19 -19
- package/dist/feature-carousel-progress.cjs +3 -3
- package/dist/feature-carousel-progress.js +4 -4
- package/dist/feature-category-image-cards.cjs +3 -3
- package/dist/feature-category-image-cards.js +4 -4
- package/dist/feature-checklist-image.cjs +2 -2
- package/dist/feature-checklist-image.js +2 -2
- package/dist/feature-checklist-three-column.cjs +6 -6
- package/dist/feature-checklist-three-column.js +7 -7
- package/dist/feature-icon-grid-accent.cjs +2 -2
- package/dist/feature-icon-grid-accent.js +2 -2
- package/dist/feature-icon-grid-bordered.cjs +29 -31
- package/dist/feature-icon-grid-bordered.d.cts +9 -9
- package/dist/feature-icon-grid-bordered.d.ts +9 -9
- package/dist/feature-icon-grid-bordered.js +30 -32
- package/dist/feature-icon-grid-muted.cjs +6 -6
- package/dist/feature-icon-grid-muted.d.cts +9 -9
- package/dist/feature-icon-grid-muted.d.ts +9 -9
- package/dist/feature-icon-grid-muted.js +7 -7
- package/dist/feature-icon-tabs-content.cjs +8 -8
- package/dist/feature-icon-tabs-content.d.cts +13 -13
- package/dist/feature-icon-tabs-content.d.ts +13 -13
- package/dist/feature-icon-tabs-content.js +9 -9
- package/dist/feature-image-cards-three-column.cjs +26 -27
- package/dist/feature-image-cards-three-column.js +27 -28
- package/dist/feature-image-overlay-badge.cjs +23 -21
- package/dist/feature-image-overlay-badge.js +24 -22
- package/dist/feature-integration-cards.cjs +19 -18
- package/dist/feature-integration-cards.js +20 -19
- package/dist/feature-numbered-cards.cjs +2 -2
- package/dist/feature-numbered-cards.js +3 -3
- package/dist/feature-pattern-grid-links.cjs +26 -29
- package/dist/feature-pattern-grid-links.d.cts +1 -5
- package/dist/feature-pattern-grid-links.d.ts +1 -5
- package/dist/feature-pattern-grid-links.js +27 -30
- package/dist/feature-showcase.cjs +441 -40
- package/dist/feature-showcase.d.cts +62 -5
- package/dist/feature-showcase.d.ts +62 -5
- package/dist/feature-showcase.js +438 -37
- package/dist/feature-split-image-reverse.cjs +15 -36
- package/dist/feature-split-image-reverse.js +16 -37
- package/dist/feature-split-image.cjs +15 -36
- package/dist/feature-split-image.js +16 -37
- package/dist/feature-stats-highlight.cjs +20 -32
- package/dist/feature-stats-highlight.js +21 -33
- package/dist/feature-tabbed-content-image.cjs +11 -6
- package/dist/feature-tabbed-content-image.js +11 -6
- package/dist/feature-three-column-values.cjs +6 -6
- package/dist/feature-three-column-values.js +6 -6
- package/dist/feature-utility-cards-grid.cjs +17 -15
- package/dist/feature-utility-cards-grid.js +18 -16
- package/dist/navbar-tabbed-sections.cjs +23 -16
- package/dist/navbar-tabbed-sections.js +23 -16
- package/dist/registry.cjs +941 -708
- package/dist/registry.js +943 -710
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import React__default, { useMemo } from 'react';
|
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { cva } from 'class-variance-authority';
|
|
7
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { Img } from '@page-speed/img';
|
|
9
9
|
|
|
10
10
|
// components/blocks/features/feature-split-image-reverse.tsx
|
|
@@ -831,40 +831,19 @@ function FeatureSplitImageReverse({
|
|
|
831
831
|
if (actionsSlot) return actionsSlot;
|
|
832
832
|
if (!actions || actions.length === 0) return null;
|
|
833
833
|
return actions.map((action, index) => {
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
index
|
|
848
|
-
);
|
|
849
|
-
}
|
|
850
|
-
return /* @__PURE__ */ jsxs(
|
|
851
|
-
Pressable,
|
|
852
|
-
{
|
|
853
|
-
href: action.href,
|
|
854
|
-
onClick: action.onClick,
|
|
855
|
-
variant: action.variant,
|
|
856
|
-
size: action.size,
|
|
857
|
-
className: action.className,
|
|
858
|
-
"aria-label": action["aria-label"],
|
|
859
|
-
asButton: true,
|
|
860
|
-
children: [
|
|
861
|
-
action.icon,
|
|
862
|
-
action.label,
|
|
863
|
-
action.iconAfter
|
|
864
|
-
]
|
|
865
|
-
},
|
|
866
|
-
index
|
|
867
|
-
);
|
|
834
|
+
const {
|
|
835
|
+
label,
|
|
836
|
+
icon,
|
|
837
|
+
iconAfter,
|
|
838
|
+
children,
|
|
839
|
+
className: actionClassName,
|
|
840
|
+
...pressableProps
|
|
841
|
+
} = action;
|
|
842
|
+
return /* @__PURE__ */ jsx(Pressable, { className: actionClassName, asButton: true, ...pressableProps, children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
843
|
+
icon,
|
|
844
|
+
label,
|
|
845
|
+
iconAfter
|
|
846
|
+
] }) }, index);
|
|
868
847
|
});
|
|
869
848
|
}, [actionsSlot, actions]);
|
|
870
849
|
const imageContent = useMemo(() => {
|
|
@@ -874,7 +853,7 @@ function FeatureSplitImageReverse({
|
|
|
874
853
|
Img,
|
|
875
854
|
{
|
|
876
855
|
src: imageSrc,
|
|
877
|
-
alt: imageAlt || "
|
|
856
|
+
alt: imageAlt || "",
|
|
878
857
|
className: cn("max-h-96 w-full rounded-md object-cover", imageClassName),
|
|
879
858
|
loading: "lazy",
|
|
880
859
|
optixFlowConfig
|
|
@@ -896,7 +875,7 @@ function FeatureSplitImageReverse({
|
|
|
896
875
|
/* @__PURE__ */ jsxs("div", { className: cn("flex flex-col items-center text-center lg:items-start lg:text-left", contentClassName), children: [
|
|
897
876
|
title && (typeof title === "string" ? /* @__PURE__ */ jsx("h2", { className: cn("my-6 mt-0 text-4xl font-semibold text-balance lg:text-5xl", titleClassName), children: title }) : /* @__PURE__ */ jsx("div", { className: cn("my-6 mt-0 text-4xl font-semibold text-balance lg:text-5xl", titleClassName), children: title })),
|
|
898
877
|
description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("mb-8 max-w-xl text-muted-foreground lg:text-lg", descriptionClassName), children: description }) : /* @__PURE__ */ jsx("div", { className: cn("mb-8 max-w-xl text-muted-foreground lg:text-lg", descriptionClassName), children: description })),
|
|
899
|
-
/* @__PURE__ */ jsx("div", { className: cn("flex w-full flex-col justify-center gap-2 sm:flex-row lg:justify-start", actionsClassName), children: actionsContent })
|
|
878
|
+
(actionsSlot || actions && actions.length > 0) && /* @__PURE__ */ jsx("div", { className: cn("flex w-full flex-col justify-center gap-2 sm:flex-row lg:justify-start", actionsClassName), children: actionsContent })
|
|
900
879
|
] })
|
|
901
880
|
] })
|
|
902
881
|
}
|
|
@@ -852,40 +852,19 @@ function FeatureSplitImage({
|
|
|
852
852
|
if (actionsSlot) return actionsSlot;
|
|
853
853
|
if (!actions || actions.length === 0) return null;
|
|
854
854
|
return actions.map((action, index) => {
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
index
|
|
869
|
-
);
|
|
870
|
-
}
|
|
871
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
872
|
-
Pressable,
|
|
873
|
-
{
|
|
874
|
-
href: action.href,
|
|
875
|
-
onClick: action.onClick,
|
|
876
|
-
variant: action.variant,
|
|
877
|
-
size: action.size,
|
|
878
|
-
className: action.className,
|
|
879
|
-
"aria-label": action["aria-label"],
|
|
880
|
-
asButton: true,
|
|
881
|
-
children: [
|
|
882
|
-
action.icon,
|
|
883
|
-
action.label,
|
|
884
|
-
action.iconAfter
|
|
885
|
-
]
|
|
886
|
-
},
|
|
887
|
-
index
|
|
888
|
-
);
|
|
855
|
+
const {
|
|
856
|
+
label,
|
|
857
|
+
icon,
|
|
858
|
+
iconAfter,
|
|
859
|
+
children,
|
|
860
|
+
className: actionClassName,
|
|
861
|
+
...pressableProps
|
|
862
|
+
} = action;
|
|
863
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Pressable, { className: actionClassName, asButton: true, ...pressableProps, children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
864
|
+
icon,
|
|
865
|
+
label,
|
|
866
|
+
iconAfter
|
|
867
|
+
] }) }, index);
|
|
889
868
|
});
|
|
890
869
|
}, [actionsSlot, actions]);
|
|
891
870
|
const imageContent = React.useMemo(() => {
|
|
@@ -895,7 +874,7 @@ function FeatureSplitImage({
|
|
|
895
874
|
img.Img,
|
|
896
875
|
{
|
|
897
876
|
src: imageSrc,
|
|
898
|
-
alt: imageAlt || "
|
|
877
|
+
alt: imageAlt || "",
|
|
899
878
|
className: cn("max-h-96 w-full rounded-md object-cover", imageClassName),
|
|
900
879
|
loading: "lazy",
|
|
901
880
|
optixFlowConfig
|
|
@@ -916,7 +895,7 @@ function FeatureSplitImage({
|
|
|
916
895
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col items-center text-center lg:items-start lg:text-left", contentClassName), children: [
|
|
917
896
|
title && (typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: cn("my-6 mt-0 text-4xl font-semibold text-balance lg:text-5xl", titleClassName), children: title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("my-6 mt-0 text-4xl font-semibold text-balance lg:text-5xl", titleClassName), children: title })),
|
|
918
897
|
description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("mb-8 max-w-xl text-muted-foreground lg:text-lg", descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mb-8 max-w-xl text-muted-foreground lg:text-lg", descriptionClassName), children: description })),
|
|
919
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex w-full flex-col justify-center gap-2 sm:flex-row lg:justify-start", actionsClassName), children: actionsContent })
|
|
898
|
+
(actionsSlot || actions && actions.length > 0) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex w-full flex-col justify-center gap-2 sm:flex-row lg:justify-start", actionsClassName), children: actionsContent })
|
|
920
899
|
] }),
|
|
921
900
|
imageContent
|
|
922
901
|
] })
|
|
@@ -4,7 +4,7 @@ import React__default, { useMemo } from 'react';
|
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { cva } from 'class-variance-authority';
|
|
7
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { Img } from '@page-speed/img';
|
|
9
9
|
|
|
10
10
|
// components/blocks/features/feature-split-image.tsx
|
|
@@ -831,40 +831,19 @@ function FeatureSplitImage({
|
|
|
831
831
|
if (actionsSlot) return actionsSlot;
|
|
832
832
|
if (!actions || actions.length === 0) return null;
|
|
833
833
|
return actions.map((action, index) => {
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
index
|
|
848
|
-
);
|
|
849
|
-
}
|
|
850
|
-
return /* @__PURE__ */ jsxs(
|
|
851
|
-
Pressable,
|
|
852
|
-
{
|
|
853
|
-
href: action.href,
|
|
854
|
-
onClick: action.onClick,
|
|
855
|
-
variant: action.variant,
|
|
856
|
-
size: action.size,
|
|
857
|
-
className: action.className,
|
|
858
|
-
"aria-label": action["aria-label"],
|
|
859
|
-
asButton: true,
|
|
860
|
-
children: [
|
|
861
|
-
action.icon,
|
|
862
|
-
action.label,
|
|
863
|
-
action.iconAfter
|
|
864
|
-
]
|
|
865
|
-
},
|
|
866
|
-
index
|
|
867
|
-
);
|
|
834
|
+
const {
|
|
835
|
+
label,
|
|
836
|
+
icon,
|
|
837
|
+
iconAfter,
|
|
838
|
+
children,
|
|
839
|
+
className: actionClassName,
|
|
840
|
+
...pressableProps
|
|
841
|
+
} = action;
|
|
842
|
+
return /* @__PURE__ */ jsx(Pressable, { className: actionClassName, asButton: true, ...pressableProps, children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
843
|
+
icon,
|
|
844
|
+
label,
|
|
845
|
+
iconAfter
|
|
846
|
+
] }) }, index);
|
|
868
847
|
});
|
|
869
848
|
}, [actionsSlot, actions]);
|
|
870
849
|
const imageContent = useMemo(() => {
|
|
@@ -874,7 +853,7 @@ function FeatureSplitImage({
|
|
|
874
853
|
Img,
|
|
875
854
|
{
|
|
876
855
|
src: imageSrc,
|
|
877
|
-
alt: imageAlt || "
|
|
856
|
+
alt: imageAlt || "",
|
|
878
857
|
className: cn("max-h-96 w-full rounded-md object-cover", imageClassName),
|
|
879
858
|
loading: "lazy",
|
|
880
859
|
optixFlowConfig
|
|
@@ -895,7 +874,7 @@ function FeatureSplitImage({
|
|
|
895
874
|
/* @__PURE__ */ jsxs("div", { className: cn("flex flex-col items-center text-center lg:items-start lg:text-left", contentClassName), children: [
|
|
896
875
|
title && (typeof title === "string" ? /* @__PURE__ */ jsx("h2", { className: cn("my-6 mt-0 text-4xl font-semibold text-balance lg:text-5xl", titleClassName), children: title }) : /* @__PURE__ */ jsx("div", { className: cn("my-6 mt-0 text-4xl font-semibold text-balance lg:text-5xl", titleClassName), children: title })),
|
|
897
876
|
description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("mb-8 max-w-xl text-muted-foreground lg:text-lg", descriptionClassName), children: description }) : /* @__PURE__ */ jsx("div", { className: cn("mb-8 max-w-xl text-muted-foreground lg:text-lg", descriptionClassName), children: description })),
|
|
898
|
-
/* @__PURE__ */ jsx("div", { className: cn("flex w-full flex-col justify-center gap-2 sm:flex-row lg:justify-start", actionsClassName), children: actionsContent })
|
|
877
|
+
(actionsSlot || actions && actions.length > 0) && /* @__PURE__ */ jsx("div", { className: cn("flex w-full flex-col justify-center gap-2 sm:flex-row lg:justify-start", actionsClassName), children: actionsContent })
|
|
899
878
|
] }),
|
|
900
879
|
imageContent
|
|
901
880
|
] })
|
|
@@ -885,37 +885,25 @@ function FeatureStatsHighlight({
|
|
|
885
885
|
if (actionsSlot) return actionsSlot;
|
|
886
886
|
if (!actions || actions.length === 0) return null;
|
|
887
887
|
return actions.map((action, index) => {
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
"aria-label": action["aria-label"],
|
|
898
|
-
asButton: true,
|
|
899
|
-
children: action.children
|
|
900
|
-
},
|
|
901
|
-
index
|
|
902
|
-
);
|
|
903
|
-
}
|
|
904
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
888
|
+
const {
|
|
889
|
+
label,
|
|
890
|
+
icon,
|
|
891
|
+
iconAfter,
|
|
892
|
+
children,
|
|
893
|
+
className: actionClassName,
|
|
894
|
+
...pressableProps
|
|
895
|
+
} = action;
|
|
896
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
905
897
|
Pressable,
|
|
906
898
|
{
|
|
907
|
-
|
|
908
|
-
onClick: action.onClick,
|
|
909
|
-
variant: action.variant,
|
|
910
|
-
size: action.size,
|
|
911
|
-
className: cn("mt-4 w-fit gap-2", action.className),
|
|
912
|
-
"aria-label": action["aria-label"],
|
|
899
|
+
className: cn("mt-4 w-fit gap-2", actionClassName),
|
|
913
900
|
asButton: true,
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
901
|
+
...pressableProps,
|
|
902
|
+
children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
903
|
+
icon,
|
|
904
|
+
label,
|
|
905
|
+
iconAfter
|
|
906
|
+
] })
|
|
919
907
|
},
|
|
920
908
|
index
|
|
921
909
|
);
|
|
@@ -929,8 +917,8 @@ function FeatureStatsHighlight({
|
|
|
929
917
|
{
|
|
930
918
|
className: cn("flex flex-col gap-2 rounded-xl border bg-muted/30 p-6", statCardClassName, stat.className),
|
|
931
919
|
children: [
|
|
932
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-4xl font-bold text-primary lg:text-5xl", stat.valueClassName), children: stat.value }),
|
|
933
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-muted-foreground", stat.labelClassName), children: stat.label })
|
|
920
|
+
stat.value && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-4xl font-bold text-primary lg:text-5xl", stat.valueClassName), children: stat.value }),
|
|
921
|
+
stat.label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-muted-foreground", stat.labelClassName), children: stat.label })
|
|
934
922
|
]
|
|
935
923
|
},
|
|
936
924
|
index
|
|
@@ -951,9 +939,9 @@ function FeatureStatsHighlight({
|
|
|
951
939
|
badge && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "outline", className: cn("w-fit", badgeClassName), children: badge }),
|
|
952
940
|
title && (typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: cn("text-3xl font-semibold lg:text-5xl", titleClassName), children: title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("text-3xl font-semibold lg:text-5xl", titleClassName), children: title })),
|
|
953
941
|
description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-muted-foreground lg:text-lg", descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("text-muted-foreground lg:text-lg", descriptionClassName), children: description })),
|
|
954
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: actionsClassName, children: actionsContent })
|
|
942
|
+
(actionsSlot || actions && actions.length > 0) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: actionsClassName, children: actionsContent })
|
|
955
943
|
] }),
|
|
956
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("grid grid-cols-2 gap-6", statsGridClassName), children: statsContent })
|
|
944
|
+
(statsSlot || stats && stats.length > 0) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("grid grid-cols-2 gap-6", statsGridClassName), children: statsContent })
|
|
957
945
|
] })
|
|
958
946
|
}
|
|
959
947
|
);
|
|
@@ -4,7 +4,7 @@ import React__default, { useMemo } from 'react';
|
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { cva } from 'class-variance-authority';
|
|
7
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { Slot } from '@radix-ui/react-slot';
|
|
9
9
|
|
|
10
10
|
// components/blocks/features/feature-stats-highlight.tsx
|
|
@@ -864,37 +864,25 @@ function FeatureStatsHighlight({
|
|
|
864
864
|
if (actionsSlot) return actionsSlot;
|
|
865
865
|
if (!actions || actions.length === 0) return null;
|
|
866
866
|
return actions.map((action, index) => {
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
"aria-label": action["aria-label"],
|
|
877
|
-
asButton: true,
|
|
878
|
-
children: action.children
|
|
879
|
-
},
|
|
880
|
-
index
|
|
881
|
-
);
|
|
882
|
-
}
|
|
883
|
-
return /* @__PURE__ */ jsxs(
|
|
867
|
+
const {
|
|
868
|
+
label,
|
|
869
|
+
icon,
|
|
870
|
+
iconAfter,
|
|
871
|
+
children,
|
|
872
|
+
className: actionClassName,
|
|
873
|
+
...pressableProps
|
|
874
|
+
} = action;
|
|
875
|
+
return /* @__PURE__ */ jsx(
|
|
884
876
|
Pressable,
|
|
885
877
|
{
|
|
886
|
-
|
|
887
|
-
onClick: action.onClick,
|
|
888
|
-
variant: action.variant,
|
|
889
|
-
size: action.size,
|
|
890
|
-
className: cn("mt-4 w-fit gap-2", action.className),
|
|
891
|
-
"aria-label": action["aria-label"],
|
|
878
|
+
className: cn("mt-4 w-fit gap-2", actionClassName),
|
|
892
879
|
asButton: true,
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
880
|
+
...pressableProps,
|
|
881
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
882
|
+
icon,
|
|
883
|
+
label,
|
|
884
|
+
iconAfter
|
|
885
|
+
] })
|
|
898
886
|
},
|
|
899
887
|
index
|
|
900
888
|
);
|
|
@@ -908,8 +896,8 @@ function FeatureStatsHighlight({
|
|
|
908
896
|
{
|
|
909
897
|
className: cn("flex flex-col gap-2 rounded-xl border bg-muted/30 p-6", statCardClassName, stat.className),
|
|
910
898
|
children: [
|
|
911
|
-
/* @__PURE__ */ jsx("span", { className: cn("text-4xl font-bold text-primary lg:text-5xl", stat.valueClassName), children: stat.value }),
|
|
912
|
-
/* @__PURE__ */ jsx("span", { className: cn("text-muted-foreground", stat.labelClassName), children: stat.label })
|
|
899
|
+
stat.value && /* @__PURE__ */ jsx("span", { className: cn("text-4xl font-bold text-primary lg:text-5xl", stat.valueClassName), children: stat.value }),
|
|
900
|
+
stat.label && /* @__PURE__ */ jsx("span", { className: cn("text-muted-foreground", stat.labelClassName), children: stat.label })
|
|
913
901
|
]
|
|
914
902
|
},
|
|
915
903
|
index
|
|
@@ -930,9 +918,9 @@ function FeatureStatsHighlight({
|
|
|
930
918
|
badge && /* @__PURE__ */ jsx(Badge, { variant: "outline", className: cn("w-fit", badgeClassName), children: badge }),
|
|
931
919
|
title && (typeof title === "string" ? /* @__PURE__ */ jsx("h2", { className: cn("text-3xl font-semibold lg:text-5xl", titleClassName), children: title }) : /* @__PURE__ */ jsx("div", { className: cn("text-3xl font-semibold lg:text-5xl", titleClassName), children: title })),
|
|
932
920
|
description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("text-muted-foreground lg:text-lg", descriptionClassName), children: description }) : /* @__PURE__ */ jsx("div", { className: cn("text-muted-foreground lg:text-lg", descriptionClassName), children: description })),
|
|
933
|
-
/* @__PURE__ */ jsx("div", { className: actionsClassName, children: actionsContent })
|
|
921
|
+
(actionsSlot || actions && actions.length > 0) && /* @__PURE__ */ jsx("div", { className: actionsClassName, children: actionsContent })
|
|
934
922
|
] }),
|
|
935
|
-
/* @__PURE__ */ jsx("div", { className: cn("grid grid-cols-2 gap-6", statsGridClassName), children: statsContent })
|
|
923
|
+
(statsSlot || stats && stats.length > 0) && /* @__PURE__ */ jsx("div", { className: cn("grid grid-cols-2 gap-6", statsGridClassName), children: statsContent })
|
|
936
924
|
] })
|
|
937
925
|
}
|
|
938
926
|
);
|
|
@@ -995,7 +995,7 @@ function FeatureTabbedContentImage({
|
|
|
995
995
|
description,
|
|
996
996
|
slides,
|
|
997
997
|
slidesSlot,
|
|
998
|
-
defaultTab
|
|
998
|
+
defaultTab,
|
|
999
999
|
className,
|
|
1000
1000
|
containerClassName,
|
|
1001
1001
|
headerClassName,
|
|
@@ -1014,7 +1014,7 @@ function FeatureTabbedContentImage({
|
|
|
1014
1014
|
patternOpacity,
|
|
1015
1015
|
patternClassName
|
|
1016
1016
|
}) {
|
|
1017
|
-
const renderFeatures =
|
|
1017
|
+
const renderFeatures = React__namespace.useCallback((slide) => {
|
|
1018
1018
|
if (slide.featuresSlot) return slide.featuresSlot;
|
|
1019
1019
|
if (!slide.features || slide.features.length === 0) return null;
|
|
1020
1020
|
return slide.features.map((feature, index) => {
|
|
@@ -1028,7 +1028,7 @@ function FeatureTabbedContentImage({
|
|
|
1028
1028
|
] }, index);
|
|
1029
1029
|
});
|
|
1030
1030
|
}, []);
|
|
1031
|
-
const renderActions =
|
|
1031
|
+
const renderActions = React__namespace.useCallback((slide) => {
|
|
1032
1032
|
if (slide.actionsSlot) return slide.actionsSlot;
|
|
1033
1033
|
if (!slide.actions || slide.actions.length === 0) return null;
|
|
1034
1034
|
return slide.actions.map((action, index) => {
|
|
@@ -1068,7 +1068,7 @@ function FeatureTabbedContentImage({
|
|
|
1068
1068
|
);
|
|
1069
1069
|
});
|
|
1070
1070
|
}, []);
|
|
1071
|
-
const renderImage =
|
|
1071
|
+
const renderImage = React__namespace.useCallback((slide) => {
|
|
1072
1072
|
if (slide.imageSlot) return slide.imageSlot;
|
|
1073
1073
|
if (!slide.image) return null;
|
|
1074
1074
|
const imageAlt = slide.imageAlt || (typeof slide.title === "string" ? slide.title : "Tab content image");
|
|
@@ -1115,6 +1115,11 @@ function FeatureTabbedContentImage({
|
|
|
1115
1115
|
))
|
|
1116
1116
|
] });
|
|
1117
1117
|
}, [slidesSlot, slides, tabsListClassName, tabTriggerClassName, tabContentClassName, contentGridClassName, renderFeatures, renderActions, renderImage]);
|
|
1118
|
+
const effectiveDefaultTab = React.useMemo(() => {
|
|
1119
|
+
if (defaultTab) return defaultTab;
|
|
1120
|
+
if (slides && slides.length > 0) return slides[0].id.toString();
|
|
1121
|
+
return "1";
|
|
1122
|
+
}, [defaultTab, slides]);
|
|
1118
1123
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1119
1124
|
Section,
|
|
1120
1125
|
{
|
|
@@ -1130,10 +1135,10 @@ function FeatureTabbedContentImage({
|
|
|
1130
1135
|
title && (typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: cn("text-center text-3xl font-semibold lg:text-5xl", titleClassName), children: title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("text-center text-3xl font-semibold lg:text-5xl", titleClassName), children: title })),
|
|
1131
1136
|
description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-center text-balance text-muted-foreground lg:text-xl", descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("text-center text-balance text-muted-foreground lg:text-xl", descriptionClassName), children: description }))
|
|
1132
1137
|
] }),
|
|
1133
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-12", tabsWrapperClassName), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1138
|
+
(slidesSlot || slides && slides.length > 0) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-12", tabsWrapperClassName), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1134
1139
|
Tabs,
|
|
1135
1140
|
{
|
|
1136
|
-
defaultValue:
|
|
1141
|
+
defaultValue: effectiveDefaultTab,
|
|
1137
1142
|
className: cn("mx-auto flex w-fit flex-col items-center gap-8 md:gap-12", tabsClassName),
|
|
1138
1143
|
children: slidesContent
|
|
1139
1144
|
}
|
|
@@ -973,7 +973,7 @@ function FeatureTabbedContentImage({
|
|
|
973
973
|
description,
|
|
974
974
|
slides,
|
|
975
975
|
slidesSlot,
|
|
976
|
-
defaultTab
|
|
976
|
+
defaultTab,
|
|
977
977
|
className,
|
|
978
978
|
containerClassName,
|
|
979
979
|
headerClassName,
|
|
@@ -992,7 +992,7 @@ function FeatureTabbedContentImage({
|
|
|
992
992
|
patternOpacity,
|
|
993
993
|
patternClassName
|
|
994
994
|
}) {
|
|
995
|
-
const renderFeatures =
|
|
995
|
+
const renderFeatures = React.useCallback((slide) => {
|
|
996
996
|
if (slide.featuresSlot) return slide.featuresSlot;
|
|
997
997
|
if (!slide.features || slide.features.length === 0) return null;
|
|
998
998
|
return slide.features.map((feature, index) => {
|
|
@@ -1006,7 +1006,7 @@ function FeatureTabbedContentImage({
|
|
|
1006
1006
|
] }, index);
|
|
1007
1007
|
});
|
|
1008
1008
|
}, []);
|
|
1009
|
-
const renderActions =
|
|
1009
|
+
const renderActions = React.useCallback((slide) => {
|
|
1010
1010
|
if (slide.actionsSlot) return slide.actionsSlot;
|
|
1011
1011
|
if (!slide.actions || slide.actions.length === 0) return null;
|
|
1012
1012
|
return slide.actions.map((action, index) => {
|
|
@@ -1046,7 +1046,7 @@ function FeatureTabbedContentImage({
|
|
|
1046
1046
|
);
|
|
1047
1047
|
});
|
|
1048
1048
|
}, []);
|
|
1049
|
-
const renderImage =
|
|
1049
|
+
const renderImage = React.useCallback((slide) => {
|
|
1050
1050
|
if (slide.imageSlot) return slide.imageSlot;
|
|
1051
1051
|
if (!slide.image) return null;
|
|
1052
1052
|
const imageAlt = slide.imageAlt || (typeof slide.title === "string" ? slide.title : "Tab content image");
|
|
@@ -1093,6 +1093,11 @@ function FeatureTabbedContentImage({
|
|
|
1093
1093
|
))
|
|
1094
1094
|
] });
|
|
1095
1095
|
}, [slidesSlot, slides, tabsListClassName, tabTriggerClassName, tabContentClassName, contentGridClassName, renderFeatures, renderActions, renderImage]);
|
|
1096
|
+
const effectiveDefaultTab = useMemo(() => {
|
|
1097
|
+
if (defaultTab) return defaultTab;
|
|
1098
|
+
if (slides && slides.length > 0) return slides[0].id.toString();
|
|
1099
|
+
return "1";
|
|
1100
|
+
}, [defaultTab, slides]);
|
|
1096
1101
|
return /* @__PURE__ */ jsxs(
|
|
1097
1102
|
Section,
|
|
1098
1103
|
{
|
|
@@ -1108,10 +1113,10 @@ function FeatureTabbedContentImage({
|
|
|
1108
1113
|
title && (typeof title === "string" ? /* @__PURE__ */ jsx("h2", { className: cn("text-center text-3xl font-semibold lg:text-5xl", titleClassName), children: title }) : /* @__PURE__ */ jsx("div", { className: cn("text-center text-3xl font-semibold lg:text-5xl", titleClassName), children: title })),
|
|
1109
1114
|
description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("text-center text-balance text-muted-foreground lg:text-xl", descriptionClassName), children: description }) : /* @__PURE__ */ jsx("div", { className: cn("text-center text-balance text-muted-foreground lg:text-xl", descriptionClassName), children: description }))
|
|
1110
1115
|
] }),
|
|
1111
|
-
/* @__PURE__ */ jsx("div", { className: cn("mt-12", tabsWrapperClassName), children: /* @__PURE__ */ jsx(
|
|
1116
|
+
(slidesSlot || slides && slides.length > 0) && /* @__PURE__ */ jsx("div", { className: cn("mt-12", tabsWrapperClassName), children: /* @__PURE__ */ jsx(
|
|
1112
1117
|
Tabs,
|
|
1113
1118
|
{
|
|
1114
|
-
defaultValue:
|
|
1119
|
+
defaultValue: effectiveDefaultTab,
|
|
1115
1120
|
className: cn("mx-auto flex w-fit flex-col items-center gap-8 md:gap-12", tabsClassName),
|
|
1116
1121
|
children: slidesContent
|
|
1117
1122
|
}
|
|
@@ -527,20 +527,20 @@ function FeatureThreeColumnValues({
|
|
|
527
527
|
patternOpacity,
|
|
528
528
|
patternClassName
|
|
529
529
|
}) {
|
|
530
|
-
const renderValueIcon = (value) => {
|
|
530
|
+
const renderValueIcon = React__namespace.useCallback((value) => {
|
|
531
531
|
if (value.icon) return value.icon;
|
|
532
532
|
if (value.iconName) return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: value.iconName, size: 24 });
|
|
533
|
-
return
|
|
534
|
-
};
|
|
533
|
+
return null;
|
|
534
|
+
}, []);
|
|
535
535
|
const valuesContent = React.useMemo(() => {
|
|
536
536
|
if (valuesSlot) return valuesSlot;
|
|
537
537
|
if (!values || values.length === 0) return null;
|
|
538
538
|
return values.map((value, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("rounded-lg bg-accent p-5", cardClassName, value.className), children: [
|
|
539
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("mb-8 flex size-12 items-center justify-center rounded-full bg-background", value.iconClassName), children: renderValueIcon(value) }),
|
|
539
|
+
(value.icon || value.iconName) && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("mb-8 flex size-12 items-center justify-center rounded-full bg-background", value.iconClassName), children: renderValueIcon(value) }),
|
|
540
540
|
value.title && (typeof value.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: cn("mb-2 text-xl font-medium", value.titleClassName), children: value.title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mb-2 text-xl font-medium", value.titleClassName), children: value.title })),
|
|
541
541
|
value.description && (typeof value.description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("leading-7 text-muted-foreground", value.descriptionClassName), children: value.description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("leading-7 text-muted-foreground", value.descriptionClassName), children: value.description }))
|
|
542
542
|
] }, index));
|
|
543
|
-
}, [valuesSlot, values, cardClassName]);
|
|
543
|
+
}, [valuesSlot, values, cardClassName, renderValueIcon]);
|
|
544
544
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
545
545
|
Section,
|
|
546
546
|
{
|
|
@@ -554,7 +554,7 @@ function FeatureThreeColumnValues({
|
|
|
554
554
|
children: [
|
|
555
555
|
label && (typeof label === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("mb-4 text-sm text-muted-foreground lg:text-base", labelClassName), children: label }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mb-4 text-sm text-muted-foreground lg:text-base", labelClassName), children: label })),
|
|
556
556
|
title && (typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: cn("text-3xl font-medium lg:text-4xl", titleClassName), children: title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("text-3xl font-medium lg:text-4xl", titleClassName), children: title })),
|
|
557
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-14 grid gap-6 lg:mt-20 lg:grid-cols-3", gridClassName), children: valuesContent })
|
|
557
|
+
(valuesSlot || values && values.length > 0) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-14 grid gap-6 lg:mt-20 lg:grid-cols-3", gridClassName), children: valuesContent })
|
|
558
558
|
]
|
|
559
559
|
}
|
|
560
560
|
);
|
|
@@ -506,20 +506,20 @@ function FeatureThreeColumnValues({
|
|
|
506
506
|
patternOpacity,
|
|
507
507
|
patternClassName
|
|
508
508
|
}) {
|
|
509
|
-
const renderValueIcon = (value) => {
|
|
509
|
+
const renderValueIcon = React.useCallback((value) => {
|
|
510
510
|
if (value.icon) return value.icon;
|
|
511
511
|
if (value.iconName) return /* @__PURE__ */ jsx(DynamicIcon, { name: value.iconName, size: 24 });
|
|
512
|
-
return
|
|
513
|
-
};
|
|
512
|
+
return null;
|
|
513
|
+
}, []);
|
|
514
514
|
const valuesContent = useMemo(() => {
|
|
515
515
|
if (valuesSlot) return valuesSlot;
|
|
516
516
|
if (!values || values.length === 0) return null;
|
|
517
517
|
return values.map((value, index) => /* @__PURE__ */ jsxs("div", { className: cn("rounded-lg bg-accent p-5", cardClassName, value.className), children: [
|
|
518
|
-
/* @__PURE__ */ jsx("span", { className: cn("mb-8 flex size-12 items-center justify-center rounded-full bg-background", value.iconClassName), children: renderValueIcon(value) }),
|
|
518
|
+
(value.icon || value.iconName) && /* @__PURE__ */ jsx("span", { className: cn("mb-8 flex size-12 items-center justify-center rounded-full bg-background", value.iconClassName), children: renderValueIcon(value) }),
|
|
519
519
|
value.title && (typeof value.title === "string" ? /* @__PURE__ */ jsx("h3", { className: cn("mb-2 text-xl font-medium", value.titleClassName), children: value.title }) : /* @__PURE__ */ jsx("div", { className: cn("mb-2 text-xl font-medium", value.titleClassName), children: value.title })),
|
|
520
520
|
value.description && (typeof value.description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("leading-7 text-muted-foreground", value.descriptionClassName), children: value.description }) : /* @__PURE__ */ jsx("div", { className: cn("leading-7 text-muted-foreground", value.descriptionClassName), children: value.description }))
|
|
521
521
|
] }, index));
|
|
522
|
-
}, [valuesSlot, values, cardClassName]);
|
|
522
|
+
}, [valuesSlot, values, cardClassName, renderValueIcon]);
|
|
523
523
|
return /* @__PURE__ */ jsxs(
|
|
524
524
|
Section,
|
|
525
525
|
{
|
|
@@ -533,7 +533,7 @@ function FeatureThreeColumnValues({
|
|
|
533
533
|
children: [
|
|
534
534
|
label && (typeof label === "string" ? /* @__PURE__ */ jsx("p", { className: cn("mb-4 text-sm text-muted-foreground lg:text-base", labelClassName), children: label }) : /* @__PURE__ */ jsx("div", { className: cn("mb-4 text-sm text-muted-foreground lg:text-base", labelClassName), children: label })),
|
|
535
535
|
title && (typeof title === "string" ? /* @__PURE__ */ jsx("h2", { className: cn("text-3xl font-medium lg:text-4xl", titleClassName), children: title }) : /* @__PURE__ */ jsx("div", { className: cn("text-3xl font-medium lg:text-4xl", titleClassName), children: title })),
|
|
536
|
-
/* @__PURE__ */ jsx("div", { className: cn("mt-14 grid gap-6 lg:mt-20 lg:grid-cols-3", gridClassName), children: valuesContent })
|
|
536
|
+
(valuesSlot || values && values.length > 0) && /* @__PURE__ */ jsx("div", { className: cn("mt-14 grid gap-6 lg:mt-20 lg:grid-cols-3", gridClassName), children: valuesContent })
|
|
537
537
|
]
|
|
538
538
|
}
|
|
539
539
|
);
|