@doyourjob/gravity-ui-page-constructor-addons 2.1.25 → 2.1.26
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/Navigation/components/Navigation/Navigation.d.ts +2 -2
- package/build/cjs/components/Navigation/components/Navigation/NavigationItem/NavigationItem.d.ts +2 -2
- package/build/cjs/components/Navigation/components/Navigation/NavigationItem/NavigationItem.js +2 -2
- package/build/cjs/components/NewHeader/NewHeader.css +169 -0
- package/build/cjs/components/NewHeader/NewHeader.d.ts +13 -0
- package/build/cjs/components/NewHeader/NewHeader.js +80 -0
- package/build/cjs/components/NewHeader/components/NHCompanyPopup/NHCompanyPopup.css +30 -0
- package/build/cjs/components/NewHeader/components/NHCompanyPopup/NHCompanyPopup.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/NHCompanyPopup/NHCompanyPopup.js +20 -0
- package/build/cjs/components/NewHeader/components/NHInvestorPopup/NHInvestorPopup.css +86 -0
- package/build/cjs/components/NewHeader/components/NHInvestorPopup/NHInvestorPopup.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/NHInvestorPopup/NHInvestorPopup.js +22 -0
- package/build/cjs/components/NewHeader/components/NHLoginButton/NHLoginButton.css +16 -0
- package/build/cjs/components/NewHeader/components/NHLoginButton/NHLoginButton.d.ts +10 -0
- package/build/cjs/components/NewHeader/components/NHLoginButton/NHLoginButton.js +51 -0
- package/build/cjs/components/NewHeader/components/NHLoginPopup/NHLoginPopup.css +51 -0
- package/build/cjs/components/NewHeader/components/NHLoginPopup/NHLoginPopup.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/NHLoginPopup/NHLoginPopup.js +12 -0
- package/build/cjs/components/NewHeader/components/NHMediumPopup/NHMediumPopup.css +8 -0
- package/build/cjs/components/NewHeader/components/NHMediumPopup/NHMediumPopup.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/NHMediumPopup/NHMediumPopup.js +17 -0
- package/build/cjs/components/NewHeader/components/NHMobileNavigation/NHMobileNavigation.css +47 -0
- package/build/cjs/components/NewHeader/components/NHMobileNavigation/NHMobileNavigation.d.ts +14 -0
- package/build/cjs/components/NewHeader/components/NHMobileNavigation/NHMobileNavigation.js +25 -0
- package/build/cjs/components/NewHeader/components/NHMobileNavigationItem/NHMobileNavigationItem.css +75 -0
- package/build/cjs/components/NewHeader/components/NHMobileNavigationItem/NHMobileNavigationItem.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/NHMobileNavigationItem/NHMobileNavigationItem.js +30 -0
- package/build/cjs/components/NewHeader/components/NHMobileNavigationPopup/NHMobileNavigationPopup.css +55 -0
- package/build/cjs/components/NewHeader/components/NHMobileNavigationPopup/NHMobileNavigationPopup.d.ts +9 -0
- package/build/cjs/components/NewHeader/components/NHMobileNavigationPopup/NHMobileNavigationPopup.js +47 -0
- package/build/cjs/components/NewHeader/components/NHNavigation/NHNavigation.css +23 -0
- package/build/cjs/components/NewHeader/components/NHNavigation/NHNavigation.d.ts +10 -0
- package/build/cjs/components/NewHeader/components/NHNavigation/NHNavigation.js +74 -0
- package/build/cjs/components/NewHeader/components/NHNavigationItem/NHNavigationItem.css +63 -0
- package/build/cjs/components/NewHeader/components/NHNavigationItem/NHNavigationItem.d.ts +12 -0
- package/build/cjs/components/NewHeader/components/NHNavigationItem/NHNavigationItem.js +33 -0
- package/build/cjs/components/NewHeader/components/NHNavigationPopup/NHNavigationPopup.css +10 -0
- package/build/cjs/components/NewHeader/components/NHNavigationPopup/NHNavigationPopup.d.ts +9 -0
- package/build/cjs/components/NewHeader/components/NHNavigationPopup/NHNavigationPopup.js +18 -0
- package/build/cjs/components/NewHeader/components/NHPopupItem/NHPopupItem.css +107 -0
- package/build/cjs/components/NewHeader/components/NHPopupItem/NHPopupItem.d.ts +12 -0
- package/build/cjs/components/NewHeader/components/NHPopupItem/NHPopupItem.js +28 -0
- package/build/cjs/components/NewHeader/components/NHProductsPopup/NHProductsPopup.css +125 -0
- package/build/cjs/components/NewHeader/components/NHProductsPopup/NHProductsPopup.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/NHProductsPopup/NHProductsPopup.js +65 -0
- package/build/cjs/components/NewHeader/components/NHResourcesPopup/NHResourcesPopup.css +210 -0
- package/build/cjs/components/NewHeader/components/NHResourcesPopup/NHResourcesPopup.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/NHResourcesPopup/NHResourcesPopup.js +42 -0
- package/build/cjs/components/NewHeader/components/NHSolutionsPopup/NHSolutionsPopup.css +49 -0
- package/build/cjs/components/NewHeader/components/NHSolutionsPopup/NHSolutionsPopup.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/NHSolutionsPopup/NHSolutionsPopup.js +20 -0
- package/build/cjs/components/NewHeader/components/NHTag/NHTag.css +21 -0
- package/build/cjs/components/NewHeader/components/NHTag/NHTag.d.ts +6 -0
- package/build/cjs/components/NewHeader/components/NHTag/NHTag.js +22 -0
- package/build/cjs/components/NewHeader/components/NHWhyPopup/NHWhyPopup.css +81 -0
- package/build/cjs/components/NewHeader/components/NHWhyPopup/NHWhyPopup.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/NHWhyPopup/NHWhyPopup.js +21 -0
- package/build/cjs/components/NewHeader/constants.d.ts +7 -0
- package/build/cjs/components/NewHeader/constants.js +11 -0
- package/build/cjs/components/NewHeader/contexts/route-change.d.ts +3 -0
- package/build/cjs/components/NewHeader/contexts/route-change.js +6 -0
- package/build/cjs/components/NewHeader/models.d.ts +202 -0
- package/build/cjs/components/NewHeader/models.js +20 -0
- package/build/cjs/components/NewHeader/styles/mixins.css +0 -0
- package/build/cjs/components/NewHeader/styles/variables.css +5 -0
- package/build/cjs/components/index.d.ts +1 -0
- package/build/cjs/components/index.js +1 -0
- package/build/esm/components/Navigation/components/Navigation/Navigation.d.ts +2 -2
- package/build/esm/components/Navigation/components/Navigation/NavigationItem/NavigationItem.d.ts +2 -2
- package/build/esm/components/Navigation/components/Navigation/NavigationItem/NavigationItem.js +2 -2
- package/build/esm/components/NewHeader/NewHeader.css +169 -0
- package/build/esm/components/NewHeader/NewHeader.d.ts +14 -0
- package/build/esm/components/NewHeader/NewHeader.js +76 -0
- package/build/esm/components/NewHeader/components/NHCompanyPopup/NHCompanyPopup.css +30 -0
- package/build/esm/components/NewHeader/components/NHCompanyPopup/NHCompanyPopup.d.ts +4 -0
- package/build/esm/components/NewHeader/components/NHCompanyPopup/NHCompanyPopup.js +16 -0
- package/build/esm/components/NewHeader/components/NHInvestorPopup/NHInvestorPopup.css +86 -0
- package/build/esm/components/NewHeader/components/NHInvestorPopup/NHInvestorPopup.d.ts +4 -0
- package/build/esm/components/NewHeader/components/NHInvestorPopup/NHInvestorPopup.js +18 -0
- package/build/esm/components/NewHeader/components/NHLoginButton/NHLoginButton.css +16 -0
- package/build/esm/components/NewHeader/components/NHLoginButton/NHLoginButton.d.ts +11 -0
- package/build/esm/components/NewHeader/components/NHLoginButton/NHLoginButton.js +47 -0
- package/build/esm/components/NewHeader/components/NHLoginPopup/NHLoginPopup.css +51 -0
- package/build/esm/components/NewHeader/components/NHLoginPopup/NHLoginPopup.d.ts +4 -0
- package/build/esm/components/NewHeader/components/NHLoginPopup/NHLoginPopup.js +8 -0
- package/build/esm/components/NewHeader/components/NHMediumPopup/NHMediumPopup.css +8 -0
- package/build/esm/components/NewHeader/components/NHMediumPopup/NHMediumPopup.d.ts +4 -0
- package/build/esm/components/NewHeader/components/NHMediumPopup/NHMediumPopup.js +13 -0
- package/build/esm/components/NewHeader/components/NHMobileNavigation/NHMobileNavigation.css +47 -0
- package/build/esm/components/NewHeader/components/NHMobileNavigation/NHMobileNavigation.d.ts +15 -0
- package/build/esm/components/NewHeader/components/NHMobileNavigation/NHMobileNavigation.js +21 -0
- package/build/esm/components/NewHeader/components/NHMobileNavigationItem/NHMobileNavigationItem.css +75 -0
- package/build/esm/components/NewHeader/components/NHMobileNavigationItem/NHMobileNavigationItem.d.ts +4 -0
- package/build/esm/components/NewHeader/components/NHMobileNavigationItem/NHMobileNavigationItem.js +26 -0
- package/build/esm/components/NewHeader/components/NHMobileNavigationPopup/NHMobileNavigationPopup.css +55 -0
- package/build/esm/components/NewHeader/components/NHMobileNavigationPopup/NHMobileNavigationPopup.d.ts +10 -0
- package/build/esm/components/NewHeader/components/NHMobileNavigationPopup/NHMobileNavigationPopup.js +43 -0
- package/build/esm/components/NewHeader/components/NHNavigation/NHNavigation.css +23 -0
- package/build/esm/components/NewHeader/components/NHNavigation/NHNavigation.d.ts +11 -0
- package/build/esm/components/NewHeader/components/NHNavigation/NHNavigation.js +70 -0
- package/build/esm/components/NewHeader/components/NHNavigationItem/NHNavigationItem.css +63 -0
- package/build/esm/components/NewHeader/components/NHNavigationItem/NHNavigationItem.d.ts +13 -0
- package/build/esm/components/NewHeader/components/NHNavigationItem/NHNavigationItem.js +29 -0
- package/build/esm/components/NewHeader/components/NHNavigationPopup/NHNavigationPopup.css +10 -0
- package/build/esm/components/NewHeader/components/NHNavigationPopup/NHNavigationPopup.d.ts +10 -0
- package/build/esm/components/NewHeader/components/NHNavigationPopup/NHNavigationPopup.js +14 -0
- package/build/esm/components/NewHeader/components/NHPopupItem/NHPopupItem.css +107 -0
- package/build/esm/components/NewHeader/components/NHPopupItem/NHPopupItem.d.ts +13 -0
- package/build/esm/components/NewHeader/components/NHPopupItem/NHPopupItem.js +24 -0
- package/build/esm/components/NewHeader/components/NHProductsPopup/NHProductsPopup.css +125 -0
- package/build/esm/components/NewHeader/components/NHProductsPopup/NHProductsPopup.d.ts +4 -0
- package/build/esm/components/NewHeader/components/NHProductsPopup/NHProductsPopup.js +61 -0
- package/build/esm/components/NewHeader/components/NHResourcesPopup/NHResourcesPopup.css +210 -0
- package/build/esm/components/NewHeader/components/NHResourcesPopup/NHResourcesPopup.d.ts +4 -0
- package/build/esm/components/NewHeader/components/NHResourcesPopup/NHResourcesPopup.js +38 -0
- package/build/esm/components/NewHeader/components/NHSolutionsPopup/NHSolutionsPopup.css +49 -0
- package/build/esm/components/NewHeader/components/NHSolutionsPopup/NHSolutionsPopup.d.ts +4 -0
- package/build/esm/components/NewHeader/components/NHSolutionsPopup/NHSolutionsPopup.js +16 -0
- package/build/esm/components/NewHeader/components/NHTag/NHTag.css +21 -0
- package/build/esm/components/NewHeader/components/NHTag/NHTag.d.ts +7 -0
- package/build/esm/components/NewHeader/components/NHTag/NHTag.js +18 -0
- package/build/esm/components/NewHeader/components/NHWhyPopup/NHWhyPopup.css +81 -0
- package/build/esm/components/NewHeader/components/NHWhyPopup/NHWhyPopup.d.ts +4 -0
- package/build/esm/components/NewHeader/components/NHWhyPopup/NHWhyPopup.js +17 -0
- package/build/esm/components/NewHeader/constants.d.ts +7 -0
- package/build/esm/components/NewHeader/constants.js +8 -0
- package/build/esm/components/NewHeader/contexts/route-change.d.ts +3 -0
- package/build/esm/components/NewHeader/contexts/route-change.js +2 -0
- package/build/esm/components/NewHeader/models.d.ts +202 -0
- package/build/esm/components/NewHeader/models.js +17 -0
- package/build/esm/components/NewHeader/styles/mixins.css +0 -0
- package/build/esm/components/NewHeader/styles/variables.css +5 -0
- package/build/esm/components/index.d.ts +1 -0
- package/build/esm/components/index.js +1 -0
- package/package.json +1 -1
|
@@ -4,8 +4,8 @@ import { NavigationSectionData, SetupRouteChangeHandler } from '../../models';
|
|
|
4
4
|
interface NavigationProps {
|
|
5
5
|
data: NavigationSectionData[];
|
|
6
6
|
withBackground: boolean;
|
|
7
|
-
handleOpenPopup
|
|
8
|
-
handleClosePopup
|
|
7
|
+
handleOpenPopup?: () => void;
|
|
8
|
+
handleClosePopup?: () => void;
|
|
9
9
|
headerRef?: RefObject<HTMLDivElement>;
|
|
10
10
|
setupRouteChangeHandler?: SetupRouteChangeHandler;
|
|
11
11
|
}
|
package/build/cjs/components/Navigation/components/Navigation/NavigationItem/NavigationItem.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ interface NavigationItemOwnProps {
|
|
|
4
4
|
index: number;
|
|
5
5
|
item: NavigationSectionData;
|
|
6
6
|
isActive: boolean;
|
|
7
|
-
handleOpenPopup
|
|
8
|
-
handleClosePopup
|
|
7
|
+
handleOpenPopup?: () => void;
|
|
8
|
+
handleClosePopup?: () => void;
|
|
9
9
|
handleActiveTab: (currentIndex: number) => void;
|
|
10
10
|
children?: ReactNode;
|
|
11
11
|
tooltipId?: string;
|
package/build/cjs/components/Navigation/components/Navigation/NavigationItem/NavigationItem.js
CHANGED
|
@@ -24,12 +24,12 @@ const NavigationItem = ({ item, isActive, handleActiveTab, handleOpenPopup, hand
|
|
|
24
24
|
const handleMouseEnter = (0, react_1.useCallback)(() => {
|
|
25
25
|
handleActiveTab(index);
|
|
26
26
|
if (isPopupExist) {
|
|
27
|
-
handleOpenPopup();
|
|
27
|
+
handleOpenPopup === null || handleOpenPopup === void 0 ? void 0 : handleOpenPopup();
|
|
28
28
|
}
|
|
29
29
|
}, [handleActiveTab, handleOpenPopup, index, isPopupExist]);
|
|
30
30
|
const handleMouseLeave = (0, react_1.useCallback)(() => {
|
|
31
31
|
if (isPopupExist) {
|
|
32
|
-
handleClosePopup();
|
|
32
|
+
handleClosePopup === null || handleClosePopup === void 0 ? void 0 : handleClosePopup();
|
|
33
33
|
}
|
|
34
34
|
handleActiveTab(constants_1.NO_MENU_TAB_SELECTED);
|
|
35
35
|
}, [handleActiveTab, handleClosePopup, isPopupExist]);
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
|
2
|
+
unpredictable css rules order in build */
|
|
3
|
+
.pc-addons-new-header {
|
|
4
|
+
--g-scrollbar-width: 8px;
|
|
5
|
+
--g-color-scroll-handle: var(--g-color-base-generic);
|
|
6
|
+
--g-color-scroll-handle-hover: var(--g-color-line-generic);
|
|
7
|
+
position: relative;
|
|
8
|
+
max-width: 1328px;
|
|
9
|
+
margin: 0 auto;
|
|
10
|
+
width: 100%;
|
|
11
|
+
z-index: 100;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.pc-addons-new-header__container {
|
|
15
|
+
width: 100%;
|
|
16
|
+
padding: 0 32px;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: space-between;
|
|
20
|
+
height: 64px;
|
|
21
|
+
background: var(--pc-transparent);
|
|
22
|
+
border-radius: var(--pc-border-radius, 24px);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.pc-addons-new-header__container_with-background {
|
|
26
|
+
background: var(--g-color-base-background);
|
|
27
|
+
box-shadow: 0 4px 24px var(--g-color-base-generic);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.pc-addons-new-header__left, .pc-addons-new-header__right {
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
gap: 40px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.pc-addons-new-header__left {
|
|
37
|
+
margin-right: 32px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.pc-addons-new-header__right {
|
|
41
|
+
justify-content: flex-end;
|
|
42
|
+
width: 100%;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.pc-addons-new-header__wrap {
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
gap: 8px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.pc-addons-new-header__icons-container {
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: flex-end;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.pc-addons-new-header__buttons {
|
|
58
|
+
display: flex;
|
|
59
|
+
margin-left: 8px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.pc-addons-new-header__icon {
|
|
63
|
+
color: var(--g-color-text-hint);
|
|
64
|
+
transition: color 0.2s;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.pc-addons-new-header__user {
|
|
68
|
+
margin-left: 12px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@media (max-width: 768px) {
|
|
72
|
+
.pc-addons-new-header__user {
|
|
73
|
+
display: none;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
.pc-addons-new-header__back {
|
|
77
|
+
position: relative;
|
|
78
|
+
left: 2px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.pc-addons-new-header__back-icon {
|
|
82
|
+
color: var(--g-color-text-hint);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.pc-addons-new-header__back {
|
|
86
|
+
display: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.pc-addons-new-header__back:hover:before {
|
|
90
|
+
background: none;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.pc-addons-new-header__back:hover .pc-addons-new-header__icon {
|
|
94
|
+
color: var(--g-color-text-complementary);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@media (max-width: 768px) {
|
|
98
|
+
.pc-addons-new-header__navigation {
|
|
99
|
+
display: none;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
.pc-addons-new-header__popup {
|
|
103
|
+
--yc-popup-border-width: 0;
|
|
104
|
+
--yc-popup-border-color: none;
|
|
105
|
+
border-radius: var(--pc-border-radius, 24px);
|
|
106
|
+
box-shadow: 0 3px 10px var(--g-color-base-generic-hover);
|
|
107
|
+
--yc-popover-max-width: 1296px;
|
|
108
|
+
--yc-popover-padding: 20px;
|
|
109
|
+
width: var(--yc-popover-max-width);
|
|
110
|
+
left: 0;
|
|
111
|
+
box-shadow: 0 4px 24px var(--g-color-base-generic-hover), 0 2px 8px var(--g-color-base-generic-hover);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.pc-addons-new-header__popup_with-background {
|
|
115
|
+
border-radius: 0 0 var(--pc-border-radius, 24px) var(--pc-border-radius, 24px);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.pc-addons-new-header__scroll-arrow {
|
|
119
|
+
height: 20px;
|
|
120
|
+
color: var(--g-color-text-hint);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.pc-addons-new-header__user-popup {
|
|
124
|
+
--yc-popup-border-width: 0;
|
|
125
|
+
--yc-popup-border-color: none;
|
|
126
|
+
border-radius: var(--g-border-radius-m);
|
|
127
|
+
box-shadow: 0 3px 10px var(--g-color-base-generic-hover);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@media (max-width: 1081px) {
|
|
131
|
+
.pc-addons-new-header__left {
|
|
132
|
+
margin-right: 0;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
@media (min-width: 769px) {
|
|
136
|
+
.pc-addons-new-header__logo-img {
|
|
137
|
+
height: 30px;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
@media (max-width: 768px) {
|
|
141
|
+
.pc-addons-new-header {
|
|
142
|
+
max-width: 100%;
|
|
143
|
+
padding: 16px 40px 16px 48px;
|
|
144
|
+
border-top-left-radius: 0;
|
|
145
|
+
border-top-right-radius: 0;
|
|
146
|
+
}
|
|
147
|
+
.pc-addons-new-header__left {
|
|
148
|
+
margin-right: 12px;
|
|
149
|
+
}
|
|
150
|
+
.pc-addons-new-header__icons-container {
|
|
151
|
+
flex-direction: row-reverse;
|
|
152
|
+
justify-content: flex-start;
|
|
153
|
+
}
|
|
154
|
+
.pc-addons-new-header_search .pc-addons-new-header__logo {
|
|
155
|
+
display: none;
|
|
156
|
+
}
|
|
157
|
+
.pc-addons-new-header_search .pc-addons-new-header__back {
|
|
158
|
+
display: block;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
@media (max-width: 576px) {
|
|
162
|
+
.pc-addons-new-header {
|
|
163
|
+
padding-left: 24px;
|
|
164
|
+
padding-right: 16px;
|
|
165
|
+
}
|
|
166
|
+
.pc-addons-new-header__container {
|
|
167
|
+
height: 64px;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ClassNameProps } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
|
+
import { NHNavigationData, SetupRouteChangeHandler } from './models';
|
|
4
|
+
export declare const MOBILE_ICON_SIZE = 24;
|
|
5
|
+
export interface NewHeaderProps extends ClassNameProps {
|
|
6
|
+
data: NHNavigationData;
|
|
7
|
+
renderSearch?: (props: {
|
|
8
|
+
onActiveToggle: (isActive: boolean) => void;
|
|
9
|
+
}) => ReactNode;
|
|
10
|
+
setupRouteChangeHandler?: SetupRouteChangeHandler;
|
|
11
|
+
scrollOffset?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare const NewHeader: ({ data, setupRouteChangeHandler, renderSearch, className, scrollOffset, }: NewHeaderProps) => React.JSX.Element;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NewHeader = exports.MOBILE_ICON_SIZE = 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 NHLoginButton_1 = require("./components/NHLoginButton/NHLoginButton");
|
|
9
|
+
const NHMobileNavigation_1 = require("./components/NHMobileNavigation/NHMobileNavigation");
|
|
10
|
+
const NHNavigation_1 = require("./components/NHNavigation/NHNavigation");
|
|
11
|
+
const route_change_1 = require("./contexts/route-change");
|
|
12
|
+
const b = (0, cn_1.block)('new-header');
|
|
13
|
+
exports.MOBILE_ICON_SIZE = 24;
|
|
14
|
+
const NewHeader = ({ data, setupRouteChangeHandler, renderSearch, className, scrollOffset = 0, }) => {
|
|
15
|
+
const { logo, buttons, left, right, mobile, login } = data;
|
|
16
|
+
const headerRef = (0, react_1.useRef)(null);
|
|
17
|
+
const [withBackground, setWithBackground] = (0, react_1.useState)(false);
|
|
18
|
+
const [withShadow, setWithShadow] = (0, react_1.useState)(true);
|
|
19
|
+
const [isSearchMode, setIsSearchMode] = (0, react_1.useState)(false);
|
|
20
|
+
const [isMobileNavigationOpen, setIsMobileNavigationOpen] = (0, react_1.useState)(false);
|
|
21
|
+
const [pageHasScroll, setPageHasScroll] = (0, react_1.useState)(false);
|
|
22
|
+
const showButtonsContainer = Boolean(buttons);
|
|
23
|
+
const toggleSearch = (0, react_1.useCallback)((isActive) => setIsSearchMode(isActive), []);
|
|
24
|
+
const toggleMobileNavigationPopup = (0, react_1.useCallback)((isOpened) => {
|
|
25
|
+
setIsMobileNavigationOpen(isOpened);
|
|
26
|
+
// disable header's shadow on mobile with opened menu and if page was scrolled
|
|
27
|
+
if (isOpened && pageHasScroll) {
|
|
28
|
+
setWithShadow(false);
|
|
29
|
+
}
|
|
30
|
+
}, [pageHasScroll]);
|
|
31
|
+
const onMenuScroll = (0, react_1.useCallback)((scrollTop) => {
|
|
32
|
+
// enable header's shadow on mobile if mobile menu started to scroll
|
|
33
|
+
setWithShadow(scrollTop > 0);
|
|
34
|
+
if (!pageHasScroll) {
|
|
35
|
+
setWithBackground(scrollTop > 0);
|
|
36
|
+
}
|
|
37
|
+
}, [pageHasScroll]);
|
|
38
|
+
(0, react_1.useEffect)(() => {
|
|
39
|
+
const onScroll = () => {
|
|
40
|
+
const scrollTop = window.pageYOffset;
|
|
41
|
+
const shouldShowBg = scrollTop > scrollOffset;
|
|
42
|
+
if (withBackground !== shouldShowBg) {
|
|
43
|
+
setWithBackground(shouldShowBg);
|
|
44
|
+
}
|
|
45
|
+
if (scrollTop === 0 && pageHasScroll) {
|
|
46
|
+
setPageHasScroll(false);
|
|
47
|
+
}
|
|
48
|
+
else if (scrollTop > 0 && !pageHasScroll) {
|
|
49
|
+
setPageHasScroll(true);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
window.addEventListener('scroll', onScroll);
|
|
53
|
+
onScroll();
|
|
54
|
+
});
|
|
55
|
+
(0, react_1.useEffect)(() => setupRouteChangeHandler === null || setupRouteChangeHandler === void 0 ? void 0 : setupRouteChangeHandler(() => {
|
|
56
|
+
setIsMobileNavigationOpen(false);
|
|
57
|
+
}), [setupRouteChangeHandler]);
|
|
58
|
+
return (react_1.default.createElement(route_change_1.RouteChangeHandlerContext.Provider, { value: setupRouteChangeHandler },
|
|
59
|
+
react_1.default.createElement("header", { className: b({
|
|
60
|
+
search: isSearchMode,
|
|
61
|
+
}, className), ref: headerRef },
|
|
62
|
+
react_1.default.createElement("div", { className: b('container', {
|
|
63
|
+
'with-background': withBackground,
|
|
64
|
+
'with-shadow': withShadow,
|
|
65
|
+
}) },
|
|
66
|
+
react_1.default.createElement("div", { className: b('left') },
|
|
67
|
+
logo && (react_1.default.createElement("a", Object.assign({ href: logo.href, className: b('logo') }, (0, gravity_ui_page_constructor_1.getLinkProps)(logo.href || '')), logo.src && (react_1.default.createElement("img", { className: b('logo-img'), alt: logo.alt, src: logo.src })))),
|
|
68
|
+
left ? (react_1.default.createElement("div", { className: b('navigation') },
|
|
69
|
+
react_1.default.createElement(NHNavigation_1.NHNavigation, { data: left, headerRef: headerRef }))) : null),
|
|
70
|
+
react_1.default.createElement("div", { className: b('right') },
|
|
71
|
+
right ? (react_1.default.createElement("div", { className: b('navigation') },
|
|
72
|
+
react_1.default.createElement(NHNavigation_1.NHNavigation, { data: right, headerRef: headerRef }))) : null,
|
|
73
|
+
react_1.default.createElement("div", { className: b('wrap') },
|
|
74
|
+
react_1.default.createElement("div", { className: b('icons-container') }, renderSearch && renderSearch({ onActiveToggle: toggleSearch })),
|
|
75
|
+
showButtonsContainer &&
|
|
76
|
+
(buttons === null || buttons === void 0 ? void 0 : buttons.map((button) => (react_1.default.createElement(gravity_ui_page_constructor_1.Button, Object.assign({}, button, { size: "l", key: button.text }))))),
|
|
77
|
+
login && react_1.default.createElement(NHLoginButton_1.NHLoginButton, { data: login, headerRef: headerRef }),
|
|
78
|
+
mobile ? (react_1.default.createElement(NHMobileNavigation_1.NHMobileNavigation, { toogleOpen: toggleMobileNavigationPopup, isOpened: isMobileNavigationOpen, isSearchOpen: isSearchMode, data: mobile, buttons: buttons, onMenuScroll: onMenuScroll, popupClassName: b('user-popup') })) : null))))));
|
|
79
|
+
};
|
|
80
|
+
exports.NewHeader = NewHeader;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
|
2
|
+
unpredictable css rules order in build */
|
|
3
|
+
.pc-addons-nh-company-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
|
+
max-width: 900px;
|
|
9
|
+
margin-left: auto;
|
|
10
|
+
width: 100%;
|
|
11
|
+
border-radius: var(--pc-border-radius, 24px);
|
|
12
|
+
scrollbar-width: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.pc-addons-nh-company-popup::-webkit-scrollbar {
|
|
16
|
+
display: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.pc-addons-nh-company-popup__container {
|
|
20
|
+
padding: 20px;
|
|
21
|
+
display: flex;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.pc-addons-nh-company-popup__title {
|
|
25
|
+
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
26
|
+
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
27
|
+
padding: 12px;
|
|
28
|
+
font-weight: 500;
|
|
29
|
+
color: #9fb1bd;
|
|
30
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NHCompanyPopup = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(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-company-popup');
|
|
10
|
+
const NHCompanyPopup = ({ sections }) => (react_1.default.createElement(gravity_ui_page_constructor_1.Grid, { className: b(), containerClass: b('container') },
|
|
11
|
+
react_1.default.createElement(gravity_ui_page_constructor_1.Row, null, sections.map((section, index) => (react_1.default.createElement(gravity_ui_page_constructor_1.Col, { key: section.title, sizes: index === 0
|
|
12
|
+
? { [gravity_ui_page_constructor_1.GridColumnSize.All]: 12, [gravity_ui_page_constructor_1.GridColumnSize.Md]: 4 }
|
|
13
|
+
: { [gravity_ui_page_constructor_1.GridColumnSize.All]: 12, [gravity_ui_page_constructor_1.GridColumnSize.Md]: 8 } },
|
|
14
|
+
react_1.default.createElement(gravity_ui_page_constructor_1.Row, null,
|
|
15
|
+
react_1.default.createElement(gravity_ui_page_constructor_1.Col, null,
|
|
16
|
+
react_1.default.createElement("div", { className: b('title') }, section.title))),
|
|
17
|
+
react_1.default.createElement(gravity_ui_page_constructor_1.Row, null, section.items.map((item) => (react_1.default.createElement(NHPopupItem_1.NHPopupItem, Object.assign({ key: item.title, hover: true }, item, { sizes: index === 0
|
|
18
|
+
? { [gravity_ui_page_constructor_1.GridColumnSize.All]: 12 }
|
|
19
|
+
: { [gravity_ui_page_constructor_1.GridColumnSize.All]: 12, [gravity_ui_page_constructor_1.GridColumnSize.Md]: 6 } })))))))))));
|
|
20
|
+
exports.NHCompanyPopup = NHCompanyPopup;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
|
2
|
+
unpredictable css rules order in build */
|
|
3
|
+
.pc-addons-nh-investor-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
|
+
max-width: 900px;
|
|
9
|
+
margin-left: auto;
|
|
10
|
+
width: 100%;
|
|
11
|
+
border-radius: var(--pc-border-radius, 24px);
|
|
12
|
+
scrollbar-width: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.pc-addons-nh-investor-popup::-webkit-scrollbar {
|
|
16
|
+
display: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.pc-addons-nh-investor-popup__container {
|
|
20
|
+
padding: 32px;
|
|
21
|
+
display: flex;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.pc-addons-nh-investor-popup__wrap {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
gap: 24px;
|
|
28
|
+
padding: 0;
|
|
29
|
+
flex: 1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.pc-addons-nh-investor-popup__title {
|
|
33
|
+
font-size: var(--g-text-header-1-font-size, var(--pc-text-header-1-font-size));
|
|
34
|
+
line-height: var(--g-text-header-1-line-height, var(--pc-text-header-1-line-height));
|
|
35
|
+
color: inherit;
|
|
36
|
+
text-decoration: none;
|
|
37
|
+
display: flex;
|
|
38
|
+
font-weight: 600;
|
|
39
|
+
margin-bottom: 8px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.pc-addons-nh-investor-popup__title:hover {
|
|
43
|
+
color: var(--g-color-text-link-hover);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.pc-addons-nh-investor-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;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.pc-addons-nh-investor-popup__card {
|
|
54
|
+
background-color: #f2f4f5;
|
|
55
|
+
border-radius: 8px;
|
|
56
|
+
width: 268px;
|
|
57
|
+
padding: 20px;
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
justify-content: space-between;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.pc-addons-nh-investor-popup__card-title {
|
|
64
|
+
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
65
|
+
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
66
|
+
font-weight: 500;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.pc-addons-nh-investor-popup__card-wrap {
|
|
70
|
+
display: flex;
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
gap: 4px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.pc-addons-nh-investor-popup__card-price {
|
|
76
|
+
font-size: var(--g-text-display-2-font-size, var(--pc-text-display-2-font-size));
|
|
77
|
+
line-height: var(--g-text-display-2-line-height, var(--pc-text-display-2-line-height));
|
|
78
|
+
font-weight: 700;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.pc-addons-nh-investor-popup__card-date {
|
|
82
|
+
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
83
|
+
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
84
|
+
font-weight: 500;
|
|
85
|
+
color: #9fb1bd;
|
|
86
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NHInvestorPopup = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(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-investor-popup');
|
|
10
|
+
const NHInvestorPopup = ({ title, subtitle, url, items, stock }) => (react_1.default.createElement(gravity_ui_page_constructor_1.Grid, { className: b(), containerClass: b('container') },
|
|
11
|
+
react_1.default.createElement("div", { className: b('wrap') },
|
|
12
|
+
react_1.default.createElement(gravity_ui_page_constructor_1.Row, null,
|
|
13
|
+
react_1.default.createElement(gravity_ui_page_constructor_1.Col, null,
|
|
14
|
+
react_1.default.createElement("a", Object.assign({ href: url, className: b('title') }, (0, gravity_ui_page_constructor_1.getLinkProps)(url)), title),
|
|
15
|
+
react_1.default.createElement("div", { className: b('subtitle') }, subtitle))),
|
|
16
|
+
react_1.default.createElement(gravity_ui_page_constructor_1.Row, null, items.map((item) => (react_1.default.createElement(NHPopupItem_1.NHPopupItem, Object.assign({ key: item.title, hover: true }, item, { sizes: { [gravity_ui_page_constructor_1.GridColumnSize.All]: 12, [gravity_ui_page_constructor_1.GridColumnSize.Md]: 6 } })))))),
|
|
17
|
+
stock && (react_1.default.createElement("div", { className: b('card') },
|
|
18
|
+
react_1.default.createElement("div", { className: b('card-title') }, stock.title),
|
|
19
|
+
react_1.default.createElement("div", { className: b('card-wrap') },
|
|
20
|
+
react_1.default.createElement("div", { className: b('card-price') }, stock.price),
|
|
21
|
+
react_1.default.createElement("div", { className: b('card-date') }, stock.date))))));
|
|
22
|
+
exports.NHInvestorPopup = NHInvestorPopup;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
|
2
|
+
unpredictable css rules order in build */
|
|
3
|
+
.pc-addons-nh-login-button {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
height: 36px;
|
|
7
|
+
gap: 4px;
|
|
8
|
+
padding: 0 8px 0 12px;
|
|
9
|
+
border-radius: 8px;
|
|
10
|
+
background: var(--g-color-base-brand);
|
|
11
|
+
color: var(--g-color-text-brand-contrast);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.pc-addons-nh-login-button:hover {
|
|
15
|
+
background: var(--g-color-base-brand-hover);
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { NHLoginPopupData, SetupRouteChangeHandler } from '../../models';
|
|
4
|
+
interface LoginButtonProps {
|
|
5
|
+
data: NHLoginPopupData;
|
|
6
|
+
headerRef?: RefObject<HTMLDivElement>;
|
|
7
|
+
setupRouteChangeHandler?: SetupRouteChangeHandler;
|
|
8
|
+
}
|
|
9
|
+
export declare const NHLoginButton: ({ data, headerRef, setupRouteChangeHandler }: LoginButtonProps) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NHLoginButton = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
+
const icons_1 = require("@gravity-ui/icons");
|
|
7
|
+
const uikit_1 = require("@gravity-ui/uikit");
|
|
8
|
+
const cn_1 = require("../../../../utils/cn");
|
|
9
|
+
const constants_1 = require("../../constants");
|
|
10
|
+
const NHLoginPopup_1 = require("../NHLoginPopup/NHLoginPopup");
|
|
11
|
+
const NHNavigationPopup_1 = require("../NHNavigationPopup/NHNavigationPopup");
|
|
12
|
+
const b = (0, cn_1.block)('nh-login-button');
|
|
13
|
+
const NHLoginButton = ({ data, headerRef, setupRouteChangeHandler }) => {
|
|
14
|
+
const [isActive, setIsActive] = (0, react_1.useState)(false);
|
|
15
|
+
const [pretendentActiveTab, setPretendentAciveTab] = (0, react_1.useState)(false);
|
|
16
|
+
const [previouslyFocusedElement, setPreviouslyFocusedElement] = (0, react_1.useState)(null);
|
|
17
|
+
const handleActiveTab = (0, react_1.useCallback)((val) => {
|
|
18
|
+
setPreviouslyFocusedElement(document.activeElement);
|
|
19
|
+
setPretendentAciveTab(val);
|
|
20
|
+
}, []);
|
|
21
|
+
const onEscapeKeyDown = (0, react_1.useCallback)((event) => {
|
|
22
|
+
if (event.key === 'Escape') {
|
|
23
|
+
setIsActive(false);
|
|
24
|
+
setPretendentAciveTab(false);
|
|
25
|
+
previouslyFocusedElement === null || previouslyFocusedElement === void 0 ? void 0 : previouslyFocusedElement.focus({ preventScroll: true });
|
|
26
|
+
}
|
|
27
|
+
}, [previouslyFocusedElement]);
|
|
28
|
+
const handleMouseEnter = (0, react_1.useCallback)(() => handleActiveTab(true), [handleActiveTab]);
|
|
29
|
+
const handleMouseLeave = (0, react_1.useCallback)(() => handleActiveTab(false), [handleActiveTab]);
|
|
30
|
+
(0, react_1.useEffect)(() => {
|
|
31
|
+
const timerId = setTimeout(() => {
|
|
32
|
+
setIsActive(pretendentActiveTab);
|
|
33
|
+
}, constants_1.SWITCH_MENU_TAB_TIMEOUT);
|
|
34
|
+
return () => clearTimeout(timerId);
|
|
35
|
+
}, [pretendentActiveTab]);
|
|
36
|
+
(0, react_1.useEffect)(() => {
|
|
37
|
+
document.addEventListener('keydown', onEscapeKeyDown);
|
|
38
|
+
return () => {
|
|
39
|
+
document.removeEventListener('keydown', onEscapeKeyDown);
|
|
40
|
+
};
|
|
41
|
+
}, [onEscapeKeyDown]);
|
|
42
|
+
(0, react_1.useEffect)(() => setupRouteChangeHandler === null || setupRouteChangeHandler === void 0 ? void 0 : setupRouteChangeHandler(() => {
|
|
43
|
+
handleMouseLeave();
|
|
44
|
+
}), [handleMouseLeave, setupRouteChangeHandler]);
|
|
45
|
+
return (react_1.default.createElement("div", { className: b(), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave },
|
|
46
|
+
data.text,
|
|
47
|
+
react_1.default.createElement(uikit_1.Icon, { data: isActive ? icons_1.ChevronUp : icons_1.ChevronDown, size: 14 }),
|
|
48
|
+
isActive && (react_1.default.createElement(NHNavigationPopup_1.NHNavigationPopup, { headerRef: headerRef },
|
|
49
|
+
react_1.default.createElement(NHLoginPopup_1.NHLoginPopup, Object.assign({}, data))))));
|
|
50
|
+
};
|
|
51
|
+
exports.NHLoginButton = NHLoginButton;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
|
2
|
+
unpredictable css rules order in build */
|
|
3
|
+
.pc-addons-nh-login-popup {
|
|
4
|
+
border-radius: 16px;
|
|
5
|
+
background: var(--g-color-base-float);
|
|
6
|
+
box-shadow: 0 4px 24px var(--g-color-base-generic), 0 2px 8px var(--g-color-base-generic);
|
|
7
|
+
max-height: calc(100vh - 64px - 64px);
|
|
8
|
+
overflow: auto;
|
|
9
|
+
max-width: 260px;
|
|
10
|
+
margin-left: auto;
|
|
11
|
+
width: 100%;
|
|
12
|
+
scrollbar-width: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.pc-addons-nh-login-popup::-webkit-scrollbar {
|
|
16
|
+
display: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.pc-addons-nh-login-popup__container {
|
|
20
|
+
padding: 8px;
|
|
21
|
+
gap: 8px;
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.pc-addons-nh-login-popup__item {
|
|
27
|
+
padding: 8px;
|
|
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;
|
|
51
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NHLoginPopup = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const gravity_ui_page_constructor_1 = require("@doyourjob/gravity-ui-page-constructor");
|
|
7
|
+
const cn_1 = require("../../../../utils/cn");
|
|
8
|
+
const b = (0, cn_1.block)('nh-login-popup');
|
|
9
|
+
const NHLoginPopup = ({ items }) => (react_1.default.createElement(gravity_ui_page_constructor_1.Grid, { className: b(), containerClass: b('container') }, items.map((item) => (react_1.default.createElement("a", Object.assign({ href: item.url, className: b('item'), key: item.title }, (0, gravity_ui_page_constructor_1.getLinkProps)(item.url || '')),
|
|
10
|
+
react_1.default.createElement("div", { className: b('title') }, item.title),
|
|
11
|
+
react_1.default.createElement("div", { className: b('subtitle') }, item.subtitle))))));
|
|
12
|
+
exports.NHLoginPopup = NHLoginPopup;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NHMediumPopup = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(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-medium-popup');
|
|
10
|
+
const NHMediumPopup = ({ groups }) => (react_1.default.createElement(gravity_ui_page_constructor_1.Grid, null,
|
|
11
|
+
react_1.default.createElement(gravity_ui_page_constructor_1.Row, null,
|
|
12
|
+
react_1.default.createElement(gravity_ui_page_constructor_1.Col, { className: b() }, groups.map((dataItem) => dataItem.items.map((item) => (react_1.default.createElement(NHPopupItem_1.NHPopupItem, Object.assign({}, item, { key: item.title, hover: true, imageSize: dataItem.imageSize, sizes: {
|
|
13
|
+
[gravity_ui_page_constructor_1.GridColumnSize.Xl]: 3,
|
|
14
|
+
[gravity_ui_page_constructor_1.GridColumnSize.Md]: 4,
|
|
15
|
+
[gravity_ui_page_constructor_1.GridColumnSize.All]: 12,
|
|
16
|
+
} })))))))));
|
|
17
|
+
exports.NHMediumPopup = NHMediumPopup;
|