@doyourjob/gravity-ui-page-constructor-addons 2.1.30 → 2.1.31
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/NewHeader/components/NHCompanyPopup/NHCompanyPopup.js +1 -3
- package/build/cjs/components/NewHeader/components/NHInvestorPopup/NHInvestorPopup.js +1 -1
- package/build/cjs/components/NewHeader/components/NHLoginButton/NHLoginButton.css +1 -1
- package/build/cjs/components/NewHeader/components/NHMediumPopup/NHMediumPopup.js +1 -5
- package/build/cjs/components/NewHeader/components/NHPopupItem/ArrowRight.d.ts +2 -0
- package/build/cjs/components/NewHeader/components/NHPopupItem/ArrowRight.js +8 -0
- package/build/cjs/components/NewHeader/components/NHPopupItem/NHPopupItem.css +38 -59
- package/build/cjs/components/NewHeader/components/NHPopupItem/NHPopupItem.d.ts +1 -5
- package/build/cjs/components/NewHeader/components/NHPopupItem/NHPopupItem.js +12 -17
- package/build/cjs/components/NewHeader/components/NHProductsPopup/NHProductsPopup.css +55 -60
- package/build/cjs/components/NewHeader/components/NHProductsPopup/NHProductsPopup.d.ts +1 -1
- package/build/cjs/components/NewHeader/components/NHProductsPopup/NHProductsPopup.js +27 -49
- package/build/cjs/components/NewHeader/components/NHSolutionsPopup/NHSolutionsPopup.js +1 -4
- package/build/cjs/components/NewHeader/components/NHWhyPopup/NHWhyPopup.js +1 -1
- package/build/cjs/components/NewHeader/models.d.ts +19 -10
- package/build/esm/components/NewHeader/components/NHCompanyPopup/NHCompanyPopup.js +1 -3
- package/build/esm/components/NewHeader/components/NHInvestorPopup/NHInvestorPopup.js +2 -2
- package/build/esm/components/NewHeader/components/NHLoginButton/NHLoginButton.css +1 -1
- package/build/esm/components/NewHeader/components/NHMediumPopup/NHMediumPopup.js +2 -6
- package/build/esm/components/NewHeader/components/NHPopupItem/ArrowRight.d.ts +2 -0
- package/build/esm/components/NewHeader/components/NHPopupItem/ArrowRight.js +3 -0
- package/build/esm/components/NewHeader/components/NHPopupItem/NHPopupItem.css +38 -59
- package/build/esm/components/NewHeader/components/NHPopupItem/NHPopupItem.d.ts +1 -5
- package/build/esm/components/NewHeader/components/NHPopupItem/NHPopupItem.js +13 -18
- package/build/esm/components/NewHeader/components/NHProductsPopup/NHProductsPopup.css +55 -60
- package/build/esm/components/NewHeader/components/NHProductsPopup/NHProductsPopup.d.ts +1 -1
- package/build/esm/components/NewHeader/components/NHProductsPopup/NHProductsPopup.js +28 -50
- package/build/esm/components/NewHeader/components/NHSolutionsPopup/NHSolutionsPopup.js +2 -5
- package/build/esm/components/NewHeader/components/NHWhyPopup/NHWhyPopup.js +2 -2
- package/build/esm/components/NewHeader/models.d.ts +19 -10
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Col, Grid,
|
|
2
|
+
import { Col, Grid, Row, getLinkProps } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
3
|
import { block } from '../../../../utils/cn';
|
|
4
4
|
import { NHPopupItem } from '../NHPopupItem/NHPopupItem';
|
|
5
5
|
import './NHInvestorPopup.css';
|
|
@@ -10,7 +10,7 @@ export const NHInvestorPopup = ({ title, subtitle, url, items, stock }) => (Reac
|
|
|
10
10
|
React.createElement(Col, null,
|
|
11
11
|
React.createElement("a", Object.assign({ href: url, className: b('title') }, getLinkProps(url)), title),
|
|
12
12
|
React.createElement("div", { className: b('subtitle') }, subtitle))),
|
|
13
|
-
React.createElement(Row, null, items.map((item) => (React.createElement(NHPopupItem, Object.assign({ key: item.title, hover: true }, item
|
|
13
|
+
React.createElement(Row, null, items.map((item) => (React.createElement(NHPopupItem, Object.assign({ key: item.title, hover: true }, item)))))),
|
|
14
14
|
stock && (React.createElement("div", { className: b('card') },
|
|
15
15
|
React.createElement("div", { className: b('card-title') }, stock.title),
|
|
16
16
|
React.createElement("div", { className: b('card-wrap') },
|
|
@@ -8,7 +8,7 @@ unpredictable css rules order in build */
|
|
|
8
8
|
padding: 0 8px 0 12px;
|
|
9
9
|
background: var(--g-color-base-brand);
|
|
10
10
|
color: var(--g-color-text-brand-contrast);
|
|
11
|
-
border-radius:
|
|
11
|
+
border-radius: 24px;
|
|
12
12
|
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
13
13
|
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
14
14
|
font-weight: 500;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Col, Grid,
|
|
2
|
+
import { Col, Grid, Row } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
3
|
import { block } from '../../../../utils/cn';
|
|
4
4
|
import { NHPopupItem } from '../NHPopupItem/NHPopupItem';
|
|
5
5
|
import './NHMediumPopup.css';
|
|
6
6
|
const b = block('nh-medium-popup');
|
|
7
7
|
export const NHMediumPopup = ({ groups }) => (React.createElement(Grid, null,
|
|
8
8
|
React.createElement(Row, null,
|
|
9
|
-
React.createElement(Col, { className: b() }, groups.map((dataItem) => dataItem.items.map((item) => (React.createElement(NHPopupItem, Object.assign({}, item, { key: item.title, hover: true
|
|
10
|
-
[GridColumnSize.Xl]: 3,
|
|
11
|
-
[GridColumnSize.Md]: 4,
|
|
12
|
-
[GridColumnSize.All]: 12,
|
|
13
|
-
} })))))))));
|
|
9
|
+
React.createElement(Col, { className: b() }, groups.map((dataItem) => dataItem.items.map((item) => (React.createElement(NHPopupItem, Object.assign({}, item, { key: item.title, hover: true })))))))));
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const ArrowRight = (props) => (React.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true" }, props),
|
|
3
|
+
React.createElement("path", { xmlns: "http://www.w3.org/2000/svg", d: "M3.00073 8.49151L3.00024 6.96175L10.6817 6.96059L7.76622 4.04513L8.82439 3.00146L13.5493 7.72639L8.8238 12.4519L7.76495 11.3931L10.6822 8.49035L3.00073 8.49151Z", fill: "currentColor" })));
|
|
@@ -1,75 +1,64 @@
|
|
|
1
1
|
/* use this for style redefinitions to awoid problems with
|
|
2
2
|
unpredictable css rules order in build */
|
|
3
3
|
.pc-addons-nh-navigation-popup-item {
|
|
4
|
-
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
5
|
-
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
6
|
-
margin-bottom: 2px;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.pc-addons-nh-navigation-popup-item__content {
|
|
10
|
-
outline: none;
|
|
11
4
|
color: inherit;
|
|
12
5
|
text-decoration: none;
|
|
13
6
|
display: flex;
|
|
7
|
+
align-items: flex-start;
|
|
14
8
|
border-radius: var(--g-border-radius-xl);
|
|
15
9
|
height: 100%;
|
|
10
|
+
gap: 16px;
|
|
16
11
|
}
|
|
17
12
|
|
|
18
|
-
.
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.pc-addons-nh-navigation-popup-item__content:focus {
|
|
23
|
-
outline: 2px solid var(--g-color-line-focus);
|
|
24
|
-
outline-offset: -2px;
|
|
13
|
+
.pc-addons-nh-navigation-popup-item_column {
|
|
14
|
+
flex-direction: column;
|
|
25
15
|
}
|
|
26
16
|
|
|
27
|
-
.pc-addons-nh-navigation-popup-
|
|
28
|
-
|
|
17
|
+
.pc-addons-nh-navigation-popup-item_column .pc-addons-nh-navigation-popup-item__image {
|
|
18
|
+
width: auto;
|
|
19
|
+
max-width: 100%;
|
|
20
|
+
height: 30px;
|
|
29
21
|
}
|
|
30
22
|
|
|
31
|
-
.pc-addons-nh-navigation-popup-
|
|
32
|
-
padding:
|
|
23
|
+
.pc-addons-nh-navigation-popup-item_column .pc-addons-nh-navigation-popup-item__image-container {
|
|
24
|
+
padding: 0;
|
|
25
|
+
border-radius: 0;
|
|
26
|
+
border: none;
|
|
33
27
|
}
|
|
34
28
|
|
|
35
|
-
.pc-addons-nh-navigation-popup-
|
|
36
|
-
|
|
29
|
+
.pc-addons-nh-navigation-popup-item:hover .pc-addons-nh-navigation-popup-item__description, .pc-addons-nh-navigation-popup-item:active .pc-addons-nh-navigation-popup-item__description {
|
|
30
|
+
color: var(--g-color-text-primary);
|
|
37
31
|
}
|
|
38
32
|
|
|
39
|
-
.pc-addons-nh-navigation-popup-
|
|
40
|
-
|
|
33
|
+
.pc-addons-nh-navigation-popup-item:hover .pc-addons-nh-navigation-popup-item__image-container, .pc-addons-nh-navigation-popup-item:active .pc-addons-nh-navigation-popup-item__image-container {
|
|
34
|
+
background: var(--nh-popup-item-color-hover);
|
|
41
35
|
}
|
|
42
36
|
|
|
43
|
-
.pc-addons-nh-navigation-popup-
|
|
44
|
-
|
|
37
|
+
.pc-addons-nh-navigation-popup-item:hover .pc-addons-nh-navigation-popup-item__title > svg, .pc-addons-nh-navigation-popup-item:active .pc-addons-nh-navigation-popup-item__title > svg {
|
|
38
|
+
display: inline-block;
|
|
45
39
|
}
|
|
46
40
|
|
|
47
|
-
.pc-addons-nh-navigation-popup-
|
|
41
|
+
.pc-addons-nh-navigation-popup-item_disable {
|
|
48
42
|
pointer-events: none;
|
|
49
43
|
}
|
|
50
44
|
|
|
51
|
-
.pc-addons-nh-navigation-popup-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
position: absolute;
|
|
57
|
-
width: 20px;
|
|
58
|
-
height: 20px;
|
|
59
|
-
display: flex;
|
|
60
|
-
justify-content: center;
|
|
61
|
-
align-items: center;
|
|
45
|
+
.pc-addons-nh-navigation-popup-item__title {
|
|
46
|
+
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
47
|
+
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
48
|
+
font-weight: 600;
|
|
49
|
+
color: var(--g-color-text-primary);
|
|
62
50
|
}
|
|
63
51
|
|
|
64
|
-
.pc-addons-nh-navigation-popup-
|
|
65
|
-
|
|
52
|
+
.pc-addons-nh-navigation-popup-item__title > svg {
|
|
53
|
+
display: none;
|
|
54
|
+
vertical-align: sub;
|
|
66
55
|
}
|
|
67
56
|
|
|
68
57
|
.pc-addons-nh-navigation-popup-item__description {
|
|
69
58
|
font-size: var(--g-text-body-1-font-size, var(--pc-text-body-1-font-size));
|
|
70
59
|
line-height: var(--g-text-body-1-line-height, var(--pc-text-body-1-line-height));
|
|
71
60
|
display: block;
|
|
72
|
-
margin-top:
|
|
61
|
+
margin-top: 1px;
|
|
73
62
|
color: var(--g-color-text-secondary);
|
|
74
63
|
}
|
|
75
64
|
|
|
@@ -80,28 +69,18 @@ unpredictable css rules order in build */
|
|
|
80
69
|
|
|
81
70
|
.pc-addons-nh-navigation-popup-item__image {
|
|
82
71
|
display: block;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.pc-addons-nh-navigation-popup-item__image_size_m {
|
|
88
|
-
width: 18px;
|
|
89
|
-
height: 18px;
|
|
72
|
+
width: 24px;
|
|
73
|
+
height: 24px;
|
|
90
74
|
}
|
|
91
75
|
|
|
92
|
-
.pc-addons-nh-navigation-popup-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
.pc-addons-nh-navigation-popup-item__image_size_s {
|
|
98
|
-
width: 14px;
|
|
99
|
-
height: 14px;
|
|
76
|
+
.pc-addons-nh-navigation-popup-item__image-container {
|
|
77
|
+
padding: 8px;
|
|
78
|
+
border-radius: 8px;
|
|
79
|
+
background: var(--nh-popup-item-color);
|
|
100
80
|
}
|
|
101
81
|
|
|
102
|
-
.pc-addons-nh-navigation-popup-item__image-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
margin-right: 8px;
|
|
82
|
+
.pc-addons-nh-navigation-popup-item__image-container_no-bg {
|
|
83
|
+
border: 1px solid var(--g-color-line-generic-solid);
|
|
84
|
+
padding: 7px;
|
|
85
|
+
background: transparent;
|
|
107
86
|
}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { GridColumnSizesType } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
2
|
import { NHPopupItemData } from '../../models';
|
|
4
3
|
import './NHPopupItem.css';
|
|
5
4
|
export interface NHPopupItemProps extends Partial<NHPopupItemData> {
|
|
6
5
|
hover?: boolean;
|
|
7
|
-
|
|
8
|
-
className?: string;
|
|
9
|
-
padding?: 'default' | 's';
|
|
10
|
-
imageSize?: 's' | 'xm' | 'm';
|
|
6
|
+
column?: boolean;
|
|
11
7
|
target?: string;
|
|
12
8
|
}
|
|
13
9
|
export declare const NHPopupItem: (props: NHPopupItemProps) => React.JSX.Element;
|
|
@@ -1,24 +1,19 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { HTML, Image, getLinkProps } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
3
|
import { Icon } from '@gravity-ui/uikit';
|
|
4
4
|
import { block } from '../../../../utils/cn';
|
|
5
|
-
import {
|
|
6
|
-
import { NHNavigationTag } from '../NHTag/NHTag';
|
|
5
|
+
import { ArrowRight } from './ArrowRight';
|
|
7
6
|
import './NHPopupItem.css';
|
|
8
7
|
const b = block('nh-navigation-popup-item');
|
|
9
8
|
export const NHPopupItem = (props) => {
|
|
10
|
-
const {
|
|
11
|
-
const
|
|
12
|
-
return (React.createElement(
|
|
13
|
-
React.createElement("
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
React.createElement("span", { className: b('title') }, title),
|
|
21
|
-
"\u00A0",
|
|
22
|
-
navigationTag),
|
|
23
|
-
description && React.createElement(HTML, { className: b('description') }, description)))));
|
|
9
|
+
const { url, target, title, description, image, imageColor, imageColorHover, column } = props;
|
|
10
|
+
const styleImageContainer = useMemo(() => (Object.assign(Object.assign({}, (imageColor ? { '--nh-popup-item-color': imageColor } : {})), (imageColorHover ? { '--nh-popup-item-color-hover': imageColorHover } : {}))), [imageColor, imageColorHover]);
|
|
11
|
+
return (React.createElement("a", Object.assign({ className: b({ disable: !url, column }), href: url }, getLinkProps(url || '', undefined, target)),
|
|
12
|
+
image && (React.createElement("div", { className: b('image-container', { 'no-bg': !imageColor }), style: styleImageContainer },
|
|
13
|
+
React.createElement(Image, { className: b('image'), src: image }))),
|
|
14
|
+
React.createElement("div", { className: b('container') },
|
|
15
|
+
React.createElement("div", { className: b('title') },
|
|
16
|
+
title,
|
|
17
|
+
React.createElement(Icon, { data: ArrowRight, size: 16 })),
|
|
18
|
+
description && React.createElement(HTML, { className: b('description') }, description))));
|
|
24
19
|
};
|
|
@@ -14,111 +14,106 @@ unpredictable css rules order in build */
|
|
|
14
14
|
display: none;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.pc-addons-nh-products-popup__container {
|
|
18
|
-
padding: 0;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
17
|
.pc-addons-nh-products-popup > div + div {
|
|
22
18
|
border-top: 1px solid #e4ebf0;
|
|
23
19
|
}
|
|
24
20
|
|
|
25
|
-
.pc-addons-nh-products-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
.pc-addons-nh-products-popup__section {
|
|
22
|
+
display: flex;
|
|
23
|
+
padding: 24px 32px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.pc-addons-nh-products-popup__section-head {
|
|
28
27
|
display: flex;
|
|
29
28
|
flex-direction: column;
|
|
29
|
+
width: 200px;
|
|
30
|
+
padding-right: 32px;
|
|
31
|
+
flex-shrink: 0;
|
|
32
|
+
gap: 2px;
|
|
30
33
|
}
|
|
31
34
|
|
|
32
35
|
.pc-addons-nh-products-popup__title {
|
|
33
|
-
font-size: var(--g-text-
|
|
34
|
-
line-height: var(--g-text-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
font-weight: 600;
|
|
38
|
-
background-color: #e0e0e0;
|
|
36
|
+
font-size: var(--g-text-body-3-font-size, var(--pc-text-body-3-font-size));
|
|
37
|
+
line-height: var(--g-text-body-3-line-height, var(--pc-text-body-3-line-height));
|
|
38
|
+
color: var(--g-color-text-primary);
|
|
39
|
+
font-weight: 500;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
.pc-addons-nh-products-popup__subtitle {
|
|
42
|
-
font-size: var(--g-text-
|
|
43
|
-
line-height: var(--g-text-
|
|
44
|
-
|
|
45
|
-
color: #e0e0e0;
|
|
43
|
+
font-size: var(--g-text-body-1-font-size, var(--pc-text-body-1-font-size));
|
|
44
|
+
line-height: var(--g-text-body-1-line-height, var(--pc-text-body-1-line-height));
|
|
45
|
+
color: var(--g-color-text-secondary);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
.pc-addons-nh-products-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
53
|
-
font-weight: 500;
|
|
54
|
-
background-color: #f2f6f9;
|
|
55
|
-
border-radius: 16px;
|
|
56
|
-
padding: 16px;
|
|
57
|
-
display: flex;
|
|
58
|
-
gap: 24px;
|
|
48
|
+
.pc-addons-nh-products-popup__wrap, .pc-addons-nh-products-popup__wrap-scale {
|
|
49
|
+
display: grid;
|
|
50
|
+
gap: 24px 40px;
|
|
51
|
+
align-items: flex-start;
|
|
59
52
|
}
|
|
60
53
|
|
|
61
|
-
.pc-addons-nh-products-
|
|
62
|
-
|
|
63
|
-
flex-direction: column;
|
|
64
|
-
justify-content: center;
|
|
65
|
-
flex: 1;
|
|
66
|
-
gap: 20px;
|
|
54
|
+
.pc-addons-nh-products-popup__wrap {
|
|
55
|
+
grid-template-columns: 1fr 1fr 1fr;
|
|
67
56
|
}
|
|
68
57
|
|
|
69
|
-
.pc-addons-nh-products-
|
|
70
|
-
|
|
58
|
+
.pc-addons-nh-products-popup__wrap-scale {
|
|
59
|
+
grid-template-columns: repeat(12, 1fr);
|
|
71
60
|
}
|
|
72
61
|
|
|
73
|
-
.pc-addons-nh-products-
|
|
74
|
-
|
|
75
|
-
|
|
62
|
+
.pc-addons-nh-products-popup__wrap-scale > a {
|
|
63
|
+
grid-column: span 4;
|
|
64
|
+
grid-row: 1;
|
|
76
65
|
}
|
|
77
66
|
|
|
78
|
-
.pc-addons-nh-products-
|
|
79
|
-
|
|
80
|
-
aspect-ratio: 1;
|
|
67
|
+
.pc-addons-nh-products-popup__wrap-scale > .pc-addons-nh-products-popup__wrap:empty {
|
|
68
|
+
display: none;
|
|
81
69
|
}
|
|
82
70
|
|
|
83
|
-
.pc-addons-nh-products-
|
|
84
|
-
|
|
71
|
+
.pc-addons-nh-products-popup__wrap-scale > a + .pc-addons-nh-products-popup__wrap {
|
|
72
|
+
grid-column: span 8;
|
|
85
73
|
}
|
|
86
74
|
|
|
87
|
-
.pc-addons-nh-products-
|
|
75
|
+
.pc-addons-nh-products-popup__wrap-scale > .pc-addons-nh-products-popup__wrap:last-child {
|
|
76
|
+
grid-column: span 12;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.pc-addons-nh-products-popup__banner {
|
|
88
80
|
color: inherit;
|
|
89
81
|
text-decoration: none;
|
|
90
|
-
|
|
91
|
-
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
82
|
+
grid-area: 1/3/3/4;
|
|
92
83
|
font-weight: 500;
|
|
93
84
|
border-radius: 16px;
|
|
94
|
-
background-color: #f2f6f9;
|
|
95
85
|
padding: 16px;
|
|
96
86
|
display: flex;
|
|
97
|
-
flex-direction: column;
|
|
98
87
|
gap: 20px;
|
|
99
|
-
|
|
88
|
+
background: var(--nh-products-banner-background, transparent);
|
|
100
89
|
}
|
|
101
90
|
|
|
102
|
-
.pc-addons-nh-products-
|
|
103
|
-
border: 1px solid
|
|
104
|
-
background-color: transparent;
|
|
91
|
+
.pc-addons-nh-products-popup__banner_border {
|
|
92
|
+
border: 1px solid var(--g-color-line-generic-solid);
|
|
105
93
|
}
|
|
106
94
|
|
|
107
|
-
.pc-addons-nh-products-
|
|
95
|
+
.pc-addons-nh-products-popup__banner-wrap {
|
|
108
96
|
display: flex;
|
|
109
97
|
flex-direction: column;
|
|
110
98
|
flex: 1;
|
|
111
99
|
gap: 4px;
|
|
112
100
|
}
|
|
113
101
|
|
|
114
|
-
.pc-addons-nh-products-
|
|
115
|
-
|
|
102
|
+
.pc-addons-nh-products-popup__banner-title {
|
|
103
|
+
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
104
|
+
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
105
|
+
color: var(--nh-products-banner-color, var(--g-color-text-primary));
|
|
106
|
+
font-weight: 600;
|
|
116
107
|
}
|
|
117
108
|
|
|
118
|
-
.pc-addons-nh-products-
|
|
119
|
-
|
|
109
|
+
.pc-addons-nh-products-popup__banner-description {
|
|
110
|
+
font-size: var(--g-text-body-1-font-size, var(--pc-text-body-1-font-size));
|
|
111
|
+
line-height: var(--g-text-body-1-line-height, var(--pc-text-body-1-line-height));
|
|
112
|
+
color: var(--nh-products-banner-color, var(--g-color-text-secondary));
|
|
120
113
|
}
|
|
121
114
|
|
|
122
|
-
.pc-addons-nh-products-
|
|
123
|
-
|
|
115
|
+
.pc-addons-nh-products-popup__banner-image {
|
|
116
|
+
display: block;
|
|
117
|
+
width: 86px;
|
|
118
|
+
aspect-ratio: 1;
|
|
124
119
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { NHProductsPopupData } from '../../models';
|
|
3
3
|
import './NHProductsPopup.css';
|
|
4
|
-
export declare const NHProductsPopup: ({ sections,
|
|
4
|
+
export declare const NHProductsPopup: ({ sections, primaryColor, primaryColorHover, }: NHProductsPopupData) => React.JSX.Element;
|
|
@@ -1,61 +1,39 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { Image, getLinkProps } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
3
|
import { block } from '../../../../utils/cn';
|
|
4
4
|
import { NHPopupItem } from '../NHPopupItem/NHPopupItem';
|
|
5
5
|
import './NHProductsPopup.css';
|
|
6
6
|
const b = block('nh-products-popup');
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
const NHBanner = ({ title, description, image, url, background, color, border, }) => {
|
|
8
|
+
const styles = useMemo(() => (Object.assign(Object.assign({}, (background ? { '--nh-products-banner-background': background } : {})), (color ? { '--nh-products-banner-color': color } : {}))), [background, color]);
|
|
9
|
+
return (React.createElement("a", Object.assign({ href: url, className: b('banner', { border }), style: styles }, getLinkProps(url)),
|
|
10
|
+
React.createElement(Image, { className: b('banner-image'), src: image }),
|
|
11
|
+
React.createElement("div", { className: b('banner-wrap') },
|
|
12
|
+
React.createElement("div", { className: b('banner-title') }, title),
|
|
13
|
+
React.createElement("div", { className: b('banner-description') }, description))));
|
|
13
14
|
};
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
React.createElement(Image, { className: b('run-card-image'), src: image }),
|
|
17
|
-
React.createElement("div", { className: b('run-card-wrap') },
|
|
18
|
-
React.createElement("div", { className: b('run-card-title') }, title),
|
|
19
|
-
React.createElement("div", { className: b('run-card-description') }, description))));
|
|
20
|
-
};
|
|
21
|
-
export const NHProductsPopup = ({ sections, poweredCard }) => (React.createElement(Grid, { className: b(), containerClass: b('container') }, sections.map((section, index) => {
|
|
22
|
-
var _a, _b, _c;
|
|
23
|
-
const isScaleSection = index === 2; // "Scale" section is usually the 3rd one
|
|
24
|
-
const isRunSection = section.runCards && section.runCards.length > 0;
|
|
15
|
+
export const NHProductsPopup = ({ sections, primaryColor, primaryColorHover, }) => (React.createElement("div", { className: b() }, sections.map((section) => {
|
|
16
|
+
var _a, _b, _c, _d, _e;
|
|
25
17
|
let content;
|
|
26
|
-
if (
|
|
27
|
-
content = (React.createElement(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} },
|
|
32
|
-
React.createElement(RunCard, Object.assign({}, card))))))));
|
|
18
|
+
if ('mode' in section && section.mode === 'run') {
|
|
19
|
+
content = (React.createElement("div", { className: b('wrap-scale') },
|
|
20
|
+
((_a = section.items) === null || _a === void 0 ? void 0 : _a[0]) && React.createElement(NHPopupItem, Object.assign({}, section.items[0], { hover: true, column: true })),
|
|
21
|
+
React.createElement("div", { className: b('wrap') }, (_b = section.items) === null || _b === void 0 ? void 0 : _b.slice(1, 4).map((item, cardIndex) => (React.createElement(NHPopupItem, Object.assign({ key: `${item.title}-${cardIndex + 1}` }, item, { hover: true, column: true }))))),
|
|
22
|
+
React.createElement("div", { className: b('wrap') }, (_c = section.items) === null || _c === void 0 ? void 0 : _c.slice(4).map((item, cardIndex) => (React.createElement(NHPopupItem, Object.assign({ key: `${item.title}-${cardIndex + 4}` }, item, { hover: true, column: true })))))));
|
|
33
23
|
}
|
|
34
|
-
else if (
|
|
35
|
-
content = (React.createElement(
|
|
36
|
-
React.createElement(
|
|
37
|
-
|
|
38
|
-
[GridColumnSize.All]: 12,
|
|
39
|
-
} },
|
|
40
|
-
React.createElement(Row, null, (_b = section.items) === null || _b === void 0 ? void 0 : _b.map((item, itemIndex) => (React.createElement(NHPopupItem, Object.assign({ key: `${item.title}-${itemIndex}` }, item, { hover: true, sizes: {
|
|
41
|
-
[GridColumnSize.Md]: 6,
|
|
42
|
-
[GridColumnSize.All]: 12,
|
|
43
|
-
} })))))),
|
|
44
|
-
React.createElement(Col, { sizes: {
|
|
45
|
-
[GridColumnSize.Md]: 4,
|
|
46
|
-
[GridColumnSize.All]: 12,
|
|
47
|
-
} }, poweredCard && React.createElement(PoweredCard, Object.assign({}, poweredCard)))));
|
|
24
|
+
else if ('mode' in section && section.mode === 'scale') {
|
|
25
|
+
content = (React.createElement("div", { className: b('wrap') }, (_d = section.items) === null || _d === void 0 ? void 0 :
|
|
26
|
+
_d.map((item, itemIndex) => (React.createElement(NHPopupItem, Object.assign({ key: `${item.title}-${itemIndex}`, imageColor: primaryColor, imageColorHover: primaryColorHover }, item, { hover: true })))),
|
|
27
|
+
section.banner && React.createElement(NHBanner, Object.assign({}, section.banner))));
|
|
48
28
|
}
|
|
49
29
|
else {
|
|
50
|
-
content = (
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
} }))));
|
|
30
|
+
content = (React.createElement("div", { className: b('wrap') }, (_e = section.items) === null || _e === void 0 ? void 0 :
|
|
31
|
+
_e.map((item, itemIndex) => (React.createElement(NHPopupItem, Object.assign({ key: `${item.title}-${itemIndex}`, imageColor: primaryColor, imageColorHover: primaryColorHover }, item, { hover: true })))),
|
|
32
|
+
' '));
|
|
54
33
|
}
|
|
55
|
-
return (React.createElement(
|
|
56
|
-
React.createElement(
|
|
57
|
-
|
|
58
|
-
React.createElement(
|
|
59
|
-
|
|
60
|
-
React.createElement(Row, null, content))));
|
|
34
|
+
return (React.createElement("div", { className: b('section'), key: section.title },
|
|
35
|
+
React.createElement("div", { className: b('section-head') },
|
|
36
|
+
React.createElement("div", { className: b('title') }, section.title),
|
|
37
|
+
React.createElement("div", { className: b('subtitle') }, section.subtitle)),
|
|
38
|
+
content));
|
|
61
39
|
})));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Col, Grid,
|
|
2
|
+
import { Col, Grid, Row } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
3
|
import { block } from '../../../../utils/cn';
|
|
4
4
|
import { NHPopupItem } from '../NHPopupItem/NHPopupItem';
|
|
5
5
|
import './NHSolutionsPopup.css';
|
|
@@ -10,7 +10,4 @@ export const NHSolutionsPopup = ({ sections }) => (React.createElement(Grid, { c
|
|
|
10
10
|
React.createElement(Col, { className: b('head') },
|
|
11
11
|
React.createElement("div", { className: b('title') }, section.title),
|
|
12
12
|
React.createElement("div", { className: b('subtitle') }, section.subtitle))),
|
|
13
|
-
React.createElement(Row, null, section.items.map((item) => (React.createElement(NHPopupItem, Object.assign({ key: item.title }, item, { hover: true
|
|
14
|
-
[GridColumnSize.Md]: 4,
|
|
15
|
-
[GridColumnSize.All]: 12,
|
|
16
|
-
} })))))))))));
|
|
13
|
+
React.createElement(Row, null, section.items.map((item) => (React.createElement(NHPopupItem, Object.assign({ key: item.title }, item, { hover: true })))))))))));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Col, Grid,
|
|
2
|
+
import { Col, Grid, Image, Row } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
3
|
import { block } from '../../../../utils/cn';
|
|
4
4
|
import { NHPopupItem } from '../NHPopupItem/NHPopupItem';
|
|
5
5
|
import './NHWhyPopup.css';
|
|
@@ -9,7 +9,7 @@ export const NHWhyPopup = ({ groups, card }) => (React.createElement(Grid, { cla
|
|
|
9
9
|
React.createElement(Row, null,
|
|
10
10
|
React.createElement(Col, null,
|
|
11
11
|
React.createElement("div", { className: b('title') }, group.title))),
|
|
12
|
-
React.createElement(Row, null, group.items.map((item) => (React.createElement(NHPopupItem, Object.assign({ key: item.title }, item, { hover: true
|
|
12
|
+
React.createElement(Row, null, group.items.map((item) => (React.createElement(NHPopupItem, Object.assign({ key: item.title }, item, { hover: true }))))))))),
|
|
13
13
|
card && (React.createElement("div", { className: b('card') },
|
|
14
14
|
React.createElement(Image, { className: b('card-image'), containerClassName: b('card-container-image'), src: card.image }),
|
|
15
15
|
React.createElement("div", { className: b('card-wrap') },
|
|
@@ -30,9 +30,9 @@ export interface NHPopupItemData {
|
|
|
30
30
|
url: string;
|
|
31
31
|
slug?: string;
|
|
32
32
|
description?: string;
|
|
33
|
-
icon?: string;
|
|
34
33
|
image?: string | null;
|
|
35
|
-
|
|
34
|
+
imageColor?: string;
|
|
35
|
+
imageColorHover?: string;
|
|
36
36
|
}
|
|
37
37
|
export interface NHCategoryGroupData {
|
|
38
38
|
title?: string;
|
|
@@ -43,28 +43,37 @@ export interface NHCategoryGroupData {
|
|
|
43
43
|
export interface NHMediumPopupData {
|
|
44
44
|
groups: NHCategoryGroupData[];
|
|
45
45
|
}
|
|
46
|
-
export interface
|
|
46
|
+
export interface NHBannerData {
|
|
47
47
|
title: string;
|
|
48
48
|
description: string;
|
|
49
49
|
image: string;
|
|
50
50
|
url: string;
|
|
51
51
|
}
|
|
52
|
-
export interface
|
|
52
|
+
export interface NHProductBannerData {
|
|
53
53
|
title: string;
|
|
54
54
|
description: string;
|
|
55
55
|
image: string;
|
|
56
|
-
border?: boolean;
|
|
57
56
|
url: string;
|
|
57
|
+
background?: string;
|
|
58
|
+
color?: string;
|
|
59
|
+
border?: boolean;
|
|
58
60
|
}
|
|
59
|
-
export interface
|
|
61
|
+
export interface NHProductsPopupSectionBase {
|
|
60
62
|
title: string;
|
|
61
63
|
subtitle: string;
|
|
62
64
|
items?: NHPopupItemData[];
|
|
63
|
-
|
|
65
|
+
}
|
|
66
|
+
export interface NHProductsPopupSectionRun extends NHProductsPopupSectionBase {
|
|
67
|
+
mode: 'run';
|
|
68
|
+
}
|
|
69
|
+
export interface NHProductsPopupSectionScale extends NHProductsPopupSectionBase {
|
|
70
|
+
mode: 'scale';
|
|
71
|
+
banner?: NHProductBannerData;
|
|
64
72
|
}
|
|
65
73
|
export interface NHProductsPopupData {
|
|
66
|
-
|
|
67
|
-
|
|
74
|
+
primaryColor?: string;
|
|
75
|
+
primaryColorHover?: string;
|
|
76
|
+
sections: (NHProductsPopupSectionRun | NHProductsPopupSectionBase | NHProductsPopupSectionScale)[];
|
|
68
77
|
}
|
|
69
78
|
export interface NHSolutionsPopupSection {
|
|
70
79
|
title: string;
|
|
@@ -80,7 +89,7 @@ export interface NHWhyPopupGroup {
|
|
|
80
89
|
}
|
|
81
90
|
export interface NHWhyPopupData {
|
|
82
91
|
groups: NHWhyPopupGroup[];
|
|
83
|
-
card:
|
|
92
|
+
card: NHBannerData;
|
|
84
93
|
}
|
|
85
94
|
export interface NHBannerData {
|
|
86
95
|
title: string;
|