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