@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.
Files changed (190) hide show
  1. package/component.d.ts +34 -36
  2. package/component.js.map +1 -1
  3. package/components/addon/component.d.ts +1 -1
  4. package/components/addon/index.css +12 -12
  5. package/components/addon/index.module.css.js +1 -1
  6. package/components/amount/component.d.ts +1 -1
  7. package/components/amount/component.js.map +1 -1
  8. package/components/amount/index.css +3 -3
  9. package/components/amount/index.module.css.js +1 -1
  10. package/components/amount/index.module.css.js.map +1 -1
  11. package/components/amount-title/component.d.ts +1 -1
  12. package/components/amount-title/component.js.map +1 -1
  13. package/components/amount-title/index.css +13 -13
  14. package/components/amount-title/index.module.css.js +1 -1
  15. package/components/amount-title/index.module.css.js.map +1 -1
  16. package/components/category/component.d.ts +1 -1
  17. package/components/category/index.css +4 -4
  18. package/components/category/index.module.css.js +1 -1
  19. package/components/category/index.module.css.js.map +1 -1
  20. package/components/content/component.d.ts +1 -1
  21. package/components/content/index.css +2 -2
  22. package/components/content/index.module.css.js +1 -1
  23. package/components/content/index.module.css.js.map +1 -1
  24. package/components/footer/component.d.ts +1 -1
  25. package/components/footer/index.css +3 -3
  26. package/components/footer/index.module.css.js +1 -1
  27. package/components/footer/index.module.css.js.map +1 -1
  28. package/components/footer-button/component.d.ts +3 -3
  29. package/components/footer-button/index.css +1 -1
  30. package/components/footer-button/index.module.css.js +1 -1
  31. package/components/footer-button/index.module.css.js.map +1 -1
  32. package/components/footer-text/component.d.ts +1 -1
  33. package/components/graphics/component.d.ts +1 -1
  34. package/components/graphics/index.css +19 -19
  35. package/components/graphics/index.module.css.js +1 -1
  36. package/components/main/component.d.ts +1 -1
  37. package/components/main/index.css +6 -6
  38. package/components/main/index.module.css.js +1 -1
  39. package/components/text/component.d.ts +1 -1
  40. package/components/text/index.css +6 -6
  41. package/components/text/index.module.css.js +1 -1
  42. package/components/text/index.module.css.js.map +1 -1
  43. package/components/types.d.ts +12 -12
  44. package/components/typesProps.d.ts +1 -1
  45. package/context.d.ts +1 -2
  46. package/cssm/component.d.ts +33 -35
  47. package/cssm/component.js.map +1 -1
  48. package/cssm/components/addon/component.d.ts +1 -1
  49. package/cssm/components/amount/component.d.ts +1 -1
  50. package/cssm/components/amount/component.js.map +1 -1
  51. package/cssm/components/amount-title/component.d.ts +1 -1
  52. package/cssm/components/amount-title/component.js.map +1 -1
  53. package/cssm/components/category/component.d.ts +1 -1
  54. package/cssm/components/content/component.d.ts +1 -1
  55. package/cssm/components/footer/component.d.ts +1 -1
  56. package/cssm/components/footer-button/component.d.ts +2 -2
  57. package/cssm/components/footer-text/component.d.ts +1 -1
  58. package/cssm/components/graphics/component.d.ts +1 -1
  59. package/cssm/components/main/component.d.ts +1 -1
  60. package/cssm/components/text/component.d.ts +1 -1
  61. package/cssm/components/types.d.ts +12 -12
  62. package/cssm/components/typesProps.d.ts +1 -1
  63. package/cssm/context.d.ts +1 -2
  64. package/esm/component.d.ts +33 -35
  65. package/esm/component.js.map +1 -1
  66. package/esm/components/addon/component.d.ts +1 -1
  67. package/esm/components/addon/index.css +12 -12
  68. package/esm/components/addon/index.module.css.js +1 -1
  69. package/esm/components/amount/component.d.ts +1 -1
  70. package/esm/components/amount/component.js.map +1 -1
  71. package/esm/components/amount/index.css +3 -3
  72. package/esm/components/amount/index.module.css.js +1 -1
  73. package/esm/components/amount/index.module.css.js.map +1 -1
  74. package/esm/components/amount-title/component.d.ts +1 -1
  75. package/esm/components/amount-title/component.js.map +1 -1
  76. package/esm/components/amount-title/index.css +13 -13
  77. package/esm/components/amount-title/index.module.css.js +1 -1
  78. package/esm/components/amount-title/index.module.css.js.map +1 -1
  79. package/esm/components/category/component.d.ts +1 -1
  80. package/esm/components/category/index.css +4 -4
  81. package/esm/components/category/index.module.css.js +1 -1
  82. package/esm/components/category/index.module.css.js.map +1 -1
  83. package/esm/components/content/component.d.ts +1 -1
  84. package/esm/components/content/index.css +2 -2
  85. package/esm/components/content/index.module.css.js +1 -1
  86. package/esm/components/content/index.module.css.js.map +1 -1
  87. package/esm/components/footer/component.d.ts +1 -1
  88. package/esm/components/footer/index.css +3 -3
  89. package/esm/components/footer/index.module.css.js +1 -1
  90. package/esm/components/footer/index.module.css.js.map +1 -1
  91. package/esm/components/footer-button/component.d.ts +2 -2
  92. package/esm/components/footer-button/index.css +1 -1
  93. package/esm/components/footer-button/index.module.css.js +1 -1
  94. package/esm/components/footer-button/index.module.css.js.map +1 -1
  95. package/esm/components/footer-text/component.d.ts +1 -1
  96. package/esm/components/graphics/component.d.ts +1 -1
  97. package/esm/components/graphics/index.css +19 -19
  98. package/esm/components/graphics/index.module.css.js +1 -1
  99. package/esm/components/main/component.d.ts +1 -1
  100. package/esm/components/main/index.css +6 -6
  101. package/esm/components/main/index.module.css.js +1 -1
  102. package/esm/components/text/component.d.ts +1 -1
  103. package/esm/components/text/index.css +6 -6
  104. package/esm/components/text/index.module.css.js +1 -1
  105. package/esm/components/text/index.module.css.js.map +1 -1
  106. package/esm/components/types.d.ts +12 -12
  107. package/esm/components/typesProps.d.ts +1 -1
  108. package/esm/context.d.ts +1 -2
  109. package/esm/index.css +28 -28
  110. package/esm/index.module.css.js +1 -1
  111. package/esm/index.module.css.js.map +1 -1
  112. package/index.css +28 -28
  113. package/index.module.css.js +1 -1
  114. package/index.module.css.js.map +1 -1
  115. package/modern/component.d.ts +33 -35
  116. package/modern/component.js.map +1 -1
  117. package/modern/components/addon/component.d.ts +1 -1
  118. package/modern/components/addon/index.css +12 -12
  119. package/modern/components/addon/index.module.css.js +1 -1
  120. package/modern/components/amount/component.d.ts +1 -1
  121. package/modern/components/amount/component.js.map +1 -1
  122. package/modern/components/amount/index.css +3 -3
  123. package/modern/components/amount/index.module.css.js +1 -1
  124. package/modern/components/amount/index.module.css.js.map +1 -1
  125. package/modern/components/amount-title/component.d.ts +1 -1
  126. package/modern/components/amount-title/component.js.map +1 -1
  127. package/modern/components/amount-title/index.css +13 -13
  128. package/modern/components/amount-title/index.module.css.js +1 -1
  129. package/modern/components/amount-title/index.module.css.js.map +1 -1
  130. package/modern/components/category/component.d.ts +1 -1
  131. package/modern/components/category/index.css +4 -4
  132. package/modern/components/category/index.module.css.js +1 -1
  133. package/modern/components/category/index.module.css.js.map +1 -1
  134. package/modern/components/content/component.d.ts +1 -1
  135. package/modern/components/content/index.css +2 -2
  136. package/modern/components/content/index.module.css.js +1 -1
  137. package/modern/components/content/index.module.css.js.map +1 -1
  138. package/modern/components/footer/component.d.ts +1 -1
  139. package/modern/components/footer/index.css +3 -3
  140. package/modern/components/footer/index.module.css.js +1 -1
  141. package/modern/components/footer/index.module.css.js.map +1 -1
  142. package/modern/components/footer-button/component.d.ts +2 -2
  143. package/modern/components/footer-button/index.css +1 -1
  144. package/modern/components/footer-button/index.module.css.js +1 -1
  145. package/modern/components/footer-button/index.module.css.js.map +1 -1
  146. package/modern/components/footer-text/component.d.ts +1 -1
  147. package/modern/components/graphics/component.d.ts +1 -1
  148. package/modern/components/graphics/index.css +19 -19
  149. package/modern/components/graphics/index.module.css.js +1 -1
  150. package/modern/components/main/component.d.ts +1 -1
  151. package/modern/components/main/index.css +6 -6
  152. package/modern/components/main/index.module.css.js +1 -1
  153. package/modern/components/text/component.d.ts +1 -1
  154. package/modern/components/text/index.css +6 -6
  155. package/modern/components/text/index.module.css.js +1 -1
  156. package/modern/components/text/index.module.css.js.map +1 -1
  157. package/modern/components/types.d.ts +12 -12
  158. package/modern/components/typesProps.d.ts +1 -1
  159. package/modern/context.d.ts +1 -2
  160. package/modern/index.css +28 -28
  161. package/modern/index.module.css.js +1 -1
  162. package/modern/index.module.css.js.map +1 -1
  163. package/moderncssm/component.d.ts +33 -35
  164. package/moderncssm/component.js.map +1 -1
  165. package/moderncssm/components/addon/component.d.ts +1 -1
  166. package/moderncssm/components/amount/component.d.ts +1 -1
  167. package/moderncssm/components/amount/component.js.map +1 -1
  168. package/moderncssm/components/amount-title/component.d.ts +1 -1
  169. package/moderncssm/components/amount-title/component.js.map +1 -1
  170. package/moderncssm/components/category/component.d.ts +1 -1
  171. package/moderncssm/components/content/component.d.ts +1 -1
  172. package/moderncssm/components/footer/component.d.ts +1 -1
  173. package/moderncssm/components/footer-button/component.d.ts +2 -2
  174. package/moderncssm/components/footer-text/component.d.ts +1 -1
  175. package/moderncssm/components/graphics/component.d.ts +1 -1
  176. package/moderncssm/components/main/component.d.ts +1 -1
  177. package/moderncssm/components/text/component.d.ts +1 -1
  178. package/moderncssm/components/types.d.ts +12 -12
  179. package/moderncssm/components/typesProps.d.ts +1 -1
  180. package/moderncssm/context.d.ts +1 -2
  181. package/package.json +7 -7
  182. package/src/components/amount/index.module.css +1 -1
  183. package/src/components/amount-title/index.module.css +1 -1
  184. package/src/components/category/index.module.css +1 -1
  185. package/src/components/content/index.module.css +1 -1
  186. package/src/components/footer/index.module.css +1 -1
  187. package/src/components/footer-button/index.module.css +1 -1
  188. package/src/components/text/index.module.css +1 -1
  189. package/src/index.module.css +1 -1
  190. package/src/vars.css +1 -1
@@ -1,3 +1,3 @@
1
- .pure-cell__component_1q7wq {
1
+ .pure-cell__component_8u89v {
2
2
  justify-self: start;
3
3
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"component":"pure-cell__component_1q7wq"};
5
+ var styles = {"component":"pure-cell__component_8u89v"};
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/footer-button/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-index.css';\n\n.component {\n justify-self: start;\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,4BAA4B,CAAC;;;;"}
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;;;;"}
@@ -1,6 +1,6 @@
1
1
  import React, { type ReactNode } from 'react';
2
2
  import { type Color } from '@alfalab/core-components-typography';
3
- export declare type FooterTextProps = {
3
+ export type FooterTextProps = {
4
4
  /**
5
5
  * Цвет текста
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type GraphicsElement } from '../types';
3
- export declare type Props = {
3
+ export type Props = {
4
4
  /**
5
5
  * Компоненты
6
6
  */
@@ -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-cell__component_17y80 {
21
+ .pure-cell__component_7yzq4 {
22
22
  display: inline-flex;
23
23
  flex-basis: auto;
24
24
  }
25
- .pure-cell__top_17y80 {
25
+ .pure-cell__top_7yzq4 {
26
26
  align-self: flex-start;
27
27
  }
28
- .pure-cell__center_17y80 {
28
+ .pure-cell__center_7yzq4 {
29
29
  align-self: center;
30
30
  }
31
- .pure-cell__bottom_17y80 {
31
+ .pure-cell__bottom_7yzq4 {
32
32
  align-self: flex-end;
33
33
  }
34
- .pure-cell__horizontal_17y80.pure-cell__none_17y80:not(:last-child) {
34
+ .pure-cell__horizontal_7yzq4.pure-cell__none_7yzq4:not(:last-child) {
35
35
  margin-right: var(--gap-0);
36
36
  }
37
- .pure-cell__horizontal_17y80.pure-cell__max_17y80:not(:last-child) {
37
+ .pure-cell__horizontal_7yzq4.pure-cell__max_7yzq4:not(:last-child) {
38
38
  margin-right: var(--gap-24);
39
39
  }
40
- .pure-cell__horizontal_17y80.pure-cell__airy_17y80:not(:last-child) {
40
+ .pure-cell__horizontal_7yzq4.pure-cell__airy_7yzq4:not(:last-child) {
41
41
  margin-right: var(--gap-16);
42
42
  }
43
- .pure-cell__horizontal_17y80.pure-cell__default_17y80:not(:last-child) {
43
+ .pure-cell__horizontal_7yzq4.pure-cell__default_7yzq4:not(:last-child) {
44
44
  margin-right: var(--gap-12);
45
45
  }
46
- .pure-cell__horizontal_17y80.pure-cell__compact_17y80:not(:last-child) {
46
+ .pure-cell__horizontal_7yzq4.pure-cell__compact_7yzq4:not(:last-child) {
47
47
  margin-right: var(--gap-8);
48
48
  }
49
- .pure-cell__horizontal_17y80.pure-cell__tiny_17y80:not(:last-child) {
49
+ .pure-cell__horizontal_7yzq4.pure-cell__tiny_7yzq4:not(:last-child) {
50
50
  margin-right: var(--gap-4);
51
51
  }
52
- .pure-cell__vertical_17y80.pure-cell__none_17y80:not(:last-child) {
52
+ .pure-cell__vertical_7yzq4.pure-cell__none_7yzq4:not(:last-child) {
53
53
  margin-bottom: var(--gap-0);
54
54
  }
55
- .pure-cell__vertical_17y80.pure-cell__max_17y80:not(:last-child) {
55
+ .pure-cell__vertical_7yzq4.pure-cell__max_7yzq4:not(:last-child) {
56
56
  margin-bottom: var(--gap-24);
57
57
  }
58
- .pure-cell__vertical_17y80.pure-cell__airy_17y80:not(:last-child) {
58
+ .pure-cell__vertical_7yzq4.pure-cell__airy_7yzq4:not(:last-child) {
59
59
  margin-bottom: var(--gap-16);
60
60
  }
61
- .pure-cell__vertical_17y80.pure-cell__default_17y80:not(:last-child) {
61
+ .pure-cell__vertical_7yzq4.pure-cell__default_7yzq4:not(:last-child) {
62
62
  margin-bottom: var(--gap-12);
63
63
  }
64
- .pure-cell__vertical_17y80.pure-cell__compact_17y80:not(:last-child) {
64
+ .pure-cell__vertical_7yzq4.pure-cell__compact_7yzq4:not(:last-child) {
65
65
  margin-bottom: var(--gap-8);
66
66
  }
67
- .pure-cell__vertical_17y80.pure-cell__tiny_17y80:not(:last-child) {
67
+ .pure-cell__vertical_7yzq4.pure-cell__tiny_7yzq4:not(:last-child) {
68
68
  margin-bottom: var(--gap-4);
69
69
  }
70
- .pure-cell__button_17y80 {
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-cell__button_17y80:hover {
93
+ .pure-cell__button_7yzq4:hover {
94
94
  opacity: var(--pure-cell-clickable-area-hover-opacity);
95
95
  }
96
- .pure-cell__button_17y80:active {
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-cell__component_17y80","top":"pure-cell__top_17y80","center":"pure-cell__center_17y80","bottom":"pure-cell__bottom_17y80","horizontal":"pure-cell__horizontal_17y80","none":"pure-cell__none_17y80","max":"pure-cell__max_17y80","airy":"pure-cell__airy_17y80","default":"pure-cell__default_17y80","compact":"pure-cell__compact_17y80","tiny":"pure-cell__tiny_17y80","vertical":"pure-cell__vertical_17y80","button":"pure-cell__button_17y80"};
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
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type MainElement } from '../types';
3
- declare type Props = {
3
+ type Props = {
4
4
  /**
5
5
  * Компоненты
6
6
  */
@@ -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-cell__component_1hw7p {
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-cell__component_1hw7p.pure-cell__vertical_1hw7p {
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-cell__component_1hw7p.pure-cell__reverse_1hw7p {
25
+ .pure-cell__component_1704d.pure-cell__reverse_1704d {
26
26
  flex-direction: column-reverse;
27
27
  }
28
- .pure-cell__component_1hw7p.pure-cell__button_1hw7p {
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-cell__component_1hw7p.pure-cell__button_1hw7p:hover {
51
+ .pure-cell__component_1704d.pure-cell__button_1704d:hover {
52
52
  opacity: var(--pure-cell-clickable-area-hover-opacity);
53
53
  }
54
- .pure-cell__component_1hw7p.pure-cell__button_1hw7p:active {
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-cell__component_1hw7p","vertical":"pure-cell__vertical_1hw7p","reverse":"pure-cell__reverse_1hw7p","button":"pure-cell__button_1hw7p"};
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
@@ -1,6 +1,6 @@
1
1
  import React, { type ReactNode } from 'react';
2
2
  import { type Color } from '@alfalab/core-components-typography';
3
- declare type Props = {
3
+ type Props = {
4
4
  /**
5
5
  * Контент
6
6
  */
@@ -5,23 +5,23 @@
5
5
  --gap-2: var(--gap-3xs);
6
6
  --gap-16: var(--gap-m);
7
7
  }
8
- .pure-cell__horizontal_1uj9s {
8
+ .pure-cell__horizontal_t0f50 {
9
9
  padding: var(--gap-2) var(--gap-0);
10
10
  }
11
- .pure-cell__rowLimit1_1uj9s {
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-cell__rowLimit2_1uj9s {
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-cell__component_1uj9s {
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-cell__component_1uj9s .pure-cell__vertical_1uj9s {
32
+ .pure-cell__component_t0f50 .pure-cell__vertical_t0f50 {
33
33
  justify-content: center;
34
34
  }
35
- .pure-cell__title_1uj9s + .pure-cell__value_1uj9s {
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-cell__horizontal_1uj9s","rowLimit1":"pure-cell__rowLimit1_1uj9s","rowLimit2":"pure-cell__rowLimit2_1uj9s","component":"pure-cell__component_1uj9s","vertical":"pure-cell__vertical_1uj9s","title":"pure-cell__title_1uj9s","value":"pure-cell__value_1uj9s"};
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/no-typography-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;;;;"}
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;;;;"}
@@ -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
- declare type TextElement = ReactElement<typeof Text>;
10
- export declare type GraphicsElement = ReactElement<typeof Graphics> | boolean | null;
11
- declare type AmountElement = ReactElement<typeof Amount>;
12
- declare type AmountTitleElement = ReactElement<typeof AmountTitle>;
13
- export declare type CommentElement = ReactElement<typeof Comment>;
14
- declare type FooterButtonElement = ReactElement<typeof FooterButton>;
15
- declare type FooterTitleElement = ReactElement<typeof FooterText>;
16
- export declare type FooterElement = Array<ReactElement<FooterButtonElement> | FooterTitleElement | boolean | null> | CommentElement | boolean | null;
17
- export declare type MainElement = Array<undefined | '' | boolean | null | TextElement | AmountElement | AmountTitleElement> | (TextElement | AmountElement | AmountTitleElement | boolean | null);
18
- export declare type ContentElement = Array<MainElement | AddonElement | FooterElement> | MainElement;
19
- export declare type AddonElement = Array<TextElement | ReactNode> | TextElement | ReactNode;
20
- export declare type PureCellElement = Array<GraphicsElement | ContentElement> | ContentElement;
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 {};
@@ -1,6 +1,6 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import { type CurrencyCodes } from '@alfalab/data';
3
- export declare type AmountProps = {
3
+ export type AmountProps = {
4
4
  /**
5
5
  * Денежное значение в минорных единицах
6
6
  */
package/context.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- export declare type PureCellContextValue = {
1
+ export type PureCellContextValue = {
3
2
  /** Направление */
4
3
  direction?: 'horizontal' | 'vertical';
5
4
  dataTestId?: string;
@@ -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
- declare type BasePureCellProps = {
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
- declare type AnchorPureCellProps = BasePureCellProps & AnchorHTMLAttributes<HTMLAnchorElement>;
60
- declare type ButtonPureCellProps = BasePureCellProps & ButtonHTMLAttributes<HTMLButtonElement>;
61
- declare type ElementPureCellProps = BasePureCellProps & HTMLAttributes<HTMLElement>;
62
- export declare type PureCellProps = Partial<AnchorPureCellProps | ButtonPureCellProps | ElementPureCellProps>;
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 | undefined;
74
- className?: string | undefined;
75
- dataTestId?: string | undefined;
76
- onClick?: (() => void) | undefined;
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 | undefined;
81
+ dataTestId?: string;
82
82
  }>;
83
83
  Text: React.FC<{
84
84
  children?: React.ReactNode;
85
- rowLimit?: 1 | 2 | undefined;
86
- view?: "component-primary" | "primary-small" | "primary-large" | "primary-medium" | "secondary-large" | "component-secondary" | undefined;
87
- titleWeight?: "bold" | "regular" | undefined;
88
- titleColor: "tertiary" | "disabled" | "accent" | "primary" | "attention" | "positive" | "secondary" | "tertiary-inverted" | "primary-inverted" | "secondary-inverted" | "link" | "negative" | "static-primary-light" | "static-secondary-light" | "static-tertiary-light" | "static-primary-dark" | "static-secondary-dark" | "static-tertiary-dark" | "static-accent" | "static-positive";
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?: "tertiary" | "disabled" | "accent" | "primary" | "attention" | "positive" | "secondary" | "tertiary-inverted" | "primary-inverted" | "secondary-inverted" | "link" | "negative" | "static-primary-light" | "static-secondary-light" | "static-tertiary-light" | "static-primary-dark" | "static-secondary-dark" | "static-tertiary-dark" | "static-accent" | "static-positive" | undefined;
91
- dataTestId?: string | undefined; /**
92
- * Направление
93
- */
90
+ valueColor?: import("@alfalab/core-components-typography").Color;
91
+ dataTestId?: string;
94
92
  }>;
95
93
  Amount: React.FC<{
96
- weight?: "bold" | "normal" | undefined;
97
- textView?: "component-primary" | "primary-small" | undefined;
98
- color?: "tertiary" | "disabled" | "accent" | "primary" | "attention" | "positive" | "secondary" | "tertiary-inverted" | "primary-inverted" | "secondary-inverted" | "link" | "negative" | "static-primary-light" | "static-secondary-light" | "static-tertiary-light" | "static-primary-dark" | "static-secondary-dark" | "static-tertiary-dark" | "static-accent" | "static-positive" | undefined;
99
- hidden?: boolean | undefined;
100
- dataTestId?: string | undefined;
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 | undefined;
104
- hidden?: boolean | undefined;
105
- dataTestId?: string | undefined;
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?: "center" | "top" | "bottom" | "auto" | undefined;
109
- addonPadding?: "default" | "none" | undefined;
106
+ verticalAlign?: "auto" | "top" | "center" | "bottom";
107
+ addonPadding?: "default" | "none";
110
108
  children: import("./components/types").AddonElement;
111
- dataTestId?: string | undefined;
112
- onClick?: (() => void) | undefined;
109
+ dataTestId?: string;
110
+ onClick?: () => void;
113
111
  }>;
114
112
  Footer: React.FC<{
115
113
  children: import("./components/types").FooterElement;
116
- footerPadding?: "default" | "none" | undefined;
117
- dataTestId?: string | undefined;
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 | undefined;
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 | undefined;
124
+ categoryPercent?: number;
127
125
  rightAddons?: React.ReactNode;
128
- dataTestId?: string | undefined;
126
+ dataTestId?: string;
129
127
  }>;
130
128
  };
131
129
  export { PureCell, PureCellComponent, Main, Graphics, Content, Text, Amount, AmountTitle, Addon, Footer, ExtraSubtitle, FooterButton, Comment, Category, };
@@ -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,GAA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EAAA,cAAA,EACtB,UAAU,EAAA,CAAA;AAExB,QAAAH,sBAAA,CAAA,aAAA,CAACI,uBAAe,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,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
+ {"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,iBAAi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G,EACR,QAAQ,EAAE,CAAC,EACX,SAAS,EAAEE,mBAAE,CAAC,UAAU,EAAE,SAAS,CAAC,EAAA,cAAA,EACtB,UAAU,EAAA,CAAA;AAExB,QAAAH,sBAAA,CAAA,aAAA,CAACI,uBAAe,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,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,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type AddonElement } from '../types';
3
- declare type Props = {
3
+ type Props = {
4
4
  /**
5
5
  * Вертикальное выравнивание
6
6
  */
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { type Color } from '@alfalab/core-components-typography/cssm';
3
3
  import { type AmountProps as AmountType } from '../typesProps';
4
- declare type Props = {
4
+ type Props = {
5
5
  /**
6
6
  * Начертание шрифта денежного значения
7
7
  */
@@ -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;AAEnD,IAAA,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;AAEb;AAED,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
+ {"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
- declare type Props = {
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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,CAAC,UAAU,IAAI,eAAe,CAAC,UAAU,EAAE,cAAc,CAAC,EACnF,SAAS,EAAEH,mBAAE,CAACC,uBAAM,CAAC,SAAS,EAAE,mBAAmB,aAAnB,mBAAmB,KAAA,MAAA,GAAA,MAAA,GAAnB,mBAAmB,CAAE,SAAS,CAAC,EAAA,CAAA;AAE/D,QAAAF,sBAAA,CAAA,aAAA,CAACK,aAAU,EAAAN,cAAA,CAAA,EACP,QAAQ,EAAE,QAAQ,IAAI,UAAU,EAChC,SAAS,EAAE,SAAS,EACpB,UAAU,EAAEK,oBAAa,CACrB,UAAU,IAAI,eAAe,CAAC,UAAU,EACxC,mBAAmB,CACtB,EAAA,EACG,SAAS,EAAA,EACb,IAAI,EAAC,MAAM,EACb,CAAA,CAAA,CACsB;AAEpC;;;;"}
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;IAEjD,IAAI,MAAM,EAAE;AACR,QAAA,QACIC,sBAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAEC,mBAAE,CAACC,uBAAM,CAAC,aAAa,EAAEA,uBAAM,CAAC,gBAAiB,CAAA,MAAA,CAAA,UAAU,CAAC,IAAI,CAAE,CAAC,CAAC,EAAA;YAChFF,sBAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAEC,mBAAE,CAACC,uBAAM,CAAC,MAAM,EAAEA,uBAAM,CAAC,iBAAU,UAAU,CAAC,IAAI,CAAE,CAAC,CAAC,EAAI,CAAA,CACxE;;AAId,IAAA,QACIF,sBAAA,CAAA,aAAA,CAACG,8BAAyB,EAAAJ,cAAA,CAAA,EAAA,EAClB,UAAU,EACd,EAAA,UAAU,EAAEK,oBAAa,CAAC,UAAU,IAAI,eAAe,CAAC,UAAU,EAAE,cAAc,CAAC,EACnF,SAAS,EAAEH,mBAAE,CAACC,uBAAM,CAAC,SAAS,EAAE,mBAAmB,aAAnB,mBAAmB,KAAA,MAAA,GAAA,MAAA,GAAnB,mBAAmB,CAAE,SAAS,CAAC,EAAA,CAAA;AAE/D,QAAAF,sBAAA,CAAA,aAAA,CAACK,aAAU,EAAAN,cAAA,CAAA,EACP,QAAQ,EAAE,QAAQ,IAAI,UAAU,EAChC,SAAS,EAAE,SAAS,EACpB,UAAU,EAAEK,oBAAa,CACrB,UAAU,IAAI,eAAe,CAAC,UAAU,EACxC,mBAAmB,CACtB,EAAA,EACG,SAAS,EAAA,EACb,IAAI,EAAC,MAAM,EACb,CAAA,CAAA,CACsB;AAEpC;;;;"}
@@ -1,5 +1,5 @@
1
1
  import React, { type ReactNode } from 'react';
2
- declare type Props = {
2
+ type Props = {
3
3
  /**
4
4
  * Наименование категории
5
5
  */
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type ContentElement } from '../types';
3
- declare type Props = {
3
+ type Props = {
4
4
  /**
5
5
  * Компоненты
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type FooterElement } from '../types';
3
- declare type Props = {
3
+ type Props = {
4
4
  /**
5
5
  * Компоненты
6
6
  */
@@ -1,12 +1,12 @@
1
1
  import React, { type AnchorHTMLAttributes, type ButtonHTMLAttributes } from 'react';
2
2
  import { type ButtonProps } from '@alfalab/core-components-button/cssm';
3
- declare type ComponentProps = Omit<ButtonProps, 'dataTestId'> & {
3
+ type ComponentProps = Omit<ButtonProps, 'dataTestId'> & {
4
4
  /**
5
5
  * Идентификатор для систем автоматизированного тестирования.
6
6
  * Используется модификатор -button
7
7
  */
8
8
  dataTestId?: string;
9
9
  };
10
- declare type FooterButtonProps = ComponentProps & Partial<AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>>;
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 {};