@doyourjob/gravity-ui-page-constructor-addons 2.1.31 → 2.1.32
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/NHDefaultPopup/NHDefaultPopup.css +166 -0
- package/build/cjs/components/NewHeader/components/NHDefaultPopup/NHDefaultPopup.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/NHDefaultPopup/NHDefaultPopup.js +55 -0
- package/build/cjs/components/NewHeader/components/NHLoginPopup/NHLoginPopup.css +5 -31
- package/build/cjs/components/NewHeader/components/NHLoginPopup/NHLoginPopup.js +3 -4
- package/build/cjs/components/NewHeader/components/NHNavigation/NHNavigation.js +5 -21
- package/build/cjs/components/NewHeader/components/NHPopupItem/NHPopupItem.css +19 -3
- package/build/cjs/components/NewHeader/components/NHPopupItem/NHPopupItem.d.ts +0 -2
- package/build/cjs/components/NewHeader/components/NHProductsPopup/NHProductsPopup.css +1 -2
- package/build/cjs/components/NewHeader/components/NHProductsPopup/NHProductsPopup.js +5 -5
- package/build/cjs/components/NewHeader/models.d.ts +31 -109
- package/build/cjs/components/NewHeader/models.js +2 -13
- package/build/esm/components/NewHeader/components/NHDefaultPopup/NHDefaultPopup.css +166 -0
- package/build/esm/components/NewHeader/components/NHDefaultPopup/NHDefaultPopup.d.ts +4 -0
- package/build/esm/components/NewHeader/components/NHDefaultPopup/NHDefaultPopup.js +51 -0
- package/build/esm/components/NewHeader/components/NHLoginPopup/NHLoginPopup.css +5 -31
- package/build/esm/components/NewHeader/components/NHLoginPopup/NHLoginPopup.js +3 -4
- package/build/esm/components/NewHeader/components/NHNavigation/NHNavigation.js +6 -22
- package/build/esm/components/NewHeader/components/NHPopupItem/NHPopupItem.css +19 -3
- package/build/esm/components/NewHeader/components/NHPopupItem/NHPopupItem.d.ts +0 -2
- package/build/esm/components/NewHeader/components/NHProductsPopup/NHProductsPopup.css +1 -2
- package/build/esm/components/NewHeader/components/NHProductsPopup/NHProductsPopup.js +5 -5
- package/build/esm/components/NewHeader/models.d.ts +31 -109
- package/build/esm/components/NewHeader/models.js +1 -12
- package/package.json +1 -1
- package/build/cjs/components/NewHeader/components/NHCompanyPopup/NHCompanyPopup.css +0 -30
- package/build/cjs/components/NewHeader/components/NHCompanyPopup/NHCompanyPopup.d.ts +0 -3
- package/build/cjs/components/NewHeader/components/NHCompanyPopup/NHCompanyPopup.js +0 -18
- package/build/cjs/components/NewHeader/components/NHInvestorPopup/NHInvestorPopup.css +0 -86
- package/build/cjs/components/NewHeader/components/NHInvestorPopup/NHInvestorPopup.d.ts +0 -3
- package/build/cjs/components/NewHeader/components/NHInvestorPopup/NHInvestorPopup.js +0 -22
- package/build/cjs/components/NewHeader/components/NHMediumPopup/NHMediumPopup.css +0 -8
- package/build/cjs/components/NewHeader/components/NHMediumPopup/NHMediumPopup.d.ts +0 -3
- package/build/cjs/components/NewHeader/components/NHMediumPopup/NHMediumPopup.js +0 -13
- package/build/cjs/components/NewHeader/components/NHResourcesPopup/NHResourcesPopup.css +0 -209
- package/build/cjs/components/NewHeader/components/NHResourcesPopup/NHResourcesPopup.d.ts +0 -3
- package/build/cjs/components/NewHeader/components/NHResourcesPopup/NHResourcesPopup.js +0 -42
- package/build/cjs/components/NewHeader/components/NHSolutionsPopup/NHSolutionsPopup.css +0 -48
- package/build/cjs/components/NewHeader/components/NHSolutionsPopup/NHSolutionsPopup.d.ts +0 -3
- package/build/cjs/components/NewHeader/components/NHSolutionsPopup/NHSolutionsPopup.js +0 -17
- package/build/cjs/components/NewHeader/components/NHTag/NHTag.css +0 -21
- package/build/cjs/components/NewHeader/components/NHTag/NHTag.d.ts +0 -6
- package/build/cjs/components/NewHeader/components/NHTag/NHTag.js +0 -22
- package/build/cjs/components/NewHeader/components/NHWhyPopup/NHWhyPopup.css +0 -80
- package/build/cjs/components/NewHeader/components/NHWhyPopup/NHWhyPopup.d.ts +0 -3
- package/build/cjs/components/NewHeader/components/NHWhyPopup/NHWhyPopup.js +0 -21
- package/build/esm/components/NewHeader/components/NHCompanyPopup/NHCompanyPopup.css +0 -30
- package/build/esm/components/NewHeader/components/NHCompanyPopup/NHCompanyPopup.d.ts +0 -4
- package/build/esm/components/NewHeader/components/NHCompanyPopup/NHCompanyPopup.js +0 -14
- package/build/esm/components/NewHeader/components/NHInvestorPopup/NHInvestorPopup.css +0 -86
- package/build/esm/components/NewHeader/components/NHInvestorPopup/NHInvestorPopup.d.ts +0 -4
- package/build/esm/components/NewHeader/components/NHInvestorPopup/NHInvestorPopup.js +0 -18
- package/build/esm/components/NewHeader/components/NHMediumPopup/NHMediumPopup.css +0 -8
- package/build/esm/components/NewHeader/components/NHMediumPopup/NHMediumPopup.d.ts +0 -4
- package/build/esm/components/NewHeader/components/NHMediumPopup/NHMediumPopup.js +0 -9
- package/build/esm/components/NewHeader/components/NHResourcesPopup/NHResourcesPopup.css +0 -209
- package/build/esm/components/NewHeader/components/NHResourcesPopup/NHResourcesPopup.d.ts +0 -4
- package/build/esm/components/NewHeader/components/NHResourcesPopup/NHResourcesPopup.js +0 -38
- package/build/esm/components/NewHeader/components/NHSolutionsPopup/NHSolutionsPopup.css +0 -48
- package/build/esm/components/NewHeader/components/NHSolutionsPopup/NHSolutionsPopup.d.ts +0 -4
- package/build/esm/components/NewHeader/components/NHSolutionsPopup/NHSolutionsPopup.js +0 -13
- package/build/esm/components/NewHeader/components/NHTag/NHTag.css +0 -21
- package/build/esm/components/NewHeader/components/NHTag/NHTag.d.ts +0 -7
- package/build/esm/components/NewHeader/components/NHTag/NHTag.js +0 -18
- package/build/esm/components/NewHeader/components/NHWhyPopup/NHWhyPopup.css +0 -80
- package/build/esm/components/NewHeader/components/NHWhyPopup/NHWhyPopup.d.ts +0 -4
- package/build/esm/components/NewHeader/components/NHWhyPopup/NHWhyPopup.js +0 -17
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
|
2
|
+
unpredictable css rules order in build */
|
|
3
|
+
.pc-addons-nh-default-popup {
|
|
4
|
+
background: var(--g-color-base-float);
|
|
5
|
+
box-shadow: 0 4px 24px var(--g-color-base-generic), 0 2px 8px var(--g-color-base-generic);
|
|
6
|
+
max-height: calc(100vh - 64px - 64px);
|
|
7
|
+
overflow: auto;
|
|
8
|
+
width: 100%;
|
|
9
|
+
border-radius: var(--pc-border-radius, 24px);
|
|
10
|
+
scrollbar-width: none;
|
|
11
|
+
display: flex;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.pc-addons-nh-default-popup::-webkit-scrollbar {
|
|
15
|
+
display: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.pc-addons-nh-default-popup__head {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: baseline;
|
|
21
|
+
column-gap: 12px;
|
|
22
|
+
row-gap: 2px;
|
|
23
|
+
flex-wrap: wrap;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.pc-addons-nh-default-popup__title {
|
|
27
|
+
font-size: var(--g-text-body-3-font-size, var(--pc-text-body-3-font-size));
|
|
28
|
+
line-height: var(--g-text-body-3-line-height, var(--pc-text-body-3-line-height));
|
|
29
|
+
color: var(--g-color-text-primary);
|
|
30
|
+
font-weight: 500;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.pc-addons-nh-default-popup__subtitle {
|
|
34
|
+
font-size: var(--g-text-body-1-font-size, var(--pc-text-body-1-font-size));
|
|
35
|
+
line-height: var(--g-text-body-1-line-height, var(--pc-text-body-1-line-height));
|
|
36
|
+
color: var(--g-color-text-secondary);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.pc-addons-nh-default-popup__left {
|
|
40
|
+
flex: 1;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.pc-addons-nh-default-popup__left > div + div {
|
|
44
|
+
border-top: 1px solid var(--g-color-line-generic-solid);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.pc-addons-nh-default-popup__section {
|
|
48
|
+
display: flex;
|
|
49
|
+
padding: 24px 32px;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
gap: 24px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.pc-addons-nh-default-popup__wrap {
|
|
55
|
+
display: grid;
|
|
56
|
+
gap: 24px 40px;
|
|
57
|
+
align-items: flex-start;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.pc-addons-nh-default-popup__right {
|
|
61
|
+
width: 100%;
|
|
62
|
+
max-width: 320px;
|
|
63
|
+
flex-shrink: 0;
|
|
64
|
+
border-left: 1px solid var(--g-color-line-generic-solid);
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: column;
|
|
67
|
+
padding: 24px 32px;
|
|
68
|
+
gap: 20px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.pc-addons-nh-default-popup__cards {
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
gap: 24px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.pc-addons-nh-default-popup__card {
|
|
78
|
+
color: inherit;
|
|
79
|
+
text-decoration: none;
|
|
80
|
+
border-radius: 16px;
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-direction: column;
|
|
83
|
+
gap: 12px;
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
transition: opacity 0.2s;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.pc-addons-nh-default-popup__card:hover {
|
|
89
|
+
opacity: 0.8;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.pc-addons-nh-default-popup__card-wrap {
|
|
93
|
+
display: flex;
|
|
94
|
+
flex-direction: column;
|
|
95
|
+
gap: 4px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.pc-addons-nh-default-popup__card-caption {
|
|
99
|
+
font-size: var(--g-text-body-1-font-size, var(--pc-text-body-1-font-size));
|
|
100
|
+
line-height: var(--g-text-body-1-line-height, var(--pc-text-body-1-line-height));
|
|
101
|
+
color: var(--g-color-text-secondary);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.pc-addons-nh-default-popup__card-title {
|
|
105
|
+
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
106
|
+
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
107
|
+
color: var(--g-color-text-primary);
|
|
108
|
+
font-weight: 600;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.pc-addons-nh-default-popup__card-description {
|
|
112
|
+
font-size: var(--g-text-body-1-font-size, var(--pc-text-body-1-font-size));
|
|
113
|
+
line-height: var(--g-text-body-1-line-height, var(--pc-text-body-1-line-height));
|
|
114
|
+
color: var(--g-color-text-secondary);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.pc-addons-nh-default-popup__card-image {
|
|
118
|
+
display: block;
|
|
119
|
+
width: 100%;
|
|
120
|
+
aspect-ratio: 16/9;
|
|
121
|
+
object-fit: cover;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.pc-addons-nh-default-popup__stock {
|
|
125
|
+
position: relative;
|
|
126
|
+
padding: 20px;
|
|
127
|
+
display: flex;
|
|
128
|
+
flex-direction: column;
|
|
129
|
+
min-height: 310px;
|
|
130
|
+
border-radius: 8px;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.pc-addons-nh-default-popup__stock-background {
|
|
134
|
+
position: absolute;
|
|
135
|
+
top: 0;
|
|
136
|
+
left: 0;
|
|
137
|
+
width: 100%;
|
|
138
|
+
height: 100%;
|
|
139
|
+
object-fit: cover;
|
|
140
|
+
display: block;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.pc-addons-nh-default-popup__stock-title {
|
|
144
|
+
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
145
|
+
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
146
|
+
color: var(--g-color-text-primary);
|
|
147
|
+
font-weight: 600;
|
|
148
|
+
margin-bottom: auto;
|
|
149
|
+
z-index: 1;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.pc-addons-nh-default-popup__stock-value {
|
|
153
|
+
color: var(--g-color-text-primary);
|
|
154
|
+
font-size: 36px;
|
|
155
|
+
line-height: 48px;
|
|
156
|
+
font-weight: 600;
|
|
157
|
+
margin-bottom: 4px;
|
|
158
|
+
z-index: 1;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.pc-addons-nh-default-popup__stock-date {
|
|
162
|
+
font-size: var(--g-text-body-1-font-size, var(--pc-text-body-1-font-size));
|
|
163
|
+
line-height: var(--g-text-body-1-line-height, var(--pc-text-body-1-line-height));
|
|
164
|
+
color: var(--g-color-text-secondary);
|
|
165
|
+
z-index: 1;
|
|
166
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NHDefaultPopup = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
+
const gravity_ui_page_constructor_1 = require("@doyourjob/gravity-ui-page-constructor");
|
|
7
|
+
const cn_1 = require("../../../../utils/cn");
|
|
8
|
+
const NHPopupItem_1 = require("../NHPopupItem/NHPopupItem");
|
|
9
|
+
const b = (0, cn_1.block)('nh-default-popup');
|
|
10
|
+
const NHStoryCard = ({ title, description, image, url }) => (react_1.default.createElement("a", Object.assign({ href: url, className: b('card') }, (0, gravity_ui_page_constructor_1.getLinkProps)(url)),
|
|
11
|
+
react_1.default.createElement(gravity_ui_page_constructor_1.Image, { className: b('card-image'), src: image }),
|
|
12
|
+
react_1.default.createElement("div", { className: b('card-wrap') },
|
|
13
|
+
react_1.default.createElement("div", { className: b('card-title') }, title),
|
|
14
|
+
react_1.default.createElement("div", { className: b('card-description') }, description))));
|
|
15
|
+
const NHEventCard = ({ title, caption, description, image, url }) => (react_1.default.createElement("a", Object.assign({ href: url, className: b('card') }, (0, gravity_ui_page_constructor_1.getLinkProps)(url)),
|
|
16
|
+
react_1.default.createElement(gravity_ui_page_constructor_1.Image, { className: b('card-image'), src: image }),
|
|
17
|
+
react_1.default.createElement("div", { className: b('card-wrap') },
|
|
18
|
+
react_1.default.createElement("div", { className: b('card-caption') }, caption),
|
|
19
|
+
react_1.default.createElement("div", { className: b('card-title') }, title),
|
|
20
|
+
react_1.default.createElement("div", { className: b('card-description') }, description))));
|
|
21
|
+
const NHDefaultPopup = ({ sections, right, maxWidth }) => {
|
|
22
|
+
const rootStyle = (0, react_1.useMemo)(() => maxWidth
|
|
23
|
+
? {
|
|
24
|
+
marginLeft: 'auto',
|
|
25
|
+
maxWidth,
|
|
26
|
+
}
|
|
27
|
+
: undefined, [maxWidth]);
|
|
28
|
+
const wrapsStyle = (0, react_1.useMemo)(() => sections.map((section) => ({
|
|
29
|
+
gridTemplateColumns: `repeat(${section.columns || 3}, 1fr)`,
|
|
30
|
+
})), [sections]);
|
|
31
|
+
const cards = (0, react_1.useMemo)(() => {
|
|
32
|
+
if (right === null || right === void 0 ? void 0 : right.stories) {
|
|
33
|
+
return right.stories.map((card, index) => react_1.default.createElement(NHStoryCard, Object.assign({ key: index }, card)));
|
|
34
|
+
}
|
|
35
|
+
if (right === null || right === void 0 ? void 0 : right.events) {
|
|
36
|
+
return right.events.map((card, index) => react_1.default.createElement(NHEventCard, Object.assign({ key: index }, card)));
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
}, [right]);
|
|
40
|
+
return (react_1.default.createElement("div", { className: b(), style: rootStyle },
|
|
41
|
+
react_1.default.createElement("div", { className: b('left') }, sections.map((section, index) => (react_1.default.createElement("div", { key: index, className: b('section') },
|
|
42
|
+
section.title || section.subtitle ? (react_1.default.createElement("div", { className: b('head') },
|
|
43
|
+
react_1.default.createElement("div", { className: b('title') }, section.title),
|
|
44
|
+
react_1.default.createElement("div", { className: b('subtitle') }, section.subtitle))) : null,
|
|
45
|
+
react_1.default.createElement("div", { className: b('wrap'), style: wrapsStyle[index] }, section.items.map((item) => (react_1.default.createElement(NHPopupItem_1.NHPopupItem, Object.assign({ key: item.title }, item))))))))),
|
|
46
|
+
right && (react_1.default.createElement("div", { className: b('right') },
|
|
47
|
+
react_1.default.createElement("div", { className: b('title') }, right.title),
|
|
48
|
+
cards && react_1.default.createElement("div", { className: b('cards') }, cards),
|
|
49
|
+
right.stock && (react_1.default.createElement("div", { className: b('stock') },
|
|
50
|
+
right.stock.background ? (react_1.default.createElement("img", { className: b('stock-background'), src: right.stock.background, alt: "Stock background" })) : null,
|
|
51
|
+
react_1.default.createElement("div", { className: b('stock-title') }, right.stock.title),
|
|
52
|
+
react_1.default.createElement("div", { className: b('stock-value') }, right.stock.value),
|
|
53
|
+
react_1.default.createElement("div", { className: b('stock-date') }, right.stock.date)))))));
|
|
54
|
+
};
|
|
55
|
+
exports.NHDefaultPopup = NHDefaultPopup;
|
|
@@ -6,9 +6,9 @@ unpredictable css rules order in build */
|
|
|
6
6
|
box-shadow: 0 4px 24px var(--g-color-base-generic), 0 2px 8px var(--g-color-base-generic);
|
|
7
7
|
max-height: calc(100vh - 64px - 64px);
|
|
8
8
|
overflow: auto;
|
|
9
|
-
max-width: 260px;
|
|
10
9
|
margin-left: auto;
|
|
11
|
-
width:
|
|
10
|
+
width: max-content;
|
|
11
|
+
min-width: 212px;
|
|
12
12
|
scrollbar-width: none;
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -16,36 +16,10 @@ unpredictable css rules order in build */
|
|
|
16
16
|
display: none;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.pc-addons-nh-login-
|
|
20
|
-
|
|
21
|
-
gap: 8px;
|
|
22
|
-
display: flex;
|
|
23
|
-
flex-direction: column;
|
|
19
|
+
.pc-addons-nh-login-popup > div + div {
|
|
20
|
+
border-top: 1px solid var(--g-color-line-generic-solid);
|
|
24
21
|
}
|
|
25
22
|
|
|
26
23
|
.pc-addons-nh-login-popup__item {
|
|
27
|
-
padding:
|
|
28
|
-
display: flex;
|
|
29
|
-
flex-direction: column;
|
|
30
|
-
gap: 4px;
|
|
31
|
-
width: 100%;
|
|
32
|
-
border-radius: 8px;
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.pc-addons-nh-login-popup__item:hover {
|
|
37
|
-
background: var(--g-color-private-black-50);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.pc-addons-nh-login-popup__title {
|
|
41
|
-
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
42
|
-
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
43
|
-
font-weight: 500;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.pc-addons-nh-login-popup__subtitle {
|
|
47
|
-
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
48
|
-
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
49
|
-
font-weight: 500;
|
|
50
|
-
color: #9fb1bd;
|
|
24
|
+
padding: 16px;
|
|
51
25
|
}
|
|
@@ -3,10 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NHLoginPopup = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const gravity_ui_page_constructor_1 = require("@doyourjob/gravity-ui-page-constructor");
|
|
7
6
|
const cn_1 = require("../../../../utils/cn");
|
|
7
|
+
const NHPopupItem_1 = require("../NHPopupItem/NHPopupItem");
|
|
8
8
|
const b = (0, cn_1.block)('nh-login-popup');
|
|
9
|
-
const NHLoginPopup = ({ items }) => (react_1.default.createElement(
|
|
10
|
-
react_1.default.createElement(
|
|
11
|
-
react_1.default.createElement("div", { className: b('subtitle') }, item.subtitle))))));
|
|
9
|
+
const NHLoginPopup = ({ items }) => (react_1.default.createElement("div", { className: b() }, items.map((item, index) => (react_1.default.createElement("div", { key: index, className: b('item') },
|
|
10
|
+
react_1.default.createElement(NHPopupItem_1.NHPopupItem, Object.assign({}, item)))))));
|
|
12
11
|
exports.NHLoginPopup = NHLoginPopup;
|
|
@@ -6,34 +6,18 @@ const react_1 = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const cn_1 = require("../../../../utils/cn");
|
|
7
7
|
const constants_1 = require("../../constants");
|
|
8
8
|
const models_1 = require("../../models");
|
|
9
|
-
const
|
|
10
|
-
const NHInvestorPopup_1 = require("../NHInvestorPopup/NHInvestorPopup");
|
|
11
|
-
const NHMediumPopup_1 = require("../NHMediumPopup/NHMediumPopup");
|
|
9
|
+
const NHDefaultPopup_1 = require("../NHDefaultPopup/NHDefaultPopup");
|
|
12
10
|
const NHNavigationItem_1 = require("../NHNavigationItem/NHNavigationItem");
|
|
13
11
|
const NHNavigationPopup_1 = require("../NHNavigationPopup/NHNavigationPopup");
|
|
14
12
|
const NHProductsPopup_1 = require("../NHProductsPopup/NHProductsPopup");
|
|
15
|
-
const NHResourcesPopup_1 = require("../NHResourcesPopup/NHResourcesPopup");
|
|
16
|
-
const NHSolutionsPopup_1 = require("../NHSolutionsPopup/NHSolutionsPopup");
|
|
17
|
-
const NHWhyPopup_1 = require("../NHWhyPopup/NHWhyPopup");
|
|
18
13
|
const b = (0, cn_1.block)('nh-navigation');
|
|
19
14
|
const tooltipPrefixId = 'navigation-item-key';
|
|
20
15
|
const getPopupContent = (sectionData) => {
|
|
21
|
-
|
|
22
|
-
switch (type) {
|
|
23
|
-
case models_1.NHNavigationItemType.NHMediumPopup:
|
|
24
|
-
return react_1.default.createElement(NHMediumPopup_1.NHMediumPopup, Object.assign({}, data));
|
|
16
|
+
switch (sectionData.type) {
|
|
25
17
|
case models_1.NHNavigationItemType.NHProductsPopup:
|
|
26
|
-
return react_1.default.createElement(NHProductsPopup_1.NHProductsPopup, Object.assign({}, data));
|
|
27
|
-
case models_1.NHNavigationItemType.
|
|
28
|
-
return react_1.default.createElement(
|
|
29
|
-
case models_1.NHNavigationItemType.NHWhyPopup:
|
|
30
|
-
return react_1.default.createElement(NHWhyPopup_1.NHWhyPopup, Object.assign({}, data));
|
|
31
|
-
case models_1.NHNavigationItemType.NHResourcesPopup:
|
|
32
|
-
return react_1.default.createElement(NHResourcesPopup_1.NHResourcesPopup, Object.assign({}, data));
|
|
33
|
-
case models_1.NHNavigationItemType.NHCompanyPopup:
|
|
34
|
-
return react_1.default.createElement(NHCompanyPopup_1.NHCompanyPopup, Object.assign({}, data));
|
|
35
|
-
case models_1.NHNavigationItemType.NHInvestorPopup:
|
|
36
|
-
return react_1.default.createElement(NHInvestorPopup_1.NHInvestorPopup, Object.assign({}, data));
|
|
18
|
+
return react_1.default.createElement(NHProductsPopup_1.NHProductsPopup, Object.assign({}, sectionData.data));
|
|
19
|
+
case models_1.NHNavigationItemType.NHDefaultPopup:
|
|
20
|
+
return react_1.default.createElement(NHDefaultPopup_1.NHDefaultPopup, Object.assign({}, sectionData.data));
|
|
37
21
|
default:
|
|
38
22
|
return null;
|
|
39
23
|
}
|
|
@@ -26,6 +26,10 @@ unpredictable css rules order in build */
|
|
|
26
26
|
border: none;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
.pc-addons-nh-navigation-popup-item_column .pc-addons-nh-navigation-popup-item__container {
|
|
30
|
+
align-self: initial;
|
|
31
|
+
}
|
|
32
|
+
|
|
29
33
|
.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
34
|
color: var(--g-color-text-primary);
|
|
31
35
|
}
|
|
@@ -35,14 +39,20 @@ unpredictable css rules order in build */
|
|
|
35
39
|
}
|
|
36
40
|
|
|
37
41
|
.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
|
-
|
|
42
|
+
pointer-events: initial;
|
|
43
|
+
opacity: 1;
|
|
39
44
|
}
|
|
40
45
|
|
|
41
46
|
.pc-addons-nh-navigation-popup-item_disable {
|
|
42
47
|
pointer-events: none;
|
|
43
48
|
}
|
|
44
49
|
|
|
50
|
+
.pc-addons-nh-navigation-popup-item__container {
|
|
51
|
+
align-self: center;
|
|
52
|
+
}
|
|
53
|
+
|
|
45
54
|
.pc-addons-nh-navigation-popup-item__title {
|
|
55
|
+
position: relative;
|
|
46
56
|
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
47
57
|
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
48
58
|
font-weight: 600;
|
|
@@ -50,13 +60,18 @@ unpredictable css rules order in build */
|
|
|
50
60
|
}
|
|
51
61
|
|
|
52
62
|
.pc-addons-nh-navigation-popup-item__title > svg {
|
|
53
|
-
display:
|
|
54
|
-
|
|
63
|
+
display: inline-block;
|
|
64
|
+
position: absolute;
|
|
65
|
+
margin-top: 3px;
|
|
66
|
+
transition: opacity 0.2s;
|
|
67
|
+
opacity: 0;
|
|
68
|
+
pointer-events: none;
|
|
55
69
|
}
|
|
56
70
|
|
|
57
71
|
.pc-addons-nh-navigation-popup-item__description {
|
|
58
72
|
font-size: var(--g-text-body-1-font-size, var(--pc-text-body-1-font-size));
|
|
59
73
|
line-height: var(--g-text-body-1-line-height, var(--pc-text-body-1-line-height));
|
|
74
|
+
transition: color 0.2s;
|
|
60
75
|
display: block;
|
|
61
76
|
margin-top: 1px;
|
|
62
77
|
color: var(--g-color-text-secondary);
|
|
@@ -77,6 +92,7 @@ unpredictable css rules order in build */
|
|
|
77
92
|
padding: 8px;
|
|
78
93
|
border-radius: 8px;
|
|
79
94
|
background: var(--nh-popup-item-color);
|
|
95
|
+
transition: background 0.2s;
|
|
80
96
|
}
|
|
81
97
|
|
|
82
98
|
.pc-addons-nh-navigation-popup-item__image-container_no-bg {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { NHPopupItemData } from '../../models';
|
|
3
3
|
export interface NHPopupItemProps extends Partial<NHPopupItemData> {
|
|
4
|
-
hover?: boolean;
|
|
5
4
|
column?: boolean;
|
|
6
|
-
target?: string;
|
|
7
5
|
}
|
|
8
6
|
export declare const NHPopupItem: (props: NHPopupItemProps) => React.JSX.Element;
|
|
@@ -15,7 +15,7 @@ unpredictable css rules order in build */
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.pc-addons-nh-products-popup > div + div {
|
|
18
|
-
border-top: 1px solid
|
|
18
|
+
border-top: 1px solid var(--g-color-line-generic-solid);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.pc-addons-nh-products-popup__section {
|
|
@@ -80,7 +80,6 @@ unpredictable css rules order in build */
|
|
|
80
80
|
color: inherit;
|
|
81
81
|
text-decoration: none;
|
|
82
82
|
grid-area: 1/3/3/4;
|
|
83
|
-
font-weight: 500;
|
|
84
83
|
border-radius: 16px;
|
|
85
84
|
padding: 16px;
|
|
86
85
|
display: flex;
|
|
@@ -20,18 +20,18 @@ const NHProductsPopup = ({ sections, primaryColor, primaryColorHover, }) => (rea
|
|
|
20
20
|
let content;
|
|
21
21
|
if ('mode' in section && section.mode === 'run') {
|
|
22
22
|
content = (react_1.default.createElement("div", { className: b('wrap-scale') },
|
|
23
|
-
((_a = section.items) === null || _a === void 0 ? void 0 : _a[0]) && react_1.default.createElement(NHPopupItem_1.NHPopupItem, Object.assign({}, section.items[0], {
|
|
24
|
-
react_1.default.createElement("div", { className: b('wrap') }, (_b = section.items) === null || _b === void 0 ? void 0 : _b.slice(1, 4).map((item, cardIndex) => (react_1.default.createElement(NHPopupItem_1.NHPopupItem, Object.assign({ key: `${item.title}-${cardIndex + 1}` }, item, {
|
|
25
|
-
react_1.default.createElement("div", { className: b('wrap') }, (_c = section.items) === null || _c === void 0 ? void 0 : _c.slice(4).map((item, cardIndex) => (react_1.default.createElement(NHPopupItem_1.NHPopupItem, Object.assign({ key: `${item.title}-${cardIndex + 4}` }, item, {
|
|
23
|
+
((_a = section.items) === null || _a === void 0 ? void 0 : _a[0]) && react_1.default.createElement(NHPopupItem_1.NHPopupItem, Object.assign({}, section.items[0], { column: true })),
|
|
24
|
+
react_1.default.createElement("div", { className: b('wrap') }, (_b = section.items) === null || _b === void 0 ? void 0 : _b.slice(1, 4).map((item, cardIndex) => (react_1.default.createElement(NHPopupItem_1.NHPopupItem, Object.assign({ key: `${item.title}-${cardIndex + 1}` }, item, { column: true }))))),
|
|
25
|
+
react_1.default.createElement("div", { className: b('wrap') }, (_c = section.items) === null || _c === void 0 ? void 0 : _c.slice(4).map((item, cardIndex) => (react_1.default.createElement(NHPopupItem_1.NHPopupItem, Object.assign({ key: `${item.title}-${cardIndex + 4}` }, item, { column: true })))))));
|
|
26
26
|
}
|
|
27
27
|
else if ('mode' in section && section.mode === 'scale') {
|
|
28
28
|
content = (react_1.default.createElement("div", { className: b('wrap') }, (_d = section.items) === null || _d === void 0 ? void 0 :
|
|
29
|
-
_d.map((item, itemIndex) => (react_1.default.createElement(NHPopupItem_1.NHPopupItem, Object.assign({ key: `${item.title}-${itemIndex}`, imageColor: primaryColor, imageColorHover: primaryColorHover }, item
|
|
29
|
+
_d.map((item, itemIndex) => (react_1.default.createElement(NHPopupItem_1.NHPopupItem, Object.assign({ key: `${item.title}-${itemIndex}`, imageColor: primaryColor, imageColorHover: primaryColorHover }, item)))),
|
|
30
30
|
section.banner && react_1.default.createElement(NHBanner, Object.assign({}, section.banner))));
|
|
31
31
|
}
|
|
32
32
|
else {
|
|
33
33
|
content = (react_1.default.createElement("div", { className: b('wrap') }, (_e = section.items) === null || _e === void 0 ? void 0 :
|
|
34
|
-
_e.map((item, itemIndex) => (react_1.default.createElement(NHPopupItem_1.NHPopupItem, Object.assign({ key: `${item.title}-${itemIndex}`, imageColor: primaryColor, imageColorHover: primaryColorHover }, item
|
|
34
|
+
_e.map((item, itemIndex) => (react_1.default.createElement(NHPopupItem_1.NHPopupItem, Object.assign({ key: `${item.title}-${itemIndex}`, imageColor: primaryColor, imageColorHover: primaryColorHover }, item)))),
|
|
35
35
|
' '));
|
|
36
36
|
}
|
|
37
37
|
return (react_1.default.createElement("div", { className: b('section'), key: section.title },
|
|
@@ -1,30 +1,14 @@
|
|
|
1
1
|
import type { ButtonProps, LinkProps } from '@doyourjob/gravity-ui-page-constructor';
|
|
2
2
|
export declare enum NHNavigationItemType {
|
|
3
|
-
NHMediumPopup = "medium-popup",
|
|
4
3
|
NHProductsPopup = "products-popup",
|
|
5
|
-
|
|
6
|
-
NHWhyPopup = "why-popup",
|
|
7
|
-
NHResourcesPopup = "resources-popup",
|
|
8
|
-
NHCompanyPopup = "company-popup",
|
|
9
|
-
NHInvestorPopup = "investor-popup",
|
|
4
|
+
NHDefaultPopup = "default-popup",
|
|
10
5
|
Link = "link"
|
|
11
6
|
}
|
|
12
|
-
export declare enum NHNavigationTagColor {
|
|
13
|
-
Green = "green",
|
|
14
|
-
Yellow = "yellow",
|
|
15
|
-
Blue = "blue"
|
|
16
|
-
}
|
|
17
7
|
export interface NHLogoData {
|
|
18
8
|
href?: string;
|
|
19
9
|
src?: string;
|
|
20
10
|
alt?: string;
|
|
21
11
|
}
|
|
22
|
-
export interface NHNavigationTag {
|
|
23
|
-
text: string;
|
|
24
|
-
color?: string;
|
|
25
|
-
textColor?: string;
|
|
26
|
-
size?: 's' | 'm';
|
|
27
|
-
}
|
|
28
12
|
export interface NHPopupItemData {
|
|
29
13
|
title: string;
|
|
30
14
|
url: string;
|
|
@@ -33,21 +17,7 @@ export interface NHPopupItemData {
|
|
|
33
17
|
image?: string | null;
|
|
34
18
|
imageColor?: string;
|
|
35
19
|
imageColorHover?: string;
|
|
36
|
-
|
|
37
|
-
export interface NHCategoryGroupData {
|
|
38
|
-
title?: string;
|
|
39
|
-
items: NHPopupItemData[];
|
|
40
|
-
imageSize?: 's' | 'xm' | 'm';
|
|
41
|
-
url?: string;
|
|
42
|
-
}
|
|
43
|
-
export interface NHMediumPopupData {
|
|
44
|
-
groups: NHCategoryGroupData[];
|
|
45
|
-
}
|
|
46
|
-
export interface NHBannerData {
|
|
47
|
-
title: string;
|
|
48
|
-
description: string;
|
|
49
|
-
image: string;
|
|
50
|
-
url: string;
|
|
20
|
+
target?: string;
|
|
51
21
|
}
|
|
52
22
|
export interface NHProductBannerData {
|
|
53
23
|
title: string;
|
|
@@ -70,74 +40,46 @@ export interface NHProductsPopupSectionScale extends NHProductsPopupSectionBase
|
|
|
70
40
|
mode: 'scale';
|
|
71
41
|
banner?: NHProductBannerData;
|
|
72
42
|
}
|
|
43
|
+
export type NHProductsPopupSection = NHProductsPopupSectionRun | NHProductsPopupSectionScale | NHProductsPopupSectionBase;
|
|
73
44
|
export interface NHProductsPopupData {
|
|
74
45
|
primaryColor?: string;
|
|
75
46
|
primaryColorHover?: string;
|
|
76
|
-
sections:
|
|
47
|
+
sections: NHProductsPopupSection[];
|
|
77
48
|
}
|
|
78
|
-
export interface
|
|
49
|
+
export interface NHDefaultPopupSection {
|
|
79
50
|
title: string;
|
|
80
51
|
subtitle: string;
|
|
81
52
|
items: NHPopupItemData[];
|
|
53
|
+
columns?: number;
|
|
82
54
|
}
|
|
83
|
-
export interface
|
|
84
|
-
sections: NHSolutionsPopupSection[];
|
|
85
|
-
}
|
|
86
|
-
export interface NHWhyPopupGroup {
|
|
87
|
-
title: string;
|
|
88
|
-
items: NHPopupItemData[];
|
|
89
|
-
}
|
|
90
|
-
export interface NHWhyPopupData {
|
|
91
|
-
groups: NHWhyPopupGroup[];
|
|
92
|
-
card: NHBannerData;
|
|
93
|
-
}
|
|
94
|
-
export interface NHBannerData {
|
|
55
|
+
export interface NHStoryCardData {
|
|
95
56
|
title: string;
|
|
96
57
|
description: string;
|
|
97
58
|
image: string;
|
|
98
|
-
icon: string;
|
|
99
59
|
url: string;
|
|
100
60
|
}
|
|
101
61
|
export interface NHEventCardData {
|
|
102
|
-
url: string;
|
|
103
|
-
tag: string;
|
|
104
62
|
title: string;
|
|
105
|
-
|
|
63
|
+
caption: string;
|
|
64
|
+
description: string;
|
|
106
65
|
image: string;
|
|
107
|
-
location: string;
|
|
108
|
-
}
|
|
109
|
-
export interface NHResourcesPopupGroup {
|
|
110
|
-
title: string;
|
|
111
|
-
subtitle: string;
|
|
112
66
|
url: string;
|
|
113
|
-
items: NHPopupItemData[];
|
|
114
|
-
}
|
|
115
|
-
export interface NHResourcesPopupData {
|
|
116
|
-
groups: NHResourcesPopupGroup[];
|
|
117
|
-
banner: NHBannerData;
|
|
118
|
-
events: {
|
|
119
|
-
title: string;
|
|
120
|
-
items: NHEventCardData[];
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
export interface NHCompanyPopupSection {
|
|
124
|
-
title: string;
|
|
125
|
-
items: NHPopupItemData[];
|
|
126
|
-
}
|
|
127
|
-
export interface NHCompanyPopupData {
|
|
128
|
-
sections: NHCompanyPopupSection[];
|
|
129
67
|
}
|
|
130
68
|
export interface NHStockData {
|
|
131
69
|
title: string;
|
|
132
|
-
|
|
70
|
+
value: string;
|
|
133
71
|
date: string;
|
|
72
|
+
background?: string;
|
|
134
73
|
}
|
|
135
|
-
export interface
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
74
|
+
export interface NHDefaultPopupData {
|
|
75
|
+
sections: NHDefaultPopupSection[];
|
|
76
|
+
maxWidth?: number;
|
|
77
|
+
right?: {
|
|
78
|
+
title: string;
|
|
79
|
+
stories?: NHStoryCardData[];
|
|
80
|
+
events?: NHEventCardData[];
|
|
81
|
+
stock?: NHStockData;
|
|
82
|
+
};
|
|
141
83
|
}
|
|
142
84
|
export interface NHLoginItemData {
|
|
143
85
|
title: string;
|
|
@@ -146,7 +88,7 @@ export interface NHLoginItemData {
|
|
|
146
88
|
}
|
|
147
89
|
export interface NHLoginPopupData {
|
|
148
90
|
text: string;
|
|
149
|
-
items:
|
|
91
|
+
items: NHPopupItemData[];
|
|
150
92
|
}
|
|
151
93
|
export interface NHNavigationDefaultData {
|
|
152
94
|
title: string;
|
|
@@ -155,35 +97,15 @@ export interface NHNavigationLinkData extends NHNavigationDefaultData {
|
|
|
155
97
|
type: NHNavigationItemType.Link;
|
|
156
98
|
data: LinkProps;
|
|
157
99
|
}
|
|
158
|
-
export interface NHNavigationMediumPopupData extends NHNavigationDefaultData {
|
|
159
|
-
type: NHNavigationItemType.NHMediumPopup;
|
|
160
|
-
data: NHMediumPopupData;
|
|
161
|
-
}
|
|
162
100
|
export interface NHNavigationProductsPopupData extends NHNavigationDefaultData {
|
|
163
101
|
type: NHNavigationItemType.NHProductsPopup;
|
|
164
102
|
data: NHProductsPopupData;
|
|
165
103
|
}
|
|
166
|
-
export interface
|
|
167
|
-
type: NHNavigationItemType.
|
|
168
|
-
data:
|
|
169
|
-
}
|
|
170
|
-
export interface NHNavigationWhyPopupData extends NHNavigationDefaultData {
|
|
171
|
-
type: NHNavigationItemType.NHWhyPopup;
|
|
172
|
-
data: NHWhyPopupData;
|
|
173
|
-
}
|
|
174
|
-
export interface NHNavigationResourcesPopupData extends NHNavigationDefaultData {
|
|
175
|
-
type: NHNavigationItemType.NHResourcesPopup;
|
|
176
|
-
data: NHResourcesPopupData;
|
|
177
|
-
}
|
|
178
|
-
export interface NHNavigationCompanyPopupData extends NHNavigationDefaultData {
|
|
179
|
-
type: NHNavigationItemType.NHCompanyPopup;
|
|
180
|
-
data: NHCompanyPopupData;
|
|
181
|
-
}
|
|
182
|
-
export interface NHNavigationInvestorPopupData extends NHNavigationDefaultData {
|
|
183
|
-
type: NHNavigationItemType.NHInvestorPopup;
|
|
184
|
-
data: NHInvestorPopupData;
|
|
104
|
+
export interface NHNavigationDefaultPopupData extends NHNavigationDefaultData {
|
|
105
|
+
type: NHNavigationItemType.NHDefaultPopup;
|
|
106
|
+
data: NHDefaultPopupData;
|
|
185
107
|
}
|
|
186
|
-
export type NHNavigationItemData = NHNavigationLinkData |
|
|
108
|
+
export type NHNavigationItemData = NHNavigationLinkData | NHNavigationProductsPopupData | NHNavigationDefaultPopupData;
|
|
187
109
|
export interface NHMobileNavigationDefaultData {
|
|
188
110
|
title: string;
|
|
189
111
|
}
|
|
@@ -201,11 +123,11 @@ export interface NHMobileNavigationGroupData extends NHMobileNavigationDefaultDa
|
|
|
201
123
|
}
|
|
202
124
|
export type NHMobileNavigationItemData = NHMobileNavigationLinkData | NHMobileNavigationGroupData;
|
|
203
125
|
export interface NHNavigationData {
|
|
204
|
-
left
|
|
205
|
-
right
|
|
206
|
-
mobile
|
|
207
|
-
login
|
|
208
|
-
logo
|
|
209
|
-
buttons
|
|
126
|
+
left?: NHNavigationItemData[];
|
|
127
|
+
right?: NHNavigationItemData[];
|
|
128
|
+
mobile?: NHMobileNavigationItemData[];
|
|
129
|
+
login?: NHLoginPopupData;
|
|
130
|
+
logo?: NHLogoData;
|
|
131
|
+
buttons?: ButtonProps[];
|
|
210
132
|
}
|
|
211
133
|
export type SetupRouteChangeHandler = (handler: () => void) => void;
|