@agg-market/ui 3.0.1 → 5.0.0
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/chart.js +18 -5
- package/dist/chart.mjs +2 -2
- package/dist/{chunk-422MCIXV.mjs → chunk-34IRJYSU.mjs} +15 -11
- package/dist/{chunk-KUWTY4EM.mjs → chunk-3W7NBJLU.mjs} +1 -1
- package/dist/chunk-4343LYSH.mjs +45 -0
- package/dist/{chunk-RKCVOKE3.mjs → chunk-CTYJVVHJ.mjs} +26 -3
- package/dist/{chunk-MVJNQN7P.mjs → chunk-DHBHKIJR.mjs} +153 -94
- package/dist/{chunk-KRQFVMJE.mjs → chunk-GFBF2J3Y.mjs} +18 -25
- package/dist/{chunk-ZJJA4I3I.mjs → chunk-KIYMVWL4.mjs} +1 -1
- package/dist/{chunk-CTVMT3VL.mjs → chunk-LCZKSITC.mjs} +2 -2
- package/dist/chunk-M4RJHRFT.mjs +445 -0
- package/dist/{chunk-KSCSYCEF.mjs → chunk-MJHKBCXQ.mjs} +1 -1
- package/dist/{chunk-GHB3GOCW.mjs → chunk-MKVGQ7AS.mjs} +17 -21
- package/dist/{chunk-BN5VVHNV.mjs → chunk-OJVTGNIF.mjs} +17 -4
- package/dist/{chunk-FF3QYU26.mjs → chunk-Q6DGDBPV.mjs} +87 -26
- package/dist/{chunk-DCORNTCY.mjs → chunk-QDMHLRDY.mjs} +31 -62
- package/dist/{chunk-RGHA4PZH.mjs → chunk-T7TATHPD.mjs} +34 -10
- package/dist/chunk-XUCS575S.mjs +65 -0
- package/dist/event-list-item-details.js +1836 -407
- package/dist/event-list-item-details.mjs +10 -6
- package/dist/event-list-item.js +448 -279
- package/dist/event-list-item.mjs +6 -3
- package/dist/event-list.js +787 -627
- package/dist/event-list.mjs +7 -4
- package/dist/event-market-page.d.mts +1 -1
- package/dist/event-market-page.d.ts +1 -1
- package/dist/event-market-page.js +2684 -2572
- package/dist/event-market-page.mjs +12 -11
- package/dist/home-page.js +804 -644
- package/dist/home-page.mjs +8 -5
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1344 -1177
- package/dist/index.mjs +23 -18
- package/dist/market-details.js +919 -757
- package/dist/market-details.mjs +9 -7
- package/dist/place-order.d.mts +1 -1
- package/dist/place-order.d.ts +1 -1
- package/dist/place-order.js +151 -189
- package/dist/place-order.mjs +2 -2
- package/dist/search.js +3 -0
- package/dist/search.mjs +2 -1
- package/dist/settlement.d.mts +1 -1
- package/dist/settlement.d.ts +1 -1
- package/dist/settlement.js +151 -189
- package/dist/settlement.mjs +2 -2
- package/dist/skeleton.js +151 -189
- package/dist/skeleton.mjs +1 -1
- package/dist/state-message.d.mts +16 -0
- package/dist/state-message.d.ts +16 -0
- package/dist/state-message.js +1629 -0
- package/dist/state-message.mjs +14 -0
- package/dist/styles.css +1 -1
- package/dist/switch-button.js +2 -2
- package/dist/switch-button.mjs +1 -1
- package/dist/tailwind.css +1 -1
- package/package.json +14 -2
- package/dist/chunk-V52WSZHQ.mjs +0 -482
- package/dist/{types-DkGlbmXq.d.mts → types-BImwqY4o.d.mts} +4 -4
- package/dist/{types-DkGlbmXq.d.ts → types-BImwqY4o.d.ts} +4 -4
package/dist/event-list-item.js
CHANGED
|
@@ -64,7 +64,7 @@ __export(item_exports, {
|
|
|
64
64
|
module.exports = __toCommonJS(item_exports);
|
|
65
65
|
var import_dayjs = __toESM(require("dayjs"));
|
|
66
66
|
var import_react = require("react");
|
|
67
|
-
var
|
|
67
|
+
var import_hooks11 = require("@agg-market/hooks");
|
|
68
68
|
|
|
69
69
|
// src/primitives/badge/index.tsx
|
|
70
70
|
var import_hooks = require("@agg-market/hooks");
|
|
@@ -1530,6 +1530,7 @@ var EventListItemSkeletonView = ({
|
|
|
1530
1530
|
isStandalone = false
|
|
1531
1531
|
}) => {
|
|
1532
1532
|
const labels = (0, import_hooks4.useLabels)();
|
|
1533
|
+
const outcomeTitleWidths = ["w-40", "w-[200px]"];
|
|
1533
1534
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
1534
1535
|
Card,
|
|
1535
1536
|
{
|
|
@@ -1539,35 +1540,23 @@ var EventListItemSkeletonView = ({
|
|
|
1539
1540
|
"aria-busy": isStandalone || void 0,
|
|
1540
1541
|
"aria-hidden": isStandalone ? void 0 : true,
|
|
1541
1542
|
children: [
|
|
1542
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex w-full items-
|
|
1543
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SkeletonBlock, { className: "
|
|
1544
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.
|
|
1545
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SkeletonBlock, { className: "h-5 w-[82%] rounded-agg-sm" }),
|
|
1546
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SkeletonBlock, { className: "h-5 w-[68%] rounded-agg-sm" })
|
|
1547
|
-
] })
|
|
1543
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex h-14 w-full items-center gap-3 justify-stretch", children: [
|
|
1544
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SkeletonBlock, { className: "size-10! rounded-agg-lg" }),
|
|
1545
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SkeletonBlock, { className: "h-6 w-fit flex-1 rounded-agg-sm" })
|
|
1548
1546
|
] }),
|
|
1549
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex flex-col gap-3", children:
|
|
1550
|
-
"
|
|
1551
|
-
{
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SkeletonBlock, { className: "h-9 w-[101px] rounded-agg-full" })
|
|
1557
|
-
]
|
|
1558
|
-
},
|
|
1559
|
-
index
|
|
1560
|
-
)) }),
|
|
1561
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center justify-between gap-2 text-agg-muted-foreground", children: [
|
|
1562
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1563
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SkeletonBlock, { className: "h-4 w-36 rounded-agg-sm" }),
|
|
1547
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex flex-col gap-3", children: outcomeTitleWidths.map((outcomeTitleWidth, index) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex w-full items-center justify-between gap-3", children: [
|
|
1548
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SkeletonBlock, { className: cn("h-5 rounded-agg-sm", outcomeTitleWidth) }),
|
|
1549
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" })
|
|
1550
|
+
] }, index)) }),
|
|
1551
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center justify-between gap-5 text-agg-muted-foreground", children: [
|
|
1552
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
1553
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SkeletonBlock, { className: "h-5 w-[100px] rounded-agg-sm" }),
|
|
1564
1554
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
1565
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SkeletonBlock, { className: "size-
|
|
1566
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SkeletonBlock, { className: "size-
|
|
1567
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SkeletonBlock, { className: "size-3 rounded-agg-full" })
|
|
1555
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SkeletonBlock, { className: "size-[14px] rounded-agg-sm" }),
|
|
1556
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SkeletonBlock, { className: "size-[14px] rounded-agg-sm" })
|
|
1568
1557
|
] })
|
|
1569
1558
|
] }),
|
|
1570
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SkeletonBlock, { className: "h-
|
|
1559
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SkeletonBlock, { className: "h-5 w-[60px] rounded-agg-sm" })
|
|
1571
1560
|
] })
|
|
1572
1561
|
]
|
|
1573
1562
|
}
|
|
@@ -1587,13 +1576,9 @@ var EventListSkeletonView = ({ className, ariaLabel }) => {
|
|
|
1587
1576
|
"aria-label": ariaLabel != null ? ariaLabel : labels.eventList.loading("events"),
|
|
1588
1577
|
"aria-busy": true,
|
|
1589
1578
|
children: [
|
|
1590
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("header", { className: "flex w-full flex-col items-start justify-between gap-
|
|
1591
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SkeletonBlock, { className: "h-7 w-
|
|
1592
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.
|
|
1593
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SkeletonBlock, { className: "h-10 w-20 rounded-agg-full" }),
|
|
1594
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SkeletonBlock, { className: "h-10 w-20 rounded-agg-full" }),
|
|
1595
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SkeletonBlock, { className: "h-10 w-24 rounded-agg-full" })
|
|
1596
|
-
] })
|
|
1579
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("header", { className: "flex w-full flex-col items-start justify-between gap-3 md:flex-row md:flex-nowrap md:items-center md:gap-5", children: [
|
|
1580
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SkeletonBlock, { className: "h-7 w-[120px] rounded-agg-md" }),
|
|
1581
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SkeletonBlock, { className: "h-8 w-full rounded-agg-md md:w-[400px]" })
|
|
1597
1582
|
] }),
|
|
1598
1583
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "grid grid-cols-1 gap-5 md:grid-cols-3", children: Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1599
1584
|
EventListItemSkeletonView,
|
|
@@ -1630,30 +1615,26 @@ var EventListItemDetailsSkeletonView = ({
|
|
|
1630
1615
|
"aria-label": ariaLabel != null ? ariaLabel : labels.eventItemDetails.loading,
|
|
1631
1616
|
"aria-busy": true,
|
|
1632
1617
|
children: [
|
|
1633
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex w-full items-
|
|
1634
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonBlock, { className: "size-10 rounded-agg-lg
|
|
1635
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.
|
|
1636
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonBlock, { className: "h-5 w-[82%] rounded-agg-sm md:h-7 md:w-[55%]" }),
|
|
1637
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex gap-2 overflow-hidden", children: [
|
|
1638
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" }),
|
|
1639
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" }),
|
|
1640
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" })
|
|
1641
|
-
] })
|
|
1642
|
-
] })
|
|
1618
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex h-14 w-full items-center gap-3 justify-stretch", children: [
|
|
1619
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonBlock, { className: "size-10! rounded-agg-lg" }),
|
|
1620
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonBlock, { className: "h-6 w-fit flex-1 rounded-agg-sm" })
|
|
1643
1621
|
] }),
|
|
1644
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col gap-4", children: [
|
|
1645
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1622
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex w-full flex-col gap-4 md:gap-6", children: [
|
|
1623
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex w-full flex-col gap-3 md:flex-row md:items-center md:justify-between", children: [
|
|
1624
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex max-w-full gap-2 overflow-hidden", children: [
|
|
1625
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" }),
|
|
1626
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" }),
|
|
1627
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" })
|
|
1628
|
+
] }),
|
|
1629
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonBlock, { className: "h-9 w-full max-w-[221px] rounded-agg-full md:w-[221px]" })
|
|
1630
|
+
] }),
|
|
1631
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex w-full flex-col gap-3", children: [
|
|
1632
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonBlock, { className: "h-[220px] w-full rounded-agg-xl md:h-[240px]" }),
|
|
1633
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
1634
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonBlock, { className: "h-5 w-[59px] rounded-agg-sm" }),
|
|
1635
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonBlock, { className: "h-5 w-40 rounded-agg-sm" })
|
|
1636
|
+
] })
|
|
1651
1637
|
] })
|
|
1652
|
-
] }),
|
|
1653
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "h-[300px] w-full rounded-agg-xl", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonBlock, { className: "h-full w-full rounded-agg-xl" }) }),
|
|
1654
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
1655
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" }),
|
|
1656
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonBlock, { className: "h-5 w-40 rounded-agg-sm" })
|
|
1657
1638
|
] })
|
|
1658
1639
|
]
|
|
1659
1640
|
}
|
|
@@ -1669,6 +1650,77 @@ var marketDetailsBaseCardClassName = "w-full overflow-hidden rounded-agg-lg bord
|
|
|
1669
1650
|
|
|
1670
1651
|
// src/primitives/skeleton/views/market-details-skeleton-view.tsx
|
|
1671
1652
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
1653
|
+
var orderBookAskBarWidths = [
|
|
1654
|
+
"w-[52px] md:w-[240px]",
|
|
1655
|
+
"w-[48px] md:w-[200px]",
|
|
1656
|
+
"w-[40px] md:w-[120px]",
|
|
1657
|
+
"w-[36px] md:w-[60px]"
|
|
1658
|
+
];
|
|
1659
|
+
var orderBookBidBarWidths = [
|
|
1660
|
+
"w-[36px] md:w-[60px]",
|
|
1661
|
+
"w-[40px] md:w-[120px]",
|
|
1662
|
+
"w-[48px] md:w-[200px]",
|
|
1663
|
+
"w-[52px] md:w-[240px]"
|
|
1664
|
+
];
|
|
1665
|
+
var MarketDetailsHeaderSkeleton = () => {
|
|
1666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-wrap items-center justify-between gap-3 px-4 py-3 md:px-5", children: [
|
|
1667
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex min-w-0 items-center gap-3 md:min-w-52 md:gap-4", children: [
|
|
1668
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "size-12 rounded-agg-lg md:size-[60px]" }),
|
|
1669
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex min-w-0 flex-col gap-2", children: [
|
|
1670
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-6 w-[132px] rounded-agg-sm" }),
|
|
1671
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-4 w-[141px] rounded-agg-sm" })
|
|
1672
|
+
] })
|
|
1673
|
+
] }),
|
|
1674
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-9 w-[60px] rounded-agg-md" }),
|
|
1675
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex w-full gap-2 md:w-auto", children: [
|
|
1676
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-9 w-full rounded-agg-full md:w-[135px]" }),
|
|
1677
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-9 w-full rounded-agg-full md:w-[131px]" })
|
|
1678
|
+
] })
|
|
1679
|
+
] });
|
|
1680
|
+
};
|
|
1681
|
+
var MarketDetailsTabsSkeleton = () => {
|
|
1682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex h-14 items-end px-4 md:px-5", children: [
|
|
1683
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex h-full flex-col items-end justify-end rounded-t-agg-lg", children: [
|
|
1684
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-6 w-20 rounded-agg-sm" }) }),
|
|
1685
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-[3px] w-full rounded-t-agg-sm" })
|
|
1686
|
+
] }),
|
|
1687
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex h-full flex-col justify-center", children: [
|
|
1688
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-6 w-12 rounded-agg-sm" }) }),
|
|
1689
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "h-[3px] w-full" })
|
|
1690
|
+
] })
|
|
1691
|
+
] });
|
|
1692
|
+
};
|
|
1693
|
+
var MarketDetailsOrderBookRows = ({
|
|
1694
|
+
side,
|
|
1695
|
+
barWidths
|
|
1696
|
+
}) => {
|
|
1697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex flex-col gap-2", children: barWidths.map((barWidthClassName, index) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1698
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2 md:grid-cols-[88px_1fr_1fr_minmax(120px,220px)] md:gap-6", children: [
|
|
1699
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-1 md:gap-3", children: [
|
|
1700
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-sm" }),
|
|
1701
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-5 w-[60px] rounded-agg-sm" })
|
|
1702
|
+
] }),
|
|
1703
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-5 rounded-agg-sm" }),
|
|
1704
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-5 rounded-agg-sm" }),
|
|
1705
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: cn("h-2 rounded-agg-full", barWidthClassName) }) })
|
|
1706
|
+
] }),
|
|
1707
|
+
index < barWidths.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "h-px w-full bg-agg-separator" }) : null
|
|
1708
|
+
] }, `${side}-row-${index}`)) });
|
|
1709
|
+
};
|
|
1710
|
+
var MarketDetailsOderbookSkeleton = ({
|
|
1711
|
+
className
|
|
1712
|
+
}) => {
|
|
1713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: cn("flex flex-col gap-5", className), children: [
|
|
1714
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1715
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-4 w-10 rounded-agg-sm" }),
|
|
1716
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(MarketDetailsOrderBookRows, { side: "ask", barWidths: orderBookAskBarWidths })
|
|
1717
|
+
] }),
|
|
1718
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1719
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-4 w-10 rounded-agg-sm" }),
|
|
1720
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(MarketDetailsOrderBookRows, { side: "bid", barWidths: orderBookBidBarWidths })
|
|
1721
|
+
] })
|
|
1722
|
+
] });
|
|
1723
|
+
};
|
|
1672
1724
|
var MarketDetailsSkeletonView = ({
|
|
1673
1725
|
className,
|
|
1674
1726
|
ariaLabel,
|
|
@@ -1683,60 +1735,12 @@ var MarketDetailsSkeletonView = ({
|
|
|
1683
1735
|
"aria-label": ariaLabel != null ? ariaLabel : labels.marketDetails.loading,
|
|
1684
1736
|
"aria-busy": true,
|
|
1685
1737
|
children: [
|
|
1686
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.
|
|
1687
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
1688
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex min-w-0 items-center gap-3 md:gap-4", children: [
|
|
1689
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "size-12 rounded-agg-lg md:size-[60px]" }),
|
|
1690
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex min-w-0 flex-col gap-2", children: [
|
|
1691
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-6 w-40 rounded-agg-sm" }),
|
|
1692
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-4 w-28 rounded-agg-sm" })
|
|
1693
|
-
] })
|
|
1694
|
-
] }),
|
|
1695
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-8 w-16 rounded-agg-sm" })
|
|
1696
|
-
] }),
|
|
1697
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex gap-2", children: [
|
|
1698
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-10 flex-1 rounded-agg-full" }),
|
|
1699
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-10 flex-1 rounded-agg-full" })
|
|
1700
|
-
] })
|
|
1701
|
-
] }),
|
|
1738
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(MarketDetailsHeaderSkeleton, {}),
|
|
1702
1739
|
isDetailed ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
1703
1740
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
|
|
1704
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
1741
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(MarketDetailsTabsSkeleton, {}),
|
|
1705
1742
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
|
|
1706
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.
|
|
1707
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
1708
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-4 w-12 rounded-agg-sm" }),
|
|
1709
|
-
[0, 1, 2, 3].map((index) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
1710
|
-
"div",
|
|
1711
|
-
{
|
|
1712
|
-
className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2",
|
|
1713
|
-
children: [
|
|
1714
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
|
|
1715
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
|
|
1716
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
|
|
1717
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-2 rounded-agg-full" })
|
|
1718
|
-
]
|
|
1719
|
-
},
|
|
1720
|
-
`ask-${index}`
|
|
1721
|
-
))
|
|
1722
|
-
] }),
|
|
1723
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
1724
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-4 w-12 rounded-agg-sm" }),
|
|
1725
|
-
[0, 1, 2, 3].map((index) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
1726
|
-
"div",
|
|
1727
|
-
{
|
|
1728
|
-
className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2",
|
|
1729
|
-
children: [
|
|
1730
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
|
|
1731
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
|
|
1732
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
|
|
1733
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SkeletonBlock, { className: "h-2 rounded-agg-full" })
|
|
1734
|
-
]
|
|
1735
|
-
},
|
|
1736
|
-
`bid-${index}`
|
|
1737
|
-
))
|
|
1738
|
-
] })
|
|
1739
|
-
] })
|
|
1743
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(MarketDetailsOderbookSkeleton, { className: "p-5" })
|
|
1740
1744
|
] }) : null
|
|
1741
1745
|
]
|
|
1742
1746
|
}
|
|
@@ -1747,65 +1751,46 @@ MarketDetailsSkeletonView.displayName = "MarketDetailsSkeletonView";
|
|
|
1747
1751
|
// src/primitives/skeleton/views/place-order-skeleton-view.tsx
|
|
1748
1752
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
1749
1753
|
var placeOrderCardClassName = "overflow-hidden rounded-agg-xl border border-agg-border bg-agg-secondary shadow-none hover:shadow-none";
|
|
1754
|
+
var TabsSkeletonBar = () => {
|
|
1755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex w-full items-end border-b border-agg-border", children: [
|
|
1756
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col rounded-t-agg-lg", children: [
|
|
1757
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "px-5 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-6 w-10 rounded-agg-sm" }) }),
|
|
1758
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-[3px] w-full rounded-t-agg-sm" })
|
|
1759
|
+
] }),
|
|
1760
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col", children: [
|
|
1761
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "px-5 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-6 w-10 rounded-agg-sm" }) }),
|
|
1762
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "h-[3px] w-full" })
|
|
1763
|
+
] })
|
|
1764
|
+
] });
|
|
1765
|
+
};
|
|
1750
1766
|
var ContentBody = () => {
|
|
1751
1767
|
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: cn("flex flex-col gap-6 p-5"), children: [
|
|
1752
1768
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1753
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex
|
|
1754
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.
|
|
1755
|
-
|
|
1756
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
] })
|
|
1760
|
-
] }),
|
|
1761
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-6 w-6 rounded-agg-sm" })
|
|
1769
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
1770
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "size-12 shrink-0 rounded-agg-lg" }),
|
|
1771
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
|
|
1772
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-4 w-[92%] max-w-[240px] rounded-agg-sm" }),
|
|
1773
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-4 w-[64%] max-w-[160px] rounded-agg-sm" })
|
|
1774
|
+
] })
|
|
1762
1775
|
] }),
|
|
1763
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-
|
|
1776
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-6 w-[92px] rounded-agg-sm" }),
|
|
1777
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TabsSkeletonBar, {})
|
|
1764
1778
|
] }),
|
|
1765
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex h-11 items-end border-b border-agg-separator", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-8", children: [
|
|
1766
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1767
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" }),
|
|
1768
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-[3px] w-12 rounded-t-agg-sm" })
|
|
1769
|
-
] }),
|
|
1770
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" })
|
|
1771
|
-
] }) }),
|
|
1772
1779
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col gap-4", children: [
|
|
1773
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex gap-2", children: [
|
|
1780
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex w-full gap-2", children: [
|
|
1774
1781
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-11 flex-1 rounded-agg-full" }),
|
|
1775
1782
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-11 flex-1 rounded-agg-full" })
|
|
1776
1783
|
] }),
|
|
1777
1784
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
1778
1785
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1779
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-
|
|
1780
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-4 w-
|
|
1786
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-5 w-[63px] rounded-agg-sm" }),
|
|
1787
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-4 w-[118px] rounded-agg-sm" })
|
|
1781
1788
|
] }),
|
|
1782
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
1789
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: cn("text-agg-3xl font-agg-bold leading-agg-9 text-agg-separator"), children: "$0" })
|
|
1783
1790
|
] })
|
|
1784
1791
|
] }),
|
|
1785
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.
|
|
1786
|
-
|
|
1787
|
-
[0, 1].map((index) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
1788
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
1789
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1790
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-full" }),
|
|
1791
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" })
|
|
1792
|
-
] }),
|
|
1793
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" })
|
|
1794
|
-
] }),
|
|
1795
|
-
index === 0 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "h-px w-full bg-agg-trade-highlight-border" }) : null
|
|
1796
|
-
] }, `place-order-route-${index}`)),
|
|
1797
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "mx-auto h-5 w-40 rounded-agg-sm" })
|
|
1798
|
-
] }) }),
|
|
1799
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-4 w-36 rounded-agg-sm" })
|
|
1800
|
-
] }),
|
|
1801
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
1802
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1803
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-6 w-20 rounded-agg-sm" }),
|
|
1804
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-4 w-24 rounded-agg-sm" })
|
|
1805
|
-
] }),
|
|
1806
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-9 w-36 rounded-agg-sm" })
|
|
1807
|
-
] }),
|
|
1808
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-4 w-[88%] self-center rounded-agg-sm" })
|
|
1792
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-12 w-full rounded-agg-full" }),
|
|
1793
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-4 w-full max-w-[240px] self-center rounded-agg-sm" })
|
|
1809
1794
|
] });
|
|
1810
1795
|
};
|
|
1811
1796
|
var PlaceOrderSkeletonView = ({
|
|
@@ -1819,19 +1804,7 @@ var PlaceOrderSkeletonView = ({
|
|
|
1819
1804
|
role: "status",
|
|
1820
1805
|
"aria-label": ariaLabel != null ? ariaLabel : "Loading place order",
|
|
1821
1806
|
"aria-busy": true,
|
|
1822
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex w-full items-end justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime50.
|
|
1823
|
-
Card,
|
|
1824
|
-
{
|
|
1825
|
-
className: cn(
|
|
1826
|
-
placeOrderCardClassName,
|
|
1827
|
-
"w-full max-w-[400px] rounded-t-agg-xl rounded-b-none border-b-0"
|
|
1828
|
-
),
|
|
1829
|
-
children: [
|
|
1830
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ContentBody, {}),
|
|
1831
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "border-t border-agg-separator bg-agg-secondary p-4", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SkeletonBlock, { className: "h-12 w-full rounded-agg-full" }) })
|
|
1832
|
-
]
|
|
1833
|
-
}
|
|
1834
|
-
) })
|
|
1807
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex w-full items-end justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Card, { className: cn(placeOrderCardClassName, "w-full"), children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ContentBody, {}) }) })
|
|
1835
1808
|
}
|
|
1836
1809
|
);
|
|
1837
1810
|
};
|
|
@@ -1857,38 +1830,27 @@ var SettlementSkeletonView = ({
|
|
|
1857
1830
|
"aria-label": ariaLabel != null ? ariaLabel : labels.trading.settlementLoading,
|
|
1858
1831
|
"aria-busy": true,
|
|
1859
1832
|
children: [
|
|
1860
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex
|
|
1861
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "h-4 w-
|
|
1862
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "h-5 w-full max-w-
|
|
1833
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex w-full items-center justify-between gap-4", children: [
|
|
1834
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "h-4 w-[81px] rounded-agg-sm" }),
|
|
1835
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "h-5 w-full max-w-[240px] rounded-agg-sm" })
|
|
1863
1836
|
] }),
|
|
1864
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex flex-col gap-
|
|
1865
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "h-5 w-
|
|
1837
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex w-full flex-col gap-3", children: [
|
|
1838
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "h-5 w-[200px] rounded-agg-sm" }),
|
|
1866
1839
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1867
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "h-4 w-[
|
|
1868
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "h-4 w-[
|
|
1869
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "h-4 w-[80%] rounded-agg-sm" }),
|
|
1870
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "h-4 w-[74%] rounded-agg-sm" })
|
|
1840
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "h-4 w-full max-w-[320px] rounded-agg-sm" }),
|
|
1841
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "h-4 w-full max-w-[280px] rounded-agg-sm" })
|
|
1871
1842
|
] })
|
|
1872
1843
|
] }),
|
|
1873
1844
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
|
|
1874
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
1875
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex
|
|
1876
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.
|
|
1877
|
-
|
|
1878
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" }),
|
|
1879
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "h-4 w-4 rounded-agg-sm" })
|
|
1880
|
-
] }),
|
|
1881
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex flex-col gap-2 pl-6", children: [
|
|
1882
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "h-4 w-full rounded-agg-sm" }),
|
|
1883
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "h-4 w-[92%] rounded-agg-sm" }),
|
|
1884
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "h-4 w-[34%] rounded-agg-sm" })
|
|
1885
|
-
] })
|
|
1845
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex w-full flex-col gap-3", children: [
|
|
1846
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1847
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-sm" }),
|
|
1848
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "h-5 w-[100px] rounded-agg-sm" })
|
|
1886
1849
|
] }),
|
|
1887
|
-
|
|
1888
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-
|
|
1889
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "h-5 w-
|
|
1890
|
-
|
|
1891
|
-
] }, `settlement-venue-${index}`))
|
|
1850
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1851
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-sm" }),
|
|
1852
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SkeletonBlock, { className: "h-5 w-[60px] rounded-agg-sm" })
|
|
1853
|
+
] })
|
|
1892
1854
|
] })
|
|
1893
1855
|
]
|
|
1894
1856
|
}
|
|
@@ -1932,6 +1894,151 @@ var Skeleton = ({ view, className, ariaLabel }) => {
|
|
|
1932
1894
|
};
|
|
1933
1895
|
Skeleton.displayName = "Skeleton";
|
|
1934
1896
|
|
|
1897
|
+
// src/primitives/button/index.tsx
|
|
1898
|
+
var import_hooks9 = require("@agg-market/hooks");
|
|
1899
|
+
|
|
1900
|
+
// src/primitives/button/button.constants.ts
|
|
1901
|
+
var sizeClasses = {
|
|
1902
|
+
small: cn("h-8 px-4 gap-1.5", "text-agg-sm leading-agg-5"),
|
|
1903
|
+
medium: cn("h-9 px-5 gap-1.5", "text-agg-sm leading-agg-5"),
|
|
1904
|
+
large: cn("h-10 px-6 gap-2", "text-agg-base leading-agg-6")
|
|
1905
|
+
};
|
|
1906
|
+
var iconSizeClasses2 = {
|
|
1907
|
+
small: iconSizeClasses.small,
|
|
1908
|
+
medium: iconSizeClasses.small,
|
|
1909
|
+
large: iconSizeClasses.small
|
|
1910
|
+
};
|
|
1911
|
+
var iconSlotClasses = {
|
|
1912
|
+
small: "[&_svg]:h-4 [&_svg]:w-4",
|
|
1913
|
+
medium: "[&_svg]:h-4 [&_svg]:w-4",
|
|
1914
|
+
large: "[&_svg]:h-4 [&_svg]:w-4"
|
|
1915
|
+
};
|
|
1916
|
+
var variantClasses = {
|
|
1917
|
+
primary: cn(
|
|
1918
|
+
"bg-agg-primary text-agg-on-primary",
|
|
1919
|
+
"hover:bg-agg-primary-hover",
|
|
1920
|
+
"disabled:bg-agg-separator disabled:text-agg-on-primary",
|
|
1921
|
+
"focus-visible:ring-agg-primary-hover"
|
|
1922
|
+
),
|
|
1923
|
+
secondary: cn(
|
|
1924
|
+
"border border-agg-separator bg-agg-secondary text-agg-foreground",
|
|
1925
|
+
"hover:bg-agg-secondary-hover",
|
|
1926
|
+
"disabled:bg-agg-secondary disabled:text-agg-muted-foreground disabled:border-agg-separator",
|
|
1927
|
+
"focus-visible:ring-agg-separator"
|
|
1928
|
+
),
|
|
1929
|
+
tertiary: cn(
|
|
1930
|
+
"bg-transparent text-agg-primary",
|
|
1931
|
+
"hover:text-agg-primary-hover",
|
|
1932
|
+
"disabled:bg-transparent disabled:text-agg-muted-foreground",
|
|
1933
|
+
"focus-visible:ring-agg-separator",
|
|
1934
|
+
"px-0! py-0! h-fit!"
|
|
1935
|
+
)
|
|
1936
|
+
};
|
|
1937
|
+
var baseButtonClasses = cn(
|
|
1938
|
+
"cursor-pointer disabled:cursor-not-allowed",
|
|
1939
|
+
"inline-flex items-center justify-center rounded-agg-full font-agg-sans font-agg-bold text-center",
|
|
1940
|
+
"whitespace-nowrap",
|
|
1941
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-agg-secondary"
|
|
1942
|
+
);
|
|
1943
|
+
|
|
1944
|
+
// src/primitives/button/index.tsx
|
|
1945
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
1946
|
+
var Button = (_a) => {
|
|
1947
|
+
var _b = _a, {
|
|
1948
|
+
children,
|
|
1949
|
+
variant = "primary",
|
|
1950
|
+
size = "medium",
|
|
1951
|
+
isLoading = false,
|
|
1952
|
+
disabled,
|
|
1953
|
+
prefix,
|
|
1954
|
+
suffix,
|
|
1955
|
+
type = "button",
|
|
1956
|
+
className,
|
|
1957
|
+
"aria-label": ariaLabel
|
|
1958
|
+
} = _b, other = __objRest(_b, [
|
|
1959
|
+
"children",
|
|
1960
|
+
"variant",
|
|
1961
|
+
"size",
|
|
1962
|
+
"isLoading",
|
|
1963
|
+
"disabled",
|
|
1964
|
+
"prefix",
|
|
1965
|
+
"suffix",
|
|
1966
|
+
"type",
|
|
1967
|
+
"className",
|
|
1968
|
+
"aria-label"
|
|
1969
|
+
]);
|
|
1970
|
+
const { enableAnimations } = (0, import_hooks9.useSdkUiConfig)();
|
|
1971
|
+
const isDisabled = disabled || isLoading;
|
|
1972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
1973
|
+
"button",
|
|
1974
|
+
__spreadProps(__spreadValues({
|
|
1975
|
+
type,
|
|
1976
|
+
className: cn(
|
|
1977
|
+
"group/agg-button",
|
|
1978
|
+
baseButtonClasses,
|
|
1979
|
+
getMotionClassName(enableAnimations, "transition-colors duration-200 ease-in-out"),
|
|
1980
|
+
sizeClasses[size],
|
|
1981
|
+
iconSlotClasses[size],
|
|
1982
|
+
variantClasses[variant],
|
|
1983
|
+
className
|
|
1984
|
+
),
|
|
1985
|
+
disabled: isDisabled,
|
|
1986
|
+
"aria-busy": isLoading,
|
|
1987
|
+
"aria-label": ariaLabel
|
|
1988
|
+
}, other), {
|
|
1989
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
1990
|
+
"span",
|
|
1991
|
+
{
|
|
1992
|
+
className: cn(
|
|
1993
|
+
"inline-block rounded-agg-full border-2 border-current border-r-transparent",
|
|
1994
|
+
getMotionClassName(enableAnimations, "animate-spin"),
|
|
1995
|
+
iconSizeClasses2[size]
|
|
1996
|
+
),
|
|
1997
|
+
"aria-hidden": "true"
|
|
1998
|
+
}
|
|
1999
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
|
|
2000
|
+
prefix != null ? prefix : null,
|
|
2001
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children }),
|
|
2002
|
+
suffix != null ? suffix : null
|
|
2003
|
+
] })
|
|
2004
|
+
})
|
|
2005
|
+
);
|
|
2006
|
+
};
|
|
2007
|
+
Button.displayName = "Button";
|
|
2008
|
+
|
|
2009
|
+
// src/primitives/search/search-empty-icon.tsx
|
|
2010
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2011
|
+
var SearchEmptyIcon = (_a) => {
|
|
2012
|
+
var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
|
|
2013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
2014
|
+
"svg",
|
|
2015
|
+
__spreadProps(__spreadValues(__spreadValues({
|
|
2016
|
+
viewBox: "0 0 40 40",
|
|
2017
|
+
fill: "none",
|
|
2018
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2019
|
+
className
|
|
2020
|
+
}, getIconA11yProps(title)), props), {
|
|
2021
|
+
children: [
|
|
2022
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("title", { children: title }) : null,
|
|
2023
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("circle", { cx: "19.9987", cy: "20.0013", r: "9.2", stroke: "currentColor", strokeWidth: "1.6" }),
|
|
2024
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2025
|
+
"ellipse",
|
|
2026
|
+
{
|
|
2027
|
+
cx: "19.9987",
|
|
2028
|
+
cy: "20.0012",
|
|
2029
|
+
rx: "17.2",
|
|
2030
|
+
ry: "6.6",
|
|
2031
|
+
transform: "rotate(-35 19.9987 20.0012)",
|
|
2032
|
+
stroke: "currentColor",
|
|
2033
|
+
strokeWidth: "1.6"
|
|
2034
|
+
}
|
|
2035
|
+
)
|
|
2036
|
+
]
|
|
2037
|
+
})
|
|
2038
|
+
);
|
|
2039
|
+
};
|
|
2040
|
+
SearchEmptyIcon.displayName = "SearchEmptyIcon";
|
|
2041
|
+
|
|
1935
2042
|
// src/primitives/typography/typography.constants.ts
|
|
1936
2043
|
var typographyVariantClasses = {
|
|
1937
2044
|
display: cn("agg-type-display"),
|
|
@@ -1952,14 +2059,14 @@ var typographyVariantClasses = {
|
|
|
1952
2059
|
};
|
|
1953
2060
|
|
|
1954
2061
|
// src/primitives/typography/index.tsx
|
|
1955
|
-
var
|
|
2062
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
1956
2063
|
var Typography = ({
|
|
1957
2064
|
as: Component = "p",
|
|
1958
2065
|
variant = "body",
|
|
1959
2066
|
className,
|
|
1960
2067
|
children
|
|
1961
2068
|
}) => {
|
|
1962
|
-
return /* @__PURE__ */ (0,
|
|
2069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
1963
2070
|
Component,
|
|
1964
2071
|
{
|
|
1965
2072
|
className: cn(
|
|
@@ -1974,8 +2081,54 @@ var Typography = ({
|
|
|
1974
2081
|
};
|
|
1975
2082
|
Typography.displayName = "Typography";
|
|
1976
2083
|
|
|
2084
|
+
// src/primitives/state-message/index.tsx
|
|
2085
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2086
|
+
var iconClassName = "h-9 w-9 text-agg-muted-foreground";
|
|
2087
|
+
var StateMessage = ({
|
|
2088
|
+
ariaLabel,
|
|
2089
|
+
tone = "empty",
|
|
2090
|
+
title,
|
|
2091
|
+
description,
|
|
2092
|
+
actionLabel,
|
|
2093
|
+
onAction,
|
|
2094
|
+
className
|
|
2095
|
+
}) => {
|
|
2096
|
+
const icon = tone === "warning" ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(WarningIcon, { className: iconClassName, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SearchEmptyIcon, { className: iconClassName, "aria-hidden": true });
|
|
2097
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2098
|
+
"div",
|
|
2099
|
+
{
|
|
2100
|
+
className: cn(
|
|
2101
|
+
"flex min-h-[240px] w-full flex-col items-center justify-center px-5 py-10 text-center md:px-10",
|
|
2102
|
+
className
|
|
2103
|
+
),
|
|
2104
|
+
role: "status",
|
|
2105
|
+
"aria-live": "polite",
|
|
2106
|
+
"aria-label": ariaLabel,
|
|
2107
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex max-w-[360px] flex-col items-center gap-6", children: [
|
|
2108
|
+
icon,
|
|
2109
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-col items-center gap-2", children: [
|
|
2110
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Typography, { variant: "body-large-strong", children: title }),
|
|
2111
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Typography, { variant: "body", className: "whitespace-pre-line text-agg-muted-foreground", children: description }) : null
|
|
2112
|
+
] }),
|
|
2113
|
+
actionLabel && onAction ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2114
|
+
Button,
|
|
2115
|
+
{
|
|
2116
|
+
variant: "tertiary",
|
|
2117
|
+
size: "large",
|
|
2118
|
+
className: "text-agg-base leading-agg-6",
|
|
2119
|
+
"aria-label": actionLabel,
|
|
2120
|
+
onClick: onAction,
|
|
2121
|
+
children: actionLabel
|
|
2122
|
+
}
|
|
2123
|
+
) : null
|
|
2124
|
+
] })
|
|
2125
|
+
}
|
|
2126
|
+
);
|
|
2127
|
+
};
|
|
2128
|
+
StateMessage.displayName = "StateMessage";
|
|
2129
|
+
|
|
1977
2130
|
// src/primitives/venue-logo/index.tsx
|
|
1978
|
-
var
|
|
2131
|
+
var import_hooks10 = require("@agg-market/hooks");
|
|
1979
2132
|
|
|
1980
2133
|
// src/primitives/venue-logo/logo-props.ts
|
|
1981
2134
|
var DEFAULT_MONOCHROME_COLOR = "currentColor";
|
|
@@ -1992,7 +2145,7 @@ var resolveLogoPrimaryColor = ({
|
|
|
1992
2145
|
};
|
|
1993
2146
|
|
|
1994
2147
|
// src/primitives/venue-logo/svg/logo-kalshi.tsx
|
|
1995
|
-
var
|
|
2148
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
1996
2149
|
var KALSHI_GREEN = "#18C590";
|
|
1997
2150
|
var LogoKalshiIcon = (_a) => {
|
|
1998
2151
|
var _b = _a, {
|
|
@@ -2011,7 +2164,7 @@ var LogoKalshiIcon = (_a) => {
|
|
|
2011
2164
|
isColor,
|
|
2012
2165
|
color
|
|
2013
2166
|
});
|
|
2014
|
-
return /* @__PURE__ */ (0,
|
|
2167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
2015
2168
|
"svg",
|
|
2016
2169
|
__spreadProps(__spreadValues(__spreadValues({
|
|
2017
2170
|
viewBox: "0 0 100 100",
|
|
@@ -2019,8 +2172,8 @@ var LogoKalshiIcon = (_a) => {
|
|
|
2019
2172
|
fill: "none"
|
|
2020
2173
|
}, getIconA11yProps(title)), props), {
|
|
2021
2174
|
children: [
|
|
2022
|
-
title ? /* @__PURE__ */ (0,
|
|
2023
|
-
/* @__PURE__ */ (0,
|
|
2175
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("title", { children: title }) : null,
|
|
2176
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
2024
2177
|
"path",
|
|
2025
2178
|
{
|
|
2026
2179
|
d: "M54.9798 47.579L79.4249 85.9995H58.2273L38.2531 52.9344V85.9995H20.4189V13.9995H38.2531V45.4356L59.6547 13.9995H78.7119L54.9798 47.579Z",
|
|
@@ -2034,7 +2187,7 @@ var LogoKalshiIcon = (_a) => {
|
|
|
2034
2187
|
LogoKalshiIcon.displayName = "LogoKalshiIcon";
|
|
2035
2188
|
|
|
2036
2189
|
// src/primitives/venue-logo/svg/logo-opinion.tsx
|
|
2037
|
-
var
|
|
2190
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
2038
2191
|
var OPINION_BLACK = "#000000";
|
|
2039
2192
|
var LogoOpinionIcon = (_a) => {
|
|
2040
2193
|
var _b = _a, {
|
|
@@ -2053,7 +2206,7 @@ var LogoOpinionIcon = (_a) => {
|
|
|
2053
2206
|
isColor,
|
|
2054
2207
|
color
|
|
2055
2208
|
});
|
|
2056
|
-
return /* @__PURE__ */ (0,
|
|
2209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
2057
2210
|
"svg",
|
|
2058
2211
|
__spreadProps(__spreadValues(__spreadValues({
|
|
2059
2212
|
viewBox: "0 0 100 100",
|
|
@@ -2061,8 +2214,8 @@ var LogoOpinionIcon = (_a) => {
|
|
|
2061
2214
|
fill: "none"
|
|
2062
2215
|
}, getIconA11yProps(title)), props), {
|
|
2063
2216
|
children: [
|
|
2064
|
-
title ? /* @__PURE__ */ (0,
|
|
2065
|
-
/* @__PURE__ */ (0,
|
|
2217
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("title", { children: title }) : null,
|
|
2218
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2066
2219
|
"path",
|
|
2067
2220
|
{
|
|
2068
2221
|
d: "M51.8239 68.4603L56.9659 68.0094L58.8049 89.0576C61.1459 88.5314 63.4349 87.7952 65.6437 86.8578V68.1879H71.9955V83.4385C74.6496 81.6828 77.0863 79.619 79.2548 77.2898L80.0716 67.958L85.516 68.433C88.6185 62.4381 90.156 55.7558 89.9858 49.0072C89.8154 42.2584 87.9429 35.6623 84.542 29.8316L84.3394 32.1494L77.9876 31.5927L78.8042 22.2668C76.7468 20.1288 74.4594 18.225 71.9835 16.5902V31.9164H65.6317V13.1739C62.9224 12.0205 60.0929 11.173 57.1957 10.6473L59.0317 31.6441L53.8897 32.0949L51.9599 10.0482C51.3128 10.0179 50.6593 9.99976 50.006 9.99976C47.4581 9.99976 44.9161 10.2419 42.414 10.723L46.0438 31.3899L42.1297 32.0798L38.5304 11.6701C35.1755 12.6725 31.9677 14.1143 28.9905 15.9578L33.0435 31.0873L29.9705 31.9134L26.2018 17.8369C23.2938 19.9923 20.6902 22.5308 18.4615 25.3835L20.4246 30.7787L18.1833 31.5956L16.7707 27.7134C14.5111 31.0771 12.7772 34.7657 11.6287 38.652L12.2639 38.4221L20.4306 60.8471L18.1893 61.6641L10.8877 41.5963C9.21542 49.4012 9.91256 57.528 12.8896 64.9338C15.8667 72.3395 20.9879 78.6865 27.5961 83.1601L23.8031 68.9989L26.8762 68.1728L31.5162 85.4991C34.6952 87.1593 38.0844 88.3808 41.5914 89.1303L38.0132 68.7296L41.9301 68.0397L45.7684 89.8262C47.1811 89.9757 48.6007 90.0505 50.0212 90.0502C51.2583 90.0502 52.4863 89.9926 53.6963 89.8807L51.8239 68.4603ZM80.1017 37.8985L86.4385 38.4524L84.3605 62.2299L78.0087 61.6761L80.1017 37.8985ZM65.6528 38.1315H72.0046V61.9969H65.6528V38.1315ZM56.975 37.9501L59.053 61.7277L53.911 62.1785L51.8299 38.4009L56.975 37.9501ZM29.9976 62.003L23.8243 38.9486L26.8974 38.1255L33.0707 61.1649L29.9976 62.003ZM42.157 62.1603L38.0132 38.658L41.9301 37.9683L46.0709 61.4674L42.157 62.1603Z",
|
|
@@ -2076,7 +2229,7 @@ var LogoOpinionIcon = (_a) => {
|
|
|
2076
2229
|
LogoOpinionIcon.displayName = "LogoOpinionIcon";
|
|
2077
2230
|
|
|
2078
2231
|
// src/primitives/venue-logo/svg/logo-polymarket.tsx
|
|
2079
|
-
var
|
|
2232
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
2080
2233
|
var POLYMARKET_BLUE = "#2E5CFF";
|
|
2081
2234
|
var LogoPolymarketIcon = (_a) => {
|
|
2082
2235
|
var _b = _a, {
|
|
@@ -2095,7 +2248,7 @@ var LogoPolymarketIcon = (_a) => {
|
|
|
2095
2248
|
isColor,
|
|
2096
2249
|
color
|
|
2097
2250
|
});
|
|
2098
|
-
return /* @__PURE__ */ (0,
|
|
2251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
2099
2252
|
"svg",
|
|
2100
2253
|
__spreadProps(__spreadValues(__spreadValues({
|
|
2101
2254
|
viewBox: "0 0 100 100",
|
|
@@ -2103,8 +2256,8 @@ var LogoPolymarketIcon = (_a) => {
|
|
|
2103
2256
|
fill: "none"
|
|
2104
2257
|
}, getIconA11yProps(title)), props), {
|
|
2105
2258
|
children: [
|
|
2106
|
-
title ? /* @__PURE__ */ (0,
|
|
2107
|
-
/* @__PURE__ */ (0,
|
|
2259
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("title", { children: title }) : null,
|
|
2260
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
2108
2261
|
"path",
|
|
2109
2262
|
{
|
|
2110
2263
|
d: "M81.0904 84.2882C81.0904 87.9246 81.0904 89.7428 79.901 90.644C78.7119 91.5456 76.9613 91.0542 73.4603 90.0717L17.1975 74.2838C15.0881 73.6919 14.0332 73.3959 13.4233 72.5913C12.8135 71.7866 12.8135 70.6911 12.8135 68.5002V31.4998C12.8135 29.309 12.8135 28.2134 13.4233 27.4088C14.0332 26.6042 15.0881 26.3081 17.1975 25.7163L73.4603 9.92806C76.9613 8.94572 78.7119 8.45448 79.901 9.35587C81.0904 10.2573 81.0904 12.0755 81.0904 15.7119V84.2882ZM26.8451 69.1363L73.4308 82.2104V56.0637L26.8451 69.1363ZM20.4723 63.0711L67.0487 50L20.4723 36.929V63.0711ZM26.8446 30.8638L73.4308 43.9366V17.7896L26.8446 30.8638Z",
|
|
@@ -2118,7 +2271,7 @@ var LogoPolymarketIcon = (_a) => {
|
|
|
2118
2271
|
LogoPolymarketIcon.displayName = "LogoPolymarketIcon";
|
|
2119
2272
|
|
|
2120
2273
|
// src/primitives/venue-logo/svg/logo-probable.tsx
|
|
2121
|
-
var
|
|
2274
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
2122
2275
|
var PROBABLE_ORANGE = "#F05923";
|
|
2123
2276
|
var LogoProbableIcon = (_a) => {
|
|
2124
2277
|
var _b = _a, {
|
|
@@ -2137,7 +2290,7 @@ var LogoProbableIcon = (_a) => {
|
|
|
2137
2290
|
isColor,
|
|
2138
2291
|
color
|
|
2139
2292
|
});
|
|
2140
|
-
return /* @__PURE__ */ (0,
|
|
2293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
2141
2294
|
"svg",
|
|
2142
2295
|
__spreadProps(__spreadValues(__spreadValues({
|
|
2143
2296
|
viewBox: "0 0 100 100",
|
|
@@ -2145,16 +2298,16 @@ var LogoProbableIcon = (_a) => {
|
|
|
2145
2298
|
fill: "none"
|
|
2146
2299
|
}, getIconA11yProps(title)), props), {
|
|
2147
2300
|
children: [
|
|
2148
|
-
title ? /* @__PURE__ */ (0,
|
|
2149
|
-
/* @__PURE__ */ (0,
|
|
2301
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("title", { children: title }) : null,
|
|
2302
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2150
2303
|
"path",
|
|
2151
2304
|
{
|
|
2152
2305
|
d: "M75.625 59.3489C75.6247 53.7323 71.0719 49.1792 65.4551 49.179H33.9209C28.3039 49.179 23.7503 53.7321 23.75 59.3489C23.75 64.9659 28.3038 69.5198 33.9209 69.5198H65.4551C71.0719 69.5195 75.625 64.9658 75.625 59.3489ZM90.625 59.3489C90.625 73.2501 79.3562 84.5195 65.4551 84.5198H33.9209C20.0196 84.5198 8.75 73.2502 8.75 59.3489C8.75026 45.4477 20.0198 34.179 33.9209 34.179H65.4551C79.3559 34.1792 90.6247 45.4478 90.625 59.3489Z",
|
|
2153
2306
|
fill: primaryColor
|
|
2154
2307
|
}
|
|
2155
2308
|
),
|
|
2156
|
-
/* @__PURE__ */ (0,
|
|
2157
|
-
/* @__PURE__ */ (0,
|
|
2309
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("path", { d: "M90.9329 15.4546V30.4546H8.90234V15.4546H90.9329Z", fill: primaryColor }),
|
|
2310
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2158
2311
|
"path",
|
|
2159
2312
|
{
|
|
2160
2313
|
d: "M64.5742 51.3496C68.9894 51.3496 72.5742 54.9344 72.5742 59.3496C72.5742 63.7648 68.9894 67.3496 64.5742 67.3496C60.159 67.3496 56.5742 63.7648 56.5742 59.3496C56.5742 54.9344 60.159 51.3496 64.5742 51.3496Z",
|
|
@@ -2182,14 +2335,14 @@ var venueLogoUrlRegistry = {
|
|
|
2182
2335
|
probable: `${VENUE_LOGO_BASE_URL}/probable.png`
|
|
2183
2336
|
};
|
|
2184
2337
|
var venueLogoNames = Object.keys(venueLogoRegistry);
|
|
2185
|
-
var
|
|
2338
|
+
var sizeClasses2 = {
|
|
2186
2339
|
small: "h-4 w-4",
|
|
2187
2340
|
medium: "h-6 w-6",
|
|
2188
2341
|
large: "h-8 w-8"
|
|
2189
2342
|
};
|
|
2190
2343
|
|
|
2191
2344
|
// src/primitives/venue-logo/index.tsx
|
|
2192
|
-
var
|
|
2345
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
2193
2346
|
var VenueLogo = ({
|
|
2194
2347
|
venue,
|
|
2195
2348
|
variant = "icon",
|
|
@@ -2201,11 +2354,11 @@ var VenueLogo = ({
|
|
|
2201
2354
|
ariaLabel,
|
|
2202
2355
|
title
|
|
2203
2356
|
}) => {
|
|
2204
|
-
const labels = (0,
|
|
2205
|
-
const sizeClass =
|
|
2357
|
+
const labels = (0, import_hooks10.useLabels)();
|
|
2358
|
+
const sizeClass = sizeClasses2[size];
|
|
2206
2359
|
const resolvedLabel = ariaLabel != null ? ariaLabel : labels.venues[venue];
|
|
2207
2360
|
if (variant === "logo") {
|
|
2208
|
-
return /* @__PURE__ */ (0,
|
|
2361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2209
2362
|
"img",
|
|
2210
2363
|
{
|
|
2211
2364
|
src: venueLogoUrlRegistry[venue],
|
|
@@ -2217,7 +2370,7 @@ var VenueLogo = ({
|
|
|
2217
2370
|
}
|
|
2218
2371
|
const Component = venueLogoRegistry[venue];
|
|
2219
2372
|
const resolvedIsColor = isMonochromatic ? false : isColor;
|
|
2220
|
-
return /* @__PURE__ */ (0,
|
|
2373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2221
2374
|
Component,
|
|
2222
2375
|
{
|
|
2223
2376
|
className: cn("group/agg-venue-logo", "shrink-0", sizeClass, className),
|
|
@@ -2230,29 +2383,27 @@ var VenueLogo = ({
|
|
|
2230
2383
|
};
|
|
2231
2384
|
VenueLogo.displayName = "VenueLogo";
|
|
2232
2385
|
|
|
2386
|
+
// src/shared/query-error.ts
|
|
2387
|
+
var getErrorStatus = (error) => {
|
|
2388
|
+
if (!error || typeof error !== "object")
|
|
2389
|
+
return null;
|
|
2390
|
+
const status = error.status;
|
|
2391
|
+
return typeof status === "number" ? status : null;
|
|
2392
|
+
};
|
|
2393
|
+
var isErrorWithStatus = (error, status) => {
|
|
2394
|
+
return getErrorStatus(error) === status;
|
|
2395
|
+
};
|
|
2396
|
+
|
|
2233
2397
|
// src/events/item/event-list-item.utils.ts
|
|
2234
2398
|
var resolveEventListItemEvent = (fetchedEvent) => {
|
|
2235
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
2236
2399
|
if (!fetchedEvent)
|
|
2237
2400
|
return void 0;
|
|
2238
|
-
const fallbackVenueEvent = fetchedEvent.venueEvents[0];
|
|
2239
|
-
if (!fallbackVenueEvent)
|
|
2240
|
-
return void 0;
|
|
2241
2401
|
const mergedVenueMarkets = fetchedEvent.markets.flatMap(
|
|
2242
|
-
(
|
|
2402
|
+
(market) => market.venueMarkets
|
|
2243
2403
|
);
|
|
2244
|
-
|
|
2245
|
-
if ((venueMarkets == null ? void 0 : venueMarkets.length) === 0)
|
|
2404
|
+
if (mergedVenueMarkets.length === 0)
|
|
2246
2405
|
return void 0;
|
|
2247
|
-
return
|
|
2248
|
-
id: fetchedEvent.id,
|
|
2249
|
-
title: fetchedEvent.title || fallbackVenueEvent.title,
|
|
2250
|
-
description: (_b = (_a = fetchedEvent.description) != null ? _a : fallbackVenueEvent.description) != null ? _b : null,
|
|
2251
|
-
volume: (_d = (_c = fetchedEvent.volume) != null ? _c : fallbackVenueEvent.volume) != null ? _d : null,
|
|
2252
|
-
startDate: (_f = (_e = fetchedEvent.startDate) != null ? _e : fallbackVenueEvent.startDate) != null ? _f : null,
|
|
2253
|
-
endDate: (_h = (_g = fetchedEvent.endDate) != null ? _g : fallbackVenueEvent.endDate) != null ? _h : null,
|
|
2254
|
-
creationDate: (_j = (_i = fetchedEvent.creationDate) != null ? _i : fallbackVenueEvent.creationDate) != null ? _j : null
|
|
2255
|
-
});
|
|
2406
|
+
return fetchedEvent;
|
|
2256
2407
|
};
|
|
2257
2408
|
var normalizeProbability = (value) => {
|
|
2258
2409
|
if (typeof value !== "number" || !Number.isFinite(value))
|
|
@@ -2353,15 +2504,14 @@ var resolveTileTitle = (event, primaryVenueMarket, titleOverride) => {
|
|
|
2353
2504
|
return event.title;
|
|
2354
2505
|
};
|
|
2355
2506
|
var resolveTileImage = (event, primaryVenueMarket, imageOverride) => {
|
|
2356
|
-
var _a, _b, _c, _d, _e, _f;
|
|
2357
2507
|
if (typeof imageOverride === "string" && imageOverride.trim()) {
|
|
2358
2508
|
return imageOverride;
|
|
2359
2509
|
}
|
|
2360
2510
|
if (typeof (primaryVenueMarket == null ? void 0 : primaryVenueMarket.image) === "string" && primaryVenueMarket.image.trim()) {
|
|
2361
2511
|
return primaryVenueMarket.image;
|
|
2362
2512
|
}
|
|
2363
|
-
if (typeof
|
|
2364
|
-
return
|
|
2513
|
+
if (typeof event.image === "string" && event.image.trim()) {
|
|
2514
|
+
return event.image;
|
|
2365
2515
|
}
|
|
2366
2516
|
return void 0;
|
|
2367
2517
|
};
|
|
@@ -2384,13 +2534,13 @@ var resolveVenueLabel = (venue, venueInfo, labels) => {
|
|
|
2384
2534
|
};
|
|
2385
2535
|
|
|
2386
2536
|
// src/events/item/index.tsx
|
|
2387
|
-
var
|
|
2537
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
2388
2538
|
var EventListItemLoadingState = ({
|
|
2389
2539
|
classNames,
|
|
2390
2540
|
ariaLabel
|
|
2391
2541
|
}) => {
|
|
2392
|
-
const labels = (0,
|
|
2393
|
-
return /* @__PURE__ */ (0,
|
|
2542
|
+
const labels = (0, import_hooks11.useLabels)();
|
|
2543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2394
2544
|
Skeleton,
|
|
2395
2545
|
{
|
|
2396
2546
|
view: "event-list-item",
|
|
@@ -2403,20 +2553,35 @@ var EventListItemUnavailableState = ({
|
|
|
2403
2553
|
classNames,
|
|
2404
2554
|
ariaLabel
|
|
2405
2555
|
}) => {
|
|
2406
|
-
const labels = (0,
|
|
2407
|
-
return /* @__PURE__ */ (0,
|
|
2556
|
+
const labels = (0, import_hooks11.useLabels)();
|
|
2557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2408
2558
|
Card,
|
|
2409
2559
|
{
|
|
2410
2560
|
className: cn(baseCardClassName, classNames == null ? void 0 : classNames.root),
|
|
2411
2561
|
role: "status",
|
|
2412
2562
|
"aria-label": ariaLabel != null ? ariaLabel : labels.eventItem.unavailableAria,
|
|
2413
|
-
children: /* @__PURE__ */ (0,
|
|
2414
|
-
/* @__PURE__ */ (0,
|
|
2415
|
-
/* @__PURE__ */ (0,
|
|
2563
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: cn("flex flex-col gap-1", classNames == null ? void 0 : classNames.header), children: [
|
|
2564
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Typography, { variant: "body-large-strong", className: cn("truncate", classNames == null ? void 0 : classNames.title), children: labels.eventItem.unavailableTitle }),
|
|
2565
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Typography, { variant: "body", className: "text-agg-muted-foreground", children: labels.eventItem.unavailableDescription })
|
|
2416
2566
|
] })
|
|
2417
2567
|
}
|
|
2418
2568
|
);
|
|
2419
2569
|
};
|
|
2570
|
+
var EventListItemNotFoundState = ({
|
|
2571
|
+
classNames,
|
|
2572
|
+
ariaLabel
|
|
2573
|
+
}) => {
|
|
2574
|
+
const labels = (0, import_hooks11.useLabels)();
|
|
2575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Card, { className: cn("w-full gap-0 overflow-hidden p-0", classNames == null ? void 0 : classNames.root), children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2576
|
+
StateMessage,
|
|
2577
|
+
{
|
|
2578
|
+
ariaLabel: ariaLabel != null ? ariaLabel : labels.eventItemDetails.notFoundAria,
|
|
2579
|
+
title: labels.eventItemDetails.notFoundTitle,
|
|
2580
|
+
description: labels.eventItemDetails.notFoundDescription,
|
|
2581
|
+
className: "min-h-[280px] md:min-h-[320px]"
|
|
2582
|
+
}
|
|
2583
|
+
) });
|
|
2584
|
+
};
|
|
2420
2585
|
var EventListItemContent = ({
|
|
2421
2586
|
event,
|
|
2422
2587
|
title,
|
|
@@ -2430,8 +2595,8 @@ var EventListItemContent = ({
|
|
|
2430
2595
|
ariaLabel
|
|
2431
2596
|
}) => {
|
|
2432
2597
|
var _a;
|
|
2433
|
-
const config = (0,
|
|
2434
|
-
const labels = (0,
|
|
2598
|
+
const config = (0, import_hooks11.useSdkUiConfig)();
|
|
2599
|
+
const labels = (0, import_hooks11.useLabels)();
|
|
2435
2600
|
const allVenueMarkets = (0, import_react.useMemo)(() => {
|
|
2436
2601
|
return event.markets.flatMap((market) => market.venueMarkets);
|
|
2437
2602
|
}, [event.markets]);
|
|
@@ -2465,9 +2630,9 @@ var EventListItemContent = ({
|
|
|
2465
2630
|
return null;
|
|
2466
2631
|
if (Math.abs(value) < config.arbitrageThreshold)
|
|
2467
2632
|
return null;
|
|
2468
|
-
return /* @__PURE__ */ (0,
|
|
2469
|
-
/* @__PURE__ */ (0,
|
|
2470
|
-
/* @__PURE__ */ (0,
|
|
2633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: cn("flex items-center gap-1", "text-agg-success"), children: [
|
|
2634
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Typography, { variant: "label-strong", className: "text-agg-success", children: config.formatPercent(value) }),
|
|
2635
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2471
2636
|
Icon,
|
|
2472
2637
|
{
|
|
2473
2638
|
name: "triangle-up",
|
|
@@ -2478,7 +2643,7 @@ var EventListItemContent = ({
|
|
|
2478
2643
|
)
|
|
2479
2644
|
] });
|
|
2480
2645
|
};
|
|
2481
|
-
return /* @__PURE__ */ (0,
|
|
2646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
2482
2647
|
Card,
|
|
2483
2648
|
{
|
|
2484
2649
|
className: cn(baseCardClassName, onClick && "cursor-pointer", classNames == null ? void 0 : classNames.root),
|
|
@@ -2488,8 +2653,8 @@ var EventListItemContent = ({
|
|
|
2488
2653
|
onKeyDown: handleKeyDown,
|
|
2489
2654
|
"aria-label": ariaLabel != null ? ariaLabel : resolvedTitle,
|
|
2490
2655
|
children: [
|
|
2491
|
-
/* @__PURE__ */ (0,
|
|
2492
|
-
resolvedImage ? /* @__PURE__ */ (0,
|
|
2656
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: cn("flex items-center gap-3", classNames == null ? void 0 : classNames.header), children: [
|
|
2657
|
+
resolvedImage ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2493
2658
|
"img",
|
|
2494
2659
|
{
|
|
2495
2660
|
src: resolvedImage,
|
|
@@ -2497,7 +2662,7 @@ var EventListItemContent = ({
|
|
|
2497
2662
|
className: cn("h-10 w-10", "rounded-agg-lg object-cover")
|
|
2498
2663
|
}
|
|
2499
2664
|
) : null,
|
|
2500
|
-
/* @__PURE__ */ (0,
|
|
2665
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2501
2666
|
Typography,
|
|
2502
2667
|
{
|
|
2503
2668
|
variant: "body-strong",
|
|
@@ -2510,13 +2675,13 @@ var EventListItemContent = ({
|
|
|
2510
2675
|
}
|
|
2511
2676
|
)
|
|
2512
2677
|
] }),
|
|
2513
|
-
/* @__PURE__ */ (0,
|
|
2678
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: cn("flex flex-col gap-3", classNames == null ? void 0 : classNames.outcomes), children: visibleOutcomes.map((visibleOutcome) => {
|
|
2514
2679
|
const probability = normalizeProbability(visibleOutcome.outcome.price);
|
|
2515
2680
|
const showBadge = typeof probability === "number";
|
|
2516
2681
|
const arbitragePercent = arbitrageByOutcomeId == null ? void 0 : arbitrageByOutcomeId[visibleOutcome.outcome.id];
|
|
2517
2682
|
const outcomeTitle = resolveOutcomeTitle(visibleOutcome.outcome);
|
|
2518
2683
|
const formattedTitle = (0, import_dayjs.default)(outcomeTitle).isValid() ? (0, import_dayjs.default)(outcomeTitle).format("MMMM D, YYYY") : outcomeTitle;
|
|
2519
|
-
return /* @__PURE__ */ (0,
|
|
2684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
2520
2685
|
"div",
|
|
2521
2686
|
{
|
|
2522
2687
|
className: cn(
|
|
@@ -2524,7 +2689,7 @@ var EventListItemContent = ({
|
|
|
2524
2689
|
classNames == null ? void 0 : classNames.outcomeRow
|
|
2525
2690
|
),
|
|
2526
2691
|
children: [
|
|
2527
|
-
/* @__PURE__ */ (0,
|
|
2692
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2528
2693
|
Typography,
|
|
2529
2694
|
{
|
|
2530
2695
|
variant: "body",
|
|
@@ -2532,13 +2697,13 @@ var EventListItemContent = ({
|
|
|
2532
2697
|
children: formattedTitle
|
|
2533
2698
|
}
|
|
2534
2699
|
),
|
|
2535
|
-
/* @__PURE__ */ (0,
|
|
2700
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex flex-row gap-3 items-center justify-end", children: [
|
|
2536
2701
|
renderArbitrage(arbitragePercent),
|
|
2537
|
-
showBadge ? /* @__PURE__ */ (0,
|
|
2702
|
+
showBadge ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2538
2703
|
Badge,
|
|
2539
2704
|
{
|
|
2540
2705
|
text: config.formatPercent(probability),
|
|
2541
|
-
prefix: showVenueLogo ? /* @__PURE__ */ (0,
|
|
2706
|
+
prefix: showVenueLogo ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(VenueLogo, { venue: visibleOutcome.venue, size: "small" }) : void 0,
|
|
2542
2707
|
size: "large",
|
|
2543
2708
|
classNames: {
|
|
2544
2709
|
root: cn(
|
|
@@ -2554,7 +2719,7 @@ var EventListItemContent = ({
|
|
|
2554
2719
|
`${visibleOutcome.market.id}-${visibleOutcome.outcome.id}`
|
|
2555
2720
|
);
|
|
2556
2721
|
}) }),
|
|
2557
|
-
/* @__PURE__ */ (0,
|
|
2722
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
2558
2723
|
"div",
|
|
2559
2724
|
{
|
|
2560
2725
|
className: cn(
|
|
@@ -2563,15 +2728,15 @@ var EventListItemContent = ({
|
|
|
2563
2728
|
classNames == null ? void 0 : classNames.footer
|
|
2564
2729
|
),
|
|
2565
2730
|
children: [
|
|
2566
|
-
/* @__PURE__ */ (0,
|
|
2567
|
-
/* @__PURE__ */ (0,
|
|
2731
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: cn("flex items-center gap-1", "text-agg-sm leading-agg-5"), children: [
|
|
2732
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "truncate text-agg-muted-foreground", children: formatCountLabel(
|
|
2568
2733
|
marketCount,
|
|
2569
2734
|
labels.eventItem.marketSingular,
|
|
2570
2735
|
labels.eventItem.marketPlural
|
|
2571
2736
|
) }),
|
|
2572
|
-
/* @__PURE__ */ (0,
|
|
2573
|
-
singleVenue ? /* @__PURE__ */ (0,
|
|
2574
|
-
showVenueLogo ? /* @__PURE__ */ (0,
|
|
2737
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "text-agg-muted-foreground", children: "\xD7" }),
|
|
2738
|
+
singleVenue ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("span", { className: "flex items-center gap-1 truncate text-agg-muted-foreground", children: [
|
|
2739
|
+
showVenueLogo ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2575
2740
|
VenueLogo,
|
|
2576
2741
|
{
|
|
2577
2742
|
venue: singleVenue,
|
|
@@ -2580,13 +2745,13 @@ var EventListItemContent = ({
|
|
|
2580
2745
|
className: "text-agg-muted-foreground!"
|
|
2581
2746
|
}
|
|
2582
2747
|
) : null,
|
|
2583
|
-
/* @__PURE__ */ (0,
|
|
2584
|
-
] }) : /* @__PURE__ */ (0,
|
|
2748
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { children: venueLabel })
|
|
2749
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "truncate text-agg-muted-foreground", children: formatCountLabel(
|
|
2585
2750
|
venueCount,
|
|
2586
2751
|
labels.eventItem.venueSingular,
|
|
2587
2752
|
labels.eventItem.venuePlural
|
|
2588
2753
|
) }),
|
|
2589
|
-
showVenueLogo && !singleVenue && visibleVenueLogos.length > 0 ? /* @__PURE__ */ (0,
|
|
2754
|
+
showVenueLogo && !singleVenue && visibleVenueLogos.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "flex items-center gap-1 overflow-hidden", children: visibleVenueLogos.map((venue) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2590
2755
|
VenueLogo,
|
|
2591
2756
|
{
|
|
2592
2757
|
venue,
|
|
@@ -2597,7 +2762,7 @@ var EventListItemContent = ({
|
|
|
2597
2762
|
venue
|
|
2598
2763
|
)) }) : null
|
|
2599
2764
|
] }),
|
|
2600
|
-
volumeLabel ? /* @__PURE__ */ (0,
|
|
2765
|
+
volumeLabel ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Typography, { variant: "label", className: "text-agg-sm text-agg-muted-foreground", children: volumeLabel }) : null
|
|
2601
2766
|
]
|
|
2602
2767
|
}
|
|
2603
2768
|
)
|
|
@@ -2613,37 +2778,41 @@ var EventListItemByEventId = (_a) => {
|
|
|
2613
2778
|
]);
|
|
2614
2779
|
const {
|
|
2615
2780
|
event: fetchedEvent,
|
|
2781
|
+
error,
|
|
2616
2782
|
isError,
|
|
2617
2783
|
isLoading
|
|
2618
|
-
} = (0,
|
|
2784
|
+
} = (0, import_hooks11.useEvent)(eventId, {
|
|
2619
2785
|
enabled: !!eventId
|
|
2620
2786
|
});
|
|
2621
2787
|
const resolvedEvent = (0, import_react.useMemo)(() => {
|
|
2622
2788
|
return resolveEventListItemEvent(fetchedEvent);
|
|
2623
2789
|
}, [fetchedEvent]);
|
|
2624
2790
|
if (!eventId) {
|
|
2625
|
-
return /* @__PURE__ */ (0,
|
|
2791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(EventListItemUnavailableState, { classNames: rest.classNames, ariaLabel: rest.ariaLabel });
|
|
2626
2792
|
}
|
|
2627
2793
|
if (isLoading) {
|
|
2628
|
-
return /* @__PURE__ */ (0,
|
|
2794
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(EventListItemLoadingState, { classNames: rest.classNames, ariaLabel: rest.ariaLabel });
|
|
2795
|
+
}
|
|
2796
|
+
if (isErrorWithStatus(error, 404)) {
|
|
2797
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(EventListItemNotFoundState, { classNames: rest.classNames, ariaLabel: rest.ariaLabel });
|
|
2629
2798
|
}
|
|
2630
|
-
if (!
|
|
2631
|
-
return /* @__PURE__ */ (0,
|
|
2799
|
+
if (!fetchedEvent && !isError) {
|
|
2800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(EventListItemLoadingState, { classNames: rest.classNames, ariaLabel: rest.ariaLabel });
|
|
2632
2801
|
}
|
|
2633
2802
|
if (!resolvedEvent) {
|
|
2634
|
-
return /* @__PURE__ */ (0,
|
|
2803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(EventListItemUnavailableState, { classNames: rest.classNames, ariaLabel: rest.ariaLabel });
|
|
2635
2804
|
}
|
|
2636
|
-
return /* @__PURE__ */ (0,
|
|
2805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(EventListItemContent, __spreadValues({ event: resolvedEvent }, rest));
|
|
2637
2806
|
};
|
|
2638
2807
|
var EventListItem = (props) => {
|
|
2639
2808
|
if (props.isLoading) {
|
|
2640
|
-
return /* @__PURE__ */ (0,
|
|
2809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(EventListItemLoadingState, { classNames: props.classNames, ariaLabel: props.ariaLabel });
|
|
2641
2810
|
}
|
|
2642
2811
|
if ("event" in props && props.event) {
|
|
2643
2812
|
const _a = props, { event } = _a, rest = __objRest(_a, ["event"]);
|
|
2644
|
-
return /* @__PURE__ */ (0,
|
|
2813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(EventListItemContent, __spreadValues({ event }, rest));
|
|
2645
2814
|
}
|
|
2646
|
-
return /* @__PURE__ */ (0,
|
|
2815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(EventListItemByEventId, __spreadValues({}, props));
|
|
2647
2816
|
};
|
|
2648
2817
|
EventListItem.displayName = "EventListItem";
|
|
2649
2818
|
// Annotate the CommonJS export names for ESM import in node:
|