@cloud-ru/uikit-product-site-hero 1.6.2 → 1.7.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.7.0 (2026-05-14)
7
+
8
+
9
+ ### Features
10
+
11
+ * **SITE-11035:** add desc im HeroCentral ([398d4a4](https://github.com/cloud-ru-tech/uikit-product/commit/398d4a4def388e09ab649eddfe594a0e309e2dba))
12
+
13
+
14
+
15
+
16
+
6
17
  ## 1.6.2 (2026-04-30)
7
18
 
8
19
  ### Only dependencies have been changed
@@ -10,6 +10,8 @@ type HeroBlockProps = WithSupportProps<{
10
10
  title: string;
11
11
  /** Подзаголовок */
12
12
  subtitle: string;
13
+ /** Описание */
14
+ description?: string;
13
15
  /** ClassName для фоновой картинки */
14
16
  classNameImage?: string;
15
17
  /** Настройки кнопкок */
@@ -30,5 +32,5 @@ type HeroBlockProps = WithSupportProps<{
30
32
  mobile: string;
31
33
  };
32
34
  }> & WithLayoutType;
33
- export declare function HeroCentral({ title, subtitle, buttons, anchors, breadcrumbs, layoutType, className, classNameImage, tooltipText, tooltipPlacement, backgroundImage, }: HeroBlockProps): import("react/jsx-runtime").JSX.Element;
35
+ export declare function HeroCentral({ title, subtitle, buttons, anchors, breadcrumbs, layoutType, className, classNameImage, tooltipText, tooltipPlacement, description, backgroundImage, }: HeroBlockProps): import("react/jsx-runtime").JSX.Element;
34
36
  export {};
@@ -17,9 +17,9 @@ const DEFAULT_BG_IMAGES = {
17
17
  tablet: 'https://cdn.cloud.ru/backend/images/solutions/hero_preview_bg_tablet.webp',
18
18
  mobile: 'https://cdn.cloud.ru/backend/images/solutions/hero_preview_bg_mobile.webp',
19
19
  };
20
- function HeroCentral({ title, subtitle, buttons, anchors, breadcrumbs, layoutType, className, classNameImage, tooltipText, tooltipPlacement, backgroundImage = DEFAULT_BG_IMAGES, }) {
21
- const { title: titleTypography, subtitle: subtitleTypography } = utils_1.TYPOGRAPHY_BY_LAYOUT[layoutType];
20
+ function HeroCentral({ title, subtitle, buttons, anchors, breadcrumbs, layoutType, className, classNameImage, tooltipText, tooltipPlacement, description, backgroundImage = DEFAULT_BG_IMAGES, }) {
21
+ const { title: titleTypography, subtitle: subtitleTypography, description: descriptionTypography, } = utils_1.TYPOGRAPHY_BY_LAYOUT[layoutType];
22
22
  return ((0, jsx_runtime_1.jsx)("section", { className: (0, classnames_1.default)(styles_module_scss_1.default.root, className), children: (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.sectionWrapper, children: [(0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.imageWrapper, classNameImage), "data-layout-type": layoutType, children: (0, jsx_runtime_1.jsx)("img", { loading: 'lazy', src: backgroundImage[layoutType], width: 1408, height: 436, alt: 'background' }) }), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.wrapperContent, "data-layout-type": layoutType, children: [(0, jsx_runtime_1.jsx)(breadcrumbs_1.Breadcrumbs, { size: 'xs', items: breadcrumbs, className: styles_module_scss_1.default.breadcrumbs }), (0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.content, {
23
23
  [styles_module_scss_1.default.withoutAnchors]: !anchors,
24
- }), "data-layout-type": layoutType, children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.titles, "data-layout-type": layoutType, children: [(0, jsx_runtime_1.jsxs)(typography_1.Typography, Object.assign({ family: 'sans' }, titleTypography, { className: styles_module_scss_1.default.title, tag: 'h1', children: [(0, jsx_runtime_1.jsx)("span", { dangerouslySetInnerHTML: { __html: title } }), (0, jsx_runtime_1.jsx)(helperComponents_1.HeroTooltip, { tooltipText: tooltipText, tooltipPlacement: tooltipPlacement, layoutType: layoutType })] })), (0, jsx_runtime_1.jsx)(typography_1.Typography, Object.assign({ family: 'sans' }, subtitleTypography, { className: styles_module_scss_1.default.subtitle, tag: 'h2', children: subtitle }))] }), (0, jsx_runtime_1.jsx)(helperComponents_1.HeroCentralButtons, { buttons: buttons, layoutType: layoutType })] }), (0, jsx_runtime_1.jsx)(helperComponents_1.AnchorMenu, { anchorsList: anchors, layoutType: layoutType })] })] }) }));
24
+ }), "data-layout-type": layoutType, children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.titles, "data-layout-type": layoutType, children: [description && ((0, jsx_runtime_1.jsx)(typography_1.Typography, Object.assign({ family: 'sans' }, descriptionTypography, { className: styles_module_scss_1.default.description, tag: 'h2', children: description }))), (0, jsx_runtime_1.jsxs)(typography_1.Typography, Object.assign({ family: 'sans' }, titleTypography, { className: styles_module_scss_1.default.title, tag: 'h1', children: [(0, jsx_runtime_1.jsx)("span", { dangerouslySetInnerHTML: { __html: title } }), (0, jsx_runtime_1.jsx)(helperComponents_1.HeroTooltip, { tooltipText: tooltipText, tooltipPlacement: tooltipPlacement, layoutType: layoutType })] })), (0, jsx_runtime_1.jsx)(typography_1.Typography, Object.assign({ family: 'sans' }, subtitleTypography, { className: styles_module_scss_1.default.subtitle, tag: 'h2', children: subtitle }))] }), (0, jsx_runtime_1.jsx)(helperComponents_1.HeroCentralButtons, { buttons: buttons, layoutType: layoutType })] }), (0, jsx_runtime_1.jsx)(helperComponents_1.AnchorMenu, { anchorsList: anchors, layoutType: layoutType })] })] }) }));
25
25
  }
@@ -28,6 +28,11 @@
28
28
  color:var(--sys-graphite-text-disabled, #a3a3a3);
29
29
  }
30
30
 
31
+ .description{
32
+ color:var(--sys-graphite-on-accent, #ffffff);
33
+ max-width:700px;
34
+ }
35
+
31
36
  .imageWrapper{
32
37
  margin:0 auto;
33
38
  width:100%;
@@ -8,6 +8,10 @@ export declare const TYPOGRAPHY_BY_LAYOUT: {
8
8
  readonly purpose: "title";
9
9
  readonly size: "m";
10
10
  };
11
+ readonly description: {
12
+ readonly purpose: "body";
13
+ readonly size: "l";
14
+ };
11
15
  };
12
16
  readonly tablet: {
13
17
  readonly title: {
@@ -18,6 +22,10 @@ export declare const TYPOGRAPHY_BY_LAYOUT: {
18
22
  readonly purpose: "title";
19
23
  readonly size: "m";
20
24
  };
25
+ readonly description: {
26
+ readonly purpose: "body";
27
+ readonly size: "l";
28
+ };
21
29
  };
22
30
  readonly desktop: {
23
31
  readonly title: {
@@ -28,6 +36,10 @@ export declare const TYPOGRAPHY_BY_LAYOUT: {
28
36
  readonly purpose: "headline";
29
37
  readonly size: "s";
30
38
  };
39
+ readonly description: {
40
+ readonly purpose: "body";
41
+ readonly size: "l";
42
+ };
31
43
  };
32
44
  readonly desktopSmall: {
33
45
  readonly title: {
@@ -38,5 +50,9 @@ export declare const TYPOGRAPHY_BY_LAYOUT: {
38
50
  readonly purpose: "headline";
39
51
  readonly size: "s";
40
52
  };
53
+ readonly description: {
54
+ readonly purpose: "body";
55
+ readonly size: "m";
56
+ };
41
57
  };
42
58
  };
@@ -5,17 +5,21 @@ exports.TYPOGRAPHY_BY_LAYOUT = {
5
5
  mobile: {
6
6
  title: { purpose: 'headline', size: 'm' },
7
7
  subtitle: { purpose: 'title', size: 'm' },
8
+ description: { purpose: 'body', size: 'l' },
8
9
  },
9
10
  tablet: {
10
11
  title: { purpose: 'headline', size: 'l' },
11
12
  subtitle: { purpose: 'title', size: 'm' },
13
+ description: { purpose: 'body', size: 'l' },
12
14
  },
13
15
  desktop: {
14
16
  title: { purpose: 'display', size: 'm' },
15
17
  subtitle: { purpose: 'headline', size: 's' },
18
+ description: { purpose: 'body', size: 'l' },
16
19
  },
17
20
  desktopSmall: {
18
21
  title: { purpose: 'display', size: 'm' },
19
22
  subtitle: { purpose: 'headline', size: 's' },
23
+ description: { purpose: 'body', size: 'm' },
20
24
  },
21
25
  };
@@ -10,6 +10,8 @@ type HeroBlockProps = WithSupportProps<{
10
10
  title: string;
11
11
  /** Подзаголовок */
12
12
  subtitle: string;
13
+ /** Описание */
14
+ description?: string;
13
15
  /** ClassName для фоновой картинки */
14
16
  classNameImage?: string;
15
17
  /** Настройки кнопкок */
@@ -30,5 +32,5 @@ type HeroBlockProps = WithSupportProps<{
30
32
  mobile: string;
31
33
  };
32
34
  }> & WithLayoutType;
33
- export declare function HeroCentral({ title, subtitle, buttons, anchors, breadcrumbs, layoutType, className, classNameImage, tooltipText, tooltipPlacement, backgroundImage, }: HeroBlockProps): import("react/jsx-runtime").JSX.Element;
35
+ export declare function HeroCentral({ title, subtitle, buttons, anchors, breadcrumbs, layoutType, className, classNameImage, tooltipText, tooltipPlacement, description, backgroundImage, }: HeroBlockProps): import("react/jsx-runtime").JSX.Element;
34
36
  export {};
@@ -11,9 +11,9 @@ const DEFAULT_BG_IMAGES = {
11
11
  tablet: 'https://cdn.cloud.ru/backend/images/solutions/hero_preview_bg_tablet.webp',
12
12
  mobile: 'https://cdn.cloud.ru/backend/images/solutions/hero_preview_bg_mobile.webp',
13
13
  };
14
- export function HeroCentral({ title, subtitle, buttons, anchors, breadcrumbs, layoutType, className, classNameImage, tooltipText, tooltipPlacement, backgroundImage = DEFAULT_BG_IMAGES, }) {
15
- const { title: titleTypography, subtitle: subtitleTypography } = TYPOGRAPHY_BY_LAYOUT[layoutType];
14
+ export function HeroCentral({ title, subtitle, buttons, anchors, breadcrumbs, layoutType, className, classNameImage, tooltipText, tooltipPlacement, description, backgroundImage = DEFAULT_BG_IMAGES, }) {
15
+ const { title: titleTypography, subtitle: subtitleTypography, description: descriptionTypography, } = TYPOGRAPHY_BY_LAYOUT[layoutType];
16
16
  return (_jsx("section", { className: cn(styles.root, className), children: _jsxs("div", { className: styles.sectionWrapper, children: [_jsx("div", { className: cn(styles.imageWrapper, classNameImage), "data-layout-type": layoutType, children: _jsx("img", { loading: 'lazy', src: backgroundImage[layoutType], width: 1408, height: 436, alt: 'background' }) }), _jsxs("div", { className: styles.wrapperContent, "data-layout-type": layoutType, children: [_jsx(Breadcrumbs, { size: 'xs', items: breadcrumbs, className: styles.breadcrumbs }), _jsxs("div", { className: cn(styles.content, {
17
17
  [styles.withoutAnchors]: !anchors,
18
- }), "data-layout-type": layoutType, children: [_jsxs("div", { className: styles.titles, "data-layout-type": layoutType, children: [_jsxs(Typography, Object.assign({ family: 'sans' }, titleTypography, { className: styles.title, tag: 'h1', children: [_jsx("span", { dangerouslySetInnerHTML: { __html: title } }), _jsx(HeroTooltip, { tooltipText: tooltipText, tooltipPlacement: tooltipPlacement, layoutType: layoutType })] })), _jsx(Typography, Object.assign({ family: 'sans' }, subtitleTypography, { className: styles.subtitle, tag: 'h2', children: subtitle }))] }), _jsx(HeroCentralButtons, { buttons: buttons, layoutType: layoutType })] }), _jsx(AnchorMenu, { anchorsList: anchors, layoutType: layoutType })] })] }) }));
18
+ }), "data-layout-type": layoutType, children: [_jsxs("div", { className: styles.titles, "data-layout-type": layoutType, children: [description && (_jsx(Typography, Object.assign({ family: 'sans' }, descriptionTypography, { className: styles.description, tag: 'h2', children: description }))), _jsxs(Typography, Object.assign({ family: 'sans' }, titleTypography, { className: styles.title, tag: 'h1', children: [_jsx("span", { dangerouslySetInnerHTML: { __html: title } }), _jsx(HeroTooltip, { tooltipText: tooltipText, tooltipPlacement: tooltipPlacement, layoutType: layoutType })] })), _jsx(Typography, Object.assign({ family: 'sans' }, subtitleTypography, { className: styles.subtitle, tag: 'h2', children: subtitle }))] }), _jsx(HeroCentralButtons, { buttons: buttons, layoutType: layoutType })] }), _jsx(AnchorMenu, { anchorsList: anchors, layoutType: layoutType })] })] }) }));
19
19
  }
@@ -28,6 +28,11 @@
28
28
  color:var(--sys-graphite-text-disabled, #a3a3a3);
29
29
  }
30
30
 
31
+ .description{
32
+ color:var(--sys-graphite-on-accent, #ffffff);
33
+ max-width:700px;
34
+ }
35
+
31
36
  .imageWrapper{
32
37
  margin:0 auto;
33
38
  width:100%;
@@ -8,6 +8,10 @@ export declare const TYPOGRAPHY_BY_LAYOUT: {
8
8
  readonly purpose: "title";
9
9
  readonly size: "m";
10
10
  };
11
+ readonly description: {
12
+ readonly purpose: "body";
13
+ readonly size: "l";
14
+ };
11
15
  };
12
16
  readonly tablet: {
13
17
  readonly title: {
@@ -18,6 +22,10 @@ export declare const TYPOGRAPHY_BY_LAYOUT: {
18
22
  readonly purpose: "title";
19
23
  readonly size: "m";
20
24
  };
25
+ readonly description: {
26
+ readonly purpose: "body";
27
+ readonly size: "l";
28
+ };
21
29
  };
22
30
  readonly desktop: {
23
31
  readonly title: {
@@ -28,6 +36,10 @@ export declare const TYPOGRAPHY_BY_LAYOUT: {
28
36
  readonly purpose: "headline";
29
37
  readonly size: "s";
30
38
  };
39
+ readonly description: {
40
+ readonly purpose: "body";
41
+ readonly size: "l";
42
+ };
31
43
  };
32
44
  readonly desktopSmall: {
33
45
  readonly title: {
@@ -38,5 +50,9 @@ export declare const TYPOGRAPHY_BY_LAYOUT: {
38
50
  readonly purpose: "headline";
39
51
  readonly size: "s";
40
52
  };
53
+ readonly description: {
54
+ readonly purpose: "body";
55
+ readonly size: "m";
56
+ };
41
57
  };
42
58
  };
@@ -2,17 +2,21 @@ export const TYPOGRAPHY_BY_LAYOUT = {
2
2
  mobile: {
3
3
  title: { purpose: 'headline', size: 'm' },
4
4
  subtitle: { purpose: 'title', size: 'm' },
5
+ description: { purpose: 'body', size: 'l' },
5
6
  },
6
7
  tablet: {
7
8
  title: { purpose: 'headline', size: 'l' },
8
9
  subtitle: { purpose: 'title', size: 'm' },
10
+ description: { purpose: 'body', size: 'l' },
9
11
  },
10
12
  desktop: {
11
13
  title: { purpose: 'display', size: 'm' },
12
14
  subtitle: { purpose: 'headline', size: 's' },
15
+ description: { purpose: 'body', size: 'l' },
13
16
  },
14
17
  desktopSmall: {
15
18
  title: { purpose: 'display', size: 'm' },
16
19
  subtitle: { purpose: 'headline', size: 's' },
20
+ description: { purpose: 'body', size: 'm' },
17
21
  },
18
22
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloud-ru/uikit-product-site-hero",
3
3
  "title": "Site Hero",
4
- "version": "1.6.2",
4
+ "version": "1.7.0",
5
5
  "sideEffects": [
6
6
  "*.css",
7
7
  "*.woff",
@@ -57,5 +57,5 @@
57
57
  "peerDependencies": {
58
58
  "@cloud-ru/uikit-product-locale": "*"
59
59
  },
60
- "gitHead": "46f40e7ec89f4173d660983a5f0368937d45bf9d"
60
+ "gitHead": "8c56d7a54d896a8cafea4a1e20311c325db19887"
61
61
  }
@@ -17,6 +17,8 @@ type HeroBlockProps = WithSupportProps<{
17
17
  title: string;
18
18
  /** Подзаголовок */
19
19
  subtitle: string;
20
+ /** Описание */
21
+ description?: string;
20
22
  /** ClassName для фоновой картинки */
21
23
  classNameImage?: string;
22
24
  /** Настройки кнопкок */
@@ -57,9 +59,14 @@ export function HeroCentral({
57
59
  classNameImage,
58
60
  tooltipText,
59
61
  tooltipPlacement,
62
+ description,
60
63
  backgroundImage = DEFAULT_BG_IMAGES,
61
64
  }: HeroBlockProps) {
62
- const { title: titleTypography, subtitle: subtitleTypography } = TYPOGRAPHY_BY_LAYOUT[layoutType];
65
+ const {
66
+ title: titleTypography,
67
+ subtitle: subtitleTypography,
68
+ description: descriptionTypography,
69
+ } = TYPOGRAPHY_BY_LAYOUT[layoutType];
63
70
 
64
71
  return (
65
72
  <section className={cn(styles.root, className)}>
@@ -77,6 +84,11 @@ export function HeroCentral({
77
84
  data-layout-type={layoutType}
78
85
  >
79
86
  <div className={styles.titles} data-layout-type={layoutType}>
87
+ {description && (
88
+ <Typography family='sans' {...descriptionTypography} className={styles.description} tag='h2'>
89
+ {description}
90
+ </Typography>
91
+ )}
80
92
  <Typography family='sans' {...titleTypography} className={styles.title} tag='h1'>
81
93
  <span dangerouslySetInnerHTML={{ __html: title }} />
82
94
  <HeroTooltip tooltipText={tooltipText} tooltipPlacement={tooltipPlacement} layoutType={layoutType} />
@@ -32,6 +32,11 @@
32
32
  color: ste.$sys-graphite-text-disabled;
33
33
  }
34
34
 
35
+ .description {
36
+ color: ste.$sys-graphite-on-accent;
37
+ max-width: 700px;
38
+ }
39
+
35
40
  .imageWrapper {
36
41
  margin: 0 auto;
37
42
  width: 100%;
@@ -2,17 +2,21 @@ export const TYPOGRAPHY_BY_LAYOUT = {
2
2
  mobile: {
3
3
  title: { purpose: 'headline', size: 'm' },
4
4
  subtitle: { purpose: 'title', size: 'm' },
5
+ description: { purpose: 'body', size: 'l' },
5
6
  },
6
7
  tablet: {
7
8
  title: { purpose: 'headline', size: 'l' },
8
9
  subtitle: { purpose: 'title', size: 'm' },
10
+ description: { purpose: 'body', size: 'l' },
9
11
  },
10
12
  desktop: {
11
13
  title: { purpose: 'display', size: 'm' },
12
14
  subtitle: { purpose: 'headline', size: 's' },
15
+ description: { purpose: 'body', size: 'l' },
13
16
  },
14
17
  desktopSmall: {
15
18
  title: { purpose: 'display', size: 'm' },
16
19
  subtitle: { purpose: 'headline', size: 's' },
20
+ description: { purpose: 'body', size: 'm' },
17
21
  },
18
22
  } as const;