@stackshift-ui/testimonial 6.0.4-beta.8 → 6.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-2P5MVWOK.mjs +112 -0
- package/dist/chunk-5EJLFZJU.mjs +104 -0
- package/dist/chunk-C7NFFKD2.mjs +136 -0
- package/dist/{chunk-R7JVL2KU.mjs → chunk-O6FZEW2X.mjs} +1 -1
- package/dist/chunk-OSCUIEZF.mjs +1 -0
- package/dist/chunk-Q6JSMTJP.mjs +39 -0
- package/dist/chunk-QIPOFBUY.mjs +1 -0
- package/dist/chunk-RO3QLJ5Y.mjs +92 -0
- package/dist/chunk-SWKKWYIR.mjs +104 -0
- package/dist/chunk-YP2O5PS7.mjs +39 -0
- package/dist/index.js +504 -1
- package/dist/index.mjs +23 -1
- package/dist/testimonial.js +494 -1
- package/dist/testimonial.mjs +10 -1
- package/dist/testimonial_a.js +127 -1
- package/dist/testimonial_a.mjs +7 -1
- package/dist/testimonial_b.js +137 -1
- package/dist/testimonial_b.mjs +7 -1
- package/dist/testimonial_c.js +139 -1
- package/dist/testimonial_c.mjs +7 -1
- package/dist/testimonial_d.js +171 -1
- package/dist/testimonial_d.mjs +7 -1
- package/dist/types.js +18 -1
- package/package.json +5 -5
- package/src/testimonial_b.tsx +3 -3
- package/src/testimonial_c.tsx +3 -3
- package/dist/chunk-EELHY35O.mjs +0 -1
- package/dist/chunk-IJY6DEIQ.mjs +0 -1
package/dist/testimonial_a.js
CHANGED
|
@@ -1 +1,127 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/testimonial_a.tsx
|
|
31
|
+
var testimonial_a_exports = {};
|
|
32
|
+
__export(testimonial_a_exports, {
|
|
33
|
+
Testimonial_A: () => Testimonial_A,
|
|
34
|
+
default: () => Testimonial_A
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(testimonial_a_exports);
|
|
37
|
+
var import_card = require("@stackshift-ui/card");
|
|
38
|
+
var import_container = require("@stackshift-ui/container");
|
|
39
|
+
var import_flex = require("@stackshift-ui/flex");
|
|
40
|
+
var import_heading = require("@stackshift-ui/heading");
|
|
41
|
+
var import_image = require("@stackshift-ui/image");
|
|
42
|
+
var import_section = require("@stackshift-ui/section");
|
|
43
|
+
var import_swiper_pagination = require("@stackshift-ui/swiper-pagination");
|
|
44
|
+
var import_text = require("@stackshift-ui/text");
|
|
45
|
+
var import_react = __toESM(require("react"));
|
|
46
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
47
|
+
function Testimonial_A({ testimonials }) {
|
|
48
|
+
const [testimony, setTestimony] = import_react.default.useState(0);
|
|
49
|
+
const slider = (index) => {
|
|
50
|
+
setTestimony(index);
|
|
51
|
+
};
|
|
52
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_section.Section, { className: "py-20 bg-background", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_container.Container, { maxWidth: 1280, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_card.Card, { className: "py-10", borderRadius: "md", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_flex.Flex, { wrap: true, align: "center", justify: "center", className: "max-w-5xl p-4", children: [
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AvatarSection, { testimonials, testimony }),
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TestimonyContent, { testimonials, testimony, slider })
|
|
55
|
+
] }) }) }) });
|
|
56
|
+
}
|
|
57
|
+
function AvatarSection({
|
|
58
|
+
testimonials,
|
|
59
|
+
testimony
|
|
60
|
+
}) {
|
|
61
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
62
|
+
if (!(testimonials == null ? void 0 : testimonials[testimony])) return null;
|
|
63
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "w-full mb-6 text-center lg:w-1/3", children: [
|
|
64
|
+
((_b = (_a = testimonials == null ? void 0 : testimonials[testimony]) == null ? void 0 : _a.mainImage) == null ? void 0 : _b.image) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
65
|
+
import_image.Image,
|
|
66
|
+
{
|
|
67
|
+
width: 128,
|
|
68
|
+
height: 128,
|
|
69
|
+
className: "mx-auto border-0 w-[128px] h-[128px] object-cover rounded-full",
|
|
70
|
+
src: `${(_d = (_c = testimonials == null ? void 0 : testimonials[testimony]) == null ? void 0 : _c.mainImage) == null ? void 0 : _d.image}`,
|
|
71
|
+
alt: (_h = (_f = (_e = testimonials == null ? void 0 : testimonials[testimony]) == null ? void 0 : _e.mainImage) == null ? void 0 : _f.alt) != null ? _h : `testimonial-source-${(_g = testimonials == null ? void 0 : testimonials[testimony]) == null ? void 0 : _g.name}-profile-image`
|
|
72
|
+
}
|
|
73
|
+
) : null,
|
|
74
|
+
((_i = testimonials == null ? void 0 : testimonials[testimony]) == null ? void 0 : _i.name) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.Text, { className: "text-xl", children: (_j = testimonials == null ? void 0 : testimonials[testimony]) == null ? void 0 : _j.name }) : null,
|
|
75
|
+
((_k = testimonials == null ? void 0 : testimonials[testimony]) == null ? void 0 : _k.jobTitle) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.Text, { className: "text-primary", children: (_l = testimonials == null ? void 0 : testimonials[testimony]) == null ? void 0 : _l.jobTitle }) : null
|
|
76
|
+
] });
|
|
77
|
+
}
|
|
78
|
+
function TestimonyContent({
|
|
79
|
+
testimonials,
|
|
80
|
+
testimony,
|
|
81
|
+
slider
|
|
82
|
+
}) {
|
|
83
|
+
var _a;
|
|
84
|
+
if (!(testimonials == null ? void 0 : testimonials[testimony])) return null;
|
|
85
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "w-full lg:w-2/3", children: [
|
|
86
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
87
|
+
"svg",
|
|
88
|
+
{
|
|
89
|
+
className: "w-10 h-10 mb-4 text-primary",
|
|
90
|
+
viewBox: "0 0 32 28",
|
|
91
|
+
fill: "none",
|
|
92
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
95
|
+
"path",
|
|
96
|
+
{
|
|
97
|
+
d: "M10.2418 12.749C9.45369 12.522 8.66554 12.4069 7.89887 12.4069C6.71496 12.4069 5.72709 12.6775 4.96109 13.0088C5.69957 10.3053 7.47358 5.6405 11.0075 5.11517C11.3348 5.0665 11.603 4.82986 11.6923 4.51131L12.4646 1.74875C12.5298 1.51512 12.4912 1.26505 12.3579 1.06231C12.2246 0.859563 12.0105 0.724288 11.7705 0.691393C11.5097 0.655812 11.2438 0.637686 10.9803 0.637686C6.73846 0.637686 2.53756 5.06516 0.764895 11.4046C-0.275679 15.1238 -0.580802 20.7154 1.98237 24.2349C3.41668 26.2043 5.50924 27.2559 8.20198 27.361C8.21305 27.3613 8.2238 27.3616 8.23487 27.3616C11.5573 27.3616 14.5035 25.1241 15.3997 21.9208C15.9351 20.0058 15.6931 17.9975 14.7176 16.2644C13.7526 14.5508 12.1632 13.3018 10.2418 12.749Z",
|
|
98
|
+
fill: "currentColor"
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
102
|
+
"path",
|
|
103
|
+
{
|
|
104
|
+
d: "M31.0396 16.2648C30.0746 14.5508 28.4852 13.3018 26.5638 12.749C25.7757 12.522 24.9875 12.4069 24.2212 12.4069C23.0373 12.4069 22.0491 12.6775 21.2831 13.0088C22.0215 10.3053 23.7955 5.6405 27.3298 5.11517C27.6571 5.0665 27.9249 4.82986 28.0146 4.51131L28.7869 1.74875C28.8521 1.51512 28.8135 1.26505 28.6802 1.06231C28.5473 0.859563 28.3331 0.724288 28.0928 0.691393C27.8323 0.655812 27.5664 0.637686 27.3026 0.637686C23.0608 0.637686 18.8599 5.06516 17.0869 11.4046C16.0466 15.1238 15.7415 20.7154 18.305 24.2356C19.739 26.2046 21.8319 27.2566 24.5243 27.3613C24.5354 27.3616 24.5461 27.362 24.5575 27.362C27.8796 27.362 30.8261 25.1244 31.7224 21.9211C32.2571 20.0061 32.0147 17.9975 31.0396 16.2648Z",
|
|
105
|
+
fill: "currentColor"
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
),
|
|
111
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_heading.Heading, { children: (_a = testimonials == null ? void 0 : testimonials[testimony]) == null ? void 0 : _a.testimony }),
|
|
112
|
+
(testimonials == null ? void 0 : testimonials.length) > 1 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, { children: testimonials.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
113
|
+
import_swiper_pagination.SwiperPagination,
|
|
114
|
+
{
|
|
115
|
+
colorScheme: "blue",
|
|
116
|
+
isActive: index === testimony,
|
|
117
|
+
ariaLabel: `Show Testimonial ${index}`,
|
|
118
|
+
onClick: () => slider(index)
|
|
119
|
+
},
|
|
120
|
+
index
|
|
121
|
+
)) }) : null
|
|
122
|
+
] });
|
|
123
|
+
}
|
|
124
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
125
|
+
0 && (module.exports = {
|
|
126
|
+
Testimonial_A
|
|
127
|
+
});
|
package/dist/testimonial_a.mjs
CHANGED
package/dist/testimonial_b.js
CHANGED
|
@@ -1 +1,137 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/testimonial_b.tsx
|
|
21
|
+
var testimonial_b_exports = {};
|
|
22
|
+
__export(testimonial_b_exports, {
|
|
23
|
+
Testimonial_B: () => Testimonial_B,
|
|
24
|
+
default: () => Testimonial_B
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(testimonial_b_exports);
|
|
27
|
+
var import_card = require("@stackshift-ui/card");
|
|
28
|
+
var import_container = require("@stackshift-ui/container");
|
|
29
|
+
var import_flex = require("@stackshift-ui/flex");
|
|
30
|
+
var import_heading = require("@stackshift-ui/heading");
|
|
31
|
+
var import_section = require("@stackshift-ui/section");
|
|
32
|
+
var import_swiper_button = require("@stackshift-ui/swiper-button");
|
|
33
|
+
var import_text = require("@stackshift-ui/text");
|
|
34
|
+
var import_react = require("react");
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
function Testimonial_B({ caption, title, testimonials }) {
|
|
37
|
+
const [testimony, setTestimony] = (0, import_react.useState)(testimonials);
|
|
38
|
+
const slider = (action) => {
|
|
39
|
+
setTestimony((prevState) => {
|
|
40
|
+
const currentState = prevState || [];
|
|
41
|
+
if (action === "next") {
|
|
42
|
+
const firstItem = currentState.length > 0 ? currentState.shift() : void 0;
|
|
43
|
+
return firstItem ? [...currentState, firstItem] : currentState;
|
|
44
|
+
} else if (action === "prev") {
|
|
45
|
+
const lastItem = currentState.length > 0 ? currentState.pop() : void 0;
|
|
46
|
+
return lastItem ? [lastItem, ...currentState] : currentState;
|
|
47
|
+
}
|
|
48
|
+
return currentState;
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_section.Section, { className: "py-20 overflow-hidden bg-background", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_container.Container, { maxWidth: 1280, children: [
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_flex.Flex, { wrap: true, align: "center", justify: "center", className: "pt-8 pb-16", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SwiperControl, { testimony, slider, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TestimonialHeader, { caption, title }) }) }),
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TestimonialList, { testimonials: testimony })
|
|
54
|
+
] }) });
|
|
55
|
+
}
|
|
56
|
+
function TestimonialHeader({ caption, title }) {
|
|
57
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_container.Container, { maxWidth: 576, className: "mb-10 text-center ", children: [
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.Text, { weight: "bold", className: "text-secondary", children: caption }),
|
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_heading.Heading, { fontSize: "3xl", className: "mt-4", children: title })
|
|
60
|
+
] });
|
|
61
|
+
}
|
|
62
|
+
function SwiperControl({
|
|
63
|
+
testimony,
|
|
64
|
+
slider,
|
|
65
|
+
children
|
|
66
|
+
}) {
|
|
67
|
+
if (!testimony) return null;
|
|
68
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between w-full", children: [
|
|
69
|
+
(testimony == null ? void 0 : testimony.length) >= 4 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
70
|
+
import_swiper_button.SwiperButton,
|
|
71
|
+
{
|
|
72
|
+
type: "left",
|
|
73
|
+
className: "p-4 bg-white",
|
|
74
|
+
onClick: () => slider("prev"),
|
|
75
|
+
ariaLabel: "Show previous testimonial"
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex-1 text-center", children }),
|
|
79
|
+
(testimony == null ? void 0 : testimony.length) >= 4 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
80
|
+
import_swiper_button.SwiperButton,
|
|
81
|
+
{
|
|
82
|
+
type: "right",
|
|
83
|
+
className: "p-4 bg-white",
|
|
84
|
+
onClick: () => slider("next"),
|
|
85
|
+
ariaLabel: "Show next testimonial"
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
] });
|
|
89
|
+
}
|
|
90
|
+
function TestimonialList({ testimonials }) {
|
|
91
|
+
if (!testimonials) return null;
|
|
92
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative w-full", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_flex.Flex, { wrap: true, justify: "center", className: "!items-stretch mx-auto", children: testimonials.slice(0, 3).map((testimonial, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TestimonialItem, { ...testimonial }, index)) }) });
|
|
93
|
+
}
|
|
94
|
+
function TestimonialItem({
|
|
95
|
+
testimony,
|
|
96
|
+
name,
|
|
97
|
+
jobTitle
|
|
98
|
+
}) {
|
|
99
|
+
if (!testimony) return null;
|
|
100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex-1 mb-4 px-3 w-full lg:w-1/3", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_card.Card, { className: "p-5 h-full", borderRadius: "md", children: [
|
|
101
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(QuoteIcon, {}),
|
|
102
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.Text, { className: "mb-4 leading-loose", muted: true, children: testimony }),
|
|
103
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.Text, { weight: "bold", children: name }),
|
|
104
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.Text, { muted: true, children: jobTitle })
|
|
105
|
+
] }) });
|
|
106
|
+
}
|
|
107
|
+
function QuoteIcon() {
|
|
108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
109
|
+
"svg",
|
|
110
|
+
{
|
|
111
|
+
className: "w-8 h-8 mb-6 text-primary",
|
|
112
|
+
viewBox: "0 0 32 28",
|
|
113
|
+
fill: "none",
|
|
114
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
115
|
+
children: [
|
|
116
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
117
|
+
"path",
|
|
118
|
+
{
|
|
119
|
+
d: "M10.2418 12.749C9.45369 12.522 8.66554 12.4069 7.89887 12.4069C6.71496 12.4069 5.72709 12.6775 4.96109 13.0088C5.69957 10.3053 7.47358 5.6405 11.0075 5.11517C11.3348 5.0665 11.603 4.82986 11.6923 4.51131L12.4646 1.74875C12.5298 1.51512 12.4912 1.26505 12.3579 1.06231C12.2246 0.859563 12.0105 0.724288 11.7705 0.691393C11.5097 0.655812 11.2438 0.637686 10.9803 0.637686C6.73846 0.637686 2.53756 5.06516 0.764895 11.4046C-0.275679 15.1238 -0.580802 20.7154 1.98237 24.2349C3.41668 26.2043 5.50924 27.2559 8.20198 27.361C8.21305 27.3613 8.2238 27.3616 8.23487 27.3616C11.5573 27.3616 14.5035 25.1241 15.3997 21.9208C15.9351 20.0058 15.6931 17.9975 14.7176 16.2644C13.7526 14.5508 12.1632 13.3018 10.2418 12.749Z",
|
|
120
|
+
fill: "currentColor"
|
|
121
|
+
}
|
|
122
|
+
),
|
|
123
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
124
|
+
"path",
|
|
125
|
+
{
|
|
126
|
+
d: "M31.0396 16.2648C30.0746 14.5508 28.4852 13.3018 26.5638 12.749C25.7757 12.522 24.9875 12.4069 24.2212 12.4069C23.0373 12.4069 22.0491 12.6775 21.2831 13.0088C22.0215 10.3053 23.7955 5.6405 27.3298 5.11517C27.6571 5.0665 27.9249 4.82986 28.0146 4.51131L28.7869 1.74875C28.8521 1.51512 28.8135 1.26505 28.6802 1.06231C28.5473 0.859563 28.3331 0.724288 28.0928 0.691393C27.8323 0.655812 27.5664 0.637686 27.3026 0.637686C23.0608 0.637686 18.8599 5.06516 17.0869 11.4046C16.0466 15.1238 15.7415 20.7154 18.305 24.2356C19.739 26.2046 21.8319 27.2566 24.5243 27.3613C24.5354 27.3616 24.5461 27.362 24.5575 27.362C27.8796 27.362 30.8261 25.1244 31.7224 21.9211C32.2571 20.0061 32.0147 17.9975 31.0396 16.2648Z",
|
|
127
|
+
fill: "currentColor"
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
135
|
+
0 && (module.exports = {
|
|
136
|
+
Testimonial_B
|
|
137
|
+
});
|
package/dist/testimonial_b.mjs
CHANGED
package/dist/testimonial_c.js
CHANGED
|
@@ -1 +1,139 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/testimonial_c.tsx
|
|
31
|
+
var testimonial_c_exports = {};
|
|
32
|
+
__export(testimonial_c_exports, {
|
|
33
|
+
Testimonial_C: () => Testimonial_C,
|
|
34
|
+
default: () => Testimonial_C
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(testimonial_c_exports);
|
|
37
|
+
var import_card = require("@stackshift-ui/card");
|
|
38
|
+
var import_container = require("@stackshift-ui/container");
|
|
39
|
+
var import_flex = require("@stackshift-ui/flex");
|
|
40
|
+
var import_heading = require("@stackshift-ui/heading");
|
|
41
|
+
var import_image = require("@stackshift-ui/image");
|
|
42
|
+
var import_section = require("@stackshift-ui/section");
|
|
43
|
+
var import_swiper_button = require("@stackshift-ui/swiper-button");
|
|
44
|
+
var import_text = require("@stackshift-ui/text");
|
|
45
|
+
var import_react = __toESM(require("react"));
|
|
46
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
47
|
+
function Testimonial_C({ caption, title, testimonials }) {
|
|
48
|
+
const [testimony, setTestimony] = import_react.default.useState(testimonials);
|
|
49
|
+
const slider = (action) => {
|
|
50
|
+
setTestimony((prevState) => {
|
|
51
|
+
if (!prevState || prevState.length === 0) return prevState;
|
|
52
|
+
const updatedTestimony = [...prevState];
|
|
53
|
+
if (action === "next") {
|
|
54
|
+
const firstItem = updatedTestimony.shift();
|
|
55
|
+
if (firstItem) updatedTestimony.push(firstItem);
|
|
56
|
+
} else if (action === "prev") {
|
|
57
|
+
const lastItem = updatedTestimony.pop();
|
|
58
|
+
if (lastItem) updatedTestimony.unshift(lastItem);
|
|
59
|
+
}
|
|
60
|
+
return updatedTestimony;
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_section.Section, { className: "py-10 overflow-hidden bg-background lg:py-20", children: [
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_container.Container, { className: "pb-6 lg:pb-16", maxWidth: 1280, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
65
|
+
import_flex.Flex,
|
|
66
|
+
{
|
|
67
|
+
wrap: true,
|
|
68
|
+
align: "center",
|
|
69
|
+
justify: "center",
|
|
70
|
+
className: "text-center lg:justify-between lg:text-left",
|
|
71
|
+
children: [
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TestimonialHeader, { caption, title }),
|
|
73
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TestimonialSwiper, { testimony, slider })
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
) }),
|
|
77
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TestimonialList, { testimony })
|
|
78
|
+
] });
|
|
79
|
+
}
|
|
80
|
+
function TestimonialHeader({ caption, title }) {
|
|
81
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "w-full mb-4 lg:mb-0 lg:w-4/5", children: [
|
|
82
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.Text, { weight: "bold", className: "text-secondary", children: caption }),
|
|
83
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_heading.Heading, { fontSize: "3xl", children: title })
|
|
84
|
+
] });
|
|
85
|
+
}
|
|
86
|
+
function TestimonialSwiper({
|
|
87
|
+
testimony,
|
|
88
|
+
slider
|
|
89
|
+
}) {
|
|
90
|
+
if (!testimony) return null;
|
|
91
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "w-full lg:w-1/5", children: [
|
|
92
|
+
testimony && (testimony == null ? void 0 : testimony.length) >= 4 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
93
|
+
import_swiper_button.SwiperButton,
|
|
94
|
+
{
|
|
95
|
+
type: "left",
|
|
96
|
+
className: "order-last p-5 mr-4 bg-white lg:order-first",
|
|
97
|
+
onClick: () => slider("prev"),
|
|
98
|
+
ariaLabel: "Show previous testimonial"
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
testimony && (testimony == null ? void 0 : testimony.length) >= 4 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
102
|
+
import_swiper_button.SwiperButton,
|
|
103
|
+
{
|
|
104
|
+
type: "right",
|
|
105
|
+
className: "order-last p-5 bg-white",
|
|
106
|
+
onClick: () => slider("next"),
|
|
107
|
+
ariaLabel: "Show next testimonial"
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
] });
|
|
111
|
+
}
|
|
112
|
+
function TestimonialList({ testimony }) {
|
|
113
|
+
var _a;
|
|
114
|
+
if (!testimony) return null;
|
|
115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_flex.Flex, { className: "relative", children: testimony && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_flex.Flex, { wrap: true, className: "!items-stretch max-w-6xl px-2 mx-auto", children: (_a = testimony == null ? void 0 : testimony.slice(0, 3)) == null ? void 0 : _a.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TestimonialItem, { item, index }, item == null ? void 0 : item._key)) }) });
|
|
116
|
+
}
|
|
117
|
+
function TestimonialItem({ item, index }) {
|
|
118
|
+
var _a, _b, _c, _d;
|
|
119
|
+
if (!item) return null;
|
|
120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex-1 w-full px-3 mb-4 lg:w-1/3", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_card.Card, { className: "p-8 text-center h-full items-center", borderRadius: "md", children: [
|
|
121
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.Text, { className: "mb-8 leading-loose", muted: true, children: item == null ? void 0 : item.testimony }),
|
|
122
|
+
((_a = item == null ? void 0 : item.mainImage) == null ? void 0 : _a.image) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-[48px] h-[48px] mx-auto border-0", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
123
|
+
import_image.Image,
|
|
124
|
+
{
|
|
125
|
+
className: "w-full h-full object-cover rounded-full",
|
|
126
|
+
width: 48,
|
|
127
|
+
height: 48,
|
|
128
|
+
src: `${(_b = item == null ? void 0 : item.mainImage) == null ? void 0 : _b.image}`,
|
|
129
|
+
alt: (_d = (_c = item == null ? void 0 : item.mainImage) == null ? void 0 : _c.alt) != null ? _d : `testimonial-source-${item == null ? void 0 : item.name}-profile-image`
|
|
130
|
+
}
|
|
131
|
+
) }),
|
|
132
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.Text, { className: "mb-1", fontSize: "2xl", weight: "bold", children: item == null ? void 0 : item.name }),
|
|
133
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.Text, { muted: true, children: item == null ? void 0 : item.jobTitle })
|
|
134
|
+
] }) }, index);
|
|
135
|
+
}
|
|
136
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
137
|
+
0 && (module.exports = {
|
|
138
|
+
Testimonial_C
|
|
139
|
+
});
|