@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
package/index.css
CHANGED
|
@@ -18,20 +18,20 @@
|
|
|
18
18
|
:root {
|
|
19
19
|
--focus-color: var(--color-light-status-info);
|
|
20
20
|
}
|
|
21
|
-
.pure-
|
|
21
|
+
.pure-cell__component_9os8v {
|
|
22
22
|
text-align: inherit;
|
|
23
23
|
box-sizing: border-box;
|
|
24
24
|
}
|
|
25
|
-
.pure-
|
|
25
|
+
.pure-cell__horizontal_9os8v {
|
|
26
26
|
display: flex;
|
|
27
27
|
width: 100%;
|
|
28
28
|
}
|
|
29
|
-
.pure-
|
|
29
|
+
.pure-cell__vertical_9os8v {
|
|
30
30
|
display: flex;
|
|
31
31
|
align-items: center;
|
|
32
32
|
flex-direction: column;
|
|
33
33
|
}
|
|
34
|
-
.pure-
|
|
34
|
+
.pure-cell__button_9os8v {
|
|
35
35
|
font-family: inherit;
|
|
36
36
|
background: none;
|
|
37
37
|
border: 0;
|
|
@@ -40,80 +40,80 @@
|
|
|
40
40
|
transition: opacity 0.15s ease-in-out;
|
|
41
41
|
padding: var(--gap-0);
|
|
42
42
|
}
|
|
43
|
-
.pure-
|
|
43
|
+
.pure-cell__button_9os8v.pure-cell__hover_9os8v {
|
|
44
44
|
opacity: 0.8;
|
|
45
45
|
}
|
|
46
|
-
.pure-
|
|
46
|
+
.pure-cell__button_9os8v.pure-cell__active_9os8v {
|
|
47
47
|
opacity: 0.6;
|
|
48
48
|
}
|
|
49
|
-
.pure-
|
|
49
|
+
.pure-cell__link_9os8v {
|
|
50
50
|
text-decoration: none;
|
|
51
51
|
color: inherit;
|
|
52
52
|
cursor: pointer;
|
|
53
53
|
transition: opacity 0.15s ease-in-out;
|
|
54
54
|
}
|
|
55
|
-
.pure-
|
|
55
|
+
.pure-cell__link_9os8v.pure-cell__hover_9os8v {
|
|
56
56
|
opacity: 0.8;
|
|
57
57
|
}
|
|
58
|
-
.pure-
|
|
58
|
+
.pure-cell__link_9os8v.pure-cell__active_9os8v {
|
|
59
59
|
opacity: 0.6;
|
|
60
60
|
}
|
|
61
|
-
.pure-
|
|
61
|
+
.pure-cell__none_9os8v {
|
|
62
62
|
padding: var(--gap-0);
|
|
63
63
|
}
|
|
64
|
-
.pure-
|
|
64
|
+
.pure-cell__airy_9os8v {
|
|
65
65
|
padding: var(--gap-16) var(--gap-0);
|
|
66
66
|
}
|
|
67
|
-
.pure-
|
|
67
|
+
.pure-cell__default_9os8v {
|
|
68
68
|
padding: var(--gap-12) var(--gap-0);
|
|
69
69
|
}
|
|
70
|
-
.pure-
|
|
70
|
+
.pure-cell__compact_9os8v {
|
|
71
71
|
padding: var(--gap-8) var(--gap-0);
|
|
72
72
|
}
|
|
73
|
-
.pure-
|
|
73
|
+
.pure-cell__tiny_9os8v {
|
|
74
74
|
padding: var(--gap-4) var(--gap-0);
|
|
75
75
|
}
|
|
76
|
-
.pure-
|
|
76
|
+
.pure-cell__noneTop_9os8v {
|
|
77
77
|
padding-top: var(--gap-0);
|
|
78
78
|
}
|
|
79
|
-
.pure-
|
|
79
|
+
.pure-cell__airyTop_9os8v {
|
|
80
80
|
padding-top: var(--gap-16);
|
|
81
81
|
}
|
|
82
|
-
.pure-
|
|
82
|
+
.pure-cell__defaultTop_9os8v {
|
|
83
83
|
padding-top: var(--gap-12);
|
|
84
84
|
}
|
|
85
|
-
.pure-
|
|
85
|
+
.pure-cell__compactTop_9os8v {
|
|
86
86
|
padding-top: var(--gap-8);
|
|
87
87
|
}
|
|
88
|
-
.pure-
|
|
88
|
+
.pure-cell__tinyTop_9os8v {
|
|
89
89
|
padding-top: var(--gap-4);
|
|
90
90
|
}
|
|
91
|
-
.pure-
|
|
91
|
+
.pure-cell__noneBottom_9os8v {
|
|
92
92
|
padding-bottom: var(--gap-0);
|
|
93
93
|
}
|
|
94
|
-
.pure-
|
|
94
|
+
.pure-cell__airyBottom_9os8v {
|
|
95
95
|
padding-bottom: var(--gap-16);
|
|
96
96
|
}
|
|
97
|
-
.pure-
|
|
97
|
+
.pure-cell__defaultBottom_9os8v {
|
|
98
98
|
padding-bottom: var(--gap-12);
|
|
99
99
|
}
|
|
100
|
-
.pure-
|
|
100
|
+
.pure-cell__compactBottom_9os8v {
|
|
101
101
|
padding-bottom: var(--gap-8);
|
|
102
102
|
}
|
|
103
|
-
.pure-
|
|
103
|
+
.pure-cell__tinyBottom_9os8v {
|
|
104
104
|
padding-bottom: var(--gap-4);
|
|
105
105
|
}
|
|
106
|
-
.pure-
|
|
106
|
+
.pure-cell__left_9os8v {
|
|
107
107
|
padding-left: var(--gap-16);
|
|
108
108
|
}
|
|
109
|
-
.pure-
|
|
109
|
+
.pure-cell__right_9os8v {
|
|
110
110
|
padding-right: var(--gap-16);
|
|
111
111
|
}
|
|
112
|
-
.pure-
|
|
112
|
+
.pure-cell__both_9os8v {
|
|
113
113
|
padding-right: var(--gap-16);
|
|
114
114
|
padding-left: var(--gap-16);
|
|
115
115
|
}
|
|
116
|
-
.pure-
|
|
116
|
+
.pure-cell__focused_9os8v {
|
|
117
117
|
outline: 2px solid var(--focus-color);
|
|
118
118
|
outline-offset: 2px;
|
|
119
119
|
}
|
package/index.module.css.js
CHANGED
|
@@ -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_9os8v","horizontal":"pure-cell__horizontal_9os8v","vertical":"pure-cell__vertical_9os8v","button":"pure-cell__button_9os8v","hover":"pure-cell__hover_9os8v","active":"pure-cell__active_9os8v","link":"pure-cell__link_9os8v","none":"pure-cell__none_9os8v","airy":"pure-cell__airy_9os8v","default":"pure-cell__default_9os8v","compact":"pure-cell__compact_9os8v","tiny":"pure-cell__tiny_9os8v","noneTop":"pure-cell__noneTop_9os8v","airyTop":"pure-cell__airyTop_9os8v","defaultTop":"pure-cell__defaultTop_9os8v","compactTop":"pure-cell__compactTop_9os8v","tinyTop":"pure-cell__tinyTop_9os8v","noneBottom":"pure-cell__noneBottom_9os8v","airyBottom":"pure-cell__airyBottom_9os8v","defaultBottom":"pure-cell__defaultBottom_9os8v","compactBottom":"pure-cell__compactBottom_9os8v","tinyBottom":"pure-cell__tinyBottom_9os8v","left":"pure-cell__left_9os8v","right":"pure-cell__right_9os8v","both":"pure-cell__both_9os8v","focused":"pure-cell__focused_9os8v"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
package/index.module.css.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n text-align: unset;\n box-sizing: border-box;\n}\n\n.horizontal {\n display: flex;\n width: 100%;\n}\n\n.vertical {\n display: flex;\n align-items: center;\n flex-direction: column;\n}\n\n.button {\n font-family: inherit;\n background: none;\n border: 0;\n border-radius: var(--border-radius-0);\n cursor: pointer;\n transition: opacity 0.15s ease-in-out;\n padding: var(--gap-0);\n\n &.hover {\n opacity: 0.8;\n }\n\n &.active {\n opacity: 0.6;\n }\n}\n\n.link {\n text-decoration: none;\n color: inherit;\n cursor: pointer;\n transition: opacity 0.15s ease-in-out;\n\n &.hover {\n opacity: 0.8;\n }\n\n &.active {\n opacity: 0.6;\n }\n}\n.none {\n padding: var(--gap-0);\n}\n\n.airy {\n padding: var(--gap-16) var(--gap-0);\n}\n\n.default {\n padding: var(--gap-12) var(--gap-0);\n}\n\n.compact {\n padding: var(--gap-8) var(--gap-0);\n}\n\n.tiny {\n padding: var(--gap-4) var(--gap-0);\n}\n\n.noneTop {\n padding-top: var(--gap-0);\n}\n\n.airyTop {\n padding-top: var(--gap-16);\n}\n\n.defaultTop {\n padding-top: var(--gap-12);\n}\n\n.compactTop {\n padding-top: var(--gap-8);\n}\n\n.tinyTop {\n padding-top: var(--gap-4);\n}\n\n.noneBottom {\n padding-bottom: var(--gap-0);\n}\n\n.airyBottom {\n padding-bottom: var(--gap-16);\n}\n\n.defaultBottom {\n padding-bottom: var(--gap-12);\n}\n\n.compactBottom {\n padding-bottom: var(--gap-8);\n}\n\n.tinyBottom {\n padding-bottom: var(--gap-4);\n}\n\n.left {\n padding-left: var(--gap-16);\n}\n\n.right {\n padding-right: var(--gap-16);\n}\n\n.both {\n padding-right: var(--gap-16);\n padding-left: var(--gap-16);\n}\n\n.focused {\n @mixin focus-outline;\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,4BAA4B,CAAC,YAAY,CAAC,6BAA6B,CAAC,UAAU,CAAC,2BAA2B,CAAC,QAAQ,CAAC,yBAAyB,CAAC,OAAO,CAAC,wBAAwB,CAAC,QAAQ,CAAC,yBAAyB,CAAC,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC,SAAS,CAAC,0BAA0B,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC,SAAS,CAAC,0BAA0B,CAAC,YAAY,CAAC,6BAA6B,CAAC,YAAY,CAAC,6BAA6B,CAAC,SAAS,CAAC,0BAA0B,CAAC,YAAY,CAAC,6BAA6B,CAAC,YAAY,CAAC,6BAA6B,CAAC,eAAe,CAAC,gCAAgC,CAAC,eAAe,CAAC,gCAAgC,CAAC,YAAY,CAAC,6BAA6B,CAAC,MAAM,CAAC,uBAAuB,CAAC,OAAO,CAAC,wBAAwB,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC;;;;"}
|
package/modern/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/modern/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":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAgGM,MAAA,iBAAiB,GAAG,UAAU,CAChC,CACI,EACI,SAAS,EACT,UAAU,EACV,OAAO,EACP,IAAI,EACJ,GAAG,EAAE,SAAS,GAAG,CAAC,IAAI,IAAI,G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AED,IAAA,IAAI,OAAO,EAAE;AACT,QAAA,QACI,KAAC,CAAA,aAAA,CAAA,SAAS,EACD,EAAA,GAAA,SAAqD,EAC1D,GAAG,EAAE,SAAS,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,EAC9B,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,EAAA,cAAA,EACrC,UAAU,EACxB,OAAO,EAAE,OAAO,KACZ,WAAW,EAAA;AAEf,YAAA,KAAA,CAAA,aAAA,CAAC,eAAe,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,YAAY,EAAA,EACxC,QAAQ,CACc,CACnB;AAEnB;IAED,QACI,oBAAC,SAAS,EAAA,EAAA,GACD,SAAqD,EAC1D,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,EAAA,cAAA,EACtB,UAAU,EAAA;AAExB,QAAA,KAAA,CAAA,aAAA,CAAC,eAAe,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,YAAY,EAAA,EAAG,QAAQ,CAA4B,CAC5E;AAEpB,CAAC;AAGC,MAAA,aAAa,GAAG;AAEtB;;;;AAIG;AACH,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE;IAC9C,IAAI;IACJ,QAAQ;IACR,OAAO;IACP,IAAI;IACJ,MAAM;IACN,WAAW;IACX,KAAK;IACL,MAAM;IACN,aAAa;IACb,YAAY;IACZ,OAAO;IACP,QAAQ;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":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAgGM,MAAA,iBAAiB,GAAG,UAAU,CAChC,CACI,EACI,SAAS,EACT,UAAU,EACV,OAAO,EACP,IAAI,EACJ,GAAG,EAAE,SAAS,GAAG,CAAC,IAAI,IAAI,GAAG,MAAM,OAAO,IAAI,QAAQ,CAAC,IAAI,SAAS,EACpE,QAAQ,EACR,iBAAiB,GAAG,MAAM,EAC1B,eAAe,GAAG,MAAM,EACxB,SAAS,GAAG,YAAY,E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,CAAC,EAC9B,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,EAAA,cAAA,EACrC,UAAU,EACxB,OAAO,EAAE,OAAO,KACZ,WAAW,EAAA;AAEf,YAAA,KAAA,CAAA,aAAA,CAAC,eAAe,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,YAAY,EAAA,EACxC,QAAQ,CACc,CACnB;;IAIpB,QACI,oBAAC,SAAS,EAAA,EAAA,GACD,SAAqD,EAC1D,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,EAAA,cAAA,EACtB,UAAU,EAAA;AAExB,QAAA,KAAA,CAAA,aAAA,CAAC,eAAe,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,YAAY,EAAA,EAAG,QAAQ,CAA4B,CAC5E;AAEpB,CAAC;AAGC,MAAA,aAAa,GAAG;AAEtB;;;;AAIG;AACH,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE;IAC9C,IAAI;IACJ,QAAQ;IACR,OAAO;IACP,IAAI;IACJ,MAAM;IACN,WAAW;IACX,KAAK;IACL,MAAM;IACN,aAAa;IACb,YAAY;IACZ,OAAO;IACP,QAAQ;AACX,CAAA;AAED,iBAAiB,CAAC,WAAW,GAAG,mBAAmB;;;;"}
|
|
@@ -10,36 +10,36 @@
|
|
|
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_1e3rf {
|
|
14
14
|
display: flex;
|
|
15
15
|
flex-direction: column;
|
|
16
16
|
align-items: flex-end;
|
|
17
17
|
}
|
|
18
|
-
.pure-
|
|
18
|
+
.pure-cell__component_1e3rf > * {
|
|
19
19
|
justify-content: flex-end;
|
|
20
20
|
}
|
|
21
|
-
.pure-
|
|
21
|
+
.pure-cell__component_1e3rf.pure-cell__none_1e3rf {
|
|
22
22
|
padding-left: var(--gap-0);
|
|
23
23
|
}
|
|
24
|
-
.pure-
|
|
24
|
+
.pure-cell__component_1e3rf.pure-cell__default_1e3rf {
|
|
25
25
|
padding-left: var(--gap-16);
|
|
26
26
|
}
|
|
27
|
-
.pure-
|
|
27
|
+
.pure-cell__component_1e3rf.pure-cell__addonPadding_1e3rf {
|
|
28
28
|
padding-left: var(--gap-16);
|
|
29
29
|
}
|
|
30
|
-
.pure-
|
|
30
|
+
.pure-cell__component_1e3rf.pure-cell__auto_1e3rf {
|
|
31
31
|
align-self: auto;
|
|
32
32
|
}
|
|
33
|
-
.pure-
|
|
33
|
+
.pure-cell__component_1e3rf.pure-cell__top_1e3rf {
|
|
34
34
|
align-self: flex-start;
|
|
35
35
|
}
|
|
36
|
-
.pure-
|
|
36
|
+
.pure-cell__component_1e3rf.pure-cell__center_1e3rf {
|
|
37
37
|
align-self: center;
|
|
38
38
|
}
|
|
39
|
-
.pure-
|
|
39
|
+
.pure-cell__component_1e3rf.pure-cell__bottom_1e3rf {
|
|
40
40
|
align-self: flex-end;
|
|
41
41
|
}
|
|
42
|
-
.pure-
|
|
42
|
+
.pure-cell__button_1e3rf {
|
|
43
43
|
-webkit-tap-highlight-color: transparent;
|
|
44
44
|
box-sizing: border-box;
|
|
45
45
|
background-color: transparent;
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
padding: var(--gap-0);
|
|
62
62
|
transition: opacity 0.15s ease-in-out;
|
|
63
63
|
}
|
|
64
|
-
.pure-
|
|
64
|
+
.pure-cell__button_1e3rf:hover {
|
|
65
65
|
opacity: var(--pure-cell-clickable-area-hover-opacity);
|
|
66
66
|
}
|
|
67
|
-
.pure-
|
|
67
|
+
.pure-cell__button_1e3rf:active {
|
|
68
68
|
opacity: var(--pure-cell-clickable-area-active-opacity);
|
|
69
69
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
const styles = {"component":"pure-
|
|
3
|
+
const styles = {"component":"pure-cell__component_1e3rf","none":"pure-cell__none_1e3rf","default":"pure-cell__default_1e3rf","addonPadding":"pure-cell__addonPadding_1e3rf","auto":"pure-cell__auto_1e3rf","top":"pure-cell__top_1e3rf","center":"pure-cell__center_1e3rf","bottom":"pure-cell__bottom_1e3rf","button":"pure-cell__button_1e3rf"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -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":["CoreAmount"],"mappings":";;;;;;;;AAwCO,MAAM,MAAM,GAAoB,CAAC,EACpC,MAAM,GAAG,QAAQ,EACjB,QAAQ,GAAG,mBAAmB,EAC9B,KAAK,GAAG,SAAS,EACjB,QAAQ,EACR,UAAU,GAAG,GAAG,EAChB,MAAM,EACN,UAAU,EACV,GAAG,SAAS,EACf,KAAI;AACD,IAAA,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,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":["CoreAmount"],"mappings":";;;;;;;;AAwCO,MAAM,MAAM,GAAoB,CAAC,EACpC,MAAM,GAAG,QAAQ,EACjB,QAAQ,GAAG,mBAAmB,EAC9B,KAAK,GAAG,SAAS,EACjB,QAAQ,EACR,UAAU,GAAG,GAAG,EAChB,MAAM,EACN,UAAU,EACV,GAAG,SAAS,EACf,KAAI;AACD,IAAA,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC;IAEnD,IAAI,MAAM,EAAE;AACR,QAAA,QACI,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,aAAa,EAAA;YAChC,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,MAAM,EAAI,CAAA,CAC/B;;AAId,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,cAAc,EAAA,EACX,IAAI,EAAE,QAAQ,EACd,UAAU,EAAE,aAAa,CAAC,UAAU,IAAI,eAAe,CAAC,UAAU,EAAE,aAAa,CAAC,EAClF,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,EAC/B,KAAK,EAAE,KAAK,EAAA;AAEZ,QAAA,KAAA,CAAA,aAAA,CAACA,QAAU,EACP,EAAA,QAAQ,EAAE,QAAQ,IAAI,UAAU,EAChC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,GAAG,MAAM,EACzC,UAAU,EAAE,aAAa,CAAC,UAAU,IAAI,eAAe,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAA,GACzE,SAAS,EACf,CAAA,CACW;AAEzB;;;;"}
|
|
@@ -12,18 +12,18 @@
|
|
|
12
12
|
--gap-2: var(--gap-3xs);
|
|
13
13
|
--gap-8: var(--gap-xs);
|
|
14
14
|
}
|
|
15
|
-
.pure-
|
|
15
|
+
.pure-cell__component_dlu8b {
|
|
16
16
|
padding: var(--gap-2) var(--gap-0);
|
|
17
17
|
display: flex;
|
|
18
18
|
}
|
|
19
|
-
.pure-
|
|
19
|
+
.pure-cell__hidden_dlu8b {
|
|
20
20
|
background: var(--color-light-neutral-translucent-400);
|
|
21
21
|
border-radius: var(--border-radius-8);
|
|
22
22
|
display: inline-block;
|
|
23
23
|
height: 24px;
|
|
24
24
|
width: 120px;
|
|
25
25
|
}
|
|
26
|
-
.pure-
|
|
26
|
+
.pure-cell__hiddenWrapper_dlu8b {
|
|
27
27
|
display: flex;
|
|
28
28
|
padding: var(--gap-8) var(--gap-0);
|
|
29
29
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
const styles = {"component":"pure-
|
|
3
|
+
const styles = {"component":"pure-cell__component_dlu8b","hidden":"pure-cell__hidden_dlu8b","hiddenWrapper":"pure-cell__hiddenWrapper_dlu8b"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../src/components/amount/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/amount/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n padding: var(--gap-2) var(--gap-0);\n display: flex;\n}\n\n.hidden {\n background: var(--color-light-neutral-translucent-400);\n border-radius: var(--border-radius-8);\n display: inline-block;\n height: 24px;\n width: 120px;\n}\n\n.hiddenWrapper {\n display: flex;\n padding: var(--gap-8) var(--gap-0);\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,WAAW,CAAC,4BAA4B,CAAC,QAAQ,CAAC,yBAAyB,CAAC,eAAe,CAAC,gCAAgC,CAAC;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type TitleProps } from '@alfalab/core-components-typography/modern';
|
|
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":["CoreAmount"],"mappings":";;;;;;;;AA8Ba,MAAA,WAAW,GAAoB,CAAC,EACzC,QAAQ,EACR,UAAU,GAAG,GAAG,EAChB,MAAM,EACN,SAAS,EACT,UAAU,EACV,UAAU,EAAE,mBAAmB,EAC/B,GAAG,SAAS,EACf,KAAI;AACD,IAAA,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC;AAEnD,IAAA,MAAM,UAAU,GAAG;AACf,QAAA,GAAG,EAAE,IAAI;AACT,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,GAAG,mBAAmB;KACuB;
|
|
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":["CoreAmount"],"mappings":";;;;;;;;AA8Ba,MAAA,WAAW,GAAoB,CAAC,EACzC,QAAQ,EACR,UAAU,GAAG,GAAG,EAChB,MAAM,EACN,SAAS,EACT,UAAU,EACV,UAAU,EAAE,mBAAmB,EAC/B,GAAG,SAAS,EACf,KAAI;AACD,IAAA,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC;AAEnD,IAAA,MAAM,UAAU,GAAG;AACf,QAAA,GAAG,EAAE,IAAI;AACT,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,GAAG,mBAAmB;KACuB;IAEjD,IAAI,MAAM,EAAE;AACR,QAAA,QACI,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAiB,cAAA,EAAA,UAAU,CAAC,IAAI,CAAA,CAAE,CAAC,CAAC,EAAA;YAChF,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,UAAU,CAAC,IAAI,CAAE,CAAA,CAAC,CAAC,EAAI,CAAA,CACxE;;AAId,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,yBAAyB,EAAA,EAAA,GAClB,UAAU,EACd,UAAU,EAAE,aAAa,CAAC,UAAU,IAAI,eAAe,CAAC,UAAU,EAAE,cAAc,CAAC,EACnF,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,mBAAmB,EAAE,SAAS,CAAC,EAAA;AAE/D,QAAA,KAAA,CAAA,aAAA,CAACA,MAAU,EAAA,EACP,QAAQ,EAAE,QAAQ,IAAI,UAAU,EAChC,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,aAAa,CACrB,UAAU,IAAI,eAAe,CAAC,UAAU,EACxC,mBAAmB,CACtB,EAAA,GACG,SAAS,EACb,IAAI,EAAC,MAAM,EACb,CAAA,CACsB;AAEpC;;;;"}
|
|
@@ -16,49 +16,49 @@
|
|
|
16
16
|
--gap-12: var(--gap-s);
|
|
17
17
|
--gap-16: var(--gap-m);
|
|
18
18
|
}
|
|
19
|
-
.pure-
|
|
19
|
+
.pure-cell__component_1qvvh {
|
|
20
20
|
display: flex;
|
|
21
21
|
}
|
|
22
|
-
.pure-
|
|
22
|
+
.pure-cell__hidden_1qvvh {
|
|
23
23
|
background: var(--color-light-neutral-translucent-400);
|
|
24
24
|
border-radius: var(--border-radius-8);
|
|
25
25
|
display: inline-block;
|
|
26
26
|
}
|
|
27
|
-
.pure-cell__hidden-
|
|
27
|
+
.pure-cell__hidden-xsmall_1qvvh {
|
|
28
28
|
height: 16px;
|
|
29
29
|
width: 88px;
|
|
30
30
|
}
|
|
31
|
-
.pure-cell__hidden-
|
|
31
|
+
.pure-cell__hidden-small_1qvvh {
|
|
32
32
|
height: 18px;
|
|
33
33
|
width: 100px;
|
|
34
34
|
}
|
|
35
|
-
.pure-cell__hidden-
|
|
35
|
+
.pure-cell__hidden-medium_1qvvh {
|
|
36
36
|
height: 24px;
|
|
37
37
|
width: 120px;
|
|
38
38
|
}
|
|
39
|
-
.pure-cell__hidden-
|
|
39
|
+
.pure-cell__hidden-large_1qvvh {
|
|
40
40
|
height: 28px;
|
|
41
41
|
width: 136px;
|
|
42
42
|
}
|
|
43
|
-
.pure-cell__hidden-
|
|
43
|
+
.pure-cell__hidden-xlarge_1qvvh {
|
|
44
44
|
height: 32px;
|
|
45
45
|
width: 156px;
|
|
46
46
|
}
|
|
47
|
-
.pure-
|
|
47
|
+
.pure-cell__hiddenWrapper_1qvvh {
|
|
48
48
|
display: flex;
|
|
49
49
|
}
|
|
50
|
-
.pure-cell__hiddenWrapper-
|
|
50
|
+
.pure-cell__hiddenWrapper-xsmall_1qvvh {
|
|
51
51
|
padding: var(--gap-4) var(--gap-0);
|
|
52
52
|
}
|
|
53
|
-
.pure-cell__hiddenWrapper-
|
|
53
|
+
.pure-cell__hiddenWrapper-small_1qvvh {
|
|
54
54
|
padding: var(--gap-8) var(--gap-0);
|
|
55
55
|
}
|
|
56
|
-
.pure-cell__hiddenWrapper-
|
|
56
|
+
.pure-cell__hiddenWrapper-medium_1qvvh {
|
|
57
57
|
padding: var(--gap-8) var(--gap-0);
|
|
58
58
|
}
|
|
59
|
-
.pure-cell__hiddenWrapper-
|
|
59
|
+
.pure-cell__hiddenWrapper-large_1qvvh {
|
|
60
60
|
padding: var(--gap-12) var(--gap-0);
|
|
61
61
|
}
|
|
62
|
-
.pure-cell__hiddenWrapper-
|
|
62
|
+
.pure-cell__hiddenWrapper-xlarge_1qvvh {
|
|
63
63
|
padding: var(--gap-16) var(--gap-0);
|
|
64
64
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
const styles = {"component":"pure-
|
|
3
|
+
const styles = {"component":"pure-cell__component_1qvvh","hidden":"pure-cell__hidden_1qvvh","hidden-xsmall":"pure-cell__hidden-xsmall_1qvvh","hidden-small":"pure-cell__hidden-small_1qvvh","hidden-medium":"pure-cell__hidden-medium_1qvvh","hidden-large":"pure-cell__hidden-large_1qvvh","hidden-xlarge":"pure-cell__hidden-xlarge_1qvvh","hiddenWrapper":"pure-cell__hiddenWrapper_1qvvh","hiddenWrapper-xsmall":"pure-cell__hiddenWrapper-xsmall_1qvvh","hiddenWrapper-small":"pure-cell__hiddenWrapper-small_1qvvh","hiddenWrapper-medium":"pure-cell__hiddenWrapper-medium_1qvvh","hiddenWrapper-large":"pure-cell__hiddenWrapper-large_1qvvh","hiddenWrapper-xlarge":"pure-cell__hiddenWrapper-xlarge_1qvvh"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../src/components/amount-title/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/amount-title/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n display: flex;\n}\n\n.hidden {\n background: var(--color-light-neutral-translucent-400);\n border-radius: var(--border-radius-8);\n display: inline-block;\n}\n\n.hidden-xsmall {\n height: 16px;\n width: 88px;\n}\n.hidden-small {\n height: 18px;\n width: 100px;\n}\n.hidden-medium {\n height: 24px;\n width: 120px;\n}\n.hidden-large {\n height: 28px;\n width: 136px;\n}\n.hidden-xlarge {\n height: 32px;\n width: 156px;\n}\n.hiddenWrapper {\n display: flex;\n}\n.hiddenWrapper-xsmall {\n padding: var(--gap-4) var(--gap-0);\n}\n.hiddenWrapper-small {\n padding: var(--gap-8) var(--gap-0);\n}\n.hiddenWrapper-medium {\n padding: var(--gap-8) var(--gap-0);\n}\n.hiddenWrapper-large {\n padding: var(--gap-12) var(--gap-0);\n}\n.hiddenWrapper-xlarge {\n padding: var(--gap-16) var(--gap-0);\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,WAAW,CAAC,4BAA4B,CAAC,QAAQ,CAAC,yBAAyB,CAAC,eAAe,CAAC,gCAAgC,CAAC,cAAc,CAAC,+BAA+B,CAAC,eAAe,CAAC,gCAAgC,CAAC,cAAc,CAAC,+BAA+B,CAAC,eAAe,CAAC,gCAAgC,CAAC,eAAe,CAAC,gCAAgC,CAAC,sBAAsB,CAAC,uCAAuC,CAAC,qBAAqB,CAAC,sCAAsC,CAAC,sBAAsB,CAAC,uCAAuC,CAAC,qBAAqB,CAAC,sCAAsC,CAAC,sBAAsB,CAAC,uCAAuC,CAAC;;;;"}
|