@levo-so/blocks 0.1.102 → 0.1.103
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 +23 -23
- package/src/blocks/blogs/blog-post-1.tsx +16 -7
- package/src/blocks/cards/cards-21.tsx +6 -6
- package/src/blocks/carousel/carousel-1.tsx +2 -2
- package/src/blocks/ecommerce/ecommerce-1.schema.ts +477 -0
- package/src/blocks/ecommerce/ecommerce-1.tsx +243 -0
- package/src/blocks/ecommerce/ecommerce-2.schema.ts +268 -0
- package/src/blocks/ecommerce/ecommerce-2.tsx +238 -0
- package/src/blocks/ecommerce/ecommerce-3.schema.ts +56 -0
- package/src/blocks/ecommerce/ecommerce-3.tsx +72 -0
- package/src/blocks/ecommerce/ecommerce-4.schema.ts +461 -0
- package/src/blocks/ecommerce/ecommerce-4.tsx +249 -0
- package/src/blocks/ecommerce/ecommerce-5.schema.ts +230 -0
- package/src/blocks/ecommerce/ecommerce-5.tsx +146 -0
- package/src/blocks/index.ts +12 -2
- package/src/blocks/logos/logos-2.schema.ts +223 -0
- package/src/blocks/logos/logos-2.tsx +55 -0
- package/src/blocks/navbar/navbar-3.schema.ts +6 -0
- package/src/blocks/navbar/navbar-3.tsx +3 -2
- package/src/blocks/navbar/navbar-4.schema.ts +6 -0
- package/src/blocks/navbar/navbar-4.tsx +1 -6
- package/src/blocks/products/products-listing-3.schema.ts +2 -4
- package/src/blocks/products/products-listing-3.tsx +86 -84
- package/src/blocks/services/service-2.tsx +0 -3
- package/src/blocks/services/service-3.schema.ts +13 -0
- package/src/blocks/services/service-3.tsx +6 -0
- package/src/schemas/blocks.ts +13 -3
- package/src/schemas/categories.ts +6 -0
- package/src/blocks/navbar/navbar-2.schema.ts +0 -1255
- package/src/blocks/navbar/navbar-2.tsx +0 -381
package/package.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@levo-so/blocks",
|
|
3
|
-
"version": "0.1.102",
|
|
4
|
-
"author": "Levo Engineering <devs@theinternetfolks.com>",
|
|
5
3
|
"description": "Set of blocks for Levo studio",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"publishConfig": {
|
|
9
|
-
"access": "public"
|
|
10
|
-
},
|
|
11
|
-
"files": [
|
|
12
|
-
"src/**/*",
|
|
13
|
-
"package.json"
|
|
14
|
-
],
|
|
15
|
-
"peerDependencies": {
|
|
16
|
-
"react": ">=18",
|
|
17
|
-
"react-dom": ">=18",
|
|
18
|
-
"@levo-so/react": "0.1.86",
|
|
19
|
-
"@levo-so/studio": "0.1.102",
|
|
20
|
-
"@levo-so/core": "0.1.82"
|
|
21
|
-
},
|
|
4
|
+
"version": "0.1.103",
|
|
5
|
+
"author": "Levo Engineering <devs@theinternetfolks.com>",
|
|
22
6
|
"dependencies": {
|
|
23
7
|
"dayjs": "1.11.13",
|
|
24
8
|
"embla-carousel-auto-scroll": "8.6.0",
|
|
25
9
|
"embla-carousel-react": "8.6.0",
|
|
26
|
-
"lucide-react": "0.
|
|
10
|
+
"lucide-react": "0.575.0",
|
|
27
11
|
"use-debounce": "10.0.2"
|
|
28
12
|
},
|
|
29
13
|
"devDependencies": {
|
|
30
14
|
"@types/react": "19.2.14",
|
|
31
15
|
"@types/react-dom": "19.2.3",
|
|
32
16
|
"typescript": "5.9.3",
|
|
17
|
+
"@levo-so/core": "0.1.82",
|
|
33
18
|
"@levo/ts-config": "0.0.0",
|
|
34
|
-
"@levo-so/studio": "0.1.102",
|
|
35
19
|
"@levo-so/react": "0.1.86",
|
|
36
|
-
"@levo-so/
|
|
20
|
+
"@levo-so/studio": "0.1.103"
|
|
37
21
|
},
|
|
38
|
-
"main": "./src/index.ts",
|
|
39
22
|
"exports": {
|
|
40
23
|
".": "./src/index.ts"
|
|
41
24
|
},
|
|
25
|
+
"files": [
|
|
26
|
+
"src/**/*",
|
|
27
|
+
"package.json"
|
|
28
|
+
],
|
|
29
|
+
"main": "./src/index.ts",
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"react": ">=18",
|
|
32
|
+
"react-dom": ">=18",
|
|
33
|
+
"@levo-so/core": "0.1.82",
|
|
34
|
+
"@levo-so/studio": "0.1.103",
|
|
35
|
+
"@levo-so/react": "0.1.86"
|
|
36
|
+
},
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"sideEffects": false,
|
|
41
|
+
"type": "module",
|
|
42
42
|
"scripts": {
|
|
43
|
-
"clean": "rimraf dist node_modules .turbo",
|
|
44
43
|
"check-types": "tsc --noEmit",
|
|
44
|
+
"clean": "npx rimraf dist node_modules .turbo",
|
|
45
45
|
"lint": "biome lint ."
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
Box,
|
|
9
9
|
Button,
|
|
10
10
|
Container,
|
|
11
|
+
convertHtmlToJSON,
|
|
11
12
|
Heading,
|
|
12
13
|
Icon,
|
|
13
14
|
Image,
|
|
@@ -48,7 +49,12 @@ interface IContent {
|
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
const extractHeadingsFromContent = (content: IContent): ITocItem[] => {
|
|
51
|
-
if (!content?.json?.content)
|
|
52
|
+
if (!content?.json?.content) {
|
|
53
|
+
// Fallback: convert HTML to JSON when content.json is absent
|
|
54
|
+
if (!content?.html) return [];
|
|
55
|
+
const parsed = convertHtmlToJSON(content.html);
|
|
56
|
+
return extractHeadingsFromContent({ json: parsed } as IContent);
|
|
57
|
+
}
|
|
52
58
|
|
|
53
59
|
const headings: ITocItem[] = [];
|
|
54
60
|
|
|
@@ -109,7 +115,7 @@ const TableOfContents: React.FC<{ headings: ITocItem[] }> = ({ headings }) => {
|
|
|
109
115
|
const element = document.getElementById(id);
|
|
110
116
|
if (element) {
|
|
111
117
|
const offset = 100;
|
|
112
|
-
const elementPosition = element.getBoundingClientRect().top + window.
|
|
118
|
+
const elementPosition = element.getBoundingClientRect().top + window.scrollY;
|
|
113
119
|
window.scrollTo({
|
|
114
120
|
top: elementPosition - offset,
|
|
115
121
|
behavior: "smooth",
|
|
@@ -123,7 +129,7 @@ const TableOfContents: React.FC<{ headings: ITocItem[] }> = ({ headings }) => {
|
|
|
123
129
|
<Box elementKey="toc-container">
|
|
124
130
|
<Heading elementKey="toc-title" />
|
|
125
131
|
<Box elementKey="toc-list">
|
|
126
|
-
{headings
|
|
132
|
+
{headings?.map((heading) => (
|
|
127
133
|
<Box elementKey="toc-item-container" key={heading.id}>
|
|
128
134
|
<Icon elementKey="toc-item-icon" />
|
|
129
135
|
<Typography
|
|
@@ -219,14 +225,17 @@ const BlogPost1: React.FC<ILevoBlockBaseProps<IBlogPost1Content>> = () => {
|
|
|
219
225
|
useEffect(() => {
|
|
220
226
|
if (!data.content?.html || headings.length === 0) return;
|
|
221
227
|
|
|
222
|
-
const contentElement = document.querySelector('[data-
|
|
228
|
+
const contentElement = document.querySelector('[data-levo_element_key="content"]');
|
|
223
229
|
if (!contentElement) return;
|
|
224
230
|
|
|
225
|
-
const headingElements =
|
|
231
|
+
const headingElements = Array.from(
|
|
232
|
+
contentElement.querySelectorAll("h1, h2, h3, h4, h5, h6"),
|
|
233
|
+
).filter((el) => el.textContent?.trim().length > 0);
|
|
226
234
|
|
|
227
|
-
headingElements.forEach((el) => {
|
|
235
|
+
headingElements.forEach((el, index) => {
|
|
228
236
|
const dataId = el.getAttribute("data-id");
|
|
229
|
-
const match = headings.find((h) => h.id === dataId);
|
|
237
|
+
const match = dataId ? headings.find((h) => h.id === dataId) : headings[index];
|
|
238
|
+
|
|
230
239
|
if (match) {
|
|
231
240
|
el.id = match.id;
|
|
232
241
|
(el as HTMLElement).style.scrollMarginTop = "100px";
|
|
@@ -24,11 +24,11 @@ const Cards21: React.FC<ILevoBlockBaseProps<ICards21Content>> = () => {
|
|
|
24
24
|
const [search, setSearch] = useState("");
|
|
25
25
|
const setDebouncedSearchKey = useDebouncedCallback((v: string) => {
|
|
26
26
|
if (v) {
|
|
27
|
-
setQuery({
|
|
27
|
+
setQuery({ related: v, page: 1 });
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
setQuery({
|
|
31
|
-
|
|
31
|
+
related: undefined,
|
|
32
32
|
page: 1,
|
|
33
33
|
});
|
|
34
34
|
}, 1000);
|
|
@@ -62,14 +62,14 @@ const Cards21: React.FC<ILevoBlockBaseProps<ICards21Content>> = () => {
|
|
|
62
62
|
fontSize: "1.125rem",
|
|
63
63
|
color: "var(--color-text-1)",
|
|
64
64
|
borderColor: "var(--color-border)",
|
|
65
|
-
borderRadius: "99px"
|
|
66
|
-
}
|
|
65
|
+
borderRadius: "99px",
|
|
66
|
+
},
|
|
67
67
|
}}
|
|
68
68
|
leftIconBoxProps={{
|
|
69
69
|
style: {
|
|
70
70
|
width: "unset",
|
|
71
|
-
paddingLeft: "1.25rem"
|
|
72
|
-
}
|
|
71
|
+
paddingLeft: "1.25rem",
|
|
72
|
+
},
|
|
73
73
|
}}
|
|
74
74
|
/>
|
|
75
75
|
</Box>
|
|
@@ -26,7 +26,7 @@ const Carousel1: React.FC<ILevoBlockBaseProps<ICarousel1Content>> = ({ content }
|
|
|
26
26
|
elementKey="carousel_1_levoGroup"
|
|
27
27
|
data-levo_group
|
|
28
28
|
opts={{
|
|
29
|
-
watchDrag:
|
|
29
|
+
watchDrag: true,
|
|
30
30
|
watchResize: true,
|
|
31
31
|
watchSlides: true,
|
|
32
32
|
}}
|
|
@@ -52,7 +52,7 @@ const Carousel1: React.FC<ILevoBlockBaseProps<ICarousel1Content>> = ({ content }
|
|
|
52
52
|
elementKey="carousel_2_levoGroup"
|
|
53
53
|
data-levo_group
|
|
54
54
|
opts={{
|
|
55
|
-
watchDrag:
|
|
55
|
+
watchDrag: true,
|
|
56
56
|
watchResize: true,
|
|
57
57
|
watchSlides: true,
|
|
58
58
|
}}
|
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
import type { IBlock } from "@levo-so/studio";
|
|
2
|
+
|
|
3
|
+
const CALENDAR_ICON_SVG =
|
|
4
|
+
'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 5.75C7.59 5.75 7.25 5.41 7.25 5V2C7.25 1.59 7.59 1.25 8 1.25C8.41 1.25 8.75 1.59 8.75 2V5C8.75 5.41 8.41 5.75 8 5.75Z" fill="var(--color-icon-primary)"/><path d="M16 5.75C15.59 5.75 15.25 5.41 15.25 5V2C15.25 1.59 15.59 1.25 16 1.25C16.41 1.25 16.75 1.59 16.75 2V5C16.75 5.41 16.41 5.75 16 5.75Z" fill="var(--color-icon-primary)"/><path d="M20.5 9.83997H3.5C3.09 9.83997 2.75 9.49997 2.75 9.08997C2.75 8.67997 3.09 8.33997 3.5 8.33997H20.5C20.91 8.33997 21.25 8.67997 21.25 9.08997C21.25 9.49997 20.91 9.83997 20.5 9.83997Z" fill="var(--color-icon-primary)"/><path d="M16 22.75H8C4.35 22.75 2.25 20.65 2.25 17V8.5C2.25 4.85 4.35 2.75 8 2.75H16C19.65 2.75 21.75 4.85 21.75 8.5V17C21.75 20.65 19.65 22.75 16 22.75ZM8 4.25C5.14 4.25 3.75 5.64 3.75 8.5V17C3.75 19.86 5.14 21.25 8 21.25H16C18.86 21.25 20.25 19.86 20.25 17V8.5C20.25 5.64 18.86 4.25 16 4.25H8Z" fill="var(--color-icon-primary)"/></svg>';
|
|
5
|
+
|
|
6
|
+
const TAG_ICON_SVG =
|
|
7
|
+
'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.5 12.75L12 20.25L21 11.25V3.75H13.5L4.5 12.75Z" stroke="var(--color-icon-primary)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M17.25 8.25C17.6642 8.25 18 7.91421 18 7.5C18 7.08579 17.6642 6.75 17.25 6.75C16.8358 6.75 16.5 7.08579 16.5 7.5C16.5 7.91421 16.8358 8.25 17.25 8.25Z" fill="var(--color-icon-primary)"/></svg>';
|
|
8
|
+
|
|
9
|
+
const DEFAULT_ITEM = (id: string, overrides: Record<string, any> = {}) => ({
|
|
10
|
+
id,
|
|
11
|
+
eventWrapper: null,
|
|
12
|
+
image: {
|
|
13
|
+
id: "ecom1_placeholder",
|
|
14
|
+
kind: "image",
|
|
15
|
+
location: "https://images.pexels.com/photos/3938022/pexels-photo-3938022.jpeg",
|
|
16
|
+
mimetype: "image/jpeg",
|
|
17
|
+
srcset: {
|
|
18
|
+
"320w":
|
|
19
|
+
"https://images.pexels.com/photos/3938022/pexels-photo-3938022.jpeg?auto=compress&cs=tinysrgb&dpr=1&fit=crop&w=320",
|
|
20
|
+
"640w":
|
|
21
|
+
"https://images.pexels.com/photos/3938022/pexels-photo-3938022.jpeg?auto=compress&cs=tinysrgb&dpr=1&fit=crop&w=640",
|
|
22
|
+
"750w":
|
|
23
|
+
"https://images.pexels.com/photos/3938022/pexels-photo-3938022.jpeg?auto=compress&cs=tinysrgb&dpr=1&fit=crop&w=750",
|
|
24
|
+
"828w":
|
|
25
|
+
"https://images.pexels.com/photos/3938022/pexels-photo-3938022.jpeg?auto=compress&cs=tinysrgb&dpr=1&fit=crop&w=828",
|
|
26
|
+
"1080w":
|
|
27
|
+
"https://images.pexels.com/photos/3938022/pexels-photo-3938022.jpeg?auto=compress&cs=tinysrgb&dpr=1&fit=crop&w=1080",
|
|
28
|
+
path: "https://images.pexels.com/photos/3938022/pexels-photo-3938022.jpeg?auto=compress&cs=tinysrgb&dpr=1&fit=crop&w=640 640w",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
"text-wrapper": null,
|
|
32
|
+
"text-container": null,
|
|
33
|
+
"caption-text": "Health Package",
|
|
34
|
+
"date-wrapper": null,
|
|
35
|
+
"date-icon": {
|
|
36
|
+
kind: "icon",
|
|
37
|
+
data: {
|
|
38
|
+
id: "tag-1",
|
|
39
|
+
label: "Tag",
|
|
40
|
+
svgCode: TAG_ICON_SVG,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
"publishedAt-header": "₹4,000",
|
|
44
|
+
"author-wrapper": null,
|
|
45
|
+
"author-image": {
|
|
46
|
+
kind: "icon",
|
|
47
|
+
data: {
|
|
48
|
+
id: "calendar-1",
|
|
49
|
+
label: "Calendar 1",
|
|
50
|
+
svgCode: CALENDAR_ICON_SVG,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
"author-info-wrapper": null,
|
|
54
|
+
"author-name": "Newborns 24-72 hours",
|
|
55
|
+
title: "New Born Screening Extended",
|
|
56
|
+
description:
|
|
57
|
+
"Comprehensive heel-prick blood spot test for 50+ treatable conditions including thyroid issues, metabolic disorders, and more.",
|
|
58
|
+
publishedAt: "",
|
|
59
|
+
cta: "Add to cart",
|
|
60
|
+
...overrides,
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
const DEFAULT_CONTENT = {
|
|
64
|
+
layout: null,
|
|
65
|
+
container: null,
|
|
66
|
+
"header-container": null,
|
|
67
|
+
title: "Available Tests & Packages",
|
|
68
|
+
"cta-button": "View all",
|
|
69
|
+
events: [DEFAULT_ITEM("test-item-1"), DEFAULT_ITEM("test-item-2"), DEFAULT_ITEM("test-item-3")],
|
|
70
|
+
paginationWrapper: null,
|
|
71
|
+
paginationLeftButton: "Previous",
|
|
72
|
+
paginationText: "",
|
|
73
|
+
paginationRightButton: "Next",
|
|
74
|
+
cart_key: "levo_cart_collectiona",
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export type IEcommerce1Content = typeof DEFAULT_CONTENT;
|
|
78
|
+
|
|
79
|
+
export const Ecommerce1: IBlock = {
|
|
80
|
+
category_id: "ecommerce",
|
|
81
|
+
title: "Ecommerce 1",
|
|
82
|
+
key: "ecommerce-1",
|
|
83
|
+
version: "v1",
|
|
84
|
+
prompt_description:
|
|
85
|
+
"Product/test listing with price, add-to-cart functionality, and search. Items are stored in localStorage cart.",
|
|
86
|
+
content_schema: [
|
|
87
|
+
{ key: "layout", label: "Layout", field_interface: "LayoutWidget" },
|
|
88
|
+
{ key: "container", label: "Container", field_interface: "ContainerWidget" },
|
|
89
|
+
{ key: "header-container", label: "Header Container", field_interface: "BoxWidget" },
|
|
90
|
+
{
|
|
91
|
+
key: "title",
|
|
92
|
+
label: "Title",
|
|
93
|
+
field_interface: "HeadingWidget",
|
|
94
|
+
hint: {
|
|
95
|
+
prompt_description: "Section headline for the product/test listing.",
|
|
96
|
+
min_characters: 5,
|
|
97
|
+
max_characters: 60,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
key: "cta-button",
|
|
102
|
+
label: "Header CTA Button",
|
|
103
|
+
field_interface: "ButtonWidget",
|
|
104
|
+
hint: {
|
|
105
|
+
prompt_description: "Secondary action button next to the heading.",
|
|
106
|
+
min_characters: 4,
|
|
107
|
+
max_characters: 20,
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
{ key: "search-container", label: "Search Container", field_interface: "BoxWidget" },
|
|
111
|
+
{ key: "search-input-box", label: "Search Input Box", field_interface: "BoxWidget" },
|
|
112
|
+
{
|
|
113
|
+
key: "events",
|
|
114
|
+
label: "Products",
|
|
115
|
+
kind: "group",
|
|
116
|
+
field_interface: "BoxWidget",
|
|
117
|
+
hint: {
|
|
118
|
+
prompt_description:
|
|
119
|
+
"Grid of product/test cards each with image, price, name, and add-to-cart button.",
|
|
120
|
+
min_items: 3,
|
|
121
|
+
max_items: 6,
|
|
122
|
+
},
|
|
123
|
+
fields: [
|
|
124
|
+
{ key: "id", label: "Item ID (Internal)", field_interface: "TypographyWidget" },
|
|
125
|
+
{ key: "eventWrapper", label: "Card Wrapper", field_interface: "BoxWidget" },
|
|
126
|
+
{
|
|
127
|
+
key: "image",
|
|
128
|
+
label: "Product Image",
|
|
129
|
+
field_interface: "ImageWidget",
|
|
130
|
+
hint: {
|
|
131
|
+
prompt_description: "Product or test cover image.",
|
|
132
|
+
orientation: "landscape",
|
|
133
|
+
size: "medium",
|
|
134
|
+
usecase: "hero",
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
{ key: "text-wrapper", label: "Text Wrapper", field_interface: "BoxWidget" },
|
|
138
|
+
{ key: "text-container", label: "Text Container", field_interface: "BoxWidget" },
|
|
139
|
+
{ key: "date-wrapper", label: "Price Wrapper", field_interface: "BoxWidget" },
|
|
140
|
+
{
|
|
141
|
+
key: "date-icon",
|
|
142
|
+
label: "Price Icon",
|
|
143
|
+
field_interface: "IconWidget",
|
|
144
|
+
hint: {
|
|
145
|
+
prompt_description: "Icon next to the price.",
|
|
146
|
+
orientation: "square",
|
|
147
|
+
size: "icon",
|
|
148
|
+
usecase: "icon",
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
|
|
152
|
+
{
|
|
153
|
+
key: "publishedAt-header",
|
|
154
|
+
label: "Price",
|
|
155
|
+
field_interface: "TypographyWidget",
|
|
156
|
+
hint: {
|
|
157
|
+
prompt_description: "Product price displayed prominently.",
|
|
158
|
+
min_characters: 2,
|
|
159
|
+
max_characters: 20,
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
{ key: "author-wrapper", label: "Meta Wrapper", field_interface: "BoxWidget" },
|
|
163
|
+
{
|
|
164
|
+
key: "author-image",
|
|
165
|
+
label: "Meta Icon",
|
|
166
|
+
field_interface: "IconWidget",
|
|
167
|
+
hint: {
|
|
168
|
+
prompt_description: "Small icon for meta info.",
|
|
169
|
+
orientation: "square",
|
|
170
|
+
size: "icon",
|
|
171
|
+
usecase: "icon",
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
{ key: "author-info-wrapper", label: "Meta Info Wrapper", field_interface: "BoxWidget" },
|
|
175
|
+
{
|
|
176
|
+
key: "author-name",
|
|
177
|
+
label: "Age Group / Meta",
|
|
178
|
+
field_interface: "TypographyWidget",
|
|
179
|
+
hint: {
|
|
180
|
+
prompt_description: "Age group or other meta text about the product.",
|
|
181
|
+
min_characters: 3,
|
|
182
|
+
max_characters: 60,
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
{ key: "content-container", label: "Content Container", field_interface: "BoxWidget" },
|
|
186
|
+
{
|
|
187
|
+
key: "title",
|
|
188
|
+
label: "Product Name",
|
|
189
|
+
field_interface: "TypographyWidget",
|
|
190
|
+
hint: {
|
|
191
|
+
prompt_description: "Product or test name.",
|
|
192
|
+
min_characters: 5,
|
|
193
|
+
max_characters: 80,
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
key: "description",
|
|
198
|
+
label: "Product Description",
|
|
199
|
+
field_interface: "TypographyWidget",
|
|
200
|
+
hint: {
|
|
201
|
+
prompt_description: "Short description of the product.",
|
|
202
|
+
min_characters: 20,
|
|
203
|
+
max_characters: 160,
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
key: "publishedAt",
|
|
208
|
+
label: "Additional Info",
|
|
209
|
+
field_interface: "TypographyWidget",
|
|
210
|
+
hint: {
|
|
211
|
+
prompt_description: "Extra info (hidden by default).",
|
|
212
|
+
min_characters: 0,
|
|
213
|
+
max_characters: 40,
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
key: "cta_wrapper",
|
|
218
|
+
label: "CTA Wrapper",
|
|
219
|
+
field_interface: "BoxWidget",
|
|
220
|
+
hint: {
|
|
221
|
+
prompt_description: "Wrapper for CTA and View Details button.",
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
|
|
225
|
+
{
|
|
226
|
+
key: "cta",
|
|
227
|
+
label: "Add to Cart CTA",
|
|
228
|
+
field_interface: "ButtonWidget",
|
|
229
|
+
hint: {
|
|
230
|
+
prompt_description: "Button to add product to cart. Default: 'Add to cart'.",
|
|
231
|
+
min_characters: 5,
|
|
232
|
+
max_characters: 20,
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
key: "view_details",
|
|
237
|
+
label: "View Details Button",
|
|
238
|
+
field_interface: "ButtonWidget",
|
|
239
|
+
},
|
|
240
|
+
],
|
|
241
|
+
},
|
|
242
|
+
{ key: "paginationWrapper", label: "Pagination Wrapper", field_interface: "BoxWidget" },
|
|
243
|
+
{
|
|
244
|
+
key: "paginationLeftButton",
|
|
245
|
+
label: "Pagination Left Button",
|
|
246
|
+
field_interface: "ButtonWidget",
|
|
247
|
+
hint: { min_characters: 4, max_characters: 12 },
|
|
248
|
+
},
|
|
249
|
+
{ key: "paginationText", label: "Pagination Text", field_interface: "TypographyWidget" },
|
|
250
|
+
{
|
|
251
|
+
key: "paginationRightButton",
|
|
252
|
+
label: "Pagination Right Button",
|
|
253
|
+
field_interface: "ButtonWidget",
|
|
254
|
+
hint: { min_characters: 4, max_characters: 12 },
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
key: "cart_key",
|
|
258
|
+
label: "Cart Storage Key",
|
|
259
|
+
field_interface: "TypographyWidget",
|
|
260
|
+
hint: {
|
|
261
|
+
prompt_description: "Unique key for local storage to separate different carts.",
|
|
262
|
+
min_characters: 3,
|
|
263
|
+
max_characters: 50,
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
],
|
|
267
|
+
layouts: [
|
|
268
|
+
{
|
|
269
|
+
key: "default",
|
|
270
|
+
title: "Default",
|
|
271
|
+
styles: {
|
|
272
|
+
layout: {
|
|
273
|
+
"padding-left": "5xl",
|
|
274
|
+
"padding-right": "5xl",
|
|
275
|
+
"padding-top": "5xl",
|
|
276
|
+
"padding-bottom": "5xl",
|
|
277
|
+
tablet: {
|
|
278
|
+
"padding-left": "3xl",
|
|
279
|
+
"padding-right": "3xl",
|
|
280
|
+
"padding-top": "4xl",
|
|
281
|
+
"padding-bottom": "4xl",
|
|
282
|
+
},
|
|
283
|
+
mobile: {
|
|
284
|
+
"padding-left": "xl",
|
|
285
|
+
"padding-right": "xl",
|
|
286
|
+
"padding-top": "3xl",
|
|
287
|
+
"padding-bottom": "3xl",
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
container: {
|
|
291
|
+
display: "flex",
|
|
292
|
+
"flex-direction": "column",
|
|
293
|
+
"row-gap": "2xl",
|
|
294
|
+
},
|
|
295
|
+
"header-container": {
|
|
296
|
+
display: "flex",
|
|
297
|
+
width: "100%",
|
|
298
|
+
"justify-content": "space-between",
|
|
299
|
+
"align-items": "center",
|
|
300
|
+
"margin-bottom": "xl",
|
|
301
|
+
"column-gap": "xl",
|
|
302
|
+
mobile: {
|
|
303
|
+
"flex-direction": "column",
|
|
304
|
+
"align-items": "flex-start",
|
|
305
|
+
"row-gap": "md",
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
title: {
|
|
309
|
+
color: "var(--color-text-1)",
|
|
310
|
+
margin: "0",
|
|
311
|
+
},
|
|
312
|
+
"cta-button": {
|
|
313
|
+
"text-decoration": "none",
|
|
314
|
+
border: "none",
|
|
315
|
+
cursor: "pointer",
|
|
316
|
+
display: "flex",
|
|
317
|
+
"align-items": "center",
|
|
318
|
+
"column-gap": "xs",
|
|
319
|
+
"font-weight": 500,
|
|
320
|
+
},
|
|
321
|
+
"search-container": {
|
|
322
|
+
"max-width": "80%",
|
|
323
|
+
"margin-right": "auto",
|
|
324
|
+
"margin-left": "auto",
|
|
325
|
+
width: "100%",
|
|
326
|
+
tablet: {
|
|
327
|
+
"max-width": "none",
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
events_levoGroup: {
|
|
331
|
+
display: "grid",
|
|
332
|
+
width: "100%",
|
|
333
|
+
"grid-template-columns": "repeat(3, minmax(0, 1fr))",
|
|
334
|
+
"row-gap": "xl",
|
|
335
|
+
"column-gap": "xl",
|
|
336
|
+
tablet: {
|
|
337
|
+
"grid-template-columns": "repeat(2, minmax(0, 1fr))",
|
|
338
|
+
"column-gap": "lg",
|
|
339
|
+
},
|
|
340
|
+
mobile: {
|
|
341
|
+
"grid-template-columns": "repeat(1, 1fr)",
|
|
342
|
+
"row-gap": "lg",
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
events_levoGroupItem: {
|
|
346
|
+
eventWrapper: {
|
|
347
|
+
"border-radius": "xl",
|
|
348
|
+
overflow: "hidden",
|
|
349
|
+
"box-shadow": "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
|
|
350
|
+
position: "relative",
|
|
351
|
+
display: "flex",
|
|
352
|
+
"flex-direction": "column",
|
|
353
|
+
height: "100%",
|
|
354
|
+
"background-color": "var(--color-card, var(--color-background))",
|
|
355
|
+
},
|
|
356
|
+
image: {
|
|
357
|
+
width: "100%",
|
|
358
|
+
"aspect-ratio": "3 / 2",
|
|
359
|
+
"object-fit": "cover",
|
|
360
|
+
},
|
|
361
|
+
"text-wrapper": {
|
|
362
|
+
"padding-left": "none",
|
|
363
|
+
"padding-top": "none",
|
|
364
|
+
"padding-right": "none",
|
|
365
|
+
"padding-bottom": "xl",
|
|
366
|
+
display: "flex",
|
|
367
|
+
"flex-direction": "column",
|
|
368
|
+
"row-gap": "lg",
|
|
369
|
+
flex: "1",
|
|
370
|
+
},
|
|
371
|
+
"text-container": {
|
|
372
|
+
display: "none",
|
|
373
|
+
"flex-direction": "column",
|
|
374
|
+
"justify-content": "space-between",
|
|
375
|
+
"column-gap": "md",
|
|
376
|
+
"padding-top": "md",
|
|
377
|
+
"padding-bottom": "md",
|
|
378
|
+
"padding-left": "xl",
|
|
379
|
+
"padding-right": "xl",
|
|
380
|
+
"border-bottom": "1px solid var(--color-border)",
|
|
381
|
+
gap: "base",
|
|
382
|
+
},
|
|
383
|
+
"caption-text": {
|
|
384
|
+
display: "none",
|
|
385
|
+
},
|
|
386
|
+
"date-wrapper": {
|
|
387
|
+
display: "flex",
|
|
388
|
+
"align-items": "center",
|
|
389
|
+
"column-gap": "xs",
|
|
390
|
+
},
|
|
391
|
+
"date-icon": {
|
|
392
|
+
width: "20px",
|
|
393
|
+
height: "20px",
|
|
394
|
+
"flex-shrink": "0",
|
|
395
|
+
},
|
|
396
|
+
"publishedAt-header": {
|
|
397
|
+
"font-size": "sm",
|
|
398
|
+
color: "var(--color-brand)",
|
|
399
|
+
"font-weight": 700,
|
|
400
|
+
},
|
|
401
|
+
"author-wrapper": {
|
|
402
|
+
display: "flex",
|
|
403
|
+
"align-items": "center",
|
|
404
|
+
"column-gap": "xs",
|
|
405
|
+
},
|
|
406
|
+
"author-image": {
|
|
407
|
+
width: "20px",
|
|
408
|
+
height: "20px",
|
|
409
|
+
"flex-shrink": "0",
|
|
410
|
+
},
|
|
411
|
+
"author-name": {
|
|
412
|
+
"font-size": "sm",
|
|
413
|
+
"font-weight": 500,
|
|
414
|
+
color: "var(--color-text-2)",
|
|
415
|
+
},
|
|
416
|
+
title: {
|
|
417
|
+
"font-weight": 600,
|
|
418
|
+
"font-size": "base",
|
|
419
|
+
color: "var(--color-text-1)",
|
|
420
|
+
"line-height": "1.35",
|
|
421
|
+
},
|
|
422
|
+
description: {
|
|
423
|
+
overflow: "hidden",
|
|
424
|
+
display: "-webkit-box",
|
|
425
|
+
"-webkit-box-orient": "vertical",
|
|
426
|
+
"-webkit-line-clamp": "2",
|
|
427
|
+
color: "var(--color-text-2)",
|
|
428
|
+
"line-height": 1.5,
|
|
429
|
+
},
|
|
430
|
+
publishedAt: {
|
|
431
|
+
color: "var(--color-text-1)",
|
|
432
|
+
"font-size": "xl",
|
|
433
|
+
"font-weight": 700,
|
|
434
|
+
},
|
|
435
|
+
cta: {},
|
|
436
|
+
"content-container": {
|
|
437
|
+
"padding-left": "xl",
|
|
438
|
+
"padding-right": "xl",
|
|
439
|
+
display: "flex",
|
|
440
|
+
"flex-direction": "column",
|
|
441
|
+
"row-gap": "md",
|
|
442
|
+
flex: "1",
|
|
443
|
+
"padding-top": "3xl",
|
|
444
|
+
},
|
|
445
|
+
},
|
|
446
|
+
events: [],
|
|
447
|
+
paginationWrapper: {
|
|
448
|
+
width: "100%",
|
|
449
|
+
display: "flex",
|
|
450
|
+
"justify-content": "center",
|
|
451
|
+
"column-gap": "lg",
|
|
452
|
+
"align-items": "center",
|
|
453
|
+
},
|
|
454
|
+
paginationLeftButton: {},
|
|
455
|
+
paginationText: {
|
|
456
|
+
color: "var(--color-text-1)",
|
|
457
|
+
},
|
|
458
|
+
paginationRightButton: {},
|
|
459
|
+
},
|
|
460
|
+
content: DEFAULT_CONTENT,
|
|
461
|
+
config: {
|
|
462
|
+
title: {
|
|
463
|
+
selectedVariants: { Heading_Level: "H2" },
|
|
464
|
+
heading: { level: 2 },
|
|
465
|
+
},
|
|
466
|
+
"cta-button": {
|
|
467
|
+
selectedVariants: { Button_Variants: "Secondary" },
|
|
468
|
+
},
|
|
469
|
+
events_levoGroupItem: {
|
|
470
|
+
cta: {
|
|
471
|
+
selectedVariants: { Button_Variants: "Primary" },
|
|
472
|
+
},
|
|
473
|
+
},
|
|
474
|
+
},
|
|
475
|
+
},
|
|
476
|
+
],
|
|
477
|
+
};
|