@alfalab/core-components-pure-cell 5.0.1 → 5.0.2

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 (337) hide show
  1. package/component.d.ts +10 -16
  2. package/component.js +6 -6
  3. package/component.js.map +1 -1
  4. package/components/addon/component.d.ts +1 -1
  5. package/components/addon/component.js +2 -2
  6. package/components/addon/component.js.map +1 -1
  7. package/components/addon/index.css +17 -15
  8. package/components/addon/index.module.css.js +1 -1
  9. package/components/amount/component.d.ts +1 -1
  10. package/components/amount/component.js +2 -2
  11. package/components/amount/component.js.map +1 -1
  12. package/components/amount/index.css +3 -3
  13. package/components/amount/index.module.css.js +1 -1
  14. package/components/amount/index.module.css.js.map +1 -1
  15. package/components/amount-title/component.d.ts +1 -1
  16. package/components/amount-title/component.js +2 -2
  17. package/components/amount-title/component.js.map +1 -1
  18. package/components/amount-title/index.css +14 -14
  19. package/components/amount-title/index.module.css.js +1 -1
  20. package/components/amount-title/index.module.css.js.map +1 -1
  21. package/components/category/component.d.ts +1 -1
  22. package/components/category/component.js +2 -2
  23. package/components/category/component.js.map +1 -1
  24. package/components/category/index.css +4 -4
  25. package/components/category/index.module.css.js +1 -1
  26. package/components/category/index.module.css.js.map +1 -1
  27. package/components/content/component.d.ts +1 -1
  28. package/components/content/component.js +2 -2
  29. package/components/content/component.js.map +1 -1
  30. package/components/content/index.css +3 -3
  31. package/components/content/index.module.css.js +1 -1
  32. package/components/content/index.module.css.js.map +1 -1
  33. package/components/footer/component.d.ts +1 -1
  34. package/components/footer/component.js +2 -2
  35. package/components/footer/component.js.map +1 -1
  36. package/components/footer/index.css +4 -4
  37. package/components/footer/index.module.css.js +1 -1
  38. package/components/footer/index.module.css.js.map +1 -1
  39. package/components/footer-button/component.d.ts +2 -2
  40. package/components/footer-button/component.js +2 -2
  41. package/components/footer-button/component.js.map +1 -1
  42. package/components/footer-button/index.css +1 -1
  43. package/components/footer-button/index.module.css.js +1 -1
  44. package/components/footer-button/index.module.css.js.map +1 -1
  45. package/components/footer-text/component.d.ts +1 -1
  46. package/components/footer-text/component.js +2 -2
  47. package/components/footer-text/component.js.map +1 -1
  48. package/components/graphics/component.d.ts +1 -1
  49. package/components/graphics/component.js +2 -2
  50. package/components/graphics/component.js.map +1 -1
  51. package/components/graphics/index.css +23 -21
  52. package/components/graphics/index.module.css.js +1 -1
  53. package/components/main/component.d.ts +1 -1
  54. package/components/main/component.js +2 -2
  55. package/components/main/component.js.map +1 -1
  56. package/components/main/index.css +11 -9
  57. package/components/main/index.module.css.js +1 -1
  58. package/components/text/component.d.ts +1 -1
  59. package/components/text/component.js +2 -2
  60. package/components/text/component.js.map +1 -1
  61. package/components/text/index.css +6 -6
  62. package/components/text/index.module.css.js +1 -1
  63. package/components/text/index.module.css.js.map +1 -1
  64. package/components/types.d.ts +8 -8
  65. package/components/typesProps.d.ts +2 -2
  66. package/context.d.ts +9 -0
  67. package/context.js +11 -0
  68. package/context.js.map +1 -0
  69. package/cssm/component.d.ts +10 -16
  70. package/cssm/component.js +6 -6
  71. package/cssm/component.js.map +1 -1
  72. package/cssm/components/addon/component.d.ts +1 -1
  73. package/cssm/components/addon/component.js +2 -2
  74. package/cssm/components/addon/component.js.map +1 -1
  75. package/cssm/components/addon/index.module.css +5 -3
  76. package/cssm/components/amount/component.d.ts +1 -1
  77. package/cssm/components/amount/component.js +2 -2
  78. package/cssm/components/amount/component.js.map +1 -1
  79. package/cssm/components/amount-title/component.d.ts +1 -1
  80. package/cssm/components/amount-title/component.js +2 -2
  81. package/cssm/components/amount-title/component.js.map +1 -1
  82. package/cssm/components/category/component.d.ts +1 -1
  83. package/cssm/components/category/component.js +2 -2
  84. package/cssm/components/category/component.js.map +1 -1
  85. package/cssm/components/content/component.d.ts +1 -1
  86. package/cssm/components/content/component.js +2 -2
  87. package/cssm/components/content/component.js.map +1 -1
  88. package/cssm/components/content/index.module.css +1 -1
  89. package/cssm/components/footer/component.d.ts +1 -1
  90. package/cssm/components/footer/component.js +2 -2
  91. package/cssm/components/footer/component.js.map +1 -1
  92. package/cssm/components/footer/index.module.css +1 -1
  93. package/cssm/components/footer-button/component.d.ts +2 -2
  94. package/cssm/components/footer-button/component.js +2 -2
  95. package/cssm/components/footer-button/component.js.map +1 -1
  96. package/cssm/components/footer-text/component.d.ts +1 -1
  97. package/cssm/components/footer-text/component.js +2 -2
  98. package/cssm/components/footer-text/component.js.map +1 -1
  99. package/cssm/components/graphics/component.d.ts +1 -1
  100. package/cssm/components/graphics/component.js +2 -2
  101. package/cssm/components/graphics/component.js.map +1 -1
  102. package/cssm/components/graphics/index.module.css +16 -14
  103. package/cssm/components/main/component.d.ts +1 -1
  104. package/cssm/components/main/component.js +2 -2
  105. package/cssm/components/main/component.js.map +1 -1
  106. package/cssm/components/main/index.module.css +5 -3
  107. package/cssm/components/text/component.d.ts +1 -1
  108. package/cssm/components/text/component.js +2 -2
  109. package/cssm/components/text/component.js.map +1 -1
  110. package/cssm/components/types.d.ts +8 -8
  111. package/cssm/components/typesProps.d.ts +2 -2
  112. package/cssm/context.d.ts +9 -0
  113. package/cssm/context.js +11 -0
  114. package/cssm/context.js.map +1 -0
  115. package/cssm/index.module.css +6 -4
  116. package/esm/component.d.ts +10 -16
  117. package/esm/component.js +2 -2
  118. package/esm/component.js.map +1 -1
  119. package/esm/components/addon/component.d.ts +1 -1
  120. package/esm/components/addon/component.js +1 -1
  121. package/esm/components/addon/component.js.map +1 -1
  122. package/esm/components/addon/index.css +17 -15
  123. package/esm/components/addon/index.module.css.js +1 -1
  124. package/esm/components/amount/component.d.ts +1 -1
  125. package/esm/components/amount/component.js +1 -1
  126. package/esm/components/amount/component.js.map +1 -1
  127. package/esm/components/amount/index.css +3 -3
  128. package/esm/components/amount/index.module.css.js +1 -1
  129. package/esm/components/amount/index.module.css.js.map +1 -1
  130. package/esm/components/amount-title/component.d.ts +1 -1
  131. package/esm/components/amount-title/component.js +1 -1
  132. package/esm/components/amount-title/component.js.map +1 -1
  133. package/esm/components/amount-title/index.css +14 -14
  134. package/esm/components/amount-title/index.module.css.js +1 -1
  135. package/esm/components/amount-title/index.module.css.js.map +1 -1
  136. package/esm/components/category/component.d.ts +1 -1
  137. package/esm/components/category/component.js +1 -1
  138. package/esm/components/category/component.js.map +1 -1
  139. package/esm/components/category/index.css +4 -4
  140. package/esm/components/category/index.module.css.js +1 -1
  141. package/esm/components/category/index.module.css.js.map +1 -1
  142. package/esm/components/content/component.d.ts +1 -1
  143. package/esm/components/content/component.js +1 -1
  144. package/esm/components/content/component.js.map +1 -1
  145. package/esm/components/content/index.css +3 -3
  146. package/esm/components/content/index.module.css.js +1 -1
  147. package/esm/components/content/index.module.css.js.map +1 -1
  148. package/esm/components/footer/component.d.ts +1 -1
  149. package/esm/components/footer/component.js +1 -1
  150. package/esm/components/footer/component.js.map +1 -1
  151. package/esm/components/footer/index.css +4 -4
  152. package/esm/components/footer/index.module.css.js +1 -1
  153. package/esm/components/footer/index.module.css.js.map +1 -1
  154. package/esm/components/footer-button/component.d.ts +2 -2
  155. package/esm/components/footer-button/component.js +1 -1
  156. package/esm/components/footer-button/component.js.map +1 -1
  157. package/esm/components/footer-button/index.css +1 -1
  158. package/esm/components/footer-button/index.module.css.js +1 -1
  159. package/esm/components/footer-button/index.module.css.js.map +1 -1
  160. package/esm/components/footer-text/component.d.ts +1 -1
  161. package/esm/components/footer-text/component.js +1 -1
  162. package/esm/components/footer-text/component.js.map +1 -1
  163. package/esm/components/graphics/component.d.ts +1 -1
  164. package/esm/components/graphics/component.js +1 -1
  165. package/esm/components/graphics/component.js.map +1 -1
  166. package/esm/components/graphics/index.css +23 -21
  167. package/esm/components/graphics/index.module.css.js +1 -1
  168. package/esm/components/main/component.d.ts +1 -1
  169. package/esm/components/main/component.js +1 -1
  170. package/esm/components/main/component.js.map +1 -1
  171. package/esm/components/main/index.css +11 -9
  172. package/esm/components/main/index.module.css.js +1 -1
  173. package/esm/components/text/component.d.ts +1 -1
  174. package/esm/components/text/component.js +1 -1
  175. package/esm/components/text/component.js.map +1 -1
  176. package/esm/components/text/index.css +6 -6
  177. package/esm/components/text/index.module.css.js +1 -1
  178. package/esm/components/text/index.module.css.js.map +1 -1
  179. package/esm/components/types.d.ts +8 -8
  180. package/esm/components/typesProps.d.ts +2 -2
  181. package/esm/context.d.ts +9 -0
  182. package/esm/context.js +7 -0
  183. package/esm/context.js.map +1 -0
  184. package/esm/index.css +34 -32
  185. package/esm/index.module.css.js +1 -1
  186. package/esm/index.module.css.js.map +1 -1
  187. package/index.css +34 -32
  188. package/index.module.css.js +1 -1
  189. package/index.module.css.js.map +1 -1
  190. package/modern/component.d.ts +10 -16
  191. package/modern/component.js +2 -3
  192. package/modern/component.js.map +1 -1
  193. package/modern/components/addon/component.d.ts +1 -1
  194. package/modern/components/addon/component.js +1 -1
  195. package/modern/components/addon/component.js.map +1 -1
  196. package/modern/components/addon/index.css +17 -15
  197. package/modern/components/addon/index.module.css.js +1 -1
  198. package/modern/components/amount/component.d.ts +1 -1
  199. package/modern/components/amount/component.js +1 -1
  200. package/modern/components/amount/component.js.map +1 -1
  201. package/modern/components/amount/index.css +3 -3
  202. package/modern/components/amount/index.module.css.js +1 -1
  203. package/modern/components/amount/index.module.css.js.map +1 -1
  204. package/modern/components/amount-title/component.d.ts +1 -1
  205. package/modern/components/amount-title/component.js +1 -1
  206. package/modern/components/amount-title/component.js.map +1 -1
  207. package/modern/components/amount-title/index.css +14 -14
  208. package/modern/components/amount-title/index.module.css.js +1 -1
  209. package/modern/components/amount-title/index.module.css.js.map +1 -1
  210. package/modern/components/category/component.d.ts +1 -1
  211. package/modern/components/category/component.js +1 -1
  212. package/modern/components/category/component.js.map +1 -1
  213. package/modern/components/category/index.css +4 -4
  214. package/modern/components/category/index.module.css.js +1 -1
  215. package/modern/components/category/index.module.css.js.map +1 -1
  216. package/modern/components/content/component.d.ts +1 -1
  217. package/modern/components/content/component.js +1 -1
  218. package/modern/components/content/component.js.map +1 -1
  219. package/modern/components/content/index.css +3 -3
  220. package/modern/components/content/index.module.css.js +1 -1
  221. package/modern/components/content/index.module.css.js.map +1 -1
  222. package/modern/components/footer/component.d.ts +1 -1
  223. package/modern/components/footer/component.js +1 -1
  224. package/modern/components/footer/component.js.map +1 -1
  225. package/modern/components/footer/index.css +4 -4
  226. package/modern/components/footer/index.module.css.js +1 -1
  227. package/modern/components/footer/index.module.css.js.map +1 -1
  228. package/modern/components/footer-button/component.d.ts +2 -2
  229. package/modern/components/footer-button/component.js +1 -1
  230. package/modern/components/footer-button/component.js.map +1 -1
  231. package/modern/components/footer-button/index.css +1 -1
  232. package/modern/components/footer-button/index.module.css.js +1 -1
  233. package/modern/components/footer-button/index.module.css.js.map +1 -1
  234. package/modern/components/footer-text/component.d.ts +1 -1
  235. package/modern/components/footer-text/component.js +1 -1
  236. package/modern/components/footer-text/component.js.map +1 -1
  237. package/modern/components/graphics/component.d.ts +1 -1
  238. package/modern/components/graphics/component.js +1 -1
  239. package/modern/components/graphics/component.js.map +1 -1
  240. package/modern/components/graphics/index.css +23 -21
  241. package/modern/components/graphics/index.module.css.js +1 -1
  242. package/modern/components/main/component.d.ts +1 -1
  243. package/modern/components/main/component.js +1 -1
  244. package/modern/components/main/component.js.map +1 -1
  245. package/modern/components/main/index.css +11 -9
  246. package/modern/components/main/index.module.css.js +1 -1
  247. package/modern/components/text/component.d.ts +1 -1
  248. package/modern/components/text/component.js +1 -1
  249. package/modern/components/text/component.js.map +1 -1
  250. package/modern/components/text/index.css +6 -6
  251. package/modern/components/text/index.module.css.js +1 -1
  252. package/modern/components/text/index.module.css.js.map +1 -1
  253. package/modern/components/types.d.ts +8 -8
  254. package/modern/components/typesProps.d.ts +2 -2
  255. package/modern/context.d.ts +9 -0
  256. package/modern/context.js +7 -0
  257. package/modern/context.js.map +1 -0
  258. package/modern/index.css +34 -32
  259. package/modern/index.module.css.js +1 -1
  260. package/modern/index.module.css.js.map +1 -1
  261. package/moderncssm/component.d.ts +10 -16
  262. package/moderncssm/component.js +2 -3
  263. package/moderncssm/component.js.map +1 -1
  264. package/moderncssm/components/addon/component.d.ts +1 -1
  265. package/moderncssm/components/addon/component.js +1 -1
  266. package/moderncssm/components/addon/component.js.map +1 -1
  267. package/moderncssm/components/addon/index.module.css +5 -3
  268. package/moderncssm/components/amount/component.d.ts +1 -1
  269. package/moderncssm/components/amount/component.js +1 -1
  270. package/moderncssm/components/amount/component.js.map +1 -1
  271. package/moderncssm/components/amount/index.module.css +2 -0
  272. package/moderncssm/components/amount-title/component.d.ts +1 -1
  273. package/moderncssm/components/amount-title/component.js +1 -1
  274. package/moderncssm/components/amount-title/component.js.map +1 -1
  275. package/moderncssm/components/amount-title/index.module.css +2 -0
  276. package/moderncssm/components/category/component.d.ts +1 -1
  277. package/moderncssm/components/category/component.js +1 -1
  278. package/moderncssm/components/category/component.js.map +1 -1
  279. package/moderncssm/components/category/index.module.css +2 -0
  280. package/moderncssm/components/content/component.d.ts +1 -1
  281. package/moderncssm/components/content/component.js +1 -1
  282. package/moderncssm/components/content/component.js.map +1 -1
  283. package/moderncssm/components/content/index.module.css +3 -2
  284. package/moderncssm/components/footer/component.d.ts +1 -1
  285. package/moderncssm/components/footer/component.js +1 -1
  286. package/moderncssm/components/footer/component.js.map +1 -1
  287. package/moderncssm/components/footer/index.module.css +3 -3
  288. package/moderncssm/components/footer-button/component.d.ts +2 -2
  289. package/moderncssm/components/footer-button/component.js +1 -1
  290. package/moderncssm/components/footer-button/component.js.map +1 -1
  291. package/moderncssm/components/footer-button/index.module.css +2 -0
  292. package/moderncssm/components/footer-text/component.d.ts +1 -1
  293. package/moderncssm/components/footer-text/component.js +1 -1
  294. package/moderncssm/components/footer-text/component.js.map +1 -1
  295. package/moderncssm/components/graphics/component.d.ts +1 -1
  296. package/moderncssm/components/graphics/component.js +1 -1
  297. package/moderncssm/components/graphics/component.js.map +1 -1
  298. package/moderncssm/components/graphics/index.module.css +16 -14
  299. package/moderncssm/components/main/component.d.ts +1 -1
  300. package/moderncssm/components/main/component.js +1 -1
  301. package/moderncssm/components/main/component.js.map +1 -1
  302. package/moderncssm/components/main/index.module.css +5 -3
  303. package/moderncssm/components/text/component.d.ts +1 -1
  304. package/moderncssm/components/text/component.js +1 -1
  305. package/moderncssm/components/text/component.js.map +1 -1
  306. package/moderncssm/components/text/index.module.css +2 -0
  307. package/moderncssm/components/types.d.ts +8 -8
  308. package/moderncssm/components/typesProps.d.ts +2 -2
  309. package/moderncssm/context.d.ts +9 -0
  310. package/moderncssm/context.js +7 -0
  311. package/moderncssm/context.js.map +1 -0
  312. package/moderncssm/index.module.css +6 -4
  313. package/package.json +4 -4
  314. package/src/component.tsx +11 -21
  315. package/src/components/addon/component.tsx +2 -2
  316. package/src/components/amount/component.tsx +2 -2
  317. package/src/components/amount/index.module.css +1 -1
  318. package/src/components/amount-title/component.tsx +2 -2
  319. package/src/components/amount-title/index.module.css +1 -1
  320. package/src/components/category/component.tsx +2 -2
  321. package/src/components/category/index.module.css +1 -1
  322. package/src/components/content/component.tsx +2 -2
  323. package/src/components/content/index.module.css +1 -1
  324. package/src/components/footer/component.tsx +2 -2
  325. package/src/components/footer/index.module.css +1 -1
  326. package/src/components/footer-button/component.tsx +8 -3
  327. package/src/components/footer-button/index.module.css +1 -1
  328. package/src/components/footer-text/component.tsx +2 -2
  329. package/src/components/graphics/component.tsx +2 -2
  330. package/src/components/main/component.tsx +2 -2
  331. package/src/components/text/component.tsx +2 -2
  332. package/src/components/text/index.module.css +1 -3
  333. package/src/components/types.ts +8 -8
  334. package/src/components/typesProps.ts +2 -2
  335. package/src/context.ts +12 -0
  336. package/src/index.module.css +2 -2
  337. package/src/vars.css +1 -1
@@ -4,29 +4,29 @@
4
4
  --gap-0: 0px;
5
5
  --gap-2: var(--gap-3xs);
6
6
  --gap-16: var(--gap-m);
7
- } .pure-cell__horizontal_12qp9 {
7
+ } .pure-cell__horizontal_1do7h {
8
8
  padding: var(--gap-2) var(--gap-0);
9
- } .pure-cell__rowLimit1_12qp9 {
9
+ } .pure-cell__rowLimit1_1do7h {
10
10
  -webkit-line-clamp: 1;
11
11
  display: -webkit-box;
12
12
  -webkit-box-orient: vertical;
13
13
  overflow: hidden;
14
14
  word-break: break-all;
15
- } .pure-cell__rowLimit2_12qp9 {
15
+ } .pure-cell__rowLimit2_1do7h {
16
16
  -webkit-line-clamp: 2;
17
17
  display: -webkit-box;
18
18
  -webkit-box-orient: vertical;
19
19
  overflow: hidden;
20
- } .pure-cell__component_12qp9 {
20
+ } .pure-cell__component_1do7h {
21
21
  display: flex;
22
22
  flex-direction: row;
23
23
  flex-wrap: nowrap;
24
24
  justify-content: space-between;
25
25
  margin: var(--gap-2) var(--gap-0);
26
26
  word-break: break-word;
27
- } .pure-cell__component_12qp9 .pure-cell__vertical_12qp9 {
27
+ } .pure-cell__component_1do7h .pure-cell__vertical_1do7h {
28
28
  justify-content: center;
29
- } .pure-cell__title_12qp9 + .pure-cell__value_12qp9 {
29
+ } .pure-cell__title_1do7h + .pure-cell__value_1do7h {
30
30
  margin-left: var(--gap-16);
31
31
  flex-shrink: 0;
32
32
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"horizontal":"pure-cell__horizontal_12qp9","rowLimit1":"pure-cell__rowLimit1_12qp9","rowLimit2":"pure-cell__rowLimit2_12qp9","component":"pure-cell__component_12qp9","vertical":"pure-cell__vertical_12qp9","title":"pure-cell__title_12qp9","value":"pure-cell__value_12qp9"};
3
+ const styles = {"horizontal":"pure-cell__horizontal_1do7h","rowLimit1":"pure-cell__rowLimit1_1do7h","rowLimit2":"pure-cell__rowLimit2_1do7h","component":"pure-cell__component_1do7h","vertical":"pure-cell__vertical_1do7h","title":"pure-cell__title_1do7h","value":"pure-cell__value_1do7h"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.css.js","sources":["../../src/components/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\n.component {\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,eAAe,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/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,eAAe,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,11 +1,11 @@
1
- import { ReactElement, ReactNode } from 'react';
2
- import { Comment } from '@alfalab/core-components-comment/modern';
3
- import { Amount } from './amount';
4
- import { AmountTitle } from './amount-title';
5
- import { FooterButton } from './footer-button';
6
- import { FooterText } from './footer-text';
7
- import { Graphics } from './graphics';
8
- import { Text } from './text';
1
+ import { type ReactElement, type ReactNode } from 'react';
2
+ import { type Comment } from '@alfalab/core-components-comment/modern';
3
+ import { type Amount } from './amount';
4
+ import { type AmountTitle } from './amount-title';
5
+ import { type FooterButton } from './footer-button';
6
+ import { type FooterText } from './footer-text';
7
+ import { type Graphics } from './graphics';
8
+ import { type Text } from './text';
9
9
  declare type TextElement = ReactElement<typeof Text>;
10
10
  export declare type GraphicsElement = ReactElement<typeof Graphics> | boolean | null;
11
11
  declare type AmountElement = ReactElement<typeof Amount>;
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { CurrencyCodes } from '@alfalab/data';
1
+ import { type ReactNode } from 'react';
2
+ import { type CurrencyCodes } from '@alfalab/data';
3
3
  export declare type AmountProps = {
4
4
  /**
5
5
  * Денежное значение в минорных единицах
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ export declare type PureCellContextValue = {
3
+ /** Направление */
4
+ direction?: 'horizontal' | 'vertical';
5
+ dataTestId?: string;
6
+ setMainHover?: () => void;
7
+ unsetMainHover?: () => void;
8
+ };
9
+ export declare const PureCellContext: import("react").Context<PureCellContextValue>;
@@ -0,0 +1,7 @@
1
+ import { createContext } from 'react';
2
+
3
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
4
+ const PureCellContext = createContext({});
5
+
6
+ export { PureCellContext };
7
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sources":["../src/context.ts"],"sourcesContent":["import { createContext } from 'react';\n\nexport type PureCellContextValue = {\n /** Направление */\n direction?: 'horizontal' | 'vertical';\n dataTestId?: string;\n setMainHover?: () => void;\n unsetMainHover?: () => void;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const PureCellContext = createContext<PureCellContextValue>({});\n"],"names":[],"mappings":";;AAUA;MACa,eAAe,GAAG,aAAa,CAAuB,EAAE;;;;"}
package/modern/index.css CHANGED
@@ -1,5 +1,7 @@
1
1
  :root {
2
2
  --color-light-status-info: #2288fa;
3
+ } :root {
4
+ --border-radius-0: 0;
3
5
  } :root {
4
6
  --gap-2xs: 4px;
5
7
  --gap-xs: 8px;
@@ -12,75 +14,75 @@
12
14
  --gap-16: var(--gap-m);
13
15
  } :root {
14
16
  --focus-color: var(--color-light-status-info);
15
- } .pure-cell__component_s3aeg {
16
- text-align: unset;
17
+ } .pure-cell__component_2e0lh {
18
+ text-align: inherit;
17
19
  box-sizing: border-box;
18
- } .pure-cell__horizontal_s3aeg {
20
+ } .pure-cell__horizontal_2e0lh {
19
21
  display: flex;
20
22
  width: 100%;
21
- } .pure-cell__vertical_s3aeg {
23
+ } .pure-cell__vertical_2e0lh {
22
24
  display: flex;
23
25
  align-items: center;
24
26
  flex-direction: column;
25
- } .pure-cell__button_s3aeg {
27
+ } .pure-cell__button_2e0lh {
26
28
  font-family: inherit;
27
29
  background: none;
28
30
  border: 0;
29
- border-radius: 0;
31
+ border-radius: var(--border-radius-0);
30
32
  cursor: pointer;
31
33
  transition: opacity 0.15s ease-in-out;
32
- padding: var(--gap-0)
33
- } .pure-cell__button_s3aeg.pure-cell__hover_s3aeg {
34
+ padding: var(--gap-0);
35
+ } .pure-cell__button_2e0lh.pure-cell__hover_2e0lh {
34
36
  opacity: 0.8;
35
- } .pure-cell__button_s3aeg.pure-cell__active_s3aeg {
37
+ } .pure-cell__button_2e0lh.pure-cell__active_2e0lh {
36
38
  opacity: 0.6;
37
- } .pure-cell__link_s3aeg {
39
+ } .pure-cell__link_2e0lh {
38
40
  text-decoration: none;
39
41
  color: inherit;
40
42
  cursor: pointer;
41
- transition: opacity 0.15s ease-in-out
42
- } .pure-cell__link_s3aeg.pure-cell__hover_s3aeg {
43
+ transition: opacity 0.15s ease-in-out;
44
+ } .pure-cell__link_2e0lh.pure-cell__hover_2e0lh {
43
45
  opacity: 0.8;
44
- } .pure-cell__link_s3aeg.pure-cell__active_s3aeg {
46
+ } .pure-cell__link_2e0lh.pure-cell__active_2e0lh {
45
47
  opacity: 0.6;
46
- } .pure-cell__none_s3aeg {
48
+ } .pure-cell__none_2e0lh {
47
49
  padding: var(--gap-0);
48
- } .pure-cell__airy_s3aeg {
50
+ } .pure-cell__airy_2e0lh {
49
51
  padding: var(--gap-16) var(--gap-0);
50
- } .pure-cell__default_s3aeg {
52
+ } .pure-cell__default_2e0lh {
51
53
  padding: var(--gap-12) var(--gap-0);
52
- } .pure-cell__compact_s3aeg {
54
+ } .pure-cell__compact_2e0lh {
53
55
  padding: var(--gap-8) var(--gap-0);
54
- } .pure-cell__tiny_s3aeg {
56
+ } .pure-cell__tiny_2e0lh {
55
57
  padding: var(--gap-4) var(--gap-0);
56
- } .pure-cell__noneTop_s3aeg {
58
+ } .pure-cell__noneTop_2e0lh {
57
59
  padding-top: var(--gap-0);
58
- } .pure-cell__airyTop_s3aeg {
60
+ } .pure-cell__airyTop_2e0lh {
59
61
  padding-top: var(--gap-16);
60
- } .pure-cell__defaultTop_s3aeg {
62
+ } .pure-cell__defaultTop_2e0lh {
61
63
  padding-top: var(--gap-12);
62
- } .pure-cell__compactTop_s3aeg {
64
+ } .pure-cell__compactTop_2e0lh {
63
65
  padding-top: var(--gap-8);
64
- } .pure-cell__tinyTop_s3aeg {
66
+ } .pure-cell__tinyTop_2e0lh {
65
67
  padding-top: var(--gap-4);
66
- } .pure-cell__noneBottom_s3aeg {
68
+ } .pure-cell__noneBottom_2e0lh {
67
69
  padding-bottom: var(--gap-0);
68
- } .pure-cell__airyBottom_s3aeg {
70
+ } .pure-cell__airyBottom_2e0lh {
69
71
  padding-bottom: var(--gap-16);
70
- } .pure-cell__defaultBottom_s3aeg {
72
+ } .pure-cell__defaultBottom_2e0lh {
71
73
  padding-bottom: var(--gap-12);
72
- } .pure-cell__compactBottom_s3aeg {
74
+ } .pure-cell__compactBottom_2e0lh {
73
75
  padding-bottom: var(--gap-8);
74
- } .pure-cell__tinyBottom_s3aeg {
76
+ } .pure-cell__tinyBottom_2e0lh {
75
77
  padding-bottom: var(--gap-4);
76
- } .pure-cell__left_s3aeg {
78
+ } .pure-cell__left_2e0lh {
77
79
  padding-left: var(--gap-16);
78
- } .pure-cell__right_s3aeg {
80
+ } .pure-cell__right_2e0lh {
79
81
  padding-right: var(--gap-16);
80
- } .pure-cell__both_s3aeg {
82
+ } .pure-cell__both_2e0lh {
81
83
  padding-right: var(--gap-16);
82
84
  padding-left: var(--gap-16);
83
- } .pure-cell__focused_s3aeg {
85
+ } .pure-cell__focused_2e0lh {
84
86
  outline: 2px solid var(--focus-color);
85
87
  outline-offset: 2px;
86
88
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"component":"pure-cell__component_s3aeg","horizontal":"pure-cell__horizontal_s3aeg","vertical":"pure-cell__vertical_s3aeg","button":"pure-cell__button_s3aeg","hover":"pure-cell__hover_s3aeg","active":"pure-cell__active_s3aeg","link":"pure-cell__link_s3aeg","none":"pure-cell__none_s3aeg","airy":"pure-cell__airy_s3aeg","default":"pure-cell__default_s3aeg","compact":"pure-cell__compact_s3aeg","tiny":"pure-cell__tiny_s3aeg","noneTop":"pure-cell__noneTop_s3aeg","airyTop":"pure-cell__airyTop_s3aeg","defaultTop":"pure-cell__defaultTop_s3aeg","compactTop":"pure-cell__compactTop_s3aeg","tinyTop":"pure-cell__tinyTop_s3aeg","noneBottom":"pure-cell__noneBottom_s3aeg","airyBottom":"pure-cell__airyBottom_s3aeg","defaultBottom":"pure-cell__defaultBottom_s3aeg","compactBottom":"pure-cell__compactBottom_s3aeg","tinyBottom":"pure-cell__tinyBottom_s3aeg","left":"pure-cell__left_s3aeg","right":"pure-cell__right_s3aeg","both":"pure-cell__both_s3aeg","focused":"pure-cell__focused_s3aeg"};
3
+ const styles = {"component":"pure-cell__component_2e0lh","horizontal":"pure-cell__horizontal_2e0lh","vertical":"pure-cell__vertical_2e0lh","button":"pure-cell__button_2e0lh","hover":"pure-cell__hover_2e0lh","active":"pure-cell__active_2e0lh","link":"pure-cell__link_2e0lh","none":"pure-cell__none_2e0lh","airy":"pure-cell__airy_2e0lh","default":"pure-cell__default_2e0lh","compact":"pure-cell__compact_2e0lh","tiny":"pure-cell__tiny_2e0lh","noneTop":"pure-cell__noneTop_2e0lh","airyTop":"pure-cell__airyTop_2e0lh","defaultTop":"pure-cell__defaultTop_2e0lh","compactTop":"pure-cell__compactTop_2e0lh","tinyTop":"pure-cell__tinyTop_2e0lh","noneBottom":"pure-cell__noneBottom_2e0lh","airyBottom":"pure-cell__airyBottom_2e0lh","defaultBottom":"pure-cell__defaultBottom_2e0lh","compactBottom":"pure-cell__compactBottom_2e0lh","tinyBottom":"pure-cell__tinyBottom_2e0lh","left":"pure-cell__left_2e0lh","right":"pure-cell__right_2e0lh","both":"pure-cell__both_2e0lh","focused":"pure-cell__focused_2e0lh"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n text-align: unset;\n box-sizing: border-box;\n}\n\n.horizontal {\n display: flex;\n width: 100%;\n}\n\n.vertical {\n display: flex;\n align-items: center;\n flex-direction: column;\n}\n\n.button {\n font-family: inherit;\n background: none;\n border: 0;\n border-radius: 0;\n cursor: pointer;\n transition: opacity 0.15s ease-in-out;\n padding: var(--gap-0);\n\n &.hover {\n opacity: 0.8;\n }\n\n &.active {\n opacity: 0.6;\n }\n}\n\n.link {\n text-decoration: none;\n color: inherit;\n cursor: pointer;\n transition: opacity 0.15s ease-in-out;\n\n &.hover {\n opacity: 0.8;\n }\n\n &.active {\n opacity: 0.6;\n }\n}\n.none {\n padding: var(--gap-0);\n}\n\n.airy {\n padding: var(--gap-16) var(--gap-0);\n}\n\n.default {\n padding: var(--gap-12) var(--gap-0);\n}\n\n.compact {\n padding: var(--gap-8) var(--gap-0);\n}\n\n.tiny {\n padding: var(--gap-4) var(--gap-0);\n}\n\n.noneTop {\n padding-top: var(--gap-0);\n}\n\n.airyTop {\n padding-top: var(--gap-16);\n}\n\n.defaultTop {\n padding-top: var(--gap-12);\n}\n\n.compactTop {\n padding-top: var(--gap-8);\n}\n\n.tinyTop {\n padding-top: var(--gap-4);\n}\n\n.noneBottom {\n padding-bottom: var(--gap-0);\n}\n\n.airyBottom {\n padding-bottom: var(--gap-16);\n}\n\n.defaultBottom {\n padding-bottom: var(--gap-12);\n}\n\n.compactBottom {\n padding-bottom: var(--gap-8);\n}\n\n.tinyBottom {\n padding-bottom: var(--gap-4);\n}\n\n.left {\n padding-left: var(--gap-16);\n}\n\n.right {\n padding-right: var(--gap-16);\n}\n\n.both {\n padding-right: var(--gap-16);\n padding-left: var(--gap-16);\n}\n\n.focused {\n @mixin focus-outline;\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,WAAW,CAAC,4BAA4B,CAAC,YAAY,CAAC,6BAA6B,CAAC,UAAU,CAAC,2BAA2B,CAAC,QAAQ,CAAC,yBAAyB,CAAC,OAAO,CAAC,wBAAwB,CAAC,QAAQ,CAAC,yBAAyB,CAAC,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC,SAAS,CAAC,0BAA0B,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC,SAAS,CAAC,0BAA0B,CAAC,YAAY,CAAC,6BAA6B,CAAC,YAAY,CAAC,6BAA6B,CAAC,SAAS,CAAC,0BAA0B,CAAC,YAAY,CAAC,6BAA6B,CAAC,YAAY,CAAC,6BAA6B,CAAC,eAAe,CAAC,gCAAgC,CAAC,eAAe,CAAC,gCAAgC,CAAC,YAAY,CAAC,6BAA6B,CAAC,MAAM,CAAC,uBAAuB,CAAC,OAAO,CAAC,wBAAwB,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC;;;;"}
1
+ {"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-index.css';\n\n.component {\n text-align: unset;\n box-sizing: border-box;\n}\n\n.horizontal {\n display: flex;\n width: 100%;\n}\n\n.vertical {\n display: flex;\n align-items: center;\n flex-direction: column;\n}\n\n.button {\n font-family: inherit;\n background: none;\n border: 0;\n border-radius: var(--border-radius-0);\n cursor: pointer;\n transition: opacity 0.15s ease-in-out;\n padding: var(--gap-0);\n\n &.hover {\n opacity: 0.8;\n }\n\n &.active {\n opacity: 0.6;\n }\n}\n\n.link {\n text-decoration: none;\n color: inherit;\n cursor: pointer;\n transition: opacity 0.15s ease-in-out;\n\n &.hover {\n opacity: 0.8;\n }\n\n &.active {\n opacity: 0.6;\n }\n}\n.none {\n padding: var(--gap-0);\n}\n\n.airy {\n padding: var(--gap-16) var(--gap-0);\n}\n\n.default {\n padding: var(--gap-12) var(--gap-0);\n}\n\n.compact {\n padding: var(--gap-8) var(--gap-0);\n}\n\n.tiny {\n padding: var(--gap-4) var(--gap-0);\n}\n\n.noneTop {\n padding-top: var(--gap-0);\n}\n\n.airyTop {\n padding-top: var(--gap-16);\n}\n\n.defaultTop {\n padding-top: var(--gap-12);\n}\n\n.compactTop {\n padding-top: var(--gap-8);\n}\n\n.tinyTop {\n padding-top: var(--gap-4);\n}\n\n.noneBottom {\n padding-bottom: var(--gap-0);\n}\n\n.airyBottom {\n padding-bottom: var(--gap-16);\n}\n\n.defaultBottom {\n padding-bottom: var(--gap-12);\n}\n\n.compactBottom {\n padding-bottom: var(--gap-8);\n}\n\n.tinyBottom {\n padding-bottom: var(--gap-4);\n}\n\n.left {\n padding-left: var(--gap-16);\n}\n\n.right {\n padding-right: var(--gap-16);\n}\n\n.both {\n padding-right: var(--gap-16);\n padding-left: var(--gap-16);\n}\n\n.focused {\n @mixin focus-outline;\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,WAAW,CAAC,4BAA4B,CAAC,YAAY,CAAC,6BAA6B,CAAC,UAAU,CAAC,2BAA2B,CAAC,QAAQ,CAAC,yBAAyB,CAAC,OAAO,CAAC,wBAAwB,CAAC,QAAQ,CAAC,yBAAyB,CAAC,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC,SAAS,CAAC,0BAA0B,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC,SAAS,CAAC,0BAA0B,CAAC,YAAY,CAAC,6BAA6B,CAAC,YAAY,CAAC,6BAA6B,CAAC,SAAS,CAAC,0BAA0B,CAAC,YAAY,CAAC,6BAA6B,CAAC,YAAY,CAAC,6BAA6B,CAAC,eAAe,CAAC,gCAAgC,CAAC,eAAe,CAAC,gCAAgC,CAAC,YAAY,CAAC,6BAA6B,CAAC,MAAM,CAAC,uBAAuB,CAAC,OAAO,CAAC,wBAAwB,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC;;;;"}
@@ -1,5 +1,4 @@
1
- import React, { AnchorHTMLAttributes, ButtonHTMLAttributes, ElementType, HTMLAttributes } from 'react';
2
- import { ButtonProps } from '@alfalab/core-components-button/moderncssm';
1
+ import React, { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type ElementType, type HTMLAttributes } from 'react';
3
2
  import { Comment } from '@alfalab/core-components-comment/moderncssm';
4
3
  import { Addon } from './components/addon';
5
4
  import { Amount } from './components/amount';
@@ -8,19 +7,12 @@ import { Category } from './components/category';
8
7
  import { Content } from './components/content';
9
8
  import { Footer } from './components/footer';
10
9
  import { FooterButton } from './components/footer-button';
11
- import { FooterTextProps } from './components/footer-text';
12
10
  import { Graphics } from './components/graphics';
13
11
  import { Main } from './components/main';
14
12
  import { Text } from './components/text';
15
- import { PureCellElement } from './components/types';
16
- export declare type PureCellContext = {
17
- /** Направление */
18
- direction?: 'horizontal' | 'vertical';
19
- dataTestId?: string;
20
- setMainHover?: () => void;
21
- unsetMainHover?: () => void;
22
- };
23
- export declare const PureCellContext: React.Context<PureCellContext>;
13
+ import { type PureCellElement } from './components/types';
14
+ import { PureCellContext } from './context';
15
+ export { PureCellContext };
24
16
  declare type BasePureCellProps = {
25
17
  /**
26
18
  * Направление
@@ -69,7 +61,7 @@ declare type ButtonPureCellProps = BasePureCellProps & ButtonHTMLAttributes<HTML
69
61
  declare type ElementPureCellProps = BasePureCellProps & HTMLAttributes<HTMLElement>;
70
62
  export declare type PureCellProps = Partial<AnchorPureCellProps | ButtonPureCellProps | ElementPureCellProps>;
71
63
  declare const PureCellComponent: React.ForwardRefExoticComponent<PureCellProps & React.RefAttributes<HTMLElement>>;
72
- declare const ExtraSubtitle: React.FC<FooterTextProps>;
64
+ declare const ExtraSubtitle: React.FC<import("./components/footer-text").FooterTextProps>;
73
65
  /**
74
66
  * Универсальный конструктор для сборки любой ячейки.
75
67
  *
@@ -96,7 +88,9 @@ declare const PureCell: React.ForwardRefExoticComponent<PureCellProps & React.Re
96
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";
97
89
  value?: React.ReactNode;
98
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;
99
- dataTestId?: string | undefined;
91
+ dataTestId?: string | undefined; /**
92
+ * Направление
93
+ */
100
94
  }>;
101
95
  Amount: React.FC<{
102
96
  weight?: "bold" | "normal" | undefined;
@@ -123,8 +117,8 @@ declare const PureCell: React.ForwardRefExoticComponent<PureCellProps & React.Re
123
117
  footerPadding?: "default" | "none" | undefined;
124
118
  dataTestId?: string | undefined;
125
119
  }>;
126
- ExtraSubtitle: React.FC<FooterTextProps>;
127
- FooterButton: React.ForwardRefExoticComponent<(Omit<ButtonProps, "dataTestId"> & {
120
+ ExtraSubtitle: React.FC<import("./components/footer-text").FooterTextProps>;
121
+ FooterButton: React.ForwardRefExoticComponent<(Omit<import("@alfalab/core-components-button").ButtonProps, "dataTestId"> & {
128
122
  dataTestId?: string | undefined;
129
123
  } & Partial<React.AnchorHTMLAttributes<HTMLAnchorElement> | React.ButtonHTMLAttributes<HTMLButtonElement>>) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
130
124
  Comment: React.FC<import("@alfalab/core-components-comment").CommentProps>;
@@ -15,11 +15,9 @@ import { FooterText } from './components/footer-text/component.js';
15
15
  import { Graphics } from './components/graphics/component.js';
16
16
  import { Main } from './components/main/component.js';
17
17
  import { Text } from './components/text/component.js';
18
+ import { PureCellContext } from './context.js';
18
19
  import styles from './index.module.css';
19
20
 
20
- /* eslint-disable react/jsx-no-constructed-context-values */
21
- // eslint-disable-next-line @typescript-eslint/no-redeclare
22
- const PureCellContext = React.createContext({});
23
21
  const PureCellComponent = forwardRef(({ className, dataTestId, onClick, href, tag: Component = (href && 'a') || (onClick && 'button') || 'section', children, horizontalPadding = 'none', verticalPadding = 'none', direction = 'horizontal', ...restProps }, ref) => {
24
22
  const cellRef = useRef(null);
25
23
  const [focused] = useFocus(cellRef, 'keyboard');
@@ -47,6 +45,7 @@ const PureCellComponent = forwardRef(({ className, dataTestId, onClick, href, ta
47
45
  [styles.hover]: hoverState,
48
46
  [styles.active]: activeState,
49
47
  };
48
+ // eslint-disable-next-line react/jsx-no-constructed-context-values
50
49
  const contextState = {
51
50
  direction,
52
51
  dataTestId,
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../src/component.tsx"],"sourcesContent":["/* eslint-disable react/jsx-no-constructed-context-values */\nimport React, {\n AnchorHTMLAttributes,\n ButtonHTMLAttributes,\n ElementType,\n forwardRef,\n HTMLAttributes,\n useRef,\n useState,\n} from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { ButtonProps } from '@alfalab/core-components-button';\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, FooterTextProps } from './components/footer-text';\nimport { Graphics } from './components/graphics';\nimport { Main } from './components/main';\nimport { Text } from './components/text';\nimport { PureCellElement } from './components/types';\n\nimport styles from './index.module.css';\n\nexport type PureCellContext = {\n /** Направление */\n direction?: 'horizontal' | 'vertical';\n dataTestId?: string;\n setMainHover?: () => void;\n unsetMainHover?: () => void;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const PureCellContext = React.createContext<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 const contextState: PureCellContext = {\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 as React.FC<FooterTextProps>;\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,\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N,WAAW;IACX,KAAK;IACL,MAAM;IACN,aAAa;IACb,YAAY;IACZ,OAAO;IACP,QAAQ;AACX,CAAA;AAED,iBAAiB,CAAC,WAAW,GAAG,mBAAmB;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../src/component.tsx"],"sourcesContent":["import React, {\n type AnchorHTMLAttributes,\n type ButtonHTMLAttributes,\n type ElementType,\n forwardRef,\n type HTMLAttributes,\n useRef,\n useState,\n} from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { Comment } from '@alfalab/core-components-comment';\nimport { useFocus } from '@alfalab/hooks';\n\nimport { Addon } from './components/addon';\nimport { Amount } from './components/amount';\nimport { AmountTitle } from './components/amount-title';\nimport { Category } from './components/category';\nimport { Content } from './components/content';\nimport { Footer } from './components/footer';\nimport { FooterButton } from './components/footer-button';\nimport { FooterText } from './components/footer-text';\nimport { Graphics } from './components/graphics';\nimport { Main } from './components/main';\nimport { Text } from './components/text';\nimport { type PureCellElement } from './components/types';\nimport { PureCellContext, type PureCellContextValue } from './context';\n\nimport styles from './index.module.css';\n\nexport { PureCellContext };\n\ntype BasePureCellProps = {\n /**\n * Направление\n */\n direction?: 'horizontal' | 'vertical';\n\n /**\n * Сss класс для стилизации общей обёртки\n */\n className?: string;\n\n /**\n * Выводит ссылку в виде ячейки\n */\n href?: string;\n\n /**\n * Вертикальные отступы\n */\n verticalPadding?:\n | 'airy'\n | 'default'\n | 'compact'\n | 'tiny'\n | 'none'\n | {\n /**\n * Вертикальный отступ сверху\n */\n top?: 'airy' | 'default' | 'compact' | 'tiny' | 'none';\n /**\n * Вертикальный отступ снизу\n */\n bottom?: 'airy' | 'default' | 'compact' | 'tiny' | 'none';\n };\n\n /**\n * Горизонтальные отступы\n */\n horizontalPadding?: 'left' | 'right' | 'both' | 'none';\n\n /**\n * Позволяет использовать кастомный компонент для кнопки (например Link из роутера)\n */\n tag?: ElementType;\n\n /**\n * Компоненты\n */\n children: PureCellElement;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\ntype AnchorPureCellProps = BasePureCellProps & AnchorHTMLAttributes<HTMLAnchorElement>;\ntype ButtonPureCellProps = BasePureCellProps & ButtonHTMLAttributes<HTMLButtonElement>;\ntype ElementPureCellProps = BasePureCellProps & HTMLAttributes<HTMLElement>;\nexport type PureCellProps = Partial<\n AnchorPureCellProps | ButtonPureCellProps | ElementPureCellProps\n>;\n\nconst PureCellComponent = forwardRef<HTMLElement, PureCellProps>(\n (\n {\n className,\n dataTestId,\n onClick,\n href,\n tag: Component = (href && 'a') || (onClick && 'button') || 'section',\n children,\n horizontalPadding = 'none',\n verticalPadding = 'none',\n direction = 'horizontal',\n ...restProps\n },\n ref,\n ) => {\n const cellRef = useRef<HTMLDivElement>(null);\n const [focused] = useFocus(cellRef, 'keyboard');\n const [hoverState, setHoverState] = useState<boolean>(false);\n const [activeState, setActiveState] = useState<boolean>(false);\n\n const setHover = () => setHoverState(true);\n const unsetHover = () => setHoverState(false);\n const setActive = () => setActiveState(true);\n\n const unsetActive = () => setActiveState(false);\n\n const mouseEvents = {\n onMouseEnter: setHover,\n onMouseLeave: () => {\n unsetHover();\n // Убираем на случай, если уводим курсор за пределы компонента при сработавшем onMouseDown\n unsetActive();\n },\n onMouseDown: setActive,\n onMouseUp: unsetActive,\n };\n\n const addClasses = {\n [styles.component]: true,\n [styles.focused]: focused,\n [styles[direction]]: true,\n [styles[horizontalPadding]]: true,\n [styles.hover]: hoverState,\n [styles.active]: activeState,\n };\n\n // eslint-disable-next-line react/jsx-no-constructed-context-values\n const contextState: PureCellContextValue = {\n direction,\n dataTestId,\n setMainHover: setHover,\n unsetMainHover: unsetHover,\n };\n\n if (typeof verticalPadding === 'string') {\n addClasses[styles[verticalPadding as string]] = typeof verticalPadding === 'string';\n }\n\n if (typeof verticalPadding === 'object') {\n addClasses[styles[`${verticalPadding.top}Top`]] = !!verticalPadding.top;\n addClasses[styles[`${verticalPadding.bottom}Bottom`]] = !!verticalPadding.bottom;\n }\n\n if (href) {\n const { target } = restProps as AnchorHTMLAttributes<HTMLAnchorElement>;\n\n // Для совместимости с react-router-dom, меняем href на to\n const hrefProps = { [typeof Component === 'string' ? 'href' : 'to']: href };\n\n return (\n <Component\n rel={target === '_blank' ? 'noreferrer noopener' : undefined}\n {...(restProps as AnchorHTMLAttributes<HTMLAnchorElement>)}\n {...hrefProps}\n ref={mergeRefs([cellRef, ref])}\n className={cn(styles.link, addClasses, className)}\n data-test-id={dataTestId}\n onClick={onClick}\n {...mouseEvents}\n >\n <PureCellContext.Provider value={contextState}>\n {children}\n </PureCellContext.Provider>\n </Component>\n );\n }\n\n if (onClick) {\n return (\n <Component\n {...(restProps as AnchorHTMLAttributes<HTMLAnchorElement>)}\n ref={mergeRefs([cellRef, ref])}\n className={cn(styles.button, addClasses, className)}\n data-test-id={dataTestId}\n onClick={onClick}\n {...mouseEvents}\n >\n <PureCellContext.Provider value={contextState}>\n {children}\n </PureCellContext.Provider>\n </Component>\n );\n }\n\n return (\n <Component\n {...(restProps as AnchorHTMLAttributes<HTMLAnchorElement>)}\n ref={ref}\n tabIndex={0}\n className={cn(addClasses, className)}\n data-test-id={dataTestId}\n >\n <PureCellContext.Provider value={contextState}>{children}</PureCellContext.Provider>\n </Component>\n );\n },\n);\n\nconst ExtraSubtitle = FooterText;\n\n/**\n * Универсальный конструктор для сборки любой ячейки.\n *\n * [Макет](https://www.figma.com/file/KlFOLLkKO8rtvvQE3RXuhq/Click-Library?node-id=43525%3A240018)\n */\nconst PureCell = Object.assign(PureCellComponent, {\n Main,\n Graphics,\n Content,\n Text,\n Amount,\n AmountTitle,\n Addon,\n Footer,\n ExtraSubtitle,\n FooterButton,\n Comment,\n Category,\n});\n\nPureCellComponent.displayName = 'PureCellComponent';\n\nexport {\n PureCell,\n PureCellComponent,\n Main,\n Graphics,\n Content,\n Text,\n Amount,\n AmountTitle,\n Addon,\n Footer,\n ExtraSubtitle,\n FooterButton,\n Comment,\n Category,\n};\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1,5 @@
1
1
  import React from 'react';
2
- import { AddonElement } from '../types';
2
+ import { type AddonElement } from '../types';
3
3
  declare type Props = {
4
4
  /**
5
5
  * Вертикальное выравнивание
@@ -1,7 +1,7 @@
1
1
  import React, { useContext } from 'react';
2
2
  import cn from 'classnames';
3
3
  import { getDataTestId } from '@alfalab/core-components-shared/moderncssm';
4
- import { PureCellContext } from '../../component.js';
4
+ import { PureCellContext } from '../../context.js';
5
5
  import styles from './index.module.css';
6
6
 
7
7
  const ADDON_COMPONENT = {
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../../src/components/addon/component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { getDataTestId } from '@alfalab/core-components-shared';\n\nimport { PureCellContext } from '../../component';\nimport { AddonElement } from '../types';\n\nimport styles from './index.module.css';\n\ntype Props = {\n /**\n * Вертикальное выравнивание\n */\n verticalAlign?: 'auto' | 'top' | 'center' | 'bottom';\n\n /**\n * Горизонтальные отступы\n */\n addonPadding?: 'default' | 'none';\n\n /**\n * Компоненты\n */\n children: AddonElement;\n\n /**\n * Идентификатор для систем автоматизированного тестирования.\n * Используется модификатор -addon\n */\n dataTestId?: string;\n\n /**\n * Клик по контенту аддона.\n */\n onClick?: () => void;\n};\n\nconst ADDON_COMPONENT: Record<string, keyof Pick<React.ReactHTML, 'button' | 'section'>> = {\n button: 'button',\n section: 'section',\n};\n\nexport const Addon: React.FC<Props> = ({\n children,\n verticalAlign = 'top',\n addonPadding = 'default',\n dataTestId,\n onClick,\n}) => {\n const pureCellContext = useContext(PureCellContext);\n\n const Component = onClick ? ADDON_COMPONENT.button : ADDON_COMPONENT.section;\n\n const onMouseEvents = {\n onClick: (e: React.MouseEvent<HTMLButtonElement>) => {\n e.stopPropagation();\n onClick?.();\n },\n onMouseEnter: () => {\n pureCellContext.unsetMainHover?.();\n },\n onMouseLeave: () => {\n pureCellContext.setMainHover?.();\n },\n onMouseDown: (e: React.MouseEvent<HTMLButtonElement>) => {\n e.stopPropagation();\n },\n };\n\n return (\n <Component\n className={cn(styles.component, styles[addonPadding], styles[verticalAlign], {\n [styles.button]: onClick,\n })}\n data-test-id={getDataTestId(dataTestId || pureCellContext.dataTestId, 'addon')}\n {...(onClick && onMouseEvents)}\n >\n {children}\n </Component>\n );\n};\n"],"names":[],"mappings":";;;;;;AAsCA,MAAM,eAAe,GAAsE;AACvF,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,OAAO,EAAE,SAAS;CACrB;MAEY,KAAK,GAAoB,CAAC,EACnC,QAAQ,EACR,aAAa,GAAG,KAAK,EACrB,YAAY,GAAG,SAAS,EACxB,UAAU,EACV,OAAO,GACV,KAAI;AACD,IAAA,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC;AAEnD,IAAA,MAAM,SAAS,GAAG,OAAO,GAAG,eAAe,CAAC,MAAM,GAAG,eAAe,CAAC,OAAO;AAE5E,IAAA,MAAM,aAAa,GAAG;AAClB,QAAA,OAAO,EAAE,CAAC,CAAsC,KAAI;YAChD,CAAC,CAAC,eAAe,EAAE;YACnB,OAAO,IAAI;SACd;QACD,YAAY,EAAE,MAAK;AACf,YAAA,eAAe,CAAC,cAAc,IAAI;SACrC;QACD,YAAY,EAAE,MAAK;AACf,YAAA,eAAe,CAAC,YAAY,IAAI;SACnC;AACD,QAAA,WAAW,EAAE,CAAC,CAAsC,KAAI;YACpD,CAAC,CAAC,eAAe,EAAE;SACtB;KACJ;IAED,QACI,oBAAC,SAAS,EAAA,EACN,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC,aAAa,CAAC,EAAE;AACzE,YAAA,CAAC,MAAM,CAAC,MAAM,GAAG,OAAO;SAC3B,CAAC,EAAA,cAAA,EACY,aAAa,CAAC,UAAU,IAAI,eAAe,CAAC,UAAU,EAAE,OAAO,CAAC,EAC1E,IAAC,OAAO,IAAI,aAAa,CAAC,EAE7B,EAAA,QAAQ,CACD;AAEpB;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../../../src/components/addon/component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { getDataTestId } from '@alfalab/core-components-shared';\n\nimport { PureCellContext } from '../../context';\nimport { type AddonElement } from '../types';\n\nimport styles from './index.module.css';\n\ntype Props = {\n /**\n * Вертикальное выравнивание\n */\n verticalAlign?: 'auto' | 'top' | 'center' | 'bottom';\n\n /**\n * Горизонтальные отступы\n */\n addonPadding?: 'default' | 'none';\n\n /**\n * Компоненты\n */\n children: AddonElement;\n\n /**\n * Идентификатор для систем автоматизированного тестирования.\n * Используется модификатор -addon\n */\n dataTestId?: string;\n\n /**\n * Клик по контенту аддона.\n */\n onClick?: () => void;\n};\n\nconst ADDON_COMPONENT: Record<string, keyof Pick<React.ReactHTML, 'button' | 'section'>> = {\n button: 'button',\n section: 'section',\n};\n\nexport const Addon: React.FC<Props> = ({\n children,\n verticalAlign = 'top',\n addonPadding = 'default',\n dataTestId,\n onClick,\n}) => {\n const pureCellContext = useContext(PureCellContext);\n\n const Component = onClick ? ADDON_COMPONENT.button : ADDON_COMPONENT.section;\n\n const onMouseEvents = {\n onClick: (e: React.MouseEvent<HTMLButtonElement>) => {\n e.stopPropagation();\n onClick?.();\n },\n onMouseEnter: () => {\n pureCellContext.unsetMainHover?.();\n },\n onMouseLeave: () => {\n pureCellContext.setMainHover?.();\n },\n onMouseDown: (e: React.MouseEvent<HTMLButtonElement>) => {\n e.stopPropagation();\n },\n };\n\n return (\n <Component\n className={cn(styles.component, styles[addonPadding], styles[verticalAlign], {\n [styles.button]: onClick,\n })}\n data-test-id={getDataTestId(dataTestId || pureCellContext.dataTestId, 'addon')}\n {...(onClick && onMouseEvents)}\n >\n {children}\n </Component>\n );\n};\n"],"names":[],"mappings":";;;;;;AAsCA,MAAM,eAAe,GAAsE;AACvF,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,OAAO,EAAE,SAAS;CACrB;MAEY,KAAK,GAAoB,CAAC,EACnC,QAAQ,EACR,aAAa,GAAG,KAAK,EACrB,YAAY,GAAG,SAAS,EACxB,UAAU,EACV,OAAO,GACV,KAAI;AACD,IAAA,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC;AAEnD,IAAA,MAAM,SAAS,GAAG,OAAO,GAAG,eAAe,CAAC,MAAM,GAAG,eAAe,CAAC,OAAO;AAE5E,IAAA,MAAM,aAAa,GAAG;AAClB,QAAA,OAAO,EAAE,CAAC,CAAsC,KAAI;YAChD,CAAC,CAAC,eAAe,EAAE;YACnB,OAAO,IAAI;SACd;QACD,YAAY,EAAE,MAAK;AACf,YAAA,eAAe,CAAC,cAAc,IAAI;SACrC;QACD,YAAY,EAAE,MAAK;AACf,YAAA,eAAe,CAAC,YAAY,IAAI;SACnC;AACD,QAAA,WAAW,EAAE,CAAC,CAAsC,KAAI;YACpD,CAAC,CAAC,eAAe,EAAE;SACtB;KACJ;IAED,QACI,oBAAC,SAAS,EAAA,EACN,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC,aAAa,CAAC,EAAE;AACzE,YAAA,CAAC,MAAM,CAAC,MAAM,GAAG,OAAO;SAC3B,CAAC,EAAA,cAAA,EACY,aAAa,CAAC,UAAU,IAAI,eAAe,CAAC,UAAU,EAAE,OAAO,CAAC,EAC1E,IAAC,OAAO,IAAI,aAAa,CAAC,EAE7B,EAAA,QAAQ,CACD;AAEpB;;;;"}
@@ -1,3 +1,5 @@
1
+
2
+
1
3
  :root {
2
4
  --pure-cell-clickable-area-hover-opacity: 1;
3
5
  --pure-cell-clickable-area-active-opacity: 1;
@@ -6,7 +8,7 @@
6
8
  .component {
7
9
  display: flex;
8
10
  flex-direction: column;
9
- align-items: flex-end
11
+ align-items: flex-end;
10
12
  }
11
13
 
12
14
  .component > * {
@@ -49,7 +51,7 @@
49
51
  border: 0;
50
52
  margin: var(--gap-0);
51
53
  box-shadow: none;
52
- border-radius: 0;
54
+ border-radius: var(--border-radius-0);
53
55
  -webkit-user-select: none;
54
56
  -moz-user-select: none;
55
57
  user-select: none;
@@ -61,7 +63,7 @@
61
63
  min-width: 0;
62
64
  cursor: pointer;
63
65
  padding: var(--gap-0);
64
- transition: opacity 0.15s ease-in-out
66
+ transition: opacity 0.15s ease-in-out;
65
67
  }
66
68
 
67
69
  .button:hover {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type Color } from '@alfalab/core-components-typography/moderncssm';
3
- import { AmountProps as AmountType } from '../typesProps';
3
+ import { type AmountProps as AmountType } from '../typesProps';
4
4
  declare type Props = {
5
5
  /**
6
6
  * Начертание шрифта денежного значения
@@ -3,7 +3,7 @@ import cn from 'classnames';
3
3
  import { Amount as Amount$1 } from '@alfalab/core-components-amount/moderncssm';
4
4
  import { getDataTestId } from '@alfalab/core-components-shared/moderncssm';
5
5
  import { Text } from '@alfalab/core-components-typography/moderncssm';
6
- import { PureCellContext } from '../../component.js';
6
+ import { PureCellContext } from '../../context.js';
7
7
  import styles from './index.module.css';
8
8
 
9
9
  const Amount = ({ weight = 'normal', textView = 'component', color = 'primary', minority, minorUnits = 100, hidden, dataTestId, ...restProps }) => {
@@ -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, Text } from '@alfalab/core-components-typography';\n\nimport { PureCellContext } from '../../component';\nimport { 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-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',\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 <Text\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 </Text>\n );\n};\n"],"names":["CoreAmount"],"mappings":";;;;;;;;AAwCO,MAAM,MAAM,GAAoB,CAAC,EACpC,MAAM,GAAG,QAAQ,EACjB,QAAQ,GAAG,WAAW,EACtB,KAAK,GAAG,SAAS,EACjB,QAAQ,EACR,UAAU,GAAG,GAAG,EAChB,MAAM,EACN,UAAU,EACV,GAAG,SAAS,EACf,KAAI;AACD,IAAA,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC;AAEnD,IAAA,IAAI,MAAM,EAAE;AACR,QAAA,QACI,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,aAAa,EAAA;YAChC,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,MAAM,EAAI,CAAA,CAC/B;AAEb;AAED,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EACD,IAAI,EAAE,QAAQ,EACd,UAAU,EAAE,aAAa,CAAC,UAAU,IAAI,eAAe,CAAC,UAAU,EAAE,aAAa,CAAC,EAClF,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,EAC/B,KAAK,EAAE,KAAK,EAAA;AAEZ,QAAA,KAAA,CAAA,aAAA,CAACA,QAAU,EACP,EAAA,QAAQ,EAAE,QAAQ,IAAI,UAAU,EAChC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,GAAG,MAAM,EACzC,UAAU,EAAE,aAAa,CAAC,UAAU,IAAI,eAAe,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAA,GACzE,SAAS,EACf,CAAA,CACC;AAEf;;;;"}
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, Text } 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-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',\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 <Text\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 </Text>\n );\n};\n"],"names":["CoreAmount"],"mappings":";;;;;;;;AAwCO,MAAM,MAAM,GAAoB,CAAC,EACpC,MAAM,GAAG,QAAQ,EACjB,QAAQ,GAAG,WAAW,EACtB,KAAK,GAAG,SAAS,EACjB,QAAQ,EACR,UAAU,GAAG,GAAG,EAChB,MAAM,EACN,UAAU,EACV,GAAG,SAAS,EACf,KAAI;AACD,IAAA,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC;AAEnD,IAAA,IAAI,MAAM,EAAE;AACR,QAAA,QACI,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,aAAa,EAAA;YAChC,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,MAAM,EAAI,CAAA,CAC/B;AAEb;AAED,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EACD,IAAI,EAAE,QAAQ,EACd,UAAU,EAAE,aAAa,CAAC,UAAU,IAAI,eAAe,CAAC,UAAU,EAAE,aAAa,CAAC,EAClF,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,EAC/B,KAAK,EAAE,KAAK,EAAA;AAEZ,QAAA,KAAA,CAAA,aAAA,CAACA,QAAU,EACP,EAAA,QAAQ,EAAE,QAAQ,IAAI,UAAU,EAChC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,GAAG,MAAM,EACzC,UAAU,EAAE,aAAa,CAAC,UAAU,IAAI,eAAe,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAA,GACzE,SAAS,EACf,CAAA,CACC;AAEf;;;;"}
@@ -1,3 +1,5 @@
1
+
2
+
1
3
  .component {
2
4
  padding: var(--gap-2) var(--gap-0);
3
5
  display: flex;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type Color, type TitleProps } from '@alfalab/core-components-typography/moderncssm';
3
- import { AmountProps as AmountType } from '../typesProps';
3
+ import { type AmountProps as AmountType } from '../typesProps';
4
4
  declare type Props = {
5
5
  /**
6
6
  * Цвет денежного значения
@@ -3,7 +3,7 @@ import cn from 'classnames';
3
3
  import { Amount } from '@alfalab/core-components-amount/moderncssm';
4
4
  import { getDataTestId } from '@alfalab/core-components-shared/moderncssm';
5
5
  import { TitleResponsive } from '@alfalab/core-components-typography/moderncssm';
6
- import { PureCellContext } from '../../component.js';
6
+ import { PureCellContext } from '../../context.js';
7
7
  import styles from './index.module.css';
8
8
 
9
9
  const AmountTitle = ({ minority, minorUnits = 100, hidden, className, color = 'primary', dataTestId, titleProps: titlePropsFromProps = {}, ...restProps }) => {
@@ -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 Color, type TitleProps, TitleResponsive } from '@alfalab/core-components-typography';\n\nimport { PureCellContext } from '../../component';\nimport { AmountProps as AmountType } from '../typesProps';\n\nimport styles from './index.module.css';\n\ntype Props = {\n /**\n * Цвет денежного значения\n * @deprecated Используйте titleProps.color\n */\n color?: Color;\n\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 color = 'primary',\n dataTestId,\n titleProps: titlePropsFromProps = {},\n ...restProps\n}) => {\n const pureCellContext = useContext(PureCellContext);\n\n const titleProps = {\n tag: 'h4',\n view: 'small',\n color,\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 <TitleResponsive\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={cn(styles.weight, className)}\n dataTestId={getDataTestId(\n dataTestId || pureCellContext.dataTestId,\n 'core-amount-title',\n )}\n {...restProps}\n bold='none'\n />\n </TitleResponsive>\n );\n};\n"],"names":["CoreAmount"],"mappings":";;;;;;;;AAoCO,MAAM,WAAW,GAAoB,CAAC,EACzC,QAAQ,EACR,UAAU,GAAG,GAAG,EAChB,MAAM,EACN,SAAS,EACT,KAAK,GAAG,SAAS,EACjB,UAAU,EACV,UAAU,EAAE,mBAAmB,GAAG,EAAE,EACpC,GAAG,SAAS,EACf,KAAI;AACD,IAAA,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC;AAEnD,IAAA,MAAM,UAAU,GAAG;AACf,QAAA,GAAG,EAAE,IAAI;AACT,QAAA,IAAI,EAAE,OAAO;QACb,KAAK;AACL,QAAA,GAAG,mBAAmB;KACuB;AAEjD,IAAA,IAAI,MAAM,EAAE;AACR,QAAA,QACI,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAiB,cAAA,EAAA,UAAU,CAAC,IAAI,CAAA,CAAE,CAAC,CAAC,EAAA;YAChF,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,UAAU,CAAC,IAAI,CAAE,CAAA,CAAC,CAAC,EAAI,CAAA,CACxE;AAEb;AAED,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,eAAe,EAAA,EAAA,GACR,UAAU,EACd,UAAU,EAAE,aAAa,CAAC,UAAU,IAAI,eAAe,CAAC,UAAU,EAAE,cAAc,CAAC,EACnF,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,mBAAmB,EAAE,SAAS,CAAC,EAAA;AAE/D,QAAA,KAAA,CAAA,aAAA,CAACA,MAAU,EACP,EAAA,QAAQ,EAAE,QAAQ,IAAI,UAAU,EAChC,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,EACvC,UAAU,EAAE,aAAa,CACrB,UAAU,IAAI,eAAe,CAAC,UAAU,EACxC,mBAAmB,CACtB,EACG,GAAA,SAAS,EACb,IAAI,EAAC,MAAM,EACb,CAAA,CACY;AAE1B;;;;"}
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 Color, type TitleProps, TitleResponsive } 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 * @deprecated Используйте titleProps.color\n */\n color?: Color;\n\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 color = 'primary',\n dataTestId,\n titleProps: titlePropsFromProps = {},\n ...restProps\n}) => {\n const pureCellContext = useContext(PureCellContext);\n\n const titleProps = {\n tag: 'h4',\n view: 'small',\n color,\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 <TitleResponsive\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={cn(styles.weight, className)}\n dataTestId={getDataTestId(\n dataTestId || pureCellContext.dataTestId,\n 'core-amount-title',\n )}\n {...restProps}\n bold='none'\n />\n </TitleResponsive>\n );\n};\n"],"names":["CoreAmount"],"mappings":";;;;;;;;AAoCO,MAAM,WAAW,GAAoB,CAAC,EACzC,QAAQ,EACR,UAAU,GAAG,GAAG,EAChB,MAAM,EACN,SAAS,EACT,KAAK,GAAG,SAAS,EACjB,UAAU,EACV,UAAU,EAAE,mBAAmB,GAAG,EAAE,EACpC,GAAG,SAAS,EACf,KAAI;AACD,IAAA,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC;AAEnD,IAAA,MAAM,UAAU,GAAG;AACf,QAAA,GAAG,EAAE,IAAI;AACT,QAAA,IAAI,EAAE,OAAO;QACb,KAAK;AACL,QAAA,GAAG,mBAAmB;KACuB;AAEjD,IAAA,IAAI,MAAM,EAAE;AACR,QAAA,QACI,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAiB,cAAA,EAAA,UAAU,CAAC,IAAI,CAAA,CAAE,CAAC,CAAC,EAAA;YAChF,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,UAAU,CAAC,IAAI,CAAE,CAAA,CAAC,CAAC,EAAI,CAAA,CACxE;AAEb;AAED,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,eAAe,EAAA,EAAA,GACR,UAAU,EACd,UAAU,EAAE,aAAa,CAAC,UAAU,IAAI,eAAe,CAAC,UAAU,EAAE,cAAc,CAAC,EACnF,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,mBAAmB,EAAE,SAAS,CAAC,EAAA;AAE/D,QAAA,KAAA,CAAA,aAAA,CAACA,MAAU,EACP,EAAA,QAAQ,EAAE,QAAQ,IAAI,UAAU,EAChC,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,EACvC,UAAU,EAAE,aAAa,CACrB,UAAU,IAAI,eAAe,CAAC,UAAU,EACxC,mBAAmB,CACtB,EACG,GAAA,SAAS,EACb,IAAI,EAAC,MAAM,EACb,CAAA,CACY;AAE1B;;;;"}
@@ -1,3 +1,5 @@
1
+
2
+
1
3
  .component {
2
4
  display: flex;
3
5
  }
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from 'react';
1
+ import React, { type ReactNode } from 'react';
2
2
  declare type Props = {
3
3
  /**
4
4
  * Наименование категории
@@ -1,7 +1,7 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { getDataTestId } from '@alfalab/core-components-shared/moderncssm';
3
3
  import { Text } from '@alfalab/core-components-typography/moderncssm';
4
- import { PureCellContext } from '../../component.js';
4
+ import { PureCellContext } from '../../context.js';
5
5
  import styles from './index.module.css';
6
6
 
7
7
  const Category = ({ categoryName, categoryPercent, rightAddons, dataTestId, }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../../src/components/category/component.tsx"],"sourcesContent":["import React, { ReactNode, useContext } from 'react';\n\nimport { getDataTestId } from '@alfalab/core-components-shared';\nimport { Text } from '@alfalab/core-components-typography';\n\nimport { PureCellContext } from '../../component';\n\nimport styles from './index.module.css';\n\ntype Props = {\n /**\n * Наименование категории\n */\n categoryName: string;\n\n /**\n * Процент категории\n */\n categoryPercent?: number;\n\n /**\n * Слот справа\n */\n rightAddons?: ReactNode;\n\n /**\n * Идентификатор для систем автоматизированного тестирования.\n * Для наименования категории используется модификатор -category-name,\n * процент категории -category-percent, слота справа -category-right-addon\n */\n dataTestId?: string;\n};\n\nexport const Category: React.FC<Props> = ({\n categoryName,\n categoryPercent,\n rightAddons,\n dataTestId,\n}) => {\n const pureCellContext = useContext(PureCellContext);\n\n return (\n <div className={styles.component} data-test-id='cell-pure-category'>\n <Text\n view='primary-small'\n color='secondary'\n dataTestId={getDataTestId(\n dataTestId || pureCellContext.dataTestId,\n 'category-name',\n )}\n className={styles.categoryName}\n >\n {categoryName}\n </Text>\n {categoryPercent !== undefined && (\n <Text\n tag='div'\n view='primary-small'\n color='secondary'\n className={styles.categoryPercent}\n dataTestId={getDataTestId(\n dataTestId || pureCellContext.dataTestId,\n 'category-percent',\n )}\n >\n {categoryPercent}%\n </Text>\n )}\n {rightAddons !== undefined && (\n <div\n className={styles.rightAddon}\n data-test-id={getDataTestId(\n dataTestId || pureCellContext.dataTestId,\n 'category-right-addon',\n )}\n >\n {rightAddons}\n </div>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAiCO,MAAM,QAAQ,GAAoB,CAAC,EACtC,YAAY,EACZ,eAAe,EACf,WAAW,EACX,UAAU,GACb,KAAI;AACD,IAAA,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC;IAEnD,QACI,6BAAK,SAAS,EAAE,MAAM,CAAC,SAAS,kBAAe,oBAAoB,EAAA;AAC/D,QAAA,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EACD,IAAI,EAAC,eAAe,EACpB,KAAK,EAAC,WAAW,EACjB,UAAU,EAAE,aAAa,CACrB,UAAU,IAAI,eAAe,CAAC,UAAU,EACxC,eAAe,CAClB,EACD,SAAS,EAAE,MAAM,CAAC,YAAY,EAAA,EAE7B,YAAY,CACV;AACN,QAAA,eAAe,KAAK,SAAS,KAC1B,KAAA,CAAA,aAAA,CAAC,IAAI,EACD,EAAA,GAAG,EAAC,KAAK,EACT,IAAI,EAAC,eAAe,EACpB,KAAK,EAAC,WAAW,EACjB,SAAS,EAAE,MAAM,CAAC,eAAe,EACjC,UAAU,EAAE,aAAa,CACrB,UAAU,IAAI,eAAe,CAAC,UAAU,EACxC,kBAAkB,CACrB,EAAA;YAEA,eAAe;gBACb,CACV;QACA,WAAW,KAAK,SAAS,KACtB,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACI,SAAS,EAAE,MAAM,CAAC,UAAU,EAAA,cAAA,EACd,aAAa,CACvB,UAAU,IAAI,eAAe,CAAC,UAAU,EACxC,sBAAsB,CACzB,EAEA,EAAA,WAAW,CACV,CACT,CACC;AAEd;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../../../src/components/category/component.tsx"],"sourcesContent":["import React, { type ReactNode, useContext } from 'react';\n\nimport { getDataTestId } from '@alfalab/core-components-shared';\nimport { Text } from '@alfalab/core-components-typography';\n\nimport { PureCellContext } from '../../context';\n\nimport styles from './index.module.css';\n\ntype Props = {\n /**\n * Наименование категории\n */\n categoryName: string;\n\n /**\n * Процент категории\n */\n categoryPercent?: number;\n\n /**\n * Слот справа\n */\n rightAddons?: ReactNode;\n\n /**\n * Идентификатор для систем автоматизированного тестирования.\n * Для наименования категории используется модификатор -category-name,\n * процент категории -category-percent, слота справа -category-right-addon\n */\n dataTestId?: string;\n};\n\nexport const Category: React.FC<Props> = ({\n categoryName,\n categoryPercent,\n rightAddons,\n dataTestId,\n}) => {\n const pureCellContext = useContext(PureCellContext);\n\n return (\n <div className={styles.component} data-test-id='cell-pure-category'>\n <Text\n view='primary-small'\n color='secondary'\n dataTestId={getDataTestId(\n dataTestId || pureCellContext.dataTestId,\n 'category-name',\n )}\n className={styles.categoryName}\n >\n {categoryName}\n </Text>\n {categoryPercent !== undefined && (\n <Text\n tag='div'\n view='primary-small'\n color='secondary'\n className={styles.categoryPercent}\n dataTestId={getDataTestId(\n dataTestId || pureCellContext.dataTestId,\n 'category-percent',\n )}\n >\n {categoryPercent}%\n </Text>\n )}\n {rightAddons !== undefined && (\n <div\n className={styles.rightAddon}\n data-test-id={getDataTestId(\n dataTestId || pureCellContext.dataTestId,\n 'category-right-addon',\n )}\n >\n {rightAddons}\n </div>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAiCO,MAAM,QAAQ,GAAoB,CAAC,EACtC,YAAY,EACZ,eAAe,EACf,WAAW,EACX,UAAU,GACb,KAAI;AACD,IAAA,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC;IAEnD,QACI,6BAAK,SAAS,EAAE,MAAM,CAAC,SAAS,kBAAe,oBAAoB,EAAA;AAC/D,QAAA,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EACD,IAAI,EAAC,eAAe,EACpB,KAAK,EAAC,WAAW,EACjB,UAAU,EAAE,aAAa,CACrB,UAAU,IAAI,eAAe,CAAC,UAAU,EACxC,eAAe,CAClB,EACD,SAAS,EAAE,MAAM,CAAC,YAAY,EAAA,EAE7B,YAAY,CACV;AACN,QAAA,eAAe,KAAK,SAAS,KAC1B,KAAA,CAAA,aAAA,CAAC,IAAI,EACD,EAAA,GAAG,EAAC,KAAK,EACT,IAAI,EAAC,eAAe,EACpB,KAAK,EAAC,WAAW,EACjB,SAAS,EAAE,MAAM,CAAC,eAAe,EACjC,UAAU,EAAE,aAAa,CACrB,UAAU,IAAI,eAAe,CAAC,UAAU,EACxC,kBAAkB,CACrB,EAAA;YAEA,eAAe;gBACb,CACV;QACA,WAAW,KAAK,SAAS,KACtB,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACI,SAAS,EAAE,MAAM,CAAC,UAAU,EAAA,cAAA,EACd,aAAa,CACvB,UAAU,IAAI,eAAe,CAAC,UAAU,EACxC,sBAAsB,CACzB,EAEA,EAAA,WAAW,CACV,CACT,CACC;AAEd;;;;"}
@@ -1,3 +1,5 @@
1
+
2
+
1
3
  .component {
2
4
  display: flex;
3
5
  overflow: hidden;