@levo-so/blocks 0.1.74 → 0.1.76

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.
Files changed (58) hide show
  1. package/package.json +4 -4
  2. package/src/blocks/about-us/about-us-1.schema.ts +0 -3
  3. package/src/blocks/blogs/ClientOnly.tsx +24 -0
  4. package/src/blocks/blogs/blog-listing-1.schema.ts +750 -111
  5. package/src/blocks/blogs/blog-listing-1.tsx +123 -41
  6. package/src/blocks/blogs/blog-listing-2.schema.ts +1127 -2640
  7. package/src/blocks/blogs/blog-listing-2.tsx +110 -23
  8. package/src/blocks/blogs/blog-listing-3.schema.ts +713 -2010
  9. package/src/blocks/blogs/blog-listing-3.tsx +118 -20
  10. package/src/blocks/blogs/blog-post-1.schema.ts +262 -32
  11. package/src/blocks/blogs/blog-post-1.tsx +217 -28
  12. package/src/blocks/cards/cards-16.schema.ts +947 -0
  13. package/src/blocks/cards/cards-16.tsx +106 -0
  14. package/src/blocks/cards/cards-17.schema.ts +1945 -0
  15. package/src/blocks/cards/cards-17.tsx +112 -0
  16. package/src/blocks/cards/cards-18.schema.ts +1040 -0
  17. package/src/blocks/cards/cards-18.tsx +102 -0
  18. package/src/blocks/cards/cards-2.schema.ts +2 -2
  19. package/src/blocks/cards/cards-3.schema.ts +3 -16
  20. package/src/blocks/cards/cards-4.schema.ts +3 -28
  21. package/src/blocks/cards/cards-7.schema.ts +4 -7
  22. package/src/blocks/cards/cards-8.schema.ts +1 -10
  23. package/src/blocks/carousel/carousel-2.schema.ts +1 -2
  24. package/src/blocks/content/content-10.schema.ts +450 -0
  25. package/src/blocks/content/content-10.tsx +43 -0
  26. package/src/blocks/content/content-3.schema.ts +22 -28
  27. package/src/blocks/content/content-5.schema.ts +0 -4
  28. package/src/blocks/cta/cta-1.schema.ts +0 -3
  29. package/src/blocks/event/event-details.schema.ts +41 -175
  30. package/src/blocks/event/event-details.tsx +45 -50
  31. package/src/blocks/event/event-listing-2.schema.ts +437 -202
  32. package/src/blocks/event/event-listing-2.tsx +86 -22
  33. package/src/blocks/event/event-listing-3.schema.ts +232 -196
  34. package/src/blocks/event/event-listing-3.tsx +62 -29
  35. package/src/blocks/event/event-listing-4.schema.ts +314 -2824
  36. package/src/blocks/event/event-listing-4.tsx +68 -32
  37. package/src/blocks/event/event-listing.schema.ts +176 -1032
  38. package/src/blocks/event/event-listing.tsx +59 -25
  39. package/src/blocks/features/features-1/variants/stylized-cards-v2.ts +0 -1
  40. package/src/blocks/features/features-4.schema.ts +4 -14
  41. package/src/blocks/features/features-5.schema.ts +30 -51
  42. package/src/blocks/features/features-6.schema.ts +0 -1
  43. package/src/blocks/filter-listing/filter-listing-1.schema.ts +1 -3
  44. package/src/blocks/footer/footer-3.schema.ts +6 -14
  45. package/src/blocks/hero/hero-11.schema.ts +25 -54
  46. package/src/blocks/hero/hero-5.schema.ts +2 -6
  47. package/src/blocks/hero/hero-6.schema.ts +1 -10
  48. package/src/blocks/index.ts +4 -0
  49. package/src/blocks/logos/logos-1.schema.ts +0 -30
  50. package/src/blocks/pricing/pricing-1.schema.ts +0 -3
  51. package/src/blocks/stats/variants/default.ts +4 -5
  52. package/src/blocks/team/team-2.schema.ts +57 -154
  53. package/src/blocks/team/team-3.schema.ts +14 -31
  54. package/src/blocks/testimonial/testimonial-4.schema.ts +67 -152
  55. package/src/blocks/testimonial/testimonial-5/variants/default.ts +0 -1
  56. package/src/blocks/testimonial/testimonial-5/variants/testimonialWithLogo.ts +0 -1
  57. package/src/blocks/testimonial/testimonial-5/variants/testimonialWithRatings.ts +0 -1
  58. package/src/schemas/blocks.ts +8 -0
@@ -1,3 +1,4 @@
1
+ import type { IModuleStudioConfig, LevoEvent } from "@levo-so/core";
1
2
  import type { ILevoBlockBaseProps } from "@levo-so/studio";
2
3
  import {
3
4
  Box,
@@ -8,64 +9,97 @@ import {
8
9
  Image,
9
10
  Section,
10
11
  Typography,
11
- useContentEngine,
12
+ useBlockContext,
13
+ useContextEngine,
12
14
  } from "@levo-so/studio";
13
15
  import dayjs from "dayjs";
14
16
 
15
17
  import { ClientOnly } from "./ClientOnly";
16
18
  import type { IEventListing } from "./event-listing.schema";
17
19
 
18
- const EventListing: React.FC<ILevoBlockBaseProps<IEventListing>> = () => {
19
- const { data, query, setQuery, meta } = useContentEngine("events");
20
+ /** */
21
+ interface IEventMeta {
22
+ total: number;
23
+ pages: number;
24
+ series?: {
25
+ studio_config?: IModuleStudioConfig[];
26
+ };
27
+ }
28
+
29
+ const EventListing: React.FC<ILevoBlockBaseProps<IEventListing>> = ({ content }) => {
30
+ const { response, query, setQuery } = useContextEngine<LevoEvent.Root, IEventMeta>("events");
31
+ const { isBuilder } = useBlockContext();
20
32
 
21
33
  const handleNext = () => setQuery({ page: (query?.page || 0) + 1 });
22
34
  const handlePrevious = () => setQuery({ page: (query?.page || 0) - 1 });
23
35
 
36
+ const studioConfig = response?.meta?.series?.studio_config?.find(
37
+ (item) => !item.block_instance_id,
38
+ );
39
+
24
40
  return (
25
41
  <Section elementKey="layout">
26
42
  <Container elementKey="container">
27
- <Box elementKey="header-container">
28
- <Heading elementKey="title" />
29
- <Button elementKey="cta-button" />
43
+ <Box elementKey="header">
44
+ <Box elementKey="header-container">
45
+ <Heading elementKey="title" />
46
+ <Typography elementKey="description" />
47
+ </Box>
48
+ <Box elementKey="header-ctas_levoGroup" data-levo_group>
49
+ {content?.["header-ctas"]?.map((v, index: number) => (
50
+ <Button key={`header-ctas.${index}`} elementKey={`header-ctas.${index}.header-cta`} />
51
+ ))}
52
+ </Box>
30
53
  </Box>
31
-
32
54
  <Box elementKey="events_levoGroup" data-levo_group>
33
- {(data || [])?.map((item: any, index: number) => (
55
+ {response?.data?.map((item, index: number) => (
34
56
  <Box
35
57
  key={`events-listing-element-${index}`}
36
58
  data-levo_group_item
37
59
  elementKey={`events.${index}.eventWrapper`}
60
+ config={
61
+ (isBuilder && studioConfig?.preview_url) || (!isBuilder && studioConfig?.live_url)
62
+ ? {
63
+ action: {
64
+ type: "external_link",
65
+ value:
66
+ isBuilder && studioConfig.preview_url
67
+ ? studioConfig.preview_url.replace(/\{[^}]+\}/g, item?.slug)
68
+ : !isBuilder && studioConfig.live_url
69
+ ? studioConfig.live_url.replace(/\{[^}]+\}/g, item?.slug)
70
+ : "",
71
+ options: {},
72
+ },
73
+ }
74
+ : {}
75
+ }
38
76
  >
39
77
  <Image
40
78
  height={200}
41
79
  width={360}
42
80
  elementKey={`events.${index}.image`}
43
81
  alt="event poster"
82
+ image={item?.cover_image ?? undefined}
44
83
  />
45
84
  <Box elementKey={`events.${index}.text-wrapper`}>
46
- <Box elementKey={`events.${index}.text-container`}>
47
- <Typography elementKey={`events.${index}.caption-text`} />
48
-
49
- <Box elementKey={`events.${index}.date-wrapper`}>
50
- <Icon elementKey={`events.${index}.date-icon`} />
51
- <Typography elementKey={`events.${index}.publishedAt-header`}>
52
- <ClientOnly>
53
- {dayjs(item?.["publishedAt-header"]).format("MMM D, YYYY")}
54
- </ClientOnly>
85
+ <Box elementKey={`events.${index}.date-wrapper`}>
86
+ <Icon elementKey={`events.${index}.date-icon`} />
87
+ <ClientOnly>
88
+ <Typography elementKey={`events.${index}.startsAt`}>
89
+ {dayjs(item?.starts_at).format("MMM D, YYYY")}
55
90
  </Typography>
56
- </Box>
91
+ </ClientOnly>
57
92
  </Box>
58
93
 
59
- <Typography elementKey={`events.${index}.title`} />
60
- <Typography elementKey={`events.${index}.description`} />
61
- <Typography elementKey={`events.${index}.publishedAt`}>
62
- <ClientOnly>{dayjs(item?.publishedAt).format("MMM D, YYYY")}</ClientOnly>
94
+ <Heading elementKey={`events.${index}.title`}>{item?.title}</Heading>
95
+ <Typography elementKey={`events.${index}.description`}>
96
+ {item?.description}
63
97
  </Typography>
64
98
  </Box>
65
99
  </Box>
66
100
  ))}
67
101
  </Box>
68
- {(meta?.pages || 0) > 1 && (
102
+ {response?.meta && (
69
103
  <Box elementKey="paginationWrapper">
70
104
  <Button
71
105
  elementKey="paginationLeftButton"
@@ -74,12 +108,12 @@ const EventListing: React.FC<ILevoBlockBaseProps<IEventListing>> = () => {
74
108
  />
75
109
 
76
110
  <Typography elementKey="paginationText">
77
- {`${query?.page || 0}/${meta?.pages || 0}`}
111
+ {`${query?.page || 0}/${response?.meta?.pages || 0}`}
78
112
  </Typography>
79
113
  <Button
80
114
  elementKey="paginationRightButton"
81
115
  onClick={handleNext}
82
- disabled={query?.page === meta?.pages}
116
+ disabled={query?.page === response?.meta?.pages}
83
117
  />
84
118
  </Box>
85
119
  )}
@@ -35,7 +35,6 @@ export const stylizedCardsV2Features1Variant: IBlockLayouts = {
35
35
  "justify-content": "space-between",
36
36
  "align-items": "end",
37
37
  width: "100%",
38
- filter: "none",
39
38
  },
40
39
  title: {
41
40
  "text-align": "left",
@@ -457,7 +457,6 @@ export const Features4: IBlock = {
457
457
  tablet: {
458
458
  "flex-direction": "column",
459
459
  "row-gap": "3xl",
460
- filter: "none",
461
460
  },
462
461
  },
463
462
  header_section: {
@@ -475,12 +474,9 @@ export const Features4: IBlock = {
475
474
  tablet: {
476
475
  flex: "auto",
477
476
  "max-width": "100%",
478
- filter: "none",
479
- },
480
- filter: "none",
481
- mobile: {
482
- filter: "none",
483
477
  },
478
+
479
+ mobile: {},
484
480
  },
485
481
  specifications_levoGroup: {
486
482
  display: "grid",
@@ -676,7 +672,6 @@ export const Features4: IBlock = {
676
672
  "border-radius": "base",
677
673
  "object-fit": "cover",
678
674
  tablet: {
679
- filter: "none",
680
675
  width: "100%",
681
676
  },
682
677
  },
@@ -801,7 +796,6 @@ export const Features4: IBlock = {
801
796
  tablet: {
802
797
  "flex-direction": "column",
803
798
  "row-gap": "3xl",
804
- filter: "none",
805
799
  },
806
800
  "flex-direction": "row-reverse",
807
801
  },
@@ -821,12 +815,9 @@ export const Features4: IBlock = {
821
815
  tablet: {
822
816
  flex: "auto",
823
817
  "max-width": "100%",
824
- filter: "none",
825
- },
826
- filter: "none",
827
- mobile: {
828
- filter: "none",
829
818
  },
819
+
820
+ mobile: {},
830
821
  },
831
822
  specifications_levoGroup: {
832
823
  display: "none",
@@ -1014,7 +1005,6 @@ export const Features4: IBlock = {
1014
1005
  "border-radius": "base",
1015
1006
  "object-fit": "cover",
1016
1007
  tablet: {
1017
- filter: "none",
1018
1008
  width: "100%",
1019
1009
  },
1020
1010
  },
@@ -204,12 +204,11 @@ export const Features5: IBlock = {
204
204
  mobile: {
205
205
  "flex-direction": "column",
206
206
  "row-gap": "xl",
207
- filter: "none",
207
+
208
208
  display: "flex",
209
209
  },
210
- filter: "none",
210
+
211
211
  tablet: {
212
- filter: "none",
213
212
  display: "grid",
214
213
  "column-gap": "none",
215
214
  "flex-direction": "row",
@@ -227,12 +226,10 @@ export const Features5: IBlock = {
227
226
  mobile: {
228
227
  "flex-direction": "column",
229
228
  width: "100%",
230
- filter: "none",
229
+
231
230
  "border-bottom": "1px s",
232
231
  },
233
- tablet: {
234
- filter: "none",
235
- },
232
+ tablet: {},
236
233
  },
237
234
  icon_content_wrapper: {
238
235
  display: "flex",
@@ -243,11 +240,11 @@ export const Features5: IBlock = {
243
240
  "flex-direction": "row",
244
241
  "row-gap": "sm",
245
242
  "text-align": "center",
246
- filter: "none",
243
+
247
244
  "border-bottom": "1px solid",
248
245
  "column-gap": "base",
249
246
  },
250
- filter: "none",
247
+
251
248
  "justify-content": "start",
252
249
  },
253
250
  icon: {
@@ -256,7 +253,7 @@ export const Features5: IBlock = {
256
253
  width: "40px",
257
254
  height: "40px",
258
255
  },
259
- filter: "none",
256
+
260
257
  height: "36px",
261
258
  width: "36px",
262
259
  "font-size": "36px",
@@ -265,11 +262,10 @@ export const Features5: IBlock = {
265
262
  display: "flex",
266
263
  "flex-direction": "column",
267
264
  "row-gap": "xs",
268
- filter: "none",
265
+
269
266
  "justify-content": "start",
270
267
  "align-items": "start",
271
268
  mobile: {
272
- filter: "none",
273
269
  "justify-content": "start",
274
270
  "align-items": "start",
275
271
  },
@@ -306,11 +302,9 @@ export const Features5: IBlock = {
306
302
  "margin-right": "xl",
307
303
  mobile: {
308
304
  display: "none",
309
- filter: "none",
310
305
  },
311
- filter: "none",
306
+
312
307
  tablet: {
313
- filter: "none",
314
308
  display: "none",
315
309
  height: "80px",
316
310
  "margin-left": "none",
@@ -326,12 +320,10 @@ export const Features5: IBlock = {
326
320
  mobile: {
327
321
  "flex-direction": "column",
328
322
  width: "100%",
329
- filter: "none",
323
+
330
324
  "border-bottom": "1px s",
331
325
  },
332
- tablet: {
333
- filter: "none",
334
- },
326
+ tablet: {},
335
327
  },
336
328
  icon_content_wrapper: {
337
329
  display: "flex",
@@ -342,11 +334,11 @@ export const Features5: IBlock = {
342
334
  "flex-direction": "row",
343
335
  "row-gap": "sm",
344
336
  "text-align": "center",
345
- filter: "none",
337
+
346
338
  "border-bottom": "1px solid",
347
339
  "column-gap": "base",
348
340
  },
349
- filter: "none",
341
+
350
342
  "justify-content": "start",
351
343
  },
352
344
  icon: {
@@ -355,7 +347,7 @@ export const Features5: IBlock = {
355
347
  width: "40px",
356
348
  height: "40px",
357
349
  },
358
- filter: "none",
350
+
359
351
  height: "36px",
360
352
  width: "36px",
361
353
  "font-size": "36px",
@@ -364,11 +356,10 @@ export const Features5: IBlock = {
364
356
  display: "flex",
365
357
  "flex-direction": "column",
366
358
  "row-gap": "xs",
367
- filter: "none",
359
+
368
360
  "justify-content": "start",
369
361
  "align-items": "start",
370
362
  mobile: {
371
- filter: "none",
372
363
  "justify-content": "start",
373
364
  "align-items": "start",
374
365
  },
@@ -405,11 +396,9 @@ export const Features5: IBlock = {
405
396
  "margin-right": "xl",
406
397
  mobile: {
407
398
  display: "none",
408
- filter: "none",
409
399
  },
410
- filter: "none",
400
+
411
401
  tablet: {
412
- filter: "none",
413
402
  display: "none",
414
403
  height: "80px",
415
404
  "margin-left": "none",
@@ -425,12 +414,10 @@ export const Features5: IBlock = {
425
414
  mobile: {
426
415
  "flex-direction": "column",
427
416
  width: "100%",
428
- filter: "none",
417
+
429
418
  "border-bottom": "1px s",
430
419
  },
431
- tablet: {
432
- filter: "none",
433
- },
420
+ tablet: {},
434
421
  },
435
422
  icon_content_wrapper: {
436
423
  display: "flex",
@@ -441,11 +428,11 @@ export const Features5: IBlock = {
441
428
  "flex-direction": "row",
442
429
  "row-gap": "sm",
443
430
  "text-align": "center",
444
- filter: "none",
431
+
445
432
  "border-bottom": "1px solid",
446
433
  "column-gap": "base",
447
434
  },
448
- filter: "none",
435
+
449
436
  "justify-content": "start",
450
437
  },
451
438
  icon: {
@@ -454,7 +441,7 @@ export const Features5: IBlock = {
454
441
  width: "40px",
455
442
  height: "40px",
456
443
  },
457
- filter: "none",
444
+
458
445
  height: "36px",
459
446
  width: "36px",
460
447
  "font-size": "36px",
@@ -463,11 +450,10 @@ export const Features5: IBlock = {
463
450
  display: "flex",
464
451
  "flex-direction": "column",
465
452
  "row-gap": "xs",
466
- filter: "none",
453
+
467
454
  "justify-content": "start",
468
455
  "align-items": "start",
469
456
  mobile: {
470
- filter: "none",
471
457
  "justify-content": "start",
472
458
  "align-items": "start",
473
459
  },
@@ -504,11 +490,9 @@ export const Features5: IBlock = {
504
490
  "margin-right": "xl",
505
491
  mobile: {
506
492
  display: "none",
507
- filter: "none",
508
493
  },
509
- filter: "none",
494
+
510
495
  tablet: {
511
- filter: "none",
512
496
  display: "none",
513
497
  height: "80px",
514
498
  "margin-left": "none",
@@ -524,12 +508,10 @@ export const Features5: IBlock = {
524
508
  mobile: {
525
509
  "flex-direction": "column",
526
510
  width: "100%",
527
- filter: "none",
511
+
528
512
  "border-bottom": "1px s",
529
513
  },
530
- tablet: {
531
- filter: "none",
532
- },
514
+ tablet: {},
533
515
  },
534
516
  icon_content_wrapper: {
535
517
  display: "flex",
@@ -540,11 +522,11 @@ export const Features5: IBlock = {
540
522
  "flex-direction": "row",
541
523
  "row-gap": "sm",
542
524
  "text-align": "center",
543
- filter: "none",
525
+
544
526
  "border-bottom": "1px solid",
545
527
  "column-gap": "base",
546
528
  },
547
- filter: "none",
529
+
548
530
  "justify-content": "start",
549
531
  },
550
532
  icon: {
@@ -553,7 +535,7 @@ export const Features5: IBlock = {
553
535
  width: "40px",
554
536
  height: "40px",
555
537
  },
556
- filter: "none",
538
+
557
539
  height: "36px",
558
540
  width: "36px",
559
541
  "font-size": "36px",
@@ -562,11 +544,10 @@ export const Features5: IBlock = {
562
544
  display: "flex",
563
545
  "flex-direction": "column",
564
546
  "row-gap": "xs",
565
- filter: "none",
547
+
566
548
  "justify-content": "start",
567
549
  "align-items": "start",
568
550
  mobile: {
569
- filter: "none",
570
551
  "justify-content": "start",
571
552
  "align-items": "start",
572
553
  },
@@ -603,11 +584,9 @@ export const Features5: IBlock = {
603
584
  "margin-right": "xl",
604
585
  mobile: {
605
586
  display: "none",
606
- filter: "none",
607
587
  },
608
- filter: "none",
588
+
609
589
  tablet: {
610
- filter: "none",
611
590
  display: "none",
612
591
  height: "80px",
613
592
  "margin-left": "none",
@@ -762,7 +762,6 @@ export const Features6: IBlock = {
762
762
  "&:hover": {
763
763
  "background-color": "var(--color-brand-secondary)",
764
764
  },
765
- filter: "none",
766
765
  },
767
766
  },
768
767
  content: DEFAULT_CONTENT,
@@ -208,9 +208,7 @@ export const FilterListing1: IBlock = {
208
208
  min_items: 6, // 6 visible in grid at a time
209
209
  max_items: 9, // allows for paginated dataset
210
210
  },
211
- options: {
212
- supports_filters: true,
213
- },
211
+ options: {},
214
212
  fields: [
215
213
  {
216
214
  key: "card",
@@ -458,14 +458,13 @@ export const Footer3: IBlock = {
458
458
  "border-color": "border",
459
459
  tablet: {
460
460
  "grid-template-columns": "repeat(2, minmax(0, 1fr))",
461
- filter: "none",
462
461
  },
463
462
  mobile: {
464
463
  "grid-template-columns": "repeat(1, minmax(0, 1fr))",
465
- filter: "none",
464
+
466
465
  "flex-direction": "column",
467
466
  },
468
- filter: "none",
467
+
469
468
  width: "100%",
470
469
  "align-items": "start",
471
470
  "justify-content": "space-between",
@@ -475,18 +474,16 @@ export const Footer3: IBlock = {
475
474
  "column-gap": "2xl",
476
475
  "row-gap": "xl",
477
476
  tablet: {
478
- filter: "none",
479
477
  "flex-direction": "column",
480
478
  display: "flex",
481
479
  "justify-content": "start",
482
480
  "align-items": "start",
483
481
  },
484
482
  mobile: {
485
- filter: "none",
486
483
  "flex-direction": "column",
487
484
  width: "100%",
488
485
  },
489
- filter: "none",
486
+
490
487
  "justify-content": "space-between",
491
488
  "align-items": "start",
492
489
  width: "100%",
@@ -634,16 +631,15 @@ export const Footer3: IBlock = {
634
631
  mobile: {
635
632
  "flex-direction": "column",
636
633
  "align-items": "center",
637
- filter: "none",
634
+
638
635
  "justify-content": "center",
639
636
  display: "flex",
640
637
  },
641
- filter: "none",
638
+
642
639
  "margin-top": "base",
643
640
  "margin-bottom": "none",
644
641
  "padding-bottom": "base",
645
642
  tablet: {
646
- filter: "none",
647
643
  "flex-direction": "column",
648
644
  },
649
645
  },
@@ -654,15 +650,12 @@ export const Footer3: IBlock = {
654
650
  "column-gap": "base",
655
651
  "flex-wrap": "wrap",
656
652
  mobile: {
657
- filter: "none",
658
653
  display: "flex",
659
654
  "justify-content": "center",
660
655
  "align-items": "center",
661
656
  "row-gap": "md",
662
657
  },
663
- tablet: {
664
- filter: "none",
665
- },
658
+ tablet: {},
666
659
  },
667
660
  "bottomLinks.$.text": {
668
661
  color: "text-2",
@@ -676,7 +669,6 @@ export const Footer3: IBlock = {
676
669
  display: "flex",
677
670
  "align-items": "center",
678
671
  "column-gap": "xs",
679
- filter: "none",
680
672
  },
681
673
  "socialIcons.$.icon": {
682
674
  "object-fit": "contain",