@loafmarkets/ui 0.1.115 → 0.1.117
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.js +15 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -11875,8 +11875,8 @@ var InsufficientFunds = styled25.div`
|
|
|
11875
11875
|
`;
|
|
11876
11876
|
var ACTIVITY_PAGE_SIZE_DEFAULT = 10;
|
|
11877
11877
|
var formatCurrency5 = (value, opts) => {
|
|
11878
|
-
const min = 2;
|
|
11879
|
-
const max = 2;
|
|
11878
|
+
const min = opts?.minimumFractionDigits ?? 2;
|
|
11879
|
+
const max = opts?.maximumFractionDigits ?? 2;
|
|
11880
11880
|
return `$${value.toLocaleString("en-US", { minimumFractionDigits: min, maximumFractionDigits: max })}`;
|
|
11881
11881
|
};
|
|
11882
11882
|
var formatNumber2 = (value, maximumFractionDigits = 2) => value.toLocaleString("en-US", { minimumFractionDigits: 0, maximumFractionDigits });
|
|
@@ -12053,10 +12053,10 @@ function PortfolioActivityPanel({
|
|
|
12053
12053
|
positions.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12054
12054
|
/* @__PURE__ */ jsxs(PositionsHeader, { $hasClose: !!onClosePosition, children: [
|
|
12055
12055
|
/* @__PURE__ */ jsx(PositionsHeaderCell, { children: "Asset" }),
|
|
12056
|
-
/* @__PURE__ */ jsx(PositionsHeaderCell, { children: "
|
|
12056
|
+
/* @__PURE__ */ jsx(PositionsHeaderCell, { children: "Units" }),
|
|
12057
12057
|
/* @__PURE__ */ jsx(PositionsHeaderCell, { children: "Value" }),
|
|
12058
|
-
/* @__PURE__ */ jsx(PositionsHeaderCell, { children: "
|
|
12059
|
-
/* @__PURE__ */ jsx(PositionsHeaderCell, { children: "
|
|
12058
|
+
/* @__PURE__ */ jsx(PositionsHeaderCell, { children: "Avg Price" }),
|
|
12059
|
+
/* @__PURE__ */ jsx(PositionsHeaderCell, { children: "Current Price" }),
|
|
12060
12060
|
/* @__PURE__ */ jsx(PositionsHeaderCell, { children: "PNL (%)" }),
|
|
12061
12061
|
onClosePosition && /* @__PURE__ */ jsx(PositionsHeaderCell, { children: "Close" })
|
|
12062
12062
|
] }),
|
|
@@ -12068,8 +12068,16 @@ function PortfolioActivityPanel({
|
|
|
12068
12068
|
const isPositive = pnl >= 0;
|
|
12069
12069
|
return /* @__PURE__ */ jsxs(PositionsRow, { $hasClose: !!onClosePosition, children: [
|
|
12070
12070
|
/* @__PURE__ */ jsx(PositionsCell, { children: /* @__PURE__ */ jsx(HoldingsPropertyLink, { onClick: () => onPositionClick?.(pos.tokenName, pos.isIpoAllocation), children: pos.tokenName }) }),
|
|
12071
|
-
/* @__PURE__ */ jsx(PositionsCell, { children: /* @__PURE__ */
|
|
12072
|
-
|
|
12071
|
+
/* @__PURE__ */ jsx(PositionsCell, { children: /* @__PURE__ */ jsxs("span", { style: { color: "#fff", fontSize: "0.8rem" }, children: [
|
|
12072
|
+
formatNumber2(pos.quantity),
|
|
12073
|
+
" ",
|
|
12074
|
+
/* @__PURE__ */ jsx("span", { style: { color: "rgba(255,255,255,0.4)", fontSize: "0.7rem" }, children: pos.tokenName.toUpperCase() })
|
|
12075
|
+
] }) }),
|
|
12076
|
+
/* @__PURE__ */ jsx(PositionsCell, { children: /* @__PURE__ */ jsxs("span", { style: { color: "#fff", fontSize: "0.8rem" }, children: [
|
|
12077
|
+
formatCurrency5(currentValue, { maximumFractionDigits: 0 }),
|
|
12078
|
+
" ",
|
|
12079
|
+
/* @__PURE__ */ jsx("span", { style: { color: "rgba(255,255,255,0.4)", fontSize: "0.7rem" }, children: "USD" })
|
|
12080
|
+
] }) }),
|
|
12073
12081
|
/* @__PURE__ */ jsx(PositionsCell, { children: /* @__PURE__ */ jsx("span", { style: { color: "rgba(255,255,255,0.7)", fontSize: "0.8rem" }, children: formatCurrency5(pos.averageEntryPrice) }) }),
|
|
12074
12082
|
/* @__PURE__ */ jsx(PositionsCell, { children: /* @__PURE__ */ jsx("span", { style: { color: "#fff", fontSize: "0.8rem" }, children: formatCurrency5(pos.marketPrice) }) }),
|
|
12075
12083
|
/* @__PURE__ */ jsxs(PositionsCell, { children: [
|