@doyourjob/gravity-ui-page-constructor-addons 2.1.41 → 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/NHLoginButton/NHLoginButton.css +2 -2
- 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/NHLoginButton/NHLoginButton.css +2 -2
- 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
|
};
|
|
@@ -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
|
};
|
|
@@ -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;
|