@doyourjob/gravity-ui-page-constructor-addons 2.1.30 → 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/NHLoginButton/NHLoginButton.css +1 -1
- 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/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 +50 -55
- package/build/cjs/components/NewHeader/components/NHPopupItem/NHPopupItem.d.ts +1 -7
- package/build/cjs/components/NewHeader/components/NHPopupItem/NHPopupItem.js +12 -17
- package/build/cjs/components/NewHeader/components/NHProductsPopup/NHProductsPopup.css +55 -61
- 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/models.d.ts +45 -114
- 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/NHLoginButton/NHLoginButton.css +1 -1
- 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/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 +50 -55
- package/build/esm/components/NewHeader/components/NHPopupItem/NHPopupItem.d.ts +1 -7
- package/build/esm/components/NewHeader/components/NHPopupItem/NHPopupItem.js +13 -18
- package/build/esm/components/NewHeader/components/NHProductsPopup/NHProductsPopup.css +55 -61
- 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/models.d.ts +45 -114
- 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 -20
- 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 -17
- 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 -20
- 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 -16
- 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 -13
- 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 -16
- 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;
|
|
@@ -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;
|
|
@@ -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
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ArrowRight = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const ArrowRight = (props) => (react_1.default.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),
|
|
7
|
+
react_1.default.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" })));
|
|
8
|
+
exports.ArrowRight = ArrowRight;
|
|
@@ -1,75 +1,79 @@
|
|
|
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
|
-
|
|
13
|
+
.pc-addons-nh-navigation-popup-item_column {
|
|
14
|
+
flex-direction: column;
|
|
20
15
|
}
|
|
21
16
|
|
|
22
|
-
.pc-addons-nh-navigation-popup-
|
|
23
|
-
|
|
24
|
-
|
|
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;
|
|
25
21
|
}
|
|
26
22
|
|
|
27
|
-
.pc-addons-nh-navigation-popup-
|
|
28
|
-
|
|
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;
|
|
29
27
|
}
|
|
30
28
|
|
|
31
|
-
.pc-addons-nh-navigation-popup-
|
|
32
|
-
|
|
29
|
+
.pc-addons-nh-navigation-popup-item_column .pc-addons-nh-navigation-popup-item__container {
|
|
30
|
+
align-self: initial;
|
|
33
31
|
}
|
|
34
32
|
|
|
35
|
-
.pc-addons-nh-navigation-popup-
|
|
36
|
-
|
|
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 {
|
|
34
|
+
color: var(--g-color-text-primary);
|
|
37
35
|
}
|
|
38
36
|
|
|
39
|
-
.pc-addons-nh-navigation-popup-
|
|
40
|
-
|
|
37
|
+
.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 {
|
|
38
|
+
background: var(--nh-popup-item-color-hover);
|
|
41
39
|
}
|
|
42
40
|
|
|
43
|
-
.pc-addons-nh-navigation-popup-
|
|
44
|
-
|
|
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 {
|
|
42
|
+
pointer-events: initial;
|
|
43
|
+
opacity: 1;
|
|
45
44
|
}
|
|
46
45
|
|
|
47
|
-
.pc-addons-nh-navigation-popup-
|
|
46
|
+
.pc-addons-nh-navigation-popup-item_disable {
|
|
48
47
|
pointer-events: none;
|
|
49
48
|
}
|
|
50
49
|
|
|
51
|
-
.pc-addons-nh-navigation-popup-
|
|
52
|
-
|
|
50
|
+
.pc-addons-nh-navigation-popup-item__container {
|
|
51
|
+
align-self: center;
|
|
53
52
|
}
|
|
54
53
|
|
|
55
|
-
.pc-addons-nh-navigation-popup-
|
|
56
|
-
position:
|
|
57
|
-
|
|
58
|
-
height:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
align-items: center;
|
|
54
|
+
.pc-addons-nh-navigation-popup-item__title {
|
|
55
|
+
position: relative;
|
|
56
|
+
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
57
|
+
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
58
|
+
font-weight: 600;
|
|
59
|
+
color: var(--g-color-text-primary);
|
|
62
60
|
}
|
|
63
61
|
|
|
64
|
-
.pc-addons-nh-navigation-popup-
|
|
65
|
-
|
|
62
|
+
.pc-addons-nh-navigation-popup-item__title > svg {
|
|
63
|
+
display: inline-block;
|
|
64
|
+
position: absolute;
|
|
65
|
+
margin-top: 3px;
|
|
66
|
+
transition: opacity 0.2s;
|
|
67
|
+
opacity: 0;
|
|
68
|
+
pointer-events: none;
|
|
66
69
|
}
|
|
67
70
|
|
|
68
71
|
.pc-addons-nh-navigation-popup-item__description {
|
|
69
72
|
font-size: var(--g-text-body-1-font-size, var(--pc-text-body-1-font-size));
|
|
70
73
|
line-height: var(--g-text-body-1-line-height, var(--pc-text-body-1-line-height));
|
|
74
|
+
transition: color 0.2s;
|
|
71
75
|
display: block;
|
|
72
|
-
margin-top:
|
|
76
|
+
margin-top: 1px;
|
|
73
77
|
color: var(--g-color-text-secondary);
|
|
74
78
|
}
|
|
75
79
|
|
|
@@ -80,28 +84,19 @@ unpredictable css rules order in build */
|
|
|
80
84
|
|
|
81
85
|
.pc-addons-nh-navigation-popup-item__image {
|
|
82
86
|
display: block;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.pc-addons-nh-navigation-popup-item__image_size_m {
|
|
88
|
-
width: 18px;
|
|
89
|
-
height: 18px;
|
|
87
|
+
width: 24px;
|
|
88
|
+
height: 24px;
|
|
90
89
|
}
|
|
91
90
|
|
|
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;
|
|
91
|
+
.pc-addons-nh-navigation-popup-item__image-container {
|
|
92
|
+
padding: 8px;
|
|
93
|
+
border-radius: 8px;
|
|
94
|
+
background: var(--nh-popup-item-color);
|
|
95
|
+
transition: background 0.2s;
|
|
100
96
|
}
|
|
101
97
|
|
|
102
|
-
.pc-addons-nh-navigation-popup-item__image-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
margin-right: 8px;
|
|
98
|
+
.pc-addons-nh-navigation-popup-item__image-container_no-bg {
|
|
99
|
+
border: 1px solid var(--g-color-line-generic-solid);
|
|
100
|
+
padding: 7px;
|
|
101
|
+
background: transparent;
|
|
107
102
|
}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { GridColumnSizesType } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
2
|
import { NHPopupItemData } from '../../models';
|
|
4
3
|
export interface NHPopupItemProps extends Partial<NHPopupItemData> {
|
|
5
|
-
|
|
6
|
-
sizes?: GridColumnSizesType;
|
|
7
|
-
className?: string;
|
|
8
|
-
padding?: 'default' | 's';
|
|
9
|
-
imageSize?: 's' | 'xm' | 'm';
|
|
10
|
-
target?: string;
|
|
4
|
+
column?: boolean;
|
|
11
5
|
}
|
|
12
6
|
export declare const NHPopupItem: (props: NHPopupItemProps) => React.JSX.Element;
|
|
@@ -2,27 +2,22 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NHPopupItem = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.
|
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const gravity_ui_page_constructor_1 = require("@doyourjob/gravity-ui-page-constructor");
|
|
7
7
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
8
8
|
const cn_1 = require("../../../../utils/cn");
|
|
9
|
-
const
|
|
10
|
-
const NHTag_1 = require("../NHTag/NHTag");
|
|
9
|
+
const ArrowRight_1 = require("./ArrowRight");
|
|
11
10
|
const b = (0, cn_1.block)('nh-navigation-popup-item');
|
|
12
11
|
const NHPopupItem = (props) => {
|
|
13
|
-
const {
|
|
14
|
-
const
|
|
15
|
-
return (react_1.default.createElement(
|
|
16
|
-
react_1.default.createElement("
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
react_1.default.createElement("span", { className: b('title') }, title),
|
|
24
|
-
"\u00A0",
|
|
25
|
-
navigationTag),
|
|
26
|
-
description && react_1.default.createElement(gravity_ui_page_constructor_1.HTML, { className: b('description') }, description)))));
|
|
12
|
+
const { url, target, title, description, image, imageColor, imageColorHover, column } = props;
|
|
13
|
+
const styleImageContainer = (0, react_1.useMemo)(() => (Object.assign(Object.assign({}, (imageColor ? { '--nh-popup-item-color': imageColor } : {})), (imageColorHover ? { '--nh-popup-item-color-hover': imageColorHover } : {}))), [imageColor, imageColorHover]);
|
|
14
|
+
return (react_1.default.createElement("a", Object.assign({ className: b({ disable: !url, column }), href: url }, (0, gravity_ui_page_constructor_1.getLinkProps)(url || '', undefined, target)),
|
|
15
|
+
image && (react_1.default.createElement("div", { className: b('image-container', { 'no-bg': !imageColor }), style: styleImageContainer },
|
|
16
|
+
react_1.default.createElement(gravity_ui_page_constructor_1.Image, { className: b('image'), src: image }))),
|
|
17
|
+
react_1.default.createElement("div", { className: b('container') },
|
|
18
|
+
react_1.default.createElement("div", { className: b('title') },
|
|
19
|
+
title,
|
|
20
|
+
react_1.default.createElement(uikit_1.Icon, { data: ArrowRight_1.ArrowRight, size: 16 })),
|
|
21
|
+
description && react_1.default.createElement(gravity_ui_page_constructor_1.HTML, { className: b('description') }, description))));
|
|
27
22
|
};
|
|
28
23
|
exports.NHPopupItem = NHPopupItem;
|