@cloud-ru/uikit-product-price-summary 0.5.3 → 0.5.4

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 (164) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/cjs/components/ContentBlock/ContentBlock.d.ts +7 -0
  3. package/dist/cjs/components/ContentBlock/ContentBlock.js +23 -0
  4. package/dist/cjs/components/ContentBlock/index.d.ts +1 -0
  5. package/dist/cjs/components/ContentBlock/index.js +17 -0
  6. package/dist/cjs/components/ContentBlock/styles.module.css +12 -0
  7. package/dist/cjs/components/PriceSummary/PriceSummary.d.ts +17 -0
  8. package/dist/cjs/components/PriceSummary/PriceSummary.js +33 -0
  9. package/dist/cjs/components/PriceSummary/components/DiscountBlock/DiscountBlock.d.ts +6 -0
  10. package/dist/cjs/components/PriceSummary/components/DiscountBlock/DiscountBlock.js +17 -0
  11. package/dist/cjs/components/PriceSummary/components/DiscountBlock/index.d.ts +1 -0
  12. package/dist/cjs/components/PriceSummary/components/DiscountBlock/index.js +17 -0
  13. package/dist/cjs/components/PriceSummary/components/DiscountBlock/styles.module.css +16 -0
  14. package/dist/cjs/components/PriceSummary/components/DiscountPercentCell/DiscountPercentCell.d.ts +6 -0
  15. package/dist/cjs/components/PriceSummary/components/DiscountPercentCell/DiscountPercentCell.js +16 -0
  16. package/dist/cjs/components/PriceSummary/components/DiscountPercentCell/index.d.ts +1 -0
  17. package/dist/cjs/components/PriceSummary/components/DiscountPercentCell/index.js +17 -0
  18. package/dist/cjs/components/PriceSummary/components/DiscountPercentCell/styles.module.css +5 -0
  19. package/dist/cjs/components/PriceSummary/components/Divider/Divider.d.ts +1 -0
  20. package/dist/cjs/components/PriceSummary/components/Divider/Divider.js +11 -0
  21. package/dist/cjs/components/PriceSummary/components/Divider/index.d.ts +1 -0
  22. package/dist/cjs/components/PriceSummary/components/Divider/index.js +17 -0
  23. package/dist/cjs/components/PriceSummary/components/Divider/styles.module.css +6 -0
  24. package/dist/cjs/components/PriceSummary/components/HeaderBlock/HeaderBlock.d.ts +6 -0
  25. package/dist/cjs/components/PriceSummary/components/HeaderBlock/HeaderBlock.js +16 -0
  26. package/dist/cjs/components/PriceSummary/components/HeaderBlock/index.d.ts +1 -0
  27. package/dist/cjs/components/PriceSummary/components/HeaderBlock/index.js +17 -0
  28. package/dist/cjs/components/PriceSummary/components/HeaderBlock/styles.module.css +14 -0
  29. package/dist/cjs/components/PriceSummary/components/InvoiceBlock/InvoiceBlock.d.ts +7 -0
  30. package/dist/cjs/components/PriceSummary/components/InvoiceBlock/InvoiceBlock.js +18 -0
  31. package/dist/cjs/components/PriceSummary/components/InvoiceBlock/index.d.ts +1 -0
  32. package/dist/cjs/components/PriceSummary/components/InvoiceBlock/index.js +17 -0
  33. package/dist/cjs/components/PriceSummary/components/InvoiceBlock/styles.module.css +18 -0
  34. package/dist/cjs/components/PriceSummary/components/InvoiceDetailsBlock/InvoiceDetailsBlock.d.ts +6 -0
  35. package/dist/cjs/components/PriceSummary/components/InvoiceDetailsBlock/InvoiceDetailsBlock.js +17 -0
  36. package/dist/cjs/components/PriceSummary/components/InvoiceDetailsBlock/index.d.ts +1 -0
  37. package/dist/cjs/components/PriceSummary/components/InvoiceDetailsBlock/index.js +17 -0
  38. package/dist/cjs/components/PriceSummary/components/InvoiceDetailsBlock/styles.module.css +16 -0
  39. package/dist/cjs/components/PriceSummary/components/InvoiceItemBlock/InvoiceItemBlock.d.ts +7 -0
  40. package/dist/cjs/components/PriceSummary/components/InvoiceItemBlock/InvoiceItemBlock.js +24 -0
  41. package/dist/cjs/components/PriceSummary/components/InvoiceItemBlock/index.d.ts +1 -0
  42. package/dist/cjs/components/PriceSummary/components/InvoiceItemBlock/index.js +17 -0
  43. package/dist/cjs/components/PriceSummary/components/InvoiceItemBlock/styles.module.css +33 -0
  44. package/dist/cjs/components/PriceSummary/components/InvoiceItemLabelCell/InvoiceItemLabelCell.d.ts +6 -0
  45. package/dist/cjs/components/PriceSummary/components/InvoiceItemLabelCell/InvoiceItemLabelCell.js +16 -0
  46. package/dist/cjs/components/PriceSummary/components/InvoiceItemLabelCell/index.d.ts +1 -0
  47. package/dist/cjs/components/PriceSummary/components/InvoiceItemLabelCell/index.js +17 -0
  48. package/dist/cjs/components/PriceSummary/components/InvoiceItemLabelCell/styles.module.css +14 -0
  49. package/dist/cjs/components/PriceSummary/components/PeriodDropdown/PeriodDropdown.d.ts +8 -0
  50. package/dist/cjs/components/PriceSummary/components/PeriodDropdown/PeriodDropdown.js +23 -0
  51. package/dist/cjs/components/PriceSummary/components/PeriodDropdown/index.d.ts +1 -0
  52. package/dist/cjs/components/PriceSummary/components/PeriodDropdown/index.js +17 -0
  53. package/dist/cjs/components/PriceSummary/components/PeriodDropdown/styles.module.css +15 -0
  54. package/dist/cjs/components/PriceSummary/components/TotalValueBlock/TotalValueBlock.d.ts +24 -0
  55. package/dist/cjs/components/PriceSummary/components/TotalValueBlock/TotalValueBlock.js +46 -0
  56. package/dist/cjs/components/PriceSummary/components/TotalValueBlock/index.d.ts +1 -0
  57. package/dist/cjs/components/PriceSummary/components/TotalValueBlock/index.js +17 -0
  58. package/dist/cjs/components/PriceSummary/components/TotalValueBlock/styles.module.css +51 -0
  59. package/dist/cjs/components/PriceSummary/index.d.ts +1 -0
  60. package/dist/cjs/components/PriceSummary/index.js +17 -0
  61. package/dist/cjs/components/PriceSummary/styles.module.css +12 -0
  62. package/dist/cjs/components/PriceSummarySmall/PriceSummarySmall.d.ts +12 -0
  63. package/dist/cjs/components/PriceSummarySmall/PriceSummarySmall.js +32 -0
  64. package/dist/cjs/components/PriceSummarySmall/index.d.ts +1 -0
  65. package/dist/cjs/components/PriceSummarySmall/index.js +17 -0
  66. package/dist/cjs/components/PriceSummarySmall/styles.module.css +23 -0
  67. package/dist/cjs/components/index.d.ts +2 -0
  68. package/dist/cjs/components/index.js +18 -0
  69. package/dist/cjs/helpers/formatters.d.ts +2 -0
  70. package/dist/cjs/helpers/formatters.js +14 -0
  71. package/dist/cjs/helpers/index.d.ts +1 -0
  72. package/dist/cjs/helpers/index.js +17 -0
  73. package/dist/cjs/hooks/index.d.ts +2 -0
  74. package/dist/cjs/hooks/index.js +18 -0
  75. package/dist/cjs/hooks/usePeriodFormat.d.ts +2 -0
  76. package/dist/cjs/hooks/usePeriodFormat.js +24 -0
  77. package/dist/cjs/hooks/usePriceTotalValueFormatter.d.ts +2 -0
  78. package/dist/cjs/hooks/usePriceTotalValueFormatter.js +10 -0
  79. package/dist/cjs/index.d.ts +3 -0
  80. package/dist/cjs/index.js +19 -0
  81. package/dist/cjs/types/index.d.ts +41 -0
  82. package/dist/cjs/types/index.js +11 -0
  83. package/dist/esm/components/ContentBlock/ContentBlock.d.ts +7 -0
  84. package/dist/esm/components/ContentBlock/ContentBlock.js +17 -0
  85. package/dist/esm/components/ContentBlock/index.d.ts +1 -0
  86. package/dist/esm/components/ContentBlock/index.js +1 -0
  87. package/dist/esm/components/ContentBlock/styles.module.css +12 -0
  88. package/dist/esm/components/PriceSummary/PriceSummary.d.ts +17 -0
  89. package/dist/esm/components/PriceSummary/PriceSummary.js +27 -0
  90. package/dist/esm/components/PriceSummary/components/DiscountBlock/DiscountBlock.d.ts +6 -0
  91. package/dist/esm/components/PriceSummary/components/DiscountBlock/DiscountBlock.js +11 -0
  92. package/dist/esm/components/PriceSummary/components/DiscountBlock/index.d.ts +1 -0
  93. package/dist/esm/components/PriceSummary/components/DiscountBlock/index.js +1 -0
  94. package/dist/esm/components/PriceSummary/components/DiscountBlock/styles.module.css +16 -0
  95. package/dist/esm/components/PriceSummary/components/DiscountPercentCell/DiscountPercentCell.d.ts +6 -0
  96. package/dist/esm/components/PriceSummary/components/DiscountPercentCell/DiscountPercentCell.js +10 -0
  97. package/dist/esm/components/PriceSummary/components/DiscountPercentCell/index.d.ts +1 -0
  98. package/dist/esm/components/PriceSummary/components/DiscountPercentCell/index.js +1 -0
  99. package/dist/esm/components/PriceSummary/components/DiscountPercentCell/styles.module.css +5 -0
  100. package/dist/esm/components/PriceSummary/components/Divider/Divider.d.ts +1 -0
  101. package/dist/esm/components/PriceSummary/components/Divider/Divider.js +5 -0
  102. package/dist/esm/components/PriceSummary/components/Divider/index.d.ts +1 -0
  103. package/dist/esm/components/PriceSummary/components/Divider/index.js +1 -0
  104. package/dist/esm/components/PriceSummary/components/Divider/styles.module.css +6 -0
  105. package/dist/esm/components/PriceSummary/components/HeaderBlock/HeaderBlock.d.ts +6 -0
  106. package/dist/esm/components/PriceSummary/components/HeaderBlock/HeaderBlock.js +10 -0
  107. package/dist/esm/components/PriceSummary/components/HeaderBlock/index.d.ts +1 -0
  108. package/dist/esm/components/PriceSummary/components/HeaderBlock/index.js +1 -0
  109. package/dist/esm/components/PriceSummary/components/HeaderBlock/styles.module.css +14 -0
  110. package/dist/esm/components/PriceSummary/components/InvoiceBlock/InvoiceBlock.d.ts +7 -0
  111. package/dist/esm/components/PriceSummary/components/InvoiceBlock/InvoiceBlock.js +12 -0
  112. package/dist/esm/components/PriceSummary/components/InvoiceBlock/index.d.ts +1 -0
  113. package/dist/esm/components/PriceSummary/components/InvoiceBlock/index.js +1 -0
  114. package/dist/esm/components/PriceSummary/components/InvoiceBlock/styles.module.css +18 -0
  115. package/dist/esm/components/PriceSummary/components/InvoiceDetailsBlock/InvoiceDetailsBlock.d.ts +6 -0
  116. package/dist/esm/components/PriceSummary/components/InvoiceDetailsBlock/InvoiceDetailsBlock.js +11 -0
  117. package/dist/esm/components/PriceSummary/components/InvoiceDetailsBlock/index.d.ts +1 -0
  118. package/dist/esm/components/PriceSummary/components/InvoiceDetailsBlock/index.js +1 -0
  119. package/dist/esm/components/PriceSummary/components/InvoiceDetailsBlock/styles.module.css +16 -0
  120. package/dist/esm/components/PriceSummary/components/InvoiceItemBlock/InvoiceItemBlock.d.ts +7 -0
  121. package/dist/esm/components/PriceSummary/components/InvoiceItemBlock/InvoiceItemBlock.js +18 -0
  122. package/dist/esm/components/PriceSummary/components/InvoiceItemBlock/index.d.ts +1 -0
  123. package/dist/esm/components/PriceSummary/components/InvoiceItemBlock/index.js +1 -0
  124. package/dist/esm/components/PriceSummary/components/InvoiceItemBlock/styles.module.css +33 -0
  125. package/dist/esm/components/PriceSummary/components/InvoiceItemLabelCell/InvoiceItemLabelCell.d.ts +6 -0
  126. package/dist/esm/components/PriceSummary/components/InvoiceItemLabelCell/InvoiceItemLabelCell.js +10 -0
  127. package/dist/esm/components/PriceSummary/components/InvoiceItemLabelCell/index.d.ts +1 -0
  128. package/dist/esm/components/PriceSummary/components/InvoiceItemLabelCell/index.js +1 -0
  129. package/dist/esm/components/PriceSummary/components/InvoiceItemLabelCell/styles.module.css +14 -0
  130. package/dist/esm/components/PriceSummary/components/PeriodDropdown/PeriodDropdown.d.ts +8 -0
  131. package/dist/esm/components/PriceSummary/components/PeriodDropdown/PeriodDropdown.js +17 -0
  132. package/dist/esm/components/PriceSummary/components/PeriodDropdown/index.d.ts +1 -0
  133. package/dist/esm/components/PriceSummary/components/PeriodDropdown/index.js +1 -0
  134. package/dist/esm/components/PriceSummary/components/PeriodDropdown/styles.module.css +15 -0
  135. package/dist/esm/components/PriceSummary/components/TotalValueBlock/TotalValueBlock.d.ts +24 -0
  136. package/dist/esm/components/PriceSummary/components/TotalValueBlock/TotalValueBlock.js +39 -0
  137. package/dist/esm/components/PriceSummary/components/TotalValueBlock/index.d.ts +1 -0
  138. package/dist/esm/components/PriceSummary/components/TotalValueBlock/index.js +1 -0
  139. package/dist/esm/components/PriceSummary/components/TotalValueBlock/styles.module.css +51 -0
  140. package/dist/esm/components/PriceSummary/index.d.ts +1 -0
  141. package/dist/esm/components/PriceSummary/index.js +1 -0
  142. package/dist/esm/components/PriceSummary/styles.module.css +12 -0
  143. package/dist/esm/components/PriceSummarySmall/PriceSummarySmall.d.ts +12 -0
  144. package/dist/esm/components/PriceSummarySmall/PriceSummarySmall.js +26 -0
  145. package/dist/esm/components/PriceSummarySmall/index.d.ts +1 -0
  146. package/dist/esm/components/PriceSummarySmall/index.js +1 -0
  147. package/dist/esm/components/PriceSummarySmall/styles.module.css +23 -0
  148. package/dist/esm/components/index.d.ts +2 -0
  149. package/dist/esm/components/index.js +2 -0
  150. package/dist/esm/helpers/formatters.d.ts +2 -0
  151. package/dist/esm/helpers/formatters.js +10 -0
  152. package/dist/esm/helpers/index.d.ts +1 -0
  153. package/dist/esm/helpers/index.js +1 -0
  154. package/dist/esm/hooks/index.d.ts +2 -0
  155. package/dist/esm/hooks/index.js +2 -0
  156. package/dist/esm/hooks/usePeriodFormat.d.ts +2 -0
  157. package/dist/esm/hooks/usePeriodFormat.js +21 -0
  158. package/dist/esm/hooks/usePriceTotalValueFormatter.d.ts +2 -0
  159. package/dist/esm/hooks/usePriceTotalValueFormatter.js +7 -0
  160. package/dist/esm/index.d.ts +3 -0
  161. package/dist/esm/index.js +3 -0
  162. package/dist/esm/types/index.d.ts +41 -0
  163. package/dist/esm/types/index.js +8 -0
  164. package/package.json +7 -6
@@ -0,0 +1 @@
1
+ export * from './PriceSummary';
@@ -0,0 +1,12 @@
1
+ .priceSummary{
2
+ box-sizing:border-box;
3
+ width:100%;
4
+ min-width:280px;
5
+ display:flex;
6
+ flex-direction:column;
7
+ gap:var(--dimension-050m, 4px);
8
+ padding:var(--dimension-2m, 16px);
9
+ border-radius:var(--dimension-1m, 8px);
10
+ background-color:var(--sys-neutral-background1-level, #fdfdfd);
11
+ color:var(--sys-neutral-text-main, #41424e);
12
+ }
@@ -0,0 +1,12 @@
1
+ import { WithSupportProps } from '@sbercloud/uikit-product-utils';
2
+ import { LinkProps } from '@snack-uikit/link';
3
+ import { ContentBlockProps } from '../ContentBlock';
4
+ export type PriceSummarySmallProps = WithSupportProps<ContentBlockProps & {
5
+ value: number | undefined;
6
+ docsLink?: {
7
+ href?: LinkProps['href'];
8
+ text?: LinkProps['text'];
9
+ };
10
+ className?: string;
11
+ }>;
12
+ export declare function PriceSummarySmall({ value, docsLink, loading, dataError, onRetry, className, ...rest }: PriceSummarySmallProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,26 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import cn from 'classnames';
14
+ import { InfoFilledSVG } from '@sbercloud/uikit-product-icons';
15
+ import { useLocale } from '@sbercloud/uikit-product-locale';
16
+ import { extractSupportProps } from '@sbercloud/uikit-product-utils';
17
+ import { ButtonFunction } from '@snack-uikit/button';
18
+ import { Typography } from '@snack-uikit/typography';
19
+ import { formatCurrency } from '../../helpers';
20
+ import { ContentBlock } from '../ContentBlock';
21
+ import styles from './styles.module.css';
22
+ export function PriceSummarySmall(_a) {
23
+ var { value = 0, docsLink, loading, dataError, onRetry, className } = _a, rest = __rest(_a, ["value", "docsLink", "loading", "dataError", "onRetry", "className"]);
24
+ const { t } = useLocale('PriceSummary');
25
+ return (_jsxs("div", Object.assign({ className: cn(styles.priceSummarySmall, className) }, extractSupportProps(rest), { children: [_jsx(Typography.SansBodyM, { children: t('total') }), _jsxs(ContentBlock, { loading: loading, dataError: dataError, onRetry: onRetry, children: [_jsxs("div", { className: styles.value, children: [_jsx(InfoFilledSVG, { size: 16, className: styles.icon }), _jsx(Typography.SansTitleM, { children: formatCurrency(value) })] }), (docsLink === null || docsLink === void 0 ? void 0 : docsLink.href) && (_jsx(ButtonFunction, { size: 'xs', label: docsLink.text || t('costLink'), href: docsLink.href, target: '_blank' }))] })] })));
26
+ }
@@ -0,0 +1 @@
1
+ export * from './PriceSummarySmall';
@@ -0,0 +1 @@
1
+ export * from './PriceSummarySmall';
@@ -0,0 +1,23 @@
1
+ .priceSummarySmall{
2
+ box-sizing:border-box;
3
+ width:100%;
4
+ min-width:170px;
5
+ display:flex;
6
+ flex-direction:column;
7
+ gap:var(--dimension-050m, 4px);
8
+ padding:var(--dimension-2m, 16px);
9
+ border-radius:var(--dimension-1m, 8px);
10
+ background-color:var(--sys-neutral-background1-level, #fdfdfd);
11
+ color:var(--sys-neutral-text-main, #41424e);
12
+ }
13
+
14
+ .value{
15
+ display:flex;
16
+ align-items:center;
17
+ gap:var(--dimension-050m, 4px);
18
+ }
19
+
20
+ .icon{
21
+ flex-shrink:0;
22
+ color:var(--sys-neutral-text-light, #8b8e9b);
23
+ }
@@ -0,0 +1,2 @@
1
+ export * from './PriceSummary';
2
+ export * from './PriceSummarySmall';
@@ -0,0 +1,2 @@
1
+ export * from './PriceSummary';
2
+ export * from './PriceSummarySmall';
@@ -0,0 +1,2 @@
1
+ export declare function formatCurrency(value: number): string;
2
+ export declare function formatQuantity(value: string | number): string;
@@ -0,0 +1,10 @@
1
+ import { formatNumber } from '@cloud-ru/ft-formatters';
2
+ export function formatCurrency(value) {
3
+ return formatNumber(value.toFixed(2), {
4
+ precision: 2,
5
+ type: formatNumber.types.Currency,
6
+ });
7
+ }
8
+ export function formatQuantity(value) {
9
+ return typeof value === 'string' ? value : '×' + value;
10
+ }
@@ -0,0 +1 @@
1
+ export * from './formatters';
@@ -0,0 +1 @@
1
+ export * from './formatters';
@@ -0,0 +1,2 @@
1
+ export * from './usePeriodFormat';
2
+ export * from './usePriceTotalValueFormatter';
@@ -0,0 +1,2 @@
1
+ export * from './usePeriodFormat';
2
+ export * from './usePriceTotalValueFormatter';
@@ -0,0 +1,2 @@
1
+ import { PricePeriod } from '../types';
2
+ export declare function usePeriodFormat(): (period: PricePeriod) => string;
@@ -0,0 +1,21 @@
1
+ import { useLocale } from '@sbercloud/uikit-product-locale';
2
+ import { PricePeriod } from '../types';
3
+ export function usePeriodFormat() {
4
+ const { t } = useLocale('PriceSummary');
5
+ return function formatPeriod(period) {
6
+ switch (period) {
7
+ case PricePeriod.Year:
8
+ return t('pricePeriodYear');
9
+ case PricePeriod.Month:
10
+ return t('pricePeriodMonth');
11
+ case PricePeriod.Day:
12
+ return t('pricePeriodDay');
13
+ case PricePeriod.Hour:
14
+ return t('pricePeriodHour');
15
+ case PricePeriod.Minute:
16
+ return t('pricePeriodMinute');
17
+ default:
18
+ throw new Error('not reachable');
19
+ }
20
+ };
21
+ }
@@ -0,0 +1,2 @@
1
+ import { PricePeriod } from '../types';
2
+ export declare function usePriceTotalValueFormatter(): (value: number | undefined, period: PricePeriod) => string;
@@ -0,0 +1,7 @@
1
+ import { useCallback } from 'react';
2
+ import { formatCurrency } from '../helpers';
3
+ import { usePeriodFormat } from './usePeriodFormat';
4
+ export function usePriceTotalValueFormatter() {
5
+ const formatPeriod = usePeriodFormat();
6
+ return useCallback((value, period) => `${formatCurrency(value || 0)} ${formatPeriod(period)}`, [formatPeriod]);
7
+ }
@@ -0,0 +1,3 @@
1
+ export * from './components';
2
+ export * from './hooks/usePriceTotalValueFormatter';
3
+ export * from './types';
@@ -0,0 +1,3 @@
1
+ export * from './components';
2
+ export * from './hooks/usePriceTotalValueFormatter';
3
+ export * from './types';
@@ -0,0 +1,41 @@
1
+ import { QuestionTooltipProps } from '@sbercloud/uikit-product-mobile-tooltip';
2
+ export declare enum PricePeriod {
3
+ Year = "year",
4
+ Month = "month",
5
+ Day = "day",
6
+ Hour = "hour",
7
+ Minute = "minute"
8
+ }
9
+ export type TotalSumType = 'equal' | 'from';
10
+ export type DiscountItem = {
11
+ value: number;
12
+ percent?: number;
13
+ tooltip?: QuestionTooltipProps['tip'];
14
+ };
15
+ export type DiscountDetails = {
16
+ price: number;
17
+ discounts: DiscountItem[];
18
+ };
19
+ export type PriceInvoiceItem = {
20
+ label: string;
21
+ discount?: DiscountItem;
22
+ };
23
+ export type DiscountInvoiceItem = {
24
+ discount: DiscountItem;
25
+ };
26
+ export type InvoiceItem = (PriceInvoiceItem | DiscountInvoiceItem) & {
27
+ labelTooltip?: QuestionTooltipProps['tip'];
28
+ price?: number;
29
+ hidePrice?: boolean;
30
+ labelMaxLines?: number;
31
+ quantity?: string | number;
32
+ primary?: boolean;
33
+ topDivider?: boolean;
34
+ bottomDivider?: boolean;
35
+ };
36
+ export type InvoiceDetails = {
37
+ title?: string;
38
+ quantity?: string | number;
39
+ price?: number;
40
+ items: InvoiceItem[];
41
+ };
@@ -0,0 +1,8 @@
1
+ export var PricePeriod;
2
+ (function (PricePeriod) {
3
+ PricePeriod["Year"] = "year";
4
+ PricePeriod["Month"] = "month";
5
+ PricePeriod["Day"] = "day";
6
+ PricePeriod["Hour"] = "hour";
7
+ PricePeriod["Minute"] = "minute";
8
+ })(PricePeriod || (PricePeriod = {}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloud-ru/uikit-product-price-summary",
3
3
  "title": "Price Summary",
4
- "version": "0.5.3",
4
+ "version": "0.5.4",
5
5
  "sideEffects": [
6
6
  "*.css",
7
7
  "*.woff",
@@ -30,6 +30,7 @@
30
30
  "name": "Akhremenko Grigorii",
31
31
  "url": "https://github.com/AGrigorii"
32
32
  },
33
+ "contributors": [],
33
34
  "license": "Apache-2.0",
34
35
  "publishConfig": {
35
36
  "access": "public"
@@ -37,10 +38,10 @@
37
38
  "scripts": {},
38
39
  "dependencies": {
39
40
  "@cloud-ru/ft-formatters": "1.0.1",
40
- "@cloud-ru/uikit-product-button-predefined": "0.7.4",
41
- "@cloud-ru/uikit-product-icons": "15.1.1",
42
- "@cloud-ru/uikit-product-mobile-tooltip": "0.4.65",
43
- "@cloud-ru/uikit-product-utils": "7.0.0",
41
+ "@cloud-ru/uikit-product-button-predefined": "0.7.5",
42
+ "@cloud-ru/uikit-product-icons": "15.1.2",
43
+ "@cloud-ru/uikit-product-mobile-tooltip": "0.4.66",
44
+ "@cloud-ru/uikit-product-utils": "7.0.1",
44
45
  "@snack-uikit/accordion": "0.10.5",
45
46
  "@snack-uikit/button": "0.19.7",
46
47
  "@snack-uikit/icons": "0.26.3",
@@ -56,5 +57,5 @@
56
57
  "peerDependencies": {
57
58
  "@cloud-ru/uikit-product-locale": "*"
58
59
  },
59
- "gitHead": "e8bd79bc92b26a8f52611972eec98a867536ccd3"
60
+ "gitHead": "9c11b1e33e716c874534a1c162266c8591f2ed03"
60
61
  }