@cloud-ru/ds-uikit-product-price-summary 1.0.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.
- package/CHANGELOG.md +8 -0
- package/LICENSE +201 -0
- package/README.md +408 -0
- package/dist/cjs/components/ContentBlock/ContentBlock.d.ts +7 -0
- package/dist/cjs/components/ContentBlock/ContentBlock.js +24 -0
- package/dist/cjs/components/ContentBlock/index.d.ts +1 -0
- package/dist/cjs/components/ContentBlock/index.js +17 -0
- package/dist/cjs/components/ContentBlock/styles.module.css +12 -0
- package/dist/cjs/components/PriceSummary/PriceSummary.d.ts +22 -0
- package/dist/cjs/components/PriceSummary/PriceSummary.js +23 -0
- package/dist/cjs/components/PriceSummary/components/CoveredByGrantLabel/CoveredByGrantLabel.d.ts +5 -0
- package/dist/cjs/components/PriceSummary/components/CoveredByGrantLabel/CoveredByGrantLabel.js +16 -0
- package/dist/cjs/components/PriceSummary/components/CoveredByGrantLabel/index.d.ts +1 -0
- package/dist/cjs/components/PriceSummary/components/CoveredByGrantLabel/index.js +17 -0
- package/dist/cjs/components/PriceSummary/components/CoveredByGrantLabel/styles.module.css +6 -0
- package/dist/cjs/components/PriceSummary/components/DiscountBlock/DiscountBlock.d.ts +5 -0
- package/dist/cjs/components/PriceSummary/components/DiscountBlock/DiscountBlock.js +17 -0
- package/dist/cjs/components/PriceSummary/components/DiscountBlock/index.d.ts +1 -0
- package/dist/cjs/components/PriceSummary/components/DiscountBlock/index.js +17 -0
- package/dist/cjs/components/PriceSummary/components/DiscountBlock/styles.module.css +16 -0
- package/dist/cjs/components/PriceSummary/components/DiscountPercentCell/DiscountPercentCell.d.ts +5 -0
- package/dist/cjs/components/PriceSummary/components/DiscountPercentCell/DiscountPercentCell.js +16 -0
- package/dist/cjs/components/PriceSummary/components/DiscountPercentCell/index.d.ts +1 -0
- package/dist/cjs/components/PriceSummary/components/DiscountPercentCell/index.js +17 -0
- package/dist/cjs/components/PriceSummary/components/DiscountPercentCell/styles.module.css +5 -0
- package/dist/cjs/components/PriceSummary/components/Divider/Divider.d.ts +1 -0
- package/dist/cjs/components/PriceSummary/components/Divider/Divider.js +11 -0
- package/dist/cjs/components/PriceSummary/components/Divider/index.d.ts +1 -0
- package/dist/cjs/components/PriceSummary/components/Divider/index.js +17 -0
- package/dist/cjs/components/PriceSummary/components/Divider/styles.module.css +6 -0
- package/dist/cjs/components/PriceSummary/components/HeaderBlock/HeaderBlock.d.ts +8 -0
- package/dist/cjs/components/PriceSummary/components/HeaderBlock/HeaderBlock.js +17 -0
- package/dist/cjs/components/PriceSummary/components/HeaderBlock/constants.d.ts +4 -0
- package/dist/cjs/components/PriceSummary/components/HeaderBlock/constants.js +7 -0
- package/dist/cjs/components/PriceSummary/components/HeaderBlock/index.d.ts +1 -0
- package/dist/cjs/components/PriceSummary/components/HeaderBlock/index.js +17 -0
- package/dist/cjs/components/PriceSummary/components/HeaderBlock/styles.module.css +14 -0
- package/dist/cjs/components/PriceSummary/components/HeaderBlock/types.d.ts +3 -0
- package/dist/cjs/components/PriceSummary/components/HeaderBlock/types.js +2 -0
- package/dist/cjs/components/PriceSummary/components/InvoiceBlock/InvoiceBlock.d.ts +6 -0
- package/dist/cjs/components/PriceSummary/components/InvoiceBlock/InvoiceBlock.js +18 -0
- package/dist/cjs/components/PriceSummary/components/InvoiceBlock/index.d.ts +1 -0
- package/dist/cjs/components/PriceSummary/components/InvoiceBlock/index.js +17 -0
- package/dist/cjs/components/PriceSummary/components/InvoiceBlock/styles.module.css +13 -0
- package/dist/cjs/components/PriceSummary/components/InvoiceDetailsBlock/InvoiceDetailsBlock.d.ts +5 -0
- package/dist/cjs/components/PriceSummary/components/InvoiceDetailsBlock/InvoiceDetailsBlock.js +23 -0
- package/dist/cjs/components/PriceSummary/components/InvoiceDetailsBlock/index.d.ts +1 -0
- package/dist/cjs/components/PriceSummary/components/InvoiceDetailsBlock/index.js +17 -0
- package/dist/cjs/components/PriceSummary/components/InvoiceDetailsBlock/styles.module.css +16 -0
- package/dist/cjs/components/PriceSummary/components/InvoiceItemBlock/InvoiceItemBlock.d.ts +7 -0
- package/dist/cjs/components/PriceSummary/components/InvoiceItemBlock/InvoiceItemBlock.js +27 -0
- package/dist/cjs/components/PriceSummary/components/InvoiceItemBlock/index.d.ts +1 -0
- package/dist/cjs/components/PriceSummary/components/InvoiceItemBlock/index.js +17 -0
- package/dist/cjs/components/PriceSummary/components/InvoiceItemBlock/styles.module.css +36 -0
- package/dist/cjs/components/PriceSummary/components/InvoiceItemLabelCell/InvoiceItemLabelCell.d.ts +5 -0
- package/dist/cjs/components/PriceSummary/components/InvoiceItemLabelCell/InvoiceItemLabelCell.js +19 -0
- package/dist/cjs/components/PriceSummary/components/InvoiceItemLabelCell/index.d.ts +1 -0
- package/dist/cjs/components/PriceSummary/components/InvoiceItemLabelCell/index.js +17 -0
- package/dist/cjs/components/PriceSummary/components/InvoiceItemLabelCell/styles.module.css +14 -0
- package/dist/cjs/components/PriceSummary/components/PeriodDropdown/PeriodDropdown.d.ts +7 -0
- package/dist/cjs/components/PriceSummary/components/PeriodDropdown/PeriodDropdown.js +26 -0
- package/dist/cjs/components/PriceSummary/components/PeriodDropdown/index.d.ts +1 -0
- package/dist/cjs/components/PriceSummary/components/PeriodDropdown/index.js +17 -0
- package/dist/cjs/components/PriceSummary/components/PeriodDropdown/styles.module.css +15 -0
- package/dist/cjs/components/PriceSummary/components/TotalValueBlock/TotalValueBlock.d.ts +17 -0
- package/dist/cjs/components/PriceSummary/components/TotalValueBlock/TotalValueBlock.js +22 -0
- package/dist/cjs/components/PriceSummary/components/TotalValueBlock/index.d.ts +1 -0
- package/dist/cjs/components/PriceSummary/components/TotalValueBlock/index.js +17 -0
- package/dist/cjs/components/PriceSummary/components/TotalValueBlock/styles.module.css +51 -0
- package/dist/cjs/components/PriceSummary/index.d.ts +1 -0
- package/dist/cjs/components/PriceSummary/index.js +17 -0
- package/dist/cjs/components/PriceSummary/styles.module.css +227 -0
- package/dist/cjs/components/PriceSummarySmall/PriceSummarySmall.d.ts +18 -0
- package/dist/cjs/components/PriceSummarySmall/PriceSummarySmall.js +23 -0
- package/dist/cjs/components/PriceSummarySmall/index.d.ts +1 -0
- package/dist/cjs/components/PriceSummarySmall/index.js +17 -0
- package/dist/cjs/components/PriceSummarySmall/styles.module.css +242 -0
- package/dist/cjs/components/index.d.ts +2 -0
- package/dist/cjs/components/index.js +18 -0
- package/dist/cjs/constants.d.ts +34 -0
- package/dist/cjs/constants.js +37 -0
- package/dist/cjs/helpers/formatters.d.ts +2 -0
- package/dist/cjs/helpers/formatters.js +14 -0
- package/dist/cjs/helpers/index.d.ts +1 -0
- package/dist/cjs/helpers/index.js +17 -0
- package/dist/cjs/hooks/index.d.ts +1 -0
- package/dist/cjs/hooks/index.js +17 -0
- package/dist/cjs/hooks/usePeriodFormat.d.ts +5 -0
- package/dist/cjs/hooks/usePeriodFormat.js +21 -0
- package/dist/cjs/index.d.ts +5 -0
- package/dist/cjs/index.js +21 -0
- package/dist/cjs/locale/index.d.ts +107 -0
- package/dist/cjs/locale/index.js +58 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/style.css +673 -0
- package/dist/cjs/types.d.ts +79 -0
- package/dist/cjs/types.js +2 -0
- package/dist/cjs/utils/getAppearanceIcon.d.ts +2 -0
- package/dist/cjs/utils/getAppearanceIcon.js +25 -0
- package/dist/cjs/utils/index.d.ts +1 -0
- package/dist/cjs/utils/index.js +17 -0
- package/dist/esm/components/ContentBlock/ContentBlock.d.ts +7 -0
- package/dist/esm/components/ContentBlock/ContentBlock.js +18 -0
- package/dist/esm/components/ContentBlock/index.d.ts +1 -0
- package/dist/esm/components/ContentBlock/index.js +1 -0
- package/dist/esm/components/ContentBlock/styles.module.css +12 -0
- package/dist/esm/components/PriceSummary/PriceSummary.d.ts +22 -0
- package/dist/esm/components/PriceSummary/PriceSummary.js +17 -0
- package/dist/esm/components/PriceSummary/components/CoveredByGrantLabel/CoveredByGrantLabel.d.ts +5 -0
- package/dist/esm/components/PriceSummary/components/CoveredByGrantLabel/CoveredByGrantLabel.js +10 -0
- package/dist/esm/components/PriceSummary/components/CoveredByGrantLabel/index.d.ts +1 -0
- package/dist/esm/components/PriceSummary/components/CoveredByGrantLabel/index.js +1 -0
- package/dist/esm/components/PriceSummary/components/CoveredByGrantLabel/styles.module.css +6 -0
- package/dist/esm/components/PriceSummary/components/DiscountBlock/DiscountBlock.d.ts +5 -0
- package/dist/esm/components/PriceSummary/components/DiscountBlock/DiscountBlock.js +11 -0
- package/dist/esm/components/PriceSummary/components/DiscountBlock/index.d.ts +1 -0
- package/dist/esm/components/PriceSummary/components/DiscountBlock/index.js +1 -0
- package/dist/esm/components/PriceSummary/components/DiscountBlock/styles.module.css +16 -0
- package/dist/esm/components/PriceSummary/components/DiscountPercentCell/DiscountPercentCell.d.ts +5 -0
- package/dist/esm/components/PriceSummary/components/DiscountPercentCell/DiscountPercentCell.js +10 -0
- package/dist/esm/components/PriceSummary/components/DiscountPercentCell/index.d.ts +1 -0
- package/dist/esm/components/PriceSummary/components/DiscountPercentCell/index.js +1 -0
- package/dist/esm/components/PriceSummary/components/DiscountPercentCell/styles.module.css +5 -0
- package/dist/esm/components/PriceSummary/components/Divider/Divider.d.ts +1 -0
- package/dist/esm/components/PriceSummary/components/Divider/Divider.js +5 -0
- package/dist/esm/components/PriceSummary/components/Divider/index.d.ts +1 -0
- package/dist/esm/components/PriceSummary/components/Divider/index.js +1 -0
- package/dist/esm/components/PriceSummary/components/Divider/styles.module.css +6 -0
- package/dist/esm/components/PriceSummary/components/HeaderBlock/HeaderBlock.d.ts +8 -0
- package/dist/esm/components/PriceSummary/components/HeaderBlock/HeaderBlock.js +11 -0
- package/dist/esm/components/PriceSummary/components/HeaderBlock/constants.d.ts +4 -0
- package/dist/esm/components/PriceSummary/components/HeaderBlock/constants.js +4 -0
- package/dist/esm/components/PriceSummary/components/HeaderBlock/index.d.ts +1 -0
- package/dist/esm/components/PriceSummary/components/HeaderBlock/index.js +1 -0
- package/dist/esm/components/PriceSummary/components/HeaderBlock/styles.module.css +14 -0
- package/dist/esm/components/PriceSummary/components/HeaderBlock/types.d.ts +3 -0
- package/dist/esm/components/PriceSummary/components/HeaderBlock/types.js +1 -0
- package/dist/esm/components/PriceSummary/components/InvoiceBlock/InvoiceBlock.d.ts +6 -0
- package/dist/esm/components/PriceSummary/components/InvoiceBlock/InvoiceBlock.js +12 -0
- package/dist/esm/components/PriceSummary/components/InvoiceBlock/index.d.ts +1 -0
- package/dist/esm/components/PriceSummary/components/InvoiceBlock/index.js +1 -0
- package/dist/esm/components/PriceSummary/components/InvoiceBlock/styles.module.css +13 -0
- package/dist/esm/components/PriceSummary/components/InvoiceDetailsBlock/InvoiceDetailsBlock.d.ts +5 -0
- package/dist/esm/components/PriceSummary/components/InvoiceDetailsBlock/InvoiceDetailsBlock.js +17 -0
- package/dist/esm/components/PriceSummary/components/InvoiceDetailsBlock/index.d.ts +1 -0
- package/dist/esm/components/PriceSummary/components/InvoiceDetailsBlock/index.js +1 -0
- package/dist/esm/components/PriceSummary/components/InvoiceDetailsBlock/styles.module.css +16 -0
- package/dist/esm/components/PriceSummary/components/InvoiceItemBlock/InvoiceItemBlock.d.ts +7 -0
- package/dist/esm/components/PriceSummary/components/InvoiceItemBlock/InvoiceItemBlock.js +21 -0
- package/dist/esm/components/PriceSummary/components/InvoiceItemBlock/index.d.ts +1 -0
- package/dist/esm/components/PriceSummary/components/InvoiceItemBlock/index.js +1 -0
- package/dist/esm/components/PriceSummary/components/InvoiceItemBlock/styles.module.css +36 -0
- package/dist/esm/components/PriceSummary/components/InvoiceItemLabelCell/InvoiceItemLabelCell.d.ts +5 -0
- package/dist/esm/components/PriceSummary/components/InvoiceItemLabelCell/InvoiceItemLabelCell.js +13 -0
- package/dist/esm/components/PriceSummary/components/InvoiceItemLabelCell/index.d.ts +1 -0
- package/dist/esm/components/PriceSummary/components/InvoiceItemLabelCell/index.js +1 -0
- package/dist/esm/components/PriceSummary/components/InvoiceItemLabelCell/styles.module.css +14 -0
- package/dist/esm/components/PriceSummary/components/PeriodDropdown/PeriodDropdown.d.ts +7 -0
- package/dist/esm/components/PriceSummary/components/PeriodDropdown/PeriodDropdown.js +20 -0
- package/dist/esm/components/PriceSummary/components/PeriodDropdown/index.d.ts +1 -0
- package/dist/esm/components/PriceSummary/components/PeriodDropdown/index.js +1 -0
- package/dist/esm/components/PriceSummary/components/PeriodDropdown/styles.module.css +15 -0
- package/dist/esm/components/PriceSummary/components/TotalValueBlock/TotalValueBlock.d.ts +17 -0
- package/dist/esm/components/PriceSummary/components/TotalValueBlock/TotalValueBlock.js +16 -0
- package/dist/esm/components/PriceSummary/components/TotalValueBlock/index.d.ts +1 -0
- package/dist/esm/components/PriceSummary/components/TotalValueBlock/index.js +1 -0
- package/dist/esm/components/PriceSummary/components/TotalValueBlock/styles.module.css +51 -0
- package/dist/esm/components/PriceSummary/index.d.ts +1 -0
- package/dist/esm/components/PriceSummary/index.js +1 -0
- package/dist/esm/components/PriceSummary/styles.module.css +227 -0
- package/dist/esm/components/PriceSummarySmall/PriceSummarySmall.d.ts +18 -0
- package/dist/esm/components/PriceSummarySmall/PriceSummarySmall.js +17 -0
- package/dist/esm/components/PriceSummarySmall/index.d.ts +1 -0
- package/dist/esm/components/PriceSummarySmall/index.js +1 -0
- package/dist/esm/components/PriceSummarySmall/styles.module.css +242 -0
- package/dist/esm/components/index.d.ts +2 -0
- package/dist/esm/components/index.js +2 -0
- package/dist/esm/constants.d.ts +34 -0
- package/dist/esm/constants.js +34 -0
- package/dist/esm/helpers/formatters.d.ts +2 -0
- package/dist/esm/helpers/formatters.js +10 -0
- package/dist/esm/helpers/index.d.ts +1 -0
- package/dist/esm/helpers/index.js +1 -0
- package/dist/esm/hooks/index.d.ts +1 -0
- package/dist/esm/hooks/index.js +1 -0
- package/dist/esm/hooks/usePeriodFormat.d.ts +5 -0
- package/dist/esm/hooks/usePeriodFormat.js +17 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/locale/index.d.ts +107 -0
- package/dist/esm/locale/index.js +55 -0
- package/dist/esm/style.css +673 -0
- package/dist/esm/types.d.ts +79 -0
- package/dist/esm/types.js +1 -0
- package/dist/esm/utils/getAppearanceIcon.d.ts +2 -0
- package/dist/esm/utils/getAppearanceIcon.js +22 -0
- package/dist/esm/utils/index.d.ts +1 -0
- package/dist/esm/utils/index.js +1 -0
- package/dist/tsconfig.cjs.tsbuildinfo +1 -0
- package/dist/tsconfig.esm.tsbuildinfo +1 -0
- package/package.json +61 -0
- package/src/components/ContentBlock/ContentBlock.tsx +41 -0
- package/src/components/ContentBlock/index.ts +1 -0
- package/src/components/ContentBlock/styles.module.scss +14 -0
- package/src/components/PriceSummary/PriceSummary.tsx +107 -0
- package/src/components/PriceSummary/components/CoveredByGrantLabel/CoveredByGrantLabel.tsx +32 -0
- package/src/components/PriceSummary/components/CoveredByGrantLabel/index.ts +1 -0
- package/src/components/PriceSummary/components/CoveredByGrantLabel/styles.module.scss +8 -0
- package/src/components/PriceSummary/components/DiscountBlock/DiscountBlock.tsx +42 -0
- package/src/components/PriceSummary/components/DiscountBlock/index.ts +1 -0
- package/src/components/PriceSummary/components/DiscountBlock/styles.module.scss +17 -0
- package/src/components/PriceSummary/components/DiscountPercentCell/DiscountPercentCell.tsx +30 -0
- package/src/components/PriceSummary/components/DiscountPercentCell/index.ts +1 -0
- package/src/components/PriceSummary/components/DiscountPercentCell/styles.module.scss +7 -0
- package/src/components/PriceSummary/components/Divider/Divider.tsx +5 -0
- package/src/components/PriceSummary/components/Divider/index.ts +1 -0
- package/src/components/PriceSummary/components/Divider/styles.module.scss +8 -0
- package/src/components/PriceSummary/components/HeaderBlock/HeaderBlock.tsx +41 -0
- package/src/components/PriceSummary/components/HeaderBlock/constants.ts +4 -0
- package/src/components/PriceSummary/components/HeaderBlock/index.ts +1 -0
- package/src/components/PriceSummary/components/HeaderBlock/styles.module.scss +16 -0
- package/src/components/PriceSummary/components/HeaderBlock/types.ts +5 -0
- package/src/components/PriceSummary/components/InvoiceBlock/InvoiceBlock.tsx +37 -0
- package/src/components/PriceSummary/components/InvoiceBlock/index.ts +1 -0
- package/src/components/PriceSummary/components/InvoiceBlock/styles.module.scss +15 -0
- package/src/components/PriceSummary/components/InvoiceDetailsBlock/InvoiceDetailsBlock.tsx +63 -0
- package/src/components/PriceSummary/components/InvoiceDetailsBlock/index.ts +1 -0
- package/src/components/PriceSummary/components/InvoiceDetailsBlock/styles.module.scss +18 -0
- package/src/components/PriceSummary/components/InvoiceItemBlock/InvoiceItemBlock.tsx +82 -0
- package/src/components/PriceSummary/components/InvoiceItemBlock/index.ts +1 -0
- package/src/components/PriceSummary/components/InvoiceItemBlock/styles.module.scss +42 -0
- package/src/components/PriceSummary/components/InvoiceItemLabelCell/InvoiceItemLabelCell.tsx +37 -0
- package/src/components/PriceSummary/components/InvoiceItemLabelCell/index.ts +1 -0
- package/src/components/PriceSummary/components/InvoiceItemLabelCell/styles.module.scss +16 -0
- package/src/components/PriceSummary/components/PeriodDropdown/PeriodDropdown.tsx +54 -0
- package/src/components/PriceSummary/components/PeriodDropdown/index.ts +1 -0
- package/src/components/PriceSummary/components/PeriodDropdown/styles.module.scss +18 -0
- package/src/components/PriceSummary/components/TotalValueBlock/TotalValueBlock.tsx +82 -0
- package/src/components/PriceSummary/components/TotalValueBlock/index.ts +1 -0
- package/src/components/PriceSummary/components/TotalValueBlock/styles.module.scss +54 -0
- package/src/components/PriceSummary/index.ts +1 -0
- package/src/components/PriceSummary/styles.module.scss +27 -0
- package/src/components/PriceSummarySmall/PriceSummarySmall.tsx +89 -0
- package/src/components/PriceSummarySmall/index.ts +1 -0
- package/src/components/PriceSummarySmall/styles.module.scss +42 -0
- package/src/components/index.ts +2 -0
- package/src/constants.ts +37 -0
- package/src/helpers/formatters.ts +12 -0
- package/src/helpers/index.ts +1 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/usePeriodFormat.ts +30 -0
- package/src/index.ts +5 -0
- package/src/locale/index.ts +59 -0
- package/src/types.ts +93 -0
- package/src/utils/getAppearanceIcon.tsx +26 -0
- package/src/utils/index.ts +1 -0
package/dist/cjs/components/PriceSummary/components/InvoiceItemLabelCell/InvoiceItemLabelCell.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.InvoiceItemLabelCell = InvoiceItemLabelCell;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const tooltip_1 = require("@cloud-ru/ds-tooltip");
|
|
9
|
+
const truncate_string_1 = require("@cloud-ru/ds-truncate-string");
|
|
10
|
+
const typography_1 = require("@cloud-ru/ds-typography");
|
|
11
|
+
const helpers_1 = require("../../../../helpers");
|
|
12
|
+
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
13
|
+
function InvoiceItemLabelCell({ item }) {
|
|
14
|
+
const isLabelVisible = 'label' in item && item.label !== undefined;
|
|
15
|
+
if (!isLabelVisible) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.labelCell, children: [(0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: typography_1.VARIANT.body, size: typography_1.SIZE.s, className: styles_module_scss_1.default.label, children: item.labelMaxLines ? (0, jsx_runtime_1.jsx)(truncate_string_1.TruncateString, { text: item.label, maxLines: item.labelMaxLines }) : item.label }), item.labelTooltip && (0, jsx_runtime_1.jsx)(tooltip_1.QuestionTooltip, { tip: item.labelTooltip })] }), item.quantity && ((0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: typography_1.VARIANT.body, size: typography_1.SIZE.s, className: styles_module_scss_1.default.quantity, children: (0, helpers_1.formatQuantity)(item.quantity) }))] }));
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './InvoiceItemLabelCell';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./InvoiceItemLabelCell"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PricePeriod } from '../../../../types';
|
|
2
|
+
export type PeriodDropdownProps = {
|
|
3
|
+
period: PricePeriod;
|
|
4
|
+
periodOptions: PricePeriod[];
|
|
5
|
+
onPeriodChanged?(period: PricePeriod): void;
|
|
6
|
+
};
|
|
7
|
+
export declare function PeriodDropdown({ period, onPeriodChanged, periodOptions }: PeriodDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PeriodDropdown = PeriodDropdown;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const typography_1 = require("@cloud-ru/ds-typography");
|
|
9
|
+
const uikit_product_button_predefined_1 = require("@cloud-ru/ds-uikit-product-button-predefined");
|
|
10
|
+
const constants_1 = require("../../../../constants");
|
|
11
|
+
const hooks_1 = require("../../../../hooks");
|
|
12
|
+
const locale_1 = require("../../../../locale");
|
|
13
|
+
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
14
|
+
function PeriodDropdown({ period, onPeriodChanged = () => { }, periodOptions }) {
|
|
15
|
+
const { t } = locale_1.priceSummaryLocale.useTranslations();
|
|
16
|
+
const formatPeriod = (0, hooks_1.usePeriodFormat)();
|
|
17
|
+
const actions = periodOptions
|
|
18
|
+
.filter(item => item !== period)
|
|
19
|
+
.map(item => ({
|
|
20
|
+
id: item,
|
|
21
|
+
content: { label: formatPeriod(item) },
|
|
22
|
+
onClick: () => onPeriodChanged(item),
|
|
23
|
+
'data-test-id': constants_1.PERIOD_OPTION_TEST_IDS[item],
|
|
24
|
+
}));
|
|
25
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.period, "data-single": actions.length === 0 ? true : undefined, children: [(0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: typography_1.VARIANT.body, size: typography_1.SIZE.m, children: t('total') }), actions.length === 0 && ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.single, children: (0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: typography_1.VARIANT.body, size: typography_1.SIZE.m, children: formatPeriod(period) }) })), actions.length > 0 && ((0, jsx_runtime_1.jsx)(uikit_product_button_predefined_1.ButtonDropdown, { size: 's', label: formatPeriod(period), items: actions, closeDroplistOnItemClick: true, "data-test-id": constants_1.TEST_IDS.periodDropdown }))] }));
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PeriodDropdown';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./PeriodDropdown"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.period{
|
|
2
|
+
display:flex;
|
|
3
|
+
gap:var(--sn-primitive-dimension-8, 8px);
|
|
4
|
+
align-items:center;
|
|
5
|
+
}
|
|
6
|
+
.period[data-single]{
|
|
7
|
+
gap:var(--sn-primitive-dimension-4, 4px);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.single{
|
|
11
|
+
display:flex;
|
|
12
|
+
align-items:center;
|
|
13
|
+
min-height:var(--sn-primitive-dimension-32, 32px);
|
|
14
|
+
color:var(--sn-theme-color-available-version-textTertiary, var(--sn-brand-color-text-version-tertiary, rgba(65, 66, 78, 0.5490196078)));
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AppearanceState, PriceDeltaDetails, TotalSumType } from '../../../../types';
|
|
3
|
+
export type TotalValueBlockProps = {
|
|
4
|
+
value?: number;
|
|
5
|
+
valueDelta?: PriceDeltaDetails;
|
|
6
|
+
totalSumType?: TotalSumType;
|
|
7
|
+
hint?: string;
|
|
8
|
+
hintAppearance?: AppearanceState;
|
|
9
|
+
showHintTooltip?: boolean;
|
|
10
|
+
hintTooltipText?: ReactNode;
|
|
11
|
+
hintLink?: {
|
|
12
|
+
href?: string;
|
|
13
|
+
label: string;
|
|
14
|
+
};
|
|
15
|
+
showHintLink?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare function TotalValueBlock({ value, totalSumType, hint, hintAppearance, showHintTooltip, hintTooltipText, hintLink, showHintLink, valueDelta, }: TotalValueBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TotalValueBlock = TotalValueBlock;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const link_1 = require("@cloud-ru/ds-link");
|
|
9
|
+
const tooltip_1 = require("@cloud-ru/ds-tooltip");
|
|
10
|
+
const typography_1 = require("@cloud-ru/ds-typography");
|
|
11
|
+
const constants_1 = require("../../../../constants");
|
|
12
|
+
const helpers_1 = require("../../../../helpers");
|
|
13
|
+
const locale_1 = require("../../../../locale");
|
|
14
|
+
const utils_1 = require("../../../../utils");
|
|
15
|
+
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
16
|
+
function TotalValueBlock({ value, totalSumType = 'equal', hint, hintAppearance = constants_1.APPEARANCE_STATE.Default, showHintTooltip, hintTooltipText, hintLink, showHintLink, valueDelta, }) {
|
|
17
|
+
const { t } = locale_1.priceSummaryLocale.useTranslations();
|
|
18
|
+
const totalSumPrefix = totalSumType === 'from' ? `${t('totalSumFromPrefix')} ` : '';
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.content, "data-appearance": hintAppearance, children: [(0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: typography_1.VARIANT.headline, size: typography_1.SIZE.s, weight: typography_1.WEIGHT.thin, children: value !== undefined
|
|
20
|
+
? `${totalSumPrefix}${(0, helpers_1.formatCurrency)(Number(value))}`
|
|
21
|
+
: t('notAvailable') }), valueDelta && ((0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: typography_1.VARIANT.body, size: typography_1.SIZE.s, className: styles_module_scss_1.default.valueDelta, children: `${t(`${valueDelta.type}Price`)} ${(0, helpers_1.formatCurrency)(valueDelta.value)}` })), (0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { open: showHintTooltip && hintTooltipText ? undefined : false, tip: hintTooltipText, placement: 'left-start', children: hint && ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.hint, "data-appearance": hintAppearance, children: [(0, utils_1.getAppearanceIcon)(hintAppearance, styles_module_scss_1.default.hintIcon), (0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: typography_1.VARIANT.body, size: typography_1.SIZE.s, children: hint })] })) }), showHintLink && ((0, jsx_runtime_1.jsx)(link_1.Link, { roleAppearance: link_1.ROLE_APPEARANCE.OnAccent, appearance: 'neutral', href: hintLink?.href, label: hintLink?.label, className: styles_module_scss_1.default.link }))] }));
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TotalValueBlock';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./TotalValueBlock"), exports);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
.content{
|
|
2
|
+
display:flex;
|
|
3
|
+
flex-direction:column;
|
|
4
|
+
text-align:start;
|
|
5
|
+
}
|
|
6
|
+
.content[data-appearance=userError]{
|
|
7
|
+
color:var(--sn-theme-color-red-text, var(--sn-primitive-color-red-45, #a93533));
|
|
8
|
+
}
|
|
9
|
+
.content[data-appearance=warning]{
|
|
10
|
+
color:var(--sn-theme-color-yellow-text, var(--sn-primitive-color-yellow-45, #ab7a08));
|
|
11
|
+
}
|
|
12
|
+
.content[data-appearance=systemError]{
|
|
13
|
+
color:var(--sn-theme-color-available-version-textDisabled, var(--sn-brand-color-text-version-disabled, rgba(65, 66, 78, 0.3490196078)));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.hint{
|
|
17
|
+
display:flex;
|
|
18
|
+
gap:var(--sn-primitive-dimension-2, 2px);
|
|
19
|
+
align-items:center;
|
|
20
|
+
color:var(--sn-theme-color-available-version-textTertiary, var(--sn-brand-color-text-version-tertiary, rgba(65, 66, 78, 0.5490196078)));
|
|
21
|
+
}
|
|
22
|
+
.hint[data-appearance=userError]{
|
|
23
|
+
color:var(--sn-theme-color-red-text, var(--sn-primitive-color-red-45, #a93533));
|
|
24
|
+
}
|
|
25
|
+
.hint[data-appearance=warning]{
|
|
26
|
+
color:var(--sn-theme-color-yellow-text, var(--sn-primitive-color-yellow-45, #ab7a08));
|
|
27
|
+
}
|
|
28
|
+
.hint[data-appearance=systemError]{
|
|
29
|
+
color:var(--sn-theme-color-available-version-textDisabled, var(--sn-brand-color-text-version-disabled, rgba(65, 66, 78, 0.3490196078)));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.hintIcon{
|
|
33
|
+
flex-shrink:0;
|
|
34
|
+
box-sizing:content-box;
|
|
35
|
+
}
|
|
36
|
+
.hintIcon[data-appearance=default]{
|
|
37
|
+
color:var(--sn-theme-color-neutral-accent, var(--sn-brand-color-neutral-55, var(--sn-primitive-color-gray-55, #8b8fa7)));
|
|
38
|
+
}
|
|
39
|
+
.hintIcon[data-appearance=userError]{
|
|
40
|
+
color:var(--sn-theme-color-red-accent, var(--sn-primitive-color-red-55, #d52e33));
|
|
41
|
+
}
|
|
42
|
+
.hintIcon[data-appearance=warning]{
|
|
43
|
+
color:var(--sn-theme-color-yellow-accent, var(--sn-primitive-color-yellow-55, #f3b917));
|
|
44
|
+
}
|
|
45
|
+
.hintIcon[data-appearance=systemError]{
|
|
46
|
+
color:var(--sn-theme-color-available-version-textDisabled, var(--sn-brand-color-text-version-disabled, rgba(65, 66, 78, 0.3490196078)));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.valueDelta{
|
|
50
|
+
color:var(--sn-theme-color-available-version-textSecondary, var(--sn-brand-color-text-version-secondary, rgba(65, 66, 78, 0.8)));
|
|
51
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PriceSummary';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./PriceSummary"), exports);
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.acrylic{
|
|
3
|
+
pointer-events:none;
|
|
4
|
+
position:absolute;
|
|
5
|
+
inset:0;
|
|
6
|
+
border-radius:inherit;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.priceSummary{
|
|
10
|
+
position:relative;
|
|
11
|
+
box-sizing:border-box;
|
|
12
|
+
width:100%;
|
|
13
|
+
color:var(--sn-theme-color-available-version-textMain, var(--sn-brand-color-text-version-main, #41424e));
|
|
14
|
+
border-radius:var(--sn-block-anatomy-m-borderRadius, var(--sn-brand-anatomy-radius-block-m, var(--sn-primitive-dimension-4, 4px)));
|
|
15
|
+
padding:var(--sn-block-anatomy-m-padding, var(--sn-density-spacing-block-m-padding, var(--sn-primitive-dimension-24, 24px)));
|
|
16
|
+
border-width:var(--sn-block-anatomy-m-borderWidth, var(--sn-primitive-strokeWeight-strokeRegular, 1px));
|
|
17
|
+
}
|
|
18
|
+
.priceSummary[data-acrylic-appearance=primary][data-acrylic-level=default]{
|
|
19
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground, 0) / 2));
|
|
20
|
+
}
|
|
21
|
+
.priceSummary[data-acrylic-appearance=primary][data-acrylic-level=default] .acrylic{
|
|
22
|
+
opacity:var(--sn-acrylic-opacityBackground, 1);
|
|
23
|
+
background:var(--sn-theme-color-primary-background, var(--sn-brand-color-primary-90, var(--sn-brandRole-color-brandA-90, var(--sn-primitive-color-brandA-90, #edf7f1))));
|
|
24
|
+
}
|
|
25
|
+
.priceSummary[data-acrylic-appearance=primary][data-acrylic-level="1Level"]{
|
|
26
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground1Level, 0) / 2));
|
|
27
|
+
}
|
|
28
|
+
.priceSummary[data-acrylic-appearance=primary][data-acrylic-level="1Level"] .acrylic{
|
|
29
|
+
opacity:var(--sn-acrylic-opacityBackground1Level, 1);
|
|
30
|
+
background:var(--sn-theme-color-primary-background1Level, var(--sn-brand-color-primary-95, var(--sn-brandRole-color-brandA-95, var(--sn-primitive-color-brandA-95, #f5fdf8))));
|
|
31
|
+
}
|
|
32
|
+
.priceSummary[data-acrylic-appearance=primary][data-acrylic-level="2Level"]{
|
|
33
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground2Level, 0) / 2));
|
|
34
|
+
}
|
|
35
|
+
.priceSummary[data-acrylic-appearance=primary][data-acrylic-level="2Level"] .acrylic{
|
|
36
|
+
opacity:var(--sn-acrylic-opacityBackground2Level, 1);
|
|
37
|
+
background:var(--sn-theme-color-primary-background2Level, var(--sn-brand-color-primary-99, var(--sn-brandRole-color-brandA-99, var(--sn-primitive-color-brandA-99, #fbfffc))));
|
|
38
|
+
}
|
|
39
|
+
.priceSummary[data-acrylic-appearance=neutral][data-acrylic-level=default]{
|
|
40
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground, 0) / 2));
|
|
41
|
+
}
|
|
42
|
+
.priceSummary[data-acrylic-appearance=neutral][data-acrylic-level=default] .acrylic{
|
|
43
|
+
opacity:var(--sn-acrylic-opacityBackground, 1);
|
|
44
|
+
background:var(--sn-theme-color-neutral-background, var(--sn-brand-color-neutral-90, var(--sn-primitive-color-gray-90, #eeeff3)));
|
|
45
|
+
}
|
|
46
|
+
.priceSummary[data-acrylic-appearance=neutral][data-acrylic-level="1Level"]{
|
|
47
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground1Level, 0) / 2));
|
|
48
|
+
}
|
|
49
|
+
.priceSummary[data-acrylic-appearance=neutral][data-acrylic-level="1Level"] .acrylic{
|
|
50
|
+
opacity:var(--sn-acrylic-opacityBackground1Level, 1);
|
|
51
|
+
background:var(--sn-theme-color-neutral-background1Level, var(--sn-brand-color-neutral-95, var(--sn-primitive-color-gray-95, #fdfdfd)));
|
|
52
|
+
}
|
|
53
|
+
.priceSummary[data-acrylic-appearance=neutral][data-acrylic-level="2Level"]{
|
|
54
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground2Level, 0) / 2));
|
|
55
|
+
}
|
|
56
|
+
.priceSummary[data-acrylic-appearance=neutral][data-acrylic-level="2Level"] .acrylic{
|
|
57
|
+
opacity:var(--sn-acrylic-opacityBackground2Level, 1);
|
|
58
|
+
background:var(--sn-theme-color-neutral-background2Level, var(--sn-brand-color-neutral-99, var(--sn-primitive-color-gray-99, #ffffff)));
|
|
59
|
+
}
|
|
60
|
+
.priceSummary[data-acrylic-appearance=red][data-acrylic-level=default]{
|
|
61
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground, 0) / 2));
|
|
62
|
+
}
|
|
63
|
+
.priceSummary[data-acrylic-appearance=red][data-acrylic-level=default] .acrylic{
|
|
64
|
+
opacity:var(--sn-acrylic-opacityBackground, 1);
|
|
65
|
+
background:var(--sn-theme-color-red-background, var(--sn-primitive-color-red-90, #fee8e5));
|
|
66
|
+
}
|
|
67
|
+
.priceSummary[data-acrylic-appearance=red][data-acrylic-level="1Level"]{
|
|
68
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground1Level, 0) / 2));
|
|
69
|
+
}
|
|
70
|
+
.priceSummary[data-acrylic-appearance=red][data-acrylic-level="1Level"] .acrylic{
|
|
71
|
+
opacity:var(--sn-acrylic-opacityBackground1Level, 1);
|
|
72
|
+
background:var(--sn-theme-color-red-background1Level, var(--sn-primitive-color-red-95, #fef5f1));
|
|
73
|
+
}
|
|
74
|
+
.priceSummary[data-acrylic-appearance=red][data-acrylic-level="2Level"]{
|
|
75
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground2Level, 0) / 2));
|
|
76
|
+
}
|
|
77
|
+
.priceSummary[data-acrylic-appearance=red][data-acrylic-level="2Level"] .acrylic{
|
|
78
|
+
opacity:var(--sn-acrylic-opacityBackground2Level, 1);
|
|
79
|
+
background:var(--sn-theme-color-red-background2Level, var(--sn-primitive-color-red-99, #fffaf7));
|
|
80
|
+
}
|
|
81
|
+
.priceSummary[data-acrylic-appearance=orange][data-acrylic-level=default]{
|
|
82
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground, 0) / 2));
|
|
83
|
+
}
|
|
84
|
+
.priceSummary[data-acrylic-appearance=orange][data-acrylic-level=default] .acrylic{
|
|
85
|
+
opacity:var(--sn-acrylic-opacityBackground, 1);
|
|
86
|
+
background:var(--sn-theme-color-orange-background, var(--sn-primitive-color-orange-90, #ffedcf));
|
|
87
|
+
}
|
|
88
|
+
.priceSummary[data-acrylic-appearance=orange][data-acrylic-level="1Level"]{
|
|
89
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground1Level, 0) / 2));
|
|
90
|
+
}
|
|
91
|
+
.priceSummary[data-acrylic-appearance=orange][data-acrylic-level="1Level"] .acrylic{
|
|
92
|
+
opacity:var(--sn-acrylic-opacityBackground1Level, 1);
|
|
93
|
+
background:var(--sn-theme-color-orange-background1Level, var(--sn-primitive-color-orange-95, #fff6e5));
|
|
94
|
+
}
|
|
95
|
+
.priceSummary[data-acrylic-appearance=orange][data-acrylic-level="2Level"]{
|
|
96
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground2Level, 0) / 2));
|
|
97
|
+
}
|
|
98
|
+
.priceSummary[data-acrylic-appearance=orange][data-acrylic-level="2Level"] .acrylic{
|
|
99
|
+
opacity:var(--sn-acrylic-opacityBackground2Level, 1);
|
|
100
|
+
background:var(--sn-theme-color-orange-background2Level, var(--sn-primitive-color-orange-99, #fffcf4));
|
|
101
|
+
}
|
|
102
|
+
.priceSummary[data-acrylic-appearance=yellow][data-acrylic-level=default]{
|
|
103
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground, 0) / 2));
|
|
104
|
+
}
|
|
105
|
+
.priceSummary[data-acrylic-appearance=yellow][data-acrylic-level=default] .acrylic{
|
|
106
|
+
opacity:var(--sn-acrylic-opacityBackground, 1);
|
|
107
|
+
background:var(--sn-theme-color-yellow-background, var(--sn-primitive-color-yellow-90, #fdf4cc));
|
|
108
|
+
}
|
|
109
|
+
.priceSummary[data-acrylic-appearance=yellow][data-acrylic-level="1Level"]{
|
|
110
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground1Level, 0) / 2));
|
|
111
|
+
}
|
|
112
|
+
.priceSummary[data-acrylic-appearance=yellow][data-acrylic-level="1Level"] .acrylic{
|
|
113
|
+
opacity:var(--sn-acrylic-opacityBackground1Level, 1);
|
|
114
|
+
background:var(--sn-theme-color-yellow-background1Level, var(--sn-primitive-color-yellow-95, #fffbe6));
|
|
115
|
+
}
|
|
116
|
+
.priceSummary[data-acrylic-appearance=yellow][data-acrylic-level="2Level"]{
|
|
117
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground2Level, 0) / 2));
|
|
118
|
+
}
|
|
119
|
+
.priceSummary[data-acrylic-appearance=yellow][data-acrylic-level="2Level"] .acrylic{
|
|
120
|
+
opacity:var(--sn-acrylic-opacityBackground2Level, 1);
|
|
121
|
+
background:var(--sn-theme-color-yellow-background2Level, var(--sn-primitive-color-yellow-99, #fffef6));
|
|
122
|
+
}
|
|
123
|
+
.priceSummary[data-acrylic-appearance=green][data-acrylic-level=default]{
|
|
124
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground, 0) / 2));
|
|
125
|
+
}
|
|
126
|
+
.priceSummary[data-acrylic-appearance=green][data-acrylic-level=default] .acrylic{
|
|
127
|
+
opacity:var(--sn-acrylic-opacityBackground, 1);
|
|
128
|
+
background:var(--sn-theme-color-green-background, var(--sn-primitive-color-green-90, #e4f5df));
|
|
129
|
+
}
|
|
130
|
+
.priceSummary[data-acrylic-appearance=green][data-acrylic-level="1Level"]{
|
|
131
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground1Level, 0) / 2));
|
|
132
|
+
}
|
|
133
|
+
.priceSummary[data-acrylic-appearance=green][data-acrylic-level="1Level"] .acrylic{
|
|
134
|
+
opacity:var(--sn-acrylic-opacityBackground1Level, 1);
|
|
135
|
+
background:var(--sn-theme-color-green-background1Level, var(--sn-primitive-color-green-95, #f1faed));
|
|
136
|
+
}
|
|
137
|
+
.priceSummary[data-acrylic-appearance=green][data-acrylic-level="2Level"]{
|
|
138
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground2Level, 0) / 2));
|
|
139
|
+
}
|
|
140
|
+
.priceSummary[data-acrylic-appearance=green][data-acrylic-level="2Level"] .acrylic{
|
|
141
|
+
opacity:var(--sn-acrylic-opacityBackground2Level, 1);
|
|
142
|
+
background:var(--sn-theme-color-green-background2Level, var(--sn-primitive-color-green-99, #fcfefa));
|
|
143
|
+
}
|
|
144
|
+
.priceSummary[data-acrylic-appearance=blue][data-acrylic-level=default]{
|
|
145
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground, 0) / 2));
|
|
146
|
+
}
|
|
147
|
+
.priceSummary[data-acrylic-appearance=blue][data-acrylic-level=default] .acrylic{
|
|
148
|
+
opacity:var(--sn-acrylic-opacityBackground, 1);
|
|
149
|
+
background:var(--sn-theme-color-blue-background, var(--sn-primitive-color-blue-90, #e6f4fd));
|
|
150
|
+
}
|
|
151
|
+
.priceSummary[data-acrylic-appearance=blue][data-acrylic-level="1Level"]{
|
|
152
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground1Level, 0) / 2));
|
|
153
|
+
}
|
|
154
|
+
.priceSummary[data-acrylic-appearance=blue][data-acrylic-level="1Level"] .acrylic{
|
|
155
|
+
opacity:var(--sn-acrylic-opacityBackground1Level, 1);
|
|
156
|
+
background:var(--sn-theme-color-blue-background1Level, var(--sn-primitive-color-blue-95, #f2f9ff));
|
|
157
|
+
}
|
|
158
|
+
.priceSummary[data-acrylic-appearance=blue][data-acrylic-level="2Level"]{
|
|
159
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground2Level, 0) / 2));
|
|
160
|
+
}
|
|
161
|
+
.priceSummary[data-acrylic-appearance=blue][data-acrylic-level="2Level"] .acrylic{
|
|
162
|
+
opacity:var(--sn-acrylic-opacityBackground2Level, 1);
|
|
163
|
+
background:var(--sn-theme-color-blue-background2Level, var(--sn-primitive-color-blue-99, #fdfeff));
|
|
164
|
+
}
|
|
165
|
+
.priceSummary[data-acrylic-appearance=violet][data-acrylic-level=default]{
|
|
166
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground, 0) / 2));
|
|
167
|
+
}
|
|
168
|
+
.priceSummary[data-acrylic-appearance=violet][data-acrylic-level=default] .acrylic{
|
|
169
|
+
opacity:var(--sn-acrylic-opacityBackground, 1);
|
|
170
|
+
background:var(--sn-theme-color-violet-background, var(--sn-primitive-color-violet-90, #f3edfc));
|
|
171
|
+
}
|
|
172
|
+
.priceSummary[data-acrylic-appearance=violet][data-acrylic-level="1Level"]{
|
|
173
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground1Level, 0) / 2));
|
|
174
|
+
}
|
|
175
|
+
.priceSummary[data-acrylic-appearance=violet][data-acrylic-level="1Level"] .acrylic{
|
|
176
|
+
opacity:var(--sn-acrylic-opacityBackground1Level, 1);
|
|
177
|
+
background:var(--sn-theme-color-violet-background1Level, var(--sn-primitive-color-violet-95, #f9f5ff));
|
|
178
|
+
}
|
|
179
|
+
.priceSummary[data-acrylic-appearance=violet][data-acrylic-level="2Level"]{
|
|
180
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground2Level, 0) / 2));
|
|
181
|
+
}
|
|
182
|
+
.priceSummary[data-acrylic-appearance=violet][data-acrylic-level="2Level"] .acrylic{
|
|
183
|
+
opacity:var(--sn-acrylic-opacityBackground2Level, 1);
|
|
184
|
+
background:var(--sn-theme-color-violet-background2Level, var(--sn-primitive-color-violet-99, #fdfdfd));
|
|
185
|
+
}
|
|
186
|
+
.priceSummary[data-acrylic-appearance=pink][data-acrylic-level=default]{
|
|
187
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground, 0) / 2));
|
|
188
|
+
}
|
|
189
|
+
.priceSummary[data-acrylic-appearance=pink][data-acrylic-level=default] .acrylic{
|
|
190
|
+
opacity:var(--sn-acrylic-opacityBackground, 1);
|
|
191
|
+
background:var(--sn-theme-color-pink-background, var(--sn-primitive-color-pink-90, #fceaf0));
|
|
192
|
+
}
|
|
193
|
+
.priceSummary[data-acrylic-appearance=pink][data-acrylic-level="1Level"]{
|
|
194
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground1Level, 0) / 2));
|
|
195
|
+
}
|
|
196
|
+
.priceSummary[data-acrylic-appearance=pink][data-acrylic-level="1Level"] .acrylic{
|
|
197
|
+
opacity:var(--sn-acrylic-opacityBackground1Level, 1);
|
|
198
|
+
background:var(--sn-theme-color-pink-background1Level, var(--sn-primitive-color-pink-95, #fff5f7));
|
|
199
|
+
}
|
|
200
|
+
.priceSummary[data-acrylic-appearance=pink][data-acrylic-level="2Level"]{
|
|
201
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground2Level, 0) / 2));
|
|
202
|
+
}
|
|
203
|
+
.priceSummary[data-acrylic-appearance=pink][data-acrylic-level="2Level"] .acrylic{
|
|
204
|
+
opacity:var(--sn-acrylic-opacityBackground2Level, 1);
|
|
205
|
+
background:var(--sn-theme-color-pink-background2Level, var(--sn-primitive-color-pink-99, #fdfcfc));
|
|
206
|
+
}
|
|
207
|
+
.priceSummary[data-acrylic-appearance=transparent]{
|
|
208
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground1Level, 0) / 2));
|
|
209
|
+
}
|
|
210
|
+
.priceSummary[data-acrylic-appearance=transparent] .acrylic{
|
|
211
|
+
opacity:var(--sn-acrylic-opacityBackground1Level, 1);
|
|
212
|
+
background:transparent;
|
|
213
|
+
}
|
|
214
|
+
.priceSummary[data-acrylic-appearance=decorTransparent]{
|
|
215
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground1Level, 0) / 2));
|
|
216
|
+
}
|
|
217
|
+
.priceSummary[data-acrylic-appearance=decorTransparent] .acrylic{
|
|
218
|
+
opacity:var(--sn-acrylic-opacityBackground1Level, 1);
|
|
219
|
+
background:var(--sn-theme-color-neutral-decorTransparent, var(--sn-brand-color-neutral-transparent-forLightMode, rgba(124, 131, 182, 0.0784313725)));
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.content{
|
|
223
|
+
position:relative;
|
|
224
|
+
display:flex;
|
|
225
|
+
flex-direction:column;
|
|
226
|
+
gap:var(--sn-primitive-dimension-4, 4px);
|
|
227
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LinkProps } from '@cloud-ru/ds-link';
|
|
2
|
+
import { WithSupportProps } from '@cloud-ru/ds-utils';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
import { ContentBlockProps } from '../ContentBlock';
|
|
5
|
+
export type PriceSummarySmallProps = WithSupportProps<ContentBlockProps & {
|
|
6
|
+
/** Итоговая сумма. */
|
|
7
|
+
value: number | undefined;
|
|
8
|
+
/** Function-ссылка внизу блока. */
|
|
9
|
+
docsLink?: {
|
|
10
|
+
href?: LinkProps['href'];
|
|
11
|
+
label?: LinkProps['label'];
|
|
12
|
+
};
|
|
13
|
+
/** Контент подсказки для иконки рядом с итоговой суммой. */
|
|
14
|
+
hintTooltipText?: ReactNode;
|
|
15
|
+
/** Дополнительный класс корневого контейнера. */
|
|
16
|
+
className?: string;
|
|
17
|
+
}>;
|
|
18
|
+
export declare function PriceSummarySmall({ value, docsLink, hintTooltipText, loading, dataError, onRetry, className, ...rest }: PriceSummarySmallProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PriceSummarySmall = PriceSummarySmall;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const button_1 = require("@cloud-ru/ds-button");
|
|
9
|
+
const system_1 = require("@cloud-ru/ds-icons/interface/system");
|
|
10
|
+
const materials_1 = require("@cloud-ru/ds-materials");
|
|
11
|
+
const tooltip_1 = require("@cloud-ru/ds-tooltip");
|
|
12
|
+
const typography_1 = require("@cloud-ru/ds-typography");
|
|
13
|
+
const utils_1 = require("@cloud-ru/ds-utils");
|
|
14
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
15
|
+
const helpers_1 = require("../../helpers");
|
|
16
|
+
const locale_1 = require("../../locale");
|
|
17
|
+
const ContentBlock_1 = require("../ContentBlock");
|
|
18
|
+
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
19
|
+
function PriceSummarySmall({ value = 0, docsLink, hintTooltipText, loading, dataError, onRetry, className, ...rest }) {
|
|
20
|
+
const { t } = locale_1.priceSummaryLocale.useTranslations();
|
|
21
|
+
const { appearance, level } = (0, materials_1.backgroundPredefinedFillToAcrylic)(materials_1.BACKGROUND_PREDEFINED_FILL.NeutralBackground1Level);
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.priceSummarySmall, className), "data-acrylic-appearance": appearance, "data-acrylic-level": level, ...(0, utils_1.extractSupportProps)(rest), children: [(0, jsx_runtime_1.jsx)("span", { className: styles_module_scss_1.default.acrylic, "aria-hidden": true, "data-acrylic-background": true }), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.content, children: [(0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: typography_1.VARIANT.body, size: typography_1.SIZE.m, children: t('total') }), (0, jsx_runtime_1.jsxs)(ContentBlock_1.ContentBlock, { loading: loading, dataError: dataError, onRetry: onRetry, children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.value, children: [hintTooltipText ? ((0, jsx_runtime_1.jsx)(tooltip_1.QuestionTooltip, { tip: hintTooltipText, children: (0, jsx_runtime_1.jsx)(system_1.NotifierInfoFilledSVG, { size: 16, className: styles_module_scss_1.default.icon }) })) : ((0, jsx_runtime_1.jsx)(system_1.NotifierInfoFilledSVG, { size: 16, className: styles_module_scss_1.default.icon })), (0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: typography_1.VARIANT.title, size: typography_1.SIZE.m, children: (0, helpers_1.formatCurrency)(value) })] }), docsLink?.href && ((0, jsx_runtime_1.jsx)(button_1.Button, { as: 'a', view: 'function', size: 'm', label: docsLink.label || t('costLink'), href: docsLink.href, target: '_blank', className: styles_module_scss_1.default.docLink }))] })] })] }));
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PriceSummarySmall';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./PriceSummarySmall"), exports);
|