@gravity-ui/page-constructor 2.18.0 → 3.0.0-alpha.0
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/CHANGELOG.md +0 -19
- package/build/cjs/blocks/index.d.ts +0 -4
- package/build/cjs/blocks/index.js +1 -9
- package/build/cjs/blocks/validators.d.ts +0 -4
- package/build/cjs/blocks/validators.js +0 -4
- package/build/cjs/components/Anchor/Anchor.d.ts +2 -2
- package/build/cjs/components/Anchor/Anchor.js +1 -1
- package/build/cjs/components/Anchor/__tests__/Anchor.test.d.ts +1 -0
- package/build/cjs/components/Anchor/__tests__/Anchor.test.js +21 -0
- package/build/cjs/components/AnimateBlock/__tests__/AnimateBlock.test.d.ts +1 -0
- package/build/cjs/components/AnimateBlock/__tests__/AnimateBlock.test.js +36 -0
- package/build/cjs/components/Author/__tests__/Author.test.d.ts +1 -0
- package/build/cjs/components/Author/__tests__/Author.test.js +49 -0
- package/build/cjs/components/BackLink/__tests__/BackLink.test.d.ts +1 -0
- package/build/cjs/components/BackLink/__tests__/BackLink.test.js +63 -0
- package/build/cjs/components/BlockBase/__tests__/BlockBase.test.d.ts +1 -0
- package/build/cjs/components/BlockBase/__tests__/BlockBase.test.js +44 -0
- package/build/cjs/components/Button/__tests__/Button.test.d.ts +1 -0
- package/build/cjs/components/Button/__tests__/Button.test.js +91 -0
- package/build/cjs/components/ButtonTabs/__tests__/ButtonTabs.test.d.ts +1 -0
- package/build/cjs/components/ButtonTabs/__tests__/ButtonTabs.test.js +58 -0
- package/build/cjs/components/index.d.ts +0 -1
- package/build/cjs/components/index.js +1 -3
- package/build/cjs/constructor-items.d.ts +0 -16
- package/build/cjs/constructor-items.js +0 -16
- package/build/cjs/grid/Col/Col.d.ts +1 -1
- package/build/cjs/hooks/index.d.ts +1 -1
- package/build/cjs/hooks/index.js +3 -3
- package/build/cjs/internal-typings/global.d.ts +16 -18
- package/build/cjs/models/constructor-items/blocks.d.ts +2 -50
- package/build/cjs/models/constructor-items/blocks.js +0 -4
- package/build/cjs/models/constructor-items/common.d.ts +0 -14
- package/build/cjs/models/constructor-items/common.js +1 -6
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +5 -46
- package/build/cjs/models/constructor-items/sub-blocks.js +2 -11
- package/build/cjs/schema/index.js +2 -8
- package/build/cjs/schema/validators/blocks.d.ts +0 -4
- package/build/cjs/schema/validators/blocks.js +0 -4
- package/build/cjs/schema/validators/sub-blocks.d.ts +0 -3
- package/build/cjs/schema/validators/sub-blocks.js +0 -3
- package/build/cjs/sub-blocks/HubspotForm/HubspotFormContainer.d.ts +1 -2
- package/build/cjs/sub-blocks/HubspotForm/HubspotFormContainer.js +2 -5
- package/build/cjs/sub-blocks/HubspotForm/index.d.ts +1 -1
- package/build/cjs/sub-blocks/HubspotForm/index.js +5 -6
- package/build/cjs/sub-blocks/index.d.ts +0 -3
- package/build/cjs/sub-blocks/index.js +1 -7
- package/build/cjs/text-transform/{blocks.d.ts → common.d.ts} +1 -4
- package/build/cjs/text-transform/common.js +31 -0
- package/build/cjs/text-transform/config.d.ts +28 -0
- package/build/cjs/text-transform/config.js +291 -0
- package/build/cjs/text-transform/index.d.ts +3 -1
- package/build/cjs/text-transform/index.js +3 -1
- package/build/cjs/text-transform/transformers.d.ts +16 -0
- package/build/cjs/text-transform/transformers.js +61 -0
- package/build/cjs/utils/index.d.ts +0 -1
- package/build/cjs/utils/index.js +0 -1
- package/build/esm/blocks/index.d.ts +0 -4
- package/build/esm/blocks/index.js +0 -4
- package/build/esm/blocks/validators.d.ts +0 -4
- package/build/esm/blocks/validators.js +0 -4
- package/build/esm/components/Anchor/Anchor.d.ts +2 -2
- package/build/esm/components/Anchor/Anchor.js +1 -1
- package/build/esm/components/Anchor/__tests__/Anchor.test.d.ts +1 -0
- package/build/esm/components/Anchor/__tests__/Anchor.test.js +18 -0
- package/build/esm/components/AnimateBlock/__tests__/AnimateBlock.test.d.ts +1 -0
- package/build/esm/components/AnimateBlock/__tests__/AnimateBlock.test.js +33 -0
- package/build/esm/components/Author/__tests__/Author.test.d.ts +1 -0
- package/build/esm/components/Author/__tests__/Author.test.js +46 -0
- package/build/esm/components/BackLink/__tests__/BackLink.test.d.ts +1 -0
- package/build/esm/components/BackLink/__tests__/BackLink.test.js +60 -0
- package/build/esm/components/BlockBase/__tests__/BlockBase.test.d.ts +1 -0
- package/build/esm/components/BlockBase/__tests__/BlockBase.test.js +41 -0
- package/build/esm/components/Button/__tests__/Button.test.d.ts +1 -0
- package/build/esm/components/Button/__tests__/Button.test.js +88 -0
- package/build/esm/components/ButtonTabs/__tests__/ButtonTabs.test.d.ts +1 -0
- package/build/esm/components/ButtonTabs/__tests__/ButtonTabs.test.js +55 -0
- package/build/esm/components/index.d.ts +0 -1
- package/build/esm/components/index.js +0 -1
- package/build/esm/constructor-items.d.ts +0 -16
- package/build/esm/constructor-items.js +2 -18
- package/build/esm/grid/Col/Col.d.ts +1 -1
- package/build/esm/hooks/index.d.ts +1 -1
- package/build/esm/hooks/index.js +1 -1
- package/build/esm/internal-typings/global.d.ts +16 -18
- package/build/esm/models/constructor-items/blocks.d.ts +2 -50
- package/build/esm/models/constructor-items/blocks.js +0 -4
- package/build/esm/models/constructor-items/common.d.ts +0 -14
- package/build/esm/models/constructor-items/common.js +0 -5
- package/build/esm/models/constructor-items/sub-blocks.d.ts +5 -46
- package/build/esm/models/constructor-items/sub-blocks.js +2 -11
- package/build/esm/schema/index.js +4 -10
- package/build/esm/schema/validators/blocks.d.ts +0 -4
- package/build/esm/schema/validators/blocks.js +0 -4
- package/build/esm/schema/validators/sub-blocks.d.ts +0 -3
- package/build/esm/schema/validators/sub-blocks.js +0 -3
- package/build/esm/sub-blocks/HubspotForm/HubspotFormContainer.d.ts +1 -2
- package/build/esm/sub-blocks/HubspotForm/HubspotFormContainer.js +3 -6
- package/build/esm/sub-blocks/HubspotForm/index.d.ts +1 -1
- package/build/esm/sub-blocks/HubspotForm/index.js +6 -7
- package/build/esm/sub-blocks/index.d.ts +0 -3
- package/build/esm/sub-blocks/index.js +0 -3
- package/build/esm/text-transform/{blocks.d.ts → common.d.ts} +1 -4
- package/build/esm/text-transform/common.js +25 -0
- package/build/esm/text-transform/config.d.ts +28 -0
- package/build/esm/text-transform/{blocks.js → config.js} +15 -123
- package/build/esm/text-transform/index.d.ts +3 -1
- package/build/esm/text-transform/index.js +3 -1
- package/build/esm/text-transform/transformers.d.ts +16 -0
- package/build/esm/text-transform/transformers.js +56 -0
- package/build/esm/utils/index.d.ts +0 -1
- package/build/esm/utils/index.js +0 -1
- package/package.json +4 -1
- package/server/models/constructor-items/blocks.d.ts +2 -50
- package/server/models/constructor-items/blocks.js +0 -4
- package/server/models/constructor-items/common.d.ts +0 -14
- package/server/models/constructor-items/common.js +1 -6
- package/server/models/constructor-items/sub-blocks.d.ts +5 -46
- package/server/models/constructor-items/sub-blocks.js +2 -11
- package/server/text-transform/{blocks.d.ts → common.d.ts} +1 -4
- package/server/text-transform/common.js +31 -0
- package/server/text-transform/config.d.ts +28 -0
- package/server/text-transform/config.js +301 -0
- package/server/text-transform/index.d.ts +3 -1
- package/server/text-transform/index.js +3 -1
- package/server/text-transform/transformers.d.ts +16 -0
- package/server/text-transform/transformers.js +63 -0
- package/server/utils/index.d.ts +0 -1
- package/server/utils/index.js +0 -1
- package/build/cjs/blocks/LinkTable/LinkTable.css +0 -3
- package/build/cjs/blocks/LinkTable/LinkTable.d.ts +0 -3
- package/build/cjs/blocks/LinkTable/LinkTable.js +0 -22
- package/build/cjs/blocks/LinkTable/schema.d.ts +0 -77
- package/build/cjs/blocks/LinkTable/schema.js +0 -15
- package/build/cjs/blocks/Preview/MediaContent/MediaContent.css +0 -50
- package/build/cjs/blocks/Preview/MediaContent/MediaContent.d.ts +0 -13
- package/build/cjs/blocks/Preview/MediaContent/MediaContent.js +0 -49
- package/build/cjs/blocks/Preview/MediaContent/PreviewContent.css +0 -106
- package/build/cjs/blocks/Preview/MediaContent/PreviewContent.d.ts +0 -11
- package/build/cjs/blocks/Preview/MediaContent/PreviewContent.js +0 -17
- package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.css +0 -54
- package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.d.ts +0 -9
- package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.js +0 -13
- package/build/cjs/blocks/Preview/Preview.css +0 -50
- package/build/cjs/blocks/Preview/Preview.d.ts +0 -3
- package/build/cjs/blocks/Preview/Preview.js +0 -130
- package/build/cjs/blocks/Preview/schema.d.ts +0 -40
- package/build/cjs/blocks/Preview/schema.js +0 -53
- package/build/cjs/blocks/Security/Security.css +0 -142
- package/build/cjs/blocks/Security/Security.d.ts +0 -3
- package/build/cjs/blocks/Security/Security.js +0 -29
- package/build/cjs/blocks/Security/schema.d.ts +0 -170
- package/build/cjs/blocks/Security/schema.js +0 -32
- package/build/cjs/blocks/Simple/Simple.css +0 -22
- package/build/cjs/blocks/Simple/Simple.d.ts +0 -3
- package/build/cjs/blocks/Simple/Simple.js +0 -22
- package/build/cjs/blocks/Simple/schema.d.ts +0 -68
- package/build/cjs/blocks/Simple/schema.js +0 -14
- package/build/cjs/components/HeightCalculator/HeightCalculator.css +0 -9
- package/build/cjs/components/HeightCalculator/HeightCalculator.d.ts +0 -10
- package/build/cjs/components/HeightCalculator/HeightCalculator.js +0 -44
- package/build/cjs/context/breakpointContext/breakpointContext.d.ts +0 -2
- package/build/cjs/context/breakpointContext/breakpointContext.js +0 -7
- package/build/cjs/context/breakpointContext/index.d.ts +0 -1
- package/build/cjs/context/breakpointContext/index.js +0 -4
- package/build/cjs/hooks/useIntersection.d.ts +0 -1
- package/build/cjs/hooks/useIntersection.js +0 -21
- package/build/cjs/sub-blocks/CardWithImage/CardWithImage.css +0 -19
- package/build/cjs/sub-blocks/CardWithImage/CardWithImage.d.ts +0 -3
- package/build/cjs/sub-blocks/CardWithImage/CardWithImage.js +0 -16
- package/build/cjs/sub-blocks/CardWithImage/schema.d.ts +0 -154
- package/build/cjs/sub-blocks/CardWithImage/schema.js +0 -46
- package/build/cjs/sub-blocks/Partner/Partner.css +0 -8
- package/build/cjs/sub-blocks/Partner/Partner.d.ts +0 -3
- package/build/cjs/sub-blocks/Partner/Partner.js +0 -15
- package/build/cjs/sub-blocks/Partner/schema.d.ts +0 -30
- package/build/cjs/sub-blocks/Partner/schema.js +0 -17
- package/build/cjs/sub-blocks/TutorialCard/TutorialCard.css +0 -20
- package/build/cjs/sub-blocks/TutorialCard/TutorialCard.d.ts +0 -3
- package/build/cjs/sub-blocks/TutorialCard/TutorialCard.js +0 -23
- package/build/cjs/sub-blocks/TutorialCard/schema.d.ts +0 -34
- package/build/cjs/sub-blocks/TutorialCard/schema.js +0 -20
- package/build/cjs/text-transform/blocks.js +0 -404
- package/build/cjs/utils/scroll.d.ts +0 -15
- package/build/cjs/utils/scroll.js +0 -35
- package/build/esm/blocks/LinkTable/LinkTable.css +0 -3
- package/build/esm/blocks/LinkTable/LinkTable.d.ts +0 -4
- package/build/esm/blocks/LinkTable/LinkTable.js +0 -21
- package/build/esm/blocks/LinkTable/schema.d.ts +0 -77
- package/build/esm/blocks/LinkTable/schema.js +0 -12
- package/build/esm/blocks/Preview/MediaContent/MediaContent.css +0 -50
- package/build/esm/blocks/Preview/MediaContent/MediaContent.d.ts +0 -14
- package/build/esm/blocks/Preview/MediaContent/MediaContent.js +0 -47
- package/build/esm/blocks/Preview/MediaContent/PreviewContent.css +0 -106
- package/build/esm/blocks/Preview/MediaContent/PreviewContent.d.ts +0 -12
- package/build/esm/blocks/Preview/MediaContent/PreviewContent.js +0 -15
- package/build/esm/blocks/Preview/MediaContent/PreviewMedia.css +0 -54
- package/build/esm/blocks/Preview/MediaContent/PreviewMedia.d.ts +0 -10
- package/build/esm/blocks/Preview/MediaContent/PreviewMedia.js +0 -11
- package/build/esm/blocks/Preview/Preview.css +0 -50
- package/build/esm/blocks/Preview/Preview.d.ts +0 -4
- package/build/esm/blocks/Preview/Preview.js +0 -126
- package/build/esm/blocks/Preview/schema.d.ts +0 -40
- package/build/esm/blocks/Preview/schema.js +0 -50
- package/build/esm/blocks/Security/Security.css +0 -142
- package/build/esm/blocks/Security/Security.d.ts +0 -4
- package/build/esm/blocks/Security/Security.js +0 -25
- package/build/esm/blocks/Security/schema.d.ts +0 -170
- package/build/esm/blocks/Security/schema.js +0 -28
- package/build/esm/blocks/Simple/Simple.css +0 -22
- package/build/esm/blocks/Simple/Simple.d.ts +0 -4
- package/build/esm/blocks/Simple/Simple.js +0 -18
- package/build/esm/blocks/Simple/schema.d.ts +0 -68
- package/build/esm/blocks/Simple/schema.js +0 -11
- package/build/esm/components/HeightCalculator/HeightCalculator.css +0 -9
- package/build/esm/components/HeightCalculator/HeightCalculator.d.ts +0 -11
- package/build/esm/components/HeightCalculator/HeightCalculator.js +0 -42
- package/build/esm/context/breakpointContext/breakpointContext.d.ts +0 -2
- package/build/esm/context/breakpointContext/breakpointContext.js +0 -3
- package/build/esm/context/breakpointContext/index.d.ts +0 -1
- package/build/esm/context/breakpointContext/index.js +0 -1
- package/build/esm/hooks/useIntersection.d.ts +0 -1
- package/build/esm/hooks/useIntersection.js +0 -17
- package/build/esm/sub-blocks/CardWithImage/CardWithImage.css +0 -19
- package/build/esm/sub-blocks/CardWithImage/CardWithImage.d.ts +0 -4
- package/build/esm/sub-blocks/CardWithImage/CardWithImage.js +0 -14
- package/build/esm/sub-blocks/CardWithImage/schema.d.ts +0 -154
- package/build/esm/sub-blocks/CardWithImage/schema.js +0 -43
- package/build/esm/sub-blocks/Partner/Partner.css +0 -8
- package/build/esm/sub-blocks/Partner/Partner.d.ts +0 -4
- package/build/esm/sub-blocks/Partner/Partner.js +0 -13
- package/build/esm/sub-blocks/Partner/schema.d.ts +0 -30
- package/build/esm/sub-blocks/Partner/schema.js +0 -14
- package/build/esm/sub-blocks/TutorialCard/TutorialCard.css +0 -20
- package/build/esm/sub-blocks/TutorialCard/TutorialCard.d.ts +0 -4
- package/build/esm/sub-blocks/TutorialCard/TutorialCard.js +0 -21
- package/build/esm/sub-blocks/TutorialCard/schema.d.ts +0 -34
- package/build/esm/sub-blocks/TutorialCard/schema.js +0 -17
- package/build/esm/utils/scroll.d.ts +0 -15
- package/build/esm/utils/scroll.js +0 -31
- package/server/text-transform/blocks.js +0 -417
- package/server/utils/scroll.d.ts +0 -15
- package/server/utils/scroll.js +0 -35
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
.pc-preview-content-block__title {
|
|
2
|
-
margin: 0;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
/* use this for style redefinitions to awoid problems with
|
|
6
|
-
unpredictable css rules order in build */
|
|
7
|
-
.pc-preview-content-block__content {
|
|
8
|
-
height: 100%;
|
|
9
|
-
display: block;
|
|
10
|
-
cursor: pointer;
|
|
11
|
-
border-radius: var(--pc-border-radius);
|
|
12
|
-
overflow: hidden;
|
|
13
|
-
position: relative;
|
|
14
|
-
background: var(--yc-color-base-background);
|
|
15
|
-
}
|
|
16
|
-
.pc-preview-content-block__content > .pc-preview-content-block__description {
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
}
|
|
19
|
-
.pc-preview-content-block__loader-block {
|
|
20
|
-
height: 100%;
|
|
21
|
-
width: 0%;
|
|
22
|
-
background: var(--yc-color-base-background);
|
|
23
|
-
position: absolute;
|
|
24
|
-
top: 0;
|
|
25
|
-
left: 0;
|
|
26
|
-
}
|
|
27
|
-
.pc-preview-content-block__loader-block_auto {
|
|
28
|
-
transition: background-color 1s ease, width 300ms linear;
|
|
29
|
-
}
|
|
30
|
-
.pc-preview-content-block__loader-block_active {
|
|
31
|
-
background-color: var(--yc-color-promo-highlight-sky);
|
|
32
|
-
width: 100%;
|
|
33
|
-
}
|
|
34
|
-
.pc-preview-content-block__loader-block_active.pc-preview-content-block__loader-block_auto {
|
|
35
|
-
transition: background-color 1s ease, width 5s linear;
|
|
36
|
-
}
|
|
37
|
-
.pc-preview-content-block__title {
|
|
38
|
-
font-size: var(--yc-text-header-1-font-size);
|
|
39
|
-
line-height: var(--yc-text-header-1-line-height);
|
|
40
|
-
color: var(--pc-text-header-color);
|
|
41
|
-
font-weight: var(--yc-text-accent-font-weight);
|
|
42
|
-
position: relative;
|
|
43
|
-
}
|
|
44
|
-
.pc-preview-content-block__description {
|
|
45
|
-
font-size: var(--yc-text-body-2-font-size);
|
|
46
|
-
line-height: var(--yc-text-body-2-line-height);
|
|
47
|
-
position: relative;
|
|
48
|
-
}
|
|
49
|
-
@media (min-width: 769px) {
|
|
50
|
-
.pc-preview-content-block__content {
|
|
51
|
-
padding: 16px 24px;
|
|
52
|
-
margin: 0;
|
|
53
|
-
transition: background-color 0.5s ease-in, margin-top 300ms ease, margin-bottom 300ms ease;
|
|
54
|
-
}
|
|
55
|
-
.pc-preview-content-block__content > .pc-preview-content-block__description {
|
|
56
|
-
height: 0px;
|
|
57
|
-
transition: height 300ms ease, padding-top 300ms ease;
|
|
58
|
-
}
|
|
59
|
-
.pc-preview-content-block__content > .pc-preview-content-block__description > span {
|
|
60
|
-
color: transparent;
|
|
61
|
-
transition: color 300ms ease;
|
|
62
|
-
}
|
|
63
|
-
.pc-preview-content-block__content > .pc-preview-content-block__title:hover {
|
|
64
|
-
color: var(--yc-color-text-link);
|
|
65
|
-
}
|
|
66
|
-
.pc-preview-content-block__content_active {
|
|
67
|
-
padding: 24px;
|
|
68
|
-
margin: 16px 0;
|
|
69
|
-
background: var(--yc-color-promo-base-silver);
|
|
70
|
-
transition: background-color 300ms ease-in, margin 300ms ease, padding 300ms ease;
|
|
71
|
-
}
|
|
72
|
-
.pc-preview-content-block__content_active > .pc-preview-content-block__description {
|
|
73
|
-
padding-top: 12px;
|
|
74
|
-
}
|
|
75
|
-
.pc-preview-content-block__content_active > .pc-preview-content-block__description > span {
|
|
76
|
-
color: var(--yc-color-text-primary);
|
|
77
|
-
}
|
|
78
|
-
.pc-preview-content-block__content_active > .pc-preview-content-block__title:hover {
|
|
79
|
-
color: var(--yc-color-text-primary);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
@media (max-width: 769px) {
|
|
83
|
-
.pc-preview-content-block__content {
|
|
84
|
-
width: 275px;
|
|
85
|
-
padding: 24px;
|
|
86
|
-
padding-bottom: 32px;
|
|
87
|
-
transition: background-color 0.5s ease-in;
|
|
88
|
-
}
|
|
89
|
-
.pc-preview-content-block__content_active {
|
|
90
|
-
margin: 0 16px;
|
|
91
|
-
background: var(--yc-color-promo-base-silver);
|
|
92
|
-
transition: background-color 300ms ease-in;
|
|
93
|
-
}
|
|
94
|
-
.pc-preview-content-block__content > .pc-preview-content-block__description {
|
|
95
|
-
padding-top: 12px;
|
|
96
|
-
}
|
|
97
|
-
.pc-preview-content-block__content > .pc-preview-content-block__description > span {
|
|
98
|
-
color: var(--yc-color-text-primary);
|
|
99
|
-
}
|
|
100
|
-
.pc-preview-content-block__content > .pc-preview-content-block__description {
|
|
101
|
-
display: block;
|
|
102
|
-
}
|
|
103
|
-
.pc-preview-content-block .preview-block__row_reverse__content {
|
|
104
|
-
margin-left: 0;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Modifiers } from '../../../models';
|
|
2
|
-
import './PreviewContent.css';
|
|
3
|
-
interface PreviewContentProps {
|
|
4
|
-
id: number;
|
|
5
|
-
title: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
switching: boolean;
|
|
8
|
-
onClick: () => void;
|
|
9
|
-
mods: Modifiers | null;
|
|
10
|
-
}
|
|
11
|
-
declare const PreviewContent: (props: PreviewContentProps) => JSX.Element;
|
|
12
|
-
export default PreviewContent;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import YFMWrapper from '../../../components/YFMWrapper/YFMWrapper';
|
|
3
|
-
import { block } from '../../../utils';
|
|
4
|
-
import './PreviewContent.css';
|
|
5
|
-
const b = block('preview-content-block');
|
|
6
|
-
const PreviewContent = (props) => {
|
|
7
|
-
const { id, title, description = '', switching, onClick, mods } = props;
|
|
8
|
-
return (React.createElement("div", { key: id, className: b('content-wrapper') },
|
|
9
|
-
React.createElement("div", { className: b('content', mods), onClick: onClick },
|
|
10
|
-
React.createElement("div", { className: b('loader-block', Object.assign(Object.assign({}, mods), { auto: switching })) }),
|
|
11
|
-
React.createElement("h2", { className: b('title') }, title),
|
|
12
|
-
description && (React.createElement("div", { className: b('description') },
|
|
13
|
-
React.createElement(YFMWrapper, { content: description, modifiers: { constructor: true } }))))));
|
|
14
|
-
};
|
|
15
|
-
export default PreviewContent;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
.pc-preview-media-block__title {
|
|
2
|
-
margin: 0;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
/* use this for style redefinitions to awoid problems with
|
|
6
|
-
unpredictable css rules order in build */
|
|
7
|
-
@media (min-width: 769px) {
|
|
8
|
-
.pc-preview-media-block.pc-AnimateBlock .pc-preview-media-block __media, .pc-AnimateBlock .pc-preview-media-block .pc-preview-media-block __media {
|
|
9
|
-
position: relative;
|
|
10
|
-
top: 100px;
|
|
11
|
-
opacity: 0;
|
|
12
|
-
}
|
|
13
|
-
.pc-preview-media-block.pc-AnimateBlock.animate .pc-preview-media-block __media, .pc-AnimateBlock .pc-preview-media-block.animate .pc-preview-media-block __media {
|
|
14
|
-
top: 0;
|
|
15
|
-
opacity: 1;
|
|
16
|
-
transition: top 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
17
|
-
transition-delay: 0s;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
.pc-preview-media-block__title {
|
|
21
|
-
font-size: var(--yc-text-display-2-font-size);
|
|
22
|
-
line-height: var(--yc-text-display-2-line-height);
|
|
23
|
-
color: var(--pc-text-header-color);
|
|
24
|
-
font-weight: var(--yc-text-accent-font-weight);
|
|
25
|
-
}
|
|
26
|
-
@media (max-width: 576px) {
|
|
27
|
-
.pc-preview-media-block__title {
|
|
28
|
-
font-size: var(--yc-text-display-1-font-size);
|
|
29
|
-
line-height: var(--yc-text-display-1-line-height);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
.pc-preview-media-block__media {
|
|
33
|
-
box-shadow: 0 2px 8px var(--pc-color-sfx-shadow), 0 4px 24px var(--pc-color-sfx-shadow);
|
|
34
|
-
overflow-x: hidden;
|
|
35
|
-
border-radius: var(--pc-border-radius);
|
|
36
|
-
overflow: hidden;
|
|
37
|
-
display: none;
|
|
38
|
-
}
|
|
39
|
-
.pc-preview-media-block__media img {
|
|
40
|
-
width: 100%;
|
|
41
|
-
}
|
|
42
|
-
.pc-preview-media-block__media img,
|
|
43
|
-
.pc-preview-media-block__media video,
|
|
44
|
-
.pc-preview-media-block__media iframe {
|
|
45
|
-
border-radius: var(--pc-border-radius);
|
|
46
|
-
}
|
|
47
|
-
.pc-preview-media-block__media_active {
|
|
48
|
-
display: block;
|
|
49
|
-
}
|
|
50
|
-
@media (max-width: 769px) {
|
|
51
|
-
.pc-preview-media-block__media_active {
|
|
52
|
-
width: 100%;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { MediaProps, Modifiers } from '../../../models';
|
|
2
|
-
import './PreviewMedia.css';
|
|
3
|
-
interface PreviewMediaProps {
|
|
4
|
-
id: number;
|
|
5
|
-
media: MediaProps;
|
|
6
|
-
play: boolean;
|
|
7
|
-
mods: Modifiers | null;
|
|
8
|
-
}
|
|
9
|
-
declare const PreviewMedia: (props: PreviewMediaProps) => JSX.Element;
|
|
10
|
-
export default PreviewMedia;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Media from '../../../components/Media/Media';
|
|
3
|
-
import { block } from '../../../utils';
|
|
4
|
-
import './PreviewMedia.css';
|
|
5
|
-
const b = block('preview-media-block');
|
|
6
|
-
const PreviewMedia = (props) => {
|
|
7
|
-
const { id, media, play, mods } = props;
|
|
8
|
-
return (React.createElement("div", { key: id, className: b('media', mods) },
|
|
9
|
-
React.createElement(Media, Object.assign({}, media, { playVideo: play }))));
|
|
10
|
-
};
|
|
11
|
-
export default PreviewMedia;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/* use this for style redefinitions to awoid problems with
|
|
2
|
-
unpredictable css rules order in build */
|
|
3
|
-
.pc-preview-block__row > * {
|
|
4
|
-
height: fit-content;
|
|
5
|
-
margin: auto;
|
|
6
|
-
}
|
|
7
|
-
.pc-preview-block__row_reverse {
|
|
8
|
-
flex-direction: row-reverse;
|
|
9
|
-
}
|
|
10
|
-
.pc-preview-block__row > .col.pc-preview-media-content-block__media {
|
|
11
|
-
padding: 0 16px;
|
|
12
|
-
}
|
|
13
|
-
@media (min-width: 769px) {
|
|
14
|
-
.pc-preview-block__row {
|
|
15
|
-
display: flex;
|
|
16
|
-
}
|
|
17
|
-
.pc-preview-block__row > .col.pc-preview-media-content-block__content {
|
|
18
|
-
padding: 0 48px 0 16px;
|
|
19
|
-
}
|
|
20
|
-
.pc-preview-block__row_reverse > .col.pc-preview-media-content-block__content {
|
|
21
|
-
padding: 0 16px 0 48px;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
@media (min-width: 577px) and (max-width: 769px) {
|
|
25
|
-
.pc-preview-block__row_reverse {
|
|
26
|
-
flex-direction: row;
|
|
27
|
-
}
|
|
28
|
-
.pc-preview-block__row > .col.pc-preview-media-content-block__content {
|
|
29
|
-
padding: 0;
|
|
30
|
-
}
|
|
31
|
-
.pc-preview-block__row > .col.pc-preview-media-content-block__media {
|
|
32
|
-
padding: 0 32px;
|
|
33
|
-
}
|
|
34
|
-
.pc-preview-block .pc-preview-block__row_reverse.row, .pc-preview-block .pc-preview-block__row.row {
|
|
35
|
-
margin-left: -32px;
|
|
36
|
-
margin-right: -32px;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
@media (max-width: 577px) {
|
|
40
|
-
.pc-preview-block__row > .col.pc-preview-media-content-block__content {
|
|
41
|
-
padding: 0;
|
|
42
|
-
}
|
|
43
|
-
.pc-preview-block__row > .col.pc-preview-media-content-block__media {
|
|
44
|
-
padding: 0 20px;
|
|
45
|
-
}
|
|
46
|
-
.pc-preview-block .pc-preview-block__row_reverse.row, .pc-preview-block .pc-preview-block__row.row {
|
|
47
|
-
margin-left: -20px;
|
|
48
|
-
margin-right: -20px;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useContext, useEffect, useState } from 'react';
|
|
2
|
-
import AnimateBlock from '../../components/AnimateBlock/AnimateBlock';
|
|
3
|
-
import { BREAKPOINTS } from '../../constants';
|
|
4
|
-
import { BreakpointContext } from '../../context/breakpointContext';
|
|
5
|
-
import { Row } from '../../grid';
|
|
6
|
-
import { useIntersection } from '../../hooks/useIntersection';
|
|
7
|
-
import { block, doSmoothScroll } from '../../utils';
|
|
8
|
-
import MediaContent from './MediaContent/MediaContent';
|
|
9
|
-
import './Preview.css';
|
|
10
|
-
const b = block('preview-block');
|
|
11
|
-
const SWITCHING_INTERVAL = 5 * 1000;
|
|
12
|
-
const WIDTH_MENU_ITEM_MD_SIZE = 275;
|
|
13
|
-
const INDENT_MENU_ITEM_MD_SIZE = 16;
|
|
14
|
-
const SCROLL_ITEM_SECONDS = 1;
|
|
15
|
-
const SCROLL_ITEM_SPEED = 2;
|
|
16
|
-
const CLASSNAME_DESCRIPTION_YFM_BLOCK = 'yfm';
|
|
17
|
-
const CLASSNAME_CONTENT_WRAPPER = 'preview-media-content-block__content-wrapper';
|
|
18
|
-
const INDENT_BETWEEN_TITLE_DESCRIPTION = 16;
|
|
19
|
-
export const PreviewBlock = (props) => {
|
|
20
|
-
const { direction = 'content-media', animated, items, title, description, ratioMediaContent = '1-1', stopVideo = false,
|
|
21
|
-
// TODO YDB-server doesn't see previewRef.current and doesn't update the component CLOUDFRONT-9395
|
|
22
|
-
showImmediately = false, } = props;
|
|
23
|
-
const breakpoint = useContext(BreakpointContext);
|
|
24
|
-
const isDesktop = breakpoint >= BREAKPOINTS.md;
|
|
25
|
-
const menuRef = React.useRef(null);
|
|
26
|
-
const previewRef = React.useRef(null);
|
|
27
|
-
const inViewport = useIntersection(previewRef.current);
|
|
28
|
-
const [stopSwitching, setStopSwitching] = useState(stopVideo);
|
|
29
|
-
const [activeSlide, setActiveSlide] = useState(-1);
|
|
30
|
-
const [autoSwitchTimerId, setAutoSwitchTimerId] = useState(0);
|
|
31
|
-
const isActiveBlock = useCallback((id, isMediaBlock = false) => {
|
|
32
|
-
return isMediaBlock || inViewport ? activeSlide === id : false;
|
|
33
|
-
}, [inViewport, activeSlide]);
|
|
34
|
-
const changeActiveSlide = useCallback((params) => {
|
|
35
|
-
const { current, nextSlide, currentSlide, timerId } = params;
|
|
36
|
-
if (isDesktop) {
|
|
37
|
-
changeDescriptionHeight(current, nextSlide, currentSlide);
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
changeMenuScroll(current, nextSlide, currentSlide);
|
|
41
|
-
}
|
|
42
|
-
setActiveSlide(nextSlide);
|
|
43
|
-
clearTimeout(timerId);
|
|
44
|
-
}, [isDesktop]);
|
|
45
|
-
useEffect(() => {
|
|
46
|
-
// TODO YDB-server doesn't see previewRef.current and doesn't update the component CLOUDFRONT-9395
|
|
47
|
-
if (!items[activeSlide] && (showImmediately || inViewport)) {
|
|
48
|
-
setActiveSlide(0);
|
|
49
|
-
if (isDesktop) {
|
|
50
|
-
changeDescriptionHeight(menuRef.current, 0);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}, [inViewport, activeSlide, isDesktop, items, showImmediately]);
|
|
54
|
-
useEffect(() => {
|
|
55
|
-
if (stopSwitching || !inViewport) {
|
|
56
|
-
return () => { };
|
|
57
|
-
}
|
|
58
|
-
const timerId = setTimeout(() => {
|
|
59
|
-
if (stopSwitching) {
|
|
60
|
-
clearTimeout(timerId);
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
const nextSlide = activeSlide + 1 >= items.length ? 0 : activeSlide + 1;
|
|
64
|
-
changeActiveSlide({
|
|
65
|
-
current: menuRef.current,
|
|
66
|
-
nextSlide,
|
|
67
|
-
currentSlide: activeSlide,
|
|
68
|
-
timerId: timerId,
|
|
69
|
-
});
|
|
70
|
-
}, SWITCHING_INTERVAL);
|
|
71
|
-
setAutoSwitchTimerId(timerId);
|
|
72
|
-
return () => clearTimeout(timerId);
|
|
73
|
-
}, [changeActiveSlide, activeSlide, items.length, stopSwitching, inViewport]);
|
|
74
|
-
const showMediaContent = useCallback((nextSlide) => {
|
|
75
|
-
changeActiveSlide({
|
|
76
|
-
current: menuRef.current,
|
|
77
|
-
nextSlide,
|
|
78
|
-
currentSlide: activeSlide,
|
|
79
|
-
timerId: autoSwitchTimerId,
|
|
80
|
-
});
|
|
81
|
-
setStopSwitching(true);
|
|
82
|
-
}, [changeActiveSlide, activeSlide, autoSwitchTimerId]);
|
|
83
|
-
return (React.createElement(AnimateBlock, { className: b(), animate: animated },
|
|
84
|
-
React.createElement(Row, { ref: previewRef, className: b('row', { reverse: direction === 'media-content' }) },
|
|
85
|
-
React.createElement(MediaContent, { ref: menuRef, items: items, title: title, description: description, ratioMediaContent: ratioMediaContent, switching: !stopSwitching, isActiveBlock: isActiveBlock, showMediaContent: showMediaContent }))));
|
|
86
|
-
};
|
|
87
|
-
function changeMenuScroll(element, nextSlide, activeSlide) {
|
|
88
|
-
if (!element) {
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
const scrollPosition = element.scrollLeft;
|
|
92
|
-
const endPosition = nextSlide === 0 ? 0 : nextSlide * WIDTH_MENU_ITEM_MD_SIZE + INDENT_MENU_ITEM_MD_SIZE;
|
|
93
|
-
const distance = Math.abs(scrollPosition - endPosition);
|
|
94
|
-
const isReverse = nextSlide === 0 || nextSlide < activeSlide;
|
|
95
|
-
const scrollOptions = {
|
|
96
|
-
distance,
|
|
97
|
-
timeSeconds: SCROLL_ITEM_SECONDS,
|
|
98
|
-
speed: SCROLL_ITEM_SPEED,
|
|
99
|
-
reverseParams: isReverse ? { distance } : undefined,
|
|
100
|
-
};
|
|
101
|
-
doSmoothScroll(element, scrollPosition, scrollOptions);
|
|
102
|
-
}
|
|
103
|
-
function changeDescriptionHeight(element, nextActiveSlide, prevActiveSlide = 0) {
|
|
104
|
-
const contentWrapper = element === null || element === void 0 ? void 0 : element.getElementsByClassName(CLASSNAME_CONTENT_WRAPPER);
|
|
105
|
-
if (!contentWrapper || contentWrapper.length === 0) {
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
const menuItems = contentWrapper[0].children;
|
|
109
|
-
updateHeight(menuItems, nextActiveSlide);
|
|
110
|
-
if (nextActiveSlide !== prevActiveSlide) {
|
|
111
|
-
updateHeight(menuItems, prevActiveSlide, false);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
function updateHeight(menuItems, slide, isExpand = true) {
|
|
115
|
-
const item = menuItems[slide];
|
|
116
|
-
const yfmBlock = item.getElementsByClassName(CLASSNAME_DESCRIPTION_YFM_BLOCK)[0];
|
|
117
|
-
if (yfmBlock) {
|
|
118
|
-
const yfmBlockElement = yfmBlock;
|
|
119
|
-
const yfmBlockHeight = yfmBlockElement.offsetHeight;
|
|
120
|
-
const yfmBlockOffsetParent = yfmBlockElement.offsetParent;
|
|
121
|
-
yfmBlockOffsetParent.style.height = isExpand
|
|
122
|
-
? `${yfmBlockHeight + INDENT_BETWEEN_TITLE_DESCRIPTION}px`
|
|
123
|
-
: '0px';
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
export default PreviewBlock;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export declare const PreviewBlock: {
|
|
2
|
-
'preview-block': {
|
|
3
|
-
additionalProperties: boolean;
|
|
4
|
-
required: string[];
|
|
5
|
-
properties: {
|
|
6
|
-
title: {
|
|
7
|
-
type: string;
|
|
8
|
-
contentType: string;
|
|
9
|
-
};
|
|
10
|
-
description: {
|
|
11
|
-
type: string;
|
|
12
|
-
contentType: string;
|
|
13
|
-
};
|
|
14
|
-
direction: {
|
|
15
|
-
type: string;
|
|
16
|
-
enum: string[];
|
|
17
|
-
};
|
|
18
|
-
ratioMediaContent: {
|
|
19
|
-
type: string;
|
|
20
|
-
enum: string[];
|
|
21
|
-
};
|
|
22
|
-
items: {
|
|
23
|
-
type: string;
|
|
24
|
-
items: {
|
|
25
|
-
type: string;
|
|
26
|
-
properties: {
|
|
27
|
-
when: {
|
|
28
|
-
type: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
animated: {
|
|
34
|
-
type: string;
|
|
35
|
-
};
|
|
36
|
-
type: {};
|
|
37
|
-
when: {};
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { AnimatableProps, BaseProps, mediaDirection, withTheme, } from '../../schema/validators/common';
|
|
2
|
-
import { filteredArray } from '../../schema/validators/utils';
|
|
3
|
-
import { Media } from '../Media/schema';
|
|
4
|
-
const previewRatioMediaContent = ['2-1', '1-1'];
|
|
5
|
-
const PreviewContentItem = {
|
|
6
|
-
additionalProperties: false,
|
|
7
|
-
required: ['title', 'description'],
|
|
8
|
-
properties: {
|
|
9
|
-
title: {
|
|
10
|
-
type: 'string',
|
|
11
|
-
contentType: 'text',
|
|
12
|
-
},
|
|
13
|
-
description: {
|
|
14
|
-
type: 'string',
|
|
15
|
-
contentType: 'yfm',
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
const PreviewItem = {
|
|
20
|
-
type: 'object',
|
|
21
|
-
additionalProperties: false,
|
|
22
|
-
required: ['type', 'media', 'content'],
|
|
23
|
-
properties: {
|
|
24
|
-
type: {
|
|
25
|
-
type: 'string',
|
|
26
|
-
enum: ['video', 'image'],
|
|
27
|
-
},
|
|
28
|
-
media: withTheme(Media),
|
|
29
|
-
content: PreviewContentItem,
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
export const PreviewBlock = {
|
|
33
|
-
'preview-block': {
|
|
34
|
-
additionalProperties: false,
|
|
35
|
-
required: ['title', 'items'],
|
|
36
|
-
properties: Object.assign(Object.assign(Object.assign({}, BaseProps), AnimatableProps), { title: {
|
|
37
|
-
type: 'string',
|
|
38
|
-
contentType: 'text',
|
|
39
|
-
}, description: {
|
|
40
|
-
type: 'string',
|
|
41
|
-
contentType: 'yfm',
|
|
42
|
-
}, direction: {
|
|
43
|
-
type: 'string',
|
|
44
|
-
enum: mediaDirection,
|
|
45
|
-
}, ratioMediaContent: {
|
|
46
|
-
type: 'string',
|
|
47
|
-
enum: previewRatioMediaContent,
|
|
48
|
-
}, items: filteredArray(PreviewItem) }),
|
|
49
|
-
},
|
|
50
|
-
};
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
.pc-SecurityBlock__title {
|
|
2
|
-
margin: 0;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
/* use this for style redefinitions to awoid problems with
|
|
6
|
-
unpredictable css rules order in build */
|
|
7
|
-
.pc-SecurityBlock_theme_dark {
|
|
8
|
-
color: var(--yc-color-text-light-primary);
|
|
9
|
-
}
|
|
10
|
-
.pc-SecurityBlock_theme_dark h1,
|
|
11
|
-
.pc-SecurityBlock_theme_dark h2,
|
|
12
|
-
.pc-SecurityBlock_theme_dark h3,
|
|
13
|
-
.pc-SecurityBlock_theme_dark h4,
|
|
14
|
-
.pc-SecurityBlock_theme_dark h5,
|
|
15
|
-
.pc-SecurityBlock_theme_dark h6,
|
|
16
|
-
.pc-SecurityBlock_theme_dark .yfm {
|
|
17
|
-
color: var(--yc-color-text-light-primary);
|
|
18
|
-
}
|
|
19
|
-
.pc-SecurityBlock_theme_light .pc-SecurityBlock__background {
|
|
20
|
-
background-color: var(--yc-color-base-background);
|
|
21
|
-
}
|
|
22
|
-
.pc-SecurityBlock_theme_light .pc-SecurityBlock__content {
|
|
23
|
-
padding: 0;
|
|
24
|
-
}
|
|
25
|
-
.pc-SecurityBlock_theme_light .pc-SecurityBlock__point-icon,
|
|
26
|
-
.pc-SecurityBlock_theme_light .pc-SecurityBlock__point-text {
|
|
27
|
-
color: var(--yc-color-text-primary);
|
|
28
|
-
}
|
|
29
|
-
.pc-SecurityBlock__title {
|
|
30
|
-
font-size: var(--yc-text-display-2-font-size);
|
|
31
|
-
line-height: var(--yc-text-display-2-line-height);
|
|
32
|
-
color: var(--pc-text-header-color);
|
|
33
|
-
font-weight: var(--yc-text-accent-font-weight);
|
|
34
|
-
}
|
|
35
|
-
@media (max-width: 576px) {
|
|
36
|
-
.pc-SecurityBlock__title {
|
|
37
|
-
font-size: var(--yc-text-display-1-font-size);
|
|
38
|
-
line-height: var(--yc-text-display-1-line-height);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
.pc-SecurityBlock__background {
|
|
42
|
-
background-color: var(--yc-color-promo-base-asphalt);
|
|
43
|
-
}
|
|
44
|
-
.pc-SecurityBlock__content {
|
|
45
|
-
padding: 96px 0 128px;
|
|
46
|
-
}
|
|
47
|
-
.pc-SecurityBlock__points {
|
|
48
|
-
padding-top: 20px;
|
|
49
|
-
}
|
|
50
|
-
.pc-SecurityBlock__point-icon {
|
|
51
|
-
width: 48px;
|
|
52
|
-
height: 48px;
|
|
53
|
-
}
|
|
54
|
-
.pc-SecurityBlock__point-text {
|
|
55
|
-
color: var(--yc-color-text-light-primary);
|
|
56
|
-
}
|
|
57
|
-
.pc-SecurityBlock__point-text a {
|
|
58
|
-
outline: none;
|
|
59
|
-
color: var(--yc-color-text-link);
|
|
60
|
-
text-decoration: none;
|
|
61
|
-
cursor: pointer;
|
|
62
|
-
}
|
|
63
|
-
.utilityfocus .pc-SecurityBlock__point-text a:focus {
|
|
64
|
-
outline: 2px solid #ffdb4d;
|
|
65
|
-
}
|
|
66
|
-
.pc-SecurityBlock__point-text a:hover, .pc-SecurityBlock__point-text a:active {
|
|
67
|
-
--pc-text-header-color: var(--yc-color-text-link-hover);
|
|
68
|
-
color: var(--yc-color-text-link-hover);
|
|
69
|
-
}
|
|
70
|
-
.pc-SecurityBlock__point-text, .pc-SecurityBlock__point-link {
|
|
71
|
-
font-size: var(--yc-text-body-2-font-size);
|
|
72
|
-
line-height: var(--yc-text-body-2-line-height);
|
|
73
|
-
margin-top: 8px;
|
|
74
|
-
}
|
|
75
|
-
.pc-SecurityBlock__media {
|
|
76
|
-
margin-top: 48px;
|
|
77
|
-
border-radius: var(--pc-border-radius);
|
|
78
|
-
overflow: hidden;
|
|
79
|
-
}
|
|
80
|
-
@media (max-width: 577px) {
|
|
81
|
-
.pc-SecurityBlock__content {
|
|
82
|
-
padding: 64px 0;
|
|
83
|
-
}
|
|
84
|
-
.pc-SecurityBlock__point + .pc-SecurityBlock__point {
|
|
85
|
-
margin-top: 20px;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
@media (min-width: 769px) {
|
|
89
|
-
.pc-SecurityBlock.pc-AnimateBlock .pc-SecurityBlock__point, .pc-AnimateBlock .pc-SecurityBlock .pc-SecurityBlock__point {
|
|
90
|
-
position: relative;
|
|
91
|
-
top: 100px;
|
|
92
|
-
opacity: 0;
|
|
93
|
-
}
|
|
94
|
-
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point, .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point {
|
|
95
|
-
top: 0;
|
|
96
|
-
opacity: 1;
|
|
97
|
-
transition: top 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
98
|
-
}
|
|
99
|
-
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(0), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(0) {
|
|
100
|
-
transition-delay: 0s;
|
|
101
|
-
}
|
|
102
|
-
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(1), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(1) {
|
|
103
|
-
transition-delay: 0.1s;
|
|
104
|
-
}
|
|
105
|
-
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(2), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(2) {
|
|
106
|
-
transition-delay: 0.2s;
|
|
107
|
-
}
|
|
108
|
-
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(3), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(3) {
|
|
109
|
-
transition-delay: 0.3s;
|
|
110
|
-
}
|
|
111
|
-
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(4), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(4) {
|
|
112
|
-
transition-delay: 0.4s;
|
|
113
|
-
}
|
|
114
|
-
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(5), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(5) {
|
|
115
|
-
transition-delay: 0.5s;
|
|
116
|
-
}
|
|
117
|
-
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(6), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(6) {
|
|
118
|
-
transition-delay: 0.6s;
|
|
119
|
-
}
|
|
120
|
-
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(7), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(7) {
|
|
121
|
-
transition-delay: 0.7s;
|
|
122
|
-
}
|
|
123
|
-
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(8), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(8) {
|
|
124
|
-
transition-delay: 0.8s;
|
|
125
|
-
}
|
|
126
|
-
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(9), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(9) {
|
|
127
|
-
transition-delay: 0.9s;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
@media (min-width: 769px) {
|
|
131
|
-
.pc-SecurityBlock.pc-AnimateBlock .pc-SecurityBlock__media, .pc-AnimateBlock .pc-SecurityBlock .pc-SecurityBlock__media {
|
|
132
|
-
position: relative;
|
|
133
|
-
top: 100px;
|
|
134
|
-
opacity: 0;
|
|
135
|
-
}
|
|
136
|
-
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__media, .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__media {
|
|
137
|
-
top: 0;
|
|
138
|
-
opacity: 1;
|
|
139
|
-
transition: top 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
140
|
-
transition-delay: 0.5s;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AnimateBlock, FullWidthBackground, HTML, ImageBase, Link, Media } from '../../components';
|
|
3
|
-
import { Col, Grid, Row } from '../../grid';
|
|
4
|
-
import { block } from '../../utils';
|
|
5
|
-
import i18n from './i18n';
|
|
6
|
-
import './Security.css';
|
|
7
|
-
const b = block('SecurityBlock');
|
|
8
|
-
export const SecurityBlock = (props) => {
|
|
9
|
-
const { backgroundColor, theme = 'dark', title, points, media, animated } = props;
|
|
10
|
-
return (React.createElement(AnimateBlock, { className: b({ theme }), offset: 200, animate: animated },
|
|
11
|
-
React.createElement("div", { className: b('content') },
|
|
12
|
-
React.createElement(FullWidthBackground, { className: b('background'), style: { backgroundColor } }),
|
|
13
|
-
React.createElement(Grid, null,
|
|
14
|
-
React.createElement(Row, null,
|
|
15
|
-
React.createElement(Col, null,
|
|
16
|
-
React.createElement("h2", { className: b('title') }, title))),
|
|
17
|
-
points && (React.createElement(Row, { className: b('points') }, points.map(({ text, link, img }, index) => (React.createElement(Col, { key: index, className: b('point'), sizes: { sm: 4, all: 12 } },
|
|
18
|
-
React.createElement(ImageBase, { className: b('point-icon'), src: img, alt: text || i18n('image-alt') }),
|
|
19
|
-
React.createElement(HTML, { className: b('point-text'), block: true }, text),
|
|
20
|
-
link && (React.createElement(Link, { className: b('point-link'), text: link.text, url: link.url, theme: 'normal', arrow: true }))))))),
|
|
21
|
-
media && (React.createElement(Row, { className: b('media') },
|
|
22
|
-
React.createElement(Col, null,
|
|
23
|
-
React.createElement(Media, Object.assign({ className: b('media') }, media)))))))));
|
|
24
|
-
};
|
|
25
|
-
export default SecurityBlock;
|