@cloud-ru/uikit-product-site-section 1.2.8 → 1.3.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 +11 -0
- package/README.md +1 -0
- package/dist/cjs/components/SectionBenefitsBanner/SectionBenefitsBanner.d.ts +3 -1
- package/dist/cjs/components/SectionBenefitsBanner/SectionBenefitsBanner.js +2 -2
- package/dist/esm/components/SectionBenefitsBanner/SectionBenefitsBanner.d.ts +3 -1
- package/dist/esm/components/SectionBenefitsBanner/SectionBenefitsBanner.js +2 -2
- package/package.json +2 -2
- package/src/components/SectionBenefitsBanner/SectionBenefitsBanner.tsx +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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
|
+
# 1.3.0 (2026-04-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **SITE-11177:** add id to SectionBenefitsBanner ([6148634](https://github.com/cloud-ru-tech/uikit-product/commit/6148634bccebec4a774d6574cbfe418a0b195ac2))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## 1.2.8 (2026-04-27)
|
|
7
18
|
|
|
8
19
|
### Only dependencies have been changed
|
package/README.md
CHANGED
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
|------|------|---------------|-------------|
|
|
66
66
|
| layoutType* | enum LayoutType: `"mobile"`, `"tablet"`, `"desktop"`, `"desktopSmall"` | - | |
|
|
67
67
|
| items* | `ItemProps[]` | - | Выгоды |
|
|
68
|
+
| id | `string` | - | id секции |
|
|
68
69
|
| title | `string` | - | Заголовок |
|
|
69
70
|
| titleTag | enum Tag: `"span"`, `"h1"`, `"h2"`, `"h3"`, `"h4"`, `"h5"`, `"h6"`, `"div"`, `"label"`, `"p"` | h3 | Тэг заголовка |
|
|
70
71
|
| description | `string \| string[]` | - | Описание под баннером |
|
|
@@ -5,6 +5,8 @@ import { SectionBasicProps } from '../SectionBasic';
|
|
|
5
5
|
import { BackgroundType } from './types';
|
|
6
6
|
type ItemProps = Omit<BenefitItemProps, 'layoutType'>;
|
|
7
7
|
export type SectionBenefitsBannerProps = WithSupportProps<WithLayoutType<{
|
|
8
|
+
/** id секции */
|
|
9
|
+
id?: string;
|
|
8
10
|
/** Заголовок */
|
|
9
11
|
title?: string;
|
|
10
12
|
/** Тэг заголовка */
|
|
@@ -18,5 +20,5 @@ export type SectionBenefitsBannerProps = WithSupportProps<WithLayoutType<{
|
|
|
18
20
|
/** Фон подложки */
|
|
19
21
|
backgroundSectionColor?: SectionBasicProps['backgroundColor'];
|
|
20
22
|
} & BackgroundType>>;
|
|
21
|
-
export declare function SectionBenefitsBanner({ title, titleTag, items, layoutType, backgroundType, appearance, color, backgroundImage, backgroundSectionColor, description, className, ...rest }: SectionBenefitsBannerProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function SectionBenefitsBanner({ id, title, titleTag, items, layoutType, backgroundType, appearance, color, backgroundImage, backgroundSectionColor, description, className, ...rest }: SectionBenefitsBannerProps): import("react/jsx-runtime").JSX.Element;
|
|
22
24
|
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, 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, {
|
|
27
|
+
var { id, title, titleTag = 'h3', items, layoutType, backgroundType = 'color', appearance = 'brand', color, backgroundImage, backgroundSectionColor, description, className } = _a, rest = __rest(_a, ["id", "title", "titleTag", "items", "layoutType", "backgroundType", "appearance", "color", "backgroundImage", "backgroundSectionColor", "description", "className"]);
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(SectionBasic_1.SectionBasic, Object.assign({ id: id, 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
|
}
|
|
@@ -5,6 +5,8 @@ import { SectionBasicProps } from '../SectionBasic';
|
|
|
5
5
|
import { BackgroundType } from './types';
|
|
6
6
|
type ItemProps = Omit<BenefitItemProps, 'layoutType'>;
|
|
7
7
|
export type SectionBenefitsBannerProps = WithSupportProps<WithLayoutType<{
|
|
8
|
+
/** id секции */
|
|
9
|
+
id?: string;
|
|
8
10
|
/** Заголовок */
|
|
9
11
|
title?: string;
|
|
10
12
|
/** Тэг заголовка */
|
|
@@ -18,5 +20,5 @@ export type SectionBenefitsBannerProps = WithSupportProps<WithLayoutType<{
|
|
|
18
20
|
/** Фон подложки */
|
|
19
21
|
backgroundSectionColor?: SectionBasicProps['backgroundColor'];
|
|
20
22
|
} & BackgroundType>>;
|
|
21
|
-
export declare function SectionBenefitsBanner({ title, titleTag, items, layoutType, backgroundType, appearance, color, backgroundImage, backgroundSectionColor, description, className, ...rest }: SectionBenefitsBannerProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function SectionBenefitsBanner({ id, title, titleTag, items, layoutType, backgroundType, appearance, color, backgroundImage, backgroundSectionColor, description, className, ...rest }: SectionBenefitsBannerProps): import("react/jsx-runtime").JSX.Element;
|
|
22
24
|
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, 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, {
|
|
21
|
+
var { id, title, titleTag = 'h3', items, layoutType, backgroundType = 'color', appearance = 'brand', color, backgroundImage, backgroundSectionColor, description, className } = _a, rest = __rest(_a, ["id", "title", "titleTag", "items", "layoutType", "backgroundType", "appearance", "color", "backgroundImage", "backgroundSectionColor", "description", "className"]);
|
|
22
|
+
return (_jsx(SectionBasic, Object.assign({ id: id, 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
|
}
|
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": "1.
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
7
7
|
"*.woff",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"@cloud-ru/uikit-product-locale": "*",
|
|
68
68
|
"@snack-uikit/figma-tokens": "*"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "3ef9ace6301ded85fb902c2746376576a390febd"
|
|
71
71
|
}
|
|
@@ -15,6 +15,8 @@ type ItemProps = Omit<BenefitItemProps, 'layoutType'>;
|
|
|
15
15
|
export type SectionBenefitsBannerProps = WithSupportProps<
|
|
16
16
|
WithLayoutType<
|
|
17
17
|
{
|
|
18
|
+
/** id секции */
|
|
19
|
+
id?: string;
|
|
18
20
|
/** Заголовок */
|
|
19
21
|
title?: string;
|
|
20
22
|
/** Тэг заголовка */
|
|
@@ -32,6 +34,7 @@ export type SectionBenefitsBannerProps = WithSupportProps<
|
|
|
32
34
|
>;
|
|
33
35
|
|
|
34
36
|
export function SectionBenefitsBanner({
|
|
37
|
+
id,
|
|
35
38
|
title,
|
|
36
39
|
titleTag = 'h3',
|
|
37
40
|
items,
|
|
@@ -47,6 +50,7 @@ export function SectionBenefitsBanner({
|
|
|
47
50
|
}: SectionBenefitsBannerProps) {
|
|
48
51
|
return (
|
|
49
52
|
<SectionBasic
|
|
53
|
+
id={id}
|
|
50
54
|
layoutType={layoutType}
|
|
51
55
|
className={className}
|
|
52
56
|
backgroundColor={backgroundSectionColor ?? 'neutral-background'}
|