@levo-so/blocks 0.1.54 → 0.1.58
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/package.json +2 -2
- package/src/blocks/about-us/about-us-1.schema.ts +14 -0
- package/src/blocks/about-us/about-us-1.tsx +4 -2
- package/src/blocks/about-us/about-us-2.schema.ts +48 -0
- package/src/blocks/about-us/about-us-2.tsx +6 -0
- package/src/blocks/blogs/blog-listing-1.schema.ts +10 -0
- package/src/blocks/blogs/blog-listing-2.schema.ts +42 -162
- package/src/blocks/blogs/blog-listing-2.tsx +7 -0
- package/src/blocks/blogs/blog-listing-3.schema.ts +9 -0
- package/src/blocks/blogs/blog-post-1.schema.ts +7 -1
- package/src/blocks/blogs/blog-post-1.tsx +1 -1
- package/src/blocks/blogs/blog-post-2.schema.ts +464 -28
- package/src/blocks/blogs/blog-post-2.tsx +6 -13
- package/src/blocks/blogs/blog-post-3.schema.ts +42 -0
- package/src/blocks/blogs/blog-post-3.tsx +4 -1
- package/src/blocks/calendar/calendar-1.schema.ts +537 -0
- package/src/blocks/calendar/calendar-1.tsx +145 -0
- package/src/blocks/cards/cards-10.schema.ts +52 -4
- package/src/blocks/cards/cards-10.tsx +13 -1
- package/src/blocks/cards/cards-14.schema.ts +532 -0
- package/src/blocks/cards/cards-14.tsx +54 -0
- package/src/blocks/cards/cards-15.schema.ts +277 -0
- package/src/blocks/cards/cards-15.tsx +40 -0
- package/src/blocks/cards/cards-6.schema.ts +46 -0
- package/src/blocks/cards/cards-6.tsx +27 -1
- package/src/blocks/cards/cards-7.tsx +2 -0
- package/src/blocks/carousel/carousel-2.schema.ts +1128 -0
- package/src/blocks/carousel/carousel-2.tsx +159 -0
- package/src/blocks/content/content-5.schema.ts +112 -6
- package/src/blocks/content/content-5.tsx +19 -3
- package/src/blocks/content/content-6.schema.ts +16 -3
- package/src/blocks/content/content-6.tsx +1 -0
- package/src/blocks/content/content-8.schema.ts +125 -0
- package/src/blocks/content/content-8.tsx +27 -0
- package/src/blocks/content/content-9.schema.ts +2729 -0
- package/src/blocks/content/content-9.tsx +91 -0
- package/src/blocks/cta/cta-2.schema.ts +46 -4
- package/src/blocks/cta/cta-2.tsx +9 -1
- package/src/blocks/embed/embed-1.schema.ts +100 -0
- package/src/blocks/event/ClientOnly.tsx +27 -0
- package/src/blocks/event/event-details.tsx +10 -3
- package/src/blocks/event/event-listing-3.tsx +9 -2
- package/src/blocks/event/event-listing-4.tsx +11 -2
- package/src/blocks/event/event-listing.tsx +11 -4
- package/src/blocks/faq/faq-1.schema.ts +58 -1
- package/src/blocks/faq/faq-1.tsx +18 -1
- package/src/blocks/faq/faq-2.tsx +2 -1
- package/src/blocks/faq/faq-3.schema.ts +6 -1
- package/src/blocks/faq/faq-3.tsx +1 -0
- package/src/blocks/features/features-1/features-1.schema.ts +2 -0
- package/src/blocks/features/features-1/variants/index.ts +2 -0
- package/src/blocks/features/features-1/variants/stylized-cards-v3.ts +451 -0
- package/src/blocks/features/features-4.schema.ts +358 -20
- package/src/blocks/features/features-4.tsx +3 -1
- package/src/blocks/features/features-6.tsx +2 -0
- package/src/blocks/filter-listing/filter-listing-1.schema.ts +614 -0
- package/src/blocks/filter-listing/filter-listing-1.tsx +128 -0
- package/src/blocks/footer/footer-6.schema.ts +2 -2
- package/src/blocks/hero/hero-11.schema.ts +849 -0
- package/src/blocks/hero/hero-11.tsx +59 -0
- package/src/blocks/hero/hero-12.schema.ts +712 -0
- package/src/blocks/hero/hero-12.tsx +76 -0
- package/src/blocks/hero/hero-13.schema.ts +238 -0
- package/src/blocks/hero/hero-13.tsx +31 -0
- package/src/blocks/hero/hero-4.tsx +2 -0
- package/src/blocks/hero/hero-5.tsx +2 -0
- package/src/blocks/hero/hero-7.tsx +2 -1
- package/src/blocks/hero/hero-8.tsx +2 -0
- package/src/blocks/hero/hero-9.schema.ts +5 -0
- package/src/blocks/hero/hero-9.tsx +2 -0
- package/src/blocks/index.ts +27 -0
- package/src/blocks/navbar/navbar-1.schema.ts +6 -6
- package/src/blocks/navbar/navbar-1.tsx +6 -7
- package/src/blocks/navbar/navbar-2.schema.ts +9 -9
- package/src/blocks/navbar/navbar-2.tsx +7 -8
- package/src/blocks/navbar/navbar-3.schema.ts +9 -9
- package/src/blocks/navbar/navbar-3.tsx +139 -114
- package/src/blocks/polling/polling-1.schema.ts +134 -0
- package/src/blocks/polling/polling-1.tsx +466 -0
- package/src/blocks/products/products-listing-2.schema.ts +596 -0
- package/src/blocks/products/products-listing-2.tsx +56 -0
- package/src/blocks/products/products-listing-3.schema.ts +818 -0
- package/src/blocks/products/products-listing-3.tsx +125 -0
- package/src/blocks/profile/profile-2.schema.ts +505 -0
- package/src/blocks/profile/profile-2.tsx +64 -0
- package/src/blocks/profile/profile-3.schema.ts +867 -0
- package/src/blocks/profile/profile-3.tsx +98 -0
- package/src/blocks/services/service-1.schema.ts +1743 -0
- package/src/blocks/services/service-1.tsx +139 -0
- package/src/blocks/services/service-2.schema.ts +433 -0
- package/src/blocks/services/service-2.tsx +98 -0
- package/src/blocks/services/service-3.schema.ts +631 -0
- package/src/blocks/services/service-3.tsx +135 -0
- package/src/blocks/tabs/tab-1.schema.ts +831 -0
- package/src/blocks/tabs/tab-1.tsx +126 -0
- package/src/blocks/tabs/tab-2.schema.ts +767 -0
- package/src/blocks/tabs/tab-2.tsx +60 -0
- package/src/blocks/team/team-3.schema.ts +5 -1
- package/src/blocks/team/team-3.tsx +7 -0
- package/src/blocks/team/team-4.schema.ts +17 -13
- package/src/blocks/team/team-4.tsx +4 -1
- package/src/blocks/team/team-5.schema.ts +369 -0
- package/src/blocks/team/team-5.tsx +38 -0
- package/src/blocks/testimonial/testimonial-1.tsx +0 -1
- package/src/blocks/testimonial/testimonial-2.tsx +2 -1
- package/src/blocks/testimonial/testimonial-3.tsx +2 -0
- package/src/blocks/testimonial/testimonial-4.tsx +2 -1
- package/src/blocks/testimonial/testimonial-5.tsx +2 -0
- package/src/blocks/testimonial/testimonial-6.tsx +2 -1
- package/src/blocks/testimonial/testimonial-7.schema.ts +438 -0
- package/src/blocks/testimonial/testimonial-7.tsx +125 -0
- package/src/blocks/timeline/timeline-1.schema.ts +741 -0
- package/src/blocks/timeline/timeline-1.tsx +52 -0
- package/src/blocks/users/edit-profile.schema.ts +294 -0
- package/src/blocks/users/edit-profile.tsx +184 -0
- package/src/schemas/blocks.ts +64 -12
- package/src/schemas/categories.ts +36 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type ILevoBlockBaseProps,
|
|
3
|
+
Heading,
|
|
4
|
+
Icon,
|
|
5
|
+
Image,
|
|
6
|
+
Typography,
|
|
7
|
+
Container,
|
|
8
|
+
Section,
|
|
9
|
+
Box,
|
|
10
|
+
AccordionRoot,
|
|
11
|
+
AccordionItem,
|
|
12
|
+
AccordionTrigger,
|
|
13
|
+
AccordionContent,
|
|
14
|
+
Button,
|
|
15
|
+
} from "@levo-so/studio";
|
|
16
|
+
|
|
17
|
+
import type { IService1Content } from "./service-1.schema";
|
|
18
|
+
|
|
19
|
+
const Service1: React.FC<ILevoBlockBaseProps<IService1Content>> = ({
|
|
20
|
+
content,
|
|
21
|
+
}) => (
|
|
22
|
+
<Section elementKey="layout">
|
|
23
|
+
<Container elementKey="container">
|
|
24
|
+
<Box elementKey="main-wrapper">
|
|
25
|
+
<Box elementKey="left-container">
|
|
26
|
+
<Box elementKey="content-box">
|
|
27
|
+
<Heading elementKey="main-title" />
|
|
28
|
+
|
|
29
|
+
<AccordionRoot
|
|
30
|
+
type="single"
|
|
31
|
+
elementKey="services-accordion_levoGroup"
|
|
32
|
+
data-levo_group
|
|
33
|
+
defaultValue={`item-0`}
|
|
34
|
+
>
|
|
35
|
+
{(content?.["services-accordion"] ?? []).map((_, index) => (
|
|
36
|
+
<AccordionItem
|
|
37
|
+
value={`item-${index}`}
|
|
38
|
+
key={index}
|
|
39
|
+
elementKey={`services-accordion.${index}.wrapper`}
|
|
40
|
+
data-levo_group_item
|
|
41
|
+
>
|
|
42
|
+
<AccordionTrigger
|
|
43
|
+
elementKey={`services-accordion.${index}.trigger`}
|
|
44
|
+
>
|
|
45
|
+
<Box
|
|
46
|
+
elementKey={`services-accordion.${index}.iconQuestionWrapper`}
|
|
47
|
+
>
|
|
48
|
+
<Typography
|
|
49
|
+
elementKey={`services-accordion.${index}.question`}
|
|
50
|
+
/>
|
|
51
|
+
</Box>
|
|
52
|
+
</AccordionTrigger>
|
|
53
|
+
<AccordionContent
|
|
54
|
+
elementKey={`services-accordion.${index}.content`}
|
|
55
|
+
>
|
|
56
|
+
<Typography
|
|
57
|
+
elementKey={`services-accordion.${index}.answer`}
|
|
58
|
+
/>
|
|
59
|
+
</AccordionContent>
|
|
60
|
+
</AccordionItem>
|
|
61
|
+
))}
|
|
62
|
+
</AccordionRoot>
|
|
63
|
+
</Box>
|
|
64
|
+
|
|
65
|
+
<Box elementKey="features-section">
|
|
66
|
+
<Heading elementKey="features-title" />
|
|
67
|
+
<Box elementKey="features-list_levoGroup" data-levo_group>
|
|
68
|
+
{(content?.["features-list"] ?? []).map((_, index) => (
|
|
69
|
+
<Typography
|
|
70
|
+
key={index}
|
|
71
|
+
elementKey={`features-list.${index}.title`}
|
|
72
|
+
/>
|
|
73
|
+
))}
|
|
74
|
+
</Box>
|
|
75
|
+
</Box>
|
|
76
|
+
</Box>
|
|
77
|
+
|
|
78
|
+
<Box elementKey="right-container">
|
|
79
|
+
<Box elementKey="service-cards_levoGroup" data-levo_group>
|
|
80
|
+
{(content?.["service-cards"] ?? []).map((_, cardIndex) => (
|
|
81
|
+
<Box
|
|
82
|
+
key={cardIndex}
|
|
83
|
+
data-levo_group_item
|
|
84
|
+
elementKey={`service-cards.${cardIndex}.card-container`}
|
|
85
|
+
>
|
|
86
|
+
<Heading elementKey={`service-cards.${cardIndex}.title`} />
|
|
87
|
+
<Image
|
|
88
|
+
elementKey={`service-cards.${cardIndex}.image`}
|
|
89
|
+
alt={`Service ${cardIndex + 1} image`}
|
|
90
|
+
/>
|
|
91
|
+
<Typography
|
|
92
|
+
elementKey={`service-cards.${cardIndex}.description`}
|
|
93
|
+
/>
|
|
94
|
+
<Button elementKey={`service-cards.${cardIndex}.cta`} />
|
|
95
|
+
|
|
96
|
+
{content?.["service-cards"]?.[cardIndex]?.[
|
|
97
|
+
"service-features"
|
|
98
|
+
] && (
|
|
99
|
+
<Box
|
|
100
|
+
elementKey={`service-cards.${cardIndex}.service-features_levoGroup`}
|
|
101
|
+
data-levo_group
|
|
102
|
+
>
|
|
103
|
+
{(
|
|
104
|
+
content?.["service-cards"]?.[cardIndex]?.[
|
|
105
|
+
"service-features"
|
|
106
|
+
] ?? []
|
|
107
|
+
).map((_, featureIndex) => (
|
|
108
|
+
<Box
|
|
109
|
+
key={`feature-${featureIndex}`}
|
|
110
|
+
data-levo_group_item
|
|
111
|
+
elementKey={`service-cards.${cardIndex}.service-features.${featureIndex}.feature-container`}
|
|
112
|
+
>
|
|
113
|
+
<Icon
|
|
114
|
+
elementKey={`service-cards.${cardIndex}.service-features.${featureIndex}.icon`}
|
|
115
|
+
/>
|
|
116
|
+
<Box
|
|
117
|
+
elementKey={`service-cards.${cardIndex}.service-features.${featureIndex}.text-container`}
|
|
118
|
+
>
|
|
119
|
+
<Typography
|
|
120
|
+
elementKey={`service-cards.${cardIndex}.service-features.${featureIndex}.title`}
|
|
121
|
+
/>
|
|
122
|
+
<Typography
|
|
123
|
+
elementKey={`service-cards.${cardIndex}.service-features.${featureIndex}.description`}
|
|
124
|
+
/>
|
|
125
|
+
</Box>
|
|
126
|
+
</Box>
|
|
127
|
+
))}
|
|
128
|
+
</Box>
|
|
129
|
+
)}
|
|
130
|
+
</Box>
|
|
131
|
+
))}
|
|
132
|
+
</Box>
|
|
133
|
+
</Box>
|
|
134
|
+
</Box>
|
|
135
|
+
</Container>
|
|
136
|
+
</Section>
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
export default Service1;
|
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
import type { IBlock } from "@levo-so/studio";
|
|
2
|
+
const DUMMY_IMAGE = {
|
|
3
|
+
id: "7141014160938075687",
|
|
4
|
+
location: "https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH.png",
|
|
5
|
+
kind: "image",
|
|
6
|
+
mimetype: "image/png",
|
|
7
|
+
srcset: {
|
|
8
|
+
"1080w":
|
|
9
|
+
"https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-1080w.webp",
|
|
10
|
+
"1200w":
|
|
11
|
+
"https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-1200w.webp",
|
|
12
|
+
"1920w":
|
|
13
|
+
"https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-1920w.webp",
|
|
14
|
+
"320w": "https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-320w.webp",
|
|
15
|
+
"640w": "https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-640w.webp",
|
|
16
|
+
"750w": "https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-750w.webp",
|
|
17
|
+
"828w": "https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-828w.webp",
|
|
18
|
+
path: "https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-640w.webp 640w, https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-1080w.webp 1080w, https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-1200w.webp 1200w, https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-1920w.webp 1920w, https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-320w.webp 320w, https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-750w.webp 750w, https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-828w.webp 828w",
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
const DEFAULT_CONTENT = {
|
|
22
|
+
layout: null,
|
|
23
|
+
container: null,
|
|
24
|
+
main_wrapper: null,
|
|
25
|
+
left_container: null,
|
|
26
|
+
content_wrapper: null,
|
|
27
|
+
label: "Professional Services",
|
|
28
|
+
title: "Expert Business Consulting Solutions",
|
|
29
|
+
description:
|
|
30
|
+
"Strategic consulting services that drive growth and innovation for your business. Our expert team delivers tailored solutions for sustainable success.",
|
|
31
|
+
cta: "Get Started",
|
|
32
|
+
stats_container: null,
|
|
33
|
+
stats: [
|
|
34
|
+
{
|
|
35
|
+
stat_wrapper: null,
|
|
36
|
+
value: "500+",
|
|
37
|
+
label: "Clients Served",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
stat_wrapper: null,
|
|
41
|
+
value: "15+",
|
|
42
|
+
label: "Years Experience",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
stat_wrapper: null,
|
|
46
|
+
value: "98%",
|
|
47
|
+
label: "Success Rate",
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
search_input_wrapper: null,
|
|
51
|
+
search_button: "Search",
|
|
52
|
+
right_container: null,
|
|
53
|
+
hero_image: DUMMY_IMAGE,
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export type IService2Content = typeof DEFAULT_CONTENT;
|
|
57
|
+
|
|
58
|
+
export const Service2: IBlock = {
|
|
59
|
+
category_id: "services",
|
|
60
|
+
title: "Service 2",
|
|
61
|
+
key: "service-2",
|
|
62
|
+
version: "v1",
|
|
63
|
+
prompt_description:
|
|
64
|
+
"Two-column service section with left side content including title, description, CTA button, statistics grid, and file upload, paired with a large service image on the right side.",
|
|
65
|
+
content_schema: [
|
|
66
|
+
{
|
|
67
|
+
key: "layout",
|
|
68
|
+
label: "Layout",
|
|
69
|
+
field_interface: "LayoutWidget",
|
|
70
|
+
hint: {
|
|
71
|
+
prompt_description:
|
|
72
|
+
"Overall service section layout controlling spacing, background, and structure for the two-column layout.",
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
key: "container",
|
|
77
|
+
label: "Container",
|
|
78
|
+
field_interface: "ContainerWidget",
|
|
79
|
+
hint: {
|
|
80
|
+
prompt_description:
|
|
81
|
+
"Main container for centering and constraining the service section content width.",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
key: "main_wrapper",
|
|
86
|
+
label: "Main Wrapper",
|
|
87
|
+
field_interface: "BoxWidget",
|
|
88
|
+
hint: {
|
|
89
|
+
prompt_description:
|
|
90
|
+
"Primary wrapper containing both left content and right image sections in a flex row layout.",
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
key: "left_container",
|
|
95
|
+
label: "Left Container",
|
|
96
|
+
field_interface: "BoxWidget",
|
|
97
|
+
hint: {
|
|
98
|
+
prompt_description:
|
|
99
|
+
"Left side container holding the main content including title, description, CTA, statistics, and file upload.",
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
key: "content_wrapper",
|
|
104
|
+
label: "Content Wrapper",
|
|
105
|
+
field_interface: "BoxWidget",
|
|
106
|
+
hint: {
|
|
107
|
+
prompt_description:
|
|
108
|
+
"Wrapper for the main content elements (title, description, CTA) with proper vertical spacing.",
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
key: "label",
|
|
113
|
+
label: "Label",
|
|
114
|
+
field_interface: "TypographyWidget",
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
key: "title",
|
|
118
|
+
label: "Service Title",
|
|
119
|
+
field_interface: "HeadingWidget",
|
|
120
|
+
hint: {
|
|
121
|
+
prompt_description:
|
|
122
|
+
"Main service headline that communicates the primary value proposition. Should be compelling and professional.",
|
|
123
|
+
min_characters: 30,
|
|
124
|
+
max_characters: 60,
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
key: "description",
|
|
129
|
+
label: "Service Description",
|
|
130
|
+
field_interface: "TypographyWidget",
|
|
131
|
+
hint: {
|
|
132
|
+
prompt_description:
|
|
133
|
+
"Supporting text that elaborates on the main headline, providing additional context and service benefits.",
|
|
134
|
+
min_characters: 80,
|
|
135
|
+
max_characters: 200,
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
key: "cta",
|
|
140
|
+
label: "Call to Action",
|
|
141
|
+
field_interface: "ButtonWidget",
|
|
142
|
+
hint: {
|
|
143
|
+
prompt_description:
|
|
144
|
+
"Primary action button that encourages user engagement. Should be clear and action-oriented.",
|
|
145
|
+
min_characters: 8,
|
|
146
|
+
max_characters: 20,
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
key: "stats_container",
|
|
151
|
+
label: "Stats Container",
|
|
152
|
+
field_interface: "BoxWidget",
|
|
153
|
+
hint: {
|
|
154
|
+
prompt_description:
|
|
155
|
+
"Container for the statistics section providing proper spacing and layout structure.",
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
key: "stats",
|
|
160
|
+
label: "Statistics",
|
|
161
|
+
field_interface: "BoxWidget",
|
|
162
|
+
kind: "group",
|
|
163
|
+
hint: {
|
|
164
|
+
prompt_description:
|
|
165
|
+
"Collection of key metrics or achievements that build credibility and trust with potential customers.",
|
|
166
|
+
min_items: 3,
|
|
167
|
+
max_items: 4,
|
|
168
|
+
},
|
|
169
|
+
fields: [
|
|
170
|
+
{
|
|
171
|
+
key: "stat_wrapper",
|
|
172
|
+
label: "Stat Wrapper",
|
|
173
|
+
field_interface: "BoxWidget",
|
|
174
|
+
hint: {
|
|
175
|
+
prompt_description:
|
|
176
|
+
"Individual statistic container with proper vertical alignment for value and label.",
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
key: "icon",
|
|
181
|
+
label: "Icon",
|
|
182
|
+
field_interface: "IconWidget",
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
key: "value",
|
|
186
|
+
label: "Stat Value",
|
|
187
|
+
field_interface: "HeadingWidget",
|
|
188
|
+
hint: {
|
|
189
|
+
prompt_description:
|
|
190
|
+
"The numerical value or percentage that represents the achievement or metric (e.g., '500+', '15+').",
|
|
191
|
+
min_characters: 2,
|
|
192
|
+
max_characters: 8,
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
key: "label",
|
|
197
|
+
label: "Stat Label",
|
|
198
|
+
field_interface: "TypographyWidget",
|
|
199
|
+
hint: {
|
|
200
|
+
prompt_description:
|
|
201
|
+
"Descriptive text explaining what the statistic represents (e.g., 'Clients Served', 'Years Experience').",
|
|
202
|
+
min_characters: 10,
|
|
203
|
+
max_characters: 30,
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
],
|
|
207
|
+
},
|
|
208
|
+
|
|
209
|
+
{
|
|
210
|
+
key: "search_input_wrapper",
|
|
211
|
+
label: "Search Input Wrapper",
|
|
212
|
+
field_interface: "BoxWidget",
|
|
213
|
+
hint: {
|
|
214
|
+
prompt_description: "Wrapper for the zipcode search input container.",
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
key: "search_button",
|
|
219
|
+
label: "Search Button",
|
|
220
|
+
field_interface: "ButtonWidget",
|
|
221
|
+
hint: {
|
|
222
|
+
prompt_description:
|
|
223
|
+
"Button that initiates the search based on entered zipcode.",
|
|
224
|
+
min_characters: 8,
|
|
225
|
+
max_characters: 20,
|
|
226
|
+
},
|
|
227
|
+
custom_fields: [
|
|
228
|
+
{
|
|
229
|
+
key: "redirect_url",
|
|
230
|
+
label: "Redirect URL",
|
|
231
|
+
field_interface: "TextWidget",
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
key: "zipcode_param",
|
|
235
|
+
label: "Zipcode Parameter",
|
|
236
|
+
field_interface: "TextWidget",
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
key: "other_params",
|
|
240
|
+
label: "Other Parameters",
|
|
241
|
+
field_interface: "TextWidget",
|
|
242
|
+
},
|
|
243
|
+
],
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
key: "right_container",
|
|
247
|
+
label: "Right Container",
|
|
248
|
+
field_interface: "BoxWidget",
|
|
249
|
+
hint: {
|
|
250
|
+
prompt_description:
|
|
251
|
+
"Right side container holding the service image with appropriate sizing and positioning.",
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
key: "hero_image",
|
|
256
|
+
label: "Service Image",
|
|
257
|
+
field_interface: "ImageWidget",
|
|
258
|
+
hint: {
|
|
259
|
+
prompt_description:
|
|
260
|
+
"Large, high-quality image that visually represents the service or creates professional connection with the audience.",
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
],
|
|
264
|
+
layouts: [
|
|
265
|
+
{
|
|
266
|
+
title: "Default",
|
|
267
|
+
key: "default",
|
|
268
|
+
styles: {
|
|
269
|
+
layout: {
|
|
270
|
+
"padding-top": "5xl",
|
|
271
|
+
"padding-bottom": "5xl",
|
|
272
|
+
"padding-left": "xl",
|
|
273
|
+
"padding-right": "xl",
|
|
274
|
+
"background-color": "oklch(0.9643 0.0169 61.9599)",
|
|
275
|
+
tablet: {
|
|
276
|
+
"padding-top": "4xl",
|
|
277
|
+
"padding-bottom": "4xl",
|
|
278
|
+
"padding-left": "lg",
|
|
279
|
+
"padding-right": "lg",
|
|
280
|
+
},
|
|
281
|
+
mobile: {
|
|
282
|
+
"padding-top": "3xl",
|
|
283
|
+
"padding-bottom": "3xl",
|
|
284
|
+
"padding-left": "base",
|
|
285
|
+
"padding-right": "base",
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
container: {
|
|
289
|
+
"max-width": "1280px",
|
|
290
|
+
"margin-left": "auto",
|
|
291
|
+
"margin-right": "auto",
|
|
292
|
+
},
|
|
293
|
+
main_wrapper: {
|
|
294
|
+
display: "flex",
|
|
295
|
+
"align-items": "center",
|
|
296
|
+
"column-gap": "4xl",
|
|
297
|
+
tablet: {
|
|
298
|
+
"column-gap": "3xl",
|
|
299
|
+
},
|
|
300
|
+
mobile: {
|
|
301
|
+
"flex-direction": "column",
|
|
302
|
+
"row-gap": "3xl",
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
left_container: {
|
|
306
|
+
flex: "1",
|
|
307
|
+
display: "flex",
|
|
308
|
+
"flex-direction": "column",
|
|
309
|
+
"row-gap": "3xl",
|
|
310
|
+
},
|
|
311
|
+
content_wrapper: {
|
|
312
|
+
display: "flex",
|
|
313
|
+
"flex-direction": "column",
|
|
314
|
+
"row-gap": "lg",
|
|
315
|
+
},
|
|
316
|
+
label: {
|
|
317
|
+
"background-color": "brand",
|
|
318
|
+
width: "fit-content",
|
|
319
|
+
"border-radius": "3xl",
|
|
320
|
+
"padding-left": "2xs",
|
|
321
|
+
"padding-right": "2xs",
|
|
322
|
+
"padding-top": "4xs",
|
|
323
|
+
"padding-bottom": "4xs",
|
|
324
|
+
color: "white",
|
|
325
|
+
},
|
|
326
|
+
title: {
|
|
327
|
+
color: "text-1",
|
|
328
|
+
},
|
|
329
|
+
description: {
|
|
330
|
+
color: "text-2",
|
|
331
|
+
},
|
|
332
|
+
cta: {
|
|
333
|
+
"background-color": "oklch(0.3451 0.1175 164.4309)",
|
|
334
|
+
color: "white",
|
|
335
|
+
"padding-top": "sm",
|
|
336
|
+
"padding-bottom": "sm",
|
|
337
|
+
"padding-left": "lg",
|
|
338
|
+
"padding-right": "lg",
|
|
339
|
+
"align-self": "flex-start",
|
|
340
|
+
},
|
|
341
|
+
stats_container: {
|
|
342
|
+
display: "flex",
|
|
343
|
+
"flex-direction": "column",
|
|
344
|
+
"row-gap": "base",
|
|
345
|
+
},
|
|
346
|
+
stats_levoGroup: {
|
|
347
|
+
display: "flex",
|
|
348
|
+
"column-gap": "2xl",
|
|
349
|
+
mobile: {
|
|
350
|
+
"flex-direction": "column",
|
|
351
|
+
"row-gap": "base",
|
|
352
|
+
},
|
|
353
|
+
},
|
|
354
|
+
search_input_wrapper: {
|
|
355
|
+
display: "flex",
|
|
356
|
+
"flex-direction": "column",
|
|
357
|
+
"row-gap": "base",
|
|
358
|
+
},
|
|
359
|
+
right_container: {
|
|
360
|
+
flex: "1",
|
|
361
|
+
},
|
|
362
|
+
hero_image: {
|
|
363
|
+
width: "100%",
|
|
364
|
+
"aspect-ratio": "4/3",
|
|
365
|
+
"object-fit": "cover",
|
|
366
|
+
"border-radius": "base",
|
|
367
|
+
},
|
|
368
|
+
stats: [
|
|
369
|
+
{
|
|
370
|
+
stat_wrapper: {
|
|
371
|
+
display: "flex",
|
|
372
|
+
"flex-direction": "column",
|
|
373
|
+
"row-gap": "xs",
|
|
374
|
+
},
|
|
375
|
+
value: {
|
|
376
|
+
color: "text-1",
|
|
377
|
+
},
|
|
378
|
+
label: {
|
|
379
|
+
color: "text-2",
|
|
380
|
+
},
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
stat_wrapper: {
|
|
384
|
+
display: "flex",
|
|
385
|
+
"flex-direction": "column",
|
|
386
|
+
"row-gap": "xs",
|
|
387
|
+
},
|
|
388
|
+
value: {
|
|
389
|
+
color: "text-1",
|
|
390
|
+
},
|
|
391
|
+
label: {
|
|
392
|
+
color: "text-2",
|
|
393
|
+
},
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
stat_wrapper: {
|
|
397
|
+
display: "flex",
|
|
398
|
+
"flex-direction": "column",
|
|
399
|
+
"row-gap": "xs",
|
|
400
|
+
},
|
|
401
|
+
value: {
|
|
402
|
+
color: "text-1",
|
|
403
|
+
},
|
|
404
|
+
label: {
|
|
405
|
+
color: "text-2",
|
|
406
|
+
},
|
|
407
|
+
},
|
|
408
|
+
],
|
|
409
|
+
},
|
|
410
|
+
content: DEFAULT_CONTENT,
|
|
411
|
+
config: {
|
|
412
|
+
title: {
|
|
413
|
+
heading: {
|
|
414
|
+
level: 1,
|
|
415
|
+
},
|
|
416
|
+
selectedVariants: {
|
|
417
|
+
Heading_Level: "H1",
|
|
418
|
+
},
|
|
419
|
+
},
|
|
420
|
+
cta: {
|
|
421
|
+
selectedVariants: {
|
|
422
|
+
Button_Variants: "Primary",
|
|
423
|
+
},
|
|
424
|
+
},
|
|
425
|
+
search_button: {
|
|
426
|
+
selectedVariants: {
|
|
427
|
+
Button_Variants: "Secondary",
|
|
428
|
+
},
|
|
429
|
+
},
|
|
430
|
+
},
|
|
431
|
+
},
|
|
432
|
+
],
|
|
433
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Box,
|
|
3
|
+
Button,
|
|
4
|
+
Container,
|
|
5
|
+
Heading,
|
|
6
|
+
Icon,
|
|
7
|
+
Image,
|
|
8
|
+
Section,
|
|
9
|
+
Typography,
|
|
10
|
+
useBlockContext,
|
|
11
|
+
type ILevoBlockBaseProps,
|
|
12
|
+
} from "@levo-so/studio";
|
|
13
|
+
import React, { useState } from "react";
|
|
14
|
+
|
|
15
|
+
import type { IService2Content } from "./service-2.schema";
|
|
16
|
+
|
|
17
|
+
const Service2: React.FC<ILevoBlockBaseProps<IService2Content>> = ({
|
|
18
|
+
content,
|
|
19
|
+
config,
|
|
20
|
+
}) => {
|
|
21
|
+
const [zipcode, setZipcode] = useState("");
|
|
22
|
+
const { isBuilder } = useBlockContext();
|
|
23
|
+
return (
|
|
24
|
+
<Section elementKey="layout">
|
|
25
|
+
<Container elementKey="container">
|
|
26
|
+
<Box elementKey="main_wrapper">
|
|
27
|
+
<Box elementKey="left_container">
|
|
28
|
+
<Box elementKey="content_wrapper">
|
|
29
|
+
<Typography elementKey="label" />
|
|
30
|
+
<Heading elementKey="title" />
|
|
31
|
+
<Typography elementKey="description" />
|
|
32
|
+
<Button elementKey="cta" />
|
|
33
|
+
</Box>
|
|
34
|
+
<Box elementKey="stats_container">
|
|
35
|
+
<Box elementKey="stats_levoGroup" data-levo_group>
|
|
36
|
+
{(content?.stats ?? []).map((_, index: number) => (
|
|
37
|
+
<Box
|
|
38
|
+
key={`stat-${index}`}
|
|
39
|
+
data-levo_group_item
|
|
40
|
+
elementKey={`stats.${index}.stat_wrapper`}
|
|
41
|
+
>
|
|
42
|
+
<Icon elementKey={`stats.${index}.icon`} />
|
|
43
|
+
<Heading elementKey={`stats.${index}.value`} />
|
|
44
|
+
<Typography elementKey={`stats.${index}.label`} />
|
|
45
|
+
</Box>
|
|
46
|
+
))}
|
|
47
|
+
</Box>
|
|
48
|
+
</Box>
|
|
49
|
+
<Box elementKey="search_input_wrapper">
|
|
50
|
+
<input
|
|
51
|
+
value={zipcode}
|
|
52
|
+
onChange={(e) => setZipcode(e.target.value)}
|
|
53
|
+
name="search"
|
|
54
|
+
placeholder="Enter your Pin code"
|
|
55
|
+
style={{
|
|
56
|
+
background: "white",
|
|
57
|
+
borderRadius: "999px",
|
|
58
|
+
padding: "20px 20px 20px 20px",
|
|
59
|
+
|
|
60
|
+
border: "1px solid #E5E5E5",
|
|
61
|
+
}}
|
|
62
|
+
type="number"
|
|
63
|
+
min="6"
|
|
64
|
+
max="6"
|
|
65
|
+
/>
|
|
66
|
+
<Button
|
|
67
|
+
elementKey="search_button"
|
|
68
|
+
onClick={() => {
|
|
69
|
+
if (
|
|
70
|
+
!isBuilder &&
|
|
71
|
+
zipcode &&
|
|
72
|
+
zipcode.length === 6 &&
|
|
73
|
+
config?.search_button?.custom_fields?.redirect_url
|
|
74
|
+
) {
|
|
75
|
+
if (config?.search_button?.custom_fields?.other_params) {
|
|
76
|
+
window.open(
|
|
77
|
+
`${config?.search_button?.custom_fields?.redirect_url}?${config?.search_button?.custom_fields?.other_params}&${config?.search_button?.custom_fields?.zipcode_param ?? "zipcode"}=${zipcode}`,
|
|
78
|
+
);
|
|
79
|
+
} else {
|
|
80
|
+
window.open(
|
|
81
|
+
`${config?.search_button?.custom_fields?.redirect_url}?${config?.search_button?.custom_fields?.zipcode_param ?? "zipcode"}=${zipcode}`,
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}}
|
|
86
|
+
/>
|
|
87
|
+
</Box>
|
|
88
|
+
</Box>
|
|
89
|
+
<Box elementKey="right_container">
|
|
90
|
+
<Image elementKey="hero_image" alt="Hero image" />
|
|
91
|
+
</Box>
|
|
92
|
+
</Box>
|
|
93
|
+
</Container>
|
|
94
|
+
</Section>
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export default Service2;
|