@stackshift-ui/features 6.0.2 → 6.0.4

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.
@@ -0,0 +1,138 @@
1
+ import { Container } from "@stackshift-ui/container";
2
+ import { Flex } from "@stackshift-ui/flex";
3
+ import { Heading } from "@stackshift-ui/heading";
4
+ import { Image } from "@stackshift-ui/image";
5
+ import { Section } from "@stackshift-ui/section";
6
+ import { Text } from "@stackshift-ui/text";
7
+ import React from "react";
8
+ import { FeaturesProps } from ".";
9
+
10
+ export default function Features_G({ caption, title, description, images, tags }: FeaturesProps) {
11
+ return (
12
+ <Section className="py-20 bg-background">
13
+ <Container maxWidth={1280}>
14
+ <Flex wrap align="center">
15
+ <div className="w-full px-4 mb-12 lg:mb-0 lg:w-1/2">
16
+ <Container maxWidth={448}>
17
+ <FeaturesInfo caption={caption} title={title} description={description} />
18
+ <TagList tags={tags} />
19
+ </Container>
20
+ </div>
21
+ <ImageGallery images={images} />
22
+ </Flex>
23
+ </Container>
24
+ </Section>
25
+ );
26
+ }
27
+
28
+ function FeaturesInfo({
29
+ caption,
30
+ title,
31
+ description,
32
+ }: {
33
+ caption?: string;
34
+ title?: string;
35
+ description?: string;
36
+ }) {
37
+ return (
38
+ <React.Fragment>
39
+ {caption && (
40
+ <Text weight="bold" className="text-secondary">
41
+ {caption}
42
+ </Text>
43
+ )}
44
+ {title && (
45
+ <Heading fontSize="3xl" className="mb-3">
46
+ {title}
47
+ </Heading>
48
+ )}
49
+ {description && (
50
+ <Text muted className="mb-6 leading-loose ">
51
+ {description}
52
+ </Text>
53
+ )}
54
+ </React.Fragment>
55
+ );
56
+ }
57
+
58
+ function TagList({ tags }: { tags?: string[] }) {
59
+ if (!tags) return null;
60
+
61
+ return (
62
+ <ul className="font-bold text-gray-500">
63
+ {tags.map(item => (
64
+ <FeatureItem item={item} />
65
+ ))}
66
+ </ul>
67
+ );
68
+ }
69
+
70
+ function FeatureItem({ item }: { item?: string }) {
71
+ if (!item) return null;
72
+
73
+ return (
74
+ <Flex as="li" align="center" className="mb-2 ">
75
+ <svg
76
+ className="w-5 h-5 mr-2 text-primary-foreground"
77
+ xmlns="http://www.w3.org/2000/svg"
78
+ viewBox="0 0 20 20"
79
+ fill="currentColor">
80
+ <path
81
+ fillRule="evenodd"
82
+ d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z"
83
+ clipRule="evenodd"
84
+ />
85
+ </svg>
86
+ <span>{item}</span>
87
+ </Flex>
88
+ );
89
+ }
90
+
91
+ function ImageGallery({ images }: { images?: any[] }) {
92
+ if (!images || images?.length === 0) return null;
93
+
94
+ function renderImage(
95
+ image?: string,
96
+ alt?: string,
97
+ width?: number,
98
+ height?: number,
99
+ className?: string,
100
+ ) {
101
+ return (
102
+ <div className={`overflow-hidden ${className}`}>
103
+ <Image
104
+ className="object-cover w-full h-auto rounded-global"
105
+ src={image}
106
+ sizes="100vw"
107
+ width={width}
108
+ height={height}
109
+ alt={alt ?? "feature-image"}
110
+ />
111
+ </div>
112
+ );
113
+ }
114
+
115
+ return (
116
+ <div className="w-full lg:w-1/2">
117
+ <div className="items-end mb-4 lg:flex lg:flex-wrap">
118
+ <div className="h-full px-3 mb-4 lg:mb-0 lg:w-2/3">
119
+ {images[0]?.image && renderImage(images[0].image, images[0].alt, 356, 192, "h-[269px]")}
120
+ </div>
121
+ <div className="h-full px-3 lg:w-1/3">
122
+ {images[1]?.image && renderImage(images[1].image, images[1].alt, 166, 128, "")}
123
+ </div>
124
+ </div>
125
+ <div className="items-start mb-4 lg:flex lg:flex-wrap">
126
+ <div className="h-full px-3 mb-4 lg:mb-0 lg:w-1/3">
127
+ {images[2]?.image &&
128
+ renderImage(images[2].image, images[2].alt, 166, 128, "h-[269px] lg:h-[126px]")}
129
+ </div>
130
+ <div className="h-full px-3 lg:w-2/3">
131
+ {images[3]?.image && renderImage(images[3].image, images[3].alt, 356, 192, "")}
132
+ </div>
133
+ </div>
134
+ </div>
135
+ );
136
+ }
137
+
138
+ export { Features_G };
@@ -0,0 +1,135 @@
1
+ import { Container } from "@stackshift-ui/container";
2
+ import { Flex } from "@stackshift-ui/flex";
3
+ import { Heading } from "@stackshift-ui/heading";
4
+ import { Image } from "@stackshift-ui/image";
5
+ import { Section } from "@stackshift-ui/section";
6
+ import { Text } from "@stackshift-ui/text";
7
+ import React from "react";
8
+ import { FeaturesProps } from ".";
9
+ import { ArrayOfImageTitleAndText } from "./types";
10
+
11
+ export default function Features_H({ caption, title, features, images }: FeaturesProps) {
12
+ return (
13
+ <Section className="py-20 bg-background">
14
+ <Container maxWidth={1280}>
15
+ <Flex wrap align="center">
16
+ <div className="w-full mb-12 lg:mb-0 lg:w-1/2">
17
+ <Container maxWidth={448}>
18
+ <CaptionAndTitleSection caption={caption} title={title} />
19
+ <FeaturesList features={features} />
20
+ </Container>
21
+ </div>
22
+ <ImageGallery images={images} />
23
+ </Flex>
24
+ </Container>
25
+ </Section>
26
+ );
27
+ }
28
+
29
+ function CaptionAndTitleSection({ caption, title }: { caption?: string; title?: string }) {
30
+ return (
31
+ <React.Fragment>
32
+ {caption && (
33
+ <Text weight="bold" className="text-secondary">
34
+ {caption}
35
+ </Text>
36
+ )}
37
+ {title && (
38
+ <Heading fontSize="3xl" className="mb-6">
39
+ {title}
40
+ </Heading>
41
+ )}
42
+ </React.Fragment>
43
+ );
44
+ }
45
+
46
+ function FeaturesList({ features }: { features?: ArrayOfImageTitleAndText[] }) {
47
+ if (!features || features?.length <= 0) return null;
48
+
49
+ return (
50
+ <ul>
51
+ {features.map(feature => {
52
+ return <FeatureItem feature={feature} key={feature._key} />;
53
+ })}
54
+ </ul>
55
+ );
56
+ }
57
+
58
+ function FeatureItem({ feature }: { feature?: ArrayOfImageTitleAndText }) {
59
+ if (!feature) return null;
60
+
61
+ return (
62
+ <Flex as="li">
63
+ <FeatureIcon />
64
+ <div className="max-w-xs">
65
+ <Text weight="bold" className="text-gray-500">
66
+ {feature?.title}
67
+ </Text>
68
+ <Text muted className="leading-loose">
69
+ {feature?.plainText}
70
+ </Text>
71
+ </div>
72
+ </Flex>
73
+ );
74
+ }
75
+
76
+ function FeatureIcon() {
77
+ return (
78
+ <svg
79
+ className="w-8 h-8 mr-3 text-primary"
80
+ xmlns="http://www.w3.org/2000/svg"
81
+ fill="none"
82
+ viewBox="0 0 24 24"
83
+ stroke="currentColor">
84
+ <path
85
+ strokeLinecap="round"
86
+ strokeLinejoin="round"
87
+ strokeWidth={2}
88
+ d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4"
89
+ />
90
+ </svg>
91
+ );
92
+ }
93
+
94
+ function ImageGallery({ images }: { images?: any[] }) {
95
+ if (!images || images?.length === 0) return null;
96
+
97
+ return (
98
+ <div className="items-center w-full px-4 sm:flex md:px-0 lg:w-1/2">
99
+ <div className="mb-5 sm:mb-0 sm:w-1/2">
100
+ {images?.[0]?.image && (
101
+ <Image
102
+ className="object-cover overflow-hidden rounded-global"
103
+ src={`${images?.[0]?.image}`}
104
+ width={640}
105
+ height={800}
106
+ sizes="(max-width: 639px) 100vw, (min-width: 640px) 30vw"
107
+ alt={images?.[0]?.alt ?? "features-image-1"}
108
+ />
109
+ )}
110
+ {images?.[1]?.image && (
111
+ <Image
112
+ className="object-cover mt-6 overflow-hidden rounded-global"
113
+ src={`${images?.[1]?.image}`}
114
+ width={640}
115
+ height={800}
116
+ sizes="(max-width: 639px) 100vw, (min-width: 640px) 30vw"
117
+ alt={images?.[1]?.alt ?? "features-image-2"}
118
+ />
119
+ )}
120
+ </div>
121
+ {images?.[2]?.image && (
122
+ <Image
123
+ className="object-cover overflow-hidden rounded-global sm:ml-6 sm:w-1/2"
124
+ src={`${images?.[2]?.image}`}
125
+ width={640}
126
+ height={800}
127
+ sizes="(max-width: 639px) 100vw, (min-width: 640px) 30vw"
128
+ alt={images?.[2]?.alt ?? "features-image-3"}
129
+ />
130
+ )}
131
+ </div>
132
+ );
133
+ }
134
+
135
+ export { Features_H };
package/src/index.ts ADDED
@@ -0,0 +1,12 @@
1
+ "use client";
2
+
3
+ // component exports
4
+ export * from "./features";
5
+ export * from "./features_a";
6
+ export * from "./features_b";
7
+ export * from "./features_c";
8
+ export * from "./features_d";
9
+ export * from "./features_e";
10
+ export * from "./features_f";
11
+ export * from "./features_g";
12
+ export * from "./features_h";
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 h from"react";import{Heading as w}from"@stackshift-ui/heading";import{Text as p}from"@stackshift-ui/text";import{Card as v}from"@stackshift-ui/card";import{Button as s}from"@stackshift-ui/button";import{Image as b}from"@stackshift-ui/image";import{Section as N}from"@stackshift-ui/section";import{Container as e}from"@stackshift-ui/container";import{Flex as F}from"@stackshift-ui/flex";import{jsx as l,jsxs as a}from"react/jsx-runtime";function k({featuredItems:o}){let[i,n]=h.useState(0);return l(N,{className:"py-20 overflow-x-auto bg-background",children:l(e,{maxWidth:1280,children:l(F,{className:"relative",children:l(d,{featuredItems:o,slider:r=>{o&&(r==="next"?i!==o.length-1?n(t=>t+1):n(0):i>=1?n(t=>t-1):n(o.length-1))},children:a("div",{className:"order-1 w-full ml-auto xl:w-4/5",children:[l(C,{featuredItems:o,item:i}),l(S,{featuredItems:o,item:i})]})})})})})}function C({featuredItems:o,item:i}){var n,x,r,t,m,c,g;return(x=(n=o==null?void 0:o[i])==null?void 0:n.mainImage)!=null&&x.image?l("div",{className:"mx-auto overflow-hidden rounded-md md:max-w-xl xl:max-w-4xl",children:l(b,{className:"relative object-cover",src:`${(t=(r=o==null?void 0:o[i])==null?void 0:r.mainImage)==null?void 0:t.image}`,sizes:"100vw",width:896,height:575,alt:(g=(c=(m=o==null?void 0:o[i])==null?void 0:m.mainImage)==null?void 0:c.alt)!=null?g:`features-image-${i}`})}):null}function S({featuredItems:o,item:i}){var n,x,r,t,m,c;return o?a(v,{className:"top-0 left-0 max-w-xl p-6 mx-auto text-center bg-white md:mt-12 md:p-10 lg:mt-12 lg:p-10 xl:absolute xl:mx-0 xl:mt-20 xl:py-24",children:[l(p,{weight:"bold",className:"text-xs lg:text-md md:text-sm xl:text-lg text-secondary",children:((n=o==null?void 0:o[i])==null?void 0:n.subtitle)&&((x=o==null?void 0:o[i])==null?void 0:x.subtitle)}),l(w,{fontSize:"3xl",children:((r=o==null?void 0:o[i])==null?void 0:r.title)&&((t=o==null?void 0:o[i])==null?void 0:t.title)}),l(p,{muted:!0,className:"text-xs leading-loose text-center md:mt-5 md:text-sm lg:mt-5 lg:text-sm",children:((m=o==null?void 0:o[i])==null?void 0:m.description)&&((c=o==null?void 0:o[i])==null?void 0:c.description)})]}):null}function d({featuredItems:o,children:i,slider:n}){return o?a(h.Fragment,{children:[l("div",{className:"absolute left-0 z-40 items-center mt-20 -mx-3 order-0 md:mt-40 lg:mt-60 xl:-mx-6 xl:flex",children:(o==null?void 0:o.length)>=2&&l(s,{as:"button",ariaLabel:"Show Previous Feature",className:"z-10 p-4 text-white ",onClick:()=>n("prev"),children:l("svg",{className:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M10 19l-7-7m0 0l7-7m-7 7h18"})})})}),i,l("div",{className:"absolute right-0 z-40 items-center order-2 mt-20 -mx-3 md:mt-40 lg:mt-60 xl:-mx-6 xl:flex",children:(o==null?void 0:o.length)>=2&&l(s,{as:"button",ariaLabel:"Show Next Feature",className:"p-4 text-white ",onClick:()=>n("next"),children:l("svg",{className:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M14 5l7 7m0 0l-7 7m7-7H3"})})})})]}):null}export{k as a};
@@ -1 +0,0 @@
1
- import{Heading as x}from"@stackshift-ui/heading";import{Text as s}from"@stackshift-ui/text";import{Button as v}from"@stackshift-ui/button";import{Image as h}from"@stackshift-ui/image";import{Section as w}from"@stackshift-ui/section";import{Container as f}from"@stackshift-ui/container";import{Flex as m}from"@stackshift-ui/flex";import{jsx as l,jsxs as i}from"react/jsx-runtime";function N({caption:e,title:a,description:t,images:n,primaryButton:o}){return l(w,{className:"py-20 bg-background",children:l(f,{maxWidth:1280,children:i(m,{wrap:!0,align:"center",children:[i(m,{direction:"col",className:"w-full mb-12 lg:mb-0 lg:w-1/2",children:[l(p,{caption:e,title:a,description:t}),l(F,{primaryButton:o})]}),l(C,{images:n})]})})})}function p({caption:e,title:a,description:t}){return i(f,{maxWidth:448,className:"ml-0",children:[e&&l(s,{weight:"bold",className:"font-bold text-secondary",children:e}),a&&l(x,{fontSize:"3xl",className:"mb-6",children:a}),t&&l(s,{muted:!0,className:"mb-6 leading-loose",children:t})]})}function F({primaryButton:e}){return e!=null&&e.label?l(v,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}):null}function C({images:e}){var t,n,o,d;if(!e||(e==null?void 0:e.length)===0)return null;function a(c,r,g,u,b){return l("div",{className:`overflow-hidden rounded ${b}`,children:l(h,{className:"object-cover w-full h-auto",src:c,sizes:"100vw",width:g,height:u,alt:r!=null?r:"feature-image"})})}return i("div",{className:"w-full lg:w-1/2",children:[i("div",{className:"items-end mb-4 lg:flex lg:flex-wrap",children:[l("div",{className:"h-full px-3 mb-4 lg:mb-0 lg:w-2/3",children:((t=e[0])==null?void 0:t.image)&&a(e[0].image,e[0].alt,356,192,"h-[269px]")}),l("div",{className:"h-full px-3 lg:w-1/3",children:((n=e[1])==null?void 0:n.image)&&a(e[1].image,e[1].alt,166,128,"")})]}),i("div",{className:"items-start mb-4 lg:flex lg:flex-wrap",children:[l("div",{className:"h-full px-3 mb-4 lg:mb-0 lg:w-1/3",children:((o=e[2])==null?void 0:o.image)&&a(e[2].image,e[2].alt,166,128,"h-[269px] lg:h-[126px]")}),l("div",{className:"h-full px-3 lg:w-2/3",children:((d=e[3])==null?void 0:d.image)&&a(e[3].image,e[3].alt,356,192,"")})]})]})}export{N as a};