@gravity-ui/page-constructor 2.2.1-alpha.0 → 2.3.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 +7 -0
- package/README.md +1 -1
- package/build/cjs/blocks/Preview/MediaContent/MediaContent.css +50 -0
- package/build/cjs/blocks/Preview/MediaContent/MediaContent.d.ts +13 -0
- package/build/cjs/blocks/Preview/MediaContent/MediaContent.js +49 -0
- package/build/cjs/blocks/Preview/MediaContent/PreviewContent.css +106 -0
- package/build/cjs/blocks/Preview/MediaContent/PreviewContent.d.ts +11 -0
- package/build/cjs/blocks/Preview/MediaContent/PreviewContent.js +17 -0
- package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.css +54 -0
- package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.d.ts +9 -0
- package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.js +13 -0
- package/build/cjs/blocks/Preview/Preview.css +50 -0
- package/build/cjs/blocks/Preview/Preview.d.ts +3 -0
- package/build/cjs/blocks/Preview/Preview.js +130 -0
- package/build/cjs/blocks/Preview/schema.d.ts +40 -0
- package/build/cjs/blocks/Preview/schema.js +53 -0
- package/build/cjs/blocks/Simple/Simple.css +22 -0
- package/build/cjs/blocks/Simple/Simple.d.ts +3 -0
- package/build/cjs/blocks/Simple/Simple.js +22 -0
- package/build/cjs/blocks/Simple/schema.d.ts +68 -0
- package/build/cjs/blocks/Simple/schema.js +14 -0
- package/build/cjs/blocks/index.d.ts +2 -0
- package/build/cjs/blocks/index.js +5 -1
- package/build/cjs/blocks/validators.d.ts +2 -0
- package/build/cjs/blocks/validators.js +2 -0
- package/build/cjs/components/HTML/HTML.d.ts +1 -1
- package/build/cjs/components/Image/Image.js +2 -2
- package/build/cjs/constructor-items.d.ts +6 -0
- package/build/cjs/constructor-items.js +6 -0
- package/build/cjs/context/breakpointContext/breakpointContext.d.ts +2 -0
- package/build/cjs/context/breakpointContext/breakpointContext.js +7 -0
- package/build/cjs/context/breakpointContext/index.d.ts +1 -0
- package/build/cjs/context/breakpointContext/index.js +4 -0
- package/build/cjs/hooks/index.d.ts +1 -0
- package/build/cjs/hooks/index.js +3 -1
- package/build/cjs/hooks/useIntersection.d.ts +1 -0
- package/build/cjs/hooks/useIntersection.js +21 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +23 -2
- package/build/cjs/models/constructor-items/blocks.js +2 -0
- package/build/cjs/models/constructor-items/common.d.ts +14 -0
- package/build/cjs/models/constructor-items/common.js +6 -1
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +25 -9
- package/build/cjs/models/constructor-items/sub-blocks.js +7 -6
- package/build/cjs/schema/index.js +4 -2
- package/build/cjs/schema/validators/blocks.d.ts +2 -0
- package/build/cjs/schema/validators/blocks.js +2 -0
- package/build/cjs/schema/validators/sub-blocks.d.ts +1 -0
- package/build/cjs/schema/validators/sub-blocks.js +1 -0
- package/build/cjs/sub-blocks/CardWithImage/CardWithImage.css +19 -0
- package/build/cjs/sub-blocks/CardWithImage/CardWithImage.d.ts +3 -0
- package/build/cjs/sub-blocks/CardWithImage/CardWithImage.js +16 -0
- package/build/cjs/sub-blocks/CardWithImage/schema.d.ts +154 -0
- package/build/cjs/sub-blocks/CardWithImage/schema.js +46 -0
- package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +1 -0
- package/build/cjs/sub-blocks/index.d.ts +1 -0
- package/build/cjs/sub-blocks/index.js +3 -1
- package/build/cjs/text-transform/blocks.js +32 -0
- package/build/cjs/utils/imageCompress.d.ts +6 -0
- package/build/cjs/utils/imageCompress.js +11 -0
- package/build/cjs/utils/index.d.ts +1 -0
- package/build/cjs/utils/index.js +1 -0
- package/build/cjs/utils/scroll.d.ts +15 -0
- package/build/cjs/utils/scroll.js +34 -0
- package/build/esm/blocks/Preview/MediaContent/MediaContent.css +50 -0
- package/build/esm/blocks/Preview/MediaContent/MediaContent.d.ts +14 -0
- package/build/esm/blocks/Preview/MediaContent/MediaContent.js +47 -0
- package/build/esm/blocks/Preview/MediaContent/PreviewContent.css +106 -0
- package/build/esm/blocks/Preview/MediaContent/PreviewContent.d.ts +12 -0
- package/build/esm/blocks/Preview/MediaContent/PreviewContent.js +15 -0
- package/build/esm/blocks/Preview/MediaContent/PreviewMedia.css +54 -0
- package/build/esm/blocks/Preview/MediaContent/PreviewMedia.d.ts +10 -0
- package/build/esm/blocks/Preview/MediaContent/PreviewMedia.js +11 -0
- package/build/esm/blocks/Preview/Preview.css +50 -0
- package/build/esm/blocks/Preview/Preview.d.ts +4 -0
- package/build/esm/blocks/Preview/Preview.js +126 -0
- package/build/esm/blocks/Preview/schema.d.ts +40 -0
- package/build/esm/blocks/Preview/schema.js +50 -0
- package/build/esm/blocks/Simple/Simple.css +22 -0
- package/build/esm/blocks/Simple/Simple.d.ts +4 -0
- package/build/esm/blocks/Simple/Simple.js +18 -0
- package/build/esm/blocks/Simple/schema.d.ts +68 -0
- package/build/esm/blocks/Simple/schema.js +11 -0
- package/build/esm/blocks/index.d.ts +2 -0
- package/build/esm/blocks/index.js +2 -0
- package/build/esm/blocks/validators.d.ts +2 -0
- package/build/esm/blocks/validators.js +2 -0
- package/build/esm/components/HTML/HTML.d.ts +1 -1
- package/build/esm/components/Image/Image.js +2 -2
- package/build/esm/constructor-items.d.ts +6 -0
- package/build/esm/constructor-items.js +8 -2
- package/build/esm/context/breakpointContext/breakpointContext.d.ts +2 -0
- package/build/esm/context/breakpointContext/breakpointContext.js +3 -0
- package/build/esm/context/breakpointContext/index.d.ts +1 -0
- package/build/esm/context/breakpointContext/index.js +1 -0
- package/build/esm/hooks/index.d.ts +1 -0
- package/build/esm/hooks/index.js +1 -0
- package/build/esm/hooks/useIntersection.d.ts +1 -0
- package/build/esm/hooks/useIntersection.js +17 -0
- package/build/esm/models/constructor-items/blocks.d.ts +23 -2
- package/build/esm/models/constructor-items/blocks.js +2 -0
- package/build/esm/models/constructor-items/common.d.ts +14 -0
- package/build/esm/models/constructor-items/common.js +5 -0
- package/build/esm/models/constructor-items/sub-blocks.d.ts +25 -9
- package/build/esm/models/constructor-items/sub-blocks.js +7 -6
- package/build/esm/schema/index.js +6 -4
- package/build/esm/schema/validators/blocks.d.ts +2 -0
- package/build/esm/schema/validators/blocks.js +2 -0
- package/build/esm/schema/validators/sub-blocks.d.ts +1 -0
- package/build/esm/schema/validators/sub-blocks.js +1 -0
- package/build/esm/sub-blocks/CardWithImage/CardWithImage.css +19 -0
- package/build/esm/sub-blocks/CardWithImage/CardWithImage.d.ts +4 -0
- package/build/esm/sub-blocks/CardWithImage/CardWithImage.js +14 -0
- package/build/esm/sub-blocks/CardWithImage/schema.d.ts +154 -0
- package/build/esm/sub-blocks/CardWithImage/schema.js +43 -0
- package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +1 -0
- package/build/esm/sub-blocks/index.d.ts +1 -0
- package/build/esm/sub-blocks/index.js +1 -0
- package/build/esm/text-transform/blocks.js +32 -0
- package/build/esm/utils/imageCompress.d.ts +6 -0
- package/build/esm/utils/imageCompress.js +7 -0
- package/build/esm/utils/index.d.ts +1 -0
- package/build/esm/utils/index.js +1 -0
- package/build/esm/utils/scroll.d.ts +15 -0
- package/build/esm/utils/scroll.js +30 -0
- package/package.json +1 -4
- package/server/models/constructor-items/blocks.d.ts +23 -2
- package/server/models/constructor-items/blocks.js +2 -0
- package/server/models/constructor-items/common.d.ts +14 -0
- package/server/models/constructor-items/common.js +6 -1
- package/server/models/constructor-items/sub-blocks.d.ts +25 -9
- package/server/models/constructor-items/sub-blocks.js +7 -6
- package/server/text-transform/blocks.js +32 -0
- package/server/utils/index.d.ts +1 -0
- package/server/utils/index.js +1 -0
- package/server/utils/scroll.d.ts +15 -0
- package/server/utils/scroll.js +34 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.3.0](https://github.com/gravity-ui/page-constructor/compare/v2.2.1...v2.3.0) (2023-04-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add whitelist of image extenstions which can be compressed ([#215](https://github.com/gravity-ui/page-constructor/issues/215)) ([136034b](https://github.com/gravity-ui/page-constructor/commit/136034b642f7c044c00402cf2e0527ae8a099aeb))
|
|
9
|
+
|
|
3
10
|
## [2.2.1](https://github.com/gravity-ui/page-constructor/compare/v2.2.0...v2.2.1) (2023-03-30)
|
|
4
11
|
|
|
5
12
|
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @gravity-ui/page-constructor · [](https://www.npmjs.com/package/@gravity-ui/page-constructor) [](https://www.npmjs.com/package/@gravity-ui/page-constructor) [](https://github.com/gravity-ui/page-constructor/actions/workflows/ci.yml?query=branch:main) [](https://github.com/gravity-ui/page-constructor/actions/workflows/release.yml?query=branch:main) [](https://preview.yandexcloud.dev/page-constructor/)
|
|
2
2
|
|
|
3
3
|
## Install
|
|
4
4
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
|
2
|
+
unpredictable css rules order in build */
|
|
3
|
+
.pc-preview-media-content-block__header {
|
|
4
|
+
margin-bottom: 24px;
|
|
5
|
+
}
|
|
6
|
+
.pc-preview-media-content-block__menu {
|
|
7
|
+
padding: 0;
|
|
8
|
+
}
|
|
9
|
+
.pc-preview-media-content-block__title {
|
|
10
|
+
font-size: var(--yc-text-display-1-font-size);
|
|
11
|
+
line-height: var(--yc-text-display-1-line-height);
|
|
12
|
+
font-weight: 500;
|
|
13
|
+
position: relative;
|
|
14
|
+
}
|
|
15
|
+
.pc-preview-media-content-block__description {
|
|
16
|
+
font-size: var(--yc-text-body-2-font-size);
|
|
17
|
+
line-height: var(--yc-text-body-2-line-height);
|
|
18
|
+
margin-top: 12px;
|
|
19
|
+
position: relative;
|
|
20
|
+
}
|
|
21
|
+
.pc-preview-media-content-block__content, .pc-preview-media-content-block__media {
|
|
22
|
+
padding: 0;
|
|
23
|
+
}
|
|
24
|
+
@media (max-width: 769px) {
|
|
25
|
+
.pc-preview-media-content-block__menu.col {
|
|
26
|
+
overflow-y: auto;
|
|
27
|
+
margin-bottom: 16px;
|
|
28
|
+
padding: 0;
|
|
29
|
+
}
|
|
30
|
+
.pc-preview-media-content-block__content-wrapper {
|
|
31
|
+
width: fit-content;
|
|
32
|
+
display: flex;
|
|
33
|
+
}
|
|
34
|
+
.pc-preview-media-content-block__content-wrapper div.preview-content-block__content-wrapper:first-child div.preview-content-block__content_active {
|
|
35
|
+
margin-left: 0;
|
|
36
|
+
}
|
|
37
|
+
.pc-preview-media-content-block__content-wrapper div.preview-content-block__content-wrapper:last-child div.preview-content-block__content_active {
|
|
38
|
+
margin-right: 0;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
@media (min-width: 577px) and (max-width: 769px) {
|
|
42
|
+
.pc-preview-media-content-block__header, .pc-preview-media-content-block__content-wrapper {
|
|
43
|
+
padding: 0 32px;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
@media (max-width: 577px) {
|
|
47
|
+
.pc-preview-media-content-block__header, .pc-preview-media-content-block__content-wrapper {
|
|
48
|
+
padding: 0 20px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PreviewItemProps, PreviewRatioMediaContent, Refable } from '../../../models';
|
|
3
|
+
interface MediaContentProps extends Refable<HTMLDivElement> {
|
|
4
|
+
items: PreviewItemProps[];
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
ratioMediaContent?: PreviewRatioMediaContent;
|
|
8
|
+
switching: boolean;
|
|
9
|
+
isActiveBlock: (id: number, isMediaBlock?: boolean) => boolean;
|
|
10
|
+
showMediaContent: (id: number) => void;
|
|
11
|
+
}
|
|
12
|
+
declare const MediaContent: React.ForwardRefExoticComponent<Pick<MediaContentProps, "title" | "items" | "description" | "ratioMediaContent" | "switching" | "isActiveBlock" | "showMediaContent"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export default MediaContent;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
+
const utils_1 = require("../../../utils");
|
|
6
|
+
const grid_1 = require("../../../grid");
|
|
7
|
+
const components_1 = require("../../../components/");
|
|
8
|
+
const PreviewContent_1 = tslib_1.__importDefault(require("./PreviewContent"));
|
|
9
|
+
const PreviewMedia_1 = tslib_1.__importDefault(require("./PreviewMedia"));
|
|
10
|
+
const ThemeValueContext_1 = require("../../../context/theme/ThemeValueContext");
|
|
11
|
+
const b = (0, utils_1.block)('preview-media-content-block');
|
|
12
|
+
const MediaContent = (0, react_1.forwardRef)((props, ref) => {
|
|
13
|
+
const { items, title, description = '', switching, ratioMediaContent = '1-1', isActiveBlock, showMediaContent, } = props;
|
|
14
|
+
const { themeValue: theme } = (0, react_1.useContext)(ThemeValueContext_1.ThemeValueContext);
|
|
15
|
+
const [mediaSizes, setMediaSizes] = (0, react_1.useState)({ [grid_1.GridColumnSize.All]: 12 });
|
|
16
|
+
const [contentSizes, setContentSizes] = (0, react_1.useState)({ [grid_1.GridColumnSize.All]: 12 });
|
|
17
|
+
(0, react_1.useEffect)(() => {
|
|
18
|
+
const [mediaSize, contentSize] = ratioMediaContent.split('-');
|
|
19
|
+
const blockSize = 12 / (Number(mediaSize) + Number(contentSize));
|
|
20
|
+
const updatedMediaSizes = Object.assign(Object.assign({}, mediaSizes), { [grid_1.GridColumnSize.Md]: blockSize * Number(mediaSize) });
|
|
21
|
+
setMediaSizes(updatedMediaSizes);
|
|
22
|
+
const updatedContentSizes = Object.assign(Object.assign({}, contentSizes), { [grid_1.GridColumnSize.Md]: blockSize * Number(contentSize) });
|
|
23
|
+
setContentSizes(updatedContentSizes);
|
|
24
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
25
|
+
}, [ratioMediaContent]);
|
|
26
|
+
const contentComponents = [];
|
|
27
|
+
const mediaComponents = [];
|
|
28
|
+
items.forEach((item, id) => {
|
|
29
|
+
const { content, media } = item;
|
|
30
|
+
const isActive = isActiveBlock(id);
|
|
31
|
+
const contentMods = { active: isActive };
|
|
32
|
+
const mediaMods = { active: isActiveBlock(id, true) };
|
|
33
|
+
const onClick = () => showMediaContent(id);
|
|
34
|
+
contentComponents.push(react_1.default.createElement(PreviewContent_1.default, Object.assign({ key: id, id: id }, content, { switching: switching, onClick: onClick, mods: contentMods })));
|
|
35
|
+
mediaComponents.push(react_1.default.createElement(PreviewMedia_1.default, { key: id, id: id, media: media && (0, utils_1.getThemedValue)(media, theme), play: isActive, mods: mediaMods }));
|
|
36
|
+
});
|
|
37
|
+
return (react_1.default.createElement(react_1.Fragment, null,
|
|
38
|
+
react_1.default.createElement(grid_1.Col, { sizes: contentSizes, className: b('content') },
|
|
39
|
+
react_1.default.createElement("div", { className: b('header') },
|
|
40
|
+
react_1.default.createElement("h2", { className: b('title') },
|
|
41
|
+
react_1.default.createElement(components_1.HTML, null, title)),
|
|
42
|
+
description && (react_1.default.createElement("div", { className: b('description') },
|
|
43
|
+
react_1.default.createElement(components_1.YFMWrapper, { content: description, modifiers: { constructor: true } })))),
|
|
44
|
+
react_1.default.createElement(grid_1.Col, { ref: ref, className: b('menu') },
|
|
45
|
+
react_1.default.createElement("div", { className: b('content-wrapper') }, contentComponents))),
|
|
46
|
+
react_1.default.createElement(grid_1.Col, { sizes: mediaSizes, className: b('media') }, mediaComponents)));
|
|
47
|
+
});
|
|
48
|
+
MediaContent.displayName = 'MediaContent';
|
|
49
|
+
exports.default = MediaContent;
|
|
@@ -0,0 +1,106 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Modifiers } from '../../../models';
|
|
2
|
+
interface PreviewContentProps {
|
|
3
|
+
id: number;
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
switching: boolean;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
mods: Modifiers | null;
|
|
9
|
+
}
|
|
10
|
+
declare const PreviewContent: (props: PreviewContentProps) => JSX.Element;
|
|
11
|
+
export default PreviewContent;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
|
+
const utils_1 = require("../../../utils");
|
|
6
|
+
const YFMWrapper_1 = tslib_1.__importDefault(require("../../../components/YFMWrapper/YFMWrapper"));
|
|
7
|
+
const b = (0, utils_1.block)('preview-content-block');
|
|
8
|
+
const PreviewContent = (props) => {
|
|
9
|
+
const { id, title, description = '', switching, onClick, mods } = props;
|
|
10
|
+
return (react_1.default.createElement("div", { key: id, className: b('content-wrapper') },
|
|
11
|
+
react_1.default.createElement("div", { className: b('content', mods), onClick: onClick },
|
|
12
|
+
react_1.default.createElement("div", { className: b('loader-block', Object.assign(Object.assign({}, mods), { auto: switching })) }),
|
|
13
|
+
react_1.default.createElement("h2", { className: b('title') }, title),
|
|
14
|
+
description && (react_1.default.createElement("div", { className: b('description') },
|
|
15
|
+
react_1.default.createElement(YFMWrapper_1.default, { content: description, modifiers: { constructor: true } }))))));
|
|
16
|
+
};
|
|
17
|
+
exports.default = PreviewContent;
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MediaProps, Modifiers } from '../../../models';
|
|
2
|
+
interface PreviewMediaProps {
|
|
3
|
+
id: number;
|
|
4
|
+
media: MediaProps;
|
|
5
|
+
play: boolean;
|
|
6
|
+
mods: Modifiers | null;
|
|
7
|
+
}
|
|
8
|
+
declare const PreviewMedia: (props: PreviewMediaProps) => JSX.Element;
|
|
9
|
+
export default PreviewMedia;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
|
+
const utils_1 = require("../../../utils");
|
|
6
|
+
const Media_1 = tslib_1.__importDefault(require("../../../components/Media/Media"));
|
|
7
|
+
const b = (0, utils_1.block)('preview-media-block');
|
|
8
|
+
const PreviewMedia = (props) => {
|
|
9
|
+
const { id, media, play, mods } = props;
|
|
10
|
+
return (react_1.default.createElement("div", { key: id, className: b('media', mods) },
|
|
11
|
+
react_1.default.createElement(Media_1.default, Object.assign({}, media, { playVideo: play }))));
|
|
12
|
+
};
|
|
13
|
+
exports.default = PreviewMedia;
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PreviewBlock = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const utils_1 = require("../../utils");
|
|
6
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
7
|
+
const breakpointContext_1 = require("../../context/breakpointContext");
|
|
8
|
+
const AnimateBlock_1 = tslib_1.__importDefault(require("../../components/AnimateBlock/AnimateBlock"));
|
|
9
|
+
const MediaContent_1 = tslib_1.__importDefault(require("./MediaContent/MediaContent"));
|
|
10
|
+
const grid_1 = require("../../grid");
|
|
11
|
+
const constants_1 = require("../../constants");
|
|
12
|
+
const useIntersection_1 = require("../../hooks/useIntersection");
|
|
13
|
+
const b = (0, utils_1.block)('preview-block');
|
|
14
|
+
const SWITCHING_INTERVAL = 5 * 1000;
|
|
15
|
+
const WIDTH_MENU_ITEM_MD_SIZE = 275;
|
|
16
|
+
const INDENT_MENU_ITEM_MD_SIZE = 16;
|
|
17
|
+
const SCROLL_ITEM_SECONDS = 1;
|
|
18
|
+
const SCROLL_ITEM_SPEED = 2;
|
|
19
|
+
const CLASSNAME_DESCRIPTION_YFM_BLOCK = 'yfm';
|
|
20
|
+
const CLASSNAME_CONTENT_WRAPPER = 'preview-media-content-block__content-wrapper';
|
|
21
|
+
const INDENT_BETWEEN_TITLE_DESCRIPTION = 16;
|
|
22
|
+
const PreviewBlock = (props) => {
|
|
23
|
+
const { direction = 'content-media', animated, items, title, description, ratioMediaContent = '1-1', stopVideo = false,
|
|
24
|
+
// TODO YDB-server doesn't see previewRef.current and doesn't update the component CLOUDFRONT-9395
|
|
25
|
+
showImmediately = false, } = props;
|
|
26
|
+
const breakpoint = (0, react_1.useContext)(breakpointContext_1.BreakpointContext);
|
|
27
|
+
const isDesktop = breakpoint >= constants_1.BREAKPOINTS.md;
|
|
28
|
+
const menuRef = react_1.default.useRef(null);
|
|
29
|
+
const previewRef = react_1.default.useRef(null);
|
|
30
|
+
const inViewport = (0, useIntersection_1.useIntersection)(previewRef.current);
|
|
31
|
+
const [stopSwitching, setStopSwitching] = (0, react_1.useState)(stopVideo);
|
|
32
|
+
const [activeSlide, setActiveSlide] = (0, react_1.useState)(-1);
|
|
33
|
+
const [autoSwitchTimerId, setAutoSwitchTimerId] = (0, react_1.useState)(0);
|
|
34
|
+
const isActiveBlock = (0, react_1.useCallback)((id, isMediaBlock = false) => {
|
|
35
|
+
return isMediaBlock || inViewport ? activeSlide === id : false;
|
|
36
|
+
}, [inViewport, activeSlide]);
|
|
37
|
+
const changeActiveSlide = (0, react_1.useCallback)((params) => {
|
|
38
|
+
const { current, nextSlide, currentSlide, timerId } = params;
|
|
39
|
+
if (isDesktop) {
|
|
40
|
+
changeDescriptionHeight(current, nextSlide, currentSlide);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
changeMenuScroll(current, nextSlide, currentSlide);
|
|
44
|
+
}
|
|
45
|
+
setActiveSlide(nextSlide);
|
|
46
|
+
clearTimeout(timerId);
|
|
47
|
+
}, [isDesktop]);
|
|
48
|
+
(0, react_1.useEffect)(() => {
|
|
49
|
+
// TODO YDB-server doesn't see previewRef.current and doesn't update the component CLOUDFRONT-9395
|
|
50
|
+
if (!items[activeSlide] && (showImmediately || inViewport)) {
|
|
51
|
+
setActiveSlide(0);
|
|
52
|
+
if (isDesktop) {
|
|
53
|
+
changeDescriptionHeight(menuRef.current, 0);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}, [inViewport, activeSlide, isDesktop, items, showImmediately]);
|
|
57
|
+
(0, react_1.useEffect)(() => {
|
|
58
|
+
if (stopSwitching || !inViewport) {
|
|
59
|
+
return () => { };
|
|
60
|
+
}
|
|
61
|
+
const timerId = setTimeout(() => {
|
|
62
|
+
if (stopSwitching) {
|
|
63
|
+
clearTimeout(timerId);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const nextSlide = activeSlide + 1 >= items.length ? 0 : activeSlide + 1;
|
|
67
|
+
changeActiveSlide({
|
|
68
|
+
current: menuRef.current,
|
|
69
|
+
nextSlide,
|
|
70
|
+
currentSlide: activeSlide,
|
|
71
|
+
timerId: timerId,
|
|
72
|
+
});
|
|
73
|
+
}, SWITCHING_INTERVAL);
|
|
74
|
+
setAutoSwitchTimerId(timerId);
|
|
75
|
+
return () => clearTimeout(timerId);
|
|
76
|
+
}, [changeActiveSlide, activeSlide, items.length, stopSwitching, inViewport]);
|
|
77
|
+
const showMediaContent = (0, react_1.useCallback)((nextSlide) => {
|
|
78
|
+
changeActiveSlide({
|
|
79
|
+
current: menuRef.current,
|
|
80
|
+
nextSlide,
|
|
81
|
+
currentSlide: activeSlide,
|
|
82
|
+
timerId: autoSwitchTimerId,
|
|
83
|
+
});
|
|
84
|
+
setStopSwitching(true);
|
|
85
|
+
}, [changeActiveSlide, activeSlide, autoSwitchTimerId]);
|
|
86
|
+
return (react_1.default.createElement(AnimateBlock_1.default, { className: b(), animate: animated },
|
|
87
|
+
react_1.default.createElement(grid_1.Row, { ref: previewRef, className: b('row', { reverse: direction === 'media-content' }) },
|
|
88
|
+
react_1.default.createElement(MediaContent_1.default, { ref: menuRef, items: items, title: title, description: description, ratioMediaContent: ratioMediaContent, switching: !stopSwitching, isActiveBlock: isActiveBlock, showMediaContent: showMediaContent }))));
|
|
89
|
+
};
|
|
90
|
+
exports.PreviewBlock = PreviewBlock;
|
|
91
|
+
function changeMenuScroll(element, nextSlide, activeSlide) {
|
|
92
|
+
if (!element) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
const scrollPosition = element.scrollLeft;
|
|
96
|
+
const endPosition = nextSlide === 0 ? 0 : nextSlide * WIDTH_MENU_ITEM_MD_SIZE + INDENT_MENU_ITEM_MD_SIZE;
|
|
97
|
+
const distance = Math.abs(scrollPosition - endPosition);
|
|
98
|
+
const isReverse = nextSlide === 0 || nextSlide < activeSlide;
|
|
99
|
+
const scrollOptions = {
|
|
100
|
+
distance,
|
|
101
|
+
timeSeconds: SCROLL_ITEM_SECONDS,
|
|
102
|
+
speed: SCROLL_ITEM_SPEED,
|
|
103
|
+
reverseParams: isReverse ? { distance } : undefined,
|
|
104
|
+
};
|
|
105
|
+
(0, utils_1.doSmoothScroll)(element, scrollPosition, scrollOptions);
|
|
106
|
+
}
|
|
107
|
+
function changeDescriptionHeight(element, nextActiveSlide, prevActiveSlide = 0) {
|
|
108
|
+
const contentWrapper = element === null || element === void 0 ? void 0 : element.getElementsByClassName(CLASSNAME_CONTENT_WRAPPER);
|
|
109
|
+
if (!contentWrapper || contentWrapper.length === 0) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const menuItems = contentWrapper[0].children;
|
|
113
|
+
updateHeight(menuItems, nextActiveSlide);
|
|
114
|
+
if (nextActiveSlide !== prevActiveSlide) {
|
|
115
|
+
updateHeight(menuItems, prevActiveSlide, false);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
function updateHeight(menuItems, slide, isExpand = true) {
|
|
119
|
+
const item = menuItems[slide];
|
|
120
|
+
const yfmBlock = item.getElementsByClassName(CLASSNAME_DESCRIPTION_YFM_BLOCK)[0];
|
|
121
|
+
if (yfmBlock) {
|
|
122
|
+
const yfmBlockElement = yfmBlock;
|
|
123
|
+
const yfmBlockHeight = yfmBlockElement.offsetHeight;
|
|
124
|
+
const yfmBlockOffsetParent = yfmBlockElement.offsetParent;
|
|
125
|
+
yfmBlockOffsetParent.style.height = isExpand
|
|
126
|
+
? `${yfmBlockHeight + INDENT_BETWEEN_TITLE_DESCRIPTION}px`
|
|
127
|
+
: '0px';
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
exports.default = exports.PreviewBlock;
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PreviewBlock = void 0;
|
|
4
|
+
const utils_1 = require("../../schema/validators/utils");
|
|
5
|
+
const common_1 = require("../../schema/validators/common");
|
|
6
|
+
const schema_1 = require("../Media/schema");
|
|
7
|
+
const previewRatioMediaContent = ['2-1', '1-1'];
|
|
8
|
+
const PreviewContentItem = {
|
|
9
|
+
additionalProperties: false,
|
|
10
|
+
required: ['title', 'description'],
|
|
11
|
+
properties: {
|
|
12
|
+
title: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
contentType: 'text',
|
|
15
|
+
},
|
|
16
|
+
description: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
contentType: 'yfm',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
const PreviewItem = {
|
|
23
|
+
type: 'object',
|
|
24
|
+
additionalProperties: false,
|
|
25
|
+
required: ['type', 'media', 'content'],
|
|
26
|
+
properties: {
|
|
27
|
+
type: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
enum: ['video', 'image'],
|
|
30
|
+
},
|
|
31
|
+
media: (0, common_1.withTheme)(schema_1.Media),
|
|
32
|
+
content: PreviewContentItem,
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
exports.PreviewBlock = {
|
|
36
|
+
'preview-block': {
|
|
37
|
+
additionalProperties: false,
|
|
38
|
+
required: ['title', 'items'],
|
|
39
|
+
properties: Object.assign(Object.assign(Object.assign({}, common_1.BaseProps), common_1.AnimatableProps), { title: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
contentType: 'text',
|
|
42
|
+
}, description: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
contentType: 'yfm',
|
|
45
|
+
}, direction: {
|
|
46
|
+
type: 'string',
|
|
47
|
+
enum: common_1.mediaDirection,
|
|
48
|
+
}, ratioMediaContent: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
enum: previewRatioMediaContent,
|
|
51
|
+
}, items: (0, utils_1.filteredArray)(PreviewItem) }),
|
|
52
|
+
},
|
|
53
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
|
2
|
+
unpredictable css rules order in build */
|
|
3
|
+
@media (min-width: 769px) {
|
|
4
|
+
.pc-simple-block.pc-AnimateBlock .pc-simple-block__animate-block, .pc-AnimateBlock .pc-simple-block .pc-simple-block__animate-block {
|
|
5
|
+
position: relative;
|
|
6
|
+
top: 100px;
|
|
7
|
+
opacity: 0;
|
|
8
|
+
}
|
|
9
|
+
.pc-simple-block.pc-AnimateBlock.animate .pc-simple-block__animate-block, .pc-AnimateBlock .pc-simple-block.animate .pc-simple-block__animate-block {
|
|
10
|
+
top: 0;
|
|
11
|
+
opacity: 1;
|
|
12
|
+
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);
|
|
13
|
+
transition-delay: 0.5s;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
.pc-simple-block__animate-block {
|
|
17
|
+
margin-top: 20px;
|
|
18
|
+
}
|
|
19
|
+
.pc-simple-block__description {
|
|
20
|
+
margin-top: 16px;
|
|
21
|
+
font-size: var(--yc-text-body-2-font-size);
|
|
22
|
+
}
|