@redneckz/wildless-cms-uni-blocks 0.6.39 → 0.6.40
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/BlockRenderer/BlockRendererOptions.d.ts +1 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +139 -111
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Carousel/CarouselContent.d.ts +1 -1
- package/bundle/components/CarouselCatalogCard/CarouselCatalogCard.d.ts +7 -0
- package/bundle/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +23 -0
- package/bundle/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +1 -1
- package/bundle/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +4 -4
- package/bundle/components/CarouselProductCard/CarouselProductCard.d.ts +5 -0
- package/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +49 -0
- package/bundle/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +1 -1
- package/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +4 -0
- package/bundle/model/BlockVersion.d.ts +1 -0
- package/bundle/ui-kit/Button/ButtonSection.d.ts +1 -1
- package/bundle/ui-kit/SwipeListControl/SwipeListContainer.d.ts +1 -1
- package/dist/BlockRenderer/BlockRendererOptions.d.ts +1 -0
- package/dist/BlockRenderer/renderBlock.js +2 -2
- package/dist/BlockRenderer/renderBlock.js.map +1 -1
- package/dist/components/Blocks.js +6 -2
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Carousel/Carousel.js +3 -2
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel/CarouselContent.d.ts +1 -1
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.d.ts +7 -0
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +17 -0
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -0
- package/dist/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +23 -0
- package/dist/components/CarouselCatalogCard/CarouselCatalogCardContent.js +2 -0
- package/dist/components/CarouselCatalogCard/CarouselCatalogCardContent.js.map +1 -0
- package/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +1 -1
- package/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js +12 -8
- package/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
- package/dist/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +4 -4
- package/dist/components/CarouselProductCard/CarouselProductCard.d.ts +5 -0
- package/dist/components/CarouselProductCard/CarouselProductCard.js +32 -0
- package/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -0
- package/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +49 -0
- package/dist/components/CarouselProductCard/CarouselProductCardContent.js +2 -0
- package/dist/components/CarouselProductCard/CarouselProductCardContent.js.map +1 -0
- package/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +1 -1
- package/dist/components/Gallery/GalleryCardInner.js +3 -2
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/dist/components/ProductTile/ProductTile.js +10 -22
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/VerticalLayout/VerticalLayout.js +18 -13
- package/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +4 -0
- package/dist/model/BlockVersion.d.ts +1 -0
- package/dist/model/BlockVersion.js +5 -1
- package/dist/model/BlockVersion.js.map +1 -1
- package/dist/ui-kit/Button/ButtonSection.d.ts +1 -1
- package/dist/ui-kit/Button/ButtonSection.js +2 -2
- package/dist/ui-kit/Button/ButtonSection.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.d.ts +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/lib/BlockRenderer/BlockRendererOptions.d.ts +1 -0
- package/lib/BlockRenderer/renderBlock.js +2 -2
- package/lib/BlockRenderer/renderBlock.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Blocks.js +6 -2
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Carousel/Carousel.fixture.d.ts +4 -1
- package/lib/components/Carousel/Carousel.js +3 -2
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/Carousel/CarouselContent.d.ts +1 -1
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.d.ts +7 -0
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.fixture.d.ts +16 -0
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +15 -0
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -0
- package/lib/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +23 -0
- package/lib/components/CarouselCatalogCard/CarouselCatalogCardContent.js +2 -0
- package/lib/components/CarouselCatalogCard/CarouselCatalogCardContent.js.map +1 -0
- package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +1 -1
- package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js +12 -8
- package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
- package/lib/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +4 -4
- package/lib/components/CarouselProductCard/CarouselProductCard.d.ts +5 -0
- package/lib/components/CarouselProductCard/CarouselProductCard.fixture.d.ts +8 -0
- package/lib/components/CarouselProductCard/CarouselProductCard.js +30 -0
- package/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -0
- package/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +49 -0
- package/lib/components/CarouselProductCard/CarouselProductCardContent.js +2 -0
- package/lib/components/CarouselProductCard/CarouselProductCardContent.js.map +1 -0
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.fixture.d.ts +1 -1
- package/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +1 -1
- package/lib/components/Gallery/GalleryCardInner.js +3 -2
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/lib/components/ProductTile/ProductTile.fixture.d.ts +2 -1
- package/lib/components/ProductTile/ProductTile.js +11 -23
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/VerticalLayout/VerticalLayout.fixture.d.ts +2 -1
- package/lib/components/VerticalLayout/VerticalLayout.js +18 -13
- package/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +4 -0
- package/lib/model/BlockVersion.d.ts +1 -0
- package/lib/model/BlockVersion.js +4 -0
- package/lib/model/BlockVersion.js.map +1 -1
- package/lib/ui-kit/Button/ButtonSection.d.ts +1 -1
- package/lib/ui-kit/Button/ButtonSection.js +2 -2
- package/lib/ui-kit/Button/ButtonSection.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.d.ts +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/bundle/BlockRenderer/BlockRendererOptions.d.ts +1 -0
- package/mobile/bundle/bundle.umd.js +6 -6
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Carousel/CarouselContent.d.ts +1 -1
- package/mobile/bundle/components/CarouselCatalogCard/CarouselCatalogCard.d.ts +7 -0
- package/mobile/bundle/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +23 -0
- package/mobile/bundle/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +1 -1
- package/mobile/bundle/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +4 -4
- package/mobile/bundle/components/CarouselProductCard/CarouselProductCard.d.ts +5 -0
- package/mobile/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +49 -0
- package/mobile/bundle/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +1 -1
- package/mobile/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +4 -0
- package/mobile/bundle/model/BlockVersion.d.ts +1 -0
- package/mobile/bundle/ui-kit/Button/ButtonSection.d.ts +1 -1
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListContainer.d.ts +1 -1
- package/mobile/dist/BlockRenderer/BlockRendererOptions.d.ts +1 -0
- package/mobile/dist/BlockRenderer/renderBlock.js +2 -2
- package/mobile/dist/BlockRenderer/renderBlock.js.map +1 -1
- package/mobile/dist/components/Carousel/Carousel.js +3 -2
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/Carousel/CarouselContent.d.ts +1 -1
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.d.ts +7 -0
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +17 -0
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -0
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +23 -0
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCardContent.js +2 -0
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCardContent.js.map +1 -0
- package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +1 -1
- package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js +12 -8
- package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
- package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +4 -4
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.d.ts +5 -0
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js +32 -0
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -0
- package/mobile/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +49 -0
- package/mobile/dist/components/CarouselProductCard/CarouselProductCardContent.js +2 -0
- package/mobile/dist/components/CarouselProductCard/CarouselProductCardContent.js.map +1 -0
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +1 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.js +3 -2
- package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js +10 -22
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/VerticalLayout/VerticalLayout.js +18 -13
- package/mobile/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/mobile/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +4 -0
- package/mobile/dist/model/BlockVersion.d.ts +1 -0
- package/mobile/dist/model/BlockVersion.js +5 -1
- package/mobile/dist/model/BlockVersion.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ButtonSection.d.ts +1 -1
- package/mobile/dist/ui-kit/Button/ButtonSection.js +2 -2
- package/mobile/dist/ui-kit/Button/ButtonSection.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.d.ts +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/lib/BlockRenderer/BlockRendererOptions.d.ts +1 -0
- package/mobile/lib/BlockRenderer/renderBlock.js +2 -2
- package/mobile/lib/BlockRenderer/renderBlock.js.map +1 -1
- package/mobile/lib/components/Carousel/Carousel.js +3 -2
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/Carousel/CarouselContent.d.ts +1 -1
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.d.ts +7 -0
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +15 -0
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -0
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +23 -0
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCardContent.js +2 -0
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCardContent.js.map +1 -0
- package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +1 -1
- package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js +12 -8
- package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
- package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +4 -4
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.d.ts +5 -0
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js +30 -0
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -0
- package/mobile/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +49 -0
- package/mobile/lib/components/CarouselProductCard/CarouselProductCardContent.js +2 -0
- package/mobile/lib/components/CarouselProductCard/CarouselProductCardContent.js.map +1 -0
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +1 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.js +3 -2
- package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js +11 -23
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/VerticalLayout/VerticalLayout.js +18 -13
- package/mobile/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/mobile/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +4 -0
- package/mobile/lib/model/BlockVersion.d.ts +1 -0
- package/mobile/lib/model/BlockVersion.js +4 -0
- package/mobile/lib/model/BlockVersion.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ButtonSection.d.ts +1 -1
- package/mobile/lib/ui-kit/Button/ButtonSection.js +2 -2
- package/mobile/lib/ui-kit/Button/ButtonSection.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.d.ts +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/src/BlockRenderer/BlockRendererOptions.ts +1 -0
- package/mobile/src/BlockRenderer/renderBlock.tsx +2 -1
- package/mobile/src/components/Carousel/Carousel.example.json +0 -1
- package/mobile/src/components/Carousel/Carousel.tsx +21 -18
- package/mobile/src/components/Carousel/CarouselContent.ts +1 -1
- package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.example.json +17 -0
- package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +62 -0
- package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.ui.json +10 -0
- package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCardContent.ts +25 -0
- package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCard.tsx +33 -14
- package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCardContent.ts +5 -5
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.example.json +21 -0
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.tsx +102 -0
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.ui.json +18 -0
- package/mobile/src/components/CarouselProductCard/CarouselProductCardContent.ts +51 -0
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCardContent.ts +1 -1
- package/mobile/src/components/ContactsBlock/ContactsBlock.example.json +1 -1
- package/mobile/src/components/Gallery/GalleryCardInner.tsx +6 -3
- package/mobile/src/components/ProductTile/ProductTile.tsx +8 -26
- package/mobile/src/components/VerticalLayout/VerticalLayout.example.json +7 -4
- package/mobile/src/components/VerticalLayout/VerticalLayout.tsx +35 -20
- package/mobile/src/components/VerticalLayout/VerticalLayoutContent.ts +4 -0
- package/mobile/src/model/BlockVersion.ts +5 -0
- package/mobile/src/ui-kit/Button/ButtonSection.tsx +4 -4
- package/mobile/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +2 -2
- package/package.json +1 -1
- package/src/BlockRenderer/BlockRendererOptions.ts +1 -0
- package/src/BlockRenderer/renderBlock.tsx +2 -1
- package/src/components/Blocks.ts +6 -2
- package/src/components/Carousel/Carousel.example.json +0 -1
- package/src/components/Carousel/Carousel.fixture.tsx +64 -4
- package/src/components/Carousel/Carousel.tsx +21 -18
- package/src/components/Carousel/CarouselContent.ts +1 -1
- package/src/components/CarouselCatalogCard/CarouselCatalogCard.example.json +17 -0
- package/src/components/CarouselCatalogCard/CarouselCatalogCard.fixture.tsx +43 -0
- package/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +62 -0
- package/src/components/CarouselCatalogCard/CarouselCatalogCard.ui.json +10 -0
- package/src/components/CarouselCatalogCard/CarouselCatalogCardContent.ts +25 -0
- package/src/components/CarouselInvestmentCard/CarouselInvestmentCard.tsx +33 -14
- package/src/components/CarouselInvestmentCard/CarouselInvestmentCardContent.ts +5 -5
- package/src/components/CarouselProductCard/CarouselProductCard.example.json +21 -0
- package/src/components/CarouselProductCard/CarouselProductCard.fixture.tsx +62 -0
- package/src/components/CarouselProductCard/CarouselProductCard.tsx +102 -0
- package/src/components/CarouselProductCard/CarouselProductCard.ui.json +18 -0
- package/src/components/CarouselProductCard/CarouselProductCardContent.ts +51 -0
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.fixture.tsx +1 -1
- package/src/components/CarouselProgramsCard/CarouselProgramsCardContent.ts +1 -1
- package/src/components/ContactsBlock/ContactsBlock.example.json +1 -1
- package/src/components/Gallery/GalleryCardInner.tsx +6 -3
- package/src/components/ProductTile/ProductTile.fixture.tsx +2 -1
- package/src/components/ProductTile/ProductTile.tsx +8 -26
- package/src/components/VerticalLayout/VerticalLayout.example.json +7 -4
- package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +59 -2
- package/src/components/VerticalLayout/VerticalLayout.tsx +35 -20
- package/src/components/VerticalLayout/VerticalLayoutContent.ts +4 -0
- package/src/model/BlockVersion.ts +5 -0
- package/src/ui-kit/Button/ButtonSection.tsx +4 -4
- package/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +2 -2
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { Picture } from '../../model/Picture';
|
|
2
|
+
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
3
|
+
import { CarouselProductCard } from './CarouselProductCard';
|
|
4
|
+
import type { CarouselProductCardContent } from './CarouselProductCardContent';
|
|
5
|
+
|
|
6
|
+
const isDotted = false;
|
|
7
|
+
|
|
8
|
+
const image: Picture = {
|
|
9
|
+
src: 'money-1.png',
|
|
10
|
+
format: 'webp',
|
|
11
|
+
size: {
|
|
12
|
+
width: 140,
|
|
13
|
+
height: 140,
|
|
14
|
+
},
|
|
15
|
+
title: 'money',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const buttonPrimary: ButtonWithIconProps = {
|
|
19
|
+
href: '/credit-cards',
|
|
20
|
+
text: 'Подробнее',
|
|
21
|
+
target: '_blank',
|
|
22
|
+
version: 'secondary',
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const buttonPrimaryIcon: ButtonWithIconProps = {
|
|
26
|
+
href: '/credit-cards',
|
|
27
|
+
text: 'Подробнее',
|
|
28
|
+
target: '_blank',
|
|
29
|
+
version: 'secondary',
|
|
30
|
+
icon: { icon: 'BankIcon' },
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const defaultItems = [
|
|
34
|
+
{ text: 'Качественные фермерские продукты напрямую от производителей' },
|
|
35
|
+
{ text: 'Самая большая база сельских туров по России' },
|
|
36
|
+
{ text: 'Площадки для создания комфортной жизни за городом' },
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
export const PRODUCT_CARD: CarouselProductCardContent = {
|
|
40
|
+
title: 'Более 5000 товаров',
|
|
41
|
+
description: 'Время копить: ставка растет в зависимости от срока нахождения средств на Счете!',
|
|
42
|
+
icon: image,
|
|
43
|
+
button: buttonPrimary,
|
|
44
|
+
isDotted,
|
|
45
|
+
items: defaultItems,
|
|
46
|
+
additionalDescription: 'Дополнительное описание',
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const CAROUSEL_PRODUCT_CARD = <CarouselProductCard {...PRODUCT_CARD} />;
|
|
50
|
+
const CAROUSEL_PRODUCT_CARD_SECONDARY = (
|
|
51
|
+
<CarouselProductCard
|
|
52
|
+
{...PRODUCT_CARD}
|
|
53
|
+
version="secondary"
|
|
54
|
+
isDotted={true}
|
|
55
|
+
button={buttonPrimaryIcon}
|
|
56
|
+
/>
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
export default {
|
|
60
|
+
default: <div className="container grid grid-cols-12">{CAROUSEL_PRODUCT_CARD}</div>,
|
|
61
|
+
secondary: <div className="container grid grid-cols-12">{CAROUSEL_PRODUCT_CARD_SECONDARY}</div>,
|
|
62
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { AlignText } from '../../model/AlignText';
|
|
3
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
4
|
+
import { VersionStyleMap } from '../../model/BlockVersion';
|
|
5
|
+
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
6
|
+
import type { Picture } from '../../model/Picture';
|
|
7
|
+
import { renderButton } from '../../ui-kit/Button/ButtonSection';
|
|
8
|
+
import { Img } from '../../ui-kit/Img/Img';
|
|
9
|
+
import { List } from '../../ui-kit/List/List';
|
|
10
|
+
import { Paragraph } from '../../ui-kit/Paragraph/Paragraph';
|
|
11
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
12
|
+
import { getIconWithVersion } from '../../utils/getIconWithVersion';
|
|
13
|
+
import { HEADLINE_SMALL_VERSION } from '../Headline/constants';
|
|
14
|
+
import type { CarouselProductCardContent, ListProps } from './CarouselProductCardContent';
|
|
15
|
+
|
|
16
|
+
export interface CarouselProductCardProps extends CarouselProductCardContent, UniBlockProps {}
|
|
17
|
+
|
|
18
|
+
const descriptionStyleMap: Record<BlockVersion, string> = {
|
|
19
|
+
primary: 'text-secondary-text',
|
|
20
|
+
secondary: 'text-white/80',
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const BORDER_STYLE = 'box-border border-solid border border-main-stroke ';
|
|
24
|
+
|
|
25
|
+
export const CarouselProductCard = JSX<CarouselProductCardProps>(
|
|
26
|
+
({
|
|
27
|
+
title,
|
|
28
|
+
headlineSmallVersion = 'H6',
|
|
29
|
+
description,
|
|
30
|
+
additionalDescription,
|
|
31
|
+
icon,
|
|
32
|
+
items = [],
|
|
33
|
+
button = {},
|
|
34
|
+
version = 'primary',
|
|
35
|
+
isDotted = true,
|
|
36
|
+
align = 'center',
|
|
37
|
+
}) => {
|
|
38
|
+
return (
|
|
39
|
+
<section
|
|
40
|
+
className={[
|
|
41
|
+
'flex flex-col justify-between items-stretch min-w-[260px] h-full w-full p-6',
|
|
42
|
+
BORDER_STYLE,
|
|
43
|
+
AlignText[align],
|
|
44
|
+
VersionStyleMap[version],
|
|
45
|
+
].join(' ')}
|
|
46
|
+
role="listitem"
|
|
47
|
+
>
|
|
48
|
+
<div className="flex flex-col h-full">
|
|
49
|
+
{renderImage(icon, version)}
|
|
50
|
+
{renderCardTitle(headlineSmallVersion, title)}
|
|
51
|
+
{renderDescription(description, title)}
|
|
52
|
+
{renderItems(items, isDotted, version)}
|
|
53
|
+
{renderAdditionalDescription(additionalDescription, version)}
|
|
54
|
+
</div>
|
|
55
|
+
{renderButton({ button, buttonClassName: 'mt-6' })}
|
|
56
|
+
</section>
|
|
57
|
+
);
|
|
58
|
+
},
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
const renderImage = (image?: Picture, version?: BlockVersion) => (
|
|
62
|
+
<div className="flex justify-center">
|
|
63
|
+
{image?.src ? <Img className="mb-5" image={image} /> : null}
|
|
64
|
+
{image?.icon ? (
|
|
65
|
+
<Img
|
|
66
|
+
className={`w-[32px] h-[32px] min-w-[32px] mb-5 rounded-full`}
|
|
67
|
+
image={getIconWithVersion(image, version)}
|
|
68
|
+
asSVG
|
|
69
|
+
/>
|
|
70
|
+
) : null}
|
|
71
|
+
</div>
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
const renderCardTitle = (headlineSmallVersion: string, title?: string) =>
|
|
75
|
+
title ? <Text size={HEADLINE_SMALL_VERSION[headlineSmallVersion]}>{title}</Text> : null;
|
|
76
|
+
|
|
77
|
+
const renderDescription = (description?: string, title?: string) =>
|
|
78
|
+
description ? (
|
|
79
|
+
<div className={title ? 'mt-2' : ''}>
|
|
80
|
+
<Paragraph size="text-l">{description}</Paragraph>
|
|
81
|
+
</div>
|
|
82
|
+
) : null;
|
|
83
|
+
|
|
84
|
+
const renderAdditionalDescription = (additionalDescription?: string, version = 'primary') =>
|
|
85
|
+
additionalDescription ? (
|
|
86
|
+
<div className="mt-auto">
|
|
87
|
+
<Text size="text-m" font="font-light" color={descriptionStyleMap[version]}>
|
|
88
|
+
{additionalDescription}
|
|
89
|
+
</Text>
|
|
90
|
+
</div>
|
|
91
|
+
) : null;
|
|
92
|
+
|
|
93
|
+
const renderItems = (items: ListProps[], isDotted: boolean, version: BlockVersion = 'primary') =>
|
|
94
|
+
items?.length ? (
|
|
95
|
+
<List
|
|
96
|
+
className={`max-w-[308px] mt-2 text-s ${version === 'primary' ? '!text-secondary-text' : ''}`}
|
|
97
|
+
itemClassName="text-left"
|
|
98
|
+
items={items.filter((item) => item?.text).map((item) => item.text as string)}
|
|
99
|
+
isDotted={isDotted}
|
|
100
|
+
version={version}
|
|
101
|
+
/>
|
|
102
|
+
) : null;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { AlignType } from '../../model/AlignType';
|
|
2
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
3
|
+
import type { HeadlineSmallProps } from '../../model/HeadlineType';
|
|
4
|
+
import type { Picture } from '../../model/Picture';
|
|
5
|
+
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @title Элемент списка
|
|
9
|
+
*/
|
|
10
|
+
export interface ListProps {
|
|
11
|
+
/** @title Текст */
|
|
12
|
+
text?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @title Карточка продуктовой карусели
|
|
17
|
+
*/
|
|
18
|
+
export type CarouselProductCardContent = HeadlineSmallProps & {
|
|
19
|
+
/** @title Дополнительное описание */
|
|
20
|
+
additionalDescription?: string;
|
|
21
|
+
/**
|
|
22
|
+
* @default {
|
|
23
|
+
* "format": "webp",
|
|
24
|
+
* "size": {
|
|
25
|
+
* "width": 140
|
|
26
|
+
* },
|
|
27
|
+
* "sources": [{
|
|
28
|
+
* "media": 1279,
|
|
29
|
+
* "width": 84,
|
|
30
|
+
* "format": "webp",
|
|
31
|
+
* "alignment": "center"
|
|
32
|
+
* }]
|
|
33
|
+
* }
|
|
34
|
+
*/
|
|
35
|
+
icon?: Picture;
|
|
36
|
+
/** @title Кнопка */
|
|
37
|
+
button?: ButtonWithIconProps;
|
|
38
|
+
/**
|
|
39
|
+
* @title Буллиты
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
isDotted?: boolean;
|
|
43
|
+
/** @title Список */
|
|
44
|
+
items?: ListProps[];
|
|
45
|
+
version?: BlockVersion;
|
|
46
|
+
/**
|
|
47
|
+
* @title Выравнивание
|
|
48
|
+
* @default center
|
|
49
|
+
*/
|
|
50
|
+
align?: AlignType;
|
|
51
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Picture } from '../../model/Picture';
|
|
2
2
|
import { CarouselProgramsCard } from './CarouselProgramsCard';
|
|
3
|
-
import { CarouselProgramsCardContent } from './CarouselProgramsCardContent';
|
|
3
|
+
import type { CarouselProgramsCardContent } from './CarouselProgramsCardContent';
|
|
4
4
|
|
|
5
5
|
const imageMonth: Picture = {
|
|
6
6
|
src: 'coin.png',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
1
2
|
import type { HeadlineCommonProps, TitleProps } from '../../model/HeadlineType';
|
|
2
3
|
import type { Picture } from '../../model/Picture';
|
|
3
|
-
import type { BlockVersion } from '../../model/BlockVersion';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @title Карточка программ карусели
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { AlignText } from '../../model/AlignText';
|
|
3
3
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
4
|
+
import { VersionAdditionalStyleMap } from '../../model/BlockVersion';
|
|
4
5
|
import type { Picture } from '../../model/Picture';
|
|
5
6
|
import { renderButton } from '../../ui-kit/Button/ButtonSection';
|
|
6
7
|
import { Img } from '../../ui-kit/Img/Img';
|
|
@@ -29,7 +30,7 @@ export const GalleryCardInner = JSX<GalleryCardProps>(
|
|
|
29
30
|
{renderCardTitle(headlineSmallVersion, title)}
|
|
30
31
|
{renderDescription(description, title)}
|
|
31
32
|
{items?.length ? renderItems(items, isDotted, version) : null}
|
|
32
|
-
{renderAdditionalDescription(additionalDescription)}
|
|
33
|
+
{renderAdditionalDescription(additionalDescription, version)}
|
|
33
34
|
</div>
|
|
34
35
|
{button?.text
|
|
35
36
|
? renderButton({
|
|
@@ -60,9 +61,11 @@ const renderCardTitle = (headlineSmallVersion: string, title?: string) =>
|
|
|
60
61
|
const renderDescription = (description?: string, title?: string) =>
|
|
61
62
|
description ? <div className={`text-l ${title ? 'mt-2' : ''}`}>{description}</div> : null;
|
|
62
63
|
|
|
63
|
-
const renderAdditionalDescription = (additionalDescription?: string) =>
|
|
64
|
+
const renderAdditionalDescription = (additionalDescription?: string, version?: BlockVersion) =>
|
|
64
65
|
additionalDescription ? (
|
|
65
|
-
<div className=
|
|
66
|
+
<div className={`text-m-light mt-auto ${VersionAdditionalStyleMap[version ?? 'primary']}`}>
|
|
67
|
+
{additionalDescription}
|
|
68
|
+
</div>
|
|
66
69
|
) : null;
|
|
67
70
|
|
|
68
71
|
const renderItems = (
|
|
@@ -123,11 +123,12 @@ export const PRODUCT_PENSION_TILE: ProductTileContent = {
|
|
|
123
123
|
};
|
|
124
124
|
|
|
125
125
|
export default {
|
|
126
|
-
|
|
126
|
+
default: (
|
|
127
127
|
<div className="container grid grid-cols-12">
|
|
128
128
|
<ProductTile className="col-span-6" {...PRODUCT_TILE} />
|
|
129
129
|
</div>
|
|
130
130
|
),
|
|
131
|
+
secondary: <ProductTile className="col-span-6" {...PRODUCT_TILE} version="secondary" />,
|
|
131
132
|
pension: (
|
|
132
133
|
<div className="container grid grid-cols-12">
|
|
133
134
|
<ProductTile
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
3
|
-
import { VersionStyleMap } from '../../model/BlockVersion';
|
|
3
|
+
import { VersionAdditionalStyleMap, VersionStyleMap } from '../../model/BlockVersion';
|
|
4
4
|
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
5
5
|
import type { Picture } from '../../model/Picture';
|
|
6
6
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
@@ -41,9 +41,7 @@ export const ProductTile = JSX<ProductTileProps>(
|
|
|
41
41
|
{...rest}
|
|
42
42
|
/>
|
|
43
43
|
{renderBenefits(benefits, version, image)}
|
|
44
|
-
{additionalDescription
|
|
45
|
-
? renderAdditionalDescription(additionalDescription, image, version)
|
|
46
|
-
: null}
|
|
44
|
+
{additionalDescription ? renderAdditionalDescription(additionalDescription, image) : null}
|
|
47
45
|
{buttons?.length ? (
|
|
48
46
|
<ButtonSection buttons={buttons} className="flex self-end mt-5 gap-4 z-10 text-l" />
|
|
49
47
|
) : null}
|
|
@@ -66,42 +64,26 @@ function renderBenefits(benefits: TextBenefit[], version: BlockVersion, image?:
|
|
|
66
64
|
);
|
|
67
65
|
}
|
|
68
66
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
secondary: 'text-white',
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
return function renderVersionedBenefit(benefit: TextBenefit, i: number) {
|
|
67
|
+
const renderBenefit =
|
|
68
|
+
(version: BlockVersion = 'primary') =>
|
|
69
|
+
(benefit: TextBenefit, i: number) => {
|
|
76
70
|
const { label = '', description = '' } = benefit;
|
|
77
71
|
|
|
78
72
|
return [
|
|
79
73
|
<div key={`label-${i}`} className="text-h6">
|
|
80
74
|
{label}
|
|
81
75
|
</div>,
|
|
82
|
-
<div key={`desc-${i}`} className={`text-m-light ${
|
|
76
|
+
<div key={`desc-${i}`} className={`text-m-light ${VersionAdditionalStyleMap[version]}`}>
|
|
83
77
|
{description}
|
|
84
78
|
</div>,
|
|
85
79
|
];
|
|
86
80
|
};
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
function renderAdditionalDescription(
|
|
90
|
-
additionalDescription: string,
|
|
91
|
-
image?: Picture,
|
|
92
|
-
version: BlockVersion = 'primary',
|
|
93
|
-
) {
|
|
94
|
-
const descStyleMap: Record<BlockVersion, string> = {
|
|
95
|
-
primary: 'text-secondary-text',
|
|
96
|
-
secondary: 'text-white',
|
|
97
|
-
};
|
|
98
81
|
|
|
82
|
+
function renderAdditionalDescription(additionalDescription: string, image?: Picture) {
|
|
99
83
|
// picture width = 242px. Text can overlay picture 20px deep. Outer paddings_x = 36px. 242-36-20 = 186px
|
|
100
84
|
const DESCRIPTION_WIDTH = image?.src ? 'max-w-[calc(100%-186px)]' : '100%';
|
|
101
85
|
|
|
102
86
|
return (
|
|
103
|
-
<div className={`text-m-light mt-2.5 z-10 ${DESCRIPTION_WIDTH}
|
|
104
|
-
{additionalDescription}
|
|
105
|
-
</div>
|
|
87
|
+
<div className={`text-m-light mt-2.5 z-10 ${DESCRIPTION_WIDTH}`}>{additionalDescription}</div>
|
|
106
88
|
);
|
|
107
89
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
"content": {
|
|
3
|
+
"version": "transparent",
|
|
4
|
+
"isPadding": false,
|
|
5
|
+
"isInnerPadding": true,
|
|
6
|
+
"align": "left",
|
|
7
|
+
"gap": ""
|
|
8
|
+
},
|
|
6
9
|
"blocks": [
|
|
7
10
|
{
|
|
8
11
|
"type": "Headline",
|
|
@@ -19,6 +19,25 @@ const options = {
|
|
|
19
19
|
blocksRegistry: Blocks,
|
|
20
20
|
} as BlockRendererOptions;
|
|
21
21
|
|
|
22
|
+
const carouselProductCard = {
|
|
23
|
+
content: {
|
|
24
|
+
headlineSmallVersion: 'L_R',
|
|
25
|
+
align: 'left',
|
|
26
|
+
isDotted: true,
|
|
27
|
+
title: 'Новость 1',
|
|
28
|
+
version: 'primary',
|
|
29
|
+
additionalDescription: '12 сентября 2022',
|
|
30
|
+
icon: {
|
|
31
|
+
size: {
|
|
32
|
+
width: 150,
|
|
33
|
+
height: 150,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
style: ['col-span-12'],
|
|
38
|
+
type: 'CarouselProductCard',
|
|
39
|
+
};
|
|
40
|
+
|
|
22
41
|
export default {
|
|
23
42
|
default: (
|
|
24
43
|
<div className="container grid grid-cols-12">
|
|
@@ -35,12 +54,12 @@ export default {
|
|
|
35
54
|
/>
|
|
36
55
|
</div>
|
|
37
56
|
),
|
|
38
|
-
'
|
|
57
|
+
'white center': (
|
|
39
58
|
<div className="container grid grid-cols-12">
|
|
40
59
|
<VerticalLayout
|
|
41
60
|
className="col-span-12"
|
|
42
61
|
align="center"
|
|
43
|
-
version="
|
|
62
|
+
version="primary"
|
|
44
63
|
block={{
|
|
45
64
|
type: 'VerticalLayout',
|
|
46
65
|
blocks: [
|
|
@@ -162,4 +181,42 @@ export default {
|
|
|
162
181
|
/>
|
|
163
182
|
</div>
|
|
164
183
|
),
|
|
184
|
+
carousel: (
|
|
185
|
+
<div className="container grid grid-cols-12">
|
|
186
|
+
<VerticalLayout
|
|
187
|
+
align="center"
|
|
188
|
+
className="col-span-12"
|
|
189
|
+
version="primary"
|
|
190
|
+
gap="XL"
|
|
191
|
+
isPadding={true}
|
|
192
|
+
isInnerPadding={false}
|
|
193
|
+
block={{
|
|
194
|
+
type: 'VerticalLayout',
|
|
195
|
+
blocks: [
|
|
196
|
+
{
|
|
197
|
+
content: {
|
|
198
|
+
title: 'Заголовок',
|
|
199
|
+
align: 'center',
|
|
200
|
+
bgColorHeadline: 'transparent',
|
|
201
|
+
headlineVersion: 'M',
|
|
202
|
+
},
|
|
203
|
+
style: ['col-span-12'],
|
|
204
|
+
type: 'Headline',
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
content: {
|
|
208
|
+
isBlur: true,
|
|
209
|
+
visibleItemCount: 3,
|
|
210
|
+
isCycle: false,
|
|
211
|
+
},
|
|
212
|
+
style: ['col-span-12'],
|
|
213
|
+
type: 'Carousel',
|
|
214
|
+
blocks: new Array(6).fill(carouselProductCard),
|
|
215
|
+
},
|
|
216
|
+
],
|
|
217
|
+
}}
|
|
218
|
+
options={options}
|
|
219
|
+
/>
|
|
220
|
+
</div>
|
|
221
|
+
),
|
|
165
222
|
};
|
|
@@ -15,10 +15,10 @@ const alignStyle: Record<AlignType, string> = {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
const gapStyleMap: Record<GapVersion, string> = {
|
|
18
|
-
XXL: 'gap-
|
|
19
|
-
XL: 'gap-
|
|
20
|
-
L: 'gap-
|
|
21
|
-
M: 'gap-
|
|
18
|
+
XXL: 'gap-12',
|
|
19
|
+
XL: 'gap-10',
|
|
20
|
+
L: 'gap-8',
|
|
21
|
+
M: 'gap-4',
|
|
22
22
|
S: 'gap-2',
|
|
23
23
|
XS: 'gap-1',
|
|
24
24
|
'': '',
|
|
@@ -31,22 +31,37 @@ const backgroundStyleMap: Record<BlockVersionWithTransparent, string> = {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
export const VerticalLayout: JSXBlock<VerticalLayoutProps> = JSX<VerticalLayoutProps>(
|
|
34
|
-
({
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
34
|
+
({
|
|
35
|
+
className = '',
|
|
36
|
+
gap = '',
|
|
37
|
+
align,
|
|
38
|
+
isPadding = false,
|
|
39
|
+
isInnerPadding = true,
|
|
40
|
+
version = 'transparent',
|
|
41
|
+
options,
|
|
42
|
+
...rest
|
|
43
|
+
}) => {
|
|
44
|
+
const paddingStyle = isPadding ? 'p-12' : '';
|
|
45
|
+
const innerPaddingStyle = isInnerPadding ? '' : '!p-0';
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<BlockWrapper
|
|
49
|
+
className={[
|
|
50
|
+
'flex flex-col [&>*]:max-w-full',
|
|
51
|
+
paddingStyle,
|
|
52
|
+
gapStyleMap[gap],
|
|
53
|
+
align && alignStyle[align],
|
|
54
|
+
backgroundStyleMap[version],
|
|
55
|
+
className,
|
|
56
|
+
]
|
|
57
|
+
.filter(Boolean)
|
|
58
|
+
.join(' ')}
|
|
59
|
+
{...rest}
|
|
60
|
+
>
|
|
61
|
+
{renderChildren({ ...rest, options: { ...options, className: innerPaddingStyle } })}
|
|
62
|
+
</BlockWrapper>
|
|
63
|
+
);
|
|
64
|
+
},
|
|
50
65
|
);
|
|
51
66
|
|
|
52
67
|
VerticalLayout.childrenTypes = {
|
|
@@ -16,4 +16,8 @@ export interface VerticalLayoutContent {
|
|
|
16
16
|
version?: BlockVersionWithTransparent;
|
|
17
17
|
align?: AlignType;
|
|
18
18
|
gap?: GapVersion;
|
|
19
|
+
/** @title Внутренний отступ компоновщика */
|
|
20
|
+
isPadding?: boolean;
|
|
21
|
+
/** @title Отступы вложенных компонентов */
|
|
22
|
+
isInnerPadding?: boolean;
|
|
19
23
|
}
|
|
@@ -15,6 +15,11 @@ export const VersionStyleMap: Record<BlockVersion, string> = {
|
|
|
15
15
|
secondary: 'bg-primary-main text-white',
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
+
export const VersionAdditionalStyleMap: Record<BlockVersion, string> = {
|
|
19
|
+
primary: 'text-secondary-text',
|
|
20
|
+
secondary: 'text-white',
|
|
21
|
+
};
|
|
22
|
+
|
|
18
23
|
export const VersionWithTransparentStyleMap: Record<BlockVersionWithTransparent, string> = {
|
|
19
24
|
transparent: '',
|
|
20
25
|
primary: 'bg-white text-primary-text',
|
|
@@ -22,23 +22,23 @@ export const ButtonSection = JSX<ButtonSectionProps>(({ className = '', buttons
|
|
|
22
22
|
);
|
|
23
23
|
|
|
24
24
|
export function renderButton({ button, buttonClassName, index }: RenderButtonProps) {
|
|
25
|
-
const { icon, iconRight, version, ...rest } = button;
|
|
25
|
+
const { icon, iconRight, version, text, ...rest } = button;
|
|
26
26
|
|
|
27
27
|
const iconVersion = version === 'secondary' ? 'color' : 'white';
|
|
28
|
-
|
|
29
28
|
const leftIcon = renderButtonIcon({ ...icon, iconVersion: iconVersion } as Picture);
|
|
30
29
|
const rightIcon = renderButtonIcon({ ...iconRight, iconVersion: iconVersion } as Picture);
|
|
31
30
|
|
|
32
|
-
return (
|
|
31
|
+
return text ? (
|
|
33
32
|
<Button
|
|
34
33
|
key={index ? String(index) : ''}
|
|
35
34
|
className={buttonClassName}
|
|
36
35
|
appendLeft={leftIcon}
|
|
37
36
|
appendRight={rightIcon}
|
|
38
37
|
version={version}
|
|
38
|
+
text={text}
|
|
39
39
|
{...rest}
|
|
40
40
|
/>
|
|
41
|
-
);
|
|
41
|
+
) : null;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
const renderButtonIcon = (icon: Picture) => {
|
|
@@ -16,13 +16,13 @@ interface SwipeListContainerProps extends SwipeContainerProps {
|
|
|
16
16
|
className?: string;
|
|
17
17
|
containerRef?: { current: HTMLDivElement | null };
|
|
18
18
|
activeIndex?: number;
|
|
19
|
-
visibleItemCount?: SwipeListItemWidthAuto | 1 | 2 | 3;
|
|
19
|
+
visibleItemCount?: SwipeListItemWidthAuto | 1 | 2 | 3 | 4;
|
|
20
20
|
snapAlign?: 'snap-start' | 'snap-center' | 'snap-end';
|
|
21
21
|
onVisibleItemsChange?: (itemsVisibilityList: ItemsVisibilityList) => void;
|
|
22
22
|
onVisibleIndicesChange?: (indices: number[]) => void;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
const childStyleMap = ['min-w-[100%]', 'min-w-[50%]', 'min-w-[33.33%]'];
|
|
25
|
+
const childStyleMap = ['min-w-[100%]', 'min-w-[50%]', 'min-w-[33.33%]', 'min-w-[25%]'];
|
|
26
26
|
|
|
27
27
|
export const SwipeListContainer = JSX<SwipeListContainerProps>(
|
|
28
28
|
({
|