@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,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { NavigationSocialItem } from '../../../../models';
|
|
3
|
-
import './SocialIcon.css';
|
|
4
|
-
export interface NavigationSocialItemProps extends NavigationSocialItem {
|
|
5
|
-
className?: string;
|
|
6
|
-
}
|
|
7
|
-
declare const SocialIcon: React.FC<NavigationSocialItemProps>;
|
|
8
|
-
export default SocialIcon;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { block } from '../../../../utils';
|
|
3
|
-
import { Image } from '../../../index';
|
|
4
|
-
import { getMediaImage } from '../../../Media/Image/utils';
|
|
5
|
-
import './SocialIcon.css';
|
|
6
|
-
const b = block('social-icon');
|
|
7
|
-
const SocialIcon = ({ icon, url, className }) => {
|
|
8
|
-
const iconData = getMediaImage(icon);
|
|
9
|
-
return (React.createElement("a", { href: url, target: "_blank", rel: "noopener noreferrer", className: b(null, className) },
|
|
10
|
-
React.createElement(Image, Object.assign({ className: b('icon') }, iconData))));
|
|
11
|
-
};
|
|
12
|
-
export 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,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,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { NavigationData } from '../../../../models';
|
|
3
|
-
import './Layout.css';
|
|
4
|
-
export interface LayoutProps {
|
|
5
|
-
navigation?: NavigationData;
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
declare const Layout: React.FC<LayoutProps>;
|
|
9
|
-
export default Layout;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { block } from '../../../../utils';
|
|
3
|
-
import Header from '../../components/Header/Header';
|
|
4
|
-
import './Layout.css';
|
|
5
|
-
const b = block('layout');
|
|
6
|
-
const Layout = ({ children, navigation }) => (React.createElement("div", { className: b() },
|
|
7
|
-
navigation && React.createElement(Header, { data: navigation.header, logo: navigation.logo }),
|
|
8
|
-
React.createElement("main", { className: b('content') }, children)));
|
|
9
|
-
export default Layout;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { a11yHiddenSvgProps } from '../utils/svg';
|
|
3
|
-
export const NavigationArrow = (props) => (React.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "9", height: "9", fill: "none", viewBox: "0 0 9 9" }, a11yHiddenSvgProps, props),
|
|
4
|
-
React.createElement("path", { d: "M3 1H8M8 1V6M8 1L1 8", stroke: "currentColor", strokeOpacity: "0.7", strokeWidth: "1.2", strokeLinecap: "square" })));
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { a11yHiddenSvgProps } from '../utils/svg';
|
|
3
|
-
export const NavigationClose = (props) => (React.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "36", height: "36", fill: "none" }, a11yHiddenSvgProps, props),
|
|
4
|
-
React.createElement("path", { d: "M26 10 10 26m16 0L10 10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })));
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { a11yHiddenSvgProps } from '../utils/svg';
|
|
3
|
-
export const NavigationOpen = (props) => (React.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "36", height: "36", fill: "none" }, a11yHiddenSvgProps, props),
|
|
4
|
-
React.createElement("rect", { x: "8", y: "10", width: "20", height: "2", rx: "1", fill: "currentColor" }),
|
|
5
|
-
React.createElement("rect", { x: "8", y: "17", width: "20", height: "2", rx: "1", fill: "currentColor" }),
|
|
6
|
-
React.createElement("rect", { x: "8", y: "24", width: "20", height: "2", rx: "1", fill: "currentColor" })));
|
|
@@ -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,7 +0,0 @@
|
|
|
1
|
-
export var NavigationItemType;
|
|
2
|
-
(function (NavigationItemType) {
|
|
3
|
-
NavigationItemType["Link"] = "link";
|
|
4
|
-
NavigationItemType["Dropdown"] = "dropdown";
|
|
5
|
-
NavigationItemType["Button"] = "button";
|
|
6
|
-
NavigationItemType["Social"] = "social";
|
|
7
|
-
})(NavigationItemType || (NavigationItemType = {}));
|
|
@@ -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 = {}));
|