@cloud-ru/uikit-product-site-article 0.2.2 → 0.2.4
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 +22 -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 +2 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
import { WithLayoutType } from '@cloud-ru/uikit-product-utils';
|
|
3
|
+
export type ArticleProduct = {
|
|
4
|
+
name: string;
|
|
5
|
+
icon: string;
|
|
6
|
+
href: string;
|
|
7
|
+
onClick?: (e: MouseEvent<HTMLAnchorElement>) => void;
|
|
8
|
+
};
|
|
9
|
+
export type ProductsProps = WithLayoutType<{
|
|
10
|
+
products?: ArticleProduct[];
|
|
11
|
+
solutions?: ArticleProduct[];
|
|
12
|
+
}>;
|
|
13
|
+
export declare function Products(props: ProductsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -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 { ServiceLight } from './helperComponents';
|
|
4
|
+
import styles from './styles.module.css';
|
|
5
|
+
export function Products(props) {
|
|
6
|
+
const { layoutType, products, solutions } = props;
|
|
7
|
+
return (_jsxs("div", { className: styles.products, "data-layout-type": layoutType, children: [(products === null || products === void 0 ? void 0 : products.length) && products.length > 0 && (_jsxs("div", { children: [_jsx(Typography.SansTitleM, { className: styles.label, tag: 'span', children: "\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043D\u044B\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044B:" }), _jsx("div", { className: styles.tags, "data-layout-type": layoutType, "data-test-id": 'article-products', children: products.map(item => (_jsx(ServiceLight, Object.assign({}, item), item.name))) })] })), (solutions === null || solutions === void 0 ? void 0 : solutions.length) && solutions.length > 0 && (_jsxs("div", { children: [_jsx(Typography.SansTitleM, { className: styles.label, tag: 'span', children: "\u0420\u0435\u0448\u0435\u043D\u0438\u044F:" }), _jsx("div", { className: styles.tags, "data-layout-type": layoutType, "data-test-id": 'article-solutions', children: solutions.map(item => (_jsx(ServiceLight, Object.assign({}, item), item.name))) })] }))] }));
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
export function ServiceLight(props) {
|
|
5
|
+
const { icon, name, href, onClick } = props;
|
|
6
|
+
return (_jsxs("a", { className: styles.serviceLight, href: href, onClick: onClick, children: [_jsx("img", { src: icon, alt: `Иконка-${name}`, width: 24, height: 24 }), _jsx(Typography.SansBodyM, { children: name })] }));
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ServiceLight';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ServiceLight';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ServiceLight';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ServiceLight';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Products';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Products';
|
|
@@ -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 '@cloud-ru/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,24 @@
|
|
|
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 { ArticleTypography } from '../ArticleTypography';
|
|
5
|
+
import { QuotesSVG } from './QuotesSVG';
|
|
6
|
+
import styles from './styles.module.css';
|
|
7
|
+
export function Quote(props) {
|
|
8
|
+
const { text, image, name, position, layoutType } = props;
|
|
9
|
+
const typographyProps = useMemo(() => {
|
|
10
|
+
if (layoutType === 'mobile') {
|
|
11
|
+
return {
|
|
12
|
+
family: 'sans',
|
|
13
|
+
purpose: 'body',
|
|
14
|
+
size: 'm',
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
return {
|
|
18
|
+
family: 'sans',
|
|
19
|
+
purpose: 'body',
|
|
20
|
+
size: 'l',
|
|
21
|
+
};
|
|
22
|
+
}, [layoutType]);
|
|
23
|
+
return (_jsxs("div", { className: styles.quote, "data-layout-type": layoutType, "data-test-id": 'quote', children: [_jsx("div", { className: styles.iconWrapper, "data-layout-type": layoutType, children: _jsx(QuotesSVG, { className: styles.icon }) }), _jsxs("div", { className: styles.wrapper, children: [_jsx(ArticleTypography, { className: styles.text, layoutType: layoutType, tag: 'p', type: 'body', children: text }), _jsxs("div", { className: styles.author, "data-layout-type": layoutType, children: [image && _jsx("img", { className: styles.authorImage, src: image, alt: '\u0424\u043E\u0442\u043E \u0430\u0432\u0442\u043E\u0440\u0430 \u0446\u0438\u0442\u0430\u0442\u044B' }), _jsxs("div", { className: styles.authorNameWrapper, children: [name && (_jsx(ArticleTypography, { className: styles.authorName, layoutType: layoutType, tag: 'span', type: 'bodyBold', children: name })), position && (_jsx(Typography, Object.assign({}, typographyProps, { className: styles.authorPosition, children: position })))] })] })] })] }));
|
|
24
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export function QuotesSVG({ className }) {
|
|
3
|
+
return (_jsx("svg", { width: '72', height: '64', viewBox: '0 0 72 64', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', className: className, children: _jsx("g", { id: 'Quotes', children: _jsxs("g", { id: 'Vector', children: [_jsx("path", { id: 'Vector 1', d: 'M0 51.7263L14.5187 12.2738H35.8522L27.5559 51.7263H0Z', fill: '#DDE0EA' }), _jsx("path", { id: 'Vector 2', d: 'M36.1484 51.7263L50.6671 12.2738H72.0007L63.7043 51.7263H36.1484Z', fill: '#DDE0EA' })] }) }) }));
|
|
4
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Quote';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Quote';
|
|
@@ -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,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 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
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": "0.2.
|
|
4
|
+
"version": "0.2.4",
|
|
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": "ce69097516055b330a0b05da5e29ac5b66e56284"
|
|
48
48
|
}
|