@gravity-ui/page-constructor 3.0.0-alpha.0 → 3.0.0-alpha.2
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 +19 -0
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js +1 -1
- package/build/cjs/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +2 -2
- package/build/cjs/blocks/Slider/Slider.js +2 -2
- package/build/cjs/blocks/Tabs/Tabs.js +2 -2
- package/build/cjs/components/Anchor/Anchor.d.ts +2 -2
- package/build/cjs/components/Anchor/Anchor.js +1 -1
- package/build/cjs/components/MediaBase/MediaBase.js +2 -2
- package/build/cjs/components/Title/Title.css +8 -103
- package/build/cjs/components/Title/Title.d.ts +5 -8
- package/build/cjs/components/Title/Title.js +15 -50
- package/build/cjs/components/Title/TitleItem.css +111 -0
- package/build/cjs/components/Title/TitleItem.d.ts +10 -0
- package/build/cjs/components/Title/TitleItem.js +57 -0
- package/build/cjs/components/index.d.ts +1 -1
- package/build/cjs/components/index.js +4 -4
- package/build/cjs/grid/Col/Col.d.ts +1 -1
- package/build/cjs/internal-typings/global.d.ts +18 -16
- package/build/cjs/models/constructor-items/blocks.d.ts +8 -8
- package/build/cjs/models/constructor-items/common.d.ts +4 -4
- package/build/cjs/sub-blocks/Content/Content.js +3 -3
- package/build/cjs/sub-blocks/HubspotForm/HubspotFormContainer.d.ts +2 -1
- package/build/cjs/sub-blocks/HubspotForm/HubspotFormContainer.js +5 -2
- package/build/cjs/sub-blocks/HubspotForm/index.d.ts +1 -1
- package/build/cjs/sub-blocks/HubspotForm/index.js +6 -5
- package/build/cjs/text-transform/config.d.ts +2 -2
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js +2 -2
- package/build/esm/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +2 -2
- package/build/esm/blocks/Slider/Slider.js +2 -2
- package/build/esm/blocks/Tabs/Tabs.js +2 -2
- package/build/esm/components/Anchor/Anchor.d.ts +2 -2
- package/build/esm/components/Anchor/Anchor.js +1 -1
- package/build/esm/components/MediaBase/MediaBase.js +2 -2
- package/build/esm/components/Title/Title.css +8 -103
- package/build/esm/components/Title/Title.d.ts +5 -8
- package/build/esm/components/Title/Title.js +17 -49
- package/build/esm/components/Title/TitleItem.css +111 -0
- package/build/esm/components/Title/TitleItem.d.ts +11 -0
- package/build/esm/components/Title/TitleItem.js +53 -0
- package/build/esm/components/index.d.ts +1 -1
- package/build/esm/components/index.js +1 -1
- package/build/esm/grid/Col/Col.d.ts +1 -1
- package/build/esm/internal-typings/global.d.ts +18 -16
- package/build/esm/models/constructor-items/blocks.d.ts +8 -8
- package/build/esm/models/constructor-items/common.d.ts +4 -4
- package/build/esm/sub-blocks/Content/Content.js +3 -3
- package/build/esm/sub-blocks/HubspotForm/HubspotFormContainer.d.ts +2 -1
- package/build/esm/sub-blocks/HubspotForm/HubspotFormContainer.js +6 -3
- package/build/esm/sub-blocks/HubspotForm/index.d.ts +1 -1
- package/build/esm/sub-blocks/HubspotForm/index.js +7 -6
- package/build/esm/text-transform/config.d.ts +2 -2
- package/package.json +1 -1
- package/server/models/constructor-items/blocks.d.ts +8 -8
- package/server/models/constructor-items/common.d.ts +4 -4
- package/server/text-transform/config.d.ts +2 -2
- package/build/cjs/components/Anchor/__tests__/Anchor.test.d.ts +0 -1
- package/build/cjs/components/Anchor/__tests__/Anchor.test.js +0 -21
- package/build/cjs/components/AnimateBlock/__tests__/AnimateBlock.test.d.ts +0 -1
- package/build/cjs/components/AnimateBlock/__tests__/AnimateBlock.test.js +0 -36
- package/build/cjs/components/Author/__tests__/Author.test.d.ts +0 -1
- package/build/cjs/components/Author/__tests__/Author.test.js +0 -49
- package/build/cjs/components/BackLink/__tests__/BackLink.test.d.ts +0 -1
- package/build/cjs/components/BackLink/__tests__/BackLink.test.js +0 -63
- package/build/cjs/components/BlockBase/__tests__/BlockBase.test.d.ts +0 -1
- package/build/cjs/components/BlockBase/__tests__/BlockBase.test.js +0 -44
- package/build/cjs/components/BlockHeader/BlockHeader.css +0 -16
- package/build/cjs/components/BlockHeader/BlockHeader.d.ts +0 -7
- package/build/cjs/components/BlockHeader/BlockHeader.js +0 -22
- package/build/cjs/components/Button/__tests__/Button.test.d.ts +0 -1
- package/build/cjs/components/Button/__tests__/Button.test.js +0 -91
- package/build/cjs/components/ButtonTabs/__tests__/ButtonTabs.test.d.ts +0 -1
- package/build/cjs/components/ButtonTabs/__tests__/ButtonTabs.test.js +0 -58
- package/build/esm/components/Anchor/__tests__/Anchor.test.d.ts +0 -1
- package/build/esm/components/Anchor/__tests__/Anchor.test.js +0 -18
- package/build/esm/components/AnimateBlock/__tests__/AnimateBlock.test.d.ts +0 -1
- package/build/esm/components/AnimateBlock/__tests__/AnimateBlock.test.js +0 -33
- package/build/esm/components/Author/__tests__/Author.test.d.ts +0 -1
- package/build/esm/components/Author/__tests__/Author.test.js +0 -46
- package/build/esm/components/BackLink/__tests__/BackLink.test.d.ts +0 -1
- package/build/esm/components/BackLink/__tests__/BackLink.test.js +0 -60
- package/build/esm/components/BlockBase/__tests__/BlockBase.test.d.ts +0 -1
- package/build/esm/components/BlockBase/__tests__/BlockBase.test.js +0 -41
- package/build/esm/components/BlockHeader/BlockHeader.css +0 -16
- package/build/esm/components/BlockHeader/BlockHeader.d.ts +0 -8
- package/build/esm/components/BlockHeader/BlockHeader.js +0 -21
- package/build/esm/components/Button/__tests__/Button.test.d.ts +0 -1
- package/build/esm/components/Button/__tests__/Button.test.js +0 -88
- package/build/esm/components/ButtonTabs/__tests__/ButtonTabs.test.d.ts +0 -1
- package/build/esm/components/ButtonTabs/__tests__/ButtonTabs.test.js +0 -55
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.18.0](https://github.com/gravity-ui/page-constructor/compare/v2.18.0...v2.18.0) (2023-05-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **HubspotForm:** add ref forwarding for HS form ([#332](https://github.com/gravity-ui/page-constructor/issues/332)) ([37b75d3](https://github.com/gravity-ui/page-constructor/commit/37b75d31c09e8dc061d718828bcccc72b037e106))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* config gulpfile for tests ([a5cb59d](https://github.com/gravity-ui/page-constructor/commit/a5cb59d0bc1e3a8c09babed0c5ace9a2253416c3))
|
|
14
|
+
|
|
15
|
+
## [2.17.0](https://github.com/gravity-ui/page-constructor/compare/v2.16.0...v2.17.0) (2023-05-12)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* drop rules overriding ([#303](https://github.com/gravity-ui/page-constructor/issues/303)) ([0c13398](https://github.com/gravity-ui/page-constructor/commit/0c1339885ce3b930ab9428b585aa6dd020b0d298))
|
|
21
|
+
|
|
3
22
|
## [2.16.0](https://github.com/gravity-ui/page-constructor/compare/v2.15.0...v2.16.0) (2023-05-11)
|
|
4
23
|
|
|
5
24
|
|
|
@@ -19,7 +19,7 @@ const DEFAULT_SIZES = {
|
|
|
19
19
|
const ExtendedFeaturesBlock = ({ title, description, items, colSizes = DEFAULT_SIZES, animated, }) => {
|
|
20
20
|
const { themeValue: theme } = (0, react_1.useContext)(ThemeValueContext_1.ThemeValueContext);
|
|
21
21
|
return (react_1.default.createElement(components_1.AnimateBlock, { className: b(), animate: animated },
|
|
22
|
-
react_1.default.createElement(components_1.
|
|
22
|
+
react_1.default.createElement(components_1.Title, { title: title, description: description, className: b('header') }),
|
|
23
23
|
react_1.default.createElement("div", { className: b('items') },
|
|
24
24
|
react_1.default.createElement(grid_1.Row, null, items.map(({ title: itemTitle, text, link, links, label, icon, buttons, additionalInfo, }) => {
|
|
25
25
|
const itemLinks = links || [];
|
|
@@ -4,9 +4,9 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
5
|
const AnimateBlock_1 = tslib_1.__importDefault(require("../../components/AnimateBlock/AnimateBlock"));
|
|
6
6
|
const BalancedMasonry_1 = tslib_1.__importDefault(require("../../components/BalancedMasonry/BalancedMasonry"));
|
|
7
|
-
const BlockHeader_1 = tslib_1.__importDefault(require("../../components/BlockHeader/BlockHeader"));
|
|
8
7
|
const FullWidthBackground_1 = tslib_1.__importDefault(require("../../components/FullWidthBackground/FullWidthBackground"));
|
|
9
8
|
const Media_1 = tslib_1.__importDefault(require("../../components/Media/Media"));
|
|
9
|
+
const Title_1 = tslib_1.__importDefault(require("../../components/Title/Title"));
|
|
10
10
|
const YFMWrapper_1 = tslib_1.__importDefault(require("../../components/YFMWrapper/YFMWrapper"));
|
|
11
11
|
const constants_1 = require("../../constants");
|
|
12
12
|
const utils_1 = require("../../utils");
|
|
@@ -21,7 +21,7 @@ const PromoFeaturesBlock = (props) => {
|
|
|
21
21
|
const backgroundTheme = theme || 'default';
|
|
22
22
|
return (react_1.default.createElement(AnimateBlock_1.default, { className: b({ [backgroundTheme]: true }), animate: animated },
|
|
23
23
|
react_1.default.createElement(FullWidthBackground_1.default, { className: b('background', { [backgroundTheme]: true }) }),
|
|
24
|
-
react_1.default.createElement(
|
|
24
|
+
react_1.default.createElement(Title_1.default, { title: title, description: description, className: b('header') }),
|
|
25
25
|
react_1.default.createElement(BalancedMasonry_1.default, { breakpointCols: breakpointColumns, className: b('card-container'), columnClassName: b('card-container-column') }, items.map(({ title: cardTitle, text, media, theme: cardTheme }, index) => {
|
|
26
26
|
const blockModifier = backgroundTheme === 'default' ? 'default' : 'light';
|
|
27
27
|
const themeMod = cardTheme || blockModifier || '';
|
|
@@ -7,8 +7,8 @@ const lodash_1 = tslib_1.__importDefault(require("lodash"));
|
|
|
7
7
|
const react_slick_1 = tslib_1.__importDefault(require("react-slick"));
|
|
8
8
|
const Anchor_1 = tslib_1.__importDefault(require("../../components/Anchor/Anchor"));
|
|
9
9
|
const AnimateBlock_1 = tslib_1.__importDefault(require("../../components/AnimateBlock/AnimateBlock"));
|
|
10
|
-
const BlockHeader_1 = tslib_1.__importDefault(require("../../components/BlockHeader/BlockHeader"));
|
|
11
10
|
const OutsideClick_1 = tslib_1.__importDefault(require("../../components/OutsideClick/OutsideClick"));
|
|
11
|
+
const Title_1 = tslib_1.__importDefault(require("../../components/Title/Title"));
|
|
12
12
|
const constants_1 = require("../../constants");
|
|
13
13
|
const mobileContext_1 = require("../../context/mobileContext");
|
|
14
14
|
const ssrContext_1 = require("../../context/ssrContext");
|
|
@@ -185,7 +185,7 @@ const SliderBlock = (props) => {
|
|
|
185
185
|
type,
|
|
186
186
|
}, blockClassName) },
|
|
187
187
|
anchorId && react_1.default.createElement(Anchor_1.default, { id: anchorId }),
|
|
188
|
-
react_1.default.createElement(
|
|
188
|
+
react_1.default.createElement(Title_1.default, { title: title, description: description, className: b('header', { 'no-description': !description }) }),
|
|
189
189
|
react_1.default.createElement(AnimateBlock_1.default, { className: b('animate-slides'), animate: animated }, renderSlider()))));
|
|
190
190
|
};
|
|
191
191
|
exports.SliderBlock = SliderBlock;
|
|
@@ -4,11 +4,11 @@ exports.TabsBlock = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const AnimateBlock_1 = tslib_1.__importDefault(require("../../components/AnimateBlock/AnimateBlock"));
|
|
7
|
-
const BlockHeader_1 = tslib_1.__importDefault(require("../../components/BlockHeader/BlockHeader"));
|
|
8
7
|
const ButtonTabs_1 = tslib_1.__importDefault(require("../../components/ButtonTabs/ButtonTabs"));
|
|
9
8
|
const FullscreenImage_1 = tslib_1.__importDefault(require("../../components/FullscreenImage/FullscreenImage"));
|
|
10
9
|
const utils_1 = require("../../components/Media/Image/utils");
|
|
11
10
|
const Media_1 = tslib_1.__importDefault(require("../../components/Media/Media"));
|
|
11
|
+
const Title_1 = tslib_1.__importDefault(require("../../components/Title/Title"));
|
|
12
12
|
const VideoBlock_1 = require("../../components/VideoBlock/VideoBlock");
|
|
13
13
|
const ThemeValueContext_1 = require("../../context/theme/ThemeValueContext");
|
|
14
14
|
const grid_1 = require("../../grid");
|
|
@@ -54,7 +54,7 @@ const TabsBlock = ({ items, title, description, animated, tabsColSizes, centered
|
|
|
54
54
|
e.currentTarget.scrollIntoView({ inline: 'center', behavior: 'smooth', block: 'nearest' });
|
|
55
55
|
};
|
|
56
56
|
return (react_1.default.createElement(AnimateBlock_1.default, { className: b(), onScroll: () => setPlay(true), animate: animated },
|
|
57
|
-
react_1.default.createElement(
|
|
57
|
+
react_1.default.createElement(Title_1.default, { title: title, description: description, className: b('block-title', { centered: centered }) }),
|
|
58
58
|
react_1.default.createElement(grid_1.Row, null,
|
|
59
59
|
react_1.default.createElement(grid_1.Col, { sizes: tabsColSizes },
|
|
60
60
|
react_1.default.createElement(ButtonTabs_1.default, { items: tabs, onSelectTab: onSelectTab, activeTab: activeTab, className: b('tabs', { centered: centered }) }))),
|
|
@@ -2,7 +2,7 @@ import { ClassNameProps } from '../../models';
|
|
|
2
2
|
export declare const qaIdByDefault = "qa-anchor";
|
|
3
3
|
export interface AnchorProps extends ClassNameProps {
|
|
4
4
|
id: string;
|
|
5
|
-
|
|
5
|
+
qa?: string;
|
|
6
6
|
}
|
|
7
|
-
declare const Anchor: ({ id, className,
|
|
7
|
+
declare const Anchor: ({ id, className, qa }: AnchorProps) => JSX.Element;
|
|
8
8
|
export default Anchor;
|
|
@@ -7,5 +7,5 @@ const react_1 = tslib_1.__importDefault(require("react"));
|
|
|
7
7
|
const utils_1 = require("../../utils");
|
|
8
8
|
const b = (0, utils_1.block)('Anchor');
|
|
9
9
|
exports.qaIdByDefault = 'qa-anchor';
|
|
10
|
-
const Anchor = ({ id, className,
|
|
10
|
+
const Anchor = ({ id, className, qa }) => (react_1.default.createElement("div", { id: id, className: b(null, className), "data-qa": qa || exports.qaIdByDefault }));
|
|
11
11
|
exports.default = Anchor;
|
|
@@ -4,9 +4,9 @@ exports.MediaBase = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const AnimateBlock_1 = tslib_1.__importDefault(require("../../components/AnimateBlock/AnimateBlock"));
|
|
7
|
-
const BlockHeader_1 = tslib_1.__importDefault(require("../../components/BlockHeader/BlockHeader"));
|
|
8
7
|
const grid_1 = require("../../grid");
|
|
9
8
|
const utils_1 = require("../../utils");
|
|
9
|
+
const Title_1 = tslib_1.__importDefault(require("../Title/Title"));
|
|
10
10
|
const MediaBaseContent_1 = tslib_1.__importDefault(require("./MediaBaseContent"));
|
|
11
11
|
const b = (0, utils_1.block)('media-base');
|
|
12
12
|
const Card = () => null;
|
|
@@ -24,7 +24,7 @@ const MediaBase = (props) => {
|
|
|
24
24
|
const mediaContent = !mediaOnly && react_1.default.createElement(MediaBaseContent_1.default, Object.assign({}, mediaContentProps));
|
|
25
25
|
const card = children.type === Card ? children === null || children === void 0 ? void 0 : children.props.children : null;
|
|
26
26
|
return (react_1.default.createElement(AnimateBlock_1.default, { className: b(), onScroll: onScroll, animate: animated },
|
|
27
|
-
mediaOnly &&
|
|
27
|
+
mediaOnly && react_1.default.createElement(Title_1.default, { className: b('header'), title: title, description: description }),
|
|
28
28
|
react_1.default.createElement(grid_1.Grid, null,
|
|
29
29
|
react_1.default.createElement(grid_1.Row, { className: b('row', {
|
|
30
30
|
reverse: direction === 'media-content',
|
|
@@ -1,111 +1,16 @@
|
|
|
1
|
-
.pc-title-block_size_l, .pc-title-block_size_m, .pc-title-block_size_s, .pc-title-block_size_xs {
|
|
2
|
-
margin: 0;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
/* use this for style redefinitions to awoid problems with
|
|
6
2
|
unpredictable css rules order in build */
|
|
7
|
-
.pc-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
.pc-title-block_justify_end {
|
|
11
|
-
text-align: right;
|
|
3
|
+
.pc-title__description {
|
|
4
|
+
margin-top: 12px;
|
|
12
5
|
}
|
|
13
|
-
.pc-
|
|
6
|
+
.pc-title__description .yfm {
|
|
14
7
|
font-size: var(--yc-text-body-3-font-size);
|
|
15
8
|
line-height: var(--yc-text-body-3-line-height);
|
|
16
|
-
color: var(--pc-text-header-color);
|
|
17
|
-
font-weight: var(--yc-text-accent-font-weight);
|
|
18
|
-
}
|
|
19
|
-
.pc-title-block_size_s {
|
|
20
|
-
font-size: var(--yc-text-header-1-font-size);
|
|
21
|
-
line-height: var(--yc-text-header-1-line-height);
|
|
22
|
-
color: var(--pc-text-header-color);
|
|
23
|
-
font-weight: var(--yc-text-accent-font-weight);
|
|
24
|
-
margin-top: 32px;
|
|
25
|
-
}
|
|
26
|
-
.pc-title-block_size_m {
|
|
27
|
-
font-size: var(--yc-text-display-2-font-size);
|
|
28
|
-
line-height: var(--yc-text-display-2-line-height);
|
|
29
|
-
color: var(--pc-text-header-color);
|
|
30
|
-
font-weight: var(--yc-text-accent-font-weight);
|
|
31
|
-
margin-top: 48px;
|
|
32
|
-
}
|
|
33
|
-
@media (max-width: 576px) {
|
|
34
|
-
.pc-title-block_size_m {
|
|
35
|
-
font-size: var(--yc-text-display-1-font-size);
|
|
36
|
-
line-height: var(--yc-text-display-1-line-height);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
.pc-title-block_size_l {
|
|
40
|
-
font-size: var(--yc-text-display-4-font-size);
|
|
41
|
-
line-height: var(--yc-text-display-4-line-height);
|
|
42
|
-
color: var(--pc-text-header-color);
|
|
43
|
-
font-weight: var(--yc-text-accent-font-weight);
|
|
44
|
-
margin-top: 96px;
|
|
45
|
-
}
|
|
46
|
-
@media (max-width: 577px) {
|
|
47
|
-
.pc-title-block_size_l {
|
|
48
|
-
font-size: var(--yc-text-display-2-font-size);
|
|
49
|
-
line-height: var(--yc-text-display-2-line-height);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
.pc-title-block__arrow {
|
|
53
|
-
margin-top: 10px;
|
|
54
|
-
}
|
|
55
|
-
.pc-title-block__arrow_size_xs {
|
|
56
|
-
margin-top: 7px;
|
|
57
|
-
}
|
|
58
|
-
.pc-title-block__arrow_size_s {
|
|
59
|
-
margin-top: 5px;
|
|
60
|
-
}
|
|
61
|
-
.pc-title-block__link {
|
|
62
|
-
color: inherit;
|
|
63
|
-
text-decoration: none;
|
|
64
|
-
padding-right: 8px;
|
|
65
|
-
}
|
|
66
|
-
.pc-title-block__link:hover, .pc-title-block__link:active {
|
|
67
|
-
--pc-text-header-color: inherit;
|
|
68
|
-
color: inherit;
|
|
69
|
-
}
|
|
70
|
-
.pc-title-block__link:hover {
|
|
71
|
-
cursor: pointer;
|
|
72
|
-
}
|
|
73
|
-
.pc-title-block__link:hover .pc-title-block__arrow {
|
|
74
|
-
margin-left: 10px;
|
|
75
|
-
}
|
|
76
|
-
.pc-title-block__link:hover .pc-title-block__arrow_size_xs {
|
|
77
|
-
margin-left: 6px;
|
|
78
|
-
}
|
|
79
|
-
.pc-title-block__link:hover .pc-title-block__arrow_size_s {
|
|
80
|
-
margin-left: 8px;
|
|
81
|
-
}
|
|
82
|
-
.pc-title-block__text {
|
|
83
|
-
white-space: normal;
|
|
84
|
-
}
|
|
85
|
-
.pc-title-block__text a {
|
|
86
|
-
outline: none;
|
|
87
|
-
color: var(--yc-color-text-link);
|
|
88
|
-
text-decoration: none;
|
|
89
|
-
cursor: pointer;
|
|
90
|
-
}
|
|
91
|
-
.utilityfocus .pc-title-block__text a:focus {
|
|
92
|
-
outline: 2px solid #ffdb4d;
|
|
93
|
-
}
|
|
94
|
-
.pc-title-block__text a:hover, .pc-title-block__text a:active {
|
|
95
|
-
--pc-text-header-color: var(--yc-color-text-link-hover);
|
|
96
|
-
color: var(--yc-color-text-link-hover);
|
|
97
|
-
}
|
|
98
|
-
.pc-title-block__wrapper {
|
|
99
|
-
white-space: nowrap;
|
|
100
9
|
}
|
|
101
|
-
.pc-
|
|
102
|
-
margin-top:
|
|
10
|
+
.pc-title__description_titleSize_s, .pc-title__description_titleSize_xs {
|
|
11
|
+
margin-top: 8px;
|
|
103
12
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
.pc-title-block__arrow_size_m, .pc-title-block__arrow_size_l {
|
|
109
|
-
margin-top: 9px;
|
|
110
|
-
}
|
|
13
|
+
.pc-title__description_titleSize_s .yfm, .pc-title__description_titleSize_xs .yfm {
|
|
14
|
+
font-size: var(--yc-text-body-2-font-size);
|
|
15
|
+
line-height: var(--yc-text-body-2-line-height);
|
|
111
16
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface
|
|
4
|
-
|
|
5
|
-
onClick?: () => void;
|
|
6
|
-
dataQa?: string;
|
|
7
|
-
resetMargin?: boolean;
|
|
1
|
+
import { GridColumnSizesType } from '../../grid';
|
|
2
|
+
import { ClassNameProps, TitleProps as TitleParams } from '../../models';
|
|
3
|
+
export interface TitleProps extends TitleParams {
|
|
4
|
+
colSizes?: GridColumnSizesType;
|
|
8
5
|
}
|
|
9
|
-
declare const Title: (
|
|
6
|
+
declare const Title: ({ title, description, className, colSizes, }: TitleProps & ClassNameProps) => JSX.Element | null;
|
|
10
7
|
export default Title;
|
|
@@ -1,57 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getArrowSize = void 0;
|
|
4
3
|
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.
|
|
6
|
-
const
|
|
7
|
-
const locationContext_1 = require("../../context/locationContext");
|
|
8
|
-
const mobileContext_1 = require("../../context/mobileContext");
|
|
4
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
|
+
const grid_1 = require("../../grid");
|
|
9
6
|
const utils_1 = require("../../utils");
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
case 's':
|
|
17
|
-
return 16;
|
|
18
|
-
case 'm':
|
|
19
|
-
return isMobile ? 22 : 24;
|
|
20
|
-
case 'l':
|
|
21
|
-
return isMobile ? 26 : 38;
|
|
22
|
-
default:
|
|
23
|
-
return 20;
|
|
7
|
+
const YFMWrapper_1 = tslib_1.__importDefault(require("../YFMWrapper/YFMWrapper"));
|
|
8
|
+
const TitleItem_1 = tslib_1.__importDefault(require("./TitleItem"));
|
|
9
|
+
const b = (0, utils_1.block)('title');
|
|
10
|
+
const Title = ({ title, description, className, colSizes = { all: 12, sm: 8 }, }) => {
|
|
11
|
+
if (!title && !description) {
|
|
12
|
+
return null;
|
|
24
13
|
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
react_1.default.createElement(__1.HTML, { className: b('text') }, text),
|
|
33
|
-
custom && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
34
|
-
"\u00A0",
|
|
35
|
-
react_1.default.createElement("span", { className: b('custom') }, custom)))));
|
|
36
|
-
let content;
|
|
37
|
-
const insideClickableContent = (react_1.default.createElement("span", { className: b('wrapper') },
|
|
38
|
-
textMarkup,
|
|
39
|
-
"\u00A0",
|
|
40
|
-
react_1.default.createElement(__1.ToggleArrow, { className: b('arrow', { size: textSize }), size: getArrowSize(textSize, isMobile), type: 'horizontal', iconType: "navigation", open: false })));
|
|
41
|
-
if (!url && !onClick) {
|
|
42
|
-
content = textMarkup;
|
|
43
|
-
}
|
|
44
|
-
else if (url) {
|
|
45
|
-
content = (react_1.default.createElement("a", Object.assign({ className: b('link'), href: url }, (0, utils_1.getLinkProps)(url, hostname), { onClick: onClick }), insideClickableContent));
|
|
46
|
-
}
|
|
47
|
-
else if (onClick) {
|
|
48
|
-
content = (react_1.default.createElement("span", { className: b('link'), onClick: onClick }, insideClickableContent));
|
|
49
|
-
}
|
|
50
|
-
return (react_1.default.createElement(react_1.Fragment, null,
|
|
51
|
-
anchor && react_1.default.createElement(Anchor_1.default, { id: anchor, className: b('anchor') }),
|
|
52
|
-
react_1.default.createElement((0, utils_1.getHeaderTag)(textSize), {
|
|
53
|
-
className: b({ size: textSize, justify, 'reset-margin': resetMargin }, className),
|
|
54
|
-
'data-qa': `${dataQa}-header`,
|
|
55
|
-
}, content)));
|
|
14
|
+
const _a = !title || typeof title === 'string' ? { text: title } : title, { text } = _a, titleProps = tslib_1.__rest(_a, ["text"]);
|
|
15
|
+
return (react_1.default.createElement("div", { className: b(null, className) },
|
|
16
|
+
text && (react_1.default.createElement(grid_1.Col, { reset: true, sizes: colSizes },
|
|
17
|
+
react_1.default.createElement(TitleItem_1.default, Object.assign({ text: text }, titleProps)))),
|
|
18
|
+
description && (react_1.default.createElement(grid_1.Col, { reset: true, sizes: colSizes },
|
|
19
|
+
react_1.default.createElement("div", { className: b('description', { titleSize: titleProps === null || titleProps === void 0 ? void 0 : titleProps.textSize }) },
|
|
20
|
+
react_1.default.createElement(YFMWrapper_1.default, { content: description, modifiers: { constructor: true } }))))));
|
|
56
21
|
};
|
|
57
22
|
exports.default = Title;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
.pc-title-item_size_l, .pc-title-item_size_m, .pc-title-item_size_s, .pc-title-item_size_xs {
|
|
2
|
+
margin: 0;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
/* use this for style redefinitions to awoid problems with
|
|
6
|
+
unpredictable css rules order in build */
|
|
7
|
+
.pc-title-item_justify_center {
|
|
8
|
+
text-align: center;
|
|
9
|
+
}
|
|
10
|
+
.pc-title-item_justify_end {
|
|
11
|
+
text-align: right;
|
|
12
|
+
}
|
|
13
|
+
.pc-title-item_size_xs {
|
|
14
|
+
font-size: var(--yc-text-body-3-font-size);
|
|
15
|
+
line-height: var(--yc-text-body-3-line-height);
|
|
16
|
+
color: var(--pc-text-header-color);
|
|
17
|
+
font-weight: var(--yc-text-accent-font-weight);
|
|
18
|
+
}
|
|
19
|
+
.pc-title-item_size_s {
|
|
20
|
+
font-size: var(--yc-text-header-1-font-size);
|
|
21
|
+
line-height: var(--yc-text-header-1-line-height);
|
|
22
|
+
color: var(--pc-text-header-color);
|
|
23
|
+
font-weight: var(--yc-text-accent-font-weight);
|
|
24
|
+
margin-top: 32px;
|
|
25
|
+
}
|
|
26
|
+
.pc-title-item_size_m {
|
|
27
|
+
font-size: var(--yc-text-display-2-font-size);
|
|
28
|
+
line-height: var(--yc-text-display-2-line-height);
|
|
29
|
+
color: var(--pc-text-header-color);
|
|
30
|
+
font-weight: var(--yc-text-accent-font-weight);
|
|
31
|
+
margin-top: 48px;
|
|
32
|
+
}
|
|
33
|
+
@media (max-width: 576px) {
|
|
34
|
+
.pc-title-item_size_m {
|
|
35
|
+
font-size: var(--yc-text-display-1-font-size);
|
|
36
|
+
line-height: var(--yc-text-display-1-line-height);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
.pc-title-item_size_l {
|
|
40
|
+
font-size: var(--yc-text-display-4-font-size);
|
|
41
|
+
line-height: var(--yc-text-display-4-line-height);
|
|
42
|
+
color: var(--pc-text-header-color);
|
|
43
|
+
font-weight: var(--yc-text-accent-font-weight);
|
|
44
|
+
margin-top: 96px;
|
|
45
|
+
}
|
|
46
|
+
@media (max-width: 577px) {
|
|
47
|
+
.pc-title-item_size_l {
|
|
48
|
+
font-size: var(--yc-text-display-2-font-size);
|
|
49
|
+
line-height: var(--yc-text-display-2-line-height);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
.pc-title-item__arrow {
|
|
53
|
+
margin-top: 10px;
|
|
54
|
+
}
|
|
55
|
+
.pc-title-item__arrow_size_xs {
|
|
56
|
+
margin-top: 7px;
|
|
57
|
+
}
|
|
58
|
+
.pc-title-item__arrow_size_s {
|
|
59
|
+
margin-top: 5px;
|
|
60
|
+
}
|
|
61
|
+
.pc-title-item__link {
|
|
62
|
+
color: inherit;
|
|
63
|
+
text-decoration: none;
|
|
64
|
+
padding-right: 8px;
|
|
65
|
+
}
|
|
66
|
+
.pc-title-item__link:hover, .pc-title-item__link:active {
|
|
67
|
+
--pc-text-header-color: inherit;
|
|
68
|
+
color: inherit;
|
|
69
|
+
}
|
|
70
|
+
.pc-title-item__link:hover {
|
|
71
|
+
cursor: pointer;
|
|
72
|
+
}
|
|
73
|
+
.pc-title-item__link:hover .pc-title-item__arrow {
|
|
74
|
+
margin-left: 10px;
|
|
75
|
+
}
|
|
76
|
+
.pc-title-item__link:hover .pc-title-item__arrow_size_xs {
|
|
77
|
+
margin-left: 6px;
|
|
78
|
+
}
|
|
79
|
+
.pc-title-item__link:hover .pc-title-item__arrow_size_s {
|
|
80
|
+
margin-left: 8px;
|
|
81
|
+
}
|
|
82
|
+
.pc-title-item__text {
|
|
83
|
+
white-space: normal;
|
|
84
|
+
}
|
|
85
|
+
.pc-title-item__text a {
|
|
86
|
+
outline: none;
|
|
87
|
+
color: var(--yc-color-text-link);
|
|
88
|
+
text-decoration: none;
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
}
|
|
91
|
+
.utilityfocus .pc-title-item__text a:focus {
|
|
92
|
+
outline: 2px solid #ffdb4d;
|
|
93
|
+
}
|
|
94
|
+
.pc-title-item__text a:hover, .pc-title-item__text a:active {
|
|
95
|
+
--pc-text-header-color: var(--yc-color-text-link-hover);
|
|
96
|
+
color: var(--yc-color-text-link-hover);
|
|
97
|
+
}
|
|
98
|
+
.pc-title-item__wrapper {
|
|
99
|
+
white-space: nowrap;
|
|
100
|
+
}
|
|
101
|
+
.pc-title-item_reset-margin {
|
|
102
|
+
margin-top: 0;
|
|
103
|
+
}
|
|
104
|
+
@media (max-width: 577px) {
|
|
105
|
+
.pc-title-item_size_l:not(.pc-title-item_reset-margin) {
|
|
106
|
+
margin-top: 48px;
|
|
107
|
+
}
|
|
108
|
+
.pc-title-item__arrow_size_m, .pc-title-item__arrow_size_l {
|
|
109
|
+
margin-top: 9px;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TextSize, TitleItemProps } from '../../models';
|
|
2
|
+
export declare function getArrowSize(size: TextSize, isMobile: boolean): 16 | 24 | 13 | 22 | 26 | 38 | 20;
|
|
3
|
+
export interface TitleItemFullProps extends TitleItemProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
dataQa?: string;
|
|
7
|
+
resetMargin?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const Title: (props: TitleItemFullProps) => JSX.Element;
|
|
10
|
+
export default Title;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getArrowSize = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
+
const __1 = require("../");
|
|
7
|
+
const locationContext_1 = require("../../context/locationContext");
|
|
8
|
+
const mobileContext_1 = require("../../context/mobileContext");
|
|
9
|
+
const utils_1 = require("../../utils");
|
|
10
|
+
const Anchor_1 = tslib_1.__importDefault(require("../Anchor/Anchor"));
|
|
11
|
+
const b = (0, utils_1.block)('title-item');
|
|
12
|
+
function getArrowSize(size, isMobile) {
|
|
13
|
+
switch (size) {
|
|
14
|
+
case 'xs':
|
|
15
|
+
return 13;
|
|
16
|
+
case 's':
|
|
17
|
+
return 16;
|
|
18
|
+
case 'm':
|
|
19
|
+
return isMobile ? 22 : 24;
|
|
20
|
+
case 'l':
|
|
21
|
+
return isMobile ? 26 : 38;
|
|
22
|
+
default:
|
|
23
|
+
return 20;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.getArrowSize = getArrowSize;
|
|
27
|
+
const Title = (props) => {
|
|
28
|
+
const isMobile = (0, react_1.useContext)(mobileContext_1.MobileContext);
|
|
29
|
+
const { textSize = 'm', text, anchor, justify, url, onClick, custom, className, dataQa, resetMargin = true, } = props;
|
|
30
|
+
const { hostname } = (0, react_1.useContext)(locationContext_1.LocationContext);
|
|
31
|
+
const textMarkup = (react_1.default.createElement(react_1.default.Fragment, null,
|
|
32
|
+
react_1.default.createElement(__1.HTML, { className: b('text') }, text),
|
|
33
|
+
custom && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
34
|
+
"\u00A0",
|
|
35
|
+
react_1.default.createElement("span", { className: b('custom') }, custom)))));
|
|
36
|
+
let content;
|
|
37
|
+
const insideClickableContent = (react_1.default.createElement("span", { className: b('wrapper') },
|
|
38
|
+
textMarkup,
|
|
39
|
+
"\u00A0",
|
|
40
|
+
react_1.default.createElement(__1.ToggleArrow, { className: b('arrow', { size: textSize }), size: getArrowSize(textSize, isMobile), type: 'horizontal', iconType: "navigation", open: false })));
|
|
41
|
+
if (!url && !onClick) {
|
|
42
|
+
content = textMarkup;
|
|
43
|
+
}
|
|
44
|
+
else if (url) {
|
|
45
|
+
content = (react_1.default.createElement("a", Object.assign({ className: b('link'), href: url }, (0, utils_1.getLinkProps)(url, hostname), { onClick: onClick }), insideClickableContent));
|
|
46
|
+
}
|
|
47
|
+
else if (onClick) {
|
|
48
|
+
content = (react_1.default.createElement("span", { className: b('link'), onClick: onClick }, insideClickableContent));
|
|
49
|
+
}
|
|
50
|
+
return (react_1.default.createElement(react_1.Fragment, null,
|
|
51
|
+
anchor && react_1.default.createElement(Anchor_1.default, { id: anchor, className: b('anchor') }),
|
|
52
|
+
react_1.default.createElement((0, utils_1.getHeaderTag)(textSize), {
|
|
53
|
+
className: b({ size: textSize, justify, 'reset-margin': resetMargin }, className),
|
|
54
|
+
'data-qa': `${dataQa}-header`,
|
|
55
|
+
}, content)));
|
|
56
|
+
};
|
|
57
|
+
exports.default = Title;
|
|
@@ -5,7 +5,7 @@ export { default as BackgroundMedia } from './BackgroundMedia/BackgroundMedia';
|
|
|
5
5
|
export { default as BackLink } from './BackLink/BackLink';
|
|
6
6
|
export { default as BalancedMasonry } from './BalancedMasonry/BalancedMasonry';
|
|
7
7
|
export { default as BlockBase } from './BlockBase/BlockBase';
|
|
8
|
-
export { default as BlockHeader } from './
|
|
8
|
+
export { default as BlockHeader } from './Title/Title';
|
|
9
9
|
export { default as Button } from './Button/Button';
|
|
10
10
|
export { default as CardBase } from './CardBase/CardBase';
|
|
11
11
|
export { default as ErrorWrapper } from './ErrorWrapper/ErrorWrapper';
|
|
@@ -18,8 +18,8 @@ var BalancedMasonry_1 = require("./BalancedMasonry/BalancedMasonry");
|
|
|
18
18
|
Object.defineProperty(exports, "BalancedMasonry", { enumerable: true, get: function () { return __importDefault(BalancedMasonry_1).default; } });
|
|
19
19
|
var BlockBase_1 = require("./BlockBase/BlockBase");
|
|
20
20
|
Object.defineProperty(exports, "BlockBase", { enumerable: true, get: function () { return __importDefault(BlockBase_1).default; } });
|
|
21
|
-
var
|
|
22
|
-
Object.defineProperty(exports, "BlockHeader", { enumerable: true, get: function () { return __importDefault(
|
|
21
|
+
var Title_1 = require("./Title/Title");
|
|
22
|
+
Object.defineProperty(exports, "BlockHeader", { enumerable: true, get: function () { return __importDefault(Title_1).default; } });
|
|
23
23
|
var Button_1 = require("./Button/Button");
|
|
24
24
|
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return __importDefault(Button_1).default; } });
|
|
25
25
|
var CardBase_1 = require("./CardBase/CardBase");
|
|
@@ -52,8 +52,8 @@ var ReactPlayer_1 = require("./ReactPlayer/ReactPlayer");
|
|
|
52
52
|
Object.defineProperty(exports, "ReactPlayer", { enumerable: true, get: function () { return __importDefault(ReactPlayer_1).default; } });
|
|
53
53
|
var Table_1 = require("./Table/Table");
|
|
54
54
|
Object.defineProperty(exports, "Table", { enumerable: true, get: function () { return __importDefault(Table_1).default; } });
|
|
55
|
-
var
|
|
56
|
-
Object.defineProperty(exports, "Title", { enumerable: true, get: function () { return __importDefault(
|
|
55
|
+
var Title_2 = require("./Title/Title");
|
|
56
|
+
Object.defineProperty(exports, "Title", { enumerable: true, get: function () { return __importDefault(Title_2).default; } });
|
|
57
57
|
var ToggleArrow_1 = require("./ToggleArrow/ToggleArrow");
|
|
58
58
|
Object.defineProperty(exports, "ToggleArrow", { enumerable: true, get: function () { return __importDefault(ToggleArrow_1).default; } });
|
|
59
59
|
var UnpublishedLabel_1 = require("./UnpublishedLabel/UnpublishedLabel");
|
|
@@ -7,4 +7,4 @@ export interface GridColumnProps extends GridColumnClassParams, Refable<HTMLDivE
|
|
|
7
7
|
dataQa?: string;
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
}
|
|
10
|
-
export declare const Col: React.ForwardRefExoticComponent<Pick<WithChildren<GridColumnProps>, "style" | "children" | "className" | "
|
|
10
|
+
export declare const Col: React.ForwardRefExoticComponent<Pick<WithChildren<GridColumnProps>, "style" | "children" | "className" | "reset" | "sizes" | "offsets" | "orders" | "hidden" | "visible" | "alignSelf" | "justifyContent" | "dataQa"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -10,22 +10,17 @@ declare module '*.svg' {
|
|
|
10
10
|
export default path;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
portalId: string;
|
|
15
|
-
formId: string;
|
|
16
|
-
region?: string;
|
|
17
|
-
target?: string;
|
|
18
|
-
cssClass?: string;
|
|
19
|
-
formInstanceId?: string;
|
|
20
|
-
}
|
|
13
|
+
declare module '*.md';
|
|
21
14
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
declare namespace Hbspt {
|
|
16
|
+
interface CreateFormProps {
|
|
17
|
+
portalId: string;
|
|
18
|
+
formId: string;
|
|
19
|
+
region?: string;
|
|
20
|
+
target?: string;
|
|
21
|
+
cssClass?: string;
|
|
22
|
+
formInstanceId?: string;
|
|
23
|
+
}
|
|
29
24
|
}
|
|
30
25
|
|
|
31
26
|
declare namespace Ymaps {
|
|
@@ -63,4 +58,11 @@ declare namespace Ymaps {
|
|
|
63
58
|
}
|
|
64
59
|
}
|
|
65
60
|
|
|
66
|
-
|
|
61
|
+
interface Window {
|
|
62
|
+
hbspt?: {
|
|
63
|
+
forms: {
|
|
64
|
+
create: (args: Hbspt.CreateFormProps) => unknown;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
ymaps: Ymaps;
|
|
68
|
+
}
|