@loafmarkets/ui 0.1.96 → 0.1.98
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.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +28 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9645,7 +9645,8 @@ function AssetSelectorBar({
|
|
|
9645
9645
|
currentTokenName,
|
|
9646
9646
|
selectorItems,
|
|
9647
9647
|
onSelect,
|
|
9648
|
-
trailing
|
|
9648
|
+
trailing,
|
|
9649
|
+
imageUrl
|
|
9649
9650
|
}) {
|
|
9650
9651
|
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
|
9651
9652
|
const hasItems = selectorItems && selectorItems.length > 0;
|
|
@@ -9654,6 +9655,7 @@ function AssetSelectorBar({
|
|
|
9654
9655
|
...offeringValuation != null ? [{ label: "Offering Valuation", value: `$${offeringValuation.toLocaleString()}` }] : []
|
|
9655
9656
|
];
|
|
9656
9657
|
return /* @__PURE__ */ jsx(AssetSelectorWrapper, { children: /* @__PURE__ */ jsxs(IPOAssetSelector, { children: [
|
|
9658
|
+
imageUrl && /* @__PURE__ */ jsx(AssetThumbnail, { src: imageUrl, alt: propertyName }),
|
|
9657
9659
|
/* @__PURE__ */ jsx(AssetSelectorDropdown, { onClick: () => hasItems && setIsDropdownOpen((prev) => !prev), children: /* @__PURE__ */ jsxs(AssetName, { children: [
|
|
9658
9660
|
propertyName,
|
|
9659
9661
|
hasItems && /* @__PURE__ */ jsx(
|
|
@@ -9743,6 +9745,20 @@ var IPOAssetSelector = styled25.div`
|
|
|
9743
9745
|
padding: 0.6rem 0.75rem;
|
|
9744
9746
|
}
|
|
9745
9747
|
`;
|
|
9748
|
+
var AssetThumbnail = styled25.img`
|
|
9749
|
+
width: 40px;
|
|
9750
|
+
height: 40px;
|
|
9751
|
+
border-radius: 8px;
|
|
9752
|
+
object-fit: cover;
|
|
9753
|
+
flex-shrink: 0;
|
|
9754
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
9755
|
+
|
|
9756
|
+
@media (max-width: 768px) {
|
|
9757
|
+
width: 32px;
|
|
9758
|
+
height: 32px;
|
|
9759
|
+
border-radius: 6px;
|
|
9760
|
+
}
|
|
9761
|
+
`;
|
|
9746
9762
|
var AssetSelectorDropdown = styled25.div`
|
|
9747
9763
|
display: flex;
|
|
9748
9764
|
align-items: center;
|
|
@@ -11787,8 +11803,8 @@ var InsufficientFunds = styled25.div`
|
|
|
11787
11803
|
`;
|
|
11788
11804
|
var ACTIVITY_PAGE_SIZE_DEFAULT = 10;
|
|
11789
11805
|
var formatCurrency5 = (value, opts) => {
|
|
11790
|
-
const min =
|
|
11791
|
-
const max =
|
|
11806
|
+
const min = 2;
|
|
11807
|
+
const max = 2;
|
|
11792
11808
|
return `$${value.toLocaleString("en-US", { minimumFractionDigits: min, maximumFractionDigits: max })}`;
|
|
11793
11809
|
};
|
|
11794
11810
|
var formatNumber2 = (value, maximumFractionDigits = 2) => value.toLocaleString("en-US", { minimumFractionDigits: 0, maximumFractionDigits });
|
|
@@ -11941,17 +11957,20 @@ function PortfolioActivityPanel({
|
|
|
11941
11957
|
] })
|
|
11942
11958
|
] }),
|
|
11943
11959
|
/* @__PURE__ */ jsxs(HoldingsQuantity, { children: [
|
|
11944
|
-
/* @__PURE__ */
|
|
11945
|
-
|
|
11960
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
11961
|
+
formatNumber2(pos.quantity),
|
|
11962
|
+
" ",
|
|
11963
|
+
pos.tokenName
|
|
11964
|
+
] }),
|
|
11965
|
+
/* @__PURE__ */ jsxs(HoldingsAvgEntry, { children: [
|
|
11946
11966
|
"Avg ",
|
|
11947
|
-
formatCurrency5(
|
|
11967
|
+
formatCurrency5(pos.averageEntryPrice)
|
|
11948
11968
|
] })
|
|
11949
11969
|
] }),
|
|
11950
11970
|
/* @__PURE__ */ jsxs(HoldingsPnL, { children: [
|
|
11951
11971
|
/* @__PURE__ */ jsxs(PnLAmount, { $positive: isPositive, children: [
|
|
11952
11972
|
isPositive ? "+" : "-",
|
|
11953
|
-
|
|
11954
|
-
Math.abs(pnl).toFixed(2)
|
|
11973
|
+
formatCurrency5(Math.abs(pnl))
|
|
11955
11974
|
] }),
|
|
11956
11975
|
/* @__PURE__ */ jsxs(PnLPercentage, { $positive: isPositive, children: [
|
|
11957
11976
|
isPositive ? "+" : "",
|
|
@@ -12378,7 +12397,7 @@ var HoldingsQuantity = styled25.div`
|
|
|
12378
12397
|
font-weight: 500;
|
|
12379
12398
|
color: #fff;
|
|
12380
12399
|
`;
|
|
12381
|
-
styled25.div`
|
|
12400
|
+
var HoldingsAvgEntry = styled25.div`
|
|
12382
12401
|
font-size: 0.7rem;
|
|
12383
12402
|
color: var(--color-accent, #E6C87E);
|
|
12384
12403
|
font-weight: 500;
|