@redneckz/wildless-cms-uni-blocks 0.9.8 → 0.9.10
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/bin/migration-scripts/0.9.8.js +29 -0
- package/bin/migration-scripts/0.9.9.js +109 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +26 -47
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
- package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
- package/bundle/components/Footer/SocialMedia.d.ts +1 -1
- package/bundle/components/StepsBlock/StepsBlockContent.d.ts +10 -1
- package/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/dist/components/ApplicationForm/ApplicationFormCredit.js +1 -1
- package/dist/components/Blocks.js +0 -2
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
- package/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
- package/dist/components/CarouselEventCard/CarouselEventCard.js +1 -1
- package/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/dist/components/CarouselProductCard/CarouselProductCard.js +5 -2
- package/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
- package/dist/components/Footer/MediaButton.js +6 -7
- package/dist/components/Footer/MediaButton.js.map +1 -1
- package/dist/components/Footer/SocialMedia.d.ts +1 -1
- package/dist/components/Footer/SocialMedia.js +2 -2
- package/dist/components/Footer/SocialMedia.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +5 -3
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +10 -1
- package/dist/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
- package/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationFormCredit.js +1 -1
- package/lib/components/Blocks.js +0 -2
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Carousel/Carousel.fixture.d.ts +1 -0
- package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.fixture.d.ts +2 -10
- package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
- package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
- package/lib/components/CarouselEventCard/CarouselEventCard.js +1 -1
- package/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/lib/components/CarouselProductCard/CarouselProductCard.fixture.d.ts +2 -0
- package/lib/components/CarouselProductCard/CarouselProductCard.js +5 -2
- package/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.d.ts +2 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
- package/lib/components/Footer/MediaButton.js +6 -7
- package/lib/components/Footer/MediaButton.js.map +1 -1
- package/lib/components/Footer/SocialMedia.d.ts +1 -1
- package/lib/components/Footer/SocialMedia.js +2 -2
- package/lib/components/Footer/SocialMedia.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +5 -3
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +10 -1
- package/lib/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
- package/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/mobile/bundle/bundle.umd.js +9 -10
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
- package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
- package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +10 -1
- package/mobile/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js +1 -1
- package/mobile/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
- package/mobile/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
- package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js +1 -1
- package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js +5 -2
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/mobile/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
- package/mobile/dist/components/Footer/MediaButton.js +6 -7
- package/mobile/dist/components/Footer/MediaButton.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +10 -1
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/mobile/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js +1 -1
- package/mobile/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
- package/mobile/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
- package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js +1 -1
- package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js +5 -2
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/mobile/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
- package/mobile/lib/components/Footer/MediaButton.js +6 -7
- package/mobile/lib/components/Footer/MediaButton.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +10 -1
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/mobile/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/mobile/src/components/ApplicationForm/ApplicationFormCredit.tsx +1 -1
- package/mobile/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.tsx +2 -4
- package/mobile/src/components/CarouselEventCard/CarouselEventCard.tsx +2 -2
- package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCard.example.json +3 -1
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.example.json +3 -1
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.tsx +5 -1
- package/mobile/src/components/CarouselProductCard/CarouselProductCardContent.ts +4 -0
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +5 -2
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +18 -34
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +2 -0
- package/mobile/src/components/ErrorBlock/ErrorBlock.example.json +3 -1
- package/mobile/src/components/Footer/MediaButton.tsx +7 -10
- package/mobile/src/components/MobileAppTile/MobileAppTile.example.json +3 -1
- package/mobile/src/components/PictureText/PictureText.example.json +3 -1
- package/mobile/src/components/ProductBlock/ProductBlock.example.json +3 -1
- package/mobile/src/components/ProductTile/ProductTile.example.json +3 -1
- package/mobile/src/components/StepsBlock/StepsBlock.example.json +7 -5
- package/mobile/src/components/StepsBlock/StepsBlock.ui.json +10 -0
- package/mobile/src/components/StepsBlock/StepsBlockContent.ts +10 -2
- package/mobile/src/components/StepsBlock/StepsBlockStyleMaps.ts +3 -2
- package/mobile/src/components/Tile/Tile.example.json +3 -1
- package/mobile/src/components/VerticalLayout/VerticalLayoutContent.ts +0 -2
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationFormCredit.tsx +1 -1
- package/src/components/Blocks.ts +0 -2
- package/src/components/Carousel/Carousel.fixture.tsx +43 -7
- package/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.fixture.tsx +2 -9
- package/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.tsx +2 -4
- package/src/components/CarouselEventCard/CarouselEventCard.tsx +2 -2
- package/src/components/CarouselInvestmentCard/CarouselInvestmentCard.example.json +3 -1
- package/src/components/CarouselProductCard/CarouselProductCard.example.json +3 -1
- package/src/components/CarouselProductCard/CarouselProductCard.fixture.tsx +10 -0
- package/src/components/CarouselProductCard/CarouselProductCard.tsx +5 -1
- package/src/components/CarouselProductCard/CarouselProductCardContent.ts +4 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +5 -2
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.tsx +28 -1
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +18 -34
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +2 -0
- package/src/components/ErrorBlock/ErrorBlock.example.json +3 -1
- package/src/components/Footer/MediaButton.tsx +7 -10
- package/src/components/Footer/SocialMedia.tsx +3 -11
- package/src/components/MobileAppTile/MobileAppTile.example.json +3 -1
- package/src/components/PictureText/PictureText.example.json +3 -1
- package/src/components/ProductBlock/ProductBlock.example.json +3 -1
- package/src/components/ProductTile/ProductTile.example.json +3 -1
- package/src/components/StepsBlock/StepsBlock.example.json +7 -5
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +14 -8
- package/src/components/StepsBlock/StepsBlock.tsx +13 -4
- package/src/components/StepsBlock/StepsBlock.ui.json +10 -0
- package/src/components/StepsBlock/StepsBlockContent.ts +10 -2
- package/src/components/StepsBlock/StepsBlockStyleMaps.ts +3 -2
- package/src/components/Tile/Tile.example.json +3 -1
- package/src/components/VerticalLayout/VerticalLayoutContent.ts +0 -2
- package/bundle/components/Recommendation/Recommendation.d.ts +0 -5
- package/bundle/components/Recommendation/RecommendationCard.d.ts +0 -5
- package/bundle/components/Recommendation/RecommendationContent.d.ts +0 -24
- package/dist/components/Recommendation/Recommendation.d.ts +0 -5
- package/dist/components/Recommendation/Recommendation.js +0 -26
- package/dist/components/Recommendation/Recommendation.js.map +0 -1
- package/dist/components/Recommendation/RecommendationCard.d.ts +0 -5
- package/dist/components/Recommendation/RecommendationCard.js +0 -17
- package/dist/components/Recommendation/RecommendationCard.js.map +0 -1
- package/dist/components/Recommendation/RecommendationContent.d.ts +0 -24
- package/dist/components/Recommendation/RecommendationContent.js +0 -2
- package/dist/components/Recommendation/RecommendationContent.js.map +0 -1
- package/lib/components/Recommendation/Recommendation.d.ts +0 -5
- package/lib/components/Recommendation/Recommendation.fixture.d.ts +0 -15
- package/lib/components/Recommendation/Recommendation.js +0 -24
- package/lib/components/Recommendation/Recommendation.js.map +0 -1
- package/lib/components/Recommendation/RecommendationCard.d.ts +0 -5
- package/lib/components/Recommendation/RecommendationCard.js +0 -15
- package/lib/components/Recommendation/RecommendationCard.js.map +0 -1
- package/lib/components/Recommendation/RecommendationContent.d.ts +0 -24
- package/lib/components/Recommendation/RecommendationContent.js +0 -2
- package/lib/components/Recommendation/RecommendationContent.js.map +0 -1
- package/mobile/bundle/components/Recommendation/Recommendation.d.ts +0 -5
- package/mobile/bundle/components/Recommendation/RecommendationCard.d.ts +0 -5
- package/mobile/bundle/components/Recommendation/RecommendationContent.d.ts +0 -24
- package/mobile/dist/components/Recommendation/Recommendation.d.ts +0 -5
- package/mobile/dist/components/Recommendation/Recommendation.js +0 -26
- package/mobile/dist/components/Recommendation/Recommendation.js.map +0 -1
- package/mobile/dist/components/Recommendation/RecommendationCard.d.ts +0 -5
- package/mobile/dist/components/Recommendation/RecommendationCard.js +0 -17
- package/mobile/dist/components/Recommendation/RecommendationCard.js.map +0 -1
- package/mobile/dist/components/Recommendation/RecommendationContent.d.ts +0 -24
- package/mobile/dist/components/Recommendation/RecommendationContent.js +0 -2
- package/mobile/dist/components/Recommendation/RecommendationContent.js.map +0 -1
- package/mobile/lib/components/Recommendation/Recommendation.d.ts +0 -5
- package/mobile/lib/components/Recommendation/Recommendation.js +0 -24
- package/mobile/lib/components/Recommendation/Recommendation.js.map +0 -1
- package/mobile/lib/components/Recommendation/RecommendationCard.d.ts +0 -5
- package/mobile/lib/components/Recommendation/RecommendationCard.js +0 -15
- package/mobile/lib/components/Recommendation/RecommendationCard.js.map +0 -1
- package/mobile/lib/components/Recommendation/RecommendationContent.d.ts +0 -24
- package/mobile/lib/components/Recommendation/RecommendationContent.js +0 -2
- package/mobile/lib/components/Recommendation/RecommendationContent.js.map +0 -1
- package/mobile/src/components/Catalog/Catalog.ui.json +0 -1
- package/mobile/src/components/Recommendation/Recommendation.example.json +0 -61
- package/mobile/src/components/Recommendation/Recommendation.tsx +0 -66
- package/mobile/src/components/Recommendation/Recommendation.ui.json +0 -19
- package/mobile/src/components/Recommendation/RecommendationCard.tsx +0 -49
- package/mobile/src/components/Recommendation/RecommendationContent.ts +0 -27
- package/src/components/Catalog/Catalog.ui.json +0 -1
- package/src/components/Recommendation/Recommendation.example.json +0 -61
- package/src/components/Recommendation/Recommendation.fixture.tsx +0 -176
- package/src/components/Recommendation/Recommendation.tsx +0 -66
- package/src/components/Recommendation/Recommendation.ui.json +0 -19
- package/src/components/Recommendation/RecommendationCard.tsx +0 -49
- package/src/components/Recommendation/RecommendationContent.ts +0 -27
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Picture } from '../../model/Picture';
|
|
2
2
|
import '../../setup-fixture';
|
|
3
|
+
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
3
4
|
import { CarouselRecommendationCard } from './CarouselRecommendationCard';
|
|
4
5
|
import type {
|
|
5
6
|
CarouselRecommendationCardContent,
|
|
6
7
|
RecommendationSocialMedia,
|
|
7
8
|
} from './CarouselRecommendationCardContent';
|
|
8
|
-
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
9
9
|
|
|
10
10
|
const icon: Picture = {
|
|
11
11
|
src: 'product-basket.png',
|
|
@@ -92,6 +92,23 @@ export const CAROUSEL_RECOMMENDATION_CARD_WITHOUT_LIST: CarouselRecommendationCa
|
|
|
92
92
|
socialMedia: socialMediaWithoutText,
|
|
93
93
|
};
|
|
94
94
|
|
|
95
|
+
export const CAROUSEL_RECOMMENDATION_CARD_SECONDARY: CarouselRecommendationCardContent = {
|
|
96
|
+
title: 'Россельхозбанк',
|
|
97
|
+
description: 'Описание',
|
|
98
|
+
align: 'text-left',
|
|
99
|
+
icon: {
|
|
100
|
+
src: 'cow-card.png',
|
|
101
|
+
format: 'webp',
|
|
102
|
+
size: {
|
|
103
|
+
width: 290,
|
|
104
|
+
height: 290,
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
items: ['Свежие новости', 'Акции и предложенияа', 'Ставки и катировки'],
|
|
108
|
+
version: 'secondary',
|
|
109
|
+
socialMedia: socialMediaWithoutText,
|
|
110
|
+
};
|
|
111
|
+
|
|
95
112
|
export default {
|
|
96
113
|
default: (
|
|
97
114
|
<div className="container grid grid-cols-12 mb-1">
|
|
@@ -107,6 +124,16 @@ export default {
|
|
|
107
124
|
/>
|
|
108
125
|
</div>
|
|
109
126
|
),
|
|
127
|
+
secondaryCenter: (
|
|
128
|
+
<div className="container grid grid-cols-12 mb-1">
|
|
129
|
+
<CarouselRecommendationCard
|
|
130
|
+
className="col-span-12"
|
|
131
|
+
version="secondary"
|
|
132
|
+
align="text-center"
|
|
133
|
+
{...CAROUSEL_RECOMMENDATION_CARD_SECONDARY}
|
|
134
|
+
/>
|
|
135
|
+
</div>
|
|
136
|
+
),
|
|
110
137
|
gray: (
|
|
111
138
|
<div className="container grid grid-cols-12 mb-1">
|
|
112
139
|
<CarouselRecommendationCard
|
|
@@ -2,22 +2,18 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
2
2
|
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
3
3
|
import type { Picture } from '../../model/Picture';
|
|
4
4
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
5
|
-
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
6
5
|
import { Img } from '../../ui-kit/Img/Img';
|
|
7
6
|
import { LinkWrapper } from '../../ui-kit/LinkWrapper/LinkWrapper';
|
|
8
7
|
import { List } from '../../ui-kit/List/List';
|
|
9
|
-
import { Paragraph } from '../../ui-kit/Paragraph/Paragraph';
|
|
10
8
|
import { getIconWithVersion } from '../../utils/getIconWithVersion';
|
|
11
9
|
import { style } from '../../utils/style';
|
|
12
10
|
import { SocialMedia } from '../Footer/SocialMedia';
|
|
11
|
+
import { Headline } from '../Headline/Headline';
|
|
13
12
|
import type { CarouselRecommendationCardContent } from './CarouselRecommendationCardContent';
|
|
14
13
|
|
|
15
14
|
const BORDER_STYLE =
|
|
16
15
|
'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider';
|
|
17
16
|
|
|
18
|
-
const setAdditionalIconStyles = (items: string[]) =>
|
|
19
|
-
items.length ? 'w-1/2 flex-1 justify-center' : 'w-full justify-end';
|
|
20
|
-
|
|
21
17
|
export interface RecommendationCardProps extends CarouselRecommendationCardContent, UniBlockProps {}
|
|
22
18
|
|
|
23
19
|
export const CarouselRecommendationCard = JSX<RecommendationCardProps>(
|
|
@@ -30,13 +26,14 @@ export const CarouselRecommendationCard = JSX<RecommendationCardProps>(
|
|
|
30
26
|
socialMedia = [],
|
|
31
27
|
target,
|
|
32
28
|
title,
|
|
29
|
+
align = 'text-left',
|
|
33
30
|
version = 'primary',
|
|
34
31
|
...rest
|
|
35
32
|
}) => {
|
|
36
33
|
return (
|
|
37
34
|
<BlockWrapper
|
|
38
35
|
className={style(
|
|
39
|
-
'relative p-
|
|
36
|
+
'relative p-7 min-w-[524px] min-h-[218px] h-full box-border group-data-gray:bg-main-divider/50',
|
|
40
37
|
BORDER_STYLE,
|
|
41
38
|
className,
|
|
42
39
|
)}
|
|
@@ -44,42 +41,29 @@ export const CarouselRecommendationCard = JSX<RecommendationCardProps>(
|
|
|
44
41
|
{...rest}
|
|
45
42
|
>
|
|
46
43
|
<LinkWrapper href={href} target={target}>
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
</Paragraph>
|
|
44
|
+
<Headline
|
|
45
|
+
className="mb-4"
|
|
46
|
+
title={title}
|
|
47
|
+
description={description}
|
|
48
|
+
headlineVersion="S"
|
|
49
|
+
isPadding={false}
|
|
50
|
+
align={align}
|
|
51
|
+
/>
|
|
52
|
+
<div className="w-1/2 h-full flex flex-col flex-1 justify-end">
|
|
53
|
+
{items.length ? (
|
|
54
|
+
<List className="flex flex-col gap-2" itemClassName="text-l-light" items={items} />
|
|
59
55
|
) : null}
|
|
56
|
+
{socialMedia.length ? <SocialMedia className="pt-10" media={socialMedia} /> : null}
|
|
60
57
|
</div>
|
|
61
|
-
|
|
62
|
-
<div
|
|
63
|
-
className={style(
|
|
64
|
-
'flex flex-col w-1/2',
|
|
65
|
-
items?.length ? 'justify-between' : 'justify-end',
|
|
66
|
-
)}
|
|
67
|
-
>
|
|
68
|
-
{items.length ? (
|
|
69
|
-
<List className="text-xl-light flex flex-col gap-2 mt-14" items={items} />
|
|
70
|
-
) : null}
|
|
71
|
-
{socialMedia.length ? <SocialMedia className="pb-0" media={socialMedia} /> : null}
|
|
72
|
-
</div>
|
|
73
|
-
{renderIconBlock(icon, items)}
|
|
74
|
-
</div>
|
|
58
|
+
{renderIconBlock(icon)}
|
|
75
59
|
</LinkWrapper>
|
|
76
60
|
</BlockWrapper>
|
|
77
61
|
);
|
|
78
62
|
},
|
|
79
63
|
);
|
|
80
64
|
|
|
81
|
-
const renderIconBlock = (icon: Picture | undefined
|
|
82
|
-
<div className=
|
|
65
|
+
const renderIconBlock = (icon: Picture | undefined) => (
|
|
66
|
+
<div className="absolute bottom-0 right-0">
|
|
83
67
|
{icon?.icon ? <Img image={getIconWithVersion(icon)} asSVG /> : null}
|
|
84
68
|
{icon?.src ? <Img image={icon} /> : null}
|
|
85
69
|
</div>
|
|
@@ -5,6 +5,7 @@ import type { LinkCommonProps } from '../../model/LinkProps';
|
|
|
5
5
|
import type { IconProps } from '../../model/Picture';
|
|
6
6
|
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
7
7
|
import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
8
|
+
import type { TextAlign } from '../../ui-kit/Text/TextProps';
|
|
8
9
|
|
|
9
10
|
export type RecommendationSocialMedia = LinkCommonProps &
|
|
10
11
|
IconProps &
|
|
@@ -23,4 +24,5 @@ export type CarouselRecommendationCardContent = UniBlockContent &
|
|
|
23
24
|
LinkCommonProps & {
|
|
24
25
|
/** @title Соц сети */
|
|
25
26
|
socialMedia?: RecommendationSocialMedia[];
|
|
27
|
+
align?: TextAlign;
|
|
26
28
|
};
|
|
@@ -62,17 +62,15 @@ const buttonStylesWithText = (text: string, buttonSize: string) =>
|
|
|
62
62
|
: `group/media flex items-center justify-center box-border ${buttonSizeStyles[buttonSize]}`;
|
|
63
63
|
|
|
64
64
|
export const MediaButton = JSX<MediaButtonProps>(
|
|
65
|
-
({
|
|
66
|
-
const { href, version, text
|
|
65
|
+
({ buttonSize = 'default', rounded = false, icon, ...rest }) => {
|
|
66
|
+
const { href, version, text = '' } = rest;
|
|
67
67
|
|
|
68
68
|
const { iconMapped, label } =
|
|
69
69
|
ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
|
|
70
70
|
|
|
71
|
-
const iconCustom = icon ?? iconMapped;
|
|
71
|
+
const iconCustom = getFilteredIcon(icon) ?? iconMapped;
|
|
72
72
|
|
|
73
|
-
const iconWithVersion = iconCustom
|
|
74
|
-
? { ...getIconWithVersion(iconCustom), iconVersion }
|
|
75
|
-
: undefined;
|
|
73
|
+
const iconWithVersion = iconCustom ? getIconWithVersion(iconCustom) : undefined;
|
|
76
74
|
|
|
77
75
|
return (
|
|
78
76
|
<Button
|
|
@@ -83,11 +81,8 @@ export const MediaButton = JSX<MediaButtonProps>(
|
|
|
83
81
|
'hover:bg-primary-main hover:text-black',
|
|
84
82
|
'group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover',
|
|
85
83
|
'group-data-gray:border-green',
|
|
86
|
-
buttonStylesWithText(text
|
|
84
|
+
buttonStylesWithText(text, buttonSize),
|
|
87
85
|
)}
|
|
88
|
-
aboveText={aboveText}
|
|
89
|
-
appendLeft={appendLeft}
|
|
90
|
-
appendRight={appendRight}
|
|
91
86
|
aria-label={label}
|
|
92
87
|
rel="noopener noreferrer"
|
|
93
88
|
target="_blank"
|
|
@@ -108,3 +103,5 @@ export const MediaButton = JSX<MediaButtonProps>(
|
|
|
108
103
|
);
|
|
109
104
|
},
|
|
110
105
|
);
|
|
106
|
+
|
|
107
|
+
const getFilteredIcon = (icon: Picture | undefined) => (icon?.src || icon?.icon ? icon : undefined);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
3
|
-
import { MediaButton, type ButtonSize } from './MediaButton';
|
|
4
3
|
import { Text } from '../../ui-kit/Text/Text';
|
|
4
|
+
import type { ButtonSize } from './MediaButton';
|
|
5
|
+
import { MediaButton } from './MediaButton';
|
|
5
6
|
|
|
6
7
|
export interface SocialMediaProps {
|
|
7
8
|
className?: string;
|
|
@@ -14,16 +15,7 @@ export const SocialMedia = JSX<SocialMediaProps>(
|
|
|
14
15
|
<div className="font-sans">
|
|
15
16
|
<div className={`flex gap-1 ${className}`}>
|
|
16
17
|
{media?.map((_, index) => (
|
|
17
|
-
<MediaButton
|
|
18
|
-
key={String(index)}
|
|
19
|
-
aboveText={_.aboveText}
|
|
20
|
-
appendLeft={_.appendLeft}
|
|
21
|
-
appendRight={_.appendRight}
|
|
22
|
-
buttonSize={buttonSize}
|
|
23
|
-
text={_.text}
|
|
24
|
-
version={_.version}
|
|
25
|
-
{..._}
|
|
26
|
-
/>
|
|
18
|
+
<MediaButton key={String(index)} buttonSize={buttonSize} {..._} />
|
|
27
19
|
))}
|
|
28
20
|
</div>
|
|
29
21
|
<Text size="text-s-light" color="text-secondary-text">
|
|
@@ -83,11 +83,14 @@ const STEPS_WITH_BUTTON_PROPS: StepsBlockProps = {
|
|
|
83
83
|
...COMMON_PROPS,
|
|
84
84
|
steps: STEPS.map((step) => ({
|
|
85
85
|
...step,
|
|
86
|
-
button: { text: 'Оформить' },
|
|
87
86
|
})),
|
|
88
87
|
title: TITLE,
|
|
89
88
|
stepVersion: 'primary',
|
|
90
89
|
size: 'small',
|
|
90
|
+
buttons: [
|
|
91
|
+
{ text: 'Оформить', version: 'primary' },
|
|
92
|
+
{ text: 'Оформить', version: 'primary' },
|
|
93
|
+
],
|
|
91
94
|
};
|
|
92
95
|
|
|
93
96
|
export default {
|
|
@@ -108,13 +111,16 @@ export default {
|
|
|
108
111
|
showLines={false}
|
|
109
112
|
steps={STEPS_WITH_ICONS}
|
|
110
113
|
version="secondary"
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
114
|
+
buttons={[
|
|
115
|
+
{
|
|
116
|
+
text: 'Отправить заявку',
|
|
117
|
+
href: 'https://www.rshb.ru/',
|
|
118
|
+
target: '_blank',
|
|
119
|
+
icon: { icon: 'ComfortableCompIcon' },
|
|
120
|
+
iconRight: { icon: 'ComfortableCompIcon' },
|
|
121
|
+
version: 'secondary',
|
|
122
|
+
},
|
|
123
|
+
]}
|
|
118
124
|
/>
|
|
119
125
|
</div>
|
|
120
126
|
),
|
|
@@ -25,7 +25,7 @@ export const StepsBlock = JSX<StepsBlockProps>(
|
|
|
25
25
|
className = '',
|
|
26
26
|
showLines = true,
|
|
27
27
|
steps = [],
|
|
28
|
-
|
|
28
|
+
buttons,
|
|
29
29
|
size = 'normal',
|
|
30
30
|
version = 'primary',
|
|
31
31
|
stepVersion = 'gray',
|
|
@@ -39,6 +39,8 @@ export const StepsBlock = JSX<StepsBlockProps>(
|
|
|
39
39
|
const lineOpacity = getLineOpacity(showLines);
|
|
40
40
|
const paddingX = getPaddingX(steps.length);
|
|
41
41
|
|
|
42
|
+
const isMainButton = Boolean(buttons?.every((b) => b?.text));
|
|
43
|
+
|
|
42
44
|
return (
|
|
43
45
|
<BlockWrapper
|
|
44
46
|
className={style(
|
|
@@ -66,11 +68,11 @@ export const StepsBlock = JSX<StepsBlockProps>(
|
|
|
66
68
|
shortGaps ? 'gap-x-3' : 'gap-x-[101px]',
|
|
67
69
|
)}
|
|
68
70
|
>
|
|
69
|
-
{steps.map(renderStep({ styleMap, isMainButton
|
|
71
|
+
{steps.map(renderStep({ styleMap, isMainButton, version }))}
|
|
70
72
|
</div>
|
|
71
73
|
</div>
|
|
72
74
|
) : null}
|
|
73
|
-
{
|
|
75
|
+
{renderButtonsSection(buttons, { className: 'mt-8' })}
|
|
74
76
|
</BlockWrapper>
|
|
75
77
|
);
|
|
76
78
|
},
|
|
@@ -80,6 +82,8 @@ const renderStepIcon =
|
|
|
80
82
|
(styleMap: StyleType, size: string, stepVersion: BlockVersion) =>
|
|
81
83
|
({ icon }: Step, i: number) => {
|
|
82
84
|
const styleStepIconSize = size === 'normal' ? 'h-[100px] w-[100px]' : 'h-[63px] w-[63px]';
|
|
85
|
+
const stepVersionIconTextStyles =
|
|
86
|
+
stepVersion === 'secondary' ? 'group-data-primary:text-white' : 'text-secondary-text';
|
|
83
87
|
|
|
84
88
|
return (
|
|
85
89
|
<BlockWrapper
|
|
@@ -90,7 +94,12 @@ const renderStepIcon =
|
|
|
90
94
|
{checkCanRenderIcon(icon) ? (
|
|
91
95
|
<Img image={getIconWithVersion(icon || {}, stepVersion)} width="48" height="48" asSVG />
|
|
92
96
|
) : (
|
|
93
|
-
<span
|
|
97
|
+
<span
|
|
98
|
+
className={style(
|
|
99
|
+
'text-h4',
|
|
100
|
+
stepVersion === 'transparent' ? styleMap.iconText : stepVersionIconTextStyles,
|
|
101
|
+
)}
|
|
102
|
+
>
|
|
94
103
|
{i + 1}
|
|
95
104
|
</span>
|
|
96
105
|
)}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
2
|
import type { BulletsProps } from '../../model/Bullets';
|
|
3
3
|
import type { ButtonCommonIconProps } from '../../model/Button';
|
|
4
|
+
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
4
5
|
import type { DefaultListItemType } from '../../model/DefaultListItemType';
|
|
5
6
|
import type { DescriptionProps, HeadlineCommonProps, LabelProps } from '../../model/HeadlineType';
|
|
6
7
|
import type { UniBlockContent } from '../../model/JSXBlock';
|
|
@@ -33,8 +34,7 @@ export type Step = DefaultStep | RichTextStep;
|
|
|
33
34
|
* @title Блок шаги
|
|
34
35
|
*/
|
|
35
36
|
export type StepsBlockContent = UniBlockContent &
|
|
36
|
-
HeadlineCommonProps &
|
|
37
|
-
ButtonCommonIconProps & {
|
|
37
|
+
HeadlineCommonProps & {
|
|
38
38
|
/** @title Линии */
|
|
39
39
|
showLines?: boolean;
|
|
40
40
|
/**
|
|
@@ -43,7 +43,15 @@ export type StepsBlockContent = UniBlockContent &
|
|
|
43
43
|
* @maxItems 5
|
|
44
44
|
*/
|
|
45
45
|
steps?: Step[];
|
|
46
|
+
/**
|
|
47
|
+
* @title Тема шагов
|
|
48
|
+
*/
|
|
46
49
|
stepVersion?: BlockVersion;
|
|
47
50
|
/** @title Размер шагов */
|
|
48
51
|
size?: SizeVersion; // TODO: mobile content
|
|
52
|
+
/**
|
|
53
|
+
* @title Кнопки
|
|
54
|
+
* @maxItems 2
|
|
55
|
+
*/
|
|
56
|
+
buttons?: ButtonWithIconProps[];
|
|
49
57
|
};
|
|
@@ -7,8 +7,9 @@ export type StyleType = {
|
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export const STEPS_BLOCK_STYLE: StyleType = {
|
|
10
|
-
description:
|
|
11
|
-
|
|
10
|
+
description:
|
|
11
|
+
'text-white/80 text-l-light group-data-primary:text-secondary-text group-data-gray:text-secondary-text',
|
|
12
|
+
iconText: 'text-white group-data-primary:text-secondary-text group-data-gray:text-secondary-text',
|
|
12
13
|
iconBackground: 'bg-white/30 group-data-primary:bg-main-divider',
|
|
13
14
|
iconConnector: 'bg-white group-data-primary:bg-secondary-light',
|
|
14
15
|
dot: 'bg-white/80 group-data-primary:bg-secondary-text',
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { AlignTypeWithStretch } from '../../model/AlignType';
|
|
2
|
-
import type { ColorPalette } from '../../model/ContentPageDef';
|
|
3
2
|
import type { UniBlockContent } from '../../model/JSXBlock';
|
|
4
3
|
import type { GapVersion } from '../HorizontalLayout/HorizontalLayoutContent';
|
|
5
4
|
|
|
@@ -7,7 +6,6 @@ import type { GapVersion } from '../HorizontalLayout/HorizontalLayoutContent';
|
|
|
7
6
|
* @title Вертикальный компоновщик
|
|
8
7
|
*/
|
|
9
8
|
export type VerticalLayoutContent = UniBlockContent & {
|
|
10
|
-
colorPalette?: ColorPalette;
|
|
11
9
|
align?: AlignTypeWithStretch;
|
|
12
10
|
gap?: GapVersion;
|
|
13
11
|
/** @title Внутренний отступ компоновщика */
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
2
|
-
import type { RecommendationContent } from './RecommendationContent';
|
|
3
|
-
export interface RecommendationProps extends RecommendationContent, UniBlockProps {
|
|
4
|
-
}
|
|
5
|
-
export declare const Recommendation: import("@redneckz/uni-jsx").UNIComponent<RecommendationProps, any, any>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
2
|
-
import type { RecommendationCardTypes } from './RecommendationContent';
|
|
3
|
-
export interface RecommendationCardProps extends RecommendationCardTypes, UniBlockProps {
|
|
4
|
-
}
|
|
5
|
-
export declare const RecommendationCard: import("@redneckz/uni-jsx").UNIComponent<RecommendationCardProps, any, any>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { HeadlineCommonProps, TitleProps } from '../../model/HeadlineType';
|
|
2
|
-
import type { UniBlockContent } from '../../model/JSXBlock';
|
|
3
|
-
import type { LinkCommonProps } from '../../model/LinkProps';
|
|
4
|
-
import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
5
|
-
import { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
6
|
-
import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
7
|
-
/**
|
|
8
|
-
* @title Карточка
|
|
9
|
-
*/
|
|
10
|
-
export interface RecommendationCardTypes extends HeadlineCommonProps, ListContent, ImageContent {
|
|
11
|
-
/**
|
|
12
|
-
* @title Соц сети
|
|
13
|
-
* @minItems 3
|
|
14
|
-
*/
|
|
15
|
-
socialMedia?: LinkCommonProps[];
|
|
16
|
-
button?: ButtonProps;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @title Рекомендации
|
|
20
|
-
*/
|
|
21
|
-
export declare type RecommendationContent = UniBlockContent & TitleProps & {
|
|
22
|
-
/** @title Карточки */
|
|
23
|
-
recommendations?: RecommendationCardTypes[];
|
|
24
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
2
|
-
import type { RecommendationContent } from './RecommendationContent';
|
|
3
|
-
export interface RecommendationProps extends RecommendationContent, UniBlockProps {
|
|
4
|
-
}
|
|
5
|
-
export declare const Recommendation: import("@redneckz/uni-jsx").UNIComponent<RecommendationProps, any, any>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.Recommendation = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const useCarouselControls_1 = require("../../hooks/useCarouselControls");
|
|
6
|
-
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
7
|
-
const renderArrows_1 = require("../../ui-kit/Button/renderArrows");
|
|
8
|
-
const Heading_1 = require("../../ui-kit/Heading/Heading");
|
|
9
|
-
const RecommendationCard_1 = require("./RecommendationCard");
|
|
10
|
-
const BLUR_BLOCK_CLASSES = 'absolute top-0 bottom-0 w-[84px]';
|
|
11
|
-
const CARD_VIEW_COUNT = 2;
|
|
12
|
-
const CARD_SHIFT = 525;
|
|
13
|
-
exports.Recommendation = (0, uni_jsx_1.JSX)(({ recommendations = [], className = '', title, version = 'primary', ...rest }) => {
|
|
14
|
-
const [activeIndex, controls] = (0, useCarouselControls_1.useCarouselControls)({
|
|
15
|
-
itemCount: recommendations.length,
|
|
16
|
-
visibleItemCount: CARD_VIEW_COUNT,
|
|
17
|
-
});
|
|
18
|
-
return ((0, jsx_runtime_1.jsxs)(BlockWrapper_1.BlockWrapper, { className: `relative font-sans p-9 overflow-hidden text-center ${className}`, version: version, ...rest, children: [title ? (0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h3", className: "mb-6", title: title }) : null, (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "flex duration-1000 gap-3.5", style: { transform: `translateX(-${activeIndex * CARD_SHIFT}px)` }, role: "list", children: recommendations.length
|
|
19
|
-
? recommendations.map((card, i) => ((0, jsx_runtime_1.jsx)(RecommendationCard_1.RecommendationCard, { version: version, className: "border-gray group-data-secondary:border-white/50", ...card }, String(i))))
|
|
20
|
-
: null }), (0, renderArrows_1.renderArrows)({
|
|
21
|
-
...controls,
|
|
22
|
-
btnClass: ['left-8', 'right-8'],
|
|
23
|
-
className: 'top-1/2 mt-3',
|
|
24
|
-
})] }), (0, jsx_runtime_1.jsx)("div", { className: `${BLUR_BLOCK_CLASSES} left-0 ${version === 'secondary' ? 'bg-opacity-from-main' : 'bg-opacity-from-white'}` }), (0, jsx_runtime_1.jsx)("div", { className: `${BLUR_BLOCK_CLASSES} right-0 ${version === 'secondary' ? 'bg-opacity-to-main' : 'bg-opacity-to-white'}` })] }));
|
|
25
|
-
});
|
|
26
|
-
//# sourceMappingURL=Recommendation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Recommendation.js","sourceRoot":"","sources":["../../../src/components/Recommendation/Recommendation.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,yEAAsE;AAEtE,4DAAyD;AACzD,mEAAgE;AAChE,0DAAuD;AACvD,6DAA0D;AAG1D,MAAM,kBAAkB,GAAG,kCAAkC,CAAC;AAC9D,MAAM,eAAe,GAAG,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,GAAG,CAAC;AAIV,QAAA,cAAc,GAAG,IAAA,aAAG,EAC/B,CAAC,EAAE,eAAe,GAAG,EAAE,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,OAAO,GAAG,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IAChF,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,GAAG,IAAA,yCAAmB,EAAC;QAClD,SAAS,EAAE,eAAe,CAAC,MAAM;QACjC,gBAAgB,EAAE,eAAe;KAClC,CAAC,CAAC;IAEH,OAAO,CACL,wBAAC,2BAAY,IACX,SAAS,EAAE,sDAAsD,SAAS,EAAE,EAC5E,OAAO,EAAE,OAAO,KACZ,IAAI,aAEP,KAAK,CAAC,CAAC,CAAC,uBAAC,iBAAO,IAAC,WAAW,EAAC,IAAI,EAAC,SAAS,EAAC,MAAM,EAAC,KAAK,EAAE,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,EAC3E,4CACE,gCACE,SAAS,EAAC,4BAA4B,EACtC,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,WAAW,GAAG,UAAU,KAAK,EAAE,EAClE,IAAI,EAAC,MAAM,YAEV,eAAe,CAAC,MAAM;4BACrB,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAC/B,uBAAC,uCAAkB,IAEjB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,kDAAkD,KACxD,IAAI,IAHH,MAAM,CAAC,CAAC,CAAC,CAId,CACH,CAAC;4BACJ,CAAC,CAAC,IAAI,GACJ,EACL,IAAA,2BAAY,EAAC;wBACZ,GAAG,QAAQ;wBACX,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;wBAC/B,SAAS,EAAE,cAAc;qBAC1B,CAAC,IACE,EACN,gCACE,SAAS,EAAE,GAAG,kBAAkB,WAC9B,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,uBACrD,EAAE,GACF,EACF,gCACE,SAAS,EAAE,GAAG,kBAAkB,YAC9B,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,qBACnD,EAAE,GACF,IACW,CAChB,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
2
|
-
import type { RecommendationCardTypes } from './RecommendationContent';
|
|
3
|
-
export interface RecommendationCardProps extends RecommendationCardTypes, UniBlockProps {
|
|
4
|
-
}
|
|
5
|
-
export declare const RecommendationCard: import("@redneckz/uni-jsx").UNIComponent<RecommendationCardProps, any, any>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.RecommendationCard = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
6
|
-
const renderButtonsSection_1 = require("../../ui-kit/Button/renderButtonsSection");
|
|
7
|
-
const Heading_1 = require("../../ui-kit/Heading/Heading");
|
|
8
|
-
const Img_1 = require("../../ui-kit/Img/Img");
|
|
9
|
-
const List_1 = require("../../ui-kit/List/List");
|
|
10
|
-
const BaseTile_1 = require("../BaseTile/BaseTile");
|
|
11
|
-
const SocialMedia_1 = require("../Footer/SocialMedia");
|
|
12
|
-
exports.RecommendationCard = (0, uni_jsx_1.JSX)(({ className = '', title, description, items, image, socialMedia, button, ...rest }) => {
|
|
13
|
-
const tileTitle = title ? ((0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h5", as: "h3", className: "mb-3.5 z-10", title: title })) : null;
|
|
14
|
-
const tileImage = image?.src ? ((0, jsx_runtime_1.jsx)(Img_1.Img, { className: "absolute bottom-0 right-0 m-0", image: image })) : null;
|
|
15
|
-
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: `relative overflow-hidden text-left border border-solid box-border p-7 min-w-[524px] min-h-[218px] ${className}`, role: "listitem", ...rest, children: (0, jsx_runtime_1.jsx)(BaseTile_1.BaseTile, { className: "flex justify-between", title: tileTitle, image: tileImage, children: (0, jsx_runtime_1.jsxs)("div", { className: "h-full flex flex-col justify-between", children: [description ? (0, jsx_runtime_1.jsx)("span", { className: "mb-2", children: description }) : null, items?.length ? ((0, jsx_runtime_1.jsx)(List_1.List, { className: "text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]", items: items })) : null, socialMedia ? (0, jsx_runtime_1.jsx)(SocialMedia_1.SocialMedia, { className: "pt-10 pb-0", media: socialMedia }) : null, button?.text ? ((0, jsx_runtime_1.jsx)("div", { className: "pt-2", children: (0, renderButtonsSection_1.renderButtonsSection)([button], { buttonClassName: 'mt-16 px-5' }) })) : null] }) }) }));
|
|
16
|
-
});
|
|
17
|
-
//# sourceMappingURL=RecommendationCard.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RecommendationCard.js","sourceRoot":"","sources":["../../../src/components/Recommendation/RecommendationCard.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,4DAAyD;AACzD,mFAAgF;AAChF,0DAAuD;AACvD,8CAA2C;AAC3C,iDAA8C;AAC9C,mDAAgD;AAChD,uDAAoD;AAKvC,QAAA,kBAAkB,GAAG,IAAA,aAAG,EACnC,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACrF,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CACxB,uBAAC,iBAAO,IAAC,WAAW,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,SAAS,EAAC,aAAa,EAAC,KAAK,EAAE,KAAK,GAAI,CAC3E,CAAC,CAAC,CAAC,IAAI,CAAC;IACT,MAAM,SAAS,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAC7B,uBAAC,SAAG,IAAC,SAAS,EAAC,+BAA+B,EAAC,KAAK,EAAE,KAAK,GAAI,CAChE,CAAC,CAAC,CAAC,IAAI,CAAC;IAET,OAAO,CACL,uBAAC,2BAAY,IACX,SAAS,EAAE,qGAAqG,SAAS,EAAE,EAC3H,IAAI,EAAC,UAAU,KACX,IAAI,YAER,uBAAC,mBAAQ,IAAC,SAAS,EAAC,sBAAsB,EAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,YAC3E,iCAAK,SAAS,EAAC,sCAAsC,aAClD,WAAW,CAAC,CAAC,CAAC,iCAAM,SAAS,EAAC,MAAM,YAAE,WAAW,GAAQ,CAAC,CAAC,CAAC,IAAI,EAChE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CACf,uBAAC,WAAI,IACH,SAAS,EAAC,wDAAwD,EAClE,KAAK,EAAE,KAAK,GACZ,CACH,CAAC,CAAC,CAAC,IAAI,EACP,WAAW,CAAC,CAAC,CAAC,uBAAC,yBAAW,IAAC,SAAS,EAAC,YAAY,EAAC,KAAK,EAAE,WAAW,GAAI,CAAC,CAAC,CAAC,IAAI,EAC/E,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CACd,gCAAK,SAAS,EAAC,MAAM,YAClB,IAAA,2CAAoB,EAAC,CAAC,MAAM,CAAC,EAAE,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC,GAC9D,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,GACG,GACE,CAChB,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { HeadlineCommonProps, TitleProps } from '../../model/HeadlineType';
|
|
2
|
-
import type { UniBlockContent } from '../../model/JSXBlock';
|
|
3
|
-
import type { LinkCommonProps } from '../../model/LinkProps';
|
|
4
|
-
import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
5
|
-
import { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
6
|
-
import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
7
|
-
/**
|
|
8
|
-
* @title Карточка
|
|
9
|
-
*/
|
|
10
|
-
export interface RecommendationCardTypes extends HeadlineCommonProps, ListContent, ImageContent {
|
|
11
|
-
/**
|
|
12
|
-
* @title Соц сети
|
|
13
|
-
* @minItems 3
|
|
14
|
-
*/
|
|
15
|
-
socialMedia?: LinkCommonProps[];
|
|
16
|
-
button?: ButtonProps;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @title Рекомендации
|
|
20
|
-
*/
|
|
21
|
-
export declare type RecommendationContent = UniBlockContent & TitleProps & {
|
|
22
|
-
/** @title Карточки */
|
|
23
|
-
recommendations?: RecommendationCardTypes[];
|
|
24
|
-
};
|