@cloud-ru/uikit-product-site-cards 0.11.3 → 0.11.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 +11 -0
- package/dist/cjs/components/CardBasic/CardBasic.d.ts +13 -0
- package/dist/cjs/components/CardBasic/CardBasic.js +32 -0
- package/dist/cjs/components/CardBasic/index.d.ts +1 -0
- package/dist/cjs/components/CardBasic/index.js +17 -0
- package/dist/cjs/components/CardBasic/styles.module.css +33 -0
- package/dist/cjs/components/CardBasic/utils.d.ts +2 -0
- package/dist/cjs/components/CardBasic/utils.js +15 -0
- package/dist/cjs/components/CardCase/CardCase.d.ts +32 -0
- package/dist/cjs/components/CardCase/CardCase.js +39 -0
- package/dist/cjs/components/CardCase/index.d.ts +1 -0
- package/dist/cjs/components/CardCase/index.js +17 -0
- package/dist/cjs/components/CardCase/styles.module.css +66 -0
- package/dist/cjs/components/CardInfo/CardInfo.d.ts +30 -0
- package/dist/cjs/components/CardInfo/CardInfo.js +37 -0
- package/dist/cjs/components/CardInfo/index.d.ts +1 -0
- package/dist/cjs/components/CardInfo/index.js +17 -0
- package/dist/cjs/components/CardInfo/styles.module.css +42 -0
- package/dist/cjs/components/CardInfo/utilsTypes.d.ts +3 -0
- package/dist/cjs/components/CardInfo/utilsTypes.js +2 -0
- package/dist/cjs/components/CardList/CardList.d.ts +27 -0
- package/dist/cjs/components/CardList/CardList.js +30 -0
- package/dist/cjs/components/CardList/index.d.ts +1 -0
- package/dist/cjs/components/CardList/index.js +17 -0
- package/dist/cjs/components/CardList/styles.module.css +76 -0
- package/dist/cjs/components/CardList/utils.d.ts +6 -0
- package/dist/cjs/components/CardList/utils.js +36 -0
- package/dist/cjs/components/CardMarketplace/CardMarketplace.d.ts +30 -0
- package/dist/cjs/components/CardMarketplace/CardMarketplace.js +37 -0
- package/dist/cjs/components/CardMarketplace/index.d.ts +1 -0
- package/dist/cjs/components/CardMarketplace/index.js +17 -0
- package/dist/cjs/components/CardMarketplace/styles.module.css +72 -0
- package/dist/cjs/components/CardMedia/CardMedia.d.ts +32 -0
- package/dist/cjs/components/CardMedia/CardMedia.js +39 -0
- package/dist/cjs/components/CardMedia/index.d.ts +1 -0
- package/dist/cjs/components/CardMedia/index.js +17 -0
- package/dist/cjs/components/CardMedia/styles.module.css +114 -0
- package/dist/cjs/components/CardMedia/types.d.ts +2 -0
- package/dist/cjs/components/CardMedia/types.js +2 -0
- package/dist/cjs/components/CardMedia/utils.d.ts +3 -0
- package/dist/cjs/components/CardMedia/utils.js +22 -0
- package/dist/cjs/components/CardPartner/CardPartner.d.ts +26 -0
- package/dist/cjs/components/CardPartner/CardPartner.js +33 -0
- package/dist/cjs/components/CardPartner/index.d.ts +1 -0
- package/dist/cjs/components/CardPartner/index.js +17 -0
- package/dist/cjs/components/CardPartner/styles.module.css +56 -0
- package/dist/cjs/components/CardProduct/CardProduct.d.ts +20 -0
- package/dist/cjs/components/CardProduct/CardProduct.js +38 -0
- package/dist/cjs/components/CardProduct/constants.d.ts +6 -0
- package/dist/cjs/components/CardProduct/constants.js +11 -0
- package/dist/cjs/components/CardProduct/index.d.ts +1 -0
- package/dist/cjs/components/CardProduct/index.js +17 -0
- package/dist/cjs/components/CardProduct/styles.module.css +67 -0
- package/dist/cjs/components/index.d.ts +8 -0
- package/dist/cjs/components/index.js +24 -0
- package/dist/cjs/components/utils.d.ts +4 -0
- package/dist/cjs/components/utils.js +15 -0
- package/dist/cjs/constants.d.ts +1 -0
- package/dist/cjs/constants.js +4 -0
- package/dist/cjs/helperComponents/Icon/Icon.d.ts +15 -0
- package/dist/cjs/helperComponents/Icon/Icon.js +17 -0
- package/dist/cjs/helperComponents/Icon/index.d.ts +1 -0
- package/dist/cjs/helperComponents/Icon/index.js +17 -0
- package/dist/cjs/helperComponents/Icon/styles.module.css +39 -0
- package/dist/cjs/hooks.d.ts +14 -0
- package/dist/cjs/hooks.js +31 -0
- package/dist/cjs/index.d.ts +3 -0
- package/dist/cjs/index.js +19 -0
- package/dist/esm/components/CardBasic/CardBasic.d.ts +13 -0
- package/dist/esm/components/CardBasic/CardBasic.js +26 -0
- package/dist/esm/components/CardBasic/index.d.ts +1 -0
- package/dist/esm/components/CardBasic/index.js +1 -0
- package/dist/esm/components/CardBasic/styles.module.css +33 -0
- package/dist/esm/components/CardBasic/utils.d.ts +2 -0
- package/dist/esm/components/CardBasic/utils.js +11 -0
- package/dist/esm/components/CardCase/CardCase.d.ts +32 -0
- package/dist/esm/components/CardCase/CardCase.js +33 -0
- package/dist/esm/components/CardCase/index.d.ts +1 -0
- package/dist/esm/components/CardCase/index.js +1 -0
- package/dist/esm/components/CardCase/styles.module.css +66 -0
- package/dist/esm/components/CardInfo/CardInfo.d.ts +30 -0
- package/dist/esm/components/CardInfo/CardInfo.js +31 -0
- package/dist/esm/components/CardInfo/index.d.ts +1 -0
- package/dist/esm/components/CardInfo/index.js +1 -0
- package/dist/esm/components/CardInfo/styles.module.css +42 -0
- package/dist/esm/components/CardInfo/utilsTypes.d.ts +3 -0
- package/dist/esm/components/CardInfo/utilsTypes.js +1 -0
- package/dist/esm/components/CardList/CardList.d.ts +27 -0
- package/dist/esm/components/CardList/CardList.js +24 -0
- package/dist/esm/components/CardList/index.d.ts +1 -0
- package/dist/esm/components/CardList/index.js +1 -0
- package/dist/esm/components/CardList/styles.module.css +76 -0
- package/dist/esm/components/CardList/utils.d.ts +6 -0
- package/dist/esm/components/CardList/utils.js +31 -0
- package/dist/esm/components/CardMarketplace/CardMarketplace.d.ts +30 -0
- package/dist/esm/components/CardMarketplace/CardMarketplace.js +31 -0
- package/dist/esm/components/CardMarketplace/index.d.ts +1 -0
- package/dist/esm/components/CardMarketplace/index.js +1 -0
- package/dist/esm/components/CardMarketplace/styles.module.css +72 -0
- package/dist/esm/components/CardMedia/CardMedia.d.ts +32 -0
- package/dist/esm/components/CardMedia/CardMedia.js +33 -0
- package/dist/esm/components/CardMedia/index.d.ts +1 -0
- package/dist/esm/components/CardMedia/index.js +1 -0
- package/dist/esm/components/CardMedia/styles.module.css +114 -0
- package/dist/esm/components/CardMedia/types.d.ts +2 -0
- package/dist/esm/components/CardMedia/types.js +1 -0
- package/dist/esm/components/CardMedia/utils.d.ts +3 -0
- package/dist/esm/components/CardMedia/utils.js +18 -0
- package/dist/esm/components/CardPartner/CardPartner.d.ts +26 -0
- package/dist/esm/components/CardPartner/CardPartner.js +27 -0
- package/dist/esm/components/CardPartner/index.d.ts +1 -0
- package/dist/esm/components/CardPartner/index.js +1 -0
- package/dist/esm/components/CardPartner/styles.module.css +56 -0
- package/dist/esm/components/CardProduct/CardProduct.d.ts +20 -0
- package/dist/esm/components/CardProduct/CardProduct.js +32 -0
- package/dist/esm/components/CardProduct/constants.d.ts +6 -0
- package/dist/esm/components/CardProduct/constants.js +8 -0
- package/dist/esm/components/CardProduct/index.d.ts +1 -0
- package/dist/esm/components/CardProduct/index.js +1 -0
- package/dist/esm/components/CardProduct/styles.module.css +67 -0
- package/dist/esm/components/index.d.ts +8 -0
- package/dist/esm/components/index.js +8 -0
- package/dist/esm/components/utils.d.ts +4 -0
- package/dist/esm/components/utils.js +10 -0
- package/dist/esm/constants.d.ts +1 -0
- package/dist/esm/constants.js +1 -0
- package/dist/esm/helperComponents/Icon/Icon.d.ts +15 -0
- package/dist/esm/helperComponents/Icon/Icon.js +11 -0
- package/dist/esm/helperComponents/Icon/index.d.ts +1 -0
- package/dist/esm/helperComponents/Icon/index.js +1 -0
- package/dist/esm/helperComponents/Icon/styles.module.css +39 -0
- package/dist/esm/hooks.d.ts +14 -0
- package/dist/esm/hooks.js +28 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +3 -0
- package/package.json +7 -6
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
|
+
## 0.11.4 (2025-11-12)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **PD-3377:** contributors update to publish all packages ([719fd3e](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/719fd3e1249e247443b125c47ea408d92c8395c3))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## 0.11.3 (2025-11-12)
|
|
7
18
|
|
|
8
19
|
### Only dependencies have been changed
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { WithLayoutType, WithSupportProps } from '@sbercloud/uikit-product-utils';
|
|
2
|
+
import { IconProps } from '../../helperComponents/Icon';
|
|
3
|
+
export type CardBasicProps = WithSupportProps<WithLayoutType<{
|
|
4
|
+
/** Заголовок карточки*/
|
|
5
|
+
title: string;
|
|
6
|
+
/** Описание карточки */
|
|
7
|
+
description?: string;
|
|
8
|
+
/** Слот под иконку/картинку/кастомную ноду */
|
|
9
|
+
icon?: IconProps['icon'] | null;
|
|
10
|
+
/** CSS-класс */
|
|
11
|
+
className?: string;
|
|
12
|
+
}>>;
|
|
13
|
+
export declare function CardBasic({ title, description, className, icon, layoutType, 'data-test-id': dataTestId, ...rest }: CardBasicProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.CardBasic = CardBasic;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
20
|
+
const uikit_product_site_rich_text_1 = require("@sbercloud/uikit-product-site-rich-text");
|
|
21
|
+
const uikit_product_utils_1 = require("@sbercloud/uikit-product-utils");
|
|
22
|
+
const typography_1 = require("@snack-uikit/typography");
|
|
23
|
+
const Icon_1 = require("../../helperComponents/Icon");
|
|
24
|
+
const utils_1 = require("../utils");
|
|
25
|
+
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
26
|
+
const utils_2 = require("./utils");
|
|
27
|
+
function CardBasic(_a) {
|
|
28
|
+
var { title, description, className, icon, layoutType, 'data-test-id': dataTestId = 'card-basic' } = _a, rest = __rest(_a, ["title", "description", "className", "icon", "layoutType", 'data-test-id']);
|
|
29
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({}, (0, uikit_product_utils_1.extractSupportProps)(rest), { "data-layout-type": layoutType, className: (0, classnames_1.default)(styles_module_scss_1.default.wrapper, className), "data-test-id": dataTestId, children: [icon && (0, jsx_runtime_1.jsx)(Icon_1.Icon, { icon: icon, size: (0, utils_2.getIconSize)(layoutType), "data-test-id": `${dataTestId}__icon` }), (0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.content, {
|
|
30
|
+
[styles_module_scss_1.default.isEmptyDescription]: !description,
|
|
31
|
+
}), "data-test-id": `${dataTestId}__content`, children: [(0, jsx_runtime_1.jsx)(typography_1.Typography, { tag: 'h3', family: 'sans', purpose: 'title', size: (0, utils_1.getTypographySize)(layoutType), "data-test-id": `${dataTestId}__title`, className: styles_module_scss_1.default.title, children: (0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { richText: title }) }), description && ((0, jsx_runtime_1.jsx)(typography_1.Typography, { tag: 'div', family: 'sans', purpose: 'body', size: (0, utils_1.getTypographySize)(layoutType), "data-test-id": `${dataTestId}__description`, children: (0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { className: styles_module_scss_1.default.description, richText: description }) }))] })] })));
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CardBasic';
|
|
@@ -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("./CardBasic"), exports);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.wrapper{
|
|
2
|
+
position:relative;
|
|
3
|
+
display:flex;
|
|
4
|
+
flex-direction:row;
|
|
5
|
+
gap:var(--dimension-2m, 16px);
|
|
6
|
+
width:100%;
|
|
7
|
+
}
|
|
8
|
+
.wrapper .content{
|
|
9
|
+
display:flex;
|
|
10
|
+
flex-direction:column;
|
|
11
|
+
gap:var(--dimension-1m, 8px);
|
|
12
|
+
}
|
|
13
|
+
.wrapper .content .title{
|
|
14
|
+
color:var(--sys-neutral-text-main, #41424e);
|
|
15
|
+
}
|
|
16
|
+
.wrapper .content .description{
|
|
17
|
+
color:var(--sys-neutral-text-support, #656774);
|
|
18
|
+
}
|
|
19
|
+
.wrapper .isEmptyDescription{
|
|
20
|
+
align-items:center;
|
|
21
|
+
justify-content:center;
|
|
22
|
+
}
|
|
23
|
+
.wrapper[data-layout-type=tablet], .wrapper[data-layout-type=mobile]{
|
|
24
|
+
flex-direction:column;
|
|
25
|
+
gap:var(--dimension-1m, 8px);
|
|
26
|
+
}
|
|
27
|
+
.wrapper[data-layout-type=tablet] .content, .wrapper[data-layout-type=mobile] .content{
|
|
28
|
+
gap:var(--dimension-050m, 4px);
|
|
29
|
+
}
|
|
30
|
+
.wrapper[data-layout-type=tablet] .isEmptyDescription, .wrapper[data-layout-type=mobile] .isEmptyDescription{
|
|
31
|
+
align-items:stretch;
|
|
32
|
+
justify-content:normal;
|
|
33
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getIconSize = void 0;
|
|
4
|
+
const getIconSize = (layoutType) => {
|
|
5
|
+
switch (layoutType) {
|
|
6
|
+
case 'tablet':
|
|
7
|
+
case 'mobile':
|
|
8
|
+
return 'm';
|
|
9
|
+
case 'desktop':
|
|
10
|
+
case 'desktopSmall':
|
|
11
|
+
default:
|
|
12
|
+
return 'l';
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
exports.getIconSize = getIconSize;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes, MouseEvent } from 'react';
|
|
2
|
+
import { TagSpecialProps } from '@sbercloud/uikit-product-site-tag';
|
|
3
|
+
import { WithLayoutType, WithSupportProps } from '@sbercloud/uikit-product-utils';
|
|
4
|
+
export type CardCaseProps = WithSupportProps<WithLayoutType<{
|
|
5
|
+
/** Заголовок карточки*/
|
|
6
|
+
title: string;
|
|
7
|
+
/** Описание карточки */
|
|
8
|
+
description?: string;
|
|
9
|
+
/** Ссылка */
|
|
10
|
+
href?: string;
|
|
11
|
+
/** HTML-аттрибут target */
|
|
12
|
+
target?: AnchorHTMLAttributes<HTMLAnchorElement>['target'];
|
|
13
|
+
/** Колбек клика*/
|
|
14
|
+
onClick?(e?: MouseEvent<HTMLDivElement | HTMLAnchorElement>): void;
|
|
15
|
+
/** Ссылка на логотип */
|
|
16
|
+
logo: {
|
|
17
|
+
src: string;
|
|
18
|
+
alt: string;
|
|
19
|
+
};
|
|
20
|
+
/** Тег */
|
|
21
|
+
tags?: Omit<TagSpecialProps, 'className'>[];
|
|
22
|
+
/**
|
|
23
|
+
* Является ли деактивированным
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** CSS-класс */
|
|
28
|
+
className?: string;
|
|
29
|
+
/** Управление состоянием наличия обводки */
|
|
30
|
+
outline?: boolean;
|
|
31
|
+
}>>;
|
|
32
|
+
export declare function CardCase({ title, description, logo, href, target, onClick, tags, disabled, className, layoutType, outline, ...rest }: CardCaseProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.CardCase = CardCase;
|
|
18
|
+
const react_1 = require("react");
|
|
19
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
20
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
21
|
+
const uikit_product_site_rich_text_1 = require("@sbercloud/uikit-product-site-rich-text");
|
|
22
|
+
const uikit_product_site_tag_1 = require("@sbercloud/uikit-product-site-tag");
|
|
23
|
+
const uikit_product_utils_1 = require("@sbercloud/uikit-product-utils");
|
|
24
|
+
const card_1 = require("@snack-uikit/card");
|
|
25
|
+
const typography_1 = require("@snack-uikit/typography");
|
|
26
|
+
const hooks_1 = require("../../hooks");
|
|
27
|
+
const utils_1 = require("../utils");
|
|
28
|
+
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
29
|
+
function CardCase(_a) {
|
|
30
|
+
var _b, _c;
|
|
31
|
+
var { title, description, logo, href, target = '_blank', onClick, tags, disabled = false, className, layoutType, outline } = _a, rest = __rest(_a, ["title", "description", "logo", "href", "target", "onClick", "tags", "disabled", "className", "layoutType", "outline"]);
|
|
32
|
+
const dataTestId = (_b = rest['data-test-id']) !== null && _b !== void 0 ? _b : 'card-case';
|
|
33
|
+
const { anchorRef, handleLinkClick, handleCardClick, handleCardKeyDown } = (0, hooks_1.useCardInteractions)({
|
|
34
|
+
href,
|
|
35
|
+
disabled,
|
|
36
|
+
onClick,
|
|
37
|
+
});
|
|
38
|
+
return ((0, jsx_runtime_1.jsx)(card_1.Card, Object.assign({}, (0, uikit_product_utils_1.extractSupportProps)(rest), { size: 'm', className: (0, classnames_1.default)(styles_module_scss_1.default.card, className), disabled: disabled, onClick: handleCardClick, onKeyDown: handleCardKeyDown, "data-test-id": dataTestId, outline: outline, children: (0, jsx_runtime_1.jsxs)("div", { "data-layout-type": layoutType, className: styles_module_scss_1.default.wrapper, children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.header, children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.title, children: [(0, jsx_runtime_1.jsx)(typography_1.Typography, { tag: 'h3', family: 'sans', purpose: 'title', size: (0, utils_1.getTypographySize)(layoutType), className: styles_module_scss_1.default.title, "data-test-id": `${dataTestId}__title`, children: href ? ((0, jsx_runtime_1.jsx)("a", { tabIndex: -1, ref: anchorRef, href: href, target: target, onClick: handleLinkClick, "data-test-id": `${dataTestId}__title-link`, children: title })) : (title) }), tags && tags.length > 0 && ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.tagRow, children: tags.map((tag, index) => ((0, react_1.createElement)(uikit_product_site_tag_1.TagSpecial, Object.assign({ "data-test-id": `${dataTestId}__tag` }, tag, { key: index })))) }))] }), (0, jsx_runtime_1.jsx)("img", { className: styles_module_scss_1.default.logo, alt: (_c = logo.alt) !== null && _c !== void 0 ? _c : title, src: logo.src, "data-test-id": `${dataTestId}__logo` })] }), description && ((0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { className: styles_module_scss_1.default.description, richText: description, "data-test-id": `${dataTestId}__description` }))] }) })));
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CardCase';
|
|
@@ -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("./CardCase"), exports);
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
.card{
|
|
2
|
+
position:relative;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.wrapper{
|
|
6
|
+
display:flex;
|
|
7
|
+
flex-direction:column;
|
|
8
|
+
gap:12px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.header{
|
|
12
|
+
display:flex;
|
|
13
|
+
align-items:flex-start;
|
|
14
|
+
gap:16px;
|
|
15
|
+
}
|
|
16
|
+
[data-layout-type=mobile] .header{
|
|
17
|
+
flex-direction:column-reverse;
|
|
18
|
+
gap:12px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.title{
|
|
22
|
+
display:flex;
|
|
23
|
+
flex-direction:column;
|
|
24
|
+
flex-grow:1;
|
|
25
|
+
gap:10px;
|
|
26
|
+
color:var(--sys-neutral-text-main, #41424e);
|
|
27
|
+
}
|
|
28
|
+
.title a{
|
|
29
|
+
color:var(--sys-neutral-text-main, #41424e);
|
|
30
|
+
text-decoration:none;
|
|
31
|
+
}
|
|
32
|
+
.title a::before{
|
|
33
|
+
content:"";
|
|
34
|
+
position:absolute;
|
|
35
|
+
top:0;
|
|
36
|
+
left:0;
|
|
37
|
+
right:0;
|
|
38
|
+
bottom:0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.tagRow{
|
|
42
|
+
display:flex;
|
|
43
|
+
flex-wrap:wrap;
|
|
44
|
+
gap:4px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.logo{
|
|
48
|
+
flex-shrink:0;
|
|
49
|
+
width:144px;
|
|
50
|
+
height:40px;
|
|
51
|
+
-o-object-fit:contain;
|
|
52
|
+
object-fit:contain;
|
|
53
|
+
}
|
|
54
|
+
[data-layout-type=mobile] .logo{
|
|
55
|
+
align-self:center;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.description{
|
|
59
|
+
font-family:var(--sans-body-m-font-family, SB Sans Text);
|
|
60
|
+
font-weight:var(--sans-body-m-font-weight, Regular);
|
|
61
|
+
line-height:var(--sans-body-m-line-height, 20px);
|
|
62
|
+
font-size:var(--sans-body-m-font-size, 14px);
|
|
63
|
+
letter-spacing:var(--sans-body-m-letter-spacing, 0px);
|
|
64
|
+
paragraph-spacing:var(--sans-body-m-paragraph-spacing, 7.7px);
|
|
65
|
+
color:var(--sys-neutral-text-support, #656774);
|
|
66
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes, MouseEvent } from 'react';
|
|
2
|
+
import { TagSpecialProps } from '@sbercloud/uikit-product-site-tag';
|
|
3
|
+
import { WithLayoutType, WithSupportProps } from '@sbercloud/uikit-product-utils';
|
|
4
|
+
import { IconProps } from '../../helperComponents/Icon';
|
|
5
|
+
export type CardInfoProps = WithSupportProps<WithLayoutType<{
|
|
6
|
+
/** Заголовок карточки*/
|
|
7
|
+
title: string;
|
|
8
|
+
/** Описание карточки */
|
|
9
|
+
description?: string;
|
|
10
|
+
/** Ссылка */
|
|
11
|
+
href?: string;
|
|
12
|
+
/** HTML-аттрибут target */
|
|
13
|
+
target?: AnchorHTMLAttributes<HTMLAnchorElement>['target'];
|
|
14
|
+
/** Колбек клика*/
|
|
15
|
+
onClick?(e?: MouseEvent<HTMLDivElement | HTMLAnchorElement>): void;
|
|
16
|
+
/** Слот под иконку/кастомную ноду */
|
|
17
|
+
icon?: IconProps['icon'];
|
|
18
|
+
/** Тег */
|
|
19
|
+
tag?: Pick<TagSpecialProps, 'text' | 'appearance'>;
|
|
20
|
+
/**
|
|
21
|
+
* Является ли деактивированным
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/** Наличие обводки */
|
|
26
|
+
outline?: boolean;
|
|
27
|
+
/** CSS-класс */
|
|
28
|
+
className?: string;
|
|
29
|
+
}>>;
|
|
30
|
+
export declare function CardInfo({ title, description, icon, href, target, onClick, tag, disabled, className, layoutType, outline, 'data-test-id': dataTestId, ...rest }: CardInfoProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.CardInfo = CardInfo;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
20
|
+
const uikit_product_site_rich_text_1 = require("@sbercloud/uikit-product-site-rich-text");
|
|
21
|
+
const uikit_product_site_tag_1 = require("@sbercloud/uikit-product-site-tag");
|
|
22
|
+
const uikit_product_utils_1 = require("@sbercloud/uikit-product-utils");
|
|
23
|
+
const card_1 = require("@snack-uikit/card");
|
|
24
|
+
const typography_1 = require("@snack-uikit/typography");
|
|
25
|
+
const Icon_1 = require("../../helperComponents/Icon");
|
|
26
|
+
const hooks_1 = require("../../hooks");
|
|
27
|
+
const utils_1 = require("../utils");
|
|
28
|
+
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
29
|
+
function CardInfo(_a) {
|
|
30
|
+
var { title, description, icon, href, target = '_blank', onClick, tag, disabled = false, className, layoutType, outline, 'data-test-id': dataTestId = 'card-info' } = _a, rest = __rest(_a, ["title", "description", "icon", "href", "target", "onClick", "tag", "disabled", "className", "layoutType", "outline", 'data-test-id']);
|
|
31
|
+
const { anchorRef, handleLinkClick, handleCardClick, handleCardKeyDown } = (0, hooks_1.useCardInteractions)({
|
|
32
|
+
href,
|
|
33
|
+
disabled,
|
|
34
|
+
onClick,
|
|
35
|
+
});
|
|
36
|
+
return ((0, jsx_runtime_1.jsx)(card_1.Card, Object.assign({}, (0, uikit_product_utils_1.extractSupportProps)(rest), { size: 'm', className: (0, classnames_1.default)(styles_module_scss_1.default.card, className), disabled: disabled, outline: outline, onClick: handleCardClick, onKeyDown: handleCardKeyDown, "data-test-id": dataTestId, children: (0, jsx_runtime_1.jsxs)("div", { "data-layout-type": layoutType, className: styles_module_scss_1.default.wrapper, children: [tag && (0, jsx_runtime_1.jsx)(uikit_product_site_tag_1.TagSpecial, Object.assign({}, tag, { className: styles_module_scss_1.default.tag, "data-test-id": `${dataTestId}__tag` })), icon && (0, jsx_runtime_1.jsx)(Icon_1.Icon, { size: 'm', "data-test-id": `${dataTestId}__icon`, icon: icon }), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.content, children: [(0, jsx_runtime_1.jsx)(typography_1.Typography, { tag: 'h3', family: 'sans', purpose: 'title', size: (0, utils_1.getTypographySize)(layoutType), className: styles_module_scss_1.default.title, "data-test-id": `${dataTestId}__title`, children: href ? ((0, jsx_runtime_1.jsx)("a", { tabIndex: -1, ref: anchorRef, href: href, target: target, onClick: handleLinkClick, "data-test-id": `${dataTestId}__title-link`, children: (0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { richText: title }) })) : ((0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { richText: title })) }), description && ((0, jsx_runtime_1.jsx)(typography_1.Typography, { tag: 'div', family: 'sans', purpose: 'body', size: (0, utils_1.getTypographySize)(layoutType), "data-test-id": `${dataTestId}__description`, children: (0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { className: styles_module_scss_1.default.description, richText: description }) }))] })] }) })));
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CardInfo';
|
|
@@ -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("./CardInfo"), exports);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.card{
|
|
2
|
+
position:relative;
|
|
3
|
+
border-radius:0;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.wrapper{
|
|
7
|
+
display:flex;
|
|
8
|
+
flex-direction:row;
|
|
9
|
+
gap:var(--dimension-2m, 16px);
|
|
10
|
+
}
|
|
11
|
+
.wrapper .content{
|
|
12
|
+
display:flex;
|
|
13
|
+
flex-direction:column;
|
|
14
|
+
gap:var(--dimension-050m, 4px);
|
|
15
|
+
}
|
|
16
|
+
.wrapper .content .title{
|
|
17
|
+
color:var(--sys-neutral-text-main, #41424e);
|
|
18
|
+
}
|
|
19
|
+
.wrapper .content .title a{
|
|
20
|
+
color:var(--sys-neutral-text-main, #41424e);
|
|
21
|
+
text-decoration:none;
|
|
22
|
+
}
|
|
23
|
+
.wrapper .content .title a::before{
|
|
24
|
+
content:"";
|
|
25
|
+
position:absolute;
|
|
26
|
+
top:0;
|
|
27
|
+
left:0;
|
|
28
|
+
right:0;
|
|
29
|
+
bottom:0;
|
|
30
|
+
}
|
|
31
|
+
.wrapper .content .description{
|
|
32
|
+
color:var(--sys-neutral-text-support, #656774);
|
|
33
|
+
}
|
|
34
|
+
.wrapper .tag{
|
|
35
|
+
position:absolute;
|
|
36
|
+
right:var(--dimension-050m, 4px);
|
|
37
|
+
top:var(--dimension-050m, 4px);
|
|
38
|
+
}
|
|
39
|
+
.wrapper[data-layout-type=tablet], .wrapper[data-layout-type=mobile]{
|
|
40
|
+
flex-direction:column;
|
|
41
|
+
gap:12px;
|
|
42
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes, MouseEvent } from 'react';
|
|
2
|
+
import { TagSpecialProps } from '@sbercloud/uikit-product-site-tag';
|
|
3
|
+
import { WithLayoutType, WithSupportProps } from '@sbercloud/uikit-product-utils';
|
|
4
|
+
export type CardListProps = WithSupportProps<WithLayoutType<{
|
|
5
|
+
/** Изображение */
|
|
6
|
+
img: string;
|
|
7
|
+
/** Теги */
|
|
8
|
+
tags: Omit<TagSpecialProps, 'size' | 'className'>[];
|
|
9
|
+
/** Ссылка */
|
|
10
|
+
href: string;
|
|
11
|
+
/** HTML-аттрибут target */
|
|
12
|
+
target?: AnchorHTMLAttributes<HTMLAnchorElement>['target'];
|
|
13
|
+
/** Колбек клика*/
|
|
14
|
+
onClick?(e: MouseEvent<HTMLAnchorElement>): void;
|
|
15
|
+
/**
|
|
16
|
+
* Является ли деактивированным
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/** CSS-класс */
|
|
21
|
+
className?: string;
|
|
22
|
+
/** Заголовок */
|
|
23
|
+
title: string;
|
|
24
|
+
/** Дата */
|
|
25
|
+
labelDate?: string;
|
|
26
|
+
}>>;
|
|
27
|
+
export declare function CardList({ disabled, layoutType, img, title, className, labelDate, href, onClick, tags, target, 'data-test-id': dataTestId, ...rest }: CardListProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.CardList = CardList;
|
|
18
|
+
const react_1 = require("react");
|
|
19
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
20
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
21
|
+
const uikit_product_site_tag_1 = require("@sbercloud/uikit-product-site-tag");
|
|
22
|
+
const uikit_product_utils_1 = require("@sbercloud/uikit-product-utils");
|
|
23
|
+
const truncate_string_1 = require("@snack-uikit/truncate-string");
|
|
24
|
+
const typography_1 = require("@snack-uikit/typography");
|
|
25
|
+
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
26
|
+
const utils_1 = require("./utils");
|
|
27
|
+
function CardList(_a) {
|
|
28
|
+
var { disabled, layoutType, img, title, className, labelDate, href, onClick, tags, target, 'data-test-id': dataTestId = 'card-list' } = _a, rest = __rest(_a, ["disabled", "layoutType", "img", "title", "className", "labelDate", "href", "onClick", "tags", "target", 'data-test-id']);
|
|
29
|
+
return ((0, jsx_runtime_1.jsxs)("a", Object.assign({}, (0, uikit_product_utils_1.extractSupportProps)(rest), { href: href, target: target, className: (0, classnames_1.default)(styles_module_scss_1.default.wrapper, className), "aria-disabled": disabled || undefined, tabIndex: disabled ? -1 : 0, onClick: disabled ? undefined : onClick, "data-layout-type": layoutType, children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.imgWrapper, "data-test-id": `${dataTestId}-imgWrapper`, children: (0, jsx_runtime_1.jsx)("img", { className: styles_module_scss_1.default.img, src: img, alt: 'card_img', "data-test-id": `${dataTestId}-img` }) }), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.content, children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.tagRow, children: tags.map((tag, idx) => ((0, react_1.createElement)(uikit_product_site_tag_1.TagSpecial, Object.assign({}, tag, { key: idx })))) }), (0, jsx_runtime_1.jsx)(typography_1.Typography, Object.assign({ className: styles_module_scss_1.default.title, tag: 'h3', family: 'sans' }, (0, utils_1.getTitleTypographyProps)({ layoutType }), { children: (0, jsx_runtime_1.jsx)(truncate_string_1.TruncateString, { text: title, maxLines: (0, utils_1.getTitleTruncateMaxLines)({ layoutType }), "data-test-id": `${dataTestId}-title` }) })), labelDate && ((0, jsx_runtime_1.jsx)(typography_1.Typography.SansBodyS, { className: styles_module_scss_1.default.labelDate, "data-test-id": `${dataTestId}-time`, children: labelDate }))] })] })));
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CardList';
|
|
@@ -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("./CardList"), exports);
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
.title{
|
|
2
|
+
flex:1 0 auto;
|
|
3
|
+
color:var(--sys-neutral-text-main, #41424e);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.img,
|
|
7
|
+
.title{
|
|
8
|
+
transition:all 0.3s;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.imgWrapper{
|
|
12
|
+
aspect-ratio:1.6;
|
|
13
|
+
height:176px;
|
|
14
|
+
overflow:hidden;
|
|
15
|
+
}
|
|
16
|
+
.imgWrapper .img{
|
|
17
|
+
height:100%;
|
|
18
|
+
width:100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.wrapper{
|
|
22
|
+
display:grid;
|
|
23
|
+
grid-template-columns:auto 1fr;
|
|
24
|
+
gap:var(--dimension-2m, 16px);
|
|
25
|
+
text-decoration:none;
|
|
26
|
+
}
|
|
27
|
+
.wrapper[data-layout-type=tablet] .imgWrapper{
|
|
28
|
+
height:160px;
|
|
29
|
+
}
|
|
30
|
+
.wrapper[data-layout-type=mobile]{
|
|
31
|
+
grid-template-columns:1fr;
|
|
32
|
+
}
|
|
33
|
+
.wrapper[data-layout-type=mobile] .imgWrapper{
|
|
34
|
+
aspect-ratio:unset;
|
|
35
|
+
width:100%;
|
|
36
|
+
height:auto;
|
|
37
|
+
}
|
|
38
|
+
.wrapper[aria-disabled]{
|
|
39
|
+
pointer-events:none;
|
|
40
|
+
cursor:not-allowed;
|
|
41
|
+
}
|
|
42
|
+
.wrapper[aria-disabled] .title{
|
|
43
|
+
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
44
|
+
}
|
|
45
|
+
.wrapper[aria-disabled] .imgWrapper{
|
|
46
|
+
opacity:0.5;
|
|
47
|
+
}
|
|
48
|
+
.wrapper:not([aria-disabled]):hover .title{
|
|
49
|
+
color:var(--sys-primary-accent-hovered, #12bf6a);
|
|
50
|
+
}
|
|
51
|
+
.wrapper:not([aria-disabled]):focus-visible{
|
|
52
|
+
outline-width:var(--border-state-focus-m-border-width, 3px);
|
|
53
|
+
outline-style:var(--border-state-focus-m-border-style, solid);
|
|
54
|
+
outline-color:var(--border-state-focus-m-border-color, );
|
|
55
|
+
outline-color:var(--sys-primary-decor-activated, #8ee7bb);
|
|
56
|
+
}
|
|
57
|
+
.wrapper:not([aria-disabled]):hover .img, .wrapper:not([aria-disabled]):focus-visible .img{
|
|
58
|
+
scale:1.05;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.tagRow{
|
|
62
|
+
display:flex;
|
|
63
|
+
justify-content:flex-start;
|
|
64
|
+
gap:var(--dimension-1m, 8px);
|
|
65
|
+
flex-wrap:wrap;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.content{
|
|
69
|
+
display:flex;
|
|
70
|
+
flex-direction:column;
|
|
71
|
+
gap:var(--dimension-2m, 16px);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.labelDate{
|
|
75
|
+
color:var(--sys-neutral-text-light, #8b8e9b);
|
|
76
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { WithLayoutType } from '@sbercloud/uikit-product-utils';
|
|
2
|
+
import { TypographyProps } from '@snack-uikit/typography';
|
|
3
|
+
type Props = WithLayoutType<unknown>;
|
|
4
|
+
export declare const getTitleTypographyProps: ({ layoutType }: Props) => Pick<TypographyProps, "size" | "purpose">;
|
|
5
|
+
export declare const getTitleTruncateMaxLines: ({ layoutType }: Props) => number;
|
|
6
|
+
export {};
|