@doyourjob/gravity-ui-page-constructor-addons 2.1.24 → 2.1.25-dev.0
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/Navigation/components/Navigation/NavigationItemsList/NavigationItemsList.js +1 -1
- package/build/cjs/components/NewHeader/NewHeader.css +162 -0
- package/build/cjs/components/NewHeader/NewHeader.d.ts +13 -0
- package/build/cjs/components/NewHeader/NewHeader.js +79 -0
- package/build/cjs/components/NewHeader/components/CompanyPopup/CompanyPopup.css +30 -0
- package/build/cjs/components/NewHeader/components/CompanyPopup/CompanyPopup.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/CompanyPopup/CompanyPopup.js +20 -0
- package/build/cjs/components/NewHeader/components/InvestorPopup/InvestorPopup.css +79 -0
- package/build/cjs/components/NewHeader/components/InvestorPopup/InvestorPopup.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/InvestorPopup/InvestorPopup.js +22 -0
- package/build/cjs/components/NewHeader/components/LoginButton/LoginButton.d.ts +10 -0
- package/build/cjs/components/NewHeader/components/LoginButton/LoginButton.js +46 -0
- package/build/cjs/components/NewHeader/components/LoginPopup/LoginPopup.css +45 -0
- package/build/cjs/components/NewHeader/components/LoginPopup/LoginPopup.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/LoginPopup/LoginPopup.js +12 -0
- package/build/cjs/components/NewHeader/components/MediumPopup/MediumPopup.css +8 -0
- package/build/cjs/components/NewHeader/components/MediumPopup/MediumPopup.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/MediumPopup/MediumPopup.js +17 -0
- package/build/cjs/components/NewHeader/components/MobileNavigation/MobileNavigation.css +47 -0
- package/build/cjs/components/NewHeader/components/MobileNavigation/MobileNavigation.d.ts +14 -0
- package/build/cjs/components/NewHeader/components/MobileNavigation/MobileNavigation.js +25 -0
- package/build/cjs/components/NewHeader/components/MobileNavigationItem/MobileNavigationItem.css +75 -0
- package/build/cjs/components/NewHeader/components/MobileNavigationItem/MobileNavigationItem.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/MobileNavigationItem/MobileNavigationItem.js +30 -0
- package/build/cjs/components/NewHeader/components/MobileNavigationPopup/MobileNavigationPopup.css +55 -0
- package/build/cjs/components/NewHeader/components/MobileNavigationPopup/MobileNavigationPopup.d.ts +9 -0
- package/build/cjs/components/NewHeader/components/MobileNavigationPopup/MobileNavigationPopup.js +47 -0
- package/build/cjs/components/NewHeader/components/Navigation/Navigation.css +23 -0
- package/build/cjs/components/NewHeader/components/Navigation/Navigation.d.ts +10 -0
- package/build/cjs/components/NewHeader/components/Navigation/Navigation.js +74 -0
- package/build/cjs/components/NewHeader/components/NavigationItem/NavigationItem.css +81 -0
- package/build/cjs/components/NewHeader/components/NavigationItem/NavigationItem.d.ts +12 -0
- package/build/cjs/components/NewHeader/components/NavigationItem/NavigationItem.js +29 -0
- package/build/cjs/components/NewHeader/components/NavigationPopup/NavigationPopup.css +10 -0
- package/build/cjs/components/NewHeader/components/NavigationPopup/NavigationPopup.d.ts +9 -0
- package/build/cjs/components/NewHeader/components/NavigationPopup/NavigationPopup.js +18 -0
- package/build/cjs/components/NewHeader/components/PopupItem/PopupItem.css +111 -0
- package/build/cjs/components/NewHeader/components/PopupItem/PopupItem.d.ts +12 -0
- package/build/cjs/components/NewHeader/components/PopupItem/PopupItem.js +28 -0
- package/build/cjs/components/NewHeader/components/ProductsPopup/ProductsPopup.css +113 -0
- package/build/cjs/components/NewHeader/components/ProductsPopup/ProductsPopup.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/ProductsPopup/ProductsPopup.js +65 -0
- package/build/cjs/components/NewHeader/components/ResourcesPopup/ResourcesPopup.css +191 -0
- package/build/cjs/components/NewHeader/components/ResourcesPopup/ResourcesPopup.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/ResourcesPopup/ResourcesPopup.js +42 -0
- package/build/cjs/components/NewHeader/components/SolutionsPopup/SolutionsPopup.css +49 -0
- package/build/cjs/components/NewHeader/components/SolutionsPopup/SolutionsPopup.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/SolutionsPopup/SolutionsPopup.js +20 -0
- package/build/cjs/components/NewHeader/components/Tag/Tag.css +21 -0
- package/build/cjs/components/NewHeader/components/Tag/Tag.d.ts +6 -0
- package/build/cjs/components/NewHeader/components/Tag/Tag.js +22 -0
- package/build/cjs/components/NewHeader/components/WhyPopup/WhyPopup.css +81 -0
- package/build/cjs/components/NewHeader/components/WhyPopup/WhyPopup.d.ts +3 -0
- package/build/cjs/components/NewHeader/components/WhyPopup/WhyPopup.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 +199 -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/Navigation/components/Navigation/NavigationItemsList/NavigationItemsList.js +1 -1
- package/build/esm/components/NewHeader/NewHeader.css +162 -0
- package/build/esm/components/NewHeader/NewHeader.d.ts +14 -0
- package/build/esm/components/NewHeader/NewHeader.js +75 -0
- package/build/esm/components/NewHeader/components/CompanyPopup/CompanyPopup.css +30 -0
- package/build/esm/components/NewHeader/components/CompanyPopup/CompanyPopup.d.ts +4 -0
- package/build/esm/components/NewHeader/components/CompanyPopup/CompanyPopup.js +16 -0
- package/build/esm/components/NewHeader/components/InvestorPopup/InvestorPopup.css +79 -0
- package/build/esm/components/NewHeader/components/InvestorPopup/InvestorPopup.d.ts +4 -0
- package/build/esm/components/NewHeader/components/InvestorPopup/InvestorPopup.js +18 -0
- package/build/esm/components/NewHeader/components/LoginButton/LoginButton.d.ts +10 -0
- package/build/esm/components/NewHeader/components/LoginButton/LoginButton.js +41 -0
- package/build/esm/components/NewHeader/components/LoginPopup/LoginPopup.css +45 -0
- package/build/esm/components/NewHeader/components/LoginPopup/LoginPopup.d.ts +4 -0
- package/build/esm/components/NewHeader/components/LoginPopup/LoginPopup.js +8 -0
- package/build/esm/components/NewHeader/components/MediumPopup/MediumPopup.css +8 -0
- package/build/esm/components/NewHeader/components/MediumPopup/MediumPopup.d.ts +4 -0
- package/build/esm/components/NewHeader/components/MediumPopup/MediumPopup.js +13 -0
- package/build/esm/components/NewHeader/components/MobileNavigation/MobileNavigation.css +47 -0
- package/build/esm/components/NewHeader/components/MobileNavigation/MobileNavigation.d.ts +15 -0
- package/build/esm/components/NewHeader/components/MobileNavigation/MobileNavigation.js +21 -0
- package/build/esm/components/NewHeader/components/MobileNavigationItem/MobileNavigationItem.css +75 -0
- package/build/esm/components/NewHeader/components/MobileNavigationItem/MobileNavigationItem.d.ts +4 -0
- package/build/esm/components/NewHeader/components/MobileNavigationItem/MobileNavigationItem.js +26 -0
- package/build/esm/components/NewHeader/components/MobileNavigationPopup/MobileNavigationPopup.css +55 -0
- package/build/esm/components/NewHeader/components/MobileNavigationPopup/MobileNavigationPopup.d.ts +10 -0
- package/build/esm/components/NewHeader/components/MobileNavigationPopup/MobileNavigationPopup.js +43 -0
- package/build/esm/components/NewHeader/components/Navigation/Navigation.css +23 -0
- package/build/esm/components/NewHeader/components/Navigation/Navigation.d.ts +11 -0
- package/build/esm/components/NewHeader/components/Navigation/Navigation.js +70 -0
- package/build/esm/components/NewHeader/components/NavigationItem/NavigationItem.css +81 -0
- package/build/esm/components/NewHeader/components/NavigationItem/NavigationItem.d.ts +13 -0
- package/build/esm/components/NewHeader/components/NavigationItem/NavigationItem.js +25 -0
- package/build/esm/components/NewHeader/components/NavigationPopup/NavigationPopup.css +10 -0
- package/build/esm/components/NewHeader/components/NavigationPopup/NavigationPopup.d.ts +10 -0
- package/build/esm/components/NewHeader/components/NavigationPopup/NavigationPopup.js +14 -0
- package/build/esm/components/NewHeader/components/PopupItem/PopupItem.css +111 -0
- package/build/esm/components/NewHeader/components/PopupItem/PopupItem.d.ts +13 -0
- package/build/esm/components/NewHeader/components/PopupItem/PopupItem.js +24 -0
- package/build/esm/components/NewHeader/components/ProductsPopup/ProductsPopup.css +113 -0
- package/build/esm/components/NewHeader/components/ProductsPopup/ProductsPopup.d.ts +4 -0
- package/build/esm/components/NewHeader/components/ProductsPopup/ProductsPopup.js +61 -0
- package/build/esm/components/NewHeader/components/ResourcesPopup/ResourcesPopup.css +191 -0
- package/build/esm/components/NewHeader/components/ResourcesPopup/ResourcesPopup.d.ts +4 -0
- package/build/esm/components/NewHeader/components/ResourcesPopup/ResourcesPopup.js +38 -0
- package/build/esm/components/NewHeader/components/SolutionsPopup/SolutionsPopup.css +49 -0
- package/build/esm/components/NewHeader/components/SolutionsPopup/SolutionsPopup.d.ts +4 -0
- package/build/esm/components/NewHeader/components/SolutionsPopup/SolutionsPopup.js +16 -0
- package/build/esm/components/NewHeader/components/Tag/Tag.css +21 -0
- package/build/esm/components/NewHeader/components/Tag/Tag.d.ts +7 -0
- package/build/esm/components/NewHeader/components/Tag/Tag.js +18 -0
- package/build/esm/components/NewHeader/components/WhyPopup/WhyPopup.css +81 -0
- package/build/esm/components/NewHeader/components/WhyPopup/WhyPopup.d.ts +4 -0
- package/build/esm/components/NewHeader/components/WhyPopup/WhyPopup.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 +199 -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
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ClassNameProps } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
|
+
import { NavigationTag as NavigationTagModel } from '../../models';
|
|
4
|
+
export interface NavigationTagProps extends NavigationTagModel, ClassNameProps {
|
|
5
|
+
}
|
|
6
|
+
export declare const NavigationTag: ({ text, color, textColor, className, size, }: NavigationTagProps) => React.JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NavigationTag = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const cn_1 = require("../../../../utils/cn");
|
|
7
|
+
const models_1 = require("../../models");
|
|
8
|
+
const b = (0, cn_1.block)('navigation-tag');
|
|
9
|
+
const getColor = (color) => {
|
|
10
|
+
switch (color) {
|
|
11
|
+
case models_1.NavigationTagColor.Yellow:
|
|
12
|
+
return 'var(--pc-addons-navigation-color-tag-yellow)';
|
|
13
|
+
case models_1.NavigationTagColor.Blue:
|
|
14
|
+
return 'var(--pc-addons-navigation-color-tag-blue)';
|
|
15
|
+
case models_1.NavigationTagColor.Green:
|
|
16
|
+
return 'var(--pc-addons-navigation-color-tag-green)';
|
|
17
|
+
default:
|
|
18
|
+
return color;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const NavigationTag = ({ text, color = models_1.NavigationTagColor.Yellow, textColor, className, size = 'm', }) => (react_1.default.createElement("div", { className: b({ size }, className), style: { backgroundColor: getColor(color), color: textColor } }, text));
|
|
22
|
+
exports.NavigationTag = NavigationTag;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
|
2
|
+
unpredictable css rules order in build */
|
|
3
|
+
.pc-addons-why-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
|
+
width: 100%;
|
|
10
|
+
border-radius: var(--pc-border-radius, 24px);
|
|
11
|
+
scrollbar-width: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.pc-addons-why-popup::-webkit-scrollbar {
|
|
15
|
+
display: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.pc-addons-why-popup__container {
|
|
19
|
+
padding: 0;
|
|
20
|
+
display: flex;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.pc-addons-why-popup__wrap {
|
|
24
|
+
padding: 20px;
|
|
25
|
+
display: flex;
|
|
26
|
+
gap: 16px;
|
|
27
|
+
flex: 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.pc-addons-why-popup__group {
|
|
31
|
+
flex: 1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.pc-addons-why-popup__title {
|
|
35
|
+
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
36
|
+
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
37
|
+
padding: 12px;
|
|
38
|
+
font-weight: 500;
|
|
39
|
+
color: #9fb1bd;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.pc-addons-why-popup__card {
|
|
43
|
+
font-weight: 500;
|
|
44
|
+
width: 300px;
|
|
45
|
+
flex-shrink: 0;
|
|
46
|
+
padding: 0;
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
background-color: #f2f6f9;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.pc-addons-why-popup__card-wrap {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
padding: 24px;
|
|
57
|
+
gap: 20px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.pc-addons-why-popup__card-title {
|
|
61
|
+
font-size: var(--g-text-header-1-font-size, var(--pc-text-header-1-font-size));
|
|
62
|
+
line-height: var(--g-text-header-1-line-height, var(--pc-text-header-1-line-height));
|
|
63
|
+
color: #9fb1bd;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.pc-addons-why-popup__card-description {
|
|
67
|
+
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
68
|
+
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
69
|
+
color: #9fb1bd;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.pc-addons-why-popup__card-container-image {
|
|
73
|
+
width: 100%;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.pc-addons-why-popup__card-image {
|
|
77
|
+
width: 100%;
|
|
78
|
+
aspect-ratio: 300/244;
|
|
79
|
+
background-color: #99a5ae;
|
|
80
|
+
display: block;
|
|
81
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WhyPopup = 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 PopupItem_1 = require("../PopupItem/PopupItem");
|
|
9
|
+
const b = (0, cn_1.block)('why-popup');
|
|
10
|
+
const WhyPopup = ({ groups, card }) => (react_1.default.createElement(gravity_ui_page_constructor_1.Grid, { className: b(), containerClass: b('container') },
|
|
11
|
+
react_1.default.createElement("div", { className: b('wrap') }, groups.map((group) => (react_1.default.createElement("div", { className: b('group'), key: group.title },
|
|
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("div", { className: b('title') }, group.title))),
|
|
15
|
+
react_1.default.createElement(gravity_ui_page_constructor_1.Row, null, group.items.map((item) => (react_1.default.createElement(PopupItem_1.PopupItem, Object.assign({ key: item.title }, item, { sizes: { [gravity_ui_page_constructor_1.GridColumnSize.All]: 12 } }))))))))),
|
|
16
|
+
card && (react_1.default.createElement("div", { className: b('card') },
|
|
17
|
+
react_1.default.createElement(gravity_ui_page_constructor_1.Image, { className: b('card-image'), containerClassName: b('card-container-image'), src: card.image }),
|
|
18
|
+
react_1.default.createElement("div", { className: b('card-wrap') },
|
|
19
|
+
react_1.default.createElement("div", { className: b('card-title') }, card.title),
|
|
20
|
+
react_1.default.createElement("div", { className: b('card-description') }, card.description))))));
|
|
21
|
+
exports.WhyPopup = WhyPopup;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DefaultCategorizedItemSizes = exports.NO_MENU_TAB_SELECTED = exports.SWITCH_MENU_TAB_TIMEOUT = void 0;
|
|
4
|
+
const gravity_ui_page_constructor_1 = require("@doyourjob/gravity-ui-page-constructor");
|
|
5
|
+
exports.SWITCH_MENU_TAB_TIMEOUT = 200;
|
|
6
|
+
exports.NO_MENU_TAB_SELECTED = -1;
|
|
7
|
+
exports.DefaultCategorizedItemSizes = {
|
|
8
|
+
[gravity_ui_page_constructor_1.GridColumnSize.Lg]: 4,
|
|
9
|
+
[gravity_ui_page_constructor_1.GridColumnSize.Sm]: 6,
|
|
10
|
+
[gravity_ui_page_constructor_1.GridColumnSize.All]: 12,
|
|
11
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RouteChangeHandlerContext = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
exports.RouteChangeHandlerContext = react_1.default.createContext(undefined);
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import type { ButtonProps, LinkProps } from '@doyourjob/gravity-ui-page-constructor';
|
|
2
|
+
export declare enum NavigationItemType {
|
|
3
|
+
MediumPopup = "medium-popup",
|
|
4
|
+
ProductsPopup = "products-popup",
|
|
5
|
+
SolutionsPopup = "solutions-popup",
|
|
6
|
+
WhyPopup = "why-popup",
|
|
7
|
+
ResourcesPopup = "resources-popup",
|
|
8
|
+
CompanyPopup = "company-popup",
|
|
9
|
+
InvestorPopup = "investor-popup",
|
|
10
|
+
Link = "link"
|
|
11
|
+
}
|
|
12
|
+
export declare enum NavigationTagColor {
|
|
13
|
+
Green = "green",
|
|
14
|
+
Yellow = "yellow",
|
|
15
|
+
Blue = "blue"
|
|
16
|
+
}
|
|
17
|
+
export interface LogoData {
|
|
18
|
+
href?: string;
|
|
19
|
+
src?: string;
|
|
20
|
+
alt?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface NavigationTag {
|
|
23
|
+
text: string;
|
|
24
|
+
color?: string;
|
|
25
|
+
textColor?: string;
|
|
26
|
+
size?: 's' | 'm';
|
|
27
|
+
}
|
|
28
|
+
export interface PopupItemData {
|
|
29
|
+
title: string;
|
|
30
|
+
url: string;
|
|
31
|
+
slug?: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
icon?: string;
|
|
34
|
+
image?: string | null;
|
|
35
|
+
tag?: NavigationTag;
|
|
36
|
+
}
|
|
37
|
+
export interface CategoryGroupData {
|
|
38
|
+
title?: string;
|
|
39
|
+
items: PopupItemData[];
|
|
40
|
+
imageSize?: 's' | 'xm' | 'm';
|
|
41
|
+
url?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface MediumPopupData {
|
|
44
|
+
groups: CategoryGroupData[];
|
|
45
|
+
}
|
|
46
|
+
export interface SpecialCardData {
|
|
47
|
+
title: string;
|
|
48
|
+
description: string;
|
|
49
|
+
image: string;
|
|
50
|
+
}
|
|
51
|
+
export interface RunCardData {
|
|
52
|
+
title: string;
|
|
53
|
+
description: string;
|
|
54
|
+
image: string;
|
|
55
|
+
border?: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface ProductsPopupSection {
|
|
58
|
+
title: string;
|
|
59
|
+
subtitle: string;
|
|
60
|
+
items?: PopupItemData[];
|
|
61
|
+
runCards?: RunCardData[];
|
|
62
|
+
}
|
|
63
|
+
export interface ProductsPopupData {
|
|
64
|
+
sections: ProductsPopupSection[];
|
|
65
|
+
poweredCard: SpecialCardData;
|
|
66
|
+
}
|
|
67
|
+
export interface SolutionsPopupSection {
|
|
68
|
+
title: string;
|
|
69
|
+
subtitle: string;
|
|
70
|
+
items: PopupItemData[];
|
|
71
|
+
}
|
|
72
|
+
export interface SolutionsPopupData {
|
|
73
|
+
sections: SolutionsPopupSection[];
|
|
74
|
+
}
|
|
75
|
+
export interface WhyPopupGroup {
|
|
76
|
+
title: string;
|
|
77
|
+
items: PopupItemData[];
|
|
78
|
+
}
|
|
79
|
+
export interface WhyPopupData {
|
|
80
|
+
groups: WhyPopupGroup[];
|
|
81
|
+
card: SpecialCardData;
|
|
82
|
+
}
|
|
83
|
+
export interface BannerData {
|
|
84
|
+
title: string;
|
|
85
|
+
description: string;
|
|
86
|
+
image: string;
|
|
87
|
+
icon: string;
|
|
88
|
+
url: string;
|
|
89
|
+
}
|
|
90
|
+
export interface EventCardData {
|
|
91
|
+
tag: string;
|
|
92
|
+
title: string;
|
|
93
|
+
date: string;
|
|
94
|
+
image: string;
|
|
95
|
+
location: string;
|
|
96
|
+
}
|
|
97
|
+
export interface ResourcesPopupGroup {
|
|
98
|
+
title: string;
|
|
99
|
+
subtitle: string;
|
|
100
|
+
url: string;
|
|
101
|
+
items: PopupItemData[];
|
|
102
|
+
}
|
|
103
|
+
export interface ResourcesPopupData {
|
|
104
|
+
groups: ResourcesPopupGroup[];
|
|
105
|
+
banner: BannerData;
|
|
106
|
+
events: {
|
|
107
|
+
title: string;
|
|
108
|
+
items: EventCardData[];
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
export interface CompanyPopupSection {
|
|
112
|
+
title: string;
|
|
113
|
+
items: PopupItemData[];
|
|
114
|
+
}
|
|
115
|
+
export interface CompanyPopupData {
|
|
116
|
+
sections: CompanyPopupSection[];
|
|
117
|
+
}
|
|
118
|
+
export interface StockData {
|
|
119
|
+
title: string;
|
|
120
|
+
price: string;
|
|
121
|
+
date: string;
|
|
122
|
+
}
|
|
123
|
+
export interface InvestorPopupData {
|
|
124
|
+
title: string;
|
|
125
|
+
subtitle: string;
|
|
126
|
+
url: string;
|
|
127
|
+
items: PopupItemData[];
|
|
128
|
+
stock: StockData;
|
|
129
|
+
}
|
|
130
|
+
export interface LoginItemData {
|
|
131
|
+
title: string;
|
|
132
|
+
subtitle: string;
|
|
133
|
+
url?: string;
|
|
134
|
+
}
|
|
135
|
+
export interface LoginPopupData {
|
|
136
|
+
text: string;
|
|
137
|
+
items: LoginItemData[];
|
|
138
|
+
}
|
|
139
|
+
export interface NavigationDefaultData {
|
|
140
|
+
title: string;
|
|
141
|
+
}
|
|
142
|
+
export interface NavigationLinkData extends NavigationDefaultData {
|
|
143
|
+
type: NavigationItemType.Link;
|
|
144
|
+
data: LinkProps;
|
|
145
|
+
}
|
|
146
|
+
export interface NavigationMediumPopupData extends NavigationDefaultData {
|
|
147
|
+
type: NavigationItemType.MediumPopup;
|
|
148
|
+
data: MediumPopupData;
|
|
149
|
+
}
|
|
150
|
+
export interface NavigationProductsPopupData extends NavigationDefaultData {
|
|
151
|
+
type: NavigationItemType.ProductsPopup;
|
|
152
|
+
data: ProductsPopupData;
|
|
153
|
+
}
|
|
154
|
+
export interface NavigationSolutionsPopupData extends NavigationDefaultData {
|
|
155
|
+
type: NavigationItemType.SolutionsPopup;
|
|
156
|
+
data: SolutionsPopupData;
|
|
157
|
+
}
|
|
158
|
+
export interface NavigationWhyPopupData extends NavigationDefaultData {
|
|
159
|
+
type: NavigationItemType.WhyPopup;
|
|
160
|
+
data: WhyPopupData;
|
|
161
|
+
}
|
|
162
|
+
export interface NavigationResourcesPopupData extends NavigationDefaultData {
|
|
163
|
+
type: NavigationItemType.ResourcesPopup;
|
|
164
|
+
data: ResourcesPopupData;
|
|
165
|
+
}
|
|
166
|
+
export interface NavigationCompanyPopupData extends NavigationDefaultData {
|
|
167
|
+
type: NavigationItemType.CompanyPopup;
|
|
168
|
+
data: CompanyPopupData;
|
|
169
|
+
}
|
|
170
|
+
export interface NavigationInvestorPopupData extends NavigationDefaultData {
|
|
171
|
+
type: NavigationItemType.InvestorPopup;
|
|
172
|
+
data: InvestorPopupData;
|
|
173
|
+
}
|
|
174
|
+
export type NavigationItemData = NavigationLinkData | NavigationMediumPopupData | NavigationProductsPopupData | NavigationSolutionsPopupData | NavigationWhyPopupData | NavigationResourcesPopupData | NavigationCompanyPopupData | NavigationInvestorPopupData;
|
|
175
|
+
export interface MobileNavigationDefaultData {
|
|
176
|
+
title: string;
|
|
177
|
+
}
|
|
178
|
+
export interface MobileNavigationLinkData extends MobileNavigationDefaultData {
|
|
179
|
+
link: LinkProps;
|
|
180
|
+
}
|
|
181
|
+
export interface MobileNavigationGroupData extends MobileNavigationDefaultData {
|
|
182
|
+
data: {
|
|
183
|
+
title?: string;
|
|
184
|
+
items: {
|
|
185
|
+
title: string;
|
|
186
|
+
url: string;
|
|
187
|
+
}[];
|
|
188
|
+
}[];
|
|
189
|
+
}
|
|
190
|
+
export type MobileNavigationItemData = MobileNavigationLinkData | MobileNavigationGroupData;
|
|
191
|
+
export interface NavigationData {
|
|
192
|
+
left: NavigationItemData[];
|
|
193
|
+
right: NavigationItemData[];
|
|
194
|
+
mobile: MobileNavigationItemData[];
|
|
195
|
+
login: LoginPopupData;
|
|
196
|
+
logo: LogoData;
|
|
197
|
+
buttons: ButtonProps[];
|
|
198
|
+
}
|
|
199
|
+
export type SetupRouteChangeHandler = (handler: () => void) => void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NavigationTagColor = exports.NavigationItemType = void 0;
|
|
4
|
+
var NavigationItemType;
|
|
5
|
+
(function (NavigationItemType) {
|
|
6
|
+
NavigationItemType["MediumPopup"] = "medium-popup";
|
|
7
|
+
NavigationItemType["ProductsPopup"] = "products-popup";
|
|
8
|
+
NavigationItemType["SolutionsPopup"] = "solutions-popup";
|
|
9
|
+
NavigationItemType["WhyPopup"] = "why-popup";
|
|
10
|
+
NavigationItemType["ResourcesPopup"] = "resources-popup";
|
|
11
|
+
NavigationItemType["CompanyPopup"] = "company-popup";
|
|
12
|
+
NavigationItemType["InvestorPopup"] = "investor-popup";
|
|
13
|
+
NavigationItemType["Link"] = "link";
|
|
14
|
+
})(NavigationItemType = exports.NavigationItemType || (exports.NavigationItemType = {}));
|
|
15
|
+
var NavigationTagColor;
|
|
16
|
+
(function (NavigationTagColor) {
|
|
17
|
+
NavigationTagColor["Green"] = "green";
|
|
18
|
+
NavigationTagColor["Yellow"] = "yellow";
|
|
19
|
+
NavigationTagColor["Blue"] = "blue";
|
|
20
|
+
})(NavigationTagColor = exports.NavigationTagColor || (exports.NavigationTagColor = {}));
|
|
File without changes
|
|
@@ -4,3 +4,4 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
tslib_1.__exportStar(require("./EnrichedLink/EnrichedLink"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./Navigation"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./HeaderStripe/HeaderStripe"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./NewHeader/NewHeader"), exports);
|
|
@@ -5,8 +5,8 @@ import './Navigation.css';
|
|
|
5
5
|
interface NavigationProps {
|
|
6
6
|
data: NavigationSectionData[];
|
|
7
7
|
withBackground: boolean;
|
|
8
|
-
handleOpenPopup
|
|
9
|
-
handleClosePopup
|
|
8
|
+
handleOpenPopup?: () => void;
|
|
9
|
+
handleClosePopup?: () => void;
|
|
10
10
|
headerRef?: RefObject<HTMLDivElement>;
|
|
11
11
|
setupRouteChangeHandler?: SetupRouteChangeHandler;
|
|
12
12
|
}
|
package/build/esm/components/Navigation/components/Navigation/NavigationItem/NavigationItem.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ interface NavigationItemOwnProps {
|
|
|
5
5
|
index: number;
|
|
6
6
|
item: NavigationSectionData;
|
|
7
7
|
isActive: boolean;
|
|
8
|
-
handleOpenPopup
|
|
9
|
-
handleClosePopup
|
|
8
|
+
handleOpenPopup?: () => void;
|
|
9
|
+
handleClosePopup?: () => void;
|
|
10
10
|
handleActiveTab: (currentIndex: number) => void;
|
|
11
11
|
children?: ReactNode;
|
|
12
12
|
tooltipId?: string;
|
package/build/esm/components/Navigation/components/Navigation/NavigationItem/NavigationItem.js
CHANGED
|
@@ -21,12 +21,12 @@ export const NavigationItem = ({ item, isActive, handleActiveTab, handleOpenPopu
|
|
|
21
21
|
const handleMouseEnter = useCallback(() => {
|
|
22
22
|
handleActiveTab(index);
|
|
23
23
|
if (isPopupExist) {
|
|
24
|
-
handleOpenPopup();
|
|
24
|
+
handleOpenPopup === null || handleOpenPopup === void 0 ? void 0 : handleOpenPopup();
|
|
25
25
|
}
|
|
26
26
|
}, [handleActiveTab, handleOpenPopup, index, isPopupExist]);
|
|
27
27
|
const handleMouseLeave = useCallback(() => {
|
|
28
28
|
if (isPopupExist) {
|
|
29
|
-
handleClosePopup();
|
|
29
|
+
handleClosePopup === null || handleClosePopup === void 0 ? void 0 : handleClosePopup();
|
|
30
30
|
}
|
|
31
31
|
handleActiveTab(NO_MENU_TAB_SELECTED);
|
|
32
32
|
}, [handleActiveTab, handleClosePopup, isPopupExist]);
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { Row } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
3
|
import { NavigationPopupItem } from '../NavigationPopupItem/NavigationPopupItem';
|
|
4
4
|
export const NavigationItemsList = ({ items, itemClassName, className, sizes, }) => {
|
|
5
|
-
return (React.createElement(Row, { className: className }, items.map((item, index) => (React.createElement(NavigationPopupItem, Object.assign({}, item, { sizes: sizes, className: itemClassName, key: item.slug
|
|
5
|
+
return (React.createElement(Row, { className: className }, items.map((item, index) => (React.createElement(NavigationPopupItem, Object.assign({}, item, { sizes: sizes, className: itemClassName, key: `${item.slug}-${index}`, hover: true }))))));
|
|
6
6
|
};
|
|
@@ -0,0 +1,162 @@
|
|
|
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
|
+
}
|
|
34
|
+
|
|
35
|
+
.pc-addons-new-header__left {
|
|
36
|
+
margin-right: 32px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.pc-addons-new-header__right {
|
|
40
|
+
justify-content: flex-end;
|
|
41
|
+
width: 100%;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.pc-addons-new-header__icons-container {
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: flex-end;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.pc-addons-new-header__buttons {
|
|
51
|
+
display: flex;
|
|
52
|
+
margin-left: 8px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.pc-addons-new-header__icon {
|
|
56
|
+
color: var(--g-color-text-hint);
|
|
57
|
+
transition: color 0.2s;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.pc-addons-new-header__user {
|
|
61
|
+
margin-left: 12px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@media (max-width: 768px) {
|
|
65
|
+
.pc-addons-new-header__user {
|
|
66
|
+
display: none;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
.pc-addons-new-header__back {
|
|
70
|
+
position: relative;
|
|
71
|
+
left: 2px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.pc-addons-new-header__back-icon {
|
|
75
|
+
color: var(--g-color-text-hint);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.pc-addons-new-header__back {
|
|
79
|
+
display: none;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.pc-addons-new-header__back:hover:before {
|
|
83
|
+
background: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.pc-addons-new-header__back:hover .pc-addons-new-header__icon {
|
|
87
|
+
color: var(--g-color-text-complementary);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@media (max-width: 768px) {
|
|
91
|
+
.pc-addons-new-header__navigation {
|
|
92
|
+
display: none;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
.pc-addons-new-header__popup {
|
|
96
|
+
--yc-popup-border-width: 0;
|
|
97
|
+
--yc-popup-border-color: none;
|
|
98
|
+
border-radius: var(--pc-border-radius, 24px);
|
|
99
|
+
box-shadow: 0 3px 10px var(--g-color-base-generic-hover);
|
|
100
|
+
--yc-popover-max-width: 1296px;
|
|
101
|
+
--yc-popover-padding: 20px;
|
|
102
|
+
width: var(--yc-popover-max-width);
|
|
103
|
+
left: 0;
|
|
104
|
+
box-shadow: 0 4px 24px var(--g-color-base-generic-hover), 0 2px 8px var(--g-color-base-generic-hover);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.pc-addons-new-header__popup_with-background {
|
|
108
|
+
border-radius: 0 0 var(--pc-border-radius, 24px) var(--pc-border-radius, 24px);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.pc-addons-new-header__scroll-arrow {
|
|
112
|
+
height: 20px;
|
|
113
|
+
color: var(--g-color-text-hint);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.pc-addons-new-header__user-popup {
|
|
117
|
+
--yc-popup-border-width: 0;
|
|
118
|
+
--yc-popup-border-color: none;
|
|
119
|
+
border-radius: var(--g-border-radius-m);
|
|
120
|
+
box-shadow: 0 3px 10px var(--g-color-base-generic-hover);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@media (max-width: 1081px) {
|
|
124
|
+
.pc-addons-new-header__left {
|
|
125
|
+
margin-right: 0;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
@media (min-width: 769px) {
|
|
129
|
+
.pc-addons-new-header__logo-img {
|
|
130
|
+
height: 30px;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
@media (max-width: 768px) {
|
|
134
|
+
.pc-addons-new-header {
|
|
135
|
+
max-width: 100%;
|
|
136
|
+
padding: 16px 40px 16px 48px;
|
|
137
|
+
border-top-left-radius: 0;
|
|
138
|
+
border-top-right-radius: 0;
|
|
139
|
+
}
|
|
140
|
+
.pc-addons-new-header__left {
|
|
141
|
+
margin-right: 12px;
|
|
142
|
+
}
|
|
143
|
+
.pc-addons-new-header__icons-container {
|
|
144
|
+
flex-direction: row-reverse;
|
|
145
|
+
justify-content: flex-start;
|
|
146
|
+
}
|
|
147
|
+
.pc-addons-new-header_search .pc-addons-new-header__logo {
|
|
148
|
+
display: none;
|
|
149
|
+
}
|
|
150
|
+
.pc-addons-new-header_search .pc-addons-new-header__back {
|
|
151
|
+
display: block;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
@media (max-width: 576px) {
|
|
155
|
+
.pc-addons-new-header {
|
|
156
|
+
padding-left: 24px;
|
|
157
|
+
padding-right: 16px;
|
|
158
|
+
}
|
|
159
|
+
.pc-addons-new-header__container {
|
|
160
|
+
height: 64px;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ClassNameProps } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
|
+
import { NavigationData, SetupRouteChangeHandler } from './models';
|
|
4
|
+
import './NewHeader.css';
|
|
5
|
+
export declare const MOBILE_ICON_SIZE = 24;
|
|
6
|
+
export interface NewHeaderProps extends ClassNameProps {
|
|
7
|
+
data: NavigationData;
|
|
8
|
+
renderSearch?: (props: {
|
|
9
|
+
onActiveToggle: (isActive: boolean) => void;
|
|
10
|
+
}) => ReactNode;
|
|
11
|
+
setupRouteChangeHandler?: SetupRouteChangeHandler;
|
|
12
|
+
scrollOffset?: number;
|
|
13
|
+
}
|
|
14
|
+
export declare const NewHeader: ({ data, setupRouteChangeHandler, renderSearch, className, scrollOffset, }: NewHeaderProps) => React.JSX.Element;
|