@gravity-ui/page-constructor 1.7.0-alpha.7 → 1.7.0-alpha.9
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/README.md +58 -36
- package/build/cjs/blocks/Tabs/Tabs.css +23 -49
- package/build/cjs/blocks/Tabs/Tabs.d.ts +1 -1
- package/build/cjs/blocks/Tabs/Tabs.js +27 -29
- package/build/cjs/components/Image/Image.js +1 -3
- package/build/cjs/components/OverflowScroller/OverflowScroller.css +2 -0
- package/build/cjs/components/RouterLink/RouterLink.d.ts +1 -0
- package/build/cjs/components/VideoBlock/VideoBlock.js +1 -1
- 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 +51 -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 +58 -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 +41 -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/constructor-items.d.ts +1 -1
- 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 +4 -7
- 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/text-transform/blocks.js +4 -11
- package/build/cjs/text-transform/utils.js +1 -1
- package/build/esm/blocks/Tabs/Tabs.css +23 -49
- package/build/esm/blocks/Tabs/Tabs.d.ts +1 -1
- package/build/esm/blocks/Tabs/Tabs.js +27 -29
- package/build/esm/components/Image/Image.d.ts +0 -1
- package/build/esm/components/Image/Image.js +1 -4
- package/build/esm/components/OverflowScroller/OverflowScroller.css +2 -0
- package/build/esm/components/RouterLink/RouterLink.d.ts +1 -0
- package/build/esm/components/VideoBlock/VideoBlock.js +1 -1
- 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 +47 -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 +58 -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 +41 -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/constructor-items.d.ts +1 -1
- 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 +4 -7
- 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/text-transform/blocks.js +4 -11
- package/build/esm/text-transform/utils.js +1 -1
- package/package.json +1 -4
- package/server/models/constructor-items/blocks.d.ts +4 -7
- 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 +4 -11
- package/server/text-transform/utils.js +1 -1
- package/styles/mixins.scss +38 -0
- package/build/cjs/components/ButtonTabs/ButtonTabs.css +0 -12
- package/build/cjs/components/ButtonTabs/ButtonTabs.d.ts +0 -13
- package/build/cjs/components/ButtonTabs/ButtonTabs.js +0 -27
- package/build/cjs/components/Image/Image.css +0 -3
- package/build/esm/components/ButtonTabs/ButtonTabs.css +0 -12
- package/build/esm/components/ButtonTabs/ButtonTabs.d.ts +0 -14
- package/build/esm/components/ButtonTabs/ButtonTabs.js +0 -25
- package/build/esm/components/Image/Image.css +0 -3
package/README.md
CHANGED
|
@@ -32,59 +32,81 @@ const Page: WithChildren<PageProps> = ({content}) => (
|
|
|
32
32
|
|
|
33
33
|
```typescript
|
|
34
34
|
interface PageConstructorProps {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
content: PageContent; //Blocks data in JSON format.
|
|
36
|
+
shouldRenderBlock?: ShouldRenderBlock; // A function that is invoked when rendering each block and lets you set conditions for its display.
|
|
37
|
+
custom?: Custom; //Custom blocks (see `Customization`).
|
|
38
|
+
renderMenu?: () => React.ReactNode; //A function that renders the page menu with navigation (we plan to add rendering for the default menu version).
|
|
39
|
+
navigation?: NavigationData; // Navigation data for using navigation component in JSON format
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
interface PageConstructorProviderProps {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
isMobile?: boolean; //A flag indicating that the code is executed in mobile mode.
|
|
44
|
+
locale?: LocaleContextProps; //Info about the language and domain (used when generating and formatting links).
|
|
45
|
+
location?: Location; //API of the browser or router history, the page URL.
|
|
46
|
+
metrika?: Metrika; //Functions for sending analytics
|
|
47
|
+
ssrConfig?: SSR; //A flag indicating that the code is run on the server size.
|
|
48
|
+
theme?: 'light' | 'dark'; //Theme to render the page with.
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
export interface PageContent extends Animatable {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
blocks: Block[];
|
|
53
|
+
menu?: Menu;
|
|
54
|
+
background?: MediaProps;
|
|
55
|
+
footnotes?: string[];
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
interface Custom {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
blocks?: CustomItems;
|
|
60
|
+
subBlocks?: CustomItems;
|
|
61
|
+
headers?: CustomItems;
|
|
62
|
+
loadable?: LoadableConfig;
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
type ShouldRenderBlock = (block: Block, blockKey: string) => Boolean;
|
|
65
66
|
|
|
66
|
-
interface Location
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
interface Locale = {
|
|
75
|
-
lang?: Lang;
|
|
76
|
-
tld?: string;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
interface SSR = {
|
|
80
|
-
isServer?: boolean;
|
|
67
|
+
interface Location {
|
|
68
|
+
history?: History;
|
|
69
|
+
search?: string;
|
|
70
|
+
hash?: string;
|
|
71
|
+
pathname?: string;
|
|
72
|
+
hostname?: string;
|
|
81
73
|
}
|
|
82
74
|
|
|
83
|
-
interface
|
|
84
|
-
|
|
85
|
-
|
|
75
|
+
interface Locale {
|
|
76
|
+
lang?: Lang;
|
|
77
|
+
tld?: string;
|
|
86
78
|
}
|
|
87
79
|
|
|
80
|
+
interface SSR {
|
|
81
|
+
isServer?: boolean;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
interface Metrika {
|
|
85
|
+
metrika?: any;
|
|
86
|
+
pixel?: any;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
interface NavigationData {
|
|
90
|
+
logo: NavigationLogo;
|
|
91
|
+
header: HeaderData;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
interface NavigationLogo {
|
|
95
|
+
icon: ImageProps;
|
|
96
|
+
text?: string;
|
|
97
|
+
url?: string;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
interface HeaderData {
|
|
101
|
+
leftItems: NavigationItem[];
|
|
102
|
+
rightItems?: NavigationItem[];
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
interface NavigationLogo {
|
|
106
|
+
icon: ImageProps;
|
|
107
|
+
text?: string;
|
|
108
|
+
url?: string;
|
|
109
|
+
}
|
|
88
110
|
```
|
|
89
111
|
|
|
90
112
|
### Custom blocks
|
|
@@ -1,94 +1,68 @@
|
|
|
1
|
-
.pc-
|
|
1
|
+
.pc-TabsBlock__content-title.pc-TabsBlock__content-title > * {
|
|
2
2
|
margin: 0;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
/* use this for style redefinitions to awoid problems with
|
|
6
6
|
unpredictable css rules order in build */
|
|
7
|
-
.pc-
|
|
7
|
+
.pc-TabsBlock__block-title {
|
|
8
8
|
margin-bottom: 12px;
|
|
9
9
|
}
|
|
10
|
-
.pc-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
.pc-tabs-block__tabs_centered {
|
|
15
|
-
display: flex;
|
|
16
|
-
justify-content: center;
|
|
17
|
-
}
|
|
18
|
-
.pc-tabs-block__row_reverse {
|
|
19
|
-
flex-direction: row-reverse;
|
|
10
|
+
.pc-TabsBlock__tabs.pc-TabsBlock__tabs {
|
|
11
|
+
flex-wrap: nowrap;
|
|
12
|
+
overflow-x: auto;
|
|
13
|
+
margin-bottom: 32px;
|
|
20
14
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
margin-left: 0;
|
|
24
|
-
}
|
|
25
|
-
.pc-tabs-block__image {
|
|
15
|
+
|
|
16
|
+
.pc-TabsBlock__image {
|
|
26
17
|
width: 100%;
|
|
27
18
|
height: auto;
|
|
28
19
|
object-fit: cover;
|
|
29
20
|
display: block;
|
|
30
21
|
}
|
|
31
|
-
.pc-
|
|
22
|
+
.pc-TabsBlock__image, .pc-TabsBlock__media {
|
|
32
23
|
box-shadow: 0 2px 8px var(--pc-color-sfx-shadow), 0 4px 24px var(--pc-color-sfx-shadow);
|
|
33
24
|
overflow-x: hidden;
|
|
34
25
|
border-radius: var(--pc-border-radius);
|
|
35
26
|
}
|
|
36
|
-
.pc-
|
|
27
|
+
.pc-TabsBlock__caption {
|
|
37
28
|
font-size: var(--yc-text-body-2-font-size);
|
|
38
29
|
line-height: var(--yc-text-body-2-line-height);
|
|
39
30
|
margin: 12px 0 0;
|
|
40
31
|
color: var(--yc-color-text-secondary);
|
|
41
32
|
}
|
|
42
|
-
.pc-
|
|
33
|
+
.pc-TabsBlock__content {
|
|
43
34
|
display: flex;
|
|
44
35
|
flex-direction: column;
|
|
45
36
|
}
|
|
46
|
-
.pc-
|
|
47
|
-
margin: 0 auto;
|
|
48
|
-
}
|
|
49
|
-
.pc-tabs-block__col_centered {
|
|
50
|
-
margin: 0 auto;
|
|
51
|
-
}
|
|
52
|
-
.pc-tabs-block__content-wrapper_margin {
|
|
37
|
+
.pc-TabsBlock__content-wrapper_margin {
|
|
53
38
|
margin: 24px 0 0 32px;
|
|
54
39
|
}
|
|
55
|
-
.pc-
|
|
40
|
+
.pc-TabsBlock__content-title {
|
|
56
41
|
margin: 0 auto 12px;
|
|
57
42
|
}
|
|
58
|
-
.pc-
|
|
43
|
+
.pc-TabsBlock__content-title.pc-TabsBlock__content-title > * {
|
|
59
44
|
font-size: var(--yc-text-header-1-font-size);
|
|
60
45
|
line-height: var(--yc-text-header-1-line-height);
|
|
61
46
|
color: var(--pc-text-header-color);
|
|
62
47
|
font-weight: var(--yc-text-accent-font-weight);
|
|
63
48
|
}
|
|
64
49
|
|
|
50
|
+
.pc-TabsBlock__tabs, .pc-TabsBlock__link {
|
|
51
|
+
font-size: var(--yc-text-body-2-font-size);
|
|
52
|
+
line-height: var(--yc-text-body-2-line-height);
|
|
53
|
+
}
|
|
65
54
|
@media (max-width: 769px) {
|
|
66
|
-
.pc-
|
|
67
|
-
display: flex;
|
|
68
|
-
overflow: auto;
|
|
69
|
-
margin-left: -24px;
|
|
70
|
-
margin-right: -24px;
|
|
71
|
-
padding-left: 24px;
|
|
72
|
-
padding-right: 16px;
|
|
73
|
-
}
|
|
74
|
-
.pc-tabs-block__content-wrapper_margin {
|
|
55
|
+
.pc-TabsBlock__content-wrapper_margin {
|
|
75
56
|
margin: 0 0 32px 0;
|
|
76
57
|
}
|
|
77
|
-
.pc-tabs-block__row_reverse {
|
|
78
|
-
flex-direction: column-reverse;
|
|
79
|
-
}
|
|
80
|
-
.pc-tabs-block__row_reverse .pc-tabs-block__content > * {
|
|
81
|
-
margin-top: 32px;
|
|
82
|
-
padding-bottom: 0;
|
|
83
|
-
}
|
|
84
58
|
}
|
|
85
59
|
@media (min-width: 769px) {
|
|
86
|
-
.pc-
|
|
60
|
+
.pc-TabsBlock.pc-AnimateBlock .pc-TabsBlock__media, .pc-AnimateBlock .pc-TabsBlock .pc-TabsBlock__media {
|
|
87
61
|
position: relative;
|
|
88
62
|
top: 100px;
|
|
89
63
|
opacity: 0;
|
|
90
64
|
}
|
|
91
|
-
.pc-
|
|
65
|
+
.pc-TabsBlock.pc-AnimateBlock.animate .pc-TabsBlock__media, .pc-AnimateBlock .pc-TabsBlock.animate .pc-TabsBlock__media {
|
|
92
66
|
top: 0;
|
|
93
67
|
opacity: 1;
|
|
94
68
|
transition: top 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
@@ -96,12 +70,12 @@ unpredictable css rules order in build */
|
|
|
96
70
|
}
|
|
97
71
|
}
|
|
98
72
|
@media (min-width: 769px) {
|
|
99
|
-
.pc-
|
|
73
|
+
.pc-TabsBlock.pc-AnimateBlock .pc-TabsBlock__image, .pc-AnimateBlock .pc-TabsBlock .pc-TabsBlock__image {
|
|
100
74
|
position: relative;
|
|
101
75
|
top: 100px;
|
|
102
76
|
opacity: 0;
|
|
103
77
|
}
|
|
104
|
-
.pc-
|
|
78
|
+
.pc-TabsBlock.pc-AnimateBlock.animate .pc-TabsBlock__image, .pc-AnimateBlock .pc-TabsBlock.animate .pc-TabsBlock__image {
|
|
105
79
|
top: 0;
|
|
106
80
|
opacity: 1;
|
|
107
81
|
transition: top 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TabsBlockProps } from '../../models';
|
|
2
|
-
export declare const TabsBlock: ({ items, title, description, animated
|
|
2
|
+
export declare const TabsBlock: ({ items, title, description, animated }: TabsBlockProps) => JSX.Element;
|
|
3
3
|
export default TabsBlock;
|
|
@@ -3,55 +3,53 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TabsBlock = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = (0, tslib_1.__importStar)(require("react"));
|
|
6
|
+
const uikit_1 = require("@gravity-ui/uikit");
|
|
6
7
|
const utils_1 = require("../../utils");
|
|
7
8
|
const grid_1 = require("../../grid");
|
|
9
|
+
const YFMWrapper_1 = (0, tslib_1.__importDefault)(require("../../components/YFMWrapper/YFMWrapper"));
|
|
8
10
|
const AnimateBlock_1 = (0, tslib_1.__importDefault)(require("../../components/AnimateBlock/AnimateBlock"));
|
|
9
11
|
const BlockHeader_1 = (0, tslib_1.__importDefault)(require("../../components/BlockHeader/BlockHeader"));
|
|
10
12
|
const FullscreenImage_1 = (0, tslib_1.__importDefault)(require("../../components/FullscreenImage/FullscreenImage"));
|
|
11
13
|
const Media_1 = (0, tslib_1.__importDefault)(require("../../components/Media/Media"));
|
|
14
|
+
const Links_1 = (0, tslib_1.__importDefault)(require("../../components/Link/Links"));
|
|
12
15
|
const ThemeValueContext_1 = require("../../context/theme/ThemeValueContext");
|
|
13
16
|
const utils_2 = require("../../components/Media/Image/utils");
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const b = (0, utils_1.block)('tabs-block');
|
|
17
|
-
const TabsBlock = ({ items, title, description, animated, tabsColSizes, centered, direction = 'media-content', }) => {
|
|
17
|
+
const b = (0, utils_1.block)('TabsBlock');
|
|
18
|
+
const TabsBlock = ({ items, title, description, animated }) => {
|
|
18
19
|
const [activeTab, setActiveTab] = (0, react_1.useState)(items[0].tabName);
|
|
19
20
|
const [play, setPlay] = (0, react_1.useState)(false);
|
|
20
21
|
const { themeValue: theme } = (0, react_1.useContext)(ThemeValueContext_1.ThemeValueContext);
|
|
21
22
|
const tabs = items.map(({ tabName }) => ({ title: tabName, id: tabName }));
|
|
22
23
|
const activeTabData = items.find(({ tabName }) => tabName === activeTab);
|
|
23
|
-
const isReverse = direction === 'content-media';
|
|
24
24
|
let imageProps;
|
|
25
25
|
if (activeTabData) {
|
|
26
26
|
const themedImage = (0, utils_1.getThemedValue)(activeTabData.image, theme);
|
|
27
27
|
imageProps = themedImage && (0, utils_2.getMediaImage)(themedImage);
|
|
28
28
|
}
|
|
29
29
|
const showMedia = Boolean((activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.media) || imageProps);
|
|
30
|
-
const showText = Boolean(activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.text);
|
|
31
|
-
const textContent = activeTabData && showText && (react_1.default.createElement(grid_1.Col, { sizes: { all: 12, md: showMedia ? 4 : 8 }, className: b('content', { centered: centered }) },
|
|
32
|
-
react_1.default.createElement("div", { className: b('content-wrapper', {
|
|
33
|
-
margin: Boolean(((activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.media) || imageProps) && !isReverse),
|
|
34
|
-
}) },
|
|
35
|
-
react_1.default.createElement(sub_blocks_1.Content, { title: activeTabData.title, text: activeTabData.text, additionalInfo: activeTabData.additionalInfo, size: "s", links: [
|
|
36
|
-
...(activeTabData.link ? [activeTabData.link] : []),
|
|
37
|
-
...(activeTabData.links || []),
|
|
38
|
-
], buttons: activeTabData.buttons, colSizes: { all: 12 } }))));
|
|
39
|
-
const mediaContent = showMedia && (react_1.default.createElement(grid_1.Col, { sizes: { all: 12, md: 8 }, orders: {
|
|
40
|
-
all: grid_1.GridColumnOrderClasses.Last,
|
|
41
|
-
md: grid_1.GridColumnOrderClasses.First,
|
|
42
|
-
}, className: b('col', { centered: centered }) },
|
|
43
|
-
(activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.media) && (react_1.default.createElement(Media_1.default, Object.assign({}, (0, utils_1.getThemedValue)(activeTabData.media, theme), { key: activeTab, className: b('media'), playVideo: play }))),
|
|
44
|
-
imageProps && (react_1.default.createElement(react_1.Fragment, null,
|
|
45
|
-
react_1.default.createElement(FullscreenImage_1.default, Object.assign({}, imageProps, { imageClassName: b('image') })),
|
|
46
|
-
(activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.caption) && (react_1.default.createElement("p", { className: b('caption') }, activeTabData.caption))))));
|
|
47
30
|
return (react_1.default.createElement(AnimateBlock_1.default, { className: b(), onScroll: () => setPlay(true), animate: animated },
|
|
48
|
-
react_1.default.createElement(BlockHeader_1.default, { title: title, description: description, className: b('block-title'
|
|
49
|
-
react_1.default.createElement(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
31
|
+
react_1.default.createElement(BlockHeader_1.default, { title: title, description: description, className: b('block-title') }),
|
|
32
|
+
react_1.default.createElement(uikit_1.Tabs, { className: b('tabs'), items: tabs, activeTab: activeTab, onSelectTab: setActiveTab, size: "l" }),
|
|
33
|
+
activeTabData && (react_1.default.createElement(grid_1.Row, null,
|
|
34
|
+
showMedia && (react_1.default.createElement(grid_1.Col, { sizes: { all: 12, md: 8 }, orders: {
|
|
35
|
+
all: grid_1.GridColumnOrderClasses.Last,
|
|
36
|
+
md: grid_1.GridColumnOrderClasses.First,
|
|
37
|
+
} },
|
|
38
|
+
(activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.media) && (react_1.default.createElement(Media_1.default, Object.assign({}, (0, utils_1.getThemedValue)(activeTabData.media, theme), { key: activeTab, className: b('media'), playVideo: play }))),
|
|
39
|
+
imageProps && (react_1.default.createElement(react_1.Fragment, null,
|
|
40
|
+
react_1.default.createElement(FullscreenImage_1.default, Object.assign({}, imageProps, { imageClassName: b('image') })),
|
|
41
|
+
activeTabData && (react_1.default.createElement("p", { className: b('caption') }, activeTabData.caption)))))),
|
|
42
|
+
react_1.default.createElement(grid_1.Col, { sizes: { all: 12, md: showMedia ? 4 : 8 }, className: b('content') },
|
|
43
|
+
react_1.default.createElement("div", { className: b('content-wrapper', {
|
|
44
|
+
margin: Boolean((activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.media) || imageProps),
|
|
45
|
+
}) },
|
|
46
|
+
react_1.default.createElement("h4", { className: b('content-title') },
|
|
47
|
+
react_1.default.createElement(YFMWrapper_1.default, { content: activeTabData.title, modifiers: { constructor: true } })),
|
|
48
|
+
react_1.default.createElement(YFMWrapper_1.default, { content: activeTabData.text, modifiers: { constructor: true } }),
|
|
49
|
+
react_1.default.createElement(Links_1.default, { links: [
|
|
50
|
+
...(activeTabData.link ? [activeTabData.link] : []),
|
|
51
|
+
...(activeTabData.links || []),
|
|
52
|
+
], className: b('link') })))))));
|
|
55
53
|
};
|
|
56
54
|
exports.TabsBlock = TabsBlock;
|
|
57
55
|
exports.default = exports.TabsBlock;
|
|
@@ -4,8 +4,6 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const react_1 = (0, tslib_1.__importStar)(require("react"));
|
|
5
5
|
const projectSettingsContext_1 = require("../../context/projectSettingsContext");
|
|
6
6
|
const constants_1 = require("../../constants");
|
|
7
|
-
const utils_1 = require("../../utils");
|
|
8
|
-
const b = (0, utils_1.block)('Image');
|
|
9
7
|
const checkWebP = (src) => {
|
|
10
8
|
return src.endsWith('.webp') ? src : src + '.webp';
|
|
11
9
|
};
|
|
@@ -22,7 +20,7 @@ const Image = (props) => {
|
|
|
22
20
|
disableCompress ||
|
|
23
21
|
imageSrc.endsWith('.svg') ||
|
|
24
22
|
imgLoadingError;
|
|
25
|
-
return (react_1.default.createElement("picture",
|
|
23
|
+
return (react_1.default.createElement("picture", null,
|
|
26
24
|
mobile && (react_1.default.createElement(react_1.Fragment, null,
|
|
27
25
|
!disableWebp && (react_1.default.createElement("source", { srcSet: checkWebP(mobile), type: "image/webp", media: `(max-width: ${constants_1.BREAKPOINTS.sm}px)` })),
|
|
28
26
|
react_1.default.createElement("source", { srcSet: mobile, media: `(max-width: ${constants_1.BREAKPOINTS.sm}px)` }))),
|
|
@@ -9,10 +9,12 @@
|
|
|
9
9
|
.pc-overflow-scroller__scroller {
|
|
10
10
|
position: absolute;
|
|
11
11
|
z-index: 10;
|
|
12
|
+
top: 0;
|
|
12
13
|
display: flex;
|
|
13
14
|
justify-content: flex-end;
|
|
14
15
|
align-items: center;
|
|
15
16
|
width: 32px;
|
|
17
|
+
height: calc(100% - 1px);
|
|
16
18
|
cursor: pointer;
|
|
17
19
|
color: var(--yc-color-text-secondary);
|
|
18
20
|
background: linear-gradient(to left, var(--yc-color-base-background) 70%, var(--pc-transparent) 100%) no-repeat;
|
|
@@ -53,7 +53,7 @@ const VideoBlock = (props) => {
|
|
|
53
53
|
}, [src, attributes]);
|
|
54
54
|
(0, react_1.useEffect)(() => {
|
|
55
55
|
const updateSize = lodash_1.default.debounce(() => {
|
|
56
|
-
setHeight(ref.current ? Math.
|
|
56
|
+
setHeight(ref.current ? Math.round(getHeight(ref.current.offsetWidth)) : undefined);
|
|
57
57
|
}, 100);
|
|
58
58
|
updateSize();
|
|
59
59
|
window.addEventListener('resize', updateSize);
|
|
@@ -33,4 +33,6 @@ export { default as OverflowScroller } from './OverflowScroller/OverflowScroller
|
|
|
33
33
|
export { default as Author } from './Author/Author';
|
|
34
34
|
export { default as RouterLink } from './RouterLink/RouterLink';
|
|
35
35
|
export { default as HTML } from './HTML/HTML';
|
|
36
|
+
export { default as Header } from './navigation/components/Header/Header';
|
|
37
|
+
export * as Navigation from './navigation/components/index';
|
|
36
38
|
export type { RouterLinkProps } from './RouterLink/RouterLink';
|
|
@@ -1,76 +1,77 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.HTML = exports.RouterLink = exports.Author = exports.OverflowScroller = exports.Control = exports.YandexForm = exports.YFMWrapper = exports.VideoBlock = exports.UnpublishedLabel = exports.ToggleArrow = exports.Title = exports.Table = exports.ReactPlayer = exports.OutsideClick = exports.Media = exports.Links = exports.Link = exports.Image = exports.HeightCalculator = exports.HeaderBreadcrumbs = exports.FullWidthBackground = exports.FullscreenImage = exports.Foldable = exports.FileLink = exports.ErrorWrapper = exports.CardBase = exports.Button = exports.BlockHeader = exports.BlockBase = exports.BalancedMasonry = exports.BackLink = exports.BackgroundMedia = exports.BackgroundImage = exports.AnimateBlock = exports.Anchor = void 0;
|
|
3
|
+
exports.Navigation = exports.Header = exports.HTML = exports.RouterLink = exports.Author = exports.OverflowScroller = exports.Control = exports.YandexForm = exports.YFMWrapper = exports.VideoBlock = exports.UnpublishedLabel = exports.ToggleArrow = exports.Title = exports.Table = exports.ReactPlayer = exports.OutsideClick = exports.Media = exports.Links = exports.Link = exports.Image = exports.HeightCalculator = exports.HeaderBreadcrumbs = exports.FullWidthBackground = exports.FullscreenImage = exports.Foldable = exports.FileLink = exports.ErrorWrapper = exports.CardBase = exports.Button = exports.BlockHeader = exports.BlockBase = exports.BalancedMasonry = exports.BackLink = exports.BackgroundMedia = exports.BackgroundImage = exports.AnimateBlock = exports.Anchor = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
7
5
|
var Anchor_1 = require("./Anchor/Anchor");
|
|
8
|
-
Object.defineProperty(exports, "Anchor", { enumerable: true, get: function () { return __importDefault(Anchor_1).default; } });
|
|
6
|
+
Object.defineProperty(exports, "Anchor", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Anchor_1).default; } });
|
|
9
7
|
var AnimateBlock_1 = require("./AnimateBlock/AnimateBlock");
|
|
10
|
-
Object.defineProperty(exports, "AnimateBlock", { enumerable: true, get: function () { return __importDefault(AnimateBlock_1).default; } });
|
|
8
|
+
Object.defineProperty(exports, "AnimateBlock", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(AnimateBlock_1).default; } });
|
|
11
9
|
var BackgroundImage_1 = require("./BackgroundImage/BackgroundImage");
|
|
12
|
-
Object.defineProperty(exports, "BackgroundImage", { enumerable: true, get: function () { return __importDefault(BackgroundImage_1).default; } });
|
|
10
|
+
Object.defineProperty(exports, "BackgroundImage", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(BackgroundImage_1).default; } });
|
|
13
11
|
var BackgroundMedia_1 = require("./BackgroundMedia/BackgroundMedia");
|
|
14
|
-
Object.defineProperty(exports, "BackgroundMedia", { enumerable: true, get: function () { return __importDefault(BackgroundMedia_1).default; } });
|
|
12
|
+
Object.defineProperty(exports, "BackgroundMedia", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(BackgroundMedia_1).default; } });
|
|
15
13
|
var BackLink_1 = require("./BackLink/BackLink");
|
|
16
|
-
Object.defineProperty(exports, "BackLink", { enumerable: true, get: function () { return __importDefault(BackLink_1).default; } });
|
|
14
|
+
Object.defineProperty(exports, "BackLink", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(BackLink_1).default; } });
|
|
17
15
|
var BalancedMasonry_1 = require("./BalancedMasonry/BalancedMasonry");
|
|
18
|
-
Object.defineProperty(exports, "BalancedMasonry", { enumerable: true, get: function () { return __importDefault(BalancedMasonry_1).default; } });
|
|
16
|
+
Object.defineProperty(exports, "BalancedMasonry", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(BalancedMasonry_1).default; } });
|
|
19
17
|
var BlockBase_1 = require("./BlockBase/BlockBase");
|
|
20
|
-
Object.defineProperty(exports, "BlockBase", { enumerable: true, get: function () { return __importDefault(BlockBase_1).default; } });
|
|
18
|
+
Object.defineProperty(exports, "BlockBase", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(BlockBase_1).default; } });
|
|
21
19
|
var BlockHeader_1 = require("./BlockHeader/BlockHeader");
|
|
22
|
-
Object.defineProperty(exports, "BlockHeader", { enumerable: true, get: function () { return __importDefault(BlockHeader_1).default; } });
|
|
20
|
+
Object.defineProperty(exports, "BlockHeader", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(BlockHeader_1).default; } });
|
|
23
21
|
var Button_1 = require("./Button/Button");
|
|
24
|
-
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return __importDefault(Button_1).default; } });
|
|
22
|
+
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Button_1).default; } });
|
|
25
23
|
var CardBase_1 = require("./CardBase/CardBase");
|
|
26
|
-
Object.defineProperty(exports, "CardBase", { enumerable: true, get: function () { return __importDefault(CardBase_1).default; } });
|
|
24
|
+
Object.defineProperty(exports, "CardBase", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(CardBase_1).default; } });
|
|
27
25
|
var ErrorWrapper_1 = require("./ErrorWrapper/ErrorWrapper");
|
|
28
|
-
Object.defineProperty(exports, "ErrorWrapper", { enumerable: true, get: function () { return __importDefault(ErrorWrapper_1).default; } });
|
|
26
|
+
Object.defineProperty(exports, "ErrorWrapper", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(ErrorWrapper_1).default; } });
|
|
29
27
|
var FileLink_1 = require("./FileLink/FileLink");
|
|
30
|
-
Object.defineProperty(exports, "FileLink", { enumerable: true, get: function () { return __importDefault(FileLink_1).default; } });
|
|
28
|
+
Object.defineProperty(exports, "FileLink", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(FileLink_1).default; } });
|
|
31
29
|
var Foldable_1 = require("./Foldable/Foldable");
|
|
32
|
-
Object.defineProperty(exports, "Foldable", { enumerable: true, get: function () { return __importDefault(Foldable_1).default; } });
|
|
30
|
+
Object.defineProperty(exports, "Foldable", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Foldable_1).default; } });
|
|
33
31
|
var FullscreenImage_1 = require("./FullscreenImage/FullscreenImage");
|
|
34
|
-
Object.defineProperty(exports, "FullscreenImage", { enumerable: true, get: function () { return __importDefault(FullscreenImage_1).default; } });
|
|
32
|
+
Object.defineProperty(exports, "FullscreenImage", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(FullscreenImage_1).default; } });
|
|
35
33
|
var FullWidthBackground_1 = require("./FullWidthBackground/FullWidthBackground");
|
|
36
|
-
Object.defineProperty(exports, "FullWidthBackground", { enumerable: true, get: function () { return __importDefault(FullWidthBackground_1).default; } });
|
|
34
|
+
Object.defineProperty(exports, "FullWidthBackground", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(FullWidthBackground_1).default; } });
|
|
37
35
|
var HeaderBreadcrumbs_1 = require("./HeaderBreadcrumbs/HeaderBreadcrumbs");
|
|
38
|
-
Object.defineProperty(exports, "HeaderBreadcrumbs", { enumerable: true, get: function () { return __importDefault(HeaderBreadcrumbs_1).default; } });
|
|
36
|
+
Object.defineProperty(exports, "HeaderBreadcrumbs", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(HeaderBreadcrumbs_1).default; } });
|
|
39
37
|
var HeightCalculator_1 = require("./HeightCalculator/HeightCalculator");
|
|
40
|
-
Object.defineProperty(exports, "HeightCalculator", { enumerable: true, get: function () { return __importDefault(HeightCalculator_1).default; } });
|
|
38
|
+
Object.defineProperty(exports, "HeightCalculator", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(HeightCalculator_1).default; } });
|
|
41
39
|
var Image_1 = require("./Image/Image");
|
|
42
|
-
Object.defineProperty(exports, "Image", { enumerable: true, get: function () { return __importDefault(Image_1).default; } });
|
|
40
|
+
Object.defineProperty(exports, "Image", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Image_1).default; } });
|
|
43
41
|
var Link_1 = require("./Link/Link");
|
|
44
|
-
Object.defineProperty(exports, "Link", { enumerable: true, get: function () { return __importDefault(Link_1).default; } });
|
|
42
|
+
Object.defineProperty(exports, "Link", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Link_1).default; } });
|
|
45
43
|
var Links_1 = require("./Link/Links");
|
|
46
|
-
Object.defineProperty(exports, "Links", { enumerable: true, get: function () { return __importDefault(Links_1).default; } });
|
|
44
|
+
Object.defineProperty(exports, "Links", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Links_1).default; } });
|
|
47
45
|
var Media_1 = require("./Media/Media");
|
|
48
|
-
Object.defineProperty(exports, "Media", { enumerable: true, get: function () { return __importDefault(Media_1).default; } });
|
|
46
|
+
Object.defineProperty(exports, "Media", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Media_1).default; } });
|
|
49
47
|
var OutsideClick_1 = require("./OutsideClick/OutsideClick");
|
|
50
|
-
Object.defineProperty(exports, "OutsideClick", { enumerable: true, get: function () { return __importDefault(OutsideClick_1).default; } });
|
|
48
|
+
Object.defineProperty(exports, "OutsideClick", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(OutsideClick_1).default; } });
|
|
51
49
|
var ReactPlayer_1 = require("./ReactPlayer/ReactPlayer");
|
|
52
|
-
Object.defineProperty(exports, "ReactPlayer", { enumerable: true, get: function () { return __importDefault(ReactPlayer_1).default; } });
|
|
50
|
+
Object.defineProperty(exports, "ReactPlayer", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(ReactPlayer_1).default; } });
|
|
53
51
|
var Table_1 = require("./Table/Table");
|
|
54
|
-
Object.defineProperty(exports, "Table", { enumerable: true, get: function () { return __importDefault(Table_1).default; } });
|
|
52
|
+
Object.defineProperty(exports, "Table", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Table_1).default; } });
|
|
55
53
|
var Title_1 = require("./Title/Title");
|
|
56
|
-
Object.defineProperty(exports, "Title", { enumerable: true, get: function () { return __importDefault(Title_1).default; } });
|
|
54
|
+
Object.defineProperty(exports, "Title", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Title_1).default; } });
|
|
57
55
|
var ToggleArrow_1 = require("./ToggleArrow/ToggleArrow");
|
|
58
|
-
Object.defineProperty(exports, "ToggleArrow", { enumerable: true, get: function () { return __importDefault(ToggleArrow_1).default; } });
|
|
56
|
+
Object.defineProperty(exports, "ToggleArrow", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(ToggleArrow_1).default; } });
|
|
59
57
|
var UnpublishedLabel_1 = require("./UnpublishedLabel/UnpublishedLabel");
|
|
60
|
-
Object.defineProperty(exports, "UnpublishedLabel", { enumerable: true, get: function () { return __importDefault(UnpublishedLabel_1).default; } });
|
|
58
|
+
Object.defineProperty(exports, "UnpublishedLabel", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(UnpublishedLabel_1).default; } });
|
|
61
59
|
var VideoBlock_1 = require("./VideoBlock/VideoBlock");
|
|
62
|
-
Object.defineProperty(exports, "VideoBlock", { enumerable: true, get: function () { return __importDefault(VideoBlock_1).default; } });
|
|
60
|
+
Object.defineProperty(exports, "VideoBlock", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(VideoBlock_1).default; } });
|
|
63
61
|
var YFMWrapper_1 = require("./YFMWrapper/YFMWrapper");
|
|
64
|
-
Object.defineProperty(exports, "YFMWrapper", { enumerable: true, get: function () { return __importDefault(YFMWrapper_1).default; } });
|
|
62
|
+
Object.defineProperty(exports, "YFMWrapper", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(YFMWrapper_1).default; } });
|
|
65
63
|
var YandexForm_1 = require("./YandexForm/YandexForm");
|
|
66
|
-
Object.defineProperty(exports, "YandexForm", { enumerable: true, get: function () { return __importDefault(YandexForm_1).default; } });
|
|
64
|
+
Object.defineProperty(exports, "YandexForm", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(YandexForm_1).default; } });
|
|
67
65
|
var Control_1 = require("./Control/Control");
|
|
68
|
-
Object.defineProperty(exports, "Control", { enumerable: true, get: function () { return __importDefault(Control_1).default; } });
|
|
66
|
+
Object.defineProperty(exports, "Control", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Control_1).default; } });
|
|
69
67
|
var OverflowScroller_1 = require("./OverflowScroller/OverflowScroller");
|
|
70
|
-
Object.defineProperty(exports, "OverflowScroller", { enumerable: true, get: function () { return __importDefault(OverflowScroller_1).default; } });
|
|
68
|
+
Object.defineProperty(exports, "OverflowScroller", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(OverflowScroller_1).default; } });
|
|
71
69
|
var Author_1 = require("./Author/Author");
|
|
72
|
-
Object.defineProperty(exports, "Author", { enumerable: true, get: function () { return __importDefault(Author_1).default; } });
|
|
70
|
+
Object.defineProperty(exports, "Author", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Author_1).default; } });
|
|
73
71
|
var RouterLink_1 = require("./RouterLink/RouterLink");
|
|
74
|
-
Object.defineProperty(exports, "RouterLink", { enumerable: true, get: function () { return __importDefault(RouterLink_1).default; } });
|
|
72
|
+
Object.defineProperty(exports, "RouterLink", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(RouterLink_1).default; } });
|
|
75
73
|
var HTML_1 = require("./HTML/HTML");
|
|
76
|
-
Object.defineProperty(exports, "HTML", { enumerable: true, get: function () { return __importDefault(HTML_1).default; } });
|
|
74
|
+
Object.defineProperty(exports, "HTML", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(HTML_1).default; } });
|
|
75
|
+
var Header_1 = require("./navigation/components/Header/Header");
|
|
76
|
+
Object.defineProperty(exports, "Header", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Header_1).default; } });
|
|
77
|
+
exports.Navigation = (0, tslib_1.__importStar)(require("./navigation/components/index"));
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
|
2
|
+
unpredictable css rules order in build */
|
|
3
|
+
.pc-header {
|
|
4
|
+
position: sticky;
|
|
5
|
+
z-index: 98;
|
|
6
|
+
top: 0;
|
|
7
|
+
display: flex;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
align-items: center;
|
|
10
|
+
height: var(--header-height);
|
|
11
|
+
background-color: var(--yc-color-base-background);
|
|
12
|
+
box-shadow: inset 0 -1px 0 var(--yc-color-line-generic);
|
|
13
|
+
}
|
|
14
|
+
.pc-header__wrapper {
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
align-items: center;
|
|
18
|
+
height: var(--header-height);
|
|
19
|
+
}
|
|
20
|
+
@media (min-width: 769px) {
|
|
21
|
+
.pc-header__mobile-menu-button {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
.pc-header__navigation, .pc-header__left, .pc-header__right {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
}
|
|
29
|
+
.pc-header__navigation {
|
|
30
|
+
position: relative;
|
|
31
|
+
margin-right: 20px;
|
|
32
|
+
flex: 1 0 0;
|
|
33
|
+
justify-content: flex-start;
|
|
34
|
+
}
|
|
35
|
+
@media (max-width: 768px) {
|
|
36
|
+
.pc-header__navigation {
|
|
37
|
+
display: none;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
.pc-header__right {
|
|
41
|
+
flex: 0;
|
|
42
|
+
justify-content: flex-end;
|
|
43
|
+
}
|
|
44
|
+
.pc-header__navigation-container {
|
|
45
|
+
display: flex;
|
|
46
|
+
overflow-x: hidden;
|
|
47
|
+
flex: 1 0 0;
|
|
48
|
+
justify-content: space-between;
|
|
49
|
+
align-items: center;
|
|
50
|
+
margin-right: 20px;
|
|
51
|
+
}
|
|
52
|
+
.pc-header__buttons {
|
|
53
|
+
display: flex;
|
|
54
|
+
}
|
|
55
|
+
@media (max-width: 768px) {
|
|
56
|
+
.pc-header__buttons {
|
|
57
|
+
display: none;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
.pc-header__buttons > *:not(:last-child) {
|
|
61
|
+
margin-right: 16px;
|
|
62
|
+
}
|
|
63
|
+
.pc-header__button {
|
|
64
|
+
margin-top: 0;
|
|
65
|
+
}
|
|
66
|
+
.pc-header__logo {
|
|
67
|
+
margin: 0 32px 0 0;
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
}
|
|
70
|
+
@media (max-width: 768px) {
|
|
71
|
+
.pc-header__navigation-container {
|
|
72
|
+
justify-content: flex-end;
|
|
73
|
+
}
|
|
74
|
+
.pc-header__left {
|
|
75
|
+
flex: 1 0 0;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
@media (max-width: 576px) {
|
|
79
|
+
.pc-header__navigation-container {
|
|
80
|
+
margin-right: 12px;
|
|
81
|
+
}
|
|
82
|
+
.pc-header__logo {
|
|
83
|
+
margin-right: 0;
|
|
84
|
+
}
|
|
85
|
+
}
|