@redneckz/wildless-cms-uni-blocks 0.2.93 → 0.2.97
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 +134 -78
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Accordion/AccordionBlocks.d.ts +1 -2
- package/dist/components/Accordion/AccordionBlocks.js +2 -2
- package/dist/components/Accordion/AccordionBlocks.js.map +1 -1
- package/dist/components/Accordion/AccordionItem.js +3 -6
- package/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/dist/components/BaseTile/BaseTile.js +9 -4
- package/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTableContent.d.ts +2 -3
- package/dist/components/ContentPage/ContentPage.d.ts +9 -1
- package/dist/components/ContentPage/ContentPage.js +20 -17
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ContentPage/toMobilePage.js +13 -2
- package/dist/components/ContentPage/toMobilePage.js.map +1 -1
- package/dist/components/CreditCalculator/CreditCalculator.js +3 -3
- package/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
- package/dist/components/Footer/Footer.js +1 -1
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer/Sitemap.js +1 -1
- package/dist/components/Footer/Sitemap.js.map +1 -1
- package/dist/components/Gallery/Gallery.mobile.js +1 -1
- package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
- package/dist/components/Gallery/GalleryCardInner.d.ts +2 -0
- package/dist/components/Gallery/GalleryCardInner.js +19 -0
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -0
- package/dist/components/Gallery/GalleryContainer.d.ts +13 -0
- package/dist/components/Gallery/GalleryContainer.js +16 -0
- package/dist/components/Gallery/GalleryContainer.js.map +1 -0
- package/dist/components/Gallery/GalleryContent.d.ts +8 -2
- package/dist/components/Gallery/GalleryInner.d.ts +1 -1
- package/dist/components/Gallery/GalleryInner.js +8 -36
- package/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/dist/components/Gallery/constants.d.ts +6 -0
- package/dist/components/Gallery/constants.js +19 -0
- package/dist/components/Gallery/constants.js.map +1 -0
- package/dist/components/Header/Header.js +3 -3
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocs.js +3 -3
- package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocsContent.d.ts +3 -3
- package/dist/components/ProductBlock/ProductBlock.d.ts +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +12 -4
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +13 -2
- package/dist/components/ProductBlock/ProductBlockInner.js +16 -4
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductTile/ProductTileContent.d.ts +2 -2
- package/dist/components/TariffsTable/TariffsTableContent.d.ts +5 -1
- package/dist/components/TextBlock/TextBlockContent.d.ts +1 -0
- package/dist/components/Tile/TileContent.d.ts +1 -1
- package/dist/model/ButtonVersion.d.ts +1 -0
- package/dist/model/LinkProps.d.ts +2 -1
- package/dist/types.d.ts +8 -0
- package/dist/ui-kit/BlockItem/BlockItem.js +4 -4
- package/dist/ui-kit/BlockItem/BlockItem.js.map +1 -1
- package/dist/ui-kit/Button/ButtonProps.d.ts +6 -1
- package/dist/ui-kit/Checkbox/Checkbox.js +2 -2
- package/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/dist/ui-kit/Icon/Icon.js +1 -1
- package/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/dist/ui-kit/Icon/IconProps.d.ts +49 -41
- package/dist/ui-kit/Icon/IconProps.js +45 -41
- package/dist/ui-kit/Icon/IconProps.js.map +1 -1
- package/dist/ui-kit/Img.js +9 -3
- package/dist/ui-kit/Img.js.map +1 -1
- package/dist/ui-kit/InputRange/InputRange.js +2 -1
- package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/dist/ui-kit/SearchBar.js +1 -1
- package/dist/ui-kit/SearchBar.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/AccordionBlocks.d.ts +1 -2
- package/lib/components/Accordion/AccordionBlocks.js +1 -2
- package/lib/components/Accordion/AccordionBlocks.js.map +1 -1
- package/lib/components/Accordion/AccordionItem.js +1 -1
- package/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/components/BaseTile/BaseTile.js +9 -4
- package/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTableContent.d.ts +2 -3
- package/lib/components/ContentPage/ContentPage.d.ts +9 -1
- package/lib/components/ContentPage/ContentPage.js +20 -17
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ContentPage/toMobilePage.js +13 -2
- package/lib/components/ContentPage/toMobilePage.js.map +1 -1
- package/lib/components/CreditCalculator/CreditCalculator.js +3 -3
- package/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
- package/lib/components/Footer/Footer.js +1 -1
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/Sitemap.js +1 -1
- package/lib/components/Footer/Sitemap.js.map +1 -1
- package/lib/components/Gallery/Gallery.mobile.js +1 -1
- package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
- package/lib/components/Gallery/GalleryCardInner.d.ts +2 -0
- package/lib/components/Gallery/GalleryCardInner.js +17 -0
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -0
- package/lib/components/Gallery/GalleryContainer.d.ts +13 -0
- package/lib/components/Gallery/GalleryContainer.js +14 -0
- package/lib/components/Gallery/GalleryContainer.js.map +1 -0
- package/lib/components/Gallery/GalleryContent.d.ts +8 -2
- package/lib/components/Gallery/GalleryInner.d.ts +1 -1
- package/lib/components/Gallery/GalleryInner.js +6 -34
- package/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/lib/components/Gallery/constants.d.ts +6 -0
- package/lib/components/Gallery/constants.js +17 -0
- package/lib/components/Gallery/constants.js.map +1 -0
- package/lib/components/Header/Header.js +3 -3
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocs.fixture.d.ts +3 -3
- package/lib/components/LinkDocs/LinkDocs.js +3 -3
- package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocsContent.d.ts +3 -3
- package/lib/components/ProductBlock/ProductBlock.d.ts +1 -1
- package/lib/components/ProductBlock/ProductBlock.fixture.d.ts +1 -0
- package/lib/components/ProductBlock/ProductBlock.js +12 -4
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +13 -2
- package/lib/components/ProductBlock/ProductBlockInner.js +16 -4
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductTile/ProductTileContent.d.ts +2 -2
- package/lib/components/TariffsTable/TariffsTableContent.d.ts +5 -1
- package/lib/components/TextBlock/TextBlockContent.d.ts +1 -0
- package/lib/components/Tile/TileContent.d.ts +1 -1
- package/lib/model/ButtonVersion.d.ts +1 -0
- package/lib/model/LinkProps.d.ts +2 -1
- package/lib/types.d.ts +8 -0
- package/lib/ui-kit/BlockItem/BlockItem.js +4 -4
- package/lib/ui-kit/BlockItem/BlockItem.js.map +1 -1
- package/lib/ui-kit/Button/ButtonProps.d.ts +6 -1
- package/lib/ui-kit/Checkbox/Checkbox.js +2 -2
- package/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/lib/ui-kit/Icon/Icon.js +1 -1
- package/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/lib/ui-kit/Icon/IconProps.d.ts +49 -41
- package/lib/ui-kit/Icon/IconProps.js +45 -41
- package/lib/ui-kit/Icon/IconProps.js.map +1 -1
- package/lib/ui-kit/Img.js +9 -3
- package/lib/ui-kit/Img.js.map +1 -1
- package/lib/ui-kit/InputRange/InputRange.js +2 -1
- package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/lib/ui-kit/SearchBar.js +1 -1
- package/lib/ui-kit/SearchBar.js.map +1 -1
- package/package.json +6 -4
- package/src/components/Accordion/Accordion.example.json +4 -4
- package/src/components/Accordion/Accordion.fixture.tsx +5 -1
- package/src/components/Accordion/AccordionBlocks.tsx +1 -3
- package/src/components/Accordion/AccordionItem.tsx +1 -1
- package/src/components/BaseTile/BaseTile.tsx +14 -5
- package/src/components/BenefitsBlock/BenefitsBlock.fixture.tsx +31 -28
- package/src/components/ComparisonTable/ComparisonTable.example.json +1 -1
- package/src/components/ComparisonTable/ComparisonTable.fixture.tsx +43 -53
- package/src/components/ComparisonTable/ComparisonTableContent.ts +2 -3
- package/src/components/ContentPage/ContentPage.page.json +31 -49
- package/src/components/ContentPage/ContentPage.tsx +71 -36
- package/src/components/ContentPage/toMobilePage.ts +19 -2
- package/src/components/CreditCalculator/CreditCalculator.fixture.tsx +9 -1
- package/src/components/CreditCalculator/CreditCalculator.tsx +11 -8
- package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.tsx +1 -1
- package/src/components/Footer/Footer.fixture.tsx +265 -258
- package/src/components/Footer/Footer.tsx +3 -3
- package/src/components/Footer/Sitemap.tsx +1 -1
- package/src/components/Gallery/Gallery.fixture.tsx +52 -48
- package/src/components/Gallery/Gallery.mobile.tsx +1 -3
- package/src/components/Gallery/GalleryCardInner.tsx +53 -0
- package/src/components/Gallery/GalleryContainer.tsx +58 -0
- package/src/components/Gallery/GalleryContent.ts +8 -2
- package/src/components/Gallery/GalleryInner.tsx +15 -94
- package/src/components/Gallery/constants.ts +22 -0
- package/src/components/Header/Header.tsx +14 -12
- package/src/components/Headline/Headline.fixture.tsx +25 -3
- package/src/components/LikeControl/LikeControl.fixture.tsx +5 -1
- package/src/components/LinkDocs/LinkDocs.example.json +26 -0
- package/src/components/LinkDocs/LinkDocs.fixture.tsx +23 -6
- package/src/components/LinkDocs/LinkDocs.tsx +3 -3
- package/src/components/LinkDocs/LinkDocsContent.ts +3 -3
- package/src/components/MiniGallery/MiniGallery.fixture.tsx +12 -22
- package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +3 -1
- package/src/components/PictureText/PictureText.example.json +1 -1
- package/src/components/PictureText/PictureText.fixture.tsx +5 -1
- package/src/components/Placeholder/Placeholder.fixture.tsx +5 -1
- package/src/components/ProductBlock/ProductBlock.example.json +1 -1
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +141 -77
- package/src/components/ProductBlock/ProductBlock.tsx +20 -7
- package/src/components/ProductBlock/ProductBlockContent.ts +14 -2
- package/src/components/ProductBlock/ProductBlockInner.tsx +39 -7
- package/src/components/ProductGallery/ProductGallery.fixture.tsx +96 -93
- package/src/components/ProductTile/ProductTile.example.json +1 -1
- package/src/components/ProductTile/ProductTile.fixture.tsx +4 -4
- package/src/components/ProductTile/ProductTileContent.ts +2 -2
- package/src/components/PromoTile/PromoTile.fixture.tsx +1 -1
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +21 -18
- package/src/components/TariffsTable/TariffsTable.fixture.tsx +5 -16
- package/src/components/TariffsTable/TariffsTableContent.ts +5 -1
- package/src/components/TextBlock/TextBlock.fixture.tsx +62 -45
- package/src/components/TextBlock/TextBlockContent.ts +1 -0
- package/src/components/Tile/Tile.example.json +1 -1
- package/src/components/Tile/Tile.fixture.tsx +11 -8
- package/src/components/Tile/TileContent.ts +1 -1
- package/src/icons/AppleIcon.svg +1 -1
- package/src/icons/CalendarWhiteIcon.svg +17 -0
- package/src/icons/EmptyWalletWhiteIcon.svg +16 -0
- package/src/icons/GridIcon.svg +2 -2
- package/src/icons/PercentageSquareWhiteIcon.svg +16 -0
- package/src/icons/PlayMarketIcon.svg +1 -1
- package/src/model/ButtonVersion.ts +1 -0
- package/src/model/LinkProps.ts +2 -1
- package/src/setup-fixture.ts +1 -2
- package/src/types.ts +11 -1
- package/src/ui-kit/BlockItem/BlockItem.tsx +4 -4
- package/src/ui-kit/Button/ButtonProps.ts +6 -1
- package/src/ui-kit/Checkbox/Checkbox.tsx +7 -3
- package/src/ui-kit/Icon/Icon.tsx +1 -1
- package/src/ui-kit/Icon/IconProps.ts +8 -0
- package/src/ui-kit/Img.tsx +23 -10
- package/src/ui-kit/InputRange/InputRange.tsx +7 -6
- package/src/ui-kit/SearchBar.tsx +3 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import type { Picture } from '../../model/Picture';
|
|
1
2
|
import { context } from '../../setup-fixture';
|
|
2
|
-
|
|
3
|
+
import type { ButtonCommonProps } from '../../ui-kit/Button/Button';
|
|
3
4
|
import { Gallery, GalleryProps } from './Gallery';
|
|
4
5
|
import { Gallery as MobileGallery } from './Gallery.mobile';
|
|
5
|
-
import type { Picture } from '../../model/Picture';
|
|
6
6
|
|
|
7
7
|
const image: Picture = {
|
|
8
8
|
src: 'money-1.png',
|
|
@@ -11,6 +11,14 @@ const image: Picture = {
|
|
|
11
11
|
width: 140,
|
|
12
12
|
height: 140,
|
|
13
13
|
},
|
|
14
|
+
title: 'money',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const buttonPrimary: ButtonCommonProps = {
|
|
18
|
+
href: '/credit-cards',
|
|
19
|
+
text: 'Подробнее',
|
|
20
|
+
target: '_blank',
|
|
21
|
+
version: 'secondary',
|
|
14
22
|
};
|
|
15
23
|
|
|
16
24
|
const defaultItems = [
|
|
@@ -29,21 +37,21 @@ const defaultProps: GalleryProps = {
|
|
|
29
37
|
description:
|
|
30
38
|
'Время копить: ставка растет в зависимости от срока нахождения средств на Счете!',
|
|
31
39
|
image,
|
|
32
|
-
|
|
40
|
+
button: buttonPrimary,
|
|
33
41
|
items: defaultItems,
|
|
34
42
|
},
|
|
35
43
|
{
|
|
36
44
|
title: 'Более 1000 развлечений',
|
|
37
45
|
description: 'Порядок и условия предоставления в соответствии с 106 ФЗ',
|
|
38
46
|
image,
|
|
39
|
-
|
|
47
|
+
button: buttonPrimary,
|
|
40
48
|
items: defaultItems,
|
|
41
49
|
},
|
|
42
50
|
{
|
|
43
51
|
title: 'Фермерские продукты',
|
|
44
52
|
description: 'Высокий процент даже при небольшой сумме денежных средств',
|
|
45
53
|
image,
|
|
46
|
-
|
|
54
|
+
button: buttonPrimary,
|
|
47
55
|
items: defaultItems,
|
|
48
56
|
},
|
|
49
57
|
{
|
|
@@ -51,14 +59,7 @@ const defaultProps: GalleryProps = {
|
|
|
51
59
|
description:
|
|
52
60
|
'Время копить: ставка растет в зависимости от срока нахождения средств на Счете!',
|
|
53
61
|
image,
|
|
54
|
-
|
|
55
|
-
items: defaultItems,
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
title: 'Фермерские продукты',
|
|
59
|
-
description: 'Высокий процент даже при небольшой сумме денежных средств',
|
|
60
|
-
image,
|
|
61
|
-
href: '/credit-cards',
|
|
62
|
+
button: buttonPrimary,
|
|
62
63
|
items: defaultItems,
|
|
63
64
|
},
|
|
64
65
|
],
|
|
@@ -74,32 +75,26 @@ const textAndButtonProps: GalleryProps = {
|
|
|
74
75
|
description:
|
|
75
76
|
'Время копить: ставка растет в зависимости от срока нахождения средств на Счете!',
|
|
76
77
|
image,
|
|
77
|
-
|
|
78
|
+
button: buttonPrimary,
|
|
78
79
|
},
|
|
79
80
|
{
|
|
80
81
|
title: 'Более 1000 развлечений',
|
|
81
82
|
description: 'Порядок и условия предоставления в соответствии с 106 ФЗ',
|
|
82
83
|
image,
|
|
83
|
-
|
|
84
|
+
button: buttonPrimary,
|
|
84
85
|
},
|
|
85
86
|
{
|
|
86
87
|
title: 'Фермерские продукты',
|
|
87
88
|
description: 'Высокий процент даже при небольшой сумме денежных средств',
|
|
88
89
|
image,
|
|
89
|
-
|
|
90
|
+
button: buttonPrimary,
|
|
90
91
|
},
|
|
91
92
|
{
|
|
92
93
|
title: '«Моя выгода»',
|
|
93
94
|
description:
|
|
94
95
|
'Время копить: ставка растет в зависимости от срока нахождения средств на Счете!',
|
|
95
96
|
image,
|
|
96
|
-
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
title: 'Фермерские продукты',
|
|
100
|
-
description: 'Высокий процент даже при небольшой сумме денежных средств',
|
|
101
|
-
image,
|
|
102
|
-
href: '/credit-cards',
|
|
97
|
+
button: buttonPrimary,
|
|
103
98
|
},
|
|
104
99
|
],
|
|
105
100
|
};
|
|
@@ -112,31 +107,25 @@ const listAndButtonProps: GalleryProps = {
|
|
|
112
107
|
{
|
|
113
108
|
title: 'Более 5000 товаров',
|
|
114
109
|
image,
|
|
115
|
-
|
|
110
|
+
button: buttonPrimary,
|
|
116
111
|
items: defaultItems,
|
|
117
112
|
},
|
|
118
113
|
{
|
|
119
114
|
title: 'Более 1000 развлечений',
|
|
120
115
|
image,
|
|
121
|
-
|
|
116
|
+
button: buttonPrimary,
|
|
122
117
|
items: defaultItems,
|
|
123
118
|
},
|
|
124
119
|
{
|
|
125
120
|
title: 'Фермерские продукты',
|
|
126
121
|
image,
|
|
127
|
-
|
|
122
|
+
button: buttonPrimary,
|
|
128
123
|
items: defaultItems,
|
|
129
124
|
},
|
|
130
125
|
{
|
|
131
126
|
title: '«Моя выгода»',
|
|
132
127
|
image,
|
|
133
|
-
|
|
134
|
-
items: defaultItems,
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
title: 'Фермерские продукты',
|
|
138
|
-
image,
|
|
139
|
-
href: '/credit-cards',
|
|
128
|
+
button: buttonPrimary,
|
|
140
129
|
items: defaultItems,
|
|
141
130
|
},
|
|
142
131
|
],
|
|
@@ -169,11 +158,6 @@ const textAndNoButtonProps: GalleryProps = {
|
|
|
169
158
|
'Время копить: ставка растет в зависимости от срока нахождения средств на Счете!',
|
|
170
159
|
image,
|
|
171
160
|
},
|
|
172
|
-
{
|
|
173
|
-
title: 'Фермерские продукты',
|
|
174
|
-
description: 'Высокий процент даже при небольшой сумме денежных средств',
|
|
175
|
-
image,
|
|
176
|
-
},
|
|
177
161
|
],
|
|
178
162
|
};
|
|
179
163
|
|
|
@@ -198,18 +182,38 @@ const onlyTitleProps: GalleryProps = {
|
|
|
198
182
|
title: '«Моя выгода»',
|
|
199
183
|
image,
|
|
200
184
|
},
|
|
201
|
-
{
|
|
202
|
-
title: 'Фермерские продукты',
|
|
203
|
-
image,
|
|
204
|
-
},
|
|
205
185
|
],
|
|
206
186
|
};
|
|
207
187
|
|
|
208
188
|
export default {
|
|
209
|
-
default:
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
189
|
+
default: (
|
|
190
|
+
<div className="container grid grid-cols-12">
|
|
191
|
+
<Gallery className="col-span-12" {...defaultProps} />
|
|
192
|
+
</div>
|
|
193
|
+
),
|
|
194
|
+
'text and button': (
|
|
195
|
+
<div className="container grid grid-cols-12">
|
|
196
|
+
<Gallery className="col-span-12" {...textAndButtonProps} />
|
|
197
|
+
</div>
|
|
198
|
+
),
|
|
199
|
+
'list and button': (
|
|
200
|
+
<div className="container grid grid-cols-12">
|
|
201
|
+
<Gallery className="col-span-12" {...listAndButtonProps} />
|
|
202
|
+
</div>
|
|
203
|
+
),
|
|
204
|
+
'text and no button': (
|
|
205
|
+
<div className="container grid grid-cols-12">
|
|
206
|
+
<Gallery className="col-span-12" {...textAndNoButtonProps} />
|
|
207
|
+
</div>
|
|
208
|
+
),
|
|
209
|
+
'only title': (
|
|
210
|
+
<div className="container grid grid-cols-12">
|
|
211
|
+
<Gallery className="col-span-12" {...onlyTitleProps} />
|
|
212
|
+
</div>
|
|
213
|
+
),
|
|
214
|
+
mobile: (
|
|
215
|
+
<div className="container grid grid-cols-12">
|
|
216
|
+
<MobileGallery className="col-span-12" {...defaultProps} />
|
|
217
|
+
</div>
|
|
218
|
+
),
|
|
215
219
|
};
|
|
@@ -51,9 +51,7 @@ function renderCard(card: GalleryCard, key: number) {
|
|
|
51
51
|
) : null}
|
|
52
52
|
{card.items?.length ? renderItems(card.items) : null}
|
|
53
53
|
</div>
|
|
54
|
-
{card
|
|
55
|
-
<Button className="mt-6" text="Подробнее" version="secondary" href={card.href} />
|
|
56
|
-
) : null}
|
|
54
|
+
{card?.button?.href ? <Button className="mt-6" {...card.button} /> : null}
|
|
57
55
|
</div>
|
|
58
56
|
);
|
|
59
57
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
3
|
+
import { BlockItem } from '../../ui-kit/BlockItem/BlockItem';
|
|
4
|
+
import { Button } from '../../ui-kit/Button/Button';
|
|
5
|
+
import { Img } from '../../ui-kit/Img';
|
|
6
|
+
import { cardVersionMap } from './constants';
|
|
7
|
+
import type { GalleryCard } from './GalleryContent';
|
|
8
|
+
|
|
9
|
+
export const GalleryCardInner = JSX<GalleryCard>(
|
|
10
|
+
({ title, description, image, items, button, version }) => {
|
|
11
|
+
const cardVersionClasses = cardVersionMap[version ?? 'primary'];
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<div>
|
|
15
|
+
<div>
|
|
16
|
+
{image?.src ? (
|
|
17
|
+
<div className="flex justify-center">
|
|
18
|
+
<Img className="mb-6" image={image} />
|
|
19
|
+
</div>
|
|
20
|
+
) : null}
|
|
21
|
+
{title && renderCardTitle(title, description, items)}
|
|
22
|
+
{description && (
|
|
23
|
+
<div className={`font-normal text-sm mt-2 ${cardVersionClasses}`}>{description}</div>
|
|
24
|
+
)}
|
|
25
|
+
{items?.length ? (
|
|
26
|
+
<section className={`max-w-[308px] mt-2 ${cardVersionClasses}`} role="list">
|
|
27
|
+
{items.map((item, i) => renderItem(item, i, version))}
|
|
28
|
+
</section>
|
|
29
|
+
) : null}
|
|
30
|
+
</div>
|
|
31
|
+
{button?.href && <Button className="mt-6" {...button} />}
|
|
32
|
+
</div>
|
|
33
|
+
);
|
|
34
|
+
},
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
function renderCardTitle(title: string, description?: string, items?: string[]) {
|
|
38
|
+
return (
|
|
39
|
+
<div
|
|
40
|
+
className={`font-medium text-xl m-0 ${!description && !items?.length ? 'text-center' : ''}`}
|
|
41
|
+
>
|
|
42
|
+
{title}
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function renderItem(item: string, i: number, version?: BlockVersion) {
|
|
48
|
+
return (
|
|
49
|
+
<BlockItem key={String(i)} version={version ?? 'primary'}>
|
|
50
|
+
<span className="text-sm">{item}</span>
|
|
51
|
+
</BlockItem>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { GalleryVersion } from '../../model/GalleryVersion';
|
|
3
|
+
import { Title } from '../../ui-kit/Title/Title';
|
|
4
|
+
import type { ContentPageContext } from '../ContentPage/ContentPageContext';
|
|
5
|
+
import { Tile } from '../Tile/Tile';
|
|
6
|
+
import { cardStyleMap, cardWidthMap, galleryLengthForScrollMap } from './constants';
|
|
7
|
+
import { GalleryCardInner } from './GalleryCardInner';
|
|
8
|
+
import type { GalleryCard } from './GalleryContent';
|
|
9
|
+
import type { GalleryInnerProps } from './GalleryInner';
|
|
10
|
+
|
|
11
|
+
export interface GalleryContainerProps extends Omit<GalleryInnerProps, 'className'> {
|
|
12
|
+
activeCardIndex: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface GalleryCardData {
|
|
16
|
+
card: GalleryCard;
|
|
17
|
+
version: GalleryVersion;
|
|
18
|
+
context: ContentPageContext;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const GalleryContainer = JSX<GalleryContainerProps>(
|
|
22
|
+
({ context, title, description, cards = [], version = 'normal', activeCardIndex }) => {
|
|
23
|
+
return (
|
|
24
|
+
<div>
|
|
25
|
+
<div className="absolute top-0 left-0 bottom-0 w-[84px] bg-gradient-to-r from-white to-transparent" />
|
|
26
|
+
<div className="flex flex-col items-center mb-8">
|
|
27
|
+
{title ? <Title className="font-medium m-0 text-center">{title}</Title> : null}
|
|
28
|
+
{description ? (
|
|
29
|
+
<div className="font-normal text-base max-w-[600px] mt-2.5">{description}</div>
|
|
30
|
+
) : null}
|
|
31
|
+
</div>
|
|
32
|
+
<div
|
|
33
|
+
className={`flex ${
|
|
34
|
+
cards?.length <= galleryLengthForScrollMap[version] ? 'justify-center' : ''
|
|
35
|
+
} duration-1000`}
|
|
36
|
+
style={{ transform: `translateX(-${activeCardIndex * cardWidthMap[version]}px)` }}
|
|
37
|
+
role="list"
|
|
38
|
+
>
|
|
39
|
+
{cards?.map((card, i) => renderCard({ card, version, context }, i))}
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
},
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
function renderCard({ card, version, context }: GalleryCardData, i: number) {
|
|
47
|
+
return (
|
|
48
|
+
<Tile
|
|
49
|
+
context={context}
|
|
50
|
+
className={`box-border border-solid border rounded-md border-main-divider p-7 mx-2 flex flex-col justify-between
|
|
51
|
+
items-stretch ${cardStyleMap[version]} w-full col-span-4`}
|
|
52
|
+
version={card.version}
|
|
53
|
+
key={String(i)}
|
|
54
|
+
>
|
|
55
|
+
<GalleryCardInner {...card} />
|
|
56
|
+
</Tile>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
1
2
|
import type { Picture } from '../../model/Picture';
|
|
3
|
+
import type { BaseTileIconButton } from '../BaseTile/BaseTileProps';
|
|
2
4
|
|
|
3
5
|
/**
|
|
4
6
|
* @title Карточка
|
|
@@ -10,9 +12,13 @@ export interface GalleryCard {
|
|
|
10
12
|
description?: string;
|
|
11
13
|
image?: Picture;
|
|
12
14
|
/** @title Ссылка */
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
+
button?: BaseTileIconButton;
|
|
16
|
+
/**
|
|
17
|
+
* @title Список
|
|
18
|
+
* @minItems 4
|
|
19
|
+
*/
|
|
15
20
|
items?: string[];
|
|
21
|
+
version?: BlockVersion;
|
|
16
22
|
}
|
|
17
23
|
|
|
18
24
|
/**
|
|
@@ -1,43 +1,21 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { GalleryCard, GalleryContent } from './GalleryContent';
|
|
3
2
|
import type { GalleryVersion } from '../../model/GalleryVersion';
|
|
4
3
|
import type { UniBlockProps } from '../../types';
|
|
5
4
|
import { ArrowButton } from '../../ui-kit/Button/ArrowButton';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { Title } from '../../ui-kit/Title/Title';
|
|
5
|
+
import { galleryLengthForScrollMap } from './constants';
|
|
6
|
+
import { GalleryContainer } from './GalleryContainer';
|
|
7
|
+
import type { GalleryContent } from './GalleryContent';
|
|
10
8
|
|
|
11
9
|
export interface GalleryInnerProps extends GalleryContent, UniBlockProps {
|
|
12
10
|
version?: GalleryVersion;
|
|
13
11
|
}
|
|
14
12
|
|
|
15
|
-
const cardStyleMap: Record<GalleryVersion, string> = {
|
|
16
|
-
normal: 'min-w-[364px] w-[364px]',
|
|
17
|
-
mini: 'min-w-[260px] w-[260px]',
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const cardWidthMap: Record<GalleryVersion, number> = {
|
|
21
|
-
normal: 380,
|
|
22
|
-
mini: 276,
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const galleryLengthForScrollMap: Record<GalleryVersion, number> = {
|
|
26
|
-
normal: 3,
|
|
27
|
-
mini: 4,
|
|
28
|
-
};
|
|
29
|
-
|
|
30
13
|
export const GalleryInner = JSX<GalleryInnerProps>(
|
|
31
|
-
({
|
|
14
|
+
({ context, cards = [], className, version = 'normal', ...rest }) => {
|
|
32
15
|
const [activeCardIndex, setActiveCardIndex] = context.useState(0);
|
|
33
16
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function handlePrevClick() {
|
|
39
|
-
setActiveCardIndex(activeCardIndex - 1);
|
|
40
|
-
}
|
|
17
|
+
const handleNextClick = () => setActiveCardIndex(activeCardIndex + 1);
|
|
18
|
+
const handlePrevClick = () => setActiveCardIndex(activeCardIndex - 1);
|
|
41
19
|
|
|
42
20
|
const isGalleryScrollAvailable = cards?.length > galleryLengthForScrollMap[version];
|
|
43
21
|
|
|
@@ -49,26 +27,15 @@ export const GalleryInner = JSX<GalleryInnerProps>(
|
|
|
49
27
|
|
|
50
28
|
return (
|
|
51
29
|
<section
|
|
52
|
-
className={`relative font-sans text-primary-text bg-white p-
|
|
30
|
+
className={`relative font-sans text-primary-text bg-white p-[50px] overflow-hidden ${className}`}
|
|
53
31
|
>
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
{
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
// Need to place all cards at the center if count of cards less than 4
|
|
62
|
-
className={`flex ${
|
|
63
|
-
cards?.length <= galleryLengthForScrollMap[version] ? 'justify-center' : ''
|
|
64
|
-
} duration-1000`}
|
|
65
|
-
// All cards has same width
|
|
66
|
-
style={{ transform: `translateX(-${activeCardIndex * cardWidthMap[version]}px)` }}
|
|
67
|
-
role="list"
|
|
68
|
-
>
|
|
69
|
-
{cards?.map((card, i) => renderCard(card, i, version))}
|
|
70
|
-
</div>
|
|
71
|
-
<div className="absolute top-0 left-0 bottom-0 w-[84px] bg-gradient-to-r from-white to-transparent"></div>
|
|
32
|
+
<GalleryContainer
|
|
33
|
+
context={context}
|
|
34
|
+
cards={cards}
|
|
35
|
+
version={version}
|
|
36
|
+
activeCardIndex={activeCardIndex}
|
|
37
|
+
{...rest}
|
|
38
|
+
/>
|
|
72
39
|
{showPrevButton && (
|
|
73
40
|
<ArrowButton
|
|
74
41
|
className="absolute top-1/2 left-8 rotate-180"
|
|
@@ -83,54 +50,8 @@ export const GalleryInner = JSX<GalleryInnerProps>(
|
|
|
83
50
|
ariaLabel="Пролистать вправо"
|
|
84
51
|
/>
|
|
85
52
|
)}
|
|
86
|
-
<div className="absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"
|
|
53
|
+
<div className="absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" />
|
|
87
54
|
</section>
|
|
88
55
|
);
|
|
89
56
|
},
|
|
90
57
|
);
|
|
91
|
-
|
|
92
|
-
function renderCard(card: GalleryCard, i: number, version: GalleryVersion) {
|
|
93
|
-
return (
|
|
94
|
-
<div
|
|
95
|
-
className={`box-border border-solid border rounded-md border-main-divider p-7 mx-2 flex flex-col justify-between items-stretch ${cardStyleMap[version]} w-full`}
|
|
96
|
-
role="listitem"
|
|
97
|
-
key={String(i)}
|
|
98
|
-
>
|
|
99
|
-
<div>
|
|
100
|
-
{card.image?.src ? (
|
|
101
|
-
<div className="flex justify-center">
|
|
102
|
-
<Img className="mb-6" image={card.image} />
|
|
103
|
-
</div>
|
|
104
|
-
) : null}
|
|
105
|
-
{card.title ? (
|
|
106
|
-
<h4
|
|
107
|
-
className={`font-medium text-xl m-0 ${
|
|
108
|
-
!card.description && !card.items?.length ? 'text-center' : ''
|
|
109
|
-
}`}
|
|
110
|
-
>
|
|
111
|
-
{card.title}
|
|
112
|
-
</h4>
|
|
113
|
-
) : null}
|
|
114
|
-
{card.description ? (
|
|
115
|
-
<div className="font-normal text-sm text-secondary-text mt-2">{card.description}</div>
|
|
116
|
-
) : null}
|
|
117
|
-
{card.items?.length ? (
|
|
118
|
-
<section className="max-w-[308px] mt-2" role="list">
|
|
119
|
-
{card.items.map(renderItem)}
|
|
120
|
-
</section>
|
|
121
|
-
) : null}
|
|
122
|
-
</div>
|
|
123
|
-
{card.href ? (
|
|
124
|
-
<Button className="mt-6" text="Подробнее" version="secondary" href={card.href} />
|
|
125
|
-
) : null}
|
|
126
|
-
</div>
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function renderItem(item: string, i: number) {
|
|
131
|
-
return (
|
|
132
|
-
<BlockItem key={String(i)}>
|
|
133
|
-
<span className="text-sm text-secondary-text">{item}</span>
|
|
134
|
-
</BlockItem>
|
|
135
|
-
);
|
|
136
|
-
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import type { GalleryVersion } from '../../model/GalleryVersion';
|
|
3
|
+
|
|
4
|
+
export const cardVersionMap: Record<BlockVersion, string> = {
|
|
5
|
+
primary: 'text-secondary-text',
|
|
6
|
+
secondary: '',
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const galleryLengthForScrollMap: Record<GalleryVersion, number> = {
|
|
10
|
+
normal: 3,
|
|
11
|
+
mini: 4,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const cardStyleMap: Record<GalleryVersion, string> = {
|
|
15
|
+
normal: 'min-w-[364px] w-[364px]',
|
|
16
|
+
mini: 'min-w-[260px] w-[260px]',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const cardWidthMap: Record<GalleryVersion, number> = {
|
|
20
|
+
normal: 380,
|
|
21
|
+
mini: 276,
|
|
22
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useLink } from '../../hooks/useLink';
|
|
3
|
+
import { useSitemap } from '../../hooks/useSitemap';
|
|
2
4
|
import { mergeTopItems } from '../../mergeTopItems';
|
|
3
5
|
import type { UniBlockProps } from '../../types';
|
|
4
6
|
import { HeaderItem } from '../../ui-kit/HeaderItem/HeaderItem';
|
|
5
7
|
import { Logo } from '../../ui-kit/Logo/Logo';
|
|
6
8
|
import { TopItem } from '../../ui-kit/TopItem/TopItem';
|
|
7
|
-
import { useLink } from '../../hooks/useLink';
|
|
8
|
-
import { useSitemap } from '../../hooks/useSitemap';
|
|
9
9
|
import type { HeaderContent } from './HeaderContent';
|
|
10
10
|
import { HeaderSecondaryMenu } from './HeaderSecondaryMenu';
|
|
11
11
|
import { isSubItemActive } from './isSubItemActive';
|
|
@@ -43,17 +43,19 @@ export const Header = JSX<HeaderProps>(({ className, defaultLocation, context, t
|
|
|
43
43
|
|
|
44
44
|
return (
|
|
45
45
|
<header className={`pt-5 pb-8 px-20 bg-white ${className || ''}`}>
|
|
46
|
-
<div className="
|
|
47
|
-
<
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
<div className="container">
|
|
47
|
+
<div className="flex items-center">
|
|
48
|
+
<Logo className="mr-8" />
|
|
49
|
+
{topMenu}
|
|
50
|
+
<HeaderSecondaryMenu
|
|
51
|
+
context={context}
|
|
52
|
+
className="ml-auto"
|
|
53
|
+
defaultLocation={defaultLocation}
|
|
54
|
+
/>
|
|
55
|
+
</div>
|
|
56
|
+
<div className="mt-5 h-[1px] bg-main-divider" />
|
|
57
|
+
<nav className="mt-5">{subMenu}</nav>
|
|
54
58
|
</div>
|
|
55
|
-
<div className="mt-5 h-[1px] bg-main-divider" />
|
|
56
|
-
<nav className="mt-5">{subMenu}</nav>
|
|
57
59
|
</header>
|
|
58
60
|
);
|
|
59
61
|
});
|
|
@@ -11,9 +11,31 @@ export const HEADLINE: HeadlineContent = {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export default {
|
|
14
|
-
default:
|
|
15
|
-
|
|
14
|
+
default: (
|
|
15
|
+
<div className="container grid grid-cols-12">
|
|
16
|
+
<Headline className="col-span-12" context={context} {...HEADLINE} />
|
|
17
|
+
</div>
|
|
18
|
+
),
|
|
19
|
+
'left white': (
|
|
20
|
+
<div className="container grid grid-cols-12">
|
|
21
|
+
<Headline
|
|
22
|
+
className="col-span-12"
|
|
23
|
+
context={context}
|
|
24
|
+
{...HEADLINE}
|
|
25
|
+
align="left"
|
|
26
|
+
bgColor="bg-white"
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
29
|
+
),
|
|
16
30
|
'right transparent': (
|
|
17
|
-
<
|
|
31
|
+
<div className="container grid grid-cols-12">
|
|
32
|
+
<Headline
|
|
33
|
+
className="col-span-12"
|
|
34
|
+
context={context}
|
|
35
|
+
{...HEADLINE}
|
|
36
|
+
align="right"
|
|
37
|
+
bgColor="transparent"
|
|
38
|
+
/>
|
|
39
|
+
</div>
|
|
18
40
|
),
|
|
19
41
|
};
|
|
@@ -2,4 +2,8 @@ import { context } from '../../setup-fixture';
|
|
|
2
2
|
|
|
3
3
|
import { LikeControl } from './LikeControl';
|
|
4
4
|
|
|
5
|
-
export default
|
|
5
|
+
export default (
|
|
6
|
+
<div className="container grid grid-cols-12">
|
|
7
|
+
<LikeControl className="col-span-12" context={context} />
|
|
8
|
+
</div>
|
|
9
|
+
);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Дополнительные документы",
|
|
3
|
+
"icon": "DocIcon",
|
|
4
|
+
"documents": [
|
|
5
|
+
{
|
|
6
|
+
"text": "Документ №1",
|
|
7
|
+
"href": "/documents/document1.doc",
|
|
8
|
+
"fileSize": "123КБ"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"text": "Документ №2",
|
|
12
|
+
"href": "/documents/document2.rtf",
|
|
13
|
+
"target": "_blank"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"text": "Документ №3",
|
|
17
|
+
"href": "/abc3/map.jpeg",
|
|
18
|
+
"fileSize": "2МБ"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"text": "Документ №4",
|
|
22
|
+
"href": "/abc/map.rar"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"columnsMode": "double"
|
|
26
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { context } from '../../setup-fixture';
|
|
2
2
|
import { LinkDocs } from './LinkDocs';
|
|
3
3
|
import type { LinkDocsContent } from './LinkDocsContent';
|
|
4
|
+
import { Accordion } from '../Accordion/Accordion';
|
|
4
5
|
|
|
5
6
|
export const LINK_DOCS: LinkDocsContent = {
|
|
6
7
|
title: 'Дополнительные документы',
|
|
@@ -27,9 +28,9 @@ export const LINK_DOCS: LinkDocsContent = {
|
|
|
27
28
|
],
|
|
28
29
|
};
|
|
29
30
|
|
|
30
|
-
export const
|
|
31
|
+
export const LINK_DOCS_ONE_COLUMN: LinkDocsContent = {
|
|
31
32
|
...LINK_DOCS,
|
|
32
|
-
columnsMode: '
|
|
33
|
+
columnsMode: 'single',
|
|
33
34
|
};
|
|
34
35
|
|
|
35
36
|
export const LINK_DOCS_ANOTHER_ICON: LinkDocsContent = {
|
|
@@ -44,8 +45,24 @@ export const LINK_DOCS_NO_ICON: LinkDocsContent = {
|
|
|
44
45
|
};
|
|
45
46
|
|
|
46
47
|
export default {
|
|
47
|
-
'
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
'two columns (default)': (
|
|
49
|
+
<div className="container grid grid-cols-12">
|
|
50
|
+
<LinkDocs className="col-span-12" context={context} {...LINK_DOCS} />
|
|
51
|
+
</div>
|
|
52
|
+
),
|
|
53
|
+
'one column': (
|
|
54
|
+
<div className="container grid grid-cols-12">
|
|
55
|
+
<LinkDocs className="col-span-12" context={context} {...LINK_DOCS_ONE_COLUMN} />
|
|
56
|
+
</div>
|
|
57
|
+
),
|
|
58
|
+
'another icon': (
|
|
59
|
+
<div className="container grid grid-cols-12">
|
|
60
|
+
<LinkDocs className="col-span-12" context={context} {...LINK_DOCS_ANOTHER_ICON} />
|
|
61
|
+
</div>
|
|
62
|
+
),
|
|
63
|
+
'no icon and title': (
|
|
64
|
+
<div className="container grid grid-cols-12">
|
|
65
|
+
<LinkDocs className="col-span-12" context={context} {...LINK_DOCS_NO_ICON} />
|
|
66
|
+
</div>
|
|
67
|
+
),
|
|
51
68
|
};
|