@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
|
@@ -23,6 +23,23 @@ var DynamicIcon = React.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 StarRating({
|
|
27
|
+
rating,
|
|
28
|
+
size = 18,
|
|
29
|
+
className
|
|
30
|
+
}) {
|
|
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
|
+
)) });
|
|
42
|
+
}
|
|
26
43
|
function Avatar({
|
|
27
44
|
className,
|
|
28
45
|
...props
|
|
@@ -467,19 +484,6 @@ var Section = React__default.forwardRef(
|
|
|
467
484
|
}
|
|
468
485
|
);
|
|
469
486
|
Section.displayName = "Section";
|
|
470
|
-
function StarRating({ rating, size = 16 }) {
|
|
471
|
-
return /* @__PURE__ */ jsx("div", { className: "flex items-center gap-0.5", children: [1, 2, 3, 4, 5].map((star) => /* @__PURE__ */ jsx(
|
|
472
|
-
DynamicIcon,
|
|
473
|
-
{
|
|
474
|
-
name: "lucide/star",
|
|
475
|
-
size,
|
|
476
|
-
className: cn(
|
|
477
|
-
star <= rating ? "fill-primary text-primary" : "fill-muted text-muted"
|
|
478
|
-
)
|
|
479
|
-
},
|
|
480
|
-
star
|
|
481
|
-
)) });
|
|
482
|
-
}
|
|
483
487
|
function TestimonialsGridAddReview({
|
|
484
488
|
reviews,
|
|
485
489
|
reviewsSlot,
|
|
@@ -526,21 +530,27 @@ function TestimonialsGridAddReview({
|
|
|
526
530
|
addReviewCardClassName
|
|
527
531
|
),
|
|
528
532
|
onClick: onAddReview,
|
|
529
|
-
children: /* @__PURE__ */ jsxs(
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
size:
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
533
|
+
children: /* @__PURE__ */ jsxs(
|
|
534
|
+
CardContent,
|
|
535
|
+
{
|
|
536
|
+
className: cn(
|
|
537
|
+
"flex flex-col items-center gap-3 py-12 text-center",
|
|
538
|
+
getNestedCardTextColor(background)
|
|
539
|
+
),
|
|
540
|
+
children: [
|
|
541
|
+
/* @__PURE__ */ jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-primary/10", children: /* @__PURE__ */ jsx(
|
|
542
|
+
DynamicIcon,
|
|
543
|
+
{
|
|
544
|
+
name: "lucide/plus",
|
|
545
|
+
size: 24,
|
|
546
|
+
className: "text-primary"
|
|
547
|
+
}
|
|
548
|
+
) }),
|
|
549
|
+
addReviewText && (typeof addReviewText === "string" ? /* @__PURE__ */ jsx("p", { className: "font-medium", children: addReviewText }) : addReviewText),
|
|
550
|
+
addReviewSubtext && (typeof addReviewSubtext === "string" ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: addReviewSubtext }) : addReviewSubtext)
|
|
551
|
+
]
|
|
552
|
+
}
|
|
553
|
+
)
|
|
544
554
|
}
|
|
545
555
|
),
|
|
546
556
|
reviews?.map((review, index) => {
|
|
@@ -560,7 +570,19 @@ function TestimonialsGridAddReview({
|
|
|
560
570
|
]
|
|
561
571
|
}
|
|
562
572
|
);
|
|
563
|
-
}, [
|
|
573
|
+
}, [
|
|
574
|
+
reviewsSlot,
|
|
575
|
+
gridClassName,
|
|
576
|
+
addReviewCardClassName,
|
|
577
|
+
onAddReview,
|
|
578
|
+
addReviewText,
|
|
579
|
+
addReviewSubtext,
|
|
580
|
+
reviews,
|
|
581
|
+
cardClassName,
|
|
582
|
+
authorClassName,
|
|
583
|
+
getAuthorName,
|
|
584
|
+
getInitials
|
|
585
|
+
]);
|
|
564
586
|
return /* @__PURE__ */ jsxs(
|
|
565
587
|
Section,
|
|
566
588
|
{
|
|
@@ -6,11 +6,11 @@ var clsx = require('clsx');
|
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var icon = require('@page-speed/icon');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
-
var AspectRatioPrimitive = require('@radix-ui/react-aspect-ratio');
|
|
10
9
|
var AvatarPrimitive = require('@radix-ui/react-avatar');
|
|
11
10
|
var SeparatorPrimitive = require('@radix-ui/react-separator');
|
|
12
11
|
var classVarianceAuthority = require('class-variance-authority');
|
|
13
12
|
var img = require('@page-speed/img');
|
|
13
|
+
var lightbox = require('@page-speed/lightbox');
|
|
14
14
|
|
|
15
15
|
function _interopNamespace(e) {
|
|
16
16
|
if (e && e.__esModule) return e;
|
|
@@ -31,7 +31,6 @@ function _interopNamespace(e) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
|
|
34
|
-
var AspectRatioPrimitive__namespace = /*#__PURE__*/_interopNamespace(AspectRatioPrimitive);
|
|
35
34
|
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
36
35
|
var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
|
|
37
36
|
|
|
@@ -47,10 +46,22 @@ var DynamicIcon = React2__namespace.memo(function DynamicIcon2({
|
|
|
47
46
|
return /* @__PURE__ */ jsxRuntime.jsx(icon.Icon, { ...props, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
|
|
48
47
|
});
|
|
49
48
|
DynamicIcon.displayName = "DynamicIcon";
|
|
50
|
-
function
|
|
51
|
-
|
|
49
|
+
function StarRating({
|
|
50
|
+
rating,
|
|
51
|
+
size = 18,
|
|
52
|
+
className
|
|
52
53
|
}) {
|
|
53
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
54
|
+
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(
|
|
55
|
+
DynamicIcon,
|
|
56
|
+
{
|
|
57
|
+
name: "icon-park-solid/star",
|
|
58
|
+
size,
|
|
59
|
+
className: cn(
|
|
60
|
+
star <= rating ? "fill-primary text-primary" : "fill-muted text-muted"
|
|
61
|
+
)
|
|
62
|
+
},
|
|
63
|
+
star
|
|
64
|
+
)) });
|
|
54
65
|
}
|
|
55
66
|
function Avatar({
|
|
56
67
|
className,
|
|
@@ -97,29 +108,6 @@ function AvatarFallback({
|
|
|
97
108
|
}
|
|
98
109
|
);
|
|
99
110
|
}
|
|
100
|
-
function Card({ className, ...props }) {
|
|
101
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
102
|
-
"div",
|
|
103
|
-
{
|
|
104
|
-
"data-slot": "card",
|
|
105
|
-
className: cn(
|
|
106
|
-
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
|
|
107
|
-
className
|
|
108
|
-
),
|
|
109
|
-
...props
|
|
110
|
-
}
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
function CardContent({ className, ...props }) {
|
|
114
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
115
|
-
"div",
|
|
116
|
-
{
|
|
117
|
-
"data-slot": "card-content",
|
|
118
|
-
className: cn("px-6", className),
|
|
119
|
-
...props
|
|
120
|
-
}
|
|
121
|
-
);
|
|
122
|
-
}
|
|
123
111
|
function Separator({
|
|
124
112
|
className,
|
|
125
113
|
orientation = "horizontal",
|
|
@@ -934,23 +922,11 @@ var Section = React2__namespace.default.forwardRef(
|
|
|
934
922
|
}
|
|
935
923
|
);
|
|
936
924
|
Section.displayName = "Section";
|
|
937
|
-
function StarRating({ rating, size = 16 }) {
|
|
938
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-0.5", children: [1, 2, 3, 4, 5].map((star) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
939
|
-
DynamicIcon,
|
|
940
|
-
{
|
|
941
|
-
name: "lucide/star",
|
|
942
|
-
size,
|
|
943
|
-
className: cn(
|
|
944
|
-
star <= rating ? "fill-primary text-primary" : "fill-muted text-muted"
|
|
945
|
-
)
|
|
946
|
-
},
|
|
947
|
-
star
|
|
948
|
-
)) });
|
|
949
|
-
}
|
|
950
925
|
function TestimonialsImagesHelpful({
|
|
951
926
|
reviews,
|
|
952
927
|
reviewsSlot,
|
|
953
928
|
heading,
|
|
929
|
+
verifiedPurchaseLabel,
|
|
954
930
|
writeReviewLabel,
|
|
955
931
|
reportButtonLabel,
|
|
956
932
|
className,
|
|
@@ -962,12 +938,16 @@ function TestimonialsImagesHelpful({
|
|
|
962
938
|
imagesClassName,
|
|
963
939
|
onWriteReview,
|
|
964
940
|
background,
|
|
965
|
-
spacing = "
|
|
941
|
+
spacing = "lg",
|
|
942
|
+
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
966
943
|
pattern,
|
|
967
944
|
patternOpacity,
|
|
968
945
|
optixFlowConfig
|
|
969
946
|
}) {
|
|
970
947
|
const [helpfulClicked, setHelpfulClicked] = React2.useState(/* @__PURE__ */ new Set());
|
|
948
|
+
const [lightboxOpen, setLightboxOpen] = React2.useState(false);
|
|
949
|
+
const [lightboxItems, setLightboxItems] = React2.useState([]);
|
|
950
|
+
const [lightboxIndex, setLightboxIndex] = React2.useState(0);
|
|
971
951
|
const totalReviews = reviews?.length ?? 0;
|
|
972
952
|
const averageRating = totalReviews > 0 ? (reviews?.reduce((sum, review) => sum + review.rating, 0) ?? 0) / totalReviews : 0;
|
|
973
953
|
const handleHelpful = React2.useCallback((reviewIndex) => {
|
|
@@ -981,6 +961,25 @@ function TestimonialsImagesHelpful({
|
|
|
981
961
|
return newSet;
|
|
982
962
|
});
|
|
983
963
|
}, []);
|
|
964
|
+
const handleImageClick = React2.useCallback(
|
|
965
|
+
(reviewImages, imageIndex) => {
|
|
966
|
+
const items = reviewImages.map((src, i) => ({
|
|
967
|
+
id: `review-image-${i}`,
|
|
968
|
+
type: "image",
|
|
969
|
+
src,
|
|
970
|
+
alt: `Review image ${i + 1}`,
|
|
971
|
+
download: true,
|
|
972
|
+
share: true
|
|
973
|
+
}));
|
|
974
|
+
setLightboxItems(items);
|
|
975
|
+
setLightboxIndex(imageIndex);
|
|
976
|
+
setLightboxOpen(true);
|
|
977
|
+
},
|
|
978
|
+
[]
|
|
979
|
+
);
|
|
980
|
+
const handleLightboxClose = React2.useCallback(() => {
|
|
981
|
+
setLightboxOpen(false);
|
|
982
|
+
}, []);
|
|
984
983
|
const getAuthorName = React2.useCallback((review) => {
|
|
985
984
|
if (typeof review.author === "string") return review.author;
|
|
986
985
|
return "";
|
|
@@ -994,54 +993,28 @@ function TestimonialsImagesHelpful({
|
|
|
994
993
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0", children: reviews.map((review, index) => {
|
|
995
994
|
const authorName = getAuthorName(review);
|
|
996
995
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: reviewClassName, children: [
|
|
997
|
-
index > 0 && /* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "my-
|
|
998
|
-
/* @__PURE__ */ jsxRuntime.
|
|
999
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1000
|
-
|
|
1001
|
-
{
|
|
1002
|
-
className: cn(
|
|
1003
|
-
"flex items-start justify-between gap-4",
|
|
1004
|
-
authorClassName
|
|
1005
|
-
),
|
|
1006
|
-
children: [
|
|
1007
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1008
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Avatar, { className: "size-10", children: [
|
|
1009
|
-
/* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src: review.avatarSrc, alt: authorName }),
|
|
1010
|
-
/* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { children: getInitials(authorName) })
|
|
1011
|
-
] }),
|
|
1012
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1013
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1014
|
-
review.author && (typeof review.author === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: review.author }) : review.author),
|
|
1015
|
-
review.verified && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center gap-1 text-emerald-600", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1016
|
-
DynamicIcon,
|
|
1017
|
-
{
|
|
1018
|
-
name: "lucide/badge-check",
|
|
1019
|
-
size: 16
|
|
1020
|
-
}
|
|
1021
|
-
) })
|
|
1022
|
-
] }),
|
|
1023
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
1024
|
-
review.date && /* @__PURE__ */ jsxRuntime.jsx("span", { children: review.date }),
|
|
1025
|
-
review.variant && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1026
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "\xB7" }),
|
|
1027
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: review.variant })
|
|
1028
|
-
] })
|
|
1029
|
-
] })
|
|
1030
|
-
] })
|
|
1031
|
-
] }),
|
|
1032
|
-
/* @__PURE__ */ jsxRuntime.jsx(StarRating, { rating: review.rating, size: 16 })
|
|
1033
|
-
]
|
|
1034
|
-
}
|
|
1035
|
-
),
|
|
1036
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1037
|
-
review.title && (typeof review.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-medium", children: review.title }) : review.title),
|
|
1038
|
-
review.content && (typeof review.content === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm leading-relaxed text-muted-foreground", children: review.content }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", children: review.content }))
|
|
996
|
+
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" }),
|
|
997
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("space-y-6 md:space-y-12", contentClassName), children: [
|
|
998
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
999
|
+
/* @__PURE__ */ jsxRuntime.jsx(StarRating, { rating: review.rating, size: 22 }),
|
|
1000
|
+
review.title && (typeof review.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-medium", children: review.title }) : review.title)
|
|
1039
1001
|
] }),
|
|
1040
|
-
review.
|
|
1002
|
+
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),
|
|
1003
|
+
review.images && review.images.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex gap-3", imagesClassName), children: review.images.map((image, imgIndex) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1041
1004
|
"div",
|
|
1042
1005
|
{
|
|
1043
|
-
className: "size-20 overflow-hidden rounded-lg sm:size-24",
|
|
1044
|
-
|
|
1006
|
+
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",
|
|
1007
|
+
onClick: () => handleImageClick(review.images, imgIndex),
|
|
1008
|
+
role: "button",
|
|
1009
|
+
tabIndex: 0,
|
|
1010
|
+
onKeyDown: (e) => {
|
|
1011
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
1012
|
+
e.preventDefault();
|
|
1013
|
+
handleImageClick(review.images, imgIndex);
|
|
1014
|
+
}
|
|
1015
|
+
},
|
|
1016
|
+
"aria-label": `View review image ${imgIndex + 1} in lightbox`,
|
|
1017
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1045
1018
|
img.Img,
|
|
1046
1019
|
{
|
|
1047
1020
|
src: image,
|
|
@@ -1049,54 +1022,85 @@ function TestimonialsImagesHelpful({
|
|
|
1049
1022
|
className: "size-full object-cover",
|
|
1050
1023
|
optixFlowConfig
|
|
1051
1024
|
}
|
|
1052
|
-
)
|
|
1025
|
+
)
|
|
1053
1026
|
},
|
|
1054
1027
|
imgIndex
|
|
1055
1028
|
)) }),
|
|
1056
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center
|
|
1029
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center justify-between w-full"), children: [
|
|
1057
1030
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1058
|
-
|
|
1031
|
+
"div",
|
|
1059
1032
|
{
|
|
1060
|
-
|
|
1061
|
-
variant: "ghost",
|
|
1062
|
-
size: "sm",
|
|
1063
|
-
className: cn(
|
|
1064
|
-
"h-8 gap-1.5 text-muted-foreground",
|
|
1065
|
-
helpfulClicked.has(index) && "text-foreground"
|
|
1066
|
-
),
|
|
1067
|
-
onClick: () => handleHelpful(index),
|
|
1033
|
+
className: cn("flex items-center gap-5", authorClassName),
|
|
1068
1034
|
children: [
|
|
1069
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1070
|
-
|
|
1071
|
-
{
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1035
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Avatar, { className: "size-12 ring-4 ring-primary shadow-lg", children: [
|
|
1036
|
+
/* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src: review.avatarSrc, alt: authorName }),
|
|
1037
|
+
/* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "text-md", children: getInitials(authorName) })
|
|
1038
|
+
] }),
|
|
1039
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-start gap-0", children: [
|
|
1040
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1041
|
+
review.author && (typeof review.author === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: review.author }) : review.author),
|
|
1042
|
+
review.verified && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1", children: [
|
|
1043
|
+
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/badge-check", size: 18 }),
|
|
1044
|
+
verifiedPurchaseLabel && (typeof verifiedPurchaseLabel === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: verifiedPurchaseLabel }) : verifiedPurchaseLabel),
|
|
1045
|
+
!verifiedPurchaseLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: "Verified Purchase" })
|
|
1046
|
+
] })
|
|
1047
|
+
] }),
|
|
1048
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-sm", children: [
|
|
1049
|
+
review.date && /* @__PURE__ */ jsxRuntime.jsx("span", { children: review.date }),
|
|
1050
|
+
review.variant && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1051
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "\xB7" }),
|
|
1052
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: review.variant })
|
|
1053
|
+
] })
|
|
1054
|
+
] })
|
|
1084
1055
|
] })
|
|
1085
1056
|
]
|
|
1086
1057
|
}
|
|
1087
1058
|
),
|
|
1088
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1059
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
|
|
1060
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1061
|
+
Pressable,
|
|
1062
|
+
{
|
|
1063
|
+
asButton: true,
|
|
1064
|
+
variant: "ghost",
|
|
1065
|
+
size: "sm",
|
|
1066
|
+
className: cn(
|
|
1067
|
+
"h-8 gap-1.5",
|
|
1068
|
+
helpfulClicked.has(index) ? "text-foreground" : "text-muted-foreground"
|
|
1069
|
+
),
|
|
1070
|
+
onClick: () => handleHelpful(index),
|
|
1071
|
+
children: [
|
|
1072
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1073
|
+
DynamicIcon,
|
|
1074
|
+
{
|
|
1075
|
+
name: "lucide/thumbs-up",
|
|
1076
|
+
size: 16,
|
|
1077
|
+
className: cn(
|
|
1078
|
+
helpfulClicked.has(index) && "fill-current"
|
|
1079
|
+
)
|
|
1080
|
+
}
|
|
1081
|
+
),
|
|
1082
|
+
"Helpful",
|
|
1083
|
+
review.helpful !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
1084
|
+
"(",
|
|
1085
|
+
review.helpful + (helpfulClicked.has(index) ? 1 : 0),
|
|
1086
|
+
")"
|
|
1087
|
+
] })
|
|
1088
|
+
]
|
|
1089
|
+
}
|
|
1090
|
+
),
|
|
1091
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1092
|
+
Pressable,
|
|
1093
|
+
{
|
|
1094
|
+
asButton: true,
|
|
1095
|
+
variant: "ghost",
|
|
1096
|
+
size: "sm",
|
|
1097
|
+
className: "h-8 text-muted-foreground",
|
|
1098
|
+
children: reportButtonLabel ?? "Report"
|
|
1099
|
+
}
|
|
1100
|
+
)
|
|
1101
|
+
] })
|
|
1098
1102
|
] })
|
|
1099
|
-
] })
|
|
1103
|
+
] })
|
|
1100
1104
|
] }, index);
|
|
1101
1105
|
}) });
|
|
1102
1106
|
}, [
|
|
@@ -1109,11 +1113,13 @@ function TestimonialsImagesHelpful({
|
|
|
1109
1113
|
helpfulClicked,
|
|
1110
1114
|
optixFlowConfig,
|
|
1111
1115
|
reportButtonLabel,
|
|
1116
|
+
verifiedPurchaseLabel,
|
|
1112
1117
|
getAuthorName,
|
|
1113
1118
|
getInitials,
|
|
1114
|
-
handleHelpful
|
|
1119
|
+
handleHelpful,
|
|
1120
|
+
handleImageClick
|
|
1115
1121
|
]);
|
|
1116
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
1122
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1117
1123
|
Section,
|
|
1118
1124
|
{
|
|
1119
1125
|
background,
|
|
@@ -1121,42 +1127,57 @@ function TestimonialsImagesHelpful({
|
|
|
1121
1127
|
pattern,
|
|
1122
1128
|
patternOpacity,
|
|
1123
1129
|
className,
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
{
|
|
1128
|
-
className:
|
|
1129
|
-
"
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
headingClassName
|
|
1140
|
-
),
|
|
1141
|
-
children: heading
|
|
1142
|
-
}
|
|
1143
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: headingClassName, children: heading })),
|
|
1144
|
-
totalReviews > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 flex items-center gap-2", children: [
|
|
1145
|
-
/* @__PURE__ */ jsxRuntime.jsx(StarRating, { rating: Math.round(averageRating), size: 20 }),
|
|
1146
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg font-semibold", children: averageRating.toFixed(1) }),
|
|
1147
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-muted-foreground", children: [
|
|
1148
|
-
"(",
|
|
1149
|
-
totalReviews,
|
|
1150
|
-
" reviews)"
|
|
1151
|
-
] })
|
|
1152
|
-
] })
|
|
1153
|
-
] }),
|
|
1130
|
+
containerClassName,
|
|
1131
|
+
children: [
|
|
1132
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mx-auto max-w-full md:max-w-3xl", children: [
|
|
1133
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mb-12 md:mb-24 space-y-6", headerClassName), children: [
|
|
1134
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between", children: [
|
|
1135
|
+
heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1136
|
+
"h2",
|
|
1137
|
+
{
|
|
1138
|
+
className: cn(
|
|
1139
|
+
"text-2xl font-semibold tracking-tight md:text-3xl lg:text-4xl",
|
|
1140
|
+
headingClassName
|
|
1141
|
+
),
|
|
1142
|
+
children: heading
|
|
1143
|
+
}
|
|
1144
|
+
) : heading),
|
|
1154
1145
|
(writeReviewLabel || onWriteReview) && /* @__PURE__ */ jsxRuntime.jsx(Pressable, { asButton: true, variant: "outline", onClick: onWriteReview, children: writeReviewLabel })
|
|
1155
|
-
]
|
|
1146
|
+
] }),
|
|
1147
|
+
totalReviews > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 flex items-center gap-3", children: [
|
|
1148
|
+
/* @__PURE__ */ jsxRuntime.jsx(StarRating, { rating: Math.round(averageRating), size: 22 }),
|
|
1149
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm", children: [
|
|
1150
|
+
averageRating.toFixed(1),
|
|
1151
|
+
" out of 5 \xB7 ",
|
|
1152
|
+
totalReviews,
|
|
1153
|
+
" reviews"
|
|
1154
|
+
] })
|
|
1155
|
+
] })
|
|
1156
|
+
] }),
|
|
1157
|
+
renderedReviews
|
|
1158
|
+
] }),
|
|
1159
|
+
lightboxOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1160
|
+
lightbox.Lightbox,
|
|
1161
|
+
{
|
|
1162
|
+
items: lightboxItems,
|
|
1163
|
+
initialIndex: lightboxIndex,
|
|
1164
|
+
layout: "horizontal",
|
|
1165
|
+
controls: {
|
|
1166
|
+
navigation: true,
|
|
1167
|
+
thumbnails: true,
|
|
1168
|
+
download: true,
|
|
1169
|
+
share: true,
|
|
1170
|
+
fullscreen: true,
|
|
1171
|
+
captions: true,
|
|
1172
|
+
counter: true
|
|
1173
|
+
},
|
|
1174
|
+
onClose: handleLightboxClose,
|
|
1175
|
+
enableKeyboardShortcuts: true,
|
|
1176
|
+
closeOnEscape: true,
|
|
1177
|
+
closeOnBackdropClick: true
|
|
1156
1178
|
}
|
|
1157
|
-
)
|
|
1158
|
-
|
|
1159
|
-
] })
|
|
1179
|
+
)
|
|
1180
|
+
]
|
|
1160
1181
|
}
|
|
1161
1182
|
);
|
|
1162
1183
|
}
|
|
@@ -65,6 +65,10 @@ interface TestimonialsImagesHelpfulProps {
|
|
|
65
65
|
* Main heading content
|
|
66
66
|
*/
|
|
67
67
|
heading?: React.ReactNode;
|
|
68
|
+
/**
|
|
69
|
+
* Label for the verified purchase badge
|
|
70
|
+
*/
|
|
71
|
+
verifiedPurchaseLabel?: React.ReactNode;
|
|
68
72
|
/**
|
|
69
73
|
* Write review button text
|
|
70
74
|
*/
|
|
@@ -125,6 +129,10 @@ interface TestimonialsImagesHelpfulProps {
|
|
|
125
129
|
* OptixFlow image optimization configuration
|
|
126
130
|
*/
|
|
127
131
|
optixFlowConfig?: OptixFlowConfig;
|
|
132
|
+
/**
|
|
133
|
+
* Additional CSS classes for the container
|
|
134
|
+
*/
|
|
135
|
+
containerClassName?: string;
|
|
128
136
|
}
|
|
129
137
|
/**
|
|
130
138
|
* TestimonialsImagesHelpful - An enhanced customer reviews section featuring image attachments,
|
|
@@ -156,6 +164,6 @@ interface TestimonialsImagesHelpfulProps {
|
|
|
156
164
|
* />
|
|
157
165
|
* ```
|
|
158
166
|
*/
|
|
159
|
-
declare function TestimonialsImagesHelpful({ reviews, reviewsSlot, heading, writeReviewLabel, reportButtonLabel, className, headerClassName, headingClassName, reviewClassName, contentClassName, authorClassName, imagesClassName, onWriteReview, background, spacing, pattern, patternOpacity, optixFlowConfig, }: TestimonialsImagesHelpfulProps): React.JSX.Element;
|
|
167
|
+
declare function TestimonialsImagesHelpful({ reviews, reviewsSlot, heading, verifiedPurchaseLabel, writeReviewLabel, reportButtonLabel, className, headerClassName, headingClassName, reviewClassName, contentClassName, authorClassName, imagesClassName, onWriteReview, background, spacing, containerClassName, pattern, patternOpacity, optixFlowConfig, }: TestimonialsImagesHelpfulProps): React.JSX.Element;
|
|
160
168
|
|
|
161
169
|
export { type ReviewWithImages, TestimonialsImagesHelpful, type TestimonialsImagesHelpfulProps };
|
|
@@ -65,6 +65,10 @@ interface TestimonialsImagesHelpfulProps {
|
|
|
65
65
|
* Main heading content
|
|
66
66
|
*/
|
|
67
67
|
heading?: React.ReactNode;
|
|
68
|
+
/**
|
|
69
|
+
* Label for the verified purchase badge
|
|
70
|
+
*/
|
|
71
|
+
verifiedPurchaseLabel?: React.ReactNode;
|
|
68
72
|
/**
|
|
69
73
|
* Write review button text
|
|
70
74
|
*/
|
|
@@ -125,6 +129,10 @@ interface TestimonialsImagesHelpfulProps {
|
|
|
125
129
|
* OptixFlow image optimization configuration
|
|
126
130
|
*/
|
|
127
131
|
optixFlowConfig?: OptixFlowConfig;
|
|
132
|
+
/**
|
|
133
|
+
* Additional CSS classes for the container
|
|
134
|
+
*/
|
|
135
|
+
containerClassName?: string;
|
|
128
136
|
}
|
|
129
137
|
/**
|
|
130
138
|
* TestimonialsImagesHelpful - An enhanced customer reviews section featuring image attachments,
|
|
@@ -156,6 +164,6 @@ interface TestimonialsImagesHelpfulProps {
|
|
|
156
164
|
* />
|
|
157
165
|
* ```
|
|
158
166
|
*/
|
|
159
|
-
declare function TestimonialsImagesHelpful({ reviews, reviewsSlot, heading, writeReviewLabel, reportButtonLabel, className, headerClassName, headingClassName, reviewClassName, contentClassName, authorClassName, imagesClassName, onWriteReview, background, spacing, pattern, patternOpacity, optixFlowConfig, }: TestimonialsImagesHelpfulProps): React.JSX.Element;
|
|
167
|
+
declare function TestimonialsImagesHelpful({ reviews, reviewsSlot, heading, verifiedPurchaseLabel, writeReviewLabel, reportButtonLabel, className, headerClassName, headingClassName, reviewClassName, contentClassName, authorClassName, imagesClassName, onWriteReview, background, spacing, containerClassName, pattern, patternOpacity, optixFlowConfig, }: TestimonialsImagesHelpfulProps): React.JSX.Element;
|
|
160
168
|
|
|
161
169
|
export { type ReviewWithImages, TestimonialsImagesHelpful, type TestimonialsImagesHelpfulProps };
|