@gravity-ui/page-constructor 1.8.0-alfa.0 → 1.8.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 +16 -0
- package/README.md +58 -36
- package/build/cjs/blocks/Banner/schema.d.ts +0 -12
- package/build/cjs/blocks/Banner/schema.js +0 -2
- package/build/cjs/blocks/CardLayout/schema.d.ts +0 -8
- package/build/cjs/blocks/CardLayout/schema.js +1 -2
- package/build/cjs/blocks/Companies/schema.d.ts +0 -2
- package/build/cjs/blocks/Companies/schema.js +0 -2
- package/build/cjs/blocks/ContentLayout/schema.d.ts +0 -6
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js +2 -2
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +0 -7
- package/build/cjs/blocks/ExtendedFeatures/schema.js +1 -4
- package/build/cjs/blocks/Header/schema.d.ts +0 -16
- package/build/cjs/blocks/Header/schema.js +0 -5
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +0 -11
- package/build/cjs/blocks/Icons/schema.d.ts +0 -6
- package/build/cjs/blocks/Icons/schema.js +0 -2
- package/build/cjs/blocks/Info/schema.d.ts +0 -10
- package/build/cjs/blocks/Info/schema.js +0 -2
- package/build/cjs/blocks/LinkTable/schema.d.ts +0 -2
- package/build/cjs/blocks/Media/schema.d.ts +0 -9
- package/build/cjs/blocks/Media/schema.js +1 -3
- package/build/cjs/blocks/Preview/schema.d.ts +0 -2
- package/build/cjs/blocks/Preview/schema.js +0 -4
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +0 -7
- package/build/cjs/blocks/PromoFeaturesBlock/schema.js +1 -4
- package/build/cjs/blocks/Questions/schema.d.ts +0 -5
- package/build/cjs/blocks/Questions/schema.js +0 -2
- package/build/cjs/blocks/Security/schema.d.ts +0 -2
- package/build/cjs/blocks/Security/schema.js +0 -2
- package/build/cjs/blocks/Simple/schema.d.ts +0 -3
- package/build/cjs/blocks/Simple/schema.js +0 -1
- package/build/cjs/blocks/Slider/schema.d.ts +0 -7
- package/build/cjs/blocks/Slider/schema.js +0 -2
- package/build/cjs/blocks/Table/schema.d.ts +0 -4
- package/build/cjs/blocks/Table/schema.js +0 -3
- package/build/cjs/blocks/Tabs/schema.d.ts +0 -8
- package/build/cjs/blocks/Tabs/schema.js +0 -4
- package/build/cjs/components/Author/schema.d.ts +0 -3
- package/build/cjs/components/Image/schema.d.ts +0 -2
- package/build/cjs/components/Image/schema.js +0 -2
- package/build/cjs/components/OverflowScroller/OverflowScroller.css +2 -0
- package/build/cjs/components/RouterLink/RouterLink.d.ts +1 -0
- package/build/cjs/components/index.d.ts +2 -0
- package/build/cjs/components/index.js +40 -39
- package/build/cjs/components/navigation/components/Header/Header.css +85 -0
- package/build/cjs/components/navigation/components/Header/Header.d.ts +8 -0
- package/build/cjs/components/navigation/components/Header/Header.js +55 -0
- package/build/cjs/components/navigation/components/Logo/Logo.css +23 -0
- package/build/cjs/components/navigation/components/Logo/Logo.d.ts +7 -0
- package/build/cjs/components/navigation/components/Logo/Logo.js +17 -0
- package/build/cjs/components/navigation/components/MobileNavigation/MobileNavigation.css +64 -0
- package/build/cjs/components/navigation/components/MobileNavigation/MobileNavigation.d.ts +13 -0
- package/build/cjs/components/navigation/components/MobileNavigation/MobileNavigation.js +45 -0
- package/build/cjs/components/navigation/components/Navigation/Navigation.css +43 -0
- package/build/cjs/components/navigation/components/Navigation/Navigation.d.ts +18 -0
- package/build/cjs/components/navigation/components/Navigation/Navigation.js +69 -0
- package/build/cjs/components/navigation/components/NavigationItem/NavigationItem.css +40 -0
- package/build/cjs/components/navigation/components/NavigationItem/NavigationItem.d.ts +10 -0
- package/build/cjs/components/navigation/components/NavigationItem/NavigationItem.js +59 -0
- package/build/cjs/components/navigation/components/NavigationPopup/NavigationPopup.css +33 -0
- package/build/cjs/components/navigation/components/NavigationPopup/NavigationPopup.d.ts +10 -0
- package/build/cjs/components/navigation/components/NavigationPopup/NavigationPopup.js +45 -0
- package/build/cjs/components/navigation/components/SocialIcon/SocialIcon.css +20 -0
- package/build/cjs/components/navigation/components/SocialIcon/SocialIcon.d.ts +7 -0
- package/build/cjs/components/navigation/components/SocialIcon/SocialIcon.js +14 -0
- package/build/cjs/components/navigation/components/index.d.ts +7 -0
- package/build/cjs/components/navigation/components/index.js +20 -0
- package/build/cjs/components/navigation/containers/Layout/Layout.css +10 -0
- package/build/cjs/components/navigation/containers/Layout/Layout.d.ts +8 -0
- package/build/cjs/components/navigation/containers/Layout/Layout.js +11 -0
- package/build/cjs/containers/PageConstructor/PageConstructor.d.ts +3 -2
- package/build/cjs/containers/PageConstructor/PageConstructor.js +12 -10
- package/build/cjs/context/locationContext/locationContext.d.ts +1 -0
- package/build/cjs/icons/NavigationArrow.d.ts +2 -0
- package/build/cjs/icons/NavigationArrow.js +9 -0
- package/build/cjs/icons/NavigationClose.d.ts +2 -0
- package/build/cjs/icons/NavigationClose.js +9 -0
- package/build/cjs/icons/NavigationOpen.d.ts +2 -0
- package/build/cjs/icons/NavigationOpen.js +11 -0
- package/build/cjs/icons/index.d.ts +3 -0
- package/build/cjs/icons/index.js +3 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +2 -4
- package/build/cjs/models/index.d.ts +1 -0
- package/build/cjs/models/index.js +1 -0
- package/build/cjs/models/navigation.d.ts +62 -0
- package/build/cjs/models/navigation.js +10 -0
- package/build/cjs/schema/index.d.ts +0 -2
- package/build/cjs/schema/validators/common.d.ts +0 -17
- package/build/cjs/schema/validators/common.js +0 -11
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +0 -5
- package/build/cjs/sub-blocks/BasicCard/schema.d.ts +0 -4
- package/build/cjs/sub-blocks/CardWithImage/schema.d.ts +0 -8
- package/build/cjs/sub-blocks/CardWithImage/schema.js +1 -4
- package/build/cjs/sub-blocks/Content/schema.d.ts +0 -8
- package/build/cjs/sub-blocks/Content/schema.js +1 -3
- package/build/cjs/sub-blocks/MediaCard/schema.d.ts +0 -1
- package/build/cjs/sub-blocks/NewsCard/schema.d.ts +0 -1
- package/build/cjs/sub-blocks/NewsCard/schema.js +0 -1
- package/build/cjs/sub-blocks/Partner/schema.d.ts +0 -1
- package/build/cjs/sub-blocks/Partner/schema.js +0 -1
- package/build/cjs/sub-blocks/PriceDetailed/schema.d.ts +0 -1
- package/build/cjs/sub-blocks/PriceDetailed/schema.js +0 -8
- package/build/cjs/sub-blocks/Quote/schema.d.ts +0 -4
- package/build/cjs/sub-blocks/Quote/schema.js +0 -1
- package/build/cjs/sub-blocks/TutorialCard/schema.d.ts +0 -2
- package/build/cjs/sub-blocks/TutorialCard/schema.js +0 -2
- package/build/cjs/text-transform/blocks.js +0 -1
- package/build/esm/blocks/Banner/schema.d.ts +0 -12
- package/build/esm/blocks/Banner/schema.js +0 -2
- package/build/esm/blocks/CardLayout/schema.d.ts +0 -8
- package/build/esm/blocks/CardLayout/schema.js +1 -2
- package/build/esm/blocks/Companies/schema.d.ts +0 -2
- package/build/esm/blocks/Companies/schema.js +0 -2
- package/build/esm/blocks/ContentLayout/schema.d.ts +0 -6
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js +2 -2
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +0 -7
- package/build/esm/blocks/ExtendedFeatures/schema.js +1 -4
- package/build/esm/blocks/Header/schema.d.ts +0 -16
- package/build/esm/blocks/Header/schema.js +0 -5
- package/build/esm/blocks/HeaderSlider/schema.d.ts +0 -11
- package/build/esm/blocks/Icons/schema.d.ts +0 -6
- package/build/esm/blocks/Icons/schema.js +0 -2
- package/build/esm/blocks/Info/schema.d.ts +0 -10
- package/build/esm/blocks/Info/schema.js +0 -2
- package/build/esm/blocks/LinkTable/schema.d.ts +0 -2
- package/build/esm/blocks/Media/schema.d.ts +0 -9
- package/build/esm/blocks/Media/schema.js +1 -3
- package/build/esm/blocks/Preview/schema.d.ts +0 -2
- package/build/esm/blocks/Preview/schema.js +0 -4
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +0 -7
- package/build/esm/blocks/PromoFeaturesBlock/schema.js +1 -4
- package/build/esm/blocks/Questions/schema.d.ts +0 -5
- package/build/esm/blocks/Questions/schema.js +0 -2
- package/build/esm/blocks/Security/schema.d.ts +0 -2
- package/build/esm/blocks/Security/schema.js +0 -2
- package/build/esm/blocks/Simple/schema.d.ts +0 -3
- package/build/esm/blocks/Simple/schema.js +0 -1
- package/build/esm/blocks/Slider/schema.d.ts +0 -7
- package/build/esm/blocks/Slider/schema.js +0 -2
- package/build/esm/blocks/Table/schema.d.ts +0 -4
- package/build/esm/blocks/Table/schema.js +0 -3
- package/build/esm/blocks/Tabs/schema.d.ts +0 -8
- package/build/esm/blocks/Tabs/schema.js +0 -4
- package/build/esm/components/Author/schema.d.ts +0 -3
- package/build/esm/components/Image/schema.d.ts +0 -2
- package/build/esm/components/Image/schema.js +0 -2
- package/build/esm/components/OverflowScroller/OverflowScroller.css +2 -0
- package/build/esm/components/RouterLink/RouterLink.d.ts +1 -0
- package/build/esm/components/index.d.ts +2 -0
- package/build/esm/components/index.js +2 -0
- package/build/esm/components/navigation/components/Header/Header.css +85 -0
- package/build/esm/components/navigation/components/Header/Header.d.ts +9 -0
- package/build/esm/components/navigation/components/Header/Header.js +51 -0
- package/build/esm/components/navigation/components/Logo/Logo.css +23 -0
- package/build/esm/components/navigation/components/Logo/Logo.d.ts +8 -0
- package/build/esm/components/navigation/components/Logo/Logo.js +15 -0
- package/build/esm/components/navigation/components/MobileNavigation/MobileNavigation.css +64 -0
- package/build/esm/components/navigation/components/MobileNavigation/MobileNavigation.d.ts +14 -0
- package/build/esm/components/navigation/components/MobileNavigation/MobileNavigation.js +43 -0
- package/build/esm/components/navigation/components/Navigation/Navigation.css +43 -0
- package/build/esm/components/navigation/components/Navigation/Navigation.d.ts +19 -0
- package/build/esm/components/navigation/components/Navigation/Navigation.js +68 -0
- package/build/esm/components/navigation/components/NavigationItem/NavigationItem.css +40 -0
- package/build/esm/components/navigation/components/NavigationItem/NavigationItem.d.ts +11 -0
- package/build/esm/components/navigation/components/NavigationItem/NavigationItem.js +58 -0
- package/build/esm/components/navigation/components/NavigationPopup/NavigationPopup.css +33 -0
- package/build/esm/components/navigation/components/NavigationPopup/NavigationPopup.d.ts +11 -0
- package/build/esm/components/navigation/components/NavigationPopup/NavigationPopup.js +41 -0
- package/build/esm/components/navigation/components/SocialIcon/SocialIcon.css +20 -0
- package/build/esm/components/navigation/components/SocialIcon/SocialIcon.d.ts +8 -0
- package/build/esm/components/navigation/components/SocialIcon/SocialIcon.js +12 -0
- package/build/esm/components/navigation/components/index.d.ts +7 -0
- package/build/esm/components/navigation/components/index.js +7 -0
- package/build/esm/components/navigation/containers/Layout/Layout.css +10 -0
- package/build/esm/components/navigation/containers/Layout/Layout.d.ts +9 -0
- package/build/esm/components/navigation/containers/Layout/Layout.js +9 -0
- package/build/esm/containers/PageConstructor/PageConstructor.d.ts +3 -2
- package/build/esm/containers/PageConstructor/PageConstructor.js +12 -10
- package/build/esm/context/locationContext/locationContext.d.ts +1 -0
- package/build/esm/icons/NavigationArrow.d.ts +2 -0
- package/build/esm/icons/NavigationArrow.js +4 -0
- package/build/esm/icons/NavigationClose.d.ts +2 -0
- package/build/esm/icons/NavigationClose.js +4 -0
- package/build/esm/icons/NavigationOpen.d.ts +2 -0
- package/build/esm/icons/NavigationOpen.js +6 -0
- package/build/esm/icons/index.d.ts +3 -0
- package/build/esm/icons/index.js +3 -0
- package/build/esm/models/constructor-items/blocks.d.ts +2 -4
- package/build/esm/models/index.d.ts +1 -0
- package/build/esm/models/index.js +1 -0
- package/build/esm/models/navigation.d.ts +62 -0
- package/build/esm/models/navigation.js +7 -0
- package/build/esm/schema/index.d.ts +0 -2
- package/build/esm/schema/validators/common.d.ts +0 -17
- package/build/esm/schema/validators/common.js +0 -11
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +0 -5
- package/build/esm/sub-blocks/BasicCard/schema.d.ts +0 -4
- package/build/esm/sub-blocks/CardWithImage/schema.d.ts +0 -8
- package/build/esm/sub-blocks/CardWithImage/schema.js +1 -4
- package/build/esm/sub-blocks/Content/schema.d.ts +0 -8
- package/build/esm/sub-blocks/Content/schema.js +1 -3
- package/build/esm/sub-blocks/MediaCard/schema.d.ts +0 -1
- package/build/esm/sub-blocks/NewsCard/schema.d.ts +0 -1
- package/build/esm/sub-blocks/NewsCard/schema.js +0 -1
- package/build/esm/sub-blocks/Partner/schema.d.ts +0 -1
- package/build/esm/sub-blocks/Partner/schema.js +0 -1
- package/build/esm/sub-blocks/PriceDetailed/schema.d.ts +0 -1
- package/build/esm/sub-blocks/PriceDetailed/schema.js +0 -8
- package/build/esm/sub-blocks/Quote/schema.d.ts +0 -4
- package/build/esm/sub-blocks/Quote/schema.js +0 -1
- package/build/esm/sub-blocks/TutorialCard/schema.d.ts +0 -2
- package/build/esm/sub-blocks/TutorialCard/schema.js +0 -2
- package/build/esm/text-transform/blocks.js +0 -1
- package/package.json +2 -5
- package/server/models/constructor-items/blocks.d.ts +2 -4
- package/server/models/index.d.ts +1 -0
- package/server/models/index.js +1 -0
- package/server/models/navigation.d.ts +62 -0
- package/server/models/navigation.js +10 -0
- package/server/text-transform/blocks.js +0 -1
- package/styles/mixins.scss +38 -0
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
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;
|
|
@@ -0,0 +1,12 @@
|
|
|
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;
|
|
@@ -0,0 +1,7 @@
|
|
|
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';
|
|
@@ -0,0 +1,7 @@
|
|
|
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';
|
|
@@ -0,0 +1,9 @@
|
|
|
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;
|
|
@@ -0,0 +1,9 @@
|
|
|
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,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ShouldRenderBlock, CustomConfig, PageContent, CustomItems } from '../../models';
|
|
3
|
-
import { blockMap, subBlockMap } from '../../constructor-items';
|
|
4
2
|
import '@doc-tools/transform/dist/js/yfm';
|
|
3
|
+
import { ShouldRenderBlock, CustomConfig, PageContent, CustomItems, NavigationData } from '../../models';
|
|
4
|
+
import { blockMap, subBlockMap } from '../../constructor-items';
|
|
5
5
|
import './PageConstructor.css';
|
|
6
6
|
export declare type ItemMap = typeof blockMap & typeof subBlockMap & CustomItems;
|
|
7
7
|
export interface PageConstructorProps {
|
|
@@ -9,6 +9,7 @@ export interface PageConstructorProps {
|
|
|
9
9
|
shouldRenderBlock?: ShouldRenderBlock;
|
|
10
10
|
custom?: CustomConfig;
|
|
11
11
|
renderMenu?: () => React.ReactNode;
|
|
12
|
+
navigation?: NavigationData;
|
|
12
13
|
}
|
|
13
14
|
export declare const Constructor: (props: PageConstructorProps) => JSX.Element;
|
|
14
15
|
export declare const PageConstructor: (props: PageConstructorProps) => JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import React, { useContext, useMemo } from 'react';
|
|
3
|
+
import '@doc-tools/transform/dist/js/yfm';
|
|
3
4
|
import { HeaderBlockTypes, BlockTypes, } from '../../models';
|
|
4
5
|
import { blockMap, subBlockMap } from '../../constructor-items';
|
|
5
6
|
import { Grid } from '../../grid';
|
|
@@ -12,7 +13,7 @@ import { ConstructorRow } from './components/ConstructorRow';
|
|
|
12
13
|
import { ConstructorFootnotes } from './components/ConstructorFootnotes';
|
|
13
14
|
import { ConstructorHeader } from './components/ConstructorItem';
|
|
14
15
|
import { ConstructorBlocks } from './components/ConstructorBlocks';
|
|
15
|
-
import '
|
|
16
|
+
import Layout from '../../components/navigation/containers/Layout/Layout';
|
|
16
17
|
import './PageConstructor.css';
|
|
17
18
|
const b = cnBlock('page-constructor');
|
|
18
19
|
export const Constructor = (props) => {
|
|
@@ -28,7 +29,7 @@ export const Constructor = (props) => {
|
|
|
28
29
|
});
|
|
29
30
|
}, [props.custom]);
|
|
30
31
|
const { themeValue: theme } = useContext(ThemeValueContext);
|
|
31
|
-
const { content: { blocks = [], background = {}, footnotes = [] } = {}, renderMenu, shouldRenderBlock, } = props;
|
|
32
|
+
const { content: { blocks = [], background = {}, footnotes = [] } = {}, renderMenu, shouldRenderBlock, navigation, } = props;
|
|
32
33
|
const hasFootnotes = footnotes.length > 0;
|
|
33
34
|
const isHeaderBlock = (block) => headerBlockTypes.includes(block.type);
|
|
34
35
|
const header = blocks === null || blocks === void 0 ? void 0 : blocks.find(isHeaderBlock);
|
|
@@ -37,14 +38,15 @@ export const Constructor = (props) => {
|
|
|
37
38
|
return (React.createElement(InnerContext.Provider, { value: context },
|
|
38
39
|
React.createElement("div", { className: b() },
|
|
39
40
|
React.createElement("div", { className: b('wrapper') },
|
|
40
|
-
React.createElement(BackgroundMedia, Object.assign({}, themedBackground, { className: b('background') })),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
React.createElement(
|
|
46
|
-
|
|
47
|
-
React.createElement(
|
|
41
|
+
themedBackground && (React.createElement(BackgroundMedia, Object.assign({}, themedBackground, { className: b('background') }))),
|
|
42
|
+
React.createElement(Layout, { navigation: navigation },
|
|
43
|
+
renderMenu && renderMenu(),
|
|
44
|
+
header && React.createElement(ConstructorHeader, { data: header }),
|
|
45
|
+
React.createElement(Grid, null,
|
|
46
|
+
restBlocks && (React.createElement(ConstructorRow, null,
|
|
47
|
+
React.createElement(ConstructorBlocks, { items: restBlocks, shouldRenderBlock: shouldRenderBlock }))),
|
|
48
|
+
hasFootnotes && (React.createElement(ConstructorRow, null,
|
|
49
|
+
React.createElement(ConstructorFootnotes, { items: footnotes })))))))));
|
|
48
50
|
};
|
|
49
51
|
export const PageConstructor = (props) => {
|
|
50
52
|
const { content: { animated = true } = {} } = props, rest = __rest(props, ["content"]);
|
|
@@ -0,0 +1,4 @@
|
|
|
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" })));
|
|
@@ -0,0 +1,4 @@
|
|
|
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" })));
|
|
@@ -0,0 +1,6 @@
|
|
|
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" })));
|
package/build/esm/icons/index.js
CHANGED
|
@@ -114,14 +114,12 @@ export interface SimpleBlockProps extends Animatable, Childable {
|
|
|
114
114
|
title: TitleBaseProps;
|
|
115
115
|
description: string;
|
|
116
116
|
}
|
|
117
|
-
export interface ExtendedFeaturesItem {
|
|
118
|
-
title
|
|
119
|
-
text?: string;
|
|
117
|
+
export interface ExtendedFeaturesItem extends Omit<ContentBlockProps, 'theme' | 'centered' | 'colSizes' | 'size' | 'title'> {
|
|
118
|
+
title: string;
|
|
120
119
|
label?: string;
|
|
121
120
|
icon?: ThemedImage;
|
|
122
121
|
/** @deprecated **/
|
|
123
122
|
link?: LinkProps;
|
|
124
|
-
links?: LinkProps[];
|
|
125
123
|
}
|
|
126
124
|
export interface ExtendedFeaturesProps extends Animatable {
|
|
127
125
|
items: ExtendedFeaturesItem[];
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
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 = {}));
|
|
@@ -43,7 +43,6 @@ export declare function generateDefaultSchema(config?: SchemaCustomConfig): {
|
|
|
43
43
|
properties: {
|
|
44
44
|
title: {
|
|
45
45
|
type: string;
|
|
46
|
-
content: string;
|
|
47
46
|
};
|
|
48
47
|
};
|
|
49
48
|
};
|
|
@@ -122,7 +121,6 @@ export declare function generateDefaultSchema(config?: SchemaCustomConfig): {
|
|
|
122
121
|
};
|
|
123
122
|
text: {
|
|
124
123
|
type: string;
|
|
125
|
-
content: string;
|
|
126
124
|
};
|
|
127
125
|
};
|
|
128
126
|
};
|
|
@@ -83,7 +83,6 @@ export declare const PlayIconProps: {
|
|
|
83
83
|
};
|
|
84
84
|
text: {
|
|
85
85
|
type: string;
|
|
86
|
-
content: string;
|
|
87
86
|
};
|
|
88
87
|
};
|
|
89
88
|
};
|
|
@@ -142,7 +141,6 @@ export declare const VideoProps: {
|
|
|
142
141
|
};
|
|
143
142
|
text: {
|
|
144
143
|
type: string;
|
|
145
|
-
content: string;
|
|
146
144
|
};
|
|
147
145
|
};
|
|
148
146
|
};
|
|
@@ -266,7 +264,6 @@ export declare const BackgroundProps: {
|
|
|
266
264
|
};
|
|
267
265
|
text: {
|
|
268
266
|
type: string;
|
|
269
|
-
content: string;
|
|
270
267
|
};
|
|
271
268
|
};
|
|
272
269
|
};
|
|
@@ -298,7 +295,6 @@ export declare const LinkProps: {
|
|
|
298
295
|
properties: {
|
|
299
296
|
text: {
|
|
300
297
|
type: string;
|
|
301
|
-
content: string;
|
|
302
298
|
};
|
|
303
299
|
url: {
|
|
304
300
|
type: string;
|
|
@@ -332,7 +328,6 @@ export declare const FileLinkProps: {
|
|
|
332
328
|
};
|
|
333
329
|
text: {
|
|
334
330
|
type: string;
|
|
335
|
-
content: string;
|
|
336
331
|
};
|
|
337
332
|
type: {
|
|
338
333
|
type: string;
|
|
@@ -354,11 +349,9 @@ export declare const authorItem: {
|
|
|
354
349
|
properties: {
|
|
355
350
|
firstName: {
|
|
356
351
|
type: string;
|
|
357
|
-
content: string;
|
|
358
352
|
};
|
|
359
353
|
secondName: {
|
|
360
354
|
type: string;
|
|
361
|
-
content: string;
|
|
362
355
|
};
|
|
363
356
|
avatar: {
|
|
364
357
|
type: string;
|
|
@@ -366,14 +359,12 @@ export declare const authorItem: {
|
|
|
366
359
|
};
|
|
367
360
|
description: {
|
|
368
361
|
type: string;
|
|
369
|
-
content: string;
|
|
370
362
|
};
|
|
371
363
|
};
|
|
372
364
|
};
|
|
373
365
|
export declare const ButtonProps: {
|
|
374
366
|
text: {
|
|
375
367
|
type: string;
|
|
376
|
-
content: string;
|
|
377
368
|
};
|
|
378
369
|
url: {
|
|
379
370
|
type: string;
|
|
@@ -409,7 +400,6 @@ export declare const ButtonProps: {
|
|
|
409
400
|
};
|
|
410
401
|
alt: {
|
|
411
402
|
type: string;
|
|
412
|
-
content: string;
|
|
413
403
|
};
|
|
414
404
|
};
|
|
415
405
|
})[];
|
|
@@ -510,7 +500,6 @@ export declare const MenuProps: {
|
|
|
510
500
|
properties: {
|
|
511
501
|
title: {
|
|
512
502
|
type: string;
|
|
513
|
-
content: string;
|
|
514
503
|
};
|
|
515
504
|
};
|
|
516
505
|
};
|
|
@@ -529,7 +518,6 @@ export declare const AnchorProps: {
|
|
|
529
518
|
properties: {
|
|
530
519
|
text: {
|
|
531
520
|
type: string;
|
|
532
|
-
content: string;
|
|
533
521
|
};
|
|
534
522
|
url: {
|
|
535
523
|
type: string;
|
|
@@ -544,7 +532,6 @@ export declare const BlockBaseProps: {
|
|
|
544
532
|
properties: {
|
|
545
533
|
text: {
|
|
546
534
|
type: string;
|
|
547
|
-
content: string;
|
|
548
535
|
};
|
|
549
536
|
url: {
|
|
550
537
|
type: string;
|
|
@@ -568,7 +555,6 @@ export declare const TitleProps: {
|
|
|
568
555
|
properties: {
|
|
569
556
|
text: {
|
|
570
557
|
type: string;
|
|
571
|
-
content: string;
|
|
572
558
|
};
|
|
573
559
|
textSize: {
|
|
574
560
|
type: string;
|
|
@@ -588,7 +574,6 @@ export declare const ButtonBlock: {
|
|
|
588
574
|
properties: {
|
|
589
575
|
text: {
|
|
590
576
|
type: string;
|
|
591
|
-
content: string;
|
|
592
577
|
};
|
|
593
578
|
url: {
|
|
594
579
|
type: string;
|
|
@@ -624,7 +609,6 @@ export declare const ButtonBlock: {
|
|
|
624
609
|
};
|
|
625
610
|
alt: {
|
|
626
611
|
type: string;
|
|
627
|
-
content: string;
|
|
628
612
|
};
|
|
629
613
|
};
|
|
630
614
|
})[];
|
|
@@ -822,7 +806,6 @@ export declare const MediaProps: {
|
|
|
822
806
|
};
|
|
823
807
|
text: {
|
|
824
808
|
type: string;
|
|
825
|
-
content: string;
|
|
826
809
|
};
|
|
827
810
|
};
|
|
828
811
|
};
|
|
@@ -76,7 +76,6 @@ export const PlayIconProps = {
|
|
|
76
76
|
},
|
|
77
77
|
text: {
|
|
78
78
|
type: 'string',
|
|
79
|
-
content: 'string',
|
|
80
79
|
},
|
|
81
80
|
},
|
|
82
81
|
};
|
|
@@ -160,7 +159,6 @@ export const LinkProps = {
|
|
|
160
159
|
required: ['text', 'url'],
|
|
161
160
|
properties: Object.assign(Object.assign({}, BaseProps), { text: {
|
|
162
161
|
type: 'string',
|
|
163
|
-
content: 'string',
|
|
164
162
|
}, url: {
|
|
165
163
|
type: 'string',
|
|
166
164
|
}, arrow: {
|
|
@@ -186,7 +184,6 @@ export const FileLinkProps = {
|
|
|
186
184
|
},
|
|
187
185
|
text: {
|
|
188
186
|
type: 'string',
|
|
189
|
-
content: 'string',
|
|
190
187
|
},
|
|
191
188
|
type: {
|
|
192
189
|
type: 'string',
|
|
@@ -208,11 +205,9 @@ export const authorItem = {
|
|
|
208
205
|
properties: {
|
|
209
206
|
firstName: {
|
|
210
207
|
type: 'string',
|
|
211
|
-
content: 'string',
|
|
212
208
|
},
|
|
213
209
|
secondName: {
|
|
214
210
|
type: 'string',
|
|
215
|
-
content: 'string',
|
|
216
211
|
},
|
|
217
212
|
avatar: {
|
|
218
213
|
type: 'string',
|
|
@@ -220,14 +215,12 @@ export const authorItem = {
|
|
|
220
215
|
},
|
|
221
216
|
description: {
|
|
222
217
|
type: 'string',
|
|
223
|
-
content: 'yfm',
|
|
224
218
|
},
|
|
225
219
|
},
|
|
226
220
|
};
|
|
227
221
|
export const ButtonProps = {
|
|
228
222
|
text: {
|
|
229
223
|
type: 'string',
|
|
230
|
-
content: 'string',
|
|
231
224
|
},
|
|
232
225
|
url: {
|
|
233
226
|
type: 'string',
|
|
@@ -300,7 +293,6 @@ export const ButtonProps = {
|
|
|
300
293
|
},
|
|
301
294
|
alt: {
|
|
302
295
|
type: 'string',
|
|
303
|
-
content: 'string',
|
|
304
296
|
},
|
|
305
297
|
},
|
|
306
298
|
},
|
|
@@ -340,7 +332,6 @@ export const MenuProps = {
|
|
|
340
332
|
properties: {
|
|
341
333
|
title: {
|
|
342
334
|
type: 'string',
|
|
343
|
-
content: 'string',
|
|
344
335
|
},
|
|
345
336
|
},
|
|
346
337
|
};
|
|
@@ -364,7 +355,6 @@ export const AnchorProps = {
|
|
|
364
355
|
properties: {
|
|
365
356
|
text: {
|
|
366
357
|
type: 'string',
|
|
367
|
-
content: 'string',
|
|
368
358
|
},
|
|
369
359
|
url: {
|
|
370
360
|
type: 'string',
|
|
@@ -384,7 +374,6 @@ export const TitleProps = {
|
|
|
384
374
|
properties: {
|
|
385
375
|
text: {
|
|
386
376
|
type: 'string',
|
|
387
|
-
content: 'string',
|
|
388
377
|
},
|
|
389
378
|
textSize: {
|
|
390
379
|
type: 'string',
|
|
@@ -18,7 +18,6 @@ export declare const BackgroundCard: {
|
|
|
18
18
|
};
|
|
19
19
|
alt: {
|
|
20
20
|
type: string;
|
|
21
|
-
content: string;
|
|
22
21
|
};
|
|
23
22
|
disableCompress: {
|
|
24
23
|
type: string;
|
|
@@ -46,7 +45,6 @@ export declare const BackgroundCard: {
|
|
|
46
45
|
properties: {
|
|
47
46
|
text: {
|
|
48
47
|
type: string;
|
|
49
|
-
content: string;
|
|
50
48
|
};
|
|
51
49
|
textSize: {
|
|
52
50
|
type: string;
|
|
@@ -61,12 +59,10 @@ export declare const BackgroundCard: {
|
|
|
61
59
|
};
|
|
62
60
|
} | {
|
|
63
61
|
type: string;
|
|
64
|
-
content: string;
|
|
65
62
|
})[];
|
|
66
63
|
};
|
|
67
64
|
text: {
|
|
68
65
|
type: string;
|
|
69
|
-
content: string;
|
|
70
66
|
};
|
|
71
67
|
theme: {
|
|
72
68
|
type: string;
|
|
@@ -74,7 +70,6 @@ export declare const BackgroundCard: {
|
|
|
74
70
|
};
|
|
75
71
|
additionalInfo: {
|
|
76
72
|
type: string;
|
|
77
|
-
content: string;
|
|
78
73
|
};
|
|
79
74
|
links: {
|
|
80
75
|
type: string;
|
|
@@ -27,7 +27,6 @@ export declare const BasicCard: {
|
|
|
27
27
|
properties: {
|
|
28
28
|
text: {
|
|
29
29
|
type: string;
|
|
30
|
-
content: string;
|
|
31
30
|
};
|
|
32
31
|
textSize: {
|
|
33
32
|
type: string;
|
|
@@ -42,16 +41,13 @@ export declare const BasicCard: {
|
|
|
42
41
|
};
|
|
43
42
|
} | {
|
|
44
43
|
type: string;
|
|
45
|
-
content: string;
|
|
46
44
|
})[];
|
|
47
45
|
};
|
|
48
46
|
text: {
|
|
49
47
|
type: string;
|
|
50
|
-
content: string;
|
|
51
48
|
};
|
|
52
49
|
additionalInfo: {
|
|
53
50
|
type: string;
|
|
54
|
-
content: string;
|
|
55
51
|
};
|
|
56
52
|
links: {
|
|
57
53
|
type: string;
|
|
@@ -13,7 +13,6 @@ export declare const CardWithImageItem: {
|
|
|
13
13
|
properties: {
|
|
14
14
|
text: {
|
|
15
15
|
type: string;
|
|
16
|
-
content: string;
|
|
17
16
|
};
|
|
18
17
|
textSize: {
|
|
19
18
|
type: string;
|
|
@@ -28,16 +27,13 @@ export declare const CardWithImageItem: {
|
|
|
28
27
|
};
|
|
29
28
|
} | {
|
|
30
29
|
type: string;
|
|
31
|
-
content: string;
|
|
32
30
|
})[];
|
|
33
31
|
};
|
|
34
32
|
description: {
|
|
35
33
|
type: string;
|
|
36
|
-
content: string;
|
|
37
34
|
};
|
|
38
35
|
additionalInfo: {
|
|
39
36
|
type: string;
|
|
40
|
-
content: string;
|
|
41
37
|
};
|
|
42
38
|
disableCompress: {
|
|
43
39
|
type: string;
|
|
@@ -90,7 +86,6 @@ export declare const CardWithImage: {
|
|
|
90
86
|
properties: {
|
|
91
87
|
text: {
|
|
92
88
|
type: string;
|
|
93
|
-
content: string;
|
|
94
89
|
};
|
|
95
90
|
textSize: {
|
|
96
91
|
type: string;
|
|
@@ -105,16 +100,13 @@ export declare const CardWithImage: {
|
|
|
105
100
|
};
|
|
106
101
|
} | {
|
|
107
102
|
type: string;
|
|
108
|
-
content: string;
|
|
109
103
|
})[];
|
|
110
104
|
};
|
|
111
105
|
description: {
|
|
112
106
|
type: string;
|
|
113
|
-
content: string;
|
|
114
107
|
};
|
|
115
108
|
additionalInfo: {
|
|
116
109
|
type: string;
|
|
117
|
-
content: string;
|
|
118
110
|
};
|
|
119
111
|
disableCompress: {
|
|
120
112
|
type: string;
|