sag_components 1.0.783 → 1.0.784
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/dist/stories/components/EventInfo.js +92 -0
- package/dist/stories/components/EventInfo.style.js +20 -0
- package/dist/stories/components/FilterButton.js +4 -10
- package/dist/stories/components/FilterButton.style.js +1 -1
- package/dist/stories/components/FilterPanel.js +0 -1
- package/dist/stories/components/MarketShareDescription.js +6 -8
- package/dist/stories/components/TotalDoughnutChart.js +20 -5
- package/dist/stories/components/TotalDoughnutChart.style.js +13 -12
- package/package.json +1 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _MenuItemOpenIcon = require("./icons/MenuItemOpenIcon");
|
|
10
|
+
var _MenuItemUpIcon = require("./icons/MenuItemUpIcon");
|
|
11
|
+
var _SpotlightProductIcon = require("./icons/SpotlightProductIcon");
|
|
12
|
+
var _BannersDropdown = require("./BannersDropdown");
|
|
13
|
+
var _EventInfo = require("./EventInfo.style");
|
|
14
|
+
const EventInfo = props => {
|
|
15
|
+
const {
|
|
16
|
+
title,
|
|
17
|
+
subTitle,
|
|
18
|
+
productsData,
|
|
19
|
+
onSpotlightProductClick,
|
|
20
|
+
onClickBannersDropdown
|
|
21
|
+
} = props;
|
|
22
|
+
const [IsProductsListOpen, setIsProductsListOpen] = (0, _react.useState)(false);
|
|
23
|
+
const displayBannersDropdown = () => /*#__PURE__*/_react.default.createElement(_BannersDropdown.BannersDropdown, {
|
|
24
|
+
banners: [{
|
|
25
|
+
checked: true,
|
|
26
|
+
name: 'StopAndShop'
|
|
27
|
+
}, {
|
|
28
|
+
checked: true,
|
|
29
|
+
name: 'FoodLion'
|
|
30
|
+
}, {
|
|
31
|
+
checked: true,
|
|
32
|
+
name: 'GiantFood'
|
|
33
|
+
}, {
|
|
34
|
+
checked: true,
|
|
35
|
+
name: 'TheGiantCompany'
|
|
36
|
+
}, {
|
|
37
|
+
checked: true,
|
|
38
|
+
name: 'Hannaford'
|
|
39
|
+
}],
|
|
40
|
+
onClick: banners => {
|
|
41
|
+
onClickBannersDropdown({
|
|
42
|
+
banners
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return /*#__PURE__*/_react.default.createElement(_EventInfo.EventInfoMainContainer, {
|
|
47
|
+
id: "EventInfoMainContainer"
|
|
48
|
+
}, /*#__PURE__*/_react.default.createElement(_EventInfo.EventInfoContainer, {
|
|
49
|
+
id: "EventInfoContainer"
|
|
50
|
+
}, /*#__PURE__*/_react.default.createElement(_EventInfo.EventInfoTitleContainer, {
|
|
51
|
+
id: "EventInfoTitleContainer"
|
|
52
|
+
}, /*#__PURE__*/_react.default.createElement(_EventInfo.EventInfoTitle, {
|
|
53
|
+
id: "EventInfoTitle"
|
|
54
|
+
}, title), /*#__PURE__*/_react.default.createElement(_EventInfo.EventInfoSubTitle, {
|
|
55
|
+
id: "EventInfoSubTitle"
|
|
56
|
+
}, "|"), /*#__PURE__*/_react.default.createElement(_EventInfo.EventInfoSubTitle, {
|
|
57
|
+
id: "EventInfoSubTitle"
|
|
58
|
+
}, productsData ? productsData === null || productsData === void 0 ? void 0 : productsData.length : ''), displayBannersDropdown()), /*#__PURE__*/_react.default.createElement(_EventInfo.ProductButtonContainer, {
|
|
59
|
+
id: "ProductButtonContainer",
|
|
60
|
+
onClick: () => {
|
|
61
|
+
setIsProductsListOpen(!IsProductsListOpen);
|
|
62
|
+
}
|
|
63
|
+
}, IsProductsListOpen ? /*#__PURE__*/_react.default.createElement(_MenuItemUpIcon.MenuItemUpIcon, {
|
|
64
|
+
color: "#212121"
|
|
65
|
+
}) : /*#__PURE__*/_react.default.createElement(_MenuItemOpenIcon.MenuItemOpenIcon, {
|
|
66
|
+
color: "#212121"
|
|
67
|
+
}))), IsProductsListOpen && /*#__PURE__*/_react.default.createElement(_EventInfo.EventInfoContentContainer, {
|
|
68
|
+
id: "EventInfoContentContainer"
|
|
69
|
+
}, /*#__PURE__*/_react.default.createElement(_EventInfo.ProductsTitle, {
|
|
70
|
+
id: "ProductsTitle"
|
|
71
|
+
}, subTitle), productsData === null || productsData === void 0 ? void 0 : productsData.map(item => /*#__PURE__*/_react.default.createElement(_EventInfo.ProductContainer, {
|
|
72
|
+
id: "ProductContainer"
|
|
73
|
+
}, /*#__PURE__*/_react.default.createElement(_EventInfo.Product, {
|
|
74
|
+
id: "Product"
|
|
75
|
+
}, item.label), item.ShowSpotlightProductButton ? /*#__PURE__*/_react.default.createElement(_EventInfo.ProductButtonContainer, {
|
|
76
|
+
id: "ProductButtonContainer",
|
|
77
|
+
background: "#F8CD00",
|
|
78
|
+
onClick: () => {
|
|
79
|
+
onSpotlightProductClick({
|
|
80
|
+
value: item.value,
|
|
81
|
+
label: item.label
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}, /*#__PURE__*/_react.default.createElement(_SpotlightProductIcon.SpotlightProductIcon, null)) : ''))));
|
|
85
|
+
};
|
|
86
|
+
var _default = exports.default = EventInfo;
|
|
87
|
+
EventInfo.defaultProps = {
|
|
88
|
+
title: 'Products Variety',
|
|
89
|
+
subTitle: 'Product Name',
|
|
90
|
+
onSpotlightProductClick: () => {},
|
|
91
|
+
onClickBannersDropdown: () => {}
|
|
92
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ProductsTitle = exports.ProductContainer = exports.ProductButtonContainer = exports.Product = exports.EventInfoTitleContainer = exports.EventInfoTitle = exports.EventInfoSubTitle = exports.EventInfoMainContainer = exports.EventInfoContentContainer = exports.EventInfoContainer = void 0;
|
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
11
|
+
const EventInfoMainContainer = exports.EventInfoMainContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n margin: 0;\n padding: 10px;\n border-radius: 12px;\n box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);\n"])));
|
|
12
|
+
const EventInfoContainer = exports.EventInfoContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: 0 10px;\n"])));
|
|
13
|
+
const EventInfoTitleContainer = exports.EventInfoTitleContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n font-size: 20px;\n line-height: 25px;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: 10px;\n gap: 15px;\n"])));
|
|
14
|
+
const EventInfoTitle = exports.EventInfoTitle = _styledComponents.default.h3(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 20px;\n\n margin: 0;\n"])));
|
|
15
|
+
const EventInfoSubTitle = exports.EventInfoSubTitle = _styledComponents.default.h3(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n color: #757171;\n font-weight: 500;\n font-size: 20px;\n margin: 0;\n"])));
|
|
16
|
+
const EventInfoContentContainer = exports.EventInfoContentContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n font-size: 20px;\n line-height: 25px;\n display: flex;\n justify-content: flex-start;\n flex-direction: column;\n align-items: flex-start;\n margin: 10px;\n padding: 10px 20px 20px 50px;\n"])));
|
|
17
|
+
const ProductsTitle = exports.ProductsTitle = _styledComponents.default.h3(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 600;\n font-size: 14px;\n margin: 10px 0;\n"])));
|
|
18
|
+
const ProductContainer = exports.ProductContainer = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: flex-start;\n align-items: center;\n border-bottom: 1px solid #00000010;\n width: 100%;\n gap: 20px;\n"])));
|
|
19
|
+
const Product = exports.Product = _styledComponents.default.h3(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 400;\n font-size: 14px;\n border-radius: 12px;\n"])));
|
|
20
|
+
const ProductButtonContainer = exports.ProductButtonContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n background: ", ";\n border-radius: 12px;\n height: 25px;\n padding: 0 15px;\n user-select: none;\n &:hover {\n background-color: #f0f0f0;\n cursor: pointer;\n }\n gap: 10px;\n"])), props => props.background || '#ffffff');
|
|
@@ -1,33 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.FilterButton = void 0;
|
|
8
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _FilterButton = require("./FilterButton.style");
|
|
10
10
|
var _FilterIcon = require("./icons/FilterIcon");
|
|
11
11
|
const FilterButton = props => {
|
|
12
12
|
const {
|
|
13
13
|
color,
|
|
14
|
-
activeColor,
|
|
15
14
|
height,
|
|
16
15
|
buttonText,
|
|
17
16
|
iconWidth,
|
|
18
17
|
iconHeight,
|
|
19
18
|
disabled,
|
|
20
|
-
openState,
|
|
21
19
|
onButtonClick
|
|
22
20
|
} = props;
|
|
23
|
-
const [activeState, setActiveState] = (0, _react.useState)(openState);
|
|
24
21
|
const onClickHandler = event => {
|
|
25
22
|
onButtonClick(event);
|
|
26
|
-
setActiveState(!activeState);
|
|
27
23
|
};
|
|
28
24
|
return /*#__PURE__*/_react.default.createElement(_FilterButton.FilterButtonWrapper, {
|
|
29
25
|
height: height,
|
|
30
|
-
color:
|
|
26
|
+
color: color,
|
|
31
27
|
disabled: disabled,
|
|
32
28
|
onClick: event => {
|
|
33
29
|
onClickHandler(event);
|
|
@@ -35,7 +31,7 @@ const FilterButton = props => {
|
|
|
35
31
|
}, /*#__PURE__*/_react.default.createElement(_FilterIcon.FilterIcon, {
|
|
36
32
|
width: iconWidth,
|
|
37
33
|
height: iconHeight,
|
|
38
|
-
color:
|
|
34
|
+
color: color
|
|
39
35
|
}), /*#__PURE__*/_react.default.createElement(_FilterButton.SpanText, null, buttonText));
|
|
40
36
|
};
|
|
41
37
|
exports.FilterButton = FilterButton;
|
|
@@ -44,10 +40,8 @@ FilterButton.defaultProps = {
|
|
|
44
40
|
buttonText: 'Filter',
|
|
45
41
|
height: '40px',
|
|
46
42
|
color: '#212121',
|
|
47
|
-
activeColor: '#229E38',
|
|
48
43
|
iconHeight: 12,
|
|
49
44
|
iconWidth: 12,
|
|
50
|
-
openState: false,
|
|
51
45
|
disabled: false,
|
|
52
46
|
onButtonClick: () => {}
|
|
53
47
|
};
|
|
@@ -8,5 +8,5 @@ exports.SpanText = exports.FilterButtonWrapper = void 0;
|
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
10
|
var _templateObject, _templateObject2;
|
|
11
|
-
const FilterButtonWrapper = exports.FilterButtonWrapper = _styledComponents.default.button(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: ", ";\n font-size: 14px;\n font-weight: 400;\n display: flex;\n gap: 8px;\n align-items: center;\n justify-content: center;\n padding: 8px 18px;\n color: ", ";\n border-radius: 8px;\n border: 1px solid
|
|
11
|
+
const FilterButtonWrapper = exports.FilterButtonWrapper = _styledComponents.default.button(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: ", ";\n font-size: 14px;\n font-weight: 400;\n display: flex;\n gap: 8px;\n align-items: center;\n justify-content: center;\n padding: 8px 18px;\n color: ", ";\n border-radius: 8px;\n border: 1px solid #B1B1B1;\n background: transparent;\n transition: box-shadow 0.3s ease;\n &:hover, &:focus {\n cursor: pointer;\n box-shadow: 5px 5px 10px 0px rgba(0, 0, 0, 0.1);\n }\n"])), props => props.height, props => props.color);
|
|
12
12
|
const SpanText = exports.SpanText = _styledComponents.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n"])));
|
|
@@ -14,13 +14,11 @@ var _CommonFunctions = require("./CommonFunctions");
|
|
|
14
14
|
const MarketShareDescription = props => {
|
|
15
15
|
const {
|
|
16
16
|
width,
|
|
17
|
-
height
|
|
18
|
-
} = props;
|
|
19
|
-
const {
|
|
17
|
+
height,
|
|
20
18
|
marketShareData,
|
|
21
19
|
iconColor,
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
onBannerClick,
|
|
21
|
+
dotCut
|
|
24
22
|
} = props;
|
|
25
23
|
const displayField = dataItem => {
|
|
26
24
|
var _dataItem$value;
|
|
@@ -32,7 +30,7 @@ const MarketShareDescription = props => {
|
|
|
32
30
|
className: "FormattedValue"
|
|
33
31
|
}, /*#__PURE__*/_react.default.createElement(_MarketShareDescription.TextBeforeAndAfterValue, {
|
|
34
32
|
className: "TextBeforeAndAfterValue"
|
|
35
|
-
}, dataItem.textBefore), (0, _CommonFunctions.getFormattedValue)(dataItem.value && Math.abs(dataItem.value) > 0 && dataItem.value % 1 !== 0 ? (_dataItem$value = dataItem.value) === null || _dataItem$value === void 0 ? void 0 : _dataItem$value.toFixed(2) : dataItem.value), (0, _CommonFunctions.getFormattedUnits)(dataItem.value), /*#__PURE__*/_react.default.createElement(_MarketShareDescription.TextBeforeAndAfterValue, null, dataItem.textAfter)));
|
|
33
|
+
}, dataItem.textBefore), dotCut ? (0, _CommonFunctions.getFormattedValue)(dataItem.value && Math.abs(dataItem.value) > 0 && dataItem.value % 1 !== 0 ? (_dataItem$value = dataItem.value) === null || _dataItem$value === void 0 ? void 0 : _dataItem$value.toFixed(2) : dataItem.value) : (0, _CommonFunctions.getNumberWithCommas)(dataItem.value), dotCut ? (0, _CommonFunctions.getFormattedUnits)(dataItem.value) : '', /*#__PURE__*/_react.default.createElement(_MarketShareDescription.TextBeforeAndAfterValue, null, dataItem.textAfter)));
|
|
36
34
|
return content;
|
|
37
35
|
};
|
|
38
36
|
const dispalyRowFields = data => {
|
|
@@ -102,6 +100,6 @@ MarketShareDescription.defaultProps = {
|
|
|
102
100
|
width: '100%',
|
|
103
101
|
height: '100%',
|
|
104
102
|
iconColor: '#1B30AA',
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
onBannerClick: () => {},
|
|
104
|
+
dotCut: false
|
|
107
105
|
};
|
|
@@ -30,7 +30,8 @@ const TotalDoughnutChart = props => {
|
|
|
30
30
|
textcolor,
|
|
31
31
|
isPercent,
|
|
32
32
|
hideTitleAndValue,
|
|
33
|
-
noDataText
|
|
33
|
+
noDataText,
|
|
34
|
+
textAfterValue
|
|
34
35
|
} = props;
|
|
35
36
|
const [DoughnutChartRadius, setDoughnutChartRadius] = (0, _react.useState)(0);
|
|
36
37
|
const [zoomResolution, setZoomResolution] = (0, _react.useState)(1);
|
|
@@ -89,14 +90,26 @@ const TotalDoughnutChart = props => {
|
|
|
89
90
|
width: width,
|
|
90
91
|
textcolor: textcolor
|
|
91
92
|
}, legendData.length === 0 || legendData.every(item => item.value === undefined || item.value === null) ? /*#__PURE__*/_react.default.createElement(_NoDataFoundMessage.NoDataFoundMessage, {
|
|
93
|
+
className: "NoDataFoundMessage",
|
|
92
94
|
noDataText: noDataText
|
|
93
95
|
}) : /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.Controls, {
|
|
94
|
-
|
|
96
|
+
className: "Controls",
|
|
95
97
|
height: height,
|
|
96
98
|
width: width
|
|
97
|
-
}, !hideTitleAndValue && /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.TitleAndValueContainer,
|
|
99
|
+
}, !hideTitleAndValue && /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.TitleAndValueContainer, {
|
|
100
|
+
className: "TitleAndValueContainer"
|
|
101
|
+
}, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.Title, {
|
|
102
|
+
className: "Title"
|
|
103
|
+
}, title), /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.CurrencySignAndFormattedValueContainer, {
|
|
104
|
+
className: "CurrencySignAndFormattedValueContainer"
|
|
105
|
+
}, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.FormattedValue, {
|
|
106
|
+
className: "FormattedValue",
|
|
98
107
|
width: width
|
|
99
|
-
}, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.CurrencySign,
|
|
108
|
+
}, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.CurrencySign, {
|
|
109
|
+
className: "CurrencySign"
|
|
110
|
+
}, currencySign ? (0, _CommonFunctions.getCurrencySign)(currencyType, value) : ''), dotCut ? (0, _CommonFunctions.getFormattedValue)(value && Math.abs(value) > 0 && value % 1 !== 0 ? value === null || value === void 0 ? void 0 : value.toFixed(2) : value) : (0, _CommonFunctions.getNumberWithCommas)(value), dotCut ? (0, _CommonFunctions.getFormattedUnits)(value) : ''), textAfterValue ? /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.TextAfterValue, {
|
|
111
|
+
className: "TextAfterValue"
|
|
112
|
+
}, textAfterValue) : '', addingBenchmark && /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, null))), /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.DoughnutChartAndLegendContainer, null, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.DoughnutChartContainer, {
|
|
100
113
|
width: width,
|
|
101
114
|
height: height,
|
|
102
115
|
ref: DoughnutChartContainerRef
|
|
@@ -146,7 +159,8 @@ TotalDoughnutChart.defaultProps = {
|
|
|
146
159
|
textcolor: '#212121',
|
|
147
160
|
isPercent: false,
|
|
148
161
|
hideTitleAndValue: false,
|
|
149
|
-
noDataText: 'No Data'
|
|
162
|
+
noDataText: 'No Data',
|
|
163
|
+
textAfterValue: ''
|
|
150
164
|
};
|
|
151
165
|
function CustomTooltip(_ref) {
|
|
152
166
|
let {
|
|
@@ -156,6 +170,7 @@ function CustomTooltip(_ref) {
|
|
|
156
170
|
isPercent = false
|
|
157
171
|
} = _ref;
|
|
158
172
|
if (active && payload && payload.length) {
|
|
173
|
+
// eslint-disable-next-line no-nested-ternary
|
|
159
174
|
const percent = value && value !== 0 && !isPercent ? (payload[0].value / value * 100).toFixed(1) : value && isPercent ? payload[0].value.toFixed(1) : 0;
|
|
160
175
|
return /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.TooltipDiv, null, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.TooltipLabel, null, "".concat(payload[0].name, " ").concat(percent, "%")));
|
|
161
176
|
}
|
|
@@ -4,10 +4,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.TooltipLabel = exports.TooltipDiv = exports.TitleAndValueContainer = exports.Title = exports.LegendTitleAndFormatedValueContainer = exports.LegendTitle = exports.LegendFormattedValue = exports.LegendFormatedValueContainer = exports.LegendControlsContainer = exports.LegendContainer = exports.LegendColorRectangle = exports.FormattedValue = exports.DoughnutChartContainer = exports.DoughnutChartAndLegendContainer = exports.CurrencySignAndFormattedValueContainer = exports.CurrencySign = exports.ControlsContainer = exports.Controls = void 0;
|
|
7
|
+
exports.TooltipLabel = exports.TooltipDiv = exports.TitleAndValueContainer = exports.Title = exports.TextAfterValue = exports.LegendTitleAndFormatedValueContainer = exports.LegendTitle = exports.LegendFormattedValue = exports.LegendFormatedValueContainer = exports.LegendControlsContainer = exports.LegendContainer = exports.LegendColorRectangle = exports.FormattedValue = exports.DoughnutChartContainer = exports.DoughnutChartAndLegendContainer = exports.CurrencySignAndFormattedValueContainer = exports.CurrencySign = exports.ControlsContainer = exports.Controls = void 0;
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18;
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19;
|
|
11
11
|
const scrollableStyles = "\n overflow-y: auto;\n\n &::-webkit-scrollbar {\n width: 8px;\n }\n\n &::-webkit-scrollbar-track {\n background: #E8E8E8;\n border-radius: 5px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #D0D0D0;\n border-radius: 5px;\n }\n";
|
|
12
12
|
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n font-size: ", ";\n color: ", ";\n width: ", ";\n height: ", ";\n border-radius: 12px;\n display: flex;\n align-items: center;\n @media (max-width: 1536px) {\n ", "\n }\n\n > * {\n box-sizing: border-box;\n }\n"])), props => props.rootFont, props => props.textColor, props => props.width, props => props.height, scrollableStyles);
|
|
13
13
|
const Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n background: white;\n border-radius: 12px; \n"])));
|
|
@@ -15,15 +15,16 @@ const TooltipDiv = exports.TooltipDiv = _styledComponents.default.div(_templateO
|
|
|
15
15
|
const TooltipLabel = exports.TooltipLabel = _styledComponents.default.p(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-family: \"Poppins\", sans-serif;\n font-size: 12px;\n font-weight: 400;\n font-style: normal;\n width: max-content; // fit-content;\n line-height: normal;\n margin: 0;\n"])));
|
|
16
16
|
const TitleAndValueContainer = exports.TitleAndValueContainer = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n padding: 0 20px;\n"])));
|
|
17
17
|
const Title = exports.Title = _styledComponents.default.h4(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 1rem;\n margin: 0;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n"])));
|
|
18
|
-
const CurrencySignAndFormattedValueContainer = exports.CurrencySignAndFormattedValueContainer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n gap:
|
|
18
|
+
const CurrencySignAndFormattedValueContainer = exports.CurrencySignAndFormattedValueContainer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n gap: 5px;\n align-items: baseline;\n"])));
|
|
19
19
|
const CurrencySign = exports.CurrencySign = _styledComponents.default.span(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 16px;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 11px;\n }\n"])));
|
|
20
20
|
const FormattedValue = exports.FormattedValue = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 40px;\n @media (max-width: 1536px) {\n font-size: 24px;\n }\n @media (max-width: 1366px) {\n font-size: 20px;\n }\n"])));
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
21
|
+
const TextAfterValue = exports.TextAfterValue = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)([" \n font-weight: 400;\n font-size: 12px;\n @media (max-width: 1536px) {\n font-size: 11px;\n }\n @media (max-width: 1366px) {\n font-size: 10px;\n }\n"])));
|
|
22
|
+
const DoughnutChartAndLegendContainer = exports.DoughnutChartAndLegendContainer = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n margin-top: auto;\n padding: 0 20px ;\n margin-bottom: 20px; \n"])));
|
|
23
|
+
const DoughnutChartContainer = exports.DoughnutChartContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center; \n min-width: 90px;\n min-height: 90px; \n"])));
|
|
24
|
+
const LegendContainer = exports.LegendContainer = _styledComponents.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n padding-left: 10px;\n display: flex;\n flex-direction: column;\n justify-content: space-evenly; \n"])));
|
|
25
|
+
const LegendControlsContainer = exports.LegendControlsContainer = _styledComponents.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n gap: 0.5rem;\n align-items: center;\n margin-bottom: 0.375rem;\n"])));
|
|
26
|
+
const LegendTitleAndFormatedValueContainer = exports.LegendTitleAndFormatedValueContainer = _styledComponents.default.div(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n flex-grow: 1;\n"])));
|
|
27
|
+
const LegendFormatedValueContainer = exports.LegendFormatedValueContainer = _styledComponents.default.div(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 0.875rem;\n"])));
|
|
28
|
+
const LegendColorRectangle = exports.LegendColorRectangle = _styledComponents.default.div(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n width: 0.875rem;\n min-width: 0.875rem;\n height: 0.875rem;\n border-radius: 2px;\n background: ", ";\n"])), props => props.color);
|
|
29
|
+
const LegendTitle = exports.LegendTitle = _styledComponents.default.h5(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 400;\n font-size: 16px;\n gap: 5px;\n margin: 0;\n display: flex;\n justify-content: space-between;\n @media (max-width: 1536px) {\n font-size: 11px;\n }\n @media (max-width: 1366px) {\n font-size: 10px;\n }\n"])));
|
|
30
|
+
const LegendFormattedValue = exports.LegendFormattedValue = _styledComponents.default.span(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n white-space: nowrap;\n"])));
|