@loafmarkets/ui 0.1.340 → 0.1.342
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 +32 -38
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +32 -38
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -9
package/dist/index.mjs
CHANGED
|
@@ -1705,21 +1705,6 @@ function useAmountChangeFlash(ref, amount, side) {
|
|
|
1705
1705
|
prevAmountRef.current = amount;
|
|
1706
1706
|
}, [amount, ref, side]);
|
|
1707
1707
|
}
|
|
1708
|
-
function useMidPriceFlash(ref, midPrice, restBgColor) {
|
|
1709
|
-
const prevMidRef = React5.useRef(midPrice);
|
|
1710
|
-
React5.useEffect(() => {
|
|
1711
|
-
const prev = prevMidRef.current;
|
|
1712
|
-
const node = ref.current;
|
|
1713
|
-
if (prev !== midPrice && prev > 0 && midPrice > 0 && node && typeof node.animate === "function") {
|
|
1714
|
-
const color = midPrice > prev ? FLASH_UP_COLOR : FLASH_DOWN_COLOR;
|
|
1715
|
-
node.animate(
|
|
1716
|
-
[{ backgroundColor: color }, { backgroundColor: restBgColor }],
|
|
1717
|
-
{ duration: FLASH_DURATION_MS, easing: "ease-out" }
|
|
1718
|
-
);
|
|
1719
|
-
}
|
|
1720
|
-
prevMidRef.current = midPrice;
|
|
1721
|
-
}, [midPrice, ref, restBgColor]);
|
|
1722
|
-
}
|
|
1723
1708
|
function ExternalLinkIcon() {
|
|
1724
1709
|
return /* @__PURE__ */ jsx("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M1 9L9 1M9 1H4M9 1V6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
1725
1710
|
}
|
|
@@ -2063,8 +2048,6 @@ function DesktopOrderbookLayout({
|
|
|
2063
2048
|
compactLevelCount: _compactLevelCount,
|
|
2064
2049
|
fillHeight
|
|
2065
2050
|
}) {
|
|
2066
|
-
const midRef = React5.useRef(null);
|
|
2067
|
-
useMidPriceFlash(midRef, midPrice, "#0b1a24");
|
|
2068
2051
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2069
2052
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-4 pt-4", children: [
|
|
2070
2053
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
|
|
@@ -2192,7 +2175,6 @@ function DesktopOrderbookLayout({
|
|
|
2192
2175
|
/* @__PURE__ */ jsx(
|
|
2193
2176
|
"div",
|
|
2194
2177
|
{
|
|
2195
|
-
ref: midRef,
|
|
2196
2178
|
className: "flex items-center gap-2 bg-[#0b1a24] px-3 py-2 flex-shrink-0 overflow-hidden orderbook-mid-row",
|
|
2197
2179
|
children: /* @__PURE__ */ jsx("div", { className: cn("text-lg font-semibold tabular-nums whitespace-nowrap orderbook-mid-price", midClass), children: isLoading ? /* @__PURE__ */ jsx(Skeleton, { width: 110, height: 20 }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2198
2180
|
"$",
|
|
@@ -2261,8 +2243,6 @@ function MobileOrderbookLayout({
|
|
|
2261
2243
|
levelCount: _levelCount,
|
|
2262
2244
|
compactLevelCount: effectiveCompactLevels
|
|
2263
2245
|
}) {
|
|
2264
|
-
const midRef = React5.useRef(null);
|
|
2265
|
-
useMidPriceFlash(midRef, midPrice, "transparent");
|
|
2266
2246
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2267
2247
|
/* @__PURE__ */ jsx("div", { className: "px-3 pt-2", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2268
2248
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -2348,7 +2328,6 @@ function MobileOrderbookLayout({
|
|
|
2348
2328
|
/* @__PURE__ */ jsxs(
|
|
2349
2329
|
"div",
|
|
2350
2330
|
{
|
|
2351
|
-
ref: midRef,
|
|
2352
2331
|
className: "grid",
|
|
2353
2332
|
style: {
|
|
2354
2333
|
gridTemplateColumns: "1.2fr 0.8fr",
|
|
@@ -3137,7 +3116,7 @@ function PropertyMediaRow({
|
|
|
3137
3116
|
videoTitle,
|
|
3138
3117
|
className
|
|
3139
3118
|
}) {
|
|
3140
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-4 lg:flex-row lg:items-stretch lg:gap-6 lg:h-[700px]", className), children: [
|
|
3119
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-4 lg:flex-row lg:items-stretch lg:gap-6 lg:h-[480px] xl:h-[700px]", className), children: [
|
|
3141
3120
|
/* @__PURE__ */ jsx("div", { className: "lg:hidden h-[320px]", children: /* @__PURE__ */ jsx(PropertyTour, { title: videoTitle, src: videoSrc, className: "h-full w-full !max-w-none" }) }),
|
|
3142
3121
|
/* @__PURE__ */ jsx(
|
|
3143
3122
|
"div",
|
|
@@ -11415,13 +11394,9 @@ var IPOAssetSelector = styled9.div`
|
|
|
11415
11394
|
&:hover { box-shadow: 0 12px 32px rgba(0,0,0,0.4); border-color: rgba(255,255,255,0.15); }
|
|
11416
11395
|
|
|
11417
11396
|
@media (max-width: 768px) {
|
|
11418
|
-
flex-wrap:
|
|
11419
|
-
padding: 0.75rem 1rem;
|
|
11420
|
-
gap: 0.5rem;
|
|
11421
|
-
}
|
|
11422
|
-
|
|
11423
|
-
@media (max-width: 480px) {
|
|
11397
|
+
flex-wrap: nowrap;
|
|
11424
11398
|
padding: 0.6rem 0.75rem;
|
|
11399
|
+
gap: 0.4rem;
|
|
11425
11400
|
}
|
|
11426
11401
|
`;
|
|
11427
11402
|
var AssetThumbnail = styled9.img`
|
|
@@ -11500,9 +11475,9 @@ var SelectorMetrics = styled9.div`
|
|
|
11500
11475
|
var TrailingWrapper = styled9.div`
|
|
11501
11476
|
display: flex;
|
|
11502
11477
|
align-items: center;
|
|
11478
|
+
flex-shrink: 0;
|
|
11503
11479
|
|
|
11504
11480
|
@media (max-width: 768px) {
|
|
11505
|
-
width: 100%;
|
|
11506
11481
|
overflow-x: auto;
|
|
11507
11482
|
-webkit-overflow-scrolling: touch;
|
|
11508
11483
|
scrollbar-width: none;
|
|
@@ -11517,7 +11492,7 @@ var TrailingInner = styled9.div`
|
|
|
11517
11492
|
display: inline-flex;
|
|
11518
11493
|
align-items: center;
|
|
11519
11494
|
min-width: max-content;
|
|
11520
|
-
gap: 0.
|
|
11495
|
+
gap: 0.5rem;
|
|
11521
11496
|
}
|
|
11522
11497
|
`;
|
|
11523
11498
|
var MetricLabel = styled9.span`
|
|
@@ -13353,6 +13328,7 @@ function OrderConfirmationModal({
|
|
|
13353
13328
|
onConfirm();
|
|
13354
13329
|
},
|
|
13355
13330
|
disabled: isPlacing,
|
|
13331
|
+
"data-placing": isPlacing,
|
|
13356
13332
|
children: isPlacing ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13357
13333
|
/* @__PURE__ */ jsx(Spinner, { "aria-hidden": true }),
|
|
13358
13334
|
/* @__PURE__ */ jsx("span", { children: placingLabel })
|
|
@@ -13384,6 +13360,7 @@ var Modal = styled9.div`
|
|
|
13384
13360
|
max-width: 480px;
|
|
13385
13361
|
width: 90%;
|
|
13386
13362
|
box-shadow: 0 20px 60px rgba(0,0,0,0.5);
|
|
13363
|
+
overflow: hidden;
|
|
13387
13364
|
`;
|
|
13388
13365
|
var ModalHeader = styled9.div`
|
|
13389
13366
|
display: flex;
|
|
@@ -13518,6 +13495,7 @@ var BaseButton = styled9.button`
|
|
|
13518
13495
|
justify-content: center;
|
|
13519
13496
|
white-space: nowrap;
|
|
13520
13497
|
flex-shrink: 0;
|
|
13498
|
+
overflow: hidden;
|
|
13521
13499
|
&:disabled {
|
|
13522
13500
|
cursor: not-allowed;
|
|
13523
13501
|
opacity: 0.75;
|
|
@@ -13533,6 +13511,10 @@ var PrimaryButton = styled9(BaseButton)`
|
|
|
13533
13511
|
color: #fff;
|
|
13534
13512
|
border: none;
|
|
13535
13513
|
box-shadow: 0 4px 12px rgba(14,203,129,0.3);
|
|
13514
|
+
&[data-placing='true'] {
|
|
13515
|
+
font-size: 0.8rem;
|
|
13516
|
+
padding: 0.75rem 0.9rem;
|
|
13517
|
+
}
|
|
13536
13518
|
`;
|
|
13537
13519
|
|
|
13538
13520
|
// src/components/property-buy/constants.ts
|
|
@@ -14007,23 +13989,29 @@ function PortfolioActivityPanel({
|
|
|
14007
13989
|
activeTab === "subscriptions" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14008
13990
|
offeringOrders.length === 0 && /* @__PURE__ */ jsx(EmptyState, { children: "IPO allocations will appear here once you subscribe." }),
|
|
14009
13991
|
offeringOrders.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14010
|
-
/* @__PURE__ */ jsxs(GridHeader, { $columns: "1.2fr 0.8fr 1fr 1fr 0.8fr 1fr", children: [
|
|
13992
|
+
/* @__PURE__ */ jsxs(GridHeader, { $columns: "1.2fr 0.8fr 1fr 1fr 0.8fr 1fr 36px", children: [
|
|
14011
13993
|
/* @__PURE__ */ jsx(GridHeaderCell, { children: "Asset" }),
|
|
14012
13994
|
/* @__PURE__ */ jsx(GridHeaderCell, { children: "Qty" }),
|
|
14013
13995
|
/* @__PURE__ */ jsx(GridHeaderCell, { children: "Price" }),
|
|
14014
13996
|
/* @__PURE__ */ jsx(GridHeaderCell, { children: "Total" }),
|
|
14015
13997
|
/* @__PURE__ */ jsx(GridHeaderCell, { children: "Status" }),
|
|
14016
|
-
/* @__PURE__ */ jsx(GridHeaderCell, { children: "Date" })
|
|
13998
|
+
/* @__PURE__ */ jsx(GridHeaderCell, { children: "Date" }),
|
|
13999
|
+
/* @__PURE__ */ jsx(GridHeaderCell, {})
|
|
14017
14000
|
] }),
|
|
14018
14001
|
pagedOfferingOrders.map((order) => {
|
|
14019
14002
|
const meta = getOrderStatusMeta(order.status);
|
|
14020
|
-
return /* @__PURE__ */ jsxs(GridRow, { $columns: "1.2fr 0.8fr 1fr 1fr 0.8fr 1fr", children: [
|
|
14003
|
+
return /* @__PURE__ */ jsxs(GridRow, { $columns: "1.2fr 0.8fr 1fr 1fr 0.8fr 1fr 36px", children: [
|
|
14021
14004
|
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(CellText, { $primary: true, children: order.tokenName }) }),
|
|
14022
14005
|
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(CellText, { children: formatNumber2(order.quantity) }) }),
|
|
14023
14006
|
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(CellText, { $muted: true, children: formatCurrency4(order.price) }) }),
|
|
14024
14007
|
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(CellText, { children: formatCurrency4(order.price * order.quantity) }) }),
|
|
14025
14008
|
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(ActivityTag, { $color: meta.color, $bg: meta.bg, children: prettyLabel(order.status) }) }),
|
|
14026
|
-
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(CellText, { $muted: true, children: formatTimestamp(order.createdAt) }) })
|
|
14009
|
+
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(CellText, { $muted: true, children: formatTimestamp(order.createdAt) }) }),
|
|
14010
|
+
/* @__PURE__ */ jsx(GridCell, { children: order.txHash && /* @__PURE__ */ jsx(TxLink, { href: `${_blockExplorerBaseUrl}/${order.txHash}`, target: "_blank", rel: "noopener noreferrer", title: "View on BaseScan", children: /* @__PURE__ */ jsxs("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
14011
|
+
/* @__PURE__ */ jsx("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
|
|
14012
|
+
/* @__PURE__ */ jsx("polyline", { points: "15 3 21 3 21 9" }),
|
|
14013
|
+
/* @__PURE__ */ jsx("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
|
|
14014
|
+
] }) }) })
|
|
14027
14015
|
] }, `${order.tokenName}-${order.txHash}-${order.createdAt}`);
|
|
14028
14016
|
})
|
|
14029
14017
|
] })
|
|
@@ -14111,14 +14099,15 @@ function PortfolioActivityPanel({
|
|
|
14111
14099
|
activeTab === "trades" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14112
14100
|
tradeHistory.length === 0 && /* @__PURE__ */ jsx(EmptyState, { children: "Completed trades will appear here." }),
|
|
14113
14101
|
tradeHistory.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14114
|
-
/* @__PURE__ */ jsxs(GridHeader, { $columns: "1.2fr 0.6fr 0.8fr 1fr 1fr 1fr 1fr", children: [
|
|
14102
|
+
/* @__PURE__ */ jsxs(GridHeader, { $columns: "1.2fr 0.6fr 0.8fr 1fr 1fr 1fr 1fr 36px", children: [
|
|
14115
14103
|
/* @__PURE__ */ jsx(GridHeaderCell, { children: "Asset" }),
|
|
14116
14104
|
/* @__PURE__ */ jsx(GridHeaderCell, { children: "Side" }),
|
|
14117
14105
|
/* @__PURE__ */ jsx(GridHeaderCell, { children: "Qty" }),
|
|
14118
14106
|
/* @__PURE__ */ jsx(GridHeaderCell, { children: "Price" }),
|
|
14119
14107
|
/* @__PURE__ */ jsx(GridHeaderCell, { children: "Total" }),
|
|
14120
14108
|
/* @__PURE__ */ jsx(GridHeaderCell, { children: "Settlement" }),
|
|
14121
|
-
/* @__PURE__ */ jsx(GridHeaderCell, { children: "Date" })
|
|
14109
|
+
/* @__PURE__ */ jsx(GridHeaderCell, { children: "Date" }),
|
|
14110
|
+
/* @__PURE__ */ jsx(GridHeaderCell, {})
|
|
14122
14111
|
] }),
|
|
14123
14112
|
pagedTradeHistory.map((trade) => {
|
|
14124
14113
|
const s = trade.status?.toUpperCase();
|
|
@@ -14127,14 +14116,19 @@ function PortfolioActivityPanel({
|
|
|
14127
14116
|
const isSettling = !isSettled && !isFailed && !!trade.status;
|
|
14128
14117
|
const settlementLabel = isSettled ? "Settled" : isFailed ? "Settlement Failed" : isSettling ? prettyLabel(trade.status) : "\u2014";
|
|
14129
14118
|
const settlementMeta = isSettled ? { color: "#0ecb81", bg: "rgba(14,203,129,0.1)" } : isFailed ? { color: "#f6465d", bg: "rgba(246,70,93,0.12)" } : isSettling ? { color: "#f0b90b", bg: "rgba(240,185,11,0.15)" } : null;
|
|
14130
|
-
return /* @__PURE__ */ jsxs(GridRow, { $columns: "1.2fr 0.6fr 0.8fr 1fr 1fr 1fr 1fr", children: [
|
|
14119
|
+
return /* @__PURE__ */ jsxs(GridRow, { $columns: "1.2fr 0.6fr 0.8fr 1fr 1fr 1fr 1fr 36px", children: [
|
|
14131
14120
|
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(CellText, { $primary: true, children: trade.tokenName }) }),
|
|
14132
14121
|
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(SideBadge, { $side: sideLabel(trade.side), children: sideLabel(trade.side) }) }),
|
|
14133
14122
|
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(CellText, { children: formatNumber2(trade.quantity) }) }),
|
|
14134
14123
|
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(CellText, { children: formatCurrency4(trade.price) }) }),
|
|
14135
14124
|
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(CellText, { children: formatCurrency4(trade.price * trade.quantity) }) }),
|
|
14136
14125
|
/* @__PURE__ */ jsx(GridCell, { children: settlementMeta ? /* @__PURE__ */ jsx(ActivityTag, { $color: settlementMeta.color, $bg: settlementMeta.bg, children: settlementLabel }) : /* @__PURE__ */ jsx(CellText, { $muted: true, children: "\u2014" }) }),
|
|
14137
|
-
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(CellText, { $muted: true, children: formatTimestamp(trade.executedAt) }) })
|
|
14126
|
+
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(CellText, { $muted: true, children: formatTimestamp(trade.executedAt) }) }),
|
|
14127
|
+
/* @__PURE__ */ jsx(GridCell, { children: trade.txHash && /* @__PURE__ */ jsx(TxLink, { href: `${_blockExplorerBaseUrl}/${trade.txHash}`, target: "_blank", rel: "noopener noreferrer", title: "View on BaseScan", children: /* @__PURE__ */ jsxs("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
14128
|
+
/* @__PURE__ */ jsx("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
|
|
14129
|
+
/* @__PURE__ */ jsx("polyline", { points: "15 3 21 3 21 9" }),
|
|
14130
|
+
/* @__PURE__ */ jsx("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
|
|
14131
|
+
] }) }) })
|
|
14138
14132
|
] }, trade.tradeId);
|
|
14139
14133
|
})
|
|
14140
14134
|
] })
|