@loafmarkets/ui 0.1.97 → 0.1.99
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 +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +30 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1979,6 +1979,7 @@ var Orderbook = React5.forwardRef(
|
|
|
1979
1979
|
onLoafLiquidityClick,
|
|
1980
1980
|
tradeExplorerUrl,
|
|
1981
1981
|
maxLevels,
|
|
1982
|
+
fillHeight = false,
|
|
1982
1983
|
className,
|
|
1983
1984
|
...props
|
|
1984
1985
|
}, ref) => {
|
|
@@ -2079,7 +2080,8 @@ var Orderbook = React5.forwardRef(
|
|
|
2079
2080
|
tradeExplorerUrl,
|
|
2080
2081
|
onPriceClick,
|
|
2081
2082
|
levelCount: effectiveLevels,
|
|
2082
|
-
compactLevelCount: effectiveCompactLevels
|
|
2083
|
+
compactLevelCount: effectiveCompactLevels,
|
|
2084
|
+
fillHeight
|
|
2083
2085
|
};
|
|
2084
2086
|
return /* @__PURE__ */ jsx(
|
|
2085
2087
|
Card,
|
|
@@ -2088,6 +2090,7 @@ var Orderbook = React5.forwardRef(
|
|
|
2088
2090
|
className: cn(
|
|
2089
2091
|
"w-full max-w-[520px] overflow-hidden rounded-[12px] border border-white/10 bg-[#111111] text-white shadow-md flex flex-col",
|
|
2090
2092
|
isCompact && "max-w-none",
|
|
2093
|
+
fillHeight && "h-full",
|
|
2091
2094
|
className
|
|
2092
2095
|
),
|
|
2093
2096
|
...props,
|
|
@@ -2149,7 +2152,8 @@ function DesktopOrderbookLayout({
|
|
|
2149
2152
|
tradeExplorerUrl,
|
|
2150
2153
|
onPriceClick,
|
|
2151
2154
|
levelCount: effectiveLevels,
|
|
2152
|
-
compactLevelCount: _compactLevelCount
|
|
2155
|
+
compactLevelCount: _compactLevelCount,
|
|
2156
|
+
fillHeight
|
|
2153
2157
|
}) {
|
|
2154
2158
|
const midRef = React5.useRef(null);
|
|
2155
2159
|
useMidPriceFlash(midRef, midPrice, "#0b1a24");
|
|
@@ -2254,12 +2258,12 @@ function DesktopOrderbookLayout({
|
|
|
2254
2258
|
);
|
|
2255
2259
|
}) })
|
|
2256
2260
|
}
|
|
2257
|
-
) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col min-h-0 overflow-hidden", children: [
|
|
2261
|
+
) : /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col min-h-0 overflow-hidden", fillHeight && "flex-1"), children: [
|
|
2258
2262
|
/* @__PURE__ */ jsx(
|
|
2259
2263
|
"div",
|
|
2260
2264
|
{
|
|
2261
|
-
className: "flex flex-col justify-end overflow-hidden flex-shrink-0",
|
|
2262
|
-
style: { height: `${sectionHeight}px` },
|
|
2265
|
+
className: cn("flex flex-col justify-end overflow-hidden", !fillHeight && "flex-shrink-0"),
|
|
2266
|
+
style: fillHeight ? { flex: 1, minHeight: 0 } : { height: `${sectionHeight}px` },
|
|
2263
2267
|
children: isLoading ? Array.from({ length: effectiveLevels }).map((_, i) => /* @__PURE__ */ jsx(SkeletonRow, {}, `ask-skel-${i}`)) : askVisibleLevels.length === 0 ? /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center px-3 text-xs text-white/40", children: "No asks" }) : askVisibleLevels.map((l, i) => /* @__PURE__ */ jsx(
|
|
2264
2268
|
DepthRow,
|
|
2265
2269
|
{
|
|
@@ -2299,8 +2303,8 @@ function DesktopOrderbookLayout({
|
|
|
2299
2303
|
/* @__PURE__ */ jsx(
|
|
2300
2304
|
"div",
|
|
2301
2305
|
{
|
|
2302
|
-
className: "flex flex-col overflow-hidden flex-shrink-0",
|
|
2303
|
-
style: { height: `${sectionHeight}px` },
|
|
2306
|
+
className: cn("flex flex-col overflow-hidden", !fillHeight && "flex-shrink-0"),
|
|
2307
|
+
style: fillHeight ? { flex: 1, minHeight: 0 } : { height: `${sectionHeight}px` },
|
|
2304
2308
|
children: isLoading ? Array.from({ length: effectiveLevels }).map((_, i) => /* @__PURE__ */ jsx(SkeletonRow, {}, `bid-skel-${i}`)) : bidVisibleLevels.length === 0 ? /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center px-3 text-xs text-white/40", children: "No bids" }) : bidVisibleLevels.map((l, i) => /* @__PURE__ */ jsx(
|
|
2305
2309
|
DepthRow,
|
|
2306
2310
|
{
|
|
@@ -9645,7 +9649,8 @@ function AssetSelectorBar({
|
|
|
9645
9649
|
currentTokenName,
|
|
9646
9650
|
selectorItems,
|
|
9647
9651
|
onSelect,
|
|
9648
|
-
trailing
|
|
9652
|
+
trailing,
|
|
9653
|
+
imageUrl
|
|
9649
9654
|
}) {
|
|
9650
9655
|
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
|
9651
9656
|
const hasItems = selectorItems && selectorItems.length > 0;
|
|
@@ -9654,6 +9659,7 @@ function AssetSelectorBar({
|
|
|
9654
9659
|
...offeringValuation != null ? [{ label: "Offering Valuation", value: `$${offeringValuation.toLocaleString()}` }] : []
|
|
9655
9660
|
];
|
|
9656
9661
|
return /* @__PURE__ */ jsx(AssetSelectorWrapper, { children: /* @__PURE__ */ jsxs(IPOAssetSelector, { children: [
|
|
9662
|
+
imageUrl && /* @__PURE__ */ jsx(AssetThumbnail, { src: imageUrl, alt: propertyName }),
|
|
9657
9663
|
/* @__PURE__ */ jsx(AssetSelectorDropdown, { onClick: () => hasItems && setIsDropdownOpen((prev) => !prev), children: /* @__PURE__ */ jsxs(AssetName, { children: [
|
|
9658
9664
|
propertyName,
|
|
9659
9665
|
hasItems && /* @__PURE__ */ jsx(
|
|
@@ -9743,6 +9749,20 @@ var IPOAssetSelector = styled25.div`
|
|
|
9743
9749
|
padding: 0.6rem 0.75rem;
|
|
9744
9750
|
}
|
|
9745
9751
|
`;
|
|
9752
|
+
var AssetThumbnail = styled25.img`
|
|
9753
|
+
width: 40px;
|
|
9754
|
+
height: 40px;
|
|
9755
|
+
border-radius: 8px;
|
|
9756
|
+
object-fit: cover;
|
|
9757
|
+
flex-shrink: 0;
|
|
9758
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
9759
|
+
|
|
9760
|
+
@media (max-width: 768px) {
|
|
9761
|
+
width: 32px;
|
|
9762
|
+
height: 32px;
|
|
9763
|
+
border-radius: 6px;
|
|
9764
|
+
}
|
|
9765
|
+
`;
|
|
9746
9766
|
var AssetSelectorDropdown = styled25.div`
|
|
9747
9767
|
display: flex;
|
|
9748
9768
|
align-items: center;
|
|
@@ -11942,7 +11962,7 @@ function PortfolioActivityPanel({
|
|
|
11942
11962
|
] }),
|
|
11943
11963
|
/* @__PURE__ */ jsxs(HoldingsQuantity, { children: [
|
|
11944
11964
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
11945
|
-
pos.quantity
|
|
11965
|
+
formatNumber2(pos.quantity),
|
|
11946
11966
|
" ",
|
|
11947
11967
|
pos.tokenName
|
|
11948
11968
|
] }),
|
|
@@ -11954,8 +11974,7 @@ function PortfolioActivityPanel({
|
|
|
11954
11974
|
/* @__PURE__ */ jsxs(HoldingsPnL, { children: [
|
|
11955
11975
|
/* @__PURE__ */ jsxs(PnLAmount, { $positive: isPositive, children: [
|
|
11956
11976
|
isPositive ? "+" : "-",
|
|
11957
|
-
|
|
11958
|
-
Math.abs(pnl).toFixed(2)
|
|
11977
|
+
formatCurrency5(Math.abs(pnl))
|
|
11959
11978
|
] }),
|
|
11960
11979
|
/* @__PURE__ */ jsxs(PnLPercentage, { $positive: isPositive, children: [
|
|
11961
11980
|
isPositive ? "+" : "",
|