@doyourjob/gravity-ui-page-constructor 5.31.149 → 5.31.150
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/constructor-items.d.ts +1 -1
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +1 -0
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.css +12 -0
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +6 -2
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +4 -0
- package/build/cjs/sub-blocks/LayoutItem/schema.js +3 -0
- package/build/esm/constructor-items.d.ts +1 -1
- package/build/esm/models/constructor-items/sub-blocks.d.ts +1 -0
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.css +12 -0
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +6 -2
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +4 -0
- package/build/esm/sub-blocks/LayoutItem/schema.js +3 -0
- package/package.json +1 -1
- package/schema/index.js +1 -1
- package/server/models/constructor-items/sub-blocks.d.ts +1 -0
- package/widget/index.js +1 -1
|
@@ -53,7 +53,7 @@ export declare const subBlockMap: {
|
|
|
53
53
|
"price-detailed": (props: import("./models").PriceDetailedProps) => JSX.Element;
|
|
54
54
|
"media-card": ({ border, analyticsEvents, label, ...mediaProps }: import("./models").MediaCardProps) => JSX.Element;
|
|
55
55
|
"banner-card": (props: import("./models").BannerCardProps) => JSX.Element;
|
|
56
|
-
"layout-item": ({ title, afterTitle, summary, rightSpace, content: { links, ...content }, metaInfo, media, mediaLink, border, fullscreen, icon, className, analyticsEvents, controlPosition, label, jumpOnHover, background, backgroundColor, }: import("./models").LayoutItemProps) => JSX.Element;
|
|
56
|
+
"layout-item": ({ title, afterTitle, summary, rightSpace, content: { links, ...content }, metaInfo, media, mediaLink, border, fullscreen, icon, className, analyticsEvents, controlPosition, label, jumpOnHover, background, backgroundColor, paddingBottom, }: import("./models").LayoutItemProps) => JSX.Element;
|
|
57
57
|
"background-card": (props: import("./models").BackgroundCardProps) => JSX.Element;
|
|
58
58
|
"basic-card": import("react").MemoExoticComponent<(props: import("./models").BasicCardProps) => JSX.Element>;
|
|
59
59
|
content: (props: import("./sub-blocks/Content/Content").ContentProps) => JSX.Element;
|
|
@@ -181,6 +181,7 @@ export interface LayoutItemProps extends ClassNameProps, CardLayoutProps, Analyt
|
|
|
181
181
|
jumpOnHover?: boolean;
|
|
182
182
|
backgroundColor?: string;
|
|
183
183
|
background?: ThemeSupporting<ImageObjectProps>;
|
|
184
|
+
paddingBottom?: 's' | 'm' | 'l' | 'xl';
|
|
184
185
|
}
|
|
185
186
|
export interface ImageCardProps extends CardBaseProps, CardLayoutProps, Omit<ContentBlockProps, 'colSizes' | 'centered' | 'controlPosition'> {
|
|
186
187
|
image: ThemeSupporting<ImageProps>;
|
|
@@ -9,6 +9,18 @@ unpredictable css rules order in build */
|
|
|
9
9
|
.pc-layout-item_with-image {
|
|
10
10
|
padding: 16px;
|
|
11
11
|
}
|
|
12
|
+
.pc-layout-item_paddingBottom_s {
|
|
13
|
+
padding-bottom: 80px;
|
|
14
|
+
}
|
|
15
|
+
.pc-layout-item_paddingBottom_m {
|
|
16
|
+
padding-bottom: 160px;
|
|
17
|
+
}
|
|
18
|
+
.pc-layout-item_paddingBottom_l {
|
|
19
|
+
padding-bottom: 240px;
|
|
20
|
+
}
|
|
21
|
+
.pc-layout-item_paddingBottom_xl {
|
|
22
|
+
padding-bottom: 320px;
|
|
23
|
+
}
|
|
12
24
|
.pc-layout-item__wrap {
|
|
13
25
|
margin-bottom: 16px;
|
|
14
26
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { LayoutItemProps } from '../../models';
|
|
2
|
-
declare const LayoutItem: ({ title, afterTitle, summary, rightSpace, content: { links, ...content }, metaInfo, media, mediaLink, border, fullscreen, icon, className, analyticsEvents, controlPosition, label, jumpOnHover, background, backgroundColor, }: LayoutItemProps) => JSX.Element;
|
|
2
|
+
declare const LayoutItem: ({ title, afterTitle, summary, rightSpace, content: { links, ...content }, metaInfo, media, mediaLink, border, fullscreen, icon, className, analyticsEvents, controlPosition, label, jumpOnHover, background, backgroundColor, paddingBottom, }: LayoutItemProps) => JSX.Element;
|
|
3
3
|
export default LayoutItem;
|
|
@@ -12,7 +12,7 @@ const Content_1 = tslib_1.__importDefault(require("../Content/Content"));
|
|
|
12
12
|
const utils_3 = require("./utils");
|
|
13
13
|
const b = (0, utils_2.block)('layout-item');
|
|
14
14
|
const LayoutItem = (_a) => {
|
|
15
|
-
var { title, afterTitle, summary, rightSpace = true } = _a, _b = _a.content, { links } = _b, content = tslib_1.__rest(_b, ["links"]), { metaInfo, media, mediaLink, border, fullscreen, icon, className, analyticsEvents, controlPosition = 'content', label, jumpOnHover, background, backgroundColor } = _a;
|
|
15
|
+
var { title, afterTitle, summary, rightSpace = true } = _a, _b = _a.content, { links } = _b, content = tslib_1.__rest(_b, ["links"]), { metaInfo, media, mediaLink, border, fullscreen, icon, className, analyticsEvents, controlPosition = 'content', label, jumpOnHover, background, backgroundColor, paddingBottom } = _a;
|
|
16
16
|
const normalizedLinks = (0, react_1.useMemo)(() => (0, utils_3.getLayoutItemLinks)(links), [links]);
|
|
17
17
|
const areControlsInFooter = controlPosition === 'footer';
|
|
18
18
|
const theme = (0, theme_1.useTheme)();
|
|
@@ -35,7 +35,11 @@ const LayoutItem = (_a) => {
|
|
|
35
35
|
return (react_1.default.createElement(components_1.Media, Object.assign({}, mediaWithMicrodata, fullscreenMediaProps, { className: b('media', { border }, mediaClassName), analyticsEvents: analyticsEvents })));
|
|
36
36
|
})) : (react_1.default.createElement(components_1.Media, Object.assign({}, themedMedia, { className: b('media', { border }), analyticsEvents: analyticsEvents })));
|
|
37
37
|
};
|
|
38
|
-
return (react_1.default.createElement("div", { className: b({
|
|
38
|
+
return (react_1.default.createElement("div", { className: b({
|
|
39
|
+
jumpOnHover,
|
|
40
|
+
paddingBottom,
|
|
41
|
+
'with-image': Boolean(background || backgroundColor),
|
|
42
|
+
}, className) },
|
|
39
43
|
react_1.default.createElement(components_1.BackgroundImage, Object.assign({ className: b('image') }, backgroundProps, { style: { backgroundColor } })),
|
|
40
44
|
label && react_1.default.createElement(components_1.Tag, Object.assign({}, label)),
|
|
41
45
|
(title || afterTitle) && (react_1.default.createElement("div", { className: b('wrap', { right: rightSpace }) },
|
|
@@ -53,7 +53,7 @@ export declare const subBlockMap: {
|
|
|
53
53
|
"price-detailed": (props: import("./models").PriceDetailedProps) => JSX.Element;
|
|
54
54
|
"media-card": ({ border, analyticsEvents, label, ...mediaProps }: import("./models").MediaCardProps) => JSX.Element;
|
|
55
55
|
"banner-card": (props: import("./models").BannerCardProps) => JSX.Element;
|
|
56
|
-
"layout-item": ({ title, afterTitle, summary, rightSpace, content: { links, ...content }, metaInfo, media, mediaLink, border, fullscreen, icon, className, analyticsEvents, controlPosition, label, jumpOnHover, background, backgroundColor, }: import("./models").LayoutItemProps) => JSX.Element;
|
|
56
|
+
"layout-item": ({ title, afterTitle, summary, rightSpace, content: { links, ...content }, metaInfo, media, mediaLink, border, fullscreen, icon, className, analyticsEvents, controlPosition, label, jumpOnHover, background, backgroundColor, paddingBottom, }: import("./models").LayoutItemProps) => JSX.Element;
|
|
57
57
|
"background-card": (props: import("./models").BackgroundCardProps) => JSX.Element;
|
|
58
58
|
"basic-card": import("react").MemoExoticComponent<(props: import("./models").BasicCardProps) => JSX.Element>;
|
|
59
59
|
content: (props: import("./sub-blocks/Content/Content").ContentProps) => JSX.Element;
|
|
@@ -181,6 +181,7 @@ export interface LayoutItemProps extends ClassNameProps, CardLayoutProps, Analyt
|
|
|
181
181
|
jumpOnHover?: boolean;
|
|
182
182
|
backgroundColor?: string;
|
|
183
183
|
background?: ThemeSupporting<ImageObjectProps>;
|
|
184
|
+
paddingBottom?: 's' | 'm' | 'l' | 'xl';
|
|
184
185
|
}
|
|
185
186
|
export interface ImageCardProps extends CardBaseProps, CardLayoutProps, Omit<ContentBlockProps, 'colSizes' | 'centered' | 'controlPosition'> {
|
|
186
187
|
image: ThemeSupporting<ImageProps>;
|
|
@@ -9,6 +9,18 @@ unpredictable css rules order in build */
|
|
|
9
9
|
.pc-layout-item_with-image {
|
|
10
10
|
padding: 16px;
|
|
11
11
|
}
|
|
12
|
+
.pc-layout-item_paddingBottom_s {
|
|
13
|
+
padding-bottom: 80px;
|
|
14
|
+
}
|
|
15
|
+
.pc-layout-item_paddingBottom_m {
|
|
16
|
+
padding-bottom: 160px;
|
|
17
|
+
}
|
|
18
|
+
.pc-layout-item_paddingBottom_l {
|
|
19
|
+
padding-bottom: 240px;
|
|
20
|
+
}
|
|
21
|
+
.pc-layout-item_paddingBottom_xl {
|
|
22
|
+
padding-bottom: 320px;
|
|
23
|
+
}
|
|
12
24
|
.pc-layout-item__wrap {
|
|
13
25
|
margin-bottom: 16px;
|
|
14
26
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { LayoutItemProps } from '../../models';
|
|
2
2
|
import './LayoutItem.css';
|
|
3
|
-
declare const LayoutItem: ({ title, afterTitle, summary, rightSpace, content: { links, ...content }, metaInfo, media, mediaLink, border, fullscreen, icon, className, analyticsEvents, controlPosition, label, jumpOnHover, background, backgroundColor, }: LayoutItemProps) => JSX.Element;
|
|
3
|
+
declare const LayoutItem: ({ title, afterTitle, summary, rightSpace, content: { links, ...content }, metaInfo, media, mediaLink, border, fullscreen, icon, className, analyticsEvents, controlPosition, label, jumpOnHover, background, backgroundColor, paddingBottom, }: LayoutItemProps) => JSX.Element;
|
|
4
4
|
export default LayoutItem;
|
|
@@ -11,7 +11,7 @@ import { getLayoutItemLinks, hasFullscreen, showFullscreenIcon } from './utils';
|
|
|
11
11
|
import './LayoutItem.css';
|
|
12
12
|
const b = block('layout-item');
|
|
13
13
|
const LayoutItem = (_a) => {
|
|
14
|
-
var { title, afterTitle, summary, rightSpace = true } = _a, _b = _a.content, { links } = _b, content = __rest(_b, ["links"]), { metaInfo, media, mediaLink, border, fullscreen, icon, className, analyticsEvents, controlPosition = 'content', label, jumpOnHover, background, backgroundColor } = _a;
|
|
14
|
+
var { title, afterTitle, summary, rightSpace = true } = _a, _b = _a.content, { links } = _b, content = __rest(_b, ["links"]), { metaInfo, media, mediaLink, border, fullscreen, icon, className, analyticsEvents, controlPosition = 'content', label, jumpOnHover, background, backgroundColor, paddingBottom } = _a;
|
|
15
15
|
const normalizedLinks = useMemo(() => getLayoutItemLinks(links), [links]);
|
|
16
16
|
const areControlsInFooter = controlPosition === 'footer';
|
|
17
17
|
const theme = useTheme();
|
|
@@ -34,7 +34,11 @@ const LayoutItem = (_a) => {
|
|
|
34
34
|
return (React.createElement(Media, Object.assign({}, mediaWithMicrodata, fullscreenMediaProps, { className: b('media', { border }, mediaClassName), analyticsEvents: analyticsEvents })));
|
|
35
35
|
})) : (React.createElement(Media, Object.assign({}, themedMedia, { className: b('media', { border }), analyticsEvents: analyticsEvents })));
|
|
36
36
|
};
|
|
37
|
-
return (React.createElement("div", { className: b({
|
|
37
|
+
return (React.createElement("div", { className: b({
|
|
38
|
+
jumpOnHover,
|
|
39
|
+
paddingBottom,
|
|
40
|
+
'with-image': Boolean(background || backgroundColor),
|
|
41
|
+
}, className) },
|
|
38
42
|
React.createElement(BackgroundImage, Object.assign({ className: b('image') }, backgroundProps, { style: { backgroundColor } })),
|
|
39
43
|
label && React.createElement(Tag, Object.assign({}, label)),
|
|
40
44
|
(title || afterTitle) && (React.createElement("div", { className: b('wrap', { right: rightSpace }) },
|