@cloud-ru/uikit-product-site-section 1.2.8 → 1.3.1-preview-56e61b3f.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 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
@@ -17,6 +17,7 @@
17
17
  | expandedDefault | `string \| string[]` | - | |
18
18
  | onExpandedChange | `((value?: string) => void) \| ((value?: string[]) => void)` | - | |
19
19
  | id | `string` | - | id секции |
20
+ | description | `string` | - | Описание |
20
21
  | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"`, `"graphite-accent-default"` | - | Цвет фона |
21
22
  | outline | `boolean` | - | Внешний бордер для блоков |
22
23
  | className | `string` | - | CSS-класс |
@@ -65,6 +66,7 @@
65
66
  |------|------|---------------|-------------|
66
67
  | layoutType* | enum LayoutType: `"mobile"`, `"tablet"`, `"desktop"`, `"desktopSmall"` | - | |
67
68
  | items* | `ItemProps[]` | - | Выгоды |
69
+ | id | `string` | - | id секции |
68
70
  | title | `string` | - | Заголовок |
69
71
  | titleTag | enum Tag: `"span"`, `"h1"`, `"h2"`, `"h3"`, `"h4"`, `"h5"`, `"h6"`, `"div"`, `"label"`, `"p"` | h3 | Тэг заголовка |
70
72
  | description | `string \| string[]` | - | Описание под баннером |
@@ -15,6 +15,8 @@ export type SectionAccordionProps = WithSupportProps<AccordionPropsCopy & WithLa
15
15
  id?: string;
16
16
  /** Название секции */
17
17
  title: string;
18
+ /** Описание */
19
+ description?: string;
18
20
  /** Массив айтемов */
19
21
  items: AccordionItem[];
20
22
  /** Цвет фона */
@@ -24,5 +26,5 @@ export type SectionAccordionProps = WithSupportProps<AccordionPropsCopy & WithLa
24
26
  /** CSS-класс */
25
27
  className?: string;
26
28
  }>>;
27
- export declare function SectionAccordion({ id, title, items, selectionMode, layoutType, backgroundColor, outline, onExpandedChange, expandedDefault, className, ...rest }: SectionAccordionProps): import("react/jsx-runtime").JSX.Element;
29
+ export declare function SectionAccordion({ id, title, description, items, selectionMode, layoutType, backgroundColor, outline, onExpandedChange, expandedDefault, className, ...rest }: SectionAccordionProps): import("react/jsx-runtime").JSX.Element;
28
30
  export {};
@@ -24,6 +24,6 @@ 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 SectionAccordion(_a) {
27
- var { id, title, items, selectionMode = 'multiple', layoutType, backgroundColor, outline, onExpandedChange, expandedDefault, className } = _a, rest = __rest(_a, ["id", "title", "items", "selectionMode", "layoutType", "backgroundColor", "outline", "onExpandedChange", "expandedDefault", "className"]);
28
- return ((0, jsx_runtime_1.jsx)(SectionBasic_1.SectionBasic, Object.assign({ id: id, title: title, layoutType: layoutType, backgroundColor: backgroundColor }, (0, uikit_product_utils_1.extractSupportProps)(rest), { children: (0, jsx_runtime_1.jsx)(accordion_1.AccordionPrimary, { selectionMode: selectionMode, expandedDefault: expandedDefault, onExpandedChange: onExpandedChange, className: styles_module_scss_1.default.accordion, children: items.map(({ title, description, onClick }, index) => ((0, jsx_runtime_1.jsx)(accordion_1.AccordionPrimary.CollapseBlock, { id: index.toString(), header: (0, jsx_runtime_1.jsx)(typography_1.Typography, Object.assign({ family: 'sans' }, (0, utils_1.getBlockTitleProps)(layoutType), { className: styles_module_scss_1.default.title, children: (0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { richText: title }) })), className: className, removeContentFromDOM: false, outline: outline, onClick: onClick, children: (0, jsx_runtime_1.jsx)(typography_1.Typography, { family: 'sans', purpose: 'body', tag: 'div', size: (0, utils_1.getBlockDescriptionSize)(layoutType), className: styles_module_scss_1.default.description, children: (0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { richText: description }) }) }, index))) }) })));
27
+ var { id, title, description, items, selectionMode = 'multiple', layoutType, backgroundColor, outline, onExpandedChange, expandedDefault, className } = _a, rest = __rest(_a, ["id", "title", "description", "items", "selectionMode", "layoutType", "backgroundColor", "outline", "onExpandedChange", "expandedDefault", "className"]);
28
+ return ((0, jsx_runtime_1.jsx)(SectionBasic_1.SectionBasic, Object.assign({ id: id, title: title, description: description, layoutType: layoutType, backgroundColor: backgroundColor }, (0, uikit_product_utils_1.extractSupportProps)(rest), { children: (0, jsx_runtime_1.jsx)(accordion_1.AccordionPrimary, { selectionMode: selectionMode, expandedDefault: expandedDefault, onExpandedChange: onExpandedChange, className: styles_module_scss_1.default.accordion, children: items.map(({ title, description, onClick }, index) => ((0, jsx_runtime_1.jsx)(accordion_1.AccordionPrimary.CollapseBlock, { id: index.toString(), header: (0, jsx_runtime_1.jsx)(typography_1.Typography, Object.assign({ family: 'sans' }, (0, utils_1.getBlockTitleProps)(layoutType), { className: styles_module_scss_1.default.title, children: (0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { richText: title }) })), className: className, removeContentFromDOM: false, outline: outline, onClick: onClick, children: (0, jsx_runtime_1.jsx)(typography_1.Typography, { family: 'sans', purpose: 'body', tag: 'div', size: (0, utils_1.getBlockDescriptionSize)(layoutType), className: styles_module_scss_1.default.description, children: (0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { richText: description }) }) }, index))) }) })));
29
29
  }
@@ -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
  }
@@ -15,6 +15,8 @@ export type SectionAccordionProps = WithSupportProps<AccordionPropsCopy & WithLa
15
15
  id?: string;
16
16
  /** Название секции */
17
17
  title: string;
18
+ /** Описание */
19
+ description?: string;
18
20
  /** Массив айтемов */
19
21
  items: AccordionItem[];
20
22
  /** Цвет фона */
@@ -24,5 +26,5 @@ export type SectionAccordionProps = WithSupportProps<AccordionPropsCopy & WithLa
24
26
  /** CSS-класс */
25
27
  className?: string;
26
28
  }>>;
27
- export declare function SectionAccordion({ id, title, items, selectionMode, layoutType, backgroundColor, outline, onExpandedChange, expandedDefault, className, ...rest }: SectionAccordionProps): import("react/jsx-runtime").JSX.Element;
29
+ export declare function SectionAccordion({ id, title, description, items, selectionMode, layoutType, backgroundColor, outline, onExpandedChange, expandedDefault, className, ...rest }: SectionAccordionProps): import("react/jsx-runtime").JSX.Element;
28
30
  export {};
@@ -18,6 +18,6 @@ import { SectionBasic } from '../SectionBasic';
18
18
  import styles from './styles.module.css';
19
19
  import { getBlockDescriptionSize, getBlockTitleProps } from './utils';
20
20
  export function SectionAccordion(_a) {
21
- var { id, title, items, selectionMode = 'multiple', layoutType, backgroundColor, outline, onExpandedChange, expandedDefault, className } = _a, rest = __rest(_a, ["id", "title", "items", "selectionMode", "layoutType", "backgroundColor", "outline", "onExpandedChange", "expandedDefault", "className"]);
22
- return (_jsx(SectionBasic, Object.assign({ id: id, title: title, layoutType: layoutType, backgroundColor: backgroundColor }, extractSupportProps(rest), { children: _jsx(AccordionPrimary, { selectionMode: selectionMode, expandedDefault: expandedDefault, onExpandedChange: onExpandedChange, className: styles.accordion, children: items.map(({ title, description, onClick }, index) => (_jsx(AccordionPrimary.CollapseBlock, { id: index.toString(), header: _jsx(Typography, Object.assign({ family: 'sans' }, getBlockTitleProps(layoutType), { className: styles.title, children: _jsx(RichText, { richText: title }) })), className: className, removeContentFromDOM: false, outline: outline, onClick: onClick, children: _jsx(Typography, { family: 'sans', purpose: 'body', tag: 'div', size: getBlockDescriptionSize(layoutType), className: styles.description, children: _jsx(RichText, { richText: description }) }) }, index))) }) })));
21
+ var { id, title, description, items, selectionMode = 'multiple', layoutType, backgroundColor, outline, onExpandedChange, expandedDefault, className } = _a, rest = __rest(_a, ["id", "title", "description", "items", "selectionMode", "layoutType", "backgroundColor", "outline", "onExpandedChange", "expandedDefault", "className"]);
22
+ return (_jsx(SectionBasic, Object.assign({ id: id, title: title, description: description, layoutType: layoutType, backgroundColor: backgroundColor }, extractSupportProps(rest), { children: _jsx(AccordionPrimary, { selectionMode: selectionMode, expandedDefault: expandedDefault, onExpandedChange: onExpandedChange, className: styles.accordion, children: items.map(({ title, description, onClick }, index) => (_jsx(AccordionPrimary.CollapseBlock, { id: index.toString(), header: _jsx(Typography, Object.assign({ family: 'sans' }, getBlockTitleProps(layoutType), { className: styles.title, children: _jsx(RichText, { richText: title }) })), className: className, removeContentFromDOM: false, outline: outline, onClick: onClick, children: _jsx(Typography, { family: 'sans', purpose: 'body', tag: 'div', size: getBlockDescriptionSize(layoutType), className: styles.description, children: _jsx(RichText, { richText: description }) }) }, index))) }) })));
23
23
  }
@@ -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.2.8",
4
+ "version": "1.3.1-preview-56e61b3f.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": "849cdd305b21bc8fea872e8645014d7fc4d3b2d6"
70
+ "gitHead": "e79095c7047a3f7199908c3185271fdbbc76e257"
71
71
  }
@@ -29,6 +29,8 @@ export type SectionAccordionProps = WithSupportProps<
29
29
  id?: string;
30
30
  /** Название секции */
31
31
  title: string;
32
+ /** Описание */
33
+ description?: string;
32
34
  /** Массив айтемов */
33
35
  items: AccordionItem[];
34
36
  /** Цвет фона */
@@ -43,6 +45,7 @@ export type SectionAccordionProps = WithSupportProps<
43
45
  export function SectionAccordion({
44
46
  id,
45
47
  title,
48
+ description,
46
49
  items,
47
50
  selectionMode = 'multiple',
48
51
  layoutType,
@@ -57,6 +60,7 @@ export function SectionAccordion({
57
60
  <SectionBasic
58
61
  id={id}
59
62
  title={title}
63
+ description={description}
60
64
  layoutType={layoutType}
61
65
  backgroundColor={backgroundColor}
62
66
  {...extractSupportProps(rest)}
@@ -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'}