@redneckz/wildless-cms-uni-blocks 0.3.24 → 0.3.27
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/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +2 -2
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Blocks.mobile.d.ts +1 -0
- package/dist/components/Blocks.mobile.js +2 -0
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js +12 -12
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTableContent.d.ts +1 -1
- package/dist/components/Gallery/Gallery.mobile.js +4 -4
- package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
- package/dist/components/Gallery/GalleryCardInner.js +1 -1
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/dist/components/Gallery/GalleryContent.d.ts +1 -1
- package/dist/components/LinkDocs/LinkDocs.mobile.js +2 -2
- package/dist/components/LinkDocs/LinkDocs.mobile.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocsContent.d.ts +1 -1
- package/dist/components/MiniGallery/MiniGalleryContent.d.ts +1 -1
- package/dist/components/OtherProducts/OtherProductsItem.js +1 -1
- package/dist/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Blocks.mobile.d.ts +1 -0
- package/lib/components/Blocks.mobile.js +2 -0
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js +12 -12
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTableContent.d.ts +1 -1
- package/lib/components/Gallery/Gallery.mobile.js +4 -4
- package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
- package/lib/components/Gallery/GalleryCardInner.js +1 -1
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/lib/components/Gallery/GalleryContent.d.ts +1 -1
- package/lib/components/LinkDocs/LinkDocs.mobile.js +2 -2
- package/lib/components/LinkDocs/LinkDocs.mobile.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocsContent.d.ts +1 -1
- package/lib/components/MiniGallery/MiniGalleryContent.d.ts +1 -1
- package/lib/components/OtherProducts/OtherProductsItem.js +1 -1
- package/lib/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +30 -29
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/Blocks.d.ts +1 -0
- package/mobile/dist/components/Blocks.js +2 -0
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js +12 -12
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTableContent.d.ts +1 -1
- package/mobile/dist/components/Gallery/Gallery.js +4 -4
- package/mobile/dist/components/Gallery/Gallery.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.js +1 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryContent.d.ts +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocs.js +2 -2
- package/mobile/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsContent.d.ts +1 -1
- package/mobile/dist/components/MiniGallery/MiniGalleryContent.d.ts +1 -1
- package/mobile/dist/components/OtherProducts/OtherProductsItem.js +1 -1
- package/mobile/dist/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/mobile/lib/components/Blocks.d.ts +1 -0
- package/mobile/lib/components/Blocks.js +2 -0
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js +12 -12
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTableContent.d.ts +1 -1
- package/mobile/lib/components/Gallery/Gallery.js +4 -4
- package/mobile/lib/components/Gallery/Gallery.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.js +1 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryContent.d.ts +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocs.js +2 -2
- package/mobile/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsContent.d.ts +1 -1
- package/mobile/lib/components/MiniGallery/MiniGalleryContent.d.ts +1 -1
- package/mobile/lib/components/OtherProducts/OtherProductsItem.js +1 -1
- package/mobile/lib/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/mobile/src/components/Blocks.ts +2 -0
- package/mobile/src/components/ComparisonTable/ComparisonTable.example.json +1 -0
- package/mobile/src/components/ComparisonTable/ComparisonTable.tsx +16 -16
- package/mobile/src/components/ComparisonTable/ComparisonTableContent.ts +1 -1
- package/mobile/src/components/CreditCalculator/CreditCalculator.example.json +19 -0
- package/mobile/src/components/Gallery/Gallery.example.json +1 -0
- package/mobile/src/components/Gallery/Gallery.tsx +4 -4
- package/mobile/src/components/Gallery/GalleryCardInner.tsx +1 -1
- package/mobile/src/components/Gallery/GalleryContent.ts +1 -1
- package/mobile/src/components/LinkDocs/LinkDocs.example.json +1 -1
- package/mobile/src/components/LinkDocs/LinkDocs.tsx +2 -2
- package/mobile/src/components/LinkDocs/LinkDocsContent.ts +1 -1
- package/mobile/src/components/MiniGallery/MiniGalleryContent.ts +1 -1
- package/mobile/src/components/OtherProducts/OtherProductsItem.tsx +1 -1
- package/package.json +1 -1
- package/src/components/Blocks.mobile.ts +2 -0
- package/src/components/ComparisonTable/ComparisonTable.example.json +1 -0
- package/src/components/ComparisonTable/ComparisonTable.fixture.mobile.tsx +2 -1
- package/src/components/ComparisonTable/ComparisonTable.mobile.tsx +16 -16
- package/src/components/ComparisonTable/ComparisonTableContent.ts +1 -1
- package/src/components/CreditCalculator/CreditCalculator.example.json +19 -0
- package/src/components/Gallery/Gallery.example.json +1 -0
- package/src/components/Gallery/Gallery.fixture.mobile.tsx +2 -2
- package/src/components/Gallery/Gallery.mobile.tsx +4 -4
- package/src/components/Gallery/GalleryCardInner.tsx +1 -1
- package/src/components/Gallery/GalleryContent.ts +1 -1
- package/src/components/LinkDocs/LinkDocs.example.json +1 -1
- package/src/components/LinkDocs/LinkDocs.fixture.mobile.tsx +1 -1
- package/src/components/LinkDocs/LinkDocs.mobile.tsx +2 -2
- package/src/components/LinkDocs/LinkDocsContent.ts +1 -1
- package/src/components/MiniGallery/MiniGalleryContent.ts +1 -1
- package/src/components/OtherProducts/OtherProductsItem.tsx +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tabs": [
|
|
3
|
+
{
|
|
4
|
+
"title": "Вкладка 1",
|
|
5
|
+
"description": "Описание",
|
|
6
|
+
"icon": "CardIcon"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"title": "Вкладка 2",
|
|
10
|
+
"description": "Описание",
|
|
11
|
+
"icon": "ChartSquareIcon"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"title": "Вкладка 3",
|
|
15
|
+
"description": "Описание",
|
|
16
|
+
"icon": "DiscountShapeIcon"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -83,7 +83,7 @@ const cards: GalleryCard[] = [
|
|
|
83
83
|
const defaultProps = {
|
|
84
84
|
title: 'Вы можете оплатить бонусными баллами',
|
|
85
85
|
description: 'Удобный каталог с большим ассортиментом товаров и сервисов',
|
|
86
|
-
|
|
86
|
+
orientation: 'vertical' as ListOrientation,
|
|
87
87
|
context,
|
|
88
88
|
cards: cards,
|
|
89
89
|
};
|
|
@@ -91,7 +91,7 @@ const defaultProps = {
|
|
|
91
91
|
const scrollProps = {
|
|
92
92
|
title: 'Вы можете оплатить бонусными баллами',
|
|
93
93
|
description: 'Удобный каталог с большим ассортиментом товаров и сервисов',
|
|
94
|
-
|
|
94
|
+
orientation: 'horizontal' as ListOrientation,
|
|
95
95
|
context,
|
|
96
96
|
cards: cards,
|
|
97
97
|
};
|
|
@@ -16,7 +16,7 @@ const blockStyle: Record<BlockVersion, string> = {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export const Gallery = JSX<GalleryProps>(
|
|
19
|
-
({ context, title, description, cards = [], className,
|
|
19
|
+
({ context, title, description, cards = [], className, orientation = 'horizontal' }) => {
|
|
20
20
|
return (
|
|
21
21
|
<section
|
|
22
22
|
className={`relative font-sans text-primary-text bg-white px-4 py-6 overflow-hidden ${className}`}
|
|
@@ -35,14 +35,14 @@ export const Gallery = JSX<GalleryProps>(
|
|
|
35
35
|
</div>
|
|
36
36
|
) : null}
|
|
37
37
|
</div>
|
|
38
|
-
{renderCardsLayout(
|
|
38
|
+
{renderCardsLayout(orientation, cards, context)}
|
|
39
39
|
</section>
|
|
40
40
|
);
|
|
41
41
|
},
|
|
42
42
|
);
|
|
43
43
|
|
|
44
|
-
function renderCardsLayout(
|
|
45
|
-
return
|
|
44
|
+
function renderCardsLayout(orientation: ListOrientation, cards: GalleryCard[], context) {
|
|
45
|
+
return orientation === 'horizontal' ? (
|
|
46
46
|
<SwipeListControl context={context}>{cards?.map(renderCard)}</SwipeListControl>
|
|
47
47
|
) : (
|
|
48
48
|
<div className="grid gap-[14px]">{cards?.map(renderCard)}</div>
|
|
@@ -10,7 +10,7 @@ export const GalleryCardInner = JSX<GalleryCard>(
|
|
|
10
10
|
({ title, description, image, items, button, version }) => {
|
|
11
11
|
const titleStyleClasses = getTitleStyle(version, description, items);
|
|
12
12
|
return (
|
|
13
|
-
<div>
|
|
13
|
+
<div className="h-full flex flex-col justify-between">
|
|
14
14
|
<div>
|
|
15
15
|
{image?.src ? (
|
|
16
16
|
<div className="flex justify-center">
|
|
@@ -15,7 +15,7 @@ export const LinkDocs = JSX<LinkDocsProps>(
|
|
|
15
15
|
subtitle,
|
|
16
16
|
icon = 'DocIconMonoColor',
|
|
17
17
|
documents,
|
|
18
|
-
|
|
18
|
+
orientation = 'vertical',
|
|
19
19
|
hasBorder = true,
|
|
20
20
|
}) => {
|
|
21
21
|
return (
|
|
@@ -32,7 +32,7 @@ export const LinkDocs = JSX<LinkDocsProps>(
|
|
|
32
32
|
{subtitle ? (
|
|
33
33
|
<h3 className="mt-0 font-normal mb-5 text-center text-m-md">{subtitle}</h3>
|
|
34
34
|
) : null}
|
|
35
|
-
{
|
|
35
|
+
{orientation === 'vertical' ? (
|
|
36
36
|
<LinkDocsVerticalList hasBorder={hasBorder} documents={documents} icon={icon} />
|
|
37
37
|
) : (
|
|
38
38
|
<LinkDocsHorizontalList
|
|
@@ -34,7 +34,7 @@ export interface LinkDocsContent {
|
|
|
34
34
|
documents?: LinkDocsItem[];
|
|
35
35
|
columnsMode?: LinkColumnsMode;
|
|
36
36
|
/** @title Отображать элементы в моб. версии (прокрутка shift+mouseScroll) */
|
|
37
|
-
|
|
37
|
+
orientation?: ListOrientation; // TODO: мобильный проп
|
|
38
38
|
/** @title Рамка элементов (моб.) */ // TODO: мобильный проп
|
|
39
39
|
hasBorder?: boolean;
|
|
40
40
|
align?: AlignType;
|
|
@@ -26,7 +26,7 @@ export const OtherProductsItem = JSX<BlockItemProps>(
|
|
|
26
26
|
/>
|
|
27
27
|
) : null}
|
|
28
28
|
<button
|
|
29
|
-
className="border-none bg-primary-main px-0 py-[
|
|
29
|
+
className="border-none bg-primary-main px-0 py-[26px] mb-[1px] w-full font-sans text-white text-base flex justify-center cursor-pointer"
|
|
30
30
|
onClick={handleToggle}
|
|
31
31
|
>
|
|
32
32
|
<span className="pr-3">{isActive ? 'Скрыть' : label}</span>
|