@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
|
@@ -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';
|
|
@@ -76,6 +77,18 @@ interface TestimonialsMasonryGridProps {
|
|
|
76
77
|
* Additional CSS classes for the container
|
|
77
78
|
*/
|
|
78
79
|
containerClassName?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Array of action configurations for CTA buttons
|
|
82
|
+
*/
|
|
83
|
+
actions?: ActionConfig[];
|
|
84
|
+
/**
|
|
85
|
+
* Custom slot for rendering actions (overrides actions array)
|
|
86
|
+
*/
|
|
87
|
+
actionsSlot?: React.ReactNode;
|
|
88
|
+
/**
|
|
89
|
+
* Additional CSS classes for the actions container
|
|
90
|
+
*/
|
|
91
|
+
actionsClassName?: string;
|
|
79
92
|
}
|
|
80
93
|
/**
|
|
81
94
|
* TestimonialsMasonryGrid - A masonry-style grid layout for testimonials with varying
|
|
@@ -102,6 +115,6 @@ interface TestimonialsMasonryGridProps {
|
|
|
102
115
|
* />
|
|
103
116
|
* ```
|
|
104
117
|
*/
|
|
105
|
-
declare function TestimonialsMasonryGrid({ testimonials, testimonialsSlot, heading, description, className, headerClassName, headingClassName, descriptionClassName, gridClassName, cardClassName, quoteClassName, authorClassName, background, containerClassName, spacing, pattern, patternOpacity, }: TestimonialsMasonryGridProps): React.JSX.Element;
|
|
118
|
+
declare function TestimonialsMasonryGrid({ testimonials, testimonialsSlot, heading, description, className, headerClassName, headingClassName, descriptionClassName, gridClassName, cardClassName, quoteClassName, authorClassName, background, containerClassName, spacing, pattern, patternOpacity, actions, actionsSlot, actionsClassName, }: TestimonialsMasonryGridProps): React.JSX.Element;
|
|
106
119
|
|
|
107
120
|
export { TestimonialsMasonryGrid, type TestimonialsMasonryGridProps };
|
|
@@ -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-masonry-grid.tsx
|
|
@@ -850,6 +850,70 @@ var Pressable = React3.forwardRef(
|
|
|
850
850
|
}
|
|
851
851
|
);
|
|
852
852
|
Pressable.displayName = "Pressable";
|
|
853
|
+
var MOBILE_CLASSES = {
|
|
854
|
+
"fit-left": "items-start md:items-center",
|
|
855
|
+
"fit-center": "items-center",
|
|
856
|
+
"fit-right": "items-end md:items-center",
|
|
857
|
+
"full-left": "items-stretch md:items-center",
|
|
858
|
+
"full-center": "items-stretch md:items-center",
|
|
859
|
+
"full-right": "items-stretch md:items-center"
|
|
860
|
+
};
|
|
861
|
+
function BlockActions({
|
|
862
|
+
mobileConfig,
|
|
863
|
+
actionsClassName,
|
|
864
|
+
verticalSpacing = "mt-4 md:mt-8",
|
|
865
|
+
actions,
|
|
866
|
+
actionsSlot
|
|
867
|
+
}) {
|
|
868
|
+
const width = mobileConfig?.width ?? "full";
|
|
869
|
+
const position = mobileConfig?.position ?? "center";
|
|
870
|
+
const mobileLayoutClass = MOBILE_CLASSES[`${width}-${position}`];
|
|
871
|
+
if (actionsSlot) {
|
|
872
|
+
return /* @__PURE__ */ jsx("div", { children: actionsSlot });
|
|
873
|
+
} else if (actions && actions?.length > 0) {
|
|
874
|
+
return /* @__PURE__ */ jsx(
|
|
875
|
+
"div",
|
|
876
|
+
{
|
|
877
|
+
className: cn(
|
|
878
|
+
"flex flex-col md:flex-row flex-wrap gap-4",
|
|
879
|
+
mobileLayoutClass,
|
|
880
|
+
actionsClassName,
|
|
881
|
+
verticalSpacing
|
|
882
|
+
),
|
|
883
|
+
children: actions.map((action, index) => /* @__PURE__ */ jsx(ActionComponent, { action }, index))
|
|
884
|
+
}
|
|
885
|
+
);
|
|
886
|
+
} else {
|
|
887
|
+
return null;
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
function ActionComponent({ action }) {
|
|
891
|
+
const {
|
|
892
|
+
label,
|
|
893
|
+
icon,
|
|
894
|
+
iconAfter,
|
|
895
|
+
children,
|
|
896
|
+
href,
|
|
897
|
+
onClick,
|
|
898
|
+
className: actionClassName,
|
|
899
|
+
...pressableProps
|
|
900
|
+
} = action;
|
|
901
|
+
return /* @__PURE__ */ jsx(
|
|
902
|
+
Pressable,
|
|
903
|
+
{
|
|
904
|
+
href,
|
|
905
|
+
onClick,
|
|
906
|
+
asButton: action.asButton ?? true,
|
|
907
|
+
className: actionClassName,
|
|
908
|
+
...pressableProps,
|
|
909
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
910
|
+
icon,
|
|
911
|
+
label,
|
|
912
|
+
iconAfter
|
|
913
|
+
] })
|
|
914
|
+
}
|
|
915
|
+
);
|
|
916
|
+
}
|
|
853
917
|
function TestimonialsMasonryGrid({
|
|
854
918
|
testimonials,
|
|
855
919
|
testimonialsSlot,
|
|
@@ -865,9 +929,12 @@ function TestimonialsMasonryGrid({
|
|
|
865
929
|
authorClassName,
|
|
866
930
|
background,
|
|
867
931
|
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
868
|
-
spacing = "
|
|
932
|
+
spacing = "lg",
|
|
869
933
|
pattern,
|
|
870
|
-
patternOpacity
|
|
934
|
+
patternOpacity,
|
|
935
|
+
actions,
|
|
936
|
+
actionsSlot,
|
|
937
|
+
actionsClassName
|
|
871
938
|
}) {
|
|
872
939
|
const columns = testimonials ? [
|
|
873
940
|
testimonials.filter((_, i) => i % 3 === 0),
|
|
@@ -908,29 +975,29 @@ function TestimonialsMasonryGrid({
|
|
|
908
975
|
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border shadow-sm"
|
|
909
976
|
),
|
|
910
977
|
children: /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col justify-between p-6 gap-8", children: [
|
|
911
|
-
testimonial.quote && (typeof testimonial.quote === "string" ? /* @__PURE__ */ jsxs("blockquote", { className: "text-
|
|
978
|
+
testimonial.quote && (typeof testimonial.quote === "string" ? /* @__PURE__ */ jsxs("blockquote", { className: "text-lg leading-relaxed line-clamp-6 md:line-clamp-3 font-thin", children: [
|
|
912
979
|
"\u201C",
|
|
913
980
|
testimonial.quote,
|
|
914
981
|
"\u201D"
|
|
915
|
-
] }) :
|
|
916
|
-
/* @__PURE__ */ jsxs("div", { className: "mt-4 flex items-center gap-
|
|
917
|
-
/* @__PURE__ */ jsxs(Avatar, { className: "relative flex shrink-0 overflow-hidden rounded-full size-
|
|
982
|
+
] }) : testimonial.quote),
|
|
983
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-4 flex items-center gap-4", children: [
|
|
984
|
+
/* @__PURE__ */ jsxs(Avatar, { className: "relative flex shrink-0 overflow-hidden rounded-full size-14 ring-4 ring-primary shadow-lg", children: [
|
|
918
985
|
/* @__PURE__ */ jsx(AvatarImage, { src: avatarSrc, alt: authorName }),
|
|
919
986
|
/* @__PURE__ */ jsx(AvatarFallback, { className: "text-xs", children: getInitials(authorName) })
|
|
920
987
|
] }),
|
|
921
988
|
/* @__PURE__ */ jsxs("div", { className: "space-y-0 leading-tight", children: [
|
|
922
989
|
testimonial.author && (typeof testimonial.author === "string" ? /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: testimonial.author }) : testimonial.author),
|
|
923
|
-
testimonial.role && (typeof testimonial.role === "string" ? /* @__PURE__ */ jsx("p", { className: "text-
|
|
990
|
+
testimonial.role && (typeof testimonial.role === "string" ? /* @__PURE__ */ jsx("p", { className: "text-sm font-thin opacity-75", children: testimonial.role }) : testimonial.role),
|
|
924
991
|
testimonial.linkConfig?.href && /* @__PURE__ */ jsx(
|
|
925
992
|
Pressable,
|
|
926
993
|
{
|
|
927
994
|
href: testimonial.linkConfig.href,
|
|
928
995
|
className: cn(
|
|
929
|
-
"text-sm
|
|
930
|
-
"underline underline-offset-4",
|
|
996
|
+
"text-sm transition-all duration-500",
|
|
997
|
+
"hover:underline hover:underline-offset-4",
|
|
931
998
|
testimonial.linkConfig.className
|
|
932
999
|
),
|
|
933
|
-
children: testimonial.linkConfig.label
|
|
1000
|
+
children: testimonial.linkConfig.label || "Full Review"
|
|
934
1001
|
}
|
|
935
1002
|
)
|
|
936
1003
|
] })
|
|
@@ -992,7 +1059,16 @@ function TestimonialsMasonryGrid({
|
|
|
992
1059
|
]
|
|
993
1060
|
}
|
|
994
1061
|
),
|
|
995
|
-
renderedTestimonials
|
|
1062
|
+
renderedTestimonials,
|
|
1063
|
+
/* @__PURE__ */ jsx(
|
|
1064
|
+
BlockActions,
|
|
1065
|
+
{
|
|
1066
|
+
actions,
|
|
1067
|
+
actionsSlot,
|
|
1068
|
+
actionsClassName: cn("mt-8 md:mt-12 justify-center", actionsClassName),
|
|
1069
|
+
mobileConfig: { width: "full", position: "center" }
|
|
1070
|
+
}
|
|
1071
|
+
)
|
|
996
1072
|
]
|
|
997
1073
|
}
|
|
998
1074
|
);
|