@gravity-ui/page-constructor 4.49.2 → 4.51.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/build/cjs/components/IconWrapper/IconWrapper.css +24 -0
- package/build/cjs/components/IconWrapper/IconWrapper.d.ts +4 -0
- package/build/cjs/components/IconWrapper/IconWrapper.js +20 -0
- package/build/cjs/components/index.d.ts +1 -0
- package/build/cjs/components/index.js +3 -1
- package/build/cjs/constructor-items.d.ts +1 -1
- package/build/cjs/models/constructor-items/blocks.d.ts +2 -2
- package/build/cjs/models/constructor-items/common.d.ts +1 -0
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +12 -3
- package/build/cjs/sub-blocks/BannerCard/BannerCard.css +3 -0
- package/build/cjs/sub-blocks/BannerCard/BannerCard.js +3 -3
- package/build/cjs/sub-blocks/BasicCard/BasicCard.css +0 -23
- package/build/cjs/sub-blocks/BasicCard/BasicCard.js +6 -9
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.css +3 -0
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +15 -7
- package/build/esm/components/IconWrapper/IconWrapper.css +24 -0
- package/build/esm/components/IconWrapper/IconWrapper.d.ts +5 -0
- package/build/esm/components/IconWrapper/IconWrapper.js +18 -0
- package/build/esm/components/index.d.ts +1 -0
- package/build/esm/components/index.js +1 -0
- package/build/esm/constructor-items.d.ts +1 -1
- package/build/esm/models/constructor-items/blocks.d.ts +2 -2
- package/build/esm/models/constructor-items/common.d.ts +1 -0
- package/build/esm/models/constructor-items/sub-blocks.d.ts +12 -3
- package/build/esm/sub-blocks/BannerCard/BannerCard.css +3 -0
- package/build/esm/sub-blocks/BannerCard/BannerCard.js +3 -3
- package/build/esm/sub-blocks/BasicCard/BasicCard.css +0 -23
- package/build/esm/sub-blocks/BasicCard/BasicCard.js +4 -7
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.css +3 -0
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +16 -8
- package/package.json +1 -1
- package/server/models/constructor-items/blocks.d.ts +2 -2
- package/server/models/constructor-items/common.d.ts +1 -0
- package/server/models/constructor-items/sub-blocks.d.ts +12 -3
- package/widget/index.js +1 -1
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ import { ButtonSize } from '@gravity-ui/uikit';
|
|
|
3
3
|
import { GridColumnSize, GridColumnSizesType, IndentValue } from '../../grid/types';
|
|
4
4
|
import { ThemeSupporting } from '../../utils';
|
|
5
5
|
import { AnalyticsEventsBase } from '../common';
|
|
6
|
-
import { AnchorProps, Animatable, BackgroundImageProps, ButtonProps, CardBorder, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, ImageDeviceProps, ImageProps, Justify, LegendTableMarkerType, LinkProps, MapProps, MediaDirection, MediaProps, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleItemBaseProps, TitleItemProps, WithBorder, YandexFormProps } from './common';
|
|
6
|
+
import { AnchorProps, Animatable, BackgroundImageProps, ButtonProps, CardBorder, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, ImageDeviceProps, ImageProps, Justify, LegendTableMarkerType, LinkProps, MapProps, MediaDirection, MediaProps, MediaView, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleItemBaseProps, TitleItemProps, WithBorder, YandexFormProps } from './common';
|
|
7
7
|
import { BannerCardProps, HubspotFormProps, SubBlock, SubBlockModels } from './sub-blocks';
|
|
8
8
|
export declare enum BlockType {
|
|
9
9
|
PromoFeaturesBlock = "promo-features-block",
|
|
@@ -108,7 +108,7 @@ export interface HeaderBlockProps {
|
|
|
108
108
|
offset?: HeaderOffset;
|
|
109
109
|
image?: ThemedImage;
|
|
110
110
|
video?: ThemedMediaVideoProps;
|
|
111
|
-
mediaView?:
|
|
111
|
+
mediaView?: MediaView;
|
|
112
112
|
background?: ThemedHeaderBlockBackground;
|
|
113
113
|
theme?: 'light' | 'dark';
|
|
114
114
|
verticalOffset?: '0' | 's' | 'm' | 'l' | 'xl';
|
|
@@ -293,6 +293,7 @@ export interface TitleItemBaseProps {
|
|
|
293
293
|
custom?: string | ReactNode;
|
|
294
294
|
onClick?: () => void;
|
|
295
295
|
}
|
|
296
|
+
export type MediaView = 'fit' | 'full';
|
|
296
297
|
export type MediaBorder = 'shadow' | 'line' | 'none';
|
|
297
298
|
export type CardBorder = MediaBorder;
|
|
298
299
|
export interface CardBaseProps {
|
|
@@ -3,7 +3,7 @@ import { ThemeSupporting } from '../../utils';
|
|
|
3
3
|
import { HubspotEventData, HubspotEventHandlers } from '../../utils/hubspot';
|
|
4
4
|
import { AnalyticsEventsBase, PixelEvent } from '../common';
|
|
5
5
|
import { ContentBlockProps } from './blocks';
|
|
6
|
-
import { AuthorItem, ButtonPixel, ButtonProps, CardBaseProps, ContentTheme, DividerSize, ImageObjectProps, ImageProps, LinkProps, MediaProps, PriceDetailedProps, TextTheme, Themable, ThemedImage } from './common';
|
|
6
|
+
import { AuthorItem, ButtonPixel, ButtonProps, CardBaseProps, ContentTheme, DividerSize, ImageObjectProps, ImageProps, LinkProps, MediaProps, MediaView, PriceDetailedProps, TextTheme, Themable, ThemedImage } from './common';
|
|
7
7
|
export declare enum SubBlockType {
|
|
8
8
|
Divider = "divider",
|
|
9
9
|
Quote = "quote",
|
|
@@ -28,6 +28,13 @@ export declare enum IconPosition {
|
|
|
28
28
|
Top = "top",
|
|
29
29
|
Left = "left"
|
|
30
30
|
}
|
|
31
|
+
export interface PositionedIcon {
|
|
32
|
+
value: ImageProps;
|
|
33
|
+
position?: IconPosition;
|
|
34
|
+
}
|
|
35
|
+
export interface IconWrapperProps {
|
|
36
|
+
icon?: PositionedIcon;
|
|
37
|
+
}
|
|
31
38
|
export declare const SubBlockTypes: SubBlockType[];
|
|
32
39
|
export interface DividerProps {
|
|
33
40
|
size?: DividerSize;
|
|
@@ -106,7 +113,8 @@ export interface BannerCardProps {
|
|
|
106
113
|
disableCompress?: boolean;
|
|
107
114
|
color?: ThemeSupporting<string>;
|
|
108
115
|
theme?: TextTheme;
|
|
109
|
-
button: Pick<ButtonProps, 'text' | 'url' | 'target'>;
|
|
116
|
+
button: Pick<ButtonProps, 'text' | 'url' | 'target' | 'theme'>;
|
|
117
|
+
mediaView?: MediaView;
|
|
110
118
|
}
|
|
111
119
|
export interface MediaCardProps extends MediaProps, AnalyticsEventsBase, CardBaseProps {
|
|
112
120
|
}
|
|
@@ -123,10 +131,11 @@ export interface PriceCardProps extends CardBaseProps, Pick<ContentBlockProps, '
|
|
|
123
131
|
}
|
|
124
132
|
export interface LayoutItemProps extends ClassNameProps, AnalyticsEventsBase {
|
|
125
133
|
content: Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size'>;
|
|
126
|
-
media
|
|
134
|
+
media?: MediaProps;
|
|
127
135
|
metaInfo?: string[];
|
|
128
136
|
border?: boolean;
|
|
129
137
|
fullscreen?: boolean;
|
|
138
|
+
icon?: PositionedIcon;
|
|
130
139
|
}
|
|
131
140
|
export type DividerModel = {
|
|
132
141
|
type: SubBlockType.Divider;
|