@opensite/ui 2.9.0 → 2.9.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-feature-badge.cjs +4 -3
- package/dist/carousel-feature-badge.d.cts +1 -1
- package/dist/carousel-feature-badge.d.ts +1 -1
- package/dist/carousel-feature-badge.js +4 -3
- package/dist/carousel-scrolling-feature-showcase.cjs +47 -38
- package/dist/carousel-scrolling-feature-showcase.js +47 -38
- package/dist/registry.cjs +454 -265
- package/dist/registry.js +454 -265
- package/dist/testimonials-grid-add-review.cjs +578 -39
- package/dist/testimonials-grid-add-review.d.cts +26 -26
- package/dist/testimonials-grid-add-review.d.ts +26 -26
- package/dist/testimonials-grid-add-review.js +577 -38
- package/dist/testimonials-images-helpful.cjs +85 -74
- package/dist/testimonials-images-helpful.js +85 -74
- package/dist/testimonials-list-verified.cjs +1 -0
- package/dist/testimonials-list-verified.js +1 -0
- package/dist/testimonials-logo-cards.cjs +8 -5
- package/dist/testimonials-logo-cards.js +8 -5
- package/dist/testimonials-masonry-grid.cjs +87 -11
- package/dist/testimonials-masonry-grid.d.cts +14 -1
- package/dist/testimonials-masonry-grid.d.ts +14 -1
- package/dist/testimonials-masonry-grid.js +88 -12
- package/dist/testimonials-mini-dividers.cjs +438 -26
- package/dist/testimonials-mini-dividers.js +434 -22
- package/dist/testimonials-minimal-numbered.cjs +1 -1
- package/dist/testimonials-minimal-numbered.js +1 -1
- package/dist/testimonials-parallax-number.cjs +1 -1
- package/dist/testimonials-parallax-number.js +1 -1
- package/dist/testimonials-quote-carousel.cjs +39 -37
- package/dist/testimonials-quote-carousel.d.cts +5 -1
- package/dist/testimonials-quote-carousel.d.ts +5 -1
- package/dist/testimonials-quote-carousel.js +39 -37
- package/dist/testimonials-scrolling-columns.cjs +438 -8
- package/dist/testimonials-scrolling-columns.js +436 -6
- package/dist/testimonials-simple-grid.cjs +82 -6
- package/dist/testimonials-simple-grid.d.cts +14 -1
- package/dist/testimonials-simple-grid.d.ts +14 -1
- package/dist/testimonials-simple-grid.js +83 -7
- package/dist/testimonials-stats-header.cjs +88 -8
- package/dist/testimonials-stats-header.d.cts +14 -1
- package/dist/testimonials-stats-header.d.ts +14 -1
- package/dist/testimonials-stats-header.js +89 -9
- package/dist/testimonials-twitter-cards.cjs +150 -25
- package/dist/testimonials-twitter-cards.d.cts +14 -1
- package/dist/testimonials-twitter-cards.d.ts +14 -1
- package/dist/testimonials-twitter-cards.js +151 -26
- package/dist/testimonials-wall-compact.cjs +529 -50
- package/dist/testimonials-wall-compact.d.cts +14 -1
- package/dist/testimonials-wall-compact.d.ts +14 -1
- package/dist/testimonials-wall-compact.js +526 -44
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import React3__default, { useCallback, useMemo } from 'react';
|
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
7
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { cva } from 'class-variance-authority';
|
|
9
9
|
|
|
10
10
|
// components/blocks/testimonials/testimonials-simple-grid.tsx
|
|
@@ -860,6 +860,70 @@ var Pressable = React3.forwardRef(
|
|
|
860
860
|
}
|
|
861
861
|
);
|
|
862
862
|
Pressable.displayName = "Pressable";
|
|
863
|
+
var MOBILE_CLASSES = {
|
|
864
|
+
"fit-left": "items-start md:items-center",
|
|
865
|
+
"fit-center": "items-center",
|
|
866
|
+
"fit-right": "items-end md:items-center",
|
|
867
|
+
"full-left": "items-stretch md:items-center",
|
|
868
|
+
"full-center": "items-stretch md:items-center",
|
|
869
|
+
"full-right": "items-stretch md:items-center"
|
|
870
|
+
};
|
|
871
|
+
function BlockActions({
|
|
872
|
+
mobileConfig,
|
|
873
|
+
actionsClassName,
|
|
874
|
+
verticalSpacing = "mt-4 md:mt-8",
|
|
875
|
+
actions,
|
|
876
|
+
actionsSlot
|
|
877
|
+
}) {
|
|
878
|
+
const width = mobileConfig?.width ?? "full";
|
|
879
|
+
const position = mobileConfig?.position ?? "center";
|
|
880
|
+
const mobileLayoutClass = MOBILE_CLASSES[`${width}-${position}`];
|
|
881
|
+
if (actionsSlot) {
|
|
882
|
+
return /* @__PURE__ */ jsx("div", { children: actionsSlot });
|
|
883
|
+
} else if (actions && actions?.length > 0) {
|
|
884
|
+
return /* @__PURE__ */ jsx(
|
|
885
|
+
"div",
|
|
886
|
+
{
|
|
887
|
+
className: cn(
|
|
888
|
+
"flex flex-col md:flex-row flex-wrap gap-4",
|
|
889
|
+
mobileLayoutClass,
|
|
890
|
+
actionsClassName,
|
|
891
|
+
verticalSpacing
|
|
892
|
+
),
|
|
893
|
+
children: actions.map((action, index) => /* @__PURE__ */ jsx(ActionComponent, { action }, index))
|
|
894
|
+
}
|
|
895
|
+
);
|
|
896
|
+
} else {
|
|
897
|
+
return null;
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
function ActionComponent({ action }) {
|
|
901
|
+
const {
|
|
902
|
+
label,
|
|
903
|
+
icon,
|
|
904
|
+
iconAfter,
|
|
905
|
+
children,
|
|
906
|
+
href,
|
|
907
|
+
onClick,
|
|
908
|
+
className: actionClassName,
|
|
909
|
+
...pressableProps
|
|
910
|
+
} = action;
|
|
911
|
+
return /* @__PURE__ */ jsx(
|
|
912
|
+
Pressable,
|
|
913
|
+
{
|
|
914
|
+
href,
|
|
915
|
+
onClick,
|
|
916
|
+
asButton: action.asButton ?? true,
|
|
917
|
+
className: actionClassName,
|
|
918
|
+
...pressableProps,
|
|
919
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
920
|
+
icon,
|
|
921
|
+
label,
|
|
922
|
+
iconAfter
|
|
923
|
+
] })
|
|
924
|
+
}
|
|
925
|
+
);
|
|
926
|
+
}
|
|
863
927
|
function TestimonialsSimpleGrid({
|
|
864
928
|
testimonials,
|
|
865
929
|
testimonialsSlot,
|
|
@@ -879,7 +943,10 @@ function TestimonialsSimpleGrid({
|
|
|
879
943
|
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
880
944
|
spacing = "xl",
|
|
881
945
|
pattern,
|
|
882
|
-
patternOpacity
|
|
946
|
+
patternOpacity,
|
|
947
|
+
actions,
|
|
948
|
+
actionsSlot,
|
|
949
|
+
actionsClassName
|
|
883
950
|
}) {
|
|
884
951
|
const getAuthorName = useCallback((testimonial) => {
|
|
885
952
|
if (typeof testimonial.author === "string") return testimonial.author;
|
|
@@ -901,7 +968,7 @@ function TestimonialsSimpleGrid({
|
|
|
901
968
|
"div",
|
|
902
969
|
{
|
|
903
970
|
className: cn(
|
|
904
|
-
"grid gap-
|
|
971
|
+
"grid gap-8 md:gap-6 lg:gap-8 grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
905
972
|
gridClassName
|
|
906
973
|
),
|
|
907
974
|
children: testimonials.map((testimonial, index) => {
|
|
@@ -913,8 +980,8 @@ function TestimonialsSimpleGrid({
|
|
|
913
980
|
className: cn(
|
|
914
981
|
"bg-card text-card-foreground",
|
|
915
982
|
"flex flex-col gap-6",
|
|
916
|
-
testimonial.linkConfig?.href ? "cursor-pointer hover:
|
|
917
|
-
"rounded-2xl py-0 shadow-xl group",
|
|
983
|
+
testimonial.linkConfig?.href ? "cursor-pointer hover:opacity-75 transition-all duration-500" : "opacity-100",
|
|
984
|
+
"rounded-2xl py-0 shadow-xl group overflow-hidden",
|
|
918
985
|
"ring-4 ring-ring",
|
|
919
986
|
cardClassName
|
|
920
987
|
),
|
|
@@ -965,7 +1032,7 @@ function TestimonialsSimpleGrid({
|
|
|
965
1032
|
] })
|
|
966
1033
|
}
|
|
967
1034
|
),
|
|
968
|
-
/* @__PURE__ */ jsx("div", { className: "pt-6 md:
|
|
1035
|
+
/* @__PURE__ */ jsx("div", { className: "pt-6 md:pt-8 px-6 md:px-8", children: testimonial.quote && (typeof testimonial.quote === "string" ? /* @__PURE__ */ jsx("p", { className: "text-base leading-relaxed", children: testimonial.quote }) : testimonial.quote) })
|
|
969
1036
|
]
|
|
970
1037
|
}
|
|
971
1038
|
)
|
|
@@ -1024,7 +1091,16 @@ function TestimonialsSimpleGrid({
|
|
|
1024
1091
|
]
|
|
1025
1092
|
}
|
|
1026
1093
|
),
|
|
1027
|
-
renderedTestimonials
|
|
1094
|
+
renderedTestimonials,
|
|
1095
|
+
/* @__PURE__ */ jsx(
|
|
1096
|
+
BlockActions,
|
|
1097
|
+
{
|
|
1098
|
+
actions,
|
|
1099
|
+
actionsSlot,
|
|
1100
|
+
actionsClassName: cn("mt-8 md:mt-12 justify-center", actionsClassName),
|
|
1101
|
+
mobileConfig: { width: "full", position: "center" }
|
|
1102
|
+
}
|
|
1103
|
+
)
|
|
1028
1104
|
]
|
|
1029
1105
|
}
|
|
1030
1106
|
);
|
|
@@ -921,6 +921,70 @@ var Pressable = React4__namespace.forwardRef(
|
|
|
921
921
|
}
|
|
922
922
|
);
|
|
923
923
|
Pressable.displayName = "Pressable";
|
|
924
|
+
var MOBILE_CLASSES = {
|
|
925
|
+
"fit-left": "items-start md:items-center",
|
|
926
|
+
"fit-center": "items-center",
|
|
927
|
+
"fit-right": "items-end md:items-center",
|
|
928
|
+
"full-left": "items-stretch md:items-center",
|
|
929
|
+
"full-center": "items-stretch md:items-center",
|
|
930
|
+
"full-right": "items-stretch md:items-center"
|
|
931
|
+
};
|
|
932
|
+
function BlockActions({
|
|
933
|
+
mobileConfig,
|
|
934
|
+
actionsClassName,
|
|
935
|
+
verticalSpacing = "mt-4 md:mt-8",
|
|
936
|
+
actions,
|
|
937
|
+
actionsSlot
|
|
938
|
+
}) {
|
|
939
|
+
const width = mobileConfig?.width ?? "full";
|
|
940
|
+
const position = mobileConfig?.position ?? "center";
|
|
941
|
+
const mobileLayoutClass = MOBILE_CLASSES[`${width}-${position}`];
|
|
942
|
+
if (actionsSlot) {
|
|
943
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { children: actionsSlot });
|
|
944
|
+
} else if (actions && actions?.length > 0) {
|
|
945
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
946
|
+
"div",
|
|
947
|
+
{
|
|
948
|
+
className: cn(
|
|
949
|
+
"flex flex-col md:flex-row flex-wrap gap-4",
|
|
950
|
+
mobileLayoutClass,
|
|
951
|
+
actionsClassName,
|
|
952
|
+
verticalSpacing
|
|
953
|
+
),
|
|
954
|
+
children: actions.map((action, index) => /* @__PURE__ */ jsxRuntime.jsx(ActionComponent, { action }, index))
|
|
955
|
+
}
|
|
956
|
+
);
|
|
957
|
+
} else {
|
|
958
|
+
return null;
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
function ActionComponent({ action }) {
|
|
962
|
+
const {
|
|
963
|
+
label,
|
|
964
|
+
icon,
|
|
965
|
+
iconAfter,
|
|
966
|
+
children,
|
|
967
|
+
href,
|
|
968
|
+
onClick,
|
|
969
|
+
className: actionClassName,
|
|
970
|
+
...pressableProps
|
|
971
|
+
} = action;
|
|
972
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
973
|
+
Pressable,
|
|
974
|
+
{
|
|
975
|
+
href,
|
|
976
|
+
onClick,
|
|
977
|
+
asButton: action.asButton ?? true,
|
|
978
|
+
className: actionClassName,
|
|
979
|
+
...pressableProps,
|
|
980
|
+
children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
981
|
+
icon,
|
|
982
|
+
label,
|
|
983
|
+
iconAfter
|
|
984
|
+
] })
|
|
985
|
+
}
|
|
986
|
+
);
|
|
987
|
+
}
|
|
924
988
|
function TestimonialsStatsHeader({
|
|
925
989
|
stats,
|
|
926
990
|
statsSlot,
|
|
@@ -943,7 +1007,10 @@ function TestimonialsStatsHeader({
|
|
|
943
1007
|
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
944
1008
|
spacing = "xl",
|
|
945
1009
|
pattern,
|
|
946
|
-
patternOpacity
|
|
1010
|
+
patternOpacity,
|
|
1011
|
+
actions,
|
|
1012
|
+
actionsSlot,
|
|
1013
|
+
actionsClassName
|
|
947
1014
|
}) {
|
|
948
1015
|
const getAuthorName = React4.useCallback((testimonial) => {
|
|
949
1016
|
if (typeof testimonial.author === "string") return testimonial.author;
|
|
@@ -978,6 +1045,7 @@ function TestimonialsStatsHeader({
|
|
|
978
1045
|
{
|
|
979
1046
|
className: cn(
|
|
980
1047
|
"overflow-hidden border p-0",
|
|
1048
|
+
"rounded-2xl shadow-xl",
|
|
981
1049
|
stat.className,
|
|
982
1050
|
statCardClassName
|
|
983
1051
|
),
|
|
@@ -1003,7 +1071,10 @@ function TestimonialsStatsHeader({
|
|
|
1003
1071
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1004
1072
|
"div",
|
|
1005
1073
|
{
|
|
1006
|
-
className: cn(
|
|
1074
|
+
className: cn(
|
|
1075
|
+
"grid gap-6 grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
1076
|
+
testimonialsGridClassName
|
|
1077
|
+
),
|
|
1007
1078
|
children: testimonials.map((testimonial, index) => {
|
|
1008
1079
|
const authorName = getAuthorName(testimonial);
|
|
1009
1080
|
const avatarSrc = getAvatarSrc(testimonial);
|
|
@@ -1035,14 +1106,14 @@ function TestimonialsStatsHeader({
|
|
|
1035
1106
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1036
1107
|
"div",
|
|
1037
1108
|
{
|
|
1038
|
-
className: cn("flex items-center gap-
|
|
1109
|
+
className: cn("flex items-center gap-4", authorClassName),
|
|
1039
1110
|
children: [
|
|
1040
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Avatar, { className: "size-
|
|
1111
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Avatar, { className: "size-14 ring-4 ring-primary shadow-lg", children: [
|
|
1041
1112
|
/* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src: avatarSrc, alt: authorName }),
|
|
1042
1113
|
/* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { children: getInitials(authorName) })
|
|
1043
1114
|
] }),
|
|
1044
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
1045
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1115
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-start gap-1", children: [
|
|
1116
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-0", children: [
|
|
1046
1117
|
testimonial.author && (typeof testimonial.author === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base font-medium", children: testimonial.author }) : testimonial.author),
|
|
1047
1118
|
testimonial.role && (typeof testimonial.role === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm opacity-75", children: testimonial.role }) : testimonial.role)
|
|
1048
1119
|
] }),
|
|
@@ -1051,7 +1122,7 @@ function TestimonialsStatsHeader({
|
|
|
1051
1122
|
{
|
|
1052
1123
|
href: testimonial.linkConfig.href,
|
|
1053
1124
|
className: cn(
|
|
1054
|
-
"text-sm
|
|
1125
|
+
"text-sm transition-all duration-500",
|
|
1055
1126
|
"hover:underline hover:underline-offset-4",
|
|
1056
1127
|
testimonial.linkConfig.className
|
|
1057
1128
|
),
|
|
@@ -1119,7 +1190,16 @@ function TestimonialsStatsHeader({
|
|
|
1119
1190
|
}
|
|
1120
1191
|
),
|
|
1121
1192
|
renderedStats,
|
|
1122
|
-
renderedTestimonials
|
|
1193
|
+
renderedTestimonials,
|
|
1194
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1195
|
+
BlockActions,
|
|
1196
|
+
{
|
|
1197
|
+
actions,
|
|
1198
|
+
actionsSlot,
|
|
1199
|
+
actionsClassName: cn("mt-8 md:mt-12 justify-center", actionsClassName),
|
|
1200
|
+
mobileConfig: { width: "full", position: "center" }
|
|
1201
|
+
}
|
|
1202
|
+
)
|
|
1123
1203
|
]
|
|
1124
1204
|
}
|
|
1125
1205
|
);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { S as SectionBackground, s as SectionSpacing, t as PatternName } from './community-initiatives-B8KCpwXH.cjs';
|
|
3
|
+
import { ActionConfig } from '@page-speed/maps/components/geo-map';
|
|
3
4
|
import { T as TestimonialItem } from './blocks-BtDAbw8d.cjs';
|
|
4
5
|
import 'react/jsx-runtime';
|
|
5
6
|
import 'class-variance-authority';
|
|
@@ -141,6 +142,18 @@ interface TestimonialsStatsHeaderProps {
|
|
|
141
142
|
* Additional CSS classes for stat cards
|
|
142
143
|
*/
|
|
143
144
|
statCardClassName?: string;
|
|
145
|
+
/**
|
|
146
|
+
* Array of action configurations for CTA buttons
|
|
147
|
+
*/
|
|
148
|
+
actions?: ActionConfig[];
|
|
149
|
+
/**
|
|
150
|
+
* Custom slot for rendering actions (overrides actions array)
|
|
151
|
+
*/
|
|
152
|
+
actionsSlot?: React.ReactNode;
|
|
153
|
+
/**
|
|
154
|
+
* Additional CSS classes for the actions container
|
|
155
|
+
*/
|
|
156
|
+
actionsClassName?: string;
|
|
144
157
|
}
|
|
145
158
|
/**
|
|
146
159
|
* TestimonialsStatsHeader - A testimonial section featuring a prominent statistics
|
|
@@ -171,6 +184,6 @@ interface TestimonialsStatsHeaderProps {
|
|
|
171
184
|
* />
|
|
172
185
|
* ```
|
|
173
186
|
*/
|
|
174
|
-
declare function TestimonialsStatsHeader({ stats, statsSlot, testimonials, testimonialsSlot, heading, description, className, headerClassName, headingClassName, descriptionClassName, statsGridClassName, statItemClassName, testimonialsGridClassName, cardClassName, statCardClassName, quoteClassName, authorClassName, background, containerClassName, spacing, pattern, patternOpacity, }: TestimonialsStatsHeaderProps): React.JSX.Element;
|
|
187
|
+
declare function TestimonialsStatsHeader({ stats, statsSlot, testimonials, testimonialsSlot, heading, description, className, headerClassName, headingClassName, descriptionClassName, statsGridClassName, statItemClassName, testimonialsGridClassName, cardClassName, statCardClassName, quoteClassName, authorClassName, background, containerClassName, spacing, pattern, patternOpacity, actions, actionsSlot, actionsClassName, }: TestimonialsStatsHeaderProps): React.JSX.Element;
|
|
175
188
|
|
|
176
189
|
export { type StatItem, TestimonialsStatsHeader, type TestimonialsStatsHeaderProps };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { S as SectionBackground, s as SectionSpacing, t as PatternName } from './community-initiatives-rTRuDt0r.js';
|
|
3
|
+
import { ActionConfig } from '@page-speed/maps/components/geo-map';
|
|
3
4
|
import { T as TestimonialItem } from './blocks-BlWXj9GI.js';
|
|
4
5
|
import 'react/jsx-runtime';
|
|
5
6
|
import 'class-variance-authority';
|
|
@@ -141,6 +142,18 @@ interface TestimonialsStatsHeaderProps {
|
|
|
141
142
|
* Additional CSS classes for stat cards
|
|
142
143
|
*/
|
|
143
144
|
statCardClassName?: string;
|
|
145
|
+
/**
|
|
146
|
+
* Array of action configurations for CTA buttons
|
|
147
|
+
*/
|
|
148
|
+
actions?: ActionConfig[];
|
|
149
|
+
/**
|
|
150
|
+
* Custom slot for rendering actions (overrides actions array)
|
|
151
|
+
*/
|
|
152
|
+
actionsSlot?: React.ReactNode;
|
|
153
|
+
/**
|
|
154
|
+
* Additional CSS classes for the actions container
|
|
155
|
+
*/
|
|
156
|
+
actionsClassName?: string;
|
|
144
157
|
}
|
|
145
158
|
/**
|
|
146
159
|
* TestimonialsStatsHeader - A testimonial section featuring a prominent statistics
|
|
@@ -171,6 +184,6 @@ interface TestimonialsStatsHeaderProps {
|
|
|
171
184
|
* />
|
|
172
185
|
* ```
|
|
173
186
|
*/
|
|
174
|
-
declare function TestimonialsStatsHeader({ stats, statsSlot, testimonials, testimonialsSlot, heading, description, className, headerClassName, headingClassName, descriptionClassName, statsGridClassName, statItemClassName, testimonialsGridClassName, cardClassName, statCardClassName, quoteClassName, authorClassName, background, containerClassName, spacing, pattern, patternOpacity, }: TestimonialsStatsHeaderProps): React.JSX.Element;
|
|
187
|
+
declare function TestimonialsStatsHeader({ stats, statsSlot, testimonials, testimonialsSlot, heading, description, className, headerClassName, headingClassName, descriptionClassName, statsGridClassName, statItemClassName, testimonialsGridClassName, cardClassName, statCardClassName, quoteClassName, authorClassName, background, containerClassName, spacing, pattern, patternOpacity, actions, actionsSlot, actionsClassName, }: TestimonialsStatsHeaderProps): React.JSX.Element;
|
|
175
188
|
|
|
176
189
|
export { type StatItem, TestimonialsStatsHeader, type TestimonialsStatsHeaderProps };
|
|
@@ -4,7 +4,7 @@ import React4__default, { useCallback, useMemo } from 'react';
|
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { Icon } from '@page-speed/icon';
|
|
7
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
9
9
|
import { cva } from 'class-variance-authority';
|
|
10
10
|
|
|
@@ -899,6 +899,70 @@ var Pressable = React4.forwardRef(
|
|
|
899
899
|
}
|
|
900
900
|
);
|
|
901
901
|
Pressable.displayName = "Pressable";
|
|
902
|
+
var MOBILE_CLASSES = {
|
|
903
|
+
"fit-left": "items-start md:items-center",
|
|
904
|
+
"fit-center": "items-center",
|
|
905
|
+
"fit-right": "items-end md:items-center",
|
|
906
|
+
"full-left": "items-stretch md:items-center",
|
|
907
|
+
"full-center": "items-stretch md:items-center",
|
|
908
|
+
"full-right": "items-stretch md:items-center"
|
|
909
|
+
};
|
|
910
|
+
function BlockActions({
|
|
911
|
+
mobileConfig,
|
|
912
|
+
actionsClassName,
|
|
913
|
+
verticalSpacing = "mt-4 md:mt-8",
|
|
914
|
+
actions,
|
|
915
|
+
actionsSlot
|
|
916
|
+
}) {
|
|
917
|
+
const width = mobileConfig?.width ?? "full";
|
|
918
|
+
const position = mobileConfig?.position ?? "center";
|
|
919
|
+
const mobileLayoutClass = MOBILE_CLASSES[`${width}-${position}`];
|
|
920
|
+
if (actionsSlot) {
|
|
921
|
+
return /* @__PURE__ */ jsx("div", { children: actionsSlot });
|
|
922
|
+
} else if (actions && actions?.length > 0) {
|
|
923
|
+
return /* @__PURE__ */ jsx(
|
|
924
|
+
"div",
|
|
925
|
+
{
|
|
926
|
+
className: cn(
|
|
927
|
+
"flex flex-col md:flex-row flex-wrap gap-4",
|
|
928
|
+
mobileLayoutClass,
|
|
929
|
+
actionsClassName,
|
|
930
|
+
verticalSpacing
|
|
931
|
+
),
|
|
932
|
+
children: actions.map((action, index) => /* @__PURE__ */ jsx(ActionComponent, { action }, index))
|
|
933
|
+
}
|
|
934
|
+
);
|
|
935
|
+
} else {
|
|
936
|
+
return null;
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
function ActionComponent({ action }) {
|
|
940
|
+
const {
|
|
941
|
+
label,
|
|
942
|
+
icon,
|
|
943
|
+
iconAfter,
|
|
944
|
+
children,
|
|
945
|
+
href,
|
|
946
|
+
onClick,
|
|
947
|
+
className: actionClassName,
|
|
948
|
+
...pressableProps
|
|
949
|
+
} = action;
|
|
950
|
+
return /* @__PURE__ */ jsx(
|
|
951
|
+
Pressable,
|
|
952
|
+
{
|
|
953
|
+
href,
|
|
954
|
+
onClick,
|
|
955
|
+
asButton: action.asButton ?? true,
|
|
956
|
+
className: actionClassName,
|
|
957
|
+
...pressableProps,
|
|
958
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
959
|
+
icon,
|
|
960
|
+
label,
|
|
961
|
+
iconAfter
|
|
962
|
+
] })
|
|
963
|
+
}
|
|
964
|
+
);
|
|
965
|
+
}
|
|
902
966
|
function TestimonialsStatsHeader({
|
|
903
967
|
stats,
|
|
904
968
|
statsSlot,
|
|
@@ -921,7 +985,10 @@ function TestimonialsStatsHeader({
|
|
|
921
985
|
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
922
986
|
spacing = "xl",
|
|
923
987
|
pattern,
|
|
924
|
-
patternOpacity
|
|
988
|
+
patternOpacity,
|
|
989
|
+
actions,
|
|
990
|
+
actionsSlot,
|
|
991
|
+
actionsClassName
|
|
925
992
|
}) {
|
|
926
993
|
const getAuthorName = useCallback((testimonial) => {
|
|
927
994
|
if (typeof testimonial.author === "string") return testimonial.author;
|
|
@@ -956,6 +1023,7 @@ function TestimonialsStatsHeader({
|
|
|
956
1023
|
{
|
|
957
1024
|
className: cn(
|
|
958
1025
|
"overflow-hidden border p-0",
|
|
1026
|
+
"rounded-2xl shadow-xl",
|
|
959
1027
|
stat.className,
|
|
960
1028
|
statCardClassName
|
|
961
1029
|
),
|
|
@@ -981,7 +1049,10 @@ function TestimonialsStatsHeader({
|
|
|
981
1049
|
return /* @__PURE__ */ jsx(
|
|
982
1050
|
"div",
|
|
983
1051
|
{
|
|
984
|
-
className: cn(
|
|
1052
|
+
className: cn(
|
|
1053
|
+
"grid gap-6 grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
1054
|
+
testimonialsGridClassName
|
|
1055
|
+
),
|
|
985
1056
|
children: testimonials.map((testimonial, index) => {
|
|
986
1057
|
const authorName = getAuthorName(testimonial);
|
|
987
1058
|
const avatarSrc = getAvatarSrc(testimonial);
|
|
@@ -1013,14 +1084,14 @@ function TestimonialsStatsHeader({
|
|
|
1013
1084
|
/* @__PURE__ */ jsxs(
|
|
1014
1085
|
"div",
|
|
1015
1086
|
{
|
|
1016
|
-
className: cn("flex items-center gap-
|
|
1087
|
+
className: cn("flex items-center gap-4", authorClassName),
|
|
1017
1088
|
children: [
|
|
1018
|
-
/* @__PURE__ */ jsxs(Avatar, { className: "size-
|
|
1089
|
+
/* @__PURE__ */ jsxs(Avatar, { className: "size-14 ring-4 ring-primary shadow-lg", children: [
|
|
1019
1090
|
/* @__PURE__ */ jsx(AvatarImage, { src: avatarSrc, alt: authorName }),
|
|
1020
1091
|
/* @__PURE__ */ jsx(AvatarFallback, { children: getInitials(authorName) })
|
|
1021
1092
|
] }),
|
|
1022
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
1023
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
1093
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-start gap-1", children: [
|
|
1094
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-0", children: [
|
|
1024
1095
|
testimonial.author && (typeof testimonial.author === "string" ? /* @__PURE__ */ jsx("p", { className: "text-base font-medium", children: testimonial.author }) : testimonial.author),
|
|
1025
1096
|
testimonial.role && (typeof testimonial.role === "string" ? /* @__PURE__ */ jsx("p", { className: "text-sm opacity-75", children: testimonial.role }) : testimonial.role)
|
|
1026
1097
|
] }),
|
|
@@ -1029,7 +1100,7 @@ function TestimonialsStatsHeader({
|
|
|
1029
1100
|
{
|
|
1030
1101
|
href: testimonial.linkConfig.href,
|
|
1031
1102
|
className: cn(
|
|
1032
|
-
"text-sm
|
|
1103
|
+
"text-sm transition-all duration-500",
|
|
1033
1104
|
"hover:underline hover:underline-offset-4",
|
|
1034
1105
|
testimonial.linkConfig.className
|
|
1035
1106
|
),
|
|
@@ -1097,7 +1168,16 @@ function TestimonialsStatsHeader({
|
|
|
1097
1168
|
}
|
|
1098
1169
|
),
|
|
1099
1170
|
renderedStats,
|
|
1100
|
-
renderedTestimonials
|
|
1171
|
+
renderedTestimonials,
|
|
1172
|
+
/* @__PURE__ */ jsx(
|
|
1173
|
+
BlockActions,
|
|
1174
|
+
{
|
|
1175
|
+
actions,
|
|
1176
|
+
actionsSlot,
|
|
1177
|
+
actionsClassName: cn("mt-8 md:mt-12 justify-center", actionsClassName),
|
|
1178
|
+
mobileConfig: { width: "full", position: "center" }
|
|
1179
|
+
}
|
|
1180
|
+
)
|
|
1101
1181
|
]
|
|
1102
1182
|
}
|
|
1103
1183
|
);
|