@levo-so/blocks 0.1.75 → 0.1.77

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
@@ -0,0 +1,112 @@
1
+ import {
2
+ Box,
3
+ Button,
4
+ Container,
5
+ Heading,
6
+ Icon,
7
+ type ILevoBlockBaseProps,
8
+ Media,
9
+ Section,
10
+ Typography,
11
+ useContentEngine,
12
+ } from "@levo-so/studio";
13
+
14
+ import type { ICards17Content } from "./cards-17.schema";
15
+
16
+ const Cards17: React.FC<ILevoBlockBaseProps<ICards17Content>> = ({ content }) => {
17
+ const { data, meta, query, setQuery } = useContentEngine("cards");
18
+
19
+ const handleNext = () => {
20
+ const current = Math.max(1, query?.page || 1);
21
+ setQuery({ page: current + 1 });
22
+ };
23
+ const handlePrevious = () => {
24
+ const current = Math.max(1, query?.page || 1);
25
+ setQuery({ page: Math.max(1, current - 1) });
26
+ };
27
+
28
+ return (
29
+ <Section elementKey="layout">
30
+ <Container elementKey="container">
31
+ <Box elementKey="header-wrapper">
32
+ <Box elementKey="title-wrapper">
33
+ <Icon elementKey="header-icon" />
34
+ <Box elementKey="header-text-wrapper">
35
+ <Heading elementKey="header" />
36
+ <Typography elementKey="description" />
37
+ </Box>
38
+ </Box>
39
+ <Box elementKey="header-ctas_levoGroup" data-levo_group>
40
+ {content?.["header-ctas"]?.map((v, index: number) => (
41
+ <Button
42
+ key={`header-ctas.${index}`}
43
+ elementKey={`header-ctas.${index}.header-cta`}
44
+ data-levo_group_item
45
+ />
46
+ ))}
47
+ </Box>
48
+ </Box>
49
+ <Box elementKey="cards_levoGroup" data-levo_group>
50
+ {data &&
51
+ Array.isArray(data) &&
52
+ data?.map((item, index: number) => (
53
+ <Box key={`cards.${index}`} data-levo_group_item elementKey={`cards.${index}.card`}>
54
+ <Media elementKey={`cards.${index}.media`} alt="Card Media" />
55
+ <Box elementKey={`cards.${index}.card-info-wrapper`}>
56
+ <Box elementKey={`cards.${index}.card-content`}>
57
+ <Box elementKey={`cards.${index}.card-header-wrapper`}>
58
+ <Box elementKey={`cards.${index}.dateWrapper`}>
59
+ <Icon elementKey={`cards.${index}.dateIcon`} />
60
+ <Typography elementKey={`cards.${index}.date`} />
61
+ </Box>
62
+ <Box elementKey={`cards.${index}.card-header`}>
63
+ <Icon elementKey={`cards.${index}.header-icon`} />
64
+ <Typography elementKey={`cards.${index}.card-type`} />
65
+ </Box>
66
+ </Box>
67
+ <Box elementKey={`cards.${index}.card-content-wrapper`}>
68
+ <Heading elementKey={`cards.${index}.title`} />
69
+ <Typography elementKey={`cards.${index}.description`} />
70
+ </Box>
71
+ <Box elementKey={`cards.${index}.card-footer`}>
72
+ <Box elementKey={`cards.${index}.card-author`}>
73
+ <Icon elementKey={`cards.${index}.author-image`} />
74
+ <Box elementKey={`cards.${index}.author-info-wrapper`}>
75
+ <Typography elementKey={`cards.${index}.author-name`} />
76
+ <Typography elementKey={`cards.${index}.author-description`} />
77
+ </Box>
78
+ </Box>
79
+ <Box elementKey={`cards.${index}.card-reading-time-wrapper`}>
80
+ <Icon elementKey={`cards.${index}.reading-time-icon`} />
81
+ <Typography elementKey={`cards.${index}.reading-time`} />
82
+ </Box>
83
+ </Box>
84
+ </Box>
85
+ <Button elementKey={`cards.${index}.cta`} />
86
+ </Box>
87
+ </Box>
88
+ ))}
89
+ </Box>
90
+ {meta && (
91
+ <Box elementKey="pagination-wrapper">
92
+ <Button
93
+ elementKey="pagination-left"
94
+ disabled={(query?.page || 1) <= 1}
95
+ onClick={handlePrevious}
96
+ />
97
+ <Typography elementKey="pagination-text">
98
+ {`${query?.page || 1}/${meta?.pages || 0}`}
99
+ </Typography>
100
+ <Button
101
+ elementKey="pagination-right"
102
+ onClick={handleNext}
103
+ disabled={query?.page === meta?.pages}
104
+ />
105
+ </Box>
106
+ )}
107
+ </Container>
108
+ </Section>
109
+ );
110
+ };
111
+
112
+ export default Cards17;