@cloud-ru/uikit-product-site-article 1.2.11 → 1.2.12
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 +8 -0
- package/dist/cjs/components/ArticleLinks/ArticleLinks.js +1 -16
- package/dist/cjs/components/ArticleLinks/styles.module.css +14 -0
- package/dist/esm/components/ArticleLinks/ArticleLinks.js +1 -16
- package/dist/esm/components/ArticleLinks/styles.module.css +14 -0
- package/package.json +2 -2
- package/src/components/ArticleLinks/ArticleLinks.tsx +3 -21
- package/src/components/ArticleLinks/styles.module.scss +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.2.12 (2026-07-22)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @cloud-ru/uikit-product-site-article
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## 1.2.11 (2026-07-21)
|
|
7
15
|
|
|
8
16
|
### Only dependencies have been changed
|
|
@@ -5,24 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ArticleLinks = ArticleLinks;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const react_1 = require("react");
|
|
9
8
|
const typography_1 = require("@snack-uikit/typography");
|
|
10
9
|
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
11
10
|
function ArticleLinks(props) {
|
|
12
11
|
const { layoutType, links } = props;
|
|
13
|
-
|
|
14
|
-
if (layoutType === 'mobile') {
|
|
15
|
-
return {
|
|
16
|
-
family: 'sans',
|
|
17
|
-
purpose: 'title',
|
|
18
|
-
size: 'm',
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
return {
|
|
22
|
-
family: 'sans',
|
|
23
|
-
purpose: 'title',
|
|
24
|
-
size: 'l',
|
|
25
|
-
};
|
|
26
|
-
}, [layoutType]);
|
|
27
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.articleLinks, "data-layout-type": layoutType, children: [(0, jsx_runtime_1.jsx)(typography_1.Typography, Object.assign({ className: styles_module_scss_1.default.title }, typographyProps, { tag: 'div', children: "\u0421\u043E\u0434\u0435\u0440\u0436\u0430\u043D\u0438\u0435" })), (0, jsx_runtime_1.jsx)("ul", { className: styles_module_scss_1.default.list, "data-test-id": 'article-links', children: links.map(link => ((0, jsx_runtime_1.jsx)("li", { className: styles_module_scss_1.default.listItem, children: (0, jsx_runtime_1.jsx)("a", { className: styles_module_scss_1.default.link, href: `#${link.id}`, onClick: e => { var _a; return (_a = link.onClick) === null || _a === void 0 ? void 0 : _a.call(link, e); }, children: (0, jsx_runtime_1.jsx)(typography_1.Typography.SansBodyL, { children: link.text }) }) }, link.id))) })] }));
|
|
12
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.articleLinks, "data-layout-type": layoutType, children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.title, children: "\u0421\u043E\u0434\u0435\u0440\u0436\u0430\u043D\u0438\u0435" }), (0, jsx_runtime_1.jsx)("ul", { className: styles_module_scss_1.default.list, "data-test-id": 'article-links', children: links.map(link => ((0, jsx_runtime_1.jsx)("li", { className: styles_module_scss_1.default.listItem, children: (0, jsx_runtime_1.jsx)("a", { className: styles_module_scss_1.default.link, href: `#${link.id}`, onClick: e => { var _a; return (_a = link.onClick) === null || _a === void 0 ? void 0 : _a.call(link, e); }, children: (0, jsx_runtime_1.jsx)(typography_1.Typography.SansBodyL, { children: link.text }) }) }, link.id))) })] }));
|
|
28
13
|
}
|
|
@@ -8,9 +8,23 @@
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.title{
|
|
11
|
+
font-family:var(--sans-title-l-font-family, SB Sans Display);
|
|
12
|
+
font-weight:var(--sans-title-l-font-weight, Semibold);
|
|
13
|
+
line-height:var(--sans-title-l-line-height, 28px);
|
|
14
|
+
font-size:var(--sans-title-l-font-size, 22px);
|
|
15
|
+
letter-spacing:var(--sans-title-l-letter-spacing, 0px);
|
|
16
|
+
paragraph-spacing:var(--sans-title-l-paragraph-spacing, 12.1px);
|
|
11
17
|
color:var(--sys-neutral-text-main, #41424e);
|
|
12
18
|
margin-bottom:16px;
|
|
13
19
|
}
|
|
20
|
+
.articleLinks[data-layout-type=mobile] .title{
|
|
21
|
+
font-family:var(--sans-title-m-font-family, SB Sans Display);
|
|
22
|
+
font-weight:var(--sans-title-m-font-weight, Semibold);
|
|
23
|
+
line-height:var(--sans-title-m-line-height, 24px);
|
|
24
|
+
font-size:var(--sans-title-m-font-size, 16px);
|
|
25
|
+
letter-spacing:var(--sans-title-m-letter-spacing, 0px);
|
|
26
|
+
paragraph-spacing:var(--sans-title-m-paragraph-spacing, 8.8px);
|
|
27
|
+
}
|
|
14
28
|
|
|
15
29
|
.list{
|
|
16
30
|
margin:0;
|
|
@@ -1,22 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
2
|
import { Typography } from '@snack-uikit/typography';
|
|
4
3
|
import styles from './styles.module.css';
|
|
5
4
|
export function ArticleLinks(props) {
|
|
6
5
|
const { layoutType, links } = props;
|
|
7
|
-
|
|
8
|
-
if (layoutType === 'mobile') {
|
|
9
|
-
return {
|
|
10
|
-
family: 'sans',
|
|
11
|
-
purpose: 'title',
|
|
12
|
-
size: 'm',
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
return {
|
|
16
|
-
family: 'sans',
|
|
17
|
-
purpose: 'title',
|
|
18
|
-
size: 'l',
|
|
19
|
-
};
|
|
20
|
-
}, [layoutType]);
|
|
21
|
-
return (_jsxs("div", { className: styles.articleLinks, "data-layout-type": layoutType, children: [_jsx(Typography, Object.assign({ className: styles.title }, typographyProps, { tag: 'div', children: "\u0421\u043E\u0434\u0435\u0440\u0436\u0430\u043D\u0438\u0435" })), _jsx("ul", { className: styles.list, "data-test-id": 'article-links', children: links.map(link => (_jsx("li", { className: styles.listItem, children: _jsx("a", { className: styles.link, href: `#${link.id}`, onClick: e => { var _a; return (_a = link.onClick) === null || _a === void 0 ? void 0 : _a.call(link, e); }, children: _jsx(Typography.SansBodyL, { children: link.text }) }) }, link.id))) })] }));
|
|
6
|
+
return (_jsxs("div", { className: styles.articleLinks, "data-layout-type": layoutType, children: [_jsx("div", { className: styles.title, children: "\u0421\u043E\u0434\u0435\u0440\u0436\u0430\u043D\u0438\u0435" }), _jsx("ul", { className: styles.list, "data-test-id": 'article-links', children: links.map(link => (_jsx("li", { className: styles.listItem, children: _jsx("a", { className: styles.link, href: `#${link.id}`, onClick: e => { var _a; return (_a = link.onClick) === null || _a === void 0 ? void 0 : _a.call(link, e); }, children: _jsx(Typography.SansBodyL, { children: link.text }) }) }, link.id))) })] }));
|
|
22
7
|
}
|
|
@@ -8,9 +8,23 @@
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.title{
|
|
11
|
+
font-family:var(--sans-title-l-font-family, SB Sans Display);
|
|
12
|
+
font-weight:var(--sans-title-l-font-weight, Semibold);
|
|
13
|
+
line-height:var(--sans-title-l-line-height, 28px);
|
|
14
|
+
font-size:var(--sans-title-l-font-size, 22px);
|
|
15
|
+
letter-spacing:var(--sans-title-l-letter-spacing, 0px);
|
|
16
|
+
paragraph-spacing:var(--sans-title-l-paragraph-spacing, 12.1px);
|
|
11
17
|
color:var(--sys-neutral-text-main, #41424e);
|
|
12
18
|
margin-bottom:16px;
|
|
13
19
|
}
|
|
20
|
+
.articleLinks[data-layout-type=mobile] .title{
|
|
21
|
+
font-family:var(--sans-title-m-font-family, SB Sans Display);
|
|
22
|
+
font-weight:var(--sans-title-m-font-weight, Semibold);
|
|
23
|
+
line-height:var(--sans-title-m-line-height, 24px);
|
|
24
|
+
font-size:var(--sans-title-m-font-size, 16px);
|
|
25
|
+
letter-spacing:var(--sans-title-m-letter-spacing, 0px);
|
|
26
|
+
paragraph-spacing:var(--sans-title-m-paragraph-spacing, 8.8px);
|
|
27
|
+
}
|
|
14
28
|
|
|
15
29
|
.list{
|
|
16
30
|
margin:0;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloud-ru/uikit-product-site-article",
|
|
3
3
|
"title": "Site Article",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.12",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
7
7
|
"*.woff",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"@snack-uikit/utils": "4.0.0",
|
|
45
45
|
"classnames": "2.5.1"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "856720ac43c0af086de198bffa65e1af9f5efbc3"
|
|
48
48
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MouseEvent
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
2
|
|
|
3
3
|
import { WithLayoutType } from '@cloud-ru/uikit-product-utils';
|
|
4
|
-
import { Typography
|
|
4
|
+
import { Typography } from '@snack-uikit/typography';
|
|
5
5
|
|
|
6
6
|
import styles from './styles.module.scss';
|
|
7
7
|
|
|
@@ -18,27 +18,9 @@ export type ArticleLinksProps = WithLayoutType<{
|
|
|
18
18
|
export function ArticleLinks(props: ArticleLinksProps) {
|
|
19
19
|
const { layoutType, links } = props;
|
|
20
20
|
|
|
21
|
-
const typographyProps: TypographyProps = useMemo(() => {
|
|
22
|
-
if (layoutType === 'mobile') {
|
|
23
|
-
return {
|
|
24
|
-
family: 'sans',
|
|
25
|
-
purpose: 'title',
|
|
26
|
-
size: 'm',
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return {
|
|
31
|
-
family: 'sans',
|
|
32
|
-
purpose: 'title',
|
|
33
|
-
size: 'l',
|
|
34
|
-
};
|
|
35
|
-
}, [layoutType]);
|
|
36
|
-
|
|
37
21
|
return (
|
|
38
22
|
<div className={styles.articleLinks} data-layout-type={layoutType}>
|
|
39
|
-
<
|
|
40
|
-
Содержание
|
|
41
|
-
</Typography>
|
|
23
|
+
<div className={styles.title}>Содержание</div>
|
|
42
24
|
<ul className={styles.list} data-test-id='article-links'>
|
|
43
25
|
{links.map(link => (
|
|
44
26
|
<li className={styles.listItem} key={link.id}>
|
|
@@ -12,8 +12,14 @@
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.title {
|
|
15
|
+
@include var.composite-var(var.$sans-title-l);
|
|
16
|
+
|
|
15
17
|
color: var.$sys-neutral-text-main;
|
|
16
18
|
margin-bottom: 16px;
|
|
19
|
+
|
|
20
|
+
.articleLinks[data-layout-type='mobile'] & {
|
|
21
|
+
@include var.composite-var(var.$sans-title-m);
|
|
22
|
+
}
|
|
17
23
|
}
|
|
18
24
|
|
|
19
25
|
.list {
|