@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.
Files changed (116) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/cjs/components/ArticleLinks/ArticleLinks.d.ts +11 -0
  3. package/dist/cjs/components/ArticleLinks/ArticleLinks.js +28 -0
  4. package/dist/cjs/components/ArticleLinks/index.d.ts +1 -0
  5. package/dist/cjs/components/ArticleLinks/index.js +17 -0
  6. package/dist/cjs/components/ArticleLinks/styles.module.css +32 -0
  7. package/dist/cjs/components/ArticleRichText/ArticleRichText.d.ts +5 -0
  8. package/dist/cjs/components/ArticleRichText/ArticleRichText.js +13 -0
  9. package/dist/cjs/components/ArticleRichText/index.d.ts +1 -0
  10. package/dist/cjs/components/ArticleRichText/index.js +17 -0
  11. package/dist/cjs/components/ArticleRichText/styles.module.css +36 -0
  12. package/dist/cjs/components/ArticleTypography/ArticleTypography.d.ts +13 -0
  13. package/dist/cjs/components/ArticleTypography/ArticleTypography.js +17 -0
  14. package/dist/cjs/components/ArticleTypography/index.d.ts +1 -0
  15. package/dist/cjs/components/ArticleTypography/index.js +17 -0
  16. package/dist/cjs/components/ArticleTypography/styles.module.css +32 -0
  17. package/dist/cjs/components/DropdownShare/DropdownShare.d.ts +16 -0
  18. package/dist/cjs/components/DropdownShare/DropdownShare.js +43 -0
  19. package/dist/cjs/components/DropdownShare/index.d.ts +1 -0
  20. package/dist/cjs/components/DropdownShare/index.js +17 -0
  21. package/dist/cjs/components/FooterArticle/FooterArticle.d.ts +7 -0
  22. package/dist/cjs/components/FooterArticle/FooterArticle.js +15 -0
  23. package/dist/cjs/components/FooterArticle/index.d.ts +1 -0
  24. package/dist/cjs/components/FooterArticle/index.js +17 -0
  25. package/dist/cjs/components/FooterArticle/styles.module.css +10 -0
  26. package/dist/cjs/components/Highlight/Highlight.d.ts +5 -0
  27. package/dist/cjs/components/Highlight/Highlight.js +13 -0
  28. package/dist/cjs/components/Highlight/index.d.ts +1 -0
  29. package/dist/cjs/components/Highlight/index.js +17 -0
  30. package/dist/cjs/components/Highlight/styles.module.css +6 -0
  31. package/dist/cjs/components/ImageArticle/ImageArticle.d.ts +8 -0
  32. package/dist/cjs/components/ImageArticle/ImageArticle.js +14 -0
  33. package/dist/cjs/components/ImageArticle/index.d.ts +1 -0
  34. package/dist/cjs/components/ImageArticle/index.js +17 -0
  35. package/dist/cjs/components/ImageArticle/styles.module.css +10 -0
  36. package/dist/cjs/components/Products/Products.d.ts +13 -0
  37. package/dist/cjs/components/Products/Products.js +14 -0
  38. package/dist/cjs/components/Products/helperComponents/ServiceLight/ServiceLight.d.ts +4 -0
  39. package/dist/cjs/components/Products/helperComponents/ServiceLight/ServiceLight.js +13 -0
  40. package/dist/cjs/components/Products/helperComponents/ServiceLight/index.d.ts +1 -0
  41. package/dist/cjs/components/Products/helperComponents/ServiceLight/index.js +17 -0
  42. package/dist/cjs/components/Products/helperComponents/ServiceLight/styles.module.css +9 -0
  43. package/dist/cjs/components/Products/helperComponents/index.d.ts +1 -0
  44. package/dist/cjs/components/Products/helperComponents/index.js +17 -0
  45. package/dist/cjs/components/Products/index.d.ts +1 -0
  46. package/dist/cjs/components/Products/index.js +17 -0
  47. package/dist/cjs/components/Products/styles.module.css +29 -0
  48. package/dist/cjs/components/Quote/Quote.d.ts +8 -0
  49. package/dist/cjs/components/Quote/Quote.js +30 -0
  50. package/dist/cjs/components/Quote/QuotesSVG.d.ts +3 -0
  51. package/dist/cjs/components/Quote/QuotesSVG.js +7 -0
  52. package/dist/cjs/components/Quote/index.d.ts +1 -0
  53. package/dist/cjs/components/Quote/index.js +17 -0
  54. package/dist/cjs/components/Quote/styles.module.css +51 -0
  55. package/dist/cjs/components/index.d.ts +9 -0
  56. package/dist/cjs/components/index.js +25 -0
  57. package/dist/cjs/index.d.ts +1 -0
  58. package/dist/cjs/index.js +17 -0
  59. package/dist/esm/components/ArticleLinks/ArticleLinks.d.ts +11 -0
  60. package/dist/esm/components/ArticleLinks/ArticleLinks.js +22 -0
  61. package/dist/esm/components/ArticleLinks/index.d.ts +1 -0
  62. package/dist/esm/components/ArticleLinks/index.js +1 -0
  63. package/dist/esm/components/ArticleLinks/styles.module.css +32 -0
  64. package/dist/esm/components/ArticleRichText/ArticleRichText.d.ts +5 -0
  65. package/dist/esm/components/ArticleRichText/ArticleRichText.js +7 -0
  66. package/dist/esm/components/ArticleRichText/index.d.ts +1 -0
  67. package/dist/esm/components/ArticleRichText/index.js +1 -0
  68. package/dist/esm/components/ArticleRichText/styles.module.css +36 -0
  69. package/dist/esm/components/ArticleTypography/ArticleTypography.d.ts +13 -0
  70. package/dist/esm/components/ArticleTypography/ArticleTypography.js +11 -0
  71. package/dist/esm/components/ArticleTypography/index.d.ts +1 -0
  72. package/dist/esm/components/ArticleTypography/index.js +1 -0
  73. package/dist/esm/components/ArticleTypography/styles.module.css +32 -0
  74. package/dist/esm/components/DropdownShare/DropdownShare.d.ts +16 -0
  75. package/dist/esm/components/DropdownShare/DropdownShare.js +40 -0
  76. package/dist/esm/components/DropdownShare/index.d.ts +1 -0
  77. package/dist/esm/components/DropdownShare/index.js +1 -0
  78. package/dist/esm/components/FooterArticle/FooterArticle.d.ts +7 -0
  79. package/dist/esm/components/FooterArticle/FooterArticle.js +9 -0
  80. package/dist/esm/components/FooterArticle/index.d.ts +1 -0
  81. package/dist/esm/components/FooterArticle/index.js +1 -0
  82. package/dist/esm/components/FooterArticle/styles.module.css +10 -0
  83. package/dist/esm/components/Highlight/Highlight.d.ts +5 -0
  84. package/dist/esm/components/Highlight/Highlight.js +7 -0
  85. package/dist/esm/components/Highlight/index.d.ts +1 -0
  86. package/dist/esm/components/Highlight/index.js +1 -0
  87. package/dist/esm/components/Highlight/styles.module.css +6 -0
  88. package/dist/esm/components/ImageArticle/ImageArticle.d.ts +8 -0
  89. package/dist/esm/components/ImageArticle/ImageArticle.js +8 -0
  90. package/dist/esm/components/ImageArticle/index.d.ts +1 -0
  91. package/dist/esm/components/ImageArticle/index.js +1 -0
  92. package/dist/esm/components/ImageArticle/styles.module.css +10 -0
  93. package/dist/esm/components/Products/Products.d.ts +13 -0
  94. package/dist/esm/components/Products/Products.js +8 -0
  95. package/dist/esm/components/Products/helperComponents/ServiceLight/ServiceLight.d.ts +4 -0
  96. package/dist/esm/components/Products/helperComponents/ServiceLight/ServiceLight.js +7 -0
  97. package/dist/esm/components/Products/helperComponents/ServiceLight/index.d.ts +1 -0
  98. package/dist/esm/components/Products/helperComponents/ServiceLight/index.js +1 -0
  99. package/dist/esm/components/Products/helperComponents/ServiceLight/styles.module.css +9 -0
  100. package/dist/esm/components/Products/helperComponents/index.d.ts +1 -0
  101. package/dist/esm/components/Products/helperComponents/index.js +1 -0
  102. package/dist/esm/components/Products/index.d.ts +1 -0
  103. package/dist/esm/components/Products/index.js +1 -0
  104. package/dist/esm/components/Products/styles.module.css +29 -0
  105. package/dist/esm/components/Quote/Quote.d.ts +8 -0
  106. package/dist/esm/components/Quote/Quote.js +24 -0
  107. package/dist/esm/components/Quote/QuotesSVG.d.ts +3 -0
  108. package/dist/esm/components/Quote/QuotesSVG.js +4 -0
  109. package/dist/esm/components/Quote/index.d.ts +1 -0
  110. package/dist/esm/components/Quote/index.js +1 -0
  111. package/dist/esm/components/Quote/styles.module.css +51 -0
  112. package/dist/esm/components/index.d.ts +9 -0
  113. package/dist/esm/components/index.js +9 -0
  114. package/dist/esm/index.d.ts +1 -0
  115. package/dist/esm/index.js +1 -0
  116. package/package.json +3 -2
@@ -0,0 +1,13 @@
1
+ import { MouseEvent } from 'react';
2
+ import { WithLayoutType } from '@sbercloud/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,4 @@
1
+ import { ArticleProduct } from '../../Products';
2
+ type ServiceLightProps = ArticleProduct;
3
+ export declare function ServiceLight(props: ServiceLightProps): import("react/jsx-runtime").JSX.Element;
4
+ export {};
@@ -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,9 @@
1
+ .serviceLight{
2
+ display:inline-flex;
3
+ align-items:center;
4
+ gap:4px;
5
+ color:var(--sys-neutral-text-support, #656774);
6
+ }
7
+ .serviceLight:hover{
8
+ color:var(--sys-primary-text-light, #0ea55b);
9
+ }
@@ -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 '@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,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,3 @@
1
+ export declare function QuotesSVG({ className }: {
2
+ className?: string;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -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.2",
4
+ "version": "0.2.3",
5
5
  "sideEffects": [
6
6
  "*.css",
7
7
  "*.woff",
@@ -30,6 +30,7 @@
30
30
  "name": "Akhremenko Grigorii",
31
31
  "url": "https://github.com/AGrigorii"
32
32
  },
33
+ "contributors": [],
33
34
  "license": "Apache-2.0",
34
35
  "publishConfig": {
35
36
  "access": "public"
@@ -44,5 +45,5 @@
44
45
  "@snack-uikit/utils": "4.0.0",
45
46
  "classnames": "2.5.1"
46
47
  },
47
- "gitHead": "e8bd79bc92b26a8f52611972eec98a867536ccd3"
48
+ "gitHead": "9c11b1e33e716c874534a1c162266c8591f2ed03"
48
49
  }