@doyourjob/gravity-ui-page-constructor-addons 2.1.25-dev.0 → 2.1.25
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/index.d.ts +0 -1
- package/build/cjs/components/index.js +0 -1
- 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/index.d.ts +0 -1
- package/build/esm/components/index.js +0 -1
- package/package.json +1 -1
- package/build/cjs/components/NewHeader/NewHeader.css +0 -162
- package/build/cjs/components/NewHeader/NewHeader.d.ts +0 -13
- package/build/cjs/components/NewHeader/NewHeader.js +0 -79
- package/build/cjs/components/NewHeader/components/CompanyPopup/CompanyPopup.css +0 -30
- package/build/cjs/components/NewHeader/components/CompanyPopup/CompanyPopup.d.ts +0 -3
- package/build/cjs/components/NewHeader/components/CompanyPopup/CompanyPopup.js +0 -20
- package/build/cjs/components/NewHeader/components/InvestorPopup/InvestorPopup.css +0 -79
- package/build/cjs/components/NewHeader/components/InvestorPopup/InvestorPopup.d.ts +0 -3
- package/build/cjs/components/NewHeader/components/InvestorPopup/InvestorPopup.js +0 -22
- package/build/cjs/components/NewHeader/components/LoginButton/LoginButton.d.ts +0 -10
- package/build/cjs/components/NewHeader/components/LoginButton/LoginButton.js +0 -46
- package/build/cjs/components/NewHeader/components/LoginPopup/LoginPopup.css +0 -45
- package/build/cjs/components/NewHeader/components/LoginPopup/LoginPopup.d.ts +0 -3
- package/build/cjs/components/NewHeader/components/LoginPopup/LoginPopup.js +0 -12
- package/build/cjs/components/NewHeader/components/MediumPopup/MediumPopup.css +0 -8
- package/build/cjs/components/NewHeader/components/MediumPopup/MediumPopup.d.ts +0 -3
- package/build/cjs/components/NewHeader/components/MediumPopup/MediumPopup.js +0 -17
- package/build/cjs/components/NewHeader/components/MobileNavigation/MobileNavigation.css +0 -47
- package/build/cjs/components/NewHeader/components/MobileNavigation/MobileNavigation.d.ts +0 -14
- package/build/cjs/components/NewHeader/components/MobileNavigation/MobileNavigation.js +0 -25
- package/build/cjs/components/NewHeader/components/MobileNavigationItem/MobileNavigationItem.css +0 -75
- package/build/cjs/components/NewHeader/components/MobileNavigationItem/MobileNavigationItem.d.ts +0 -3
- package/build/cjs/components/NewHeader/components/MobileNavigationItem/MobileNavigationItem.js +0 -30
- package/build/cjs/components/NewHeader/components/MobileNavigationPopup/MobileNavigationPopup.css +0 -55
- package/build/cjs/components/NewHeader/components/MobileNavigationPopup/MobileNavigationPopup.d.ts +0 -9
- package/build/cjs/components/NewHeader/components/MobileNavigationPopup/MobileNavigationPopup.js +0 -47
- package/build/cjs/components/NewHeader/components/Navigation/Navigation.css +0 -23
- package/build/cjs/components/NewHeader/components/Navigation/Navigation.d.ts +0 -10
- package/build/cjs/components/NewHeader/components/Navigation/Navigation.js +0 -74
- package/build/cjs/components/NewHeader/components/NavigationItem/NavigationItem.css +0 -81
- package/build/cjs/components/NewHeader/components/NavigationItem/NavigationItem.d.ts +0 -12
- package/build/cjs/components/NewHeader/components/NavigationItem/NavigationItem.js +0 -29
- package/build/cjs/components/NewHeader/components/NavigationPopup/NavigationPopup.css +0 -10
- package/build/cjs/components/NewHeader/components/NavigationPopup/NavigationPopup.d.ts +0 -9
- package/build/cjs/components/NewHeader/components/NavigationPopup/NavigationPopup.js +0 -18
- package/build/cjs/components/NewHeader/components/PopupItem/PopupItem.css +0 -111
- package/build/cjs/components/NewHeader/components/PopupItem/PopupItem.d.ts +0 -12
- package/build/cjs/components/NewHeader/components/PopupItem/PopupItem.js +0 -28
- package/build/cjs/components/NewHeader/components/ProductsPopup/ProductsPopup.css +0 -113
- package/build/cjs/components/NewHeader/components/ProductsPopup/ProductsPopup.d.ts +0 -3
- package/build/cjs/components/NewHeader/components/ProductsPopup/ProductsPopup.js +0 -65
- package/build/cjs/components/NewHeader/components/ResourcesPopup/ResourcesPopup.css +0 -191
- package/build/cjs/components/NewHeader/components/ResourcesPopup/ResourcesPopup.d.ts +0 -3
- package/build/cjs/components/NewHeader/components/ResourcesPopup/ResourcesPopup.js +0 -42
- package/build/cjs/components/NewHeader/components/SolutionsPopup/SolutionsPopup.css +0 -49
- package/build/cjs/components/NewHeader/components/SolutionsPopup/SolutionsPopup.d.ts +0 -3
- package/build/cjs/components/NewHeader/components/SolutionsPopup/SolutionsPopup.js +0 -20
- package/build/cjs/components/NewHeader/components/Tag/Tag.css +0 -21
- package/build/cjs/components/NewHeader/components/Tag/Tag.d.ts +0 -6
- package/build/cjs/components/NewHeader/components/Tag/Tag.js +0 -22
- package/build/cjs/components/NewHeader/components/WhyPopup/WhyPopup.css +0 -81
- package/build/cjs/components/NewHeader/components/WhyPopup/WhyPopup.d.ts +0 -3
- package/build/cjs/components/NewHeader/components/WhyPopup/WhyPopup.js +0 -21
- package/build/cjs/components/NewHeader/constants.d.ts +0 -7
- package/build/cjs/components/NewHeader/constants.js +0 -11
- package/build/cjs/components/NewHeader/contexts/route-change.d.ts +0 -3
- package/build/cjs/components/NewHeader/contexts/route-change.js +0 -6
- package/build/cjs/components/NewHeader/models.d.ts +0 -199
- package/build/cjs/components/NewHeader/models.js +0 -20
- package/build/cjs/components/NewHeader/styles/mixins.css +0 -0
- package/build/cjs/components/NewHeader/styles/variables.css +0 -5
- package/build/esm/components/NewHeader/NewHeader.css +0 -162
- package/build/esm/components/NewHeader/NewHeader.d.ts +0 -14
- package/build/esm/components/NewHeader/NewHeader.js +0 -75
- package/build/esm/components/NewHeader/components/CompanyPopup/CompanyPopup.css +0 -30
- package/build/esm/components/NewHeader/components/CompanyPopup/CompanyPopup.d.ts +0 -4
- package/build/esm/components/NewHeader/components/CompanyPopup/CompanyPopup.js +0 -16
- package/build/esm/components/NewHeader/components/InvestorPopup/InvestorPopup.css +0 -79
- package/build/esm/components/NewHeader/components/InvestorPopup/InvestorPopup.d.ts +0 -4
- package/build/esm/components/NewHeader/components/InvestorPopup/InvestorPopup.js +0 -18
- package/build/esm/components/NewHeader/components/LoginButton/LoginButton.d.ts +0 -10
- package/build/esm/components/NewHeader/components/LoginButton/LoginButton.js +0 -41
- package/build/esm/components/NewHeader/components/LoginPopup/LoginPopup.css +0 -45
- package/build/esm/components/NewHeader/components/LoginPopup/LoginPopup.d.ts +0 -4
- package/build/esm/components/NewHeader/components/LoginPopup/LoginPopup.js +0 -8
- package/build/esm/components/NewHeader/components/MediumPopup/MediumPopup.css +0 -8
- package/build/esm/components/NewHeader/components/MediumPopup/MediumPopup.d.ts +0 -4
- package/build/esm/components/NewHeader/components/MediumPopup/MediumPopup.js +0 -13
- package/build/esm/components/NewHeader/components/MobileNavigation/MobileNavigation.css +0 -47
- package/build/esm/components/NewHeader/components/MobileNavigation/MobileNavigation.d.ts +0 -15
- package/build/esm/components/NewHeader/components/MobileNavigation/MobileNavigation.js +0 -21
- package/build/esm/components/NewHeader/components/MobileNavigationItem/MobileNavigationItem.css +0 -75
- package/build/esm/components/NewHeader/components/MobileNavigationItem/MobileNavigationItem.d.ts +0 -4
- package/build/esm/components/NewHeader/components/MobileNavigationItem/MobileNavigationItem.js +0 -26
- package/build/esm/components/NewHeader/components/MobileNavigationPopup/MobileNavigationPopup.css +0 -55
- package/build/esm/components/NewHeader/components/MobileNavigationPopup/MobileNavigationPopup.d.ts +0 -10
- package/build/esm/components/NewHeader/components/MobileNavigationPopup/MobileNavigationPopup.js +0 -43
- package/build/esm/components/NewHeader/components/Navigation/Navigation.css +0 -23
- package/build/esm/components/NewHeader/components/Navigation/Navigation.d.ts +0 -11
- package/build/esm/components/NewHeader/components/Navigation/Navigation.js +0 -70
- package/build/esm/components/NewHeader/components/NavigationItem/NavigationItem.css +0 -81
- package/build/esm/components/NewHeader/components/NavigationItem/NavigationItem.d.ts +0 -13
- package/build/esm/components/NewHeader/components/NavigationItem/NavigationItem.js +0 -25
- package/build/esm/components/NewHeader/components/NavigationPopup/NavigationPopup.css +0 -10
- package/build/esm/components/NewHeader/components/NavigationPopup/NavigationPopup.d.ts +0 -10
- package/build/esm/components/NewHeader/components/NavigationPopup/NavigationPopup.js +0 -14
- package/build/esm/components/NewHeader/components/PopupItem/PopupItem.css +0 -111
- package/build/esm/components/NewHeader/components/PopupItem/PopupItem.d.ts +0 -13
- package/build/esm/components/NewHeader/components/PopupItem/PopupItem.js +0 -24
- package/build/esm/components/NewHeader/components/ProductsPopup/ProductsPopup.css +0 -113
- package/build/esm/components/NewHeader/components/ProductsPopup/ProductsPopup.d.ts +0 -4
- package/build/esm/components/NewHeader/components/ProductsPopup/ProductsPopup.js +0 -61
- package/build/esm/components/NewHeader/components/ResourcesPopup/ResourcesPopup.css +0 -191
- package/build/esm/components/NewHeader/components/ResourcesPopup/ResourcesPopup.d.ts +0 -4
- package/build/esm/components/NewHeader/components/ResourcesPopup/ResourcesPopup.js +0 -38
- package/build/esm/components/NewHeader/components/SolutionsPopup/SolutionsPopup.css +0 -49
- package/build/esm/components/NewHeader/components/SolutionsPopup/SolutionsPopup.d.ts +0 -4
- package/build/esm/components/NewHeader/components/SolutionsPopup/SolutionsPopup.js +0 -16
- package/build/esm/components/NewHeader/components/Tag/Tag.css +0 -21
- package/build/esm/components/NewHeader/components/Tag/Tag.d.ts +0 -7
- package/build/esm/components/NewHeader/components/Tag/Tag.js +0 -18
- package/build/esm/components/NewHeader/components/WhyPopup/WhyPopup.css +0 -81
- package/build/esm/components/NewHeader/components/WhyPopup/WhyPopup.d.ts +0 -4
- package/build/esm/components/NewHeader/components/WhyPopup/WhyPopup.js +0 -17
- package/build/esm/components/NewHeader/constants.d.ts +0 -7
- package/build/esm/components/NewHeader/constants.js +0 -8
- package/build/esm/components/NewHeader/contexts/route-change.d.ts +0 -3
- package/build/esm/components/NewHeader/contexts/route-change.js +0 -2
- package/build/esm/components/NewHeader/models.d.ts +0 -199
- package/build/esm/components/NewHeader/models.js +0 -17
- package/build/esm/components/NewHeader/styles/mixins.css +0 -0
- package/build/esm/components/NewHeader/styles/variables.css +0 -5
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MediumPopup = 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)('medium-popup');
|
|
10
|
-
const MediumPopup = ({ 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(PopupItem_1.PopupItem, 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.MediumPopup = MediumPopup;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/* use this for style redefinitions to awoid problems with
|
|
2
|
-
unpredictable css rules order in build */
|
|
3
|
-
.pc-addons-mobile-navigation {
|
|
4
|
-
margin: 0;
|
|
5
|
-
padding: 0;
|
|
6
|
-
list-style: none;
|
|
7
|
-
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
8
|
-
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.pc-addons-mobile-navigation__icon {
|
|
12
|
-
display: none;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.pc-addons-mobile-navigation__icon:hover:before {
|
|
16
|
-
background: none;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.pc-addons-mobile-navigation__icon:hover .pc-addons-mobile-navigation__icon {
|
|
20
|
-
color: var(--g-color-text-complementary);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.pc-addons-mobile-navigation__icon-icon {
|
|
24
|
-
position: relative;
|
|
25
|
-
top: 3px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.pc-addons-mobile-navigation__icon_hidden {
|
|
29
|
-
display: none;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.pc-addons-mobile-navigation__user {
|
|
33
|
-
margin-top: 24px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.pc-addons-mobile-navigation__buttons {
|
|
37
|
-
margin-top: 8px;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
@media (max-width: 769px) {
|
|
41
|
-
.pc-addons-mobile-navigation__icon {
|
|
42
|
-
display: block;
|
|
43
|
-
}
|
|
44
|
-
.pc-addons-mobile-navigation__icon_hidden {
|
|
45
|
-
display: none;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ButtonProps } from '@doyourjob/gravity-ui-page-constructor';
|
|
3
|
-
import { MobileNavigationItemData } from '../../models';
|
|
4
|
-
interface MobileNavigationProps {
|
|
5
|
-
isOpened: boolean;
|
|
6
|
-
toogleOpen: (isOpened: boolean) => void;
|
|
7
|
-
isSearchOpen: boolean;
|
|
8
|
-
data: MobileNavigationItemData[];
|
|
9
|
-
onMenuScroll: (scrollTop: number) => void;
|
|
10
|
-
popupClassName?: string;
|
|
11
|
-
buttons?: ButtonProps[];
|
|
12
|
-
}
|
|
13
|
-
export declare const MobileNavigation: ({ isOpened, toogleOpen, isSearchOpen, data, buttons, onMenuScroll, }: MobileNavigationProps) => React.JSX.Element;
|
|
14
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MobileNavigation = 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 icons_1 = require("@gravity-ui/icons");
|
|
8
|
-
const uikit_1 = require("@gravity-ui/uikit");
|
|
9
|
-
const cn_1 = require("../../../../utils/cn");
|
|
10
|
-
const MobileNavigationItem_1 = require("../MobileNavigationItem/MobileNavigationItem");
|
|
11
|
-
const MobileNavigationPopup_1 = require("../MobileNavigationPopup/MobileNavigationPopup");
|
|
12
|
-
const b = (0, cn_1.block)('mobile-navigation');
|
|
13
|
-
const MobileNavigation = ({ isOpened, toogleOpen, isSearchOpen, data, buttons, onMenuScroll, }) => (react_1.default.createElement("div", { className: b() },
|
|
14
|
-
react_1.default.createElement(uikit_1.Button, { view: "flat", size: "l", className: b('icon', { hidden: isSearchOpen }), onClick: (e) => {
|
|
15
|
-
e.stopPropagation();
|
|
16
|
-
toogleOpen(!isOpened);
|
|
17
|
-
} },
|
|
18
|
-
react_1.default.createElement(uikit_1.Icon, { data: isOpened ? icons_1.Xmark : icons_1.Bars, size: 24 })),
|
|
19
|
-
react_1.default.createElement(MobileNavigationPopup_1.MobileNavigationPopup, { isOpened: isOpened, onClose: () => toogleOpen(false), onMenuScroll: onMenuScroll },
|
|
20
|
-
react_1.default.createElement("nav", null,
|
|
21
|
-
react_1.default.createElement("ul", { className: b() }, data.map((item) => (react_1.default.createElement("li", { className: b(), key: item.title },
|
|
22
|
-
react_1.default.createElement(MobileNavigationItem_1.MobileNavigationItem, Object.assign({}, item)))))),
|
|
23
|
-
buttons &&
|
|
24
|
-
(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 }))))))));
|
|
25
|
-
exports.MobileNavigation = MobileNavigation;
|
package/build/cjs/components/NewHeader/components/MobileNavigationItem/MobileNavigationItem.css
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/* use this for style redefinitions to awoid problems with
|
|
2
|
-
unpredictable css rules order in build */
|
|
3
|
-
.pc-addons-mobile-navigation-item {
|
|
4
|
-
display: flex;
|
|
5
|
-
justify-content: space-between;
|
|
6
|
-
position: relative;
|
|
7
|
-
padding: 12px 0;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.pc-addons-mobile-navigation-item_type_link {
|
|
11
|
-
color: inherit;
|
|
12
|
-
text-decoration: none;
|
|
13
|
-
display: block;
|
|
14
|
-
color: var(--g-color-text-primary);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.pc-addons-mobile-navigation-item__arrow {
|
|
18
|
-
display: flex;
|
|
19
|
-
justify-content: center;
|
|
20
|
-
align-items: center;
|
|
21
|
-
width: 20px;
|
|
22
|
-
height: 20px;
|
|
23
|
-
min-width: 20px;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.pc-addons-mobile-navigation-item__text {
|
|
27
|
-
padding-right: 20px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.pc-addons-mobile-navigation-item__list {
|
|
31
|
-
padding: 10px 20px;
|
|
32
|
-
background-color: var(--g-color-base-generic);
|
|
33
|
-
border-radius: var(--g-border-radius-l);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.pc-addons-mobile-navigation-item__list:not(:first-child) {
|
|
37
|
-
margin-top: 12px;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.pc-addons-mobile-navigation-item__list-items {
|
|
41
|
-
margin: 0;
|
|
42
|
-
padding: 0;
|
|
43
|
-
list-style: none;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.pc-addons-mobile-navigation-item__list-title {
|
|
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
|
-
margin: 0;
|
|
50
|
-
padding: 10px 0;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.pc-addons-mobile-navigation-item__list-item {
|
|
54
|
-
color: inherit;
|
|
55
|
-
text-decoration: none;
|
|
56
|
-
display: block;
|
|
57
|
-
color: var(--g-color-text-primary);
|
|
58
|
-
padding: 10px 0;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.pc-addons-mobile-navigation-item__list-item:hover, .pc-addons-mobile-navigation-item__list-item:active {
|
|
62
|
-
--pc-text-header-color: inherit;
|
|
63
|
-
color: inherit;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.pc-addons-mobile-navigation-item__list-link {
|
|
67
|
-
color: inherit;
|
|
68
|
-
text-decoration: none;
|
|
69
|
-
outline: none;
|
|
70
|
-
color: var(--g-color-text-link);
|
|
71
|
-
text-decoration: none;
|
|
72
|
-
cursor: pointer;
|
|
73
|
-
display: block;
|
|
74
|
-
padding: 10px 0;
|
|
75
|
-
}
|
package/build/cjs/components/NewHeader/components/MobileNavigationItem/MobileNavigationItem.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MobileNavigationItem = 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 b = (0, cn_1.block)('mobile-navigation-item');
|
|
9
|
-
const MobileNavigationItem = (props) => {
|
|
10
|
-
const [isOpened, setIsOpened] = (0, react_1.useState)(false);
|
|
11
|
-
const toggleOpen = (0, react_1.useCallback)(() => {
|
|
12
|
-
setIsOpened(!isOpened);
|
|
13
|
-
}, [isOpened]);
|
|
14
|
-
if ('link' in props) {
|
|
15
|
-
return (react_1.default.createElement("a", Object.assign({ href: props.link.url, className: b({ type: 'link' }) }, (0, gravity_ui_page_constructor_1.getLinkProps)(props.link.url || '', undefined, props.link.target)), props.title));
|
|
16
|
-
}
|
|
17
|
-
if ('data' in props) {
|
|
18
|
-
return (react_1.default.createElement(react_1.Fragment, null,
|
|
19
|
-
react_1.default.createElement("div", { className: b({ opened: isOpened }), onClick: toggleOpen },
|
|
20
|
-
react_1.default.createElement("div", { className: b('text') }, props.title),
|
|
21
|
-
react_1.default.createElement("div", { className: b('arrow') },
|
|
22
|
-
react_1.default.createElement(gravity_ui_page_constructor_1.ToggleArrow, { size: 12, type: "vertical", open: isOpened, iconType: "navigation" }))),
|
|
23
|
-
react_1.default.createElement(gravity_ui_page_constructor_1.Foldable, { isOpened: isOpened }, props.data.map(({ title: itemTitle, items }) => (react_1.default.createElement("div", { className: b('list'), key: items[0].title },
|
|
24
|
-
itemTitle && react_1.default.createElement("h5", { className: b('list-title') }, itemTitle),
|
|
25
|
-
react_1.default.createElement("ul", { className: b('list-items') }, items.map((linkItem) => (react_1.default.createElement("li", { className: b('li'), key: linkItem.title },
|
|
26
|
-
react_1.default.createElement("a", Object.assign({ href: linkItem.url, className: b('list-item') }, (0, gravity_ui_page_constructor_1.getLinkProps)(linkItem.url || '')), linkItem.title)))))))))));
|
|
27
|
-
}
|
|
28
|
-
return null;
|
|
29
|
-
};
|
|
30
|
-
exports.MobileNavigationItem = MobileNavigationItem;
|
package/build/cjs/components/NewHeader/components/MobileNavigationPopup/MobileNavigationPopup.css
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/* use this for style redefinitions to awoid problems with
|
|
2
|
-
unpredictable css rules order in build */
|
|
3
|
-
.pc-addons-mobile-navigation-popup {
|
|
4
|
-
width: 100%;
|
|
5
|
-
position: fixed;
|
|
6
|
-
top: 0;
|
|
7
|
-
z-index: 99;
|
|
8
|
-
padding: 48px 0 32px;
|
|
9
|
-
background-color: var(--g-color-base-background);
|
|
10
|
-
border-radius: 0 0 var(--pc-border-radius, 24px) var(--pc-border-radius, 24px);
|
|
11
|
-
box-shadow: 0 3px 10px var(--g-color-base-generic);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.pc-addons-mobile-navigation-popup__transition-enter {
|
|
15
|
-
transform: translateY(-30px);
|
|
16
|
-
opacity: 0;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.pc-addons-mobile-navigation-popup__transition-enter-active {
|
|
20
|
-
transform: translateY(0);
|
|
21
|
-
opacity: 1;
|
|
22
|
-
transition: transform 0.4s, opacity 0.4s;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.pc-addons-mobile-navigation-popup__transition-exit {
|
|
26
|
-
transform: translateY(0);
|
|
27
|
-
opacity: 1;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.pc-addons-mobile-navigation-popup__transition-exit .pc-addons-mobile-navigation-popup__container {
|
|
31
|
-
opacity: 0;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.pc-addons-mobile-navigation-popup__transition-exit-active {
|
|
35
|
-
transform: translateY(-30px);
|
|
36
|
-
opacity: 0;
|
|
37
|
-
transition: transform 0.4s, opacity 0.4s;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.pc-addons-mobile-navigation-popup__no-scroll {
|
|
41
|
-
overflow: hidden;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.pc-addons-mobile-navigation-popup__container {
|
|
45
|
-
padding: 4px 48px 0;
|
|
46
|
-
overflow: scroll;
|
|
47
|
-
height: 100%;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
@media (max-width: 576px) {
|
|
51
|
-
.pc-addons-mobile-navigation-popup__container {
|
|
52
|
-
padding-left: 24px;
|
|
53
|
-
padding-right: 24px;
|
|
54
|
-
}
|
|
55
|
-
}
|
package/build/cjs/components/NewHeader/components/MobileNavigationPopup/MobileNavigationPopup.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface MobileNavigationPopupProps {
|
|
3
|
-
isOpened: boolean;
|
|
4
|
-
onClose: () => void;
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
onMenuScroll: (scrollTop: number) => void;
|
|
7
|
-
}
|
|
8
|
-
export declare const MobileNavigationPopup: ({ isOpened, onClose, children, onMenuScroll, }: MobileNavigationPopupProps) => React.ReactPortal | null;
|
|
9
|
-
export {};
|
package/build/cjs/components/NewHeader/components/MobileNavigationPopup/MobileNavigationPopup.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MobileNavigationPopup = 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 uikit_1 = require("@gravity-ui/uikit");
|
|
8
|
-
const react_dom_1 = tslib_1.__importDefault(require("react-dom"));
|
|
9
|
-
const react_transition_group_1 = require("react-transition-group");
|
|
10
|
-
const cn_1 = require("../../../../utils/cn");
|
|
11
|
-
const b = (0, cn_1.block)('mobile-navigation-popup');
|
|
12
|
-
const TRANSITION_TIME = 400;
|
|
13
|
-
const POPUP_MARGIN = 80;
|
|
14
|
-
const HEADER_HEIGHT = 68;
|
|
15
|
-
const MobileNavigationPopup = ({ isOpened, onClose, children, onMenuScroll, }) => {
|
|
16
|
-
const [body, setBody] = (0, react_1.useState)();
|
|
17
|
-
const ref = (0, react_1.useRef)(null);
|
|
18
|
-
const [containerHeight, setContainerHeight] = (0, react_1.useState)(0);
|
|
19
|
-
const handleScroll = (0, react_1.useCallback)(() => {
|
|
20
|
-
var _a;
|
|
21
|
-
const containerScrollTop = (_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.scrollTop;
|
|
22
|
-
if (typeof containerScrollTop !== 'undefined') {
|
|
23
|
-
onMenuScroll(containerScrollTop);
|
|
24
|
-
}
|
|
25
|
-
}, [onMenuScroll]);
|
|
26
|
-
(0, uikit_1.useBodyScrollLock)({ enabled: isOpened });
|
|
27
|
-
(0, react_1.useEffect)(() => {
|
|
28
|
-
setBody(document.body);
|
|
29
|
-
setContainerHeight((window === null || window === void 0 ? void 0 : window.innerHeight) - POPUP_MARGIN - HEADER_HEIGHT);
|
|
30
|
-
const element = ref.current;
|
|
31
|
-
if (element) {
|
|
32
|
-
element.addEventListener('scroll', handleScroll);
|
|
33
|
-
}
|
|
34
|
-
return () => {
|
|
35
|
-
if (element) {
|
|
36
|
-
element.removeEventListener('scroll', handleScroll);
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
}, [handleScroll, isOpened]);
|
|
40
|
-
if (!body) {
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
return react_dom_1.default.createPortal(react_1.default.createElement(react_transition_group_1.CSSTransition, { in: isOpened, classNames: b('transition'), unmountOnExit: true, timeout: TRANSITION_TIME },
|
|
44
|
-
react_1.default.createElement(gravity_ui_page_constructor_1.OutsideClick, { className: b(), onOutsideClick: onClose },
|
|
45
|
-
react_1.default.createElement("div", { ref: ref, className: b('container'), style: { maxHeight: `${containerHeight}px` } }, children))), body);
|
|
46
|
-
};
|
|
47
|
-
exports.MobileNavigationPopup = MobileNavigationPopup;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/* use this for style redefinitions to awoid problems with
|
|
2
|
-
unpredictable css rules order in build */
|
|
3
|
-
.pc-addons-navigation {
|
|
4
|
-
margin: 0;
|
|
5
|
-
padding: 0;
|
|
6
|
-
list-style: none;
|
|
7
|
-
font-size: var(--g-text-body-2-font-size, var(--pc-text-body-2-font-size));
|
|
8
|
-
line-height: var(--g-text-body-2-line-height, var(--pc-text-body-2-line-height));
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
margin-left: 2px;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@media (max-width: 768px) {
|
|
15
|
-
.pc-addons-navigation {
|
|
16
|
-
display: none;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
@media (max-width: 769px) {
|
|
20
|
-
.pc-addons-navigation {
|
|
21
|
-
display: none;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { RefObject } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { NavigationItemData, SetupRouteChangeHandler } from '../../models';
|
|
4
|
-
interface NavigationProps {
|
|
5
|
-
data: NavigationItemData[];
|
|
6
|
-
headerRef?: RefObject<HTMLDivElement>;
|
|
7
|
-
setupRouteChangeHandler?: SetupRouteChangeHandler;
|
|
8
|
-
}
|
|
9
|
-
export declare const Navigation: ({ data, headerRef, setupRouteChangeHandler }: NavigationProps) => React.JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Navigation = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
-
const cn_1 = require("../../../../utils/cn");
|
|
7
|
-
const constants_1 = require("../../constants");
|
|
8
|
-
const models_1 = require("../../models");
|
|
9
|
-
const CompanyPopup_1 = require("../CompanyPopup/CompanyPopup");
|
|
10
|
-
const InvestorPopup_1 = require("../InvestorPopup/InvestorPopup");
|
|
11
|
-
const MediumPopup_1 = require("../MediumPopup/MediumPopup");
|
|
12
|
-
const NavigationItem_1 = require("../NavigationItem/NavigationItem");
|
|
13
|
-
const NavigationPopup_1 = require("../NavigationPopup/NavigationPopup");
|
|
14
|
-
const ProductsPopup_1 = require("../ProductsPopup/ProductsPopup");
|
|
15
|
-
const ResourcesPopup_1 = require("../ResourcesPopup/ResourcesPopup");
|
|
16
|
-
const SolutionsPopup_1 = require("../SolutionsPopup/SolutionsPopup");
|
|
17
|
-
const WhyPopup_1 = require("../WhyPopup/WhyPopup");
|
|
18
|
-
const b = (0, cn_1.block)('navigation');
|
|
19
|
-
const tooltipPrefixId = 'navigation-item-key';
|
|
20
|
-
const getPopupContent = (sectionData) => {
|
|
21
|
-
const { type, data } = sectionData;
|
|
22
|
-
switch (type) {
|
|
23
|
-
case models_1.NavigationItemType.MediumPopup:
|
|
24
|
-
return react_1.default.createElement(MediumPopup_1.MediumPopup, Object.assign({}, data));
|
|
25
|
-
case models_1.NavigationItemType.ProductsPopup:
|
|
26
|
-
return react_1.default.createElement(ProductsPopup_1.ProductsPopup, Object.assign({}, data));
|
|
27
|
-
case models_1.NavigationItemType.SolutionsPopup:
|
|
28
|
-
return react_1.default.createElement(SolutionsPopup_1.SolutionsPopup, Object.assign({}, data));
|
|
29
|
-
case models_1.NavigationItemType.WhyPopup:
|
|
30
|
-
return react_1.default.createElement(WhyPopup_1.WhyPopup, Object.assign({}, data));
|
|
31
|
-
case models_1.NavigationItemType.ResourcesPopup:
|
|
32
|
-
return react_1.default.createElement(ResourcesPopup_1.ResourcesPopup, Object.assign({}, data));
|
|
33
|
-
case models_1.NavigationItemType.CompanyPopup:
|
|
34
|
-
return react_1.default.createElement(CompanyPopup_1.CompanyPopup, Object.assign({}, data));
|
|
35
|
-
case models_1.NavigationItemType.InvestorPopup:
|
|
36
|
-
return react_1.default.createElement(InvestorPopup_1.InvestorPopup, Object.assign({}, data));
|
|
37
|
-
default:
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
const Navigation = ({ data, headerRef, setupRouteChangeHandler }) => {
|
|
42
|
-
const [activeTab, setActiveTab] = (0, react_1.useState)(constants_1.NO_MENU_TAB_SELECTED);
|
|
43
|
-
const [pretendentActiveTab, setPretendentAciveTab] = (0, react_1.useState)(constants_1.NO_MENU_TAB_SELECTED);
|
|
44
|
-
const [previouslyFocusedElement, setPreviouslyFocusedElement] = (0, react_1.useState)(null);
|
|
45
|
-
const handleActiveTab = (0, react_1.useCallback)((currentIndex) => {
|
|
46
|
-
setPreviouslyFocusedElement(document.activeElement);
|
|
47
|
-
setPretendentAciveTab(currentIndex);
|
|
48
|
-
}, []);
|
|
49
|
-
const onEscapeKeyDown = (0, react_1.useCallback)((event) => {
|
|
50
|
-
if (event.key === 'Escape') {
|
|
51
|
-
setActiveTab(constants_1.NO_MENU_TAB_SELECTED);
|
|
52
|
-
setPretendentAciveTab(constants_1.NO_MENU_TAB_SELECTED);
|
|
53
|
-
previouslyFocusedElement === null || previouslyFocusedElement === void 0 ? void 0 : previouslyFocusedElement.focus({ preventScroll: true });
|
|
54
|
-
}
|
|
55
|
-
}, [previouslyFocusedElement]);
|
|
56
|
-
(0, react_1.useEffect)(() => setupRouteChangeHandler === null || setupRouteChangeHandler === void 0 ? void 0 : setupRouteChangeHandler(() => {
|
|
57
|
-
handleActiveTab(constants_1.NO_MENU_TAB_SELECTED);
|
|
58
|
-
}), [setupRouteChangeHandler, handleActiveTab]);
|
|
59
|
-
(0, react_1.useEffect)(() => {
|
|
60
|
-
const timerId = setTimeout(() => {
|
|
61
|
-
setActiveTab(pretendentActiveTab);
|
|
62
|
-
}, constants_1.SWITCH_MENU_TAB_TIMEOUT);
|
|
63
|
-
return () => clearTimeout(timerId);
|
|
64
|
-
}, [activeTab, pretendentActiveTab]);
|
|
65
|
-
(0, react_1.useEffect)(() => {
|
|
66
|
-
document.addEventListener('keydown', onEscapeKeyDown);
|
|
67
|
-
return () => {
|
|
68
|
-
document.removeEventListener('keydown', onEscapeKeyDown);
|
|
69
|
-
};
|
|
70
|
-
}, [onEscapeKeyDown]);
|
|
71
|
-
return (react_1.default.createElement("nav", null,
|
|
72
|
-
react_1.default.createElement("ul", { className: b() }, data.map((item, i) => (react_1.default.createElement(NavigationItem_1.NavigationItem, { key: item.title, item: item, handleActiveTab: handleActiveTab, index: i, isActive: activeTab === i, tooltipId: `${tooltipPrefixId}-${i}` }, activeTab === i && item.type !== models_1.NavigationItemType.Link && (react_1.default.createElement(NavigationPopup_1.NavigationPopup, { headerRef: headerRef, id: `${tooltipPrefixId}-${i}` }, getPopupContent(item)))))))));
|
|
73
|
-
};
|
|
74
|
-
exports.Navigation = Navigation;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/* use this for style redefinitions to awoid problems with
|
|
2
|
-
unpredictable css rules order in build */
|
|
3
|
-
.pc-addons-navigation-item {
|
|
4
|
-
white-space: nowrap;
|
|
5
|
-
color: var(--g-color-text-primary);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.pc-addons-navigation-item:hover .pc-addons-navigation-item__text {
|
|
9
|
-
color: var(--g-color-text-link);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.pc-addons-navigation-item_disable {
|
|
13
|
-
pointer-events: none;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.pc-addons-navigation-item__popup {
|
|
17
|
-
--yc-popup-border-width: 0;
|
|
18
|
-
--yc-popup-border-color: none;
|
|
19
|
-
border-radius: var(--pc-border-radius, 24px);
|
|
20
|
-
box-shadow: 0 3px 10px var(--g-color-base-generic-hover);
|
|
21
|
-
--yc-popover-max-width: 1296px;
|
|
22
|
-
--yc-popover-padding: 20px;
|
|
23
|
-
width: var(--yc-popover-max-width);
|
|
24
|
-
left: 0;
|
|
25
|
-
box-shadow: 0 4px 24px var(--g-color-base-generic-hover), 0 2px 8px var(--g-color-base-generic-hover);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.pc-addons-navigation-item__text {
|
|
29
|
-
display: inline-block;
|
|
30
|
-
margin: 0;
|
|
31
|
-
padding: 0;
|
|
32
|
-
font: inherit;
|
|
33
|
-
border: none;
|
|
34
|
-
outline: none;
|
|
35
|
-
color: inherit;
|
|
36
|
-
background: none;
|
|
37
|
-
cursor: pointer;
|
|
38
|
-
color: inherit;
|
|
39
|
-
text-decoration: none;
|
|
40
|
-
display: block;
|
|
41
|
-
margin: 0 12px;
|
|
42
|
-
padding-bottom: 12px;
|
|
43
|
-
border-bottom: 2px solid transparent;
|
|
44
|
-
color: var(--g-color-text-primary);
|
|
45
|
-
position: relative;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.pc-addons-navigation-item__text:focus::before {
|
|
49
|
-
content: "";
|
|
50
|
-
width: 100%;
|
|
51
|
-
height: calc(100% - 12px - 2px);
|
|
52
|
-
position: absolute;
|
|
53
|
-
outline: 2px solid var(--g-color-line-focus);
|
|
54
|
-
border-radius: var(--g-focus-border-radius);
|
|
55
|
-
left: 0;
|
|
56
|
-
right: 0;
|
|
57
|
-
top: 2px;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.pc-addons-navigation-item__text:focus:not(:focus-visible)::before {
|
|
61
|
-
display: none;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.pc-addons-navigation-item__text_active {
|
|
65
|
-
color: var(--g-color-text-link);
|
|
66
|
-
border-color: var(--g-color-text-link);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.pc-addons-navigation-item__text_cursor_default {
|
|
70
|
-
cursor: default;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.pc-addons-navigation-item:first-child .pc-addons-navigation-item__text {
|
|
74
|
-
margin-left: 0;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
@media (max-width: 1296px) {
|
|
78
|
-
.pc-addons-navigation-item__popup {
|
|
79
|
-
--yc-popover-max-width: calc(100% - 32px);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { FC, ReactNode } from 'react';
|
|
2
|
-
import { NavigationItemData } from '../../models';
|
|
3
|
-
interface NavigationItemOwnProps {
|
|
4
|
-
index: number;
|
|
5
|
-
item: NavigationItemData;
|
|
6
|
-
isActive: boolean;
|
|
7
|
-
handleActiveTab: (currentIndex: number) => void;
|
|
8
|
-
children?: ReactNode;
|
|
9
|
-
tooltipId?: string;
|
|
10
|
-
}
|
|
11
|
-
export declare const NavigationItem: FC<NavigationItemOwnProps>;
|
|
12
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NavigationItem = 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 constants_1 = require("../../constants");
|
|
9
|
-
const route_change_1 = require("../../contexts/route-change");
|
|
10
|
-
const models_1 = require("../../models");
|
|
11
|
-
const b = (0, cn_1.block)('navigation-item');
|
|
12
|
-
const NavigationItem = ({ item, isActive, handleActiveTab, index, children, tooltipId, }) => {
|
|
13
|
-
var _a, _b, _c, _d;
|
|
14
|
-
const setupRouteChangeHandler = (0, react_1.useContext)(route_change_1.RouteChangeHandlerContext);
|
|
15
|
-
const handleMouseEnter = (0, react_1.useCallback)(() => handleActiveTab(index), [handleActiveTab, index]);
|
|
16
|
-
const handleMouseLeave = (0, react_1.useCallback)(() => handleActiveTab(constants_1.NO_MENU_TAB_SELECTED), [handleActiveTab]);
|
|
17
|
-
(0, react_1.useEffect)(() => setupRouteChangeHandler === null || setupRouteChangeHandler === void 0 ? void 0 : setupRouteChangeHandler(() => {
|
|
18
|
-
handleMouseLeave();
|
|
19
|
-
}), [handleMouseLeave, setupRouteChangeHandler]);
|
|
20
|
-
if (item.type === models_1.NavigationItemType.Link) {
|
|
21
|
-
return (react_1.default.createElement("li", { key: item.title, className: b({ disable: !((_a = item.data) === null || _a === void 0 ? void 0 : _a.url) }), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave },
|
|
22
|
-
react_1.default.createElement("a", Object.assign({ className: b('text', { active: isActive }), href: (_b = item.data) === null || _b === void 0 ? void 0 : _b.url }, (0, gravity_ui_page_constructor_1.getLinkProps)(((_c = item.data) === null || _c === void 0 ? void 0 : _c.url) || '', undefined, (_d = item.data) === null || _d === void 0 ? void 0 : _d.target)), item.title),
|
|
23
|
-
children));
|
|
24
|
-
}
|
|
25
|
-
return (react_1.default.createElement("li", { key: item.title, className: b({}), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave },
|
|
26
|
-
react_1.default.createElement("button", { className: b('text', { active: isActive, cursor: 'default' }), onClick: handleMouseEnter, "aria-expanded": isActive, "aria-controls": tooltipId }, item.title),
|
|
27
|
-
children));
|
|
28
|
-
};
|
|
29
|
-
exports.NavigationItem = NavigationItem;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { RefObject } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
interface NavigationPopupProps {
|
|
4
|
-
headerRef?: RefObject<HTMLDivElement>;
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
id?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const NavigationPopup: ({ headerRef, children, id }: NavigationPopupProps) => React.ReactPortal | null;
|
|
9
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NavigationPopup = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const react_dom_1 = tslib_1.__importDefault(require("react-dom"));
|
|
7
|
-
const FocusTrap_1 = require("../../../../utils/FocusTrap");
|
|
8
|
-
const cn_1 = require("../../../../utils/cn");
|
|
9
|
-
const b = (0, cn_1.block)('navigation-popup');
|
|
10
|
-
const NavigationPopup = ({ headerRef, children, id }) => {
|
|
11
|
-
return (headerRef === null || headerRef === void 0 ? void 0 : headerRef.current)
|
|
12
|
-
? react_dom_1.default.createPortal(react_1.default.createElement(FocusTrap_1.FocusTrap, { enabled: true },
|
|
13
|
-
react_1.default.createElement("div", {
|
|
14
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
15
|
-
tabIndex: 0, className: b(), id: id }, children)), headerRef.current)
|
|
16
|
-
: null;
|
|
17
|
-
};
|
|
18
|
-
exports.NavigationPopup = NavigationPopup;
|