@alfalab/core-components-pure-cell 3.0.3 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/{component-7b340665.d.ts → component-2bda6d29.d.ts} +0 -0
  2. package/{component-7b340665.js → component-2bda6d29.js} +13 -11
  3. package/{cssm/component-3f45f3c4.d.ts → component-c49f24a8.d.ts} +9 -9
  4. package/component.js +6 -5
  5. package/components/addon/component.d.ts +1 -1
  6. package/components/addon/component.js +4 -7
  7. package/components/addon/index.css +15 -8
  8. package/components/addon/index.js +1 -1
  9. package/components/amount/component.d.ts +2 -6
  10. package/components/amount/component.js +7 -7
  11. package/components/amount/index.css +2 -2
  12. package/components/amount/index.js +3 -2
  13. package/components/amount-title/component.d.ts +1 -9
  14. package/components/amount-title/component.js +6 -6
  15. package/components/amount-title/index.css +3 -3
  16. package/components/amount-title/index.js +3 -2
  17. package/components/category/component.d.ts +5 -0
  18. package/components/category/component.js +5 -4
  19. package/components/category/index.css +8 -4
  20. package/components/category/index.js +1 -1
  21. package/components/content/component.js +6 -5
  22. package/components/content/index.css +3 -3
  23. package/components/content/index.d.ts +1 -1
  24. package/components/content/index.js +6 -5
  25. package/components/footer/component.js +2 -2
  26. package/components/footer/index.css +4 -4
  27. package/components/footer/index.js +1 -1
  28. package/components/footer-button/component.d.ts +5 -0
  29. package/components/footer-button/component.js +15 -5
  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 +3 -2
  33. package/components/footer-text/component.js +1 -1
  34. package/components/footer-text/index.js +1 -1
  35. package/components/graphics/component.js +2 -2
  36. package/components/graphics/index.css +2 -2
  37. package/components/graphics/index.js +1 -1
  38. package/components/main/component.js +6 -5
  39. package/components/main/index.css +4 -4
  40. package/components/main/index.d.ts +1 -1
  41. package/components/main/index.js +6 -5
  42. package/components/text/component.js +6 -5
  43. package/components/text/index.css +10 -8
  44. package/components/text/index.d.ts +1 -1
  45. package/components/text/index.js +6 -5
  46. package/components/typesProps.d.ts +3 -3
  47. package/{component-3f45f3c4.d.ts → cssm/component-c49f24a8.d.ts} +10 -10
  48. package/cssm/{component-d3306cf3.d.ts → component-c4e268e7.d.ts} +0 -0
  49. package/cssm/{component-d3306cf3.js → component-c4e268e7.js} +8 -6
  50. package/cssm/component.js +5 -4
  51. package/cssm/components/addon/component.d.ts +1 -1
  52. package/cssm/components/addon/component.js +2 -5
  53. package/cssm/components/addon/index.module.css +8 -1
  54. package/cssm/components/amount/component.d.ts +2 -6
  55. package/cssm/components/amount/component.js +5 -5
  56. package/cssm/components/amount/index.js +2 -1
  57. package/cssm/components/amount-title/component.d.ts +1 -9
  58. package/cssm/components/amount-title/component.js +4 -4
  59. package/cssm/components/amount-title/index.js +2 -1
  60. package/cssm/components/category/component.d.ts +5 -0
  61. package/cssm/components/category/component.js +3 -2
  62. package/cssm/components/category/index.module.css +4 -0
  63. package/cssm/components/content/component.js +5 -4
  64. package/cssm/components/content/index.d.ts +1 -1
  65. package/cssm/components/content/index.js +5 -4
  66. package/cssm/components/footer-button/component.d.ts +5 -0
  67. package/cssm/components/footer-button/component.js +14 -6
  68. package/cssm/components/footer-button/index.d.ts +1 -1
  69. package/cssm/components/footer-button/index.js +2 -1
  70. package/cssm/components/main/component.js +5 -4
  71. package/cssm/components/main/index.d.ts +1 -1
  72. package/cssm/components/main/index.js +5 -4
  73. package/cssm/components/text/component.js +5 -4
  74. package/cssm/components/text/index.d.ts +1 -1
  75. package/cssm/components/text/index.js +5 -4
  76. package/cssm/components/text/index.module.css +4 -2
  77. package/cssm/components/typesProps.d.ts +3 -3
  78. package/cssm/index.d.ts +1 -1
  79. package/cssm/index.js +5 -4
  80. package/{esm/component-ef452835.d.ts → cssm/tslib.es6-9682e485.d.ts} +8 -8
  81. package/{component-80973026.js → cssm/tslib.es6-9682e485.js} +1 -18
  82. package/esm/{component-922dd03a.d.ts → component-831effc0.d.ts} +0 -0
  83. package/esm/{component-922dd03a.js → component-831effc0.js} +10 -8
  84. package/esm/{component-3f45f3c4.d.ts → component-c49f24a8.d.ts} +10 -10
  85. package/esm/component.js +6 -5
  86. package/esm/components/addon/component.d.ts +1 -1
  87. package/esm/components/addon/component.js +4 -7
  88. package/esm/components/addon/index.css +15 -8
  89. package/esm/components/addon/index.js +1 -1
  90. package/esm/components/amount/component.d.ts +2 -6
  91. package/esm/components/amount/component.js +7 -7
  92. package/esm/components/amount/index.css +2 -2
  93. package/esm/components/amount/index.js +3 -2
  94. package/esm/components/amount-title/component.d.ts +1 -9
  95. package/esm/components/amount-title/component.js +6 -6
  96. package/esm/components/amount-title/index.css +3 -3
  97. package/esm/components/amount-title/index.js +3 -2
  98. package/esm/components/category/component.d.ts +5 -0
  99. package/esm/components/category/component.js +5 -4
  100. package/esm/components/category/index.css +8 -4
  101. package/esm/components/category/index.js +1 -1
  102. package/esm/components/content/component.js +6 -5
  103. package/esm/components/content/index.css +3 -3
  104. package/esm/components/content/index.d.ts +1 -1
  105. package/esm/components/content/index.js +6 -5
  106. package/esm/components/footer/component.js +2 -2
  107. package/esm/components/footer/index.css +4 -4
  108. package/esm/components/footer/index.js +1 -1
  109. package/esm/components/footer-button/component.d.ts +5 -0
  110. package/esm/components/footer-button/component.js +14 -4
  111. package/esm/components/footer-button/index.css +2 -2
  112. package/esm/components/footer-button/index.d.ts +1 -1
  113. package/esm/components/footer-button/index.js +3 -2
  114. package/esm/components/footer-text/component.js +1 -1
  115. package/esm/components/footer-text/index.js +1 -1
  116. package/esm/components/graphics/component.js +2 -2
  117. package/esm/components/graphics/index.css +2 -2
  118. package/esm/components/graphics/index.js +1 -1
  119. package/esm/components/main/component.js +6 -5
  120. package/esm/components/main/index.css +4 -4
  121. package/esm/components/main/index.d.ts +1 -1
  122. package/esm/components/main/index.js +6 -5
  123. package/esm/components/text/component.js +6 -5
  124. package/esm/components/text/index.css +10 -8
  125. package/esm/components/text/index.d.ts +1 -1
  126. package/esm/components/text/index.js +6 -5
  127. package/esm/components/typesProps.d.ts +3 -3
  128. package/esm/{getDataTestId-181163b5.d.ts → getDataTestId-56acaf74.d.ts} +0 -0
  129. package/esm/{getDataTestId-181163b5.js → getDataTestId-56acaf74.js} +0 -0
  130. package/esm/index.css +19 -19
  131. package/esm/index.d.ts +1 -1
  132. package/esm/index.js +6 -5
  133. package/{cssm/component-22ece846.d.ts → esm/tslib.es6-daf5d84d.d.ts} +8 -8
  134. package/esm/{component-ef452835.js → tslib.es6-daf5d84d.js} +2 -14
  135. package/{getDataTestId-3a7e2404.d.ts → getDataTestId-da1ddd99.d.ts} +0 -0
  136. package/{getDataTestId-3a7e2404.js → getDataTestId-da1ddd99.js} +0 -0
  137. package/index.css +19 -19
  138. package/index.d.ts +1 -1
  139. package/index.js +6 -5
  140. package/modern/{component-99f95ea2.d.ts → component-b7f322e4.d.ts} +0 -0
  141. package/modern/{component-99f95ea2.js → component-b7f322e4.js} +11 -9
  142. package/modern/{component-3f45f3c4.d.ts → component-c49f24a8.d.ts} +10 -10
  143. package/modern/component.js +4 -4
  144. package/modern/components/addon/component.d.ts +1 -1
  145. package/modern/components/addon/component.js +3 -5
  146. package/modern/components/addon/index.css +15 -8
  147. package/modern/components/addon/index.js +1 -1
  148. package/modern/components/amount/component.d.ts +2 -6
  149. package/modern/components/amount/component.js +5 -8
  150. package/modern/components/amount/index.css +2 -2
  151. package/modern/components/amount/index.js +2 -2
  152. package/modern/components/amount-title/component.d.ts +1 -9
  153. package/modern/components/amount-title/component.js +5 -8
  154. package/modern/components/amount-title/index.css +3 -3
  155. package/modern/components/amount-title/index.js +2 -2
  156. package/modern/components/category/component.d.ts +5 -0
  157. package/modern/components/category/component.js +5 -4
  158. package/modern/components/category/index.css +8 -4
  159. package/modern/components/category/index.js +1 -1
  160. package/modern/components/content/component.js +4 -4
  161. package/modern/components/content/index.css +3 -3
  162. package/modern/components/content/index.d.ts +1 -1
  163. package/modern/components/content/index.js +4 -4
  164. package/modern/components/footer/component.js +2 -2
  165. package/modern/components/footer/index.css +4 -4
  166. package/modern/components/footer/index.js +1 -1
  167. package/modern/components/footer-button/component.js +3 -3
  168. package/modern/components/footer-button/index.css +2 -2
  169. package/modern/components/footer-button/index.js +1 -1
  170. package/modern/components/footer-text/component.js +1 -1
  171. package/modern/components/footer-text/index.js +1 -1
  172. package/modern/components/graphics/component.js +3 -5
  173. package/modern/components/graphics/index.css +2 -2
  174. package/modern/components/graphics/index.js +1 -1
  175. package/modern/components/main/component.js +4 -4
  176. package/modern/components/main/index.css +4 -4
  177. package/modern/components/main/index.d.ts +1 -1
  178. package/modern/components/main/index.js +4 -4
  179. package/modern/components/text/component.js +4 -4
  180. package/modern/components/text/index.css +10 -8
  181. package/modern/components/text/index.d.ts +1 -1
  182. package/modern/components/text/index.js +4 -4
  183. package/modern/components/typesProps.d.ts +3 -3
  184. package/modern/{getDataTestId-60d7e355.d.ts → getDataTestId-e8cc70ab.d.ts} +0 -0
  185. package/modern/{getDataTestId-60d7e355.js → getDataTestId-e8cc70ab.js} +0 -0
  186. package/modern/index.css +19 -19
  187. package/modern/index.d.ts +1 -1
  188. package/modern/index.js +4 -4
  189. package/package.json +3 -3
  190. package/{component-80973026.d.ts → tslib.es6-bb39d27e.d.ts} +8 -8
  191. package/{cssm/component-22ece846.js → tslib.es6-bb39d27e.js} +1 -17
@@ -1,9 +1,9 @@
1
1
  import React, { useContext, forwardRef, useRef } from 'react';
2
2
  import mergeRefs from 'react-merge-refs';
3
3
  import cn from 'classnames';
4
- import { useFocus } from '@alfalab/hooks';
5
4
  import { Comment } from '@alfalab/core-components-comment/modern';
6
- import { g as getDataTestId } from './getDataTestId-60d7e355.js';
5
+ import { useFocus } from '@alfalab/hooks';
6
+ import { g as getDataTestId } from './getDataTestId-e8cc70ab.js';
7
7
  import { Addon } from './components/addon/component.js';
8
8
  import { Typography } from '@alfalab/core-components-typography/modern';
9
9
  import { Amount } from './components/amount/component.js';
@@ -14,7 +14,7 @@ import { FooterButton } from './components/footer-button/component.js';
14
14
  import { FooterText } from './components/footer-text/component.js';
15
15
  import { Graphics } from './components/graphics/component.js';
16
16
 
17
- var styles = {"component":"pure-cell__component_swkbf","horizontal":"pure-cell__horizontal_swkbf"};
17
+ var styles = {"component":"pure-cell__component_1n24j","horizontal":"pure-cell__horizontal_1n24j"};
18
18
  require('./components/content/index.css')
19
19
 
20
20
  const Content = ({ children, dataTestId }) => {
@@ -22,7 +22,7 @@ const Content = ({ children, dataTestId }) => {
22
22
  return (React.createElement("section", { className: cn(styles.component, { [styles.horizontal]: direction === 'horizontal' }), "data-test-id": getDataTestId(dataTestId, 'content') }, children));
23
23
  };
24
24
 
25
- var styles$1 = {"component":"pure-cell__component_1iei5","vertical":"pure-cell__vertical_1iei5","reverse":"pure-cell__reverse_1iei5"};
25
+ var styles$1 = {"component":"pure-cell__component_ti7om","vertical":"pure-cell__vertical_ti7om","reverse":"pure-cell__reverse_ti7om"};
26
26
  require('./components/main/index.css')
27
27
 
28
28
  const Main = ({ children, isReverse, dataTestId }) => {
@@ -32,7 +32,7 @@ const Main = ({ children, isReverse, dataTestId }) => {
32
32
  }), "data-test-id": getDataTestId(dataTestId, 'main') }, children));
33
33
  };
34
34
 
35
- var styles$2 = {"horizontal":"pure-cell__horizontal_174je","rowLimit1":"pure-cell__rowLimit1_174je","rowLimit2":"pure-cell__rowLimit2_174je","component":"pure-cell__component_174je","vertical":"pure-cell__vertical_174je","title":"pure-cell__title_174je"};
35
+ var styles$2 = {"horizontal":"pure-cell__horizontal_zjarl","rowLimit1":"pure-cell__rowLimit1_zjarl","rowLimit2":"pure-cell__rowLimit2_zjarl","component":"pure-cell__component_zjarl","vertical":"pure-cell__vertical_zjarl","title":"pure-cell__title_zjarl","value":"pure-cell__value_zjarl"};
36
36
  require('./components/text/index.css')
37
37
 
38
38
  const Text = ({ children, value, rowLimit, view = 'component', titleColor, valueColor, dataTestId, }) => {
@@ -42,12 +42,14 @@ const Text = ({ children, value, rowLimit, view = 'component', titleColor, value
42
42
  [styles$2.vertical]: direction !== 'horizontal',
43
43
  }) },
44
44
  React.createElement("span", { className: styles$2.title }, typeof children === 'string' ? (React.createElement(Typography.Text, { view: view, color: titleColor, className: className, "data-test-id": getDataTestId(dataTestId, 'text') }, children)) : (children)),
45
- React.createElement("span", null, typeof value === 'string' ? (React.createElement(Typography.Text, { view: view, color: valueColor, className: className, "data-test-id": getDataTestId(dataTestId, 'text') }, value)) : (value))));
45
+ value !== undefined && (React.createElement("span", { className: styles$2.value }, typeof value === 'string' ? (React.createElement(Typography.Text, { view: view, color: valueColor, className: className, "data-test-id": getDataTestId(dataTestId, 'text') }, value)) : (value)))));
46
46
  };
47
47
 
48
- var styles$3 = {"component":"pure-cell__component_1hstz","horizontal":"pure-cell__horizontal_1hstz","vertical":"pure-cell__vertical_1hstz","button":"pure-cell__button_1hstz","link":"pure-cell__link_1hstz","none":"pure-cell__none_1hstz","airy":"pure-cell__airy_1hstz","defaultPadding":"pure-cell__defaultPadding_1hstz","compact":"pure-cell__compact_1hstz","tiny":"pure-cell__tiny_1hstz","left":"pure-cell__left_1hstz","right":"pure-cell__right_1hstz","both":"pure-cell__both_1hstz","focused":"pure-cell__focused_1hstz"};
48
+ var styles$3 = {"component":"pure-cell__component_exj34","horizontal":"pure-cell__horizontal_exj34","vertical":"pure-cell__vertical_exj34","button":"pure-cell__button_exj34","link":"pure-cell__link_exj34","none":"pure-cell__none_exj34","airy":"pure-cell__airy_exj34","defaultPadding":"pure-cell__defaultPadding_exj34","compact":"pure-cell__compact_exj34","tiny":"pure-cell__tiny_exj34","left":"pure-cell__left_exj34","right":"pure-cell__right_exj34","both":"pure-cell__both_exj34","focused":"pure-cell__focused_exj34"};
49
49
  require('./index.css')
50
50
 
51
+ /* eslint-disable react/jsx-no-constructed-context-values */
52
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
51
53
  const PureCellContext = React.createContext({});
52
54
  const PureCellComponent = forwardRef(({ className, dataTestId, onClick, href, tag: Component = (href && 'a') || (onClick && 'button') || 'section', children, horizontalPadding = 'none', verticalPadding = 'none', direction = 'horizontal', ...restProps }, ref) => {
53
55
  const cellRef = useRef(null);
@@ -64,11 +66,11 @@ const PureCellComponent = forwardRef(({ className, dataTestId, onClick, href, ta
64
66
  const { target } = restProps;
65
67
  // Для совместимости с react-router-dom, меняем href на to
66
68
  const hrefProps = { [typeof Component === 'string' ? 'href' : 'to']: href };
67
- return (React.createElement(Component, Object.assign({ rel: target === '_blank' ? 'noreferrer noopener' : undefined }, restProps, hrefProps, { ref: mergeRefs([cellRef, ref]), className: cn(styles$3.link, addClasses, className), "data-test-id": dataTestId, onClick: onClick }),
69
+ return (React.createElement(Component, { rel: target === '_blank' ? 'noreferrer noopener' : undefined, ...restProps, ...hrefProps, ref: mergeRefs([cellRef, ref]), className: cn(styles$3.link, addClasses, className), "data-test-id": dataTestId, onClick: onClick },
68
70
  React.createElement(PureCellContext.Provider, { value: { direction } }, children)));
69
71
  }
70
72
  if (onClick) {
71
- return (React.createElement(Component, Object.assign({}, restProps, { ref: mergeRefs([cellRef, ref]), className: cn(styles$3.button, addClasses, className), "data-test-id": dataTestId, onClick: onClick }),
73
+ return (React.createElement(Component, { ...restProps, ref: mergeRefs([cellRef, ref]), className: cn(styles$3.button, addClasses, className), "data-test-id": dataTestId, onClick: onClick },
72
74
  React.createElement(PureCellContext.Provider, { value: { direction } }, children)));
73
75
  }
74
76
  return (React.createElement(Component, { ref: ref, tabIndex: 0, className: cn(addClasses, className), "data-test-id": dataTestId },
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
3
  import { AnchorHTMLAttributes, ButtonHTMLAttributes, ElementType, HTMLAttributes } from "react";
4
+ import { ButtonProps } from "@alfalab/core-components-button";
4
5
  import { PureCellElement } from "./components/types";
5
6
  type PureCellContext = {
6
7
  /** Направление */
@@ -44,12 +45,13 @@ type PureCellProps = {
44
45
  type AnchorPureCellProps = PureCellProps & AnchorHTMLAttributes<HTMLAnchorElement>;
45
46
  type ButtonPureCellProps = PureCellProps & ButtonHTMLAttributes<HTMLButtonElement>;
46
47
  type ElementPureCellProps = PureCellProps & HTMLAttributes<HTMLElement>;
48
+ type PureProps = Partial<AnchorPureCellProps | ButtonPureCellProps | ElementPureCellProps>;
47
49
  /**
48
50
  * Универсальный конструктор для сборки любой ячейки.
49
51
  *
50
52
  * [Макет](https://www.figma.com/file/KlFOLLkKO8rtvvQE3RXuhq/Click-Library?node-id=43525%3A240018)
51
53
  */
52
- declare const PureCell: React.ForwardRefExoticComponent<(Partial<AnchorPureCellProps> & React.RefAttributes<HTMLElement>) | (Partial<ButtonPureCellProps> & React.RefAttributes<HTMLElement>) | (Partial<ElementPureCellProps> & React.RefAttributes<HTMLElement>)> & {
54
+ declare const PureCell: React.ForwardRefExoticComponent<PureProps & React.RefAttributes<HTMLElement>> & {
53
55
  Main: React.FC<{
54
56
  children: import("./components/types").MainElement;
55
57
  isReverse?: boolean | undefined;
@@ -63,26 +65,23 @@ declare const PureCell: React.ForwardRefExoticComponent<(Partial<AnchorPureCellP
63
65
  Text: React.FC<{
64
66
  children?: React.ReactNode;
65
67
  rowLimit?: 1 | 2 | undefined;
66
- view: "primary-small" | "component";
68
+ view: "component" | "primary-small";
67
69
  titleColor: "link" | "primary" | "secondary" | "tertiary" | "disabled" | "accent" | "attention" | "positive" | "tertiary-inverted" | "primary-inverted" | "secondary-inverted" | "negative";
68
70
  value?: React.ReactNode;
69
71
  valueColor?: "link" | "primary" | "secondary" | "tertiary" | "disabled" | "accent" | "attention" | "positive" | "tertiary-inverted" | "primary-inverted" | "secondary-inverted" | "negative" | undefined;
70
72
  dataTestId?: string | undefined;
71
73
  }>;
72
74
  Amount: React.FC<{
73
- amount: import("./components/typesProps").AmountProps;
74
75
  weight?: "bold" | "normal" | undefined;
75
- view?: "primary-small" | "component" | undefined;
76
+ textView?: "component" | "primary-small" | undefined;
76
77
  color?: "link" | "primary" | "secondary" | "tertiary" | "disabled" | "accent" | "attention" | "positive" | "tertiary-inverted" | "primary-inverted" | "secondary-inverted" | "negative" | undefined;
77
78
  dataTestId?: string | undefined;
78
- }>;
79
+ } & import("./components/typesProps").AmountProps>;
79
80
  AmountTitle: React.FC<{
80
- amount: import("./components/typesProps").AmountProps;
81
81
  color?: "link" | "primary" | "secondary" | "tertiary" | "disabled" | "accent" | "attention" | "positive" | "tertiary-inverted" | "primary-inverted" | "secondary-inverted" | "negative" | undefined;
82
- dataTestId?: string | undefined;
83
- }>;
82
+ } & import("./components/typesProps").AmountProps>;
84
83
  Addon: React.FC<{
85
- verticalAlign?: "center" | undefined;
84
+ verticalAlign?: "top" | "center" | "bottom" | undefined;
86
85
  addonPadding?: "default" | "none" | undefined;
87
86
  children: import("./components/types").AddonElement;
88
87
  dataTestId?: string | undefined;
@@ -93,11 +92,12 @@ declare const PureCell: React.ForwardRefExoticComponent<(Partial<AnchorPureCellP
93
92
  dataTestId?: string | undefined;
94
93
  }>;
95
94
  ExtraSubtitle: React.FC<import("./components/footer-text/index").Props>;
96
- FooterButton: React.FC<Partial<import("@alfalab/core-components-button").AnchorButtonProps> | Partial<import("@alfalab/core-components-button").NativeButtonProps>>;
95
+ FooterButton: React.FC<ButtonProps>;
97
96
  Comment: React.FC<import("@alfalab/core-components-comment").CommentProps>;
98
97
  Category: React.FC<{
99
98
  categoryName: string;
100
99
  categoryPercent?: number | undefined;
100
+ rightAddons?: React.ReactNode;
101
101
  dataTestId?: string | undefined;
102
102
  }>;
103
103
  };
@@ -1,16 +1,16 @@
1
1
  import 'react';
2
2
  import 'react-merge-refs';
3
3
  import 'classnames';
4
- import '@alfalab/hooks';
5
4
  import '@alfalab/core-components-comment/modern';
6
- import './getDataTestId-60d7e355.js';
5
+ import '@alfalab/hooks';
6
+ import './getDataTestId-e8cc70ab.js';
7
7
  import './components/addon/component.js';
8
- import '@alfalab/core-components-typography/modern';
9
8
  import '@alfalab/core-components-amount/modern';
9
+ import '@alfalab/core-components-typography/modern';
10
10
  import './components/amount/component.js';
11
11
  import './components/amount-title/component.js';
12
12
  import './components/category/component.js';
13
- export { P as PureCell, a as PureCellContext } from './component-99f95ea2.js';
13
+ export { P as PureCell, a as PureCellContext } from './component-b7f322e4.js';
14
14
  import './components/footer/component.js';
15
15
  import '@alfalab/core-components-button/modern';
16
16
  import './components/footer-button/component.js';
@@ -5,7 +5,7 @@ type Props = {
5
5
  /**
6
6
  * Вертикальное выравнивание
7
7
  */
8
- verticalAlign?: 'center';
8
+ verticalAlign?: 'top' | 'center' | 'bottom';
9
9
  /**
10
10
  * Горизонтальные отступы
11
11
  */
@@ -1,12 +1,10 @@
1
1
  import React from 'react';
2
2
  import cn from 'classnames';
3
- import { g as getDataTestId } from '../../getDataTestId-60d7e355.js';
3
+ import { g as getDataTestId } from '../../getDataTestId-e8cc70ab.js';
4
4
 
5
- var styles = {"component":"pure-cell__component_xobk0","none":"pure-cell__none_xobk0","default":"pure-cell__default_xobk0","addonPadding":"pure-cell__addonPadding_xobk0","center":"pure-cell__center_xobk0"};
5
+ var styles = {"component":"pure-cell__component_1bg3s","none":"pure-cell__none_1bg3s","default":"pure-cell__default_1bg3s","addonPadding":"pure-cell__addonPadding_1bg3s","top":"pure-cell__top_1bg3s","center":"pure-cell__center_1bg3s","bottom":"pure-cell__bottom_1bg3s"};
6
6
  require('./index.css')
7
7
 
8
- const Addon = ({ children, verticalAlign, addonPadding = 'default', dataTestId, }) => (React.createElement("section", { className: cn(styles.component, styles[addonPadding], {
9
- [styles.center]: verticalAlign,
10
- }), "data-test-id": getDataTestId(dataTestId, 'addon') }, children));
8
+ const Addon = ({ children, verticalAlign = 'top', addonPadding = 'default', dataTestId, }) => (React.createElement("section", { className: cn(styles.component, styles[addonPadding], styles[verticalAlign]), "data-test-id": getDataTestId(dataTestId, 'addon') }, children));
11
9
 
12
10
  export { Addon };
@@ -1,4 +1,4 @@
1
- /* hash: 1ng5l */
1
+ /* hash: kmgdr */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -10,22 +10,29 @@
10
10
  :root {
11
11
  --gap-m: 16px;
12
12
  }
13
- .pure-cell__component_xobk0 {
13
+ .pure-cell__component_1bg3s {
14
14
  display: flex;
15
- flex-direction: column
15
+ flex-direction: column;
16
+ align-items: flex-end
16
17
  }
17
- .pure-cell__component_xobk0 > * {
18
+ .pure-cell__component_1bg3s > * {
18
19
  justify-content: flex-end;
19
20
  }
20
- .pure-cell__component_xobk0.pure-cell__none_xobk0 {
21
+ .pure-cell__component_1bg3s.pure-cell__none_1bg3s {
21
22
  padding-left: 0;
22
23
  }
23
- .pure-cell__component_xobk0.pure-cell__default_xobk0 {
24
+ .pure-cell__component_1bg3s.pure-cell__default_1bg3s {
24
25
  padding-left: var(--gap-m);
25
26
  }
26
- .pure-cell__component_xobk0.pure-cell__addonPadding_xobk0 {
27
+ .pure-cell__component_1bg3s.pure-cell__addonPadding_1bg3s {
27
28
  padding-left: var(--gap-m);
28
29
  }
29
- .pure-cell__component_xobk0.pure-cell__center_xobk0 {
30
+ .pure-cell__component_1bg3s.pure-cell__top_1bg3s {
31
+ align-self: flex-start;
32
+ }
33
+ .pure-cell__component_1bg3s.pure-cell__center_1bg3s {
30
34
  align-self: center;
31
35
  }
36
+ .pure-cell__component_1bg3s.pure-cell__bottom_1bg3s {
37
+ align-self: flex-end;
38
+ }
@@ -1,4 +1,4 @@
1
1
  import 'react';
2
2
  import 'classnames';
3
- import '../../getDataTestId-60d7e355.js';
3
+ import '../../getDataTestId-e8cc70ab.js';
4
4
  export { Addon } from './component.js';
@@ -3,10 +3,6 @@ import React from 'react';
3
3
  import { Color } from "@alfalab/core-components-typography";
4
4
  import { AmountProps as AmountType } from "../typesProps";
5
5
  type Props = {
6
- /**
7
- * Props свойственные для компонента Amount
8
- */
9
- amount: AmountType;
10
6
  /**
11
7
  * Начертание шрифта денежного значения
12
8
  */
@@ -14,7 +10,7 @@ type Props = {
14
10
  /**
15
11
  * Размер денежного значения
16
12
  */
17
- view?: 'component' | 'primary-small';
13
+ textView?: 'component' | 'primary-small';
18
14
  /**
19
15
  * Цвет денежного значения
20
16
  */
@@ -23,6 +19,6 @@ type Props = {
23
19
  * Идентификатор для систем автоматизированного тестирования
24
20
  */
25
21
  dataTestId?: string;
26
- };
22
+ } & AmountType;
27
23
  declare const Amount: React.FC<Props>;
28
24
  export { Amount };
@@ -1,16 +1,13 @@
1
1
  import React from 'react';
2
2
  import cn from 'classnames';
3
- import { g as getDataTestId } from '../../getDataTestId-60d7e355.js';
4
- import { Typography } from '@alfalab/core-components-typography/modern';
3
+ import { g as getDataTestId } from '../../getDataTestId-e8cc70ab.js';
5
4
  import { Amount as Amount$1 } from '@alfalab/core-components-amount/modern';
5
+ import { Typography } from '@alfalab/core-components-typography/modern';
6
6
 
7
- var styles = {"component":"pure-cell__component_oo1kr"};
7
+ var styles = {"component":"pure-cell__component_1dkc1"};
8
8
  require('./index.css')
9
9
 
10
- const Amount = ({ amount, weight = 'normal', view = 'component', color = 'primary', dataTestId, }) => {
11
- const { value, currency, minority, minorUnits, rightAddons, showPlus, className, transparentMinor, view: viewAmount, } = amount;
12
- return (React.createElement(Typography.Text, { view: view, dataTestId: getDataTestId(dataTestId, 'amount-text'), className: cn(styles.component), color: color },
13
- React.createElement(Amount$1, { minority: minority === undefined ? minorUnits : minority, value: value, transparentMinor: transparentMinor, bold: weight === 'bold' ? 'full' : 'none', rightAddons: rightAddons, showPlus: showPlus, className: className, currency: currency, dataTestId: getDataTestId(dataTestId, 'amount'), view: viewAmount })));
14
- };
10
+ const Amount = ({ weight = 'normal', textView = 'component', color = 'primary', minority, minorUnits = 100, dataTestId, ...restProps }) => (React.createElement(Typography.Text, { view: textView, dataTestId: getDataTestId(dataTestId, 'amount-text'), className: cn(styles.component), color: color },
11
+ React.createElement(Amount$1, { minority: minority || minorUnits, bold: weight === 'bold' ? 'full' : 'none', dataTestId: getDataTestId(dataTestId, 'amount'), ...restProps })));
15
12
 
16
13
  export { Amount };
@@ -1,4 +1,4 @@
1
- /* hash: 172fu */
1
+ /* hash: 1wzh5 */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -10,7 +10,7 @@
10
10
  :root {
11
11
  --gap-3xs: 2px;
12
12
  }
13
- .pure-cell__component_oo1kr {
13
+ .pure-cell__component_1dkc1 {
14
14
  padding: var(--gap-3xs) 0;
15
15
  display: flex;
16
16
  }
@@ -1,6 +1,6 @@
1
1
  import 'react';
2
2
  import 'classnames';
3
- import '../../getDataTestId-60d7e355.js';
4
- import '@alfalab/core-components-typography/modern';
3
+ import '../../getDataTestId-e8cc70ab.js';
5
4
  import '@alfalab/core-components-amount/modern';
5
+ import '@alfalab/core-components-typography/modern';
6
6
  export { Amount } from './component.js';
@@ -3,18 +3,10 @@ import React from 'react';
3
3
  import { Color } from "@alfalab/core-components-typography";
4
4
  import { AmountProps as AmountType } from "../typesProps";
5
5
  type Props = {
6
- /**
7
- * Props свойственные для компонента Amount
8
- */
9
- amount: AmountType;
10
6
  /**
11
7
  * Цвет денежного значения
12
8
  */
13
9
  color?: Color;
14
- /**
15
- * Идентификатор для систем автоматизированного тестирования
16
- */
17
- dataTestId?: string;
18
- };
10
+ } & AmountType;
19
11
  declare const AmountTitle: React.FC<Props>;
20
12
  export { AmountTitle };
@@ -1,16 +1,13 @@
1
1
  import React from 'react';
2
2
  import cn from 'classnames';
3
- import { g as getDataTestId } from '../../getDataTestId-60d7e355.js';
4
- import { Typography } from '@alfalab/core-components-typography/modern';
3
+ import { g as getDataTestId } from '../../getDataTestId-e8cc70ab.js';
5
4
  import { Amount } from '@alfalab/core-components-amount/modern';
5
+ import { Typography } from '@alfalab/core-components-typography/modern';
6
6
 
7
- var styles = {"component":"pure-cell__component_k73fl","weight":"pure-cell__weight_k73fl"};
7
+ var styles = {"component":"pure-cell__component_1t8xx","weight":"pure-cell__weight_1t8xx"};
8
8
  require('./index.css')
9
9
 
10
- const AmountTitle = ({ amount, color = 'primary', dataTestId }) => {
11
- const { value, currency, minority, minorUnits, rightAddons, showPlus, className } = amount;
12
- return (React.createElement(Typography.Title, { tag: 'h4', view: 'small', dataTestId: getDataTestId(dataTestId, 'amount-title'), className: styles.component, color: color },
13
- React.createElement(Amount, { minority: minority === undefined ? minorUnits : minority, value: value, rightAddons: rightAddons, showPlus: showPlus, className: cn(styles.weight, className), currency: currency, dataTestId: getDataTestId(dataTestId, 'core-amount-title'), view: 'withZeroMinorPart' })));
14
- };
10
+ const AmountTitle = ({ minority, minorUnits = 100, className, color = 'primary', dataTestId, ...restProps }) => (React.createElement(Typography.Title, { tag: 'h4', view: 'small', dataTestId: getDataTestId(dataTestId, 'amount-title'), className: styles.component, color: color },
11
+ React.createElement(Amount, { minority: minority || minorUnits, className: cn(styles.weight, className), dataTestId: getDataTestId(dataTestId, 'core-amount-title'), ...restProps, bold: 'none' })));
15
12
 
16
13
  export { AmountTitle };
@@ -1,4 +1,4 @@
1
- /* hash: 146m6 */
1
+ /* hash: rczbs */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -7,9 +7,9 @@
7
7
 
8
8
  /* Hard up */
9
9
  }
10
- .pure-cell__component_k73fl {
10
+ .pure-cell__component_1t8xx {
11
11
  display: flex;
12
12
  }
13
- .pure-cell__weight_k73fl {
13
+ .pure-cell__weight_1t8xx {
14
14
  font-weight: inherit;
15
15
  }
@@ -1,6 +1,6 @@
1
1
  import 'react';
2
2
  import 'classnames';
3
- import '../../getDataTestId-60d7e355.js';
4
- import '@alfalab/core-components-typography/modern';
3
+ import '../../getDataTestId-e8cc70ab.js';
5
4
  import '@alfalab/core-components-amount/modern';
5
+ import '@alfalab/core-components-typography/modern';
6
6
  export { AmountTitle } from './component.js';
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
+ import { ReactNode } from "react";
3
4
  type Props = {
4
5
  /**
5
6
  * Наименование категории
@@ -9,6 +10,10 @@ type Props = {
9
10
  * Процент категории
10
11
  */
11
12
  categoryPercent?: number;
13
+ /**
14
+ * Слот справа
15
+ */
16
+ rightAddons?: ReactNode;
12
17
  /**
13
18
  * Идентификатор для систем автоматизированного тестирования
14
19
  */
@@ -1,14 +1,15 @@
1
1
  import React from 'react';
2
- import { g as getDataTestId } from '../../getDataTestId-60d7e355.js';
2
+ import { g as getDataTestId } from '../../getDataTestId-e8cc70ab.js';
3
3
  import { Typography } from '@alfalab/core-components-typography/modern';
4
4
 
5
- var styles = {"component":"pure-cell__component_1yxco","categoryName":"pure-cell__categoryName_1yxco","categoryPercent":"pure-cell__categoryPercent_1yxco"};
5
+ var styles = {"component":"pure-cell__component_6ei5t","categoryName":"pure-cell__categoryName_6ei5t","categoryPercent":"pure-cell__categoryPercent_6ei5t","rightAddon":"pure-cell__rightAddon_6ei5t"};
6
6
  require('./index.css')
7
7
 
8
- const Category = ({ categoryName, categoryPercent, dataTestId }) => (React.createElement("div", { className: styles.component, "data-test-id": 'cell-pure-category' },
8
+ const Category = ({ categoryName, categoryPercent, rightAddons, dataTestId, }) => (React.createElement("div", { className: styles.component, "data-test-id": 'cell-pure-category' },
9
9
  React.createElement(Typography.Text, { view: 'primary-small', color: 'secondary', dataTestId: getDataTestId(dataTestId, 'category-name'), className: styles.categoryName }, categoryName),
10
10
  categoryPercent !== undefined && (React.createElement(Typography.Text, { tag: 'div', view: 'primary-small', color: 'secondary', className: styles.categoryPercent, dataTestId: getDataTestId(dataTestId, 'category-percent') },
11
11
  categoryPercent,
12
- "%"))));
12
+ "%")),
13
+ rightAddons !== undefined && (React.createElement("div", { className: styles.rightAddon, "data-test-id": getDataTestId(dataTestId, 'category-right-addon') }, rightAddons))));
13
14
 
14
15
  export { Category };
@@ -1,4 +1,4 @@
1
- /* hash: jul6s */
1
+ /* hash: 4odrk */
2
2
  :root {
3
3
  --color-light-bg-secondary: #f3f4f5;
4
4
  }
@@ -18,20 +18,24 @@
18
18
  :root {
19
19
  --border-radius-xl: 16px;
20
20
  }
21
- .pure-cell__component_1yxco {
21
+ .pure-cell__component_6ei5t {
22
22
  display: flex;
23
23
  overflow: hidden;
24
24
  padding: var(--gap-3xs) 0;
25
25
  }
26
- .pure-cell__categoryName_1yxco {
26
+ .pure-cell__categoryName_6ei5t {
27
27
  display: -webkit-box;
28
28
  -webkit-line-clamp: 1;
29
29
  -webkit-box-orient: vertical;
30
30
  overflow: hidden;
31
+ word-break: break-all;
31
32
  }
32
- .pure-cell__categoryPercent_1yxco {
33
+ .pure-cell__categoryPercent_6ei5t {
33
34
  padding: 0 var(--gap-xs);
34
35
  background-color: var(--color-light-bg-secondary);
35
36
  border-radius: var(--border-radius-xl);
36
37
  margin-left: var(--gap-2xs);
37
38
  }
39
+ .pure-cell__rightAddon_6ei5t {
40
+ margin-left: var(--gap-2xs);
41
+ }
@@ -1,4 +1,4 @@
1
1
  import 'react';
2
- import '../../getDataTestId-60d7e355.js';
2
+ import '../../getDataTestId-e8cc70ab.js';
3
3
  import '@alfalab/core-components-typography/modern';
4
4
  export { Category } from './component.js';
@@ -1,16 +1,16 @@
1
1
  import 'react';
2
2
  import 'react-merge-refs';
3
3
  import 'classnames';
4
- import '@alfalab/hooks';
5
4
  import '@alfalab/core-components-comment/modern';
6
- import '../../getDataTestId-60d7e355.js';
5
+ import '@alfalab/hooks';
6
+ import '../../getDataTestId-e8cc70ab.js';
7
7
  import '../addon/component.js';
8
- import '@alfalab/core-components-typography/modern';
9
8
  import '@alfalab/core-components-amount/modern';
9
+ import '@alfalab/core-components-typography/modern';
10
10
  import '../amount/component.js';
11
11
  import '../amount-title/component.js';
12
12
  import '../category/component.js';
13
- export { C as Content } from '../../component-99f95ea2.js';
13
+ export { C as Content } from '../../component-b7f322e4.js';
14
14
  import '../footer/component.js';
15
15
  import '@alfalab/core-components-button/modern';
16
16
  import '../footer-button/component.js';
@@ -1,4 +1,4 @@
1
- /* hash: 14lhc */
1
+ /* hash: 13l38 */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -7,12 +7,12 @@
7
7
 
8
8
  /* Hard up */
9
9
  }
10
- .pure-cell__component_swkbf {
10
+ .pure-cell__component_1n24j {
11
11
  flex-basis: 100%;
12
12
  display: grid;
13
13
  grid-template-columns: 1fr auto
14
14
  }
15
- .pure-cell__component_swkbf.pure-cell__horizontal_swkbf {
15
+ .pure-cell__component_1n24j.pure-cell__horizontal_1n24j {
16
16
  /* for button */
17
17
  align-self: stretch;
18
18
  }
@@ -1 +1 @@
1
- export * from "../../component-99f95ea2";
1
+ export * from "../../component-b7f322e4";
@@ -1,16 +1,16 @@
1
1
  import 'react';
2
2
  import 'react-merge-refs';
3
3
  import 'classnames';
4
- import '@alfalab/hooks';
5
4
  import '@alfalab/core-components-comment/modern';
6
- import '../../getDataTestId-60d7e355.js';
5
+ import '@alfalab/hooks';
6
+ import '../../getDataTestId-e8cc70ab.js';
7
7
  import '../addon/component.js';
8
- import '@alfalab/core-components-typography/modern';
9
8
  import '@alfalab/core-components-amount/modern';
9
+ import '@alfalab/core-components-typography/modern';
10
10
  import '../amount/component.js';
11
11
  import '../amount-title/component.js';
12
12
  import '../category/component.js';
13
- export { C as Content } from '../../component-99f95ea2.js';
13
+ export { C as Content } from '../../component-b7f322e4.js';
14
14
  import '../footer/component.js';
15
15
  import '@alfalab/core-components-button/modern';
16
16
  import '../footer-button/component.js';
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import cn from 'classnames';
3
- import { g as getDataTestId } from '../../getDataTestId-60d7e355.js';
3
+ import { g as getDataTestId } from '../../getDataTestId-e8cc70ab.js';
4
4
 
5
- var styles = {"component":"pure-cell__component_werrj","none":"pure-cell__none_werrj","default":"pure-cell__default_werrj"};
5
+ var styles = {"component":"pure-cell__component_otj4i","none":"pure-cell__none_otj4i","default":"pure-cell__default_otj4i"};
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: 191gp */
1
+ /* hash: 29yj5 */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -10,14 +10,14 @@
10
10
  :root {
11
11
  --gap-xs: 8px;
12
12
  }
13
- .pure-cell__component_werrj {
13
+ .pure-cell__component_otj4i {
14
14
  grid-column: 1/3;
15
15
  display: grid;
16
16
  grid-row-gap: var(--gap-xs)
17
17
  }
18
- .pure-cell__component_werrj.pure-cell__none_werrj {
18
+ .pure-cell__component_otj4i.pure-cell__none_otj4i {
19
19
  margin-top: 0;
20
20
  }
21
- .pure-cell__component_werrj.pure-cell__default_werrj {
21
+ .pure-cell__component_otj4i.pure-cell__default_otj4i {
22
22
  margin-top: var(--gap-xs);
23
23
  }
@@ -1,4 +1,4 @@
1
1
  import 'react';
2
2
  import 'classnames';
3
- import '../../getDataTestId-60d7e355.js';
3
+ import '../../getDataTestId-e8cc70ab.js';
4
4
  export { Footer } from './component.js';
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
- import { g as getDataTestId } from '../../getDataTestId-60d7e355.js';
2
+ import { g as getDataTestId } from '../../getDataTestId-e8cc70ab.js';
3
3
  import { Button } from '@alfalab/core-components-button/modern';
4
4
 
5
- var styles = {"component":"pure-cell__component_1cy0p"};
5
+ var styles = {"component":"pure-cell__component_3w67r"};
6
6
  require('./index.css')
7
7
 
8
- const FooterButton = ({ children, dataTestId, ...props }) => (React.createElement(Button, Object.assign({}, props, { size: 'xxs', dataTestId: getDataTestId(dataTestId, 'button'), className: styles.component }), children));
8
+ const FooterButton = ({ children, dataTestId, ...props }) => (React.createElement(Button, { ...props, size: 'xxs', dataTestId: getDataTestId(dataTestId, 'button'), className: styles.component }, children));
9
9
 
10
10
  export { FooterButton };
@@ -1,4 +1,4 @@
1
- /* hash: vjhl4 */
1
+ /* hash: ramr0 */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -7,6 +7,6 @@
7
7
 
8
8
  /* Hard up */
9
9
  }
10
- .pure-cell__component_1cy0p {
10
+ .pure-cell__component_3w67r {
11
11
  justify-self: start;
12
12
  }
@@ -1,4 +1,4 @@
1
1
  import 'react';
2
- import '../../getDataTestId-60d7e355.js';
2
+ import '../../getDataTestId-e8cc70ab.js';
3
3
  import '@alfalab/core-components-button/modern';
4
4
  export { FooterButton } from './component.js';