@alfalab/core-components-pure-cell 4.8.1 → 4.9.0

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 (205) hide show
  1. package/{esm/component-6a644022.d.ts → component-5aa16b0d.d.ts} +12 -0
  2. package/{component-81e75437.js → component-5aa16b0d.js} +133 -27
  3. package/{component-21d7b687.d.ts → component-6a954af1.d.ts} +4 -0
  4. package/component.js +1 -1
  5. package/components/addon/component.js +2 -1
  6. package/components/addon/index.css +35 -10
  7. package/components/addon/index.d.ts +1 -1
  8. package/components/addon/index.js +1 -1
  9. package/components/amount/component.js +1 -1
  10. package/components/amount/index.css +2 -2
  11. package/components/amount/index.d.ts +1 -1
  12. package/components/amount/index.js +1 -1
  13. package/components/amount-title/component.js +1 -1
  14. package/components/amount-title/index.css +3 -3
  15. package/components/amount-title/index.d.ts +1 -1
  16. package/components/amount-title/index.js +1 -1
  17. package/components/category/component.js +1 -1
  18. package/components/category/index.css +5 -5
  19. package/components/category/index.d.ts +1 -1
  20. package/components/category/index.js +1 -1
  21. package/components/content/component.js +1 -1
  22. package/components/content/index.css +3 -3
  23. package/components/content/index.d.ts +1 -1
  24. package/components/content/index.js +1 -1
  25. package/components/footer/component.js +1 -1
  26. package/components/footer/index.css +4 -4
  27. package/components/footer/index.d.ts +1 -1
  28. package/components/footer/index.js +1 -1
  29. package/components/footer-button/component.js +1 -1
  30. package/components/footer-button/index.css +2 -2
  31. package/components/footer-button/index.d.ts +1 -1
  32. package/components/footer-button/index.js +1 -1
  33. package/components/footer-text/component.js +1 -1
  34. package/components/footer-text/index.d.ts +1 -1
  35. package/components/footer-text/index.js +1 -1
  36. package/components/graphics/component.js +2 -1
  37. package/components/graphics/index.css +41 -15
  38. package/components/graphics/index.d.ts +1 -1
  39. package/components/graphics/index.js +1 -1
  40. package/components/main/component.js +2 -1
  41. package/components/main/index.css +31 -5
  42. package/components/main/index.d.ts +1 -1
  43. package/components/main/index.js +1 -1
  44. package/components/text/component.js +1 -1
  45. package/components/text/index.css +7 -7
  46. package/components/text/index.d.ts +1 -1
  47. package/components/text/index.js +1 -1
  48. package/{esm/component-21d7b687.d.ts → cssm/component-6a954af1.d.ts} +4 -0
  49. package/{component-81e75437.d.ts → cssm/component-719b272a.d.ts} +12 -0
  50. package/cssm/{component-063660c0.js → component-719b272a.js} +122 -16
  51. package/cssm/component.js +1 -1
  52. package/cssm/components/addon/component.js +2 -1
  53. package/cssm/components/addon/index.d.ts +1 -1
  54. package/cssm/components/addon/index.js +1 -1
  55. package/cssm/components/addon/index.module.css +25 -0
  56. package/cssm/components/amount/component.js +1 -1
  57. package/cssm/components/amount/index.d.ts +1 -1
  58. package/cssm/components/amount/index.js +1 -1
  59. package/cssm/components/amount-title/component.js +1 -1
  60. package/cssm/components/amount-title/index.d.ts +1 -1
  61. package/cssm/components/amount-title/index.js +1 -1
  62. package/cssm/components/category/component.js +1 -1
  63. package/cssm/components/category/index.d.ts +1 -1
  64. package/cssm/components/category/index.js +1 -1
  65. package/cssm/components/content/component.js +1 -1
  66. package/cssm/components/content/index.d.ts +1 -1
  67. package/cssm/components/content/index.js +1 -1
  68. package/cssm/components/footer/component.js +1 -1
  69. package/cssm/components/footer/index.d.ts +1 -1
  70. package/cssm/components/footer/index.js +1 -1
  71. package/cssm/components/footer-button/component.js +1 -1
  72. package/cssm/components/footer-button/index.d.ts +1 -1
  73. package/cssm/components/footer-button/index.js +1 -1
  74. package/cssm/components/footer-text/component.js +1 -1
  75. package/cssm/components/footer-text/index.d.ts +1 -1
  76. package/cssm/components/footer-text/index.js +1 -1
  77. package/cssm/components/graphics/component.js +2 -1
  78. package/cssm/components/graphics/index.d.ts +1 -1
  79. package/cssm/components/graphics/index.js +1 -1
  80. package/cssm/components/graphics/index.module.css +26 -0
  81. package/cssm/components/main/component.js +2 -1
  82. package/cssm/components/main/index.d.ts +1 -1
  83. package/cssm/components/main/index.js +1 -1
  84. package/cssm/components/main/index.module.css +27 -1
  85. package/cssm/components/text/component.js +1 -1
  86. package/cssm/components/text/index.d.ts +1 -1
  87. package/cssm/components/text/index.js +1 -1
  88. package/cssm/index.d.ts +2 -2
  89. package/cssm/index.js +1 -1
  90. package/cssm/index.module.css +4 -4
  91. package/cssm/vars.css +17 -0
  92. package/{cssm/component-21d7b687.d.ts → esm/component-6a954af1.d.ts} +4 -0
  93. package/{modern/component-ef65ce67.d.ts → esm/component-f3f965f3.d.ts} +12 -0
  94. package/esm/{component-6a644022.js → component-f3f965f3.js} +135 -29
  95. package/esm/component.js +1 -1
  96. package/esm/components/addon/component.js +2 -1
  97. package/esm/components/addon/index.css +35 -10
  98. package/esm/components/addon/index.d.ts +1 -1
  99. package/esm/components/addon/index.js +1 -1
  100. package/esm/components/amount/component.js +1 -1
  101. package/esm/components/amount/index.css +2 -2
  102. package/esm/components/amount/index.d.ts +1 -1
  103. package/esm/components/amount/index.js +1 -1
  104. package/esm/components/amount-title/component.js +1 -1
  105. package/esm/components/amount-title/index.css +3 -3
  106. package/esm/components/amount-title/index.d.ts +1 -1
  107. package/esm/components/amount-title/index.js +1 -1
  108. package/esm/components/category/component.js +1 -1
  109. package/esm/components/category/index.css +5 -5
  110. package/esm/components/category/index.d.ts +1 -1
  111. package/esm/components/category/index.js +1 -1
  112. package/esm/components/content/component.js +1 -1
  113. package/esm/components/content/index.css +3 -3
  114. package/esm/components/content/index.d.ts +1 -1
  115. package/esm/components/content/index.js +1 -1
  116. package/esm/components/footer/component.js +1 -1
  117. package/esm/components/footer/index.css +4 -4
  118. package/esm/components/footer/index.d.ts +1 -1
  119. package/esm/components/footer/index.js +1 -1
  120. package/esm/components/footer-button/component.js +1 -1
  121. package/esm/components/footer-button/index.css +2 -2
  122. package/esm/components/footer-button/index.d.ts +1 -1
  123. package/esm/components/footer-button/index.js +1 -1
  124. package/esm/components/footer-text/component.js +1 -1
  125. package/esm/components/footer-text/index.d.ts +1 -1
  126. package/esm/components/footer-text/index.js +1 -1
  127. package/esm/components/graphics/component.js +2 -1
  128. package/esm/components/graphics/index.css +41 -15
  129. package/esm/components/graphics/index.d.ts +1 -1
  130. package/esm/components/graphics/index.js +1 -1
  131. package/esm/components/main/component.js +2 -1
  132. package/esm/components/main/index.css +31 -5
  133. package/esm/components/main/index.d.ts +1 -1
  134. package/esm/components/main/index.js +1 -1
  135. package/esm/components/text/component.js +1 -1
  136. package/esm/components/text/index.css +7 -7
  137. package/esm/components/text/index.d.ts +1 -1
  138. package/esm/components/text/index.js +1 -1
  139. package/esm/index.css +29 -29
  140. package/esm/index.d.ts +2 -2
  141. package/esm/index.js +1 -1
  142. package/index.css +29 -29
  143. package/index.d.ts +2 -2
  144. package/index.js +1 -1
  145. package/{cssm/component-063660c0.d.ts → modern/component-1f635679.d.ts} +12 -0
  146. package/modern/{component-ef65ce67.js → component-1f635679.js} +125 -27
  147. package/modern/{component-21d7b687.d.ts → component-6a954af1.d.ts} +4 -0
  148. package/modern/component.js +1 -1
  149. package/modern/components/addon/component.js +1 -1
  150. package/modern/components/addon/index.css +35 -10
  151. package/modern/components/addon/index.d.ts +1 -1
  152. package/modern/components/addon/index.js +1 -1
  153. package/modern/components/amount/component.js +1 -1
  154. package/modern/components/amount/index.css +2 -2
  155. package/modern/components/amount/index.d.ts +1 -1
  156. package/modern/components/amount/index.js +1 -1
  157. package/modern/components/amount-title/component.js +1 -1
  158. package/modern/components/amount-title/index.css +3 -3
  159. package/modern/components/amount-title/index.d.ts +1 -1
  160. package/modern/components/amount-title/index.js +1 -1
  161. package/modern/components/category/component.js +1 -1
  162. package/modern/components/category/index.css +5 -5
  163. package/modern/components/category/index.d.ts +1 -1
  164. package/modern/components/category/index.js +1 -1
  165. package/modern/components/content/component.js +1 -1
  166. package/modern/components/content/index.css +3 -3
  167. package/modern/components/content/index.d.ts +1 -1
  168. package/modern/components/content/index.js +1 -1
  169. package/modern/components/footer/component.js +1 -1
  170. package/modern/components/footer/index.css +4 -4
  171. package/modern/components/footer/index.d.ts +1 -1
  172. package/modern/components/footer/index.js +1 -1
  173. package/modern/components/footer-button/component.js +1 -1
  174. package/modern/components/footer-button/index.css +2 -2
  175. package/modern/components/footer-button/index.d.ts +1 -1
  176. package/modern/components/footer-button/index.js +1 -1
  177. package/modern/components/footer-text/component.js +1 -1
  178. package/modern/components/footer-text/index.d.ts +1 -1
  179. package/modern/components/footer-text/index.js +1 -1
  180. package/modern/components/graphics/component.js +1 -1
  181. package/modern/components/graphics/index.css +41 -15
  182. package/modern/components/graphics/index.d.ts +1 -1
  183. package/modern/components/graphics/index.js +1 -1
  184. package/modern/components/main/component.js +1 -1
  185. package/modern/components/main/index.css +31 -5
  186. package/modern/components/main/index.d.ts +1 -1
  187. package/modern/components/main/index.js +1 -1
  188. package/modern/components/text/component.js +1 -1
  189. package/modern/components/text/index.css +7 -7
  190. package/modern/components/text/index.d.ts +1 -1
  191. package/modern/components/text/index.js +1 -1
  192. package/modern/index.css +29 -29
  193. package/modern/index.d.ts +2 -2
  194. package/modern/index.js +1 -1
  195. package/package.json +3 -3
  196. package/src/component.tsx +33 -5
  197. package/src/components/addon/component.tsx +35 -3
  198. package/src/components/addon/index.module.css +15 -1
  199. package/src/components/footer-button/component.tsx +32 -1
  200. package/src/components/graphics/component.tsx +33 -2
  201. package/src/components/graphics/index.module.css +16 -1
  202. package/src/components/main/component.tsx +39 -4
  203. package/src/components/main/index.module.css +16 -1
  204. package/src/index.module.css +4 -4
  205. package/src/vars.css +6 -0
@@ -1,4 +1,4 @@
1
- /* hash: aks5m */
1
+ /* hash: 14ovh */
2
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 */
@@ -15,12 +15,12 @@
15
15
  --gap-xs: 8px;
16
16
  } :root {
17
17
  } :root {
18
- } .pure-cell__component_17wih {
18
+ } .pure-cell__component_stkzt {
19
19
  grid-column: 1/3;
20
20
  display: grid;
21
21
  grid-row-gap: var(--gap-xs)
22
- } .pure-cell__component_17wih.pure-cell__none_17wih {
22
+ } .pure-cell__component_stkzt.pure-cell__none_stkzt {
23
23
  margin-top: 0;
24
- } .pure-cell__component_17wih.pure-cell__default_17wih {
24
+ } .pure-cell__component_stkzt.pure-cell__default_stkzt {
25
25
  margin-top: var(--gap-xs);
26
26
  }
@@ -1 +1 @@
1
- export * from "../../component-ef65ce67";
1
+ export * from "../../component-1f635679";
@@ -1 +1 @@
1
- export { F as Footer } from '../../component-ef65ce67.js';
1
+ export { F as Footer } from '../../component-1f635679.js';
@@ -1,4 +1,4 @@
1
1
  import 'react';
2
2
  import '@alfalab/core-components-button/modern';
3
3
  import '@alfalab/core-components-shared/modern';
4
- export { d as FooterButton } from '../../component-ef65ce67.js';
4
+ export { d as FooterButton } from '../../component-1f635679.js';
@@ -1,4 +1,4 @@
1
- /* hash: izt4j */
1
+ /* hash: 5y7hd */
2
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 */
@@ -14,6 +14,6 @@
14
14
  } :root {
15
15
  } :root {
16
16
  } :root {
17
- } .pure-cell__component_6ojmm {
17
+ } .pure-cell__component_f9m0w {
18
18
  justify-self: start;
19
19
  }
@@ -1 +1 @@
1
- export * from "../../component-ef65ce67";
1
+ export * from "../../component-1f635679";
@@ -1 +1 @@
1
- export { d as FooterButton } from '../../component-ef65ce67.js';
1
+ export { d as FooterButton } from '../../component-1f635679.js';
@@ -1,4 +1,4 @@
1
1
  import 'react';
2
2
  import '@alfalab/core-components-shared/modern';
3
3
  import '@alfalab/core-components-typography/modern';
4
- export { e as FooterText } from '../../component-ef65ce67.js';
4
+ export { e as FooterText } from '../../component-1f635679.js';
@@ -1 +1 @@
1
- export * from "../../component-ef65ce67";
1
+ export * from "../../component-1f635679";
@@ -1 +1 @@
1
- export { e as FooterText } from '../../component-ef65ce67.js';
1
+ export { e as FooterText } from '../../component-1f635679.js';
@@ -1,4 +1,4 @@
1
1
  import 'react';
2
2
  import 'classnames';
3
3
  import '@alfalab/core-components-shared/modern';
4
- export { G as Graphics } from '../../component-ef65ce67.js';
4
+ export { G as Graphics } from '../../component-1f635679.js';
@@ -1,4 +1,4 @@
1
- /* hash: bn8ss */
1
+ /* hash: t6t75 */
2
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 */
@@ -18,33 +18,59 @@
18
18
  --gap-m: 16px;
19
19
  } :root {
20
20
  } :root {
21
- } .pure-cell__component_xhf99 {
21
+ } :root {
22
+ --pure-cell-clickable-area-hover-opacity: 1;
23
+ --pure-cell-clickable-area-active-opacity: 1;
24
+ } .pure-cell__component_19mg8 {
22
25
  display: inline-flex;
23
26
  flex-basis: auto;
24
- } .pure-cell__top_xhf99 {
27
+ } .pure-cell__top_19mg8 {
25
28
  align-self: flex-start;
26
- } .pure-cell__center_xhf99 {
29
+ } .pure-cell__center_19mg8 {
27
30
  align-self: center;
28
- } .pure-cell__bottom_xhf99 {
31
+ } .pure-cell__bottom_19mg8 {
29
32
  align-self: flex-end;
30
- } .pure-cell__horizontal_xhf99:not(:last-child).pure-cell__none_xhf99 {
33
+ } .pure-cell__horizontal_19mg8:not(:last-child).pure-cell__none_19mg8 {
31
34
  margin-right: 0;
32
- } .pure-cell__horizontal_xhf99:not(:last-child).pure-cell__airy_xhf99 {
35
+ } .pure-cell__horizontal_19mg8:not(:last-child).pure-cell__airy_19mg8 {
33
36
  margin-right: var(--gap-m);
34
- } .pure-cell__horizontal_xhf99:not(:last-child).pure-cell__default_xhf99 {
37
+ } .pure-cell__horizontal_19mg8:not(:last-child).pure-cell__default_19mg8 {
35
38
  margin-right: var(--gap-s);
36
- } .pure-cell__horizontal_xhf99:not(:last-child).pure-cell__compact_xhf99 {
39
+ } .pure-cell__horizontal_19mg8:not(:last-child).pure-cell__compact_19mg8 {
37
40
  margin-right: var(--gap-xs);
38
- } .pure-cell__horizontal_xhf99:not(:last-child).pure-cell__tiny_xhf99 {
41
+ } .pure-cell__horizontal_19mg8:not(:last-child).pure-cell__tiny_19mg8 {
39
42
  margin-right: var(--gap-2xs);
40
- } .pure-cell__vertical_xhf99:not(:last-child).pure-cell__none_xhf99 {
43
+ } .pure-cell__vertical_19mg8:not(:last-child).pure-cell__none_19mg8 {
41
44
  margin-bottom: 0;
42
- } .pure-cell__vertical_xhf99:not(:last-child).pure-cell__airy_xhf99 {
45
+ } .pure-cell__vertical_19mg8:not(:last-child).pure-cell__airy_19mg8 {
43
46
  margin-bottom: var(--gap-m);
44
- } .pure-cell__vertical_xhf99:not(:last-child).pure-cell__default_xhf99 {
47
+ } .pure-cell__vertical_19mg8:not(:last-child).pure-cell__default_19mg8 {
45
48
  margin-bottom: var(--gap-s);
46
- } .pure-cell__vertical_xhf99:not(:last-child).pure-cell__compact_xhf99 {
49
+ } .pure-cell__vertical_19mg8:not(:last-child).pure-cell__compact_19mg8 {
47
50
  margin-bottom: var(--gap-xs);
48
- } .pure-cell__vertical_xhf99:not(:last-child).pure-cell__tiny_xhf99 {
51
+ } .pure-cell__vertical_19mg8:not(:last-child).pure-cell__tiny_19mg8 {
49
52
  margin-bottom: var(--gap-2xs);
53
+ } .pure-cell__button_19mg8 {
54
+ box-sizing: border-box;
55
+ background-color: transparent;
56
+ -webkit-tap-highlight-color: transparent;
57
+ outline: none;
58
+ border: 0;
59
+ margin: 0;
60
+ box-shadow: none;
61
+ border-radius: 0;
62
+ -webkit-user-select: none;
63
+ user-select: none;
64
+ vertical-align: middle;
65
+ appearance: none;
66
+ text-decoration: none;
67
+ min-width: 0;
68
+ cursor: pointer;
69
+ padding: 0;
70
+ transition: opacity 0.15s ease-in-out;
71
+ min-width: auto
72
+ } .pure-cell__button_19mg8:hover {
73
+ opacity: var(--pure-cell-clickable-area-hover-opacity);
74
+ } .pure-cell__button_19mg8:active {
75
+ opacity: var(--pure-cell-clickable-area-active-opacity);
50
76
  }
@@ -1 +1 @@
1
- export * from "../../component-ef65ce67";
1
+ export * from "../../component-1f635679";
@@ -1 +1 @@
1
- export { G as Graphics } from '../../component-ef65ce67.js';
1
+ export { G as Graphics } from '../../component-1f635679.js';
@@ -1,4 +1,4 @@
1
1
  import 'react';
2
2
  import 'classnames';
3
3
  import '@alfalab/core-components-shared/modern';
4
- export { M as Main } from '../../component-ef65ce67.js';
4
+ export { M as Main } from '../../component-1f635679.js';
@@ -1,4 +1,4 @@
1
- /* hash: xaa7e */
1
+ /* hash: 1wnmi */
2
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 */
@@ -15,20 +15,46 @@
15
15
  --gap-3xs: 2px;
16
16
  } :root {
17
17
  } :root {
18
- } .pure-cell__component_19tfu {
18
+ } :root {
19
+ --pure-cell-clickable-area-hover-opacity: 1;
20
+ --pure-cell-clickable-area-active-opacity: 1;
21
+ } .pure-cell__component_10s3g {
19
22
  display: flex;
20
23
  flex-direction: column;
21
24
  align-self: center;
22
25
 
23
26
  /* can use /r/n */
24
27
  white-space: pre-line
25
- } .pure-cell__component_19tfu.pure-cell__vertical_19tfu {
28
+ } .pure-cell__component_10s3g.pure-cell__vertical_10s3g {
26
29
  grid-row-gap: var(--gap-3xs);
27
30
  justify-content: center;
28
31
  align-items: center;
29
32
 
30
33
  /* for button */
31
34
  text-align: center;
32
- } .pure-cell__component_19tfu.pure-cell__reverse_19tfu {
35
+ } .pure-cell__component_10s3g.pure-cell__reverse_10s3g {
33
36
  flex-direction: column-reverse;
34
- }
37
+ } .pure-cell__component_10s3g.pure-cell__button_10s3g {
38
+ box-sizing: border-box;
39
+ background-color: transparent;
40
+ -webkit-tap-highlight-color: transparent;
41
+ outline: none;
42
+ border: 0;
43
+ margin: 0;
44
+ box-shadow: none;
45
+ border-radius: 0;
46
+ -webkit-user-select: none;
47
+ user-select: none;
48
+ vertical-align: middle;
49
+ appearance: none;
50
+ text-decoration: none;
51
+ min-width: 0;
52
+ cursor: pointer;
53
+ padding: 0;
54
+ transition: opacity 0.15s ease-in-out;
55
+ min-width: auto
56
+ } .pure-cell__component_10s3g.pure-cell__button_10s3g:hover {
57
+ opacity: var(--pure-cell-clickable-area-hover-opacity);
58
+ } .pure-cell__component_10s3g.pure-cell__button_10s3g:active {
59
+ opacity: var(--pure-cell-clickable-area-active-opacity);
60
+ }
@@ -1 +1 @@
1
- export * from "../../component-ef65ce67";
1
+ export * from "../../component-1f635679";
@@ -1 +1 @@
1
- export { M as Main } from '../../component-ef65ce67.js';
1
+ export { M as Main } from '../../component-1f635679.js';
@@ -2,4 +2,4 @@ import 'react';
2
2
  import 'classnames';
3
3
  import '@alfalab/core-components-shared/modern';
4
4
  import '@alfalab/core-components-typography/modern';
5
- export { T as Text } from '../../component-ef65ce67.js';
5
+ export { T as Text } from '../../component-1f635679.js';
@@ -1,4 +1,4 @@
1
- /* hash: 524dt */
1
+ /* hash: z67pt */
2
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 */
@@ -16,29 +16,29 @@
16
16
  --gap-m: 16px;
17
17
  } :root {
18
18
  } :root {
19
- } .pure-cell__horizontal_1ima4 {
19
+ } .pure-cell__horizontal_13jcm {
20
20
  padding: var(--gap-3xs) 0;
21
- } .pure-cell__rowLimit1_1ima4 {
21
+ } .pure-cell__rowLimit1_13jcm {
22
22
  -webkit-line-clamp: 1;
23
23
  display: -webkit-box;
24
24
  -webkit-box-orient: vertical;
25
25
  overflow: hidden;
26
26
  word-break: break-all;
27
- } .pure-cell__rowLimit2_1ima4 {
27
+ } .pure-cell__rowLimit2_13jcm {
28
28
  -webkit-line-clamp: 2;
29
29
  display: -webkit-box;
30
30
  -webkit-box-orient: vertical;
31
31
  overflow: hidden;
32
- } .pure-cell__component_1ima4 {
32
+ } .pure-cell__component_13jcm {
33
33
  display: flex;
34
34
  flex-direction: row;
35
35
  flex-wrap: nowrap;
36
36
  justify-content: space-between;
37
37
  margin: var(--gap-3xs) 0;
38
38
  word-break: break-word;
39
- } .pure-cell__component_1ima4 .pure-cell__vertical_1ima4 {
39
+ } .pure-cell__component_13jcm .pure-cell__vertical_13jcm {
40
40
  justify-content: center;
41
- } .pure-cell__title_1ima4 + .pure-cell__value_1ima4 {
41
+ } .pure-cell__title_13jcm + .pure-cell__value_13jcm {
42
42
  margin-left: var(--gap-m);
43
43
  flex-shrink: 0;
44
44
  }
@@ -1 +1 @@
1
- export * from "../../component-ef65ce67";
1
+ export * from "../../component-1f635679";
@@ -1 +1 @@
1
- export { T as Text } from '../../component-ef65ce67.js';
1
+ export { T as Text } from '../../component-1f635679.js';
package/modern/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1qt6n */
1
+ /* hash: 1eiv8 */
2
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 {
4
4
  --color-light-border-link: #2288fa; /* 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 */
@@ -20,17 +20,17 @@
20
20
  } :root {
21
21
  } :root {
22
22
  --focus-color: var(--color-light-border-link);
23
- } .pure-cell__component_1vn59 {
23
+ } .pure-cell__component_njcbn {
24
24
  text-align: unset;
25
25
  box-sizing: border-box;
26
- } .pure-cell__horizontal_1vn59 {
26
+ } .pure-cell__horizontal_njcbn {
27
27
  display: flex;
28
28
  width: 100%;
29
- } .pure-cell__vertical_1vn59 {
29
+ } .pure-cell__vertical_njcbn {
30
30
  display: flex;
31
31
  align-items: center;
32
32
  flex-direction: column;
33
- } .pure-cell__button_1vn59 {
33
+ } .pure-cell__button_njcbn {
34
34
  font-family: inherit;
35
35
  background: none;
36
36
  border: 0;
@@ -38,57 +38,57 @@
38
38
  cursor: pointer;
39
39
  transition: opacity 0.15s ease-in-out;
40
40
  padding: 0
41
- } .pure-cell__button_1vn59:hover {
41
+ } .pure-cell__button_njcbn.pure-cell__hover_njcbn {
42
42
  opacity: 0.8;
43
- } .pure-cell__button_1vn59:active {
43
+ } .pure-cell__button_njcbn.pure-cell__active_njcbn {
44
44
  opacity: 0.6;
45
- } .pure-cell__link_1vn59 {
45
+ } .pure-cell__link_njcbn {
46
46
  text-decoration: none;
47
47
  color: inherit;
48
48
  cursor: pointer;
49
49
  transition: opacity 0.15s ease-in-out
50
- } .pure-cell__link_1vn59:hover {
50
+ } .pure-cell__link_njcbn.pure-cell__hover_njcbn {
51
51
  opacity: 0.8;
52
- } .pure-cell__link_1vn59:active {
52
+ } .pure-cell__link_njcbn.pure-cell__active_njcbn {
53
53
  opacity: 0.6;
54
- } .pure-cell__none_1vn59 {
54
+ } .pure-cell__none_njcbn {
55
55
  padding: 0;
56
- } .pure-cell__airy_1vn59 {
56
+ } .pure-cell__airy_njcbn {
57
57
  padding: var(--gap-m) 0;
58
- } .pure-cell__default_1vn59 {
58
+ } .pure-cell__default_njcbn {
59
59
  padding: var(--gap-s) 0;
60
- } .pure-cell__compact_1vn59 {
60
+ } .pure-cell__compact_njcbn {
61
61
  padding: var(--gap-xs) 0;
62
- } .pure-cell__tiny_1vn59 {
62
+ } .pure-cell__tiny_njcbn {
63
63
  padding: var(--gap-2xs) 0;
64
- } .pure-cell__noneTop_1vn59 {
64
+ } .pure-cell__noneTop_njcbn {
65
65
  padding-top: 0;
66
- } .pure-cell__airyTop_1vn59 {
66
+ } .pure-cell__airyTop_njcbn {
67
67
  padding-top: var(--gap-m);
68
- } .pure-cell__defaultTop_1vn59 {
68
+ } .pure-cell__defaultTop_njcbn {
69
69
  padding-top: var(--gap-s);
70
- } .pure-cell__compactTop_1vn59 {
70
+ } .pure-cell__compactTop_njcbn {
71
71
  padding-top: var(--gap-xs);
72
- } .pure-cell__tinyTop_1vn59 {
72
+ } .pure-cell__tinyTop_njcbn {
73
73
  padding-top: var(--gap-2xs);
74
- } .pure-cell__noneBottom_1vn59 {
74
+ } .pure-cell__noneBottom_njcbn {
75
75
  padding-bottom: 0;
76
- } .pure-cell__airyBottom_1vn59 {
76
+ } .pure-cell__airyBottom_njcbn {
77
77
  padding-bottom: var(--gap-m);
78
- } .pure-cell__defaultBottom_1vn59 {
78
+ } .pure-cell__defaultBottom_njcbn {
79
79
  padding-bottom: var(--gap-s);
80
- } .pure-cell__compactBottom_1vn59 {
80
+ } .pure-cell__compactBottom_njcbn {
81
81
  padding-bottom: var(--gap-xs);
82
- } .pure-cell__tinyBottom_1vn59 {
82
+ } .pure-cell__tinyBottom_njcbn {
83
83
  padding-bottom: var(--gap-2xs);
84
- } .pure-cell__left_1vn59 {
84
+ } .pure-cell__left_njcbn {
85
85
  padding-left: var(--gap-m);
86
- } .pure-cell__right_1vn59 {
86
+ } .pure-cell__right_njcbn {
87
87
  padding-right: var(--gap-m);
88
- } .pure-cell__both_1vn59 {
88
+ } .pure-cell__both_njcbn {
89
89
  padding-right: var(--gap-m);
90
90
  padding-left: var(--gap-m);
91
- } .pure-cell__focused_1vn59 {
91
+ } .pure-cell__focused_njcbn {
92
92
  outline: 2px solid var(--focus-color);
93
93
  outline-offset: 2px;
94
94
  }
package/modern/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { PureCell } from "./component-21d7b687";
2
- export type { PureCellProps } from "./component-21d7b687";
1
+ export { PureCell } from "./component-6a954af1";
2
+ export type { PureCellProps } from "./component-6a954af1";
package/modern/index.js CHANGED
@@ -1 +1 @@
1
- export { P as PureCell } from './component-ef65ce67.js';
1
+ export { P as PureCell } from './component-1f635679.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-pure-cell",
3
- "version": "4.8.1",
3
+ "version": "4.9.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -15,8 +15,8 @@
15
15
  "react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
16
16
  },
17
17
  "dependencies": {
18
- "@alfalab/core-components-amount": "^3.5.0",
19
- "@alfalab/core-components-button": "^11.4.1",
18
+ "@alfalab/core-components-amount": "^3.5.1",
19
+ "@alfalab/core-components-button": "^11.4.2",
20
20
  "@alfalab/core-components-typography": "^4.5.0",
21
21
  "@alfalab/core-components-comment": "^2.3.3",
22
22
  "@alfalab/core-components-shared": "^0.9.1",
package/src/component.tsx CHANGED
@@ -6,6 +6,7 @@ import React, {
6
6
  forwardRef,
7
7
  HTMLAttributes,
8
8
  useRef,
9
+ useState,
9
10
  } from 'react';
10
11
  import mergeRefs from 'react-merge-refs';
11
12
  import cn from 'classnames';
@@ -34,6 +35,8 @@ export type PureCellContext = {
34
35
  /** Направление */
35
36
  direction?: 'horizontal' | 'vertical';
36
37
  dataTestId?: string;
38
+ setMainHover?: () => void;
39
+ unsetMainHover?: () => void;
37
40
  };
38
41
 
39
42
  // eslint-disable-next-line @typescript-eslint/no-redeclare
@@ -120,11 +123,36 @@ const PureCellComponent = forwardRef<HTMLElement, PureCellProps>(
120
123
  ) => {
121
124
  const cellRef = useRef<HTMLDivElement>(null);
122
125
  const [focused] = useFocus(cellRef, 'keyboard');
126
+ const [hoverState, setHoverState] = useState<boolean>(false);
127
+ const [activeState, setActiveState] = useState<boolean>(false);
128
+
129
+ const setHover = () => setHoverState(true);
130
+ const unsetHover = () => setHoverState(false);
131
+ const setActive = () => setActiveState(true);
132
+
133
+ const unsetActive = () => setActiveState(false);
134
+
135
+ const mouseEvents = {
136
+ onMouseEnter: setHover,
137
+ onMouseLeave: unsetHover,
138
+ onMouseDown: setActive,
139
+ onMouseUp: unsetActive,
140
+ };
141
+
123
142
  const addClasses = {
124
143
  [styles.component]: true,
125
144
  [styles.focused]: focused,
126
145
  [styles[direction]]: true,
127
146
  [styles[horizontalPadding]]: true,
147
+ [styles.hover]: hoverState,
148
+ [styles.active]: activeState,
149
+ };
150
+
151
+ const contextState: PureCellContext = {
152
+ direction,
153
+ dataTestId,
154
+ setMainHover: setHover,
155
+ unsetMainHover: unsetHover,
128
156
  };
129
157
 
130
158
  if (typeof verticalPadding === 'string') {
@@ -151,8 +179,9 @@ const PureCellComponent = forwardRef<HTMLElement, PureCellProps>(
151
179
  className={cn(styles.link, addClasses, className)}
152
180
  data-test-id={dataTestId}
153
181
  onClick={onClick}
182
+ {...mouseEvents}
154
183
  >
155
- <PureCellContext.Provider value={{ direction, dataTestId }}>
184
+ <PureCellContext.Provider value={contextState}>
156
185
  {children}
157
186
  </PureCellContext.Provider>
158
187
  </Component>
@@ -167,8 +196,9 @@ const PureCellComponent = forwardRef<HTMLElement, PureCellProps>(
167
196
  className={cn(styles.button, addClasses, className)}
168
197
  data-test-id={dataTestId}
169
198
  onClick={onClick}
199
+ {...mouseEvents}
170
200
  >
171
- <PureCellContext.Provider value={{ direction, dataTestId }}>
201
+ <PureCellContext.Provider value={contextState}>
172
202
  {children}
173
203
  </PureCellContext.Provider>
174
204
  </Component>
@@ -183,9 +213,7 @@ const PureCellComponent = forwardRef<HTMLElement, PureCellProps>(
183
213
  className={cn(addClasses, className)}
184
214
  data-test-id={dataTestId}
185
215
  >
186
- <PureCellContext.Provider value={{ direction, dataTestId }}>
187
- {children}
188
- </PureCellContext.Provider>
216
+ <PureCellContext.Provider value={contextState}>{children}</PureCellContext.Provider>
189
217
  </Component>
190
218
  );
191
219
  },
@@ -29,6 +29,16 @@ type Props = {
29
29
  * Используется модификатор -addon
30
30
  */
31
31
  dataTestId?: string;
32
+
33
+ /**
34
+ * Клик по контенту аддона.
35
+ */
36
+ onClick?: () => void;
37
+ };
38
+
39
+ const ADDON_COMPONENT: Record<string, keyof Pick<React.ReactHTML, 'button' | 'section'>> = {
40
+ button: 'button',
41
+ section: 'section',
32
42
  };
33
43
 
34
44
  export const Addon: React.FC<Props> = ({
@@ -36,15 +46,37 @@ export const Addon: React.FC<Props> = ({
36
46
  verticalAlign = 'top',
37
47
  addonPadding = 'default',
38
48
  dataTestId,
49
+ onClick,
39
50
  }) => {
40
51
  const pureCellContext = useContext(PureCellContext);
41
52
 
53
+ const Component = onClick ? ADDON_COMPONENT.button : ADDON_COMPONENT.section;
54
+
55
+ const onMouseEvents = {
56
+ onClick: (e: React.MouseEvent<HTMLButtonElement>) => {
57
+ e.stopPropagation();
58
+ onClick?.();
59
+ },
60
+ onMouseEnter: () => {
61
+ pureCellContext.unsetMainHover?.();
62
+ },
63
+ onMouseLeave: () => {
64
+ pureCellContext.setMainHover?.();
65
+ },
66
+ onMouseDown: (e: React.MouseEvent<HTMLButtonElement>) => {
67
+ e.stopPropagation();
68
+ },
69
+ };
70
+
42
71
  return (
43
- <section
44
- className={cn(styles.component, styles[addonPadding], styles[verticalAlign])}
72
+ <Component
73
+ className={cn(styles.component, styles[addonPadding], styles[verticalAlign], {
74
+ [styles.button]: onClick,
75
+ })}
45
76
  data-test-id={getDataTestId(dataTestId || pureCellContext.dataTestId, 'addon')}
77
+ {...(onClick && onMouseEvents)}
46
78
  >
47
79
  {children}
48
- </section>
80
+ </Component>
49
81
  );
50
82
  };