@redneckz/wildless-cms-uni-blocks 0.9.13 → 0.9.14
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 +52 -42
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Carousel/Carousel.d.ts +1 -0
- package/bundle/components/Carousel/CarouselContent.d.ts +3 -3
- package/bundle/components/CarouselRichTextCard/CarouselRichTextCard.d.ts +5 -0
- package/bundle/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +6 -0
- package/bundle/ui-kit/LocationDialog/LocationDialogProps.d.ts +1 -0
- package/bundle/ui-kit/RichText/RichTextProps.d.ts +5 -0
- package/dist/components/ApplicationForm/Footnote.js +1 -1
- package/dist/components/ApplicationForm/Footnote.js.map +1 -1
- package/dist/components/ApplicationForm/renderQuestionsInterested.js +1 -1
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Carousel/Carousel.d.ts +1 -0
- package/dist/components/Carousel/Carousel.js +8 -4
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel/CarouselContent.d.ts +3 -3
- package/dist/components/Carousel/CarouselScrollButtons.js +2 -2
- package/dist/components/CarouselLinks/CarouselLinks.js +2 -3
- package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/dist/components/CarouselRichTextCard/CarouselRichTextCard.d.ts +5 -0
- package/dist/components/CarouselRichTextCard/CarouselRichTextCard.js +11 -0
- package/dist/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -0
- package/dist/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +6 -0
- package/dist/components/CarouselRichTextCard/CarouselRichTextCardContent.js +2 -0
- package/dist/components/CarouselRichTextCard/CarouselRichTextCardContent.js.map +1 -0
- package/dist/components/Tabs/ScrollableTabs.js +1 -1
- package/dist/ui-kit/Button/renderArrows.js +1 -1
- package/dist/ui-kit/LocationDialog/LocationDialog.js +4 -2
- package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/dist/ui-kit/LocationDialog/LocationDialogProps.d.ts +1 -0
- package/dist/ui-kit/RichText/RichTextProps.d.ts +5 -0
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/Footnote.js +1 -1
- package/lib/components/ApplicationForm/Footnote.js.map +1 -1
- package/lib/components/ApplicationForm/renderQuestionsInterested.js +1 -1
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Carousel/Carousel.d.ts +1 -0
- package/lib/components/Carousel/Carousel.fixture.d.ts +1 -0
- package/lib/components/Carousel/Carousel.js +8 -4
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/Carousel/CarouselContent.d.ts +3 -3
- package/lib/components/Carousel/CarouselScrollButtons.js +2 -2
- package/lib/components/CarouselLinks/CarouselLinks.js +2 -3
- package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/lib/components/CarouselRichTextCard/CarouselRichTextCard.d.ts +5 -0
- package/lib/components/CarouselRichTextCard/CarouselRichTextCard.fixture.d.ts +7 -0
- package/lib/components/CarouselRichTextCard/CarouselRichTextCard.js +9 -0
- package/lib/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -0
- package/lib/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +6 -0
- package/lib/components/CarouselRichTextCard/CarouselRichTextCardContent.js +2 -0
- package/lib/components/CarouselRichTextCard/CarouselRichTextCardContent.js.map +1 -0
- package/lib/components/Tabs/ScrollableTabs.js +1 -1
- package/lib/ui-kit/Button/renderArrows.js +1 -1
- package/lib/ui-kit/LocationDialog/LocationDialog.js +4 -2
- package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/lib/ui-kit/LocationDialog/LocationDialogProps.d.ts +1 -0
- package/lib/ui-kit/RichText/RichTextProps.d.ts +5 -0
- package/mobile/bundle/bundle.umd.js +1 -1
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Carousel/Carousel.d.ts +1 -0
- package/mobile/bundle/components/Carousel/CarouselContent.d.ts +3 -3
- package/mobile/bundle/components/CarouselRichTextCard/CarouselRichTextCard.d.ts +5 -0
- package/mobile/bundle/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +6 -0
- package/mobile/bundle/ui-kit/LocationDialog/LocationDialogProps.d.ts +1 -0
- package/mobile/bundle/ui-kit/RichText/RichTextProps.d.ts +5 -0
- package/mobile/dist/components/ApplicationForm/Footnote.js +1 -1
- package/mobile/dist/components/ApplicationForm/Footnote.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderQuestionsInterested.js +1 -1
- package/mobile/dist/components/Carousel/Carousel.d.ts +1 -0
- package/mobile/dist/components/Carousel/Carousel.js +8 -4
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/Carousel/CarouselContent.d.ts +3 -3
- package/mobile/dist/components/Carousel/CarouselScrollButtons.js +2 -2
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js +2 -3
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCard.d.ts +5 -0
- package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCard.js +11 -0
- package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -0
- package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +6 -0
- package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCardContent.js +2 -0
- package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCardContent.js.map +1 -0
- package/mobile/dist/components/Tabs/ScrollableTabs.js +1 -1
- package/mobile/dist/ui-kit/Button/renderArrows.js +1 -1
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +4 -2
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/LocationDialogProps.d.ts +1 -0
- package/mobile/dist/ui-kit/RichText/RichTextProps.d.ts +5 -0
- package/mobile/lib/components/ApplicationForm/Footnote.js +1 -1
- package/mobile/lib/components/ApplicationForm/Footnote.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderQuestionsInterested.js +1 -1
- package/mobile/lib/components/Carousel/Carousel.d.ts +1 -0
- package/mobile/lib/components/Carousel/Carousel.js +8 -4
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/Carousel/CarouselContent.d.ts +3 -3
- package/mobile/lib/components/Carousel/CarouselScrollButtons.js +2 -2
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js +2 -3
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCard.d.ts +5 -0
- package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCard.js +9 -0
- package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -0
- package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +6 -0
- package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCardContent.js +2 -0
- package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCardContent.js.map +1 -0
- package/mobile/lib/components/Tabs/ScrollableTabs.js +1 -1
- package/mobile/lib/ui-kit/Button/renderArrows.js +1 -1
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +4 -2
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/LocationDialogProps.d.ts +1 -0
- package/mobile/lib/ui-kit/RichText/RichTextProps.d.ts +5 -0
- package/mobile/src/common.css +20 -0
- package/mobile/src/components/ApplicationForm/Footnote.tsx +1 -1
- package/mobile/src/components/ApplicationForm/renderQuestionsInterested.tsx +1 -1
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +16 -16
- package/mobile/src/components/Carousel/Carousel.tsx +21 -4
- package/mobile/src/components/Carousel/CarouselContent.ts +3 -3
- package/mobile/src/components/Carousel/CarouselScrollButtons.tsx +2 -2
- package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +9 -5
- package/mobile/src/components/CarouselRichTextCard/CarouselRichTextCard.example.json +6 -0
- package/mobile/src/components/CarouselRichTextCard/CarouselRichTextCard.tsx +21 -0
- package/mobile/src/components/CarouselRichTextCard/CarouselRichTextCard.ui.json +7 -0
- package/mobile/src/components/CarouselRichTextCard/CarouselRichTextCardContent.ts +7 -0
- package/mobile/src/components/Tabs/ScrollableTabs.tsx +1 -1
- package/mobile/src/components/VerticalLayout/VerticalLayout.example.json +0 -9
- package/mobile/src/ui-kit/Button/renderArrows.tsx +2 -2
- package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +11 -3
- package/mobile/src/ui-kit/LocationDialog/LocationDialogProps.ts +1 -0
- package/mobile/src/ui-kit/RichText/RichTextProps.ts +5 -0
- package/package.json +1 -1
- package/src/common.css +20 -0
- package/src/components/ApplicationForm/Footnote.tsx +1 -1
- package/src/components/ApplicationForm/renderQuestionsInterested.tsx +1 -1
- package/src/components/Blocks.ts +2 -0
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +16 -16
- package/src/components/Carousel/Carousel.fixture.tsx +17 -0
- package/src/components/Carousel/Carousel.tsx +21 -4
- package/src/components/Carousel/CarouselContent.ts +3 -3
- package/src/components/Carousel/CarouselScrollButtons.tsx +2 -2
- package/src/components/CarouselLinks/CarouselLinks.tsx +9 -5
- package/src/components/CarouselRichTextCard/CarouselRichTextCard.example.json +6 -0
- package/src/components/CarouselRichTextCard/CarouselRichTextCard.fixture.tsx +24 -0
- package/src/components/CarouselRichTextCard/CarouselRichTextCard.tsx +21 -0
- package/src/components/CarouselRichTextCard/CarouselRichTextCard.ui.json +7 -0
- package/src/components/CarouselRichTextCard/CarouselRichTextCardContent.ts +7 -0
- package/src/components/Tabs/ScrollableTabs.tsx +1 -1
- package/src/components/VerticalLayout/VerticalLayout.example.json +0 -9
- package/src/icons/IconName.ts +359 -5
- package/src/ui-kit/Button/renderArrows.tsx +2 -2
- package/src/ui-kit/LocationDialog/LocationDialog.tsx +11 -3
- package/src/ui-kit/LocationDialog/LocationDialogProps.ts +1 -0
- package/src/ui-kit/RichText/RichTextProps.ts +5 -0
|
@@ -3,7 +3,6 @@ import type { UniBlockProps } from '../../model/JSXBlock';
|
|
|
3
3
|
import type { LinkProps } from '../../model/LinkProps';
|
|
4
4
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
5
5
|
import { LinkButton } from '../../ui-kit/LinkButton/LinkButton';
|
|
6
|
-
import { Paragraph } from '../../ui-kit/Paragraph/Paragraph';
|
|
7
6
|
import { Carousel } from '../Carousel/Carousel';
|
|
8
7
|
import { Headline } from '../Headline/Headline';
|
|
9
8
|
import type { CarouselLinksContent } from './CarouselLinksContent';
|
|
@@ -28,9 +27,12 @@ export const CarouselLinks = JSX<CarouselLinksProps>(
|
|
|
28
27
|
align="text-left"
|
|
29
28
|
/>
|
|
30
29
|
{additionalDescription ? (
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
<Headline
|
|
31
|
+
className="pt-6"
|
|
32
|
+
isPadding={false}
|
|
33
|
+
description={description}
|
|
34
|
+
align="text-left"
|
|
35
|
+
/>
|
|
34
36
|
) : null}
|
|
35
37
|
</div>
|
|
36
38
|
{links?.length ? renderLinks(links) : null}
|
|
@@ -48,11 +50,13 @@ const renderLinks = (links: LinkProps[]) => {
|
|
|
48
50
|
isBlur={false}
|
|
49
51
|
isCyclic={true}
|
|
50
52
|
itemCount={itemCount}
|
|
53
|
+
arrowsPadded={false}
|
|
54
|
+
showDots={true}
|
|
51
55
|
>
|
|
52
56
|
{new Array(itemCount).fill(null).map((_, groupIndex) => (
|
|
53
57
|
<div
|
|
54
58
|
key={String(groupIndex)}
|
|
55
|
-
className="w-[672px] min-w-[672px] ml-
|
|
59
|
+
className="w-[672px] min-w-[672px] ml-10 mr-10 flex flex-wrap self-start"
|
|
56
60
|
>
|
|
57
61
|
{links
|
|
58
62
|
.slice(groupIndex * MAX_LINKS_COUNT, (groupIndex + 1) * MAX_LINKS_COUNT)
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"content": {
|
|
3
|
+
"richVersion": "striped",
|
|
4
|
+
"__html": "<h4>Заголовок4</h4><p><br></p><table><thead><tr><th><p>Заголовок 1-1</p></th><th><p>Заголовок 1-2</p></th></tr></thead><tbody><tr><td><p>Описание 1-1</p></td><td><p>Описание 1-2</p></td></tr><tr><td><p>Описание 2-1</p></td><td><p>Описание 2-2</p></td></tr><tr><td><p>Описание 3-1<br></p></td><td><p>Описание 3-2<br></p></td></tr><tr><td><p>Описание 4-1<br></p></td><td><p>Описание 4-2<br></p></td></tr></tbody></table></li>"
|
|
5
|
+
}
|
|
6
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
3
|
+
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
4
|
+
import { RichText } from '../../ui-kit/RichText/RichText';
|
|
5
|
+
import { style } from '../../utils/style';
|
|
6
|
+
import type { CarouselRichTextCardContent } from './CarouselRichTextCardContent';
|
|
7
|
+
|
|
8
|
+
export interface CarouselRichTextCardProps extends CarouselRichTextCardContent, UniBlockProps {}
|
|
9
|
+
|
|
10
|
+
export const CarouselRichTextCard = JSX<CarouselRichTextCardProps>(
|
|
11
|
+
({ className = '', __html, richVersion = 'striped', ...rest }) => {
|
|
12
|
+
return (
|
|
13
|
+
<BlockWrapper
|
|
14
|
+
className={style('p-9 border border-gray min-w-96', richVersion, className)}
|
|
15
|
+
{...rest}
|
|
16
|
+
>
|
|
17
|
+
<RichText __html={__html} />
|
|
18
|
+
</BlockWrapper>
|
|
19
|
+
);
|
|
20
|
+
},
|
|
21
|
+
);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { UniBlockContent } from '../../model/JSXBlock';
|
|
2
|
+
import type { RichTextProps } from '../../ui-kit/RichText/RichTextProps';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @title Карточка c форматированным вводом
|
|
6
|
+
*/
|
|
7
|
+
export type CarouselRichTextCardContent = UniBlockContent & RichTextProps & {};
|
|
@@ -12,7 +12,7 @@ interface ScrollableTabsProps extends RenderTabProps {
|
|
|
12
12
|
|
|
13
13
|
export type IsScrollButtonsShown = boolean[];
|
|
14
14
|
|
|
15
|
-
const scrollButtonStyle = 'absolute z-
|
|
15
|
+
const scrollButtonStyle = 'absolute z-40 top-0';
|
|
16
16
|
|
|
17
17
|
export const ScrollableTabs = JSX<ScrollableTabsProps>((props) => {
|
|
18
18
|
const { tabs, onClick, currentTab, page, showCounter } = props;
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
{
|
|
23
23
|
"content": {
|
|
24
24
|
"image": {
|
|
25
|
-
"alignment": "center",
|
|
26
25
|
"size": {
|
|
27
26
|
"width": 230,
|
|
28
27
|
"height": 230
|
|
@@ -35,7 +34,6 @@
|
|
|
35
34
|
"button": {
|
|
36
35
|
"text": "Подробнее",
|
|
37
36
|
"icon": {
|
|
38
|
-
"alignment": "center",
|
|
39
37
|
"format": "webp",
|
|
40
38
|
"size": {
|
|
41
39
|
"width": 24,
|
|
@@ -47,7 +45,6 @@
|
|
|
47
45
|
},
|
|
48
46
|
"version": "primary",
|
|
49
47
|
"iconRight": {
|
|
50
|
-
"alignment": "center",
|
|
51
48
|
"format": "webp",
|
|
52
49
|
"size": {
|
|
53
50
|
"width": 24,
|
|
@@ -69,7 +66,6 @@
|
|
|
69
66
|
{
|
|
70
67
|
"content": {
|
|
71
68
|
"image": {
|
|
72
|
-
"alignment": "center",
|
|
73
69
|
"size": {
|
|
74
70
|
"width": 230,
|
|
75
71
|
"height": 230
|
|
@@ -82,7 +78,6 @@
|
|
|
82
78
|
"button": {
|
|
83
79
|
"text": "Подробнее",
|
|
84
80
|
"icon": {
|
|
85
|
-
"alignment": "center",
|
|
86
81
|
"format": "webp",
|
|
87
82
|
"size": {
|
|
88
83
|
"width": 24,
|
|
@@ -94,7 +89,6 @@
|
|
|
94
89
|
},
|
|
95
90
|
"version": "primary",
|
|
96
91
|
"iconRight": {
|
|
97
|
-
"alignment": "center",
|
|
98
92
|
"format": "webp",
|
|
99
93
|
"size": {
|
|
100
94
|
"width": 24,
|
|
@@ -116,7 +110,6 @@
|
|
|
116
110
|
{
|
|
117
111
|
"content": {
|
|
118
112
|
"image": {
|
|
119
|
-
"alignment": "center",
|
|
120
113
|
"size": {
|
|
121
114
|
"width": 230,
|
|
122
115
|
"height": 230
|
|
@@ -129,7 +122,6 @@
|
|
|
129
122
|
"button": {
|
|
130
123
|
"text": "Подробнее",
|
|
131
124
|
"icon": {
|
|
132
|
-
"alignment": "center",
|
|
133
125
|
"format": "webp",
|
|
134
126
|
"size": {
|
|
135
127
|
"width": 24,
|
|
@@ -141,7 +133,6 @@
|
|
|
141
133
|
},
|
|
142
134
|
"version": "primary",
|
|
143
135
|
"iconRight": {
|
|
144
|
-
"alignment": "center",
|
|
145
136
|
"format": "webp",
|
|
146
137
|
"size": {
|
|
147
138
|
"width": 24,
|
|
@@ -24,7 +24,7 @@ export function renderArrows({
|
|
|
24
24
|
<div>
|
|
25
25
|
{canDec ? (
|
|
26
26
|
<ArrowButton
|
|
27
|
-
className={`absolute z-
|
|
27
|
+
className={`absolute z-40 ${btnClass[0]} ${className}`}
|
|
28
28
|
onClick={dec}
|
|
29
29
|
ariaLabel="Пролистать влево"
|
|
30
30
|
data-block-control="scroll-left"
|
|
@@ -33,7 +33,7 @@ export function renderArrows({
|
|
|
33
33
|
) : null}
|
|
34
34
|
{canInc ? (
|
|
35
35
|
<ArrowButton
|
|
36
|
-
className={`absolute z-
|
|
36
|
+
className={`absolute z-40 rotate-180 ${btnClass[1]} ${className}`}
|
|
37
37
|
onClick={inc}
|
|
38
38
|
ariaLabel="Пролистать вправо"
|
|
39
39
|
data-block-control="scroll-right"
|
|
@@ -45,7 +45,10 @@ export const LocationDialog = JSX<LocationDialogProps>(
|
|
|
45
45
|
{...dialogProps}
|
|
46
46
|
head={
|
|
47
47
|
<div>
|
|
48
|
-
<CurrentLocation
|
|
48
|
+
<CurrentLocation
|
|
49
|
+
currentLocation={currentLocation}
|
|
50
|
+
onChangeLocation={handleChangeLocation}
|
|
51
|
+
/>
|
|
49
52
|
<SearchBar onSearch={setQuery} searchTerm={query} className="mb-7" />
|
|
50
53
|
</div>
|
|
51
54
|
}
|
|
@@ -81,13 +84,18 @@ const cleanUpRegions = (regions: Region[]) =>
|
|
|
81
84
|
name: region.name?.replace(/республика|область|край'/gi, '').trim() || '',
|
|
82
85
|
}));
|
|
83
86
|
|
|
84
|
-
const CurrentLocation = JSX<CurrentLocationProps>(({ currentLocation }) =>
|
|
87
|
+
const CurrentLocation = JSX<CurrentLocationProps>(({ currentLocation, onChangeLocation }) =>
|
|
85
88
|
currentLocation ? (
|
|
86
89
|
<div className="mb-4">
|
|
87
90
|
<Text size="text-l" font="font-light">
|
|
88
91
|
Сейчас выбран:
|
|
89
92
|
</Text>
|
|
90
|
-
<button
|
|
93
|
+
<button
|
|
94
|
+
className="cursor-pointer"
|
|
95
|
+
onClick={() => {
|
|
96
|
+
onChangeLocation && onChangeLocation(currentLocation);
|
|
97
|
+
}}
|
|
98
|
+
>
|
|
91
99
|
<Text color="text-primary-main">{currentLocation.name}</Text>
|
|
92
100
|
</button>
|
|
93
101
|
</div>
|
package/package.json
CHANGED
package/src/common.css
CHANGED
|
@@ -21,6 +21,8 @@ html {
|
|
|
21
21
|
--color-primary-active: 36, 95, 52;
|
|
22
22
|
--color-secondary-hover: 36, 131, 65;
|
|
23
23
|
--color-secondary-active: 36, 95, 52;
|
|
24
|
+
--color-secondary-text: 125, 126, 127;
|
|
25
|
+
--color-secondary-light: 245, 247, 249;
|
|
24
26
|
--color-gradient-from: 141, 189, 76;
|
|
25
27
|
--color-gradient-to: 69, 172, 69;
|
|
26
28
|
}
|
|
@@ -245,6 +247,24 @@ html {
|
|
|
245
247
|
.md-container strong {
|
|
246
248
|
@apply font-bold;
|
|
247
249
|
}
|
|
250
|
+
|
|
251
|
+
.striped .md-container table {
|
|
252
|
+
width: 100%;
|
|
253
|
+
table-layout: fixed;
|
|
254
|
+
text-align: left;
|
|
255
|
+
}
|
|
256
|
+
.striped .md-container table thead {
|
|
257
|
+
color: rgb(var(--color-secondary-text));
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.striped .md-container table td,
|
|
261
|
+
.striped .md-container table th {
|
|
262
|
+
padding: 8px 14px 5px;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.striped .md-container table tbody tr:nth-child(2n-1) {
|
|
266
|
+
background-color: rgb(var(--color-secondary-light));
|
|
267
|
+
}
|
|
248
268
|
}
|
|
249
269
|
|
|
250
270
|
/*
|
|
@@ -10,7 +10,7 @@ interface FootnoteProps {
|
|
|
10
10
|
|
|
11
11
|
export const Footnote = JSX<FootnoteProps>(({ link }) => (
|
|
12
12
|
<Paragraph size="text-s-light" color="text-secondary-text">
|
|
13
|
-
<Text>Нажимая
|
|
13
|
+
<Text>Нажимая кнопку, вы подтверждаете согласие с </Text>
|
|
14
14
|
{link ? (
|
|
15
15
|
<Button
|
|
16
16
|
href={link.href}
|
|
@@ -36,7 +36,7 @@ export const renderQuestionsInterested = ({
|
|
|
36
36
|
/>
|
|
37
37
|
</div>
|
|
38
38
|
<textarea
|
|
39
|
-
placeholder="Укажите интересующий
|
|
39
|
+
placeholder="Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка"
|
|
40
40
|
className="block w-full resize-y min-h-24 p-4 outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text"
|
|
41
41
|
value={text}
|
|
42
42
|
onChange={(e) => handleChange({ text: e.target.value })}
|
package/src/components/Blocks.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { CarouselLinks } from './CarouselLinks/CarouselLinks';
|
|
|
17
17
|
import { CarouselProductCard } from './CarouselProductCard/CarouselProductCard';
|
|
18
18
|
import { CarouselProgramsCard } from './CarouselProgramsCard/CarouselProgramsCard';
|
|
19
19
|
import { CarouselRecommendationCard } from './CarouselRecommendationCard/CarouselRecommendationCard';
|
|
20
|
+
import { CarouselRichTextCard } from './CarouselRichTextCard/CarouselRichTextCard';
|
|
20
21
|
import { CarouselTariffsCard } from './CarouselTariffsCard/CarouselTariffsCard';
|
|
21
22
|
import { ComparisonTable } from './ComparisonTable/ComparisonTable';
|
|
22
23
|
import { ContactsBlock } from './ContactsBlock/ContactsBlock';
|
|
@@ -73,6 +74,7 @@ export const Blocks: BlocksRegistry = {
|
|
|
73
74
|
CarouselProductCard,
|
|
74
75
|
CarouselProgramsCard,
|
|
75
76
|
CarouselRecommendationCard,
|
|
77
|
+
CarouselRichTextCard,
|
|
76
78
|
CarouselTariffsCard,
|
|
77
79
|
ComparisonTable,
|
|
78
80
|
ContactsBlock,
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"cardTextAlign": "center",
|
|
7
7
|
"bonusBenefits": [
|
|
8
8
|
{
|
|
9
|
-
"title": "",
|
|
10
|
-
"description": "
|
|
9
|
+
"title": "Верхний заголовок",
|
|
10
|
+
"description": "Нижний заголовок",
|
|
11
11
|
"icon": {
|
|
12
12
|
"format": "webp",
|
|
13
13
|
"size": {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
|
-
"title": "",
|
|
22
|
-
"description": "
|
|
21
|
+
"title": "Верхний заголовок",
|
|
22
|
+
"description": "Нижний заголовок",
|
|
23
23
|
"icon": {
|
|
24
24
|
"format": "webp",
|
|
25
25
|
"size": {
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
|
-
"title": "",
|
|
34
|
-
"description": "
|
|
33
|
+
"title": "Верхний заголовок",
|
|
34
|
+
"description": "Нижний заголовок",
|
|
35
35
|
"icon": {
|
|
36
36
|
"format": "webp",
|
|
37
37
|
"size": {
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
|
-
"title": "",
|
|
46
|
-
"description": "
|
|
45
|
+
"title": "Верхний заголовок",
|
|
46
|
+
"description": "Нижний заголовок",
|
|
47
47
|
"icon": {
|
|
48
48
|
"format": "webp",
|
|
49
49
|
"size": {
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
|
-
"title": "",
|
|
58
|
-
"description": "
|
|
57
|
+
"title": "Верхний заголовок",
|
|
58
|
+
"description": "Нижний заголовок",
|
|
59
59
|
"icon": {
|
|
60
60
|
"format": "webp",
|
|
61
61
|
"size": {
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
|
-
"title": "",
|
|
70
|
-
"description": "
|
|
69
|
+
"title": "Верхний заголовок",
|
|
70
|
+
"description": "Нижний заголовок",
|
|
71
71
|
"icon": {
|
|
72
72
|
"format": "webp",
|
|
73
73
|
"size": {
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
|
-
"title": "",
|
|
82
|
-
"description": "
|
|
81
|
+
"title": "Верхний заголовок",
|
|
82
|
+
"description": "Нижний заголовок",
|
|
83
83
|
"icon": {
|
|
84
84
|
"format": "webp",
|
|
85
85
|
"size": {
|
|
@@ -90,8 +90,8 @@
|
|
|
90
90
|
}
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
|
-
"title": "",
|
|
94
|
-
"description": "
|
|
93
|
+
"title": "Верхний заголовок",
|
|
94
|
+
"description": "Нижний заголовок",
|
|
95
95
|
"icon": {
|
|
96
96
|
"format": "webp",
|
|
97
97
|
"size": {
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
CAROUSEL_RECOMMENDATION_CARD_SECONDARY,
|
|
16
16
|
CAROUSEL_RECOMMENDATION_CARD_WITHOUT_LIST,
|
|
17
17
|
} from '../CarouselRecommendationCard/CarouselRecommendationCard.fixture';
|
|
18
|
+
import { RICH_CARD } from '../CarouselRichTextCard/CarouselRichTextCard.fixture';
|
|
18
19
|
import { TARIFFS_CARD, TARIFFS_CARD_HIT } from '../CarouselTariffsCard/CarouselTariffsCard.fixture';
|
|
19
20
|
import { Carousel } from './Carousel';
|
|
20
21
|
|
|
@@ -251,4 +252,20 @@ export default {
|
|
|
251
252
|
/>
|
|
252
253
|
</div>
|
|
253
254
|
),
|
|
255
|
+
'rich-text': (
|
|
256
|
+
<div className="container grid grid-cols-12">
|
|
257
|
+
<Carousel
|
|
258
|
+
className="col-span-12"
|
|
259
|
+
visibleItemCount={2}
|
|
260
|
+
block={{
|
|
261
|
+
type: 'Carousel',
|
|
262
|
+
blocks: new Array(6).fill({
|
|
263
|
+
type: 'CarouselRichTextCard',
|
|
264
|
+
content: RICH_CARD,
|
|
265
|
+
}),
|
|
266
|
+
}}
|
|
267
|
+
options={options}
|
|
268
|
+
/>
|
|
269
|
+
</div>
|
|
270
|
+
),
|
|
254
271
|
};
|
|
@@ -9,9 +9,11 @@ import { useSwipeListScroll } from '../../ui-kit/SwipeListControl/useSwipeListSc
|
|
|
9
9
|
import { style } from '../../utils/style';
|
|
10
10
|
import type { CarouselContent } from './CarouselContent';
|
|
11
11
|
import { CarouselScrollButtons } from './CarouselScrollButtons';
|
|
12
|
+
import { SwipeListControlDots } from '../../ui-kit/SwipeListControl/SwipeListControlDots';
|
|
12
13
|
|
|
13
14
|
export interface CarouselProps extends CarouselContent, UniBlockProps {
|
|
14
15
|
itemCount?: number;
|
|
16
|
+
showDots?: boolean;
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
const ITEMS_GAP = 4;
|
|
@@ -25,13 +27,13 @@ export const Carousel: JSXBlock<CarouselProps> = JSX<CarouselProps>(
|
|
|
25
27
|
isCyclic = false,
|
|
26
28
|
arrowsPadded = true,
|
|
27
29
|
isPadding = true,
|
|
30
|
+
showDots = false,
|
|
28
31
|
...rest
|
|
29
32
|
}) => {
|
|
30
|
-
const { blocks: childBlocks } = rest.block || {};
|
|
31
|
-
const count = itemCount || childBlocks?.length
|
|
33
|
+
const { blocks: childBlocks = [] } = rest.block || {};
|
|
34
|
+
const count = itemCount || childBlocks?.length;
|
|
32
35
|
|
|
33
36
|
const [activeIndex, setActiveIndex] = useState<number>(Math.floor((visibleItemCount || 0) / 2));
|
|
34
|
-
|
|
35
37
|
const increaseActiveIndex = useCallback(() => setActiveIndex((_) => _ + 1), []);
|
|
36
38
|
const decreaseActiveIndex = useCallback(() => setActiveIndex((_) => _ - 1), []);
|
|
37
39
|
|
|
@@ -39,7 +41,7 @@ export const Carousel: JSXBlock<CarouselProps> = JSX<CarouselProps>(
|
|
|
39
41
|
itemCount: count,
|
|
40
42
|
isCyclic,
|
|
41
43
|
});
|
|
42
|
-
|
|
44
|
+
const [dotsActiveIndex] = scroll.visibleIndicesRange;
|
|
43
45
|
const isBankHistoryCarousel = childBlocks && childBlocks[0]?.type === 'CarouselBankHistoryCard';
|
|
44
46
|
|
|
45
47
|
return (
|
|
@@ -80,6 +82,7 @@ export const Carousel: JSXBlock<CarouselProps> = JSX<CarouselProps>(
|
|
|
80
82
|
activeIndex={activeIndex}
|
|
81
83
|
itemCount={count}
|
|
82
84
|
/>
|
|
85
|
+
{showDots ? renderDots(containerRef, dotsActiveIndex, itemCount) : null}
|
|
83
86
|
</div>
|
|
84
87
|
</BlockWrapper>
|
|
85
88
|
);
|
|
@@ -95,8 +98,22 @@ Carousel.childrenTypes = [
|
|
|
95
98
|
'CarouselProgramsCard',
|
|
96
99
|
'CarouselRecommendationCard',
|
|
97
100
|
'CarouselTariffsCard',
|
|
101
|
+
'CarouselRichTextCard',
|
|
98
102
|
'CarouselInvestmentCard',
|
|
99
103
|
'CarouselEventCard',
|
|
100
104
|
];
|
|
101
105
|
|
|
102
106
|
const getPaddingStyle = (isPadding: boolean): string => (isPadding ? 'p-12' : '');
|
|
107
|
+
|
|
108
|
+
const renderDots = (
|
|
109
|
+
containerRef: { current: HTMLDivElement | null },
|
|
110
|
+
dotsActiveIndex: number,
|
|
111
|
+
itemCount: number | undefined,
|
|
112
|
+
) => (
|
|
113
|
+
<SwipeListControlDots
|
|
114
|
+
containerRef={containerRef}
|
|
115
|
+
activeIndex={dotsActiveIndex}
|
|
116
|
+
dotCount={itemCount}
|
|
117
|
+
listType={'horizontal-list'}
|
|
118
|
+
/>
|
|
119
|
+
);
|
|
@@ -6,12 +6,12 @@ import type { UniBlockContent } from '../../model/JSXBlock';
|
|
|
6
6
|
export type CarouselContent = UniBlockContent & {
|
|
7
7
|
/**
|
|
8
8
|
* @title Количество видимых карточек
|
|
9
|
-
* @enumNames ["auto", "1", "2", "3"]
|
|
9
|
+
* @enumNames ["auto", "1", "2", "3", "4"]
|
|
10
10
|
*/
|
|
11
11
|
visibleItemCount?: 0 | 1 | 2 | 3 | 4;
|
|
12
|
-
/** @title Добавление
|
|
12
|
+
/** @title Добавление блюра на стрелках*/
|
|
13
13
|
isBlur?: boolean;
|
|
14
|
-
/** @title Добавление
|
|
14
|
+
/** @title Добавление отступа на стрелках */
|
|
15
15
|
arrowsPadded?: boolean;
|
|
16
16
|
/** @title Цикличность */
|
|
17
17
|
isCyclic?: boolean;
|
|
@@ -15,8 +15,8 @@ interface CarouselScrollButtonsProps {
|
|
|
15
15
|
itemCount: number;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
const scrollButtonStyle = 'absolute top-[calc(50%-24px)] z-
|
|
19
|
-
const blurBaseStyle = 'absolute top-0 bottom-0 z-
|
|
18
|
+
const scrollButtonStyle = 'absolute top-[calc(50%-24px)] z-40';
|
|
19
|
+
const blurBaseStyle = 'absolute top-0 bottom-0 z-40 w-[84px] pointer-events-none';
|
|
20
20
|
|
|
21
21
|
export const CarouselScrollButtons = JSX<CarouselScrollButtonsProps>(
|
|
22
22
|
({
|
|
@@ -3,7 +3,6 @@ import type { UniBlockProps } from '../../model/JSXBlock';
|
|
|
3
3
|
import type { LinkProps } from '../../model/LinkProps';
|
|
4
4
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
5
5
|
import { LinkButton } from '../../ui-kit/LinkButton/LinkButton';
|
|
6
|
-
import { Paragraph } from '../../ui-kit/Paragraph/Paragraph';
|
|
7
6
|
import { Carousel } from '../Carousel/Carousel';
|
|
8
7
|
import { Headline } from '../Headline/Headline';
|
|
9
8
|
import type { CarouselLinksContent } from './CarouselLinksContent';
|
|
@@ -28,9 +27,12 @@ export const CarouselLinks = JSX<CarouselLinksProps>(
|
|
|
28
27
|
align="text-left"
|
|
29
28
|
/>
|
|
30
29
|
{additionalDescription ? (
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
<Headline
|
|
31
|
+
className="pt-6"
|
|
32
|
+
isPadding={false}
|
|
33
|
+
description={description}
|
|
34
|
+
align="text-left"
|
|
35
|
+
/>
|
|
34
36
|
) : null}
|
|
35
37
|
</div>
|
|
36
38
|
{links?.length ? renderLinks(links) : null}
|
|
@@ -48,11 +50,13 @@ const renderLinks = (links: LinkProps[]) => {
|
|
|
48
50
|
isBlur={false}
|
|
49
51
|
isCyclic={true}
|
|
50
52
|
itemCount={itemCount}
|
|
53
|
+
arrowsPadded={false}
|
|
54
|
+
showDots={true}
|
|
51
55
|
>
|
|
52
56
|
{new Array(itemCount).fill(null).map((_, groupIndex) => (
|
|
53
57
|
<div
|
|
54
58
|
key={String(groupIndex)}
|
|
55
|
-
className="w-[672px] min-w-[672px] ml-
|
|
59
|
+
className="w-[672px] min-w-[672px] ml-10 mr-10 flex flex-wrap self-start"
|
|
56
60
|
>
|
|
57
61
|
{links
|
|
58
62
|
.slice(groupIndex * MAX_LINKS_COUNT, (groupIndex + 1) * MAX_LINKS_COUNT)
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"content": {
|
|
3
|
+
"richVersion": "striped",
|
|
4
|
+
"__html": "<h4>Заголовок4</h4><p><br></p><table><thead><tr><th><p>Заголовок 1-1</p></th><th><p>Заголовок 1-2</p></th></tr></thead><tbody><tr><td><p>Описание 1-1</p></td><td><p>Описание 1-2</p></td></tr><tr><td><p>Описание 2-1</p></td><td><p>Описание 2-2</p></td></tr><tr><td><p>Описание 3-1<br></p></td><td><p>Описание 3-2<br></p></td></tr><tr><td><p>Описание 4-1<br></p></td><td><p>Описание 4-2<br></p></td></tr></tbody></table></li>"
|
|
5
|
+
}
|
|
6
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CarouselRichTextCard } from './CarouselRichTextCard';
|
|
2
|
+
import type { CarouselRichTextCardContent } from './CarouselRichTextCardContent';
|
|
3
|
+
|
|
4
|
+
export const RICH_CARD: CarouselRichTextCardContent = {
|
|
5
|
+
__html:
|
|
6
|
+
'<h4>Заголовок 4</h4><p><br></p>' +
|
|
7
|
+
'<table>' +
|
|
8
|
+
'<thead><tr><th><p>Эмитент</p></th><th><p>Код</p></th></tr></thead>' +
|
|
9
|
+
'<tbody>' +
|
|
10
|
+
'<tr><td><p>ПАО «Полюс»</p></td><td><p>PLZL</p></td></tr>' +
|
|
11
|
+
'<tr><td><p>Полиметалл Интернэшнл плс</p></td><td><p>POLY</p></td></tr>' +
|
|
12
|
+
'<tr><td><p>ПАО «ГМК «Норильский никель»<br></p></td><td><p>GMKN<br></p></td></tr>' +
|
|
13
|
+
'<tr><td><p>ПАО «Лензолото»<br></p></td><td><p>LNZL<br></p></td></tr>' +
|
|
14
|
+
'</tbody>' +
|
|
15
|
+
'</table>',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
default: (
|
|
20
|
+
<div className="container grid grid-cols-12">
|
|
21
|
+
<CarouselRichTextCard {...RICH_CARD} />
|
|
22
|
+
</div>
|
|
23
|
+
),
|
|
24
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
3
|
+
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
4
|
+
import { RichText } from '../../ui-kit/RichText/RichText';
|
|
5
|
+
import { style } from '../../utils/style';
|
|
6
|
+
import type { CarouselRichTextCardContent } from './CarouselRichTextCardContent';
|
|
7
|
+
|
|
8
|
+
export interface CarouselRichTextCardProps extends CarouselRichTextCardContent, UniBlockProps {}
|
|
9
|
+
|
|
10
|
+
export const CarouselRichTextCard = JSX<CarouselRichTextCardProps>(
|
|
11
|
+
({ className = '', __html, richVersion = 'striped', ...rest }) => {
|
|
12
|
+
return (
|
|
13
|
+
<BlockWrapper
|
|
14
|
+
className={style('p-9 border border-gray min-w-96', richVersion, className)}
|
|
15
|
+
{...rest}
|
|
16
|
+
>
|
|
17
|
+
<RichText __html={__html} />
|
|
18
|
+
</BlockWrapper>
|
|
19
|
+
);
|
|
20
|
+
},
|
|
21
|
+
);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { UniBlockContent } from '../../model/JSXBlock';
|
|
2
|
+
import type { RichTextProps } from '../../ui-kit/RichText/RichTextProps';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @title Карточка c форматированным вводом
|
|
6
|
+
*/
|
|
7
|
+
export type CarouselRichTextCardContent = UniBlockContent & RichTextProps & {};
|