@agg-market/ui 0.0.6 → 2.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/badge.d.mts +5 -3
- package/dist/badge.d.ts +5 -3
- package/dist/badge.js +52 -12
- package/dist/badge.mjs +1 -1
- package/dist/button.d.mts +2 -2
- package/dist/button.d.ts +2 -2
- package/dist/button.js +19 -34
- package/dist/button.mjs +2 -2
- package/dist/card.d.mts +4 -2
- package/dist/card.d.ts +4 -2
- package/dist/card.js +8 -4
- package/dist/card.mjs +1 -1
- package/dist/chart.js +14 -7
- package/dist/chart.mjs +2 -2
- package/dist/{chunk-ZYREURXK.mjs → chunk-2MJY6RVY.mjs} +35 -35
- package/dist/{chunk-P23GR7NX.mjs → chunk-422MCIXV.mjs} +1 -1
- package/dist/chunk-4KMFDCAH.mjs +371 -0
- package/dist/{chunk-HM3CGN32.mjs → chunk-5GDNWQZS.mjs} +46 -46
- package/dist/{chunk-VIP7HSOU.mjs → chunk-5K7VXAYM.mjs} +4 -0
- package/dist/{chunk-BJNHDIDW.mjs → chunk-6425RRBI.mjs} +4 -4
- package/dist/{chunk-O2XH4A3G.mjs → chunk-7NISYVSJ.mjs} +22 -22
- package/dist/{chunk-MXBPDNMC.mjs → chunk-BEDUFOIG.mjs} +95 -22
- package/dist/{chunk-VC7LTPQD.mjs → chunk-BN5VVHNV.mjs} +2 -2
- package/dist/{chunk-JRS2M5GY.mjs → chunk-CTVMT3VL.mjs} +13 -6
- package/dist/{chunk-USLTNDJA.mjs → chunk-D5FTFSKL.mjs} +8 -8
- package/dist/{chunk-BLSHXIAH.mjs → chunk-D7JTOGYP.mjs} +6 -11
- package/dist/{chunk-W2DMBW4E.mjs → chunk-DL7STJQ5.mjs} +61 -33
- package/dist/chunk-ERGNR6UQ.mjs +67 -0
- package/dist/chunk-FO263M3V.mjs +10 -0
- package/dist/{chunk-3O4U3E5I.mjs → chunk-FO2QCB4Z.mjs} +8 -4
- package/dist/{chunk-OGI343OV.mjs → chunk-IGPNIM2B.mjs} +3 -2
- package/dist/chunk-K6IJ4WBM.mjs +67 -0
- package/dist/{chunk-PGSPYQOW.mjs → chunk-KAGYJ4XT.mjs} +17 -27
- package/dist/{chunk-RGZQHSNJ.mjs → chunk-KCPDVBIZ.mjs} +26 -17
- package/dist/{chunk-ZHKMDK5M.mjs → chunk-KFOATMAE.mjs} +87 -87
- package/dist/{chunk-I4YUYVJJ.mjs → chunk-LK5D3ZTK.mjs} +38 -27
- package/dist/{chunk-VUDJ3PYM.mjs → chunk-O46OFVH6.mjs} +40 -16
- package/dist/{chunk-RXACBTON.mjs → chunk-OA2IZ3VW.mjs} +16 -22
- package/dist/{chunk-F236MLT6.mjs → chunk-PZTHM6WG.mjs} +13 -10
- package/dist/{chunk-XELWY7SO.mjs → chunk-QYZKC7KG.mjs} +137 -104
- package/dist/{chunk-LWTQD345.mjs → chunk-S3H63TQ5.mjs} +57 -312
- package/dist/{chunk-MNSHWA6M.mjs → chunk-TA7LKYKP.mjs} +9 -8
- package/dist/{chunk-JH5VMNDL.mjs → chunk-V52WSZHQ.mjs} +8 -7
- package/dist/chunk-YJA5VQW6.mjs +167 -0
- package/dist/{chunk-EXF4SESB.mjs → chunk-ZFMCCBP6.mjs} +1 -1
- package/dist/connect-button.js +51 -73
- package/dist/connect-button.mjs +6 -6
- package/dist/deposit-modal.js +171 -177
- package/dist/deposit-modal.mjs +7 -7
- package/dist/event-list-item-details.js +222 -198
- package/dist/event-list-item-details.mjs +11 -11
- package/dist/event-list-item.js +172 -114
- package/dist/event-list-item.mjs +8 -8
- package/dist/event-list.js +391 -507
- package/dist/event-list.mjs +11 -11
- package/dist/event-market-page.d.mts +1 -1
- package/dist/event-market-page.d.ts +1 -1
- package/dist/event-market-page.js +826 -764
- package/dist/event-market-page.mjs +19 -19
- package/dist/hello-world.js +28 -16
- package/dist/hello-world.mjs +2 -2
- package/dist/home-page.js +395 -511
- package/dist/home-page.mjs +12 -12
- package/dist/icon.d.mts +1 -1
- package/dist/icon.d.ts +1 -1
- package/dist/icon.js +15 -17
- package/dist/icon.mjs +2 -2
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +1158 -956
- package/dist/index.mjs +34 -32
- package/dist/loading-icon.d.mts +1 -1
- package/dist/loading-icon.d.ts +1 -1
- package/dist/loading-icon.js +5 -9
- package/dist/loading-icon.mjs +2 -2
- package/dist/market-details.d.mts +2 -2
- package/dist/market-details.d.ts +2 -2
- package/dist/market-details.js +357 -551
- package/dist/market-details.mjs +13 -13
- package/dist/modal.js +4 -0
- package/dist/modal.mjs +1 -1
- package/dist/onboarding-modal.js +63 -67
- package/dist/onboarding-modal.mjs +6 -6
- package/dist/place-order.d.mts +1 -1
- package/dist/place-order.d.ts +1 -1
- package/dist/place-order.js +231 -466
- package/dist/place-order.mjs +9 -9
- package/dist/profile-modal.js +75 -77
- package/dist/profile-modal.mjs +6 -6
- package/dist/search.d.mts +2 -2
- package/dist/search.d.ts +2 -2
- package/dist/search.js +28 -34
- package/dist/search.mjs +4 -4
- package/dist/select.js +104 -99
- package/dist/select.mjs +3 -3
- package/dist/settlement.d.mts +1 -1
- package/dist/settlement.d.ts +1 -1
- package/dist/settlement.js +279 -59
- package/dist/settlement.mjs +6 -6
- package/dist/skeleton.js +15 -10
- package/dist/skeleton.mjs +2 -2
- package/dist/styles.css +1 -1
- package/dist/switch-button.js +13 -6
- package/dist/switch-button.mjs +1 -1
- package/dist/tabs.d.mts +8 -4
- package/dist/tabs.d.ts +8 -4
- package/dist/tabs.js +163 -420
- package/dist/tabs.mjs +4 -4
- package/dist/tailwind.css +1 -1
- package/dist/types-BVj9ky9P.d.mts +3 -0
- package/dist/types-BVj9ky9P.d.ts +3 -0
- package/dist/typography.d.mts +4 -2
- package/dist/typography.d.ts +4 -2
- package/dist/typography.js +49 -18
- package/dist/typography.mjs +5 -3
- package/dist/user-profile-page.d.mts +2 -2
- package/dist/user-profile-page.d.ts +2 -2
- package/dist/user-profile-page.js +200 -474
- package/dist/user-profile-page.mjs +7 -7
- package/dist/venue-logo.d.mts +2 -2
- package/dist/venue-logo.d.ts +2 -2
- package/dist/venue-logo.js +6 -11
- package/dist/venue-logo.mjs +1 -1
- package/dist/{venue-logo.types-BSAuY84j.d.ts → venue-logo.types-D8Cu2rAm.d.ts} +1 -1
- package/dist/{venue-logo.types-DACqcTvY.d.mts → venue-logo.types-HRf1yBLD.d.mts} +1 -1
- package/dist/withdraw-modal.js +72 -85
- package/dist/withdraw-modal.mjs +6 -6
- package/package.json +2 -2
- package/dist/chunk-AEMAY3MR.mjs +0 -44
- package/dist/chunk-DYEWXEEY.mjs +0 -37
- package/dist/chunk-QFQHD2V6.mjs +0 -146
- package/dist/chunk-ZDF7QP4G.mjs +0 -160
- package/dist/chunk-ZVBVGWSP.mjs +0 -15
- package/dist/types-Bed6Q0EK.d.mts +0 -3
- package/dist/types-Bed6Q0EK.d.ts +0 -3
- package/dist/{types-DkGlbmXq.d.mts → types-JBf1DZlH.d.mts} +2 -2
- package/dist/{types-DkGlbmXq.d.ts → types-JBf1DZlH.d.ts} +2 -2
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
resolveOutcomeLabels,
|
|
5
5
|
resolveOutcomesByVenue,
|
|
6
6
|
resolveSeriesColor
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-422MCIXV.mjs";
|
|
8
8
|
import {
|
|
9
9
|
Tabs
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-S3H63TQ5.mjs";
|
|
11
11
|
import {
|
|
12
12
|
getVenueSummary,
|
|
13
13
|
normalizeProbability,
|
|
@@ -22,25 +22,25 @@ import {
|
|
|
22
22
|
marketDetailsBaseCardClassName,
|
|
23
23
|
marketDetailsDefaultIsOpened,
|
|
24
24
|
orderBookRowLimitDefault
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-V52WSZHQ.mjs";
|
|
26
26
|
import {
|
|
27
27
|
LoadingIcon
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-IGPNIM2B.mjs";
|
|
29
29
|
import {
|
|
30
30
|
VenueLogo
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-D7JTOGYP.mjs";
|
|
32
32
|
import {
|
|
33
33
|
Typography
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-ERGNR6UQ.mjs";
|
|
35
35
|
import {
|
|
36
36
|
Card
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-FO2QCB4Z.mjs";
|
|
38
38
|
import {
|
|
39
39
|
LineChart
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-BN5VVHNV.mjs";
|
|
41
41
|
import {
|
|
42
42
|
SwitchButton
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-CTVMT3VL.mjs";
|
|
44
44
|
import {
|
|
45
45
|
__spreadProps,
|
|
46
46
|
__spreadValues,
|
|
@@ -319,8 +319,8 @@ var MarketDetailsUnavailableState = ({
|
|
|
319
319
|
role: "status",
|
|
320
320
|
"aria-label": ariaLabel != null ? ariaLabel : labels.marketDetails.unavailableAria,
|
|
321
321
|
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 p-5", children: [
|
|
322
|
-
/* @__PURE__ */ jsx(Typography, { variant: "
|
|
323
|
-
/* @__PURE__ */ jsx(Typography, { variant: "
|
|
322
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body-large-strong", children: labels.marketDetails.unavailableTitle }),
|
|
323
|
+
/* @__PURE__ */ jsx(Typography, { variant: "label", className: "text-agg-muted-foreground", children: labels.marketDetails.unavailableDescription })
|
|
324
324
|
] })
|
|
325
325
|
}
|
|
326
326
|
);
|
|
@@ -336,11 +336,11 @@ var OrderBookRows = ({
|
|
|
336
336
|
const priceClassName = isAsks ? "text-agg-orderbook-ask" : "text-agg-orderbook-bid";
|
|
337
337
|
const barClassName = isAsks ? "bg-agg-orderbook-ask/10" : "bg-agg-orderbook-bid/10";
|
|
338
338
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
339
|
-
/* @__PURE__ */ jsx(Typography, { variant: "
|
|
339
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption-caps", children: title }),
|
|
340
340
|
rows.map((row, index) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
341
341
|
/* @__PURE__ */ 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: [
|
|
342
342
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 md:gap-3", children: [
|
|
343
|
-
/* @__PURE__ */ jsx(VenueLogo, { venue: row.venue, size: "
|
|
343
|
+
/* @__PURE__ */ jsx(VenueLogo, { venue: row.venue, size: "small" }),
|
|
344
344
|
/* @__PURE__ */ jsx(
|
|
345
345
|
"span",
|
|
346
346
|
{
|
|
@@ -374,11 +374,15 @@ var getOutcomeButtonClassName = ({
|
|
|
374
374
|
isPositive,
|
|
375
375
|
isActive
|
|
376
376
|
}) => {
|
|
377
|
+
const defaultStateClassName = isPositive ? "border-[#18c15c]/50 bg-[#18c15c]/5 text-agg-foreground hover:bg-[#18c15c]/10" : "border-[#e5455f]/50 bg-[#e5455f]/5 text-agg-foreground hover:bg-[#e5455f]/10";
|
|
378
|
+
const activeStateClassName = isPositive ? "border-transparent bg-[#18c15c] text-agg-on-primary" : "border-transparent bg-[#e5455f] text-agg-on-primary";
|
|
377
379
|
return cn(
|
|
378
380
|
"h-auto min-h-10 flex-1 rounded-agg-full border px-4 py-1.5 text-agg-base leading-agg-6 shadow-none md:flex-none md:min-w-[168px]",
|
|
379
|
-
getMotionClassName(enableAnimations, "transition-all duration-300"),
|
|
380
|
-
|
|
381
|
-
|
|
381
|
+
getMotionClassName(enableAnimations, "transition-all duration-300 ease-in-out"),
|
|
382
|
+
isActive ? activeStateClassName : defaultStateClassName,
|
|
383
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary focus-visible:ring-offset-2 focus-visible:ring-offset-agg-secondary-hover",
|
|
384
|
+
"cursor-pointer disabled:cursor-not-allowed disabled:text-agg-muted-foreground",
|
|
385
|
+
isActive ? "font-agg-bold" : "font-agg-normal"
|
|
382
386
|
);
|
|
383
387
|
};
|
|
384
388
|
var MarketDetailsContent = ({
|
|
@@ -585,7 +589,7 @@ var MarketDetailsContent = ({
|
|
|
585
589
|
}, [labels, model]);
|
|
586
590
|
const handleOutcomeKeyDown = (eventToHandle) => {
|
|
587
591
|
var _a;
|
|
588
|
-
if (eventToHandle.key !== "ArrowLeft" && eventToHandle.key !== "ArrowRight") {
|
|
592
|
+
if ((eventToHandle == null ? void 0 : eventToHandle.key) !== "ArrowLeft" && (eventToHandle == null ? void 0 : eventToHandle.key) !== "ArrowRight") {
|
|
589
593
|
return;
|
|
590
594
|
}
|
|
591
595
|
if (headerOutcomeItems.length <= 1)
|
|
@@ -597,9 +601,17 @@ var MarketDetailsContent = ({
|
|
|
597
601
|
const nextIndex = activeIndex < 0 ? 0 : (activeIndex + direction + headerOutcomeItems.length) % headerOutcomeItems.length;
|
|
598
602
|
setSelectedOutcomeLabel((_a = headerOutcomeItems[nextIndex]) == null ? void 0 : _a.label);
|
|
599
603
|
};
|
|
600
|
-
const handleToggleExpanded = () => {
|
|
601
|
-
|
|
602
|
-
|
|
604
|
+
const handleToggleExpanded = (event2) => {
|
|
605
|
+
if (event2 && "key" in event2 && (event2 == null ? void 0 : event2.key) !== "Enter" && (event2 == null ? void 0 : event2.key) !== " ") {
|
|
606
|
+
return;
|
|
607
|
+
}
|
|
608
|
+
event2 == null ? void 0 : event2.preventDefault();
|
|
609
|
+
event2 == null ? void 0 : event2.stopPropagation();
|
|
610
|
+
setIsOpened((prev) => {
|
|
611
|
+
const next = !prev;
|
|
612
|
+
onOpenChange == null ? void 0 : onOpenChange(next);
|
|
613
|
+
return next;
|
|
614
|
+
});
|
|
603
615
|
};
|
|
604
616
|
const handleGraphVenueToggle = (venue) => {
|
|
605
617
|
setSelectedGraphVenue((currentVenue) => {
|
|
@@ -623,88 +635,101 @@ var MarketDetailsContent = ({
|
|
|
623
635
|
return /* @__PURE__ */ jsxs(
|
|
624
636
|
Card,
|
|
625
637
|
{
|
|
626
|
-
className: cn(
|
|
627
|
-
|
|
638
|
+
className: cn(
|
|
639
|
+
"w-full cursor-pointer rounded-agg-2xl text-left outline-none",
|
|
640
|
+
marketDetailsBaseCardClassName,
|
|
641
|
+
classNames == null ? void 0 : classNames.root
|
|
642
|
+
),
|
|
643
|
+
"aria-expanded": isOpened,
|
|
644
|
+
"aria-controls": detailsContentId,
|
|
645
|
+
role: "button",
|
|
646
|
+
tabIndex: 0,
|
|
647
|
+
"aria-label": isOpened ? labels.marketDetails.toggleCloseDetailsAria(model.title) : labels.marketDetails.toggleOpenDetailsAria(model.title),
|
|
648
|
+
onClick: handleToggleExpanded,
|
|
649
|
+
onKeyDown: handleToggleExpanded,
|
|
628
650
|
children: [
|
|
629
|
-
/* @__PURE__ */ jsxs(
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
model.image ? /* @__PURE__ */ jsx(
|
|
642
|
-
"img",
|
|
643
|
-
{
|
|
644
|
-
src: model.image,
|
|
645
|
-
alt: "",
|
|
646
|
-
className: "size-12 rounded-agg-lg object-cover md:size-[60px]"
|
|
647
|
-
}
|
|
648
|
-
) : null,
|
|
649
|
-
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col", children: [
|
|
650
|
-
/* @__PURE__ */ jsx(Typography, { as: "h3", variant: "title", className: "truncate text-agg-lg leading-agg-7", children: model.title }),
|
|
651
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsx(Typography, { variant: "meta", className: "truncate text-agg-sm leading-agg-5", children: model.subtitle }) })
|
|
652
|
-
] })
|
|
653
|
-
] }),
|
|
654
|
-
/* @__PURE__ */ jsx(
|
|
655
|
-
Typography,
|
|
651
|
+
/* @__PURE__ */ jsxs(
|
|
652
|
+
"div",
|
|
653
|
+
{
|
|
654
|
+
className: cn(
|
|
655
|
+
"flex flex-row items-center justify-between gap-3 px-5 py-4",
|
|
656
|
+
isOpened && "pb-3",
|
|
657
|
+
classNames == null ? void 0 : classNames.header
|
|
658
|
+
),
|
|
659
|
+
children: [
|
|
660
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-3 md:gap-4", children: [
|
|
661
|
+
model.image ? /* @__PURE__ */ jsx(
|
|
662
|
+
"img",
|
|
656
663
|
{
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
className: "
|
|
660
|
-
children: formatProbabilityPercent(headlineProbability)
|
|
664
|
+
src: model.image,
|
|
665
|
+
alt: "",
|
|
666
|
+
className: "size-12 rounded-agg-lg object-cover md:size-[60px]"
|
|
661
667
|
}
|
|
662
|
-
)
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
668
|
+
) : null,
|
|
669
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col", children: [
|
|
670
|
+
/* @__PURE__ */ jsx(Typography, { as: "h3", variant: "body-large-strong", className: "truncate", children: model.title }),
|
|
671
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsx(Typography, { variant: "label", className: "truncate text-agg-muted-foreground", children: model.subtitle }) })
|
|
672
|
+
] })
|
|
673
|
+
] }),
|
|
674
|
+
/* @__PURE__ */ jsx(Typography, { as: "div", variant: "heading", className: "shrink-0", children: formatProbabilityPercent(headlineProbability) }),
|
|
675
|
+
/* @__PURE__ */ jsx(
|
|
676
|
+
"div",
|
|
677
|
+
{
|
|
678
|
+
className: "flex gap-2",
|
|
679
|
+
role: "tablist",
|
|
680
|
+
"aria-label": labels.marketDetails.marketOutcomesAria,
|
|
681
|
+
tabIndex: 0,
|
|
682
|
+
onKeyDown: (e) => handleOutcomeKeyDown(e),
|
|
683
|
+
children: headerOutcomeItems.map((item) => {
|
|
684
|
+
const isPositive = item.tone === "positive";
|
|
685
|
+
const isActiveOutcome = item.label === selectedOutcomeLabel;
|
|
686
|
+
return /* @__PURE__ */ jsx(
|
|
687
|
+
"button",
|
|
688
|
+
{
|
|
689
|
+
type: "button",
|
|
690
|
+
role: "tab",
|
|
691
|
+
"aria-selected": isActiveOutcome,
|
|
692
|
+
tabIndex: isActiveOutcome ? 0 : -1,
|
|
693
|
+
className: getOutcomeButtonClassName({
|
|
694
|
+
enableAnimations: config.enableAnimations,
|
|
695
|
+
isPositive,
|
|
696
|
+
isActive: isActiveOutcome
|
|
697
|
+
}),
|
|
698
|
+
onClick: (e) => {
|
|
699
|
+
e.preventDefault();
|
|
700
|
+
e.stopPropagation();
|
|
701
|
+
setSelectedOutcomeLabel(item.label);
|
|
702
|
+
},
|
|
703
|
+
children: /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2", children: [
|
|
704
|
+
/* @__PURE__ */ jsx(
|
|
705
|
+
VenueLogo,
|
|
706
|
+
{
|
|
707
|
+
venue: isPositive ? "polymarket" : "probable",
|
|
708
|
+
size: "small",
|
|
709
|
+
color: isActiveOutcome ? "var(--agg-color-on-primary)" : void 0
|
|
710
|
+
}
|
|
711
|
+
),
|
|
712
|
+
/* @__PURE__ */ jsx(
|
|
713
|
+
Typography,
|
|
714
|
+
{
|
|
715
|
+
variant: isActiveOutcome ? "body-strong" : "body",
|
|
716
|
+
className: cn(
|
|
717
|
+
"text-agg-base leading-agg-6",
|
|
718
|
+
isActiveOutcome ? "text-agg-on-primary" : "text-agg-foreground"
|
|
719
|
+
),
|
|
720
|
+
children: `${item.label} ${formatProbabilityCents(item.probability)}`
|
|
721
|
+
}
|
|
722
|
+
)
|
|
723
|
+
] })
|
|
724
|
+
},
|
|
725
|
+
item.label
|
|
726
|
+
);
|
|
727
|
+
})
|
|
728
|
+
}
|
|
729
|
+
)
|
|
730
|
+
]
|
|
731
|
+
}
|
|
732
|
+
),
|
|
708
733
|
/* @__PURE__ */ jsx(
|
|
709
734
|
"div",
|
|
710
735
|
{
|
|
@@ -756,7 +781,7 @@ var MarketDetailsContent = ({
|
|
|
756
781
|
"aria-busy": true,
|
|
757
782
|
children: [
|
|
758
783
|
/* @__PURE__ */ jsx(LoadingIcon, {}),
|
|
759
|
-
/* @__PURE__ */ jsx(Typography, { variant: "
|
|
784
|
+
/* @__PURE__ */ jsx(Typography, { variant: "label", className: "text-agg-muted-foreground", children: labels.marketDetails.loadingOrderbookLabel })
|
|
760
785
|
]
|
|
761
786
|
}
|
|
762
787
|
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -804,9 +829,13 @@ var MarketDetailsContent = ({
|
|
|
804
829
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary focus-visible:ring-offset-2 focus-visible:ring-offset-agg-secondary-hover",
|
|
805
830
|
isActiveVenue ? "border-agg-primary bg-agg-secondary" : "border-transparent bg-agg-secondary-hover"
|
|
806
831
|
),
|
|
807
|
-
onClick: () =>
|
|
832
|
+
onClick: (e) => {
|
|
833
|
+
e.preventDefault();
|
|
834
|
+
e.stopPropagation();
|
|
835
|
+
handleGraphVenueToggle(item.venue);
|
|
836
|
+
},
|
|
808
837
|
children: [
|
|
809
|
-
/* @__PURE__ */ jsx(VenueLogo, { venue: item.venue, size: "
|
|
838
|
+
/* @__PURE__ */ jsx(VenueLogo, { venue: item.venue, size: "small" }),
|
|
810
839
|
/* @__PURE__ */ jsx("span", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: probability })
|
|
811
840
|
]
|
|
812
841
|
},
|
|
@@ -851,7 +880,11 @@ var MarketDetailsContent = ({
|
|
|
851
880
|
isActive ? "font-agg-bold text-agg-foreground" : "font-agg-normal text-agg-muted-foreground"
|
|
852
881
|
),
|
|
853
882
|
"aria-pressed": isActive,
|
|
854
|
-
onClick: () =>
|
|
883
|
+
onClick: (e) => {
|
|
884
|
+
e.preventDefault();
|
|
885
|
+
e.stopPropagation();
|
|
886
|
+
setSelectedTimeRange(timeRange);
|
|
887
|
+
},
|
|
855
888
|
children: timeRange === "ALL" ? labels.eventItemDetails.allTimeRange : timeRange
|
|
856
889
|
},
|
|
857
890
|
timeRange
|
|
@@ -866,7 +899,7 @@ var MarketDetailsContent = ({
|
|
|
866
899
|
{
|
|
867
900
|
className: "flex items-center justify-between rounded-agg-xl bg-agg-secondary-hover px-4 py-3",
|
|
868
901
|
children: [
|
|
869
|
-
/* @__PURE__ */ jsx(Typography, { variant: "
|
|
902
|
+
/* @__PURE__ */ jsx(Typography, { variant: "label", className: "text-agg-muted-foreground", children: row.label }),
|
|
870
903
|
/* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-right", children: row.value })
|
|
871
904
|
]
|
|
872
905
|
},
|