@gravity-ui/page-constructor 2.2.0 → 2.2.1-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 +7 -0
- package/build/cjs/blocks/index.d.ts +0 -2
- package/build/cjs/blocks/index.js +1 -5
- package/build/cjs/blocks/validators.d.ts +0 -2
- package/build/cjs/blocks/validators.js +0 -2
- package/build/cjs/components/HTML/HTML.d.ts +1 -1
- package/build/cjs/components/ReactPlayer/utils.js +13 -12
- package/build/cjs/constructor-items.d.ts +0 -6
- package/build/cjs/constructor-items.js +0 -6
- package/build/cjs/hooks/index.d.ts +0 -1
- package/build/cjs/hooks/index.js +1 -3
- package/build/cjs/models/constructor-items/blocks.d.ts +2 -23
- package/build/cjs/models/constructor-items/blocks.js +0 -2
- 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 +9 -25
- package/build/cjs/models/constructor-items/sub-blocks.js +6 -7
- package/build/cjs/schema/index.js +2 -4
- package/build/cjs/schema/validators/blocks.d.ts +0 -2
- package/build/cjs/schema/validators/blocks.js +0 -2
- package/build/cjs/schema/validators/sub-blocks.d.ts +0 -1
- package/build/cjs/schema/validators/sub-blocks.js +0 -1
- package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +0 -1
- package/build/cjs/sub-blocks/index.d.ts +0 -1
- package/build/cjs/sub-blocks/index.js +1 -3
- package/build/cjs/text-transform/blocks.js +0 -32
- 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 -2
- package/build/esm/blocks/index.js +0 -2
- package/build/esm/blocks/validators.d.ts +0 -2
- package/build/esm/blocks/validators.js +0 -2
- package/build/esm/components/HTML/HTML.d.ts +1 -1
- package/build/esm/components/ReactPlayer/utils.js +13 -12
- package/build/esm/constructor-items.d.ts +0 -6
- package/build/esm/constructor-items.js +2 -8
- package/build/esm/hooks/index.d.ts +0 -1
- package/build/esm/hooks/index.js +0 -1
- package/build/esm/models/constructor-items/blocks.d.ts +2 -23
- package/build/esm/models/constructor-items/blocks.js +0 -2
- 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 +9 -25
- package/build/esm/models/constructor-items/sub-blocks.js +6 -7
- package/build/esm/schema/index.js +4 -6
- package/build/esm/schema/validators/blocks.d.ts +0 -2
- package/build/esm/schema/validators/blocks.js +0 -2
- package/build/esm/schema/validators/sub-blocks.d.ts +0 -1
- package/build/esm/schema/validators/sub-blocks.js +0 -1
- package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +0 -1
- package/build/esm/sub-blocks/index.d.ts +0 -1
- package/build/esm/sub-blocks/index.js +0 -1
- package/build/esm/text-transform/blocks.js +0 -32
- 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 -23
- package/server/models/constructor-items/blocks.js +0 -2
- 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 +9 -25
- package/server/models/constructor-items/sub-blocks.js +6 -7
- package/server/text-transform/blocks.js +0 -32
- package/server/utils/index.d.ts +0 -1
- package/server/utils/index.js +0 -1
- 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/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/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/utils/scroll.d.ts +0 -15
- package/build/cjs/utils/scroll.js +0 -34
- 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/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/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/utils/scroll.d.ts +0 -15
- package/build/esm/utils/scroll.js +0 -30
- package/server/utils/scroll.d.ts +0 -15
- package/server/utils/scroll.js +0 -34
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravity-ui/page-constructor",
|
|
3
|
-
"version": "2.2.0",
|
|
3
|
+
"version": "2.2.1-alpha.0",
|
|
4
4
|
"description": "Gravity UI Page Constructor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -137,5 +137,8 @@
|
|
|
137
137
|
"*.{json,yaml,yml,md}": [
|
|
138
138
|
"prettier --write"
|
|
139
139
|
]
|
|
140
|
+
},
|
|
141
|
+
"publishConfig": {
|
|
142
|
+
"tag": "alpha"
|
|
140
143
|
}
|
|
141
144
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ButtonSize } from '@gravity-ui/uikit';
|
|
3
|
-
import { BackgroundImageProps, ButtonProps, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, Justify, LinkProps, LinkTheme, MediaDirection, MediaProps, MapProps,
|
|
3
|
+
import { BackgroundImageProps, ButtonProps, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, Justify, LinkProps, LinkTheme, MediaDirection, MediaProps, MapProps, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleProps, LegendTableMarkerType, AnchorProps, TitleBaseProps, Animatable, BlockHeaderProps, ImageDeviceProps } from './common';
|
|
4
4
|
import { ThemeSupporting } from '../../utils';
|
|
5
5
|
import { GridColumnSize, GridColumnSizesType } from '../../grid/types';
|
|
6
6
|
import { BannerCardProps, SubBlock, SubBlockModels } from './sub-blocks';
|
|
@@ -14,12 +14,10 @@ export declare enum BlockType {
|
|
|
14
14
|
BannerBlock = "banner-block",
|
|
15
15
|
CompaniesBlock = "companies-block",
|
|
16
16
|
MediaBlock = "media-block",
|
|
17
|
-
PreviewBlock = "preview-block",
|
|
18
17
|
InfoBlock = "info-block",
|
|
19
18
|
SecurityBlock = "security-block",
|
|
20
19
|
TableBlock = "table-block",
|
|
21
20
|
TabsBlock = "tabs-block",
|
|
22
|
-
SimpleBlock = "simple-block",
|
|
23
21
|
HeaderSliderBlock = "header-slider-block",
|
|
24
22
|
LinkTableBlock = "link-table-block",
|
|
25
23
|
HeaderBlock = "header-block",
|
|
@@ -114,10 +112,6 @@ export interface HeaderBlockProps {
|
|
|
114
112
|
status?: JSX.Element;
|
|
115
113
|
}
|
|
116
114
|
export type CalculatorProps = Animatable;
|
|
117
|
-
export interface SimpleBlockProps extends Animatable, Childable {
|
|
118
|
-
title: TitleBaseProps;
|
|
119
|
-
description: string;
|
|
120
|
-
}
|
|
121
115
|
export interface ExtendedFeaturesItem extends Omit<ContentBlockProps, 'theme' | 'centered' | 'colSizes' | 'size' | 'title'> {
|
|
122
116
|
title: string;
|
|
123
117
|
label?: string;
|
|
@@ -180,15 +174,6 @@ export interface MediaBlockProps extends MediaBaseBlockProps {
|
|
|
180
174
|
export interface MapBlockProps extends MediaBaseBlockProps {
|
|
181
175
|
map: MapProps;
|
|
182
176
|
}
|
|
183
|
-
export interface PreviewBlockProps extends Animatable {
|
|
184
|
-
title: string;
|
|
185
|
-
items: PreviewItemProps[];
|
|
186
|
-
description?: string;
|
|
187
|
-
direction?: MediaDirection;
|
|
188
|
-
ratioMediaContent?: PreviewRatioMediaContent;
|
|
189
|
-
stopVideo?: boolean;
|
|
190
|
-
showImmediately?: boolean;
|
|
191
|
-
}
|
|
192
177
|
export interface InfoBlockProps {
|
|
193
178
|
theme?: TextTheme;
|
|
194
179
|
backgroundColor?: ThemeSupporting<string>;
|
|
@@ -346,9 +331,6 @@ export type MediaBlockModel = {
|
|
|
346
331
|
export type MapBlockModel = {
|
|
347
332
|
type: BlockType.MapBlock;
|
|
348
333
|
} & MapBlockProps;
|
|
349
|
-
export type PreviewBlockModel = {
|
|
350
|
-
type: BlockType.PreviewBlock;
|
|
351
|
-
} & PreviewBlockProps;
|
|
352
334
|
export type InfoBlockModel = {
|
|
353
335
|
type: BlockType.InfoBlock;
|
|
354
336
|
} & InfoBlockProps;
|
|
@@ -361,9 +343,6 @@ export type TableBlockModel = {
|
|
|
361
343
|
export type TabsBlockModel = {
|
|
362
344
|
type: BlockType.TabsBlock;
|
|
363
345
|
} & TabsBlockProps;
|
|
364
|
-
export type SimpleBlockModel = {
|
|
365
|
-
type: BlockType.SimpleBlock;
|
|
366
|
-
} & SimpleBlockProps;
|
|
367
346
|
export type LinkTableBlockModel = {
|
|
368
347
|
type: BlockType.LinkTableBlock;
|
|
369
348
|
} & LinkTableBlockProps;
|
|
@@ -385,6 +364,6 @@ export type ContentLayoutBlockModel = {
|
|
|
385
364
|
export type ShareBLockModel = {
|
|
386
365
|
type: BlockType.ShareBlock;
|
|
387
366
|
} & ShareBlockProps;
|
|
388
|
-
type BlockModels = SliderBlockModel | ServiceDemoBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | CalculatorBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | SecurityBlockModel | TableBlockModel | TabsBlockModel |
|
|
367
|
+
type BlockModels = SliderBlockModel | ServiceDemoBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | CalculatorBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | SecurityBlockModel | TableBlockModel | TabsBlockModel | LinkTableBlockModel | HeaderBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel | FilterBlockModel;
|
|
389
368
|
export type Block = BlockModels & BlockBaseProps;
|
|
390
369
|
export {};
|
|
@@ -12,12 +12,10 @@ var BlockType;
|
|
|
12
12
|
BlockType["BannerBlock"] = "banner-block";
|
|
13
13
|
BlockType["CompaniesBlock"] = "companies-block";
|
|
14
14
|
BlockType["MediaBlock"] = "media-block";
|
|
15
|
-
BlockType["PreviewBlock"] = "preview-block";
|
|
16
15
|
BlockType["InfoBlock"] = "info-block";
|
|
17
16
|
BlockType["SecurityBlock"] = "security-block";
|
|
18
17
|
BlockType["TableBlock"] = "table-block";
|
|
19
18
|
BlockType["TabsBlock"] = "tabs-block";
|
|
20
|
-
BlockType["SimpleBlock"] = "simple-block";
|
|
21
19
|
BlockType["HeaderSliderBlock"] = "header-slider-block";
|
|
22
20
|
BlockType["LinkTableBlock"] = "link-table-block";
|
|
23
21
|
BlockType["HeaderBlock"] = "header-block";
|
|
@@ -17,10 +17,6 @@ export declare enum PriceLabelColor {
|
|
|
17
17
|
PURPLE = "purple",
|
|
18
18
|
RED = "red"
|
|
19
19
|
}
|
|
20
|
-
export declare enum PreviewItemType {
|
|
21
|
-
Video = "video",
|
|
22
|
-
Image = "image"
|
|
23
|
-
}
|
|
24
20
|
export declare enum PlayButtonType {
|
|
25
21
|
Default = "default",
|
|
26
22
|
Text = "text"
|
|
@@ -49,7 +45,6 @@ export type LegendTableMarkerType = 'disk';
|
|
|
49
45
|
export type LinkTheme = 'file-link' | 'normal' | 'back' | 'underline';
|
|
50
46
|
export type MediaDirection = 'media-content' | 'content-media';
|
|
51
47
|
export type PriceDescriptionColor = 'cornflower' | 'black';
|
|
52
|
-
export type PreviewRatioMediaContent = '2-1' | '1-1';
|
|
53
48
|
export type ContentSize = 's' | 'l';
|
|
54
49
|
export type ContentTextSize = 's' | 'm' | 'l';
|
|
55
50
|
export type ContentTheme = 'default' | 'dark' | 'light';
|
|
@@ -249,15 +244,6 @@ export interface HeaderBreadCrumbsProps extends ClassNameProps {
|
|
|
249
244
|
metrikaGoals?: MetrikaGoal;
|
|
250
245
|
pixelEvents?: ButtonPixel;
|
|
251
246
|
}
|
|
252
|
-
export interface PreviewContentItemProps {
|
|
253
|
-
title: string;
|
|
254
|
-
description?: string;
|
|
255
|
-
}
|
|
256
|
-
export interface PreviewItemProps {
|
|
257
|
-
type: PreviewItemType;
|
|
258
|
-
media: ThemedMediaProps;
|
|
259
|
-
content: PreviewContentItemProps;
|
|
260
|
-
}
|
|
261
247
|
export interface TitleProps extends Justifyable, TitleBaseProps {
|
|
262
248
|
navTitle?: string;
|
|
263
249
|
anchor?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MediaVideoControlsType = exports.MediaVideoType = exports.PlayButtonThemes = exports.PlayButtonType = exports.
|
|
3
|
+
exports.MediaVideoControlsType = exports.MediaVideoType = exports.PlayButtonThemes = exports.PlayButtonType = exports.PriceLabelColor = exports.PriceDetailsType = exports.AuthorType = void 0;
|
|
4
4
|
// enums
|
|
5
5
|
var AuthorType;
|
|
6
6
|
(function (AuthorType) {
|
|
@@ -20,11 +20,6 @@ var PriceLabelColor;
|
|
|
20
20
|
PriceLabelColor["PURPLE"] = "purple";
|
|
21
21
|
PriceLabelColor["RED"] = "red";
|
|
22
22
|
})(PriceLabelColor = exports.PriceLabelColor || (exports.PriceLabelColor = {}));
|
|
23
|
-
var PreviewItemType;
|
|
24
|
-
(function (PreviewItemType) {
|
|
25
|
-
PreviewItemType["Video"] = "video";
|
|
26
|
-
PreviewItemType["Image"] = "image";
|
|
27
|
-
})(PreviewItemType = exports.PreviewItemType || (exports.PreviewItemType = {}));
|
|
28
23
|
var PlayButtonType;
|
|
29
24
|
(function (PlayButtonType) {
|
|
30
25
|
PlayButtonType["Default"] = "default";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ClassNameProps } from '../../models';
|
|
2
2
|
import { ThemeSupporting } from '../../utils';
|
|
3
3
|
import { HubspotEventData, HubspotEventHandlers } from '../../utils/hubspot';
|
|
4
|
-
import { AuthorItem, ButtonPixel, ButtonProps, CardBaseProps, ContentTheme, DividerSize, ImageObjectProps, ImageProps,
|
|
4
|
+
import { AuthorItem, ButtonPixel, ButtonProps, CardBaseProps, ContentTheme, DividerSize, ImageObjectProps, ImageProps, MediaProps, PriceDetailedProps, TextTheme, Themable, ThemedImage } from './common';
|
|
5
5
|
import { ContentBlockProps } from './blocks';
|
|
6
6
|
import { AnalyticsEventsBase, PixelEvent } from '../common';
|
|
7
7
|
export declare enum SubBlockType {
|
|
@@ -9,27 +9,26 @@ export declare enum SubBlockType {
|
|
|
9
9
|
Quote = "quote",
|
|
10
10
|
NewsCard = "news-card",
|
|
11
11
|
/**
|
|
12
|
-
* @deprecated Will be
|
|
12
|
+
* @deprecated Will be removed, use BasicCard instead
|
|
13
13
|
*/
|
|
14
14
|
Partner = "partner",
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Will be removed
|
|
17
|
+
*/
|
|
15
18
|
PriceDetailed = "price-detailed",
|
|
16
19
|
MediaCard = "media-card",
|
|
17
20
|
BannerCard = "banner-card",
|
|
18
21
|
/**
|
|
19
|
-
* @deprecated Will be
|
|
22
|
+
* @deprecated Will be removed, use BasicCard instead
|
|
20
23
|
*/
|
|
21
24
|
TutorialCard = "tutoral-card",
|
|
22
|
-
/**
|
|
23
|
-
* @deprecated Use LayoutItem
|
|
24
|
-
*/
|
|
25
|
-
CardWithImage = "card-with-image",
|
|
26
25
|
LayoutItem = "layout-item",
|
|
27
26
|
BackgroundCard = "background-card",
|
|
28
27
|
BasicCard = "basic-card",
|
|
29
28
|
Content = "content",
|
|
30
29
|
HubspotForm = "hubspot-form",
|
|
31
30
|
/**
|
|
32
|
-
* @deprecated Will be
|
|
31
|
+
* @deprecated Will be removed, use BasicCard instead
|
|
33
32
|
*/
|
|
34
33
|
Card = "card"
|
|
35
34
|
}
|
|
@@ -119,18 +118,6 @@ export interface BannerCardProps {
|
|
|
119
118
|
}
|
|
120
119
|
export interface MediaCardProps extends MediaProps, CardBaseProps {
|
|
121
120
|
}
|
|
122
|
-
export interface CardWithImageLinkProps extends Omit<LinkProps, 'text' | 'url'> {
|
|
123
|
-
title: string;
|
|
124
|
-
link: string;
|
|
125
|
-
}
|
|
126
|
-
export interface CardWithImageProps extends ClassNameProps, Pick<ContentBlockProps, 'title' | 'additionalInfo' | 'buttons' | 'theme'> {
|
|
127
|
-
image: string;
|
|
128
|
-
description?: string;
|
|
129
|
-
disableCompress?: boolean;
|
|
130
|
-
border?: boolean;
|
|
131
|
-
fullScreen?: boolean;
|
|
132
|
-
links?: CardWithImageLinkProps[];
|
|
133
|
-
}
|
|
134
121
|
export interface LayoutItemProps extends ClassNameProps {
|
|
135
122
|
content: Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size'>;
|
|
136
123
|
media: MediaProps;
|
|
@@ -147,11 +134,8 @@ export type QuoteModel = {
|
|
|
147
134
|
export type NewsCardModel = {
|
|
148
135
|
type: SubBlockType.NewsCard;
|
|
149
136
|
} & NewsCardProps;
|
|
150
|
-
export type CardWithImageModel = {
|
|
151
|
-
type: SubBlockType.CardWithImage;
|
|
152
|
-
} & CardWithImageProps;
|
|
153
137
|
export type LayoutItemModel = {
|
|
154
|
-
type: SubBlockType.
|
|
138
|
+
type: SubBlockType.LayoutItem;
|
|
155
139
|
} & LayoutItemProps;
|
|
156
140
|
export type TutorialCardModel = {
|
|
157
141
|
type: SubBlockType.TutorialCard;
|
|
@@ -177,5 +161,5 @@ export type BannerCardModel = {
|
|
|
177
161
|
export type BasicCardModel = {
|
|
178
162
|
type: SubBlockType.BasicCard;
|
|
179
163
|
} & BasicCardProps;
|
|
180
|
-
export type SubBlockModels = DividerModel | QuoteModel | NewsCardModel | PartnerModel | PriceDetailedModel | MediaCardModel | TutorialCardModel |
|
|
164
|
+
export type SubBlockModels = DividerModel | QuoteModel | NewsCardModel | PartnerModel | PriceDetailedModel | MediaCardModel | TutorialCardModel | BackgroundCardModel | HubspotFormModel | BannerCardModel | BasicCardModel | LayoutItemModel;
|
|
181
165
|
export type SubBlock = SubBlockModels;
|
|
@@ -7,27 +7,26 @@ var SubBlockType;
|
|
|
7
7
|
SubBlockType["Quote"] = "quote";
|
|
8
8
|
SubBlockType["NewsCard"] = "news-card";
|
|
9
9
|
/**
|
|
10
|
-
* @deprecated Will be
|
|
10
|
+
* @deprecated Will be removed, use BasicCard instead
|
|
11
11
|
*/
|
|
12
12
|
SubBlockType["Partner"] = "partner";
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Will be removed
|
|
15
|
+
*/
|
|
13
16
|
SubBlockType["PriceDetailed"] = "price-detailed";
|
|
14
17
|
SubBlockType["MediaCard"] = "media-card";
|
|
15
18
|
SubBlockType["BannerCard"] = "banner-card";
|
|
16
19
|
/**
|
|
17
|
-
* @deprecated Will be
|
|
20
|
+
* @deprecated Will be removed, use BasicCard instead
|
|
18
21
|
*/
|
|
19
22
|
SubBlockType["TutorialCard"] = "tutoral-card";
|
|
20
|
-
/**
|
|
21
|
-
* @deprecated Use LayoutItem
|
|
22
|
-
*/
|
|
23
|
-
SubBlockType["CardWithImage"] = "card-with-image";
|
|
24
23
|
SubBlockType["LayoutItem"] = "layout-item";
|
|
25
24
|
SubBlockType["BackgroundCard"] = "background-card";
|
|
26
25
|
SubBlockType["BasicCard"] = "basic-card";
|
|
27
26
|
SubBlockType["Content"] = "content";
|
|
28
27
|
SubBlockType["HubspotForm"] = "hubspot-form";
|
|
29
28
|
/**
|
|
30
|
-
* @deprecated Will be
|
|
29
|
+
* @deprecated Will be removed, use BasicCard instead
|
|
31
30
|
*/
|
|
32
31
|
SubBlockType["Card"] = "card";
|
|
33
32
|
})(SubBlockType = exports.SubBlockType || (exports.SubBlockType = {}));
|
|
@@ -147,16 +147,6 @@ const config = {
|
|
|
147
147
|
transformer: typografTransformer,
|
|
148
148
|
},
|
|
149
149
|
],
|
|
150
|
-
[models_1.SubBlockType.CardWithImage]: [
|
|
151
|
-
{
|
|
152
|
-
fields: ['description', 'additionalInfo'],
|
|
153
|
-
transformer: yfmTransformer,
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
fields: ['title'],
|
|
157
|
-
transformer: typografTransformer,
|
|
158
|
-
},
|
|
159
|
-
],
|
|
160
150
|
[models_1.SubBlockType.LayoutItem]: [
|
|
161
151
|
{
|
|
162
152
|
fields: ['content'],
|
|
@@ -281,17 +271,6 @@ const config = {
|
|
|
281
271
|
parser: (0, exports.createItemsParser)(['description']),
|
|
282
272
|
},
|
|
283
273
|
],
|
|
284
|
-
[models_1.BlockType.SimpleBlock]: [
|
|
285
|
-
{
|
|
286
|
-
fields: ['title'],
|
|
287
|
-
transformer: typografTransformer,
|
|
288
|
-
parser: parseTitle,
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
fields: ['description'],
|
|
292
|
-
transformer: yfmTransformer,
|
|
293
|
-
},
|
|
294
|
-
],
|
|
295
274
|
[models_1.SubBlockType.PriceDetailed]: [
|
|
296
275
|
{
|
|
297
276
|
transformer: yfmTransformer,
|
|
@@ -327,17 +306,6 @@ const config = {
|
|
|
327
306
|
parser: parseTitle,
|
|
328
307
|
},
|
|
329
308
|
],
|
|
330
|
-
[models_1.BlockType.PreviewBlock]: [
|
|
331
|
-
{
|
|
332
|
-
fields: ['description'],
|
|
333
|
-
transformer: yfmTransformer,
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
fields: ['title'],
|
|
337
|
-
transformer: typografTransformer,
|
|
338
|
-
parser: parseTitle,
|
|
339
|
-
},
|
|
340
|
-
],
|
|
341
309
|
[models_1.BlockType.InfoBlock]: [
|
|
342
310
|
{
|
|
343
311
|
fields: ['rightContent', 'leftContent'],
|
package/server/utils/index.d.ts
CHANGED
package/server/utils/index.js
CHANGED
|
@@ -18,7 +18,6 @@ exports.isHubspotEventData = exports.configure = exports.Lang = void 0;
|
|
|
18
18
|
__exportStar(require("./common"), exports);
|
|
19
19
|
__exportStar(require("./analytics"), exports);
|
|
20
20
|
__exportStar(require("./blocks"), exports);
|
|
21
|
-
__exportStar(require("./scroll"), exports);
|
|
22
21
|
__exportStar(require("./url"), exports);
|
|
23
22
|
__exportStar(require("./cn"), exports);
|
|
24
23
|
__exportStar(require("./url"), exports);
|
|
@@ -1,50 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
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;
|
|
@@ -1,49 +0,0 @@
|
|
|
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;
|
|
@@ -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,11 +0,0 @@
|
|
|
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;
|
|
@@ -1,17 +0,0 @@
|
|
|
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;
|
|
@@ -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,9 +0,0 @@
|
|
|
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;
|