@alfalab/core-components-pure-cell 4.3.1 → 4.4.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 (203) hide show
  1. package/{component-3c8d07e1.js → component-1d246a90.js} +10 -10
  2. package/{esm/component-c49f24a8.d.ts → component-5a229016.d.ts} +1 -1
  3. package/component.js +2 -2
  4. package/components/addon/component.js +3 -3
  5. package/components/addon/index.css +10 -10
  6. package/components/addon/index.js +1 -1
  7. package/components/amount/component.js +4 -4
  8. package/components/amount/index.css +2 -2
  9. package/components/amount/index.js +1 -1
  10. package/components/amount-title/component.js +4 -4
  11. package/components/amount-title/index.css +3 -3
  12. package/components/amount-title/index.js +1 -1
  13. package/components/category/component.js +5 -5
  14. package/components/category/index.css +5 -5
  15. package/components/category/index.js +1 -1
  16. package/components/content/component.js +2 -2
  17. package/components/content/index.css +3 -3
  18. package/components/content/index.d.ts +1 -1
  19. package/components/content/index.js +2 -2
  20. package/components/footer/component.js +3 -3
  21. package/components/footer/index.css +4 -4
  22. package/components/footer/index.js +1 -1
  23. package/components/footer-button/component.js +3 -3
  24. package/components/footer-button/index.css +2 -2
  25. package/components/footer-button/index.js +1 -1
  26. package/components/footer-text/component.js +2 -2
  27. package/components/footer-text/index.js +1 -1
  28. package/components/graphics/component.js +3 -3
  29. package/components/graphics/index.css +5 -5
  30. package/components/graphics/index.js +1 -1
  31. package/components/main/component.js +2 -2
  32. package/components/main/index.css +4 -4
  33. package/components/main/index.d.ts +1 -1
  34. package/components/main/index.js +2 -2
  35. package/components/text/component.js +2 -2
  36. package/components/text/index.css +7 -7
  37. package/components/text/index.d.ts +1 -1
  38. package/components/text/index.js +2 -2
  39. package/{modern/component-c49f24a8.d.ts → cssm/component-5a229016.d.ts} +1 -1
  40. package/cssm/{component-4aff9f21.js → component-ef4953bf.js} +6 -6
  41. package/cssm/component.js +2 -2
  42. package/cssm/components/addon/component.js +2 -2
  43. package/cssm/components/addon/index.js +1 -1
  44. package/cssm/components/amount/component.js +3 -3
  45. package/cssm/components/amount/index.js +1 -1
  46. package/cssm/components/amount-title/component.js +3 -3
  47. package/cssm/components/amount-title/index.js +1 -1
  48. package/cssm/components/category/component.js +4 -4
  49. package/cssm/components/category/index.js +1 -1
  50. package/cssm/components/content/component.js +2 -2
  51. package/cssm/components/content/index.d.ts +1 -1
  52. package/cssm/components/content/index.js +2 -2
  53. package/cssm/components/footer/component.js +2 -2
  54. package/cssm/components/footer/index.js +1 -1
  55. package/cssm/components/footer-button/component.js +2 -2
  56. package/cssm/components/footer-button/index.js +1 -1
  57. package/cssm/components/footer-text/component.js +2 -2
  58. package/cssm/components/footer-text/index.js +1 -1
  59. package/cssm/components/graphics/component.js +2 -2
  60. package/cssm/components/graphics/index.js +1 -1
  61. package/cssm/components/main/component.js +2 -2
  62. package/cssm/components/main/index.d.ts +1 -1
  63. package/cssm/components/main/index.js +2 -2
  64. package/cssm/components/text/component.js +2 -2
  65. package/cssm/components/text/index.d.ts +1 -1
  66. package/cssm/components/text/index.js +2 -2
  67. package/cssm/index.d.ts +1 -1
  68. package/cssm/index.js +2 -2
  69. package/{component-c49f24a8.d.ts → esm/component-5a229016.d.ts} +1 -1
  70. package/esm/{component-45299cd1.js → component-bdd266d4.js} +6 -6
  71. package/esm/component.js +2 -2
  72. package/esm/components/addon/component.js +2 -2
  73. package/esm/components/addon/index.css +10 -10
  74. package/esm/components/addon/index.js +1 -1
  75. package/esm/components/amount/component.js +2 -2
  76. package/esm/components/amount/index.css +2 -2
  77. package/esm/components/amount/index.js +1 -1
  78. package/esm/components/amount-title/component.js +2 -2
  79. package/esm/components/amount-title/index.css +3 -3
  80. package/esm/components/amount-title/index.js +1 -1
  81. package/esm/components/category/component.js +2 -2
  82. package/esm/components/category/index.css +5 -5
  83. package/esm/components/category/index.js +1 -1
  84. package/esm/components/content/component.js +2 -2
  85. package/esm/components/content/index.css +3 -3
  86. package/esm/components/content/index.d.ts +1 -1
  87. package/esm/components/content/index.js +2 -2
  88. package/esm/components/footer/component.js +2 -2
  89. package/esm/components/footer/index.css +4 -4
  90. package/esm/components/footer/index.js +1 -1
  91. package/esm/components/footer-button/component.js +2 -2
  92. package/esm/components/footer-button/index.css +2 -2
  93. package/esm/components/footer-button/index.js +1 -1
  94. package/esm/components/footer-text/component.js +1 -1
  95. package/esm/components/footer-text/index.js +1 -1
  96. package/esm/components/graphics/component.js +2 -2
  97. package/esm/components/graphics/index.css +5 -5
  98. package/esm/components/graphics/index.js +1 -1
  99. package/esm/components/main/component.js +2 -2
  100. package/esm/components/main/index.css +4 -4
  101. package/esm/components/main/index.d.ts +1 -1
  102. package/esm/components/main/index.js +2 -2
  103. package/esm/components/text/component.js +2 -2
  104. package/esm/components/text/index.css +7 -7
  105. package/esm/components/text/index.d.ts +1 -1
  106. package/esm/components/text/index.js +2 -2
  107. package/esm/index.css +21 -21
  108. package/esm/index.d.ts +1 -1
  109. package/esm/index.js +2 -2
  110. package/index.css +21 -21
  111. package/index.d.ts +1 -1
  112. package/index.js +2 -2
  113. package/{cssm/component-c49f24a8.d.ts → modern/component-5a229016.d.ts} +1 -1
  114. package/modern/{component-6e5f347e.js → component-b811b670.js} +6 -6
  115. package/modern/component.js +2 -2
  116. package/modern/components/addon/component.js +2 -2
  117. package/modern/components/addon/index.css +10 -10
  118. package/modern/components/addon/index.js +1 -1
  119. package/modern/components/amount/component.js +2 -2
  120. package/modern/components/amount/index.css +2 -2
  121. package/modern/components/amount/index.js +1 -1
  122. package/modern/components/amount-title/component.js +2 -2
  123. package/modern/components/amount-title/index.css +3 -3
  124. package/modern/components/amount-title/index.js +1 -1
  125. package/modern/components/category/component.js +2 -2
  126. package/modern/components/category/index.css +5 -5
  127. package/modern/components/category/index.js +1 -1
  128. package/modern/components/content/component.js +2 -2
  129. package/modern/components/content/index.css +3 -3
  130. package/modern/components/content/index.d.ts +1 -1
  131. package/modern/components/content/index.js +2 -2
  132. package/modern/components/footer/component.js +2 -2
  133. package/modern/components/footer/index.css +4 -4
  134. package/modern/components/footer/index.js +1 -1
  135. package/modern/components/footer-button/component.js +2 -2
  136. package/modern/components/footer-button/index.css +2 -2
  137. package/modern/components/footer-button/index.js +1 -1
  138. package/modern/components/footer-text/component.js +1 -1
  139. package/modern/components/footer-text/index.js +1 -1
  140. package/modern/components/graphics/component.js +2 -2
  141. package/modern/components/graphics/index.css +5 -5
  142. package/modern/components/graphics/index.js +1 -1
  143. package/modern/components/main/component.js +2 -2
  144. package/modern/components/main/index.css +4 -4
  145. package/modern/components/main/index.d.ts +1 -1
  146. package/modern/components/main/index.js +2 -2
  147. package/modern/components/text/component.js +2 -2
  148. package/modern/components/text/index.css +7 -7
  149. package/modern/components/text/index.d.ts +1 -1
  150. package/modern/components/text/index.js +2 -2
  151. package/modern/index.css +21 -21
  152. package/modern/index.d.ts +1 -1
  153. package/modern/index.js +2 -2
  154. package/package.json +6 -5
  155. package/src/component.tsx +186 -0
  156. package/src/components/addon/component.tsx +44 -0
  157. package/src/components/addon/index.module.css +39 -0
  158. package/src/components/addon/index.ts +1 -0
  159. package/src/components/amount/component.tsx +56 -0
  160. package/src/components/amount/index.module.css +6 -0
  161. package/src/components/amount/index.ts +1 -0
  162. package/src/components/amount-title/component.tsx +42 -0
  163. package/src/components/amount-title/index.module.css +9 -0
  164. package/src/components/amount-title/index.ts +1 -0
  165. package/src/components/category/component.tsx +65 -0
  166. package/src/components/category/index.module.css +26 -0
  167. package/src/components/category/index.ts +1 -0
  168. package/src/components/content/component.tsx +34 -0
  169. package/src/components/content/index.module.css +12 -0
  170. package/src/components/content/index.ts +1 -0
  171. package/src/components/footer/component.tsx +34 -0
  172. package/src/components/footer/index.module.css +15 -0
  173. package/src/components/footer/index.ts +1 -0
  174. package/src/components/footer-button/component.tsx +17 -0
  175. package/src/components/footer-button/index.module.css +5 -0
  176. package/src/components/footer-button/index.ts +1 -0
  177. package/src/components/footer-text/component.tsx +31 -0
  178. package/src/components/footer-text/index.ts +1 -0
  179. package/src/components/graphics/component.tsx +34 -0
  180. package/src/components/graphics/index.module.css +18 -0
  181. package/src/components/graphics/index.ts +1 -0
  182. package/src/components/main/component.tsx +51 -0
  183. package/src/components/main/index.module.css +23 -0
  184. package/src/components/main/index.ts +1 -0
  185. package/src/components/text/component.tsx +100 -0
  186. package/src/components/text/index.module.css +34 -0
  187. package/src/components/text/index.ts +1 -0
  188. package/src/components/types.ts +27 -0
  189. package/src/components/typesProps.ts +56 -0
  190. package/src/index.module.css +94 -0
  191. package/src/index.ts +1 -0
  192. package/cssm/getDataTestId-5c876d98.d.ts +0 -2
  193. package/cssm/getDataTestId-5c876d98.js +0 -8
  194. package/esm/getDataTestId-642eb788.d.ts +0 -2
  195. package/esm/getDataTestId-642eb788.js +0 -6
  196. package/getDataTestId-916a6a71.d.ts +0 -2
  197. package/getDataTestId-916a6a71.js +0 -8
  198. package/modern/getDataTestId-d1e65cf0.d.ts +0 -2
  199. package/modern/getDataTestId-d1e65cf0.js +0 -6
  200. /package/{component-3c8d07e1.d.ts → component-1d246a90.d.ts} +0 -0
  201. /package/cssm/{component-4aff9f21.d.ts → component-ef4953bf.d.ts} +0 -0
  202. /package/esm/{component-45299cd1.d.ts → component-bdd266d4.d.ts} +0 -0
  203. /package/modern/{component-6e5f347e.d.ts → component-b811b670.d.ts} +0 -0
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import cn from 'classnames';
3
- import { g as getDataTestId } from '../../getDataTestId-d1e65cf0.js';
3
+ import { getDataTestId } from '@alfalab/core-components-shared/modern';
4
4
 
5
- const styles = {"component":"pure-cell__component_1xulf","none":"pure-cell__none_1xulf","default":"pure-cell__default_1xulf"};
5
+ const styles = {"component":"pure-cell__component_16s40","none":"pure-cell__none_16s40","default":"pure-cell__default_16s40"};
6
6
  require('./index.css')
7
7
 
8
8
  const Footer = ({ children, footerPadding = 'default', dataTestId }) => (React.createElement("footer", { className: cn(styles.component, styles[footerPadding]), "data-test-id": getDataTestId(dataTestId, 'footer') }, children));
@@ -1,4 +1,4 @@
1
- /* hash: j6pdu */
1
+ /* hash: poc4g */
2
2
  :root {
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_1xulf {
18
+ } .pure-cell__component_16s40 {
19
19
  grid-column: 1/3;
20
20
  display: grid;
21
21
  grid-row-gap: var(--gap-xs)
22
- } .pure-cell__component_1xulf.pure-cell__none_1xulf {
22
+ } .pure-cell__component_16s40.pure-cell__none_16s40 {
23
23
  margin-top: 0;
24
- } .pure-cell__component_1xulf.pure-cell__default_1xulf {
24
+ } .pure-cell__component_16s40.pure-cell__default_16s40 {
25
25
  margin-top: var(--gap-xs);
26
26
  }
@@ -1,4 +1,4 @@
1
1
  export { Footer } from './component.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
- import '../../getDataTestId-d1e65cf0.js';
4
+ import '@alfalab/core-components-shared/modern';
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { Button } from '@alfalab/core-components-button/modern';
3
- import { g as getDataTestId } from '../../getDataTestId-d1e65cf0.js';
3
+ import { getDataTestId } from '@alfalab/core-components-shared/modern';
4
4
 
5
- const styles = {"component":"pure-cell__component_18rhv"};
5
+ const styles = {"component":"pure-cell__component_xb6ri"};
6
6
  require('./index.css')
7
7
 
8
8
  const FooterButton = ({ children, dataTestId, ...props }) => (React.createElement(Button, { ...props, size: 'xxs', dataTestId: getDataTestId(dataTestId, 'button'), className: styles.component }, children));
@@ -1,4 +1,4 @@
1
- /* hash: advwb */
1
+ /* hash: kyquj */
2
2
  :root {
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_18rhv {
17
+ } .pure-cell__component_xb6ri {
18
18
  justify-self: start;
19
19
  }
@@ -1,4 +1,4 @@
1
1
  export { FooterButton } from './component.js';
2
2
  import 'react';
3
3
  import '@alfalab/core-components-button/modern';
4
- import '../../getDataTestId-d1e65cf0.js';
4
+ import '@alfalab/core-components-shared/modern';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
+ import { getDataTestId } from '@alfalab/core-components-shared/modern';
2
3
  import { Typography } from '@alfalab/core-components-typography/modern';
3
- import { g as getDataTestId } from '../../getDataTestId-d1e65cf0.js';
4
4
 
5
5
  const FooterText = ({ children, color = 'secondary', dataTestId }) => (React.createElement(Typography.Text, { view: 'primary-small', color: color, "data-test-id": getDataTestId(dataTestId, 'footer-title') }, children));
6
6
 
@@ -1,4 +1,4 @@
1
1
  export { FooterText } from './component.js';
2
2
  import 'react';
3
+ import '@alfalab/core-components-shared/modern';
3
4
  import '@alfalab/core-components-typography/modern';
4
- import '../../getDataTestId-d1e65cf0.js';
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import cn from 'classnames';
3
- import { g as getDataTestId } from '../../getDataTestId-d1e65cf0.js';
3
+ import { getDataTestId } from '@alfalab/core-components-shared/modern';
4
4
 
5
- const styles = {"component":"pure-cell__component_ulfcs","top":"pure-cell__top_ulfcs","center":"pure-cell__center_ulfcs","bottom":"pure-cell__bottom_ulfcs"};
5
+ const styles = {"component":"pure-cell__component_1feu9","top":"pure-cell__top_1feu9","center":"pure-cell__center_1feu9","bottom":"pure-cell__bottom_1feu9"};
6
6
  require('./index.css')
7
7
 
8
8
  const Graphics = ({ children, dataTestId, verticalAlign = 'top' }) => (React.createElement("section", { className: cn(styles.component, styles[verticalAlign]), "data-test-id": getDataTestId(dataTestId, 'graphics') }, children));
@@ -1,4 +1,4 @@
1
- /* hash: c7ayp */
1
+ /* hash: cncle */
2
2
  :root {
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,13 +14,13 @@
14
14
  } :root {
15
15
  } :root {
16
16
  } :root {
17
- } .pure-cell__component_ulfcs {
17
+ } .pure-cell__component_1feu9 {
18
18
  display: inline-flex;
19
19
  flex-basis: auto;
20
- } .pure-cell__top_ulfcs {
20
+ } .pure-cell__top_1feu9 {
21
21
  align-self: flex-start;
22
- } .pure-cell__center_ulfcs {
22
+ } .pure-cell__center_1feu9 {
23
23
  align-self: center;
24
- } .pure-cell__bottom_ulfcs {
24
+ } .pure-cell__bottom_1feu9 {
25
25
  align-self: flex-end;
26
26
  }
@@ -1,4 +1,4 @@
1
1
  export { Graphics } from './component.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
- import '../../getDataTestId-d1e65cf0.js';
4
+ import '@alfalab/core-components-shared/modern';
@@ -1,7 +1,7 @@
1
1
  import 'react';
2
2
  import 'classnames';
3
- import '../../getDataTestId-d1e65cf0.js';
4
- export { M as Main } from '../../component-6e5f347e.js';
3
+ import '@alfalab/core-components-shared/modern';
4
+ export { M as Main } from '../../component-b811b670.js';
5
5
  import 'react-merge-refs';
6
6
  import '@alfalab/core-components-comment/modern';
7
7
  import '@alfalab/hooks';
@@ -1,4 +1,4 @@
1
- /* hash: llbaz */
1
+ /* hash: w6697 */
2
2
  :root {
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,20 @@
15
15
  --gap-3xs: 2px;
16
16
  } :root {
17
17
  } :root {
18
- } .pure-cell__component_umeb0 {
18
+ } .pure-cell__component_1ufkr {
19
19
  display: flex;
20
20
  flex-direction: column;
21
21
  align-self: center;
22
22
 
23
23
  /* can use /r/n */
24
24
  white-space: pre-line
25
- } .pure-cell__component_umeb0.pure-cell__vertical_umeb0 {
25
+ } .pure-cell__component_1ufkr.pure-cell__vertical_1ufkr {
26
26
  grid-row-gap: var(--gap-3xs);
27
27
  justify-content: center;
28
28
  align-items: center;
29
29
 
30
30
  /* for button */
31
31
  text-align: center;
32
- } .pure-cell__component_umeb0.pure-cell__reverse_umeb0 {
32
+ } .pure-cell__component_1ufkr.pure-cell__reverse_1ufkr {
33
33
  flex-direction: column-reverse;
34
34
  }
@@ -1 +1 @@
1
- export * from "../../component-6e5f347e";
1
+ export * from "../../component-b811b670";
@@ -1,11 +1,11 @@
1
- export { M as Main } from '../../component-6e5f347e.js';
1
+ export { M as Main } from '../../component-b811b670.js';
2
2
  import 'react';
3
3
  import 'react-merge-refs';
4
4
  import 'classnames';
5
5
  import '@alfalab/core-components-comment/modern';
6
6
  import '@alfalab/hooks';
7
7
  import '../addon/component.js';
8
- import '../../getDataTestId-d1e65cf0.js';
8
+ import '@alfalab/core-components-shared/modern';
9
9
  import '../amount/component.js';
10
10
  import '@alfalab/core-components-amount/modern';
11
11
  import '@alfalab/core-components-typography/modern';
@@ -1,8 +1,8 @@
1
1
  import 'react';
2
2
  import 'classnames';
3
+ import '@alfalab/core-components-shared/modern';
3
4
  import '@alfalab/core-components-typography/modern';
4
- import '../../getDataTestId-d1e65cf0.js';
5
- export { T as Text } from '../../component-6e5f347e.js';
5
+ export { T as Text } from '../../component-b811b670.js';
6
6
  import 'react-merge-refs';
7
7
  import '@alfalab/core-components-comment/modern';
8
8
  import '@alfalab/hooks';
@@ -1,4 +1,4 @@
1
- /* hash: u9ouz */
1
+ /* hash: 10rbl */
2
2
  :root {
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_fkntw {
19
+ } .pure-cell__horizontal_k946b {
20
20
  padding: var(--gap-3xs) 0;
21
- } .pure-cell__rowLimit1_fkntw {
21
+ } .pure-cell__rowLimit1_k946b {
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_fkntw {
27
+ } .pure-cell__rowLimit2_k946b {
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_fkntw {
32
+ } .pure-cell__component_k946b {
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_fkntw .pure-cell__vertical_fkntw {
39
+ } .pure-cell__component_k946b .pure-cell__vertical_k946b {
40
40
  justify-content: center;
41
- } .pure-cell__title_fkntw + .pure-cell__value_fkntw {
41
+ } .pure-cell__title_k946b + .pure-cell__value_k946b {
42
42
  margin-left: var(--gap-m);
43
43
  flex-shrink: 0;
44
44
  }
@@ -1 +1 @@
1
- export * from "../../component-6e5f347e";
1
+ export * from "../../component-b811b670";
@@ -1,11 +1,11 @@
1
- export { T as Text } from '../../component-6e5f347e.js';
1
+ export { T as Text } from '../../component-b811b670.js';
2
2
  import 'react';
3
3
  import 'react-merge-refs';
4
4
  import 'classnames';
5
5
  import '@alfalab/core-components-comment/modern';
6
6
  import '@alfalab/hooks';
7
7
  import '../addon/component.js';
8
- import '../../getDataTestId-d1e65cf0.js';
8
+ import '@alfalab/core-components-shared/modern';
9
9
  import '../amount/component.js';
10
10
  import '@alfalab/core-components-amount/modern';
11
11
  import '@alfalab/core-components-typography/modern';
package/modern/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 12n1r */
1
+ /* hash: y3rwu */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-border-link: #0072ef; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* 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,21 +20,21 @@
20
20
  } :root {
21
21
  } :root {
22
22
  --focus-color: var(--color-light-border-link);
23
- } .pure-cell__component_1gk1s {
23
+ } .pure-cell__component_1cht4 {
24
24
  text-align: unset;
25
25
  box-sizing: border-box;
26
- } .pure-cell__horizontal_1gk1s {
26
+ } .pure-cell__horizontal_1cht4 {
27
27
  display: flex;
28
28
  width: 100%
29
- } .pure-cell__horizontal_1gk1s > section:not(:last-child) {
29
+ } .pure-cell__horizontal_1cht4 > section:not(:last-child) {
30
30
  margin-right: var(--gap-m);
31
- } .pure-cell__vertical_1gk1s {
31
+ } .pure-cell__vertical_1cht4 {
32
32
  display: flex;
33
33
  align-items: center;
34
34
  flex-direction: column
35
- } .pure-cell__vertical_1gk1s > section:not(:last-child) {
35
+ } .pure-cell__vertical_1cht4 > section:not(:last-child) {
36
36
  margin-bottom: var(--gap-s);
37
- } .pure-cell__button_1gk1s {
37
+ } .pure-cell__button_1cht4 {
38
38
  font-family: inherit;
39
39
  background: none;
40
40
  border: 0;
@@ -42,37 +42,37 @@
42
42
  cursor: pointer;
43
43
  transition: opacity 0.15s ease-in-out;
44
44
  padding: 0
45
- } .pure-cell__button_1gk1s:hover {
45
+ } .pure-cell__button_1cht4:hover {
46
46
  opacity: 0.8;
47
- } .pure-cell__button_1gk1s:active {
47
+ } .pure-cell__button_1cht4:active {
48
48
  opacity: 0.6;
49
- } .pure-cell__link_1gk1s {
49
+ } .pure-cell__link_1cht4 {
50
50
  text-decoration: none;
51
51
  color: inherit;
52
52
  cursor: pointer;
53
53
  transition: opacity 0.15s ease-in-out
54
- } .pure-cell__link_1gk1s:hover {
54
+ } .pure-cell__link_1cht4:hover {
55
55
  opacity: 0.8;
56
- } .pure-cell__link_1gk1s:active {
56
+ } .pure-cell__link_1cht4:active {
57
57
  opacity: 0.6;
58
- } .pure-cell__none_1gk1s {
58
+ } .pure-cell__none_1cht4 {
59
59
  padding: 0;
60
- } .pure-cell__airy_1gk1s {
60
+ } .pure-cell__airy_1cht4 {
61
61
  padding: var(--gap-m) 0;
62
- } .pure-cell__defaultPadding_1gk1s {
62
+ } .pure-cell__defaultPadding_1cht4 {
63
63
  padding: var(--gap-s) 0;
64
- } .pure-cell__compact_1gk1s {
64
+ } .pure-cell__compact_1cht4 {
65
65
  padding: var(--gap-xs) 0;
66
- } .pure-cell__tiny_1gk1s {
66
+ } .pure-cell__tiny_1cht4 {
67
67
  padding: var(--gap-2xs) 0;
68
- } .pure-cell__left_1gk1s {
68
+ } .pure-cell__left_1cht4 {
69
69
  padding-left: var(--gap-m);
70
- } .pure-cell__right_1gk1s {
70
+ } .pure-cell__right_1cht4 {
71
71
  padding-right: var(--gap-m);
72
- } .pure-cell__both_1gk1s {
72
+ } .pure-cell__both_1cht4 {
73
73
  padding-right: var(--gap-m);
74
74
  padding-left: var(--gap-m);
75
- } .pure-cell__focused_1gk1s {
75
+ } .pure-cell__focused_1cht4 {
76
76
  outline: 2px solid var(--focus-color);
77
77
  outline-offset: 2px;
78
78
  }
package/modern/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { PureCell } from "./component-c49f24a8";
1
+ export { PureCell } from "./component-5a229016";
package/modern/index.js CHANGED
@@ -1,11 +1,11 @@
1
- export { P as PureCell } from './component-6e5f347e.js';
1
+ export { P as PureCell } from './component-b811b670.js';
2
2
  import 'react';
3
3
  import 'react-merge-refs';
4
4
  import 'classnames';
5
5
  import '@alfalab/core-components-comment/modern';
6
6
  import '@alfalab/hooks';
7
7
  import './components/addon/component.js';
8
- import './getDataTestId-d1e65cf0.js';
8
+ import '@alfalab/core-components-shared/modern';
9
9
  import './components/amount/component.js';
10
10
  import '@alfalab/core-components-amount/modern';
11
11
  import '@alfalab/core-components-typography/modern';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-pure-cell",
3
- "version": "4.3.1",
3
+ "version": "4.4.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -15,10 +15,11 @@
15
15
  "react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
16
16
  },
17
17
  "dependencies": {
18
- "@alfalab/core-components-amount": "^3.2.2",
19
- "@alfalab/core-components-button": "^8.5.1",
20
- "@alfalab/core-components-typography": "^3.2.2",
21
- "@alfalab/core-components-comment": "^2.1.11",
18
+ "@alfalab/core-components-amount": "^3.3.0",
19
+ "@alfalab/core-components-button": "^9.0.0",
20
+ "@alfalab/core-components-typography": "^4.0.0",
21
+ "@alfalab/core-components-comment": "^2.2.0",
22
+ "@alfalab/core-components-shared": "^0.1.0",
22
23
  "@alfalab/hooks": "^1.13.0",
23
24
  "classnames": "^2.3.1",
24
25
  "react-merge-refs": "1.1.0",
@@ -0,0 +1,186 @@
1
+ /* eslint-disable react/jsx-no-constructed-context-values */
2
+ import React, {
3
+ AnchorHTMLAttributes,
4
+ ButtonHTMLAttributes,
5
+ ElementType,
6
+ forwardRef,
7
+ HTMLAttributes,
8
+ useRef,
9
+ } from 'react';
10
+ import mergeRefs from 'react-merge-refs';
11
+ import cn from 'classnames';
12
+
13
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
14
+ import { ButtonProps } from '@alfalab/core-components-button';
15
+ import { Comment } from '@alfalab/core-components-comment';
16
+ import { useFocus } from '@alfalab/hooks';
17
+
18
+ import { Addon } from './components/addon';
19
+ import { Amount } from './components/amount';
20
+ import { AmountTitle } from './components/amount-title';
21
+ import { Category } from './components/category';
22
+ import { Content } from './components/content';
23
+ import { Footer } from './components/footer';
24
+ import { FooterButton } from './components/footer-button';
25
+ import { FooterText } from './components/footer-text';
26
+ import { Graphics } from './components/graphics';
27
+ import { Main } from './components/main';
28
+ import { Text } from './components/text';
29
+ import { PureCellElement } from './components/types';
30
+
31
+ import styles from './index.module.css';
32
+
33
+ export type PureCellContext = {
34
+ /** Направление */
35
+ direction?: 'horizontal' | 'vertical';
36
+ };
37
+
38
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
39
+ export const PureCellContext = React.createContext<PureCellContext>({});
40
+
41
+ export type PureCellProps = {
42
+ /**
43
+ * Направление
44
+ */
45
+ direction?: 'horizontal' | 'vertical';
46
+
47
+ /**
48
+ * Сss класс для стилизации общей обёртки
49
+ */
50
+ className?: string;
51
+
52
+ /**
53
+ * Выводит ссылку в виде ячейки
54
+ */
55
+ href?: string;
56
+
57
+ /**
58
+ * Вертикальные отступы
59
+ */
60
+ verticalPadding?: 'airy' | 'default' | 'compact' | 'tiny' | 'none';
61
+
62
+ /**
63
+ * Горизонтальные отступы
64
+ */
65
+ horizontalPadding?: 'left' | 'right' | 'both' | 'none';
66
+
67
+ /**
68
+ * Позволяет использовать кастомный компонент для кнопки (например Link из роутера)
69
+ */
70
+ tag?: ElementType;
71
+ /**
72
+ * Компоненты
73
+ */
74
+ children: PureCellElement;
75
+
76
+ /**
77
+ * Идентификатор для систем автоматизированного тестирования
78
+ */
79
+ dataTestId?: string;
80
+ };
81
+ type AnchorPureCellProps = PureCellProps & AnchorHTMLAttributes<HTMLAnchorElement>;
82
+ type ButtonPureCellProps = PureCellProps & ButtonHTMLAttributes<HTMLButtonElement>;
83
+ type ElementPureCellProps = PureCellProps & HTMLAttributes<HTMLElement>;
84
+ type PureProps = Partial<AnchorPureCellProps | ButtonPureCellProps | ElementPureCellProps>;
85
+
86
+ const PureCellComponent = forwardRef<HTMLElement, PureProps>(
87
+ (
88
+ {
89
+ className,
90
+ dataTestId,
91
+ onClick,
92
+ href,
93
+ tag: Component = (href && 'a') || (onClick && 'button') || 'section',
94
+ children,
95
+ horizontalPadding = 'none',
96
+ verticalPadding = 'none',
97
+ direction = 'horizontal',
98
+ ...restProps
99
+ },
100
+ ref,
101
+ ) => {
102
+ const cellRef = useRef<HTMLDivElement>(null);
103
+ const [focused] = useFocus(cellRef, 'keyboard');
104
+ const addClasses = {
105
+ [styles.component]: true,
106
+ [styles.focused]: focused,
107
+ [styles[direction]]: true,
108
+ [styles.defaultPadding]: verticalPadding === 'default',
109
+ [styles[verticalPadding]]: verticalPadding !== 'default',
110
+ [styles[horizontalPadding]]: true,
111
+ };
112
+
113
+ if (href) {
114
+ const { target } = restProps as AnchorHTMLAttributes<HTMLAnchorElement>;
115
+
116
+ // Для совместимости с react-router-dom, меняем href на to
117
+ const hrefProps = { [typeof Component === 'string' ? 'href' : 'to']: href };
118
+
119
+ return (
120
+ <Component
121
+ rel={target === '_blank' ? 'noreferrer noopener' : undefined}
122
+ {...(restProps as AnchorHTMLAttributes<HTMLAnchorElement>)}
123
+ {...hrefProps}
124
+ ref={mergeRefs([cellRef, ref])}
125
+ className={cn(styles.link, addClasses, className)}
126
+ data-test-id={dataTestId}
127
+ onClick={onClick}
128
+ >
129
+ <PureCellContext.Provider value={{ direction }}>
130
+ {children}
131
+ </PureCellContext.Provider>
132
+ </Component>
133
+ );
134
+ }
135
+
136
+ if (onClick) {
137
+ return (
138
+ <Component
139
+ {...(restProps as AnchorHTMLAttributes<HTMLAnchorElement>)}
140
+ ref={mergeRefs([cellRef, ref])}
141
+ className={cn(styles.button, addClasses, className)}
142
+ data-test-id={dataTestId}
143
+ onClick={onClick}
144
+ >
145
+ <PureCellContext.Provider value={{ direction }}>
146
+ {children}
147
+ </PureCellContext.Provider>
148
+ </Component>
149
+ );
150
+ }
151
+
152
+ return (
153
+ <Component
154
+ {...(restProps as AnchorHTMLAttributes<HTMLAnchorElement>)}
155
+ ref={ref}
156
+ tabIndex={0}
157
+ className={cn(addClasses, className)}
158
+ data-test-id={dataTestId}
159
+ >
160
+ <PureCellContext.Provider value={{ direction }}>
161
+ {children}
162
+ </PureCellContext.Provider>
163
+ </Component>
164
+ );
165
+ },
166
+ );
167
+
168
+ /**
169
+ * Универсальный конструктор для сборки любой ячейки.
170
+ *
171
+ * [Макет](https://www.figma.com/file/KlFOLLkKO8rtvvQE3RXuhq/Click-Library?node-id=43525%3A240018)
172
+ */
173
+ export const PureCell = Object.assign(PureCellComponent, {
174
+ Main,
175
+ Graphics,
176
+ Content,
177
+ Text,
178
+ Amount,
179
+ AmountTitle,
180
+ Addon,
181
+ Footer,
182
+ ExtraSubtitle: FooterText,
183
+ FooterButton,
184
+ Comment,
185
+ Category,
186
+ });
@@ -0,0 +1,44 @@
1
+ import React from 'react';
2
+ import cn from 'classnames';
3
+
4
+ import { getDataTestId } from '@alfalab/core-components-shared';
5
+
6
+ import { AddonElement } from '../types';
7
+
8
+ import styles from './index.module.css';
9
+
10
+ type Props = {
11
+ /**
12
+ * Вертикальное выравнивание
13
+ */
14
+ verticalAlign?: 'auto' | 'top' | 'center' | 'bottom';
15
+
16
+ /**
17
+ * Горизонтальные отступы
18
+ */
19
+ addonPadding?: 'default' | 'none';
20
+
21
+ /**
22
+ * Компоненты
23
+ */
24
+ children: AddonElement;
25
+
26
+ /**
27
+ * Идентификатор для систем автоматизированного тестирования
28
+ */
29
+ dataTestId?: string;
30
+ };
31
+
32
+ export const Addon: React.FC<Props> = ({
33
+ children,
34
+ verticalAlign = 'top',
35
+ addonPadding = 'default',
36
+ dataTestId,
37
+ }) => (
38
+ <section
39
+ className={cn(styles.component, styles[addonPadding], styles[verticalAlign])}
40
+ data-test-id={getDataTestId(dataTestId, 'addon')}
41
+ >
42
+ {children}
43
+ </section>
44
+ );