@levo-so/blocks 0.1.54 → 0.1.59

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 (117) hide show
  1. package/package.json +2 -2
  2. package/src/blocks/about-us/about-us-1.schema.ts +14 -0
  3. package/src/blocks/about-us/about-us-1.tsx +4 -2
  4. package/src/blocks/about-us/about-us-2.schema.ts +48 -0
  5. package/src/blocks/about-us/about-us-2.tsx +6 -0
  6. package/src/blocks/blogs/blog-listing-1.schema.ts +10 -0
  7. package/src/blocks/blogs/blog-listing-2.schema.ts +42 -162
  8. package/src/blocks/blogs/blog-listing-2.tsx +7 -0
  9. package/src/blocks/blogs/blog-listing-3.schema.ts +9 -0
  10. package/src/blocks/blogs/blog-post-1.schema.ts +7 -1
  11. package/src/blocks/blogs/blog-post-1.tsx +1 -1
  12. package/src/blocks/blogs/blog-post-2.schema.ts +464 -28
  13. package/src/blocks/blogs/blog-post-2.tsx +6 -13
  14. package/src/blocks/blogs/blog-post-3.schema.ts +42 -0
  15. package/src/blocks/blogs/blog-post-3.tsx +4 -1
  16. package/src/blocks/calendar/calendar-1.schema.ts +537 -0
  17. package/src/blocks/calendar/calendar-1.tsx +145 -0
  18. package/src/blocks/cards/cards-10.schema.ts +52 -4
  19. package/src/blocks/cards/cards-10.tsx +13 -1
  20. package/src/blocks/cards/cards-14.schema.ts +532 -0
  21. package/src/blocks/cards/cards-14.tsx +54 -0
  22. package/src/blocks/cards/cards-15.schema.ts +277 -0
  23. package/src/blocks/cards/cards-15.tsx +40 -0
  24. package/src/blocks/cards/cards-6.schema.ts +46 -0
  25. package/src/blocks/cards/cards-6.tsx +27 -1
  26. package/src/blocks/cards/cards-7.tsx +2 -0
  27. package/src/blocks/carousel/carousel-2.schema.ts +1128 -0
  28. package/src/blocks/carousel/carousel-2.tsx +159 -0
  29. package/src/blocks/content/content-5.schema.ts +112 -6
  30. package/src/blocks/content/content-5.tsx +19 -3
  31. package/src/blocks/content/content-6.schema.ts +16 -3
  32. package/src/blocks/content/content-6.tsx +1 -0
  33. package/src/blocks/content/content-8.schema.ts +125 -0
  34. package/src/blocks/content/content-8.tsx +27 -0
  35. package/src/blocks/content/content-9.schema.ts +2729 -0
  36. package/src/blocks/content/content-9.tsx +91 -0
  37. package/src/blocks/cta/cta-2.schema.ts +46 -4
  38. package/src/blocks/cta/cta-2.tsx +9 -1
  39. package/src/blocks/embed/embed-1.schema.ts +100 -0
  40. package/src/blocks/event/ClientOnly.tsx +27 -0
  41. package/src/blocks/event/event-details.tsx +10 -3
  42. package/src/blocks/event/event-listing-3.tsx +9 -2
  43. package/src/blocks/event/event-listing-4.tsx +11 -2
  44. package/src/blocks/event/event-listing.tsx +11 -4
  45. package/src/blocks/faq/faq-1.schema.ts +58 -1
  46. package/src/blocks/faq/faq-1.tsx +18 -1
  47. package/src/blocks/faq/faq-2.tsx +2 -1
  48. package/src/blocks/faq/faq-3.schema.ts +6 -1
  49. package/src/blocks/faq/faq-3.tsx +1 -0
  50. package/src/blocks/features/features-1/features-1.schema.ts +2 -0
  51. package/src/blocks/features/features-1/variants/index.ts +2 -0
  52. package/src/blocks/features/features-1/variants/stylized-cards-v3.ts +451 -0
  53. package/src/blocks/features/features-4.schema.ts +358 -20
  54. package/src/blocks/features/features-4.tsx +3 -1
  55. package/src/blocks/features/features-6.tsx +2 -0
  56. package/src/blocks/filter-listing/filter-listing-1.schema.ts +614 -0
  57. package/src/blocks/filter-listing/filter-listing-1.tsx +128 -0
  58. package/src/blocks/footer/footer-6.schema.ts +2 -2
  59. package/src/blocks/hero/hero-11.schema.ts +849 -0
  60. package/src/blocks/hero/hero-11.tsx +59 -0
  61. package/src/blocks/hero/hero-12.schema.ts +712 -0
  62. package/src/blocks/hero/hero-12.tsx +76 -0
  63. package/src/blocks/hero/hero-13.schema.ts +238 -0
  64. package/src/blocks/hero/hero-13.tsx +31 -0
  65. package/src/blocks/hero/hero-4.tsx +2 -0
  66. package/src/blocks/hero/hero-5.tsx +2 -0
  67. package/src/blocks/hero/hero-7.tsx +2 -1
  68. package/src/blocks/hero/hero-8.tsx +2 -0
  69. package/src/blocks/hero/hero-9.schema.ts +5 -0
  70. package/src/blocks/hero/hero-9.tsx +2 -0
  71. package/src/blocks/index.ts +27 -0
  72. package/src/blocks/navbar/navbar-1.schema.ts +6 -6
  73. package/src/blocks/navbar/navbar-1.tsx +6 -7
  74. package/src/blocks/navbar/navbar-2.schema.ts +9 -9
  75. package/src/blocks/navbar/navbar-2.tsx +7 -8
  76. package/src/blocks/navbar/navbar-3.schema.ts +9 -9
  77. package/src/blocks/navbar/navbar-3.tsx +139 -114
  78. package/src/blocks/polling/polling-1.schema.ts +134 -0
  79. package/src/blocks/polling/polling-1.tsx +466 -0
  80. package/src/blocks/products/products-listing-2.schema.ts +596 -0
  81. package/src/blocks/products/products-listing-2.tsx +56 -0
  82. package/src/blocks/products/products-listing-3.schema.ts +818 -0
  83. package/src/blocks/products/products-listing-3.tsx +125 -0
  84. package/src/blocks/profile/profile-2.schema.ts +505 -0
  85. package/src/blocks/profile/profile-2.tsx +64 -0
  86. package/src/blocks/profile/profile-3.schema.ts +867 -0
  87. package/src/blocks/profile/profile-3.tsx +98 -0
  88. package/src/blocks/services/service-1.schema.ts +1743 -0
  89. package/src/blocks/services/service-1.tsx +139 -0
  90. package/src/blocks/services/service-2.schema.ts +433 -0
  91. package/src/blocks/services/service-2.tsx +98 -0
  92. package/src/blocks/services/service-3.schema.ts +631 -0
  93. package/src/blocks/services/service-3.tsx +135 -0
  94. package/src/blocks/tabs/tab-1.schema.ts +831 -0
  95. package/src/blocks/tabs/tab-1.tsx +126 -0
  96. package/src/blocks/tabs/tab-2.schema.ts +767 -0
  97. package/src/blocks/tabs/tab-2.tsx +60 -0
  98. package/src/blocks/team/team-3.schema.ts +5 -1
  99. package/src/blocks/team/team-3.tsx +7 -0
  100. package/src/blocks/team/team-4.schema.ts +17 -13
  101. package/src/blocks/team/team-4.tsx +4 -1
  102. package/src/blocks/team/team-5.schema.ts +369 -0
  103. package/src/blocks/team/team-5.tsx +38 -0
  104. package/src/blocks/testimonial/testimonial-1.tsx +0 -1
  105. package/src/blocks/testimonial/testimonial-2.tsx +2 -1
  106. package/src/blocks/testimonial/testimonial-3.tsx +2 -0
  107. package/src/blocks/testimonial/testimonial-4.tsx +2 -1
  108. package/src/blocks/testimonial/testimonial-5.tsx +2 -0
  109. package/src/blocks/testimonial/testimonial-6.tsx +2 -1
  110. package/src/blocks/testimonial/testimonial-7.schema.ts +438 -0
  111. package/src/blocks/testimonial/testimonial-7.tsx +125 -0
  112. package/src/blocks/timeline/timeline-1.schema.ts +741 -0
  113. package/src/blocks/timeline/timeline-1.tsx +52 -0
  114. package/src/blocks/users/edit-profile.schema.ts +294 -0
  115. package/src/blocks/users/edit-profile.tsx +184 -0
  116. package/src/schemas/blocks.ts +64 -12
  117. package/src/schemas/categories.ts +36 -0
@@ -0,0 +1,145 @@
1
+ import {
2
+ type ILevoBlockBaseProps,
3
+ Box,
4
+ Button,
5
+ Container,
6
+ Heading,
7
+ Section,
8
+ Typography,
9
+ useContentEngine,
10
+ Calendar,
11
+ } from "@levo-so/studio";
12
+ import dayjs from "dayjs";
13
+ import { useState } from "react";
14
+
15
+ import type { ICalendar1Content } from "./calendar-1.schema";
16
+
17
+ const EventCard: React.FC<{
18
+ event: ICalendar1Content["listing_section"][number];
19
+ index: number;
20
+ }> = ({ event, index }) => {
21
+ const isEndDateValid = !!(
22
+ dayjs(event?.event_ends_date).isValid() &&
23
+ dayjs(event?.event_ends_month).isValid()
24
+ );
25
+
26
+ return (
27
+ <Box elementKey={`listing_section.${index}.event`}>
28
+ <Box elementKey={`listing_section.${index}.event_timing`}>
29
+ <Box elementKey={`listing_section.${index}.event_starts`}>
30
+ <Heading elementKey={`listing_section.${index}.event_starts_date`}>
31
+ {dayjs(event?.event_starts_date).format("DD")}
32
+ </Heading>
33
+ <Typography
34
+ elementKey={`listing_section.${index}.event_starts_month`}
35
+ >
36
+ {dayjs(event?.event_starts_date).format("MMMM")}
37
+ </Typography>
38
+ </Box>
39
+ {isEndDateValid && (
40
+ <>
41
+ <Typography elementKey={`listing_section.${index}.event_to`} />
42
+ <Box elementKey={`listing_section.${index}.event_ends`}>
43
+ <Heading elementKey={`listing_section.${index}.event_ends_date`}>
44
+ {dayjs(event?.event_ends_date).format("DD")}
45
+ </Heading>
46
+ <Typography
47
+ elementKey={`listing_section.${index}.event_ends_month`}
48
+ >
49
+ {dayjs(event?.event_ends_month).format("MMMM")}
50
+ </Typography>
51
+ </Box>
52
+ </>
53
+ )}
54
+ </Box>
55
+ <Box elementKey={`listing_section.${index}.divider`} />
56
+ <Box elementKey={`listing_section.${index}.event_content`}>
57
+ <Heading elementKey={`listing_section.${index}.event_category`} />
58
+ <Box elementKey={`listing_section.${index}.event_sub_content`}>
59
+ <Heading elementKey={`listing_section.${index}.event_title`} />
60
+ <Typography
61
+ elementKey={`listing_section.${index}.event_description`}
62
+ />
63
+ </Box>
64
+ </Box>
65
+ </Box>
66
+ );
67
+ };
68
+
69
+ const Calendar1: React.FC<ILevoBlockBaseProps<ICalendar1Content>> = () => {
70
+ const { data, query, setQuery } = useContentEngine("listing_section");
71
+
72
+ const [calendarMonth, setCalendarMonth] = useState<Date>(new Date());
73
+
74
+ const dateList = data
75
+ ?.map((v: any) => v?.event_starts_date)
76
+ ?.filter((v: any) => dayjs(v)?.isValid())
77
+ ?.map((v: any) => new Date(v));
78
+
79
+ const handleMonthChange = (date: Date) => {
80
+ setCalendarMonth(date);
81
+ setQuery({
82
+ ...query,
83
+ limit: -1,
84
+ where: {
85
+ ...(query?.where ?? {}),
86
+ AND: [
87
+ {
88
+ starts_at: {
89
+ gte: dayjs(date).startOf("month").format(),
90
+ },
91
+ },
92
+ {
93
+ ends_at: {
94
+ lte: dayjs(date).endOf("month").format(),
95
+ },
96
+ },
97
+ ],
98
+ },
99
+ });
100
+ };
101
+
102
+ return (
103
+ <Section elementKey="layout">
104
+ <Container elementKey="container">
105
+ <Box elementKey="header">
106
+ <Heading elementKey="title" />
107
+ <Typography elementKey="description" />
108
+ </Box>
109
+ <Box elementKey="content">
110
+ <Box elementKey="listing_section_levoGroup" data-levo_group>
111
+ {(data ?? [])?.map((item: any, index: number) => {
112
+ return (
113
+ <EventCard
114
+ key={`listing_section.${index}`}
115
+ index={index}
116
+ event={item}
117
+ />
118
+ );
119
+ })}
120
+ </Box>
121
+ <Box elementKey="calendar_section">
122
+ <Box elementKey="calendar_header">
123
+ <Heading elementKey="calendar_title" />
124
+ <Typography elementKey="calendar_description" />
125
+ </Box>
126
+ <Box elementKey="calendar">
127
+ <Calendar
128
+ selected={dateList}
129
+ onSelect={() => {
130
+ return;
131
+ }}
132
+ mode="multiple"
133
+ month={calendarMonth}
134
+ onMonthChange={handleMonthChange}
135
+ />
136
+ </Box>
137
+ <Button elementKey="calendar_cta" />
138
+ </Box>
139
+ </Box>
140
+ </Container>
141
+ </Section>
142
+ );
143
+ };
144
+
145
+ export default Calendar1;
@@ -46,6 +46,11 @@ const DEFAULT_CONTENT = {
46
46
  },
47
47
  description:
48
48
  "Scalable cloud solutions that grow with your business needs and ensure 99.9% uptime reliability.",
49
+ buttons: [
50
+ {
51
+ text: "Learn More",
52
+ },
53
+ ],
49
54
  },
50
55
  {
51
56
  card: null,
@@ -84,6 +89,11 @@ const DEFAULT_CONTENT = {
84
89
  },
85
90
  description:
86
91
  "Scalable cloud solutions that grow with your business needs and ensure 99.9% uptime reliability.",
92
+ buttons: [
93
+ {
94
+ text: "Learn More",
95
+ },
96
+ ],
87
97
  },
88
98
  {
89
99
  card: null,
@@ -122,6 +132,11 @@ const DEFAULT_CONTENT = {
122
132
  },
123
133
  description:
124
134
  "Scalable cloud solutions that grow with your business needs and ensure 99.9% uptime reliability.",
135
+ buttons: [
136
+ {
137
+ text: "Learn More",
138
+ },
139
+ ],
125
140
  },
126
141
  ],
127
142
  };
@@ -174,7 +189,7 @@ const CTA_DEFAULT_CONTENT = {
174
189
  mimetype: "image/png",
175
190
  },
176
191
  description:
177
- "<p>Softype delivers full-cycle Oracle ERP implementation services designed to minimize disruption and maximize ROI.</p>",
192
+ "<p>Lorem Ipsum delivers full-cycle Oracle ERP implementation services designed to minimize disruption and maximize ROI.</p>",
178
193
  },
179
194
  {
180
195
  card: null,
@@ -216,7 +231,7 @@ const CTA_DEFAULT_CONTENT = {
216
231
  mimetype: "image/png",
217
232
  },
218
233
  description:
219
- "<p>Softype delivers full-cycle Oracle ERP implementation services designed to minimize disruption and maximize ROI.</p>",
234
+ "<p>Lorem Ipsum delivers full-cycle Oracle ERP implementation services designed to minimize disruption and maximize ROI.</p>",
220
235
  },
221
236
  {
222
237
  card: null,
@@ -258,7 +273,7 @@ const CTA_DEFAULT_CONTENT = {
258
273
  mimetype: "image/png",
259
274
  },
260
275
  description:
261
- "<p>Softype delivers full-cycle Oracle ERP implementation services designed to minimize disruption and maximize ROI.</p>",
276
+ "<p>Lorem Ipsum delivers full-cycle Oracle ERP implementation services designed to minimize disruption and maximize ROI.</p>",
262
277
  },
263
278
  {
264
279
  card: null,
@@ -300,7 +315,7 @@ const CTA_DEFAULT_CONTENT = {
300
315
  mimetype: "image/png",
301
316
  },
302
317
  description:
303
- "<p>Softype delivers full-cycle Oracle ERP implementation services designed to minimize disruption and maximize ROI.</p>",
318
+ "<p>Lorem Ipsum delivers full-cycle Oracle ERP implementation services designed to minimize disruption and maximize ROI.</p>",
304
319
  },
305
320
  ],
306
321
  cta: "Explore All services",
@@ -386,6 +401,19 @@ export const Cards10: IBlock = {
386
401
  label: "Description",
387
402
  field_interface: "TypographyWidget",
388
403
  },
404
+ {
405
+ key: "buttons",
406
+ label: "Buttons",
407
+ kind: "group",
408
+ field_interface: "BoxWidget",
409
+ fields: [
410
+ {
411
+ key: "text",
412
+ label: "Button",
413
+ field_interface: "ButtonWidget",
414
+ },
415
+ ],
416
+ },
389
417
  ],
390
418
  },
391
419
  ],
@@ -431,6 +459,7 @@ export const Cards10: IBlock = {
431
459
  },
432
460
  "text-align": "left",
433
461
  },
462
+
434
463
  cards_grid: {
435
464
  width: "100%",
436
465
  },
@@ -485,6 +514,24 @@ export const Cards10: IBlock = {
485
514
  color: "text-2",
486
515
  "line-height": "1.6",
487
516
  },
517
+ "cards.$.buttons_levoGroup": {
518
+ display: "flex",
519
+ "flex-direction": "row",
520
+ "column-gap": "base",
521
+ mobile: {
522
+ "flex-direction": "column",
523
+ "row-gap": "sm",
524
+ },
525
+ },
526
+ "cards.$.buttons": [
527
+ {
528
+ text: {
529
+ selectedVariants: {
530
+ Button_Variants: "Primary",
531
+ },
532
+ },
533
+ },
534
+ ],
488
535
  cards: [
489
536
  {
490
537
  header: {
@@ -654,6 +701,7 @@ export const Cards10: IBlock = {
654
701
  },
655
702
  "text-align": "left",
656
703
  },
704
+
657
705
  cards_grid: {
658
706
  width: "100%",
659
707
  },
@@ -25,7 +25,7 @@ const Cards10: React.FC<ILevoBlockBaseProps<ICards10Content>> = ({
25
25
  </Box>
26
26
  <Box elementKey="cards_grid">
27
27
  <Box elementKey="cards_levoGroup" data-levo_group>
28
- {(content?.cards ?? []).map((_: any, index: number) => (
28
+ {(content?.cards ?? []).map((card: any, index: number) => (
29
29
  <Box
30
30
  key={`cards-10-card-${index}`}
31
31
  data-levo_group_item
@@ -37,6 +37,18 @@ const Cards10: React.FC<ILevoBlockBaseProps<ICards10Content>> = ({
37
37
  </Box>
38
38
  <Image elementKey={`cards.${index}.image`} alt="Card image" />
39
39
  <Typography elementKey={`cards.${index}.description`} />
40
+ <Box
41
+ elementKey={`cards.${index}.buttons_levoGroup`}
42
+ data-levo_group
43
+ >
44
+ {(card?.buttons ?? []).map((_: any, btnIndex: number) => (
45
+ <Button
46
+ key={btnIndex}
47
+ data-levo_group_item
48
+ elementKey={`cards.${index}.buttons.${btnIndex}.text`}
49
+ />
50
+ ))}
51
+ </Box>
40
52
  </Box>
41
53
  ))}
42
54
  </Box>