@alfalab/core-components-pure-cell 4.3.1 → 4.4.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/{component-3c8d07e1.js → component-1d246a90.js} +10 -10
- package/{esm/component-c49f24a8.d.ts → component-5a229016.d.ts} +1 -1
- package/component.js +2 -2
- package/components/addon/component.js +3 -3
- package/components/addon/index.css +10 -10
- package/components/addon/index.js +1 -1
- package/components/amount/component.js +4 -4
- package/components/amount/index.css +2 -2
- package/components/amount/index.js +1 -1
- package/components/amount-title/component.js +4 -4
- package/components/amount-title/index.css +3 -3
- package/components/amount-title/index.js +1 -1
- package/components/category/component.js +5 -5
- package/components/category/index.css +5 -5
- package/components/category/index.js +1 -1
- package/components/content/component.js +2 -2
- package/components/content/index.css +3 -3
- package/components/content/index.d.ts +1 -1
- package/components/content/index.js +2 -2
- package/components/footer/component.js +3 -3
- package/components/footer/index.css +4 -4
- package/components/footer/index.js +1 -1
- package/components/footer-button/component.js +3 -3
- package/components/footer-button/index.css +2 -2
- package/components/footer-button/index.js +1 -1
- package/components/footer-text/component.js +2 -2
- package/components/footer-text/index.js +1 -1
- package/components/graphics/component.js +3 -3
- package/components/graphics/index.css +5 -5
- package/components/graphics/index.js +1 -1
- package/components/main/component.js +2 -2
- package/components/main/index.css +4 -4
- package/components/main/index.d.ts +1 -1
- package/components/main/index.js +2 -2
- package/components/text/component.js +2 -2
- package/components/text/index.css +7 -7
- package/components/text/index.d.ts +1 -1
- package/components/text/index.js +2 -2
- package/{modern/component-c49f24a8.d.ts → cssm/component-5a229016.d.ts} +1 -1
- package/cssm/{component-4aff9f21.js → component-ef4953bf.js} +6 -6
- package/cssm/component.js +2 -2
- package/cssm/components/addon/component.js +2 -2
- package/cssm/components/addon/index.js +1 -1
- package/cssm/components/amount/component.js +3 -3
- package/cssm/components/amount/index.js +1 -1
- package/cssm/components/amount-title/component.js +3 -3
- package/cssm/components/amount-title/index.js +1 -1
- package/cssm/components/category/component.js +4 -4
- package/cssm/components/category/index.js +1 -1
- package/cssm/components/content/component.js +2 -2
- package/cssm/components/content/index.d.ts +1 -1
- package/cssm/components/content/index.js +2 -2
- package/cssm/components/footer/component.js +2 -2
- package/cssm/components/footer/index.js +1 -1
- package/cssm/components/footer-button/component.js +2 -2
- package/cssm/components/footer-button/index.js +1 -1
- package/cssm/components/footer-text/component.js +2 -2
- package/cssm/components/footer-text/index.js +1 -1
- package/cssm/components/graphics/component.js +2 -2
- package/cssm/components/graphics/index.js +1 -1
- package/cssm/components/main/component.js +2 -2
- package/cssm/components/main/index.d.ts +1 -1
- package/cssm/components/main/index.js +2 -2
- package/cssm/components/text/component.js +2 -2
- package/cssm/components/text/index.d.ts +1 -1
- package/cssm/components/text/index.js +2 -2
- package/cssm/index.d.ts +1 -1
- package/cssm/index.js +2 -2
- package/{component-c49f24a8.d.ts → esm/component-5a229016.d.ts} +1 -1
- package/esm/{component-45299cd1.js → component-bdd266d4.js} +6 -6
- package/esm/component.js +2 -2
- package/esm/components/addon/component.js +2 -2
- package/esm/components/addon/index.css +10 -10
- package/esm/components/addon/index.js +1 -1
- package/esm/components/amount/component.js +2 -2
- package/esm/components/amount/index.css +2 -2
- package/esm/components/amount/index.js +1 -1
- package/esm/components/amount-title/component.js +2 -2
- package/esm/components/amount-title/index.css +3 -3
- package/esm/components/amount-title/index.js +1 -1
- package/esm/components/category/component.js +2 -2
- package/esm/components/category/index.css +5 -5
- package/esm/components/category/index.js +1 -1
- package/esm/components/content/component.js +2 -2
- package/esm/components/content/index.css +3 -3
- package/esm/components/content/index.d.ts +1 -1
- package/esm/components/content/index.js +2 -2
- package/esm/components/footer/component.js +2 -2
- package/esm/components/footer/index.css +4 -4
- package/esm/components/footer/index.js +1 -1
- package/esm/components/footer-button/component.js +2 -2
- package/esm/components/footer-button/index.css +2 -2
- package/esm/components/footer-button/index.js +1 -1
- package/esm/components/footer-text/component.js +1 -1
- package/esm/components/footer-text/index.js +1 -1
- package/esm/components/graphics/component.js +2 -2
- package/esm/components/graphics/index.css +5 -5
- package/esm/components/graphics/index.js +1 -1
- package/esm/components/main/component.js +2 -2
- package/esm/components/main/index.css +4 -4
- package/esm/components/main/index.d.ts +1 -1
- package/esm/components/main/index.js +2 -2
- package/esm/components/text/component.js +2 -2
- package/esm/components/text/index.css +7 -7
- package/esm/components/text/index.d.ts +1 -1
- package/esm/components/text/index.js +2 -2
- package/esm/index.css +21 -21
- package/esm/index.d.ts +1 -1
- package/esm/index.js +2 -2
- package/index.css +21 -21
- package/index.d.ts +1 -1
- package/index.js +2 -2
- package/{cssm/component-c49f24a8.d.ts → modern/component-5a229016.d.ts} +1 -1
- package/modern/{component-6e5f347e.js → component-b811b670.js} +6 -6
- package/modern/component.js +2 -2
- package/modern/components/addon/component.js +2 -2
- package/modern/components/addon/index.css +10 -10
- package/modern/components/addon/index.js +1 -1
- package/modern/components/amount/component.js +2 -2
- package/modern/components/amount/index.css +2 -2
- package/modern/components/amount/index.js +1 -1
- package/modern/components/amount-title/component.js +2 -2
- package/modern/components/amount-title/index.css +3 -3
- package/modern/components/amount-title/index.js +1 -1
- package/modern/components/category/component.js +2 -2
- package/modern/components/category/index.css +5 -5
- package/modern/components/category/index.js +1 -1
- package/modern/components/content/component.js +2 -2
- package/modern/components/content/index.css +3 -3
- package/modern/components/content/index.d.ts +1 -1
- package/modern/components/content/index.js +2 -2
- package/modern/components/footer/component.js +2 -2
- package/modern/components/footer/index.css +4 -4
- package/modern/components/footer/index.js +1 -1
- package/modern/components/footer-button/component.js +2 -2
- package/modern/components/footer-button/index.css +2 -2
- package/modern/components/footer-button/index.js +1 -1
- package/modern/components/footer-text/component.js +1 -1
- package/modern/components/footer-text/index.js +1 -1
- package/modern/components/graphics/component.js +2 -2
- package/modern/components/graphics/index.css +5 -5
- package/modern/components/graphics/index.js +1 -1
- package/modern/components/main/component.js +2 -2
- package/modern/components/main/index.css +4 -4
- package/modern/components/main/index.d.ts +1 -1
- package/modern/components/main/index.js +2 -2
- package/modern/components/text/component.js +2 -2
- package/modern/components/text/index.css +7 -7
- package/modern/components/text/index.d.ts +1 -1
- package/modern/components/text/index.js +2 -2
- package/modern/index.css +21 -21
- package/modern/index.d.ts +1 -1
- package/modern/index.js +2 -2
- package/package.json +6 -5
- package/src/component.tsx +186 -0
- package/src/components/addon/component.tsx +44 -0
- package/src/components/addon/index.module.css +39 -0
- package/src/components/addon/index.ts +1 -0
- package/src/components/amount/component.tsx +56 -0
- package/src/components/amount/index.module.css +6 -0
- package/src/components/amount/index.ts +1 -0
- package/src/components/amount-title/component.tsx +42 -0
- package/src/components/amount-title/index.module.css +9 -0
- package/src/components/amount-title/index.ts +1 -0
- package/src/components/category/component.tsx +65 -0
- package/src/components/category/index.module.css +26 -0
- package/src/components/category/index.ts +1 -0
- package/src/components/content/component.tsx +34 -0
- package/src/components/content/index.module.css +12 -0
- package/src/components/content/index.ts +1 -0
- package/src/components/footer/component.tsx +34 -0
- package/src/components/footer/index.module.css +15 -0
- package/src/components/footer/index.ts +1 -0
- package/src/components/footer-button/component.tsx +17 -0
- package/src/components/footer-button/index.module.css +5 -0
- package/src/components/footer-button/index.ts +1 -0
- package/src/components/footer-text/component.tsx +31 -0
- package/src/components/footer-text/index.ts +1 -0
- package/src/components/graphics/component.tsx +34 -0
- package/src/components/graphics/index.module.css +18 -0
- package/src/components/graphics/index.ts +1 -0
- package/src/components/main/component.tsx +51 -0
- package/src/components/main/index.module.css +23 -0
- package/src/components/main/index.ts +1 -0
- package/src/components/text/component.tsx +100 -0
- package/src/components/text/index.module.css +34 -0
- package/src/components/text/index.ts +1 -0
- package/src/components/types.ts +27 -0
- package/src/components/typesProps.ts +56 -0
- package/src/index.module.css +94 -0
- package/src/index.ts +1 -0
- package/cssm/getDataTestId-5c876d98.d.ts +0 -2
- package/cssm/getDataTestId-5c876d98.js +0 -8
- package/esm/getDataTestId-642eb788.d.ts +0 -2
- package/esm/getDataTestId-642eb788.js +0 -6
- package/getDataTestId-916a6a71.d.ts +0 -2
- package/getDataTestId-916a6a71.js +0 -8
- package/modern/getDataTestId-d1e65cf0.d.ts +0 -2
- package/modern/getDataTestId-d1e65cf0.js +0 -6
- /package/{component-3c8d07e1.d.ts → component-1d246a90.d.ts} +0 -0
- /package/cssm/{component-4aff9f21.d.ts → component-ef4953bf.d.ts} +0 -0
- /package/esm/{component-45299cd1.d.ts → component-bdd266d4.d.ts} +0 -0
- /package/modern/{component-6e5f347e.d.ts → component-b811b670.d.ts} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
|
-
import {
|
|
3
|
+
import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
4
4
|
|
|
5
|
-
const styles = {"component":"pure-
|
|
5
|
+
const styles = {"component":"pure-cell__component_16s40","none":"pure-cell__none_16s40","default":"pure-cell__default_16s40"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
const Footer = ({ children, footerPadding = 'default', dataTestId }) => (React.createElement("footer", { className: cn(styles.component, styles[footerPadding]), "data-test-id": getDataTestId(dataTestId, 'footer') }, children));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: poc4g */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
--gap-xs: 8px;
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .pure-
|
|
18
|
+
} .pure-cell__component_16s40 {
|
|
19
19
|
grid-column: 1/3;
|
|
20
20
|
display: grid;
|
|
21
21
|
grid-row-gap: var(--gap-xs)
|
|
22
|
-
} .pure-
|
|
22
|
+
} .pure-cell__component_16s40.pure-cell__none_16s40 {
|
|
23
23
|
margin-top: 0;
|
|
24
|
-
} .pure-
|
|
24
|
+
} .pure-cell__component_16s40.pure-cell__default_16s40 {
|
|
25
25
|
margin-top: var(--gap-xs);
|
|
26
26
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Button } from '@alfalab/core-components-button/modern';
|
|
3
|
-
import {
|
|
3
|
+
import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
4
4
|
|
|
5
|
-
const styles = {"component":"pure-
|
|
5
|
+
const styles = {"component":"pure-cell__component_xb6ri"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
const FooterButton = ({ children, dataTestId, ...props }) => (React.createElement(Button, { ...props, size: 'xxs', dataTestId: getDataTestId(dataTestId, 'button'), className: styles.component }, children));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: kyquj */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
} :root {
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
|
-
} .pure-
|
|
17
|
+
} .pure-cell__component_xb6ri {
|
|
18
18
|
justify-self: start;
|
|
19
19
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
2
3
|
import { Typography } from '@alfalab/core-components-typography/modern';
|
|
3
|
-
import { g as getDataTestId } from '../../getDataTestId-d1e65cf0.js';
|
|
4
4
|
|
|
5
5
|
const FooterText = ({ children, color = 'secondary', dataTestId }) => (React.createElement(Typography.Text, { view: 'primary-small', color: color, "data-test-id": getDataTestId(dataTestId, 'footer-title') }, children));
|
|
6
6
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
|
-
import {
|
|
3
|
+
import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
4
4
|
|
|
5
|
-
const styles = {"component":"pure-
|
|
5
|
+
const styles = {"component":"pure-cell__component_1feu9","top":"pure-cell__top_1feu9","center":"pure-cell__center_1feu9","bottom":"pure-cell__bottom_1feu9"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
const Graphics = ({ children, dataTestId, verticalAlign = 'top' }) => (React.createElement("section", { className: cn(styles.component, styles[verticalAlign]), "data-test-id": getDataTestId(dataTestId, 'graphics') }, children));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: cncle */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
} :root {
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
|
-
} .pure-
|
|
17
|
+
} .pure-cell__component_1feu9 {
|
|
18
18
|
display: inline-flex;
|
|
19
19
|
flex-basis: auto;
|
|
20
|
-
} .pure-
|
|
20
|
+
} .pure-cell__top_1feu9 {
|
|
21
21
|
align-self: flex-start;
|
|
22
|
-
} .pure-
|
|
22
|
+
} .pure-cell__center_1feu9 {
|
|
23
23
|
align-self: center;
|
|
24
|
-
} .pure-
|
|
24
|
+
} .pure-cell__bottom_1feu9 {
|
|
25
25
|
align-self: flex-end;
|
|
26
26
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import 'classnames';
|
|
3
|
-
import '
|
|
4
|
-
export { M as Main } from '../../component-
|
|
3
|
+
import '@alfalab/core-components-shared/modern';
|
|
4
|
+
export { M as Main } from '../../component-b811b670.js';
|
|
5
5
|
import 'react-merge-refs';
|
|
6
6
|
import '@alfalab/core-components-comment/modern';
|
|
7
7
|
import '@alfalab/hooks';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: w6697 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,20 +15,20 @@
|
|
|
15
15
|
--gap-3xs: 2px;
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .pure-
|
|
18
|
+
} .pure-cell__component_1ufkr {
|
|
19
19
|
display: flex;
|
|
20
20
|
flex-direction: column;
|
|
21
21
|
align-self: center;
|
|
22
22
|
|
|
23
23
|
/* can use /r/n */
|
|
24
24
|
white-space: pre-line
|
|
25
|
-
} .pure-
|
|
25
|
+
} .pure-cell__component_1ufkr.pure-cell__vertical_1ufkr {
|
|
26
26
|
grid-row-gap: var(--gap-3xs);
|
|
27
27
|
justify-content: center;
|
|
28
28
|
align-items: center;
|
|
29
29
|
|
|
30
30
|
/* for button */
|
|
31
31
|
text-align: center;
|
|
32
|
-
} .pure-
|
|
32
|
+
} .pure-cell__component_1ufkr.pure-cell__reverse_1ufkr {
|
|
33
33
|
flex-direction: column-reverse;
|
|
34
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../component-
|
|
1
|
+
export * from "../../component-b811b670";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { M as Main } from '../../component-
|
|
1
|
+
export { M as Main } from '../../component-b811b670.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'react-merge-refs';
|
|
4
4
|
import 'classnames';
|
|
5
5
|
import '@alfalab/core-components-comment/modern';
|
|
6
6
|
import '@alfalab/hooks';
|
|
7
7
|
import '../addon/component.js';
|
|
8
|
-
import '
|
|
8
|
+
import '@alfalab/core-components-shared/modern';
|
|
9
9
|
import '../amount/component.js';
|
|
10
10
|
import '@alfalab/core-components-amount/modern';
|
|
11
11
|
import '@alfalab/core-components-typography/modern';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import 'classnames';
|
|
3
|
+
import '@alfalab/core-components-shared/modern';
|
|
3
4
|
import '@alfalab/core-components-typography/modern';
|
|
4
|
-
|
|
5
|
-
export { T as Text } from '../../component-6e5f347e.js';
|
|
5
|
+
export { T as Text } from '../../component-b811b670.js';
|
|
6
6
|
import 'react-merge-refs';
|
|
7
7
|
import '@alfalab/core-components-comment/modern';
|
|
8
8
|
import '@alfalab/hooks';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 10rbl */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -16,29 +16,29 @@
|
|
|
16
16
|
--gap-m: 16px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .pure-
|
|
19
|
+
} .pure-cell__horizontal_k946b {
|
|
20
20
|
padding: var(--gap-3xs) 0;
|
|
21
|
-
} .pure-
|
|
21
|
+
} .pure-cell__rowLimit1_k946b {
|
|
22
22
|
-webkit-line-clamp: 1;
|
|
23
23
|
display: -webkit-box;
|
|
24
24
|
-webkit-box-orient: vertical;
|
|
25
25
|
overflow: hidden;
|
|
26
26
|
word-break: break-all;
|
|
27
|
-
} .pure-
|
|
27
|
+
} .pure-cell__rowLimit2_k946b {
|
|
28
28
|
-webkit-line-clamp: 2;
|
|
29
29
|
display: -webkit-box;
|
|
30
30
|
-webkit-box-orient: vertical;
|
|
31
31
|
overflow: hidden;
|
|
32
|
-
} .pure-
|
|
32
|
+
} .pure-cell__component_k946b {
|
|
33
33
|
display: flex;
|
|
34
34
|
flex-direction: row;
|
|
35
35
|
flex-wrap: nowrap;
|
|
36
36
|
justify-content: space-between;
|
|
37
37
|
margin: var(--gap-3xs) 0;
|
|
38
38
|
word-break: break-word;
|
|
39
|
-
} .pure-
|
|
39
|
+
} .pure-cell__component_k946b .pure-cell__vertical_k946b {
|
|
40
40
|
justify-content: center;
|
|
41
|
-
} .pure-
|
|
41
|
+
} .pure-cell__title_k946b + .pure-cell__value_k946b {
|
|
42
42
|
margin-left: var(--gap-m);
|
|
43
43
|
flex-shrink: 0;
|
|
44
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../component-
|
|
1
|
+
export * from "../../component-b811b670";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { T as Text } from '../../component-
|
|
1
|
+
export { T as Text } from '../../component-b811b670.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'react-merge-refs';
|
|
4
4
|
import 'classnames';
|
|
5
5
|
import '@alfalab/core-components-comment/modern';
|
|
6
6
|
import '@alfalab/hooks';
|
|
7
7
|
import '../addon/component.js';
|
|
8
|
-
import '
|
|
8
|
+
import '@alfalab/core-components-shared/modern';
|
|
9
9
|
import '../amount/component.js';
|
|
10
10
|
import '@alfalab/core-components-amount/modern';
|
|
11
11
|
import '@alfalab/core-components-typography/modern';
|
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: y3rwu */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-link: #0072ef; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -20,21 +20,21 @@
|
|
|
20
20
|
} :root {
|
|
21
21
|
} :root {
|
|
22
22
|
--focus-color: var(--color-light-border-link);
|
|
23
|
-
} .pure-
|
|
23
|
+
} .pure-cell__component_1cht4 {
|
|
24
24
|
text-align: unset;
|
|
25
25
|
box-sizing: border-box;
|
|
26
|
-
} .pure-
|
|
26
|
+
} .pure-cell__horizontal_1cht4 {
|
|
27
27
|
display: flex;
|
|
28
28
|
width: 100%
|
|
29
|
-
} .pure-
|
|
29
|
+
} .pure-cell__horizontal_1cht4 > section:not(:last-child) {
|
|
30
30
|
margin-right: var(--gap-m);
|
|
31
|
-
} .pure-
|
|
31
|
+
} .pure-cell__vertical_1cht4 {
|
|
32
32
|
display: flex;
|
|
33
33
|
align-items: center;
|
|
34
34
|
flex-direction: column
|
|
35
|
-
} .pure-
|
|
35
|
+
} .pure-cell__vertical_1cht4 > section:not(:last-child) {
|
|
36
36
|
margin-bottom: var(--gap-s);
|
|
37
|
-
} .pure-
|
|
37
|
+
} .pure-cell__button_1cht4 {
|
|
38
38
|
font-family: inherit;
|
|
39
39
|
background: none;
|
|
40
40
|
border: 0;
|
|
@@ -42,37 +42,37 @@
|
|
|
42
42
|
cursor: pointer;
|
|
43
43
|
transition: opacity 0.15s ease-in-out;
|
|
44
44
|
padding: 0
|
|
45
|
-
} .pure-
|
|
45
|
+
} .pure-cell__button_1cht4:hover {
|
|
46
46
|
opacity: 0.8;
|
|
47
|
-
} .pure-
|
|
47
|
+
} .pure-cell__button_1cht4:active {
|
|
48
48
|
opacity: 0.6;
|
|
49
|
-
} .pure-
|
|
49
|
+
} .pure-cell__link_1cht4 {
|
|
50
50
|
text-decoration: none;
|
|
51
51
|
color: inherit;
|
|
52
52
|
cursor: pointer;
|
|
53
53
|
transition: opacity 0.15s ease-in-out
|
|
54
|
-
} .pure-
|
|
54
|
+
} .pure-cell__link_1cht4:hover {
|
|
55
55
|
opacity: 0.8;
|
|
56
|
-
} .pure-
|
|
56
|
+
} .pure-cell__link_1cht4:active {
|
|
57
57
|
opacity: 0.6;
|
|
58
|
-
} .pure-
|
|
58
|
+
} .pure-cell__none_1cht4 {
|
|
59
59
|
padding: 0;
|
|
60
|
-
} .pure-
|
|
60
|
+
} .pure-cell__airy_1cht4 {
|
|
61
61
|
padding: var(--gap-m) 0;
|
|
62
|
-
} .pure-
|
|
62
|
+
} .pure-cell__defaultPadding_1cht4 {
|
|
63
63
|
padding: var(--gap-s) 0;
|
|
64
|
-
} .pure-
|
|
64
|
+
} .pure-cell__compact_1cht4 {
|
|
65
65
|
padding: var(--gap-xs) 0;
|
|
66
|
-
} .pure-
|
|
66
|
+
} .pure-cell__tiny_1cht4 {
|
|
67
67
|
padding: var(--gap-2xs) 0;
|
|
68
|
-
} .pure-
|
|
68
|
+
} .pure-cell__left_1cht4 {
|
|
69
69
|
padding-left: var(--gap-m);
|
|
70
|
-
} .pure-
|
|
70
|
+
} .pure-cell__right_1cht4 {
|
|
71
71
|
padding-right: var(--gap-m);
|
|
72
|
-
} .pure-
|
|
72
|
+
} .pure-cell__both_1cht4 {
|
|
73
73
|
padding-right: var(--gap-m);
|
|
74
74
|
padding-left: var(--gap-m);
|
|
75
|
-
} .pure-
|
|
75
|
+
} .pure-cell__focused_1cht4 {
|
|
76
76
|
outline: 2px solid var(--focus-color);
|
|
77
77
|
outline-offset: 2px;
|
|
78
78
|
}
|
package/modern/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { PureCell } from "./component-
|
|
1
|
+
export { PureCell } from "./component-5a229016";
|
package/modern/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { P as PureCell } from './component-
|
|
1
|
+
export { P as PureCell } from './component-b811b670.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'react-merge-refs';
|
|
4
4
|
import 'classnames';
|
|
5
5
|
import '@alfalab/core-components-comment/modern';
|
|
6
6
|
import '@alfalab/hooks';
|
|
7
7
|
import './components/addon/component.js';
|
|
8
|
-
import '
|
|
8
|
+
import '@alfalab/core-components-shared/modern';
|
|
9
9
|
import './components/amount/component.js';
|
|
10
10
|
import '@alfalab/core-components-amount/modern';
|
|
11
11
|
import '@alfalab/core-components-typography/modern';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-pure-cell",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,10 +15,11 @@
|
|
|
15
15
|
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@alfalab/core-components-amount": "^3.
|
|
19
|
-
"@alfalab/core-components-button": "^
|
|
20
|
-
"@alfalab/core-components-typography": "^
|
|
21
|
-
"@alfalab/core-components-comment": "^2.
|
|
18
|
+
"@alfalab/core-components-amount": "^3.3.0",
|
|
19
|
+
"@alfalab/core-components-button": "^9.0.0",
|
|
20
|
+
"@alfalab/core-components-typography": "^4.0.0",
|
|
21
|
+
"@alfalab/core-components-comment": "^2.2.0",
|
|
22
|
+
"@alfalab/core-components-shared": "^0.1.0",
|
|
22
23
|
"@alfalab/hooks": "^1.13.0",
|
|
23
24
|
"classnames": "^2.3.1",
|
|
24
25
|
"react-merge-refs": "1.1.0",
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/* eslint-disable react/jsx-no-constructed-context-values */
|
|
2
|
+
import React, {
|
|
3
|
+
AnchorHTMLAttributes,
|
|
4
|
+
ButtonHTMLAttributes,
|
|
5
|
+
ElementType,
|
|
6
|
+
forwardRef,
|
|
7
|
+
HTMLAttributes,
|
|
8
|
+
useRef,
|
|
9
|
+
} from 'react';
|
|
10
|
+
import mergeRefs from 'react-merge-refs';
|
|
11
|
+
import cn from 'classnames';
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
14
|
+
import { ButtonProps } from '@alfalab/core-components-button';
|
|
15
|
+
import { Comment } from '@alfalab/core-components-comment';
|
|
16
|
+
import { useFocus } from '@alfalab/hooks';
|
|
17
|
+
|
|
18
|
+
import { Addon } from './components/addon';
|
|
19
|
+
import { Amount } from './components/amount';
|
|
20
|
+
import { AmountTitle } from './components/amount-title';
|
|
21
|
+
import { Category } from './components/category';
|
|
22
|
+
import { Content } from './components/content';
|
|
23
|
+
import { Footer } from './components/footer';
|
|
24
|
+
import { FooterButton } from './components/footer-button';
|
|
25
|
+
import { FooterText } from './components/footer-text';
|
|
26
|
+
import { Graphics } from './components/graphics';
|
|
27
|
+
import { Main } from './components/main';
|
|
28
|
+
import { Text } from './components/text';
|
|
29
|
+
import { PureCellElement } from './components/types';
|
|
30
|
+
|
|
31
|
+
import styles from './index.module.css';
|
|
32
|
+
|
|
33
|
+
export type PureCellContext = {
|
|
34
|
+
/** Направление */
|
|
35
|
+
direction?: 'horizontal' | 'vertical';
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
39
|
+
export const PureCellContext = React.createContext<PureCellContext>({});
|
|
40
|
+
|
|
41
|
+
export type PureCellProps = {
|
|
42
|
+
/**
|
|
43
|
+
* Направление
|
|
44
|
+
*/
|
|
45
|
+
direction?: 'horizontal' | 'vertical';
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Сss класс для стилизации общей обёртки
|
|
49
|
+
*/
|
|
50
|
+
className?: string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Выводит ссылку в виде ячейки
|
|
54
|
+
*/
|
|
55
|
+
href?: string;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Вертикальные отступы
|
|
59
|
+
*/
|
|
60
|
+
verticalPadding?: 'airy' | 'default' | 'compact' | 'tiny' | 'none';
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Горизонтальные отступы
|
|
64
|
+
*/
|
|
65
|
+
horizontalPadding?: 'left' | 'right' | 'both' | 'none';
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Позволяет использовать кастомный компонент для кнопки (например Link из роутера)
|
|
69
|
+
*/
|
|
70
|
+
tag?: ElementType;
|
|
71
|
+
/**
|
|
72
|
+
* Компоненты
|
|
73
|
+
*/
|
|
74
|
+
children: PureCellElement;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
78
|
+
*/
|
|
79
|
+
dataTestId?: string;
|
|
80
|
+
};
|
|
81
|
+
type AnchorPureCellProps = PureCellProps & AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
82
|
+
type ButtonPureCellProps = PureCellProps & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
83
|
+
type ElementPureCellProps = PureCellProps & HTMLAttributes<HTMLElement>;
|
|
84
|
+
type PureProps = Partial<AnchorPureCellProps | ButtonPureCellProps | ElementPureCellProps>;
|
|
85
|
+
|
|
86
|
+
const PureCellComponent = forwardRef<HTMLElement, PureProps>(
|
|
87
|
+
(
|
|
88
|
+
{
|
|
89
|
+
className,
|
|
90
|
+
dataTestId,
|
|
91
|
+
onClick,
|
|
92
|
+
href,
|
|
93
|
+
tag: Component = (href && 'a') || (onClick && 'button') || 'section',
|
|
94
|
+
children,
|
|
95
|
+
horizontalPadding = 'none',
|
|
96
|
+
verticalPadding = 'none',
|
|
97
|
+
direction = 'horizontal',
|
|
98
|
+
...restProps
|
|
99
|
+
},
|
|
100
|
+
ref,
|
|
101
|
+
) => {
|
|
102
|
+
const cellRef = useRef<HTMLDivElement>(null);
|
|
103
|
+
const [focused] = useFocus(cellRef, 'keyboard');
|
|
104
|
+
const addClasses = {
|
|
105
|
+
[styles.component]: true,
|
|
106
|
+
[styles.focused]: focused,
|
|
107
|
+
[styles[direction]]: true,
|
|
108
|
+
[styles.defaultPadding]: verticalPadding === 'default',
|
|
109
|
+
[styles[verticalPadding]]: verticalPadding !== 'default',
|
|
110
|
+
[styles[horizontalPadding]]: true,
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
if (href) {
|
|
114
|
+
const { target } = restProps as AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
115
|
+
|
|
116
|
+
// Для совместимости с react-router-dom, меняем href на to
|
|
117
|
+
const hrefProps = { [typeof Component === 'string' ? 'href' : 'to']: href };
|
|
118
|
+
|
|
119
|
+
return (
|
|
120
|
+
<Component
|
|
121
|
+
rel={target === '_blank' ? 'noreferrer noopener' : undefined}
|
|
122
|
+
{...(restProps as AnchorHTMLAttributes<HTMLAnchorElement>)}
|
|
123
|
+
{...hrefProps}
|
|
124
|
+
ref={mergeRefs([cellRef, ref])}
|
|
125
|
+
className={cn(styles.link, addClasses, className)}
|
|
126
|
+
data-test-id={dataTestId}
|
|
127
|
+
onClick={onClick}
|
|
128
|
+
>
|
|
129
|
+
<PureCellContext.Provider value={{ direction }}>
|
|
130
|
+
{children}
|
|
131
|
+
</PureCellContext.Provider>
|
|
132
|
+
</Component>
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (onClick) {
|
|
137
|
+
return (
|
|
138
|
+
<Component
|
|
139
|
+
{...(restProps as AnchorHTMLAttributes<HTMLAnchorElement>)}
|
|
140
|
+
ref={mergeRefs([cellRef, ref])}
|
|
141
|
+
className={cn(styles.button, addClasses, className)}
|
|
142
|
+
data-test-id={dataTestId}
|
|
143
|
+
onClick={onClick}
|
|
144
|
+
>
|
|
145
|
+
<PureCellContext.Provider value={{ direction }}>
|
|
146
|
+
{children}
|
|
147
|
+
</PureCellContext.Provider>
|
|
148
|
+
</Component>
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return (
|
|
153
|
+
<Component
|
|
154
|
+
{...(restProps as AnchorHTMLAttributes<HTMLAnchorElement>)}
|
|
155
|
+
ref={ref}
|
|
156
|
+
tabIndex={0}
|
|
157
|
+
className={cn(addClasses, className)}
|
|
158
|
+
data-test-id={dataTestId}
|
|
159
|
+
>
|
|
160
|
+
<PureCellContext.Provider value={{ direction }}>
|
|
161
|
+
{children}
|
|
162
|
+
</PureCellContext.Provider>
|
|
163
|
+
</Component>
|
|
164
|
+
);
|
|
165
|
+
},
|
|
166
|
+
);
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Универсальный конструктор для сборки любой ячейки.
|
|
170
|
+
*
|
|
171
|
+
* [Макет](https://www.figma.com/file/KlFOLLkKO8rtvvQE3RXuhq/Click-Library?node-id=43525%3A240018)
|
|
172
|
+
*/
|
|
173
|
+
export const PureCell = Object.assign(PureCellComponent, {
|
|
174
|
+
Main,
|
|
175
|
+
Graphics,
|
|
176
|
+
Content,
|
|
177
|
+
Text,
|
|
178
|
+
Amount,
|
|
179
|
+
AmountTitle,
|
|
180
|
+
Addon,
|
|
181
|
+
Footer,
|
|
182
|
+
ExtraSubtitle: FooterText,
|
|
183
|
+
FooterButton,
|
|
184
|
+
Comment,
|
|
185
|
+
Category,
|
|
186
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
|
|
4
|
+
import { getDataTestId } from '@alfalab/core-components-shared';
|
|
5
|
+
|
|
6
|
+
import { AddonElement } from '../types';
|
|
7
|
+
|
|
8
|
+
import styles from './index.module.css';
|
|
9
|
+
|
|
10
|
+
type Props = {
|
|
11
|
+
/**
|
|
12
|
+
* Вертикальное выравнивание
|
|
13
|
+
*/
|
|
14
|
+
verticalAlign?: 'auto' | 'top' | 'center' | 'bottom';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Горизонтальные отступы
|
|
18
|
+
*/
|
|
19
|
+
addonPadding?: 'default' | 'none';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Компоненты
|
|
23
|
+
*/
|
|
24
|
+
children: AddonElement;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
28
|
+
*/
|
|
29
|
+
dataTestId?: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const Addon: React.FC<Props> = ({
|
|
33
|
+
children,
|
|
34
|
+
verticalAlign = 'top',
|
|
35
|
+
addonPadding = 'default',
|
|
36
|
+
dataTestId,
|
|
37
|
+
}) => (
|
|
38
|
+
<section
|
|
39
|
+
className={cn(styles.component, styles[addonPadding], styles[verticalAlign])}
|
|
40
|
+
data-test-id={getDataTestId(dataTestId, 'addon')}
|
|
41
|
+
>
|
|
42
|
+
{children}
|
|
43
|
+
</section>
|
|
44
|
+
);
|