@alfalab/core-components-pure-cell 4.7.0 → 4.8.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 (198) hide show
  1. package/{esm/component-fd7196d2.d.ts → component-21d7b687.d.ts} +17 -8
  2. package/{component-a580c14f.d.ts → component-40566f8c.d.ts} +5 -1
  3. package/{component-a580c14f.js → component-40566f8c.js} +21 -15
  4. package/component.js +1 -1
  5. package/components/addon/component.js +1 -1
  6. package/components/addon/index.css +10 -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 +1 -1
  37. package/components/graphics/index.css +30 -6
  38. package/components/graphics/index.d.ts +1 -1
  39. package/components/graphics/index.js +1 -1
  40. package/components/main/component.js +1 -1
  41. package/components/main/index.css +4 -4
  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-d135ef3a.d.ts → cssm/component-063660c0.d.ts} +5 -1
  49. package/cssm/{component-4445c77d.js → component-063660c0.js} +10 -4
  50. package/cssm/{component-fd7196d2.d.ts → component-21d7b687.d.ts} +17 -8
  51. package/cssm/component.js +1 -1
  52. package/cssm/components/addon/component.js +1 -1
  53. package/cssm/components/addon/index.d.ts +1 -1
  54. package/cssm/components/addon/index.js +1 -1
  55. package/cssm/components/amount/component.js +1 -1
  56. package/cssm/components/amount/index.d.ts +1 -1
  57. package/cssm/components/amount/index.js +1 -1
  58. package/cssm/components/amount-title/component.js +1 -1
  59. package/cssm/components/amount-title/index.d.ts +1 -1
  60. package/cssm/components/amount-title/index.js +1 -1
  61. package/cssm/components/category/component.js +1 -1
  62. package/cssm/components/category/index.d.ts +1 -1
  63. package/cssm/components/category/index.js +1 -1
  64. package/cssm/components/content/component.js +1 -1
  65. package/cssm/components/content/index.d.ts +1 -1
  66. package/cssm/components/content/index.js +1 -1
  67. package/cssm/components/footer/component.js +1 -1
  68. package/cssm/components/footer/index.d.ts +1 -1
  69. package/cssm/components/footer/index.js +1 -1
  70. package/cssm/components/footer-button/component.js +1 -1
  71. package/cssm/components/footer-button/index.d.ts +1 -1
  72. package/cssm/components/footer-button/index.js +1 -1
  73. package/cssm/components/footer-text/component.js +1 -1
  74. package/cssm/components/footer-text/index.d.ts +1 -1
  75. package/cssm/components/footer-text/index.js +1 -1
  76. package/cssm/components/graphics/component.js +1 -1
  77. package/cssm/components/graphics/index.d.ts +1 -1
  78. package/cssm/components/graphics/index.js +1 -1
  79. package/cssm/components/graphics/index.module.css +25 -1
  80. package/cssm/components/main/component.js +1 -1
  81. package/cssm/components/main/index.d.ts +1 -1
  82. package/cssm/components/main/index.js +1 -1
  83. package/cssm/components/text/component.js +1 -1
  84. package/cssm/components/text/index.d.ts +1 -1
  85. package/cssm/components/text/index.js +1 -1
  86. package/cssm/index.d.ts +2 -1
  87. package/cssm/index.js +1 -1
  88. package/cssm/index.module.css +25 -9
  89. package/{component-fd7196d2.d.ts → esm/component-21d7b687.d.ts} +17 -8
  90. package/{modern/component-1458a9e3.d.ts → esm/component-c5ff489c.d.ts} +5 -1
  91. package/esm/{component-d135ef3a.js → component-c5ff489c.js} +21 -15
  92. package/esm/component.js +1 -1
  93. package/esm/components/addon/component.js +1 -1
  94. package/esm/components/addon/index.css +10 -10
  95. package/esm/components/addon/index.d.ts +1 -1
  96. package/esm/components/addon/index.js +1 -1
  97. package/esm/components/amount/component.js +1 -1
  98. package/esm/components/amount/index.css +2 -2
  99. package/esm/components/amount/index.d.ts +1 -1
  100. package/esm/components/amount/index.js +1 -1
  101. package/esm/components/amount-title/component.js +1 -1
  102. package/esm/components/amount-title/index.css +3 -3
  103. package/esm/components/amount-title/index.d.ts +1 -1
  104. package/esm/components/amount-title/index.js +1 -1
  105. package/esm/components/category/component.js +1 -1
  106. package/esm/components/category/index.css +5 -5
  107. package/esm/components/category/index.d.ts +1 -1
  108. package/esm/components/category/index.js +1 -1
  109. package/esm/components/content/component.js +1 -1
  110. package/esm/components/content/index.css +3 -3
  111. package/esm/components/content/index.d.ts +1 -1
  112. package/esm/components/content/index.js +1 -1
  113. package/esm/components/footer/component.js +1 -1
  114. package/esm/components/footer/index.css +4 -4
  115. package/esm/components/footer/index.d.ts +1 -1
  116. package/esm/components/footer/index.js +1 -1
  117. package/esm/components/footer-button/component.js +1 -1
  118. package/esm/components/footer-button/index.css +2 -2
  119. package/esm/components/footer-button/index.d.ts +1 -1
  120. package/esm/components/footer-button/index.js +1 -1
  121. package/esm/components/footer-text/component.js +1 -1
  122. package/esm/components/footer-text/index.d.ts +1 -1
  123. package/esm/components/footer-text/index.js +1 -1
  124. package/esm/components/graphics/component.js +1 -1
  125. package/esm/components/graphics/index.css +30 -6
  126. package/esm/components/graphics/index.d.ts +1 -1
  127. package/esm/components/graphics/index.js +1 -1
  128. package/esm/components/main/component.js +1 -1
  129. package/esm/components/main/index.css +4 -4
  130. package/esm/components/main/index.d.ts +1 -1
  131. package/esm/components/main/index.js +1 -1
  132. package/esm/components/text/component.js +1 -1
  133. package/esm/components/text/index.css +7 -7
  134. package/esm/components/text/index.d.ts +1 -1
  135. package/esm/components/text/index.js +1 -1
  136. package/esm/index.css +41 -25
  137. package/esm/index.d.ts +2 -1
  138. package/esm/index.js +1 -1
  139. package/index.css +41 -25
  140. package/index.d.ts +2 -1
  141. package/index.js +1 -1
  142. package/modern/{component-fd7196d2.d.ts → component-21d7b687.d.ts} +17 -8
  143. package/{cssm/component-4445c77d.d.ts → modern/component-4f06f921.d.ts} +5 -1
  144. package/modern/{component-1458a9e3.js → component-4f06f921.js} +21 -15
  145. package/modern/component.js +1 -1
  146. package/modern/components/addon/component.js +1 -1
  147. package/modern/components/addon/index.css +10 -10
  148. package/modern/components/addon/index.d.ts +1 -1
  149. package/modern/components/addon/index.js +1 -1
  150. package/modern/components/amount/component.js +1 -1
  151. package/modern/components/amount/index.css +2 -2
  152. package/modern/components/amount/index.d.ts +1 -1
  153. package/modern/components/amount/index.js +1 -1
  154. package/modern/components/amount-title/component.js +1 -1
  155. package/modern/components/amount-title/index.css +3 -3
  156. package/modern/components/amount-title/index.d.ts +1 -1
  157. package/modern/components/amount-title/index.js +1 -1
  158. package/modern/components/category/component.js +1 -1
  159. package/modern/components/category/index.css +5 -5
  160. package/modern/components/category/index.d.ts +1 -1
  161. package/modern/components/category/index.js +1 -1
  162. package/modern/components/content/component.js +1 -1
  163. package/modern/components/content/index.css +3 -3
  164. package/modern/components/content/index.d.ts +1 -1
  165. package/modern/components/content/index.js +1 -1
  166. package/modern/components/footer/component.js +1 -1
  167. package/modern/components/footer/index.css +4 -4
  168. package/modern/components/footer/index.d.ts +1 -1
  169. package/modern/components/footer/index.js +1 -1
  170. package/modern/components/footer-button/component.js +1 -1
  171. package/modern/components/footer-button/index.css +2 -2
  172. package/modern/components/footer-button/index.d.ts +1 -1
  173. package/modern/components/footer-button/index.js +1 -1
  174. package/modern/components/footer-text/component.js +1 -1
  175. package/modern/components/footer-text/index.d.ts +1 -1
  176. package/modern/components/footer-text/index.js +1 -1
  177. package/modern/components/graphics/component.js +1 -1
  178. package/modern/components/graphics/index.css +30 -6
  179. package/modern/components/graphics/index.d.ts +1 -1
  180. package/modern/components/graphics/index.js +1 -1
  181. package/modern/components/main/component.js +1 -1
  182. package/modern/components/main/index.css +4 -4
  183. package/modern/components/main/index.d.ts +1 -1
  184. package/modern/components/main/index.js +1 -1
  185. package/modern/components/text/component.js +1 -1
  186. package/modern/components/text/index.css +7 -7
  187. package/modern/components/text/index.d.ts +1 -1
  188. package/modern/components/text/index.js +1 -1
  189. package/modern/index.css +41 -25
  190. package/modern/index.d.ts +2 -1
  191. package/modern/index.js +1 -1
  192. package/package.json +4 -4
  193. package/src/component.tsx +35 -10
  194. package/src/components/graphics/component.tsx +19 -2
  195. package/src/components/graphics/index.module.css +43 -0
  196. package/src/components/text/component.tsx +7 -1
  197. package/src/index.module.css +41 -9
  198. package/src/index.ts +1 -0
@@ -1,4 +1,4 @@
1
- /* hash: 17iz1 */
1
+ /* hash: kpt6l */
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_sun3b {
19
+ } .pure-cell__horizontal_16dfl {
20
20
  padding: var(--gap-3xs) 0;
21
- } .pure-cell__rowLimit1_sun3b {
21
+ } .pure-cell__rowLimit1_16dfl {
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_sun3b {
27
+ } .pure-cell__rowLimit2_16dfl {
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_sun3b {
32
+ } .pure-cell__component_16dfl {
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_sun3b .pure-cell__vertical_sun3b {
39
+ } .pure-cell__component_16dfl .pure-cell__vertical_16dfl {
40
40
  justify-content: center;
41
- } .pure-cell__title_sun3b + .pure-cell__value_sun3b {
41
+ } .pure-cell__title_16dfl + .pure-cell__value_16dfl {
42
42
  margin-left: var(--gap-m);
43
43
  flex-shrink: 0;
44
44
  }
@@ -1 +1 @@
1
- export * from "../../component-1458a9e3";
1
+ export * from "../../component-4f06f921";
@@ -1 +1 @@
1
- export { T as Text } from '../../component-1458a9e3.js';
1
+ export { T as Text } from '../../component-4f06f921.js';
package/modern/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1xwj4 */
1
+ /* hash: jedhi */
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,21 +20,17 @@
20
20
  } :root {
21
21
  } :root {
22
22
  --focus-color: var(--color-light-border-link);
23
- } .pure-cell__component_l7kda {
23
+ } .pure-cell__component_yqcv9 {
24
24
  text-align: unset;
25
25
  box-sizing: border-box;
26
- } .pure-cell__horizontal_l7kda {
26
+ } .pure-cell__horizontal_yqcv9 {
27
27
  display: flex;
28
- width: 100%
29
- } .pure-cell__horizontal_l7kda > section:not(:last-child) {
30
- margin-right: var(--gap-m);
31
- } .pure-cell__vertical_l7kda {
28
+ width: 100%;
29
+ } .pure-cell__vertical_yqcv9 {
32
30
  display: flex;
33
31
  align-items: center;
34
- flex-direction: column
35
- } .pure-cell__vertical_l7kda > section:not(:last-child) {
36
- margin-bottom: var(--gap-s);
37
- } .pure-cell__button_l7kda {
32
+ flex-direction: column;
33
+ } .pure-cell__button_yqcv9 {
38
34
  font-family: inherit;
39
35
  background: none;
40
36
  border: 0;
@@ -42,37 +38,57 @@
42
38
  cursor: pointer;
43
39
  transition: opacity 0.15s ease-in-out;
44
40
  padding: 0
45
- } .pure-cell__button_l7kda:hover {
41
+ } .pure-cell__button_yqcv9:hover {
46
42
  opacity: 0.8;
47
- } .pure-cell__button_l7kda:active {
43
+ } .pure-cell__button_yqcv9:active {
48
44
  opacity: 0.6;
49
- } .pure-cell__link_l7kda {
45
+ } .pure-cell__link_yqcv9 {
50
46
  text-decoration: none;
51
47
  color: inherit;
52
48
  cursor: pointer;
53
49
  transition: opacity 0.15s ease-in-out
54
- } .pure-cell__link_l7kda:hover {
50
+ } .pure-cell__link_yqcv9:hover {
55
51
  opacity: 0.8;
56
- } .pure-cell__link_l7kda:active {
52
+ } .pure-cell__link_yqcv9:active {
57
53
  opacity: 0.6;
58
- } .pure-cell__none_l7kda {
54
+ } .pure-cell__none_yqcv9 {
59
55
  padding: 0;
60
- } .pure-cell__airy_l7kda {
56
+ } .pure-cell__airy_yqcv9 {
61
57
  padding: var(--gap-m) 0;
62
- } .pure-cell__defaultPadding_l7kda {
58
+ } .pure-cell__default_yqcv9 {
63
59
  padding: var(--gap-s) 0;
64
- } .pure-cell__compact_l7kda {
60
+ } .pure-cell__compact_yqcv9 {
65
61
  padding: var(--gap-xs) 0;
66
- } .pure-cell__tiny_l7kda {
62
+ } .pure-cell__tiny_yqcv9 {
67
63
  padding: var(--gap-2xs) 0;
68
- } .pure-cell__left_l7kda {
64
+ } .pure-cell__noneTop_yqcv9 {
65
+ padding-top: 0;
66
+ } .pure-cell__airyTop_yqcv9 {
67
+ padding-top: var(--gap-m);
68
+ } .pure-cell__defaultTop_yqcv9 {
69
+ padding-top: var(--gap-s);
70
+ } .pure-cell__compactTop_yqcv9 {
71
+ padding-top: var(--gap-xs);
72
+ } .pure-cell__tinyTop_yqcv9 {
73
+ padding-top: var(--gap-2xs);
74
+ } .pure-cell__noneBottom_yqcv9 {
75
+ padding-bottom: 0;
76
+ } .pure-cell__airyBottom_yqcv9 {
77
+ padding-bottom: var(--gap-m);
78
+ } .pure-cell__defaultBottom_yqcv9 {
79
+ padding-bottom: var(--gap-s);
80
+ } .pure-cell__compactBottom_yqcv9 {
81
+ padding-bottom: var(--gap-xs);
82
+ } .pure-cell__tinyBottom_yqcv9 {
83
+ padding-bottom: var(--gap-2xs);
84
+ } .pure-cell__left_yqcv9 {
69
85
  padding-left: var(--gap-m);
70
- } .pure-cell__right_l7kda {
86
+ } .pure-cell__right_yqcv9 {
71
87
  padding-right: var(--gap-m);
72
- } .pure-cell__both_l7kda {
88
+ } .pure-cell__both_yqcv9 {
73
89
  padding-right: var(--gap-m);
74
90
  padding-left: var(--gap-m);
75
- } .pure-cell__focused_l7kda {
91
+ } .pure-cell__focused_yqcv9 {
76
92
  outline: 2px solid var(--focus-color);
77
93
  outline-offset: 2px;
78
94
  }
package/modern/index.d.ts CHANGED
@@ -1 +1,2 @@
1
- export { PureCell } from "./component-fd7196d2";
1
+ export { PureCell } from "./component-21d7b687";
2
+ export type { PureCellProps } from "./component-21d7b687";
package/modern/index.js CHANGED
@@ -1 +1 @@
1
- export { P as PureCell } from './component-1458a9e3.js';
1
+ export { P as PureCell } from './component-4f06f921.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-pure-cell",
3
- "version": "4.7.0",
3
+ "version": "4.8.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -15,13 +15,13 @@
15
15
  "react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
16
16
  },
17
17
  "dependencies": {
18
- "@alfalab/core-components-amount": "^3.4.0",
19
- "@alfalab/core-components-button": "^11.3.0",
18
+ "@alfalab/core-components-amount": "^3.5.0",
19
+ "@alfalab/core-components-button": "^11.4.0",
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",
23
23
  "@alfalab/hooks": "^1.13.0",
24
- "@alfalab/data": "^1.7.0",
24
+ "@alfalab/data": "^1.8.0",
25
25
  "classnames": "^2.3.1",
26
26
  "react-merge-refs": "1.1.0",
27
27
  "tslib": "^2.4.0"
package/src/component.tsx CHANGED
@@ -39,7 +39,7 @@ export type PureCellContext = {
39
39
  // eslint-disable-next-line @typescript-eslint/no-redeclare
40
40
  export const PureCellContext = React.createContext<PureCellContext>({});
41
41
 
42
- export type PureCellProps = {
42
+ type BasePureCellProps = {
43
43
  /**
44
44
  * Направление
45
45
  */
@@ -58,7 +58,22 @@ export type PureCellProps = {
58
58
  /**
59
59
  * Вертикальные отступы
60
60
  */
61
- verticalPadding?: 'airy' | 'default' | 'compact' | 'tiny' | 'none';
61
+ verticalPadding?:
62
+ | 'airy'
63
+ | 'default'
64
+ | 'compact'
65
+ | 'tiny'
66
+ | 'none'
67
+ | {
68
+ /**
69
+ * Вертикальный отступ сверху
70
+ */
71
+ top?: 'airy' | 'default' | 'compact' | 'tiny' | 'none';
72
+ /**
73
+ * Вертикальный отступ снизу
74
+ */
75
+ bottom?: 'airy' | 'default' | 'compact' | 'tiny' | 'none';
76
+ };
62
77
 
63
78
  /**
64
79
  * Горизонтальные отступы
@@ -69,6 +84,7 @@ export type PureCellProps = {
69
84
  * Позволяет использовать кастомный компонент для кнопки (например Link из роутера)
70
85
  */
71
86
  tag?: ElementType;
87
+
72
88
  /**
73
89
  * Компоненты
74
90
  */
@@ -79,12 +95,14 @@ export type PureCellProps = {
79
95
  */
80
96
  dataTestId?: string;
81
97
  };
82
- type AnchorPureCellProps = PureCellProps & AnchorHTMLAttributes<HTMLAnchorElement>;
83
- type ButtonPureCellProps = PureCellProps & ButtonHTMLAttributes<HTMLButtonElement>;
84
- type ElementPureCellProps = PureCellProps & HTMLAttributes<HTMLElement>;
85
- type PureProps = Partial<AnchorPureCellProps | ButtonPureCellProps | ElementPureCellProps>;
86
-
87
- const PureCellComponent = forwardRef<HTMLElement, PureProps>(
98
+ type AnchorPureCellProps = BasePureCellProps & AnchorHTMLAttributes<HTMLAnchorElement>;
99
+ type ButtonPureCellProps = BasePureCellProps & ButtonHTMLAttributes<HTMLButtonElement>;
100
+ type ElementPureCellProps = BasePureCellProps & HTMLAttributes<HTMLElement>;
101
+ export type PureCellProps = Partial<
102
+ AnchorPureCellProps | ButtonPureCellProps | ElementPureCellProps
103
+ >;
104
+
105
+ const PureCellComponent = forwardRef<HTMLElement, PureCellProps>(
88
106
  (
89
107
  {
90
108
  className,
@@ -106,11 +124,18 @@ const PureCellComponent = forwardRef<HTMLElement, PureProps>(
106
124
  [styles.component]: true,
107
125
  [styles.focused]: focused,
108
126
  [styles[direction]]: true,
109
- [styles.defaultPadding]: verticalPadding === 'default',
110
- [styles[verticalPadding]]: verticalPadding !== 'default',
111
127
  [styles[horizontalPadding]]: true,
112
128
  };
113
129
 
130
+ if (typeof verticalPadding === 'string') {
131
+ addClasses[styles[verticalPadding as string]] = typeof verticalPadding === 'string';
132
+ }
133
+
134
+ if (typeof verticalPadding === 'object') {
135
+ addClasses[styles[`${verticalPadding.top}Top`]] = !!verticalPadding.top;
136
+ addClasses[styles[`${verticalPadding.bottom}Bottom`]] = !!verticalPadding.bottom;
137
+ }
138
+
114
139
  if (href) {
115
140
  const { target } = restProps as AnchorHTMLAttributes<HTMLAnchorElement>;
116
141
 
@@ -24,14 +24,31 @@ export type Props = {
24
24
  * Вертикальное выравнивание
25
25
  */
26
26
  verticalAlign?: 'top' | 'center' | 'bottom';
27
+
28
+ /**
29
+ * Отступ от графики
30
+ */
31
+ graphicPadding?: 'airy' | 'default' | 'compact' | 'tiny' | 'none';
27
32
  };
28
33
 
29
- export const Graphics: React.FC<Props> = ({ children, dataTestId, verticalAlign = 'top' }) => {
34
+ export const Graphics: React.FC<Props> = ({
35
+ children,
36
+ dataTestId,
37
+ verticalAlign = 'top',
38
+ graphicPadding,
39
+ }) => {
30
40
  const pureCellContext = useContext(PureCellContext);
31
41
 
42
+ const defaultGraphicPadding = pureCellContext.direction === 'horizontal' ? 'airy' : 'default';
43
+
32
44
  return (
33
45
  <section
34
- className={cn(styles.component, styles[verticalAlign])}
46
+ className={cn(
47
+ styles.component,
48
+ styles[verticalAlign],
49
+ styles[pureCellContext.direction || 'horizontal'],
50
+ styles[graphicPadding || defaultGraphicPadding],
51
+ )}
35
52
  data-test-id={getDataTestId(dataTestId || pureCellContext.dataTestId, 'graphics')}
36
53
  >
37
54
  {children}
@@ -16,3 +16,46 @@
16
16
  .bottom {
17
17
  align-self: flex-end;
18
18
  }
19
+
20
+ .horizontal:not(:last-child) {
21
+ &.none {
22
+ margin-right: 0;
23
+ }
24
+
25
+ &.airy {
26
+ margin-right: var(--gap-m);
27
+ }
28
+
29
+ &.default {
30
+ margin-right: var(--gap-s);
31
+ }
32
+
33
+ &.compact {
34
+ margin-right: var(--gap-xs);
35
+ }
36
+
37
+ &.tiny {
38
+ margin-right: var(--gap-2xs);
39
+ }
40
+ }
41
+
42
+ .vertical:not(:last-child) {
43
+ &.none {
44
+ margin-bottom: 0;
45
+ }
46
+ &.airy {
47
+ margin-bottom: var(--gap-m);
48
+ }
49
+
50
+ &.default {
51
+ margin-bottom: var(--gap-s);
52
+ }
53
+
54
+ &.compact {
55
+ margin-bottom: var(--gap-xs);
56
+ }
57
+
58
+ &.tiny {
59
+ margin-bottom: var(--gap-2xs);
60
+ }
61
+ }
@@ -22,7 +22,13 @@ type Props = {
22
22
  /**
23
23
  * Размер текста
24
24
  */
25
- view?: 'primary-large' | 'primary-medium' | 'primary-small' | 'component' | 'component-primary';
25
+ view?:
26
+ | 'primary-large'
27
+ | 'primary-medium'
28
+ | 'primary-small'
29
+ | 'component'
30
+ | 'component-primary'
31
+ | 'secondary-large';
26
32
 
27
33
  /**
28
34
  * Толщина title
@@ -8,20 +8,12 @@
8
8
  .horizontal {
9
9
  display: flex;
10
10
  width: 100%;
11
-
12
- & > section:not(:last-child) {
13
- margin-right: var(--gap-m);
14
- }
15
11
  }
16
12
 
17
13
  .vertical {
18
14
  display: flex;
19
15
  align-items: center;
20
16
  flex-direction: column;
21
-
22
- & > section:not(:last-child) {
23
- margin-bottom: var(--gap-s);
24
- }
25
17
  }
26
18
 
27
19
  .button {
@@ -64,7 +56,7 @@
64
56
  padding: var(--gap-m) 0;
65
57
  }
66
58
 
67
- .defaultPadding {
59
+ .default {
68
60
  padding: var(--gap-s) 0;
69
61
  }
70
62
 
@@ -76,6 +68,46 @@
76
68
  padding: var(--gap-2xs) 0;
77
69
  }
78
70
 
71
+ .noneTop {
72
+ padding-top: 0;
73
+ }
74
+
75
+ .airyTop {
76
+ padding-top: var(--gap-m);
77
+ }
78
+
79
+ .defaultTop {
80
+ padding-top: var(--gap-s);
81
+ }
82
+
83
+ .compactTop {
84
+ padding-top: var(--gap-xs);
85
+ }
86
+
87
+ .tinyTop {
88
+ padding-top: var(--gap-2xs);
89
+ }
90
+
91
+ .noneBottom {
92
+ padding-bottom: 0;
93
+ }
94
+
95
+ .airyBottom {
96
+ padding-bottom: var(--gap-m);
97
+ }
98
+
99
+ .defaultBottom {
100
+ padding-bottom: var(--gap-s);
101
+ }
102
+
103
+ .compactBottom {
104
+ padding-bottom: var(--gap-xs);
105
+ }
106
+
107
+ .tinyBottom {
108
+ padding-bottom: var(--gap-2xs);
109
+ }
110
+
79
111
  .left {
80
112
  padding-left: var(--gap-m);
81
113
  }
package/src/index.ts CHANGED
@@ -1 +1,2 @@
1
1
  export { PureCell } from './component';
2
+ export type { PureCellProps } from './component';