@doyourjob/gravity-ui-page-constructor-addons 2.1.40 → 2.1.42
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/NewHeader.css +13 -6
- package/build/cjs/components/NewHeader/NewHeader.js +1 -1
- package/build/cjs/components/NewHeader/components/NHDefaultPopup/NHDefaultPopup.css +1 -28
- package/build/cjs/components/NewHeader/components/NHDefaultPopup/NHDefaultPopup.js +3 -6
- package/build/cjs/components/NewHeader/components/NHLoginButton/NHLoginButton.css +2 -2
- package/build/cjs/components/NewHeader/components/NHMobileNavigationPopup/NHMobileNavigationPopup.css +1 -1
- package/build/cjs/components/NewHeader/models.d.ts +6 -2
- package/build/esm/components/NewHeader/NewHeader.css +13 -6
- package/build/esm/components/NewHeader/NewHeader.js +2 -2
- package/build/esm/components/NewHeader/components/NHDefaultPopup/NHDefaultPopup.css +1 -28
- package/build/esm/components/NewHeader/components/NHDefaultPopup/NHDefaultPopup.js +3 -6
- package/build/esm/components/NewHeader/components/NHLoginButton/NHLoginButton.css +2 -2
- package/build/esm/components/NewHeader/components/NHMobileNavigationPopup/NHMobileNavigationPopup.css +1 -1
- package/build/esm/components/NewHeader/models.d.ts +6 -2
- package/package.json +1 -1
|
@@ -62,11 +62,6 @@ unpredictable css rules order in build */
|
|
|
62
62
|
justify-content: flex-end;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
.pc-addons-new-header__buttons {
|
|
66
|
-
display: flex;
|
|
67
|
-
margin-left: 8px;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
65
|
.pc-addons-new-header__icon {
|
|
71
66
|
color: var(--g-color-text-hint);
|
|
72
67
|
transition: color 0.2s;
|
|
@@ -149,6 +144,8 @@ unpredictable css rules order in build */
|
|
|
149
144
|
.pc-addons-new-header__buttons {
|
|
150
145
|
display: flex;
|
|
151
146
|
gap: 8px;
|
|
147
|
+
--g-button-border-radius: 8px;
|
|
148
|
+
--g-button-background-color-hover: ;
|
|
152
149
|
}
|
|
153
150
|
|
|
154
151
|
@media (max-width: 577px) {
|
|
@@ -157,12 +154,22 @@ unpredictable css rules order in build */
|
|
|
157
154
|
}
|
|
158
155
|
}
|
|
159
156
|
.pc-addons-new-header__button {
|
|
157
|
+
color: inherit;
|
|
158
|
+
text-decoration: none;
|
|
160
159
|
display: flex;
|
|
161
160
|
align-items: center;
|
|
162
|
-
|
|
161
|
+
height: 36px;
|
|
162
|
+
padding: 0 16px;
|
|
163
163
|
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
164
164
|
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
165
165
|
font-weight: 500;
|
|
166
|
+
border-radius: 8px;
|
|
167
|
+
border: 1px solid rgba(5, 43, 66, 0.1);
|
|
168
|
+
transition: border-color 0.2s;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.pc-addons-new-header__button:hover {
|
|
172
|
+
border-color: rgba(5, 43, 66, 0.25);
|
|
166
173
|
}
|
|
167
174
|
|
|
168
175
|
@media (max-width: 1081px) {
|
|
@@ -66,7 +66,7 @@ const NewHeader = ({ data, setupRouteChangeHandler, renderSearch, className, scr
|
|
|
66
66
|
renderSearch && (react_1.default.createElement("div", { className: b('icons-container') }, renderSearch({ onActiveToggle: toggleSearch }))),
|
|
67
67
|
react_1.default.createElement("div", { className: b('buttons') },
|
|
68
68
|
showButtonsContainer &&
|
|
69
|
-
(buttons === null || buttons === void 0 ? void 0 : buttons.map((button, index) => (react_1.default.createElement(
|
|
69
|
+
(buttons === null || buttons === void 0 ? void 0 : buttons.map((button, index) => (react_1.default.createElement("a", Object.assign({ key: index, href: button.url, className: b('button') }, (0, gravity_ui_page_constructor_1.getLinkProps)(button.url || '', undefined, button.target)), button.text)))),
|
|
70
70
|
login && react_1.default.createElement(NHLoginButton_1.NHLoginButton, { data: login, headerRef: headerRef })),
|
|
71
71
|
react_1.default.createElement(NHMobileNavigation_1.NHMobileNavigation, { toogleOpen: toggleMobileNavigationPopup, isOpened: isMobileNavigationOpen, isSearchOpen: isSearchMode, data: data, onMenuScroll: onMenuScroll, popupClassName: b('user-popup') })))))));
|
|
72
72
|
};
|
|
@@ -69,34 +69,7 @@ unpredictable css rules order in build */
|
|
|
69
69
|
display: grid;
|
|
70
70
|
gap: 24px 40px;
|
|
71
71
|
align-items: flex-start;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
.pc-addons-nh-default-popup__wrap_mode_run {
|
|
75
|
-
grid-template-columns: repeat(12, 1fr);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.pc-addons-nh-default-popup__wrap_mode_run > a {
|
|
79
|
-
grid-column: span 4;
|
|
80
|
-
grid-row: 1;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.pc-addons-nh-default-popup__wrap_mode_run > .pc-addons-nh-default-popup__inner-wrap:empty {
|
|
84
|
-
display: none;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.pc-addons-nh-default-popup__wrap_mode_run > a + .pc-addons-nh-default-popup__inner-wrap {
|
|
88
|
-
grid-column: span 8;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.pc-addons-nh-default-popup__wrap_mode_run > .pc-addons-nh-default-popup__inner-wrap:last-child {
|
|
92
|
-
grid-column: span 12;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.pc-addons-nh-default-popup__inner-wrap {
|
|
96
|
-
display: grid;
|
|
97
|
-
gap: 24px 40px;
|
|
98
|
-
align-items: flex-start;
|
|
99
|
-
grid-template-columns: 1fr 1fr 1fr;
|
|
72
|
+
flex: 1;
|
|
100
73
|
}
|
|
101
74
|
|
|
102
75
|
.pc-addons-nh-default-popup__right {
|
|
@@ -18,7 +18,7 @@ const NHDefaultPopup = ({ sections, right, maxWidth, primaryColor, primaryColorH
|
|
|
18
18
|
}
|
|
19
19
|
: undefined, [maxWidth]);
|
|
20
20
|
const wrapsStyle = (0, react_1.useMemo)(() => sections.map((section) => ({
|
|
21
|
-
gridTemplateColumns:
|
|
21
|
+
gridTemplateColumns: `repeat(${section.columns || 3}, 1fr)`,
|
|
22
22
|
})), [sections]);
|
|
23
23
|
const cards = (0, react_1.useMemo)(() => {
|
|
24
24
|
if (right === null || right === void 0 ? void 0 : right.stories) {
|
|
@@ -30,12 +30,9 @@ const NHDefaultPopup = ({ sections, right, maxWidth, primaryColor, primaryColorH
|
|
|
30
30
|
return null;
|
|
31
31
|
}, [right]);
|
|
32
32
|
const renderSectionContent = (section, index) => {
|
|
33
|
-
var _a
|
|
33
|
+
var _a;
|
|
34
34
|
if (section.mode === 'run') {
|
|
35
|
-
return (react_1.default.createElement("div", { className: b('wrap', {
|
|
36
|
-
((_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 })),
|
|
37
|
-
react_1.default.createElement("div", { className: b('inner-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: cardIndex }, item, { column: true }))))),
|
|
38
|
-
react_1.default.createElement("div", { className: b('inner-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: cardIndex }, item, { column: true })))))));
|
|
35
|
+
return (react_1.default.createElement("div", { className: b('wrap'), style: wrapsStyle[index] }, (_a = section.items) === null || _a === void 0 ? void 0 : _a.map((item, cardIndex) => (react_1.default.createElement(NHPopupItem_1.NHPopupItem, Object.assign({ key: cardIndex }, item, { column: true }))))));
|
|
39
36
|
}
|
|
40
37
|
return (react_1.default.createElement("div", { className: b('wrap'), style: wrapsStyle[index] },
|
|
41
38
|
section.items.map((item, idx) => (react_1.default.createElement(NHPopupItem_1.NHPopupItem, Object.assign({ key: idx }, item, { imageColor: primaryColor, imageColorHover: primaryColorHover })))),
|
|
@@ -5,10 +5,10 @@ unpredictable css rules order in build */
|
|
|
5
5
|
align-items: center;
|
|
6
6
|
height: 36px;
|
|
7
7
|
gap: 4px;
|
|
8
|
-
padding: 0
|
|
8
|
+
padding: 0 12px 0 16px;
|
|
9
9
|
background: var(--g-color-base-brand);
|
|
10
10
|
color: var(--g-color-text-brand-contrast);
|
|
11
|
-
border-radius:
|
|
11
|
+
border-radius: 8px;
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LinkProps } from '@doyourjob/gravity-ui-page-constructor';
|
|
2
2
|
export declare enum NHNavigationItemType {
|
|
3
3
|
NHDefaultPopup = "default-popup",
|
|
4
4
|
Link = "link"
|
|
@@ -92,6 +92,10 @@ export interface NHNavigationData {
|
|
|
92
92
|
right?: NHNavigationItemData[];
|
|
93
93
|
login?: NHLoginPopupData;
|
|
94
94
|
logo?: NHLogoData;
|
|
95
|
-
buttons?:
|
|
95
|
+
buttons?: {
|
|
96
|
+
text: string;
|
|
97
|
+
url: string;
|
|
98
|
+
target?: string;
|
|
99
|
+
}[];
|
|
96
100
|
}
|
|
97
101
|
export type SetupRouteChangeHandler = (handler: () => void) => void;
|
|
@@ -62,11 +62,6 @@ unpredictable css rules order in build */
|
|
|
62
62
|
justify-content: flex-end;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
.pc-addons-new-header__buttons {
|
|
66
|
-
display: flex;
|
|
67
|
-
margin-left: 8px;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
65
|
.pc-addons-new-header__icon {
|
|
71
66
|
color: var(--g-color-text-hint);
|
|
72
67
|
transition: color 0.2s;
|
|
@@ -149,6 +144,8 @@ unpredictable css rules order in build */
|
|
|
149
144
|
.pc-addons-new-header__buttons {
|
|
150
145
|
display: flex;
|
|
151
146
|
gap: 8px;
|
|
147
|
+
--g-button-border-radius: 8px;
|
|
148
|
+
--g-button-background-color-hover: ;
|
|
152
149
|
}
|
|
153
150
|
|
|
154
151
|
@media (max-width: 577px) {
|
|
@@ -157,12 +154,22 @@ unpredictable css rules order in build */
|
|
|
157
154
|
}
|
|
158
155
|
}
|
|
159
156
|
.pc-addons-new-header__button {
|
|
157
|
+
color: inherit;
|
|
158
|
+
text-decoration: none;
|
|
160
159
|
display: flex;
|
|
161
160
|
align-items: center;
|
|
162
|
-
|
|
161
|
+
height: 36px;
|
|
162
|
+
padding: 0 16px;
|
|
163
163
|
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
164
164
|
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
165
165
|
font-weight: 500;
|
|
166
|
+
border-radius: 8px;
|
|
167
|
+
border: 1px solid rgba(5, 43, 66, 0.1);
|
|
168
|
+
transition: border-color 0.2s;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.pc-addons-new-header__button:hover {
|
|
172
|
+
border-color: rgba(5, 43, 66, 0.25);
|
|
166
173
|
}
|
|
167
174
|
|
|
168
175
|
@media (max-width: 1081px) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { getLinkProps } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
3
|
import { block } from '../../utils/cn';
|
|
4
4
|
import { NHLoginButton } from './components/NHLoginButton/NHLoginButton';
|
|
5
5
|
import { NHLogo } from './components/NHLogo/NHLogo';
|
|
@@ -63,7 +63,7 @@ export const NewHeader = ({ data, setupRouteChangeHandler, renderSearch, classNa
|
|
|
63
63
|
renderSearch && (React.createElement("div", { className: b('icons-container') }, renderSearch({ onActiveToggle: toggleSearch }))),
|
|
64
64
|
React.createElement("div", { className: b('buttons') },
|
|
65
65
|
showButtonsContainer &&
|
|
66
|
-
(buttons === null || buttons === void 0 ? void 0 : buttons.map((button, index) => (React.createElement(
|
|
66
|
+
(buttons === null || buttons === void 0 ? void 0 : buttons.map((button, index) => (React.createElement("a", Object.assign({ key: index, href: button.url, className: b('button') }, getLinkProps(button.url || '', undefined, button.target)), button.text)))),
|
|
67
67
|
login && React.createElement(NHLoginButton, { data: login, headerRef: headerRef })),
|
|
68
68
|
React.createElement(NHMobileNavigation, { toogleOpen: toggleMobileNavigationPopup, isOpened: isMobileNavigationOpen, isSearchOpen: isSearchMode, data: data, onMenuScroll: onMenuScroll, popupClassName: b('user-popup') })))))));
|
|
69
69
|
};
|
|
@@ -69,34 +69,7 @@ unpredictable css rules order in build */
|
|
|
69
69
|
display: grid;
|
|
70
70
|
gap: 24px 40px;
|
|
71
71
|
align-items: flex-start;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
.pc-addons-nh-default-popup__wrap_mode_run {
|
|
75
|
-
grid-template-columns: repeat(12, 1fr);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.pc-addons-nh-default-popup__wrap_mode_run > a {
|
|
79
|
-
grid-column: span 4;
|
|
80
|
-
grid-row: 1;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.pc-addons-nh-default-popup__wrap_mode_run > .pc-addons-nh-default-popup__inner-wrap:empty {
|
|
84
|
-
display: none;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.pc-addons-nh-default-popup__wrap_mode_run > a + .pc-addons-nh-default-popup__inner-wrap {
|
|
88
|
-
grid-column: span 8;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.pc-addons-nh-default-popup__wrap_mode_run > .pc-addons-nh-default-popup__inner-wrap:last-child {
|
|
92
|
-
grid-column: span 12;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.pc-addons-nh-default-popup__inner-wrap {
|
|
96
|
-
display: grid;
|
|
97
|
-
gap: 24px 40px;
|
|
98
|
-
align-items: flex-start;
|
|
99
|
-
grid-template-columns: 1fr 1fr 1fr;
|
|
72
|
+
flex: 1;
|
|
100
73
|
}
|
|
101
74
|
|
|
102
75
|
.pc-addons-nh-default-popup__right {
|
|
@@ -15,7 +15,7 @@ export const NHDefaultPopup = ({ sections, right, maxWidth, primaryColor, primar
|
|
|
15
15
|
}
|
|
16
16
|
: undefined, [maxWidth]);
|
|
17
17
|
const wrapsStyle = useMemo(() => sections.map((section) => ({
|
|
18
|
-
gridTemplateColumns:
|
|
18
|
+
gridTemplateColumns: `repeat(${section.columns || 3}, 1fr)`,
|
|
19
19
|
})), [sections]);
|
|
20
20
|
const cards = useMemo(() => {
|
|
21
21
|
if (right === null || right === void 0 ? void 0 : right.stories) {
|
|
@@ -27,12 +27,9 @@ export const NHDefaultPopup = ({ sections, right, maxWidth, primaryColor, primar
|
|
|
27
27
|
return null;
|
|
28
28
|
}, [right]);
|
|
29
29
|
const renderSectionContent = (section, index) => {
|
|
30
|
-
var _a
|
|
30
|
+
var _a;
|
|
31
31
|
if (section.mode === 'run') {
|
|
32
|
-
return (React.createElement("div", { className: b('wrap', {
|
|
33
|
-
((_a = section.items) === null || _a === void 0 ? void 0 : _a[0]) && React.createElement(NHPopupItem, Object.assign({}, section.items[0], { column: true })),
|
|
34
|
-
React.createElement("div", { className: b('inner-wrap') }, (_b = section.items) === null || _b === void 0 ? void 0 : _b.slice(1, 4).map((item, cardIndex) => (React.createElement(NHPopupItem, Object.assign({ key: cardIndex }, item, { column: true }))))),
|
|
35
|
-
React.createElement("div", { className: b('inner-wrap') }, (_c = section.items) === null || _c === void 0 ? void 0 : _c.slice(4).map((item, cardIndex) => (React.createElement(NHPopupItem, Object.assign({ key: cardIndex }, item, { column: true })))))));
|
|
32
|
+
return (React.createElement("div", { className: b('wrap'), style: wrapsStyle[index] }, (_a = section.items) === null || _a === void 0 ? void 0 : _a.map((item, cardIndex) => (React.createElement(NHPopupItem, Object.assign({ key: cardIndex }, item, { column: true }))))));
|
|
36
33
|
}
|
|
37
34
|
return (React.createElement("div", { className: b('wrap'), style: wrapsStyle[index] },
|
|
38
35
|
section.items.map((item, idx) => (React.createElement(NHPopupItem, Object.assign({ key: idx }, item, { imageColor: primaryColor, imageColorHover: primaryColorHover })))),
|
|
@@ -5,10 +5,10 @@ unpredictable css rules order in build */
|
|
|
5
5
|
align-items: center;
|
|
6
6
|
height: 36px;
|
|
7
7
|
gap: 4px;
|
|
8
|
-
padding: 0
|
|
8
|
+
padding: 0 12px 0 16px;
|
|
9
9
|
background: var(--g-color-base-brand);
|
|
10
10
|
color: var(--g-color-text-brand-contrast);
|
|
11
|
-
border-radius:
|
|
11
|
+
border-radius: 8px;
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LinkProps } from '@doyourjob/gravity-ui-page-constructor';
|
|
2
2
|
export declare enum NHNavigationItemType {
|
|
3
3
|
NHDefaultPopup = "default-popup",
|
|
4
4
|
Link = "link"
|
|
@@ -92,6 +92,10 @@ export interface NHNavigationData {
|
|
|
92
92
|
right?: NHNavigationItemData[];
|
|
93
93
|
login?: NHLoginPopupData;
|
|
94
94
|
logo?: NHLogoData;
|
|
95
|
-
buttons?:
|
|
95
|
+
buttons?: {
|
|
96
|
+
text: string;
|
|
97
|
+
url: string;
|
|
98
|
+
target?: string;
|
|
99
|
+
}[];
|
|
96
100
|
}
|
|
97
101
|
export type SetupRouteChangeHandler = (handler: () => void) => void;
|