@cloud-ru/uikit-product-site-section 0.23.12 → 0.25.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 +31 -0
- package/README.md +3 -0
- package/dist/cjs/components/SectionBenefitsBanner/SectionBenefitsBanner.d.ts +4 -1
- package/dist/cjs/components/SectionBenefitsBanner/SectionBenefitsBanner.js +2 -2
- package/dist/cjs/components/SectionMedia/SectionMedia.d.ts +2 -2
- package/dist/cjs/components/SectionMedia/SectionMedia.js +2 -2
- package/dist/cjs/components/SectionTable/SectionTable.d.ts +4 -1
- package/dist/cjs/components/SectionTable/SectionTable.js +2 -2
- package/dist/esm/components/SectionBenefitsBanner/SectionBenefitsBanner.d.ts +4 -1
- package/dist/esm/components/SectionBenefitsBanner/SectionBenefitsBanner.js +2 -2
- package/dist/esm/components/SectionMedia/SectionMedia.d.ts +2 -2
- package/dist/esm/components/SectionMedia/SectionMedia.js +2 -2
- package/dist/esm/components/SectionTable/SectionTable.d.ts +4 -1
- package/dist/esm/components/SectionTable/SectionTable.js +2 -2
- package/package.json +3 -3
- package/src/components/SectionBenefitsBanner/SectionBenefitsBanner.tsx +10 -2
- package/src/components/SectionMedia/SectionMedia.tsx +5 -1
- package/src/components/SectionTable/SectionTable.tsx +14 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,37 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 0.25.0 (2025-12-05)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **SITE-10379:** add background prop ([e05b4fc](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/e05b4fca73fe0c2d8b1285edc7f7bbe82b7586ac))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# 0.24.0 (2025-12-05)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **SITE-10379:** add props backgroundColor ([dfd03f1](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/dfd03f116c8f5037010c5c30427cbcdf383aa9ee))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## 0.23.13 (2025-12-04)
|
|
29
|
+
|
|
30
|
+
### Only dependencies have been changed
|
|
31
|
+
* [@cloud-ru/uikit-product-site-layout@0.4.0](https://gitverse.ru/cloud-ru-tech/uikit-product/-/blob/master/packages/site-layout/CHANGELOG.md)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
6
37
|
## 0.23.12 (2025-12-03)
|
|
7
38
|
|
|
8
39
|
|
package/README.md
CHANGED
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
| titleTag | enum Tag: `"span"`, `"h1"`, `"h2"`, `"h3"`, `"h4"`, `"h5"`, `"h6"`, `"div"`, `"label"`, `"p"` | h3 | Тэг заголовка |
|
|
70
70
|
| description | `string \| string[]` | - | Описание под баннером |
|
|
71
71
|
| className | `string` | - | CSS класс |
|
|
72
|
+
| backgroundSectionColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"` | - | Фон подложки |
|
|
72
73
|
| appearance | "decor" \| "brand" \| "graphite" | brand | |
|
|
73
74
|
| color | enum ColorType: `"neutral"`, `"white"`, `"violet"`, `"blue"` | - | |
|
|
74
75
|
| backgroundType | "color" \| "image" | color | |
|
|
@@ -250,6 +251,7 @@
|
|
|
250
251
|
| description | `string` | - | Описание секции |
|
|
251
252
|
| titleTag | enum SectionTag: `"h2"`, `"h3"`, `"h4"` | - | Тег заголовка |
|
|
252
253
|
| id | `string` | - | id секции |
|
|
254
|
+
| backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"` | - | Цвет фона |
|
|
253
255
|
| video | `ReactNode \| VideoPlayerProps` | - | |
|
|
254
256
|
| onPlay | `() => void` | - | |
|
|
255
257
|
| onError | `ReactEventHandler<HTMLVideoElement>` | - | |
|
|
@@ -304,6 +306,7 @@
|
|
|
304
306
|
| title | `string` | - | Заголовок |
|
|
305
307
|
| subtitle | `string` | - | Подзаголовок |
|
|
306
308
|
| description | `string` | - | Описание |
|
|
309
|
+
| backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"` | - | Фон подложки |
|
|
307
310
|
| withHeader | `boolean` | - | |
|
|
308
311
|
## SectionCarousel
|
|
309
312
|
### Props
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { WithLayoutType, WithSupportProps } from '@cloud-ru/uikit-product-utils';
|
|
2
2
|
import { TypographyProps } from '@snack-uikit/typography';
|
|
3
3
|
import { BenefitItemProps } from '../../helperComponents';
|
|
4
|
+
import { SectionBasicProps } from '../SectionBasic';
|
|
4
5
|
import { BackgroundType } from './types';
|
|
5
6
|
type ItemProps = Omit<BenefitItemProps, 'layoutType'>;
|
|
6
7
|
export type SectionBenefitsBannerProps = WithSupportProps<WithLayoutType<{
|
|
@@ -14,6 +15,8 @@ export type SectionBenefitsBannerProps = WithSupportProps<WithLayoutType<{
|
|
|
14
15
|
description?: string[] | string;
|
|
15
16
|
/** CSS класс */
|
|
16
17
|
className?: string;
|
|
18
|
+
/** Фон подложки */
|
|
19
|
+
backgroundSectionColor?: SectionBasicProps['backgroundColor'];
|
|
17
20
|
} & BackgroundType>>;
|
|
18
|
-
export declare function SectionBenefitsBanner({ title, titleTag, items, layoutType, backgroundType, appearance, color, backgroundImage, description, className, ...rest }: SectionBenefitsBannerProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function SectionBenefitsBanner({ title, titleTag, items, layoutType, backgroundType, appearance, color, backgroundImage, backgroundSectionColor, description, className, ...rest }: SectionBenefitsBannerProps): import("react/jsx-runtime").JSX.Element;
|
|
19
22
|
export {};
|
|
@@ -24,8 +24,8 @@ const SectionBasic_1 = require("../SectionBasic");
|
|
|
24
24
|
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
25
25
|
const utils_1 = require("./utils");
|
|
26
26
|
function SectionBenefitsBanner(_a) {
|
|
27
|
-
var { title, titleTag = 'h3', items, layoutType, backgroundType = 'color', appearance = 'brand', color, backgroundImage, description, className } = _a, rest = __rest(_a, ["title", "titleTag", "items", "layoutType", "backgroundType", "appearance", "color", "backgroundImage", "description", "className"]);
|
|
28
|
-
return ((0, jsx_runtime_1.jsx)(SectionBasic_1.SectionBasic, Object.assign({ layoutType: layoutType, className: className }, rest, { children: (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.bannerWrapper, "data-layout-type": layoutType, children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.banner, {
|
|
27
|
+
var { title, titleTag = 'h3', items, layoutType, backgroundType = 'color', appearance = 'brand', color, backgroundImage, backgroundSectionColor, description, className } = _a, rest = __rest(_a, ["title", "titleTag", "items", "layoutType", "backgroundType", "appearance", "color", "backgroundImage", "backgroundSectionColor", "description", "className"]);
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(SectionBasic_1.SectionBasic, Object.assign({ layoutType: layoutType, className: className, backgroundColor: backgroundSectionColor !== null && backgroundSectionColor !== void 0 ? backgroundSectionColor : 'neutral-background' }, rest, { children: (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.bannerWrapper, "data-layout-type": layoutType, children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.banner, {
|
|
29
29
|
[styles_module_scss_1.default.white]: backgroundType && backgroundType === 'image',
|
|
30
30
|
}), "data-layout-type": layoutType, "data-appearance": appearance, "data-color": color, children: [backgroundImage && ((0, jsx_runtime_1.jsx)("img", { className: styles_module_scss_1.default.illustration, src: backgroundImage, alt: 'benefits-illustration', "data-layout-type": layoutType })), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.contentWrapper, children: [title && ((0, jsx_runtime_1.jsx)(typography_1.Typography, Object.assign({ family: 'light', tag: titleTag }, (0, utils_1.getTitleTypographyProps)(layoutType), { children: (0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { richText: title }) }))), (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.benefitItems, "data-items-amount": items.length, "data-layout-type": layoutType, children: items.map(item => ((0, jsx_runtime_1.jsx)(helperComponents_1.BenefitItem, Object.assign({}, item, { layoutType: layoutType }), item.description))) })] })] }), description && ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.description, "data-attribute": 'no_search_index', children: (0, jsx_runtime_1.jsx)(typography_1.Typography, { family: 'sans', purpose: 'body', size: 'm', tag: 'div', children: Array.isArray(description) ? (description.map(item => (0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { richText: item }, item))) : ((0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { richText: description })) }) }))] }) })));
|
|
31
31
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WithLayoutType, WithSupportProps } from '@cloud-ru/uikit-product-utils';
|
|
2
2
|
import { MediaContentProps } from '../../types';
|
|
3
3
|
import { SectionBasicProps } from '../SectionBasic';
|
|
4
|
-
export type SectionMediaProps = WithLayoutType<WithSupportProps<Pick<SectionBasicProps, 'id' | 'title' | 'titleTag' | 'description'> & MediaContentProps>>;
|
|
5
|
-
export declare function SectionMedia({ id, title, titleTag, layoutType, description, video, onPlay, onError, image, 'data-test-id': dataTestId, ...rest }: SectionMediaProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export type SectionMediaProps = WithLayoutType<WithSupportProps<Pick<SectionBasicProps, 'id' | 'title' | 'titleTag' | 'description' | 'backgroundColor'> & MediaContentProps>>;
|
|
5
|
+
export declare function SectionMedia({ id, title, titleTag, layoutType, description, video, onPlay, onError, image, backgroundColor, 'data-test-id': dataTestId, ...rest }: SectionMediaProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -21,6 +21,6 @@ const uikit_product_utils_1 = require("@cloud-ru/uikit-product-utils");
|
|
|
21
21
|
const SectionBasic_1 = require("../SectionBasic");
|
|
22
22
|
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
23
23
|
function SectionMedia(_a) {
|
|
24
|
-
var { id, title, titleTag, layoutType, description, video, onPlay, onError, image, 'data-test-id': dataTestId = 'section-media' } = _a, rest = __rest(_a, ["id", "title", "titleTag", "layoutType", "description", "video", "onPlay", "onError", "image", 'data-test-id']);
|
|
25
|
-
return ((0, jsx_runtime_1.jsx)(SectionBasic_1.SectionBasic, Object.assign({ id: id, layoutType: layoutType, title: title, titleTag: titleTag, description: description, "data-test-id": dataTestId }, (0, uikit_product_utils_1.extractSupportProps)(rest), { children: (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.content, children: [image && ((0, jsx_runtime_1.jsx)("img", { className: styles_module_scss_1.default.image, src: image.src, alt: (image === null || image === void 0 ? void 0 : image.alt) || title, "data-test-id": `${dataTestId}__image` })), video && ((0, jsx_runtime_1.jsx)(uikit_product_site_media_1.SiteVideo, { video: video, onPlay: onPlay, onError: onError, layoutType: layoutType, "data-test-id": `${dataTestId}__video` }))] }) })));
|
|
24
|
+
var { id, title, titleTag, layoutType, description, video, onPlay, onError, image, backgroundColor, 'data-test-id': dataTestId = 'section-media' } = _a, rest = __rest(_a, ["id", "title", "titleTag", "layoutType", "description", "video", "onPlay", "onError", "image", "backgroundColor", 'data-test-id']);
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)(SectionBasic_1.SectionBasic, Object.assign({ id: id, layoutType: layoutType, title: title, titleTag: titleTag, description: description, "data-test-id": dataTestId, backgroundColor: backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : 'neutral-background' }, (0, uikit_product_utils_1.extractSupportProps)(rest), { children: (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.content, children: [image && ((0, jsx_runtime_1.jsx)("img", { className: styles_module_scss_1.default.image, src: image.src, alt: (image === null || image === void 0 ? void 0 : image.alt) || title, "data-test-id": `${dataTestId}__image` })), video && ((0, jsx_runtime_1.jsx)(uikit_product_site_media_1.SiteVideo, { video: video, onPlay: onPlay, onError: onError, layoutType: layoutType, "data-test-id": `${dataTestId}__video` }))] }) })));
|
|
26
26
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TableProps } from '@cloud-ru/uikit-product-site-table';
|
|
2
2
|
import { WithLayoutType, WithSupportProps } from '@cloud-ru/uikit-product-utils';
|
|
3
|
+
import { SectionBasicProps } from '../SectionBasic';
|
|
3
4
|
export type SectionTableProps = WithSupportProps<WithLayoutType<{
|
|
4
5
|
/** id секции */
|
|
5
6
|
id?: string;
|
|
@@ -11,5 +12,7 @@ export type SectionTableProps = WithSupportProps<WithLayoutType<{
|
|
|
11
12
|
subtitle?: string;
|
|
12
13
|
/** Описание */
|
|
13
14
|
description?: string;
|
|
15
|
+
/** Фон подложки */
|
|
16
|
+
backgroundColor?: SectionBasicProps['backgroundColor'];
|
|
14
17
|
} & TableProps>>;
|
|
15
|
-
export declare function SectionTable({ id, layoutType, className, title, subtitle, description, ...rest }: SectionTableProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function SectionTable({ id, layoutType, className, title, subtitle, description, backgroundColor, ...rest }: SectionTableProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -23,6 +23,6 @@ const uikit_product_utils_1 = require("@cloud-ru/uikit-product-utils");
|
|
|
23
23
|
const SectionBasic_1 = require("../SectionBasic");
|
|
24
24
|
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
25
25
|
function SectionTable(_a) {
|
|
26
|
-
var { id, layoutType, className, title, subtitle, description } = _a, rest = __rest(_a, ["id", "layoutType", "className", "title", "subtitle", "description"]);
|
|
27
|
-
return ((0, jsx_runtime_1.jsxs)(SectionBasic_1.SectionBasic, Object.assign({ id: id, title: title, backgroundColor: 'neutral-
|
|
26
|
+
var { id, layoutType, className, title, subtitle, description, backgroundColor } = _a, rest = __rest(_a, ["id", "layoutType", "className", "title", "subtitle", "description", "backgroundColor"]);
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)(SectionBasic_1.SectionBasic, Object.assign({ id: id, title: title, backgroundColor: backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : 'neutral-background', layoutType: layoutType, className: (0, classnames_1.default)(className, styles_module_scss_1.default.sectionTable) }, (0, uikit_product_utils_1.extractSupportProps)(rest), { children: [subtitle && (0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { richText: subtitle, className: styles_module_scss_1.default.subtitle, "data-test-id": 'section-table__subtitle' }), (0, jsx_runtime_1.jsx)(uikit_product_site_table_1.Table, Object.assign({}, rest, { "data-test-id": 'section-table__table' })), description && ((0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { className: styles_module_scss_1.default.description, richText: description, "data-test-id": 'section-table__description' }))] })));
|
|
28
28
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { WithLayoutType, WithSupportProps } from '@cloud-ru/uikit-product-utils';
|
|
2
2
|
import { TypographyProps } from '@snack-uikit/typography';
|
|
3
3
|
import { BenefitItemProps } from '../../helperComponents';
|
|
4
|
+
import { SectionBasicProps } from '../SectionBasic';
|
|
4
5
|
import { BackgroundType } from './types';
|
|
5
6
|
type ItemProps = Omit<BenefitItemProps, 'layoutType'>;
|
|
6
7
|
export type SectionBenefitsBannerProps = WithSupportProps<WithLayoutType<{
|
|
@@ -14,6 +15,8 @@ export type SectionBenefitsBannerProps = WithSupportProps<WithLayoutType<{
|
|
|
14
15
|
description?: string[] | string;
|
|
15
16
|
/** CSS класс */
|
|
16
17
|
className?: string;
|
|
18
|
+
/** Фон подложки */
|
|
19
|
+
backgroundSectionColor?: SectionBasicProps['backgroundColor'];
|
|
17
20
|
} & BackgroundType>>;
|
|
18
|
-
export declare function SectionBenefitsBanner({ title, titleTag, items, layoutType, backgroundType, appearance, color, backgroundImage, description, className, ...rest }: SectionBenefitsBannerProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function SectionBenefitsBanner({ title, titleTag, items, layoutType, backgroundType, appearance, color, backgroundImage, backgroundSectionColor, description, className, ...rest }: SectionBenefitsBannerProps): import("react/jsx-runtime").JSX.Element;
|
|
19
22
|
export {};
|
|
@@ -18,8 +18,8 @@ import { SectionBasic } from '../SectionBasic';
|
|
|
18
18
|
import styles from './styles.module.css';
|
|
19
19
|
import { getTitleTypographyProps } from './utils';
|
|
20
20
|
export function SectionBenefitsBanner(_a) {
|
|
21
|
-
var { title, titleTag = 'h3', items, layoutType, backgroundType = 'color', appearance = 'brand', color, backgroundImage, description, className } = _a, rest = __rest(_a, ["title", "titleTag", "items", "layoutType", "backgroundType", "appearance", "color", "backgroundImage", "description", "className"]);
|
|
22
|
-
return (_jsx(SectionBasic, Object.assign({ layoutType: layoutType, className: className }, rest, { children: _jsxs("div", { className: styles.bannerWrapper, "data-layout-type": layoutType, children: [_jsxs("div", { className: cn(styles.banner, {
|
|
21
|
+
var { title, titleTag = 'h3', items, layoutType, backgroundType = 'color', appearance = 'brand', color, backgroundImage, backgroundSectionColor, description, className } = _a, rest = __rest(_a, ["title", "titleTag", "items", "layoutType", "backgroundType", "appearance", "color", "backgroundImage", "backgroundSectionColor", "description", "className"]);
|
|
22
|
+
return (_jsx(SectionBasic, Object.assign({ layoutType: layoutType, className: className, backgroundColor: backgroundSectionColor !== null && backgroundSectionColor !== void 0 ? backgroundSectionColor : 'neutral-background' }, rest, { children: _jsxs("div", { className: styles.bannerWrapper, "data-layout-type": layoutType, children: [_jsxs("div", { className: cn(styles.banner, {
|
|
23
23
|
[styles.white]: backgroundType && backgroundType === 'image',
|
|
24
24
|
}), "data-layout-type": layoutType, "data-appearance": appearance, "data-color": color, children: [backgroundImage && (_jsx("img", { className: styles.illustration, src: backgroundImage, alt: 'benefits-illustration', "data-layout-type": layoutType })), _jsxs("div", { className: styles.contentWrapper, children: [title && (_jsx(Typography, Object.assign({ family: 'light', tag: titleTag }, getTitleTypographyProps(layoutType), { children: _jsx(RichText, { richText: title }) }))), _jsx("div", { className: styles.benefitItems, "data-items-amount": items.length, "data-layout-type": layoutType, children: items.map(item => (_jsx(BenefitItem, Object.assign({}, item, { layoutType: layoutType }), item.description))) })] })] }), description && (_jsx("div", { className: styles.description, "data-attribute": 'no_search_index', children: _jsx(Typography, { family: 'sans', purpose: 'body', size: 'm', tag: 'div', children: Array.isArray(description) ? (description.map(item => _jsx(RichText, { richText: item }, item))) : (_jsx(RichText, { richText: description })) }) }))] }) })));
|
|
25
25
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WithLayoutType, WithSupportProps } from '@cloud-ru/uikit-product-utils';
|
|
2
2
|
import { MediaContentProps } from '../../types';
|
|
3
3
|
import { SectionBasicProps } from '../SectionBasic';
|
|
4
|
-
export type SectionMediaProps = WithLayoutType<WithSupportProps<Pick<SectionBasicProps, 'id' | 'title' | 'titleTag' | 'description'> & MediaContentProps>>;
|
|
5
|
-
export declare function SectionMedia({ id, title, titleTag, layoutType, description, video, onPlay, onError, image, 'data-test-id': dataTestId, ...rest }: SectionMediaProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export type SectionMediaProps = WithLayoutType<WithSupportProps<Pick<SectionBasicProps, 'id' | 'title' | 'titleTag' | 'description' | 'backgroundColor'> & MediaContentProps>>;
|
|
5
|
+
export declare function SectionMedia({ id, title, titleTag, layoutType, description, video, onPlay, onError, image, backgroundColor, 'data-test-id': dataTestId, ...rest }: SectionMediaProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -15,6 +15,6 @@ import { extractSupportProps } from '@cloud-ru/uikit-product-utils';
|
|
|
15
15
|
import { SectionBasic } from '../SectionBasic';
|
|
16
16
|
import styles from './styles.module.css';
|
|
17
17
|
export function SectionMedia(_a) {
|
|
18
|
-
var { id, title, titleTag, layoutType, description, video, onPlay, onError, image, 'data-test-id': dataTestId = 'section-media' } = _a, rest = __rest(_a, ["id", "title", "titleTag", "layoutType", "description", "video", "onPlay", "onError", "image", 'data-test-id']);
|
|
19
|
-
return (_jsx(SectionBasic, Object.assign({ id: id, layoutType: layoutType, title: title, titleTag: titleTag, description: description, "data-test-id": dataTestId }, extractSupportProps(rest), { children: _jsxs("div", { className: styles.content, children: [image && (_jsx("img", { className: styles.image, src: image.src, alt: (image === null || image === void 0 ? void 0 : image.alt) || title, "data-test-id": `${dataTestId}__image` })), video && (_jsx(SiteVideo, { video: video, onPlay: onPlay, onError: onError, layoutType: layoutType, "data-test-id": `${dataTestId}__video` }))] }) })));
|
|
18
|
+
var { id, title, titleTag, layoutType, description, video, onPlay, onError, image, backgroundColor, 'data-test-id': dataTestId = 'section-media' } = _a, rest = __rest(_a, ["id", "title", "titleTag", "layoutType", "description", "video", "onPlay", "onError", "image", "backgroundColor", 'data-test-id']);
|
|
19
|
+
return (_jsx(SectionBasic, Object.assign({ id: id, layoutType: layoutType, title: title, titleTag: titleTag, description: description, "data-test-id": dataTestId, backgroundColor: backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : 'neutral-background' }, extractSupportProps(rest), { children: _jsxs("div", { className: styles.content, children: [image && (_jsx("img", { className: styles.image, src: image.src, alt: (image === null || image === void 0 ? void 0 : image.alt) || title, "data-test-id": `${dataTestId}__image` })), video && (_jsx(SiteVideo, { video: video, onPlay: onPlay, onError: onError, layoutType: layoutType, "data-test-id": `${dataTestId}__video` }))] }) })));
|
|
20
20
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TableProps } from '@cloud-ru/uikit-product-site-table';
|
|
2
2
|
import { WithLayoutType, WithSupportProps } from '@cloud-ru/uikit-product-utils';
|
|
3
|
+
import { SectionBasicProps } from '../SectionBasic';
|
|
3
4
|
export type SectionTableProps = WithSupportProps<WithLayoutType<{
|
|
4
5
|
/** id секции */
|
|
5
6
|
id?: string;
|
|
@@ -11,5 +12,7 @@ export type SectionTableProps = WithSupportProps<WithLayoutType<{
|
|
|
11
12
|
subtitle?: string;
|
|
12
13
|
/** Описание */
|
|
13
14
|
description?: string;
|
|
15
|
+
/** Фон подложки */
|
|
16
|
+
backgroundColor?: SectionBasicProps['backgroundColor'];
|
|
14
17
|
} & TableProps>>;
|
|
15
|
-
export declare function SectionTable({ id, layoutType, className, title, subtitle, description, ...rest }: SectionTableProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function SectionTable({ id, layoutType, className, title, subtitle, description, backgroundColor, ...rest }: SectionTableProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -17,6 +17,6 @@ import { extractSupportProps } from '@cloud-ru/uikit-product-utils';
|
|
|
17
17
|
import { SectionBasic } from '../SectionBasic';
|
|
18
18
|
import styles from './styles.module.css';
|
|
19
19
|
export function SectionTable(_a) {
|
|
20
|
-
var { id, layoutType, className, title, subtitle, description } = _a, rest = __rest(_a, ["id", "layoutType", "className", "title", "subtitle", "description"]);
|
|
21
|
-
return (_jsxs(SectionBasic, Object.assign({ id: id, title: title, backgroundColor: 'neutral-
|
|
20
|
+
var { id, layoutType, className, title, subtitle, description, backgroundColor } = _a, rest = __rest(_a, ["id", "layoutType", "className", "title", "subtitle", "description", "backgroundColor"]);
|
|
21
|
+
return (_jsxs(SectionBasic, Object.assign({ id: id, title: title, backgroundColor: backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : 'neutral-background', layoutType: layoutType, className: cn(className, styles.sectionTable) }, extractSupportProps(rest), { children: [subtitle && _jsx(RichText, { richText: subtitle, className: styles.subtitle, "data-test-id": 'section-table__subtitle' }), _jsx(Table, Object.assign({}, rest, { "data-test-id": 'section-table__table' })), description && (_jsx(RichText, { className: styles.description, richText: description, "data-test-id": 'section-table__description' }))] })));
|
|
22
22
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloud-ru/uikit-product-site-section",
|
|
3
3
|
"title": "Site Section",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.25.0",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
7
7
|
"*.woff",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@cloud-ru/uikit-product-site-cards": "0.11.9",
|
|
42
42
|
"@cloud-ru/uikit-product-site-case-card": "0.4.7",
|
|
43
43
|
"@cloud-ru/uikit-product-site-grid": "0.1.8",
|
|
44
|
-
"@cloud-ru/uikit-product-site-layout": "0.
|
|
44
|
+
"@cloud-ru/uikit-product-site-layout": "0.4.0",
|
|
45
45
|
"@cloud-ru/uikit-product-site-media": "0.1.38",
|
|
46
46
|
"@cloud-ru/uikit-product-site-rich-text": "0.2.15",
|
|
47
47
|
"@cloud-ru/uikit-product-site-table": "0.2.16",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"@cloud-ru/uikit-product-locale": "*",
|
|
68
68
|
"@snack-uikit/figma-tokens": "*"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "1910eca50a51cb492585a216283ad167c3494a95"
|
|
71
71
|
}
|
|
@@ -5,7 +5,7 @@ import { WithLayoutType, WithSupportProps } from '@cloud-ru/uikit-product-utils'
|
|
|
5
5
|
import { Typography, TypographyProps } from '@snack-uikit/typography';
|
|
6
6
|
|
|
7
7
|
import { BenefitItem, BenefitItemProps } from '../../helperComponents';
|
|
8
|
-
import { SectionBasic } from '../SectionBasic';
|
|
8
|
+
import { SectionBasic, SectionBasicProps } from '../SectionBasic';
|
|
9
9
|
import styles from './styles.module.scss';
|
|
10
10
|
import { BackgroundType } from './types';
|
|
11
11
|
import { getTitleTypographyProps } from './utils';
|
|
@@ -25,6 +25,8 @@ export type SectionBenefitsBannerProps = WithSupportProps<
|
|
|
25
25
|
description?: string[] | string;
|
|
26
26
|
/** CSS класс */
|
|
27
27
|
className?: string;
|
|
28
|
+
/** Фон подложки */
|
|
29
|
+
backgroundSectionColor?: SectionBasicProps['backgroundColor'];
|
|
28
30
|
} & BackgroundType
|
|
29
31
|
>
|
|
30
32
|
>;
|
|
@@ -38,12 +40,18 @@ export function SectionBenefitsBanner({
|
|
|
38
40
|
appearance = 'brand',
|
|
39
41
|
color,
|
|
40
42
|
backgroundImage,
|
|
43
|
+
backgroundSectionColor,
|
|
41
44
|
description,
|
|
42
45
|
className,
|
|
43
46
|
...rest
|
|
44
47
|
}: SectionBenefitsBannerProps) {
|
|
45
48
|
return (
|
|
46
|
-
<SectionBasic
|
|
49
|
+
<SectionBasic
|
|
50
|
+
layoutType={layoutType}
|
|
51
|
+
className={className}
|
|
52
|
+
backgroundColor={backgroundSectionColor ?? 'neutral-background'}
|
|
53
|
+
{...rest}
|
|
54
|
+
>
|
|
47
55
|
<div className={styles.bannerWrapper} data-layout-type={layoutType}>
|
|
48
56
|
<div
|
|
49
57
|
className={cn(styles.banner, {
|
|
@@ -6,7 +6,9 @@ import { SectionBasic, SectionBasicProps } from '../SectionBasic';
|
|
|
6
6
|
import styles from './styles.module.scss';
|
|
7
7
|
|
|
8
8
|
export type SectionMediaProps = WithLayoutType<
|
|
9
|
-
WithSupportProps<
|
|
9
|
+
WithSupportProps<
|
|
10
|
+
Pick<SectionBasicProps, 'id' | 'title' | 'titleTag' | 'description' | 'backgroundColor'> & MediaContentProps
|
|
11
|
+
>
|
|
10
12
|
>;
|
|
11
13
|
|
|
12
14
|
export function SectionMedia({
|
|
@@ -19,6 +21,7 @@ export function SectionMedia({
|
|
|
19
21
|
onPlay,
|
|
20
22
|
onError,
|
|
21
23
|
image,
|
|
24
|
+
backgroundColor,
|
|
22
25
|
'data-test-id': dataTestId = 'section-media',
|
|
23
26
|
...rest
|
|
24
27
|
}: SectionMediaProps) {
|
|
@@ -30,6 +33,7 @@ export function SectionMedia({
|
|
|
30
33
|
titleTag={titleTag}
|
|
31
34
|
description={description}
|
|
32
35
|
data-test-id={dataTestId}
|
|
36
|
+
backgroundColor={backgroundColor ?? 'neutral-background'}
|
|
33
37
|
{...extractSupportProps(rest)}
|
|
34
38
|
>
|
|
35
39
|
<div className={styles.content}>
|
|
@@ -4,7 +4,7 @@ import { RichText } from '@cloud-ru/uikit-product-site-rich-text';
|
|
|
4
4
|
import { Table, TableProps } from '@cloud-ru/uikit-product-site-table';
|
|
5
5
|
import { extractSupportProps, WithLayoutType, WithSupportProps } from '@cloud-ru/uikit-product-utils';
|
|
6
6
|
|
|
7
|
-
import { SectionBasic } from '../SectionBasic';
|
|
7
|
+
import { SectionBasic, SectionBasicProps } from '../SectionBasic';
|
|
8
8
|
import styles from './styles.module.scss';
|
|
9
9
|
|
|
10
10
|
export type SectionTableProps = WithSupportProps<
|
|
@@ -20,16 +20,27 @@ export type SectionTableProps = WithSupportProps<
|
|
|
20
20
|
subtitle?: string;
|
|
21
21
|
/** Описание */
|
|
22
22
|
description?: string;
|
|
23
|
+
/** Фон подложки */
|
|
24
|
+
backgroundColor?: SectionBasicProps['backgroundColor'];
|
|
23
25
|
} & TableProps
|
|
24
26
|
>
|
|
25
27
|
>;
|
|
26
28
|
|
|
27
|
-
export function SectionTable({
|
|
29
|
+
export function SectionTable({
|
|
30
|
+
id,
|
|
31
|
+
layoutType,
|
|
32
|
+
className,
|
|
33
|
+
title,
|
|
34
|
+
subtitle,
|
|
35
|
+
description,
|
|
36
|
+
backgroundColor,
|
|
37
|
+
...rest
|
|
38
|
+
}: SectionTableProps) {
|
|
28
39
|
return (
|
|
29
40
|
<SectionBasic
|
|
30
41
|
id={id}
|
|
31
42
|
title={title}
|
|
32
|
-
backgroundColor='neutral-
|
|
43
|
+
backgroundColor={backgroundColor ?? 'neutral-background'}
|
|
33
44
|
layoutType={layoutType}
|
|
34
45
|
className={cn(className, styles.sectionTable)}
|
|
35
46
|
{...extractSupportProps(rest)}
|