@stackshift-ui/portfolio 6.0.3 → 6.0.5-beta.0
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-CNVASU2K.mjs +1 -0
- package/dist/{chunk-VJQNAKCY.mjs → chunk-GKMB4OHZ.mjs} +1 -1
- package/dist/chunk-KZEBQM5G.mjs +1 -0
- package/dist/{chunk-4Y7ZRUFQ.mjs → chunk-MXK637AP.mjs} +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/portfolio.js +1 -1
- package/dist/portfolio.mjs +1 -1
- package/dist/portfolio_a.d.ts +1 -1
- package/dist/portfolio_a.js +1 -1
- package/dist/portfolio_a.mjs +1 -1
- package/dist/portfolio_b.js +1 -1
- package/dist/portfolio_b.mjs +1 -1
- package/dist/portfolio_c.js +1 -1
- package/dist/portfolio_c.mjs +1 -1
- package/dist/portfolio_d.d.ts +1 -1
- package/dist/portfolio_d.js +1 -1
- package/dist/portfolio_d.mjs +1 -1
- package/package.json +11 -10
- package/src/helper/index.ts +27 -0
- package/src/index.ts +8 -0
- package/src/portfolio.test.tsx +13 -0
- package/src/portfolio.tsx +39 -0
- package/src/portfolio_a.tsx +145 -0
- package/src/portfolio_b.tsx +127 -0
- package/src/portfolio_c.tsx +122 -0
- package/src/portfolio_d.tsx +183 -0
- package/src/types.ts +412 -0
- package/dist/chunk-AC3OTID7.mjs +0 -1
- package/dist/chunk-BJOQ75B3.mjs +0 -1
- package/dist/chunk-NFRBR5UV.mjs +0 -1
- package/dist/chunk-ULBLZJEZ.mjs +0 -1
- /package/dist/{chunk-EJMMBK25.mjs → chunk-CSYF7HAN.mjs} +0 -0
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
|
+
}
|
package/dist/chunk-AC3OTID7.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Button as v}from"@stackshift-ui/button";import{Container as w}from"@stackshift-ui/container";import{Flex as p}from"@stackshift-ui/flex";import{Heading as h}from"@stackshift-ui/heading";import{Image as k}from"@stackshift-ui/image";import{Section as B}from"@stackshift-ui/section";import{Text as P}from"@stackshift-ui/text";import N from"react";import{jsx as r,jsxs as g}from"react/jsx-runtime";function L({caption:l,title:e,portfoliosWithCategory:i,primaryButton:a,length:s=8}){var x;let m=s,[b,f]=N.useState((x=i==null?void 0:i[0])==null?void 0:x.category),u=i==null?void 0:i.find(d=>(d==null?void 0:d.category)===b);return r(B,{className:"py-20 bg-background",children:g(w,{maxWidth:1280,children:[g(w,{maxWidth:512,className:"mb-8 text-center md:mb-16",children:[r(T,{caption:l,title:e}),r(S,{categories:i,activeTab:b,onClickFn:f})]}),r(A,{portfolios:u==null?void 0:u.content,portfolioLength:m}),r(R,{button:a})]})})}function T({caption:l,title:e}){return!l||!e?null:g(N.Fragment,{children:[r(P,{weight:"semibold",children:l}),r(h,{className:"mb-6",fontSize:"2xl",children:e})]})}function R({button:l}){return l!=null&&l.label?r("div",{className:"text-center",children:r(v,{as:"link",ariaLabel:l==null?void 0:l.label,link:l,children:l==null?void 0:l.label})}):null}function S({categories:l,activeTab:e,onClickFn:i}){return!l||(l==null?void 0:l.length)===0?null:r(p,{className:"inline-flex py-1 text-sm bg-white rounded",wrap:!0,children:l==null?void 0:l.map((a,s)=>{var m;return r(v,{variant:"tab",as:"button",ariaLabel:(m=a==null?void 0:a.category)!=null?m:`Category button ${s+1}`,isActive:e===(a==null?void 0:a.category),onClick:()=>i==null?void 0:i(a==null?void 0:a.category),children:a==null?void 0:a.category},a==null?void 0:a._key)})})}function A({portfolios:l,portfolioLength:e}){var i;return!l||(l==null?void 0:l.length)===0?null:r(p,{wrap:!0,className:"mb-8",children:(i=l==null?void 0:l.slice(0,e))==null?void 0:i.map((a,s)=>{var m,b,f,u,x,d,y;return r(p,{className:"w-full space-x-5 px-4 mb-8 sm:w-1/2 lg:w-1/4",children:g("div",{className:"relative mx-auto h-[256px] w-[332px] overflow-hidden rounded-global",children:[((m=a==null?void 0:a.mainImage)==null?void 0:m.image)&&r(k,{className:"object-cover w-full h-full",src:(b=a==null?void 0:a.mainImage)==null?void 0:b.image,alt:(u=(f=a==null?void 0:a.mainImage)==null?void 0:f.alt)!=null?u:`portfolio-image-${s}`}),r("div",{className:"absolute inset-0 z-10 flex items-center justify-center duration-300 bg-slate-900 rounded-lg opacity-0 hover:opacity-75",children:((x=a==null?void 0:a.primaryButton)==null?void 0:x.label)&&r(v,{as:"link",variant:"outline",ariaLabel:(d=a==null?void 0:a.primaryButton)==null?void 0:d.label,link:a==null?void 0:a.primaryButton,className:"bg-transparent border-secondary outline text-white hover:bg-secondary/20 hover:border-secondary/20 inline-block rounded-l-xl rounded-t-xl font-bold transition duration-200 px-3 py-4",children:(y=a==null?void 0:a.primaryButton)==null?void 0:y.label})})]})},a==null?void 0:a._key)})})}export{L as a};
|
package/dist/chunk-BJOQ75B3.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Button as v}from"@stackshift-ui/button";import{Container as w}from"@stackshift-ui/container";import{Flex as p}from"@stackshift-ui/flex";import{Heading as h}from"@stackshift-ui/heading";import{Image as k}from"@stackshift-ui/image";import{Section as B}from"@stackshift-ui/section";import{Text as P}from"@stackshift-ui/text";import N from"react";import{jsx as r,jsxs as g}from"react/jsx-runtime";function L({caption:l,title:e,portfoliosWithCategory:i,primaryButton:a,length:s=8}){var x;let m=s,[b,f]=N.useState((x=i==null?void 0:i[0])==null?void 0:x.category),u=i==null?void 0:i.find(d=>(d==null?void 0:d.category)===b);return r(B,{className:"py-20 bg-background",children:g(w,{maxWidth:1280,children:[g(w,{maxWidth:512,className:"mb-8 text-center md:mb-16",children:[r(T,{caption:l,title:e}),r(S,{categories:i,activeTab:b,onClickFn:f})]}),r(A,{portfolios:u==null?void 0:u.content,portfolioLength:m}),r(R,{button:a})]})})}function T({caption:l,title:e}){return!l||!e?null:g(N.Fragment,{children:[r(P,{weight:"semibold",children:l}),r(h,{className:"mb-6",fontSize:"2xl",children:e})]})}function R({button:l}){return l!=null&&l.label?r("div",{className:"text-center",children:r(v,{as:"link",ariaLabel:l==null?void 0:l.label,link:l,children:l==null?void 0:l.label})}):null}function S({categories:l,activeTab:e,onClickFn:i}){return!l||(l==null?void 0:l.length)===0?null:r(p,{className:"inline-flex py-1 text-sm bg-white rounded-global",wrap:!0,children:l==null?void 0:l.map((a,s)=>{var m;return r(v,{variant:"tab",as:"button",ariaLabel:(m=a==null?void 0:a.category)!=null?m:`Category button ${s+1}`,isActive:e===(a==null?void 0:a.category),onClick:()=>i==null?void 0:i(a==null?void 0:a.category),children:a==null?void 0:a.category},a==null?void 0:a._key)})})}function A({portfolios:l,portfolioLength:e}){var i;return!l||(l==null?void 0:l.length)===0?null:r(p,{wrap:!0,className:"mb-8",children:(i=l==null?void 0:l.slice(0,e))==null?void 0:i.map((a,s)=>{var m,b,f,u,x,d,y;return r(p,{className:"w-full space-x-5 px-4 mb-8 sm:w-1/2 lg:w-1/4",children:g("div",{className:"relative mx-auto h-[256px] w-[332px] overflow-hidden rounded-global",children:[((m=a==null?void 0:a.mainImage)==null?void 0:m.image)&&r(k,{className:"object-cover w-full h-full",src:(b=a==null?void 0:a.mainImage)==null?void 0:b.image,alt:(u=(f=a==null?void 0:a.mainImage)==null?void 0:f.alt)!=null?u:`portfolio-image-${s}`}),r("div",{className:"absolute inset-0 z-10 flex items-center justify-center duration-300 bg-slate-900 rounded-lg opacity-0 hover:opacity-75",children:((x=a==null?void 0:a.primaryButton)==null?void 0:x.label)&&r(v,{as:"link",variant:"outline",ariaLabel:(d=a==null?void 0:a.primaryButton)==null?void 0:d.label,link:a==null?void 0:a.primaryButton,className:"bg-transparent border-secondary outline text-white hover:bg-secondary/20 hover:border-secondary/20 inline-block rounded-l-xl rounded-t-xl font-bold transition duration-200 px-3 py-4",children:(y=a==null?void 0:a.primaryButton)==null?void 0:y.label})})]})},a==null?void 0:a._key)})})}export{L as a};
|
package/dist/chunk-NFRBR5UV.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{lazy as i}from"react";import{jsx as b}from"react/jsx-runtime";var r={variant_a:i(()=>import("./portfolio_a.mjs")),variant_b:i(()=>import("./portfolio_b.mjs")),variant_c:i(()=>import("./portfolio_c.mjs")),variant_d:i(()=>import("./portfolio_d.mjs"))},h="Portfolio",C=({data:o})=>{var e,s,l,p,f,c,m,u,v,g,y;let n=o==null?void 0:o.variant,t=n&&(r==null?void 0:r[n]),P={caption:(s=(e=o==null?void 0:o.variants)==null?void 0:e.subtitle)!=null?s:void 0,title:(p=(l=o==null?void 0:o.variants)==null?void 0:l.title)!=null?p:void 0,portfoliosWithCategory:(c=(f=o==null?void 0:o.variants)==null?void 0:f.portfoliosWithCategories)!=null?c:void 0,portfolios:(u=(m=o==null?void 0:o.variants)==null?void 0:m.portfolios)!=null?u:void 0,primaryButton:(g=(v=o==null?void 0:o.variants)==null?void 0:v.primaryButton)!=null?g:void 0,length:(y=o==null?void 0:o.variants)==null?void 0:y.length};return t?b(t,{...P}):null};C.displayName=h;export{C as a};
|
package/dist/chunk-ULBLZJEZ.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as z}from"./chunk-NFO6QLL6.mjs";import{Button as T}from"@stackshift-ui/button";import{Container as L}from"@stackshift-ui/container";import{Flex as R}from"@stackshift-ui/flex";import{Heading as P}from"@stackshift-ui/heading";import{Image as I}from"@stackshift-ui/image";import{Section as F}from"@stackshift-ui/section";import{Text as h}from"@stackshift-ui/text";import A from"react";import{jsx as a,jsxs as u}from"react/jsx-runtime";function H({caption:l,title:i,portfoliosWithCategory:d,primaryButton:m,length:b=6}){var p,v,f,w,y,B,$,S,_;let x=b,e=0,[g,N]=A.useState((p=d==null?void 0:d[0])==null?void 0:p.category),s=d==null?void 0:d.find(r=>(r==null?void 0:r.category)===g);return a(F,{className:"py-20 bg-background",children:u(L,{maxWidth:1280,children:[u(L,{maxWidth:512,className:"mb-8 text-center md:mb-16",children:[a(j,{caption:l,title:i}),a(M,{categories:d,activeTab:g,onClickFn:N})]}),u("div",{className:"mb-12 sm:flex",children:[u(R,{wrap:!0,className:"w-full mb-8 lg:mb-0 lg:w-1/2",children:[(f=(v=s==null?void 0:s.content)==null?void 0:v.slice(e,e+2))==null?void 0:f.map(r=>a(k,{size:"sm",content:r},r._key)),(y=(w=s==null?void 0:s.content)==null?void 0:w.slice(e+2,e+3))==null?void 0:y.map(r=>a(k,{size:"lg",content:r},r._key))]}),u("div",{className:"w-full lg:w-1/2",children:[($=(B=s==null?void 0:s.content)==null?void 0:B.slice(e+3,e+4))==null?void 0:$.map(r=>a(k,{size:"lg",content:r},r._key)),a("div",{className:"flex flex-wrap",children:(_=(S=s==null?void 0:s.content)==null?void 0:S.slice(e+4,x))==null?void 0:_.map(r=>a(k,{size:"sm",content:r},r._key))})]})]}),a(D,{button:m})]})})}function j({caption:l,title:i}){return!l||!i?null:u(A.Fragment,{children:[a(h,{weight:"semibold",children:l}),a(P,{className:"mb-6",fontSize:"2xl",children:i})]})}function D({button:l}){return l!=null&&l.label?a("div",{className:"text-center",children:a(T,{as:"link",ariaLabel:l==null?void 0:l.label,link:l,className:"text-white",children:l==null?void 0:l.label})}):null}function M({categories:l,activeTab:i,onClickFn:d}){return!l||(l==null?void 0:l.length)===0?null:a(R,{className:"inline-flex py-1 text-sm bg-white rounded",wrap:!0,children:l==null?void 0:l.map((m,b)=>{var x;return a(T,{variant:"tab",as:"button",ariaLabel:(x=m==null?void 0:m.category)!=null?x:`Category button ${b+1}`,isActive:i===(m==null?void 0:m.category),onClick:()=>d==null?void 0:d(m==null?void 0:m.category),children:m==null?void 0:m.category},m==null?void 0:m._key)})})}function k({size:l,content:i}){var b,x,e,g,N,s,p,v,f,w,y;let m=z("639")?60:90;return a("div",{className:`w-full px-4 mb-8 ${l==="lg"?"w-full":"lg:w-1/2"}`,children:((b=i==null?void 0:i.mainImage)==null?void 0:b.image)&&u("div",{className:"relative overflow-hidden rounded-global",children:[a(I,{className:`object-cover w-full ${l==="lg"?"h-128":"h-64"}`,src:(x=i==null?void 0:i.mainImage)==null?void 0:x.image,alt:`portfolio-image-${i==null?void 0:i._key}`}),a("div",{className:"absolute inset-0 z-10 justify-center p-6 duration-300 bg-slate-900 rounded-lg opacity-0 hover:opacity-80",children:u("div",{className:"max-w-md my-auto text-xs",children:[(i==null?void 0:i.subtitle)&&a(h,{className:"text-sm text-primary",weight:"bold",children:((e=i==null?void 0:i.subtitle)==null?void 0:e.length)>26?`${(g=i==null?void 0:i.subtitle)==null?void 0:g.substring(0,26)}...`:i==null?void 0:i.subtitle}),(i==null?void 0:i.title)&&a(P,{weight:"bold",className:`my-5 text-white ${l==="lg"?"text-sm md:text-xl":"text-sm"}`,children:((N=i==null?void 0:i.title)==null?void 0:N.length)>38?`${(s=i==null?void 0:i.title)==null?void 0:s.substring(0,38)}...`:i==null?void 0:i.title}),u("div",{className:"max-w-xs my-5",children:[(i==null?void 0:i.description)&&a(h,{fontSize:"xs",muted:!0,className:"mb-6 text-white",children:((p=i==null?void 0:i.description)==null?void 0:p.length)>m?`${(v=i==null?void 0:i.description)==null?void 0:v.substring(0,m)}...`:i==null?void 0:i.description}),((f=i==null?void 0:i.primaryButton)==null?void 0:f.label)&&a(T,{as:"link",variant:"outline",ariaLabel:(w=i==null?void 0:i.primaryButton)==null?void 0:w.label,link:i==null?void 0:i.primaryButton,className:"bg-transparent border-secondary outline text-white hover:bg-secondary/20 hover:border-secondary/20 inline-block rounded-l-xl rounded-t-xl font-bold transition duration-200 px-3 py-4",children:(y=i==null?void 0:i.primaryButton)==null?void 0:y.label})]})]})})]})})}export{H as a};
|
|
File without changes
|