@gravity-ui/page-constructor 1.7.0-alpha.9 → 1.7.1-alpha.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/CHANGELOG.md +8 -0
- package/README.md +36 -58
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js +2 -2
- package/build/cjs/blocks/Tabs/Tabs.css +57 -24
- package/build/cjs/blocks/Tabs/Tabs.d.ts +1 -1
- package/build/cjs/blocks/Tabs/Tabs.js +29 -27
- package/build/cjs/components/ButtonTabs/ButtonTabs.css +12 -0
- package/build/cjs/components/ButtonTabs/ButtonTabs.d.ts +13 -0
- package/build/cjs/components/ButtonTabs/ButtonTabs.js +26 -0
- package/build/cjs/components/Image/Image.css +4 -0
- package/build/cjs/components/Image/Image.js +3 -1
- package/build/cjs/components/OverflowScroller/OverflowScroller.css +0 -2
- package/build/cjs/components/RouterLink/RouterLink.d.ts +0 -1
- package/build/cjs/components/VideoBlock/VideoBlock.js +1 -1
- package/build/cjs/components/index.d.ts +0 -2
- package/build/cjs/components/index.js +39 -40
- package/build/cjs/constructor-items.d.ts +1 -1
- package/build/cjs/containers/PageConstructor/PageConstructor.d.ts +2 -3
- package/build/cjs/containers/PageConstructor/PageConstructor.js +10 -12
- package/build/cjs/context/locationContext/locationContext.d.ts +0 -1
- package/build/cjs/icons/index.d.ts +0 -3
- package/build/cjs/icons/index.js +0 -3
- package/build/cjs/models/constructor-items/blocks.d.ts +9 -8
- package/build/cjs/models/index.d.ts +0 -1
- package/build/cjs/models/index.js +0 -1
- package/build/cjs/text-transform/blocks.js +11 -4
- package/build/cjs/text-transform/utils.js +1 -1
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js +2 -2
- package/build/esm/blocks/Tabs/Tabs.css +57 -24
- package/build/esm/blocks/Tabs/Tabs.d.ts +1 -1
- package/build/esm/blocks/Tabs/Tabs.js +29 -27
- package/build/esm/components/ButtonTabs/ButtonTabs.css +12 -0
- package/build/esm/components/ButtonTabs/ButtonTabs.d.ts +14 -0
- package/build/esm/components/ButtonTabs/ButtonTabs.js +24 -0
- package/build/esm/components/Image/Image.css +4 -0
- package/build/esm/components/Image/Image.d.ts +1 -0
- package/build/esm/components/Image/Image.js +4 -1
- package/build/esm/components/OverflowScroller/OverflowScroller.css +0 -2
- package/build/esm/components/RouterLink/RouterLink.d.ts +0 -1
- package/build/esm/components/VideoBlock/VideoBlock.js +1 -1
- package/build/esm/components/index.d.ts +0 -2
- package/build/esm/components/index.js +0 -2
- package/build/esm/constructor-items.d.ts +1 -1
- package/build/esm/containers/PageConstructor/PageConstructor.d.ts +2 -3
- package/build/esm/containers/PageConstructor/PageConstructor.js +10 -12
- package/build/esm/context/locationContext/locationContext.d.ts +0 -1
- package/build/esm/icons/index.d.ts +0 -3
- package/build/esm/icons/index.js +0 -3
- package/build/esm/models/constructor-items/blocks.d.ts +9 -8
- package/build/esm/models/index.d.ts +0 -1
- package/build/esm/models/index.js +0 -1
- package/build/esm/text-transform/blocks.js +11 -4
- package/build/esm/text-transform/utils.js +1 -1
- package/package.json +5 -2
- package/server/models/constructor-items/blocks.d.ts +9 -8
- package/server/models/index.d.ts +0 -1
- package/server/models/index.js +0 -1
- package/server/text-transform/blocks.js +11 -4
- package/server/text-transform/utils.js +1 -1
- package/styles/mixins.scss +0 -38
- package/build/cjs/components/navigation/components/Header/Header.css +0 -85
- package/build/cjs/components/navigation/components/Header/Header.d.ts +0 -8
- package/build/cjs/components/navigation/components/Header/Header.js +0 -51
- package/build/cjs/components/navigation/components/Logo/Logo.css +0 -23
- package/build/cjs/components/navigation/components/Logo/Logo.d.ts +0 -7
- package/build/cjs/components/navigation/components/Logo/Logo.js +0 -17
- package/build/cjs/components/navigation/components/MobileNavigation/MobileNavigation.css +0 -58
- package/build/cjs/components/navigation/components/MobileNavigation/MobileNavigation.d.ts +0 -13
- package/build/cjs/components/navigation/components/MobileNavigation/MobileNavigation.js +0 -45
- package/build/cjs/components/navigation/components/Navigation/Navigation.css +0 -43
- package/build/cjs/components/navigation/components/Navigation/Navigation.d.ts +0 -18
- package/build/cjs/components/navigation/components/Navigation/Navigation.js +0 -69
- package/build/cjs/components/navigation/components/NavigationItem/NavigationItem.css +0 -41
- package/build/cjs/components/navigation/components/NavigationItem/NavigationItem.d.ts +0 -10
- package/build/cjs/components/navigation/components/NavigationItem/NavigationItem.js +0 -59
- package/build/cjs/components/navigation/components/NavigationPopup/NavigationPopup.css +0 -33
- package/build/cjs/components/navigation/components/NavigationPopup/NavigationPopup.d.ts +0 -10
- package/build/cjs/components/navigation/components/NavigationPopup/NavigationPopup.js +0 -45
- package/build/cjs/components/navigation/components/SocialIcon/SocialIcon.css +0 -20
- package/build/cjs/components/navigation/components/SocialIcon/SocialIcon.d.ts +0 -7
- package/build/cjs/components/navigation/components/SocialIcon/SocialIcon.js +0 -14
- package/build/cjs/components/navigation/components/index.d.ts +0 -7
- package/build/cjs/components/navigation/components/index.js +0 -20
- package/build/cjs/components/navigation/containers/Layout/Layout.css +0 -10
- package/build/cjs/components/navigation/containers/Layout/Layout.d.ts +0 -8
- package/build/cjs/components/navigation/containers/Layout/Layout.js +0 -11
- package/build/cjs/icons/NavigationArrow.d.ts +0 -2
- package/build/cjs/icons/NavigationArrow.js +0 -9
- package/build/cjs/icons/NavigationClose.d.ts +0 -2
- package/build/cjs/icons/NavigationClose.js +0 -9
- package/build/cjs/icons/NavigationOpen.d.ts +0 -2
- package/build/cjs/icons/NavigationOpen.js +0 -11
- package/build/cjs/models/navigation.d.ts +0 -62
- package/build/cjs/models/navigation.js +0 -10
- package/build/esm/components/navigation/components/Header/Header.css +0 -85
- package/build/esm/components/navigation/components/Header/Header.d.ts +0 -9
- package/build/esm/components/navigation/components/Header/Header.js +0 -47
- package/build/esm/components/navigation/components/Logo/Logo.css +0 -23
- package/build/esm/components/navigation/components/Logo/Logo.d.ts +0 -8
- package/build/esm/components/navigation/components/Logo/Logo.js +0 -15
- package/build/esm/components/navigation/components/MobileNavigation/MobileNavigation.css +0 -58
- package/build/esm/components/navigation/components/MobileNavigation/MobileNavigation.d.ts +0 -14
- package/build/esm/components/navigation/components/MobileNavigation/MobileNavigation.js +0 -43
- package/build/esm/components/navigation/components/Navigation/Navigation.css +0 -43
- package/build/esm/components/navigation/components/Navigation/Navigation.d.ts +0 -19
- package/build/esm/components/navigation/components/Navigation/Navigation.js +0 -68
- package/build/esm/components/navigation/components/NavigationItem/NavigationItem.css +0 -41
- package/build/esm/components/navigation/components/NavigationItem/NavigationItem.d.ts +0 -11
- package/build/esm/components/navigation/components/NavigationItem/NavigationItem.js +0 -58
- package/build/esm/components/navigation/components/NavigationPopup/NavigationPopup.css +0 -33
- package/build/esm/components/navigation/components/NavigationPopup/NavigationPopup.d.ts +0 -11
- package/build/esm/components/navigation/components/NavigationPopup/NavigationPopup.js +0 -41
- package/build/esm/components/navigation/components/SocialIcon/SocialIcon.css +0 -20
- package/build/esm/components/navigation/components/SocialIcon/SocialIcon.d.ts +0 -8
- package/build/esm/components/navigation/components/SocialIcon/SocialIcon.js +0 -12
- package/build/esm/components/navigation/components/index.d.ts +0 -7
- package/build/esm/components/navigation/components/index.js +0 -7
- package/build/esm/components/navigation/containers/Layout/Layout.css +0 -10
- package/build/esm/components/navigation/containers/Layout/Layout.d.ts +0 -9
- package/build/esm/components/navigation/containers/Layout/Layout.js +0 -9
- package/build/esm/icons/NavigationArrow.d.ts +0 -2
- package/build/esm/icons/NavigationArrow.js +0 -4
- package/build/esm/icons/NavigationClose.d.ts +0 -2
- package/build/esm/icons/NavigationClose.js +0 -4
- package/build/esm/icons/NavigationOpen.d.ts +0 -2
- package/build/esm/icons/NavigationOpen.js +0 -6
- package/build/esm/models/navigation.d.ts +0 -62
- package/build/esm/models/navigation.js +0 -7
- package/server/models/navigation.d.ts +0 -62
- package/server/models/navigation.js +0 -10
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const react_1 = (0, tslib_1.__importStar)(require("react"));
|
|
5
|
-
const uikit_1 = require("@gravity-ui/uikit");
|
|
6
|
-
const utils_1 = require("../../../../utils");
|
|
7
|
-
const Foldable_1 = (0, tslib_1.__importDefault)(require("../../../Foldable/Foldable"));
|
|
8
|
-
const navigation_1 = require("../../../../models/navigation");
|
|
9
|
-
const NavigationItem_1 = (0, tslib_1.__importDefault)(require("../NavigationItem/NavigationItem"));
|
|
10
|
-
const b = (0, utils_1.block)('mobile-navigation');
|
|
11
|
-
const MobileNavigationDropdown = ({ data, onItemClick, onToggle, isOpened = false, }) => {
|
|
12
|
-
const ref = (0, react_1.useRef)(null);
|
|
13
|
-
return (react_1.default.createElement("div", { ref: ref, className: b('dropdown') },
|
|
14
|
-
react_1.default.createElement(NavigationItem_1.default, { data: data, onClick: onToggle, isOpened: isOpened }),
|
|
15
|
-
isOpened && (react_1.default.createElement(uikit_1.Popup, { anchorRef: ref, open: isOpened, className: b('popup') }, data.items.map((item) => (react_1.default.createElement(NavigationItem_1.default, { key: item.text, data: item, className: b('dropdown-item'), onClick: onItemClick })))))));
|
|
16
|
-
};
|
|
17
|
-
const MobileNavigationItem = ({ link, index, isActive, onActiveItemChange, onClose, }) => {
|
|
18
|
-
const toggleActive = (0, react_1.useCallback)((e) => {
|
|
19
|
-
e.stopPropagation();
|
|
20
|
-
if (onActiveItemChange) {
|
|
21
|
-
onActiveItemChange(isActive ? -1 : index);
|
|
22
|
-
}
|
|
23
|
-
}, [isActive, index, onActiveItemChange]);
|
|
24
|
-
const onItemClick = (0, react_1.useCallback)((e) => {
|
|
25
|
-
toggleActive(e);
|
|
26
|
-
onClose();
|
|
27
|
-
}, [toggleActive, onClose]);
|
|
28
|
-
return (react_1.default.createElement("li", { key: index, className: b('links-item') }, link.type === navigation_1.NavigationItemType.Dropdown ? (react_1.default.createElement(MobileNavigationDropdown, { data: link, onToggle: toggleActive, isOpened: isActive, onItemClick: onItemClick })) : (react_1.default.createElement(NavigationItem_1.default, { data: link, onClick: onItemClick }))));
|
|
29
|
-
};
|
|
30
|
-
const MobileNavigation = (props) => {
|
|
31
|
-
if (typeof window === 'undefined') {
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
const { isOpened, topItems, bottomItems, activeItemIndex, onActiveItemChange, onClose } = props;
|
|
35
|
-
return (react_1.default.createElement(uikit_1.Portal, null,
|
|
36
|
-
react_1.default.createElement(Foldable_1.default, { key: topItems === null || topItems === void 0 ? void 0 : topItems.length, className: b(), isOpened: Boolean(isOpened) },
|
|
37
|
-
react_1.default.createElement("div", { className: b('wrapper') },
|
|
38
|
-
react_1.default.createElement("nav", null,
|
|
39
|
-
react_1.default.createElement("ul", { className: b('links') }, topItems === null || topItems === void 0 ? void 0 : topItems.map((link, index) => {
|
|
40
|
-
const isActive = index === activeItemIndex;
|
|
41
|
-
return (react_1.default.createElement(MobileNavigationItem, { key: index, link: link, index: index, isActive: isOpened && isActive, onClose: onClose, onActiveItemChange: onActiveItemChange }));
|
|
42
|
-
}))), bottomItems === null || bottomItems === void 0 ? void 0 :
|
|
43
|
-
bottomItems.map((item) => (react_1.default.createElement(NavigationItem_1.default, { key: item.text, data: item, className: b('button') })))))));
|
|
44
|
-
};
|
|
45
|
-
exports.default = MobileNavigation;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/* use this for style redefinitions to awoid problems with
|
|
2
|
-
unpredictable css rules order in build */
|
|
3
|
-
.pc-navigation {
|
|
4
|
-
font-size: var(--yc-text-body-2-font-size);
|
|
5
|
-
line-height: var(--yc-text-body-2-line-height);
|
|
6
|
-
}
|
|
7
|
-
.pc-navigation__links {
|
|
8
|
-
position: relative;
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
margin: 0;
|
|
12
|
-
padding: 0;
|
|
13
|
-
list-style: none;
|
|
14
|
-
}
|
|
15
|
-
.pc-navigation__links-item {
|
|
16
|
-
position: relative;
|
|
17
|
-
height: var(--header-height);
|
|
18
|
-
line-height: var(--header-height);
|
|
19
|
-
cursor: pointer;
|
|
20
|
-
outline: none;
|
|
21
|
-
color: inherit;
|
|
22
|
-
text-decoration: none;
|
|
23
|
-
}
|
|
24
|
-
.utilityfocus .pc-navigation__links-item:focus {
|
|
25
|
-
outline: 2px solid #ffdb4d;
|
|
26
|
-
}
|
|
27
|
-
.pc-navigation__links-item:hover, .pc-navigation__links-item:active {
|
|
28
|
-
color: var(--yc-color-text-link);
|
|
29
|
-
}
|
|
30
|
-
.pc-navigation__links-item:not(:last-child) {
|
|
31
|
-
margin-right: 20px;
|
|
32
|
-
}
|
|
33
|
-
.pc-navigation__slider-container {
|
|
34
|
-
position: absolute;
|
|
35
|
-
right: 0;
|
|
36
|
-
bottom: 0;
|
|
37
|
-
left: 0;
|
|
38
|
-
}
|
|
39
|
-
.pc-navigation__slider {
|
|
40
|
-
width: 100%;
|
|
41
|
-
height: 2px;
|
|
42
|
-
background-color: var(--yc-color-text-link);
|
|
43
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React, { MouseEventHandler } from 'react';
|
|
2
|
-
import { NavigationDropdownItem, NavigationItem as NavigationItemModel } from '../../../../models/navigation';
|
|
3
|
-
export interface NavigationProps {
|
|
4
|
-
links: NavigationItemModel[];
|
|
5
|
-
activeItemIndex: number;
|
|
6
|
-
onActiveItemChange: (index: number) => void;
|
|
7
|
-
className?: string;
|
|
8
|
-
highlightActiveItem?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export interface NavigationDropdownProps {
|
|
11
|
-
data: NavigationDropdownItem;
|
|
12
|
-
onClick: MouseEventHandler;
|
|
13
|
-
isActive: boolean;
|
|
14
|
-
position: number;
|
|
15
|
-
hidePopup: () => void;
|
|
16
|
-
}
|
|
17
|
-
declare const Navigation: React.FC<NavigationProps>;
|
|
18
|
-
export default Navigation;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const lodash_1 = (0, tslib_1.__importDefault)(require("lodash"));
|
|
5
|
-
const react_1 = (0, tslib_1.__importStar)(require("react"));
|
|
6
|
-
const utils_1 = require("../../../../utils");
|
|
7
|
-
const OverflowScroller_1 = (0, tslib_1.__importDefault)(require("../../../OverflowScroller/OverflowScroller"));
|
|
8
|
-
const navigation_1 = require("../../../../models/navigation");
|
|
9
|
-
const NavigationPopup_1 = (0, tslib_1.__importDefault)(require("../NavigationPopup/NavigationPopup"));
|
|
10
|
-
const NavigationItem_1 = (0, tslib_1.__importDefault)(require("../NavigationItem/NavigationItem"));
|
|
11
|
-
const locationContext_1 = require("../../../../context/locationContext");
|
|
12
|
-
const b = (0, utils_1.block)('navigation');
|
|
13
|
-
const NavigationDropdown = ({ data, isActive, position, hidePopup, onClick, }) => {
|
|
14
|
-
const { text, items } = data, popupProps = (0, tslib_1.__rest)(data, ["text", "items"]);
|
|
15
|
-
return (react_1.default.createElement(react_1.Fragment, null,
|
|
16
|
-
react_1.default.createElement(NavigationItem_1.default, { className: b('link'), onClick: onClick, isOpened: isActive, data: { text, type: navigation_1.NavigationItemType.Dropdown } }),
|
|
17
|
-
isActive && (react_1.default.createElement(NavigationPopup_1.default, Object.assign({ left: position, onClose: hidePopup, items: items }, popupProps)))));
|
|
18
|
-
};
|
|
19
|
-
const Navigation = ({ className, onActiveItemChange, links, activeItemIndex, highlightActiveItem, }) => {
|
|
20
|
-
const { asPath, pathname } = (0, react_1.useContext)(locationContext_1.LocationContext);
|
|
21
|
-
const itemRefs = (0, react_1.useRef)([]);
|
|
22
|
-
const [itemPositions, setItemPosition] = (0, react_1.useState)([]);
|
|
23
|
-
const [lastLeftScroll, setLastLeftScroll] = (0, react_1.useState)(0);
|
|
24
|
-
const hidePopup = (0, react_1.useCallback)(() => {
|
|
25
|
-
onActiveItemChange(-1);
|
|
26
|
-
}, [onActiveItemChange]);
|
|
27
|
-
const getItemClickHandler = (0, react_1.useCallback)((index) => (e) => {
|
|
28
|
-
e.stopPropagation();
|
|
29
|
-
onActiveItemChange(index === activeItemIndex ? -1 : index);
|
|
30
|
-
}, [activeItemIndex, onActiveItemChange]);
|
|
31
|
-
const calculateItemPositions = (0, react_1.useCallback)(() => {
|
|
32
|
-
if (itemRefs.current.length) {
|
|
33
|
-
const currentItemPositions = itemRefs.current.map((itemRef) => (itemRef && itemRef.getBoundingClientRect().left) || 0);
|
|
34
|
-
setItemPosition(currentItemPositions);
|
|
35
|
-
}
|
|
36
|
-
}, []);
|
|
37
|
-
(0, react_1.useEffect)(() => {
|
|
38
|
-
const debouncedCalculateItemPositions = lodash_1.default.debounce(calculateItemPositions, 100);
|
|
39
|
-
const calculateOnScroll = lodash_1.default.debounce(() => {
|
|
40
|
-
const curLeftScroll = window.pageXOffset;
|
|
41
|
-
if (curLeftScroll !== lastLeftScroll) {
|
|
42
|
-
setLastLeftScroll(window.pageXOffset);
|
|
43
|
-
calculateItemPositions();
|
|
44
|
-
}
|
|
45
|
-
}, 100);
|
|
46
|
-
calculateItemPositions();
|
|
47
|
-
setLastLeftScroll(window.pageXOffset);
|
|
48
|
-
window.addEventListener('resize', debouncedCalculateItemPositions);
|
|
49
|
-
window.addEventListener('scroll', calculateOnScroll);
|
|
50
|
-
return () => {
|
|
51
|
-
window.removeEventListener(`resize`, calculateItemPositions);
|
|
52
|
-
window.removeEventListener('scroll', calculateOnScroll);
|
|
53
|
-
};
|
|
54
|
-
}, [calculateItemPositions, itemRefs, lastLeftScroll]);
|
|
55
|
-
(0, react_1.useEffect)(() => {
|
|
56
|
-
hidePopup();
|
|
57
|
-
}, [hidePopup, asPath, pathname]);
|
|
58
|
-
return (react_1.default.createElement(OverflowScroller_1.default, { className: b(null, className), onScrollStart: hidePopup, onScrollEnd: calculateItemPositions },
|
|
59
|
-
react_1.default.createElement("nav", null,
|
|
60
|
-
react_1.default.createElement("ul", { className: b('links') }, links.map((link, index) => {
|
|
61
|
-
const isActive = index === activeItemIndex;
|
|
62
|
-
const onClick = getItemClickHandler(index);
|
|
63
|
-
return (react_1.default.createElement("li", { ref: (el) => itemRefs.current.push(el), key: index, className: b('links-item') },
|
|
64
|
-
link.type === navigation_1.NavigationItemType.Dropdown ? (react_1.default.createElement(NavigationDropdown, { data: link, onClick: onClick, isActive: isActive, position: itemPositions[index], hidePopup: hidePopup })) : (react_1.default.createElement(NavigationItem_1.default, { data: link, onClick: onClick })),
|
|
65
|
-
highlightActiveItem && isActive && (react_1.default.createElement("div", { className: b('slider-container') },
|
|
66
|
-
react_1.default.createElement("div", { className: b('slider') })))));
|
|
67
|
-
})))));
|
|
68
|
-
};
|
|
69
|
-
exports.default = Navigation;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/* use this for style redefinitions to awoid problems with
|
|
2
|
-
unpredictable css rules order in build */
|
|
3
|
-
.pc-navigation-item {
|
|
4
|
-
position: relative;
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
}
|
|
8
|
-
.pc-navigation-item_type_link {
|
|
9
|
-
color: var(--yc-color-text-primary);
|
|
10
|
-
color: inherit;
|
|
11
|
-
text-decoration: none;
|
|
12
|
-
outline: none;
|
|
13
|
-
}
|
|
14
|
-
.utilityfocus .pc-navigation-item_type_link:focus {
|
|
15
|
-
outline: 2px solid #ffdb4d;
|
|
16
|
-
}
|
|
17
|
-
.pc-navigation-item_type_link:hover, .pc-navigation-item_type_link_active {
|
|
18
|
-
color: var(--yc-color-text-link);
|
|
19
|
-
}
|
|
20
|
-
.pc-navigation-item_type_button {
|
|
21
|
-
display: inline-block;
|
|
22
|
-
}
|
|
23
|
-
.pc-navigation-item__arrow {
|
|
24
|
-
position: relative;
|
|
25
|
-
top: -2px;
|
|
26
|
-
width: 9px;
|
|
27
|
-
height: 9px;
|
|
28
|
-
margin-left: 5px;
|
|
29
|
-
}
|
|
30
|
-
.pc-navigation-item__icon {
|
|
31
|
-
display: flex;
|
|
32
|
-
width: 20px;
|
|
33
|
-
height: 20px;
|
|
34
|
-
margin-right: 8px;
|
|
35
|
-
border-radius: 50%;
|
|
36
|
-
object-fit: cover;
|
|
37
|
-
}
|
|
38
|
-
.pc-navigation-item__dropdown {
|
|
39
|
-
margin-left: 7px;
|
|
40
|
-
color: var(--yc-color-text-secondary);
|
|
41
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React, { MouseEventHandler } from 'react';
|
|
2
|
-
import { NavigationItemData } from '../../../../models';
|
|
3
|
-
export interface NavigationItemProps {
|
|
4
|
-
data: NavigationItemData;
|
|
5
|
-
className?: string;
|
|
6
|
-
onClick?: MouseEventHandler;
|
|
7
|
-
isOpened?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare const NavigationItem: React.FC<NavigationItemProps>;
|
|
10
|
-
export default NavigationItem;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const react_1 = (0, tslib_1.__importStar)(require("react"));
|
|
5
|
-
const utils_1 = require("../../../../utils");
|
|
6
|
-
const index_1 = require("../../../index");
|
|
7
|
-
const locationContext_1 = require("../../../../context/locationContext");
|
|
8
|
-
const models_1 = require("../../../../models");
|
|
9
|
-
const icons_1 = require("../../../../icons");
|
|
10
|
-
const SocialIcon_1 = (0, tslib_1.__importDefault)(require("../SocialIcon/SocialIcon"));
|
|
11
|
-
const utils_2 = require("../../../Media/Image/utils");
|
|
12
|
-
const b = (0, utils_1.block)('navigation-item');
|
|
13
|
-
const Content = ({ text, icon }) => (react_1.default.createElement(react_1.Fragment, null,
|
|
14
|
-
icon && react_1.default.createElement(index_1.Image, Object.assign({ className: b('icon') }, icon)),
|
|
15
|
-
react_1.default.createElement("span", { className: b('text') }, text)));
|
|
16
|
-
const NavigationDropdown = (_a) => {
|
|
17
|
-
var { text, icon, isOpened } = _a, props = (0, tslib_1.__rest)(_a, ["text", "icon", "isOpened"]);
|
|
18
|
-
const iconData = icon && (0, utils_2.getMediaImage)(icon);
|
|
19
|
-
return (react_1.default.createElement("span", Object.assign({}, props),
|
|
20
|
-
react_1.default.createElement(Content, { text: text, icon: iconData }),
|
|
21
|
-
react_1.default.createElement(index_1.ToggleArrow, { className: b('dropdown'), size: 12, type: 'vertical', iconType: "navigation", open: isOpened })));
|
|
22
|
-
};
|
|
23
|
-
const NavigationLink = (props) => {
|
|
24
|
-
const { hostname, Link } = (0, react_1.useContext)(locationContext_1.LocationContext);
|
|
25
|
-
const { url, text, icon, arrow, target } = props, rest = (0, tslib_1.__rest)(props, ["url", "text", "icon", "arrow", "target"]);
|
|
26
|
-
const linkExtraProps = (0, utils_1.getLinkProps)(url, hostname, target);
|
|
27
|
-
const iconData = icon && (0, utils_2.getMediaImage)(icon);
|
|
28
|
-
const content = (react_1.default.createElement(react_1.Fragment, null,
|
|
29
|
-
react_1.default.createElement(Content, { text: text, icon: iconData }),
|
|
30
|
-
arrow && react_1.default.createElement(icons_1.NavigationArrow, { className: b('arrow') })));
|
|
31
|
-
if ((linkExtraProps === null || linkExtraProps === void 0 ? void 0 : linkExtraProps.target) || !Link) {
|
|
32
|
-
return (react_1.default.createElement("a", Object.assign({ href: url, title: text }, rest, linkExtraProps), content));
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
return (react_1.default.createElement(index_1.RouterLink, { href: url, passHref: true },
|
|
36
|
-
react_1.default.createElement("a", Object.assign({}, rest), content)));
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
const NavigationButton = (props) => {
|
|
40
|
-
const { url, target } = props;
|
|
41
|
-
return target ? (react_1.default.createElement(index_1.Button, Object.assign({}, props, { url: url }))) : (react_1.default.createElement(index_1.RouterLink, { href: url },
|
|
42
|
-
react_1.default.createElement(index_1.Button, Object.assign({}, props, { url: url }))));
|
|
43
|
-
};
|
|
44
|
-
//todo: add types support form component in map
|
|
45
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
46
|
-
const NavigationItemsMap = {
|
|
47
|
-
[models_1.NavigationItemType.Button]: NavigationButton,
|
|
48
|
-
[models_1.NavigationItemType.Social]: SocialIcon_1.default,
|
|
49
|
-
[models_1.NavigationItemType.Dropdown]: NavigationDropdown,
|
|
50
|
-
[models_1.NavigationItemType.Link]: NavigationLink,
|
|
51
|
-
};
|
|
52
|
-
const NavigationItem = (_a) => {
|
|
53
|
-
var { data, className } = _a, props = (0, tslib_1.__rest)(_a, ["data", "className"]);
|
|
54
|
-
const { type = models_1.NavigationItemType.Link } = data;
|
|
55
|
-
const Component = NavigationItemsMap[type];
|
|
56
|
-
const componentProps = (0, react_1.useMemo)(() => (Object.assign(Object.assign({ className: b({ type }, className) }, data), props)), [className, data, props, type]);
|
|
57
|
-
return react_1.default.createElement(Component, Object.assign({}, componentProps));
|
|
58
|
-
};
|
|
59
|
-
exports.default = NavigationItem;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/* use this for style redefinitions to awoid problems with
|
|
2
|
-
unpredictable css rules order in build */
|
|
3
|
-
.pc-navigation-popup {
|
|
4
|
-
position: fixed;
|
|
5
|
-
top: calc(var(--header-height) - 16px);
|
|
6
|
-
padding-right: 4px;
|
|
7
|
-
padding-left: 4px;
|
|
8
|
-
transform: translateX(calc(calc(8px * 2) * -1));
|
|
9
|
-
z-index: 101;
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
min-width: 220px;
|
|
13
|
-
padding: 16px;
|
|
14
|
-
border: 1px solid var(--yc-color-line-generic);
|
|
15
|
-
border-top-width: 0;
|
|
16
|
-
border-radius: calc(var(--pc-border-radius) / 2);
|
|
17
|
-
background: var(--yc-color-base-float);
|
|
18
|
-
box-shadow: 0 3px 10px var(--yc-color-sfx-shadow);
|
|
19
|
-
}
|
|
20
|
-
@media (max-width: 768px) {
|
|
21
|
-
.pc-navigation-popup {
|
|
22
|
-
display: none;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
.pc-navigation-popup__link {
|
|
26
|
-
height: 36px;
|
|
27
|
-
padding: 8px 12px;
|
|
28
|
-
border-radius: 8px;
|
|
29
|
-
}
|
|
30
|
-
.pc-navigation-popup__link:hover {
|
|
31
|
-
color: var(--yc-color-text-primary);
|
|
32
|
-
background-color: var(--yc-color-base-simple-hover);
|
|
33
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { NavigationLinkItem } from '../../../../models';
|
|
3
|
-
export interface NavigationPopupProps {
|
|
4
|
-
items: NavigationLinkItem[];
|
|
5
|
-
onClose: () => void;
|
|
6
|
-
left?: number;
|
|
7
|
-
className?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare const NavigationPopup: React.FC<NavigationPopupProps>;
|
|
10
|
-
export default NavigationPopup;
|
|
@@ -1,45 +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 lodash_1 = (0, tslib_1.__importDefault)(require("lodash"));
|
|
6
|
-
const react_1 = (0, tslib_1.__importStar)(require("react"));
|
|
7
|
-
const uikit_1 = require("@gravity-ui/uikit");
|
|
8
|
-
const utils_1 = require("../../../../utils");
|
|
9
|
-
const index_1 = require("../../../index");
|
|
10
|
-
const NavigationItem_1 = (0, tslib_1.__importDefault)(require("../NavigationItem/NavigationItem"));
|
|
11
|
-
const b = (0, utils_1.block)('navigation-popup');
|
|
12
|
-
const NavigationPopup = ({ items, left, onClose }) => {
|
|
13
|
-
const [calculatedLeft, setCalculatedLeft] = (0, react_1.useState)(left);
|
|
14
|
-
const popupRef = (0, react_1.useRef)(null);
|
|
15
|
-
const calculateLeft = (0, react_1.useCallback)(() => {
|
|
16
|
-
if (popupRef && popupRef.current && left) {
|
|
17
|
-
const right = left + popupRef.current.offsetWidth;
|
|
18
|
-
const docWidth = document.body.clientWidth;
|
|
19
|
-
const currentLeft = right > docWidth ? left - (right - docWidth) : left;
|
|
20
|
-
setCalculatedLeft(currentLeft);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
setCalculatedLeft(left);
|
|
24
|
-
}
|
|
25
|
-
}, [left]);
|
|
26
|
-
(0, react_1.useEffect)(() => {
|
|
27
|
-
const debounceCalculateLeft = lodash_1.default.debounce(calculateLeft, 100);
|
|
28
|
-
calculateLeft();
|
|
29
|
-
window.addEventListener('resize', debounceCalculateLeft);
|
|
30
|
-
return () => {
|
|
31
|
-
window.removeEventListener('resize', debounceCalculateLeft);
|
|
32
|
-
};
|
|
33
|
-
}, [calculateLeft]);
|
|
34
|
-
(0, react_1.useEffect)(() => {
|
|
35
|
-
calculateLeft();
|
|
36
|
-
}, [calculateLeft, left]);
|
|
37
|
-
if (!document || !document.body) {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
return (react_1.default.createElement(uikit_1.Portal, null,
|
|
41
|
-
react_1.default.createElement("div", { ref: popupRef, className: b(), style: { left: calculatedLeft } },
|
|
42
|
-
react_1.default.createElement(index_1.OutsideClick, { onOutsideClick: onClose }, items.map((item) => (react_1.default.createElement(NavigationItem_1.default, { key: item.text, className: b('link'), data: item })))))));
|
|
43
|
-
};
|
|
44
|
-
exports.NavigationPopup = NavigationPopup;
|
|
45
|
-
exports.default = exports.NavigationPopup;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/* use this for style redefinitions to awoid problems with
|
|
2
|
-
unpredictable css rules order in build */
|
|
3
|
-
.pc-social-icon {
|
|
4
|
-
display: flex;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
align-items: center;
|
|
7
|
-
width: 40px;
|
|
8
|
-
height: 40px;
|
|
9
|
-
margin-right: 8px;
|
|
10
|
-
color: var(--yc-color-base-background);
|
|
11
|
-
border-radius: 50%;
|
|
12
|
-
background-color: var(--yc-color-base-generic);
|
|
13
|
-
}
|
|
14
|
-
.pc-social-icon:hover {
|
|
15
|
-
background-color: var(--yc-color-base-generic-hover);
|
|
16
|
-
}
|
|
17
|
-
.pc-social-icon__icon {
|
|
18
|
-
width: 16px;
|
|
19
|
-
height: 16px;
|
|
20
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { NavigationSocialItem } from '../../../../models';
|
|
3
|
-
export interface NavigationSocialItemProps extends NavigationSocialItem {
|
|
4
|
-
className?: string;
|
|
5
|
-
}
|
|
6
|
-
declare const SocialIcon: React.FC<NavigationSocialItemProps>;
|
|
7
|
-
export default SocialIcon;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const react_1 = (0, tslib_1.__importDefault)(require("react"));
|
|
5
|
-
const utils_1 = require("../../../../utils");
|
|
6
|
-
const index_1 = require("../../../index");
|
|
7
|
-
const utils_2 = require("../../../Media/Image/utils");
|
|
8
|
-
const b = (0, utils_1.block)('social-icon');
|
|
9
|
-
const SocialIcon = ({ icon, url, className }) => {
|
|
10
|
-
const iconData = (0, utils_2.getMediaImage)(icon);
|
|
11
|
-
return (react_1.default.createElement("a", { href: url, target: "_blank", rel: "noopener noreferrer", className: b(null, className) },
|
|
12
|
-
react_1.default.createElement(index_1.Image, Object.assign({ className: b('icon') }, iconData))));
|
|
13
|
-
};
|
|
14
|
-
exports.default = SocialIcon;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { default as Header } from './Header/Header';
|
|
2
|
-
export { default as NavigationItem } from './NavigationItem/NavigationItem';
|
|
3
|
-
export { default as Logo } from './Logo/Logo';
|
|
4
|
-
export { default as MobileNavigation } from './MobileNavigation/MobileNavigation';
|
|
5
|
-
export { default as Navigation } from './Navigation/Navigation';
|
|
6
|
-
export { default as NavigationPopup } from './NavigationPopup/NavigationPopup';
|
|
7
|
-
export { default as SocialIcon } from './SocialIcon/SocialIcon';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SocialIcon = exports.NavigationPopup = exports.Navigation = exports.MobileNavigation = exports.Logo = exports.NavigationItem = exports.Header = void 0;
|
|
7
|
-
var Header_1 = require("./Header/Header");
|
|
8
|
-
Object.defineProperty(exports, "Header", { enumerable: true, get: function () { return __importDefault(Header_1).default; } });
|
|
9
|
-
var NavigationItem_1 = require("./NavigationItem/NavigationItem");
|
|
10
|
-
Object.defineProperty(exports, "NavigationItem", { enumerable: true, get: function () { return __importDefault(NavigationItem_1).default; } });
|
|
11
|
-
var Logo_1 = require("./Logo/Logo");
|
|
12
|
-
Object.defineProperty(exports, "Logo", { enumerable: true, get: function () { return __importDefault(Logo_1).default; } });
|
|
13
|
-
var MobileNavigation_1 = require("./MobileNavigation/MobileNavigation");
|
|
14
|
-
Object.defineProperty(exports, "MobileNavigation", { enumerable: true, get: function () { return __importDefault(MobileNavigation_1).default; } });
|
|
15
|
-
var Navigation_1 = require("./Navigation/Navigation");
|
|
16
|
-
Object.defineProperty(exports, "Navigation", { enumerable: true, get: function () { return __importDefault(Navigation_1).default; } });
|
|
17
|
-
var NavigationPopup_1 = require("./NavigationPopup/NavigationPopup");
|
|
18
|
-
Object.defineProperty(exports, "NavigationPopup", { enumerable: true, get: function () { return __importDefault(NavigationPopup_1).default; } });
|
|
19
|
-
var SocialIcon_1 = require("./SocialIcon/SocialIcon");
|
|
20
|
-
Object.defineProperty(exports, "SocialIcon", { enumerable: true, get: function () { return __importDefault(SocialIcon_1).default; } });
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const react_1 = (0, tslib_1.__importDefault)(require("react"));
|
|
5
|
-
const utils_1 = require("../../../../utils");
|
|
6
|
-
const Header_1 = (0, tslib_1.__importDefault)(require("../../components/Header/Header"));
|
|
7
|
-
const b = (0, utils_1.block)('layout');
|
|
8
|
-
const Layout = ({ children, navigation }) => (react_1.default.createElement("div", { className: b() },
|
|
9
|
-
navigation && react_1.default.createElement(Header_1.default, { data: navigation.header, logo: navigation.logo }),
|
|
10
|
-
react_1.default.createElement("main", { className: b('content') }, children)));
|
|
11
|
-
exports.default = Layout;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NavigationArrow = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = (0, tslib_1.__importDefault)(require("react"));
|
|
6
|
-
const svg_1 = require("../utils/svg");
|
|
7
|
-
const NavigationArrow = (props) => (react_1.default.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "9", height: "9", fill: "none", viewBox: "0 0 9 9" }, svg_1.a11yHiddenSvgProps, props),
|
|
8
|
-
react_1.default.createElement("path", { d: "M3 1H8M8 1V6M8 1L1 8", stroke: "currentColor", strokeOpacity: "0.7", strokeWidth: "1.2", strokeLinecap: "square" })));
|
|
9
|
-
exports.NavigationArrow = NavigationArrow;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NavigationClose = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = (0, tslib_1.__importDefault)(require("react"));
|
|
6
|
-
const svg_1 = require("../utils/svg");
|
|
7
|
-
const NavigationClose = (props) => (react_1.default.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "36", height: "36", fill: "none" }, svg_1.a11yHiddenSvgProps, props),
|
|
8
|
-
react_1.default.createElement("path", { d: "M26 10 10 26m16 0L10 10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })));
|
|
9
|
-
exports.NavigationClose = NavigationClose;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NavigationOpen = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = (0, tslib_1.__importDefault)(require("react"));
|
|
6
|
-
const svg_1 = require("../utils/svg");
|
|
7
|
-
const NavigationOpen = (props) => (react_1.default.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "36", height: "36", fill: "none" }, svg_1.a11yHiddenSvgProps, props),
|
|
8
|
-
react_1.default.createElement("rect", { x: "8", y: "10", width: "20", height: "2", rx: "1", fill: "currentColor" }),
|
|
9
|
-
react_1.default.createElement("rect", { x: "8", y: "17", width: "20", height: "2", rx: "1", fill: "currentColor" }),
|
|
10
|
-
react_1.default.createElement("rect", { x: "8", y: "24", width: "20", height: "2", rx: "1", fill: "currentColor" })));
|
|
11
|
-
exports.NavigationOpen = NavigationOpen;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { ImageProps, ButtonProps } from './constructor-items';
|
|
2
|
-
export declare enum NavigationItemType {
|
|
3
|
-
Link = "link",
|
|
4
|
-
Dropdown = "dropdown",
|
|
5
|
-
Button = "button",
|
|
6
|
-
Social = "social"
|
|
7
|
-
}
|
|
8
|
-
export interface NavigationItemBase {
|
|
9
|
-
text: string;
|
|
10
|
-
icon?: ImageProps;
|
|
11
|
-
url?: string;
|
|
12
|
-
}
|
|
13
|
-
export interface NavigationLinkItem extends NavigationItemBase {
|
|
14
|
-
type: NavigationItemType.Link;
|
|
15
|
-
url: string;
|
|
16
|
-
arrow?: boolean;
|
|
17
|
-
target?: string;
|
|
18
|
-
}
|
|
19
|
-
export interface NavigationButtonItem extends ButtonProps {
|
|
20
|
-
type: NavigationItemType.Button;
|
|
21
|
-
url: string;
|
|
22
|
-
target?: string;
|
|
23
|
-
}
|
|
24
|
-
export interface NavigationDropdownItem extends NavigationItemBase {
|
|
25
|
-
type: NavigationItemType.Dropdown;
|
|
26
|
-
items: NavigationLinkItem[];
|
|
27
|
-
}
|
|
28
|
-
export interface NavigationSocialItem extends Omit<NavigationItemBase, 'text'> {
|
|
29
|
-
type: NavigationItemType.Social;
|
|
30
|
-
icon: ImageProps;
|
|
31
|
-
url: string;
|
|
32
|
-
}
|
|
33
|
-
export declare type NavigationItem = NavigationLinkItem | NavigationButtonItem | NavigationDropdownItem;
|
|
34
|
-
export declare type NavigationItemData = NavigationLinkItem | NavigationButtonItem | NavigationSocialItem | DropdownItemData;
|
|
35
|
-
export declare type DropdownItemData = Omit<NavigationDropdownItem, 'items'>;
|
|
36
|
-
export interface NavigationLogo {
|
|
37
|
-
icon: ImageProps;
|
|
38
|
-
text?: string;
|
|
39
|
-
url?: string;
|
|
40
|
-
}
|
|
41
|
-
export interface HeaderData {
|
|
42
|
-
leftItems: NavigationItem[];
|
|
43
|
-
rightItems?: NavigationItem[];
|
|
44
|
-
}
|
|
45
|
-
export interface FooterColumn {
|
|
46
|
-
title: string;
|
|
47
|
-
links: NavigationItem[];
|
|
48
|
-
}
|
|
49
|
-
export interface FooterUnderline {
|
|
50
|
-
links?: NavigationItem[];
|
|
51
|
-
copyright?: string;
|
|
52
|
-
}
|
|
53
|
-
export interface FooterData {
|
|
54
|
-
columns: FooterColumn[];
|
|
55
|
-
social?: NavigationSocialItem[];
|
|
56
|
-
underline?: FooterUnderline;
|
|
57
|
-
}
|
|
58
|
-
export interface NavigationData {
|
|
59
|
-
logo: NavigationLogo;
|
|
60
|
-
header: HeaderData;
|
|
61
|
-
footer?: FooterData;
|
|
62
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NavigationItemType = void 0;
|
|
4
|
-
var NavigationItemType;
|
|
5
|
-
(function (NavigationItemType) {
|
|
6
|
-
NavigationItemType["Link"] = "link";
|
|
7
|
-
NavigationItemType["Dropdown"] = "dropdown";
|
|
8
|
-
NavigationItemType["Button"] = "button";
|
|
9
|
-
NavigationItemType["Social"] = "social";
|
|
10
|
-
})(NavigationItemType = exports.NavigationItemType || (exports.NavigationItemType = {}));
|