@opensite/ui 1.2.4 → 1.2.5
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/feature-accordion-image.cjs +101 -27
- package/dist/feature-accordion-image.js +101 -27
- package/dist/feature-animated-carousel.cjs +801 -293
- package/dist/feature-animated-carousel.d.cts +25 -1
- package/dist/feature-animated-carousel.d.ts +25 -1
- package/dist/feature-animated-carousel.js +799 -291
- package/dist/feature-card-grid-linked.cjs +1 -1
- package/dist/feature-card-grid-linked.js +1 -1
- package/dist/feature-carousel-progress.cjs +23 -10
- package/dist/feature-carousel-progress.js +23 -10
- package/dist/feature-checklist-image.cjs +1 -1
- package/dist/feature-checklist-image.js +1 -1
- package/dist/feature-icon-grid-muted.cjs +521 -15
- package/dist/feature-icon-grid-muted.d.cts +5 -1
- package/dist/feature-icon-grid-muted.d.ts +5 -1
- package/dist/feature-icon-grid-muted.js +521 -15
- package/dist/feature-image-cards-three-column.cjs +146 -75
- package/dist/feature-image-cards-three-column.d.cts +5 -1
- package/dist/feature-image-cards-three-column.d.ts +5 -1
- package/dist/feature-image-cards-three-column.js +146 -75
- package/dist/feature-numbered-cards.cjs +1 -1
- package/dist/feature-numbered-cards.js +1 -1
- package/dist/feature-stats-highlight.cjs +25 -39
- package/dist/feature-stats-highlight.js +25 -39
- package/dist/registry.cjs +756 -413
- package/dist/registry.js +756 -413
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
8
8
|
var classVarianceAuthority = require('class-variance-authority');
|
|
9
9
|
var AvatarPrimitive = require('@radix-ui/react-avatar');
|
|
10
10
|
var img = require('@page-speed/img');
|
|
11
|
+
var reactSlot = require('@radix-ui/react-slot');
|
|
11
12
|
|
|
12
13
|
function _interopNamespace(e) {
|
|
13
14
|
if (e && e.__esModule) return e;
|
|
@@ -34,32 +35,6 @@ var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive)
|
|
|
34
35
|
function cn(...inputs) {
|
|
35
36
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
36
37
|
}
|
|
37
|
-
function getTextColor(parentBg, variant = "default", options) {
|
|
38
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
39
|
-
if (isDark) {
|
|
40
|
-
switch (variant) {
|
|
41
|
-
case "default":
|
|
42
|
-
return "text-foreground";
|
|
43
|
-
case "muted":
|
|
44
|
-
return "text-foreground/80";
|
|
45
|
-
case "subtle":
|
|
46
|
-
return "text-foreground/60";
|
|
47
|
-
case "accent":
|
|
48
|
-
return "text-accent-foreground";
|
|
49
|
-
}
|
|
50
|
-
} else {
|
|
51
|
-
switch (variant) {
|
|
52
|
-
case "default":
|
|
53
|
-
return "text-foreground";
|
|
54
|
-
case "muted":
|
|
55
|
-
return "text-muted-foreground";
|
|
56
|
-
case "subtle":
|
|
57
|
-
return "text-muted-foreground/70";
|
|
58
|
-
case "accent":
|
|
59
|
-
return "text-primary";
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
38
|
var svgCache = /* @__PURE__ */ new Map();
|
|
64
39
|
function DynamicIcon({
|
|
65
40
|
name,
|
|
@@ -987,9 +962,42 @@ var Section = React__namespace.default.forwardRef(
|
|
|
987
962
|
}
|
|
988
963
|
);
|
|
989
964
|
Section.displayName = "Section";
|
|
965
|
+
var badgeVariants = classVarianceAuthority.cva(
|
|
966
|
+
"inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
967
|
+
{
|
|
968
|
+
variants: {
|
|
969
|
+
variant: {
|
|
970
|
+
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
971
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
972
|
+
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
973
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
974
|
+
}
|
|
975
|
+
},
|
|
976
|
+
defaultVariants: {
|
|
977
|
+
variant: "default"
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
);
|
|
981
|
+
function Badge({
|
|
982
|
+
className,
|
|
983
|
+
variant,
|
|
984
|
+
asChild = false,
|
|
985
|
+
...props
|
|
986
|
+
}) {
|
|
987
|
+
const Comp = asChild ? reactSlot.Slot : "span";
|
|
988
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
989
|
+
Comp,
|
|
990
|
+
{
|
|
991
|
+
"data-slot": "badge",
|
|
992
|
+
className: cn(badgeVariants({ variant }), className),
|
|
993
|
+
...props
|
|
994
|
+
}
|
|
995
|
+
);
|
|
996
|
+
}
|
|
990
997
|
function FeatureImageCardsThreeColumn({
|
|
991
998
|
title,
|
|
992
999
|
description,
|
|
1000
|
+
headerClassName,
|
|
993
1001
|
cards,
|
|
994
1002
|
cardsSlot,
|
|
995
1003
|
className,
|
|
@@ -1005,28 +1013,34 @@ function FeatureImageCardsThreeColumn({
|
|
|
1005
1013
|
patternOpacity,
|
|
1006
1014
|
patternClassName
|
|
1007
1015
|
}) {
|
|
1008
|
-
const renderImage = React.useCallback(
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1016
|
+
const renderImage = React.useCallback(
|
|
1017
|
+
(card, imageAlt) => {
|
|
1018
|
+
if (card.imageSlot) return card.imageSlot;
|
|
1019
|
+
if (!card.imageSrc) return null;
|
|
1020
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1021
|
+
img.Img,
|
|
1022
|
+
{
|
|
1023
|
+
src: card.imageSrc,
|
|
1024
|
+
alt: imageAlt,
|
|
1025
|
+
className: "h-full max-h-[450px] w-full rounded-xl object-cover object-center",
|
|
1026
|
+
loading: "lazy",
|
|
1027
|
+
optixFlowConfig
|
|
1028
|
+
}
|
|
1029
|
+
);
|
|
1030
|
+
},
|
|
1031
|
+
[optixFlowConfig]
|
|
1032
|
+
);
|
|
1033
|
+
const renderBadgeIcon = React.useCallback(
|
|
1034
|
+
(card) => {
|
|
1035
|
+
if (card.avatarSrc) {
|
|
1036
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Avatar, { className: "size-7 rounded-full", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src: card.avatarSrc, alt: "Avatar" }) });
|
|
1019
1037
|
}
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
if (card.icon) return card.icon;
|
|
1027
|
-
if (!card.iconName) return null;
|
|
1028
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: card.iconName, size: 24 });
|
|
1029
|
-
}, []);
|
|
1038
|
+
if (card.icon) return card.icon;
|
|
1039
|
+
if (!card.iconName) return null;
|
|
1040
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: card.iconName, size: 24 });
|
|
1041
|
+
},
|
|
1042
|
+
[]
|
|
1043
|
+
);
|
|
1030
1044
|
const cardsContent = React.useMemo(() => {
|
|
1031
1045
|
if (cardsSlot) return cardsSlot;
|
|
1032
1046
|
if (!cards || cards.length === 0) return null;
|
|
@@ -1037,31 +1051,53 @@ function FeatureImageCardsThreeColumn({
|
|
|
1037
1051
|
{
|
|
1038
1052
|
href: card.link,
|
|
1039
1053
|
onClick: card.onClick,
|
|
1040
|
-
className: cn(
|
|
1054
|
+
className: cn(
|
|
1055
|
+
"group relative overflow-hidden rounded-xl",
|
|
1056
|
+
cardClassName,
|
|
1057
|
+
card.className
|
|
1058
|
+
),
|
|
1041
1059
|
children: [
|
|
1042
1060
|
renderImage(card, imageAlt),
|
|
1043
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-0 right-0 bottom-0 left-0 translate-y-20 rounded-xl bg-linear-to-t from-
|
|
1044
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute top-0 flex h-full w-full flex-col justify-between p-
|
|
1045
|
-
(card.badgeText || card.avatarSrc || card.icon || card.iconName) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
"ml-auto flex w-fit items-center gap-2 text-sm font-semibold",
|
|
1050
|
-
card.avatarSrc ? "rounded-full bg-foreground/30 px-4 py-2.5 backdrop-blur-sm" : "rounded-full bg-primary px-4 py-2.5 text-primary-foreground",
|
|
1051
|
-
card.badgeClassName
|
|
1052
|
-
),
|
|
1053
|
-
children: [
|
|
1054
|
-
renderBadgeIcon(card),
|
|
1055
|
-
card.badgeText
|
|
1056
|
-
]
|
|
1057
|
-
}
|
|
1058
|
-
),
|
|
1061
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-0 right-0 bottom-0 left-0 translate-y-20 rounded-xl bg-linear-to-t from-black to-transparent transition-transform duration-300 group-hover:translate-y-0" }),
|
|
1062
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute top-0 flex h-full w-full flex-col justify-between p-4 md:p-6", children: [
|
|
1063
|
+
(card.badgeText || card.avatarSrc || card.icon || card.iconName) && /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "default", className: cn(card.badgeClassName), children: [
|
|
1064
|
+
renderBadgeIcon(card),
|
|
1065
|
+
card.badgeText
|
|
1066
|
+
] }),
|
|
1059
1067
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-5", children: [
|
|
1060
|
-
card.title && (typeof card.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1068
|
+
card.title && (typeof card.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1069
|
+
"h3",
|
|
1070
|
+
{
|
|
1071
|
+
className: cn(
|
|
1072
|
+
"text-xl md:text-2xl font-semibold",
|
|
1073
|
+
card.titleClassName
|
|
1074
|
+
),
|
|
1075
|
+
children: card.title
|
|
1076
|
+
}
|
|
1077
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1078
|
+
"div",
|
|
1079
|
+
{
|
|
1080
|
+
className: cn(
|
|
1081
|
+
"text-xl md:text-2xl font-semibold",
|
|
1082
|
+
card.titleClassName
|
|
1083
|
+
),
|
|
1084
|
+
children: card.title
|
|
1085
|
+
}
|
|
1086
|
+
)),
|
|
1087
|
+
card.linkText && card.link && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1088
|
+
Pressable,
|
|
1089
|
+
{
|
|
1090
|
+
className: cn(
|
|
1091
|
+
"font-bold text-xs uppercase",
|
|
1092
|
+
card.linkClassName
|
|
1093
|
+
),
|
|
1094
|
+
href: card.link,
|
|
1095
|
+
children: [
|
|
1096
|
+
card.linkText,
|
|
1097
|
+
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/arrow-up-right", size: 18 })
|
|
1098
|
+
]
|
|
1099
|
+
}
|
|
1100
|
+
)
|
|
1065
1101
|
] })
|
|
1066
1102
|
] })
|
|
1067
1103
|
]
|
|
@@ -1070,7 +1106,7 @@ function FeatureImageCardsThreeColumn({
|
|
|
1070
1106
|
);
|
|
1071
1107
|
});
|
|
1072
1108
|
}, [cardsSlot, cards, cardClassName, renderImage, renderBadgeIcon]);
|
|
1073
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
1109
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1074
1110
|
Section,
|
|
1075
1111
|
{
|
|
1076
1112
|
background,
|
|
@@ -1080,11 +1116,46 @@ function FeatureImageCardsThreeColumn({
|
|
|
1080
1116
|
patternClassName,
|
|
1081
1117
|
className,
|
|
1082
1118
|
containerClassName,
|
|
1083
|
-
children: [
|
|
1084
|
-
title
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1119
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col space-y-6 md:space-y-16", children: [
|
|
1120
|
+
title || description ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-6 text-left", headerClassName), children: [
|
|
1121
|
+
title && (typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1122
|
+
"h2",
|
|
1123
|
+
{
|
|
1124
|
+
className: cn(
|
|
1125
|
+
"text-xl font-semibold text-balance md:text-2xl lg:text-3xl max-w-lg md:max-w-md",
|
|
1126
|
+
titleClassName
|
|
1127
|
+
),
|
|
1128
|
+
children: title
|
|
1129
|
+
}
|
|
1130
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1131
|
+
"div",
|
|
1132
|
+
{
|
|
1133
|
+
className: cn(
|
|
1134
|
+
"text-xl font-semibold text-balance md:text-2xl lg:text-3xl max-w-lg md:max-w-md",
|
|
1135
|
+
titleClassName
|
|
1136
|
+
),
|
|
1137
|
+
children: title
|
|
1138
|
+
}
|
|
1139
|
+
)),
|
|
1140
|
+
description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("max-w-lg md:max-w-md", descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1141
|
+
"div",
|
|
1142
|
+
{
|
|
1143
|
+
className: cn("max-w-lg md:max-w-md", descriptionClassName),
|
|
1144
|
+
children: description
|
|
1145
|
+
}
|
|
1146
|
+
))
|
|
1147
|
+
] }) : null,
|
|
1148
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1149
|
+
"div",
|
|
1150
|
+
{
|
|
1151
|
+
className: cn(
|
|
1152
|
+
"grid gap-4 md:gap-4 grid-cols-1 md:grid-cols-3",
|
|
1153
|
+
gridClassName
|
|
1154
|
+
),
|
|
1155
|
+
children: cardsContent
|
|
1156
|
+
}
|
|
1157
|
+
)
|
|
1158
|
+
] })
|
|
1088
1159
|
}
|
|
1089
1160
|
);
|
|
1090
1161
|
}
|
|
@@ -101,6 +101,10 @@ interface FeatureImageCardsThreeColumnProps {
|
|
|
101
101
|
* Additional CSS classes for the description
|
|
102
102
|
*/
|
|
103
103
|
descriptionClassName?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Additional CSS classes for the header
|
|
106
|
+
*/
|
|
107
|
+
headerClassName?: string;
|
|
104
108
|
/**
|
|
105
109
|
* Additional CSS classes for the grid
|
|
106
110
|
*/
|
|
@@ -161,6 +165,6 @@ interface FeatureImageCardsThreeColumnProps {
|
|
|
161
165
|
* />
|
|
162
166
|
* ```
|
|
163
167
|
*/
|
|
164
|
-
declare function FeatureImageCardsThreeColumn({ title, description, cards, cardsSlot, className, containerClassName, titleClassName, descriptionClassName, gridClassName, cardClassName, optixFlowConfig, background, spacing, pattern, patternOpacity, patternClassName, }: FeatureImageCardsThreeColumnProps): React.JSX.Element;
|
|
168
|
+
declare function FeatureImageCardsThreeColumn({ title, description, headerClassName, cards, cardsSlot, className, containerClassName, titleClassName, descriptionClassName, gridClassName, cardClassName, optixFlowConfig, background, spacing, pattern, patternOpacity, patternClassName, }: FeatureImageCardsThreeColumnProps): React.JSX.Element;
|
|
165
169
|
|
|
166
170
|
export { FeatureImageCardsThreeColumn, type FeatureImageCardsThreeColumnProps };
|
|
@@ -101,6 +101,10 @@ interface FeatureImageCardsThreeColumnProps {
|
|
|
101
101
|
* Additional CSS classes for the description
|
|
102
102
|
*/
|
|
103
103
|
descriptionClassName?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Additional CSS classes for the header
|
|
106
|
+
*/
|
|
107
|
+
headerClassName?: string;
|
|
104
108
|
/**
|
|
105
109
|
* Additional CSS classes for the grid
|
|
106
110
|
*/
|
|
@@ -161,6 +165,6 @@ interface FeatureImageCardsThreeColumnProps {
|
|
|
161
165
|
* />
|
|
162
166
|
* ```
|
|
163
167
|
*/
|
|
164
|
-
declare function FeatureImageCardsThreeColumn({ title, description, cards, cardsSlot, className, containerClassName, titleClassName, descriptionClassName, gridClassName, cardClassName, optixFlowConfig, background, spacing, pattern, patternOpacity, patternClassName, }: FeatureImageCardsThreeColumnProps): React.JSX.Element;
|
|
168
|
+
declare function FeatureImageCardsThreeColumn({ title, description, headerClassName, cards, cardsSlot, className, containerClassName, titleClassName, descriptionClassName, gridClassName, cardClassName, optixFlowConfig, background, spacing, pattern, patternOpacity, patternClassName, }: FeatureImageCardsThreeColumnProps): React.JSX.Element;
|
|
165
169
|
|
|
166
170
|
export { FeatureImageCardsThreeColumn, type FeatureImageCardsThreeColumnProps };
|
|
@@ -7,37 +7,12 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
7
7
|
import { cva } from 'class-variance-authority';
|
|
8
8
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
9
9
|
import { Img } from '@page-speed/img';
|
|
10
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
10
11
|
|
|
11
12
|
// components/blocks/features/feature-image-cards-three-column.tsx
|
|
12
13
|
function cn(...inputs) {
|
|
13
14
|
return twMerge(clsx(inputs));
|
|
14
15
|
}
|
|
15
|
-
function getTextColor(parentBg, variant = "default", options) {
|
|
16
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
17
|
-
if (isDark) {
|
|
18
|
-
switch (variant) {
|
|
19
|
-
case "default":
|
|
20
|
-
return "text-foreground";
|
|
21
|
-
case "muted":
|
|
22
|
-
return "text-foreground/80";
|
|
23
|
-
case "subtle":
|
|
24
|
-
return "text-foreground/60";
|
|
25
|
-
case "accent":
|
|
26
|
-
return "text-accent-foreground";
|
|
27
|
-
}
|
|
28
|
-
} else {
|
|
29
|
-
switch (variant) {
|
|
30
|
-
case "default":
|
|
31
|
-
return "text-foreground";
|
|
32
|
-
case "muted":
|
|
33
|
-
return "text-muted-foreground";
|
|
34
|
-
case "subtle":
|
|
35
|
-
return "text-muted-foreground/70";
|
|
36
|
-
case "accent":
|
|
37
|
-
return "text-primary";
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
16
|
var svgCache = /* @__PURE__ */ new Map();
|
|
42
17
|
function DynamicIcon({
|
|
43
18
|
name,
|
|
@@ -965,9 +940,42 @@ var Section = React__default.forwardRef(
|
|
|
965
940
|
}
|
|
966
941
|
);
|
|
967
942
|
Section.displayName = "Section";
|
|
943
|
+
var badgeVariants = cva(
|
|
944
|
+
"inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
945
|
+
{
|
|
946
|
+
variants: {
|
|
947
|
+
variant: {
|
|
948
|
+
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
949
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
950
|
+
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
951
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
952
|
+
}
|
|
953
|
+
},
|
|
954
|
+
defaultVariants: {
|
|
955
|
+
variant: "default"
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
);
|
|
959
|
+
function Badge({
|
|
960
|
+
className,
|
|
961
|
+
variant,
|
|
962
|
+
asChild = false,
|
|
963
|
+
...props
|
|
964
|
+
}) {
|
|
965
|
+
const Comp = asChild ? Slot : "span";
|
|
966
|
+
return /* @__PURE__ */ jsx(
|
|
967
|
+
Comp,
|
|
968
|
+
{
|
|
969
|
+
"data-slot": "badge",
|
|
970
|
+
className: cn(badgeVariants({ variant }), className),
|
|
971
|
+
...props
|
|
972
|
+
}
|
|
973
|
+
);
|
|
974
|
+
}
|
|
968
975
|
function FeatureImageCardsThreeColumn({
|
|
969
976
|
title,
|
|
970
977
|
description,
|
|
978
|
+
headerClassName,
|
|
971
979
|
cards,
|
|
972
980
|
cardsSlot,
|
|
973
981
|
className,
|
|
@@ -983,28 +991,34 @@ function FeatureImageCardsThreeColumn({
|
|
|
983
991
|
patternOpacity,
|
|
984
992
|
patternClassName
|
|
985
993
|
}) {
|
|
986
|
-
const renderImage = useCallback(
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
994
|
+
const renderImage = useCallback(
|
|
995
|
+
(card, imageAlt) => {
|
|
996
|
+
if (card.imageSlot) return card.imageSlot;
|
|
997
|
+
if (!card.imageSrc) return null;
|
|
998
|
+
return /* @__PURE__ */ jsx(
|
|
999
|
+
Img,
|
|
1000
|
+
{
|
|
1001
|
+
src: card.imageSrc,
|
|
1002
|
+
alt: imageAlt,
|
|
1003
|
+
className: "h-full max-h-[450px] w-full rounded-xl object-cover object-center",
|
|
1004
|
+
loading: "lazy",
|
|
1005
|
+
optixFlowConfig
|
|
1006
|
+
}
|
|
1007
|
+
);
|
|
1008
|
+
},
|
|
1009
|
+
[optixFlowConfig]
|
|
1010
|
+
);
|
|
1011
|
+
const renderBadgeIcon = useCallback(
|
|
1012
|
+
(card) => {
|
|
1013
|
+
if (card.avatarSrc) {
|
|
1014
|
+
return /* @__PURE__ */ jsx(Avatar, { className: "size-7 rounded-full", children: /* @__PURE__ */ jsx(AvatarImage, { src: card.avatarSrc, alt: "Avatar" }) });
|
|
997
1015
|
}
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
if (card.icon) return card.icon;
|
|
1005
|
-
if (!card.iconName) return null;
|
|
1006
|
-
return /* @__PURE__ */ jsx(DynamicIcon, { name: card.iconName, size: 24 });
|
|
1007
|
-
}, []);
|
|
1016
|
+
if (card.icon) return card.icon;
|
|
1017
|
+
if (!card.iconName) return null;
|
|
1018
|
+
return /* @__PURE__ */ jsx(DynamicIcon, { name: card.iconName, size: 24 });
|
|
1019
|
+
},
|
|
1020
|
+
[]
|
|
1021
|
+
);
|
|
1008
1022
|
const cardsContent = useMemo(() => {
|
|
1009
1023
|
if (cardsSlot) return cardsSlot;
|
|
1010
1024
|
if (!cards || cards.length === 0) return null;
|
|
@@ -1015,31 +1029,53 @@ function FeatureImageCardsThreeColumn({
|
|
|
1015
1029
|
{
|
|
1016
1030
|
href: card.link,
|
|
1017
1031
|
onClick: card.onClick,
|
|
1018
|
-
className: cn(
|
|
1032
|
+
className: cn(
|
|
1033
|
+
"group relative overflow-hidden rounded-xl",
|
|
1034
|
+
cardClassName,
|
|
1035
|
+
card.className
|
|
1036
|
+
),
|
|
1019
1037
|
children: [
|
|
1020
1038
|
renderImage(card, imageAlt),
|
|
1021
|
-
/* @__PURE__ */ jsx("div", { className: "absolute top-0 right-0 bottom-0 left-0 translate-y-20 rounded-xl bg-linear-to-t from-
|
|
1022
|
-
/* @__PURE__ */ jsxs("div", { className: "absolute top-0 flex h-full w-full flex-col justify-between p-
|
|
1023
|
-
(card.badgeText || card.avatarSrc || card.icon || card.iconName) && /* @__PURE__ */ jsxs(
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
"ml-auto flex w-fit items-center gap-2 text-sm font-semibold",
|
|
1028
|
-
card.avatarSrc ? "rounded-full bg-foreground/30 px-4 py-2.5 backdrop-blur-sm" : "rounded-full bg-primary px-4 py-2.5 text-primary-foreground",
|
|
1029
|
-
card.badgeClassName
|
|
1030
|
-
),
|
|
1031
|
-
children: [
|
|
1032
|
-
renderBadgeIcon(card),
|
|
1033
|
-
card.badgeText
|
|
1034
|
-
]
|
|
1035
|
-
}
|
|
1036
|
-
),
|
|
1039
|
+
/* @__PURE__ */ jsx("div", { className: "absolute top-0 right-0 bottom-0 left-0 translate-y-20 rounded-xl bg-linear-to-t from-black to-transparent transition-transform duration-300 group-hover:translate-y-0" }),
|
|
1040
|
+
/* @__PURE__ */ jsxs("div", { className: "absolute top-0 flex h-full w-full flex-col justify-between p-4 md:p-6", children: [
|
|
1041
|
+
(card.badgeText || card.avatarSrc || card.icon || card.iconName) && /* @__PURE__ */ jsxs(Badge, { variant: "default", className: cn(card.badgeClassName), children: [
|
|
1042
|
+
renderBadgeIcon(card),
|
|
1043
|
+
card.badgeText
|
|
1044
|
+
] }),
|
|
1037
1045
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-5", children: [
|
|
1038
|
-
card.title && (typeof card.title === "string" ? /* @__PURE__ */ jsx(
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1046
|
+
card.title && (typeof card.title === "string" ? /* @__PURE__ */ jsx(
|
|
1047
|
+
"h3",
|
|
1048
|
+
{
|
|
1049
|
+
className: cn(
|
|
1050
|
+
"text-xl md:text-2xl font-semibold",
|
|
1051
|
+
card.titleClassName
|
|
1052
|
+
),
|
|
1053
|
+
children: card.title
|
|
1054
|
+
}
|
|
1055
|
+
) : /* @__PURE__ */ jsx(
|
|
1056
|
+
"div",
|
|
1057
|
+
{
|
|
1058
|
+
className: cn(
|
|
1059
|
+
"text-xl md:text-2xl font-semibold",
|
|
1060
|
+
card.titleClassName
|
|
1061
|
+
),
|
|
1062
|
+
children: card.title
|
|
1063
|
+
}
|
|
1064
|
+
)),
|
|
1065
|
+
card.linkText && card.link && /* @__PURE__ */ jsxs(
|
|
1066
|
+
Pressable,
|
|
1067
|
+
{
|
|
1068
|
+
className: cn(
|
|
1069
|
+
"font-bold text-xs uppercase",
|
|
1070
|
+
card.linkClassName
|
|
1071
|
+
),
|
|
1072
|
+
href: card.link,
|
|
1073
|
+
children: [
|
|
1074
|
+
card.linkText,
|
|
1075
|
+
/* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/arrow-up-right", size: 18 })
|
|
1076
|
+
]
|
|
1077
|
+
}
|
|
1078
|
+
)
|
|
1043
1079
|
] })
|
|
1044
1080
|
] })
|
|
1045
1081
|
]
|
|
@@ -1048,7 +1084,7 @@ function FeatureImageCardsThreeColumn({
|
|
|
1048
1084
|
);
|
|
1049
1085
|
});
|
|
1050
1086
|
}, [cardsSlot, cards, cardClassName, renderImage, renderBadgeIcon]);
|
|
1051
|
-
return /* @__PURE__ */
|
|
1087
|
+
return /* @__PURE__ */ jsx(
|
|
1052
1088
|
Section,
|
|
1053
1089
|
{
|
|
1054
1090
|
background,
|
|
@@ -1058,11 +1094,46 @@ function FeatureImageCardsThreeColumn({
|
|
|
1058
1094
|
patternClassName,
|
|
1059
1095
|
className,
|
|
1060
1096
|
containerClassName,
|
|
1061
|
-
children: [
|
|
1062
|
-
title
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1097
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col space-y-6 md:space-y-16", children: [
|
|
1098
|
+
title || description ? /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-6 text-left", headerClassName), children: [
|
|
1099
|
+
title && (typeof title === "string" ? /* @__PURE__ */ jsx(
|
|
1100
|
+
"h2",
|
|
1101
|
+
{
|
|
1102
|
+
className: cn(
|
|
1103
|
+
"text-xl font-semibold text-balance md:text-2xl lg:text-3xl max-w-lg md:max-w-md",
|
|
1104
|
+
titleClassName
|
|
1105
|
+
),
|
|
1106
|
+
children: title
|
|
1107
|
+
}
|
|
1108
|
+
) : /* @__PURE__ */ jsx(
|
|
1109
|
+
"div",
|
|
1110
|
+
{
|
|
1111
|
+
className: cn(
|
|
1112
|
+
"text-xl font-semibold text-balance md:text-2xl lg:text-3xl max-w-lg md:max-w-md",
|
|
1113
|
+
titleClassName
|
|
1114
|
+
),
|
|
1115
|
+
children: title
|
|
1116
|
+
}
|
|
1117
|
+
)),
|
|
1118
|
+
description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("max-w-lg md:max-w-md", descriptionClassName), children: description }) : /* @__PURE__ */ jsx(
|
|
1119
|
+
"div",
|
|
1120
|
+
{
|
|
1121
|
+
className: cn("max-w-lg md:max-w-md", descriptionClassName),
|
|
1122
|
+
children: description
|
|
1123
|
+
}
|
|
1124
|
+
))
|
|
1125
|
+
] }) : null,
|
|
1126
|
+
/* @__PURE__ */ jsx(
|
|
1127
|
+
"div",
|
|
1128
|
+
{
|
|
1129
|
+
className: cn(
|
|
1130
|
+
"grid gap-4 md:gap-4 grid-cols-1 md:grid-cols-3",
|
|
1131
|
+
gridClassName
|
|
1132
|
+
),
|
|
1133
|
+
children: cardsContent
|
|
1134
|
+
}
|
|
1135
|
+
)
|
|
1136
|
+
] })
|
|
1066
1137
|
}
|
|
1067
1138
|
);
|
|
1068
1139
|
}
|
|
@@ -936,7 +936,7 @@ function FeatureNumberedCards({
|
|
|
936
936
|
features,
|
|
937
937
|
featuresSlot,
|
|
938
938
|
className,
|
|
939
|
-
containerClassName = "px-6 sm:px-6 md:
|
|
939
|
+
containerClassName = "px-6 sm:px-6 md:px-6 lg:px-8",
|
|
940
940
|
cardsWrapperClassName,
|
|
941
941
|
cardClassName,
|
|
942
942
|
titleClassName,
|
|
@@ -915,7 +915,7 @@ function FeatureNumberedCards({
|
|
|
915
915
|
features,
|
|
916
916
|
featuresSlot,
|
|
917
917
|
className,
|
|
918
|
-
containerClassName = "px-6 sm:px-6 md:
|
|
918
|
+
containerClassName = "px-6 sm:px-6 md:px-6 lg:px-8",
|
|
919
919
|
cardsWrapperClassName,
|
|
920
920
|
cardClassName,
|
|
921
921
|
titleClassName,
|