@cloud-ru/uikit-product-site-article 0.2.2 → 0.2.3
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/dist/cjs/components/ArticleLinks/ArticleLinks.d.ts +11 -0
- package/dist/cjs/components/ArticleLinks/ArticleLinks.js +28 -0
- package/dist/cjs/components/ArticleLinks/index.d.ts +1 -0
- package/dist/cjs/components/ArticleLinks/index.js +17 -0
- package/dist/cjs/components/ArticleLinks/styles.module.css +32 -0
- package/dist/cjs/components/ArticleRichText/ArticleRichText.d.ts +5 -0
- package/dist/cjs/components/ArticleRichText/ArticleRichText.js +13 -0
- package/dist/cjs/components/ArticleRichText/index.d.ts +1 -0
- package/dist/cjs/components/ArticleRichText/index.js +17 -0
- package/dist/cjs/components/ArticleRichText/styles.module.css +36 -0
- package/dist/cjs/components/ArticleTypography/ArticleTypography.d.ts +13 -0
- package/dist/cjs/components/ArticleTypography/ArticleTypography.js +17 -0
- package/dist/cjs/components/ArticleTypography/index.d.ts +1 -0
- package/dist/cjs/components/ArticleTypography/index.js +17 -0
- package/dist/cjs/components/ArticleTypography/styles.module.css +32 -0
- package/dist/cjs/components/DropdownShare/DropdownShare.d.ts +16 -0
- package/dist/cjs/components/DropdownShare/DropdownShare.js +43 -0
- package/dist/cjs/components/DropdownShare/index.d.ts +1 -0
- package/dist/cjs/components/DropdownShare/index.js +17 -0
- package/dist/cjs/components/FooterArticle/FooterArticle.d.ts +7 -0
- package/dist/cjs/components/FooterArticle/FooterArticle.js +15 -0
- package/dist/cjs/components/FooterArticle/index.d.ts +1 -0
- package/dist/cjs/components/FooterArticle/index.js +17 -0
- package/dist/cjs/components/FooterArticle/styles.module.css +10 -0
- package/dist/cjs/components/Highlight/Highlight.d.ts +5 -0
- package/dist/cjs/components/Highlight/Highlight.js +13 -0
- package/dist/cjs/components/Highlight/index.d.ts +1 -0
- package/dist/cjs/components/Highlight/index.js +17 -0
- package/dist/cjs/components/Highlight/styles.module.css +6 -0
- package/dist/cjs/components/ImageArticle/ImageArticle.d.ts +8 -0
- package/dist/cjs/components/ImageArticle/ImageArticle.js +14 -0
- package/dist/cjs/components/ImageArticle/index.d.ts +1 -0
- package/dist/cjs/components/ImageArticle/index.js +17 -0
- package/dist/cjs/components/ImageArticle/styles.module.css +10 -0
- package/dist/cjs/components/Products/Products.d.ts +13 -0
- package/dist/cjs/components/Products/Products.js +14 -0
- package/dist/cjs/components/Products/helperComponents/ServiceLight/ServiceLight.d.ts +4 -0
- package/dist/cjs/components/Products/helperComponents/ServiceLight/ServiceLight.js +13 -0
- package/dist/cjs/components/Products/helperComponents/ServiceLight/index.d.ts +1 -0
- package/dist/cjs/components/Products/helperComponents/ServiceLight/index.js +17 -0
- package/dist/cjs/components/Products/helperComponents/ServiceLight/styles.module.css +9 -0
- package/dist/cjs/components/Products/helperComponents/index.d.ts +1 -0
- package/dist/cjs/components/Products/helperComponents/index.js +17 -0
- package/dist/cjs/components/Products/index.d.ts +1 -0
- package/dist/cjs/components/Products/index.js +17 -0
- package/dist/cjs/components/Products/styles.module.css +29 -0
- package/dist/cjs/components/Quote/Quote.d.ts +8 -0
- package/dist/cjs/components/Quote/Quote.js +30 -0
- package/dist/cjs/components/Quote/QuotesSVG.d.ts +3 -0
- package/dist/cjs/components/Quote/QuotesSVG.js +7 -0
- package/dist/cjs/components/Quote/index.d.ts +1 -0
- package/dist/cjs/components/Quote/index.js +17 -0
- package/dist/cjs/components/Quote/styles.module.css +51 -0
- package/dist/cjs/components/index.d.ts +9 -0
- package/dist/cjs/components/index.js +25 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +17 -0
- package/dist/esm/components/ArticleLinks/ArticleLinks.d.ts +11 -0
- package/dist/esm/components/ArticleLinks/ArticleLinks.js +22 -0
- package/dist/esm/components/ArticleLinks/index.d.ts +1 -0
- package/dist/esm/components/ArticleLinks/index.js +1 -0
- package/dist/esm/components/ArticleLinks/styles.module.css +32 -0
- package/dist/esm/components/ArticleRichText/ArticleRichText.d.ts +5 -0
- package/dist/esm/components/ArticleRichText/ArticleRichText.js +7 -0
- package/dist/esm/components/ArticleRichText/index.d.ts +1 -0
- package/dist/esm/components/ArticleRichText/index.js +1 -0
- package/dist/esm/components/ArticleRichText/styles.module.css +36 -0
- package/dist/esm/components/ArticleTypography/ArticleTypography.d.ts +13 -0
- package/dist/esm/components/ArticleTypography/ArticleTypography.js +11 -0
- package/dist/esm/components/ArticleTypography/index.d.ts +1 -0
- package/dist/esm/components/ArticleTypography/index.js +1 -0
- package/dist/esm/components/ArticleTypography/styles.module.css +32 -0
- package/dist/esm/components/DropdownShare/DropdownShare.d.ts +16 -0
- package/dist/esm/components/DropdownShare/DropdownShare.js +40 -0
- package/dist/esm/components/DropdownShare/index.d.ts +1 -0
- package/dist/esm/components/DropdownShare/index.js +1 -0
- package/dist/esm/components/FooterArticle/FooterArticle.d.ts +7 -0
- package/dist/esm/components/FooterArticle/FooterArticle.js +9 -0
- package/dist/esm/components/FooterArticle/index.d.ts +1 -0
- package/dist/esm/components/FooterArticle/index.js +1 -0
- package/dist/esm/components/FooterArticle/styles.module.css +10 -0
- package/dist/esm/components/Highlight/Highlight.d.ts +5 -0
- package/dist/esm/components/Highlight/Highlight.js +7 -0
- package/dist/esm/components/Highlight/index.d.ts +1 -0
- package/dist/esm/components/Highlight/index.js +1 -0
- package/dist/esm/components/Highlight/styles.module.css +6 -0
- package/dist/esm/components/ImageArticle/ImageArticle.d.ts +8 -0
- package/dist/esm/components/ImageArticle/ImageArticle.js +8 -0
- package/dist/esm/components/ImageArticle/index.d.ts +1 -0
- package/dist/esm/components/ImageArticle/index.js +1 -0
- package/dist/esm/components/ImageArticle/styles.module.css +10 -0
- package/dist/esm/components/Products/Products.d.ts +13 -0
- package/dist/esm/components/Products/Products.js +8 -0
- package/dist/esm/components/Products/helperComponents/ServiceLight/ServiceLight.d.ts +4 -0
- package/dist/esm/components/Products/helperComponents/ServiceLight/ServiceLight.js +7 -0
- package/dist/esm/components/Products/helperComponents/ServiceLight/index.d.ts +1 -0
- package/dist/esm/components/Products/helperComponents/ServiceLight/index.js +1 -0
- package/dist/esm/components/Products/helperComponents/ServiceLight/styles.module.css +9 -0
- package/dist/esm/components/Products/helperComponents/index.d.ts +1 -0
- package/dist/esm/components/Products/helperComponents/index.js +1 -0
- package/dist/esm/components/Products/index.d.ts +1 -0
- package/dist/esm/components/Products/index.js +1 -0
- package/dist/esm/components/Products/styles.module.css +29 -0
- package/dist/esm/components/Quote/Quote.d.ts +8 -0
- package/dist/esm/components/Quote/Quote.js +24 -0
- package/dist/esm/components/Quote/QuotesSVG.d.ts +3 -0
- package/dist/esm/components/Quote/QuotesSVG.js +4 -0
- package/dist/esm/components/Quote/index.d.ts +1 -0
- package/dist/esm/components/Quote/index.js +1 -0
- package/dist/esm/components/Quote/styles.module.css +51 -0
- package/dist/esm/components/index.d.ts +9 -0
- package/dist/esm/components/index.js +9 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/package.json +3 -2
|
@@ -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("./ServiceLight"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Products';
|
|
@@ -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("./Products"), exports);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.products{
|
|
2
|
+
box-sizing:border-box;
|
|
3
|
+
display:flex;
|
|
4
|
+
flex-direction:column;
|
|
5
|
+
gap:24px;
|
|
6
|
+
}
|
|
7
|
+
.products[data-layout-type=tablet]{
|
|
8
|
+
gap:20px;
|
|
9
|
+
}
|
|
10
|
+
.products[data-layout-type=mobile]{
|
|
11
|
+
gap:12px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.label{
|
|
15
|
+
display:block;
|
|
16
|
+
color:var(--sys-neutral-text-main, #41424e);
|
|
17
|
+
margin-bottom:8px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.tags{
|
|
21
|
+
display:flex;
|
|
22
|
+
flex-wrap:wrap;
|
|
23
|
+
gap:16px;
|
|
24
|
+
}
|
|
25
|
+
.tags[data-layout-type=mobile]{
|
|
26
|
+
flex-wrap:nowrap;
|
|
27
|
+
flex-direction:column;
|
|
28
|
+
gap:12px;
|
|
29
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WithLayoutType } from '@sbercloud/uikit-product-utils';
|
|
2
|
+
export type QuoteProps = WithLayoutType<{
|
|
3
|
+
text: string;
|
|
4
|
+
image?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
position?: string;
|
|
7
|
+
}>;
|
|
8
|
+
export declare function Quote(props: QuoteProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Quote = Quote;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const typography_1 = require("@snack-uikit/typography");
|
|
10
|
+
const ArticleTypography_1 = require("../ArticleTypography");
|
|
11
|
+
const QuotesSVG_1 = require("./QuotesSVG");
|
|
12
|
+
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
13
|
+
function Quote(props) {
|
|
14
|
+
const { text, image, name, position, layoutType } = props;
|
|
15
|
+
const typographyProps = (0, react_1.useMemo)(() => {
|
|
16
|
+
if (layoutType === 'mobile') {
|
|
17
|
+
return {
|
|
18
|
+
family: 'sans',
|
|
19
|
+
purpose: 'body',
|
|
20
|
+
size: 'm',
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
family: 'sans',
|
|
25
|
+
purpose: 'body',
|
|
26
|
+
size: 'l',
|
|
27
|
+
};
|
|
28
|
+
}, [layoutType]);
|
|
29
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.quote, "data-layout-type": layoutType, "data-test-id": 'quote', children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.iconWrapper, "data-layout-type": layoutType, children: (0, jsx_runtime_1.jsx)(QuotesSVG_1.QuotesSVG, { className: styles_module_scss_1.default.icon }) }), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.wrapper, children: [(0, jsx_runtime_1.jsx)(ArticleTypography_1.ArticleTypography, { className: styles_module_scss_1.default.text, layoutType: layoutType, tag: 'p', type: 'body', children: text }), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.author, "data-layout-type": layoutType, children: [image && (0, jsx_runtime_1.jsx)("img", { className: styles_module_scss_1.default.authorImage, src: image, alt: '\u0424\u043E\u0442\u043E \u0430\u0432\u0442\u043E\u0440\u0430 \u0446\u0438\u0442\u0430\u0442\u044B' }), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.authorNameWrapper, children: [name && ((0, jsx_runtime_1.jsx)(ArticleTypography_1.ArticleTypography, { className: styles_module_scss_1.default.authorName, layoutType: layoutType, tag: 'span', type: 'bodyBold', children: name })), position && ((0, jsx_runtime_1.jsx)(typography_1.Typography, Object.assign({}, typographyProps, { className: styles_module_scss_1.default.authorPosition, children: position })))] })] })] })] }));
|
|
30
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QuotesSVG = QuotesSVG;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
function QuotesSVG({ className }) {
|
|
6
|
+
return ((0, jsx_runtime_1.jsx)("svg", { width: '72', height: '64', viewBox: '0 0 72 64', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', className: className, children: (0, jsx_runtime_1.jsx)("g", { id: 'Quotes', children: (0, jsx_runtime_1.jsxs)("g", { id: 'Vector', children: [(0, jsx_runtime_1.jsx)("path", { id: 'Vector 1', d: 'M0 51.7263L14.5187 12.2738H35.8522L27.5559 51.7263H0Z', fill: '#DDE0EA' }), (0, jsx_runtime_1.jsx)("path", { id: 'Vector 2', d: 'M36.1484 51.7263L50.6671 12.2738H72.0007L63.7043 51.7263H36.1484Z', fill: '#DDE0EA' })] }) }) }));
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Quote';
|
|
@@ -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("./Quote"), exports);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
.quote{
|
|
2
|
+
box-sizing:border-box;
|
|
3
|
+
display:flex;
|
|
4
|
+
gap:32px;
|
|
5
|
+
}
|
|
6
|
+
.quote[data-layout-type=mobile]{
|
|
7
|
+
gap:16px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.iconWrapper[data-layout-type=mobile]{
|
|
11
|
+
width:48px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.icon{
|
|
15
|
+
width:inherit;
|
|
16
|
+
height:inherit;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.wrapper{
|
|
20
|
+
display:flex;
|
|
21
|
+
flex-direction:column;
|
|
22
|
+
padding:16px 0;
|
|
23
|
+
gap:16px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.text{
|
|
27
|
+
color:var(--sys-neutral-text-main, #41424e);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.author{
|
|
31
|
+
display:flex;
|
|
32
|
+
gap:12px;
|
|
33
|
+
}
|
|
34
|
+
.author[data-layout-type=mobile]{
|
|
35
|
+
flex-direction:column;
|
|
36
|
+
}
|
|
37
|
+
.author .authorImage{
|
|
38
|
+
border:var(--border-width-general-xs, 1px) solid var(--sys-neutral-decor-default, #dde0ea);
|
|
39
|
+
width:48px;
|
|
40
|
+
height:48px;
|
|
41
|
+
}
|
|
42
|
+
.author .authorNameWrapper{
|
|
43
|
+
display:flex;
|
|
44
|
+
flex-direction:column;
|
|
45
|
+
}
|
|
46
|
+
.author .authorNameWrapper .authorName{
|
|
47
|
+
color:var(--sys-neutral-text-main, #41424e);
|
|
48
|
+
}
|
|
49
|
+
.author .authorNameWrapper .authorPosition{
|
|
50
|
+
color:var(--sys-neutral-text-light, #8b8e9b);
|
|
51
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './Highlight';
|
|
2
|
+
export * from './Quote';
|
|
3
|
+
export * from './ImageArticle';
|
|
4
|
+
export * from './ArticleLinks';
|
|
5
|
+
export * from './Products';
|
|
6
|
+
export * from './ArticleRichText';
|
|
7
|
+
export * from './ArticleTypography';
|
|
8
|
+
export * from './DropdownShare';
|
|
9
|
+
export * from './FooterArticle';
|
|
@@ -0,0 +1,25 @@
|
|
|
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("./Highlight"), exports);
|
|
18
|
+
__exportStar(require("./Quote"), exports);
|
|
19
|
+
__exportStar(require("./ImageArticle"), exports);
|
|
20
|
+
__exportStar(require("./ArticleLinks"), exports);
|
|
21
|
+
__exportStar(require("./Products"), exports);
|
|
22
|
+
__exportStar(require("./ArticleRichText"), exports);
|
|
23
|
+
__exportStar(require("./ArticleTypography"), exports);
|
|
24
|
+
__exportStar(require("./DropdownShare"), exports);
|
|
25
|
+
__exportStar(require("./FooterArticle"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -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("./components"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
import { WithLayoutType } from '@sbercloud/uikit-product-utils';
|
|
3
|
+
export type ArticleLink = {
|
|
4
|
+
id: string;
|
|
5
|
+
text: string;
|
|
6
|
+
onClick?: (e: MouseEvent<HTMLAnchorElement>) => void;
|
|
7
|
+
};
|
|
8
|
+
export type ArticleLinksProps = WithLayoutType<{
|
|
9
|
+
links: ArticleLink[];
|
|
10
|
+
}>;
|
|
11
|
+
export declare function ArticleLinks(props: ArticleLinksProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { Typography } from '@snack-uikit/typography';
|
|
4
|
+
import styles from './styles.module.css';
|
|
5
|
+
export function ArticleLinks(props) {
|
|
6
|
+
const { layoutType, links } = props;
|
|
7
|
+
const typographyProps = useMemo(() => {
|
|
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, 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))) })] }));
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ArticleLinks';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ArticleLinks';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.articleLinks{
|
|
2
|
+
box-sizing:border-box;
|
|
3
|
+
padding:24px;
|
|
4
|
+
border:var(--border-width-general-xs, 1px) var(--border-styles-solid, solid) var(--sys-neutral-decor-default, #dde0ea);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.title{
|
|
8
|
+
color:var(--sys-neutral-text-main, #41424e);
|
|
9
|
+
margin-bottom:16px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.list{
|
|
13
|
+
margin:0;
|
|
14
|
+
padding:0 0 0 20px;
|
|
15
|
+
display:flex;
|
|
16
|
+
flex-direction:column;
|
|
17
|
+
gap:16px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.link{
|
|
21
|
+
color:var(--sys-primary-text-light, #0ea55b);
|
|
22
|
+
text-decoration:none;
|
|
23
|
+
}
|
|
24
|
+
.link:hover{
|
|
25
|
+
text-decoration-line:underline;
|
|
26
|
+
text-decoration-style:solid;
|
|
27
|
+
-webkit-text-decoration-skip:ink;
|
|
28
|
+
text-decoration-skip-ink:auto;
|
|
29
|
+
text-decoration-thickness:auto;
|
|
30
|
+
text-underline-offset:auto;
|
|
31
|
+
text-underline-position:from-font;
|
|
32
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ArticleTypography } from '../ArticleTypography';
|
|
3
|
+
import styles from './styles.module.css';
|
|
4
|
+
export function ArticleRichText(props) {
|
|
5
|
+
const { layoutType, richText } = props;
|
|
6
|
+
return (_jsx(ArticleTypography, { layoutType: layoutType, tag: 'div', type: 'body', children: _jsx("div", { className: styles.richText, dangerouslySetInnerHTML: { __html: richText } }) }));
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ArticleRichText';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ArticleRichText';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.richText{
|
|
2
|
+
display:flex;
|
|
3
|
+
flex-direction:column;
|
|
4
|
+
gap:24px;
|
|
5
|
+
}
|
|
6
|
+
.richText *{
|
|
7
|
+
color:var(--sys-neutral-text-main, #41424e);
|
|
8
|
+
}
|
|
9
|
+
.richText p{
|
|
10
|
+
margin:0;
|
|
11
|
+
}
|
|
12
|
+
.richText p:has(br){
|
|
13
|
+
line-height:24px;
|
|
14
|
+
}
|
|
15
|
+
.richText b,
|
|
16
|
+
.richText strong{
|
|
17
|
+
font-weight:600;
|
|
18
|
+
}
|
|
19
|
+
.richText a{
|
|
20
|
+
color:var(--sys-primary-text-light, #0ea55b);
|
|
21
|
+
text-decoration:none;
|
|
22
|
+
}
|
|
23
|
+
.richText a:hover{
|
|
24
|
+
text-decoration-line:underline;
|
|
25
|
+
text-decoration-style:solid;
|
|
26
|
+
-webkit-text-decoration-skip:ink;
|
|
27
|
+
text-decoration-skip-ink:auto;
|
|
28
|
+
text-decoration-thickness:auto;
|
|
29
|
+
text-underline-offset:auto;
|
|
30
|
+
text-underline-position:from-font;
|
|
31
|
+
}
|
|
32
|
+
.richText ul,
|
|
33
|
+
.richText ol{
|
|
34
|
+
margin:0;
|
|
35
|
+
padding:0 0 0 20px;
|
|
36
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { WithLayoutType } from '@sbercloud/uikit-product-utils';
|
|
3
|
+
export type ArticleTypographyProps = WithLayoutType<{
|
|
4
|
+
className?: string;
|
|
5
|
+
tag: 'span' | 'div' | 'p';
|
|
6
|
+
type: 'body' | 'bodyBold' | 'bodyLink';
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}>;
|
|
9
|
+
export declare function ArticleTypography(props: ArticleTypographyProps): import("react").DetailedReactHTMLElement<{
|
|
10
|
+
className: string;
|
|
11
|
+
'data-layout-type': import("@sbercloud/uikit-product-utils").LayoutType;
|
|
12
|
+
'data-type': "body" | "bodyBold" | "bodyLink";
|
|
13
|
+
}, HTMLElement>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import cn from 'classnames';
|
|
2
|
+
import { createElement } from 'react';
|
|
3
|
+
import styles from './styles.module.css';
|
|
4
|
+
export function ArticleTypography(props) {
|
|
5
|
+
const { tag, className, layoutType, type, children } = props;
|
|
6
|
+
return createElement(tag, {
|
|
7
|
+
className: cn(styles.typography, className),
|
|
8
|
+
'data-layout-type': layoutType,
|
|
9
|
+
'data-type': type,
|
|
10
|
+
}, children);
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ArticleTypography';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ArticleTypography';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.typography{
|
|
2
|
+
box-sizing:border-box;
|
|
3
|
+
max-width:100%;
|
|
4
|
+
margin:0;
|
|
5
|
+
padding:0;
|
|
6
|
+
overflow-wrap:break-word;
|
|
7
|
+
font-family:"SB Sans Text";
|
|
8
|
+
font-size:18px;
|
|
9
|
+
font-style:normal;
|
|
10
|
+
font-weight:400;
|
|
11
|
+
line-height:26px;
|
|
12
|
+
}
|
|
13
|
+
.typography[data-type=bodyBold]{
|
|
14
|
+
font-weight:600;
|
|
15
|
+
}
|
|
16
|
+
.typography[data-type=bodyLink]{
|
|
17
|
+
color:var(--sys-primary-text-light, #0ea55b);
|
|
18
|
+
text-decoration:none;
|
|
19
|
+
}
|
|
20
|
+
.typography[data-type=bodyLink]:hover{
|
|
21
|
+
text-decoration-line:underline;
|
|
22
|
+
text-decoration-style:solid;
|
|
23
|
+
-webkit-text-decoration-skip:ink;
|
|
24
|
+
text-decoration-skip-ink:auto;
|
|
25
|
+
text-decoration-thickness:auto;
|
|
26
|
+
text-underline-offset:auto;
|
|
27
|
+
text-underline-position:from-font;
|
|
28
|
+
}
|
|
29
|
+
.typography[data-layout-type=mobile]{
|
|
30
|
+
font-size:16px;
|
|
31
|
+
line-height:24px;
|
|
32
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ValueOf } from '@snack-uikit/utils';
|
|
2
|
+
declare const SHARE_OPTIONS_TYPE: {
|
|
3
|
+
Telegram: string;
|
|
4
|
+
VK: string;
|
|
5
|
+
Copy: string;
|
|
6
|
+
};
|
|
7
|
+
export type DropdownShareOption = {
|
|
8
|
+
type: ValueOf<typeof SHARE_OPTIONS_TYPE>;
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
};
|
|
11
|
+
export type DropdownShareProps = {
|
|
12
|
+
hideLabel?: boolean;
|
|
13
|
+
options: DropdownShareOption[];
|
|
14
|
+
};
|
|
15
|
+
export declare function DropdownShare(props: DropdownShareProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { LinkSVG, ShareSVG, TelegramSVG, VkSVG } from '@sbercloud/uikit-product-icons';
|
|
3
|
+
import { ButtonFunction } from '@snack-uikit/button';
|
|
4
|
+
import { Droplist } from '@snack-uikit/list';
|
|
5
|
+
const SHARE_OPTIONS_TYPE = {
|
|
6
|
+
Telegram: 'telegram',
|
|
7
|
+
VK: 'vk',
|
|
8
|
+
Copy: 'copy',
|
|
9
|
+
};
|
|
10
|
+
export function DropdownShare(props) {
|
|
11
|
+
const { hideLabel, options } = props;
|
|
12
|
+
const items = options.map(({ type, onClick }) => {
|
|
13
|
+
switch (type) {
|
|
14
|
+
case SHARE_OPTIONS_TYPE.Telegram:
|
|
15
|
+
return {
|
|
16
|
+
id: 'telegram',
|
|
17
|
+
content: { option: 'Telegram' },
|
|
18
|
+
beforeContent: _jsx(TelegramSVG, {}),
|
|
19
|
+
onClick,
|
|
20
|
+
};
|
|
21
|
+
case SHARE_OPTIONS_TYPE.VK:
|
|
22
|
+
return {
|
|
23
|
+
id: 'vk',
|
|
24
|
+
content: { option: 'VK' },
|
|
25
|
+
beforeContent: _jsx(VkSVG, {}),
|
|
26
|
+
onClick,
|
|
27
|
+
};
|
|
28
|
+
case SHARE_OPTIONS_TYPE.Copy:
|
|
29
|
+
return {
|
|
30
|
+
id: 'copy',
|
|
31
|
+
content: { option: 'Копировать ссылку' },
|
|
32
|
+
beforeContent: _jsx(LinkSVG, {}),
|
|
33
|
+
onClick,
|
|
34
|
+
};
|
|
35
|
+
default:
|
|
36
|
+
return {};
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
return (_jsx(Droplist, { items: items, size: 'l', closeDroplistOnItemClick: true, children: _jsx(ButtonFunction, { size: 'm', label: !hideLabel ? 'Поделиться' : undefined, icon: _jsx(ShareSVG, {}), "data-test-id": 'dropdown-share-button' }) }));
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DropdownShare';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DropdownShare';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WithLayoutType } from '@sbercloud/uikit-product-utils';
|
|
2
|
+
import { DropdownShareOption } from '../DropdownShare';
|
|
3
|
+
export type FooterArticleProps = WithLayoutType<{
|
|
4
|
+
releaseDate: string;
|
|
5
|
+
dropdownOptions: DropdownShareOption[];
|
|
6
|
+
}>;
|
|
7
|
+
export declare function FooterArticle(props: FooterArticleProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Typography } from '@snack-uikit/typography';
|
|
3
|
+
import { DropdownShare } from '../DropdownShare';
|
|
4
|
+
import styles from './styles.module.css';
|
|
5
|
+
export function FooterArticle(props) {
|
|
6
|
+
const { layoutType, releaseDate, dropdownOptions } = props;
|
|
7
|
+
const isMobile = layoutType === 'mobile';
|
|
8
|
+
return (_jsxs("div", { className: styles.footerArticle, "data-test-id": 'footer-article', children: [_jsx(Typography.SansBodyL, { className: styles.releaseDate, children: releaseDate }), _jsx(DropdownShare, { hideLabel: isMobile, options: dropdownOptions })] }));
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FooterArticle';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FooterArticle';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ArticleRichText } from '../ArticleRichText';
|
|
3
|
+
import styles from './styles.module.css';
|
|
4
|
+
export function Highlight(props) {
|
|
5
|
+
const { layoutType, richText } = props;
|
|
6
|
+
return (_jsx("div", { className: styles.highlight, "data-test-id": 'highlight', children: _jsx(ArticleRichText, { layoutType: layoutType, richText: richText }) }));
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Highlight';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Highlight';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Typography } from '@snack-uikit/typography';
|
|
3
|
+
import styles from './styles.module.css';
|
|
4
|
+
const IMG_ALT = 'Blog image';
|
|
5
|
+
export function ImageArticle(props) {
|
|
6
|
+
const { image, description } = props;
|
|
7
|
+
return (_jsxs("div", { className: styles.imageArticle, "data-test-id": 'image-article', children: [_jsx("img", { src: image.src, alt: image.alt || IMG_ALT }), _jsx(Typography.SansBodyL, { className: styles.description, children: description })] }));
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ImageArticle';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ImageArticle';
|