@opensite/ui 2.8.5 → 2.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/about-developer-profile.cjs +17 -10
- package/dist/about-developer-profile.js +17 -10
- package/dist/article-chapters-author.cjs +17 -10
- package/dist/article-chapters-author.js +17 -10
- package/dist/carousel-animated-sections.cjs +79 -25
- package/dist/carousel-animated-sections.d.cts +7 -2
- package/dist/carousel-animated-sections.d.ts +7 -2
- package/dist/carousel-animated-sections.js +79 -25
- package/dist/carousel-gallery-thumbnails.cjs +79 -25
- package/dist/carousel-gallery-thumbnails.d.cts +7 -2
- package/dist/carousel-gallery-thumbnails.d.ts +7 -2
- package/dist/carousel-gallery-thumbnails.js +79 -25
- package/dist/carousel-portfolio-hero.cjs +79 -25
- package/dist/carousel-portfolio-hero.d.cts +7 -2
- package/dist/carousel-portfolio-hero.d.ts +7 -2
- package/dist/carousel-portfolio-hero.js +79 -25
- package/dist/components.cjs +35 -10
- package/dist/components.d.cts +29 -2
- package/dist/components.d.ts +29 -2
- package/dist/components.js +35 -11
- package/dist/footer-accordion-social.cjs +17 -10
- package/dist/footer-accordion-social.js +17 -10
- package/dist/footer-animated-social.cjs +17 -10
- package/dist/footer-animated-social.js +17 -10
- package/dist/footer-brand-description.cjs +17 -10
- package/dist/footer-brand-description.js +17 -10
- package/dist/footer-brand-links-contact.cjs +17 -10
- package/dist/footer-brand-links-contact.js +17 -10
- package/dist/footer-comprehensive-links.cjs +17 -10
- package/dist/footer-comprehensive-links.js +17 -10
- package/dist/footer-contact-card.cjs +17 -10
- package/dist/footer-contact-card.js +17 -10
- package/dist/footer-cta-banner.cjs +17 -10
- package/dist/footer-cta-banner.js +17 -10
- package/dist/footer-cta-social.cjs +17 -10
- package/dist/footer-cta-social.js +17 -10
- package/dist/footer-info-cards-accordion.cjs +17 -10
- package/dist/footer-info-cards-accordion.js +17 -10
- package/dist/footer-nav-social.cjs +17 -10
- package/dist/footer-nav-social.js +17 -10
- package/dist/footer-newsletter-contact.cjs +17 -10
- package/dist/footer-newsletter-contact.js +17 -10
- package/dist/footer-newsletter-grid.cjs +17 -10
- package/dist/footer-newsletter-grid.js +17 -10
- package/dist/footer-newsletter-minimal.cjs +17 -10
- package/dist/footer-newsletter-minimal.js +17 -10
- package/dist/footer-social-apps.cjs +17 -10
- package/dist/footer-social-apps.js +17 -10
- package/dist/footer-social-newsletter.cjs +17 -10
- package/dist/footer-social-newsletter.js +17 -10
- package/dist/footer-split-image-accordion.cjs +17 -10
- package/dist/footer-split-image-accordion.js +17 -10
- package/dist/hero-badge-shadow-overlay.cjs +1 -1
- package/dist/hero-badge-shadow-overlay.js +1 -1
- package/dist/hero-coming-soon-countdown.cjs +17 -10
- package/dist/hero-coming-soon-countdown.js +17 -10
- package/dist/hero-video-background-dark.cjs +78 -16
- package/dist/hero-video-background-dark.d.cts +7 -2
- package/dist/hero-video-background-dark.d.ts +7 -2
- package/dist/hero-video-background-dark.js +78 -16
- package/dist/index.cjs +35 -10
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +35 -11
- package/dist/link-page-bento-layout.cjs +17 -10
- package/dist/link-page-bento-layout.js +17 -10
- package/dist/link-page-grid-cards.cjs +17 -10
- package/dist/link-page-grid-cards.js +17 -10
- package/dist/link-page-minimal-profile.cjs +17 -10
- package/dist/link-page-minimal-profile.js +17 -10
- package/dist/link-page-newsletter-social.cjs +17 -10
- package/dist/link-page-newsletter-social.js +17 -10
- package/dist/link-tree-block.cjs +17 -10
- package/dist/link-tree-block.js +17 -10
- package/dist/navbar-fullscreen-menu.cjs +17 -10
- package/dist/navbar-fullscreen-menu.js +17 -10
- package/dist/navbar-transparent-overlay.cjs +17 -10
- package/dist/navbar-transparent-overlay.js +17 -10
- package/dist/registry.cjs +1398 -851
- package/dist/registry.js +1398 -851
- package/dist/social-link-icon.cjs +17 -10
- package/dist/social-link-icon.d.cts +5 -0
- package/dist/social-link-icon.d.ts +5 -0
- package/dist/social-link-icon.js +17 -10
- package/dist/testimonials-animated-split.cjs +5 -5
- package/dist/testimonials-animated-split.js +5 -5
- package/dist/testimonials-bento-grid.cjs +48 -56
- package/dist/testimonials-bento-grid.js +48 -56
- package/dist/testimonials-carousel-image.cjs +608 -96
- package/dist/testimonials-carousel-image.d.cts +26 -2
- package/dist/testimonials-carousel-image.d.ts +26 -2
- package/dist/testimonials-carousel-image.js +609 -97
- package/dist/testimonials-centered-avatars.cjs +89 -62
- package/dist/testimonials-centered-avatars.d.cts +5 -1
- package/dist/testimonials-centered-avatars.d.ts +5 -1
- package/dist/testimonials-centered-avatars.js +89 -62
- package/dist/testimonials-company-logo.cjs +6 -6
- package/dist/testimonials-company-logo.js +6 -6
- package/dist/testimonials-grid-add-review.cjs +51 -29
- package/dist/testimonials-grid-add-review.js +51 -29
- package/dist/testimonials-images-helpful.cjs +181 -160
- package/dist/testimonials-images-helpful.d.cts +9 -1
- package/dist/testimonials-images-helpful.d.ts +9 -1
- package/dist/testimonials-images-helpful.js +181 -159
- package/dist/testimonials-list-verified.cjs +63 -44
- package/dist/testimonials-list-verified.d.cts +5 -1
- package/dist/testimonials-list-verified.d.ts +5 -1
- package/dist/testimonials-list-verified.js +64 -45
- package/dist/testimonials-logo-cards.cjs +53 -29
- package/dist/testimonials-logo-cards.d.cts +5 -1
- package/dist/testimonials-logo-cards.d.ts +5 -1
- package/dist/testimonials-logo-cards.js +53 -29
- package/dist/testimonials-marquee.cjs +524 -102
- package/dist/testimonials-marquee.d.cts +5 -1
- package/dist/testimonials-marquee.d.ts +5 -1
- package/dist/testimonials-marquee.js +525 -100
- package/dist/testimonials-mini-dividers.cjs +120 -83
- package/dist/testimonials-mini-dividers.d.cts +10 -6
- package/dist/testimonials-mini-dividers.d.ts +10 -6
- package/dist/testimonials-mini-dividers.js +120 -83
- package/dist/testimonials-minimal-numbered.cjs +7 -6
- package/dist/testimonials-minimal-numbered.d.cts +5 -1
- package/dist/testimonials-minimal-numbered.d.ts +5 -1
- package/dist/testimonials-minimal-numbered.js +7 -6
- package/dist/testimonials-parallax-number.cjs +14 -8
- package/dist/testimonials-parallax-number.js +14 -8
- package/dist/testimonials-scrolling-columns.cjs +97 -13
- package/dist/testimonials-scrolling-columns.js +97 -13
- package/dist/testimonials-simple-grid.cjs +513 -68
- package/dist/testimonials-simple-grid.d.cts +9 -5
- package/dist/testimonials-simple-grid.d.ts +9 -5
- package/dist/testimonials-simple-grid.js +510 -62
- package/dist/testimonials-slider-minimal.cjs +604 -90
- package/dist/testimonials-slider-minimal.d.cts +17 -1
- package/dist/testimonials-slider-minimal.d.ts +17 -1
- package/dist/testimonials-slider-minimal.js +598 -81
- package/dist/testimonials-split-image.cjs +452 -17
- package/dist/testimonials-split-image.js +448 -13
- package/dist/testimonials-twitter-cards.cjs +26 -14
- package/dist/testimonials-twitter-cards.js +26 -14
- package/package.json +11 -1
|
@@ -5,11 +5,11 @@ import { clsx } from 'clsx';
|
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { Icon } from '@page-speed/icon';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
|
-
import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
|
|
9
8
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
10
9
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
11
10
|
import { cva } from 'class-variance-authority';
|
|
12
11
|
import { Img } from '@page-speed/img';
|
|
12
|
+
import { Lightbox } from '@page-speed/lightbox';
|
|
13
13
|
|
|
14
14
|
// components/blocks/testimonials/testimonials-images-helpful.tsx
|
|
15
15
|
function cn(...inputs) {
|
|
@@ -23,10 +23,22 @@ var DynamicIcon = React2.memo(function DynamicIcon2({
|
|
|
23
23
|
return /* @__PURE__ */ jsx(Icon, { ...props, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
|
|
24
24
|
});
|
|
25
25
|
DynamicIcon.displayName = "DynamicIcon";
|
|
26
|
-
function
|
|
27
|
-
|
|
26
|
+
function StarRating({
|
|
27
|
+
rating,
|
|
28
|
+
size = 18,
|
|
29
|
+
className
|
|
28
30
|
}) {
|
|
29
|
-
return /* @__PURE__ */ jsx(
|
|
31
|
+
return /* @__PURE__ */ jsx("div", { className: cn("flex items-center gap-0.5", className), children: [1, 2, 3, 4, 5].map((star) => /* @__PURE__ */ jsx(
|
|
32
|
+
DynamicIcon,
|
|
33
|
+
{
|
|
34
|
+
name: "icon-park-solid/star",
|
|
35
|
+
size,
|
|
36
|
+
className: cn(
|
|
37
|
+
star <= rating ? "fill-primary text-primary" : "fill-muted text-muted"
|
|
38
|
+
)
|
|
39
|
+
},
|
|
40
|
+
star
|
|
41
|
+
)) });
|
|
30
42
|
}
|
|
31
43
|
function Avatar({
|
|
32
44
|
className,
|
|
@@ -73,29 +85,6 @@ function AvatarFallback({
|
|
|
73
85
|
}
|
|
74
86
|
);
|
|
75
87
|
}
|
|
76
|
-
function Card({ className, ...props }) {
|
|
77
|
-
return /* @__PURE__ */ jsx(
|
|
78
|
-
"div",
|
|
79
|
-
{
|
|
80
|
-
"data-slot": "card",
|
|
81
|
-
className: cn(
|
|
82
|
-
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
|
|
83
|
-
className
|
|
84
|
-
),
|
|
85
|
-
...props
|
|
86
|
-
}
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
function CardContent({ className, ...props }) {
|
|
90
|
-
return /* @__PURE__ */ jsx(
|
|
91
|
-
"div",
|
|
92
|
-
{
|
|
93
|
-
"data-slot": "card-content",
|
|
94
|
-
className: cn("px-6", className),
|
|
95
|
-
...props
|
|
96
|
-
}
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
88
|
function Separator({
|
|
100
89
|
className,
|
|
101
90
|
orientation = "horizontal",
|
|
@@ -910,23 +899,11 @@ var Section = React2__default.forwardRef(
|
|
|
910
899
|
}
|
|
911
900
|
);
|
|
912
901
|
Section.displayName = "Section";
|
|
913
|
-
function StarRating({ rating, size = 16 }) {
|
|
914
|
-
return /* @__PURE__ */ jsx("div", { className: "flex items-center gap-0.5", children: [1, 2, 3, 4, 5].map((star) => /* @__PURE__ */ jsx(
|
|
915
|
-
DynamicIcon,
|
|
916
|
-
{
|
|
917
|
-
name: "lucide/star",
|
|
918
|
-
size,
|
|
919
|
-
className: cn(
|
|
920
|
-
star <= rating ? "fill-primary text-primary" : "fill-muted text-muted"
|
|
921
|
-
)
|
|
922
|
-
},
|
|
923
|
-
star
|
|
924
|
-
)) });
|
|
925
|
-
}
|
|
926
902
|
function TestimonialsImagesHelpful({
|
|
927
903
|
reviews,
|
|
928
904
|
reviewsSlot,
|
|
929
905
|
heading,
|
|
906
|
+
verifiedPurchaseLabel,
|
|
930
907
|
writeReviewLabel,
|
|
931
908
|
reportButtonLabel,
|
|
932
909
|
className,
|
|
@@ -938,12 +915,16 @@ function TestimonialsImagesHelpful({
|
|
|
938
915
|
imagesClassName,
|
|
939
916
|
onWriteReview,
|
|
940
917
|
background,
|
|
941
|
-
spacing = "
|
|
918
|
+
spacing = "lg",
|
|
919
|
+
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
942
920
|
pattern,
|
|
943
921
|
patternOpacity,
|
|
944
922
|
optixFlowConfig
|
|
945
923
|
}) {
|
|
946
924
|
const [helpfulClicked, setHelpfulClicked] = useState(/* @__PURE__ */ new Set());
|
|
925
|
+
const [lightboxOpen, setLightboxOpen] = useState(false);
|
|
926
|
+
const [lightboxItems, setLightboxItems] = useState([]);
|
|
927
|
+
const [lightboxIndex, setLightboxIndex] = useState(0);
|
|
947
928
|
const totalReviews = reviews?.length ?? 0;
|
|
948
929
|
const averageRating = totalReviews > 0 ? (reviews?.reduce((sum, review) => sum + review.rating, 0) ?? 0) / totalReviews : 0;
|
|
949
930
|
const handleHelpful = useCallback((reviewIndex) => {
|
|
@@ -957,6 +938,25 @@ function TestimonialsImagesHelpful({
|
|
|
957
938
|
return newSet;
|
|
958
939
|
});
|
|
959
940
|
}, []);
|
|
941
|
+
const handleImageClick = useCallback(
|
|
942
|
+
(reviewImages, imageIndex) => {
|
|
943
|
+
const items = reviewImages.map((src, i) => ({
|
|
944
|
+
id: `review-image-${i}`,
|
|
945
|
+
type: "image",
|
|
946
|
+
src,
|
|
947
|
+
alt: `Review image ${i + 1}`,
|
|
948
|
+
download: true,
|
|
949
|
+
share: true
|
|
950
|
+
}));
|
|
951
|
+
setLightboxItems(items);
|
|
952
|
+
setLightboxIndex(imageIndex);
|
|
953
|
+
setLightboxOpen(true);
|
|
954
|
+
},
|
|
955
|
+
[]
|
|
956
|
+
);
|
|
957
|
+
const handleLightboxClose = useCallback(() => {
|
|
958
|
+
setLightboxOpen(false);
|
|
959
|
+
}, []);
|
|
960
960
|
const getAuthorName = useCallback((review) => {
|
|
961
961
|
if (typeof review.author === "string") return review.author;
|
|
962
962
|
return "";
|
|
@@ -970,54 +970,28 @@ function TestimonialsImagesHelpful({
|
|
|
970
970
|
return /* @__PURE__ */ jsx("div", { className: "space-y-0", children: reviews.map((review, index) => {
|
|
971
971
|
const authorName = getAuthorName(review);
|
|
972
972
|
return /* @__PURE__ */ jsxs("div", { className: reviewClassName, children: [
|
|
973
|
-
index > 0 && /* @__PURE__ */ jsx(Separator, { className: "my-
|
|
974
|
-
/* @__PURE__ */
|
|
975
|
-
/* @__PURE__ */ jsxs(
|
|
976
|
-
|
|
977
|
-
{
|
|
978
|
-
className: cn(
|
|
979
|
-
"flex items-start justify-between gap-4",
|
|
980
|
-
authorClassName
|
|
981
|
-
),
|
|
982
|
-
children: [
|
|
983
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
984
|
-
/* @__PURE__ */ jsxs(Avatar, { className: "size-10", children: [
|
|
985
|
-
/* @__PURE__ */ jsx(AvatarImage, { src: review.avatarSrc, alt: authorName }),
|
|
986
|
-
/* @__PURE__ */ jsx(AvatarFallback, { children: getInitials(authorName) })
|
|
987
|
-
] }),
|
|
988
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
989
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
990
|
-
review.author && (typeof review.author === "string" ? /* @__PURE__ */ jsx("span", { className: "font-medium", children: review.author }) : review.author),
|
|
991
|
-
review.verified && /* @__PURE__ */ jsx("span", { className: "flex items-center gap-1 text-emerald-600", children: /* @__PURE__ */ jsx(
|
|
992
|
-
DynamicIcon,
|
|
993
|
-
{
|
|
994
|
-
name: "lucide/badge-check",
|
|
995
|
-
size: 16
|
|
996
|
-
}
|
|
997
|
-
) })
|
|
998
|
-
] }),
|
|
999
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
1000
|
-
review.date && /* @__PURE__ */ jsx("span", { children: review.date }),
|
|
1001
|
-
review.variant && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1002
|
-
/* @__PURE__ */ jsx("span", { children: "\xB7" }),
|
|
1003
|
-
/* @__PURE__ */ jsx("span", { children: review.variant })
|
|
1004
|
-
] })
|
|
1005
|
-
] })
|
|
1006
|
-
] })
|
|
1007
|
-
] }),
|
|
1008
|
-
/* @__PURE__ */ jsx(StarRating, { rating: review.rating, size: 16 })
|
|
1009
|
-
]
|
|
1010
|
-
}
|
|
1011
|
-
),
|
|
1012
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
1013
|
-
review.title && (typeof review.title === "string" ? /* @__PURE__ */ jsx("h3", { className: "font-medium", children: review.title }) : review.title),
|
|
1014
|
-
review.content && (typeof review.content === "string" ? /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm leading-relaxed text-muted-foreground", children: review.content }) : /* @__PURE__ */ jsx("div", { className: "mt-2", children: review.content }))
|
|
973
|
+
index > 0 && /* @__PURE__ */ jsx(Separator, { className: "bg-border/50 shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px my-12 md:my-16" }),
|
|
974
|
+
/* @__PURE__ */ jsxs("div", { className: cn("space-y-6 md:space-y-12", contentClassName), children: [
|
|
975
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
976
|
+
/* @__PURE__ */ jsx(StarRating, { rating: review.rating, size: 22 }),
|
|
977
|
+
review.title && (typeof review.title === "string" ? /* @__PURE__ */ jsx("h3", { className: "font-medium", children: review.title }) : review.title)
|
|
1015
978
|
] }),
|
|
1016
|
-
review.
|
|
979
|
+
review.content && (typeof review.content === "string" ? /* @__PURE__ */ jsx("p", { className: "text-base md:text-lg leading-relaxed font-light", children: review.content }) : review.content),
|
|
980
|
+
review.images && review.images.length > 0 && /* @__PURE__ */ jsx("div", { className: cn("flex gap-3", imagesClassName), children: review.images.map((image, imgIndex) => /* @__PURE__ */ jsx(
|
|
1017
981
|
"div",
|
|
1018
982
|
{
|
|
1019
|
-
className: "size-20 overflow-hidden rounded-lg sm:size-24",
|
|
1020
|
-
|
|
983
|
+
className: "size-20 cursor-pointer overflow-hidden rounded-lg sm:size-24 transition-transform duration-300 hover:scale-[1.03] shadow-sm hover:shadow-lg",
|
|
984
|
+
onClick: () => handleImageClick(review.images, imgIndex),
|
|
985
|
+
role: "button",
|
|
986
|
+
tabIndex: 0,
|
|
987
|
+
onKeyDown: (e) => {
|
|
988
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
989
|
+
e.preventDefault();
|
|
990
|
+
handleImageClick(review.images, imgIndex);
|
|
991
|
+
}
|
|
992
|
+
},
|
|
993
|
+
"aria-label": `View review image ${imgIndex + 1} in lightbox`,
|
|
994
|
+
children: /* @__PURE__ */ jsx(
|
|
1021
995
|
Img,
|
|
1022
996
|
{
|
|
1023
997
|
src: image,
|
|
@@ -1025,54 +999,85 @@ function TestimonialsImagesHelpful({
|
|
|
1025
999
|
className: "size-full object-cover",
|
|
1026
1000
|
optixFlowConfig
|
|
1027
1001
|
}
|
|
1028
|
-
)
|
|
1002
|
+
)
|
|
1029
1003
|
},
|
|
1030
1004
|
imgIndex
|
|
1031
1005
|
)) }),
|
|
1032
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center
|
|
1006
|
+
/* @__PURE__ */ jsxs("div", { className: cn("flex items-center justify-between w-full"), children: [
|
|
1033
1007
|
/* @__PURE__ */ jsxs(
|
|
1034
|
-
|
|
1008
|
+
"div",
|
|
1035
1009
|
{
|
|
1036
|
-
|
|
1037
|
-
variant: "ghost",
|
|
1038
|
-
size: "sm",
|
|
1039
|
-
className: cn(
|
|
1040
|
-
"h-8 gap-1.5 text-muted-foreground",
|
|
1041
|
-
helpfulClicked.has(index) && "text-foreground"
|
|
1042
|
-
),
|
|
1043
|
-
onClick: () => handleHelpful(index),
|
|
1010
|
+
className: cn("flex items-center gap-5", authorClassName),
|
|
1044
1011
|
children: [
|
|
1045
|
-
/* @__PURE__ */
|
|
1046
|
-
|
|
1047
|
-
{
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1012
|
+
/* @__PURE__ */ jsxs(Avatar, { className: "size-12 ring-4 ring-primary shadow-lg", children: [
|
|
1013
|
+
/* @__PURE__ */ jsx(AvatarImage, { src: review.avatarSrc, alt: authorName }),
|
|
1014
|
+
/* @__PURE__ */ jsx(AvatarFallback, { className: "text-md", children: getInitials(authorName) })
|
|
1015
|
+
] }),
|
|
1016
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-start gap-0", children: [
|
|
1017
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1018
|
+
review.author && (typeof review.author === "string" ? /* @__PURE__ */ jsx("span", { className: "font-medium", children: review.author }) : review.author),
|
|
1019
|
+
review.verified && /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1", children: [
|
|
1020
|
+
/* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/badge-check", size: 18 }),
|
|
1021
|
+
verifiedPurchaseLabel && (typeof verifiedPurchaseLabel === "string" ? /* @__PURE__ */ jsx("span", { className: "text-sm", children: verifiedPurchaseLabel }) : verifiedPurchaseLabel),
|
|
1022
|
+
!verifiedPurchaseLabel && /* @__PURE__ */ jsx("span", { className: "text-sm", children: "Verified Purchase" })
|
|
1023
|
+
] })
|
|
1024
|
+
] }),
|
|
1025
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm", children: [
|
|
1026
|
+
review.date && /* @__PURE__ */ jsx("span", { children: review.date }),
|
|
1027
|
+
review.variant && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1028
|
+
/* @__PURE__ */ jsx("span", { children: "\xB7" }),
|
|
1029
|
+
/* @__PURE__ */ jsx("span", { children: review.variant })
|
|
1030
|
+
] })
|
|
1031
|
+
] })
|
|
1060
1032
|
] })
|
|
1061
1033
|
]
|
|
1062
1034
|
}
|
|
1063
1035
|
),
|
|
1064
|
-
/* @__PURE__ */
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1036
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
|
|
1037
|
+
/* @__PURE__ */ jsxs(
|
|
1038
|
+
Pressable,
|
|
1039
|
+
{
|
|
1040
|
+
asButton: true,
|
|
1041
|
+
variant: "ghost",
|
|
1042
|
+
size: "sm",
|
|
1043
|
+
className: cn(
|
|
1044
|
+
"h-8 gap-1.5",
|
|
1045
|
+
helpfulClicked.has(index) ? "text-foreground" : "text-muted-foreground"
|
|
1046
|
+
),
|
|
1047
|
+
onClick: () => handleHelpful(index),
|
|
1048
|
+
children: [
|
|
1049
|
+
/* @__PURE__ */ jsx(
|
|
1050
|
+
DynamicIcon,
|
|
1051
|
+
{
|
|
1052
|
+
name: "lucide/thumbs-up",
|
|
1053
|
+
size: 16,
|
|
1054
|
+
className: cn(
|
|
1055
|
+
helpfulClicked.has(index) && "fill-current"
|
|
1056
|
+
)
|
|
1057
|
+
}
|
|
1058
|
+
),
|
|
1059
|
+
"Helpful",
|
|
1060
|
+
review.helpful !== void 0 && /* @__PURE__ */ jsxs("span", { children: [
|
|
1061
|
+
"(",
|
|
1062
|
+
review.helpful + (helpfulClicked.has(index) ? 1 : 0),
|
|
1063
|
+
")"
|
|
1064
|
+
] })
|
|
1065
|
+
]
|
|
1066
|
+
}
|
|
1067
|
+
),
|
|
1068
|
+
/* @__PURE__ */ jsx(
|
|
1069
|
+
Pressable,
|
|
1070
|
+
{
|
|
1071
|
+
asButton: true,
|
|
1072
|
+
variant: "ghost",
|
|
1073
|
+
size: "sm",
|
|
1074
|
+
className: "h-8 text-muted-foreground",
|
|
1075
|
+
children: reportButtonLabel ?? "Report"
|
|
1076
|
+
}
|
|
1077
|
+
)
|
|
1078
|
+
] })
|
|
1074
1079
|
] })
|
|
1075
|
-
] })
|
|
1080
|
+
] })
|
|
1076
1081
|
] }, index);
|
|
1077
1082
|
}) });
|
|
1078
1083
|
}, [
|
|
@@ -1085,11 +1090,13 @@ function TestimonialsImagesHelpful({
|
|
|
1085
1090
|
helpfulClicked,
|
|
1086
1091
|
optixFlowConfig,
|
|
1087
1092
|
reportButtonLabel,
|
|
1093
|
+
verifiedPurchaseLabel,
|
|
1088
1094
|
getAuthorName,
|
|
1089
1095
|
getInitials,
|
|
1090
|
-
handleHelpful
|
|
1096
|
+
handleHelpful,
|
|
1097
|
+
handleImageClick
|
|
1091
1098
|
]);
|
|
1092
|
-
return /* @__PURE__ */
|
|
1099
|
+
return /* @__PURE__ */ jsxs(
|
|
1093
1100
|
Section,
|
|
1094
1101
|
{
|
|
1095
1102
|
background,
|
|
@@ -1097,42 +1104,57 @@ function TestimonialsImagesHelpful({
|
|
|
1097
1104
|
pattern,
|
|
1098
1105
|
patternOpacity,
|
|
1099
1106
|
className,
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
{
|
|
1104
|
-
className:
|
|
1105
|
-
"
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
headingClassName
|
|
1116
|
-
),
|
|
1117
|
-
children: heading
|
|
1118
|
-
}
|
|
1119
|
-
) : /* @__PURE__ */ jsx("div", { className: headingClassName, children: heading })),
|
|
1120
|
-
totalReviews > 0 && /* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-center gap-2", children: [
|
|
1121
|
-
/* @__PURE__ */ jsx(StarRating, { rating: Math.round(averageRating), size: 20 }),
|
|
1122
|
-
/* @__PURE__ */ jsx("span", { className: "text-lg font-semibold", children: averageRating.toFixed(1) }),
|
|
1123
|
-
/* @__PURE__ */ jsxs("span", { className: "text-sm text-muted-foreground", children: [
|
|
1124
|
-
"(",
|
|
1125
|
-
totalReviews,
|
|
1126
|
-
" reviews)"
|
|
1127
|
-
] })
|
|
1128
|
-
] })
|
|
1129
|
-
] }),
|
|
1107
|
+
containerClassName,
|
|
1108
|
+
children: [
|
|
1109
|
+
/* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-full md:max-w-3xl", children: [
|
|
1110
|
+
/* @__PURE__ */ jsxs("div", { className: cn("mb-12 md:mb-24 space-y-6", headerClassName), children: [
|
|
1111
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between", children: [
|
|
1112
|
+
heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
|
|
1113
|
+
"h2",
|
|
1114
|
+
{
|
|
1115
|
+
className: cn(
|
|
1116
|
+
"text-2xl font-semibold tracking-tight md:text-3xl lg:text-4xl",
|
|
1117
|
+
headingClassName
|
|
1118
|
+
),
|
|
1119
|
+
children: heading
|
|
1120
|
+
}
|
|
1121
|
+
) : heading),
|
|
1130
1122
|
(writeReviewLabel || onWriteReview) && /* @__PURE__ */ jsx(Pressable, { asButton: true, variant: "outline", onClick: onWriteReview, children: writeReviewLabel })
|
|
1131
|
-
]
|
|
1123
|
+
] }),
|
|
1124
|
+
totalReviews > 0 && /* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-center gap-3", children: [
|
|
1125
|
+
/* @__PURE__ */ jsx(StarRating, { rating: Math.round(averageRating), size: 22 }),
|
|
1126
|
+
/* @__PURE__ */ jsxs("span", { className: "text-sm", children: [
|
|
1127
|
+
averageRating.toFixed(1),
|
|
1128
|
+
" out of 5 \xB7 ",
|
|
1129
|
+
totalReviews,
|
|
1130
|
+
" reviews"
|
|
1131
|
+
] })
|
|
1132
|
+
] })
|
|
1133
|
+
] }),
|
|
1134
|
+
renderedReviews
|
|
1135
|
+
] }),
|
|
1136
|
+
lightboxOpen && /* @__PURE__ */ jsx(
|
|
1137
|
+
Lightbox,
|
|
1138
|
+
{
|
|
1139
|
+
items: lightboxItems,
|
|
1140
|
+
initialIndex: lightboxIndex,
|
|
1141
|
+
layout: "horizontal",
|
|
1142
|
+
controls: {
|
|
1143
|
+
navigation: true,
|
|
1144
|
+
thumbnails: true,
|
|
1145
|
+
download: true,
|
|
1146
|
+
share: true,
|
|
1147
|
+
fullscreen: true,
|
|
1148
|
+
captions: true,
|
|
1149
|
+
counter: true
|
|
1150
|
+
},
|
|
1151
|
+
onClose: handleLightboxClose,
|
|
1152
|
+
enableKeyboardShortcuts: true,
|
|
1153
|
+
closeOnEscape: true,
|
|
1154
|
+
closeOnBackdropClick: true
|
|
1132
1155
|
}
|
|
1133
|
-
)
|
|
1134
|
-
|
|
1135
|
-
] })
|
|
1156
|
+
)
|
|
1157
|
+
]
|
|
1136
1158
|
}
|
|
1137
1159
|
);
|
|
1138
1160
|
}
|
|
@@ -43,6 +43,23 @@ var DynamicIcon = React__namespace.memo(function DynamicIcon2({
|
|
|
43
43
|
return /* @__PURE__ */ jsxRuntime.jsx(icon.Icon, { ...props, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
|
|
44
44
|
});
|
|
45
45
|
DynamicIcon.displayName = "DynamicIcon";
|
|
46
|
+
function StarRating({
|
|
47
|
+
rating,
|
|
48
|
+
size = 18,
|
|
49
|
+
className
|
|
50
|
+
}) {
|
|
51
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex items-center gap-0.5", className), children: [1, 2, 3, 4, 5].map((star) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
52
|
+
DynamicIcon,
|
|
53
|
+
{
|
|
54
|
+
name: "icon-park-solid/star",
|
|
55
|
+
size,
|
|
56
|
+
className: cn(
|
|
57
|
+
star <= rating ? "fill-primary text-primary" : "fill-muted text-muted"
|
|
58
|
+
)
|
|
59
|
+
},
|
|
60
|
+
star
|
|
61
|
+
)) });
|
|
62
|
+
}
|
|
46
63
|
function Avatar({
|
|
47
64
|
className,
|
|
48
65
|
...props
|
|
@@ -484,19 +501,6 @@ var Section = React__namespace.default.forwardRef(
|
|
|
484
501
|
}
|
|
485
502
|
);
|
|
486
503
|
Section.displayName = "Section";
|
|
487
|
-
function StarRating({ rating, size = 16 }) {
|
|
488
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-0.5", children: [1, 2, 3, 4, 5].map((star) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
489
|
-
DynamicIcon,
|
|
490
|
-
{
|
|
491
|
-
name: "lucide/star",
|
|
492
|
-
size,
|
|
493
|
-
className: cn(
|
|
494
|
-
star <= rating ? "fill-primary text-primary" : "fill-muted text-muted"
|
|
495
|
-
)
|
|
496
|
-
},
|
|
497
|
-
star
|
|
498
|
-
)) });
|
|
499
|
-
}
|
|
500
504
|
function TestimonialsListVerified({
|
|
501
505
|
reviews,
|
|
502
506
|
reviewsSlot,
|
|
@@ -509,7 +513,8 @@ function TestimonialsListVerified({
|
|
|
509
513
|
contentClassName,
|
|
510
514
|
authorClassName,
|
|
511
515
|
background,
|
|
512
|
-
spacing,
|
|
516
|
+
spacing = "lg",
|
|
517
|
+
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
513
518
|
pattern,
|
|
514
519
|
patternOpacity
|
|
515
520
|
}) {
|
|
@@ -528,35 +533,49 @@ function TestimonialsListVerified({
|
|
|
528
533
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0", children: reviews.map((review, index) => {
|
|
529
534
|
const authorName = getAuthorName(review);
|
|
530
535
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: reviewClassName, children: [
|
|
531
|
-
index > 0 && /* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "my-
|
|
532
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("space-y-
|
|
533
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
534
|
-
/* @__PURE__ */ jsxRuntime.jsx(StarRating, { rating: review.rating, size:
|
|
535
|
-
review.title && (typeof review.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "
|
|
536
|
+
index > 0 && /* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "bg-border/50 shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px my-12 md:my-16" }),
|
|
537
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("space-y-6 md:space-y-12", contentClassName), children: [
|
|
538
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
539
|
+
/* @__PURE__ */ jsxRuntime.jsx(StarRating, { rating: review.rating, size: 22 }),
|
|
540
|
+
review.title && (typeof review.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-medium", children: review.title }) : review.title)
|
|
536
541
|
] }),
|
|
537
|
-
review.content && (typeof review.content === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-
|
|
538
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center
|
|
539
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
542
|
+
review.content && (typeof review.content === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base md:text-lg leading-relaxed font-light", children: review.content }) : review.content),
|
|
543
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center justify-between w-full"), children: [
|
|
544
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
545
|
+
"div",
|
|
546
|
+
{
|
|
547
|
+
className: cn("flex items-center gap-5", authorClassName),
|
|
548
|
+
children: [
|
|
549
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Avatar, { className: "size-12 ring-4 ring-primary shadow-lg", children: [
|
|
550
|
+
/* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src: review.avatarSrc, alt: authorName }),
|
|
551
|
+
/* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "text-md", children: getInitials(authorName) })
|
|
552
|
+
] }),
|
|
553
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 text-base flex-col items-start", children: [
|
|
554
|
+
review.author && (typeof review.author === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: review.author }) : review.author),
|
|
555
|
+
review.verified && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1", children: [
|
|
556
|
+
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/badge-check", size: 18 }),
|
|
557
|
+
verifiedPurchaseLabel && (typeof verifiedPurchaseLabel === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: verifiedPurchaseLabel }) : verifiedPurchaseLabel),
|
|
558
|
+
!verifiedPurchaseLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: "Verified Purchase" })
|
|
559
|
+
] })
|
|
560
|
+
] })
|
|
561
|
+
]
|
|
562
|
+
}
|
|
563
|
+
),
|
|
564
|
+
review.date && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative", children: review.date })
|
|
555
565
|
] })
|
|
556
566
|
] })
|
|
557
567
|
] }, index);
|
|
558
568
|
}) });
|
|
559
|
-
}, [
|
|
569
|
+
}, [
|
|
570
|
+
reviewsSlot,
|
|
571
|
+
reviews,
|
|
572
|
+
reviewClassName,
|
|
573
|
+
contentClassName,
|
|
574
|
+
authorClassName,
|
|
575
|
+
verifiedPurchaseLabel,
|
|
576
|
+
getAuthorName,
|
|
577
|
+
getInitials
|
|
578
|
+
]);
|
|
560
579
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
561
580
|
Section,
|
|
562
581
|
{
|
|
@@ -565,21 +584,21 @@ function TestimonialsListVerified({
|
|
|
565
584
|
pattern,
|
|
566
585
|
patternOpacity,
|
|
567
586
|
className,
|
|
568
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mx-auto max-w-3xl", children: [
|
|
569
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mb-
|
|
587
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mx-auto max-w-full md:max-w-3xl", children: [
|
|
588
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mb-12 md:mb-24 space-y-6", headerClassName), children: [
|
|
570
589
|
heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
571
590
|
"h2",
|
|
572
591
|
{
|
|
573
592
|
className: cn(
|
|
574
|
-
"text-2xl font-semibold tracking-tight md:text-3xl",
|
|
593
|
+
"text-2xl font-semibold tracking-tight md:text-3xl lg:text-4xl",
|
|
575
594
|
headingClassName
|
|
576
595
|
),
|
|
577
596
|
children: heading
|
|
578
597
|
}
|
|
579
|
-
) :
|
|
598
|
+
) : heading),
|
|
580
599
|
totalReviews > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 flex items-center gap-3", children: [
|
|
581
|
-
/* @__PURE__ */ jsxRuntime.jsx(StarRating, { rating: Math.round(averageRating), size:
|
|
582
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm
|
|
600
|
+
/* @__PURE__ */ jsxRuntime.jsx(StarRating, { rating: Math.round(averageRating), size: 22 }),
|
|
601
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm", children: [
|
|
583
602
|
averageRating.toFixed(1),
|
|
584
603
|
" out of 5 \xB7 ",
|
|
585
604
|
totalReviews,
|
|
@@ -97,6 +97,10 @@ interface TestimonialsListVerifiedProps {
|
|
|
97
97
|
* Pattern overlay opacity (0-1)
|
|
98
98
|
*/
|
|
99
99
|
patternOpacity?: number;
|
|
100
|
+
/**
|
|
101
|
+
* Additional CSS classes for the container
|
|
102
|
+
*/
|
|
103
|
+
containerClassName?: string;
|
|
100
104
|
}
|
|
101
105
|
/**
|
|
102
106
|
* TestimonialsListVerified - A clean, vertical list of customer reviews with rating summary,
|
|
@@ -124,6 +128,6 @@ interface TestimonialsListVerifiedProps {
|
|
|
124
128
|
* />
|
|
125
129
|
* ```
|
|
126
130
|
*/
|
|
127
|
-
declare function TestimonialsListVerified({ reviews, reviewsSlot, heading, verifiedPurchaseLabel, className, headerClassName, headingClassName, reviewClassName, contentClassName, authorClassName, background, spacing, pattern, patternOpacity, }: TestimonialsListVerifiedProps): React.JSX.Element;
|
|
131
|
+
declare function TestimonialsListVerified({ reviews, reviewsSlot, heading, verifiedPurchaseLabel, className, headerClassName, headingClassName, reviewClassName, contentClassName, authorClassName, background, spacing, containerClassName, pattern, patternOpacity, }: TestimonialsListVerifiedProps): React.JSX.Element;
|
|
128
132
|
|
|
129
133
|
export { type ReviewItem, TestimonialsListVerified, type TestimonialsListVerifiedProps };
|
|
@@ -97,6 +97,10 @@ interface TestimonialsListVerifiedProps {
|
|
|
97
97
|
* Pattern overlay opacity (0-1)
|
|
98
98
|
*/
|
|
99
99
|
patternOpacity?: number;
|
|
100
|
+
/**
|
|
101
|
+
* Additional CSS classes for the container
|
|
102
|
+
*/
|
|
103
|
+
containerClassName?: string;
|
|
100
104
|
}
|
|
101
105
|
/**
|
|
102
106
|
* TestimonialsListVerified - A clean, vertical list of customer reviews with rating summary,
|
|
@@ -124,6 +128,6 @@ interface TestimonialsListVerifiedProps {
|
|
|
124
128
|
* />
|
|
125
129
|
* ```
|
|
126
130
|
*/
|
|
127
|
-
declare function TestimonialsListVerified({ reviews, reviewsSlot, heading, verifiedPurchaseLabel, className, headerClassName, headingClassName, reviewClassName, contentClassName, authorClassName, background, spacing, pattern, patternOpacity, }: TestimonialsListVerifiedProps): React.JSX.Element;
|
|
131
|
+
declare function TestimonialsListVerified({ reviews, reviewsSlot, heading, verifiedPurchaseLabel, className, headerClassName, headingClassName, reviewClassName, contentClassName, authorClassName, background, spacing, containerClassName, pattern, patternOpacity, }: TestimonialsListVerifiedProps): React.JSX.Element;
|
|
128
132
|
|
|
129
133
|
export { type ReviewItem, TestimonialsListVerified, type TestimonialsListVerifiedProps };
|