@loafmarkets/ui 0.1.431 → 0.1.432
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 +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
|
@@ -16695,6 +16695,23 @@ var sideLabel = (side) => side?.toUpperCase() === "SELL" ? "Sell" : "Buy";
|
|
|
16695
16695
|
var isLiveOrder = (o) => o.status === "OPEN" || o.status === "PARTIALLY_FILLED" || o.status === "PENDING" || o.status === "ARMED";
|
|
16696
16696
|
var isMarketType = (type) => type === "MARKET" || type.endsWith("_MARKET");
|
|
16697
16697
|
var filledLabel = (order) => order.filledQuantity == null ? "\u2014" : `${order.quantity > 0 ? Math.round(order.filledQuantity / order.quantity * 100) : 0}%`;
|
|
16698
|
+
var ReasonMarker = styled10.span`
|
|
16699
|
+
display: inline-flex;
|
|
16700
|
+
align-items: center;
|
|
16701
|
+
justify-content: center;
|
|
16702
|
+
width: 0.95rem;
|
|
16703
|
+
height: 0.95rem;
|
|
16704
|
+
margin-left: 0.3rem;
|
|
16705
|
+
border: 1px solid rgba(246, 70, 93, 0.5);
|
|
16706
|
+
border-radius: 50%;
|
|
16707
|
+
color: #f6465d;
|
|
16708
|
+
font-size: 0.6rem;
|
|
16709
|
+
font-style: italic;
|
|
16710
|
+
font-weight: 600;
|
|
16711
|
+
line-height: 1;
|
|
16712
|
+
cursor: help;
|
|
16713
|
+
flex-shrink: 0;
|
|
16714
|
+
`;
|
|
16698
16715
|
var TriggerText = styled10.span`
|
|
16699
16716
|
display: block;
|
|
16700
16717
|
font-size: 0.68rem;
|
|
@@ -17362,7 +17379,7 @@ function PortfolioActivityPanel({
|
|
|
17362
17379
|
] })
|
|
17363
17380
|
] }, `open-${order.id}`);
|
|
17364
17381
|
}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17365
|
-
/* @__PURE__ */ jsxs(GridHeader, { $columns: onCancelOrder ? "0.
|
|
17382
|
+
/* @__PURE__ */ jsxs(GridHeader, { $columns: onCancelOrder ? "0.45fr 1.05fr 0.55fr 1fr 0.8fr 1.1fr 0.7fr 0.85fr 82px" : "0.45fr 1.05fr 0.55fr 1fr 0.8fr 1.1fr 0.7fr 0.85fr", children: [
|
|
17366
17383
|
/* @__PURE__ */ jsx(GridHeaderCell, { children: "ID" }),
|
|
17367
17384
|
/* @__PURE__ */ jsx(GridHeaderCell, { children: "Asset" }),
|
|
17368
17385
|
/* @__PURE__ */ jsx(GridHeaderCell, { children: "Side" }),
|
|
@@ -17379,7 +17396,7 @@ function PortfolioActivityPanel({
|
|
|
17379
17396
|
const filledPercent = filledLabel(order);
|
|
17380
17397
|
const isCancelling = cancellingOrderId === order.id;
|
|
17381
17398
|
const sideColor = sideLabel(order.side) === "Buy" ? "#0ecb81" : "#f6465d";
|
|
17382
|
-
return /* @__PURE__ */ jsxs(GridRow, { $columns: onCancelOrder ? "0.
|
|
17399
|
+
return /* @__PURE__ */ jsxs(GridRow, { $columns: onCancelOrder ? "0.45fr 1.05fr 0.55fr 1fr 0.8fr 1.1fr 0.7fr 0.85fr 82px" : "0.45fr 1.05fr 0.55fr 1fr 0.8fr 1.1fr 0.7fr 0.85fr", children: [
|
|
17383
17400
|
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(CellText, { $muted: true, children: order.id > 0 ? `#${order.id}` : "\u2014" }) }),
|
|
17384
17401
|
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(CellText, { $primary: true, $color: sideColor, $noHoverColor: true, $clickable: !!onAssetClick, onClick: onAssetClick ? () => onAssetClick(order.tokenName) : void 0, children: order.tokenName }) }),
|
|
17385
17402
|
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(SideBadge, { $side: sideLabel(order.side), children: sideLabel(order.side) }) }),
|
|
@@ -17388,7 +17405,7 @@ function PortfolioActivityPanel({
|
|
|
17388
17405
|
formatNumber2(order.quantity),
|
|
17389
17406
|
order.ticker && /* @__PURE__ */ jsx(TickerTag, { children: order.ticker.toUpperCase() })
|
|
17390
17407
|
] }) }),
|
|
17391
|
-
/* @__PURE__ */ jsxs(GridCell, { children: [
|
|
17408
|
+
/* @__PURE__ */ jsxs(GridCell, { $stack: order.triggerPrice != null, children: [
|
|
17392
17409
|
/* @__PURE__ */ jsx(CellText, { children: isMarket || !order.price ? "Market" : formatCurrency4(order.price) }),
|
|
17393
17410
|
order.triggerPrice != null && /* @__PURE__ */ jsxs(TriggerText, { children: [
|
|
17394
17411
|
"Trigger ",
|
|
@@ -17398,7 +17415,7 @@ function PortfolioActivityPanel({
|
|
|
17398
17415
|
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(CellText, { $muted: true, children: filledPercent }) }),
|
|
17399
17416
|
/* @__PURE__ */ jsxs(GridCell, { children: [
|
|
17400
17417
|
/* @__PURE__ */ jsx(ActivityTag, { $color: meta.color, $bg: meta.bg, children: prettyLabel(order.status) }),
|
|
17401
|
-
order.triggerPrice != null && order.rejectionReason && /* @__PURE__ */ jsx(
|
|
17418
|
+
order.triggerPrice != null && order.rejectionReason && /* @__PURE__ */ jsx(ReasonMarker, { title: order.rejectionReason, "aria-label": "Why this order failed", children: "i" })
|
|
17402
17419
|
] }),
|
|
17403
17420
|
onCancelOrder && /* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(
|
|
17404
17421
|
CancelButton,
|
|
@@ -17482,7 +17499,7 @@ function PortfolioActivityPanel({
|
|
|
17482
17499
|
] }, rowKey);
|
|
17483
17500
|
}),
|
|
17484
17501
|
mergedOrderHistory.length > 0 && !compactPositions && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17485
|
-
/* @__PURE__ */ jsxs(GridHeader, { $columns: "0.
|
|
17502
|
+
/* @__PURE__ */ jsxs(GridHeader, { $columns: "0.45fr 1.05fr 0.55fr 1fr 0.8fr 1.1fr 0.7fr 0.85fr 1fr", children: [
|
|
17486
17503
|
/* @__PURE__ */ jsx(GridHeaderCell, { children: "ID" }),
|
|
17487
17504
|
/* @__PURE__ */ jsx(GridHeaderCell, { children: "Asset" }),
|
|
17488
17505
|
/* @__PURE__ */ jsx(GridHeaderCell, { children: "Side" }),
|
|
@@ -17499,7 +17516,7 @@ function PortfolioActivityPanel({
|
|
|
17499
17516
|
const filledPercent = filledLabel(order);
|
|
17500
17517
|
const typeLabel = order.isOfferingOrder ? "Initial Offering" : prettyLabel(order.type);
|
|
17501
17518
|
const sideColor = sideLabel(order.side) === "Buy" ? "#0ecb81" : "#f6465d";
|
|
17502
|
-
return /* @__PURE__ */ jsxs(GridRow, { $columns: "0.
|
|
17519
|
+
return /* @__PURE__ */ jsxs(GridRow, { $columns: "0.45fr 1.05fr 0.55fr 1fr 0.8fr 1.1fr 0.7fr 0.85fr 1fr", children: [
|
|
17503
17520
|
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(CellText, { $muted: true, children: order.id > 0 ? `#${order.id}` : "\u2014" }) }),
|
|
17504
17521
|
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(CellText, { $primary: true, $color: sideColor, $noHoverColor: true, $clickable: !!onAssetClick, onClick: onAssetClick ? () => onAssetClick(order.tokenName) : void 0, children: order.tokenName }) }),
|
|
17505
17522
|
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(SideBadge, { $side: sideLabel(order.side), children: sideLabel(order.side) }) }),
|
|
@@ -17508,7 +17525,7 @@ function PortfolioActivityPanel({
|
|
|
17508
17525
|
formatNumber2(order.quantity),
|
|
17509
17526
|
order.ticker && /* @__PURE__ */ jsx(TickerTag, { children: order.ticker.toUpperCase() })
|
|
17510
17527
|
] }) }),
|
|
17511
|
-
/* @__PURE__ */ jsxs(GridCell, { children: [
|
|
17528
|
+
/* @__PURE__ */ jsxs(GridCell, { $stack: order.triggerPrice != null, children: [
|
|
17512
17529
|
/* @__PURE__ */ jsx(CellText, { children: isMarket || !order.price ? "Market" : formatCurrency4(order.price) }),
|
|
17513
17530
|
order.triggerPrice != null && /* @__PURE__ */ jsxs(TriggerText, { children: [
|
|
17514
17531
|
"Trigger ",
|
|
@@ -17518,7 +17535,7 @@ function PortfolioActivityPanel({
|
|
|
17518
17535
|
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(CellText, { $muted: true, children: filledPercent }) }),
|
|
17519
17536
|
/* @__PURE__ */ jsxs(GridCell, { children: [
|
|
17520
17537
|
/* @__PURE__ */ jsx(ActivityTag, { $color: meta.color, $bg: meta.bg, children: prettyLabel(order.status) }),
|
|
17521
|
-
order.triggerPrice != null && order.rejectionReason && /* @__PURE__ */ jsx(
|
|
17538
|
+
order.triggerPrice != null && order.rejectionReason && /* @__PURE__ */ jsx(ReasonMarker, { title: order.rejectionReason, "aria-label": "Why this order failed", children: "i" })
|
|
17522
17539
|
] }),
|
|
17523
17540
|
/* @__PURE__ */ jsx(GridCell, { children: /* @__PURE__ */ jsx(CellText, { $muted: true, children: formatTimestamp(order.createdAt) }) })
|
|
17524
17541
|
] }, order.id);
|
|
@@ -17991,7 +18008,9 @@ var GridRow = styled10.div`
|
|
|
17991
18008
|
`;
|
|
17992
18009
|
var GridCell = styled10.div`
|
|
17993
18010
|
display: flex;
|
|
17994
|
-
align-items: center;
|
|
18011
|
+
align-items: ${(p) => p.$stack ? "flex-start" : "center"};
|
|
18012
|
+
flex-direction: ${(p) => p.$stack ? "column" : "row"};
|
|
18013
|
+
justify-content: center;
|
|
17995
18014
|
min-width: 0;
|
|
17996
18015
|
`;
|
|
17997
18016
|
var CellText = styled10.span`
|