@kaio-xyz/design-system 1.1.47 → 1.1.50

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/index.cjs.js CHANGED
@@ -825,11 +825,13 @@ var InvestmentGraph = function (_a) {
825
825
  var style$5 = {"root":"investments-header-module__root__fxQmk","total":"investments-header-module__total__DrEq0","badge":"investments-header-module__badge__-aeBM"};
826
826
 
827
827
  var InvestmentsHeader = function (_a) {
828
- var currentTotalInvestmentValue = _a.currentTotalInvestmentValue, currentGainLossValue = _a.currentGainLossValue, currentGainLossPercentageValue = _a.currentGainLossPercentageValue;
828
+ var currentTotalInvestmentValue = _a.currentTotalInvestmentValue, _b = _a.currentGainLossValue, currentGainLossValue = _b === void 0 ? 0 : _b, _c = _a.currentGainLossPercentageValue, currentGainLossPercentageValue = _c === void 0 ? 0 : _c, _d = _a.title, title = _d === void 0 ? "Total Investments" : _d;
829
829
  var isNegativePercentage = currentGainLossPercentageValue < 0;
830
830
  var dataGain = isNegativePercentage ? "negative" : "positive";
831
831
  var triangle = isNegativePercentage ? jsxRuntime.jsx(SvgArrowDownRight, { "data-gain": "negative" }) : jsxRuntime.jsx(SvgArrowUpRight, { "data-gain": "positive" });
832
- return (jsxRuntime.jsxs(Stack, { className: style$5.root, space: "xs", children: [jsxRuntime.jsx("p", { className: style$5.total, children: "Total Investments" }), jsxRuntime.jsxs(Stack, { children: [jsxRuntime.jsx("h1", { children: formatNumberWithCurrency(currentTotalInvestmentValue) }), jsxRuntime.jsx(Badge, { status: isNegativePercentage ? "rejected" : "success", className: style$5.badge, children: jsxRuntime.jsxs(Stack, { space: "xs", position: "horizontal", children: [triangle, jsxRuntime.jsx("p", { "data-gain": dataGain, children: formatNumberWithCurrency(Math.abs(currentGainLossValue)) }), jsxRuntime.jsxs("p", { "data-gain": dataGain, children: ["(", formatNumber(Math.abs(currentGainLossPercentageValue)), "%)"] })] }) })] })] }));
832
+ return (jsxRuntime.jsxs(Stack, { className: style$5.root, space: "xs", children: [jsxRuntime.jsx("p", { className: style$5.total, children: title }), jsxRuntime.jsxs(Stack, { children: [jsxRuntime.jsx("h1", { children: formatNumberWithCurrency(currentTotalInvestmentValue) }), currentGainLossValue && currentGainLossPercentageValue
833
+ ? (jsxRuntime.jsx(Badge, { status: isNegativePercentage ? "rejected" : "success", className: style$5.badge, children: jsxRuntime.jsxs(Stack, { space: "xs", position: "horizontal", children: [triangle, jsxRuntime.jsx("p", { "data-gain": dataGain, children: formatNumberWithCurrency(Math.abs(currentGainLossValue)) }), jsxRuntime.jsxs("p", { "data-gain": dataGain, children: ["(", formatNumber(Math.abs(currentGainLossPercentageValue)), "%)"] })] }) }))
834
+ : null] })] }));
833
835
  };
834
836
 
835
837
  var tableCustomStyles = {