@alfalab/core-components-pure-cell 1.1.0
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/component-6a05fa6a.d.ts +36 -0
- package/dist/component-6a05fa6a.js +59 -0
- package/dist/component-7b7f28f3.d.ts +107 -0
- package/dist/component-f199efcf.d.ts +62 -0
- package/dist/component-f199efcf.js +120 -0
- package/dist/component.d.ts +0 -0
- package/dist/component.js +27 -0
- package/dist/components/addon/component.d.ts +23 -0
- package/dist/components/addon/component.js +25 -0
- package/dist/components/addon/index.css +28 -0
- package/dist/components/addon/index.d.ts +1 -0
- package/dist/components/addon/index.js +12 -0
- package/dist/components/amount/component.d.ts +28 -0
- package/dist/components/amount/component.js +26 -0
- package/dist/components/amount/index.css +16 -0
- package/dist/components/amount/index.d.ts +1 -0
- package/dist/components/amount/index.js +14 -0
- package/dist/components/amount-title/component.d.ts +20 -0
- package/dist/components/amount-title/component.js +26 -0
- package/dist/components/amount-title/index.css +15 -0
- package/dist/components/amount-title/index.d.ts +1 -0
- package/dist/components/amount-title/index.js +14 -0
- package/dist/components/category/component.d.ts +18 -0
- package/dist/components/category/component.js +25 -0
- package/dist/components/category/index.css +36 -0
- package/dist/components/category/index.d.ts +1 -0
- package/dist/components/category/index.js +12 -0
- package/dist/components/comment/component.d.ts +15 -0
- package/dist/components/comment/component.js +22 -0
- package/dist/components/comment/index.css +34 -0
- package/dist/components/comment/index.d.ts +1 -0
- package/dist/components/comment/index.js +12 -0
- package/dist/components/content/component.d.ts +0 -0
- package/dist/components/content/component.js +26 -0
- package/dist/components/content/index.css +17 -0
- package/dist/components/content/index.d.ts +1 -0
- package/dist/components/content/index.js +26 -0
- package/dist/components/footer/component.d.ts +19 -0
- package/dist/components/footer/component.js +22 -0
- package/dist/components/footer/index.css +23 -0
- package/dist/components/footer/index.d.ts +1 -0
- package/dist/components/footer/index.js +12 -0
- package/dist/components/footer-button/component.d.ts +0 -0
- package/dist/components/footer-button/component.js +12 -0
- package/dist/components/footer-button/index.css +12 -0
- package/dist/components/footer-button/index.d.ts +1 -0
- package/dist/components/footer-button/index.js +12 -0
- package/dist/components/footer-text/component.d.ts +15 -0
- package/dist/components/footer-text/component.js +18 -0
- package/dist/components/footer-text/index.d.ts +1 -0
- package/dist/components/footer-text/index.js +12 -0
- package/dist/components/graphics/component.d.ts +15 -0
- package/dist/components/graphics/component.js +20 -0
- package/dist/components/graphics/index.css +12 -0
- package/dist/components/graphics/index.d.ts +1 -0
- package/dist/components/graphics/index.js +11 -0
- package/dist/components/main/component.d.ts +0 -0
- package/dist/components/main/component.js +26 -0
- package/dist/components/main/index.css +31 -0
- package/dist/components/main/index.d.ts +1 -0
- package/dist/components/main/index.js +26 -0
- package/dist/components/text/component.d.ts +0 -0
- package/dist/components/text/component.js +26 -0
- package/dist/components/text/index.css +47 -0
- package/dist/components/text/index.d.ts +1 -0
- package/dist/components/text/index.js +26 -0
- package/dist/components/types.d.ts +21 -0
- package/dist/components/types.js +2 -0
- package/dist/components/typesProps.d.ts +46 -0
- package/dist/components/typesProps.js +2 -0
- package/dist/cssm/component-22ece846.d.ts +36 -0
- package/dist/cssm/component-22ece846.js +58 -0
- package/dist/cssm/component-7b7f28f3.d.ts +107 -0
- package/dist/cssm/component-a5914e3d.d.ts +62 -0
- package/dist/cssm/component-a5914e3d.js +116 -0
- package/dist/cssm/component.d.ts +0 -0
- package/dist/cssm/component.js +39 -0
- package/dist/cssm/components/addon/component.d.ts +23 -0
- package/dist/cssm/components/addon/component.js +24 -0
- package/dist/cssm/components/addon/index.d.ts +1 -0
- package/dist/cssm/components/addon/index.js +13 -0
- package/dist/cssm/components/addon/index.module.css +27 -0
- package/dist/cssm/components/amount/component.d.ts +28 -0
- package/dist/cssm/components/amount/component.js +25 -0
- package/dist/cssm/components/amount/index.d.ts +1 -0
- package/dist/cssm/components/amount/index.js +15 -0
- package/dist/cssm/components/amount/index.module.css +15 -0
- package/dist/cssm/components/amount-title/component.d.ts +20 -0
- package/dist/cssm/components/amount-title/component.js +25 -0
- package/dist/cssm/components/amount-title/index.d.ts +1 -0
- package/dist/cssm/components/amount-title/index.js +15 -0
- package/dist/cssm/components/amount-title/index.module.css +14 -0
- package/dist/cssm/components/category/component.d.ts +18 -0
- package/dist/cssm/components/category/component.js +24 -0
- package/dist/cssm/components/category/index.d.ts +1 -0
- package/dist/cssm/components/category/index.js +13 -0
- package/dist/cssm/components/category/index.module.css +35 -0
- package/dist/cssm/components/comment/component.d.ts +15 -0
- package/dist/cssm/components/comment/component.js +21 -0
- package/dist/cssm/components/comment/index.d.ts +1 -0
- package/dist/cssm/components/comment/index.js +13 -0
- package/dist/cssm/components/comment/index.module.css +33 -0
- package/dist/cssm/components/content/component.d.ts +0 -0
- package/dist/cssm/components/content/component.js +38 -0
- package/dist/cssm/components/content/index.d.ts +1 -0
- package/dist/cssm/components/content/index.js +38 -0
- package/dist/cssm/components/content/index.module.css +16 -0
- package/dist/cssm/components/footer/component.d.ts +19 -0
- package/dist/cssm/components/footer/component.js +21 -0
- package/dist/cssm/components/footer/index.d.ts +1 -0
- package/dist/cssm/components/footer/index.js +13 -0
- package/dist/cssm/components/footer/index.module.css +22 -0
- package/dist/cssm/components/footer-button/component.d.ts +0 -0
- package/dist/cssm/components/footer-button/component.js +13 -0
- package/dist/cssm/components/footer-button/index.d.ts +1 -0
- package/dist/cssm/components/footer-button/index.js +13 -0
- package/dist/cssm/components/footer-button/index.module.css +11 -0
- package/dist/cssm/components/footer-text/component.d.ts +15 -0
- package/dist/cssm/components/footer-text/component.js +18 -0
- package/dist/cssm/components/footer-text/index.d.ts +1 -0
- package/dist/cssm/components/footer-text/index.js +12 -0
- package/dist/cssm/components/graphics/component.d.ts +15 -0
- package/dist/cssm/components/graphics/component.js +19 -0
- package/dist/cssm/components/graphics/index.d.ts +1 -0
- package/dist/cssm/components/graphics/index.js +12 -0
- package/dist/cssm/components/graphics/index.module.css +11 -0
- package/dist/cssm/components/main/component.d.ts +0 -0
- package/dist/cssm/components/main/component.js +38 -0
- package/dist/cssm/components/main/index.d.ts +1 -0
- package/dist/cssm/components/main/index.js +38 -0
- package/dist/cssm/components/main/index.module.css +30 -0
- package/dist/cssm/components/text/component.d.ts +0 -0
- package/dist/cssm/components/text/component.js +38 -0
- package/dist/cssm/components/text/index.d.ts +1 -0
- package/dist/cssm/components/text/index.js +38 -0
- package/dist/cssm/components/text/index.module.css +46 -0
- package/dist/cssm/components/types.d.ts +21 -0
- package/dist/cssm/components/types.js +2 -0
- package/dist/cssm/components/typesProps.d.ts +46 -0
- package/dist/cssm/components/typesProps.js +2 -0
- package/dist/cssm/getDataTestId-12a31ec3.d.ts +2 -0
- package/dist/cssm/getDataTestId-12a31ec3.js +8 -0
- package/dist/cssm/index.d.ts +1 -0
- package/dist/cssm/index.js +38 -0
- package/dist/cssm/index.module.css +87 -0
- package/dist/esm/component-0a200d52.d.ts +62 -0
- package/dist/esm/component-0a200d52.js +108 -0
- package/dist/esm/component-7afaa00b.d.ts +36 -0
- package/dist/esm/component-7afaa00b.js +52 -0
- package/dist/esm/component-7b7f28f3.d.ts +107 -0
- package/dist/esm/component.d.ts +0 -0
- package/dist/esm/component.js +18 -0
- package/dist/esm/components/addon/component.d.ts +23 -0
- package/dist/esm/components/addon/component.js +16 -0
- package/dist/esm/components/addon/index.css +28 -0
- package/dist/esm/components/addon/index.d.ts +1 -0
- package/dist/esm/components/addon/index.js +4 -0
- package/dist/esm/components/amount/component.d.ts +28 -0
- package/dist/esm/components/amount/component.js +17 -0
- package/dist/esm/components/amount/index.css +16 -0
- package/dist/esm/components/amount/index.d.ts +1 -0
- package/dist/esm/components/amount/index.js +6 -0
- package/dist/esm/components/amount-title/component.d.ts +20 -0
- package/dist/esm/components/amount-title/component.js +17 -0
- package/dist/esm/components/amount-title/index.css +15 -0
- package/dist/esm/components/amount-title/index.d.ts +1 -0
- package/dist/esm/components/amount-title/index.js +6 -0
- package/dist/esm/components/category/component.d.ts +18 -0
- package/dist/esm/components/category/component.js +17 -0
- package/dist/esm/components/category/index.css +36 -0
- package/dist/esm/components/category/index.d.ts +1 -0
- package/dist/esm/components/category/index.js +4 -0
- package/dist/esm/components/comment/component.d.ts +15 -0
- package/dist/esm/components/comment/component.js +14 -0
- package/dist/esm/components/comment/index.css +34 -0
- package/dist/esm/components/comment/index.d.ts +1 -0
- package/dist/esm/components/comment/index.js +4 -0
- package/dist/esm/components/content/component.d.ts +0 -0
- package/dist/esm/components/content/component.js +18 -0
- package/dist/esm/components/content/index.css +17 -0
- package/dist/esm/components/content/index.d.ts +1 -0
- package/dist/esm/components/content/index.js +18 -0
- package/dist/esm/components/footer/component.d.ts +19 -0
- package/dist/esm/components/footer/component.js +13 -0
- package/dist/esm/components/footer/index.css +23 -0
- package/dist/esm/components/footer/index.d.ts +1 -0
- package/dist/esm/components/footer/index.js +4 -0
- package/dist/esm/components/footer-button/component.d.ts +0 -0
- package/dist/esm/components/footer-button/component.js +4 -0
- package/dist/esm/components/footer-button/index.css +12 -0
- package/dist/esm/components/footer-button/index.d.ts +1 -0
- package/dist/esm/components/footer-button/index.js +4 -0
- package/dist/esm/components/footer-text/component.d.ts +15 -0
- package/dist/esm/components/footer-text/component.js +10 -0
- package/dist/esm/components/footer-text/index.d.ts +1 -0
- package/dist/esm/components/footer-text/index.js +4 -0
- package/dist/esm/components/graphics/component.d.ts +15 -0
- package/dist/esm/components/graphics/component.js +12 -0
- package/dist/esm/components/graphics/index.css +12 -0
- package/dist/esm/components/graphics/index.d.ts +1 -0
- package/dist/esm/components/graphics/index.js +3 -0
- package/dist/esm/components/main/component.d.ts +0 -0
- package/dist/esm/components/main/component.js +18 -0
- package/dist/esm/components/main/index.css +31 -0
- package/dist/esm/components/main/index.d.ts +1 -0
- package/dist/esm/components/main/index.js +18 -0
- package/dist/esm/components/text/component.d.ts +0 -0
- package/dist/esm/components/text/component.js +18 -0
- package/dist/esm/components/text/index.css +47 -0
- package/dist/esm/components/text/index.d.ts +1 -0
- package/dist/esm/components/text/index.js +18 -0
- package/dist/esm/components/types.d.ts +21 -0
- package/dist/esm/components/types.js +1 -0
- package/dist/esm/components/typesProps.d.ts +46 -0
- package/dist/esm/components/typesProps.js +1 -0
- package/dist/esm/getDataTestId-babf3783.d.ts +2 -0
- package/dist/esm/getDataTestId-babf3783.js +6 -0
- package/dist/esm/index.css +88 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +18 -0
- package/dist/getDataTestId-00d7409e.d.ts +2 -0
- package/dist/getDataTestId-00d7409e.js +8 -0
- package/dist/index.css +88 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +26 -0
- package/dist/modern/component-7b7f28f3.d.ts +107 -0
- package/dist/modern/component-9c1fe763.d.ts +62 -0
- package/dist/modern/component-9c1fe763.js +100 -0
- package/dist/modern/component.d.ts +0 -0
- package/dist/modern/component.js +18 -0
- package/dist/modern/components/addon/component.d.ts +23 -0
- package/dist/modern/components/addon/component.js +12 -0
- package/dist/modern/components/addon/index.css +28 -0
- package/dist/modern/components/addon/index.d.ts +1 -0
- package/dist/modern/components/addon/index.js +4 -0
- package/dist/modern/components/amount/component.d.ts +28 -0
- package/dist/modern/components/amount/component.js +16 -0
- package/dist/modern/components/amount/index.css +16 -0
- package/dist/modern/components/amount/index.d.ts +1 -0
- package/dist/modern/components/amount/index.js +6 -0
- package/dist/modern/components/amount-title/component.d.ts +20 -0
- package/dist/modern/components/amount-title/component.js +16 -0
- package/dist/modern/components/amount-title/index.css +15 -0
- package/dist/modern/components/amount-title/index.d.ts +1 -0
- package/dist/modern/components/amount-title/index.js +6 -0
- package/dist/modern/components/category/component.d.ts +18 -0
- package/dist/modern/components/category/component.js +14 -0
- package/dist/modern/components/category/index.css +36 -0
- package/dist/modern/components/category/index.d.ts +1 -0
- package/dist/modern/components/category/index.js +4 -0
- package/dist/modern/components/comment/component.d.ts +15 -0
- package/dist/modern/components/comment/component.js +11 -0
- package/dist/modern/components/comment/index.css +34 -0
- package/dist/modern/components/comment/index.d.ts +1 -0
- package/dist/modern/components/comment/index.js +4 -0
- package/dist/modern/components/content/component.d.ts +0 -0
- package/dist/modern/components/content/component.js +18 -0
- package/dist/modern/components/content/index.css +17 -0
- package/dist/modern/components/content/index.d.ts +1 -0
- package/dist/modern/components/content/index.js +18 -0
- package/dist/modern/components/footer/component.d.ts +19 -0
- package/dist/modern/components/footer/component.js +10 -0
- package/dist/modern/components/footer/index.css +23 -0
- package/dist/modern/components/footer/index.d.ts +1 -0
- package/dist/modern/components/footer/index.js +4 -0
- package/dist/modern/components/footer-button/component.d.ts +5 -0
- package/dist/modern/components/footer-button/component.js +10 -0
- package/dist/modern/components/footer-button/index.css +12 -0
- package/dist/modern/components/footer-button/index.d.ts +1 -0
- package/dist/modern/components/footer-button/index.js +4 -0
- package/dist/modern/components/footer-text/component.d.ts +15 -0
- package/dist/modern/components/footer-text/component.js +7 -0
- package/dist/modern/components/footer-text/index.d.ts +1 -0
- package/dist/modern/components/footer-text/index.js +4 -0
- package/dist/modern/components/graphics/component.d.ts +15 -0
- package/dist/modern/components/graphics/component.js +11 -0
- package/dist/modern/components/graphics/index.css +12 -0
- package/dist/modern/components/graphics/index.d.ts +1 -0
- package/dist/modern/components/graphics/index.js +3 -0
- package/dist/modern/components/main/component.d.ts +0 -0
- package/dist/modern/components/main/component.js +18 -0
- package/dist/modern/components/main/index.css +31 -0
- package/dist/modern/components/main/index.d.ts +1 -0
- package/dist/modern/components/main/index.js +18 -0
- package/dist/modern/components/text/component.d.ts +0 -0
- package/dist/modern/components/text/component.js +18 -0
- package/dist/modern/components/text/index.css +47 -0
- package/dist/modern/components/text/index.d.ts +1 -0
- package/dist/modern/components/text/index.js +18 -0
- package/dist/modern/components/types.d.ts +21 -0
- package/dist/modern/components/types.js +1 -0
- package/dist/modern/components/typesProps.d.ts +46 -0
- package/dist/modern/components/typesProps.js +1 -0
- package/dist/modern/getDataTestId-0bb060c4.d.ts +2 -0
- package/dist/modern/getDataTestId-0bb060c4.js +6 -0
- package/dist/modern/index.css +88 -0
- package/dist/modern/index.d.ts +1 -0
- package/dist/modern/index.js +18 -0
- package/dist/send-stats.js +82 -0
- package/package.json +31 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { MainElement, ContentElement } from "./components/types";
|
|
4
|
+
import { Color } from "@alfalab/core-components-typography";
|
|
5
|
+
type Props = {
|
|
6
|
+
/**
|
|
7
|
+
* Компоненты
|
|
8
|
+
*/
|
|
9
|
+
children: MainElement;
|
|
10
|
+
/**
|
|
11
|
+
* Позволяет изменить расположение блоков внутри main
|
|
12
|
+
*/
|
|
13
|
+
isReverse?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
16
|
+
*/
|
|
17
|
+
dataTestId?: string;
|
|
18
|
+
};
|
|
19
|
+
declare const Main: React.FC<Props>;
|
|
20
|
+
type Props$0 = {
|
|
21
|
+
/**
|
|
22
|
+
* Компоненты
|
|
23
|
+
*/
|
|
24
|
+
children: ContentElement;
|
|
25
|
+
/**
|
|
26
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
27
|
+
*/
|
|
28
|
+
dataTestId?: string;
|
|
29
|
+
};
|
|
30
|
+
declare const Content: React.FC<Props$0>;
|
|
31
|
+
type Props$1 = {
|
|
32
|
+
/**
|
|
33
|
+
* Количество строк
|
|
34
|
+
*/
|
|
35
|
+
rowLimit?: 1 | 2;
|
|
36
|
+
/**
|
|
37
|
+
* Многострочный ли компонент
|
|
38
|
+
*/
|
|
39
|
+
isMultiline?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Размер текста
|
|
42
|
+
*/
|
|
43
|
+
view: 'primary-small' | 'component';
|
|
44
|
+
/**
|
|
45
|
+
* Цвет title
|
|
46
|
+
*/
|
|
47
|
+
titleColor: Color;
|
|
48
|
+
/**
|
|
49
|
+
* Value ячейки
|
|
50
|
+
*/
|
|
51
|
+
value?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Цвет value
|
|
54
|
+
*/
|
|
55
|
+
valueColor?: Color;
|
|
56
|
+
/**
|
|
57
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
58
|
+
*/
|
|
59
|
+
dataTestId?: string;
|
|
60
|
+
};
|
|
61
|
+
declare const Text: React.FC<Props$1>;
|
|
62
|
+
export { Main, Content, Text };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { _ as __rest, a as __assign, F as FooterButton } from './component-7afaa00b.js';
|
|
2
|
+
import React, { useContext, forwardRef, useRef } from 'react';
|
|
3
|
+
import mergeRefs from 'react-merge-refs';
|
|
4
|
+
import cn from 'classnames';
|
|
5
|
+
import { useFocus } from '@alfalab/hooks';
|
|
6
|
+
import { g as getDataTestId } from './getDataTestId-babf3783.js';
|
|
7
|
+
import { Addon } from './components/addon/component.js';
|
|
8
|
+
import { Typography } from '@alfalab/core-components-typography/dist/esm';
|
|
9
|
+
import { Amount } from './components/amount/component.js';
|
|
10
|
+
import { AmountTitle } from './components/amount-title/component.js';
|
|
11
|
+
import { Category } from './components/category/component.js';
|
|
12
|
+
import { Comment } from './components/comment/component.js';
|
|
13
|
+
import { Footer } from './components/footer/component.js';
|
|
14
|
+
import { FooterText } from './components/footer-text/component.js';
|
|
15
|
+
import { Graphics } from './components/graphics/component.js';
|
|
16
|
+
|
|
17
|
+
var styles = {"component":"pure-cell__component_1vkg3","horizontal":"pure-cell__horizontal_1vkg3"};
|
|
18
|
+
require('./components/content/index.css')
|
|
19
|
+
|
|
20
|
+
var Content = function (_a) {
|
|
21
|
+
var _b;
|
|
22
|
+
var children = _a.children, dataTestId = _a.dataTestId;
|
|
23
|
+
var direction = useContext(PureCellContext).direction;
|
|
24
|
+
return (React.createElement("section", { className: cn(styles.component, (_b = {}, _b[styles.horizontal] = direction === 'horizontal', _b)), "data-test-id": getDataTestId(dataTestId, 'content') }, children));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
var styles$1 = {"component":"pure-cell__component_raiu9","vertical":"pure-cell__vertical_raiu9","reverse":"pure-cell__reverse_raiu9"};
|
|
28
|
+
require('./components/main/index.css')
|
|
29
|
+
|
|
30
|
+
var Main = function (_a) {
|
|
31
|
+
var _b;
|
|
32
|
+
var children = _a.children, isReverse = _a.isReverse, dataTestId = _a.dataTestId;
|
|
33
|
+
var _c = useContext(PureCellContext).direction, direction = _c === void 0 ? 'horizontal' : _c;
|
|
34
|
+
return (React.createElement("main", { className: cn(styles$1.component, styles$1[direction], (_b = {},
|
|
35
|
+
_b[styles$1.reverse] = isReverse,
|
|
36
|
+
_b)), "data-test-id": getDataTestId(dataTestId, 'main') }, children));
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
var styles$2 = {"horizontal":"pure-cell__horizontal_ndofp","rowLimit1":"pure-cell__rowLimit1_ndofp","rowLimit2":"pure-cell__rowLimit2_ndofp","component":"pure-cell__component_ndofp","multiline":"pure-cell__multiline_ndofp","vertical":"pure-cell__vertical_ndofp","title":"pure-cell__title_ndofp"};
|
|
40
|
+
require('./components/text/index.css')
|
|
41
|
+
|
|
42
|
+
var Text = function (_a) {
|
|
43
|
+
var _b, _c, _d;
|
|
44
|
+
var children = _a.children, value = _a.value, rowLimit = _a.rowLimit, isMultiline = _a.isMultiline, _e = _a.view, view = _e === void 0 ? 'component' : _e, titleColor = _a.titleColor, valueColor = _a.valueColor, dataTestId = _a.dataTestId;
|
|
45
|
+
var _f = useContext(PureCellContext).direction, direction = _f === void 0 ? 'horizontal' : _f;
|
|
46
|
+
return (React.createElement("div", { className: cn(styles$2.component, (_b = {},
|
|
47
|
+
_b[styles$2.vertical] = direction !== 'horizontal',
|
|
48
|
+
_b)) },
|
|
49
|
+
React.createElement("span", { className: cn(styles$2.title) },
|
|
50
|
+
React.createElement(Typography.Text, { view: view, color: titleColor, className: cn(rowLimit && styles$2["rowLimit" + rowLimit], (_c = {},
|
|
51
|
+
_c[styles$2.rowLimit1] = !isMultiline,
|
|
52
|
+
_c)), "data-test-id": getDataTestId(dataTestId, 'text') }, children)),
|
|
53
|
+
React.createElement("span", null,
|
|
54
|
+
React.createElement(Typography.Text, { view: view, color: valueColor, className: cn((_d = {},
|
|
55
|
+
_d[styles$2["rowLimit" + rowLimit]] = rowLimit,
|
|
56
|
+
_d[styles$2.multiline] = isMultiline,
|
|
57
|
+
_d)), "data-test-id": getDataTestId(dataTestId, 'text') }, value))));
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
var styles$3 = {"component":"pure-cell__component_7do4h","horizontal":"pure-cell__horizontal_7do4h","vertical":"pure-cell__vertical_7do4h","button":"pure-cell__button_7do4h","link":"pure-cell__link_7do4h","none":"pure-cell__none_7do4h","airy":"pure-cell__airy_7do4h","default":"pure-cell__default_7do4h","compact":"pure-cell__compact_7do4h","tiny":"pure-cell__tiny_7do4h","left":"pure-cell__left_7do4h","right":"pure-cell__right_7do4h","both":"pure-cell__both_7do4h","focused":"pure-cell__focused_7do4h"};
|
|
61
|
+
require('./index.css')
|
|
62
|
+
|
|
63
|
+
var PureCellContext = React.createContext({});
|
|
64
|
+
var PureCellComponent = forwardRef(function (_a, ref) {
|
|
65
|
+
var _b, _c;
|
|
66
|
+
var className = _a.className, dataTestId = _a.dataTestId, onClick = _a.onClick, href = _a.href, _d = _a.tag, Component = _d === void 0 ? (href && 'a') || (onClick && 'button') || 'section' : _d, children = _a.children, _e = _a.horizontalPadding, horizontalPadding = _e === void 0 ? 'default' : _e, _f = _a.verticalPadding, verticalPadding = _f === void 0 ? 'none' : _f, _g = _a.direction, direction = _g === void 0 ? 'horizontal' : _g, restProps = __rest(_a, ["className", "dataTestId", "onClick", "href", "tag", "children", "horizontalPadding", "verticalPadding", "direction"]);
|
|
67
|
+
var cellRef = useRef(null);
|
|
68
|
+
var focused = useFocus(cellRef, 'keyboard')[0];
|
|
69
|
+
var addClasses = (_b = {},
|
|
70
|
+
_b[styles$3.component] = true,
|
|
71
|
+
_b[styles$3.focused] = focused,
|
|
72
|
+
_b[styles$3[direction]] = true,
|
|
73
|
+
_b);
|
|
74
|
+
if (href) {
|
|
75
|
+
var target = restProps.target;
|
|
76
|
+
// Для совместимости с react-router-dom, меняем href на to
|
|
77
|
+
var hrefProps = (_c = {}, _c[typeof Component === 'string' ? 'href' : 'to'] = href, _c);
|
|
78
|
+
return (React.createElement(Component, __assign({ rel: target === '_blank' ? 'noreferrer noopener' : undefined }, restProps, hrefProps, { ref: mergeRefs([cellRef, ref]), className: cn(styles$3.link, addClasses, className, styles$3[horizontalPadding], styles$3[verticalPadding]), "data-test-id": dataTestId }),
|
|
79
|
+
React.createElement(PureCellContext.Provider, { value: { direction: direction } }, children)));
|
|
80
|
+
}
|
|
81
|
+
if (onClick) {
|
|
82
|
+
return (React.createElement(Component, __assign({}, restProps, { ref: mergeRefs([cellRef, ref]), className: cn(styles$3.button, addClasses, styles$3[horizontalPadding], styles$3[verticalPadding], className), "data-test-id": dataTestId, onClick: onClick }),
|
|
83
|
+
React.createElement(PureCellContext.Provider, { value: { direction: direction } }, children)));
|
|
84
|
+
}
|
|
85
|
+
return (React.createElement(Component, { ref: ref, tabIndex: 0, className: cn(addClasses, styles$3[horizontalPadding], styles$3[verticalPadding], className), "data-test-id": dataTestId },
|
|
86
|
+
React.createElement(PureCellContext.Provider, { value: { direction: direction } }, children)));
|
|
87
|
+
});
|
|
88
|
+
/**
|
|
89
|
+
* Универсальный конструктор для сборки любой ячейки.
|
|
90
|
+
*
|
|
91
|
+
* [Макет](https://www.figma.com/file/KlFOLLkKO8rtvvQE3RXuhq/Click-Library?node-id=43525%3A240018)
|
|
92
|
+
*/
|
|
93
|
+
var PureCell = Object.assign(PureCellComponent, {
|
|
94
|
+
Main: Main,
|
|
95
|
+
Graphics: Graphics,
|
|
96
|
+
Content: Content,
|
|
97
|
+
Text: Text,
|
|
98
|
+
Amount: Amount,
|
|
99
|
+
AmountTitle: AmountTitle,
|
|
100
|
+
Addon: Addon,
|
|
101
|
+
Footer: Footer,
|
|
102
|
+
ExtraSubtitle: FooterText,
|
|
103
|
+
FooterButton: FooterButton,
|
|
104
|
+
Comment: Comment,
|
|
105
|
+
Category: Category,
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
export { Content as C, Main as M, PureCell as P, Text as T, PureCellContext as a };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ButtonProps } from "@alfalab/core-components-button";
|
|
4
|
+
declare function __extends(d: any, b: any): void;
|
|
5
|
+
declare function __rest(s: any, e: any): {};
|
|
6
|
+
declare function __decorate(decorators: any, target: any, key: any, desc: any, ...args: any[]): any;
|
|
7
|
+
declare function __param(paramIndex: any, decorator: any): (target: any, key: any) => void;
|
|
8
|
+
declare function __metadata(metadataKey: any, metadataValue: any): any;
|
|
9
|
+
declare function __awaiter(thisArg: any, _arguments: any, P: any, generator: any): any;
|
|
10
|
+
declare function __generator(thisArg: any, body: any): {
|
|
11
|
+
next: (v: any) => any;
|
|
12
|
+
throw: (v: any) => any;
|
|
13
|
+
return: (v: any) => any;
|
|
14
|
+
};
|
|
15
|
+
declare function __exportStar(m: any, o: any): void;
|
|
16
|
+
declare function __values(o: any): any;
|
|
17
|
+
declare function __read(o: any, n: any): any;
|
|
18
|
+
declare function __spread(...args: any[]): any[];
|
|
19
|
+
declare function __spreadArrays(...args: any[]): any[];
|
|
20
|
+
declare function __await(v: any): any;
|
|
21
|
+
declare class __await {
|
|
22
|
+
constructor(v: any);
|
|
23
|
+
v: any;
|
|
24
|
+
}
|
|
25
|
+
declare function __asyncGenerator(thisArg: any, _arguments: any, generator: any): {};
|
|
26
|
+
declare function __asyncDelegator(o: any): {};
|
|
27
|
+
declare function __asyncValues(o: any): any;
|
|
28
|
+
declare function __makeTemplateObject(cooked: any, raw: any): any;
|
|
29
|
+
declare function __importStar(mod: any): any;
|
|
30
|
+
declare function __importDefault(mod: any): any;
|
|
31
|
+
declare function __classPrivateFieldGet(receiver: any, privateMap: any): any;
|
|
32
|
+
declare function __classPrivateFieldSet(receiver: any, privateMap: any, value: any): any;
|
|
33
|
+
declare function __assign(...args: any[]): any;
|
|
34
|
+
declare function __createBinding(o: any, m: any, k: any, k2: any): void;
|
|
35
|
+
declare const FooterButton: React.FC<ButtonProps>;
|
|
36
|
+
export { __extends, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __spreadArrays, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __assign, __createBinding, FooterButton };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { g as getDataTestId } from './getDataTestId-babf3783.js';
|
|
3
|
+
import { Button } from '@alfalab/core-components-button/dist/esm';
|
|
4
|
+
|
|
5
|
+
/*! *****************************************************************************
|
|
6
|
+
Copyright (c) Microsoft Corporation.
|
|
7
|
+
|
|
8
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
9
|
+
purpose with or without fee is hereby granted.
|
|
10
|
+
|
|
11
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
12
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
13
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
14
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
15
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
16
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
17
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
18
|
+
***************************************************************************** */
|
|
19
|
+
var __assign = function () {
|
|
20
|
+
__assign = Object.assign || function __assign(t) {
|
|
21
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
22
|
+
s = arguments[i];
|
|
23
|
+
for (var p in s)
|
|
24
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
25
|
+
t[p] = s[p];
|
|
26
|
+
}
|
|
27
|
+
return t;
|
|
28
|
+
};
|
|
29
|
+
return __assign.apply(this, arguments);
|
|
30
|
+
};
|
|
31
|
+
function __rest(s, e) {
|
|
32
|
+
var t = {};
|
|
33
|
+
for (var p in s)
|
|
34
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
35
|
+
t[p] = s[p];
|
|
36
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
37
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
38
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
39
|
+
t[p[i]] = s[p[i]];
|
|
40
|
+
}
|
|
41
|
+
return t;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
var styles = {"component":"pure-cell__component_8ssjt"};
|
|
45
|
+
require('./components/footer-button/index.css')
|
|
46
|
+
|
|
47
|
+
var FooterButton = function (_a) {
|
|
48
|
+
var children = _a.children, dataTestId = _a.dataTestId, props = __rest(_a, ["children", "dataTestId"]);
|
|
49
|
+
return (React.createElement(Button, __assign({}, props, { size: 'xxs', dataTestId: getDataTestId(dataTestId, 'button'), className: styles.component }), children));
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export { FooterButton as F, __rest as _, __assign as a };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { AnchorHTMLAttributes, ButtonHTMLAttributes, ElementType, HTMLAttributes } from "react";
|
|
4
|
+
import { PureCellElement } from "./components/types";
|
|
5
|
+
type PureCellContext = {
|
|
6
|
+
/** Направление */
|
|
7
|
+
direction?: 'horizontal' | 'vertical';
|
|
8
|
+
};
|
|
9
|
+
declare const PureCellContext: React.Context<PureCellContext>;
|
|
10
|
+
type PureCellProps = {
|
|
11
|
+
/**
|
|
12
|
+
* Направление
|
|
13
|
+
*/
|
|
14
|
+
direction?: 'horizontal' | 'vertical';
|
|
15
|
+
/**
|
|
16
|
+
* Сss класс для стилизации общей обёртки
|
|
17
|
+
*/
|
|
18
|
+
className?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Выводит ссылку в виде ячейки
|
|
21
|
+
*/
|
|
22
|
+
href?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Вертикальные отступы
|
|
25
|
+
*/
|
|
26
|
+
verticalPadding?: 'airy' | 'default' | 'compact' | 'tiny' | 'none';
|
|
27
|
+
/**
|
|
28
|
+
* Горизонтальные отступы
|
|
29
|
+
*/
|
|
30
|
+
horizontalPadding?: 'left' | 'right' | 'both' | 'none';
|
|
31
|
+
/**
|
|
32
|
+
* Позволяет использовать кастомный компонент для кнопки (например Link из роутера)
|
|
33
|
+
*/
|
|
34
|
+
tag?: ElementType;
|
|
35
|
+
/**
|
|
36
|
+
* Компоненты
|
|
37
|
+
*/
|
|
38
|
+
children: PureCellElement;
|
|
39
|
+
/**
|
|
40
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
41
|
+
*/
|
|
42
|
+
dataTestId?: string;
|
|
43
|
+
};
|
|
44
|
+
type AnchorPureCellProps = PureCellProps & AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
45
|
+
type ButtonPureCellProps = PureCellProps & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
46
|
+
type ElementPureCellProps = PureCellProps & HTMLAttributes<HTMLElement>;
|
|
47
|
+
/**
|
|
48
|
+
* Универсальный конструктор для сборки любой ячейки.
|
|
49
|
+
*
|
|
50
|
+
* [Макет](https://www.figma.com/file/KlFOLLkKO8rtvvQE3RXuhq/Click-Library?node-id=43525%3A240018)
|
|
51
|
+
*/
|
|
52
|
+
declare const PureCell: React.ForwardRefExoticComponent<(Partial<AnchorPureCellProps> & React.RefAttributes<HTMLElement>) | (Partial<ButtonPureCellProps> & React.RefAttributes<HTMLElement>) | (Partial<ElementPureCellProps> & React.RefAttributes<HTMLElement>)> & {
|
|
53
|
+
Main: React.FC<{
|
|
54
|
+
children: import("./components/types").MainElement;
|
|
55
|
+
isReverse?: boolean | undefined;
|
|
56
|
+
dataTestId?: string | undefined;
|
|
57
|
+
}>;
|
|
58
|
+
Graphics: React.FC<import("./components/graphics/index").Props>;
|
|
59
|
+
Content: React.FC<{
|
|
60
|
+
children: import("./components/types").ContentElement;
|
|
61
|
+
dataTestId?: string | undefined;
|
|
62
|
+
}>;
|
|
63
|
+
Text: React.FC<{
|
|
64
|
+
rowLimit?: 1 | 2 | undefined;
|
|
65
|
+
isMultiline?: boolean | undefined;
|
|
66
|
+
view: "primary-small" | "component";
|
|
67
|
+
titleColor: "tertiary" | "disabled" | "accent" | "primary" | "attention" | "positive" | "secondary" | "tertiary-inverted" | "primary-inverted" | "secondary-inverted" | "link" | "negative";
|
|
68
|
+
value?: string | undefined;
|
|
69
|
+
valueColor?: "tertiary" | "disabled" | "accent" | "primary" | "attention" | "positive" | "secondary" | "tertiary-inverted" | "primary-inverted" | "secondary-inverted" | "link" | "negative" | undefined;
|
|
70
|
+
dataTestId?: string | undefined;
|
|
71
|
+
}>;
|
|
72
|
+
Amount: React.FC<{
|
|
73
|
+
amount: import("./components/typesProps").AmountProps;
|
|
74
|
+
weight?: "bold" | "normal" | undefined;
|
|
75
|
+
view?: "primary-small" | "component" | undefined;
|
|
76
|
+
color?: "tertiary" | "disabled" | "accent" | "primary" | "attention" | "positive" | "secondary" | "tertiary-inverted" | "primary-inverted" | "secondary-inverted" | "link" | "negative" | undefined;
|
|
77
|
+
dataTestId?: string | undefined;
|
|
78
|
+
}>;
|
|
79
|
+
AmountTitle: React.FC<{
|
|
80
|
+
amount: import("./components/typesProps").AmountProps;
|
|
81
|
+
color?: "tertiary" | "disabled" | "accent" | "primary" | "attention" | "positive" | "secondary" | "tertiary-inverted" | "primary-inverted" | "secondary-inverted" | "link" | "negative" | undefined;
|
|
82
|
+
dataTestId?: string | undefined;
|
|
83
|
+
}>;
|
|
84
|
+
Addon: React.FC<{
|
|
85
|
+
verticalAlign?: "center" | undefined;
|
|
86
|
+
addonPadding?: "none" | "default" | undefined;
|
|
87
|
+
children: import("./components/types").AddonElement;
|
|
88
|
+
dataTestId?: string | undefined;
|
|
89
|
+
}>;
|
|
90
|
+
Footer: React.FC<{
|
|
91
|
+
children: import("./components/types").FooterElement;
|
|
92
|
+
footerPadding?: "none" | "default" | undefined;
|
|
93
|
+
dataTestId?: string | undefined;
|
|
94
|
+
}>;
|
|
95
|
+
ExtraSubtitle: React.FC<import("./components/footer-text/index").Props>;
|
|
96
|
+
FooterButton: React.FC<Partial<import("packages/button/src").ComponentProps & React.AnchorHTMLAttributes<HTMLAnchorElement>> | Partial<import("packages/button/src").ComponentProps & React.ButtonHTMLAttributes<HTMLButtonElement>>>;
|
|
97
|
+
Comment: React.FC<{
|
|
98
|
+
children: import("./components/types").CommentElement;
|
|
99
|
+
dataTestId?: string | undefined;
|
|
100
|
+
}>;
|
|
101
|
+
Category: React.FC<{
|
|
102
|
+
categoryName: string;
|
|
103
|
+
categoryPercent?: number | undefined;
|
|
104
|
+
dataTestId?: string | undefined;
|
|
105
|
+
}>;
|
|
106
|
+
};
|
|
107
|
+
export { PureCellContext, PureCellProps, PureCell };
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import './component-7afaa00b.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'react-merge-refs';
|
|
4
|
+
import 'classnames';
|
|
5
|
+
import '@alfalab/hooks';
|
|
6
|
+
import './getDataTestId-babf3783.js';
|
|
7
|
+
import './components/addon/component.js';
|
|
8
|
+
import '@alfalab/core-components-typography/dist/esm';
|
|
9
|
+
import '@alfalab/core-components-amount/dist/esm';
|
|
10
|
+
import './components/amount/component.js';
|
|
11
|
+
import './components/amount-title/component.js';
|
|
12
|
+
import './components/category/component.js';
|
|
13
|
+
import './components/comment/component.js';
|
|
14
|
+
export { P as PureCell, a as PureCellContext } from './component-0a200d52.js';
|
|
15
|
+
import './components/footer/component.js';
|
|
16
|
+
import '@alfalab/core-components-button/dist/esm';
|
|
17
|
+
import './components/footer-text/component.js';
|
|
18
|
+
import './components/graphics/component.js';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { AddonElement } from "../types";
|
|
4
|
+
type Props = {
|
|
5
|
+
/**
|
|
6
|
+
* Вертикальное выравнивание
|
|
7
|
+
*/
|
|
8
|
+
verticalAlign?: 'center';
|
|
9
|
+
/**
|
|
10
|
+
* Горизонтальные отступы
|
|
11
|
+
*/
|
|
12
|
+
addonPadding?: 'default' | 'none';
|
|
13
|
+
/**
|
|
14
|
+
* Компоненты
|
|
15
|
+
*/
|
|
16
|
+
children: AddonElement;
|
|
17
|
+
/**
|
|
18
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
19
|
+
*/
|
|
20
|
+
dataTestId?: string;
|
|
21
|
+
};
|
|
22
|
+
declare const Addon: React.FC<Props>;
|
|
23
|
+
export { Addon };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { g as getDataTestId } from '../../getDataTestId-babf3783.js';
|
|
4
|
+
|
|
5
|
+
var styles = {"component":"pure-cell__component_1tjhn","none":"pure-cell__none_1tjhn","default":"pure-cell__default_1tjhn","center":"pure-cell__center_1tjhn"};
|
|
6
|
+
require('./index.css')
|
|
7
|
+
|
|
8
|
+
var Addon = function (_a) {
|
|
9
|
+
var _b;
|
|
10
|
+
var children = _a.children, verticalAlign = _a.verticalAlign, _c = _a.addonPadding, addonPadding = _c === void 0 ? 'default' : _c, dataTestId = _a.dataTestId;
|
|
11
|
+
return (React.createElement("section", { className: cn(styles.component, styles[addonPadding], (_b = {},
|
|
12
|
+
_b[styles.center] = verticalAlign,
|
|
13
|
+
_b)), "data-test-id": getDataTestId(dataTestId, 'addon') }, children));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { Addon };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* hash: 10dx6 */
|
|
2
|
+
:root {
|
|
3
|
+
|
|
4
|
+
/* Hard */
|
|
5
|
+
|
|
6
|
+
/* Up */
|
|
7
|
+
|
|
8
|
+
/* Hard up */
|
|
9
|
+
}
|
|
10
|
+
:root {
|
|
11
|
+
--gap-m: 16px;
|
|
12
|
+
}
|
|
13
|
+
.pure-cell__component_1tjhn {
|
|
14
|
+
grid-column: 2/3;
|
|
15
|
+
padding-left: var(--gap-m)
|
|
16
|
+
}
|
|
17
|
+
.pure-cell__component_1tjhn > * {
|
|
18
|
+
justify-content: flex-end;
|
|
19
|
+
}
|
|
20
|
+
.pure-cell__component_1tjhn.pure-cell__none_1tjhn {
|
|
21
|
+
padding-left: 0;
|
|
22
|
+
}
|
|
23
|
+
.pure-cell__component_1tjhn.pure-cell__default_1tjhn {
|
|
24
|
+
padding-left: var(--gap-m);
|
|
25
|
+
}
|
|
26
|
+
.pure-cell__component_1tjhn.pure-cell__center_1tjhn {
|
|
27
|
+
align-self: center;
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./component";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Color } from "@alfalab/core-components-typography";
|
|
4
|
+
import { AmountProps as AmountType } from "../typesProps";
|
|
5
|
+
type Props = {
|
|
6
|
+
/**
|
|
7
|
+
* Props свойственные для компонента Amount
|
|
8
|
+
*/
|
|
9
|
+
amount: AmountType;
|
|
10
|
+
/**
|
|
11
|
+
* Начертание шрифта денежного значения
|
|
12
|
+
*/
|
|
13
|
+
weight?: 'bold' | 'normal';
|
|
14
|
+
/**
|
|
15
|
+
* Размер денежного значения
|
|
16
|
+
*/
|
|
17
|
+
view?: 'component' | 'primary-small';
|
|
18
|
+
/**
|
|
19
|
+
* Цвет денежного значения
|
|
20
|
+
*/
|
|
21
|
+
color?: Color;
|
|
22
|
+
/**
|
|
23
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
24
|
+
*/
|
|
25
|
+
dataTestId?: string;
|
|
26
|
+
};
|
|
27
|
+
declare const Amount: React.FC<Props>;
|
|
28
|
+
export { Amount };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { g as getDataTestId } from '../../getDataTestId-babf3783.js';
|
|
4
|
+
import { Typography } from '@alfalab/core-components-typography/dist/esm';
|
|
5
|
+
import { Amount as Amount$1 } from '@alfalab/core-components-amount/dist/esm';
|
|
6
|
+
|
|
7
|
+
var styles = {"component":"pure-cell__component_1plik"};
|
|
8
|
+
require('./index.css')
|
|
9
|
+
|
|
10
|
+
var Amount = function (_a) {
|
|
11
|
+
var amount = _a.amount, _b = _a.weight, weight = _b === void 0 ? 'normal' : _b, _c = _a.view, view = _c === void 0 ? 'component' : _c, _d = _a.color, color = _d === void 0 ? 'primary' : _d, dataTestId = _a.dataTestId;
|
|
12
|
+
var value = amount.value, currency = amount.currency, minority = amount.minority, minorUnits = amount.minorUnits, rightAddons = amount.rightAddons, showPlus = amount.showPlus, className = amount.className, transparentMinor = amount.transparentMinor, viewAmount = amount.view;
|
|
13
|
+
return (React.createElement(Typography.Text, { view: view, dataTestId: getDataTestId(dataTestId, 'amount-text'), className: cn(styles.component), color: color },
|
|
14
|
+
React.createElement(Amount$1, { minority: minority === undefined ? minorUnits : minority, value: value, transparentMinor: transparentMinor, bold: weight === 'bold' ? 'full' : 'none', rightAddons: rightAddons, showPlus: showPlus, className: className, currency: currency, dataTestId: getDataTestId(dataTestId, 'amount'), view: viewAmount })));
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { Amount };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./component";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Color } from "@alfalab/core-components-typography";
|
|
4
|
+
import { AmountProps as AmountType } from "../typesProps";
|
|
5
|
+
type Props = {
|
|
6
|
+
/**
|
|
7
|
+
* Props свойственные для компонента Amount
|
|
8
|
+
*/
|
|
9
|
+
amount: AmountType;
|
|
10
|
+
/**
|
|
11
|
+
* Цвет денежного значения
|
|
12
|
+
*/
|
|
13
|
+
color?: Color;
|
|
14
|
+
/**
|
|
15
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
16
|
+
*/
|
|
17
|
+
dataTestId?: string;
|
|
18
|
+
};
|
|
19
|
+
declare const AmountTitle: React.FC<Props>;
|
|
20
|
+
export { AmountTitle };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { g as getDataTestId } from '../../getDataTestId-babf3783.js';
|
|
4
|
+
import { Typography } from '@alfalab/core-components-typography/dist/esm';
|
|
5
|
+
import { Amount } from '@alfalab/core-components-amount/dist/esm';
|
|
6
|
+
|
|
7
|
+
var styles = {"component":"pure-cell__component_7pgdc","weight":"pure-cell__weight_7pgdc"};
|
|
8
|
+
require('./index.css')
|
|
9
|
+
|
|
10
|
+
var AmountTitle = function (_a) {
|
|
11
|
+
var amount = _a.amount, _b = _a.color, color = _b === void 0 ? 'primary' : _b, dataTestId = _a.dataTestId;
|
|
12
|
+
var value = amount.value, currency = amount.currency, minority = amount.minority, minorUnits = amount.minorUnits, rightAddons = amount.rightAddons, showPlus = amount.showPlus, className = amount.className;
|
|
13
|
+
return (React.createElement(Typography.Title, { tag: 'h4', view: 'small', dataTestId: getDataTestId(dataTestId, 'amount-title'), className: styles.component, color: color },
|
|
14
|
+
React.createElement(Amount, { minority: minority === undefined ? minorUnits : minority, value: value, rightAddons: rightAddons, showPlus: showPlus, className: cn(styles.weight, className), currency: currency, dataTestId: getDataTestId(dataTestId, 'core-amount-title'), view: 'withZeroMinorPart' })));
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { AmountTitle };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./component";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type Props = {
|
|
4
|
+
/**
|
|
5
|
+
* Наименование категории
|
|
6
|
+
*/
|
|
7
|
+
categoryName: string;
|
|
8
|
+
/**
|
|
9
|
+
* Процент категории
|
|
10
|
+
*/
|
|
11
|
+
categoryPercent?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
14
|
+
*/
|
|
15
|
+
dataTestId?: string;
|
|
16
|
+
};
|
|
17
|
+
declare const Category: React.FC<Props>;
|
|
18
|
+
export { Category };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { g as getDataTestId } from '../../getDataTestId-babf3783.js';
|
|
3
|
+
import { Typography } from '@alfalab/core-components-typography/dist/esm';
|
|
4
|
+
|
|
5
|
+
var styles = {"component":"pure-cell__component_182xj","categoryName":"pure-cell__categoryName_182xj","categoryPercent":"pure-cell__categoryPercent_182xj"};
|
|
6
|
+
require('./index.css')
|
|
7
|
+
|
|
8
|
+
var Category = function (_a) {
|
|
9
|
+
var categoryName = _a.categoryName, categoryPercent = _a.categoryPercent, dataTestId = _a.dataTestId;
|
|
10
|
+
return (React.createElement("div", { className: styles.component, "data-test-id": 'cell-pure-category' },
|
|
11
|
+
React.createElement(Typography.Text, { view: 'primary-small', color: 'secondary', dataTestId: getDataTestId(dataTestId, 'category-name'), className: styles.categoryName }, categoryName),
|
|
12
|
+
categoryPercent !== undefined && (React.createElement(Typography.Text, { tag: 'div', view: 'primary-small', color: 'secondary', className: styles.categoryPercent, dataTestId: getDataTestId(dataTestId, 'category-percent') },
|
|
13
|
+
categoryPercent,
|
|
14
|
+
"%"))));
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { Category };
|