@alfalab/core-components-pure-cell 4.5.2 → 4.6.1

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 (273) hide show
  1. package/component-d0c38540.d.ts +211 -0
  2. package/component-d0c38540.js +200 -0
  3. package/{component-5a229016.d.ts → component-fd7196d2.d.ts} +1 -0
  4. package/component.js +3 -15
  5. package/components/addon/component.d.ts +0 -24
  6. package/components/addon/component.js +5 -15
  7. package/components/addon/index.css +11 -11
  8. package/components/addon/index.d.ts +1 -1
  9. package/components/addon/index.js +1 -4
  10. package/components/amount/component.d.ts +0 -25
  11. package/components/amount/component.js +8 -19
  12. package/components/amount/index.css +3 -3
  13. package/components/amount/index.d.ts +1 -1
  14. package/components/amount/index.js +2 -8
  15. package/components/amount-title/component.d.ts +0 -22
  16. package/components/amount-title/component.js +8 -20
  17. package/components/amount-title/index.css +4 -4
  18. package/components/amount-title/index.d.ts +1 -1
  19. package/components/amount-title/index.js +2 -8
  20. package/components/category/component.d.ts +0 -25
  21. package/components/category/component.js +5 -19
  22. package/components/category/index.css +6 -6
  23. package/components/category/index.d.ts +1 -1
  24. package/components/category/index.js +2 -5
  25. package/components/content/component.js +2 -17
  26. package/components/content/index.css +4 -4
  27. package/components/content/index.d.ts +1 -1
  28. package/components/content/index.js +2 -20
  29. package/components/footer/component.d.ts +0 -20
  30. package/components/footer/component.js +5 -15
  31. package/components/footer/index.css +5 -5
  32. package/components/footer/index.d.ts +1 -1
  33. package/components/footer/index.js +2 -5
  34. package/components/footer-button/component.d.ts +0 -14
  35. package/components/footer-button/component.js +6 -15
  36. package/components/footer-button/index.css +3 -3
  37. package/components/footer-button/index.d.ts +1 -1
  38. package/components/footer-button/index.js +2 -6
  39. package/components/footer-text/component.d.ts +0 -21
  40. package/components/footer-text/component.js +5 -11
  41. package/components/footer-text/index.d.ts +1 -1
  42. package/components/footer-text/index.js +2 -5
  43. package/components/graphics/component.d.ts +0 -20
  44. package/components/graphics/component.js +5 -15
  45. package/components/graphics/index.css +6 -6
  46. package/components/graphics/index.d.ts +1 -1
  47. package/components/graphics/index.js +2 -5
  48. package/components/main/component.js +2 -17
  49. package/components/main/index.css +5 -5
  50. package/components/main/index.d.ts +1 -1
  51. package/components/main/index.js +2 -20
  52. package/components/text/component.js +2 -16
  53. package/components/text/index.css +8 -8
  54. package/components/text/index.d.ts +1 -1
  55. package/components/text/index.js +2 -20
  56. package/cssm/component-4445c77d.d.ts +211 -0
  57. package/cssm/component-4445c77d.js +189 -0
  58. package/{modern/component-5a229016.d.ts → cssm/component-fd7196d2.d.ts} +1 -0
  59. package/cssm/component.js +3 -25
  60. package/cssm/components/addon/component.d.ts +0 -24
  61. package/cssm/components/addon/component.js +6 -14
  62. package/cssm/components/addon/index.d.ts +1 -1
  63. package/cssm/components/addon/index.js +1 -5
  64. package/cssm/components/addon/index.module.css +1 -1
  65. package/cssm/components/amount/component.d.ts +0 -25
  66. package/cssm/components/amount/component.js +9 -18
  67. package/cssm/components/amount/index.d.ts +1 -1
  68. package/cssm/components/amount/index.js +2 -9
  69. package/cssm/components/amount/index.module.css +1 -1
  70. package/cssm/components/amount-title/component.d.ts +0 -22
  71. package/cssm/components/amount-title/component.js +9 -19
  72. package/cssm/components/amount-title/index.d.ts +1 -1
  73. package/cssm/components/amount-title/index.js +2 -9
  74. package/cssm/components/amount-title/index.module.css +1 -1
  75. package/cssm/components/category/component.d.ts +0 -25
  76. package/cssm/components/category/component.js +6 -18
  77. package/cssm/components/category/index.d.ts +1 -1
  78. package/cssm/components/category/index.js +2 -6
  79. package/cssm/components/category/index.module.css +1 -1
  80. package/cssm/components/content/component.js +2 -27
  81. package/cssm/components/content/index.d.ts +1 -1
  82. package/cssm/components/content/index.js +2 -31
  83. package/cssm/components/content/index.module.css +1 -1
  84. package/cssm/components/footer/component.d.ts +0 -20
  85. package/cssm/components/footer/component.js +6 -14
  86. package/cssm/components/footer/index.d.ts +1 -1
  87. package/cssm/components/footer/index.js +2 -6
  88. package/cssm/components/footer/index.module.css +1 -1
  89. package/cssm/components/footer-button/component.d.ts +0 -14
  90. package/cssm/components/footer-button/component.js +7 -14
  91. package/cssm/components/footer-button/index.d.ts +1 -1
  92. package/cssm/components/footer-button/index.js +2 -7
  93. package/cssm/components/footer-button/index.module.css +1 -1
  94. package/cssm/components/footer-text/component.d.ts +0 -21
  95. package/cssm/components/footer-text/component.js +5 -11
  96. package/cssm/components/footer-text/index.d.ts +1 -1
  97. package/cssm/components/footer-text/index.js +2 -5
  98. package/cssm/components/graphics/component.d.ts +0 -20
  99. package/cssm/components/graphics/component.js +6 -14
  100. package/cssm/components/graphics/index.d.ts +1 -1
  101. package/cssm/components/graphics/index.js +2 -6
  102. package/cssm/components/graphics/index.module.css +1 -1
  103. package/cssm/components/main/component.js +2 -27
  104. package/cssm/components/main/index.d.ts +1 -1
  105. package/cssm/components/main/index.js +2 -31
  106. package/cssm/components/main/index.module.css +1 -1
  107. package/cssm/components/text/component.js +2 -26
  108. package/cssm/components/text/index.d.ts +1 -1
  109. package/cssm/components/text/index.js +2 -31
  110. package/cssm/components/text/index.module.css +1 -1
  111. package/cssm/index.d.ts +1 -1
  112. package/cssm/index.js +2 -31
  113. package/cssm/index.module.css +1 -1
  114. package/cssm/shared/index.d.ts +1 -0
  115. package/cssm/shared/index.js +9 -0
  116. package/cssm/utils.d.ts +20 -0
  117. package/cssm/utils.js +29 -0
  118. package/esm/component-38be6257.d.ts +211 -0
  119. package/esm/component-38be6257.js +180 -0
  120. package/esm/{component-5a229016.d.ts → component-fd7196d2.d.ts} +1 -0
  121. package/esm/component.js +1 -13
  122. package/esm/components/addon/component.d.ts +0 -24
  123. package/esm/components/addon/component.js +4 -13
  124. package/esm/components/addon/index.css +11 -11
  125. package/esm/components/addon/index.d.ts +1 -1
  126. package/esm/components/addon/index.js +1 -4
  127. package/esm/components/amount/component.d.ts +0 -25
  128. package/esm/components/amount/component.js +7 -17
  129. package/esm/components/amount/index.css +3 -3
  130. package/esm/components/amount/index.d.ts +1 -1
  131. package/esm/components/amount/index.js +1 -7
  132. package/esm/components/amount-title/component.d.ts +0 -22
  133. package/esm/components/amount-title/component.js +7 -18
  134. package/esm/components/amount-title/index.css +4 -4
  135. package/esm/components/amount-title/index.d.ts +1 -1
  136. package/esm/components/amount-title/index.js +1 -7
  137. package/esm/components/category/component.d.ts +0 -25
  138. package/esm/components/category/component.js +4 -18
  139. package/esm/components/category/index.css +6 -6
  140. package/esm/components/category/index.d.ts +1 -1
  141. package/esm/components/category/index.js +1 -4
  142. package/esm/components/content/component.js +1 -16
  143. package/esm/components/content/index.css +4 -4
  144. package/esm/components/content/index.d.ts +1 -1
  145. package/esm/components/content/index.js +1 -19
  146. package/esm/components/footer/component.d.ts +0 -20
  147. package/esm/components/footer/component.js +4 -13
  148. package/esm/components/footer/index.css +5 -5
  149. package/esm/components/footer/index.d.ts +1 -1
  150. package/esm/components/footer/index.js +1 -4
  151. package/esm/components/footer-button/component.d.ts +0 -14
  152. package/esm/components/footer-button/component.js +5 -14
  153. package/esm/components/footer-button/index.css +3 -3
  154. package/esm/components/footer-button/index.d.ts +1 -1
  155. package/esm/components/footer-button/index.js +1 -5
  156. package/esm/components/footer-text/component.d.ts +0 -21
  157. package/esm/components/footer-text/component.js +4 -10
  158. package/esm/components/footer-text/index.d.ts +1 -1
  159. package/esm/components/footer-text/index.js +1 -4
  160. package/esm/components/graphics/component.d.ts +0 -20
  161. package/esm/components/graphics/component.js +4 -13
  162. package/esm/components/graphics/index.css +6 -6
  163. package/esm/components/graphics/index.d.ts +1 -1
  164. package/esm/components/graphics/index.js +1 -4
  165. package/esm/components/main/component.js +1 -16
  166. package/esm/components/main/index.css +5 -5
  167. package/esm/components/main/index.d.ts +1 -1
  168. package/esm/components/main/index.js +1 -19
  169. package/esm/components/text/component.js +1 -15
  170. package/esm/components/text/index.css +8 -8
  171. package/esm/components/text/index.d.ts +1 -1
  172. package/esm/components/text/index.js +1 -19
  173. package/esm/index.css +22 -22
  174. package/esm/index.d.ts +1 -1
  175. package/esm/index.js +1 -19
  176. package/esm/shared/index.d.ts +1 -0
  177. package/esm/shared/index.js +1 -0
  178. package/esm/utils.d.ts +20 -0
  179. package/esm/utils.js +25 -0
  180. package/index.css +22 -22
  181. package/index.d.ts +1 -1
  182. package/index.js +2 -20
  183. package/modern/component-d22a8098.d.ts +211 -0
  184. package/modern/component-d22a8098.js +169 -0
  185. package/{cssm/component-5a229016.d.ts → modern/component-fd7196d2.d.ts} +1 -0
  186. package/modern/component.js +1 -13
  187. package/modern/components/addon/component.d.ts +0 -24
  188. package/modern/components/addon/component.js +4 -10
  189. package/modern/components/addon/index.css +11 -11
  190. package/modern/components/addon/index.d.ts +1 -1
  191. package/modern/components/addon/index.js +1 -4
  192. package/modern/components/amount/component.d.ts +0 -25
  193. package/modern/components/amount/component.js +6 -13
  194. package/modern/components/amount/index.css +3 -3
  195. package/modern/components/amount/index.d.ts +1 -1
  196. package/modern/components/amount/index.js +1 -6
  197. package/modern/components/amount-title/component.d.ts +0 -22
  198. package/modern/components/amount-title/component.js +6 -21
  199. package/modern/components/amount-title/index.css +4 -4
  200. package/modern/components/amount-title/index.d.ts +1 -1
  201. package/modern/components/amount-title/index.js +1 -6
  202. package/modern/components/category/component.d.ts +0 -25
  203. package/modern/components/category/component.js +4 -15
  204. package/modern/components/category/index.css +6 -6
  205. package/modern/components/category/index.d.ts +1 -1
  206. package/modern/components/category/index.js +1 -4
  207. package/modern/components/content/component.js +1 -15
  208. package/modern/components/content/index.css +4 -4
  209. package/modern/components/content/index.d.ts +1 -1
  210. package/modern/components/content/index.js +1 -18
  211. package/modern/components/footer/component.d.ts +0 -20
  212. package/modern/components/footer/component.js +4 -10
  213. package/modern/components/footer/index.css +5 -5
  214. package/modern/components/footer/index.d.ts +1 -1
  215. package/modern/components/footer/index.js +1 -4
  216. package/modern/components/footer-button/component.d.ts +0 -14
  217. package/modern/components/footer-button/component.js +4 -10
  218. package/modern/components/footer-button/index.css +3 -3
  219. package/modern/components/footer-button/index.d.ts +1 -1
  220. package/modern/components/footer-button/index.js +1 -4
  221. package/modern/components/footer-text/component.d.ts +0 -21
  222. package/modern/components/footer-text/component.js +4 -7
  223. package/modern/components/footer-text/index.d.ts +1 -1
  224. package/modern/components/footer-text/index.js +1 -4
  225. package/modern/components/graphics/component.d.ts +0 -20
  226. package/modern/components/graphics/component.js +4 -10
  227. package/modern/components/graphics/index.css +6 -6
  228. package/modern/components/graphics/index.d.ts +1 -1
  229. package/modern/components/graphics/index.js +1 -4
  230. package/modern/components/main/component.js +1 -15
  231. package/modern/components/main/index.css +5 -5
  232. package/modern/components/main/index.d.ts +1 -1
  233. package/modern/components/main/index.js +1 -18
  234. package/modern/components/text/component.js +1 -14
  235. package/modern/components/text/index.css +8 -8
  236. package/modern/components/text/index.d.ts +1 -1
  237. package/modern/components/text/index.js +1 -18
  238. package/modern/index.css +22 -22
  239. package/modern/index.d.ts +1 -1
  240. package/modern/index.js +1 -18
  241. package/modern/shared/index.d.ts +1 -0
  242. package/modern/shared/index.js +1 -0
  243. package/modern/utils.d.ts +20 -0
  244. package/modern/utils.js +25 -0
  245. package/package.json +4 -4
  246. package/shared/index.d.ts +1 -0
  247. package/shared/index.js +9 -0
  248. package/shared/package.json +3 -0
  249. package/src/component.tsx +4 -3
  250. package/src/components/addon/component.tsx +14 -9
  251. package/src/components/amount/component.tsx +21 -16
  252. package/src/components/amount-title/component.tsx +9 -3
  253. package/src/components/category/component.tsx +42 -27
  254. package/src/components/content/component.tsx +2 -2
  255. package/src/components/footer/component.tsx +14 -9
  256. package/src/components/footer-button/component.tsx +18 -12
  257. package/src/components/footer-text/component.tsx +16 -10
  258. package/src/components/graphics/component.tsx +14 -9
  259. package/src/components/main/component.tsx +2 -2
  260. package/src/components/text/component.tsx +3 -3
  261. package/src/shared/index.ts +1 -0
  262. package/src/shared/package.json +3 -0
  263. package/src/utils.ts +23 -0
  264. package/utils.d.ts +20 -0
  265. package/utils.js +29 -0
  266. package/component-6fbf202b.d.ts +0 -74
  267. package/component-6fbf202b.js +0 -121
  268. package/cssm/component-3ca297e4.d.ts +0 -74
  269. package/cssm/component-3ca297e4.js +0 -117
  270. package/esm/component-609a6e2f.d.ts +0 -74
  271. package/esm/component-609a6e2f.js +0 -109
  272. package/modern/component-f75dd263.d.ts +0 -74
  273. package/modern/component-f75dd263.js +0 -101
@@ -0,0 +1,211 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { ReactNode, AnchorHTMLAttributes, ButtonHTMLAttributes } from "react";
4
+ import { MainElement, GraphicsElement, FooterElement, ContentElement, AddonElement } from "./components/types";
5
+ import { Color, TitleProps } from "@alfalab/core-components-typography";
6
+ import { ButtonProps } from "@alfalab/core-components-button";
7
+ import { AmountProps as AmountType } from "./components/typesProps";
8
+ type Props = {
9
+ /**
10
+ * Компоненты
11
+ */
12
+ children: MainElement;
13
+ /**
14
+ * Позволяет изменить расположение блоков внутри main
15
+ */
16
+ isReverse?: boolean;
17
+ /**
18
+ * Дополнительный класс
19
+ */
20
+ className?: string;
21
+ /**
22
+ * Идентификатор для систем автоматизированного тестирования.
23
+ * Используется модификатор -main
24
+ */
25
+ dataTestId?: string;
26
+ };
27
+ declare const Main: React.FC<Props>;
28
+ type Props$0 = {
29
+ /**
30
+ * Компоненты
31
+ */
32
+ children: GraphicsElement;
33
+ /**
34
+ * Идентификатор для систем автоматизированного тестирования.
35
+ * Используется модификатор -graphics
36
+ */
37
+ dataTestId?: string;
38
+ /**
39
+ * Вертикальное выравнивание
40
+ */
41
+ verticalAlign?: "top" | "center" | "bottom";
42
+ };
43
+ declare const Graphics: React.FC<Props$0>;
44
+ type Props$1 = {
45
+ /**
46
+ * Цвет текста
47
+ */
48
+ color?: Color;
49
+ /**
50
+ * Идентификатор для систем автоматизированного тестирования.
51
+ * Используется модификатор -footer-title
52
+ */
53
+ dataTestId?: string;
54
+ /**
55
+ * Дочерние элементы.
56
+ */
57
+ children?: ReactNode;
58
+ };
59
+ declare const FooterText: React.FC<Props$1>;
60
+ type ComponentProps = Omit<ButtonProps, "dataTestId"> & {
61
+ /**
62
+ * Идентификатор для систем автоматизированного тестирования.
63
+ * Используется модификатор -button
64
+ */
65
+ dataTestId?: string;
66
+ };
67
+ type FooterButtonProps = ComponentProps & Partial<AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>>;
68
+ declare const FooterButton: React.ForwardRefExoticComponent<FooterButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
69
+ type Props$2 = {
70
+ /**
71
+ * Компоненты
72
+ */
73
+ children: FooterElement;
74
+ /**
75
+ * Вертикальные отступы
76
+ */
77
+ footerPadding?: "default" | "none";
78
+ /**
79
+ * Идентификатор для систем автоматизированного тестирования.
80
+ * Используется модификатор -footer
81
+ */
82
+ dataTestId?: string;
83
+ };
84
+ declare const Footer: React.FC<Props$2>;
85
+ type Props$3 = {
86
+ /**
87
+ * Компоненты
88
+ */
89
+ children: ContentElement;
90
+ /**
91
+ * Идентификатор для систем автоматизированного тестирования.
92
+ * Используется модификатор -content
93
+ */
94
+ dataTestId?: string;
95
+ };
96
+ declare const Content: React.FC<Props$3>;
97
+ type Props$4 = {
98
+ /**
99
+ * Наименование категории
100
+ */
101
+ categoryName: string;
102
+ /**
103
+ * Процент категории
104
+ */
105
+ categoryPercent?: number;
106
+ /**
107
+ * Слот справа
108
+ */
109
+ rightAddons?: ReactNode;
110
+ /**
111
+ * Идентификатор для систем автоматизированного тестирования.
112
+ * Для наименования категории используется модификатор -category-name,
113
+ * процент категории -category-percent, слота справа -category-right-addon
114
+ */
115
+ dataTestId?: string;
116
+ };
117
+ declare const Category: React.FC<Props$4>;
118
+ type Props$5 = {
119
+ /**
120
+ * Цвет денежного значения
121
+ * @deprecated Используйте titleProps.color
122
+ */
123
+ color?: Color;
124
+ /**
125
+ * Пропсы, которые будут прокинуты в компонент типографики
126
+ */
127
+ titleProps?: TitleProps;
128
+ /**
129
+ * Идентификатор для систем автоматизированного тестирования.
130
+ * Для typography используется модификатор -amount-title, для компонента Amount -core-amount-title
131
+ */
132
+ dataTestId?: string;
133
+ } & Omit<AmountType, "dataTestId">;
134
+ declare const AmountTitle: React.FC<Props$5>;
135
+ type Props$6 = {
136
+ /**
137
+ * Начертание шрифта денежного значения
138
+ */
139
+ weight?: "bold" | "normal";
140
+ /**
141
+ * Размер денежного значения
142
+ */
143
+ textView?: "component" | "primary-small";
144
+ /**
145
+ * Цвет денежного значения
146
+ */
147
+ color?: Color;
148
+ /**
149
+ * Идентификатор для систем автоматизированного тестирования.
150
+ * Для typography используется модификатор -amount-text, для компонента Amount -amount
151
+ */
152
+ dataTestId?: string;
153
+ } & Omit<AmountType, "dataTestId">;
154
+ declare const Amount: React.FC<Props$6>;
155
+ type Props$7 = {
156
+ /**
157
+ * Вертикальное выравнивание
158
+ */
159
+ verticalAlign?: "auto" | "top" | "center" | "bottom";
160
+ /**
161
+ * Горизонтальные отступы
162
+ */
163
+ addonPadding?: "default" | "none";
164
+ /**
165
+ * Компоненты
166
+ */
167
+ children: AddonElement;
168
+ /**
169
+ * Идентификатор для систем автоматизированного тестирования.
170
+ * Используется модификатор -addon
171
+ */
172
+ dataTestId?: string;
173
+ };
174
+ declare const Addon: React.FC<Props$7>;
175
+ type Props$8 = {
176
+ /**
177
+ * Контент
178
+ */
179
+ children?: ReactNode;
180
+ /**
181
+ * Количество строк
182
+ */
183
+ rowLimit?: 1 | 2;
184
+ /**
185
+ * Размер текста
186
+ */
187
+ view?: 'primary-large' | 'primary-medium' | 'primary-small' | 'component' | 'component-primary';
188
+ /**
189
+ * Толщина title
190
+ */
191
+ titleWeight?: 'regular' | 'bold';
192
+ /**
193
+ * Цвет title
194
+ */
195
+ titleColor: Color;
196
+ /**
197
+ * Value ячейки
198
+ */
199
+ value?: ReactNode;
200
+ /**
201
+ * Цвет value
202
+ */
203
+ valueColor?: Color;
204
+ /**
205
+ * Идентификатор для систем автоматизированного тестирования.
206
+ * Для контента используется модификатор -text_content, для value ячейки -text_value
207
+ */
208
+ dataTestId?: string;
209
+ };
210
+ declare const Text: React.FC<Props$8>;
211
+ export { Main, Props$0 as Props, Graphics, FooterText, FooterButton, Footer, Content, Category, AmountTitle, Amount, Addon, Text };
@@ -0,0 +1,169 @@
1
+ import React, { useContext, forwardRef, useRef } from 'react';
2
+ import mergeRefs from 'react-merge-refs';
3
+ import cn from 'classnames';
4
+ import { Comment } from '@alfalab/core-components-comment/modern';
5
+ import { useFocus } from '@alfalab/hooks';
6
+ import { getDataTestId } from '@alfalab/core-components-shared/modern';
7
+ import { Amount as Amount$1 } from '@alfalab/core-components-amount/modern';
8
+ import { Typography } from '@alfalab/core-components-typography/modern';
9
+ import { Button } from '@alfalab/core-components-button/modern';
10
+
11
+ const styles$a = {"component":"pure-cell__component_1kc6p","none":"pure-cell__none_1kc6p","default":"pure-cell__default_1kc6p","addonPadding":"pure-cell__addonPadding_1kc6p","auto":"pure-cell__auto_1kc6p","top":"pure-cell__top_1kc6p","center":"pure-cell__center_1kc6p","bottom":"pure-cell__bottom_1kc6p"};
12
+ require('./components/addon/index.css')
13
+
14
+ const Addon = ({ children, verticalAlign = 'top', addonPadding = 'default', dataTestId, }) => {
15
+ const pureCellContext = useContext(PureCellContext);
16
+ return (React.createElement("section", { className: cn(styles$a.component, styles$a[addonPadding], styles$a[verticalAlign]), "data-test-id": getDataTestId(dataTestId || pureCellContext.dataTestId, 'addon') }, children));
17
+ };
18
+
19
+ const styles$9 = {"component":"pure-cell__component_yb7zw"};
20
+ require('./components/amount/index.css')
21
+
22
+ const Amount = ({ weight = 'normal', textView = 'component', color = 'primary', minority, minorUnits = 100, dataTestId, ...restProps }) => {
23
+ const pureCellContext = useContext(PureCellContext);
24
+ return (React.createElement(Typography.Text, { view: textView, dataTestId: getDataTestId(dataTestId || pureCellContext.dataTestId, 'amount-text'), className: cn(styles$9.component), color: color },
25
+ React.createElement(Amount$1, { minority: minority || minorUnits, bold: weight === 'bold' ? 'full' : 'none', dataTestId: getDataTestId(dataTestId || pureCellContext.dataTestId, 'amount'), ...restProps })));
26
+ };
27
+
28
+ const styles$8 = {"component":"pure-cell__component_1eq6s","weight":"pure-cell__weight_1eq6s"};
29
+ require('./components/amount-title/index.css')
30
+
31
+ const AmountTitle = ({ minority, minorUnits = 100, className, color = 'primary', dataTestId, titleProps = {}, ...restProps }) => {
32
+ const pureCellContext = useContext(PureCellContext);
33
+ const titleDefaultProps = {
34
+ tag: 'h4',
35
+ view: 'small',
36
+ color,
37
+ ...titleProps,
38
+ };
39
+ return (React.createElement(Typography.Title, { ...titleDefaultProps, dataTestId: getDataTestId(dataTestId || pureCellContext.dataTestId, 'amount-title'), className: cn(styles$8.component, titleProps.className) },
40
+ React.createElement(Amount$1, { minority: minority || minorUnits, className: cn(styles$8.weight, className), dataTestId: getDataTestId(dataTestId || pureCellContext.dataTestId, 'core-amount-title'), ...restProps, bold: 'none' })));
41
+ };
42
+
43
+ const styles$7 = {"component":"pure-cell__component_571uo","categoryName":"pure-cell__categoryName_571uo","categoryPercent":"pure-cell__categoryPercent_571uo","rightAddon":"pure-cell__rightAddon_571uo"};
44
+ require('./components/category/index.css')
45
+
46
+ const Category = ({ categoryName, categoryPercent, rightAddons, dataTestId, }) => {
47
+ const pureCellContext = useContext(PureCellContext);
48
+ return (React.createElement("div", { className: styles$7.component, "data-test-id": 'cell-pure-category' },
49
+ React.createElement(Typography.Text, { view: 'primary-small', color: 'secondary', dataTestId: getDataTestId(dataTestId || pureCellContext.dataTestId, 'category-name'), className: styles$7.categoryName }, categoryName),
50
+ categoryPercent !== undefined && (React.createElement(Typography.Text, { tag: 'div', view: 'primary-small', color: 'secondary', className: styles$7.categoryPercent, dataTestId: getDataTestId(dataTestId || pureCellContext.dataTestId, 'category-percent') },
51
+ categoryPercent,
52
+ "%")),
53
+ rightAddons !== undefined && (React.createElement("div", { className: styles$7.rightAddon, "data-test-id": getDataTestId(dataTestId || pureCellContext.dataTestId, 'category-right-addon') }, rightAddons))));
54
+ };
55
+
56
+ const styles$6 = {"component":"pure-cell__component_1i6ep","horizontal":"pure-cell__horizontal_1i6ep"};
57
+ require('./components/content/index.css')
58
+
59
+ const Content = ({ children, dataTestId }) => {
60
+ const { direction, dataTestId: contextDataTestId } = useContext(PureCellContext);
61
+ return (React.createElement("section", { className: cn(styles$6.component, { [styles$6.horizontal]: direction === 'horizontal' }), "data-test-id": getDataTestId(dataTestId || contextDataTestId, 'content') }, children));
62
+ };
63
+
64
+ const styles$5 = {"component":"pure-cell__component_1va8a","none":"pure-cell__none_1va8a","default":"pure-cell__default_1va8a"};
65
+ require('./components/footer/index.css')
66
+
67
+ const Footer = ({ children, footerPadding = 'default', dataTestId }) => {
68
+ const pureCellContext = useContext(PureCellContext);
69
+ return (React.createElement("footer", { className: cn(styles$5.component, styles$5[footerPadding]), "data-test-id": getDataTestId(dataTestId || pureCellContext.dataTestId, 'footer') }, children));
70
+ };
71
+
72
+ const styles$4 = {"component":"pure-cell__component_1bu2r"};
73
+ require('./components/footer-button/index.css')
74
+
75
+ const FooterButton = forwardRef(({ children, dataTestId, ...props }, ref) => {
76
+ const pureCellContext = useContext(PureCellContext);
77
+ return (React.createElement(Button, { ...props, size: 'xxs', dataTestId: getDataTestId(dataTestId || pureCellContext.dataTestId, 'button'), className: styles$4.component, ref: ref }, children));
78
+ });
79
+
80
+ const FooterText = ({ children, color = 'secondary', dataTestId }) => {
81
+ const pureCellContext = useContext(PureCellContext);
82
+ return (React.createElement(Typography.Text, { view: 'primary-small', color: color, "data-test-id": getDataTestId(dataTestId || pureCellContext.dataTestId, 'footer-title') }, children));
83
+ };
84
+
85
+ const styles$3 = {"component":"pure-cell__component_kbi6r","top":"pure-cell__top_kbi6r","center":"pure-cell__center_kbi6r","bottom":"pure-cell__bottom_kbi6r"};
86
+ require('./components/graphics/index.css')
87
+
88
+ const Graphics = ({ children, dataTestId, verticalAlign = 'top' }) => {
89
+ const pureCellContext = useContext(PureCellContext);
90
+ return (React.createElement("section", { className: cn(styles$3.component, styles$3[verticalAlign]), "data-test-id": getDataTestId(dataTestId || pureCellContext.dataTestId, 'graphics') }, children));
91
+ };
92
+
93
+ const styles$2 = {"component":"pure-cell__component_1x75o","vertical":"pure-cell__vertical_1x75o","reverse":"pure-cell__reverse_1x75o"};
94
+ require('./components/main/index.css')
95
+
96
+ const Main = ({ children, isReverse, className, dataTestId }) => {
97
+ const { direction = 'horizontal', dataTestId: contextDataTestId } = useContext(PureCellContext);
98
+ return (React.createElement("div", { className: cn(styles$2.component, styles$2[direction], {
99
+ [styles$2.reverse]: isReverse,
100
+ }, className), "data-test-id": getDataTestId(dataTestId || contextDataTestId, 'main') }, children));
101
+ };
102
+
103
+ const styles$1 = {"horizontal":"pure-cell__horizontal_6yvw2","rowLimit1":"pure-cell__rowLimit1_6yvw2","rowLimit2":"pure-cell__rowLimit2_6yvw2","component":"pure-cell__component_6yvw2","vertical":"pure-cell__vertical_6yvw2","title":"pure-cell__title_6yvw2","value":"pure-cell__value_6yvw2"};
104
+ require('./components/text/index.css')
105
+
106
+ const Text = ({ children, value, rowLimit, view = 'component-primary', titleWeight, titleColor, valueColor, dataTestId, }) => {
107
+ const { direction = 'horizontal', dataTestId: contextDataTestId } = useContext(PureCellContext);
108
+ const className = rowLimit && styles$1[`rowLimit${rowLimit}`];
109
+ return (React.createElement("div", { className: cn(styles$1.component, {
110
+ [styles$1.vertical]: direction !== 'horizontal',
111
+ }) },
112
+ React.createElement("div", { className: styles$1.title },
113
+ React.createElement(Typography.Text, { view: view, weight: titleWeight, tag: 'div', color: titleColor, className: className, "data-test-id": getDataTestId(dataTestId || contextDataTestId, 'text_content') }, children)),
114
+ value && (React.createElement("div", { className: styles$1.value },
115
+ React.createElement(Typography.Text, { view: view, tag: 'div', color: valueColor, className: className, "data-test-id": getDataTestId(dataTestId || contextDataTestId, 'text_value') }, value)))));
116
+ };
117
+
118
+ const styles = {"component":"pure-cell__component_9rya7","horizontal":"pure-cell__horizontal_9rya7","vertical":"pure-cell__vertical_9rya7","button":"pure-cell__button_9rya7","link":"pure-cell__link_9rya7","none":"pure-cell__none_9rya7","airy":"pure-cell__airy_9rya7","defaultPadding":"pure-cell__defaultPadding_9rya7","compact":"pure-cell__compact_9rya7","tiny":"pure-cell__tiny_9rya7","left":"pure-cell__left_9rya7","right":"pure-cell__right_9rya7","both":"pure-cell__both_9rya7","focused":"pure-cell__focused_9rya7"};
119
+ require('./index.css')
120
+
121
+ /* eslint-disable react/jsx-no-constructed-context-values */
122
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
123
+ const PureCellContext = React.createContext({});
124
+ const PureCellComponent = forwardRef(({ className, dataTestId, onClick, href, tag: Component = (href && 'a') || (onClick && 'button') || 'section', children, horizontalPadding = 'none', verticalPadding = 'none', direction = 'horizontal', ...restProps }, ref) => {
125
+ const cellRef = useRef(null);
126
+ const [focused] = useFocus(cellRef, 'keyboard');
127
+ const addClasses = {
128
+ [styles.component]: true,
129
+ [styles.focused]: focused,
130
+ [styles[direction]]: true,
131
+ [styles.defaultPadding]: verticalPadding === 'default',
132
+ [styles[verticalPadding]]: verticalPadding !== 'default',
133
+ [styles[horizontalPadding]]: true,
134
+ };
135
+ if (href) {
136
+ const { target } = restProps;
137
+ // Для совместимости с react-router-dom, меняем href на to
138
+ const hrefProps = { [typeof Component === 'string' ? 'href' : 'to']: href };
139
+ return (React.createElement(Component, { rel: target === '_blank' ? 'noreferrer noopener' : undefined, ...restProps, ...hrefProps, ref: mergeRefs([cellRef, ref]), className: cn(styles.link, addClasses, className), "data-test-id": dataTestId, onClick: onClick },
140
+ React.createElement(PureCellContext.Provider, { value: { direction, dataTestId } }, children)));
141
+ }
142
+ if (onClick) {
143
+ return (React.createElement(Component, { ...restProps, ref: mergeRefs([cellRef, ref]), className: cn(styles.button, addClasses, className), "data-test-id": dataTestId, onClick: onClick },
144
+ React.createElement(PureCellContext.Provider, { value: { direction, dataTestId } }, children)));
145
+ }
146
+ return (React.createElement(Component, { ...restProps, ref: ref, tabIndex: 0, className: cn(addClasses, className), "data-test-id": dataTestId },
147
+ React.createElement(PureCellContext.Provider, { value: { direction, dataTestId } }, children)));
148
+ });
149
+ /**
150
+ * Универсальный конструктор для сборки любой ячейки.
151
+ *
152
+ * [Макет](https://www.figma.com/file/KlFOLLkKO8rtvvQE3RXuhq/Click-Library?node-id=43525%3A240018)
153
+ */
154
+ const PureCell = Object.assign(PureCellComponent, {
155
+ Main,
156
+ Graphics,
157
+ Content,
158
+ Text,
159
+ Amount,
160
+ AmountTitle,
161
+ Addon,
162
+ Footer,
163
+ ExtraSubtitle: FooterText,
164
+ FooterButton,
165
+ Comment,
166
+ Category,
167
+ });
168
+
169
+ export { Addon as A, Category as C, Footer as F, Graphics as G, Main as M, PureCell as P, Text as T, Amount as a, AmountTitle as b, Content as c, FooterButton as d, FooterText as e, PureCellContext as f };
@@ -6,6 +6,7 @@ import { PureCellElement } from "./components/types";
6
6
  type PureCellContext = {
7
7
  /** Направление */
8
8
  direction?: 'horizontal' | 'vertical';
9
+ dataTestId?: string;
9
10
  };
10
11
  declare const PureCellContext: React.Context<PureCellContext>;
11
12
  type PureCellProps = {
@@ -3,16 +3,4 @@ import 'react-merge-refs';
3
3
  import 'classnames';
4
4
  import '@alfalab/core-components-comment/modern';
5
5
  import '@alfalab/hooks';
6
- import './components/addon/component.js';
7
- import './components/amount/component.js';
8
- import './components/amount-title/component.js';
9
- import './components/category/component.js';
10
- export { P as PureCell, a as PureCellContext } from './component-f75dd263.js';
11
- import './components/footer/component.js';
12
- import './components/footer-button/component.js';
13
- import './components/footer-text/component.js';
14
- import './components/graphics/component.js';
15
- import '@alfalab/core-components-shared/modern';
16
- import '@alfalab/core-components-amount/modern';
17
- import '@alfalab/core-components-typography/modern';
18
- import '@alfalab/core-components-button/modern';
6
+ export { P as PureCell, f as PureCellContext } from './component-d22a8098.js';
@@ -1,24 +0,0 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { AddonElement } from "../types";
4
- type Props = {
5
- /**
6
- * Вертикальное выравнивание
7
- */
8
- verticalAlign?: 'auto' | 'top' | 'center' | 'bottom';
9
- /**
10
- * Горизонтальные отступы
11
- */
12
- addonPadding?: 'default' | 'none';
13
- /**
14
- * Компоненты
15
- */
16
- children: AddonElement;
17
- /**
18
- * Идентификатор для систем автоматизированного тестирования.
19
- * Используется модификатор -addon
20
- */
21
- dataTestId?: string;
22
- };
23
- declare const Addon: React.FC<Props>;
24
- export { Addon };
@@ -1,10 +1,4 @@
1
- import React from 'react';
2
- import cn from 'classnames';
3
- import { getDataTestId } from '@alfalab/core-components-shared/modern';
4
-
5
- const styles = {"component":"pure-cell__component_1dy24","none":"pure-cell__none_1dy24","default":"pure-cell__default_1dy24","addonPadding":"pure-cell__addonPadding_1dy24","auto":"pure-cell__auto_1dy24","top":"pure-cell__top_1dy24","center":"pure-cell__center_1dy24","bottom":"pure-cell__bottom_1dy24"};
6
- require('./index.css')
7
-
8
- const Addon = ({ children, verticalAlign = 'top', addonPadding = 'default', dataTestId, }) => (React.createElement("section", { className: cn(styles.component, styles[addonPadding], styles[verticalAlign]), "data-test-id": getDataTestId(dataTestId, 'addon') }, children));
9
-
10
- export { Addon };
1
+ import 'react';
2
+ import 'classnames';
3
+ import '@alfalab/core-components-shared/modern';
4
+ export { A as Addon } from '../../component-d22a8098.js';
@@ -1,5 +1,5 @@
1
- /* hash: 5u8yl */
2
- :root {
1
+ /* hash: 1kopx */
2
+ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
5
5
  } :root {
@@ -15,24 +15,24 @@
15
15
  --gap-m: 16px;
16
16
  } :root {
17
17
  } :root {
18
- } .pure-cell__component_1dy24 {
18
+ } .pure-cell__component_1kc6p {
19
19
  display: flex;
20
20
  flex-direction: column;
21
21
  align-items: flex-end
22
- } .pure-cell__component_1dy24 > * {
22
+ } .pure-cell__component_1kc6p > * {
23
23
  justify-content: flex-end;
24
- } .pure-cell__component_1dy24.pure-cell__none_1dy24 {
24
+ } .pure-cell__component_1kc6p.pure-cell__none_1kc6p {
25
25
  padding-left: 0;
26
- } .pure-cell__component_1dy24.pure-cell__default_1dy24 {
26
+ } .pure-cell__component_1kc6p.pure-cell__default_1kc6p {
27
27
  padding-left: var(--gap-m);
28
- } .pure-cell__component_1dy24.pure-cell__addonPadding_1dy24 {
28
+ } .pure-cell__component_1kc6p.pure-cell__addonPadding_1kc6p {
29
29
  padding-left: var(--gap-m);
30
- } .pure-cell__component_1dy24.pure-cell__auto_1dy24 {
30
+ } .pure-cell__component_1kc6p.pure-cell__auto_1kc6p {
31
31
  align-self: auto;
32
- } .pure-cell__component_1dy24.pure-cell__top_1dy24 {
32
+ } .pure-cell__component_1kc6p.pure-cell__top_1kc6p {
33
33
  align-self: flex-start;
34
- } .pure-cell__component_1dy24.pure-cell__center_1dy24 {
34
+ } .pure-cell__component_1kc6p.pure-cell__center_1kc6p {
35
35
  align-self: center;
36
- } .pure-cell__component_1dy24.pure-cell__bottom_1dy24 {
36
+ } .pure-cell__component_1kc6p.pure-cell__bottom_1kc6p {
37
37
  align-self: flex-end;
38
38
  }
@@ -1 +1 @@
1
- export * from "./component";
1
+ export * from "../../component-d22a8098";
@@ -1,4 +1 @@
1
- export { Addon } from './component.js';
2
- import 'react';
3
- import 'classnames';
4
- import '@alfalab/core-components-shared/modern';
1
+ export { A as Addon } from '../../component-d22a8098.js';
@@ -1,25 +0,0 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { Color } from "@alfalab/core-components-typography";
4
- import { AmountProps as AmountType } from "../typesProps";
5
- type Props = {
6
- /**
7
- * Начертание шрифта денежного значения
8
- */
9
- weight?: 'bold' | 'normal';
10
- /**
11
- * Размер денежного значения
12
- */
13
- textView?: 'component' | 'primary-small';
14
- /**
15
- * Цвет денежного значения
16
- */
17
- color?: Color;
18
- /**
19
- * Идентификатор для систем автоматизированного тестирования.
20
- * Для typography используется модификатор -amount-text, для компонента Amount -amount
21
- */
22
- dataTestId?: string;
23
- } & Omit<AmountType, 'dataTestId'>;
24
- declare const Amount: React.FC<Props>;
25
- export { Amount };
@@ -1,13 +1,6 @@
1
- import React from 'react';
2
- import cn from 'classnames';
3
- import { Amount as Amount$1 } from '@alfalab/core-components-amount/modern';
4
- import { getDataTestId } from '@alfalab/core-components-shared/modern';
5
- import { Typography } from '@alfalab/core-components-typography/modern';
6
-
7
- const styles = {"component":"pure-cell__component_1qggl"};
8
- require('./index.css')
9
-
10
- const Amount = ({ weight = 'normal', textView = 'component', color = 'primary', minority, minorUnits = 100, dataTestId, ...restProps }) => (React.createElement(Typography.Text, { view: textView, dataTestId: getDataTestId(dataTestId, 'amount-text'), className: cn(styles.component), color: color },
11
- React.createElement(Amount$1, { minority: minority || minorUnits, bold: weight === 'bold' ? 'full' : 'none', dataTestId: getDataTestId(dataTestId, 'amount'), ...restProps })));
12
-
13
- export { Amount };
1
+ import 'react';
2
+ import 'classnames';
3
+ import '@alfalab/core-components-amount/modern';
4
+ import '@alfalab/core-components-shared/modern';
5
+ import '@alfalab/core-components-typography/modern';
6
+ export { a as Amount } from '../../component-d22a8098.js';
@@ -1,5 +1,5 @@
1
- /* hash: uqrps */
2
- :root {
1
+ /* hash: f2shp */
2
+ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
5
5
  } :root {
@@ -15,7 +15,7 @@
15
15
  --gap-3xs: 2px;
16
16
  } :root {
17
17
  } :root {
18
- } .pure-cell__component_1qggl {
18
+ } .pure-cell__component_yb7zw {
19
19
  padding: var(--gap-3xs) 0;
20
20
  display: flex;
21
21
  }
@@ -1 +1 @@
1
- export * from "./component";
1
+ export * from "../../component-d22a8098";
@@ -1,6 +1 @@
1
- export { Amount } from './component.js';
2
- import 'react';
3
- import 'classnames';
4
- import '@alfalab/core-components-amount/modern';
5
- import '@alfalab/core-components-shared/modern';
6
- import '@alfalab/core-components-typography/modern';
1
+ export { a as Amount } from '../../component-d22a8098.js';
@@ -1,22 +0,0 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { Color, TitleProps } from "@alfalab/core-components-typography";
4
- import { AmountProps as AmountType } from "../typesProps";
5
- type Props = {
6
- /**
7
- * Цвет денежного значения
8
- * @deprecated Используйте titleProps.color
9
- */
10
- color?: Color;
11
- /**
12
- * Пропсы, которые будут прокинуты в компонент типографики
13
- */
14
- titleProps?: TitleProps;
15
- /**
16
- * Идентификатор для систем автоматизированного тестирования.
17
- * Для typography используется модификатор -amount-title, для компонента Amount -core-amount-title
18
- */
19
- dataTestId?: string;
20
- } & Omit<AmountType, 'dataTestId'>;
21
- declare const AmountTitle: React.FC<Props>;
22
- export { AmountTitle };
@@ -1,21 +1,6 @@
1
- import React from 'react';
2
- import cn from 'classnames';
3
- import { Amount } from '@alfalab/core-components-amount/modern';
4
- import { getDataTestId } from '@alfalab/core-components-shared/modern';
5
- import { Typography } from '@alfalab/core-components-typography/modern';
6
-
7
- const styles = {"component":"pure-cell__component_1bo36","weight":"pure-cell__weight_1bo36"};
8
- require('./index.css')
9
-
10
- const AmountTitle = ({ minority, minorUnits = 100, className, color = 'primary', dataTestId, titleProps = {}, ...restProps }) => {
11
- const titleDefaultProps = {
12
- tag: 'h4',
13
- view: 'small',
14
- color,
15
- ...titleProps,
16
- };
17
- return (React.createElement(Typography.Title, { ...titleDefaultProps, dataTestId: getDataTestId(dataTestId, 'amount-title'), className: cn(styles.component, titleProps.className) },
18
- React.createElement(Amount, { minority: minority || minorUnits, className: cn(styles.weight, className), dataTestId: getDataTestId(dataTestId, 'core-amount-title'), ...restProps, bold: 'none' })));
19
- };
20
-
21
- export { AmountTitle };
1
+ import 'react';
2
+ import 'classnames';
3
+ import '@alfalab/core-components-amount/modern';
4
+ import '@alfalab/core-components-shared/modern';
5
+ import '@alfalab/core-components-typography/modern';
6
+ export { b as AmountTitle } from '../../component-d22a8098.js';