@gravity-ui/page-constructor 4.4.1 → 4.5.1
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/ButtonTabs/ButtonTabs.js +6 -1
- package/build/cjs/components/CardBase/CardBase.css +4 -4
- package/build/cjs/components/ReactPlayer/ReactPlayer.js +4 -2
- package/build/cjs/constructor-items.d.ts +7 -0
- package/build/cjs/constructor-items.js +11 -1
- package/build/cjs/containers/PageConstructor/PageConstructor.d.ts +2 -1
- package/build/cjs/containers/PageConstructor/PageConstructor.js +9 -4
- package/build/cjs/context/innerContext/InnerContext.d.ts +3 -1
- package/build/cjs/context/innerContext/InnerContext.js +2 -0
- package/build/cjs/editor/store/index.js +1 -1
- package/build/cjs/editor/utils/index.d.ts +1 -0
- package/build/cjs/models/constructor-items/common.d.ts +1 -1
- package/build/cjs/models/constructor.d.ts +1 -0
- package/build/cjs/models/navigation.d.ts +1 -0
- package/build/cjs/models/navigation.js +2 -1
- package/build/cjs/navigation/components/MobileMenuButton/MobileMenuButton.js +1 -0
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.js +3 -15
- package/build/cjs/navigation/components/NavigationItem/index.d.ts +6 -0
- package/build/cjs/navigation/components/NavigationItem/index.js +14 -0
- package/build/cjs/navigation/components/NavigationListItem/NavigationListItem.js +1 -1
- package/build/cjs/navigation/components/NavigationPopup/NavigationPopup.js +1 -1
- package/build/cjs/sub-blocks/BackgroundCard/BackgroundCard.js +1 -2
- package/build/cjs/sub-blocks/Quote/Quote.css +0 -3
- package/build/cjs/utils/blocks.d.ts +2 -6
- package/build/cjs/utils/blocks.js +11 -16
- package/build/esm/components/ButtonTabs/ButtonTabs.js +6 -1
- package/build/esm/components/CardBase/CardBase.css +4 -4
- package/build/esm/components/ReactPlayer/ReactPlayer.js +6 -4
- package/build/esm/constructor-items.d.ts +7 -0
- package/build/esm/constructor-items.js +10 -1
- package/build/esm/containers/PageConstructor/PageConstructor.d.ts +2 -1
- package/build/esm/containers/PageConstructor/PageConstructor.js +12 -7
- package/build/esm/context/innerContext/InnerContext.d.ts +3 -1
- package/build/esm/context/innerContext/InnerContext.js +2 -0
- package/build/esm/editor/store/index.js +2 -2
- package/build/esm/editor/utils/index.d.ts +1 -0
- package/build/esm/models/constructor-items/common.d.ts +1 -1
- package/build/esm/models/constructor.d.ts +1 -0
- package/build/esm/models/navigation.d.ts +1 -0
- package/build/esm/models/navigation.js +1 -0
- package/build/esm/navigation/components/MobileMenuButton/MobileMenuButton.js +1 -0
- package/build/esm/navigation/components/NavigationItem/NavigationItem.js +4 -16
- package/build/esm/navigation/components/NavigationItem/index.d.ts +6 -0
- package/build/esm/navigation/components/NavigationItem/index.js +6 -0
- package/build/esm/navigation/components/NavigationListItem/NavigationListItem.js +1 -1
- package/build/esm/navigation/components/NavigationPopup/NavigationPopup.js +1 -1
- package/build/esm/sub-blocks/BackgroundCard/BackgroundCard.js +1 -2
- package/build/esm/sub-blocks/Quote/Quote.css +0 -3
- package/build/esm/utils/blocks.d.ts +2 -6
- package/build/esm/utils/blocks.js +8 -11
- package/package.json +2 -1
- package/server/models/constructor-items/common.d.ts +1 -1
- package/server/models/constructor.d.ts +1 -0
- package/server/models/navigation.d.ts +1 -0
- package/server/models/navigation.js +2 -1
- package/server/utils/blocks.d.ts +2 -6
- package/server/utils/blocks.js +11 -16
- package/styles/mixins.scss +3 -1
- package/widget/index.js +1 -1
|
@@ -17,6 +17,11 @@ const ButtonTabs = ({ className, items, activeTab, onSelectTab, tabSize = 'l', q
|
|
|
17
17
|
onSelectTab(tabId, e);
|
|
18
18
|
}
|
|
19
19
|
}, [onSelectTab]);
|
|
20
|
-
return (react_1.default.createElement("div", { className: b(null, className), "data-qa": qa }, items.map(({ id, title }) =>
|
|
20
|
+
return (react_1.default.createElement("div", { className: b(null, className), "data-qa": qa }, items.map(({ id, title }) => {
|
|
21
|
+
const isActive = id === activeTabId;
|
|
22
|
+
return (react_1.default.createElement(index_1.Button, { text: title, className: b('item', { active: isActive }), key: title, size: tabSize, onClick: handleClick(id), extraProps: {
|
|
23
|
+
'aria-current': isActive,
|
|
24
|
+
} }));
|
|
25
|
+
})));
|
|
21
26
|
};
|
|
22
27
|
exports.default = ButtonTabs;
|
|
@@ -22,9 +22,6 @@ unpredictable css rules order in build */
|
|
|
22
22
|
.pc-card-base-block_border_line {
|
|
23
23
|
border: 1px solid var(--g-color-line-generic);
|
|
24
24
|
}
|
|
25
|
-
.pc-card-base-block_border_line, .pc-card-base-block_border_none {
|
|
26
|
-
cursor: default;
|
|
27
|
-
}
|
|
28
25
|
@media (min-width: 577px) {
|
|
29
26
|
.slick-slide:not(.slick-active) .pc-card-base-block {
|
|
30
27
|
box-shadow: none;
|
|
@@ -80,7 +77,10 @@ a.pc-card-base-block_border_line {
|
|
|
80
77
|
border: 1px solid var(--g-color-line-generic);
|
|
81
78
|
}
|
|
82
79
|
a.pc-card-base-block_border_line, a.pc-card-base-block_border_none {
|
|
83
|
-
|
|
80
|
+
transition: transform 0.3s ease-out;
|
|
81
|
+
}
|
|
82
|
+
a.pc-card-base-block_border_line:hover, a.pc-card-base-block_border_none:hover {
|
|
83
|
+
transform: translateY(-8px);
|
|
84
84
|
}
|
|
85
85
|
a.pc-card-base-block_border_shadow {
|
|
86
86
|
transition: transform 0.3s ease-out;
|
|
@@ -37,6 +37,8 @@ exports.ReactPlayerBlock = react_1.default.forwardRef((props, originRef) => {
|
|
|
37
37
|
const [started, setStarted] = (0, react_1.useState)(autoPlay);
|
|
38
38
|
const [paused, setPaused] = (0, react_1.useState)(false);
|
|
39
39
|
const [ended, setEnded] = (0, react_1.useState)(false);
|
|
40
|
+
const [isMounted, setIsMounted] = react_1.default.useState(false);
|
|
41
|
+
(0, hooks_1.useMount)(() => setIsMounted(true));
|
|
40
42
|
const videoSrc = (0, react_1.useMemo)(() => (0, utils_2.checkYoutubeVideos)(src), [src]);
|
|
41
43
|
const eventsArray = (0, react_1.useMemo)(() => {
|
|
42
44
|
if (analyticsEvents) {
|
|
@@ -195,9 +197,9 @@ exports.ReactPlayerBlock = react_1.default.forwardRef((props, originRef) => {
|
|
|
195
197
|
},
|
|
196
198
|
}, elapsedTimePercent: elapsedTimePercent }));
|
|
197
199
|
}, [controls, isPlaying, customBarControlsClassName, changeMute]);
|
|
198
|
-
return (react_1.default.createElement("div", { className: b({ wrapper: !currentHeight }, className), ref: ref, onClick: handleClick },
|
|
200
|
+
return (react_1.default.createElement("div", { className: b({ wrapper: !currentHeight }, className), ref: ref, onClick: handleClick }, isMounted ? (react_1.default.createElement(react_1.Fragment, null,
|
|
199
201
|
react_1.default.createElement(react_player_1.default, { className: b('player'), url: videoSrc, muted: muted, controls: controls === models_1.MediaVideoControlsType.Default, height: currentHeight || '100%', width: width || '100%', light: previewImgUrl, playing: isPlaying, playIcon: playIcon, progressInterval: FPS, onClickPreview: handleClickPreview, onStart: onStart, onReady: setPlayerRef, onPlay: onPlay, onPause: onPause, onProgress: onProgress, onEnded: onEnded, "aria-label": ariaLabel }),
|
|
200
|
-
renderCustomBarControls(muted, playedPercent)));
|
|
202
|
+
renderCustomBarControls(muted, playedPercent))) : null));
|
|
201
203
|
});
|
|
202
204
|
function getHeight(width) {
|
|
203
205
|
return (width / 16) * 9;
|
|
@@ -29,3 +29,10 @@ export declare const subBlockMap: {
|
|
|
29
29
|
content: (props: import("./models").ContentBlockProps & import("./models").ClassNameProps) => JSX.Element;
|
|
30
30
|
quote: (props: import("./models").QuoteProps) => JSX.Element;
|
|
31
31
|
};
|
|
32
|
+
export declare const navItemMap: {
|
|
33
|
+
button: import("react").FC<Pick<import("./navigation/models").NavigationItemProps, "className"> & import("./models").ButtonProps>;
|
|
34
|
+
social: import("react").FC<import("./navigation/components/SocialIcon/SocialIcon").NavigationSocialItemOwnProps>;
|
|
35
|
+
dropdown: ({ text, icon, className, iconSize, hidePopup, items, isActive, ...props }: import("./navigation/models").NavigationItemProps & import("./models").NavigationDropdownItem) => JSX.Element;
|
|
36
|
+
link: import("react").FC<import("./navigation/models").NavigationItemProps & import("./models").NavigationLinkItem>;
|
|
37
|
+
"github-button": ({ text, url, className, label, size, icon, }: import("./navigation/models").NavigationItemProps & import("./models").NavigationGithubButton) => JSX.Element;
|
|
38
|
+
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.subBlockMap = exports.blockMap = void 0;
|
|
3
|
+
exports.navItemMap = exports.subBlockMap = exports.blockMap = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const blocks_1 = require("./blocks");
|
|
5
6
|
const models_1 = require("./models");
|
|
7
|
+
const NavigationItem_1 = require("./navigation/components/NavigationItem");
|
|
8
|
+
const SocialIcon_1 = tslib_1.__importDefault(require("./navigation/components/SocialIcon/SocialIcon"));
|
|
6
9
|
const sub_blocks_1 = require("./sub-blocks");
|
|
7
10
|
exports.blockMap = {
|
|
8
11
|
[models_1.BlockType.SliderBlock]: blocks_1.SliderBlock,
|
|
@@ -35,3 +38,10 @@ exports.subBlockMap = {
|
|
|
35
38
|
[models_1.SubBlockType.Content]: sub_blocks_1.Content,
|
|
36
39
|
[models_1.SubBlockType.Quote]: sub_blocks_1.Quote,
|
|
37
40
|
};
|
|
41
|
+
exports.navItemMap = {
|
|
42
|
+
[models_1.NavigationItemType.Button]: NavigationItem_1.NavigationButton,
|
|
43
|
+
[models_1.NavigationItemType.Social]: SocialIcon_1.default,
|
|
44
|
+
[models_1.NavigationItemType.Dropdown]: NavigationItem_1.NavigationDropdown,
|
|
45
|
+
[models_1.NavigationItemType.Link]: NavigationItem_1.NavigationLink,
|
|
46
|
+
[models_1.NavigationItemType.GithubButton]: NavigationItem_1.GithubButton,
|
|
47
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import '@doc-tools/transform/dist/js/yfm';
|
|
3
|
-
import { blockMap, subBlockMap } from '../../constructor-items';
|
|
3
|
+
import { blockMap, navItemMap, subBlockMap } from '../../constructor-items';
|
|
4
4
|
import { CustomConfig, CustomItems, NavigationData, PageContent, ShouldRenderBlock } from '../../models';
|
|
5
5
|
export type ItemMap = typeof blockMap & typeof subBlockMap & CustomItems;
|
|
6
|
+
export type NavItemMap = typeof navItemMap & CustomItems;
|
|
6
7
|
export interface PageConstructorProps {
|
|
7
8
|
content?: PageContent;
|
|
8
9
|
shouldRenderBlock?: ShouldRenderBlock;
|
|
@@ -24,10 +24,15 @@ const Constructor = (props) => {
|
|
|
24
24
|
const { content: { blocks = [], background = {} } = {}, renderMenu, shouldRenderBlock, navigation, custom, } = props;
|
|
25
25
|
const { context } = (0, react_1.useMemo)(() => ({
|
|
26
26
|
context: {
|
|
27
|
-
blockTypes: [...models_1.BlockTypes, ...(0, utils_1.
|
|
28
|
-
subBlockTypes: [...models_1.SubBlockTypes, ...(0, utils_1.
|
|
29
|
-
headerBlockTypes: [...models_1.HeaderBlockTypes, ...(0, utils_1.
|
|
30
|
-
|
|
27
|
+
blockTypes: [...models_1.BlockTypes, ...(0, utils_1.getCustomTypes)(['blocks', 'headers'], custom)],
|
|
28
|
+
subBlockTypes: [...models_1.SubBlockTypes, ...(0, utils_1.getCustomTypes)(['subBlocks'], custom)],
|
|
29
|
+
headerBlockTypes: [...models_1.HeaderBlockTypes, ...(0, utils_1.getCustomTypes)(['headers'], custom)],
|
|
30
|
+
navigationBlockTypes: [
|
|
31
|
+
...models_1.NavigationItemTypes,
|
|
32
|
+
...(0, utils_1.getCustomTypes)(['navigation'], custom),
|
|
33
|
+
],
|
|
34
|
+
itemMap: Object.assign(Object.assign(Object.assign({}, constructor_items_1.blockMap), constructor_items_1.subBlockMap), (0, utils_1.getCustomItems)(['blocks', 'headers', 'subBlocks'], custom)),
|
|
35
|
+
navItemMap: Object.assign(Object.assign({}, constructor_items_1.navItemMap), (0, utils_1.getCustomItems)(['navigation'], custom)),
|
|
31
36
|
loadables: custom === null || custom === void 0 ? void 0 : custom.loadable,
|
|
32
37
|
shouldRenderBlock,
|
|
33
38
|
customization: {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ItemMap } from '../../containers/PageConstructor/PageConstructor';
|
|
2
|
+
import { ItemMap, NavItemMap } from '../../containers/PageConstructor/PageConstructor';
|
|
3
3
|
import { CustomConfig, LoadableConfig, ShouldRenderBlock } from '../../models';
|
|
4
4
|
export interface InnerContextType {
|
|
5
5
|
blockTypes: string[];
|
|
6
6
|
subBlockTypes: string[];
|
|
7
7
|
headerBlockTypes: string[];
|
|
8
|
+
navigationBlockTypes: string[];
|
|
8
9
|
itemMap: ItemMap;
|
|
10
|
+
navItemMap: NavItemMap;
|
|
9
11
|
loadables?: LoadableConfig;
|
|
10
12
|
shouldRenderBlock?: ShouldRenderBlock;
|
|
11
13
|
customization?: Pick<CustomConfig, 'decorators'>;
|
|
@@ -19,7 +19,7 @@ function useEditorState({ content: intialContent, custom }) {
|
|
|
19
19
|
theme: constants_1.DEFAULT_THEME,
|
|
20
20
|
});
|
|
21
21
|
return (0, react_1.useMemo)(() => {
|
|
22
|
-
const headerBlockTypes = [...models_1.HeaderBlockTypes, ...(0, utils_1.
|
|
22
|
+
const headerBlockTypes = [...models_1.HeaderBlockTypes, ...(0, utils_1.getCustomTypes)(['headers'], custom)];
|
|
23
23
|
const contentHasHeader = Boolean((0, utils_1.getHeaderBlock)(content.blocks, headerBlockTypes));
|
|
24
24
|
const checkIsHeader = (type) => headerBlockTypes.includes(type);
|
|
25
25
|
const onAdd = (block) => {
|
|
@@ -8,6 +8,7 @@ export declare const addCustomDecorator: (decorators: BlockDecorator[], custom?:
|
|
|
8
8
|
blocks?: import("../../models").CustomItems | undefined;
|
|
9
9
|
subBlocks?: import("../../models").CustomItems | undefined;
|
|
10
10
|
headers?: import("../../models").CustomItems | undefined;
|
|
11
|
+
navigation?: import("../../models").CustomItems | undefined;
|
|
11
12
|
loadable?: import("../../models").LoadableConfig | undefined;
|
|
12
13
|
};
|
|
13
14
|
export declare const getBlockId: ({ index, type }: BlockDecorationProps) => string;
|
|
@@ -132,7 +132,7 @@ export interface FileLinkProps extends ClassNameProps, Tabbable {
|
|
|
132
132
|
onClick?: () => void;
|
|
133
133
|
}
|
|
134
134
|
export type ButtonTheme = ButtonView | 'github' | 'app-store' | 'google-play' | 'scale' | 'monochrome';
|
|
135
|
-
export interface ButtonProps extends AnalyticsEventsBase, Pick<UikitButtonProps, 'size' | 'width'> {
|
|
135
|
+
export interface ButtonProps extends AnalyticsEventsBase, Pick<UikitButtonProps, 'size' | 'width' | 'extraProps'> {
|
|
136
136
|
text: string;
|
|
137
137
|
url: string;
|
|
138
138
|
primary?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NavigationGithubButtonIcon = exports.NavigationItemType = void 0;
|
|
3
|
+
exports.NavigationGithubButtonIcon = exports.NavigationItemTypes = exports.NavigationItemType = void 0;
|
|
4
4
|
var NavigationItemType;
|
|
5
5
|
(function (NavigationItemType) {
|
|
6
6
|
NavigationItemType["Link"] = "link";
|
|
@@ -9,6 +9,7 @@ var NavigationItemType;
|
|
|
9
9
|
NavigationItemType["Social"] = "social";
|
|
10
10
|
NavigationItemType["GithubButton"] = "github-button";
|
|
11
11
|
})(NavigationItemType = exports.NavigationItemType || (exports.NavigationItemType = {}));
|
|
12
|
+
exports.NavigationItemTypes = Object.values(NavigationItemType);
|
|
12
13
|
var NavigationGithubButtonIcon;
|
|
13
14
|
(function (NavigationGithubButtonIcon) {
|
|
14
15
|
NavigationGithubButtonIcon["heart"] = "octicon-heart";
|
|
@@ -10,6 +10,7 @@ const b = (0, utils_1.block)('mobile-menu-button');
|
|
|
10
10
|
const ICON_SIZE = 36;
|
|
11
11
|
const MobileMenuButton = ({ isSidebarOpened, onSidebarOpenedChange, }) => (react_1.default.createElement(components_1.Control, { className: b(), onClick: (e) => {
|
|
12
12
|
e.stopPropagation();
|
|
13
|
+
e.nativeEvent.stopImmediatePropagation();
|
|
13
14
|
onSidebarOpenedChange(!isSidebarOpened);
|
|
14
15
|
}, size: "l", icon: isSidebarOpened ? icons_1.NavigationClose : icons_1.NavigationOpen, iconSize: ICON_SIZE }));
|
|
15
16
|
exports.MobileMenuButton = MobileMenuButton;
|
|
@@ -4,28 +4,16 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
5
|
const lodash_1 = require("lodash");
|
|
6
6
|
const blockIdContext_1 = require("../../../context/blockIdContext");
|
|
7
|
+
const innerContext_1 = require("../../../context/innerContext");
|
|
7
8
|
const models_1 = require("../../../models");
|
|
8
9
|
const utils_1 = require("../../../utils");
|
|
9
|
-
const SocialIcon_1 = tslib_1.__importDefault(require("../SocialIcon/SocialIcon"));
|
|
10
|
-
const GithubButton_1 = require("./components/GithubButton/GithubButton");
|
|
11
|
-
const NavigationButton_1 = require("./components/NavigationButton/NavigationButton");
|
|
12
|
-
const NavigationDropdown_1 = require("./components/NavigationDropdown/NavigationDropdown");
|
|
13
|
-
const NavigationLink_1 = require("./components/NavigationLink/NavigationLink");
|
|
14
10
|
const b = (0, utils_1.block)('navigation-item');
|
|
15
11
|
const ANALYTICS_ID = 'navigation';
|
|
16
|
-
//todo: add types support form component in map
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
|
-
const NavigationItemsMap = {
|
|
19
|
-
[models_1.NavigationItemType.Button]: NavigationButton_1.NavigationButton,
|
|
20
|
-
[models_1.NavigationItemType.Social]: SocialIcon_1.default,
|
|
21
|
-
[models_1.NavigationItemType.Dropdown]: NavigationDropdown_1.NavigationDropdown,
|
|
22
|
-
[models_1.NavigationItemType.Link]: NavigationLink_1.NavigationLink,
|
|
23
|
-
[models_1.NavigationItemType.GithubButton]: GithubButton_1.GithubButton,
|
|
24
|
-
};
|
|
25
12
|
const NavigationItem = (_a) => {
|
|
26
13
|
var { data, className, menuLayout } = _a, props = tslib_1.__rest(_a, ["data", "className", "menuLayout"]);
|
|
27
14
|
const { type = models_1.NavigationItemType.Link } = data;
|
|
28
|
-
const
|
|
15
|
+
const { navItemMap } = (0, react_1.useContext)(innerContext_1.InnerContext);
|
|
16
|
+
const Component = navItemMap[type];
|
|
29
17
|
const componentProps = (0, react_1.useMemo)(() => {
|
|
30
18
|
const componentProperties = Object.assign(Object.assign({}, data), props);
|
|
31
19
|
if (type !== models_1.NavigationItemType.Dropdown) {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { GithubButton } from './components/GithubButton/GithubButton';
|
|
2
|
+
export { NavigationButton } from './components/NavigationButton/NavigationButton';
|
|
3
|
+
export { NavigationDropdown } from './components/NavigationDropdown/NavigationDropdown';
|
|
4
|
+
export { NavigationLink } from './components/NavigationLink/NavigationLink';
|
|
5
|
+
import NavigationItem from './NavigationItem';
|
|
6
|
+
export default NavigationItem;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NavigationLink = exports.NavigationDropdown = exports.NavigationButton = exports.GithubButton = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
var GithubButton_1 = require("./components/GithubButton/GithubButton");
|
|
6
|
+
Object.defineProperty(exports, "GithubButton", { enumerable: true, get: function () { return GithubButton_1.GithubButton; } });
|
|
7
|
+
var NavigationButton_1 = require("./components/NavigationButton/NavigationButton");
|
|
8
|
+
Object.defineProperty(exports, "NavigationButton", { enumerable: true, get: function () { return NavigationButton_1.NavigationButton; } });
|
|
9
|
+
var NavigationDropdown_1 = require("./components/NavigationDropdown/NavigationDropdown");
|
|
10
|
+
Object.defineProperty(exports, "NavigationDropdown", { enumerable: true, get: function () { return NavigationDropdown_1.NavigationDropdown; } });
|
|
11
|
+
var NavigationLink_1 = require("./components/NavigationLink/NavigationLink");
|
|
12
|
+
Object.defineProperty(exports, "NavigationLink", { enumerable: true, get: function () { return NavigationLink_1.NavigationLink; } });
|
|
13
|
+
const NavigationItem_1 = tslib_1.__importDefault(require("./NavigationItem"));
|
|
14
|
+
exports.default = NavigationItem_1.default;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
|
-
const NavigationItem_1 = tslib_1.__importDefault(require("../NavigationItem
|
|
6
|
+
const NavigationItem_1 = tslib_1.__importDefault(require("../NavigationItem"));
|
|
7
7
|
const NavigationListItem = (_a) => {
|
|
8
8
|
var { column, index, activeItemId, onActiveItemChange } = _a, props = tslib_1.__rest(_a, ["column", "index", "activeItemId", "onActiveItemChange"]);
|
|
9
9
|
const id = `${column}-${index}`;
|
|
@@ -6,7 +6,7 @@ const react_1 = tslib_1.__importDefault(require("react"));
|
|
|
6
6
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
7
7
|
const utils_1 = require("../../../utils");
|
|
8
8
|
const models_1 = require("../../models");
|
|
9
|
-
const NavigationItem_1 = tslib_1.__importDefault(require("../NavigationItem
|
|
9
|
+
const NavigationItem_1 = tslib_1.__importDefault(require("../NavigationItem"));
|
|
10
10
|
const b = (0, utils_1.block)('navigation-popup');
|
|
11
11
|
const OFFSET_RESET = [0, 0];
|
|
12
12
|
const NavigationPopup = ({ anchorRef, items, onClose, className, open, }) => (react_1.default.createElement(uikit_1.Popup
|
|
@@ -11,9 +11,8 @@ const BackgroundCard = (props) => {
|
|
|
11
11
|
const { url, title, text, border, background, paddingBottom, backgroundColor, additionalInfo, theme: cardTheme = 'default', links, buttons, } = props;
|
|
12
12
|
const theme = (0, theme_1.useTheme)();
|
|
13
13
|
const hasBackgroundColor = backgroundColor || cardTheme !== 'default';
|
|
14
|
-
const link = hasBackgroundColor || border === 'line' ? undefined : url;
|
|
15
14
|
const borderType = hasBackgroundColor ? 'none' : border;
|
|
16
|
-
return (react_1.default.createElement(components_1.CardBase, { className: b({ padding: paddingBottom, theme: cardTheme }), url:
|
|
15
|
+
return (react_1.default.createElement(components_1.CardBase, { className: b({ padding: paddingBottom, theme: cardTheme }), url: url, border: borderType },
|
|
17
16
|
react_1.default.createElement(components_1.CardBase.Content, null,
|
|
18
17
|
react_1.default.createElement(components_1.BackgroundImage, Object.assign({ className: b('image') }, (0, utils_1.getThemedValue)(background, theme), { style: { backgroundColor } })),
|
|
19
18
|
react_1.default.createElement(Content_1.default, { title: title, text: text, additionalInfo: additionalInfo, size: "s", theme: cardTheme, links: links, buttons: buttons, colSizes: { all: 12, md: 12 } }))));
|
|
@@ -31,9 +31,6 @@ unpredictable css rules order in build */
|
|
|
31
31
|
.pc-quote_border_line {
|
|
32
32
|
border: 1px solid var(--g-color-line-generic);
|
|
33
33
|
}
|
|
34
|
-
.pc-quote_border_line, .pc-quote_border_none {
|
|
35
|
-
cursor: default;
|
|
36
|
-
}
|
|
37
34
|
@media (min-width: 577px) {
|
|
38
35
|
.slick-slide:not(.slick-active) .pc-quote {
|
|
39
36
|
box-shadow: none;
|
|
@@ -2,12 +2,8 @@ import { ConstructorBlock, CustomConfig, PCShareSocialNetwork, TextSize } from '
|
|
|
2
2
|
export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h3" | "h4";
|
|
3
3
|
export declare function hasBlockTag(content: string): boolean;
|
|
4
4
|
export declare function getBlockKey(block: ConstructorBlock, index: number): string;
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
[x: string]: any;
|
|
8
|
-
};
|
|
9
|
-
export declare const getCustomSubBlockTypes: (customBlocks?: CustomConfig) => string[];
|
|
10
|
-
export declare const getCustomHeaderTypes: (customBlocks?: CustomConfig) => string[];
|
|
5
|
+
export declare const getCustomItems: (types: (keyof CustomConfig)[], customBlocks?: CustomConfig) => {};
|
|
6
|
+
export declare const getCustomTypes: (types: (keyof CustomConfig)[], customBlocks?: CustomConfig) => string[];
|
|
11
7
|
export declare const getOrderedBlocks: (blocks: ConstructorBlock[], headerBlockTypes?: string[]) => ConstructorBlock[];
|
|
12
8
|
export declare const getHeaderBlock: (blocks: ConstructorBlock[], headerBlockTypes?: string[]) => ConstructorBlock | undefined;
|
|
13
9
|
export declare const getShareLink: (url: string, type: PCShareSocialNetwork, title?: string, text?: string) => string | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getShareLink = exports.getHeaderBlock = exports.getOrderedBlocks = exports.
|
|
3
|
+
exports.getShareLink = exports.getHeaderBlock = exports.getOrderedBlocks = exports.getCustomTypes = exports.getCustomItems = exports.getBlockKey = exports.hasBlockTag = exports.getHeaderTag = void 0;
|
|
4
4
|
const models_1 = require("../models");
|
|
5
5
|
const BLOCK_ELEMENTS = [
|
|
6
6
|
'div',
|
|
@@ -62,23 +62,18 @@ function getBlockKey(block, index) {
|
|
|
62
62
|
return `${block.type}-${index}`;
|
|
63
63
|
}
|
|
64
64
|
exports.getBlockKey = getBlockKey;
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
exports.getCustomBlockTypes = getCustomBlockTypes;
|
|
70
|
-
const getCustomItems = ({ blocks = {}, headers = {}, subBlocks = {} } = {}) => (Object.assign(Object.assign(Object.assign({}, blocks), headers), subBlocks));
|
|
71
|
-
exports.getCustomItems = getCustomItems;
|
|
72
|
-
const getCustomSubBlockTypes = (customBlocks = {}) => {
|
|
73
|
-
const { subBlocks = {} } = customBlocks;
|
|
74
|
-
return Object.keys(subBlocks);
|
|
65
|
+
const getCustomItems = (types, customBlocks = {}) => {
|
|
66
|
+
return types.reduce((result, type) => {
|
|
67
|
+
return Object.assign(result, customBlocks[type] || {});
|
|
68
|
+
}, {});
|
|
75
69
|
};
|
|
76
|
-
exports.
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
70
|
+
exports.getCustomItems = getCustomItems;
|
|
71
|
+
const getCustomTypes = (types, customBlocks = {}) => {
|
|
72
|
+
return types.reduce((result, type) => {
|
|
73
|
+
return result.concat(Object.keys(customBlocks[type] || {}));
|
|
74
|
+
}, []);
|
|
80
75
|
};
|
|
81
|
-
exports.
|
|
76
|
+
exports.getCustomTypes = getCustomTypes;
|
|
82
77
|
const getShareUrlWithParams = (url, params = {}) => {
|
|
83
78
|
const result = new URL(url);
|
|
84
79
|
Object.entries(params).forEach(([name, value]) => {
|
|
@@ -15,6 +15,11 @@ const ButtonTabs = ({ className, items, activeTab, onSelectTab, tabSize = 'l', q
|
|
|
15
15
|
onSelectTab(tabId, e);
|
|
16
16
|
}
|
|
17
17
|
}, [onSelectTab]);
|
|
18
|
-
return (React.createElement("div", { className: b(null, className), "data-qa": qa }, items.map(({ id, title }) =>
|
|
18
|
+
return (React.createElement("div", { className: b(null, className), "data-qa": qa }, items.map(({ id, title }) => {
|
|
19
|
+
const isActive = id === activeTabId;
|
|
20
|
+
return (React.createElement(Button, { text: title, className: b('item', { active: isActive }), key: title, size: tabSize, onClick: handleClick(id), extraProps: {
|
|
21
|
+
'aria-current': isActive,
|
|
22
|
+
} }));
|
|
23
|
+
})));
|
|
19
24
|
};
|
|
20
25
|
export default ButtonTabs;
|
|
@@ -22,9 +22,6 @@ unpredictable css rules order in build */
|
|
|
22
22
|
.pc-card-base-block_border_line {
|
|
23
23
|
border: 1px solid var(--g-color-line-generic);
|
|
24
24
|
}
|
|
25
|
-
.pc-card-base-block_border_line, .pc-card-base-block_border_none {
|
|
26
|
-
cursor: default;
|
|
27
|
-
}
|
|
28
25
|
@media (min-width: 577px) {
|
|
29
26
|
.slick-slide:not(.slick-active) .pc-card-base-block {
|
|
30
27
|
box-shadow: none;
|
|
@@ -80,7 +77,10 @@ a.pc-card-base-block_border_line {
|
|
|
80
77
|
border: 1px solid var(--g-color-line-generic);
|
|
81
78
|
}
|
|
82
79
|
a.pc-card-base-block_border_line, a.pc-card-base-block_border_none {
|
|
83
|
-
|
|
80
|
+
transition: transform 0.3s ease-out;
|
|
81
|
+
}
|
|
82
|
+
a.pc-card-base-block_border_line:hover, a.pc-card-base-block_border_none:hover {
|
|
83
|
+
transform: translateY(-8px);
|
|
84
84
|
}
|
|
85
85
|
a.pc-card-base-block_border_shadow {
|
|
86
86
|
transition: transform 0.3s ease-out;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React, { useCallback, useContext, useEffect, useImperativeHandle, useMemo, useRef, useState, } from 'react';
|
|
1
|
+
import React, { Fragment, useCallback, useContext, useEffect, useImperativeHandle, useMemo, useRef, useState, } from 'react';
|
|
2
2
|
import { Icon } from '@gravity-ui/uikit';
|
|
3
3
|
import _ from 'lodash';
|
|
4
4
|
import ReactPlayer from 'react-player';
|
|
5
5
|
import { MetrikaContext } from '../../context/metrikaContext';
|
|
6
6
|
import { MobileContext } from '../../context/mobileContext';
|
|
7
7
|
import { VideoContext } from '../../context/videoContext';
|
|
8
|
-
import { useAnalytics } from '../../hooks';
|
|
8
|
+
import { useAnalytics, useMount } from '../../hooks';
|
|
9
9
|
import { PlayVideo } from '../../icons';
|
|
10
10
|
import { DefaultEventNames, MediaVideoControlsType, PlayButtonThemes, PlayButtonType, PredefinedEventTypes, } from '../../models';
|
|
11
11
|
import { block } from '../../utils';
|
|
@@ -34,6 +34,8 @@ export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
|
|
|
34
34
|
const [started, setStarted] = useState(autoPlay);
|
|
35
35
|
const [paused, setPaused] = useState(false);
|
|
36
36
|
const [ended, setEnded] = useState(false);
|
|
37
|
+
const [isMounted, setIsMounted] = React.useState(false);
|
|
38
|
+
useMount(() => setIsMounted(true));
|
|
37
39
|
const videoSrc = useMemo(() => checkYoutubeVideos(src), [src]);
|
|
38
40
|
const eventsArray = useMemo(() => {
|
|
39
41
|
if (analyticsEvents) {
|
|
@@ -192,9 +194,9 @@ export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
|
|
|
192
194
|
},
|
|
193
195
|
}, elapsedTimePercent: elapsedTimePercent }));
|
|
194
196
|
}, [controls, isPlaying, customBarControlsClassName, changeMute]);
|
|
195
|
-
return (React.createElement("div", { className: b({ wrapper: !currentHeight }, className), ref: ref, onClick: handleClick },
|
|
197
|
+
return (React.createElement("div", { className: b({ wrapper: !currentHeight }, className), ref: ref, onClick: handleClick }, isMounted ? (React.createElement(Fragment, null,
|
|
196
198
|
React.createElement(ReactPlayer, { className: b('player'), url: videoSrc, muted: muted, controls: controls === MediaVideoControlsType.Default, height: currentHeight || '100%', width: width || '100%', light: previewImgUrl, playing: isPlaying, playIcon: playIcon, progressInterval: FPS, onClickPreview: handleClickPreview, onStart: onStart, onReady: setPlayerRef, onPlay: onPlay, onPause: onPause, onProgress: onProgress, onEnded: onEnded, "aria-label": ariaLabel }),
|
|
197
|
-
renderCustomBarControls(muted, playedPercent)));
|
|
199
|
+
renderCustomBarControls(muted, playedPercent))) : null));
|
|
198
200
|
});
|
|
199
201
|
function getHeight(width) {
|
|
200
202
|
return (width / 16) * 9;
|
|
@@ -29,3 +29,10 @@ export declare const subBlockMap: {
|
|
|
29
29
|
content: (props: import("./models").ContentBlockProps & import("./models").ClassNameProps) => JSX.Element;
|
|
30
30
|
quote: (props: import("./models").QuoteProps) => JSX.Element;
|
|
31
31
|
};
|
|
32
|
+
export declare const navItemMap: {
|
|
33
|
+
button: import("react").FC<Pick<import("./navigation/models").NavigationItemProps, "className"> & import("./models").ButtonProps>;
|
|
34
|
+
social: import("react").FC<import("./navigation/components/SocialIcon/SocialIcon").NavigationSocialItemOwnProps>;
|
|
35
|
+
dropdown: ({ text, icon, className, iconSize, hidePopup, items, isActive, ...props }: import("./navigation/models").NavigationItemProps & import("./models").NavigationDropdownItem) => JSX.Element;
|
|
36
|
+
link: import("react").FC<import("./navigation/models").NavigationItemProps & import("./models").NavigationLinkItem>;
|
|
37
|
+
"github-button": ({ text, url, className, label, size, icon, }: import("./navigation/models").NavigationItemProps & import("./models").NavigationGithubButton) => JSX.Element;
|
|
38
|
+
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { BannerBlock, CardLayoutBlock, CompaniesBlock, ContentLayoutBlock, ExtendedFeaturesBlock, FilterBlock, HeaderBlock, HeaderSliderBlock, IconsBlock, InfoBlock, MapBlock, MediaBlock, PromoFeaturesBlock, QuestionsBlock, ShareBlock, SliderBlock, TableBlock, TabsBlock, } from './blocks';
|
|
2
|
-
import { BlockType, SubBlockType } from './models';
|
|
2
|
+
import { BlockType, NavigationItemType, SubBlockType } from './models';
|
|
3
|
+
import { GithubButton, NavigationButton, NavigationDropdown, NavigationLink, } from './navigation/components/NavigationItem';
|
|
4
|
+
import SocialIcon from './navigation/components/SocialIcon/SocialIcon';
|
|
3
5
|
import { BackgroundCard, BannerCard, BasicCard, Content, Divider, LayoutItem, MediaCard, PriceDetailed, Quote, } from './sub-blocks';
|
|
4
6
|
export const blockMap = {
|
|
5
7
|
[BlockType.SliderBlock]: SliderBlock,
|
|
@@ -32,3 +34,10 @@ export const subBlockMap = {
|
|
|
32
34
|
[SubBlockType.Content]: Content,
|
|
33
35
|
[SubBlockType.Quote]: Quote,
|
|
34
36
|
};
|
|
37
|
+
export const navItemMap = {
|
|
38
|
+
[NavigationItemType.Button]: NavigationButton,
|
|
39
|
+
[NavigationItemType.Social]: SocialIcon,
|
|
40
|
+
[NavigationItemType.Dropdown]: NavigationDropdown,
|
|
41
|
+
[NavigationItemType.Link]: NavigationLink,
|
|
42
|
+
[NavigationItemType.GithubButton]: GithubButton,
|
|
43
|
+
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import '@doc-tools/transform/dist/js/yfm';
|
|
3
|
-
import { blockMap, subBlockMap } from '../../constructor-items';
|
|
3
|
+
import { blockMap, navItemMap, subBlockMap } from '../../constructor-items';
|
|
4
4
|
import { CustomConfig, CustomItems, NavigationData, PageContent, ShouldRenderBlock } from '../../models';
|
|
5
5
|
import './PageConstructor.css';
|
|
6
6
|
export type ItemMap = typeof blockMap & typeof subBlockMap & CustomItems;
|
|
7
|
+
export type NavItemMap = typeof navItemMap & CustomItems;
|
|
7
8
|
export interface PageConstructorProps {
|
|
8
9
|
content?: PageContent;
|
|
9
10
|
shouldRenderBlock?: ShouldRenderBlock;
|
|
@@ -4,14 +4,14 @@ import '@doc-tools/transform/dist/js/yfm';
|
|
|
4
4
|
import blockOrigin from 'bem-cn-lite';
|
|
5
5
|
import BackgroundMedia from '../../components/BackgroundMedia/BackgroundMedia';
|
|
6
6
|
import { UIKIT_ROOT_CLASS } from '../../components/constants';
|
|
7
|
-
import { blockMap, subBlockMap } from '../../constructor-items';
|
|
7
|
+
import { blockMap, navItemMap, subBlockMap } from '../../constructor-items';
|
|
8
8
|
import { AnimateContext } from '../../context/animateContext';
|
|
9
9
|
import { InnerContext } from '../../context/innerContext';
|
|
10
10
|
import { useTheme } from '../../context/theme';
|
|
11
11
|
import { Grid } from '../../grid';
|
|
12
|
-
import { BlockType, BlockTypes, HeaderBlockTypes, SubBlockTypes, } from '../../models';
|
|
12
|
+
import { BlockType, BlockTypes, HeaderBlockTypes, NavigationItemTypes, SubBlockTypes, } from '../../models';
|
|
13
13
|
import Layout from '../../navigation/containers/Layout/Layout';
|
|
14
|
-
import { block as cnBlock,
|
|
14
|
+
import { block as cnBlock, getCustomItems, getCustomTypes, getHeaderBlock, getOrderedBlocks, getThemedValue, } from '../../utils';
|
|
15
15
|
import { ConstructorBlocks } from './components/ConstructorBlocks';
|
|
16
16
|
import { ConstructorHeader } from './components/ConstructorItem';
|
|
17
17
|
import { ConstructorRow } from './components/ConstructorRow';
|
|
@@ -22,10 +22,15 @@ export const Constructor = (props) => {
|
|
|
22
22
|
const { content: { blocks = [], background = {} } = {}, renderMenu, shouldRenderBlock, navigation, custom, } = props;
|
|
23
23
|
const { context } = useMemo(() => ({
|
|
24
24
|
context: {
|
|
25
|
-
blockTypes: [...BlockTypes, ...
|
|
26
|
-
subBlockTypes: [...SubBlockTypes, ...
|
|
27
|
-
headerBlockTypes: [...HeaderBlockTypes, ...
|
|
28
|
-
|
|
25
|
+
blockTypes: [...BlockTypes, ...getCustomTypes(['blocks', 'headers'], custom)],
|
|
26
|
+
subBlockTypes: [...SubBlockTypes, ...getCustomTypes(['subBlocks'], custom)],
|
|
27
|
+
headerBlockTypes: [...HeaderBlockTypes, ...getCustomTypes(['headers'], custom)],
|
|
28
|
+
navigationBlockTypes: [
|
|
29
|
+
...NavigationItemTypes,
|
|
30
|
+
...getCustomTypes(['navigation'], custom),
|
|
31
|
+
],
|
|
32
|
+
itemMap: Object.assign(Object.assign(Object.assign({}, blockMap), subBlockMap), getCustomItems(['blocks', 'headers', 'subBlocks'], custom)),
|
|
33
|
+
navItemMap: Object.assign(Object.assign({}, navItemMap), getCustomItems(['navigation'], custom)),
|
|
29
34
|
loadables: custom === null || custom === void 0 ? void 0 : custom.loadable,
|
|
30
35
|
shouldRenderBlock,
|
|
31
36
|
customization: {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ItemMap } from '../../containers/PageConstructor/PageConstructor';
|
|
2
|
+
import { ItemMap, NavItemMap } from '../../containers/PageConstructor/PageConstructor';
|
|
3
3
|
import { CustomConfig, LoadableConfig, ShouldRenderBlock } from '../../models';
|
|
4
4
|
export interface InnerContextType {
|
|
5
5
|
blockTypes: string[];
|
|
6
6
|
subBlockTypes: string[];
|
|
7
7
|
headerBlockTypes: string[];
|
|
8
|
+
navigationBlockTypes: string[];
|
|
8
9
|
itemMap: ItemMap;
|
|
10
|
+
navItemMap: NavItemMap;
|
|
9
11
|
loadables?: LoadableConfig;
|
|
10
12
|
shouldRenderBlock?: ShouldRenderBlock;
|
|
11
13
|
customization?: Pick<CustomConfig, 'decorators'>;
|
|
@@ -2,7 +2,7 @@ import { __rest } from "tslib";
|
|
|
2
2
|
import { useMemo, useReducer } from 'react';
|
|
3
3
|
import { DEFAULT_THEME } from '../../components/constants';
|
|
4
4
|
import { HeaderBlockTypes } from '../../models';
|
|
5
|
-
import {
|
|
5
|
+
import { getCustomTypes, getHeaderBlock } from '../../utils';
|
|
6
6
|
import { EditBlockControls } from '../components/EditBlock/EditBlock';
|
|
7
7
|
import { ViewModeItem } from '../types';
|
|
8
8
|
import { ADD_BLOCK, COPY_BLOCK, DELETE_BLOCK, ORDER_BLOCK, SELECT_BLOCK, UPDATE_CONTENT, UPDATE_THEME, UPDATE_VIEW_MODE, reducer, } from './reducer';
|
|
@@ -16,7 +16,7 @@ export function useEditorState({ content: intialContent, custom }) {
|
|
|
16
16
|
theme: DEFAULT_THEME,
|
|
17
17
|
});
|
|
18
18
|
return useMemo(() => {
|
|
19
|
-
const headerBlockTypes = [...HeaderBlockTypes, ...
|
|
19
|
+
const headerBlockTypes = [...HeaderBlockTypes, ...getCustomTypes(['headers'], custom)];
|
|
20
20
|
const contentHasHeader = Boolean(getHeaderBlock(content.blocks, headerBlockTypes));
|
|
21
21
|
const checkIsHeader = (type) => headerBlockTypes.includes(type);
|
|
22
22
|
const onAdd = (block) => {
|
|
@@ -8,6 +8,7 @@ export declare const addCustomDecorator: (decorators: BlockDecorator[], custom?:
|
|
|
8
8
|
blocks?: import("../../models").CustomItems | undefined;
|
|
9
9
|
subBlocks?: import("../../models").CustomItems | undefined;
|
|
10
10
|
headers?: import("../../models").CustomItems | undefined;
|
|
11
|
+
navigation?: import("../../models").CustomItems | undefined;
|
|
11
12
|
loadable?: import("../../models").LoadableConfig | undefined;
|
|
12
13
|
};
|
|
13
14
|
export declare const getBlockId: ({ index, type }: BlockDecorationProps) => string;
|
|
@@ -132,7 +132,7 @@ export interface FileLinkProps extends ClassNameProps, Tabbable {
|
|
|
132
132
|
onClick?: () => void;
|
|
133
133
|
}
|
|
134
134
|
export type ButtonTheme = ButtonView | 'github' | 'app-store' | 'google-play' | 'scale' | 'monochrome';
|
|
135
|
-
export interface ButtonProps extends AnalyticsEventsBase, Pick<UikitButtonProps, 'size' | 'width'> {
|
|
135
|
+
export interface ButtonProps extends AnalyticsEventsBase, Pick<UikitButtonProps, 'size' | 'width' | 'extraProps'> {
|
|
136
136
|
text: string;
|
|
137
137
|
url: string;
|
|
138
138
|
primary?: boolean;
|