@cloud-ru/uikit-product-site-section 1.6.2-preview-cbb93940.0 → 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.
Files changed (20) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/cjs/components/SectionBenefits/SectionBenefits.js +1 -2
  3. package/dist/cjs/components/SectionBenefits/components/BenefitsButton/BenefitsButton.d.ts +10 -0
  4. package/dist/cjs/components/SectionBenefits/components/BenefitsButton/BenefitsButton.js +24 -0
  5. package/dist/cjs/components/SectionBenefits/components/BenefitsButton/index.d.ts +1 -0
  6. package/dist/cjs/components/SectionBenefits/components/BenefitsButton/index.js +17 -0
  7. package/dist/cjs/components/SectionBenefits/components/index.d.ts +1 -0
  8. package/dist/cjs/components/SectionBenefits/components/index.js +1 -0
  9. package/dist/esm/components/SectionBenefits/SectionBenefits.js +2 -3
  10. package/dist/esm/components/SectionBenefits/components/BenefitsButton/BenefitsButton.d.ts +10 -0
  11. package/dist/esm/components/SectionBenefits/components/BenefitsButton/BenefitsButton.js +21 -0
  12. package/dist/esm/components/SectionBenefits/components/BenefitsButton/index.d.ts +1 -0
  13. package/dist/esm/components/SectionBenefits/components/BenefitsButton/index.js +1 -0
  14. package/dist/esm/components/SectionBenefits/components/index.d.ts +1 -0
  15. package/dist/esm/components/SectionBenefits/components/index.js +1 -0
  16. package/package.json +3 -3
  17. package/src/components/SectionBenefits/SectionBenefits.tsx +3 -3
  18. package/src/components/SectionBenefits/components/BenefitsButton/BenefitsButton.tsx +29 -0
  19. package/src/components/SectionBenefits/components/BenefitsButton/index.ts +1 -0
  20. package/src/components/SectionBenefits/components/index.ts +1 -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.7.0 (2026-06-18)
7
+
8
+
9
+ ### Features
10
+
11
+ * **SITE-11464:** section benefits buttons with href ([e86742a](https://github.com/cloud-ru-tech/uikit-product/commit/e86742a257645e1fec5f58babbf2b9c0cca4629a))
12
+
13
+
14
+
15
+
16
+
6
17
  ## 1.6.1 (2026-06-15)
7
18
 
8
19
  ### Only dependencies have been changed
@@ -21,7 +21,6 @@ const uikit_product_site_cards_1 = require("@cloud-ru/uikit-product-site-cards")
21
21
  const uikit_product_site_grid_1 = require("@cloud-ru/uikit-product-site-grid");
22
22
  const uikit_product_utils_1 = require("@cloud-ru/uikit-product-utils");
23
23
  const typography_1 = require("@snack-uikit/typography");
24
- const helperComponents_1 = require("../../helperComponents");
25
24
  const SectionBasic_1 = require("../SectionBasic");
26
25
  const components_1 = require("./components");
27
26
  const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
@@ -52,5 +51,5 @@ function SectionBenefits(_a) {
52
51
  .map(({ cards }) => cards.map((card, index) => (0, jsx_runtime_1.jsx)(uikit_product_site_cards_1.CardProduct, Object.assign({ layoutType: layoutType }, card), index))), type === 'basic' &&
53
52
  content
54
53
  .filter(({ tabValue }) => tabValue === activeTab)
55
- .map(({ cards }) => cards.map((card, index) => (0, jsx_runtime_1.jsx)(uikit_product_site_cards_1.CardBasic, Object.assign({ layoutType: layoutType }, card), index)))] })), note && ((0, jsx_runtime_1.jsx)(typography_1.Typography.SansBodyM, { className: styles_module_scss_1.default.note, children: (0, jsx_runtime_1.jsx)("span", { dangerouslySetInnerHTML: { __html: note } }) })), buttons && ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.buttons, "data-buttons-align": buttonsAlign, children: buttons.map(button => (0, helperComponents_1.SectionButton)(button)) }))] })));
54
+ .map(({ cards }) => cards.map((card, index) => (0, jsx_runtime_1.jsx)(uikit_product_site_cards_1.CardBasic, Object.assign({ layoutType: layoutType }, card), index)))] })), note && ((0, jsx_runtime_1.jsx)(typography_1.Typography.SansBodyM, { className: styles_module_scss_1.default.note, children: (0, jsx_runtime_1.jsx)("span", { dangerouslySetInnerHTML: { __html: note } }) })), buttons && ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.buttons, "data-buttons-align": buttonsAlign, children: buttons.map(button => (0, components_1.BenefitsButton)(button)) }))] })));
56
55
  }
@@ -0,0 +1,10 @@
1
+ import { ButtonFilledProps } from '@snack-uikit/button';
2
+ type SectionButtonProps = {
3
+ label: string;
4
+ href?: string;
5
+ target?: ButtonFilledProps['target'];
6
+ onClick?: ButtonFilledProps['onClick'];
7
+ type?: 'brand' | 'outline';
8
+ };
9
+ export declare function BenefitsButton(button: SectionButtonProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.BenefitsButton = BenefitsButton;
15
+ const jsx_runtime_1 = require("react/jsx-runtime");
16
+ const uikit_product_icons_1 = require("@cloud-ru/uikit-product-icons");
17
+ const button_1 = require("@snack-uikit/button");
18
+ function BenefitsButton(button) {
19
+ const { type } = button, buttonProps = __rest(button, ["type"]);
20
+ if (type === 'outline') {
21
+ return ((0, jsx_runtime_1.jsx)(button_1.ButtonOutline, Object.assign({ size: 'l', href: button.href, appearance: 'neutral', icon: (0, jsx_runtime_1.jsx)(uikit_product_icons_1.ArrowLinksSVG, {}) }, buttonProps), button.label));
22
+ }
23
+ return (0, jsx_runtime_1.jsx)(button_1.ButtonFilled, Object.assign({ size: 'l', href: button.href }, buttonProps), button.label);
24
+ }
@@ -0,0 +1 @@
1
+ export * from './BenefitsButton';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./BenefitsButton"), exports);
@@ -1 +1,2 @@
1
1
  export * from './CardNumeric';
2
+ export * from './BenefitsButton';
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./CardNumeric"), exports);
18
+ __exportStar(require("./BenefitsButton"), exports);
@@ -15,9 +15,8 @@ import { CardBasic, CardInfo, CardProduct } from '@cloud-ru/uikit-product-site-c
15
15
  import { Grid } from '@cloud-ru/uikit-product-site-grid';
16
16
  import { extractSupportProps } from '@cloud-ru/uikit-product-utils';
17
17
  import { Typography } from '@snack-uikit/typography';
18
- import { SectionButton } from '../../helperComponents';
19
18
  import { SectionBasic } from '../SectionBasic';
20
- import { CardNumeric } from './components';
19
+ import { BenefitsButton, CardNumeric } from './components';
21
20
  import styles from './styles.module.css';
22
21
  export function SectionBenefits(_a) {
23
22
  var { id, title, titleTag, subtitle, subtitleTag, description, type, content, tabBarItems, columnsConfig, layoutType, buttons, note, backgroundColor, buttonsAlign = 'left' } = _a, rest = __rest(_a, ["id", "title", "titleTag", "subtitle", "subtitleTag", "description", "type", "content", "tabBarItems", "columnsConfig", "layoutType", "buttons", "note", "backgroundColor", "buttonsAlign"]);
@@ -46,5 +45,5 @@ export function SectionBenefits(_a) {
46
45
  .map(({ cards }) => cards.map((card, index) => _jsx(CardProduct, Object.assign({ layoutType: layoutType }, card), index))), type === 'basic' &&
47
46
  content
48
47
  .filter(({ tabValue }) => tabValue === activeTab)
49
- .map(({ cards }) => cards.map((card, index) => _jsx(CardBasic, Object.assign({ layoutType: layoutType }, card), index)))] })), note && (_jsx(Typography.SansBodyM, { className: styles.note, children: _jsx("span", { dangerouslySetInnerHTML: { __html: note } }) })), buttons && (_jsx("div", { className: styles.buttons, "data-buttons-align": buttonsAlign, children: buttons.map(button => SectionButton(button)) }))] })));
48
+ .map(({ cards }) => cards.map((card, index) => _jsx(CardBasic, Object.assign({ layoutType: layoutType }, card), index)))] })), note && (_jsx(Typography.SansBodyM, { className: styles.note, children: _jsx("span", { dangerouslySetInnerHTML: { __html: note } }) })), buttons && (_jsx("div", { className: styles.buttons, "data-buttons-align": buttonsAlign, children: buttons.map(button => BenefitsButton(button)) }))] })));
50
49
  }
@@ -0,0 +1,10 @@
1
+ import { ButtonFilledProps } from '@snack-uikit/button';
2
+ type SectionButtonProps = {
3
+ label: string;
4
+ href?: string;
5
+ target?: ButtonFilledProps['target'];
6
+ onClick?: ButtonFilledProps['onClick'];
7
+ type?: 'brand' | 'outline';
8
+ };
9
+ export declare function BenefitsButton(button: SectionButtonProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,21 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { ArrowLinksSVG } from '@cloud-ru/uikit-product-icons';
14
+ import { ButtonFilled, ButtonOutline } from '@snack-uikit/button';
15
+ export function BenefitsButton(button) {
16
+ const { type } = button, buttonProps = __rest(button, ["type"]);
17
+ if (type === 'outline') {
18
+ return (_jsx(ButtonOutline, Object.assign({ size: 'l', href: button.href, appearance: 'neutral', icon: _jsx(ArrowLinksSVG, {}) }, buttonProps), button.label));
19
+ }
20
+ return _jsx(ButtonFilled, Object.assign({ size: 'l', href: button.href }, buttonProps), button.label);
21
+ }
@@ -0,0 +1 @@
1
+ export * from './BenefitsButton';
@@ -0,0 +1 @@
1
+ export * from './BenefitsButton';
@@ -1 +1,2 @@
1
1
  export * from './CardNumeric';
2
+ export * from './BenefitsButton';
@@ -1 +1,2 @@
1
1
  export * from './CardNumeric';
2
+ export * from './BenefitsButton';
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.6.2-preview-cbb93940.0",
4
+ "version": "1.7.0",
5
5
  "sideEffects": [
6
6
  "*.css",
7
7
  "*.woff",
@@ -37,7 +37,7 @@
37
37
  "scripts": {},
38
38
  "dependencies": {
39
39
  "@cloud-ru/uikit-product-icons": "17.5.0",
40
- "@cloud-ru/uikit-product-mobile-fields": "2.2.2-preview-cbb93940.0",
40
+ "@cloud-ru/uikit-product-mobile-fields": "2.2.1",
41
41
  "@cloud-ru/uikit-product-site-cards": "1.3.1",
42
42
  "@cloud-ru/uikit-product-site-case-card": "1.2.3",
43
43
  "@cloud-ru/uikit-product-site-grid": "1.1.3",
@@ -67,5 +67,5 @@
67
67
  "@cloud-ru/uikit-product-locale": "*",
68
68
  "@snack-uikit/figma-tokens": "*"
69
69
  },
70
- "gitHead": "44b53c295315c3d4f779ab1bfbffe418f6886c5c"
70
+ "gitHead": "4aa36e044c8f063a246474132e66d71061f2f9df"
71
71
  }
@@ -5,11 +5,11 @@ import { Grid, GridProps } from '@cloud-ru/uikit-product-site-grid';
5
5
  import { extractSupportProps, WithLayoutType, WithSupportProps } from '@cloud-ru/uikit-product-utils';
6
6
  import { Typography } from '@snack-uikit/typography';
7
7
 
8
- import { SectionButton, SectionTitleProps } from '../../helperComponents';
8
+ import { SectionTitleProps } from '../../helperComponents';
9
9
  import { SectionButtonProps } from '../../helperComponents/SectionButton/types';
10
10
  import { SectionColor } from '../../types';
11
11
  import { SectionBasic } from '../SectionBasic';
12
- import { CardNumeric } from './components';
12
+ import { BenefitsButton, CardNumeric } from './components';
13
13
  import styles from './styles.module.scss';
14
14
  import { ContentBasic, ContentInfo, ContentNumeric, ContentProduct } from './types';
15
15
 
@@ -155,7 +155,7 @@ export function SectionBenefits({
155
155
 
156
156
  {buttons && (
157
157
  <div className={styles.buttons} data-buttons-align={buttonsAlign}>
158
- {buttons.map(button => SectionButton(button))}
158
+ {buttons.map(button => BenefitsButton(button))}
159
159
  </div>
160
160
  )}
161
161
  </SectionBasic>
@@ -0,0 +1,29 @@
1
+ import { ArrowLinksSVG } from '@cloud-ru/uikit-product-icons';
2
+ import { ButtonFilled, ButtonFilledProps, ButtonOutline } from '@snack-uikit/button';
3
+
4
+ type SectionButtonProps = {
5
+ label: string;
6
+ href?: string;
7
+ target?: ButtonFilledProps['target'];
8
+ onClick?: ButtonFilledProps['onClick'];
9
+ type?: 'brand' | 'outline';
10
+ };
11
+
12
+ export function BenefitsButton(button: SectionButtonProps) {
13
+ const { type, ...buttonProps } = button;
14
+
15
+ if (type === 'outline') {
16
+ return (
17
+ <ButtonOutline
18
+ key={button.label}
19
+ size='l'
20
+ href={button.href}
21
+ appearance='neutral'
22
+ icon={<ArrowLinksSVG />}
23
+ {...buttonProps}
24
+ />
25
+ );
26
+ }
27
+
28
+ return <ButtonFilled key={button.label} size='l' href={button.href} {...buttonProps} />;
29
+ }
@@ -0,0 +1 @@
1
+ export * from './BenefitsButton';
@@ -1 +1,2 @@
1
1
  export * from './CardNumeric';
2
+ export * from './BenefitsButton';