@stackshift-ui/testimonial 6.0.2 → 6.0.3

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/src/types.ts ADDED
@@ -0,0 +1,412 @@
1
+ export type StyleVariants<T extends string> = Record<T, string>;
2
+
3
+ export type Socials = "facebook" | "instagram" | "youtube" | "linkedin" | "twitter";
4
+ export interface MainImage {
5
+ image?: string;
6
+ alt?: string;
7
+ }
8
+
9
+ export interface LabeledRoute extends ConditionalLink {
10
+ ariaLabel?: string;
11
+ label?: string;
12
+ linkTarget?: string;
13
+ linkType?: string;
14
+ _type?: string;
15
+ linkInternal?: any;
16
+ }
17
+ export interface ConditionalLink {
18
+ type?: string;
19
+ internalLink?: string | null;
20
+ externalLink?: string | null;
21
+ }
22
+
23
+ export interface StatItems {
24
+ label?: string;
25
+ mainImage?: MainImage;
26
+ value?: string;
27
+ _key?: string;
28
+ _type?: string;
29
+ }
30
+
31
+ export interface Logo extends ConditionalLink {
32
+ alt?: string;
33
+ linkTarget?: string;
34
+ image?: string;
35
+ }
36
+
37
+ export interface Images {
38
+ image?: string;
39
+ _key?: string;
40
+ _type?: string;
41
+ alt?: string;
42
+ }
43
+
44
+ export interface ContactDetails {
45
+ addressInfo?: string;
46
+ contactInfo?: string;
47
+ emailInfo?: string;
48
+ _key?: string;
49
+ }
50
+
51
+ export interface SocialLink {
52
+ socialMedia?: string | null;
53
+ socialMediaLink?: string | null;
54
+ _key?: string | null;
55
+ _type?: string | null;
56
+ socialMediaIcon?: {
57
+ alt?: string;
58
+ image?: string;
59
+ } | null;
60
+ socialMediaPlatform?: string | null;
61
+ }
62
+
63
+ export interface LabeledRouteWithKey extends LabeledRoute {
64
+ _key?: string;
65
+ }
66
+
67
+ export interface ArrayOfImageTitleAndText {
68
+ mainImage?: {
69
+ alt?: string;
70
+ image?: string;
71
+ };
72
+ plainText?: string;
73
+ title?: string;
74
+ _key?: string;
75
+ _type?: string;
76
+ }
77
+
78
+ export interface FeaturedItem {
79
+ description?: string;
80
+ mainImage?: MainImage;
81
+ title?: string;
82
+ subtitle?: string;
83
+ _key?: string;
84
+ _type?: string;
85
+ }
86
+
87
+ export interface ArrayOfTitleAndText {
88
+ _key?: string;
89
+ plainText?: string;
90
+ title?: string;
91
+ }
92
+
93
+ export interface BlogPost extends SanityBody {
94
+ authors?: Author[] | null;
95
+ body?: any;
96
+ categories?: Category[] | null;
97
+ excerpt?: string | null;
98
+ link?: string | null;
99
+ mainImage?: string | null;
100
+ publishedAt?: string;
101
+ seo?: Seo | null;
102
+ slug?: SanitySlug | null;
103
+ title?: string;
104
+ }
105
+
106
+ export interface Seo {
107
+ _type?: string;
108
+ seoTitle?: string;
109
+ seoDescription?: string;
110
+ seoImage?: string;
111
+ seoKeywords?: string;
112
+ seoSynonyms?: string;
113
+ }
114
+
115
+ export interface SanitySlug {
116
+ current?: string;
117
+ _type?: "slug";
118
+ }
119
+
120
+ export interface SanityBody {
121
+ _createdAt?: string;
122
+ _id?: string;
123
+ _rev?: string;
124
+ _type?: string;
125
+ _updatedAt?: string;
126
+ }
127
+
128
+ export interface Author extends SanityBody {
129
+ link?: string | null;
130
+ bio?: string | null;
131
+ name?: string | null;
132
+ slug?: SanitySlug | null;
133
+ image?: string | null;
134
+ profile?: {
135
+ alt: string;
136
+ image: string;
137
+ } | null;
138
+ }
139
+
140
+ export interface Category extends SanityBody {
141
+ title?: string;
142
+ }
143
+
144
+ export interface Form {
145
+ id?: string | null;
146
+ buttonLabel?: string | null;
147
+ name?: string | null;
148
+ subtitle?: string | null;
149
+ fields?: FormFields[] | null;
150
+ thankYouPage?: ThankYouPage | null;
151
+ }
152
+
153
+ export interface FormFields {
154
+ name?: string;
155
+ placeholder?: string;
156
+ pricingType?: string;
157
+ type?: FormTypes;
158
+ _key?: string;
159
+ _type?: string;
160
+ isRequired?: boolean;
161
+ label?: string;
162
+ items?: string[];
163
+ }
164
+
165
+ export type FormTypes =
166
+ | "inputText"
167
+ | "inputEmail"
168
+ | "inputPassword"
169
+ | "inputNumber"
170
+ | "textarea"
171
+ | "inputFile"
172
+ | "inputRadio"
173
+ | "inputCheckbox"
174
+ | "inputSelect";
175
+
176
+ export interface ThankYouPage {
177
+ externalLink?: string | null;
178
+ internalLink?: string | null;
179
+ linkInternal?: any;
180
+ linkTarget?: string;
181
+ linkType?: string;
182
+ type?: string;
183
+ }
184
+
185
+ //Used on different sections
186
+ export interface SectionsProps {
187
+ template?: Template;
188
+ data?: Sections;
189
+ variant?: string | null | undefined;
190
+ schema?: Variants;
191
+ }
192
+
193
+ export interface Sections extends SanityBody {
194
+ label?: string;
195
+ variant?: string;
196
+ variants?: Variants;
197
+ _key?: string;
198
+ }
199
+
200
+ //*EDIT THIS SECTION WHEN CREATING/UPDATING SCHEMAS ON STUDIO */
201
+ export interface Variants {
202
+ template?: Template;
203
+ multipleMenus?: any;
204
+ arrayOfTitleAndText?: ArrayOfTitleAndText[] | null;
205
+ logo?: Logo | null;
206
+ primaryButton?: LabeledRoute | null;
207
+ secondaryButton?: LabeledRoute | null;
208
+ routes?: LabeledRouteWithKey[] | null;
209
+ menu?: LabeledRouteWithKey[] | null;
210
+ plans?: Plans[] | null;
211
+ formLinks?: LabeledRouteWithKey[] | null;
212
+ portfolios?: Portfolios[] | null;
213
+ portfoliosWithCategories?: PortfoliosWithCategories[] | null;
214
+ length?: number;
215
+ signInLink?: LabeledRoute | null;
216
+ signinLink?: LabeledRoute | null;
217
+ tags?: string[] | null;
218
+ posts?: BlogPost[] | null;
219
+ blogsPerPage?: number | null;
220
+ form?: Form | null;
221
+ collections?: Collection | null;
222
+ products?: CollectionProduct | null;
223
+ allProducts?: Collection[];
224
+ subtitle?: string | null;
225
+ caption?: string | null;
226
+ title?: string | null;
227
+ plainText?: string | null;
228
+ contactDescription?: string | null;
229
+ officeInformation?: string | null;
230
+ contactEmail?: string | null;
231
+ contactNumber?: string | null;
232
+ socialLinks?: SocialLink[] | null;
233
+ block?: any;
234
+ heading?: string | null;
235
+ acceptButtonLabel?: string | null;
236
+ declineButtonLabel?: string | null;
237
+ faqsWithCategories?: FaqsWithCategory[] | null;
238
+ faqs?: AskedQuestion[] | null;
239
+ arrayOfImageTitleAndText?: ArrayOfImageTitleAndText[] | null;
240
+ description?: string | null;
241
+ featuredItems?: FeaturedItem[] | null;
242
+ images?: Images[] | null;
243
+ contactDetails?: ContactDetails[] | null;
244
+ copyright?: string | null;
245
+ mainImage?: MainImage | null;
246
+ youtubeLink?: string | null;
247
+ banner?: any;
248
+ stats?: StatItems[] | null;
249
+ teams?: Team[] | null;
250
+ testimonials?: Testimonial[] | null;
251
+ selectStripeAccount?: string;
252
+ annualBilling?: string;
253
+ monthlyBilling?: string;
254
+ productDetails?: ProductDetail[];
255
+ btnLabel?: string;
256
+ selectAccount?: string;
257
+ hashtags?: string[];
258
+ numberOfPosts?: number;
259
+ text?: string;
260
+ button?: LabeledRoute;
261
+ features?: string[];
262
+ config?: {
263
+ enableAnalytics: boolean;
264
+ cookiePolicy?: {
265
+ siteName: string;
266
+ cookiePolicyPage: Reference;
267
+ };
268
+ consentModalPosition?: string;
269
+ };
270
+ contactLink?: LabeledRoute;
271
+ }
272
+
273
+ export interface Template {
274
+ bg?: string;
275
+ color?: string;
276
+ }
277
+
278
+ export type Plans = {
279
+ _key?: string | null;
280
+ _type?: "planItems" | null;
281
+ checkoutButtonName?: string | null;
282
+ description?: string | null;
283
+ monthlyPrice?: string | null;
284
+ planType?: string | null;
285
+ yearlyPrice?: string | null;
286
+ planIncludes?: string[] | null;
287
+ primaryButton?: LabeledRoute | null;
288
+ } & Record<string, string>;
289
+
290
+ export interface Portfolios {
291
+ dateAdded?: string | null;
292
+ mainImage?: {
293
+ image?: string | null;
294
+ alt?: string | null;
295
+ } | null;
296
+ primaryButton?: LabeledRoute | null;
297
+ title?: string | null;
298
+ _key?: string | null;
299
+ _type?: string | null;
300
+ }
301
+
302
+ export interface PortfoliosWithCategories {
303
+ category?: string | null;
304
+ content?: Content[] | null;
305
+ primaryButton?: LabeledRoute | null;
306
+ _key?: string | null;
307
+ _type?: string | null;
308
+ }
309
+
310
+ export interface Content extends Portfolios {
311
+ description?: string | null;
312
+ subtitle?: string | null;
313
+ }
314
+
315
+ export interface Collection extends SanityBody {
316
+ collectionInfoVariant?: {
317
+ variant?: string;
318
+ } | null;
319
+ name?: string | null;
320
+ products?: CollectionProduct[] | null;
321
+ sections?: any; //todo
322
+ seo?: Seo | null;
323
+ slug?: SanitySlug | null;
324
+ }
325
+
326
+ export interface CollectionProduct extends SanityBody {
327
+ compareToPrice?: number | null;
328
+ description?: string | null;
329
+ ecwidProductId?: number | null;
330
+ name?: string | null;
331
+ price?: number | null;
332
+ productInfo?: ProductInfo | null;
333
+ productInfoVariant?: {
334
+ variant?: string;
335
+ } | null;
336
+ sections?: any; //todo
337
+ seo?: Seo | null;
338
+ slug?: SanitySlug | null;
339
+ }
340
+
341
+ //TODO, RECHECK PRODUCT INFO DATA FROM SANITY
342
+ interface ProductInfo {
343
+ btnLabel?: string | null;
344
+ images?: ProductInfoImage[] | null;
345
+ productDetails?: ProductDetail[] | null;
346
+ socialLinks?: SocialLink[] | null;
347
+ subtitle?: string | null;
348
+ }
349
+
350
+ //TODO, RECHECK PRODUCT INFO DATA FROM SANITY
351
+ export interface ProductDetail {
352
+ blockContent?: any;
353
+ contentType?: string;
354
+ tabName?: string;
355
+ _key?: string;
356
+ [key: string]: any;
357
+ }
358
+ interface ProductInfoImage {
359
+ alt?: string | null;
360
+ _key: string;
361
+ _type: string;
362
+ image?: string | null;
363
+ }
364
+
365
+ export interface FaqsWithCategory {
366
+ askedQuestions?: AskedQuestion[] | null;
367
+ category?: string | null;
368
+ _key?: string;
369
+ _type?: string;
370
+ }
371
+
372
+ export interface AskedQuestion {
373
+ answer?: string | null;
374
+ question?: string | null;
375
+ hidden?: boolean;
376
+ _key?: string;
377
+ _type?: string;
378
+ }
379
+
380
+ export interface Team {
381
+ jobTitle?: string;
382
+ mainImage?: MainImage;
383
+ name?: string;
384
+ plainText?: string;
385
+ _key?: string;
386
+ _type?: string;
387
+ }
388
+
389
+ export interface Testimonial {
390
+ jobTitle?: string;
391
+ mainImage?: MainImage;
392
+ name?: string;
393
+ rating?: string;
394
+ testimony?: string;
395
+ _key?: string;
396
+ _type?: string;
397
+ }
398
+
399
+ export declare interface Reference {
400
+ _type: string;
401
+ _ref: string;
402
+ _key?: string;
403
+ _weak?: boolean;
404
+ _strengthenOnPublish?: {
405
+ type: string;
406
+ weak?: boolean;
407
+ template?: {
408
+ id: string;
409
+ params: Record<string, string | number | boolean>;
410
+ };
411
+ };
412
+ }
@@ -1 +0,0 @@
1
- import{Avatar as m}from"@stackshift-ui/avatar";import{Card as N}from"@stackshift-ui/card";import{Container as h}from"@stackshift-ui/container";import{Flex as o}from"@stackshift-ui/flex";import{Heading as S}from"@stackshift-ui/heading";import{Section as n}from"@stackshift-ui/section";import{SwiperPagination as y}from"@stackshift-ui/swiper-pagination";import{Text as v}from"@stackshift-ui/text";import l from"react";import{jsx as c,jsxs as g}from"react/jsx-runtime";function A({testimonials:r}){let[C,u]=l.useState(0);return c(n,{className:"py-20 bg-background",children:c(h,{maxWidth:1280,children:c(N,{className:"py-10 ",children:g(o,{wrap:!0,align:"center",justify:"center",className:"max-w-5xl p-4",children:[c(F,{testimonials:r,testimony:C}),c(k,{testimonials:r,testimony:C,slider:f=>{u(f)}})]})})})})}function F({testimonials:r,testimony:C}){var u,p,f,e,a,d,x,T,b,w;return r!=null&&r[C]?g("div",{className:"w-full mb-6 text-center lg:w-1/3",children:[(u=r==null?void 0:r[C])!=null&&u.mainImage?c(m,{className:"border-0 mx-auto",size:128,alt:(a=(f=(p=r==null?void 0:r[C])==null?void 0:p.mainImage)==null?void 0:f.alt)!=null?a:`testimonial-source-${(e=r==null?void 0:r[C])==null?void 0:e.name}-profile-image`,src:`${(d=r==null?void 0:r[C])==null?void 0:d.mainImage}`}):null,(x=r==null?void 0:r[C])!=null&&x.name?c(v,{className:"text-xl text-gray-500",children:(T=r==null?void 0:r[C])==null?void 0:T.name}):null,(b=r==null?void 0:r[C])!=null&&b.jobTitle?c(v,{className:"text-primary",children:(w=r==null?void 0:r[C])==null?void 0:w.jobTitle}):null]}):null}function k({testimonials:r,testimony:C,slider:u}){var p;return r!=null&&r[C]?g("div",{className:"w-full lg:w-2/3",children:[g("svg",{className:"w-10 h-10 mb-4 text-primary",viewBox:"0 0 32 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("path",{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",fill:"currentColor"}),c("path",{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",fill:"currentColor"})]}),c(S,{children:(p=r==null?void 0:r[C])==null?void 0:p.testimony}),(r==null?void 0:r.length)>1?c(l.Fragment,{children:r.map((f,e)=>c(y,{colorScheme:"blue",isActive:e===C,ariaLabel:`Show Testimonial ${e}`,onClick:()=>u(e)},e))}):null]}):null}export{A as a};
@@ -1 +0,0 @@
1
- import{Card as k}from"@stackshift-ui/card";import{Container as I}from"@stackshift-ui/container";import{Flex as L}from"@stackshift-ui/flex";import{Image as j}from"@stackshift-ui/image";import{Section as B}from"@stackshift-ui/section";import{SwiperButton as p}from"@stackshift-ui/swiper-button";import{Text as C}from"@stackshift-ui/text";import M from"react";import{jsx as e,jsxs as g}from"react/jsx-runtime";function R({testimonials:r}){var h,n,u,o,w,t,b,m,v,N,y,S;let[c,f]=M.useState(0),a=d=>{!r||r.length<=1||f(d==="next"?l=>l!==r.length-1?l+1:0:l=>l>0?l-1:r.length-1)},T=d=>{let l=[];for(let x=0;x<d;x++)l.push(x);return l};return e(B,{className:"py-20 bg-background",children:e(I,{maxWidth:1280,children:g("div",{className:"items-center justify-center md:space-x-8 lg:flex",children:[g("div",{className:"mb-10 text-center lg:hidden",children:[r&&(r==null?void 0:r.length)>1&&e(p,{type:"left",className:"p-4 mr-6 bg-white lg:order-first lg:mr-0",onClick:()=>a("prev"),ariaLabel:"Show previous testimonial"}),r&&(r==null?void 0:r.length)>1&&e(p,{type:"right",className:"p-4 mr-6 bg-white lg:order-first lg:mr-0",onClick:()=>a("next"),ariaLabel:"Show next testimonial"})]}),r&&(r==null?void 0:r.length)>1&&e(p,{type:"left",className:"hidden p-4 mr-6 bg-white lg:block lg:order-first lg:mr-0",onClick:()=>a("prev"),ariaLabel:"Show previous testimonial"}),(r==null?void 0:r[c])&&g(k,{className:"flex flex-wrap w-full",children:[((h=r==null?void 0:r[c])==null?void 0:h.rating)&&g("div",{className:"w-full py-10 text-center border-r lg:w-1/3",children:[e("span",{className:"text-5xl font-bold lg:text-6xl",children:`${(n=r==null?void 0:r[c])==null?void 0:n.rating}.0`}),e(L,{align:"center",justify:"center",className:"mb-6 text-primary",children:((u=r==null?void 0:r[c])==null?void 0:u.rating)!==void 0&&T(Number((o=r==null?void 0:r[c])==null?void 0:o.rating)).map((d,l)=>e($,{},l))}),e("div",{className:"object-contain w-32 h-24 mx-auto mb-6 rounded-full",children:((w=r[c])==null?void 0:w.mainImage)&&e(j,{className:"h-[96px] w-[128px] object-scale-down",src:`${(t=r[c])==null?void 0:t.mainImage}`,width:128,height:96,alt:(v=(m=(b=r[c])==null?void 0:b.mainImage)==null?void 0:m.alt)!=null?v:`testimonial-source-profile-image${c}`})})]}),g("div",{className:"w-full px-6 py-10 lg:w-2/3",children:[e(F,{}),e(C,{muted:!0,className:"mb-10 text-xl leading-loose lg:text-2xl",children:(N=r[c])==null?void 0:N.testimony}),e(C,{weight:"bold",className:"text-2xl font-bold text-gray-500",children:(y=r[c])==null?void 0:y.name}),e(C,{muted:!0,children:(S=r[c])==null?void 0:S.jobTitle})]})]}),r&&(r==null?void 0:r.length)>1&&e(p,{type:"right",className:"hidden bg-white lg:block p-4 mr-6 lg:mr-0",onClick:()=>a("next"),ariaLabel:"Show next testimonial"})]})})})}function $(){return e("svg",{className:"w-6 h-6",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:e("path",{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"})})}function F(){return g("svg",{className:"w-10 h-10 mb-4 text-primary",viewBox:"0 0 32 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{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",fill:"currentColor"}),e("path",{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",fill:"currentColor"})]})}export{R as a};
@@ -1 +0,0 @@
1
- import{Card as d}from"@stackshift-ui/card";import{Container as p}from"@stackshift-ui/container";import{Flex as u}from"@stackshift-ui/flex";import{Heading as g}from"@stackshift-ui/heading";import{Section as x}from"@stackshift-ui/section";import{SwiperButton as c}from"@stackshift-ui/swiper-button";import{Text as o}from"@stackshift-ui/text";import w,{useState as h}from"react";import{jsx as t,jsxs as l}from"react/jsx-runtime";function T({caption:e,title:r,testimonials:n}){let[s,C]=h(n);return t(x,{className:"py-20 overflow-hidden bg-background",children:l(p,{maxWidth:1280,children:[t(u,{wrap:!0,align:"center",justify:"center",className:"pt-8 pb-16",children:t(b,{testimony:s,slider:m=>{C(f=>{let i=f||[];if(m==="next"){let a=i.length>0?i.shift():void 0;return a?[...i,a]:i}else if(m==="prev"){let a=i.length>0?i.pop():void 0;return a?[a,...i]:i}return i})},children:t(v,{caption:e,title:r})})}),t(N,{testimonials:s})]})})}function v({caption:e,title:r}){return l(p,{maxWidth:576,className:"mb-10 text-center ",children:[t(o,{weight:"bold",className:"text-secondary",children:e}),t(g,{fontSize:"3xl",className:"mt-4",children:r})]})}function b({testimony:e,slider:r,children:n}){return e?l(w.Fragment,{children:[e&&(e==null?void 0:e.length)>=4&&t(c,{type:"left",className:"order-last p-4 mr-3 bg-white lg:order-first lg:mr-0",onClick:()=>r("prev"),ariaLabel:"Show previous testimonial"}),n,e&&(e==null?void 0:e.length)>=4&&t(c,{type:"right",className:"order-last p-4 bg-white",onClick:()=>r("next"),ariaLabel:"Show next testimonial"})]}):null}function N({testimonials:e}){return e?t("div",{className:"relative w-full",children:t(u,{wrap:!0,justify:"center",className:"mx-auto ",children:e.slice(0,3).map((r,n)=>t(S,{...r},n))})}):null}function S({testimony:e,name:r,jobTitle:n}){return e?t("div",{className:"mb-4 px-3 w-full lg:w-1/3",children:l(d,{className:"p-5 ",children:[t(F,{}),t(o,{className:"mb-4 leading-loose",muted:!0,children:e}),t(o,{weight:"bold",className:"text-gray-500",children:r}),t(o,{muted:!0,children:n})]})}):null}function F(){return l("svg",{className:"w-8 h-8 mb-6 text-primary",viewBox:"0 0 32 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t("path",{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",fill:"currentColor"}),t("path",{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",fill:"currentColor"})]})}export{T as a};
File without changes