@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
|
@@ -6,7 +6,6 @@ const CardWithImageLinks = {
|
|
|
6
6
|
required: ['title', 'link'],
|
|
7
7
|
properties: Object.assign(Object.assign({}, BaseProps), { title: {
|
|
8
8
|
type: 'string',
|
|
9
|
-
content: 'text',
|
|
10
9
|
}, link: {
|
|
11
10
|
type: 'string',
|
|
12
11
|
}, arrow: {
|
|
@@ -25,13 +24,11 @@ export const CardWithImageItem = {
|
|
|
25
24
|
properties: Object.assign(Object.assign({}, BaseProps), { image: {
|
|
26
25
|
type: 'string',
|
|
27
26
|
}, title: {
|
|
28
|
-
oneOf: [{ type: 'string'
|
|
27
|
+
oneOf: [{ type: 'string' }, TitleProps],
|
|
29
28
|
}, description: {
|
|
30
29
|
type: 'string',
|
|
31
|
-
content: 'yfm',
|
|
32
30
|
}, additionalInfo: {
|
|
33
31
|
type: 'string',
|
|
34
|
-
content: 'yfm',
|
|
35
32
|
}, disableCompress: {
|
|
36
33
|
type: 'boolean',
|
|
37
34
|
}, border: {
|
|
@@ -7,7 +7,6 @@ export declare const ContentBase: {
|
|
|
7
7
|
properties: {
|
|
8
8
|
text: {
|
|
9
9
|
type: string;
|
|
10
|
-
content: string;
|
|
11
10
|
};
|
|
12
11
|
textSize: {
|
|
13
12
|
type: string;
|
|
@@ -22,16 +21,13 @@ export declare const ContentBase: {
|
|
|
22
21
|
};
|
|
23
22
|
} | {
|
|
24
23
|
type: string;
|
|
25
|
-
content: string;
|
|
26
24
|
})[];
|
|
27
25
|
};
|
|
28
26
|
text: {
|
|
29
27
|
type: string;
|
|
30
|
-
content: string;
|
|
31
28
|
};
|
|
32
29
|
additionalInfo: {
|
|
33
30
|
type: string;
|
|
34
|
-
content: string;
|
|
35
31
|
};
|
|
36
32
|
size: {
|
|
37
33
|
type: string;
|
|
@@ -80,7 +76,6 @@ export declare const ContentBlock: {
|
|
|
80
76
|
properties: {
|
|
81
77
|
text: {
|
|
82
78
|
type: string;
|
|
83
|
-
content: string;
|
|
84
79
|
};
|
|
85
80
|
textSize: {
|
|
86
81
|
type: string;
|
|
@@ -95,16 +90,13 @@ export declare const ContentBlock: {
|
|
|
95
90
|
};
|
|
96
91
|
} | {
|
|
97
92
|
type: string;
|
|
98
|
-
content: string;
|
|
99
93
|
})[];
|
|
100
94
|
};
|
|
101
95
|
text: {
|
|
102
96
|
type: string;
|
|
103
|
-
content: string;
|
|
104
97
|
};
|
|
105
98
|
additionalInfo: {
|
|
106
99
|
type: string;
|
|
107
|
-
content: string;
|
|
108
100
|
};
|
|
109
101
|
size: {
|
|
110
102
|
type: string;
|
|
@@ -2,15 +2,13 @@ import { containerSizesArray, contentSizes, contentThemes, LinkProps, sizeNumber
|
|
|
2
2
|
import { filteredArray } from '../../schema/validators/utils';
|
|
3
3
|
export const ContentBase = {
|
|
4
4
|
title: {
|
|
5
|
-
oneOf: [{ type: 'string'
|
|
5
|
+
oneOf: [{ type: 'string' }, TitleProps],
|
|
6
6
|
},
|
|
7
7
|
text: {
|
|
8
8
|
type: 'string',
|
|
9
|
-
content: 'yfm',
|
|
10
9
|
},
|
|
11
10
|
additionalInfo: {
|
|
12
11
|
type: 'string',
|
|
13
|
-
content: 'yfm',
|
|
14
12
|
},
|
|
15
13
|
size: {
|
|
16
14
|
type: 'string',
|
|
@@ -19,7 +19,6 @@ const PriceDetailedFoldableDetailsProps = {
|
|
|
19
19
|
properties: {
|
|
20
20
|
title: {
|
|
21
21
|
type: 'string',
|
|
22
|
-
content: 'text',
|
|
23
22
|
},
|
|
24
23
|
size: {
|
|
25
24
|
type: 'string',
|
|
@@ -73,7 +72,6 @@ const PriceDescriptionLabelProps = {
|
|
|
73
72
|
},
|
|
74
73
|
text: {
|
|
75
74
|
type: 'string',
|
|
76
|
-
content: 'text',
|
|
77
75
|
},
|
|
78
76
|
size: {
|
|
79
77
|
type: 'string',
|
|
@@ -84,15 +82,12 @@ const PriceDescriptionLabelProps = {
|
|
|
84
82
|
const PriceDescriptionProps = {
|
|
85
83
|
title: {
|
|
86
84
|
type: 'string',
|
|
87
|
-
content: 'text',
|
|
88
85
|
},
|
|
89
86
|
description: {
|
|
90
87
|
type: 'string',
|
|
91
|
-
content: 'yfm',
|
|
92
88
|
},
|
|
93
89
|
detailedTitle: {
|
|
94
90
|
type: 'string',
|
|
95
|
-
content: 'text',
|
|
96
91
|
},
|
|
97
92
|
label: PriceDescriptionLabelProps,
|
|
98
93
|
};
|
|
@@ -103,11 +98,9 @@ const PriceDetailsSettingsProps = {
|
|
|
103
98
|
properties: {
|
|
104
99
|
title: {
|
|
105
100
|
type: 'string',
|
|
106
|
-
content: 'text',
|
|
107
101
|
},
|
|
108
102
|
description: {
|
|
109
103
|
type: 'string',
|
|
110
|
-
content: 'yfm',
|
|
111
104
|
},
|
|
112
105
|
},
|
|
113
106
|
};
|
|
@@ -118,7 +111,6 @@ const PriceDetailsListProps = {
|
|
|
118
111
|
properties: {
|
|
119
112
|
text: {
|
|
120
113
|
type: 'string',
|
|
121
|
-
content: 'yfm',
|
|
122
114
|
},
|
|
123
115
|
},
|
|
124
116
|
};
|
|
@@ -5,7 +5,6 @@ export declare const Quote: {
|
|
|
5
5
|
properties: {
|
|
6
6
|
text: {
|
|
7
7
|
type: string;
|
|
8
|
-
content: string;
|
|
9
8
|
};
|
|
10
9
|
image: {
|
|
11
10
|
oneOf: ({
|
|
@@ -48,11 +47,9 @@ export declare const Quote: {
|
|
|
48
47
|
properties: {
|
|
49
48
|
firstName: {
|
|
50
49
|
type: string;
|
|
51
|
-
content: string;
|
|
52
50
|
};
|
|
53
51
|
secondName: {
|
|
54
52
|
type: string;
|
|
55
|
-
content: string;
|
|
56
53
|
};
|
|
57
54
|
avatar: {
|
|
58
55
|
type: string;
|
|
@@ -60,7 +57,6 @@ export declare const Quote: {
|
|
|
60
57
|
};
|
|
61
58
|
description: {
|
|
62
59
|
type: string;
|
|
63
|
-
content: string;
|
|
64
60
|
};
|
|
65
61
|
};
|
|
66
62
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravity-ui/page-constructor",
|
|
3
|
-
"version": "1.8.0
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "Gravity UI Page Constructor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"typograf": "^6.14.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"react": "^16.0.0",
|
|
60
|
+
"react": "^16.0.0 || ^17.0.0",
|
|
61
61
|
"@gravity-ui/uikit": "^3.0.1",
|
|
62
62
|
"@doc-tools/transform": "^2.6.1"
|
|
63
63
|
},
|
|
@@ -121,8 +121,5 @@
|
|
|
121
121
|
"*.{json,yaml,yml,md}": [
|
|
122
122
|
"prettier --write"
|
|
123
123
|
]
|
|
124
|
-
},
|
|
125
|
-
"publishConfig": {
|
|
126
|
-
"tag": "alpha"
|
|
127
124
|
}
|
|
128
125
|
}
|
|
@@ -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[];
|
package/server/models/index.d.ts
CHANGED
package/server/models/index.js
CHANGED
|
@@ -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,10 @@
|
|
|
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 = {}));
|
|
@@ -173,7 +173,6 @@ const config = {
|
|
|
173
173
|
{
|
|
174
174
|
fields: ['items'],
|
|
175
175
|
transformer: yfmTransformer,
|
|
176
|
-
// https://st.yandex-team.ru/CLOUDFRONT-13388 Перед мерджем проверить валидацию здесь
|
|
177
176
|
parser: (0, exports.createItemsParser)(['text', 'additionalInfo']),
|
|
178
177
|
},
|
|
179
178
|
],
|
package/styles/mixins.scss
CHANGED
|
@@ -442,3 +442,41 @@ unpredictable css rules order in build */
|
|
|
442
442
|
@mixin font-feature-settings {
|
|
443
443
|
font-feature-settings: 'liga', 'kern', 'pnum' on, 'lnum' on, 'ss03' on;
|
|
444
444
|
}
|
|
445
|
+
|
|
446
|
+
@mixin navigation-popup {
|
|
447
|
+
z-index: 101;
|
|
448
|
+
|
|
449
|
+
display: flex;
|
|
450
|
+
flex-direction: column;
|
|
451
|
+
|
|
452
|
+
min-width: 220px;
|
|
453
|
+
padding: $indentXS;
|
|
454
|
+
|
|
455
|
+
border: 1px solid var(--yc-color-line-generic);
|
|
456
|
+
border-top-width: 0;
|
|
457
|
+
border-radius: calc(#{$borderRadius} / 2);
|
|
458
|
+
background: var(--yc-color-base-float);
|
|
459
|
+
box-shadow: 0 3px 10px var(--yc-color-sfx-shadow);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
@mixin navigation-item {
|
|
463
|
+
color: var(--yc-color-text-primary);
|
|
464
|
+
@include reset-link-style();
|
|
465
|
+
@include islands-focus();
|
|
466
|
+
|
|
467
|
+
&:hover,
|
|
468
|
+
&_active {
|
|
469
|
+
color: var(--yc-color-text-link);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
@mixin navigation-link() {
|
|
474
|
+
cursor: pointer;
|
|
475
|
+
@include islands-focus();
|
|
476
|
+
@include reset-link-style();
|
|
477
|
+
|
|
478
|
+
&:hover,
|
|
479
|
+
&:active {
|
|
480
|
+
color: var(--yc-color-text-link);
|
|
481
|
+
}
|
|
482
|
+
}
|