@alfalab/core-components-pure-cell 6.0.3 → 6.0.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/component.d.ts +34 -36
- package/component.js.map +1 -1
- package/components/addon/component.d.ts +1 -1
- package/components/addon/index.css +12 -12
- package/components/addon/index.module.css.js +1 -1
- package/components/amount/component.d.ts +1 -1
- package/components/amount/component.js.map +1 -1
- package/components/amount/index.css +3 -3
- package/components/amount/index.module.css.js +1 -1
- package/components/amount/index.module.css.js.map +1 -1
- package/components/amount-title/component.d.ts +1 -1
- package/components/amount-title/component.js.map +1 -1
- package/components/amount-title/index.css +13 -13
- package/components/amount-title/index.module.css.js +1 -1
- package/components/amount-title/index.module.css.js.map +1 -1
- package/components/category/component.d.ts +1 -1
- package/components/category/index.css +4 -4
- package/components/category/index.module.css.js +1 -1
- package/components/category/index.module.css.js.map +1 -1
- package/components/content/component.d.ts +1 -1
- package/components/content/index.css +2 -2
- package/components/content/index.module.css.js +1 -1
- package/components/content/index.module.css.js.map +1 -1
- package/components/footer/component.d.ts +1 -1
- package/components/footer/index.css +3 -3
- package/components/footer/index.module.css.js +1 -1
- package/components/footer/index.module.css.js.map +1 -1
- package/components/footer-button/component.d.ts +3 -3
- package/components/footer-button/index.css +1 -1
- package/components/footer-button/index.module.css.js +1 -1
- package/components/footer-button/index.module.css.js.map +1 -1
- package/components/footer-text/component.d.ts +1 -1
- package/components/graphics/component.d.ts +1 -1
- package/components/graphics/index.css +19 -19
- package/components/graphics/index.module.css.js +1 -1
- package/components/main/component.d.ts +1 -1
- package/components/main/index.css +6 -6
- package/components/main/index.module.css.js +1 -1
- package/components/text/component.d.ts +1 -1
- package/components/text/index.css +6 -6
- package/components/text/index.module.css.js +1 -1
- package/components/text/index.module.css.js.map +1 -1
- package/components/types.d.ts +12 -12
- package/components/typesProps.d.ts +1 -1
- package/context.d.ts +1 -2
- package/cssm/component.d.ts +33 -35
- package/cssm/component.js.map +1 -1
- package/cssm/components/addon/component.d.ts +1 -1
- package/cssm/components/amount/component.d.ts +1 -1
- package/cssm/components/amount/component.js.map +1 -1
- package/cssm/components/amount-title/component.d.ts +1 -1
- package/cssm/components/amount-title/component.js.map +1 -1
- package/cssm/components/category/component.d.ts +1 -1
- package/cssm/components/content/component.d.ts +1 -1
- package/cssm/components/footer/component.d.ts +1 -1
- package/cssm/components/footer-button/component.d.ts +2 -2
- package/cssm/components/footer-text/component.d.ts +1 -1
- package/cssm/components/graphics/component.d.ts +1 -1
- package/cssm/components/main/component.d.ts +1 -1
- package/cssm/components/text/component.d.ts +1 -1
- package/cssm/components/types.d.ts +12 -12
- package/cssm/components/typesProps.d.ts +1 -1
- package/cssm/context.d.ts +1 -2
- package/esm/component.d.ts +33 -35
- package/esm/component.js.map +1 -1
- package/esm/components/addon/component.d.ts +1 -1
- package/esm/components/addon/index.css +12 -12
- package/esm/components/addon/index.module.css.js +1 -1
- package/esm/components/amount/component.d.ts +1 -1
- package/esm/components/amount/component.js.map +1 -1
- package/esm/components/amount/index.css +3 -3
- package/esm/components/amount/index.module.css.js +1 -1
- package/esm/components/amount/index.module.css.js.map +1 -1
- package/esm/components/amount-title/component.d.ts +1 -1
- package/esm/components/amount-title/component.js.map +1 -1
- package/esm/components/amount-title/index.css +13 -13
- package/esm/components/amount-title/index.module.css.js +1 -1
- package/esm/components/amount-title/index.module.css.js.map +1 -1
- package/esm/components/category/component.d.ts +1 -1
- package/esm/components/category/index.css +4 -4
- package/esm/components/category/index.module.css.js +1 -1
- package/esm/components/category/index.module.css.js.map +1 -1
- package/esm/components/content/component.d.ts +1 -1
- package/esm/components/content/index.css +2 -2
- package/esm/components/content/index.module.css.js +1 -1
- package/esm/components/content/index.module.css.js.map +1 -1
- package/esm/components/footer/component.d.ts +1 -1
- package/esm/components/footer/index.css +3 -3
- package/esm/components/footer/index.module.css.js +1 -1
- package/esm/components/footer/index.module.css.js.map +1 -1
- package/esm/components/footer-button/component.d.ts +2 -2
- package/esm/components/footer-button/index.css +1 -1
- package/esm/components/footer-button/index.module.css.js +1 -1
- package/esm/components/footer-button/index.module.css.js.map +1 -1
- package/esm/components/footer-text/component.d.ts +1 -1
- package/esm/components/graphics/component.d.ts +1 -1
- package/esm/components/graphics/index.css +19 -19
- package/esm/components/graphics/index.module.css.js +1 -1
- package/esm/components/main/component.d.ts +1 -1
- package/esm/components/main/index.css +6 -6
- package/esm/components/main/index.module.css.js +1 -1
- package/esm/components/text/component.d.ts +1 -1
- package/esm/components/text/index.css +6 -6
- package/esm/components/text/index.module.css.js +1 -1
- package/esm/components/text/index.module.css.js.map +1 -1
- package/esm/components/types.d.ts +12 -12
- package/esm/components/typesProps.d.ts +1 -1
- package/esm/context.d.ts +1 -2
- package/esm/index.css +28 -28
- package/esm/index.module.css.js +1 -1
- package/esm/index.module.css.js.map +1 -1
- package/index.css +28 -28
- package/index.module.css.js +1 -1
- package/index.module.css.js.map +1 -1
- package/modern/component.d.ts +33 -35
- package/modern/component.js.map +1 -1
- package/modern/components/addon/component.d.ts +1 -1
- package/modern/components/addon/index.css +12 -12
- package/modern/components/addon/index.module.css.js +1 -1
- package/modern/components/amount/component.d.ts +1 -1
- package/modern/components/amount/component.js.map +1 -1
- package/modern/components/amount/index.css +3 -3
- package/modern/components/amount/index.module.css.js +1 -1
- package/modern/components/amount/index.module.css.js.map +1 -1
- package/modern/components/amount-title/component.d.ts +1 -1
- package/modern/components/amount-title/component.js.map +1 -1
- package/modern/components/amount-title/index.css +13 -13
- package/modern/components/amount-title/index.module.css.js +1 -1
- package/modern/components/amount-title/index.module.css.js.map +1 -1
- package/modern/components/category/component.d.ts +1 -1
- package/modern/components/category/index.css +4 -4
- package/modern/components/category/index.module.css.js +1 -1
- package/modern/components/category/index.module.css.js.map +1 -1
- package/modern/components/content/component.d.ts +1 -1
- package/modern/components/content/index.css +2 -2
- package/modern/components/content/index.module.css.js +1 -1
- package/modern/components/content/index.module.css.js.map +1 -1
- package/modern/components/footer/component.d.ts +1 -1
- package/modern/components/footer/index.css +3 -3
- package/modern/components/footer/index.module.css.js +1 -1
- package/modern/components/footer/index.module.css.js.map +1 -1
- package/modern/components/footer-button/component.d.ts +2 -2
- package/modern/components/footer-button/index.css +1 -1
- package/modern/components/footer-button/index.module.css.js +1 -1
- package/modern/components/footer-button/index.module.css.js.map +1 -1
- package/modern/components/footer-text/component.d.ts +1 -1
- package/modern/components/graphics/component.d.ts +1 -1
- package/modern/components/graphics/index.css +19 -19
- package/modern/components/graphics/index.module.css.js +1 -1
- package/modern/components/main/component.d.ts +1 -1
- package/modern/components/main/index.css +6 -6
- package/modern/components/main/index.module.css.js +1 -1
- package/modern/components/text/component.d.ts +1 -1
- package/modern/components/text/index.css +6 -6
- package/modern/components/text/index.module.css.js +1 -1
- package/modern/components/text/index.module.css.js.map +1 -1
- package/modern/components/types.d.ts +12 -12
- package/modern/components/typesProps.d.ts +1 -1
- package/modern/context.d.ts +1 -2
- package/modern/index.css +28 -28
- package/modern/index.module.css.js +1 -1
- package/modern/index.module.css.js.map +1 -1
- package/moderncssm/component.d.ts +33 -35
- package/moderncssm/component.js.map +1 -1
- package/moderncssm/components/addon/component.d.ts +1 -1
- package/moderncssm/components/amount/component.d.ts +1 -1
- package/moderncssm/components/amount/component.js.map +1 -1
- package/moderncssm/components/amount-title/component.d.ts +1 -1
- package/moderncssm/components/amount-title/component.js.map +1 -1
- package/moderncssm/components/category/component.d.ts +1 -1
- package/moderncssm/components/content/component.d.ts +1 -1
- package/moderncssm/components/footer/component.d.ts +1 -1
- package/moderncssm/components/footer-button/component.d.ts +2 -2
- package/moderncssm/components/footer-text/component.d.ts +1 -1
- package/moderncssm/components/graphics/component.d.ts +1 -1
- package/moderncssm/components/main/component.d.ts +1 -1
- package/moderncssm/components/text/component.d.ts +1 -1
- package/moderncssm/components/types.d.ts +12 -12
- package/moderncssm/components/typesProps.d.ts +1 -1
- package/moderncssm/context.d.ts +1 -2
- package/package.json +7 -7
- package/src/components/amount/index.module.css +1 -1
- package/src/components/amount-title/index.module.css +1 -1
- package/src/components/category/index.module.css +1 -1
- package/src/components/content/index.module.css +1 -1
- package/src/components/footer/index.module.css +1 -1
- package/src/components/footer-button/index.module.css +1 -1
- package/src/components/text/index.module.css +1 -1
- package/src/index.module.css +1 -1
- package/src/vars.css +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../src/components/footer-button/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/footer-button/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n justify-self: start;\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,4BAA4B,CAAC;;;;"}
|
|
@@ -18,56 +18,56 @@
|
|
|
18
18
|
--pure-cell-clickable-area-hover-opacity: 1;
|
|
19
19
|
--pure-cell-clickable-area-active-opacity: 1;
|
|
20
20
|
}
|
|
21
|
-
.pure-
|
|
21
|
+
.pure-cell__component_7yzq4 {
|
|
22
22
|
display: inline-flex;
|
|
23
23
|
flex-basis: auto;
|
|
24
24
|
}
|
|
25
|
-
.pure-
|
|
25
|
+
.pure-cell__top_7yzq4 {
|
|
26
26
|
align-self: flex-start;
|
|
27
27
|
}
|
|
28
|
-
.pure-
|
|
28
|
+
.pure-cell__center_7yzq4 {
|
|
29
29
|
align-self: center;
|
|
30
30
|
}
|
|
31
|
-
.pure-
|
|
31
|
+
.pure-cell__bottom_7yzq4 {
|
|
32
32
|
align-self: flex-end;
|
|
33
33
|
}
|
|
34
|
-
.pure-
|
|
34
|
+
.pure-cell__horizontal_7yzq4.pure-cell__none_7yzq4:not(:last-child) {
|
|
35
35
|
margin-right: var(--gap-0);
|
|
36
36
|
}
|
|
37
|
-
.pure-
|
|
37
|
+
.pure-cell__horizontal_7yzq4.pure-cell__max_7yzq4:not(:last-child) {
|
|
38
38
|
margin-right: var(--gap-24);
|
|
39
39
|
}
|
|
40
|
-
.pure-
|
|
40
|
+
.pure-cell__horizontal_7yzq4.pure-cell__airy_7yzq4:not(:last-child) {
|
|
41
41
|
margin-right: var(--gap-16);
|
|
42
42
|
}
|
|
43
|
-
.pure-
|
|
43
|
+
.pure-cell__horizontal_7yzq4.pure-cell__default_7yzq4:not(:last-child) {
|
|
44
44
|
margin-right: var(--gap-12);
|
|
45
45
|
}
|
|
46
|
-
.pure-
|
|
46
|
+
.pure-cell__horizontal_7yzq4.pure-cell__compact_7yzq4:not(:last-child) {
|
|
47
47
|
margin-right: var(--gap-8);
|
|
48
48
|
}
|
|
49
|
-
.pure-
|
|
49
|
+
.pure-cell__horizontal_7yzq4.pure-cell__tiny_7yzq4:not(:last-child) {
|
|
50
50
|
margin-right: var(--gap-4);
|
|
51
51
|
}
|
|
52
|
-
.pure-
|
|
52
|
+
.pure-cell__vertical_7yzq4.pure-cell__none_7yzq4:not(:last-child) {
|
|
53
53
|
margin-bottom: var(--gap-0);
|
|
54
54
|
}
|
|
55
|
-
.pure-
|
|
55
|
+
.pure-cell__vertical_7yzq4.pure-cell__max_7yzq4:not(:last-child) {
|
|
56
56
|
margin-bottom: var(--gap-24);
|
|
57
57
|
}
|
|
58
|
-
.pure-
|
|
58
|
+
.pure-cell__vertical_7yzq4.pure-cell__airy_7yzq4:not(:last-child) {
|
|
59
59
|
margin-bottom: var(--gap-16);
|
|
60
60
|
}
|
|
61
|
-
.pure-
|
|
61
|
+
.pure-cell__vertical_7yzq4.pure-cell__default_7yzq4:not(:last-child) {
|
|
62
62
|
margin-bottom: var(--gap-12);
|
|
63
63
|
}
|
|
64
|
-
.pure-
|
|
64
|
+
.pure-cell__vertical_7yzq4.pure-cell__compact_7yzq4:not(:last-child) {
|
|
65
65
|
margin-bottom: var(--gap-8);
|
|
66
66
|
}
|
|
67
|
-
.pure-
|
|
67
|
+
.pure-cell__vertical_7yzq4.pure-cell__tiny_7yzq4:not(:last-child) {
|
|
68
68
|
margin-bottom: var(--gap-4);
|
|
69
69
|
}
|
|
70
|
-
.pure-
|
|
70
|
+
.pure-cell__button_7yzq4 {
|
|
71
71
|
-webkit-tap-highlight-color: transparent;
|
|
72
72
|
box-sizing: border-box;
|
|
73
73
|
background-color: transparent;
|
|
@@ -90,9 +90,9 @@
|
|
|
90
90
|
transition: opacity 0.15s ease-in-out;
|
|
91
91
|
min-width: auto;
|
|
92
92
|
}
|
|
93
|
-
.pure-
|
|
93
|
+
.pure-cell__button_7yzq4:hover {
|
|
94
94
|
opacity: var(--pure-cell-clickable-area-hover-opacity);
|
|
95
95
|
}
|
|
96
|
-
.pure-
|
|
96
|
+
.pure-cell__button_7yzq4:active {
|
|
97
97
|
opacity: var(--pure-cell-clickable-area-active-opacity);
|
|
98
98
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"pure-
|
|
5
|
+
var styles = {"component":"pure-cell__component_7yzq4","top":"pure-cell__top_7yzq4","center":"pure-cell__center_7yzq4","bottom":"pure-cell__bottom_7yzq4","horizontal":"pure-cell__horizontal_7yzq4","none":"pure-cell__none_7yzq4","max":"pure-cell__max_7yzq4","airy":"pure-cell__airy_7yzq4","default":"pure-cell__default_7yzq4","compact":"pure-cell__compact_7yzq4","tiny":"pure-cell__tiny_7yzq4","vertical":"pure-cell__vertical_7yzq4","button":"pure-cell__button_7yzq4"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -10,22 +10,22 @@
|
|
|
10
10
|
--pure-cell-clickable-area-hover-opacity: 1;
|
|
11
11
|
--pure-cell-clickable-area-active-opacity: 1;
|
|
12
12
|
}
|
|
13
|
-
.pure-
|
|
13
|
+
.pure-cell__component_1704d {
|
|
14
14
|
display: flex;
|
|
15
15
|
flex-direction: column;
|
|
16
16
|
align-self: center;
|
|
17
17
|
white-space: pre-line;
|
|
18
18
|
}
|
|
19
|
-
.pure-
|
|
19
|
+
.pure-cell__component_1704d.pure-cell__vertical_1704d {
|
|
20
20
|
grid-row-gap: var(--gap-2);
|
|
21
21
|
justify-content: center;
|
|
22
22
|
align-items: center;
|
|
23
23
|
text-align: center;
|
|
24
24
|
}
|
|
25
|
-
.pure-
|
|
25
|
+
.pure-cell__component_1704d.pure-cell__reverse_1704d {
|
|
26
26
|
flex-direction: column-reverse;
|
|
27
27
|
}
|
|
28
|
-
.pure-
|
|
28
|
+
.pure-cell__component_1704d.pure-cell__button_1704d {
|
|
29
29
|
-webkit-tap-highlight-color: transparent;
|
|
30
30
|
box-sizing: border-box;
|
|
31
31
|
background-color: transparent;
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
transition: opacity 0.15s ease-in-out;
|
|
49
49
|
min-width: auto;
|
|
50
50
|
}
|
|
51
|
-
.pure-
|
|
51
|
+
.pure-cell__component_1704d.pure-cell__button_1704d:hover {
|
|
52
52
|
opacity: var(--pure-cell-clickable-area-hover-opacity);
|
|
53
53
|
}
|
|
54
|
-
.pure-
|
|
54
|
+
.pure-cell__component_1704d.pure-cell__button_1704d:active {
|
|
55
55
|
opacity: var(--pure-cell-clickable-area-active-opacity);
|
|
56
56
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"pure-
|
|
5
|
+
var styles = {"component":"pure-cell__component_1704d","vertical":"pure-cell__vertical_1704d","reverse":"pure-cell__reverse_1704d","button":"pure-cell__button_1704d"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -5,23 +5,23 @@
|
|
|
5
5
|
--gap-2: var(--gap-3xs);
|
|
6
6
|
--gap-16: var(--gap-m);
|
|
7
7
|
}
|
|
8
|
-
.pure-
|
|
8
|
+
.pure-cell__horizontal_t0f50 {
|
|
9
9
|
padding: var(--gap-2) var(--gap-0);
|
|
10
10
|
}
|
|
11
|
-
.pure-
|
|
11
|
+
.pure-cell__rowLimit1_t0f50 {
|
|
12
12
|
-webkit-line-clamp: 1;
|
|
13
13
|
display: -webkit-box;
|
|
14
14
|
-webkit-box-orient: vertical;
|
|
15
15
|
overflow: hidden;
|
|
16
16
|
word-break: break-all;
|
|
17
17
|
}
|
|
18
|
-
.pure-
|
|
18
|
+
.pure-cell__rowLimit2_t0f50 {
|
|
19
19
|
-webkit-line-clamp: 2;
|
|
20
20
|
display: -webkit-box;
|
|
21
21
|
-webkit-box-orient: vertical;
|
|
22
22
|
overflow: hidden;
|
|
23
23
|
}
|
|
24
|
-
.pure-
|
|
24
|
+
.pure-cell__component_t0f50 {
|
|
25
25
|
display: flex;
|
|
26
26
|
flex-direction: row;
|
|
27
27
|
flex-wrap: nowrap;
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
margin: var(--gap-2) var(--gap-0);
|
|
30
30
|
word-break: break-word;
|
|
31
31
|
}
|
|
32
|
-
.pure-
|
|
32
|
+
.pure-cell__component_t0f50 .pure-cell__vertical_t0f50 {
|
|
33
33
|
justify-content: center;
|
|
34
34
|
}
|
|
35
|
-
.pure-
|
|
35
|
+
.pure-cell__title_t0f50 + .pure-cell__value_t0f50 {
|
|
36
36
|
margin-left: var(--gap-16);
|
|
37
37
|
flex-shrink: 0;
|
|
38
38
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"horizontal":"pure-
|
|
5
|
+
var styles = {"horizontal":"pure-cell__horizontal_t0f50","rowLimit1":"pure-cell__rowLimit1_t0f50","rowLimit2":"pure-cell__rowLimit2_t0f50","component":"pure-cell__component_t0f50","vertical":"pure-cell__vertical_t0f50","title":"pure-cell__title_t0f50","value":"pure-cell__value_t0f50"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../src/components/text/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/text/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.horizontal {\n padding: var(--gap-2) var(--gap-0);\n}\n\n.rowLimit1 {\n @mixin row_limit 1;\n word-break: break-all;\n}\n\n.rowLimit2 {\n @mixin row_limit 2;\n}\n\n.component {\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n margin: var(--gap-2) var(--gap-0);\n word-break: break-word;\n\n & .vertical {\n justify-content: center;\n }\n}\n\n.title + .value {\n margin-left: var(--gap-16);\n flex-shrink: 0;\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,YAAY,CAAC,6BAA6B,CAAC,WAAW,CAAC,4BAA4B,CAAC,WAAW,CAAC,4BAA4B,CAAC,WAAW,CAAC,4BAA4B,CAAC,UAAU,CAAC,2BAA2B,CAAC,OAAO,CAAC,wBAAwB,CAAC,OAAO,CAAC,wBAAwB,CAAC;;;;"}
|
package/components/types.d.ts
CHANGED
|
@@ -6,16 +6,16 @@ import { type FooterButton } from './footer-button';
|
|
|
6
6
|
import { type FooterText } from './footer-text';
|
|
7
7
|
import { type Graphics } from './graphics';
|
|
8
8
|
import { type Text } from './text';
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
9
|
+
type TextElement = ReactElement<typeof Text>;
|
|
10
|
+
export type GraphicsElement = ReactElement<typeof Graphics> | boolean | null;
|
|
11
|
+
type AmountElement = ReactElement<typeof Amount>;
|
|
12
|
+
type AmountTitleElement = ReactElement<typeof AmountTitle>;
|
|
13
|
+
export type CommentElement = ReactElement<typeof Comment>;
|
|
14
|
+
type FooterButtonElement = ReactElement<typeof FooterButton>;
|
|
15
|
+
type FooterTitleElement = ReactElement<typeof FooterText>;
|
|
16
|
+
export type FooterElement = Array<ReactElement<FooterButtonElement> | FooterTitleElement | boolean | null> | CommentElement | boolean | null;
|
|
17
|
+
export type MainElement = Array<undefined | '' | boolean | null | TextElement | AmountElement | AmountTitleElement> | (TextElement | AmountElement | AmountTitleElement | boolean | null);
|
|
18
|
+
export type ContentElement = Array<MainElement | AddonElement | FooterElement> | MainElement;
|
|
19
|
+
export type AddonElement = Array<TextElement | ReactNode> | TextElement | ReactNode;
|
|
20
|
+
export type PureCellElement = Array<GraphicsElement | ContentElement> | ContentElement;
|
|
21
21
|
export {};
|
package/context.d.ts
CHANGED
package/cssm/component.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { Text } from './components/text';
|
|
|
13
13
|
import { type PureCellElement } from './components/types';
|
|
14
14
|
import { PureCellContext } from './context';
|
|
15
15
|
export { PureCellContext };
|
|
16
|
-
|
|
16
|
+
type BasePureCellProps = {
|
|
17
17
|
/**
|
|
18
18
|
* Направление
|
|
19
19
|
*/
|
|
@@ -56,10 +56,10 @@ declare type BasePureCellProps = {
|
|
|
56
56
|
*/
|
|
57
57
|
dataTestId?: string;
|
|
58
58
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
export
|
|
59
|
+
type AnchorPureCellProps = BasePureCellProps & AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
60
|
+
type ButtonPureCellProps = BasePureCellProps & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
61
|
+
type ElementPureCellProps = BasePureCellProps & HTMLAttributes<HTMLElement>;
|
|
62
|
+
export type PureCellProps = Partial<AnchorPureCellProps | ButtonPureCellProps | ElementPureCellProps>;
|
|
63
63
|
declare const PureCellComponent: React.ForwardRefExoticComponent<PureCellProps & React.RefAttributes<HTMLElement>>;
|
|
64
64
|
declare const ExtraSubtitle: React.FC<import("./components/footer-text").FooterTextProps>;
|
|
65
65
|
/**
|
|
@@ -70,62 +70,60 @@ declare const ExtraSubtitle: React.FC<import("./components/footer-text").FooterT
|
|
|
70
70
|
declare const PureCell: React.ForwardRefExoticComponent<PureCellProps & React.RefAttributes<HTMLElement>> & {
|
|
71
71
|
Main: React.FC<{
|
|
72
72
|
children: import("./components/types").MainElement;
|
|
73
|
-
isReverse?: boolean
|
|
74
|
-
className?: string
|
|
75
|
-
dataTestId?: string
|
|
76
|
-
onClick?: (
|
|
73
|
+
isReverse?: boolean;
|
|
74
|
+
className?: string;
|
|
75
|
+
dataTestId?: string;
|
|
76
|
+
onClick?: () => void;
|
|
77
77
|
}>;
|
|
78
78
|
Graphics: React.FC<import("./components/graphics").Props>;
|
|
79
79
|
Content: React.FC<{
|
|
80
80
|
children: import("./components/types").ContentElement;
|
|
81
|
-
dataTestId?: string
|
|
81
|
+
dataTestId?: string;
|
|
82
82
|
}>;
|
|
83
83
|
Text: React.FC<{
|
|
84
84
|
children?: React.ReactNode;
|
|
85
|
-
rowLimit?: 1 | 2
|
|
86
|
-
view?: "
|
|
87
|
-
titleWeight?: "
|
|
88
|
-
titleColor: "
|
|
85
|
+
rowLimit?: 1 | 2;
|
|
86
|
+
view?: "primary-large" | "primary-medium" | "primary-small" | "component-primary" | "component-secondary" | "secondary-large";
|
|
87
|
+
titleWeight?: "regular" | "bold";
|
|
88
|
+
titleColor: import("@alfalab/core-components-typography").Color;
|
|
89
89
|
value?: React.ReactNode;
|
|
90
|
-
valueColor?: "
|
|
91
|
-
dataTestId?: string
|
|
92
|
-
* Направление
|
|
93
|
-
*/
|
|
90
|
+
valueColor?: import("@alfalab/core-components-typography").Color;
|
|
91
|
+
dataTestId?: string;
|
|
94
92
|
}>;
|
|
95
93
|
Amount: React.FC<{
|
|
96
|
-
weight?: "bold" | "normal"
|
|
97
|
-
textView?: "component-primary" | "primary-small"
|
|
98
|
-
color?: "
|
|
99
|
-
hidden?: boolean
|
|
100
|
-
dataTestId?: string
|
|
94
|
+
weight?: "bold" | "normal";
|
|
95
|
+
textView?: "component-primary" | "primary-small";
|
|
96
|
+
color?: import("@alfalab/core-components-typography").Color;
|
|
97
|
+
hidden?: boolean;
|
|
98
|
+
dataTestId?: string;
|
|
101
99
|
} & Omit<import("./components/typesProps").AmountProps, "dataTestId">>;
|
|
102
100
|
AmountTitle: React.FC<{
|
|
103
|
-
titleProps?: import("@alfalab/core-components-typography").TitleProps
|
|
104
|
-
hidden?: boolean
|
|
105
|
-
dataTestId?: string
|
|
101
|
+
titleProps?: import("@alfalab/core-components-typography").TitleProps;
|
|
102
|
+
hidden?: boolean;
|
|
103
|
+
dataTestId?: string;
|
|
106
104
|
} & Omit<import("./components/typesProps").AmountProps, "dataTestId">>;
|
|
107
105
|
Addon: React.FC<{
|
|
108
|
-
verticalAlign?: "
|
|
109
|
-
addonPadding?: "default" | "none"
|
|
106
|
+
verticalAlign?: "auto" | "top" | "center" | "bottom";
|
|
107
|
+
addonPadding?: "default" | "none";
|
|
110
108
|
children: import("./components/types").AddonElement;
|
|
111
|
-
dataTestId?: string
|
|
112
|
-
onClick?: (
|
|
109
|
+
dataTestId?: string;
|
|
110
|
+
onClick?: () => void;
|
|
113
111
|
}>;
|
|
114
112
|
Footer: React.FC<{
|
|
115
113
|
children: import("./components/types").FooterElement;
|
|
116
|
-
footerPadding?: "default" | "none"
|
|
117
|
-
dataTestId?: string
|
|
114
|
+
footerPadding?: "default" | "none";
|
|
115
|
+
dataTestId?: string;
|
|
118
116
|
}>;
|
|
119
117
|
ExtraSubtitle: React.FC<import("./components/footer-text").FooterTextProps>;
|
|
120
118
|
FooterButton: React.ForwardRefExoticComponent<(Omit<import("@alfalab/core-components-button").ButtonProps, "dataTestId"> & {
|
|
121
|
-
dataTestId?: string
|
|
119
|
+
dataTestId?: string;
|
|
122
120
|
} & Partial<React.AnchorHTMLAttributes<HTMLAnchorElement> | React.ButtonHTMLAttributes<HTMLButtonElement>>) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
123
121
|
Comment: React.FC<import("@alfalab/core-components-comment").CommentProps>;
|
|
124
122
|
Category: React.FC<{
|
|
125
123
|
categoryName: string;
|
|
126
|
-
categoryPercent?: number
|
|
124
|
+
categoryPercent?: number;
|
|
127
125
|
rightAddons?: React.ReactNode;
|
|
128
|
-
dataTestId?: string
|
|
126
|
+
dataTestId?: string;
|
|
129
127
|
}>;
|
|
130
128
|
};
|
|
131
129
|
export { PureCell, PureCellComponent, Main, Graphics, Content, Text, Amount, AmountTitle, Addon, Footer, ExtraSubtitle, FooterButton, Comment, Category, };
|
package/cssm/component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../src/component.tsx"],"sourcesContent":["import React, {\n type AnchorHTMLAttributes,\n type ButtonHTMLAttributes,\n type ElementType,\n forwardRef,\n type HTMLAttributes,\n useRef,\n useState,\n} from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { Comment } from '@alfalab/core-components-comment';\nimport { useFocus } from '@alfalab/hooks';\n\nimport { Addon } from './components/addon';\nimport { Amount } from './components/amount';\nimport { AmountTitle } from './components/amount-title';\nimport { Category } from './components/category';\nimport { Content } from './components/content';\nimport { Footer } from './components/footer';\nimport { FooterButton } from './components/footer-button';\nimport { FooterText } from './components/footer-text';\nimport { Graphics } from './components/graphics';\nimport { Main } from './components/main';\nimport { Text } from './components/text';\nimport { type PureCellElement } from './components/types';\nimport { PureCellContext, type PureCellContextValue } from './context';\n\nimport styles from './index.module.css';\n\nexport { PureCellContext };\n\ntype BasePureCellProps = {\n /**\n * Направление\n */\n direction?: 'horizontal' | 'vertical';\n\n /**\n * Сss класс для стилизации общей обёртки\n */\n className?: string;\n\n /**\n * Выводит ссылку в виде ячейки\n */\n href?: string;\n\n /**\n * Вертикальные отступы\n */\n verticalPadding?:\n | 'airy'\n | 'default'\n | 'compact'\n | 'tiny'\n | 'none'\n | {\n /**\n * Вертикальный отступ сверху\n */\n top?: 'airy' | 'default' | 'compact' | 'tiny' | 'none';\n /**\n * Вертикальный отступ снизу\n */\n bottom?: 'airy' | 'default' | 'compact' | 'tiny' | 'none';\n };\n\n /**\n * Горизонтальные отступы\n */\n horizontalPadding?: 'left' | 'right' | 'both' | 'none';\n\n /**\n * Позволяет использовать кастомный компонент для кнопки (например Link из роутера)\n */\n tag?: ElementType;\n\n /**\n * Компоненты\n */\n children: PureCellElement;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\ntype AnchorPureCellProps = BasePureCellProps & AnchorHTMLAttributes<HTMLAnchorElement>;\ntype ButtonPureCellProps = BasePureCellProps & ButtonHTMLAttributes<HTMLButtonElement>;\ntype ElementPureCellProps = BasePureCellProps & HTMLAttributes<HTMLElement>;\nexport type PureCellProps = Partial<\n AnchorPureCellProps | ButtonPureCellProps | ElementPureCellProps\n>;\n\nconst PureCellComponent = forwardRef<HTMLElement, PureCellProps>(\n (\n {\n className,\n dataTestId,\n onClick,\n href,\n tag: Component = (href && 'a') || (onClick && 'button') || 'section',\n children,\n horizontalPadding = 'none',\n verticalPadding = 'none',\n direction = 'horizontal',\n ...restProps\n },\n ref,\n ) => {\n const cellRef = useRef<HTMLDivElement>(null);\n const [focused] = useFocus(cellRef, 'keyboard');\n const [hoverState, setHoverState] = useState<boolean>(false);\n const [activeState, setActiveState] = useState<boolean>(false);\n\n const setHover = () => setHoverState(true);\n const unsetHover = () => setHoverState(false);\n const setActive = () => setActiveState(true);\n\n const unsetActive = () => setActiveState(false);\n\n const mouseEvents = {\n onMouseEnter: setHover,\n onMouseLeave: () => {\n unsetHover();\n // Убираем на случай, если уводим курсор за пределы компонента при сработавшем onMouseDown\n unsetActive();\n },\n onMouseDown: setActive,\n onMouseUp: unsetActive,\n };\n\n const addClasses = {\n [styles.component]: true,\n [styles.focused]: focused,\n [styles[direction]]: true,\n [styles[horizontalPadding]]: true,\n [styles.hover]: hoverState,\n [styles.active]: activeState,\n };\n\n // eslint-disable-next-line react/jsx-no-constructed-context-values\n const contextState: PureCellContextValue = {\n direction,\n dataTestId,\n setMainHover: setHover,\n unsetMainHover: unsetHover,\n };\n\n if (typeof verticalPadding === 'string') {\n addClasses[styles[verticalPadding as string]] = typeof verticalPadding === 'string';\n }\n\n if (typeof verticalPadding === 'object') {\n addClasses[styles[`${verticalPadding.top}Top`]] = !!verticalPadding.top;\n addClasses[styles[`${verticalPadding.bottom}Bottom`]] = !!verticalPadding.bottom;\n }\n\n if (href) {\n const { target } = restProps as AnchorHTMLAttributes<HTMLAnchorElement>;\n\n // Для совместимости с react-router-dom, меняем href на to\n const hrefProps = { [typeof Component === 'string' ? 'href' : 'to']: href };\n\n return (\n <Component\n rel={target === '_blank' ? 'noreferrer noopener' : undefined}\n {...(restProps as AnchorHTMLAttributes<HTMLAnchorElement>)}\n {...hrefProps}\n ref={mergeRefs([cellRef, ref])}\n className={cn(styles.link, addClasses, className)}\n data-test-id={dataTestId}\n onClick={onClick}\n {...mouseEvents}\n >\n <PureCellContext.Provider value={contextState}>\n {children}\n </PureCellContext.Provider>\n </Component>\n );\n }\n\n if (onClick) {\n return (\n <Component\n {...(restProps as AnchorHTMLAttributes<HTMLAnchorElement>)}\n ref={mergeRefs([cellRef, ref])}\n className={cn(styles.button, addClasses, className)}\n data-test-id={dataTestId}\n onClick={onClick}\n {...mouseEvents}\n >\n <PureCellContext.Provider value={contextState}>\n {children}\n </PureCellContext.Provider>\n </Component>\n );\n }\n\n return (\n <Component\n {...(restProps as AnchorHTMLAttributes<HTMLAnchorElement>)}\n ref={ref}\n tabIndex={0}\n className={cn(addClasses, className)}\n data-test-id={dataTestId}\n >\n <PureCellContext.Provider value={contextState}>{children}</PureCellContext.Provider>\n </Component>\n );\n },\n);\n\nconst ExtraSubtitle = FooterText;\n\n/**\n * Универсальный конструктор для сборки любой ячейки.\n *\n * [Макет](https://www.figma.com/file/KlFOLLkKO8rtvvQE3RXuhq/Click-Library?node-id=43525%3A240018)\n */\nconst PureCell = Object.assign(PureCellComponent, {\n Main,\n Graphics,\n Content,\n Text,\n Amount,\n AmountTitle,\n Addon,\n Footer,\n ExtraSubtitle,\n FooterButton,\n Comment,\n Category,\n});\n\nPureCellComponent.displayName = 'PureCellComponent';\n\nexport {\n PureCell,\n PureCellComponent,\n Main,\n Graphics,\n Content,\n Text,\n Amount,\n AmountTitle,\n Addon,\n Footer,\n ExtraSubtitle,\n FooterButton,\n Comment,\n Category,\n};\n"],"names":["forwardRef","__rest","useRef","useFocus","useState","styles","React","__assign","mergeRefs","cn","PureCellContext","FooterText","Main","Graphics","Content","Text","Amount","AmountTitle","Addon","Footer","FooterButton","Comment","Category"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgGA,IAAM,iBAAiB,GAAGA,gBAAU,CAChC,UACI,EAWC,EACD,GAAG,EAAA;;IAXC,IAAA,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,EAAA,GAAA,EAAA,CAAA,GAAoE,EAA/D,SAAS,GAAG,EAAA,KAAA,MAAA,GAAA,CAAC,IAAI,IAAI,GAAG,MAAM,OAAO,IAAI,QAAQ,CAAC,IAAI,SAAS,KAAA,EACpE,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,EAA0B,GAAA,EAAA,CAAA,iBAAA,EAA1B,iBAAiB,GAAA,EAAA,KAAA,MAAA,GAAG,MAAM,GAAA,EAAA,EAC1B,EAAA,GAAA,EAAA,CAAA,eAAwB,EAAxB,eAAe,GAAG,EAAA,KAAA,MAAA,GAAA,MAAM,GAAA,EAAA,EACxB,EAAwB,GAAA,EAAA,CAAA,SAAA,EAAxB,SAAS,GAAA,EAAA,KAAA,MAAA,GAAG,YAAY,GAAA,EAAA,EACrB,SAAS,GAVhBC,YAAA,CAAA,EAAA,EAAA,CAAA,WAAA,EAAA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;;;AAIG;AACH,IAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE;AAC9C,IAAA,IAAI,EAAAC,cAAA;AACJ,IAAA,QAAQ,EAAAC,oBAAA;AACR,IAAA,OAAO,EAAAC,mBAAA;AACP,IAAA,IAAI,EAAAC,gBAAA;AACJ,IAAA,MAAM,EAAAC,kBAAA;AACN,IAAA,WAAW,EAAAC,uBAAA;AACX,IAAA,KAAK,EAAAC,iBAAA;AACL,IAAA,MAAM,EAAAC,kBAAA;AACN,IAAA,aAAa,EAAA,aAAA;AACb,IAAA,YAAY,EAAAC,wBAAA;AACZ,IAAA,OAAO,EAAAC,YAAA;AACP,IAAA,QAAQ,EAAAC,oBAAA;AACX,CAAA;AAED,iBAAiB,CAAC,WAAW,GAAG,mBAAmB;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../src/component.tsx"],"sourcesContent":["import React, {\n type AnchorHTMLAttributes,\n type ButtonHTMLAttributes,\n type ElementType,\n forwardRef,\n type HTMLAttributes,\n useRef,\n useState,\n} from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { Comment } from '@alfalab/core-components-comment';\nimport { useFocus } from '@alfalab/hooks';\n\nimport { Addon } from './components/addon';\nimport { Amount } from './components/amount';\nimport { AmountTitle } from './components/amount-title';\nimport { Category } from './components/category';\nimport { Content } from './components/content';\nimport { Footer } from './components/footer';\nimport { FooterButton } from './components/footer-button';\nimport { FooterText } from './components/footer-text';\nimport { Graphics } from './components/graphics';\nimport { Main } from './components/main';\nimport { Text } from './components/text';\nimport { type PureCellElement } from './components/types';\nimport { PureCellContext, type PureCellContextValue } from './context';\n\nimport styles from './index.module.css';\n\nexport { PureCellContext };\n\ntype BasePureCellProps = {\n /**\n * Направление\n */\n direction?: 'horizontal' | 'vertical';\n\n /**\n * Сss класс для стилизации общей обёртки\n */\n className?: string;\n\n /**\n * Выводит ссылку в виде ячейки\n */\n href?: string;\n\n /**\n * Вертикальные отступы\n */\n verticalPadding?:\n | 'airy'\n | 'default'\n | 'compact'\n | 'tiny'\n | 'none'\n | {\n /**\n * Вертикальный отступ сверху\n */\n top?: 'airy' | 'default' | 'compact' | 'tiny' | 'none';\n /**\n * Вертикальный отступ снизу\n */\n bottom?: 'airy' | 'default' | 'compact' | 'tiny' | 'none';\n };\n\n /**\n * Горизонтальные отступы\n */\n horizontalPadding?: 'left' | 'right' | 'both' | 'none';\n\n /**\n * Позволяет использовать кастомный компонент для кнопки (например Link из роутера)\n */\n tag?: ElementType;\n\n /**\n * Компоненты\n */\n children: PureCellElement;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\ntype AnchorPureCellProps = BasePureCellProps & AnchorHTMLAttributes<HTMLAnchorElement>;\ntype ButtonPureCellProps = BasePureCellProps & ButtonHTMLAttributes<HTMLButtonElement>;\ntype ElementPureCellProps = BasePureCellProps & HTMLAttributes<HTMLElement>;\nexport type PureCellProps = Partial<\n AnchorPureCellProps | ButtonPureCellProps | ElementPureCellProps\n>;\n\nconst PureCellComponent = forwardRef<HTMLElement, PureCellProps>(\n (\n {\n className,\n dataTestId,\n onClick,\n href,\n tag: Component = (href && 'a') || (onClick && 'button') || 'section',\n children,\n horizontalPadding = 'none',\n verticalPadding = 'none',\n direction = 'horizontal',\n ...restProps\n },\n ref,\n ) => {\n const cellRef = useRef<HTMLDivElement>(null);\n const [focused] = useFocus(cellRef, 'keyboard');\n const [hoverState, setHoverState] = useState<boolean>(false);\n const [activeState, setActiveState] = useState<boolean>(false);\n\n const setHover = () => setHoverState(true);\n const unsetHover = () => setHoverState(false);\n const setActive = () => setActiveState(true);\n\n const unsetActive = () => setActiveState(false);\n\n const mouseEvents = {\n onMouseEnter: setHover,\n onMouseLeave: () => {\n unsetHover();\n // Убираем на случай, если уводим курсор за пределы компонента при сработавшем onMouseDown\n unsetActive();\n },\n onMouseDown: setActive,\n onMouseUp: unsetActive,\n };\n\n const addClasses = {\n [styles.component]: true,\n [styles.focused]: focused,\n [styles[direction]]: true,\n [styles[horizontalPadding]]: true,\n [styles.hover]: hoverState,\n [styles.active]: activeState,\n };\n\n // eslint-disable-next-line react/jsx-no-constructed-context-values\n const contextState: PureCellContextValue = {\n direction,\n dataTestId,\n setMainHover: setHover,\n unsetMainHover: unsetHover,\n };\n\n if (typeof verticalPadding === 'string') {\n addClasses[styles[verticalPadding as string]] = typeof verticalPadding === 'string';\n }\n\n if (typeof verticalPadding === 'object') {\n addClasses[styles[`${verticalPadding.top}Top`]] = !!verticalPadding.top;\n addClasses[styles[`${verticalPadding.bottom}Bottom`]] = !!verticalPadding.bottom;\n }\n\n if (href) {\n const { target } = restProps as AnchorHTMLAttributes<HTMLAnchorElement>;\n\n // Для совместимости с react-router-dom, меняем href на to\n const hrefProps = { [typeof Component === 'string' ? 'href' : 'to']: href };\n\n return (\n <Component\n rel={target === '_blank' ? 'noreferrer noopener' : undefined}\n {...(restProps as AnchorHTMLAttributes<HTMLAnchorElement>)}\n {...hrefProps}\n ref={mergeRefs([cellRef, ref])}\n className={cn(styles.link, addClasses, className)}\n data-test-id={dataTestId}\n onClick={onClick}\n {...mouseEvents}\n >\n <PureCellContext.Provider value={contextState}>\n {children}\n </PureCellContext.Provider>\n </Component>\n );\n }\n\n if (onClick) {\n return (\n <Component\n {...(restProps as AnchorHTMLAttributes<HTMLAnchorElement>)}\n ref={mergeRefs([cellRef, ref])}\n className={cn(styles.button, addClasses, className)}\n data-test-id={dataTestId}\n onClick={onClick}\n {...mouseEvents}\n >\n <PureCellContext.Provider value={contextState}>\n {children}\n </PureCellContext.Provider>\n </Component>\n );\n }\n\n return (\n <Component\n {...(restProps as AnchorHTMLAttributes<HTMLAnchorElement>)}\n ref={ref}\n tabIndex={0}\n className={cn(addClasses, className)}\n data-test-id={dataTestId}\n >\n <PureCellContext.Provider value={contextState}>{children}</PureCellContext.Provider>\n </Component>\n );\n },\n);\n\nconst ExtraSubtitle = FooterText;\n\n/**\n * Универсальный конструктор для сборки любой ячейки.\n *\n * [Макет](https://www.figma.com/file/KlFOLLkKO8rtvvQE3RXuhq/Click-Library?node-id=43525%3A240018)\n */\nconst PureCell = Object.assign(PureCellComponent, {\n Main,\n Graphics,\n Content,\n Text,\n Amount,\n AmountTitle,\n Addon,\n Footer,\n ExtraSubtitle,\n FooterButton,\n Comment,\n Category,\n});\n\nPureCellComponent.displayName = 'PureCellComponent';\n\nexport {\n PureCell,\n PureCellComponent,\n Main,\n Graphics,\n Content,\n Text,\n Amount,\n AmountTitle,\n Addon,\n Footer,\n ExtraSubtitle,\n FooterButton,\n Comment,\n Category,\n};\n"],"names":["forwardRef","__rest","useRef","useFocus","useState","styles","React","__assign","mergeRefs","cn","PureCellContext","FooterText","Main","Graphics","Content","Text","Amount","AmountTitle","Addon","Footer","FooterButton","Comment","Category"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgGA,IAAM,iBAAiB,GAAGA,gBAAU,CAChC,UACI,EAWC,EACD,GAAG,EAAA;;IAXC,IAAA,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,EAAA,GAAA,EAAA,CAAA,GAAoE,EAA/D,SAAS,GAAG,EAAA,KAAA,MAAA,GAAA,CAAC,IAAI,IAAI,GAAG,MAAM,OAAO,IAAI,QAAQ,CAAC,IAAI,SAAS,KAAA,EACpE,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,EAA0B,GAAA,EAAA,CAAA,iBAAA,EAA1B,iBAAiB,GAAA,EAAA,KAAA,MAAA,GAAG,MAAM,GAAA,EAAA,EAC1B,EAAA,GAAA,EAAA,CAAA,eAAwB,EAAxB,eAAe,GAAG,EAAA,KAAA,MAAA,GAAA,MAAM,GAAA,EAAA,EACxB,EAAwB,GAAA,EAAA,CAAA,SAAA,EAAxB,SA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AE,YAAY,EAAA,EAAG,QAAQ,CAA4B,CAC5E;AAEpB,CAAC;AAGC,IAAA,aAAa,GAAGC;AAEtB;;;;AAIG;AACH,IAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE;AAC9C,IAAA,IAAI,EAAAC,cAAA;AACJ,IAAA,QAAQ,EAAAC,oBAAA;AACR,IAAA,OAAO,EAAAC,mBAAA;AACP,IAAA,IAAI,EAAAC,gBAAA;AACJ,IAAA,MAAM,EAAAC,kBAAA;AACN,IAAA,WAAW,EAAAC,uBAAA;AACX,IAAA,KAAK,EAAAC,iBAAA;AACL,IAAA,MAAM,EAAAC,kBAAA;AACN,IAAA,aAAa,EAAA,aAAA;AACb,IAAA,YAAY,EAAAC,wBAAA;AACZ,IAAA,OAAO,EAAAC,YAAA;AACP,IAAA,QAAQ,EAAAC,oBAAA;AACX,CAAA;AAED,iBAAiB,CAAC,WAAW,GAAG,mBAAmB;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/amount/component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Amount as CoreAmount } from '@alfalab/core-components-amount';\nimport { getDataTestId } from '@alfalab/core-components-shared';\nimport { type Color, TypographyText } from '@alfalab/core-components-typography';\n\nimport { PureCellContext } from '../../context';\nimport { type AmountProps as AmountType } from '../typesProps';\n\nimport styles from './index.module.css';\n\ntype Props = {\n /**\n * Начертание шрифта денежного значения\n */\n weight?: 'bold' | 'normal';\n\n /**\n * Размер денежного значения\n */\n textView?: 'component-primary' | 'primary-small';\n\n /**\n * Цвет денежного значения\n */\n color?: Color;\n\n /**\n * Скрыть денежное значение\n */\n hidden?: boolean;\n\n /**\n * Идентификатор для систем автоматизированного тестирования.\n * Для typography используется модификатор -amount-text, для компонента Amount -amount\n */\n dataTestId?: string;\n} & Omit<AmountType, 'dataTestId'>;\n\nexport const Amount: React.FC<Props> = ({\n weight = 'normal',\n textView = 'component-primary',\n color = 'primary',\n minority,\n minorUnits = 100,\n hidden,\n dataTestId,\n ...restProps\n}) => {\n const pureCellContext = useContext(PureCellContext);\n\n if (hidden) {\n return (\n <div className={styles.hiddenWrapper}>\n <div className={styles.hidden} />\n </div>\n );\n }\n\n return (\n <TypographyText\n view={textView}\n dataTestId={getDataTestId(dataTestId || pureCellContext.dataTestId, 'amount-text')}\n className={cn(styles.component)}\n color={color}\n >\n <CoreAmount\n minority={minority || minorUnits}\n bold={weight === 'bold' ? 'full' : 'none'}\n dataTestId={getDataTestId(dataTestId || pureCellContext.dataTestId, 'amount')}\n {...restProps}\n />\n </TypographyText>\n );\n};\n"],"names":["__rest","useContext","PureCellContext","React","styles","TypographyText","getDataTestId","cn","CoreAmount","__assign"],"mappings":";;;;;;;;;;;;;;;;;;;AAwCO,IAAM,MAAM,GAAoB,UAAC,EASvC,EAAA;AARG,IAAA,IAAA,cAAiB,EAAjB,MAAM,mBAAG,QAAQ,GAAA,EAAA,EACjB,EAA8B,GAAA,EAAA,CAAA,QAAA,EAA9B,QAAQ,GAAA,EAAA,KAAA,MAAA,GAAG,mBAAmB,GAAA,EAAA,EAC9B,aAAiB,EAAjB,KAAK,mBAAG,SAAS,GAAA,EAAA,EACjB,QAAQ,cAAA,EACR,EAAA,GAAA,EAAA,CAAA,UAAgB,EAAhB,UAAU,GAAA,EAAA,KAAA,MAAA,GAAG,GAAG,GAAA,EAAA,EAChB,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,UAAU,GAAA,EAAA,CAAA,UAAA,EACP,SAAS,GAAAA,YAAA,CAAA,EAAA,EARwB,iFASvC,CADe;AAEZ,IAAA,IAAM,eAAe,GAAGC,gBAAU,CAACC,uBAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/amount/component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Amount as CoreAmount } from '@alfalab/core-components-amount';\nimport { getDataTestId } from '@alfalab/core-components-shared';\nimport { type Color, TypographyText } from '@alfalab/core-components-typography';\n\nimport { PureCellContext } from '../../context';\nimport { type AmountProps as AmountType } from '../typesProps';\n\nimport styles from './index.module.css';\n\ntype Props = {\n /**\n * Начертание шрифта денежного значения\n */\n weight?: 'bold' | 'normal';\n\n /**\n * Размер денежного значения\n */\n textView?: 'component-primary' | 'primary-small';\n\n /**\n * Цвет денежного значения\n */\n color?: Color;\n\n /**\n * Скрыть денежное значение\n */\n hidden?: boolean;\n\n /**\n * Идентификатор для систем автоматизированного тестирования.\n * Для typography используется модификатор -amount-text, для компонента Amount -amount\n */\n dataTestId?: string;\n} & Omit<AmountType, 'dataTestId'>;\n\nexport const Amount: React.FC<Props> = ({\n weight = 'normal',\n textView = 'component-primary',\n color = 'primary',\n minority,\n minorUnits = 100,\n hidden,\n dataTestId,\n ...restProps\n}) => {\n const pureCellContext = useContext(PureCellContext);\n\n if (hidden) {\n return (\n <div className={styles.hiddenWrapper}>\n <div className={styles.hidden} />\n </div>\n );\n }\n\n return (\n <TypographyText\n view={textView}\n dataTestId={getDataTestId(dataTestId || pureCellContext.dataTestId, 'amount-text')}\n className={cn(styles.component)}\n color={color}\n >\n <CoreAmount\n minority={minority || minorUnits}\n bold={weight === 'bold' ? 'full' : 'none'}\n dataTestId={getDataTestId(dataTestId || pureCellContext.dataTestId, 'amount')}\n {...restProps}\n />\n </TypographyText>\n );\n};\n"],"names":["__rest","useContext","PureCellContext","React","styles","TypographyText","getDataTestId","cn","CoreAmount","__assign"],"mappings":";;;;;;;;;;;;;;;;;;;AAwCO,IAAM,MAAM,GAAoB,UAAC,EASvC,EAAA;AARG,IAAA,IAAA,cAAiB,EAAjB,MAAM,mBAAG,QAAQ,GAAA,EAAA,EACjB,EAA8B,GAAA,EAAA,CAAA,QAAA,EAA9B,QAAQ,GAAA,EAAA,KAAA,MAAA,GAAG,mBAAmB,GAAA,EAAA,EAC9B,aAAiB,EAAjB,KAAK,mBAAG,SAAS,GAAA,EAAA,EACjB,QAAQ,cAAA,EACR,EAAA,GAAA,EAAA,CAAA,UAAgB,EAAhB,UAAU,GAAA,EAAA,KAAA,MAAA,GAAG,GAAG,GAAA,EAAA,EAChB,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,UAAU,GAAA,EAAA,CAAA,UAAA,EACP,SAAS,GAAAA,YAAA,CAAA,EAAA,EARwB,iFASvC,CADe;AAEZ,IAAA,IAAM,eAAe,GAAGC,gBAAU,CAACC,uBAAe,CAAC;IAEnD,IAAI,MAAM,EAAE;AACR,QAAA,QACIC,sBAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAEC,uBAAM,CAAC,aAAa,EAAA;YAChCD,sBAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAEC,uBAAM,CAAC,MAAM,EAAI,CAAA,CAC/B;;AAId,IAAA,QACID,sBAAA,CAAA,aAAA,CAACE,mBAAc,EAAA,EACX,IAAI,EAAE,QAAQ,EACd,UAAU,EAAEC,oBAAa,CAAC,UAAU,IAAI,eAAe,CAAC,UAAU,EAAE,aAAa,CAAC,EAClF,SAAS,EAAEC,mBAAE,CAACH,uBAAM,CAAC,SAAS,CAAC,EAC/B,KAAK,EAAE,KAAK,EAAA;AAEZ,QAAAD,sBAAA,CAAA,aAAA,CAACK,aAAU,EACPC,cAAA,CAAA,EAAA,QAAQ,EAAE,QAAQ,IAAI,UAAU,EAChC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,GAAG,MAAM,EACzC,UAAU,EAAEH,oBAAa,CAAC,UAAU,IAAI,eAAe,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAA,EACzE,SAAS,CACf,CAAA,CACW;AAEzB;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type TitleProps } from '@alfalab/core-components-typography/cssm';
|
|
3
3
|
import { type AmountProps as AmountType } from '../typesProps';
|
|
4
|
-
|
|
4
|
+
type Props = {
|
|
5
5
|
/**
|
|
6
6
|
* Пропсы, которые будут прокинуты в компонент типографики
|
|
7
7
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/amount-title/component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Amount as CoreAmount } from '@alfalab/core-components-amount';\nimport { getDataTestId } from '@alfalab/core-components-shared';\nimport { type TitleProps, TypographyTitleResponsive } from '@alfalab/core-components-typography';\n\nimport { PureCellContext } from '../../context';\nimport { type AmountProps as AmountType } from '../typesProps';\n\nimport styles from './index.module.css';\n\ntype Props = {\n /**\n * Пропсы, которые будут прокинуты в компонент типографики\n */\n titleProps?: TitleProps;\n\n /**\n * Скрыть денежное значение\n */\n hidden?: boolean;\n\n /**\n * Идентификатор для систем автоматизированного тестирования.\n * Для typography используется модификатор -amount-title, для компонента Amount -core-amount-title\n */\n dataTestId?: string;\n} & Omit<AmountType, 'dataTestId'>;\n\nexport const AmountTitle: React.FC<Props> = ({\n minority,\n minorUnits = 100,\n hidden,\n className,\n dataTestId,\n titleProps: titlePropsFromProps,\n ...restProps\n}) => {\n const pureCellContext = useContext(PureCellContext);\n\n const titleProps = {\n tag: 'h4',\n view: 'small',\n ...titlePropsFromProps,\n } as Omit<TitleProps, 'className' | 'dataTestId'>;\n\n if (hidden) {\n return (\n <div className={cn(styles.hiddenWrapper, styles[`hiddenWrapper-${titleProps.view}`])}>\n <div className={cn(styles.hidden, styles[`hidden-${titleProps.view}`])} />\n </div>\n );\n }\n\n return (\n <TypographyTitleResponsive\n {...titleProps}\n dataTestId={getDataTestId(dataTestId || pureCellContext.dataTestId, 'amount-title')}\n className={cn(styles.component, titlePropsFromProps?.className)}\n >\n <CoreAmount\n minority={minority || minorUnits}\n className={className}\n dataTestId={getDataTestId(\n dataTestId || pureCellContext.dataTestId,\n 'core-amount-title',\n )}\n {...restProps}\n bold='none'\n />\n </TypographyTitleResponsive>\n );\n};\n"],"names":["__rest","useContext","PureCellContext","__assign","React","cn","styles","TypographyTitleResponsive","getDataTestId","CoreAmount"],"mappings":";;;;;;;;;;;;;;;;;;;AA8BO,IAAM,WAAW,GAAoB,UAAC,EAQ5C,EAAA;IAPG,IAAA,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,EAAgB,GAAA,EAAA,CAAA,UAAA,EAAhB,UAAU,GAAG,EAAA,KAAA,MAAA,GAAA,GAAG,GAAA,EAAA,EAChB,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,UAAU,GAAA,EAAA,CAAA,UAAA,EACE,mBAAmB,GAAA,EAAA,CAAA,UAAA,EAC5B,SAAS,GAP6BA,YAAA,CAAA,EAAA,EAAA,CAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,WAAA,EAAA,YAAA,EAAA,YAAA,CAQ5C,CADe;AAEZ,IAAA,IAAM,eAAe,GAAGC,gBAAU,CAACC,uBAAe,CAAC;AAEnD,IAAA,IAAM,UAAU,GAAGC,cACf,CAAA,EAAA,GAAG,EAAE,IAAI,EACT,IAAI,EAAE,OAAO,EACV,EAAA,mBAAmB,CACuB;
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/amount-title/component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Amount as CoreAmount } from '@alfalab/core-components-amount';\nimport { getDataTestId } from '@alfalab/core-components-shared';\nimport { type TitleProps, TypographyTitleResponsive } from '@alfalab/core-components-typography';\n\nimport { PureCellContext } from '../../context';\nimport { type AmountProps as AmountType } from '../typesProps';\n\nimport styles from './index.module.css';\n\ntype Props = {\n /**\n * Пропсы, которые будут прокинуты в компонент типографики\n */\n titleProps?: TitleProps;\n\n /**\n * Скрыть денежное значение\n */\n hidden?: boolean;\n\n /**\n * Идентификатор для систем автоматизированного тестирования.\n * Для typography используется модификатор -amount-title, для компонента Amount -core-amount-title\n */\n dataTestId?: string;\n} & Omit<AmountType, 'dataTestId'>;\n\nexport const AmountTitle: React.FC<Props> = ({\n minority,\n minorUnits = 100,\n hidden,\n className,\n dataTestId,\n titleProps: titlePropsFromProps,\n ...restProps\n}) => {\n const pureCellContext = useContext(PureCellContext);\n\n const titleProps = {\n tag: 'h4',\n view: 'small',\n ...titlePropsFromProps,\n } as Omit<TitleProps, 'className' | 'dataTestId'>;\n\n if (hidden) {\n return (\n <div className={cn(styles.hiddenWrapper, styles[`hiddenWrapper-${titleProps.view}`])}>\n <div className={cn(styles.hidden, styles[`hidden-${titleProps.view}`])} />\n </div>\n );\n }\n\n return (\n <TypographyTitleResponsive\n {...titleProps}\n dataTestId={getDataTestId(dataTestId || pureCellContext.dataTestId, 'amount-title')}\n className={cn(styles.component, titlePropsFromProps?.className)}\n >\n <CoreAmount\n minority={minority || minorUnits}\n className={className}\n dataTestId={getDataTestId(\n dataTestId || pureCellContext.dataTestId,\n 'core-amount-title',\n )}\n {...restProps}\n bold='none'\n />\n </TypographyTitleResponsive>\n );\n};\n"],"names":["__rest","useContext","PureCellContext","__assign","React","cn","styles","TypographyTitleResponsive","getDataTestId","CoreAmount"],"mappings":";;;;;;;;;;;;;;;;;;;AA8BO,IAAM,WAAW,GAAoB,UAAC,EAQ5C,EAAA;IAPG,IAAA,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,EAAgB,GAAA,EAAA,CAAA,UAAA,EAAhB,UAAU,GAAG,EAAA,KAAA,MAAA,GAAA,GAAG,GAAA,EAAA,EAChB,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,UAAU,GAAA,EAAA,CAAA,UAAA,EACE,mBAAmB,GAAA,EAAA,CAAA,UAAA,EAC5B,SAAS,GAP6BA,YAAA,CAAA,EAAA,EAAA,CAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,WAAA,EAAA,YAAA,EAAA,YAAA,CAQ5C,CADe;AAEZ,IAAA,I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Attributes, type ButtonHTMLAttributes } from 'react';
|
|
2
2
|
import { type ButtonProps } from '@alfalab/core-components-button/cssm';
|
|
3
|
-
|
|
3
|
+
type ComponentProps = Omit<ButtonProps, 'dataTestId'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Идентификатор для систем автоматизированного тестирования.
|
|
6
6
|
* Используется модификатор -button
|
|
7
7
|
*/
|
|
8
8
|
dataTestId?: string;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
type FooterButtonProps = ComponentProps & Partial<AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
11
11
|
export declare const FooterButton: React.ForwardRefExoticComponent<FooterButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
12
12
|
export {};
|